diff --git a/boards/arm/96b_aerocore2/pinmux.c b/boards/arm/96b_aerocore2/pinmux.c index 4e618468114..e8cc75a3ec0 100644 --- a/boards/arm/96b_aerocore2/pinmux.c +++ b/boards/arm/96b_aerocore2/pinmux.c @@ -82,7 +82,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(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_I2C2_SDA}, #endif diff --git a/boards/arm/96b_argonkey/pinmux.c b/boards/arm/96b_argonkey/pinmux.c index 77c0cfee4ea..1cbdede713e 100644 --- a/boards/arm/96b_argonkey/pinmux.c +++ b/boards/arm/96b_argonkey/pinmux.c @@ -18,15 +18,15 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C2_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif diff --git a/boards/arm/96b_carbon/pinmux.c b/boards/arm/96b_carbon/pinmux.c index cd8be1ebef7..d283af8b9cf 100644 --- a/boards/arm/96b_carbon/pinmux.c +++ b/boards/arm/96b_carbon/pinmux.c @@ -26,11 +26,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PC6, STM32F4_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_USART6_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif diff --git a/boards/arm/96b_neonkey/pinmux.c b/boards/arm/96b_neonkey/pinmux.c index a0ad370fdde..fbed1837c4f 100644 --- a/boards/arm/96b_neonkey/pinmux.c +++ b/boards/arm/96b_neonkey/pinmux.c @@ -18,15 +18,15 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif diff --git a/boards/arm/96b_stm32_sensor_mez/pinmux.c b/boards/arm/96b_stm32_sensor_mez/pinmux.c index e19627d6b51..18e2793b64c 100644 --- a/boards/arm/96b_stm32_sensor_mez/pinmux.c +++ b/boards/arm/96b_stm32_sensor_mez/pinmux.c @@ -30,11 +30,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PC10, STM32F4_PINMUX_FUNC_PC10_UART4_TX}, {STM32_PIN_PC11, STM32F4_PINMUX_FUNC_PC11_UART4_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PC12, STM32F4_PINMUX_FUNC_PC12_I2C2_SDA}, #endif diff --git a/boards/arm/96b_wistrio/pinmux.c b/boards/arm/96b_wistrio/pinmux.c index 623a8e79daf..9606c80df83 100644 --- a/boards/arm/96b_wistrio/pinmux.c +++ b/boards/arm/96b_wistrio/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32L1X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA15, STM32L1X_PINMUX_FUNC_PA15_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L1X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L1X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/adafruit_feather_stm32f405/pinmux.c b/boards/arm/adafruit_feather_stm32f405/pinmux.c index fe072f1b930..50178529009 100644 --- a/boards/arm/adafruit_feather_stm32f405/pinmux.c +++ b/boards/arm/adafruit_feather_stm32f405/pinmux.c @@ -18,7 +18,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif diff --git a/boards/arm/b_l072z_lrwan1/pinmux.c b/boards/arm/b_l072z_lrwan1/pinmux.c index 8c8973d5a6f..4a86c98b7e3 100644 --- a/boards/arm/b_l072z_lrwan1/pinmux.c +++ b/boards/arm/b_l072z_lrwan1/pinmux.c @@ -38,7 +38,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB14, STM32L0_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32L0_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/disco_l475_iot1/pinmux.c b/boards/arm/disco_l475_iot1/pinmux.c index 67e299db85f..82d6fc773ae 100644 --- a/boards/arm/disco_l475_iot1/pinmux.c +++ b/boards/arm/disco_l475_iot1/pinmux.c @@ -22,16 +22,16 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_UART4_TX}, {STM32_PIN_PA1, STM32L4X_PINMUX_FUNC_PA1_UART4_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C /* I2C2 is used for NFC, STSAFE, ToF & MEMS sensors */ {STM32_PIN_PB10, STM32L4X_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32L4X_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PC0, STM32L4X_PINMUX_FUNC_PC0_I2C3_SCL}, {STM32_PIN_PC1, STM32L4X_PINMUX_FUNC_PC1_I2C3_SDA}, #endif diff --git a/boards/arm/google_kukui/pinmux.c b/boards/arm/google_kukui/pinmux.c index ae998b8c261..a2edcc7db88 100644 --- a/boards/arm/google_kukui/pinmux.c +++ b/boards/arm/google_kukui/pinmux.c @@ -17,11 +17,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA9, STM32F0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F0_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PA11, STM32F0_PINMUX_FUNC_PA11_I2C2_SCL}, {STM32_PIN_PA12, STM32F0_PINMUX_FUNC_PA12_I2C2_SDA}, #endif diff --git a/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c b/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c index 57bf8dacb16..ae2c658a6c6 100644 --- a/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c +++ b/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c @@ -18,7 +18,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_I2C2_SDA}, #endif diff --git a/boards/arm/nucleo_f030r8/pinmux.c b/boards/arm/nucleo_f030r8/pinmux.c index 9d2f30b4970..3c7c0684f42 100644 --- a/boards/arm/nucleo_f030r8/pinmux.c +++ b/boards/arm/nucleo_f030r8/pinmux.c @@ -23,11 +23,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32F0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PA11, STM32F0_PINMUX_FUNC_PA11_I2C2_SCL}, {STM32_PIN_PA12, STM32F0_PINMUX_FUNC_PA12_I2C2_SDA}, #endif diff --git a/boards/arm/nucleo_f070rb/pinmux.c b/boards/arm/nucleo_f070rb/pinmux.c index 61a9f0f8c81..a553dddce2c 100644 --- a/boards/arm/nucleo_f070rb/pinmux.c +++ b/boards/arm/nucleo_f070rb/pinmux.c @@ -23,11 +23,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32F0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F0_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F0_PINMUX_FUNC_PB11_I2C2_SDA}, #endif diff --git a/boards/arm/nucleo_f091rc/pinmux.c b/boards/arm/nucleo_f091rc/pinmux.c index 7bd80c4abe0..d0ea9724702 100644 --- a/boards/arm/nucleo_f091rc/pinmux.c +++ b/boards/arm/nucleo_f091rc/pinmux.c @@ -22,11 +22,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32F0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PA11, STM32F0_PINMUX_FUNC_PA11_I2C2_SCL}, {STM32_PIN_PA12, STM32F0_PINMUX_FUNC_PA12_I2C2_SDA}, #endif diff --git a/boards/arm/nucleo_f302r8/pinmux.c b/boards/arm/nucleo_f302r8/pinmux.c index 1adf3367e44..2a2f93ef832 100644 --- a/boards/arm/nucleo_f302r8/pinmux.c +++ b/boards/arm/nucleo_f302r8/pinmux.c @@ -26,7 +26,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PC10, STM32F3_PINMUX_FUNC_PC10_USART3_TX}, {STM32_PIN_PC11, STM32F3_PINMUX_FUNC_PC11_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F3_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F3_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_f334r8/pinmux.c b/boards/arm/nucleo_f334r8/pinmux.c index 632c8ad3ea1..6a19d8b0378 100644 --- a/boards/arm/nucleo_f334r8/pinmux.c +++ b/boards/arm/nucleo_f334r8/pinmux.c @@ -26,7 +26,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB10, STM32F3_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F3_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F3_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F3_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_f401re/pinmux.c b/boards/arm/nucleo_f401re/pinmux.c index 8a9e847d939..682016325fb 100644 --- a/boards/arm/nucleo_f401re/pinmux.c +++ b/boards/arm/nucleo_f401re/pinmux.c @@ -25,7 +25,7 @@ static const struct pin_config pinconf[] = { #if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_f411re/pinmux.c b/boards/arm/nucleo_f411re/pinmux.c index 026c6db773f..ec9316bdee4 100644 --- a/boards/arm/nucleo_f411re/pinmux.c +++ b/boards/arm/nucleo_f411re/pinmux.c @@ -22,15 +22,15 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif diff --git a/boards/arm/nucleo_f412zg/pinmux.c b/boards/arm/nucleo_f412zg/pinmux.c index 90e4c151743..01c5578bbb6 100644 --- a/boards/arm/nucleo_f412zg/pinmux.c +++ b/boards/arm/nucleo_f412zg/pinmux.c @@ -29,7 +29,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM}, {STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP}, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_f413zh/pinmux.c b/boards/arm/nucleo_f413zh/pinmux.c index 9d39a273858..51049faeef7 100644 --- a/boards/arm/nucleo_f413zh/pinmux.c +++ b/boards/arm/nucleo_f413zh/pinmux.c @@ -29,7 +29,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM}, {STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP}, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_f429zi/pinmux.c b/boards/arm/nucleo_f429zi/pinmux.c index 43407e71c3f..bdc5879a9f5 100644 --- a/boards/arm/nucleo_f429zi/pinmux.c +++ b/boards/arm/nucleo_f429zi/pinmux.c @@ -38,7 +38,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PG13, STM32F4_PINMUX_FUNC_PG13_ETH}, {STM32_PIN_PB13, STM32F4_PINMUX_FUNC_PB13_ETH}, #endif /* CONFIG_ETH_STM32_HAL */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_f446re/pinmux.c b/boards/arm/nucleo_f446re/pinmux.c index 7c2bf73b95f..bd4ae68bac6 100644 --- a/boards/arm/nucleo_f446re/pinmux.c +++ b/boards/arm/nucleo_f446re/pinmux.c @@ -22,15 +22,15 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif diff --git a/boards/arm/nucleo_f746zg/pinmux.c b/boards/arm/nucleo_f746zg/pinmux.c index 56c27c1606d..e277c46b430 100644 --- a/boards/arm/nucleo_f746zg/pinmux.c +++ b/boards/arm/nucleo_f746zg/pinmux.c @@ -49,7 +49,7 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PA11, STM32F7_PINMUX_FUNC_PA11_OTG_FS_DM }, { STM32_PIN_PA12, STM32F7_PINMUX_FUNC_PA12_OTG_FS_DP }, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C { STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif diff --git a/boards/arm/nucleo_f756zg/pinmux.c b/boards/arm/nucleo_f756zg/pinmux.c index 2ed4e126dbb..38f41114c6b 100644 --- a/boards/arm/nucleo_f756zg/pinmux.c +++ b/boards/arm/nucleo_f756zg/pinmux.c @@ -49,7 +49,7 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PA11, STM32F7_PINMUX_FUNC_PA11_OTG_FS_DM }, { STM32_PIN_PA12, STM32F7_PINMUX_FUNC_PA12_OTG_FS_DP }, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C { STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif diff --git a/boards/arm/nucleo_f767zi/pinmux.c b/boards/arm/nucleo_f767zi/pinmux.c index fed84cdbc3d..32c3b6c2300 100644 --- a/boards/arm/nucleo_f767zi/pinmux.c +++ b/boards/arm/nucleo_f767zi/pinmux.c @@ -49,7 +49,7 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PA11, STM32F7_PINMUX_FUNC_PA11_OTG_FS_DM }, { STM32_PIN_PA12, STM32F7_PINMUX_FUNC_PA12_OTG_FS_DP }, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C { STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif diff --git a/boards/arm/nucleo_g431rb/pinmux.c b/boards/arm/nucleo_g431rb/pinmux.c index 125d3f7c204..2de0c34f6bd 100644 --- a/boards/arm/nucleo_g431rb/pinmux.c +++ b/boards/arm/nucleo_g431rb/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32G4X_PINMUX_FUNC_PA2_LPUART1_TX}, {STM32_PIN_PA3, STM32G4X_PINMUX_FUNC_PA3_LPUART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32G4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32G4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_g474re/pinmux.c b/boards/arm/nucleo_g474re/pinmux.c index b7e87e4337b..c7016da5fac 100644 --- a/boards/arm/nucleo_g474re/pinmux.c +++ b/boards/arm/nucleo_g474re/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32G4X_PINMUX_FUNC_PA2_LPUART1_TX}, {STM32_PIN_PA3, STM32G4X_PINMUX_FUNC_PA3_LPUART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32G4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32G4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_h743zi/pinmux.c b/boards/arm/nucleo_h743zi/pinmux.c index db524a8b177..c98c69012b0 100644 --- a/boards/arm/nucleo_h743zi/pinmux.c +++ b/boards/arm/nucleo_h743zi/pinmux.c @@ -18,7 +18,7 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PD8, STM32H7_PINMUX_FUNC_PD8_USART3_TX }, { STM32_PIN_PD9, STM32H7_PINMUX_FUNC_PD9_USART3_RX }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C { STM32_PIN_PB8, STM32H7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32H7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif diff --git a/boards/arm/nucleo_l053r8/pinmux.c b/boards/arm/nucleo_l053r8/pinmux.c index c191289fdd1..9e46dc82197 100644 --- a/boards/arm/nucleo_l053r8/pinmux.c +++ b/boards/arm/nucleo_l053r8/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32L0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_l073rz/pinmux.c b/boards/arm/nucleo_l073rz/pinmux.c index cb1d969e1a9..98071a858c6 100644 --- a/boards/arm/nucleo_l073rz/pinmux.c +++ b/boards/arm/nucleo_l073rz/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32L0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_l152re/pinmux.c b/boards/arm/nucleo_l152re/pinmux.c index 987fefd55e8..6af989471a8 100644 --- a/boards/arm/nucleo_l152re/pinmux.c +++ b/boards/arm/nucleo_l152re/pinmux.c @@ -17,7 +17,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32L1X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L1X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L1X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L1X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_l432kc/pinmux.c b/boards/arm/nucleo_l432kc/pinmux.c index 43f4fe00d5b..8b91a3e2928 100644 --- a/boards/arm/nucleo_l432kc/pinmux.c +++ b/boards/arm/nucleo_l432kc/pinmux.c @@ -23,7 +23,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_l452re/pinmux.c b/boards/arm/nucleo_l452re/pinmux.c index 760ecd1fbf3..1b4de90af5f 100644 --- a/boards/arm/nucleo_l452re/pinmux.c +++ b/boards/arm/nucleo_l452re/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L4X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_l476rg/pinmux.c b/boards/arm/nucleo_l476rg/pinmux.c index b27253ef1fc..9f4e58b6d98 100644 --- a/boards/arm/nucleo_l476rg/pinmux.c +++ b/boards/arm/nucleo_l476rg/pinmux.c @@ -27,11 +27,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB10, STM32L4X_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32L4X_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PC0, STM32L4X_PINMUX_FUNC_PC0_I2C3_SCL}, {STM32_PIN_PC1, STM32L4X_PINMUX_FUNC_PC1_I2C3_SDA}, #endif diff --git a/boards/arm/nucleo_l496zg/pinmux.c b/boards/arm/nucleo_l496zg/pinmux.c index 420a33bcd5b..935ca742871 100644 --- a/boards/arm/nucleo_l496zg/pinmux.c +++ b/boards/arm/nucleo_l496zg/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_LPUART1_TX}, {STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_LPUART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_l4r5zi/pinmux.c b/boards/arm/nucleo_l4r5zi/pinmux.c index 72e47ede377..667d44df749 100644 --- a/boards/arm/nucleo_l4r5zi/pinmux.c +++ b/boards/arm/nucleo_l4r5zi/pinmux.c @@ -30,7 +30,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PD8, STM32L4X_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32L4X_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif diff --git a/boards/arm/nucleo_wb55rg/pinmux.c b/boards/arm/nucleo_wb55rg/pinmux.c index da2569c48a3..76a04adba77 100644 --- a/boards/arm/nucleo_wb55rg/pinmux.c +++ b/boards/arm/nucleo_wb55rg/pinmux.c @@ -22,11 +22,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32WBX_PINMUX_FUNC_PA2_LPUART1_TX}, {STM32_PIN_PA3, STM32WBX_PINMUX_FUNC_PA3_LPUART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32WBX_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32WBX_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PC0, STM32WBX_PINMUX_FUNC_PC0_I2C3_SCL}, {STM32_PIN_PC1, STM32WBX_PINMUX_FUNC_PC1_I2C3_SDA}, #endif diff --git a/boards/arm/olimexino_stm32/pinmux.c b/boards/arm/olimexino_stm32/pinmux.c index e763e9cf44d..ccb8332ce30 100644 --- a/boards/arm/olimexino_stm32/pinmux.c +++ b/boards/arm/olimexino_stm32/pinmux.c @@ -27,11 +27,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA}, #endif diff --git a/boards/arm/sensortile_box/pinmux.c b/boards/arm/sensortile_box/pinmux.c index 7853618c676..eea15a0ec2b 100644 --- a/boards/arm/sensortile_box/pinmux.c +++ b/boards/arm/sensortile_box/pinmux.c @@ -22,11 +22,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L4X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_I2C3_SCL}, {STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_I2C3_SDA}, #endif diff --git a/boards/arm/steval_fcu001v1/pinmux.c b/boards/arm/steval_fcu001v1/pinmux.c index a6890cf6282..50856f5e0b3 100644 --- a/boards/arm/steval_fcu001v1/pinmux.c +++ b/boards/arm/steval_fcu001v1/pinmux.c @@ -21,7 +21,7 @@ static const struct pin_config pinconf[] = { #if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, #endif diff --git a/boards/arm/stm32_min_dev/pinmux.c b/boards/arm/stm32_min_dev/pinmux.c index d4a49c25b6f..e6af0c05aa3 100644 --- a/boards/arm/stm32_min_dev/pinmux.c +++ b/boards/arm/stm32_min_dev/pinmux.c @@ -26,11 +26,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA}, #endif diff --git a/boards/arm/stm32f072b_disco/pinmux.c b/boards/arm/stm32f072b_disco/pinmux.c index 9c9b503c664..804a0fb6d07 100644 --- a/boards/arm/stm32f072b_disco/pinmux.c +++ b/boards/arm/stm32f072b_disco/pinmux.c @@ -19,11 +19,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB6, STM32F0_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F0_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F0_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F0_PINMUX_FUNC_PB11_I2C2_SDA}, #endif diff --git a/boards/arm/stm32f3_disco/pinmux.c b/boards/arm/stm32f3_disco/pinmux.c index f49ba9b1081..308ab592a59 100644 --- a/boards/arm/stm32f3_disco/pinmux.c +++ b/boards/arm/stm32f3_disco/pinmux.c @@ -22,11 +22,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL}, {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA}, #endif diff --git a/boards/arm/stm32f429i_disc1/pinmux.c b/boards/arm/stm32f429i_disc1/pinmux.c index 5859f23c484..08d055fb8c2 100644 --- a/boards/arm/stm32f429i_disc1/pinmux.c +++ b/boards/arm/stm32f429i_disc1/pinmux.c @@ -30,15 +30,15 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PF8, STM32F4_PINMUX_FUNC_PF8_SPI5_MASTER_MISO}, {STM32_PIN_PF9, STM32F4_PINMUX_FUNC_PF9_SPI5_MASTER_MOSI}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PC9, STM32F4_PINMUX_FUNC_PC9_I2C3_SDA}, #endif diff --git a/boards/arm/stm32f469i_disco/pinmux.c b/boards/arm/stm32f469i_disco/pinmux.c index d348e507308..5928a2276ac 100644 --- a/boards/arm/stm32f469i_disco/pinmux.c +++ b/boards/arm/stm32f469i_disco/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX}, {STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/stm32f723e_disco/pinmux.c b/boards/arm/stm32f723e_disco/pinmux.c index 6694e154de0..dc12651ba2e 100644 --- a/boards/arm/stm32f723e_disco/pinmux.c +++ b/boards/arm/stm32f723e_disco/pinmux.c @@ -22,15 +22,15 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PC6, STM32F7_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F7_PINMUX_FUNC_PC7_USART6_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PH4, STM32F7_PINMUX_FUNC_PH4_I2C2_SCL}, {STM32_PIN_PH5, STM32F7_PINMUX_FUNC_PH5_I2C2_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PA8, STM32F7_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PH8, STM32F7_PINMUX_FUNC_PH8_I2C3_SDA}, #endif diff --git a/boards/arm/stm32f746g_disco/pinmux.c b/boards/arm/stm32f746g_disco/pinmux.c index 29bae905a87..450bd05b89d 100644 --- a/boards/arm/stm32f746g_disco/pinmux.c +++ b/boards/arm/stm32f746g_disco/pinmux.c @@ -38,11 +38,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PG13, STM32F7_PINMUX_FUNC_PG13_ETH}, {STM32_PIN_PG14, STM32F7_PINMUX_FUNC_PG14_ETH}, #endif /* CONFIG_ETH_STM32_HAL */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) && CONFIG_I2C {STM32_PIN_PH7, STM32F7_PINMUX_FUNC_PH7_I2C3_SCL}, {STM32_PIN_PH8, STM32F7_PINMUX_FUNC_PH8_I2C3_SDA}, #endif diff --git a/boards/arm/stm32f769i_disco/pinmux.c b/boards/arm/stm32f769i_disco/pinmux.c index b1210ab3f7d..1e566ed6d34 100644 --- a/boards/arm/stm32f769i_disco/pinmux.c +++ b/boards/arm/stm32f769i_disco/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PC6, STM32F7_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F7_PINMUX_FUNC_PC7_USART6_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/stm32l1_disco/pinmux.c b/boards/arm/stm32l1_disco/pinmux.c index 1d837086863..4f97759c4c7 100644 --- a/boards/arm/stm32l1_disco/pinmux.c +++ b/boards/arm/stm32l1_disco/pinmux.c @@ -25,11 +25,11 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB10, STM32L1X_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32L1X_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB6, STM32L1X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L1X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C {STM32_PIN_PB10, STM32L1X_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32L1X_PINMUX_FUNC_PB11_I2C2_SDA}, #endif diff --git a/boards/arm/stm32l496g_disco/pinmux.c b/boards/arm/stm32l496g_disco/pinmux.c index 2ee077ccf85..7d25e8cf1f2 100644 --- a/boards/arm/stm32l496g_disco/pinmux.c +++ b/boards/arm/stm32l496g_disco/pinmux.c @@ -27,7 +27,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_LPUART1_TX}, {STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_LPUART1_RX}, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif diff --git a/boards/arm/stm32mp157c_dk2/pinmux.c b/boards/arm/stm32mp157c_dk2/pinmux.c index e76465edb2d..5f42992f1c7 100644 --- a/boards/arm/stm32mp157c_dk2/pinmux.c +++ b/boards/arm/stm32mp157c_dk2/pinmux.c @@ -22,7 +22,7 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PE7, STM32MP1X_PINMUX_FUNC_PE7_UART7_RX }, { STM32_PIN_PE8, STM32MP1X_PINMUX_FUNC_PE8_UART7_TX }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c5), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c5), okay) && CONFIG_I2C { STM32_PIN_PA11, STM32MP1X_PINMUX_FUNC_PA11_I2C5_SCL }, { STM32_PIN_PA12, STM32MP1X_PINMUX_FUNC_PA12_I2C5_SDA }, #endif diff --git a/boards/arm/stm32vl_disco/pinmux.c b/boards/arm/stm32vl_disco/pinmux.c index 579d3698d5d..15ec39b5171 100644 --- a/boards/arm/stm32vl_disco/pinmux.c +++ b/boards/arm/stm32vl_disco/pinmux.c @@ -45,11 +45,11 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PB14, STM32F1_PINMUX_FUNC_PB14_SPI2_MASTER_MISO }, { STM32_PIN_PB15, STM32F1_PINMUX_FUNC_PB15_SPI2_MASTER_MOSI }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C { STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL }, { STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) && CONFIG_I2C { STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL }, { STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA }, #endif