boards: arm: Reset Ethernet PHY after system timer on mimxrt1xxx_evk's
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 f0b3146f, 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>
Loading
Please sign in to comment