diff --git a/boards/arm/96b_argonkey/pinmux.c b/boards/arm/96b_argonkey/pinmux.c index 1cbdede713e..6ab9fec42fa 100644 --- a/boards/arm/96b_argonkey/pinmux.c +++ b/boards/arm/96b_argonkey/pinmux.c @@ -50,7 +50,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB14, STM32F4_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s5), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s5), okay) && CONFIG_I2S {STM32_PIN_PB0, STM32F4_PINMUX_FUNC_PB0_I2S5_CK}, {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2S5_SD}, #endif diff --git a/boards/arm/96b_stm32_sensor_mez/pinmux.c b/boards/arm/96b_stm32_sensor_mez/pinmux.c index 07b563d773c..a0225ace59d 100644 --- a/boards/arm/96b_stm32_sensor_mez/pinmux.c +++ b/boards/arm/96b_stm32_sensor_mez/pinmux.c @@ -68,7 +68,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PE13, STM32F4_PINMUX_FUNC_PE13_SPI4_MISO}, {STM32_PIN_PE14, STM32F4_PINMUX_FUNC_PE14_SPI4_MOSI}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s2), okay) && CONFIG_I2S {STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_I2S2_CK}, {STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_I2S2_SD}, #endif diff --git a/boards/arm/nucleo_f411re/pinmux.c b/boards/arm/nucleo_f411re/pinmux.c index ec9316bdee4..c9bebe4d040 100644 --- a/boards/arm/nucleo_f411re/pinmux.c +++ b/boards/arm/nucleo_f411re/pinmux.c @@ -35,7 +35,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif #if (DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) && CONFIG_SPI) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(i2s1), okay) + (DT_NODE_HAS_STATUS(DT_NODELABEL(i2s1), okay) && CONFIG_I2S) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */