08-15-2019 07:47 AM
We are trying to use the gem0 MIO interface on a custom Zynq UltraScale+, but are having some difficulties. According to the Technical Reference Manual, gem0 goes from MIO26-MIO37. However, when booted, /sys/kernel/debug/pinctrl/pinctrl/pingroups does not include MIO26 as part of the ethernet0_0_grp. When attempting to set the pinctrl in the device tree, the kernel error is "zynqmp-pinctrl pinctrl: zynqmp_pinconf_cfg_set failed: pin 26 param 1 value 0". Upon future inspection, I found the return value was -EACCES.
Has this been seen before, and what pinctrl settings would be needed in order to use the gem0 MIO interface? We do not believe we are seeing this error as a result of a conflict with another device using MIO.
The MIO portion of the device tree is:
pinctrl_gem0_default: gem0-default { mux { function = "ethernet0"; groups = "ethernet0_0_grp"; }; conf { groups = "ethernet0_0_grp"; slew-rate = <SLEW_RATE_SLOW>; io-standard = <IO_STANDARD_LVCMOS18>; }; conf-rx { pins = "MIO32", "MIO33", "MIO34", "MIO35", "MIO36", "MIO37"; bias-high-impedance; low-power-disable; }; conf-tx { pins = "MIO26", "MIO27", "MIO28", "MIO29", "MIO30", "MIO31"; bias-disable; low-power-enable; }; mux-mdio { function = "mdio0"; groups = "mdio0_0_grp"; }; conf-mdio { groups = "mdio0_0_grp"; slew-rate = <SLEW_RATE_SLOW>; io-standard = <IO_STANDARD_LVCMOS18>; bias-disable; };
08-16-2019 12:24 PM
It appears that in the arm trusted firmware, PIN_26 is missing the ETHERNET0 group. The following fix seems to fix it.
diff --git a/ps/linux/arm-trusted-firmware-xilinx-v2018.3/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c b/ps/linux/arm-trusted-firmware-xilinx-v2018.3/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c
index ebb01ad7..4d6203e9 100644
--- a/ps/linux/arm-trusted-firmware-xilinx-v2018.3/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c
+++ b/ps/linux/arm-trusted-firmware-xilinx-v2018.3/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c
@@ -1442,6 +1442,7 @@ static struct zynqmp_pin_group zynqmp_pin_groups[MAX_PIN] = {
},
[PINCTRL_PIN_26] = {
.groups = &((uint16_t []) {
+ PINCTRL_GRP_ETHERNET0_0,
PINCTRL_GRP_GEMTSU0_0,
PINCTRL_GRP_NAND0_1_CE,
PINCTRL_GRP_PMU0_0,
09-26-2019 11:41 AM
Yep, same issue with ZynqMP with custom board using GEM0. I'll try next your patch, thanks for providing!
[ 43.380318] platform ff0b0000.ethernet: Retrying from deferred list [ 43.386712] bus: 'platform': driver_probe_device: matched device ff0b0000.ethernet with driver macb [ 43.395749] bus: 'platform': really_probe: probing driver macb with device ff0b0000.ethernet [ 43.404214] generic pinconfig core: found drive-strength with value 12 [ 43.410742] generic pinconfig core: found slew-rate with value 1 [ 43.416749] generic pinconfig core: found bias-high-impedance with value 0 [ 43.423621] generic pinconfig core: found low-power-disable with value 0 [ 43.430327] generic pinconfig core: found bias-disable with value 0 [ 43.436590] generic pinconfig core: found low-power-enable with value 1 [ 43.443219] generic pinconfig core: found bias-disable with value 0 [ 43.449483] generic pinconfig core: found slew-rate with value 1 [ 43.455486] pinctrl core: add 16 pinctrl maps [ 43.459855] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: found group selector 0 for ethernet0_0_grp [ 43.469244] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: found group selector 0 for ethernet0_0_grp [ 43.478691] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: found group selector 7 for mdio0_0_grp [ 43.487732] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: found group selector 7 for mdio0_0_grp [ 43.496779] macb ff0b0000.ethernet: no init pinctrl state [ 43.502176] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 27 (MIO27) for ff0b0000.ethernet [ 43.511754] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 28 (MIO28) for ff0b0000.ethernet [ 43.521327] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 29 (MIO29) for ff0b0000.ethernet [ 43.530901] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 30 (MIO30) for ff0b0000.ethernet [ 43.540475] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 31 (MIO31) for ff0b0000.ethernet [ 43.550048] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 32 (MIO32) for ff0b0000.ethernet [ 43.559623] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 33 (MIO33) for ff0b0000.ethernet [ 43.569197] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 34 (MIO34) for ff0b0000.ethernet [ 43.578770] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 35 (MIO35) for ff0b0000.ethernet [ 43.588345] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 36 (MIO36) for ff0b0000.ethernet [ 43.597919] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 37 (MIO37) for ff0b0000.ethernet [ 43.608043] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: zynqmp_pinconf_cfg_set failed: pin 26 param 1 value 0 [ 43.618466] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 76 (MIO76) for ff0b0000.ethernet [ 43.628042] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: request pin 77 (MIO77) for ff0b0000.ethernet [ 43.637709] macb ff0b0000.ethernet: no sleep pinctrl state [ 43.643188] macb ff0b0000.ethernet: no idle pinctrl state [ 43.648605] macb ff0b0000.ethernet: adding to PM domain domain5 [ 43.654517] macb ff0b0000.ethernet: genpd_add_device()
09-27-2019 09:25 AM
We have experienced some rgmii tx issues after we resolved the pinctrl issues. We believe it may be due to our board layout. Can you confirm if this patch totally fixes your issues? Thank you!
09-27-2019 12:55 PM
Pinctrl configures properly now at Linux bootup, but no help to GEM0 operation with TI DP83867IR PHY (RGMII). I have been reading that the TI part would have very weak drivers @ 1.8V and related problems:
https://forums.xilinx.com/t5/Welcome-Join/DP83867-1-8V-VIL-Issue/td-p/678907
GEM0 / phy will show up under linux and: 'macb ff0b0000.ethernet eth1: link up (1000/Full)', but:
eth1 Link encap:Ethernet HWaddr 00:0a:35:00:22:01 inet addr:10.51.157.200 Bcast:10.51.157.255 Mask:255.255.255.0 inet6 addr: fe80::20a:35ff:fe00:2201/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:340 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:80732 (78.8 KiB) Interrupt:28
, nothing seems to move in or out of the Ethernet -cable when viewed with Wireshark at both ends of the cable.
Need to dump the DP83867 register/configuration values and debug more on physical level with oscilloscope to try to see what's really happening.
--------------------------------------------------------------------------
I patched PetaLinux 2019.1 with
/project-spec/meta-user/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend:
SRC_URI_append += " file://0001-MIO-pin-26-added-to-pinctrl-ethernet0-group.patch"
/project-spec/meta-user/recipes-bsp/arm-trusted-firmware/files/0001-MIO-pin-26-added-to-pinctrl-ethernet0-group.patch
--- plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c b/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c index ebb01ad7..4d6203e9 100644 --- a/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c +++ b/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c @@ -1442,6 +1442,7 @@ static struct zynqmp_pin_group zynqmp_pin_groups[MAX_PIN] = { }, [PINCTRL_PIN_26] = { .groups = &((uint16_t []) { + PINCTRL_GRP_ETHERNET0_0, PINCTRL_GRP_GEMTSU0_0, PINCTRL_GRP_NAND0_1_CE, PINCTRL_GRP_PMU0_0, --
07-21-2020 01:00 PM
Same problem here on Petalinux 2019.2
Files structures, file paths and filenames seems to have changed for 2019.2
I cannot find pm_api_pinctrl.c.
Anyone have tried that patch on 2019.2?