boards: arm: Conditionalize spi pinmuxes on nxp boards

Conditionalizes spi pinmuxes on CONFIG_SPI 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:
Maureen Helm 2020-05-21 08:47:13 -05:00 committed by Carles Cufí
parent ab2d73379a
commit 49debeb636
12 changed files with 13 additions and 13 deletions

View File

@ -64,7 +64,7 @@ static int frdm_k22f_pinmux_init(struct device *dev)
pinmux_pin_set(porta, 2, PORT_PCR_MUX(kPORT_MuxAsGpio));
pinmux_pin_set(portd, 5, PORT_PCR_MUX(kPORT_MuxAsGpio));
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay) && CONFIG_SPI
/* SPI0 CS0, SCK, SOUT, SIN */
pinmux_pin_set(portd, 4, PORT_PCR_MUX(kPORT_MuxAlt2));
pinmux_pin_set(portd, 1, PORT_PCR_MUX(kPORT_MuxAlt2));

View File

@ -32,7 +32,7 @@ config PINMUX_MCUX_PORTC
default y
config PINMUX_MCUX_PORTD
default y if "$(dt_nodelabel_enabled,spi0)"
default y if "$(dt_nodelabel_enabled,spi0)" && SPI
default y if "$(dt_nodelabel_enabled,uart2)" && SERIAL
config PINMUX_MCUX_PORTE

View File

@ -101,7 +101,7 @@ static int frdm_k64f_pinmux_init(struct device *dev)
pinmux_pin_set(portb, 9, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay) && CONFIG_SPI
/* SPI0 CS0, SCK, SOUT, SIN */
pinmux_pin_set(portd, 0, PORT_PCR_MUX(kPORT_MuxAlt2));
pinmux_pin_set(portd, 1, PORT_PCR_MUX(kPORT_MuxAlt2));

View File

@ -60,7 +60,7 @@ static int frdm_k82f_pinmux_init(struct device *dev)
| PORT_PCR_ODE_MASK);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) && CONFIG_SPI
/* SPI1 SCK, SOUT, SIN, PCS0 */
pinmux_pin_set(porte, 1, PORT_PCR_MUX(kPORT_MuxAlt2));
pinmux_pin_set(porte, 2, PORT_PCR_MUX(kPORT_MuxAlt2));

View File

@ -61,7 +61,7 @@ static int frdm_kw41z_pinmux_init(struct device *dev)
pinmux_pin_set(portc, 7, PORT_PCR_MUX(kPORT_MuxAlt4));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay) && CONFIG_SPI
/* SPI0 CS0, SCK, SOUT, SIN */
pinmux_pin_set(portc, 16, PORT_PCR_MUX(kPORT_MuxAlt2));
pinmux_pin_set(portc, 17, PORT_PCR_MUX(kPORT_MuxAlt2));

View File

@ -127,7 +127,7 @@ static int lpcxpresso_54114_pinmux_init(struct device *dev)
IOCON_PIO_I2CFILTER_EN);
#endif
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm5), nxp_lpc_spi, okay)
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(flexcomm5), nxp_lpc_spi, okay) && CONFIG_SPI
/* PORT0 PIN18 is configured as FC5_TXD_SCL_MISO */
pinmux_pin_set(port0, 18, IOCON_PIO_FUNC1 |
IOCON_PIO_MODE_PULLUP |

View File

@ -145,7 +145,7 @@ static int lpcxpresso_55s16_pinmux_init(struct device *dev)
IOCON_PIO_OPENDRAIN_DI);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay) && CONFIG_SPI
/* PORT0 PIN26 is configured as HS_SPI_MOSI */
pinmux_pin_set(port0, 26, IOCON_PIO_FUNC9 |
IOCON_PIO_MODE_PULLUP |

View File

@ -116,7 +116,7 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev)
IOCON_PIO_OPENDRAIN_DI);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay) && CONFIG_SPI
/* PORT0 PIN26 is configured as HS_SPI_MOSI */
pinmux_pin_set(port0, 26, IOCON_PIO_FUNC9 |
IOCON_PIO_MODE_PULLUP |

View File

@ -183,7 +183,7 @@ static int mimxrt1050_evk_init(struct device *dev)
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi3), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi3), okay) && CONFIG_SPI
/* LPSPI3 SCK, SDO, SDI, PCS0 */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_00_LPSPI3_SCK, 0);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_01_LPSPI3_SDO, 0);

View File

@ -187,7 +187,7 @@ static int mm_swiftio_init(struct device *dev)
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi3), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi3), okay) && CONFIG_SPI
/* LPSPI3 SCK, SDO, SDI, PCS0 */
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_00_LPSPI3_SCK, 0);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_01_LPSPI3_SDO, 0);

View File

@ -70,7 +70,7 @@ static int twr_ke18f_pinmux_init(struct device *dev)
pinmux_pin_set(portb, 1, PORT_PCR_MUX(kPORT_MuxAlt2));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi0), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi0), okay) && CONFIG_SPI
/* SPI0 SCK, SIN, SOUT */
pinmux_pin_set(porte, 0, PORT_PCR_MUX(kPORT_MuxAlt2));
pinmux_pin_set(porte, 1, PORT_PCR_MUX(kPORT_MuxAlt2));
@ -83,7 +83,7 @@ static int twr_ke18f_pinmux_init(struct device *dev)
pinmux_pin_set(porte, 6, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) && CONFIG_SPI
/* SPI1 SCK, SIN, SOUT */
pinmux_pin_set(portd, 0, PORT_PCR_MUX(kPORT_MuxAlt3));
pinmux_pin_set(portd, 1, PORT_PCR_MUX(kPORT_MuxAlt3));

View File

@ -42,7 +42,7 @@ static int usb_kw24d512_pinmux_init(struct device *dev)
pinmux_pin_set(portd, 4, PORT_PCR_MUX(kPORT_MuxAsGpio));
pinmux_pin_set(portd, 5, PORT_PCR_MUX(kPORT_MuxAsGpio));
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay)
#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) && CONFIG_SPI
/* SPI1 CS0, SCK, SOUT, SIN */
pinmux_pin_set(portb, 10, PORT_PCR_MUX(kPORT_MuxAlt2));
pinmux_pin_set(portb, 11, PORT_PCR_MUX(kPORT_MuxAlt2));