Message ID | 1572848275-30941-1-git-send-email-peng.fan@nxp.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | c7cb7c96f312f6afb3ed07f596b9b80d8a2c6441 |
Headers | show |
Series | arm64: defconfig: Change CONFIG_AT803X_PHY from m to y | expand |
On Mon, Nov 04, 2019 at 06:19:30AM +0000, Peng Fan wrote: > From: Peng Fan <peng.fan@nxp.com> > > With phy-reset-gpios are enabled for i.MX8MM-EVK board, phy > will be reset. Without CONFIG_AT803X_PHY as y, board will stop > booting in NFS DHCP, because phy is not ready. So mark > CONFIG_AT803X_PHY from m to y to make board boot when using nfs rootfs. > > Signed-off-by: Peng Fan <peng.fan@nxp.com> Applied, thanks.
On 04/11/19, Peng Fan wrote: > From: Peng Fan <peng.fan@nxp.com> > > With phy-reset-gpios are enabled for i.MX8MM-EVK board, phy > will be reset. Without CONFIG_AT803X_PHY as y, board will stop > booting in NFS DHCP, because phy is not ready. So mark > CONFIG_AT803X_PHY from m to y to make board boot when using nfs rootfs. > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > arch/arm64/configs/defconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig > index c9a867ac32d4..cd778c9ea8a4 100644 > --- a/arch/arm64/configs/defconfig > +++ b/arch/arm64/configs/defconfig > @@ -285,7 +285,7 @@ CONFIG_SNI_AVE=y > CONFIG_SNI_NETSEC=y > CONFIG_STMMAC_ETH=m > CONFIG_MDIO_BUS_MUX_MMIOREG=y > -CONFIG_AT803X_PHY=m > +CONFIG_AT803X_PHY=y > CONFIG_MARVELL_PHY=m > CONFIG_MARVELL_10G_PHY=m > CONFIG_MESON_GXL_PHY=m > -- > 2.16.4 Hello Peng, this patch broke my imx8qm nfs setup. With the generic phy driver my board is booting fine. But with the AT803X_PHY=y enabled I'am running into the following phy issue. So on my side it looks inverse as on yours. What is the best proposal to fix this? [ 5.550442] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 5.573206] Sending DHCP requests ...... timed out! [ 95.339702] IP-Config: Retrying forever (NFS root)... [ 95.348873] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) [ 99.438443] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 99.461206] Sending DHCP requests ...... timed out! [ 174.419639] IP-Config: Retrying forever (NFS root)... [ 174.428834] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) [ 178.542418] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 178.565206] Sending DHCP requests ..... [ 209.261271] random: crng init done [ 230.565202] . timed out! [ 260.577340] IP-Config: Retrying forever (NFS root)... [ 260.586497] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) [ 264.686438] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 264.709206] Sending DHCP requests ...... timed out! [ 339.259701] IP-Config: Retrying forever (NFS root)... [ 339.268835] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) [ 343.374422] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 343.405206] Sending DHCP requests ...... timed out! [ 433.171676] IP-Config: Retrying forever (NFS root)... [ 433.180842] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) [ 437.294439] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 437.317206] Sending DHCP requests ...... timed out! [ 509.003660] IP-Config: Retrying forever (NFS root)... [ 509.012836] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) [ 513.102416] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off Best Regards, Oliver
On 26/11/2019 15:54, Oliver Graute wrote: > this patch broke my imx8qm nfs setup. With the generic phy driver my > board is booting fine. But with the AT803X_PHY=y enabled I'm running > into the following phy issue. So on my side it looks inverse as on > yours. What is the best proposal to fix this? > > [ 5.550442] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 5.573206] Sending DHCP requests ...... timed out! > [ 95.339702] IP-Config: Retrying forever (NFS root)... > [ 95.348873] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > [ 99.438443] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 99.461206] Sending DHCP requests ...... timed out! Which DTS are you using? I bet one dollar that 6d4cd041f0af triggered a latent bug in the DTS. Regards.
On 27/11/19, Marc Gonzalez wrote: > On 26/11/2019 15:54, Oliver Graute wrote: > > > this patch broke my imx8qm nfs setup. With the generic phy driver my > > board is booting fine. But with the AT803X_PHY=y enabled I'm running > > into the following phy issue. So on my side it looks inverse as on > > yours. What is the best proposal to fix this? > > > > [ 5.550442] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > > [ 5.573206] Sending DHCP requests ...... timed out! > > [ 95.339702] IP-Config: Retrying forever (NFS root)... > > [ 95.348873] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > > [ 99.438443] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > > [ 99.461206] Sending DHCP requests ...... timed out! > > Which DTS are you using? I'am using this DTS which I'am currently working on: https://lists.infradead.org/pipermail/linux-arm-kernel/2019-October/689501.html > > I bet one dollar that 6d4cd041f0af triggered a latent bug in the DTS. So what should I fix in my device tree? Best regards, Oliver
Hi Oliver, On Wed, Nov 27, 2019 at 9:47 AM Oliver Graute <oliver.graute@gmail.com> wrote: > I'am using this DTS which I'am currently working on: > > https://lists.infradead.org/pipermail/linux-arm-kernel/2019-October/689501.html > > > > I bet one dollar that 6d4cd041f0af triggered a latent bug in the DTS. > > So what should I fix in my device tree? Some suggestions you could try: - Try to use phy-mode = "rgmii-id"; instead, - The PHY address 0 does not match the reg value of 4, so you need to double check the PHY address and make the @ and reg values to match. - If you have a GPIO connected to the Ethernet PHY reset pin, then you should describe it in the dts and also provide a delay as per the AR803X datasheet. Regards, Fabio Estevam
On 27/11/2019 13:46, Oliver Graute wrote: > On 27/11/19, Marc Gonzalez wrote: > >> On 26/11/2019 15:54, Oliver Graute wrote: >> >>> this patch broke my imx8qm nfs setup. With the generic phy driver my >>> board is booting fine. But with the AT803X_PHY=y enabled I'm running >>> into the following phy issue. So on my side it looks inverse as on >>> yours. What is the best proposal to fix this? >>> >>> [ 5.550442] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off >>> [ 5.573206] Sending DHCP requests ...... timed out! >>> [ 95.339702] IP-Config: Retrying forever (NFS root)... >>> [ 95.348873] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) >>> [ 99.438443] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off >>> [ 99.461206] Sending DHCP requests ...... timed out! >> >> Which DTS are you using? > > I'am using this DTS which I'am currently working on: > > https://lists.infradead.org/pipermail/linux-arm-kernel/2019-October/689501.html >> >> I bet one dollar that 6d4cd041f0af triggered a latent bug in the DTS. > > So what should I fix in my device tree? In the board DTS I used to work on, I had this: ð0 { phy-connection-type = "rgmii-id"; phy-handle = <ð0_phy>; #address-cells = <1>; #size-cells = <0>; /* Atheros AR8035 */ eth0_phy: ethernet-phy@4 { compatible = "ethernet-phy-id004d.d072", "ethernet-phy-ieee802.3-c22"; interrupts = <37 IRQ_TYPE_EDGE_RISING>; reg = <4>; }; }; In your DTS, you #include "imx8qm.dtsi" I found no such file: $ git ls-files | grep imx8qm drivers/pinctrl/freescale/pinctrl-imx8qm.c include/dt-bindings/pinctrl/pads-imx8qm.h In your patch: https://patchwork.kernel.org/patch/11211567/ +&fec1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_fec1>; + phy-mode = "rgmii-txid"; + phy-handle = <ðphy0>; + fsl,magic-packet; + fsl,rgmii_rxc_dly; + status = "okay"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethphy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <4>; + at803x,eee-disabled; + at803x,vddio-1p8v; + }; + }; +}; Try all possible 'phy-mode' (rgmii, rgmii-id, rgmii-rxid, rgmii-txid) Investigate 'fsl,rgmii_rxc_dly' (it's not a standard Linux DT prop) Documentation/devicetree/bindings/net/ethernet-controller.yaml Regards.
On 27/11/19, Fabio Estevam wrote: > Hi Oliver, > > On Wed, Nov 27, 2019 at 9:47 AM Oliver Graute <oliver.graute@gmail.com> wrote: > > > I'am using this DTS which I'am currently working on: > > > > https://lists.infradead.org/pipermail/linux-arm-kernel/2019-October/689501.html > > > > > > I bet one dollar that 6d4cd041f0af triggered a latent bug in the DTS. > > > > So what should I fix in my device tree? > > Some suggestions you could try: > > - Try to use phy-mode = "rgmii-id"; instead, > - The PHY address 0 does not match the reg value of 4, so you need to > double check the PHY address and make the @ and reg values to match. ok I fix that in my dts. > - If you have a GPIO connected to the Ethernet PHY reset pin, then you > should describe it in the dts and also provide a delay as per the > AR803X datasheet. it seems that currently no ethernet phy reset gpio is connected on that advantech eval board. The vendor says there is a optional resistor which can be mounted. Best regards, Oliver
On 28/11/19, Marc Gonzalez wrote: > On 27/11/2019 13:46, Oliver Graute wrote: > > > On 27/11/19, Marc Gonzalez wrote: > > > >> On 26/11/2019 15:54, Oliver Graute wrote: > >> > >>> this patch broke my imx8qm nfs setup. With the generic phy driver my > >>> board is booting fine. But with the AT803X_PHY=y enabled I'm running > >>> into the following phy issue. So on my side it looks inverse as on > >>> yours. What is the best proposal to fix this? > >>> > >>> [ 5.550442] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > >>> [ 5.573206] Sending DHCP requests ...... timed out! > >>> [ 95.339702] IP-Config: Retrying forever (NFS root)... > >>> [ 95.348873] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > >>> [ 99.438443] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > >>> [ 99.461206] Sending DHCP requests ...... timed out! > >> > >> Which DTS are you using? > > > > I'am using this DTS which I'am currently working on: > > > > https://lists.infradead.org/pipermail/linux-arm-kernel/2019-October/689501.html > >> > >> I bet one dollar that 6d4cd041f0af triggered a latent bug in the DTS. > > > > So what should I fix in my device tree? > > In the board DTS I used to work on, I had this: > > ð0 { > phy-connection-type = "rgmii-id"; > phy-handle = <ð0_phy>; > #address-cells = <1>; > #size-cells = <0>; > > /* Atheros AR8035 */ > eth0_phy: ethernet-phy@4 { > compatible = "ethernet-phy-id004d.d072", > "ethernet-phy-ieee802.3-c22"; > interrupts = <37 IRQ_TYPE_EDGE_RISING>; > reg = <4>; > }; > }; > > In your DTS, you #include "imx8qm.dtsi" > I found no such file: > $ git ls-files | grep imx8qm yes this file is not yet added to Shawn Guos next tree. Latest patch can be found here: https://patchwork.kernel.org/patch/11248331/ > > In your patch: > https://patchwork.kernel.org/patch/11211567/ > > +&fec1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_fec1>; > + phy-mode = "rgmii-txid"; > + phy-handle = <ðphy0>; > + fsl,magic-packet; > + fsl,rgmii_rxc_dly; > + status = "okay"; > + > + mdio { > + #address-cells = <1>; > + #size-cells = <0>; > + > + ethphy0: ethernet-phy@0 { > + compatible = "ethernet-phy-ieee802.3-c22"; > + reg = <4>; > + at803x,eee-disabled; > + at803x,vddio-1p8v; > + }; > + }; > +}; > > Try all possible 'phy-mode' (rgmii, rgmii-id, rgmii-rxid, rgmii-txid) > Investigate 'fsl,rgmii_rxc_dly' (it's not a standard Linux DT prop) > Documentation/devicetree/bindings/net/ethernet-controller.yaml thx for this hint. Best regards, Oliver
On Tue, Nov 26, 2019 at 03:54:50PM +0100, Oliver Graute wrote: > On 04/11/19, Peng Fan wrote: > > From: Peng Fan <peng.fan@nxp.com> > > > > With phy-reset-gpios are enabled for i.MX8MM-EVK board, phy > > will be reset. Without CONFIG_AT803X_PHY as y, board will stop > > booting in NFS DHCP, because phy is not ready. So mark > > CONFIG_AT803X_PHY from m to y to make board boot when using nfs rootfs. > > > > Signed-off-by: Peng Fan <peng.fan@nxp.com> > > --- > > arch/arm64/configs/defconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig > > index c9a867ac32d4..cd778c9ea8a4 100644 > > --- a/arch/arm64/configs/defconfig > > +++ b/arch/arm64/configs/defconfig > > @@ -285,7 +285,7 @@ CONFIG_SNI_AVE=y > > CONFIG_SNI_NETSEC=y > > CONFIG_STMMAC_ETH=m > > CONFIG_MDIO_BUS_MUX_MMIOREG=y > > -CONFIG_AT803X_PHY=m > > +CONFIG_AT803X_PHY=y > > CONFIG_MARVELL_PHY=m > > CONFIG_MARVELL_10G_PHY=m > > CONFIG_MESON_GXL_PHY=m > > -- > > 2.16.4 > > Hello Peng, > > this patch broke my imx8qm nfs setup. With the generic phy driver my > board is booting fine. But with the AT803X_PHY=y enabled I'am running > into the following phy issue. So on my side it looks inverse as on > yours. What is the best proposal to fix this? So you are saying your Atheros 8035 device works with generic phy driver but not with AT803X_PHY driver? That makes no sense. Did you add phy-reset-gpios property for your device? Shawn > > [ 5.550442] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 5.573206] Sending DHCP requests ...... timed out! > [ 95.339702] IP-Config: Retrying forever (NFS root)... > [ 95.348873] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > [ 99.438443] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 99.461206] Sending DHCP requests ...... timed out! > [ 174.419639] IP-Config: Retrying forever (NFS root)... > [ 174.428834] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > [ 178.542418] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 178.565206] Sending DHCP requests ..... > [ 209.261271] random: crng init done > [ 230.565202] . timed out! > [ 260.577340] IP-Config: Retrying forever (NFS root)... > [ 260.586497] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > [ 264.686438] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 264.709206] Sending DHCP requests ...... timed out! > [ 339.259701] IP-Config: Retrying forever (NFS root)... > [ 339.268835] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > [ 343.374422] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 343.405206] Sending DHCP requests ...... timed out! > [ 433.171676] IP-Config: Retrying forever (NFS root)... > [ 433.180842] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > [ 437.294439] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > [ 437.317206] Sending DHCP requests ...... timed out! > [ 509.003660] IP-Config: Retrying forever (NFS root)... > [ 509.012836] Atheros 8035 ethernet 5b040000.ethernet-1:06: attached PHY driver [Atheros 8035 ethernet] (mii_bus:phy_addr=5b040000.ethernet-1:06, irq=POLL) > [ 513.102416] fec 5b040000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off > > Best Regards, > > Oliver
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index c9a867ac32d4..cd778c9ea8a4 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -285,7 +285,7 @@ CONFIG_SNI_AVE=y CONFIG_SNI_NETSEC=y CONFIG_STMMAC_ETH=m CONFIG_MDIO_BUS_MUX_MMIOREG=y -CONFIG_AT803X_PHY=m +CONFIG_AT803X_PHY=y CONFIG_MARVELL_PHY=m CONFIG_MARVELL_10G_PHY=m CONFIG_MESON_GXL_PHY=m