boards: arm: Conditionalize ethernet pinmuxes on nxp boards
Conditionalizes ethernet pinmuxes on CONFIG_NET_L2_ETHERNET for all nxp boards (kinetis, lpc, and imx families) to avoid possible conflicts between peripherals. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
78eab7f3f2
commit
572f44090b
5 changed files with 17 additions and 17 deletions
|
@ -8,7 +8,7 @@
|
|||
#include <fsl_iomuxc.h>
|
||||
#include <fsl_gpio.h>
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
static gpio_pin_config_t enet_gpio_config = {
|
||||
.direction = kGPIO_DigitalOutput,
|
||||
.outputLogic = 0,
|
||||
|
@ -106,7 +106,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_04_GPIO1_IO04, 0U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_06_GPIO1_IO22, 0U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_ENET_RDATA00, 0);
|
||||
|
@ -147,7 +147,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
static int mimxrt1020_evk_phy_reset(struct device *dev)
|
||||
{
|
||||
/* RESET PHY chip. */
|
||||
|
@ -159,6 +159,6 @@ static int mimxrt1020_evk_phy_reset(struct device *dev)
|
|||
#endif
|
||||
|
||||
SYS_INIT(mimxrt1020_evk_init, PRE_KERNEL_1, 0);
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay)
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
SYS_INIT(mimxrt1020_evk_phy_reset, PRE_KERNEL_2, 0);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue