- 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.2k
 
boards: arm: Reset Ethernet PHY after system timer on mimxrt1xxx_evk's #38473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Moves the Ethernet PHY reset routine on mimxrt1xxx_evk boards to execute in the POST_KERNEL initialization level rather than the PRE_KERNEL_2 level because it relies on a kernel service, k_busy_wait(). Leverages the existing CONFIG_PHY_INIT_PRIORITY to allow users to configure when within the POST_KERNEL level this routine occurs, which by default is set correctly to the following order: Init Function Init Level Priority -------------------------------------------------------------------------------------- sys_clock_driver_init PRE_KERNEL_2 CONFIG_SYSTEM_CLOCK_INIT_PRIORITY=0 mcux_igpio_##n##_init POST_KERNEL CONFIG_KERNEL_INIT_PRIORITY_DEFAULT=40 mimxrt1064_evk_phy_reset POST_KERNEL CONFIG_PHY_INIT_PRIORITY=70 eth_init POST_KERNEL CONFIG_ETH_INIT_PRIORITY=80 net_init POST_KERNEL CONFIG_NET_INIT_PRIO=90 This fixes an issue that was introduced in commit f0b3146, which caused the system timer to be initialized after the Ethernet PHY reset. As a result, the k_busy_wait() never returned and the kernel never finished booting. The serial driver never initialized and there was no output on the console, not even a boot banner. Tested on the mimxrt1064_evk board with samples/net/dhcpv4_client. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
| 
           Compliance failure is due to the table in the commit message  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| 
           @dleach02, @hakehuang - are you able to ack?  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on mimxrt1024-evk with samples/net/zperf
- Update to dts file to use the generic MII PHY driver - Fix pinmux file according PR zephyrproject-rtos#38473 - Update Kconfig file for networking Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
- Update to dts file to use the generic MII PHY driver - Fix pinmux file according PR zephyrproject-rtos#38473 - Update Kconfig file for networking Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> soc: arm: nxp_rt: add support for MDIO driver Update to dts file to add MDIO driver. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: mdio: add NXP MCUX MDIO driver MDIO driver for MCUX platform with Ethernet. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: Extend generic ethernet phy NXP imx soc´s have the mdio bus integrated within the ethernet peripheral. Especially a flag within ethernet interrupt is used to signal successfull mii data transfer. Therefore the mii communication to phy must not start before ethernet module is initialized. To achieve this, 'late_mii_start' property is introduced to generic ethernet-phy. If set, the startup of phy communication is postponed until a callback is registered by eth driver. Also fix missing line (421) to parse 'no-reset' property in phy_mii.c Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: add option for separate mdio+phy driver Update driver Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
- Update to dts file to use the generic MII PHY driver - Fix pinmux file according PR zephyrproject-rtos#38473 - Update Kconfig file for networking Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> soc: arm: nxp_rt: add support for MDIO driver Update to dts file to add MDIO driver. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: mdio: add NXP MCUX MDIO driver MDIO driver for MCUX platform with Ethernet. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: Extend generic ethernet phy NXP imx soc´s have the mdio bus integrated within the ethernet peripheral. Especially a flag within ethernet interrupt is used to signal successfull mii data transfer. Therefore the mii communication to phy must not start before ethernet module is initialized. To achieve this, 'late_mii_start' property is introduced to generic ethernet-phy. If set, the startup of phy communication is postponed until a callback is registered by eth driver. Also fix missing line (421) to parse 'no-reset' property in phy_mii.c Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: add option for separate mdio+phy driver Update driver Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
- Update to dts file to use the generic MII PHY driver - Fix pinmux file according PR zephyrproject-rtos#38473 - Update Kconfig file for networking Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> soc: arm: nxp_rt: add support for MDIO driver Update to dts file to add MDIO driver. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: mdio: add NXP MCUX MDIO driver MDIO driver for MCUX platform with Ethernet. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: Extend generic ethernet phy NXP imx soc´s have the mdio bus integrated within the ethernet peripheral. Especially a flag within ethernet interrupt is used to signal successfull mii data transfer. Therefore the mii communication to phy must not start before ethernet module is initialized. To achieve this, 'late_mii_start' property is introduced to generic ethernet-phy. If set, the startup of phy communication is postponed until a callback is registered by eth driver. Also fix missing line (421) to parse 'no-reset' property in phy_mii.c Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: add option for separate mdio+phy driver Update driver Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
- Update to dts file to use the generic MII PHY driver - Fix pinmux file according PR zephyrproject-rtos#38473 - Update Kconfig file for networking Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> soc: arm: nxp_rt: add support for MDIO driver Update to dts file to add MDIO driver. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: mdio: add NXP MCUX MDIO driver MDIO driver for MCUX platform with Ethernet. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: Extend generic ethernet phy NXP imx soc´s have the mdio bus integrated within the ethernet peripheral. Especially a flag within ethernet interrupt is used to signal successfull mii data transfer. Therefore the mii communication to phy must not start before ethernet module is initialized. To achieve this, 'late_mii_start' property is introduced to generic ethernet-phy. If set, the startup of phy communication is postponed until a callback is registered by eth driver. Also fix missing line (421) to parse 'no-reset' property in phy_mii.c Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: add option for separate mdio+phy driver Update driver Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
- Update to dts file to use the generic MII PHY driver - Fix pinmux file according PR zephyrproject-rtos#38473 - Update Kconfig file for networking Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> soc: arm: nxp_rt: add support for MDIO driver Update to dts file to add MDIO driver. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: mdio: add NXP MCUX MDIO driver MDIO driver for MCUX platform with Ethernet. Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: Extend generic ethernet phy NXP imx soc´s have the mdio bus integrated within the ethernet peripheral. Especially a flag within ethernet interrupt is used to signal successfull mii data transfer. Therefore the mii communication to phy must not start before ethernet module is initialized. To achieve this, 'late_mii_start' property is introduced to generic ethernet-phy. If set, the startup of phy communication is postponed until a callback is registered by eth driver. Also fix missing line (421) to parse 'no-reset' property in phy_mii.c Signed-off-by: Bernhard Krämer <bdkrae@gmail.com> drivers: add option for separate mdio+phy driver Update driver Signed-off-by: Bernhard Krämer <bdkrae@gmail.com>
Moves the Ethernet PHY reset routine on mimxrt1xxx_evk boards to execute
in the POST_KERNEL initialization level rather than the PRE_KERNEL_2
level because it relies on a kernel service, k_busy_wait(). Leverages
the existing CONFIG_PHY_INIT_PRIORITY to allow users to configure when
within the POST_KERNEL level this routine occurs, which by default is
set correctly to the following order:
This fixes an issue that was introduced in commit
f0b3146, which caused the system timer
to be initialized after the Ethernet PHY reset. As a result, the
k_busy_wait() never returned and the kernel never finished booting. The
serial driver never initialized and there was no output on the console,
not even a boot banner.
Tested on the mimxrt1064_evk board with samples/net/dhcpv4_client.
Signed-off-by: Maureen Helm maureen.helm@nxp.com
Fixes #38186
cc: @ainguraXmarquiegui