diff --git a/boards/arm/96b_aerocore2/pinmux.c b/boards/arm/96b_aerocore2/pinmux.c index 3045ce6be5..0ae6849e48 100644 --- a/boards/arm/96b_aerocore2/pinmux.c +++ b/boards/arm/96b_aerocore2/pinmux.c @@ -14,39 +14,39 @@ /* pin assignments for board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PD5, STM32F4_PINMUX_FUNC_PD5_USART2_TX}, {STM32_PIN_PD6, STM32F4_PINMUX_FUNC_PD6_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PD8, STM32F4_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32F4_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart7)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart7), okay) {STM32_PIN_PE8, STM32F4_PINMUX_FUNC_PE8_UART7_TX}, {STM32_PIN_PE7, STM32F4_PINMUX_FUNC_PE7_UART7_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart8)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart8), okay) {STM32_PIN_PE1, STM32F4_PINMUX_FUNC_PE1_UART8_TX}, {STM32_PIN_PE0, STM32F4_PINMUX_FUNC_PE0_UART8_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) {STM32_PIN_PD12, STM32F4_PINMUX_FUNC_PD12_PWM4_CH1}, {STM32_PIN_PD13, STM32F4_PINMUX_FUNC_PD13_PWM4_CH2}, {STM32_PIN_PD14, STM32F4_PINMUX_FUNC_PD14_PWM4_CH3}, {STM32_PIN_PD15, STM32F4_PINMUX_FUNC_PD15_PWM4_CH4}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm5), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM5_CH1}, {STM32_PIN_PA1, STM32F4_PINMUX_FUNC_PA1_PWM5_CH2}, {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_PWM5_CH3}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_PWM5_CH4}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -56,7 +56,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F4_PINMUX_FUNC_PB12_SPI2_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -66,13 +66,13 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi3), okay) {STM32_PIN_PC10, STM32F4_PINMUX_FUNC_PC10_SPI3_SCK | STM32_OSPEEDR_VERY_HIGH_SPEED}, {STM32_PIN_PC11, STM32F4_PINMUX_FUNC_PC11_SPI3_MISO}, {STM32_PIN_PC12, STM32F4_PINMUX_FUNC_PC12_SPI3_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi4), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PE11, STM32F4_PINMUX_FUNC_PE11_SPI4_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -82,11 +82,11 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PC0, STM32F4_PINMUX_FUNC_PC0_ADC123_IN10}, {STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_ADC123_IN11}, {STM32_PIN_PC2, STM32F4_PINMUX_FUNC_PC2_ADC123_IN12}, diff --git a/boards/arm/96b_argonkey/pinmux.c b/boards/arm/96b_argonkey/pinmux.c index 970fe05b02..259fcfbc48 100644 --- a/boards/arm/96b_argonkey/pinmux.c +++ b/boards/arm/96b_argonkey/pinmux.c @@ -14,23 +14,23 @@ /* pin assignments for 96boards Argonkey board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -40,7 +40,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F4_PINMUX_FUNC_PB12_SPI2_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s5), okay) {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_avenger96/pinmux.c b/boards/arm/96b_avenger96/pinmux.c index 2b777cadbd..cb93cd7e17 100644 --- a/boards/arm/96b_avenger96/pinmux.c +++ b/boards/arm/96b_avenger96/pinmux.c @@ -14,11 +14,11 @@ /* pin assignments for Avenger96 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) { STM32_PIN_PB2, STM32MP1X_PINMUX_FUNC_PB2_UART4_RX }, { STM32_PIN_PD1, STM32MP1X_PINMUX_FUNC_PD1_UART4_TX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart7)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart7), okay) { STM32_PIN_PE7, STM32MP1X_PINMUX_FUNC_PE7_UART7_RX }, { STM32_PIN_PE8, STM32MP1X_PINMUX_FUNC_PE8_UART7_TX }, #endif diff --git a/boards/arm/96b_carbon/pinmux.c b/boards/arm/96b_carbon/pinmux.c index 147c4dad3d..a4a8da8434 100644 --- a/boards/arm/96b_carbon/pinmux.c +++ b/boards/arm/96b_carbon/pinmux.c @@ -14,27 +14,27 @@ /* pin assignments for 96boards Carbon board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PC6, STM32F4_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -42,7 +42,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F4_PINMUX_FUNC_PB12_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/96b_meerkat96/pinmux.c b/boards/arm/96b_meerkat96/pinmux.c index 2242546127..17f649523e 100644 --- a/boards/arm/96b_meerkat96/pinmux.c +++ b/boards/arm/96b_meerkat96/pinmux.c @@ -11,7 +11,7 @@ static int meerakt96_pinmux_init(struct device *dev) { ARG_UNUSED(dev); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) /* GPIO1_IO04 Mux Config */ IOMUXC_LPSR_SW_MUX_CTL_PAD_GPIO1_IO04 = 0; IOMUXC_LPSR_SW_PAD_CTL_PAD_GPIO1_IO04 = 0; @@ -26,7 +26,7 @@ static int meerakt96_pinmux_init(struct device *dev) IOMUXC_LPSR_SW_PAD_CTL_PAD_GPIO1_IO07 = 0; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) IOMUXC_SW_MUX_CTL_PAD_UART1_RX_DATA = IOMUXC_SW_MUX_CTL_PAD_UART1_RX_DATA_MUX_MODE(0); IOMUXC_SW_MUX_CTL_PAD_UART1_TX_DATA = diff --git a/boards/arm/96b_neonkey/pinmux.c b/boards/arm/96b_neonkey/pinmux.c index f504a65fcd..8d444399f4 100644 --- a/boards/arm/96b_neonkey/pinmux.c +++ b/boards/arm/96b_neonkey/pinmux.c @@ -14,23 +14,23 @@ /* pin assignments for 96boards Neonkey board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/96b_stm32_sensor_mez/pinmux.c b/boards/arm/96b_stm32_sensor_mez/pinmux.c index 00eff7e4aa..f6264f9b09 100644 --- a/boards/arm/96b_stm32_sensor_mez/pinmux.c +++ b/boards/arm/96b_stm32_sensor_mez/pinmux.c @@ -14,31 +14,31 @@ /* pin assignments for 96b_stm32_sensor_mez board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PD5, STM32F4_PINMUX_FUNC_PD5_USART2_TX}, {STM32_PIN_PD6, STM32F4_PINMUX_FUNC_PD6_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PD8, STM32F4_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32F4_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) {STM32_PIN_PC10, STM32F4_PINMUX_FUNC_PC10_UART4_TX}, {STM32_PIN_PC11, STM32F4_PINMUX_FUNC_PC11_UART4_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PC12, STM32F4_PINMUX_FUNC_PC12_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -48,7 +48,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_SPI2_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -58,7 +58,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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi4), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PE11, STM32F4_PINMUX_FUNC_PE11_SPI4_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -68,19 +68,19 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s2), okay) {STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_I2S2_CK}, {STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_I2S2_SD}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) { STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_PWM3_CH1 }, { STM32_PIN_PC8, STM32F4_PINMUX_FUNC_PC8_PWM3_CH3 }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) { STM32_PIN_PD14, STM32F4_PINMUX_FUNC_PD14_PWM4_CH3 }, { STM32_PIN_PD15, STM32F4_PINMUX_FUNC_PD15_PWM4_CH4 }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm9)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm9), okay) { STM32_PIN_PE5, STM32F4_PINMUX_FUNC_PE5_PWM9_CH1 }, { STM32_PIN_PE6, STM32F4_PINMUX_FUNC_PE6_PWM9_CH2 }, #endif diff --git a/boards/arm/96b_wistrio/pinmux.c b/boards/arm/96b_wistrio/pinmux.c index fffe886203..05cc13da30 100644 --- a/boards/arm/96b_wistrio/pinmux.c +++ b/boards/arm/96b_wistrio/pinmux.c @@ -14,19 +14,19 @@ #include static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L1X_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L1X_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L1X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA15, STM32L1X_PINMUX_FUNC_PA15_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L1X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L1X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32L1X_PINMUX_FUNC_PA5_SPI1_SCK | STM32_OSPEEDR_VERY_HIGH_SPEED}, {STM32_PIN_PA6, STM32L1X_PINMUX_FUNC_PA6_SPI1_MISO}, diff --git a/boards/arm/adafruit_feather_stm32f405/pinmux.c b/boards/arm/adafruit_feather_stm32f405/pinmux.c index cefc23ce8d..acc2a1a6de 100644 --- a/boards/arm/adafruit_feather_stm32f405/pinmux.c +++ b/boards/arm/adafruit_feather_stm32f405/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for Feather STM32F405 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA15, STM32F4_PINMUX_FUNC_PA15_SPI1_NSS | STM32_OSPEEDR_VERY_HIGH_SPEED}, @@ -32,7 +32,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PB5, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) {STM32_PIN_PB13, STM32F4_PINMUX_FUNC_PB13_SPI2_SCK}, {STM32_PIN_PB14, STM32F4_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI}, diff --git a/boards/arm/atsame54_xpro/pinmux.c b/boards/arm/atsame54_xpro/pinmux.c index 6e21555147..ae6928804f 100644 --- a/boards/arm/atsame54_xpro/pinmux.c +++ b/boards/arm/atsame54_xpro/pinmux.c @@ -111,7 +111,7 @@ static int board_pinmux_init(struct device *dev) pinmux_pin_set(muxa, 24, PINMUX_FUNC_H); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gmac)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gmac), okay) pinmux_pin_set(muxa, 14, PINMUX_FUNC_L); /* PA14 = GTXCK */ pinmux_pin_set(muxa, 17, PINMUX_FUNC_L); /* PA17 = GTXEN */ pinmux_pin_set(muxa, 18, PINMUX_FUNC_L); /* PA18 = GTX0 */ diff --git a/boards/arm/b_l072z_lrwan1/pinmux.c b/boards/arm/b_l072z_lrwan1/pinmux.c index 6b7b518aa8..e1a381fa2a 100644 --- a/boards/arm/b_l072z_lrwan1/pinmux.c +++ b/boards/arm/b_l072z_lrwan1/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for STMicroelectronics B-L072Z-LRWAN1 Discovery board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L0_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA15, STM32L0_PINMUX_FUNC_PA15_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -30,7 +30,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32L0_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L0_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32L0_PINMUX_FUNC_PB12_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif diff --git a/boards/arm/black_f407ve/pinmux.c b/boards/arm/black_f407ve/pinmux.c index 09bf4c8c3a..4035c36052 100644 --- a/boards/arm/black_f407ve/pinmux.c +++ b/boards/arm/black_f407ve/pinmux.c @@ -14,35 +14,35 @@ /* pin assignments for black_f407ve board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 {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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PD0, STM32F4_PINMUX_FUNC_PD0_CAN1_RX}, {STM32_PIN_PD1, STM32F4_PINMUX_FUNC_PD1_CAN1_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can2), okay) {STM32_PIN_PB12, STM32F4_PINMUX_FUNC_PB12_CAN2_RX}, {STM32_PIN_PB13, STM32F4_PINMUX_FUNC_PB13_CAN2_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_SPI1_SCK}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_SPI1_MISO}, {STM32_PIN_PB5, STM32F4_PINMUX_FUNC_PB5_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_SPI2_SCK}, {STM32_PIN_PC2, STM32F4_PINMUX_FUNC_PC2_SPI2_MISO}, {STM32_PIN_PC3, STM32F4_PINMUX_FUNC_PC3_SPI2_MOSI}, diff --git a/boards/arm/black_f407zg_pro/pinmux.c b/boards/arm/black_f407zg_pro/pinmux.c index 9a40df10d6..633d489e27 100644 --- a/boards/arm/black_f407zg_pro/pinmux.c +++ b/boards/arm/black_f407zg_pro/pinmux.c @@ -14,35 +14,35 @@ /* pin assignment for black_f407zg_pro board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 {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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PD0, STM32F4_PINMUX_FUNC_PD0_CAN1_RX}, {STM32_PIN_PD1, STM32F4_PINMUX_FUNC_PD1_CAN1_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can2), okay) {STM32_PIN_PB12, STM32F4_PINMUX_FUNC_PB12_CAN2_RX}, {STM32_PIN_PB13, STM32F4_PINMUX_FUNC_PB13_CAN2_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_SPI1_SCK}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_SPI1_MISO}, {STM32_PIN_PB5, STM32F4_PINMUX_FUNC_PB5_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_SPI2_SCK}, {STM32_PIN_PC2, STM32F4_PINMUX_FUNC_PC2_SPI2_MISO}, {STM32_PIN_PC3, STM32F4_PINMUX_FUNC_PC3_SPI2_MOSI}, diff --git a/boards/arm/colibri_imx7d_m4/pinmux.c b/boards/arm/colibri_imx7d_m4/pinmux.c index f9057c2a9c..7920642ff1 100644 --- a/boards/arm/colibri_imx7d_m4/pinmux.c +++ b/boards/arm/colibri_imx7d_m4/pinmux.c @@ -11,13 +11,13 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) { ARG_UNUSED(dev); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) /* GPIO1_IO02 Mux Config */ IOMUXC_LPSR_SW_MUX_CTL_PAD_GPIO1_IO02 = 0; IOMUXC_LPSR_SW_PAD_CTL_PAD_GPIO1_IO02 = 0; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) /* GPIO2_IO26 Mux Config */ IOMUXC_SW_MUX_CTL_PAD_EPDC_GDRL = 5; IOMUXC_SW_PAD_CTL_PAD_EPDC_GDRL = @@ -26,7 +26,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_EPDC_GDRL_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA = IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA_MUX_MODE(0); IOMUXC_SW_MUX_CTL_PAD_UART2_TX_DATA = @@ -48,7 +48,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_UART2_RX_DATA_SELECT_INPUT_DAISY(3); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL_SION_MASK; @@ -72,7 +72,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_I2C1_SDA_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_SION_MASK; @@ -96,7 +96,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_I2C2_SDA_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_SION_MASK; @@ -120,7 +120,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_I2C3_SDA_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) IOMUXC_SW_MUX_CTL_PAD_ENET1_RGMII_TD2 = IOMUXC_SW_MUX_CTL_PAD_ENET1_RGMII_TD2_MUX_MODE(3) | IOMUXC_SW_MUX_CTL_PAD_ENET1_RGMII_TD2_SION_MASK; @@ -144,7 +144,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_ENET1_RGMII_TD3_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO08 = IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO08_MUX_MODE(7); IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO08 = @@ -154,7 +154,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO08_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO09 = IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO09_MUX_MODE(7); IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO09 = @@ -164,7 +164,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO09_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO10 = IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO10_MUX_MODE(7); IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO10 = @@ -174,7 +174,7 @@ static int colibri_imx7d_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO10_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO11 = IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO11_MUX_MODE(7); IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO11 = diff --git a/boards/arm/disco_l475_iot1/pinmux.c b/boards/arm/disco_l475_iot1/pinmux.c index a99f3097d0..ac3ef312a6 100644 --- a/boards/arm/disco_l475_iot1/pinmux.c +++ b/boards/arm/disco_l475_iot1/pinmux.c @@ -14,40 +14,40 @@ /* pin assignments for Disco L475 IOT1 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_UART4_TX}, {STM32_PIN_PA1, STM32L4X_PINMUX_FUNC_PA1_UART4_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) /* 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PC0, STM32L4X_PINMUX_FUNC_PC0_I2C3_SCL}, {STM32_PIN_PC1, STM32L4X_PINMUX_FUNC_PC1_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32L4X_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PA6, STM32L4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi3), okay) /* SPI3 is used for BT/WIFI, Sub GHZ communication */ {STM32_PIN_PC10, STM32L4X_PINMUX_FUNC_PC10_SPI3_SCK}, {STM32_PIN_PC11, STM32L4X_PINMUX_FUNC_PC11_SPI3_MISO | \ STM32_OSPEEDR_VERY_HIGH_SPEED}, {STM32_PIN_PC12, STM32L4X_PINMUX_FUNC_PC12_SPI3_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_PWM2_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 diff --git a/boards/arm/dragino_lsn50/pinmux.c b/boards/arm/dragino_lsn50/pinmux.c index 2fe9a8d086..4aab0f438a 100644 --- a/boards/arm/dragino_lsn50/pinmux.c +++ b/boards/arm/dragino_lsn50/pinmux.c @@ -14,11 +14,11 @@ /* pin assignments for Dragino LSN50 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32L0_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32L0_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L0_PINMUX_FUNC_PA3_USART2_RX}, #endif diff --git a/boards/arm/frdm_k22f/pinmux.c b/boards/arm/frdm_k22f/pinmux.c index e98d665fd2..08f1770a24 100644 --- a/boards/arm/frdm_k22f/pinmux.c +++ b/boards/arm/frdm_k22f/pinmux.c @@ -33,17 +33,17 @@ static int frdm_k22f_pinmux_init(struct device *dev) device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) #error "No UART0 is used" #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) /* UART1 RX, TX */ pinmux_pin_set(porte, 0, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(porte, 1, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) /* UART2 RX, TX */ pinmux_pin_set(portd, 2, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portd, 3, PORT_PCR_MUX(kPORT_MuxAlt3)); @@ -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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay) /* 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)); @@ -73,7 +73,7 @@ static int frdm_k22f_pinmux_init(struct device *dev) pinmux_pin_set(portc, 11, PORT_PCR_MUX(kPORT_MuxAsGpio)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c0), okay) /* I2C0 SCL, SDA */ pinmux_pin_set(portb, 2, PORT_PCR_MUX(kPORT_MuxAlt2) | PORT_PCR_ODE_MASK); diff --git a/boards/arm/frdm_k64f/pinmux.c b/boards/arm/frdm_k64f/pinmux.c index 2dbc9edaaa..3492f9f25f 100644 --- a/boards/arm/frdm_k64f/pinmux.c +++ b/boards/arm/frdm_k64f/pinmux.c @@ -33,13 +33,13 @@ static int frdm_k64f_pinmux_init(struct device *dev) device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) /* UART0 RX, TX */ pinmux_pin_set(portb, 16, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portb, 17, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) /* UART2 RX, TX */ pinmux_pin_set(portd, 0, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portd, 1, PORT_PCR_MUX(kPORT_MuxAlt3)); @@ -47,7 +47,7 @@ static int frdm_k64f_pinmux_init(struct device *dev) pinmux_pin_set(portd, 3, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) /* UART3 RX, TX */ pinmux_pin_set(portc, 16, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portc, 17, PORT_PCR_MUX(kPORT_MuxAlt3)); @@ -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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay) /* 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)); @@ -109,7 +109,7 @@ static int frdm_k64f_pinmux_init(struct device *dev) pinmux_pin_set(portd, 3, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c0), okay) /* I2C0 SCL, SDA */ pinmux_pin_set(porte, 24, PORT_PCR_MUX(kPORT_MuxAlt5) | PORT_PCR_ODE_MASK); @@ -117,7 +117,7 @@ static int frdm_k64f_pinmux_init(struct device *dev) | PORT_PCR_ODE_MASK); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) /* ADC1_SE14 */ pinmux_pin_set(portb, 10, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); #endif @@ -127,7 +127,7 @@ static int frdm_k64f_pinmux_init(struct device *dev) pinmux_pin_set(portc, 9, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) pinmux_pin_set(porta, 5, PORT_PCR_MUX(kPORT_MuxAlt4)); pinmux_pin_set(porta, 12, PORT_PCR_MUX(kPORT_MuxAlt4)); pinmux_pin_set(porta, 13, PORT_PCR_MUX(kPORT_MuxAlt4)); @@ -148,7 +148,7 @@ static int frdm_k64f_pinmux_init(struct device *dev) pinmux_pin_set(portc, 19, PORT_PCR_MUX(kPORT_MuxAlt4)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(flexcan0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan0), okay) /* FlexCAN0 RX, TX */ pinmux_pin_set(portb, 18, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(portb, 19, PORT_PCR_MUX(kPORT_MuxAlt2) | diff --git a/boards/arm/frdm_k82f/pinmux.c b/boards/arm/frdm_k82f/pinmux.c index d2f120f8eb..ef1ca779f0 100644 --- a/boards/arm/frdm_k82f/pinmux.c +++ b/boards/arm/frdm_k82f/pinmux.c @@ -52,7 +52,7 @@ static int frdm_k82f_pinmux_init(struct device *dev) /* FXOS8700 INT1 */ pinmux_pin_set(portc, 13, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) /* I2C3 SDA, SCL */ pinmux_pin_set(porta, 1, PORT_PCR_MUX(kPORT_MuxAlt4) | PORT_PCR_ODE_MASK); @@ -60,7 +60,7 @@ static int frdm_k82f_pinmux_init(struct device *dev) | PORT_PCR_ODE_MASK); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) /* 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)); @@ -71,7 +71,7 @@ static int frdm_k82f_pinmux_init(struct device *dev) pinmux_pin_set(porte, 3, PORT_PCR_MUX(kPORT_MuxAsGpio)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart4), okay) /* LPUART4 RX, TX */ pinmux_pin_set(portc, 14, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portc, 15, PORT_PCR_MUX(kPORT_MuxAlt3)); diff --git a/boards/arm/frdm_kl25z/pinmux.c b/boards/arm/frdm_kl25z/pinmux.c index 7fb317109a..6bac810235 100644 --- a/boards/arm/frdm_kl25z/pinmux.c +++ b/boards/arm/frdm_kl25z/pinmux.c @@ -33,7 +33,7 @@ static int frdm_kl25z_pinmux_init(struct device *dev) device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) /* UART0 RX, TX */ pinmux_pin_set(porta, 1, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(porta, 2, PORT_PCR_MUX(kPORT_MuxAlt2)); @@ -52,7 +52,7 @@ static int frdm_kl25z_pinmux_init(struct device *dev) pinmux_pin_set(porta, 14, PORT_PCR_MUX(kPORT_MuxAsGpio)); pinmux_pin_set(porta, 15, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c0), okay) /* I2C0 SCL, SDA */ pinmux_pin_set(porte, 24, PORT_PCR_MUX(kPORT_MuxAlt5) | PORT_PCR_PS_MASK); @@ -60,7 +60,7 @@ static int frdm_kl25z_pinmux_init(struct device *dev) | PORT_PCR_PS_MASK); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) /* ADC0_SE12 */ pinmux_pin_set(portb, 2, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); #endif diff --git a/boards/arm/frdm_kw41z/pinmux.c b/boards/arm/frdm_kw41z/pinmux.c index 9fa7d78d44..f2caf0f42b 100644 --- a/boards/arm/frdm_kw41z/pinmux.c +++ b/boards/arm/frdm_kw41z/pinmux.c @@ -28,7 +28,7 @@ static int frdm_kw41z_pinmux_init(struct device *dev) /* Red, green, blue LEDs. Note the red LED and accel INT1 are both * wired to PTC1. */ -#if defined(CONFIG_PWM) && DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm0)) +#if defined(CONFIG_PWM) && DT_NODE_HAS_STATUS(DT_NODELABEL(pwm0), okay) pinmux_pin_set(portc, 1, PORT_PCR_MUX(kPORT_MuxAlt5)); pinmux_pin_set(porta, 19, PORT_PCR_MUX(kPORT_MuxAlt5)); pinmux_pin_set(porta, 18, PORT_PCR_MUX(kPORT_MuxAlt5)); @@ -38,7 +38,7 @@ static int frdm_kw41z_pinmux_init(struct device *dev) pinmux_pin_set(porta, 18, PORT_PCR_MUX(kPORT_MuxAsGpio)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) /* I2C1 SCL, SDA */ pinmux_pin_set(portc, 2, PORT_PCR_MUX(kPORT_MuxAlt3) | PORT_PCR_PS_MASK); @@ -46,7 +46,7 @@ static int frdm_kw41z_pinmux_init(struct device *dev) | PORT_PCR_PS_MASK); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) /* ADC0_SE3 */ pinmux_pin_set(portb, 2, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); #endif @@ -55,13 +55,13 @@ static int frdm_kw41z_pinmux_init(struct device *dev) pinmux_pin_set(portc, 4, PORT_PCR_MUX(kPORT_MuxAsGpio)); pinmux_pin_set(portc, 5, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) /* UART0 RX, TX */ pinmux_pin_set(portc, 6, PORT_PCR_MUX(kPORT_MuxAlt4)); pinmux_pin_set(portc, 7, PORT_PCR_MUX(kPORT_MuxAlt4)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi0), okay) /* 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)); @@ -69,12 +69,12 @@ static int frdm_kw41z_pinmux_init(struct device *dev) pinmux_pin_set(portc, 19, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if defined(CONFIG_PWM) && DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if defined(CONFIG_PWM) && DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) pinmux_pin_set(porta, 0, PORT_PCR_MUX(kPORT_MuxAlt4)); pinmux_pin_set(porta, 1, PORT_PCR_MUX(kPORT_MuxAlt4)); #endif -#if defined(CONFIG_PWM) && DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if defined(CONFIG_PWM) && DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) pinmux_pin_set(portb, 16, PORT_PCR_MUX(kPORT_MuxAlt4)); pinmux_pin_set(portb, 17, PORT_PCR_MUX(kPORT_MuxAlt4)); #endif diff --git a/boards/arm/google_kukui/pinmux.c b/boards/arm/google_kukui/pinmux.c index 755269e8e1..08d34d863d 100644 --- a/boards/arm/google_kukui/pinmux.c +++ b/boards/arm/google_kukui/pinmux.c @@ -13,15 +13,15 @@ #include static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F0_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PA11, STM32F0_PINMUX_FUNC_PA11_I2C2_SCL}, {STM32_PIN_PA12, STM32F0_PINMUX_FUNC_PA12_I2C2_SDA}, #endif diff --git a/boards/arm/hexiwear_k64/pinmux.c b/boards/arm/hexiwear_k64/pinmux.c index 9fceb05015..6c6b6a1bae 100644 --- a/boards/arm/hexiwear_k64/pinmux.c +++ b/boards/arm/hexiwear_k64/pinmux.c @@ -42,7 +42,7 @@ static int hexiwear_k64_pinmux_init(struct device *dev) pinmux_pin_set(portd, 0, PORT_PCR_MUX(kPORT_MuxAsGpio)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c0), okay) /* I2C0 SCL, SDA - heart rate, light, humidity */ pinmux_pin_set(portb, 0, PORT_PCR_MUX(kPORT_MuxAlt2) | PORT_PCR_ODE_MASK); @@ -58,7 +58,7 @@ static int hexiwear_k64_pinmux_init(struct device *dev) gpio_pin_configure(gpiob, 12, GPIO_OUTPUT_LOW); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) /* I2C1 SCL, SDA - accel/mag, gyro, pressure */ pinmux_pin_set(portc, 10, PORT_PCR_MUX(kPORT_MuxAlt2) | PORT_PCR_ODE_MASK); @@ -71,19 +71,19 @@ static int hexiwear_k64_pinmux_init(struct device *dev) /* FXOS8700 INT2 */ pinmux_pin_set(portd, 13, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) /* UART0 RX, TX */ pinmux_pin_set(portb, 16, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portb, 17, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) /* UART4 RX, TX - BLE */ pinmux_pin_set(porte, 24, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(porte, 25, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if defined(CONFIG_MAX30101) && DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioa)) +#if defined(CONFIG_MAX30101) && DT_NODE_HAS_STATUS(DT_NODELABEL(gpioa), okay) struct device *porta = device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME); diff --git a/boards/arm/hexiwear_kw40z/pinmux.c b/boards/arm/hexiwear_kw40z/pinmux.c index 47d382bb1d..8f6bebeb68 100644 --- a/boards/arm/hexiwear_kw40z/pinmux.c +++ b/boards/arm/hexiwear_kw40z/pinmux.c @@ -22,13 +22,13 @@ static int hexiwear_kw40z_pinmux_init(struct device *dev) device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) /* UART0 RX, TX */ pinmux_pin_set(portc, 6, PORT_PCR_MUX(kPORT_MuxAlt4)); pinmux_pin_set(portc, 7, PORT_PCR_MUX(kPORT_MuxAlt4)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) /* I2C1 SCL, SDA */ pinmux_pin_set(portc, 6, PORT_PCR_MUX(kPORT_MuxAlt3) | PORT_PCR_PS_MASK); @@ -36,7 +36,7 @@ static int hexiwear_kw40z_pinmux_init(struct device *dev) | PORT_PCR_PS_MASK); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) /* ADC0_SE1 */ pinmux_pin_set(portb, 1, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); #endif diff --git a/boards/arm/lpcxpresso54114/pinmux.c b/boards/arm/lpcxpresso54114/pinmux.c index 80617bbbb5..abcab00553 100644 --- a/boards/arm/lpcxpresso54114/pinmux.c +++ b/boards/arm/lpcxpresso54114/pinmux.c @@ -50,7 +50,7 @@ static int lpcxpresso_54114_pinmux_init(struct device *dev) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) const u32_t port0_pin29_config = ( IOCON_PIO_FUNC0 | IOCON_PIO_MODE_PULLUP | @@ -93,7 +93,7 @@ static int lpcxpresso_54114_pinmux_init(struct device *dev) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) const u32_t port1_pin10_config = ( IOCON_PIO_FUNC0 | IOCON_PIO_MODE_PULLUP | diff --git a/boards/arm/lpcxpresso55s16/pinmux.c b/boards/arm/lpcxpresso55s16/pinmux.c index 77e390460d..288e703734 100644 --- a/boards/arm/lpcxpresso55s16/pinmux.c +++ b/boards/arm/lpcxpresso55s16/pinmux.c @@ -145,7 +145,7 @@ static int lpcxpresso_55s16_pinmux_init(struct device *dev) IOCON_PIO_OPENDRAIN_DI); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(hs_lspi)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay) /* PORT0 PIN26 is configured as HS_SPI_MOSI */ pinmux_pin_set(port0, 26, IOCON_PIO_FUNC9 | IOCON_PIO_MODE_PULLUP | diff --git a/boards/arm/lpcxpresso55s69/pinmux.c b/boards/arm/lpcxpresso55s69/pinmux.c index 4b87bb21df..3a55887b32 100644 --- a/boards/arm/lpcxpresso55s69/pinmux.c +++ b/boards/arm/lpcxpresso55s69/pinmux.c @@ -116,7 +116,7 @@ static int lpcxpresso_55s69_pinmux_init(struct device *dev) IOCON_PIO_OPENDRAIN_DI); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(hs_lspi)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay) /* PORT0 PIN26 is configured as HS_SPI_MOSI */ pinmux_pin_set(port0, 26, IOCON_PIO_FUNC9 | IOCON_PIO_MODE_PULLUP | diff --git a/boards/arm/mec1501modular_assy6885/pinmux.c b/boards/arm/mec1501modular_assy6885/pinmux.c index 15897c5d75..d264d26a42 100644 --- a/boards/arm/mec1501modular_assy6885/pinmux.c +++ b/boards/arm/mec1501modular_assy6885/pinmux.c @@ -12,22 +12,22 @@ #include "soc.h" struct pinmux_ports_t { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) struct device *porta; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_040_076)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay) struct device *portb; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) struct device *portc; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) struct device *portd; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_200_236)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay) struct device *porte; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_240_276)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay) struct device *portf; #endif }; @@ -35,50 +35,50 @@ struct pinmux_ports_t { static void i2c_pinmux(struct pinmux_ports_t *p, uint8_t port_sel) { switch (port_sel) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) case 0: pinmux_pin_set(p->porta, MCHP_GPIO_003, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->porta, MCHP_GPIO_004, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) case 1: pinmux_pin_set(p->portc, MCHP_GPIO_130, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portc, MCHP_GPIO_131, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 2: pinmux_pin_set(p->portd, MCHP_GPIO_154, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_155, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) case 3: pinmux_pin_set(p->porta, MCHP_GPIO_007, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->porta, MCHP_GPIO_010, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 4: pinmux_pin_set(p->portd, MCHP_GPIO_143, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_144, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 5: pinmux_pin_set(p->portd, MCHP_GPIO_141, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_142, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 6: pinmux_pin_set(p->portc, MCHP_GPIO_132, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_140, MCHP_GPIO_CTRL_MUX_F1); @@ -86,7 +86,7 @@ static void i2c_pinmux(struct pinmux_ports_t *p, uint8_t port_sel) #endif #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) case 7: pinmux_pin_set(p->porta, MCHP_GPIO_012, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->porta, MCHP_GPIO_013, MCHP_GPIO_CTRL_MUX_F1); @@ -103,32 +103,32 @@ static int board_pinmux_init(struct device *dev) ARG_UNUSED(dev); struct pinmux_ports_t pinmux_ports; -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) struct device *porta = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_000_036))); pinmux_ports.porta = porta; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_040_076)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay) struct device *portb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_040_076))); pinmux_ports.portb = portb; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) struct device *portc = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_100_136))); pinmux_ports.portc = portc; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) struct device *portd = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_140_176))); pinmux_ports.portd = portd; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_200_236)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay) struct device *porte = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_200_236))); pinmux_ports.porte = porte; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_240_276)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay) struct device *portf = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_240_276))); pinmux_ports.portf = portf; @@ -158,7 +158,7 @@ static int board_pinmux_init(struct device *dev) pinmux_pin_set(portf, MCHP_GPIO_250, MCHP_GPIO_CTRL_MUX_F0); /* See table 2-4 from the data sheet for pin multiplexing*/ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) /* Set muxing, for UART 1 TX/RX and power up */ mchp_pcr_periph_slp_ctrl(PCR_UART1, MCHP_PCR_SLEEP_DIS); @@ -191,23 +191,23 @@ static int board_pinmux_init(struct device *dev) #ifdef CONFIG_I2C_XEC -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(0, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(1, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(1, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(2, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(2, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(2, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(3, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(3, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(3, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(4, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(4, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(4, microchip_xec_i2c), port_sel)); #endif @@ -249,47 +249,47 @@ static int board_pinmux_init(struct device *dev) #endif #ifdef CONFIG_PWM_XEC -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM0, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_053, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(1, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM1, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_054, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(2, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(2, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM2, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_055, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(3, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(3, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM3, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_056, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(4, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(4, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM4, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_011, MCHP_GPIO_CTRL_MUX_F2); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(5, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(5, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM5, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_002, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(6, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(6, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM6, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_014, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(7, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(7, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM7, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_015, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(8, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(8, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM8, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_035, MCHP_GPIO_CTRL_MUX_F1); #endif @@ -379,7 +379,7 @@ static int board_pinmux_init(struct device *dev) #endif #ifdef CONFIG_SPI_XEC_QMSPI -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) mchp_pcr_periph_slp_ctrl(PCR_QMSPI, MCHP_PCR_SLEEP_DIS); #if DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0 @@ -409,7 +409,7 @@ static int board_pinmux_init(struct device *dev) #endif #endif /* DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0 */ -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) */ +#endif /* DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) */ #endif /* CONFIG_SPI_XEC_QMSPI */ #ifdef CONFIG_SYS_PM_DEBUG @@ -422,7 +422,7 @@ static int board_pinmux_init(struct device *dev) #ifdef CONFIG_TACH_XEC -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_tach)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_tach), okay) pinmux_pin_set(portb, MCHP_GPIO_050, MCHP_GPIO_CTRL_MUX_F1); #endif /* CONFIG_TACH_XEC */ diff --git a/boards/arm/mec15xxevb_assy6853/pinmux.c b/boards/arm/mec15xxevb_assy6853/pinmux.c index 5690d9892f..ceef9b27e1 100644 --- a/boards/arm/mec15xxevb_assy6853/pinmux.c +++ b/boards/arm/mec15xxevb_assy6853/pinmux.c @@ -12,22 +12,22 @@ #include "soc.h" struct pinmux_ports_t { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) struct device *porta; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_040_076)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay) struct device *portb; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) struct device *portc; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) struct device *portd; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_200_236)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay) struct device *porte; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_240_276)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay) struct device *portf; #endif }; @@ -35,50 +35,50 @@ struct pinmux_ports_t { static void i2c_pinmux(struct pinmux_ports_t *p, uint8_t port_sel) { switch (port_sel) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) case 0: pinmux_pin_set(p->porta, MCHP_GPIO_003, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->porta, MCHP_GPIO_004, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) case 1: pinmux_pin_set(p->portc, MCHP_GPIO_130, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portc, MCHP_GPIO_131, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 2: pinmux_pin_set(p->portd, MCHP_GPIO_154, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_155, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) case 3: pinmux_pin_set(p->porta, MCHP_GPIO_007, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->porta, MCHP_GPIO_010, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 4: pinmux_pin_set(p->portd, MCHP_GPIO_143, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_144, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 5: pinmux_pin_set(p->portd, MCHP_GPIO_141, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_142, MCHP_GPIO_CTRL_MUX_F1); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) case 6: pinmux_pin_set(p->portc, MCHP_GPIO_132, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->portd, MCHP_GPIO_140, MCHP_GPIO_CTRL_MUX_F1); @@ -86,7 +86,7 @@ static void i2c_pinmux(struct pinmux_ports_t *p, uint8_t port_sel) #endif #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) case 7: pinmux_pin_set(p->porta, MCHP_GPIO_012, MCHP_GPIO_CTRL_MUX_F1); pinmux_pin_set(p->porta, MCHP_GPIO_013, MCHP_GPIO_CTRL_MUX_F1); @@ -103,32 +103,32 @@ static int board_pinmux_init(struct device *dev) ARG_UNUSED(dev); struct pinmux_ports_t pinmux_ports; -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) struct device *porta = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_000_036))); pinmux_ports.porta = porta; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_040_076)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay) struct device *portb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_040_076))); pinmux_ports.portb = portb; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) struct device *portc = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_100_136))); pinmux_ports.portc = portc; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) struct device *portd = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_140_176))); pinmux_ports.portd = portd; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_200_236)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay) struct device *porte = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_200_236))); pinmux_ports.porte = porte; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_240_276)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay) struct device *portf = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_240_276))); pinmux_ports.portf = portf; @@ -158,7 +158,7 @@ static int board_pinmux_init(struct device *dev) pinmux_pin_set(portf, MCHP_GPIO_250, MCHP_GPIO_CTRL_MUX_F0); /* See table 2-4 from the data sheet for pin multiplexing*/ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) /* Set muxing, for UART 2 TX/RX and power up */ mchp_pcr_periph_slp_ctrl(PCR_UART2, MCHP_PCR_SLEEP_DIS); @@ -191,23 +191,23 @@ static int board_pinmux_init(struct device *dev) #ifdef CONFIG_I2C_XEC -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(0, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(1, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(1, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(2, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(2, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(2, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(3, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(3, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(3, microchip_xec_i2c), port_sel)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(4, microchip_xec_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(4, microchip_xec_i2c), okay) i2c_pinmux(&pinmux_ports, DT_PROP(DT_INST(4, microchip_xec_i2c), port_sel)); #endif @@ -249,47 +249,47 @@ static int board_pinmux_init(struct device *dev) #endif #ifdef CONFIG_PWM_XEC -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM0, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_053, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(1, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM1, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_054, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(2, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(2, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM2, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_055, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(3, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(3, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM3, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(portb, MCHP_GPIO_056, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(4, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(4, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM4, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_011, MCHP_GPIO_CTRL_MUX_F2); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(5, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(5, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM5, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_002, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(6, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(6, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM6, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_014, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(7, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(7, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM7, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_015, MCHP_GPIO_CTRL_MUX_F1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(8, microchip_xec_pwm)) +#if DT_NODE_HAS_STATUS(DT_INST(8, microchip_xec_pwm), okay) mchp_pcr_periph_slp_ctrl(PCR_PWM8, MCHP_PCR_SLEEP_DIS); pinmux_pin_set(porta, MCHP_GPIO_035, MCHP_GPIO_CTRL_MUX_F1); #endif @@ -379,7 +379,7 @@ static int board_pinmux_init(struct device *dev) #endif #ifdef CONFIG_SPI_XEC_QMSPI -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) mchp_pcr_periph_slp_ctrl(PCR_QMSPI, MCHP_PCR_SLEEP_DIS); #if DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0 @@ -409,7 +409,7 @@ static int board_pinmux_init(struct device *dev) #endif #endif /* DT_PROP(DT_INST(0, microchip_xec_qmspi), port_sel) == 0 */ -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) */ +#endif /* DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) */ #endif /* CONFIG_SPI_XEC_QMSPI */ #ifdef CONFIG_SYS_PM_DEBUG @@ -422,7 +422,7 @@ static int board_pinmux_init(struct device *dev) #ifdef CONFIG_TACH_XEC -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_tach)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_tach), okay) pinmux_pin_set(portb, MCHP_GPIO_050, MCHP_GPIO_CTRL_MUX_F1); #endif /* CONFIG_TACH_XEC */ diff --git a/boards/arm/mec2016evb_assy6797/pinmux.c b/boards/arm/mec2016evb_assy6797/pinmux.c index c1cf05ace9..6f3e93bc24 100644 --- a/boards/arm/mec2016evb_assy6797/pinmux.c +++ b/boards/arm/mec2016evb_assy6797/pinmux.c @@ -15,7 +15,7 @@ static int board_pinmux_init(struct device *dev) ARG_UNUSED(dev); /* See table 2-4 from the Data sheet*/ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) /* Set muxing, for UART 0 and power up */ PCR_INST->CLK_REQ_2_b.UART_0_CLK_REQ = 1; UART0_INST->CONFIG = 0; @@ -24,7 +24,7 @@ static int board_pinmux_init(struct device *dev) GPIO_100_137_INST->GPIO_105_PIN_CONTROL_b.MUX_CONTROL = 1; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) /* Set muxing, for UART 1 and power up */ PCR_INST->CLK_REQ_2_b.UART_1_CLK_REQ = 1; UART1_INST->CONFIG = 0; diff --git a/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c b/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c index ff4a5ce787..28f74e2d12 100644 --- a/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c +++ b/boards/arm/mikroe_mini_m4_for_stm32/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for MINI-M4 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -30,7 +30,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_PWM3_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 diff --git a/boards/arm/mimxrt1010_evk/pinmux.c b/boards/arm/mimxrt1010_evk/pinmux.c index ba03cabc2e..d32414a81a 100644 --- a/boards/arm/mimxrt1010_evk/pinmux.c +++ b/boards/arm/mimxrt1010_evk/pinmux.c @@ -15,7 +15,7 @@ static int mimxrt1010_evk_init(struct device *dev) CLOCK_EnableClock(kCLOCK_Iomuxc); CLOCK_EnableClock(kCLOCK_IomuxcSnvs); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_11_GPIOMUX_IO11, 0); IOMUXC_SetPinConfig(IOMUXC_GPIO_11_GPIOMUX_IO11, IOMUXC_SW_PAD_CTL_PAD_PKE_MASK | @@ -26,7 +26,7 @@ static int mimxrt1010_evk_init(struct device *dev) IOMUXC_GPR->GPR26 &= ~(IOMUXC_GPR_GPR26_GPIO_SEL(1 << 11)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_SD_05_GPIO2_IO05, 0); IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_05_GPIO2_IO05, IOMUXC_SW_PAD_CTL_PAD_PKE_MASK | @@ -36,7 +36,7 @@ static int mimxrt1010_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(4)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_09_LPUART1_RXD, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_10_LPUART1_TXD, 0); @@ -52,7 +52,7 @@ static int mimxrt1010_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) /* LPI2C1 SCL, SDA */ IOMUXC_SetPinMux(IOMUXC_GPIO_01_LPI2C1_SDA, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_02_LPI2C1_SCL, 1); diff --git a/boards/arm/mimxrt1015_evk/pinmux.c b/boards/arm/mimxrt1015_evk/pinmux.c index 8ab69c3b90..d96148e1ac 100644 --- a/boards/arm/mimxrt1015_evk/pinmux.c +++ b/boards/arm/mimxrt1015_evk/pinmux.c @@ -15,7 +15,7 @@ static int mimxrt1015_evk_init(struct device *dev) CLOCK_EnableClock(kCLOCK_Iomuxc); CLOCK_EnableClock(kCLOCK_IomuxcSnvs); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_09_GPIO2_IO09, 0); IOMUXC_SetPinConfig(IOMUXC_GPIO_EMC_09_GPIO2_IO09, IOMUXC_SW_PAD_CTL_PAD_PKE_MASK | @@ -25,7 +25,7 @@ static int mimxrt1015_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(4)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0); @@ -41,7 +41,7 @@ static int mimxrt1015_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart4), okay) /* LPUART4 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_32_LPUART4_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_33_LPUART4_RX, 0); @@ -57,7 +57,7 @@ static int mimxrt1015_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) /* LPI2C1 SCL, SDA */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_14_LPI2C1_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_15_LPI2C1_SDA, 1); diff --git a/boards/arm/mimxrt1020_evk/pinmux.c b/boards/arm/mimxrt1020_evk/pinmux.c index 41a127e77b..fa34560cc2 100644 --- a/boards/arm/mimxrt1020_evk/pinmux.c +++ b/boards/arm/mimxrt1020_evk/pinmux.c @@ -8,7 +8,7 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static gpio_pin_config_t enet_gpio_config = { .direction = kGPIO_DigitalOutput, .outputLogic = 0, @@ -34,7 +34,7 @@ static int mimxrt1020_evk_init(struct device *dev) /* SW0 */ IOMUXC_SetPinMux(IOMUXC_SNVS_WAKEUP_GPIO5_IO00, 0); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0); @@ -50,7 +50,7 @@ static int mimxrt1020_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart2), okay) /* LPUART2 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_08_LPUART2_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_09_LPUART2_RX, 0); @@ -66,7 +66,7 @@ static int mimxrt1020_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) /* LPI2C1 SCL, SDA */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_14_LPI2C1_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_15_LPI2C1_SDA, 1); @@ -86,7 +86,7 @@ static int mimxrt1020_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c4), okay) /* LPI2C4 SCL, SDA */ IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_02_LPI2C4_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_03_LPI2C4_SDA, 1); @@ -106,7 +106,7 @@ static int mimxrt1020_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) SYS_INIT(mimxrt1020_evk_phy_reset, PRE_KERNEL_2, 0); #endif diff --git a/boards/arm/mimxrt1050_evk/pinmux.c b/boards/arm/mimxrt1050_evk/pinmux.c index 89cb4d7a79..d46598aa51 100644 --- a/boards/arm/mimxrt1050_evk/pinmux.c +++ b/boards/arm/mimxrt1050_evk/pinmux.c @@ -9,7 +9,7 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static gpio_pin_config_t enet_gpio_config = { .direction = kGPIO_DigitalOutput, .outputLogic = 0, @@ -17,7 +17,7 @@ static gpio_pin_config_t enet_gpio_config = { }; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 /*Drive Strength Field: R0(260 Ohm @ 3.3V, 150 Ohm@1.8V, 240 Ohm for DDR) *Speed Field: medium(100MHz) @@ -118,7 +118,7 @@ static int mimxrt1050_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if !DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if !DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) /* LED */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, 0); @@ -131,7 +131,7 @@ static int mimxrt1050_evk_init(struct device *dev) IOMUXC_SetPinMux(IOMUXC_SNVS_WAKEUP_GPIO5_IO00, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPUART1_RX, 0); @@ -147,7 +147,7 @@ static int mimxrt1050_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart3), okay) /* LPUART3 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_06_LPUART3_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_07_LPUART3_RX, 0); @@ -163,7 +163,7 @@ static int mimxrt1050_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) /* LPI2C1 SCL, SDA */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, 1); @@ -183,7 +183,7 @@ static int mimxrt1050_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi3), okay) /* 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); @@ -211,7 +211,7 @@ static int mimxrt1050_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, 0U); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, 0U); IOMUXC_SetPinMux(IOMUXC_GPIO_B1_04_ENET_RX_DATA00, 0); @@ -249,7 +249,7 @@ static int mimxrt1050_evk_init(struct device *dev) GPIO_WritePinOutput(GPIO1, 9, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lcdif)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lcdif), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_B0_00_LCD_CLK, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_B0_01_LCD_ENABLE, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_B0_02_LCD_HSYNC, 0); @@ -308,7 +308,7 @@ static int mimxrt1050_evk_init(struct device *dev) GPIO_PinInit(GPIO2, 31, &config); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 mimxrt1050_evk_usdhc_pinmux(0, true, 2, 1); imxrt_usdhc_pinmux_cb_register(mimxrt1050_evk_usdhc_pinmux); #endif @@ -316,7 +316,7 @@ static int mimxrt1050_evk_init(struct device *dev) return 0; } -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static int mimxrt1050_evk_phy_reset(struct device *dev) { /* RESET PHY chip. */ @@ -328,6 +328,6 @@ static int mimxrt1050_evk_phy_reset(struct device *dev) #endif SYS_INIT(mimxrt1050_evk_init, PRE_KERNEL_1, 0); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) SYS_INIT(mimxrt1050_evk_phy_reset, PRE_KERNEL_2, 0); #endif diff --git a/boards/arm/mimxrt1060_evk/pinmux.c b/boards/arm/mimxrt1060_evk/pinmux.c index 62844397b3..8d4ff6bf4b 100644 --- a/boards/arm/mimxrt1060_evk/pinmux.c +++ b/boards/arm/mimxrt1060_evk/pinmux.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(mimxrt1060_evk, LOG_LEVEL_INF); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static gpio_pin_config_t enet_gpio_config = { .direction = kGPIO_DigitalOutput, .outputLogic = 0, @@ -20,7 +20,7 @@ static gpio_pin_config_t enet_gpio_config = { }; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 /*Drive Strength Field: R0(260 Ohm @ 3.3V, 150 Ohm@1.8V, 240 Ohm for DDR) *Speed Field: medium(100MHz) @@ -101,7 +101,7 @@ static int mimxrt1060_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if !DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if !DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) /* LED */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, 0); @@ -114,7 +114,7 @@ static int mimxrt1060_evk_init(struct device *dev) IOMUXC_SetPinMux(IOMUXC_SNVS_WAKEUP_GPIO5_IO00, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPUART1_RX, 0); @@ -130,7 +130,7 @@ static int mimxrt1060_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart3), okay) /* LPUART3 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_06_LPUART3_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_07_LPUART3_RX, 0); @@ -146,7 +146,7 @@ static int mimxrt1060_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) /* LPI2C1 SCL, SDA */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, 1); @@ -166,7 +166,7 @@ static int mimxrt1060_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, 0U); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, 0U); IOMUXC_SetPinMux(IOMUXC_GPIO_B1_04_ENET_RX_DATA00, 0); @@ -204,7 +204,7 @@ static int mimxrt1060_evk_init(struct device *dev) GPIO_WritePinOutput(GPIO1, 9, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lcdif)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lcdif), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_B0_00_LCD_CLK, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_B0_01_LCD_ENABLE, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_B0_02_LCD_HSYNC, 0); @@ -263,7 +263,7 @@ static int mimxrt1060_evk_init(struct device *dev) GPIO_PinInit(GPIO2, 31, &config); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 mimxrt1060_evk_usdhc_pinmux(0, true, 2, 1); imxrt_usdhc_pinmux_cb_register(mimxrt1060_evk_usdhc_pinmux); #endif @@ -271,7 +271,7 @@ static int mimxrt1060_evk_init(struct device *dev) return 0; } -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static int mimxrt1060_evk_phy_reset(struct device *dev) { /* RESET PHY chip. */ @@ -283,6 +283,6 @@ static int mimxrt1060_evk_phy_reset(struct device *dev) #endif SYS_INIT(mimxrt1060_evk_init, PRE_KERNEL_1, 0); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) SYS_INIT(mimxrt1060_evk_phy_reset, PRE_KERNEL_2, 0); #endif diff --git a/boards/arm/mimxrt1064_evk/pinmux.c b/boards/arm/mimxrt1064_evk/pinmux.c index 695ee2dcfd..aeadb430ff 100644 --- a/boards/arm/mimxrt1064_evk/pinmux.c +++ b/boards/arm/mimxrt1064_evk/pinmux.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(mimxrt1064_evk, LOG_LEVEL_INF); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static gpio_pin_config_t enet_gpio_config = { .direction = kGPIO_DigitalOutput, .outputLogic = 0, @@ -20,7 +20,7 @@ static gpio_pin_config_t enet_gpio_config = { }; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 /*Drive Strength Field: R0(260 Ohm @ 3.3V, 150 Ohm@1.8V, 240 Ohm for DDR) *Speed Field: medium(100MHz) @@ -101,7 +101,7 @@ static int mimxrt1064_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if !DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if !DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) /* LED */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, 0); @@ -114,7 +114,7 @@ static int mimxrt1064_evk_init(struct device *dev) IOMUXC_SetPinMux(IOMUXC_SNVS_WAKEUP_GPIO5_IO00, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPUART1_RX, 0); @@ -130,7 +130,7 @@ static int mimxrt1064_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lcdif)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lcdif), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_B0_00_LCD_CLK, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_B0_01_LCD_ENABLE, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_B0_02_LCD_HSYNC, 0); @@ -189,7 +189,7 @@ static int mimxrt1064_evk_init(struct device *dev) GPIO_PinInit(GPIO2, 31, &config); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) /* LPI2C1 SCL, SDA */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, 1); @@ -209,7 +209,7 @@ static int mimxrt1064_evk_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, 0U); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, 0U); IOMUXC_SetPinMux(IOMUXC_GPIO_B1_04_ENET_RX_DATA00, 0); @@ -247,11 +247,11 @@ static int mimxrt1064_evk_init(struct device *dev) GPIO_WritePinOutput(GPIO1, 9, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(flexpwm2_pwm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexpwm2_pwm3), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_09_FLEXPWM2_PWMA03, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(csi)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(csi), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_04_GPIO1_IO04, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_04_CSI_PIXCLK, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_05_CSI_MCLK, 0); @@ -267,7 +267,7 @@ static int mimxrt1064_evk_init(struct device *dev) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_15_CSI_DATA02, 0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 mimxrt1064_evk_usdhc_pinmux(0, true, 2, 1); imxrt_usdhc_pinmux_cb_register(mimxrt1064_evk_usdhc_pinmux); #endif @@ -275,7 +275,7 @@ static int mimxrt1064_evk_init(struct device *dev) return 0; } -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static int mimxrt1064_evk_phy_reset(struct device *dev) { /* RESET PHY chip. */ @@ -287,6 +287,6 @@ static int mimxrt1064_evk_phy_reset(struct device *dev) #endif SYS_INIT(mimxrt1064_evk_init, PRE_KERNEL_1, 0); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) SYS_INIT(mimxrt1064_evk_phy_reset, PRE_KERNEL_2, 0); #endif diff --git a/boards/arm/mm_swiftio/pinmux.c b/boards/arm/mm_swiftio/pinmux.c index d0b91a1df4..908229daaa 100644 --- a/boards/arm/mm_swiftio/pinmux.c +++ b/boards/arm/mm_swiftio/pinmux.c @@ -9,7 +9,7 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) static gpio_pin_config_t enet_gpio_config = { .direction = kGPIO_DigitalOutput, .outputLogic = 0, @@ -17,7 +17,7 @@ static gpio_pin_config_t enet_gpio_config = { }; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 /*Drive Strength Field: R0(260 Ohm @ 3.3V, 150 Ohm@1.8V, 240 Ohm for DDR) *Speed Field: medium(100MHz) @@ -133,7 +133,7 @@ static int mm_swiftio_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 TX/RX */ IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_12_LPUART1_TX, 0); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_13_LPUART1_RX, 0); @@ -149,7 +149,7 @@ static int mm_swiftio_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, 1); @@ -168,7 +168,7 @@ static int mm_swiftio_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c3), okay) IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_07_LPI2C3_SCL, 1); IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_06_LPI2C3_SDA, 1); @@ -187,7 +187,7 @@ static int mm_swiftio_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi3), okay) /* 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); @@ -215,7 +215,7 @@ static int mm_swiftio_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_DSE(6)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_DISK_ACCESS_USDHC1 +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_ACCESS_USDHC1 mm_swiftio_usdhc_pinmux(0, true, 2, 1); imxrt_usdhc_pinmux_cb_register(mm_swiftio_usdhc_pinmux); #endif diff --git a/boards/arm/nucleo_f030r8/pinmux.c b/boards/arm/nucleo_f030r8/pinmux.c index b8858012ec..6d86028112 100644 --- a/boards/arm/nucleo_f030r8/pinmux.c +++ b/boards/arm/nucleo_f030r8/pinmux.c @@ -15,23 +15,23 @@ /* pin assignments for NUCLEO-F030R8 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F0_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PA11, STM32F0_PINMUX_FUNC_PA11_I2C2_SCL}, {STM32_PIN_PA12, STM32F0_PINMUX_FUNC_PA12_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F0_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -39,7 +39,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F0_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F0_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F0_PINMUX_FUNC_PB12_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/nucleo_f070rb/pinmux.c b/boards/arm/nucleo_f070rb/pinmux.c index 3bbf22e5f5..6049699617 100644 --- a/boards/arm/nucleo_f070rb/pinmux.c +++ b/boards/arm/nucleo_f070rb/pinmux.c @@ -15,28 +15,28 @@ /* pin assignments for NUCLEO_F070RB board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F0_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F0_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F0_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32F0_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PA6, STM32F0_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F0_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) {STM32_PIN_PB13, STM32F0_PINMUX_FUNC_PB13_SPI2_SCK}, {STM32_PIN_PB14, STM32F0_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32F0_PINMUX_FUNC_PB15_SPI2_MOSI}, diff --git a/boards/arm/nucleo_f091rc/pinmux.c b/boards/arm/nucleo_f091rc/pinmux.c index ff5c2285ee..ec4a774d67 100644 --- a/boards/arm/nucleo_f091rc/pinmux.c +++ b/boards/arm/nucleo_f091rc/pinmux.c @@ -14,33 +14,33 @@ /* pin assignments for NUCLEO-F091RC board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F0_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F0_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PA11, STM32F0_PINMUX_FUNC_PA11_I2C2_SCL}, {STM32_PIN_PA12, STM32F0_PINMUX_FUNC_PA12_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32F0_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PA6, STM32F0_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F0_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) {STM32_PIN_PB13, STM32F0_PINMUX_FUNC_PB13_SPI2_SCK}, {STM32_PIN_PB14, STM32F0_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32F0_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32F0_PINMUX_FUNC_PA0_ADC_IN0}, #endif }; diff --git a/boards/arm/nucleo_f103rb/pinmux.c b/boards/arm/nucleo_f103rb/pinmux.c index 8acd132040..1e11fadb93 100644 --- a/boards/arm/nucleo_f103rb/pinmux.c +++ b/boards/arm/nucleo_f103rb/pinmux.c @@ -14,22 +14,22 @@ /* pin assignments for NUCLEO-F103RB board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F1_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F1_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F1_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F1_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) {STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F1_PINMUX_FUNC_PA4_SPI1_MASTER_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -37,7 +37,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F1_PINMUX_FUNC_PA6_SPI1_MASTER_MISO}, {STM32_PIN_PA7, STM32F1_PINMUX_FUNC_PA7_SPI1_MASTER_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F1_PINMUX_FUNC_PB12_SPI2_MASTER_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -45,7 +45,7 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32F1_PINMUX_FUNC_PA0_ADC123_IN0}, #endif }; diff --git a/boards/arm/nucleo_f207zg/pinmux.c b/boards/arm/nucleo_f207zg/pinmux.c index 192c07a851..20e98555e4 100644 --- a/boards/arm/nucleo_f207zg/pinmux.c +++ b/boards/arm/nucleo_f207zg/pinmux.c @@ -14,11 +14,11 @@ /* pin assignments for NUCLEO-F207ZG board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PD8, STM32F2_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32F2_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PG14, STM32F2_PINMUX_FUNC_PG14_USART6_TX}, {STM32_PIN_PG9, STM32F2_PINMUX_FUNC_PG9_USART6_RX}, #endif @@ -39,7 +39,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA11, STM32F2_PINMUX_FUNC_PA11_OTG_FS_DM}, {STM32_PIN_PA12, STM32F2_PINMUX_FUNC_PA12_OTG_FS_DP}, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32F2_PINMUX_FUNC_PA0_ADC123_IN0}, #endif }; diff --git a/boards/arm/nucleo_f302r8/pinmux.c b/boards/arm/nucleo_f302r8/pinmux.c index 041dd92716..e372008a4b 100644 --- a/boards/arm/nucleo_f302r8/pinmux.c +++ b/boards/arm/nucleo_f302r8/pinmux.c @@ -14,23 +14,23 @@ /* pin assignments for NUCLEO-F302R8 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PC10, STM32F3_PINMUX_FUNC_PC10_USART3_TX}, {STM32_PIN_PC11, STM32F3_PINMUX_FUNC_PC11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F3_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F3_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -38,10 +38,10 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB14, STM32F3_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F3_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32F3_PINMUX_FUNC_PA0_ADC1_IN1}, #endif }; diff --git a/boards/arm/nucleo_f303re/pinmux.c b/boards/arm/nucleo_f303re/pinmux.c index 0c4d75e2f9..97b8c6ae71 100644 --- a/boards/arm/nucleo_f303re/pinmux.c +++ b/boards/arm/nucleo_f303re/pinmux.c @@ -14,7 +14,7 @@ /* pin assignments for NUCLEO-F303RE board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, #endif diff --git a/boards/arm/nucleo_f334r8/pinmux.c b/boards/arm/nucleo_f334r8/pinmux.c index d1bc78a8d5..db16c5a3a5 100644 --- a/boards/arm/nucleo_f334r8/pinmux.c +++ b/boards/arm/nucleo_f334r8/pinmux.c @@ -14,23 +14,23 @@ /* pin assignments for NUCLEO-F334RB board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F3_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F3_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F3_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F3_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -38,7 +38,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) {STM32_PIN_PA8, STM32F3_PINMUX_FUNC_PA8_PWM1_CH1}, #endif }; diff --git a/boards/arm/nucleo_f401re/pinmux.c b/boards/arm/nucleo_f401re/pinmux.c index a822e15c23..adb8111cd4 100644 --- a/boards/arm/nucleo_f401re/pinmux.c +++ b/boards/arm/nucleo_f401re/pinmux.c @@ -14,22 +14,22 @@ /* pin assignments for NUCLEO-F401RE board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -37,7 +37,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F4_PINMUX_FUNC_PB12_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -45,7 +45,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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_ADC123_IN0}, #endif }; diff --git a/boards/arm/nucleo_f411re/pinmux.c b/boards/arm/nucleo_f411re/pinmux.c index 6dfe889f1b..a93ff23bc2 100644 --- a/boards/arm/nucleo_f411re/pinmux.c +++ b/boards/arm/nucleo_f411re/pinmux.c @@ -14,28 +14,28 @@ /* pin assignments for NUCLEO-F411RE board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) || \ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) || \ + DT_NODE_HAS_STATUS(DT_NODELABEL(i2s1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/nucleo_f412zg/pinmux.c b/boards/arm/nucleo_f412zg/pinmux.c index 4b5eac9dec..637aba9f78 100644 --- a/boards/arm/nucleo_f412zg/pinmux.c +++ b/boards/arm/nucleo_f412zg/pinmux.c @@ -14,26 +14,26 @@ /* pin assignments for NUCLEO-F412ZG board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PD8, STM32F4_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32F4_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX}, {STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 {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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/nucleo_f413zh/pinmux.c b/boards/arm/nucleo_f413zh/pinmux.c index 6d58b418ce..ba61d48d82 100644 --- a/boards/arm/nucleo_f413zh/pinmux.c +++ b/boards/arm/nucleo_f413zh/pinmux.c @@ -14,26 +14,26 @@ /* pin assignments for NUCLEO-F413ZH board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PD8, STM32F4_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32F4_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX}, {STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 {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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/nucleo_f429zi/pinmux.c b/boards/arm/nucleo_f429zi/pinmux.c index 82cb7a2cd7..65e9300a15 100644 --- a/boards/arm/nucleo_f429zi/pinmux.c +++ b/boards/arm/nucleo_f429zi/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for NUCLEO-F429ZI board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PD8, STM32F4_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32F4_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX}, {STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) {STM32_PIN_PE13, STM32F4_PINMUX_FUNC_PE13_PWM1_CH3}, #endif #ifdef CONFIG_ETH_STM32_HAL @@ -38,11 +38,11 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/nucleo_f446re/pinmux.c b/boards/arm/nucleo_f446re/pinmux.c index d346faf303..170b85caa1 100644 --- a/boards/arm/nucleo_f446re/pinmux.c +++ b/boards/arm/nucleo_f446re/pinmux.c @@ -14,27 +14,27 @@ /* pin assignments for stm32F446RE Nucleo board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PA8, STM32F4_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/nucleo_f746zg/pinmux.c b/boards/arm/nucleo_f746zg/pinmux.c index 49ee7f1d55..7690b7ffbd 100644 --- a/boards/arm/nucleo_f746zg/pinmux.c +++ b/boards/arm/nucleo_f746zg/pinmux.c @@ -20,17 +20,17 @@ * for the SPI_1 MOSI signal. */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) { STM32_PIN_PD5, STM32F7_PINMUX_FUNC_PD5_USART2_TX }, { STM32_PIN_PD6, STM32F7_PINMUX_FUNC_PD6_USART2_RX }, { STM32_PIN_PD4, STM32F7_PINMUX_FUNC_PD4_USART2_RTS }, { STM32_PIN_PD3, STM32F7_PINMUX_FUNC_PD3_USART2_CTS }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) { STM32_PIN_PD8, STM32F7_PINMUX_FUNC_PD8_USART3_TX }, { STM32_PIN_PD9, STM32F7_PINMUX_FUNC_PD9_USART3_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) { STM32_PIN_PG14, STM32F7_PINMUX_FUNC_PG14_USART6_TX }, { STM32_PIN_PG9, STM32F7_PINMUX_FUNC_PG9_USART6_RX }, #endif @@ -49,14 +49,14 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) { STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) { STM32_PIN_PE13, STM32F7_PINMUX_FUNC_PE13_PWM1_CH3 }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS { STM32_PIN_PA4, STM32F7_PINMUX_FUNC_PA4_SPI1_NSS }, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -64,11 +64,11 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PA6, STM32F7_PINMUX_FUNC_PA6_SPI1_MISO }, { STM32_PIN_PA7, STM32F7_PINMUX_FUNC_PA7_SPI1_MOSI }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PD0, STM32F7_PINMUX_FUNC_PD0_CAN_RX}, {STM32_PIN_PD1, STM32F7_PINMUX_FUNC_PD1_CAN_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) { STM32_PIN_PA0, STM32F7_PINMUX_FUNC_PA0_ADC123_IN0 }, #endif }; diff --git a/boards/arm/nucleo_f756zg/pinmux.c b/boards/arm/nucleo_f756zg/pinmux.c index 03b11ef7dc..556b431f34 100644 --- a/boards/arm/nucleo_f756zg/pinmux.c +++ b/boards/arm/nucleo_f756zg/pinmux.c @@ -20,17 +20,17 @@ * for the SPI_1 MOSI signal. */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) { STM32_PIN_PD5, STM32F7_PINMUX_FUNC_PD5_USART2_TX }, { STM32_PIN_PD6, STM32F7_PINMUX_FUNC_PD6_USART2_RX }, { STM32_PIN_PD4, STM32F7_PINMUX_FUNC_PD4_USART2_RTS }, { STM32_PIN_PD3, STM32F7_PINMUX_FUNC_PD3_USART2_CTS }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) { STM32_PIN_PD8, STM32F7_PINMUX_FUNC_PD8_USART3_TX }, { STM32_PIN_PD9, STM32F7_PINMUX_FUNC_PD9_USART3_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) { STM32_PIN_PG14, STM32F7_PINMUX_FUNC_PG14_USART6_TX }, { STM32_PIN_PG9, STM32F7_PINMUX_FUNC_PG9_USART6_RX }, #endif @@ -49,14 +49,14 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) { STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) { STM32_PIN_PE13, STM32F7_PINMUX_FUNC_PE13_PWM1_CH3 }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS { STM32_PIN_PA4, STM32F7_PINMUX_FUNC_PA4_SPI1_NSS }, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/nucleo_f767zi/pinmux.c b/boards/arm/nucleo_f767zi/pinmux.c index 2cb9f5733c..b31bec15a1 100644 --- a/boards/arm/nucleo_f767zi/pinmux.c +++ b/boards/arm/nucleo_f767zi/pinmux.c @@ -20,17 +20,17 @@ * for the SPI_1 MOSI signal. */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) { STM32_PIN_PD5, STM32F7_PINMUX_FUNC_PD5_USART2_TX }, { STM32_PIN_PD6, STM32F7_PINMUX_FUNC_PD6_USART2_RX }, { STM32_PIN_PD4, STM32F7_PINMUX_FUNC_PD4_USART2_RTS }, { STM32_PIN_PD3, STM32F7_PINMUX_FUNC_PD3_USART2_CTS }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) { STM32_PIN_PD8, STM32F7_PINMUX_FUNC_PD8_USART3_TX }, { STM32_PIN_PD9, STM32F7_PINMUX_FUNC_PD9_USART3_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) { STM32_PIN_PG14, STM32F7_PINMUX_FUNC_PG14_USART6_TX }, { STM32_PIN_PG9, STM32F7_PINMUX_FUNC_PG9_USART6_RX }, #endif @@ -49,14 +49,14 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) { STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) { STM32_PIN_PE13, STM32F7_PINMUX_FUNC_PE13_PWM1_CH3 }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS { STM32_PIN_PA4, STM32F7_PINMUX_FUNC_PA4_SPI1_NSS }, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -64,11 +64,11 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PA6, STM32F7_PINMUX_FUNC_PA6_SPI1_MISO }, { STM32_PIN_PA7, STM32F7_PINMUX_FUNC_PA7_SPI1_MOSI }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PD0, STM32F7_PINMUX_FUNC_PD0_CAN_RX}, {STM32_PIN_PD1, STM32F7_PINMUX_FUNC_PD1_CAN_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) { STM32_PIN_PA0, STM32F7_PINMUX_FUNC_PA0_ADC123_IN0 }, #endif }; diff --git a/boards/arm/nucleo_g071rb/pinmux.c b/boards/arm/nucleo_g071rb/pinmux.c index 921e8dde57..c90572b770 100644 --- a/boards/arm/nucleo_g071rb/pinmux.c +++ b/boards/arm/nucleo_g071rb/pinmux.c @@ -15,7 +15,7 @@ /* pin assignments for NUCLEO-G071RB board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32G0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32G0_PINMUX_FUNC_PA3_USART2_RX}, #endif diff --git a/boards/arm/nucleo_g431rb/pinmux.c b/boards/arm/nucleo_g431rb/pinmux.c index 8c581c8667..296834f16f 100644 --- a/boards/arm/nucleo_g431rb/pinmux.c +++ b/boards/arm/nucleo_g431rb/pinmux.c @@ -14,22 +14,22 @@ /* pin assignments for NUCLEO-G431RB board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PC4, STM32G4X_PINMUX_FUNC_PC4_USART1_TX}, {STM32_PIN_PC5, STM32G4X_PINMUX_FUNC_PC5_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) {STM32_PIN_PA2, STM32G4X_PINMUX_FUNC_PA2_LPUART1_TX}, {STM32_PIN_PA3, STM32G4X_PINMUX_FUNC_PA3_LPUART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32G4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32G4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA5, STM32G4X_PINMUX_FUNC_PA5_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) /* SPI1 on the Arduino connectors pins A2, D3, D11, D12 */ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32G4X_PINMUX_FUNC_PA4_SPI1_NSS}, @@ -39,7 +39,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32G4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32G4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) /* SPI2 on the ST Morpho Connector CN10 pins 16, 30, 28, 26*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32G4X_PINMUX_FUNC_PB12_SPI2_NSS}, @@ -48,7 +48,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB14, STM32G4X_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32G4X_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi3), okay) /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA15, STM32G4X_PINMUX_FUNC_PA15_SPI3_NSS}, diff --git a/boards/arm/nucleo_g474re/pinmux.c b/boards/arm/nucleo_g474re/pinmux.c index 417c650430..e9a37d5fb3 100644 --- a/boards/arm/nucleo_g474re/pinmux.c +++ b/boards/arm/nucleo_g474re/pinmux.c @@ -14,22 +14,22 @@ /* pin assignments for NUCLEO-G474RE board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PC4, STM32G4X_PINMUX_FUNC_PC4_USART1_TX}, {STM32_PIN_PC5, STM32G4X_PINMUX_FUNC_PC5_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) {STM32_PIN_PA2, STM32G4X_PINMUX_FUNC_PA2_LPUART1_TX}, {STM32_PIN_PA3, STM32G4X_PINMUX_FUNC_PA3_LPUART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32G4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32G4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA5, STM32G4X_PINMUX_FUNC_PA5_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) /* SPI1 on the Arduino connectors pins A2, D3, D11, D12 */ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32G4X_PINMUX_FUNC_PA4_SPI1_NSS}, @@ -39,7 +39,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32G4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32G4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) /* SPI2 on the ST Morpho Connector CN10 pins 16, 30, 28, 26*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32G4X_PINMUX_FUNC_PB12_SPI2_NSS}, @@ -48,7 +48,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB14, STM32G4X_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32G4X_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi3), okay) /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA15, STM32G4X_PINMUX_FUNC_PA15_SPI3_NSS}, diff --git a/boards/arm/nucleo_h743zi/pinmux.c b/boards/arm/nucleo_h743zi/pinmux.c index 0c42209ecb..445e72331f 100644 --- a/boards/arm/nucleo_h743zi/pinmux.c +++ b/boards/arm/nucleo_h743zi/pinmux.c @@ -14,18 +14,18 @@ /* NUCLEO-H743ZI pin configurations */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) { STM32_PIN_PD8, STM32H7_PINMUX_FUNC_PD8_USART3_TX }, { STM32_PIN_PD9, STM32H7_PINMUX_FUNC_PD9_USART3_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) { STM32_PIN_PB8, STM32H7_PINMUX_FUNC_PB8_I2C1_SCL }, { STM32_PIN_PB9, STM32H7_PINMUX_FUNC_PB9_I2C1_SDA }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm12)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm12), okay) { STM32_PIN_PB14, STM32H7_PINMUX_FUNC_PB14_PWM12_CH1 }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1_2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1_2), okay) { STM32_PIN_PA3, STM32H7_PINMUX_FUNC_PA3_ADC12_INP15 }, #endif }; diff --git a/boards/arm/nucleo_l053r8/pinmux.c b/boards/arm/nucleo_l053r8/pinmux.c index 37977c01b2..a13c7babf1 100644 --- a/boards/arm/nucleo_l053r8/pinmux.c +++ b/boards/arm/nucleo_l053r8/pinmux.c @@ -14,19 +14,19 @@ /* pin assignments for NUCLEO-L053R8 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32L0_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32L0_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32L0_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PA6, STM32L0_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L0_PINMUX_FUNC_PA7_SPI1_MOSI}, diff --git a/boards/arm/nucleo_l073rz/pinmux.c b/boards/arm/nucleo_l073rz/pinmux.c index f6c6630693..58a9fda68a 100644 --- a/boards/arm/nucleo_l073rz/pinmux.c +++ b/boards/arm/nucleo_l073rz/pinmux.c @@ -14,27 +14,27 @@ /* pin assignments for NUCLEO-L073RZ board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32L0_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32L0_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L0_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32L0_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PA6, STM32L0_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L0_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32L0_PINMUX_FUNC_PA0_ADC_IN0}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(dac1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac1), okay) {STM32_PIN_PA4, STM32L0_PINMUX_FUNC_PA4_DAC_OUT1}, #endif /* dac1 */ }; diff --git a/boards/arm/nucleo_l152re/pinmux.c b/boards/arm/nucleo_l152re/pinmux.c index eb36c18e7d..1764ed2e3f 100644 --- a/boards/arm/nucleo_l152re/pinmux.c +++ b/boards/arm/nucleo_l152re/pinmux.c @@ -13,15 +13,15 @@ #include static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L1X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L1X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L1X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L1X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32L1X_PINMUX_FUNC_PA0_ADC1_IN0}, #endif }; diff --git a/boards/arm/nucleo_l432kc/pinmux.c b/boards/arm/nucleo_l432kc/pinmux.c index e53078a379..9f0f267957 100644 --- a/boards/arm/nucleo_l432kc/pinmux.c +++ b/boards/arm/nucleo_l432kc/pinmux.c @@ -15,22 +15,22 @@ /* pin assignments for NUCLEO-L432KC board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L4X_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L4X_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32L4X_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -38,7 +38,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32L4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PA11, STM32L4X_PINMUX_FUNC_PA11_CAN_RX}, {STM32_PIN_PA12, STM32L4X_PINMUX_FUNC_PA12_CAN_TX}, #endif diff --git a/boards/arm/nucleo_l452re/pinmux.c b/boards/arm/nucleo_l452re/pinmux.c index f454ab169d..bd2d533095 100644 --- a/boards/arm/nucleo_l452re/pinmux.c +++ b/boards/arm/nucleo_l452re/pinmux.c @@ -14,22 +14,22 @@ /* pin assignments for NUCLEO-L452RE board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L4X_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L4X_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L4X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32L4X_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -37,7 +37,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32L4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PA11, STM32L4X_PINMUX_FUNC_PA11_CAN_RX}, {STM32_PIN_PA12, STM32L4X_PINMUX_FUNC_PA12_CAN_TX}, #endif diff --git a/boards/arm/nucleo_l476rg/pinmux.c b/boards/arm/nucleo_l476rg/pinmux.c index 0961bc9624..c69217b1d8 100644 --- a/boards/arm/nucleo_l476rg/pinmux.c +++ b/boards/arm/nucleo_l476rg/pinmux.c @@ -15,30 +15,30 @@ /* pin assignments for NUCLEO-L476RG board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L4X_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L4X_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L4X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32L4X_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32L4X_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PC0, STM32L4X_PINMUX_FUNC_PC0_I2C3_SCL}, {STM32_PIN_PC1, STM32L4X_PINMUX_FUNC_PC1_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) /* SPI1 on the Arduino connectors pins A2, D3, D12, D11 */ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32L4X_PINMUX_FUNC_PA4_SPI1_NSS}, @@ -48,7 +48,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32L4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) /* SPI2 on the ST Morpho Connector CN10 pins 16, 30, 28, 26*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32L4X_PINMUX_FUNC_PB12_SPI2_NSS}, @@ -57,7 +57,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB14, STM32L4X_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32L4X_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi3), okay) /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_SPI3_NSS}, @@ -66,7 +66,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PC11, STM32L4X_PINMUX_FUNC_PC11_SPI3_MISO}, {STM32_PIN_PC12, STM32L4X_PINMUX_FUNC_PC12_SPI3_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PC0, STM32L4X_PINMUX_FUNC_PC0_ADC123_IN1}, #endif }; diff --git a/boards/arm/nucleo_l496zg/pinmux.c b/boards/arm/nucleo_l496zg/pinmux.c index 7153dec51d..e060382717 100644 --- a/boards/arm/nucleo_l496zg/pinmux.c +++ b/boards/arm/nucleo_l496zg/pinmux.c @@ -14,32 +14,32 @@ /* pin assignments for NUCLEO-L496ZG board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PD5, STM32L4X_PINMUX_FUNC_PD5_USART2_TX}, {STM32_PIN_PD6, STM32L4X_PINMUX_FUNC_PD6_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) {STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_LPUART1_TX}, {STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_LPUART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32L4X_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32L4X_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PA6, STM32L4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) {STM32_PIN_PE9, STM32L4X_PINMUX_FUNC_PE9_PWM1_CH1}, {STM32_PIN_PE11, STM32L4X_PINMUX_FUNC_PE11_PWM1_CH2}, {STM32_PIN_PE13, STM32L4X_PINMUX_FUNC_PE13_PWM1_CH3}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm15)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm15), okay) {STM32_PIN_PB14, STM32L4X_PINMUX_FUNC_PB14_PWM15_CH1}, #endif }; diff --git a/boards/arm/nucleo_l4r5zi/pinmux.c b/boards/arm/nucleo_l4r5zi/pinmux.c index d03ca33490..c00e75c847 100644 --- a/boards/arm/nucleo_l4r5zi/pinmux.c +++ b/boards/arm/nucleo_l4r5zi/pinmux.c @@ -14,30 +14,30 @@ /* pin assignments for NUCLEO-L4R5ZI board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L4X_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L4X_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) {STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_LPUART1_TX}, {STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_LPUART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L4X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PD8, STM32L4X_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32L4X_PINMUX_FUNC_PD9_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) /* SPI1 on the Arduino connectors pins A2, D3, D12, D11 */ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32L4X_PINMUX_FUNC_PA4_SPI1_NSS}, @@ -47,7 +47,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32L4X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L4X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) /* SPI2 on the ST Morpho Connector CN10 pins 16, 30, 28, 26*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32L4X_PINMUX_FUNC_PB12_SPI2_NSS}, @@ -56,7 +56,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PB14, STM32L4X_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32L4X_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi3), okay) /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_SPI3_NSS}, diff --git a/boards/arm/nucleo_l552ze_q/pinmux.c b/boards/arm/nucleo_l552ze_q/pinmux.c index 2557cb6c61..10ff680328 100644 --- a/boards/arm/nucleo_l552ze_q/pinmux.c +++ b/boards/arm/nucleo_l552ze_q/pinmux.c @@ -14,7 +14,7 @@ /* pin assignments for NUCLEO-L552ZE-Q board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) {STM32_PIN_PG7, STM32L5X_PINMUX_FUNC_PG7_LPUART1_TX}, {STM32_PIN_PG8, STM32L5X_PINMUX_FUNC_PG8_LPUART1_RX}, #endif diff --git a/boards/arm/nucleo_wb55rg/pinmux.c b/boards/arm/nucleo_wb55rg/pinmux.c index 2bc15ca9b1..1e7f3fc2b8 100644 --- a/boards/arm/nucleo_wb55rg/pinmux.c +++ b/boards/arm/nucleo_wb55rg/pinmux.c @@ -14,23 +14,23 @@ /* pin assignments for NUCLEO-WB55RG board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB7, STM32WBX_PINMUX_FUNC_PB7_USART1_RX}, {STM32_PIN_PB6, STM32WBX_PINMUX_FUNC_PB6_USART1_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) {STM32_PIN_PA2, STM32WBX_PINMUX_FUNC_PA2_LPUART1_TX}, {STM32_PIN_PA3, STM32WBX_PINMUX_FUNC_PA3_LPUART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32WBX_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32WBX_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PC0, STM32WBX_PINMUX_FUNC_PC0_I2C3_SCL}, {STM32_PIN_PC1, STM32WBX_PINMUX_FUNC_PC1_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32WBX_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -38,13 +38,13 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32WBX_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32WBX_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32WBX_PINMUX_FUNC_PA0_TMR2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PC2, STM32WBX_PINMUX_FUNC_PC2_ADC1_IN3}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usb)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb), okay) {STM32_PIN_PA11, STM32WBX_PINMUX_FUNC_PA11_USB_DM}, {STM32_PIN_PA12, STM32WBX_PINMUX_FUNC_PA12_USB_DP}, #endif diff --git a/boards/arm/olimex_stm32_e407/pinmux.c b/boards/arm/olimex_stm32_e407/pinmux.c index 0fecadf7e7..3e375495e4 100644 --- a/boards/arm/olimex_stm32_e407/pinmux.c +++ b/boards/arm/olimex_stm32_e407/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for OLIMEX-STM32-E407 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PC6, STM32F4_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_USART6_RX}, #endif @@ -41,14 +41,14 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_ETH}, #endif /* CONFIG_ETH_STM32_HAL */ #ifdef CONFIG_USB_DC_STM32 -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, st_stm32_otgfs)) +#if DT_NODE_HAS_STATUS(DT_INST(0, st_stm32_otgfs), okay) {STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM}, {STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP}, -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_INST(0, st_stm32_otgfs)) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, st_stm32_otghs)) +#endif /* DT_NODE_HAS_STATUS(DT_INST(0, st_stm32_otgfs), okay) */ +#if DT_NODE_HAS_STATUS(DT_INST(0, st_stm32_otghs), okay) {STM32_PIN_PB14, STM32F4_PINMUX_FUNC_PB14_OTG_HS_DM}, {STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_OTG_HS_DP}, -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_INST(0, st_stm32_otghs)) */ +#endif /* DT_NODE_HAS_STATUS(DT_INST(0, st_stm32_otghs), okay) */ #endif /* CONFIG_USB_DC_STM32 */ }; diff --git a/boards/arm/olimex_stm32_h407/pinmux.c b/boards/arm/olimex_stm32_h407/pinmux.c index 46d050aa50..0c4b563a35 100644 --- a/boards/arm/olimex_stm32_h407/pinmux.c +++ b/boards/arm/olimex_stm32_h407/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for OLIMEX-STM32-H407 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PC6, STM32F4_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_USART6_RX}, #endif diff --git a/boards/arm/olimex_stm32_p405/pinmux.c b/boards/arm/olimex_stm32_p405/pinmux.c index d8c1a0f76e..a7c940af1c 100644 --- a/boards/arm/olimex_stm32_p405/pinmux.c +++ b/boards/arm/olimex_stm32_p405/pinmux.c @@ -14,11 +14,11 @@ /* pin assignments for OLIMEX-STM32-P405 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_CAN1_RX}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_CAN1_TX}, #endif diff --git a/boards/arm/olimexino_stm32/pinmux.c b/boards/arm/olimexino_stm32/pinmux.c index d246b8951b..c1f3a2698a 100644 --- a/boards/arm/olimexino_stm32/pinmux.c +++ b/boards/arm/olimexino_stm32/pinmux.c @@ -15,27 +15,27 @@ /* pin assignments for OLIMEXINO-STM32 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F1_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F1_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F1_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F1_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F1_PINMUX_FUNC_PA4_SPI1_MASTER_NSS_OE}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -43,7 +43,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F1_PINMUX_FUNC_PA6_SPI1_MASTER_MISO}, {STM32_PIN_PA7, STM32F1_PINMUX_FUNC_PA7_SPI1_MASTER_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F1_PINMUX_FUNC_PB12_SPI2_MASTER_NSS_OE}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -51,14 +51,14 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) {STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 {STM32_PIN_PA11, STM32F1_PINMUX_FUNC_PA11_USB_DM}, {STM32_PIN_PA12, STM32F1_PINMUX_FUNC_PA12_USB_DP}, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PB8, STM32F1_PINMUX_FUNC_PB8_CAN_RX}, {STM32_PIN_PB9, STM32F1_PINMUX_FUNC_PB9_CAN_TX}, #endif @@ -69,7 +69,7 @@ static int pinmux_stm32_init(struct device *port) ARG_UNUSED(port); stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) /* Set pin-mux so that CAN1 is on PB8 and PB9 */ AFIO->MAPR |= AFIO_MAPR_CAN_REMAP_REMAP2; #endif diff --git a/boards/arm/pico_pi_m4/pinmux.c b/boards/arm/pico_pi_m4/pinmux.c index 8286268e98..abf4a0bb95 100644 --- a/boards/arm/pico_pi_m4/pinmux.c +++ b/boards/arm/pico_pi_m4/pinmux.c @@ -12,7 +12,7 @@ static int pico_pi_m4_pinmux_init(struct device *dev) { ARG_UNUSED(dev); - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA = IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA_MUX_MODE(0); IOMUXC_SW_MUX_CTL_PAD_UART2_TX_DATA = @@ -34,7 +34,7 @@ static int pico_pi_m4_pinmux_init(struct device *dev) #endif - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart5)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(uart5), okay) IOMUXC_SW_MUX_CTL_PAD_I2C4_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C4_SCL_MUX_MODE(1); IOMUXC_SW_MUX_CTL_PAD_I2C4_SDA = @@ -58,7 +58,7 @@ static int pico_pi_m4_pinmux_init(struct device *dev) #endif - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart6)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(uart6), okay) IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA08 = IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA08_MUX_MODE(3); IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA09 = @@ -81,7 +81,7 @@ static int pico_pi_m4_pinmux_init(struct device *dev) #endif - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) IOMUXC_SW_MUX_CTL_PAD_UART1_RX_DATA = IOMUXC_SW_MUX_CTL_PAD_UART1_RX_DATA_MUX_MODE(1) | IOMUXC_SW_MUX_CTL_PAD_UART1_RX_DATA_SION_MASK; @@ -106,7 +106,7 @@ static int pico_pi_m4_pinmux_init(struct device *dev) #endif - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_SION_MASK; @@ -131,7 +131,7 @@ static int pico_pi_m4_pinmux_init(struct device *dev) #endif - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_SION_MASK; @@ -156,7 +156,7 @@ static int pico_pi_m4_pinmux_init(struct device *dev) #endif - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c4)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_SYNC = IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_SYNC_MUX_MODE(3) | IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_SYNC_SION_MASK; diff --git a/boards/arm/sam_e70_xplained/pinmux.c b/boards/arm/sam_e70_xplained/pinmux.c index 59ea2bd77f..70fc506692 100644 --- a/boards/arm/sam_e70_xplained/pinmux.c +++ b/boards/arm/sam_e70_xplained/pinmux.c @@ -6,7 +6,7 @@ #include -#if defined CONFIG_PWM && DT_HAS_NODE_STATUS_OKAY(DT_INST(0, atmel_sam_pwm)) +#if defined CONFIG_PWM && DT_NODE_HAS_STATUS(DT_INST(0, atmel_sam_pwm), okay) /* PWM on EXT1 connector, pin 7, channel 0, inverted */ static const struct soc_gpio_pin pwm_ext1_pin7 = { PIO_PA0A_PWM0_PWMH0, PIOA, ID_PIOA, SOC_GPIO_FUNC_A @@ -27,7 +27,7 @@ static int sam_e70_xplained_init(struct device *dev) { ARG_UNUSED(dev); -#if defined CONFIG_PWM && DT_HAS_NODE_STATUS_OKAY(DT_INST(0, atmel_sam_pwm)) +#if defined CONFIG_PWM && DT_NODE_HAS_STATUS(DT_INST(0, atmel_sam_pwm), okay) soc_gpio_configure(&pwm_ext1_pin7); soc_gpio_configure(&pwm_ext2_pin7); soc_gpio_configure(&pwm_ext2_pin8); diff --git a/boards/arm/sam_v71_xult/pinmux.c b/boards/arm/sam_v71_xult/pinmux.c index 8e76476e35..60be81fe83 100644 --- a/boards/arm/sam_v71_xult/pinmux.c +++ b/boards/arm/sam_v71_xult/pinmux.c @@ -7,7 +7,7 @@ #include -#if defined CONFIG_PWM && DT_HAS_NODE_STATUS_OKAY(DT_INST(0, atmel_sam_pwm)) +#if defined CONFIG_PWM && DT_NODE_HAS_STATUS(DT_INST(0, atmel_sam_pwm), okay) /* PWM on EXT1 connector, pin 7, channel 0, inverted */ static const struct soc_gpio_pin pwm_ext1_pin7 = { PIO_PA0A_PWM0_PWMH0, PIOA, ID_PIOA, SOC_GPIO_FUNC_A @@ -28,7 +28,7 @@ static int sam_v71_xplained_init(struct device *dev) { ARG_UNUSED(dev); -#if defined CONFIG_PWM && DT_HAS_NODE_STATUS_OKAY(DT_INST(0, atmel_sam_pwm)) +#if defined CONFIG_PWM && DT_NODE_HAS_STATUS(DT_INST(0, atmel_sam_pwm), okay) soc_gpio_configure(&pwm_ext1_pin7); soc_gpio_configure(&pwm_ext2_pin7); soc_gpio_configure(&pwm_ext2_pin8); diff --git a/boards/arm/sensortile_box/pinmux.c b/boards/arm/sensortile_box/pinmux.c index c703eadca8..83a1273a0e 100644 --- a/boards/arm/sensortile_box/pinmux.c +++ b/boards/arm/sensortile_box/pinmux.c @@ -14,36 +14,36 @@ /* pin assignments for SensorTile.box board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L4X_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L4X_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L4X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_I2C3_SCL}, {STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PE12, STM32L4X_PINMUX_FUNC_PE12_SPI1_NSS}, {STM32_PIN_PE13, STM32L4X_PINMUX_FUNC_PE13_SPI1_SCK}, {STM32_PIN_PE14, STM32L4X_PINMUX_FUNC_PE14_SPI1_MISO}, {STM32_PIN_PE15, STM32L4X_PINMUX_FUNC_PE15_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) /* SPI2 on the ST Morpho Connector CN10 pins 16, 30, 28, 26*/ {STM32_PIN_PB12, STM32L4X_PINMUX_FUNC_PB12_SPI2_NSS}, {STM32_PIN_PB13, STM32L4X_PINMUX_FUNC_PB13_SPI2_SCK}, {STM32_PIN_PB14, STM32L4X_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32L4X_PINMUX_FUNC_PB15_SPI2_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi3), okay) {STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_SPI3_NSS}, {STM32_PIN_PB3, STM32L4X_PINMUX_FUNC_PB3_SPI3_SCK}, {STM32_PIN_PB4, STM32L4X_PINMUX_FUNC_PB4_SPI3_MISO}, diff --git a/boards/arm/steval_fcu001v1/pinmux.c b/boards/arm/steval_fcu001v1/pinmux.c index 1e851b0c6f..2460eef942 100644 --- a/boards/arm/steval_fcu001v1/pinmux.c +++ b/boards/arm/steval_fcu001v1/pinmux.c @@ -14,14 +14,14 @@ /* pin assignments for STEVAL-FCU001V1 */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA}, {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, #endif diff --git a/boards/arm/stm3210c_eval/pinmux.c b/boards/arm/stm3210c_eval/pinmux.c index bceba613df..122a05ee4e 100644 --- a/boards/arm/stm3210c_eval/pinmux.c +++ b/boards/arm/stm3210c_eval/pinmux.c @@ -14,7 +14,7 @@ /* pin assignments for STM3210C-EVAL board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PD5, STM32F1_PINMUX_FUNC_PD5_USART2_TX}, {STM32_PIN_PD6, STM32F1_PINMUX_FUNC_PD6_USART2_RX}, #endif diff --git a/boards/arm/stm32373c_eval/pinmux.c b/boards/arm/stm32373c_eval/pinmux.c index f5c7528d84..de4fd6c1fb 100644 --- a/boards/arm/stm32373c_eval/pinmux.c +++ b/boards/arm/stm32373c_eval/pinmux.c @@ -14,7 +14,7 @@ /* pin assignments for STM32373C-EVAL board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PD5, STM32F3_PINMUX_FUNC_PD5_USART2_TX}, {STM32_PIN_PD6, STM32F3_PINMUX_FUNC_PD6_USART2_RX}, #endif diff --git a/boards/arm/stm32_min_dev/pinmux.c b/boards/arm/stm32_min_dev/pinmux.c index 611f4b1454..eb8b158310 100644 --- a/boards/arm/stm32_min_dev/pinmux.c +++ b/boards/arm/stm32_min_dev/pinmux.c @@ -14,30 +14,30 @@ /* pin assignments for STM32_MIN_DEV board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F1_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F1_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F1_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F1_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) {STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F1_PINMUX_FUNC_PA4_SPI1_MASTER_NSS_OE}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -45,7 +45,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F1_PINMUX_FUNC_PA6_SPI1_MASTER_MISO}, {STM32_PIN_PA7, STM32F1_PINMUX_FUNC_PA7_SPI1_MASTER_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F1_PINMUX_FUNC_PB12_SPI2_MASTER_NSS_OE}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -57,7 +57,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA11, STM32F1_PINMUX_FUNC_PA11_USB_DM}, {STM32_PIN_PA12, STM32F1_PINMUX_FUNC_PA12_USB_DP}, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) {STM32_PIN_PA0, STM32F1_PINMUX_FUNC_PA0_ADC123_IN0}, #endif }; diff --git a/boards/arm/stm32f030_demo/pinmux.c b/boards/arm/stm32f030_demo/pinmux.c index 2e391b5818..b8afc1fd52 100644 --- a/boards/arm/stm32f030_demo/pinmux.c +++ b/boards/arm/stm32f030_demo/pinmux.c @@ -15,7 +15,7 @@ /* pin assignments for STM32F030 DEMO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F0_PINMUX_FUNC_PA10_USART1_RX}, #endif diff --git a/boards/arm/stm32f072_eval/pinmux.c b/boards/arm/stm32f072_eval/pinmux.c index 3564a666b8..91eab41c42 100644 --- a/boards/arm/stm32f072_eval/pinmux.c +++ b/boards/arm/stm32f072_eval/pinmux.c @@ -14,7 +14,7 @@ /* pin assignments for STM32F072-EVAL board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PD5, STM32F0_PINMUX_FUNC_PD5_USART2_TX}, {STM32_PIN_PD6, STM32F0_PINMUX_FUNC_PD6_USART2_RX}, #endif diff --git a/boards/arm/stm32f072b_disco/pinmux.c b/boards/arm/stm32f072b_disco/pinmux.c index d9e25e52b6..5c15e139fb 100644 --- a/boards/arm/stm32f072b_disco/pinmux.c +++ b/boards/arm/stm32f072b_disco/pinmux.c @@ -15,24 +15,24 @@ /* pin assignments for STM32F072B-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F0_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F0_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F0_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F0_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PB3, STM32F0_PINMUX_FUNC_PB3_SPI1_SCK}, {STM32_PIN_PB4, STM32F0_PINMUX_FUNC_PB4_SPI1_MISO}, {STM32_PIN_PB5, STM32F0_PINMUX_FUNC_PB5_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_CAN_RX}, {STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_CAN_TX}, #endif diff --git a/boards/arm/stm32f0_disco/pinmux.c b/boards/arm/stm32f0_disco/pinmux.c index 8e2af3ec1d..906b61b710 100644 --- a/boards/arm/stm32f0_disco/pinmux.c +++ b/boards/arm/stm32f0_disco/pinmux.c @@ -15,11 +15,11 @@ /* pin assignments for STM32F0DISCOVERY board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F0_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F0_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F0_PINMUX_FUNC_PA3_USART2_RX}, #endif diff --git a/boards/arm/stm32f3_disco/pinmux.c b/boards/arm/stm32f3_disco/pinmux.c index 8a1c83d349..4eda61de50 100644 --- a/boards/arm/stm32f3_disco/pinmux.c +++ b/boards/arm/stm32f3_disco/pinmux.c @@ -14,23 +14,23 @@ /* pin assignments for STM32F3DISCOVERY board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX}, {STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32F3_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32F3_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_I2C2_SCL}, {STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32F3_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -38,7 +38,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32F3_PINMUX_FUNC_PB12_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -50,7 +50,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA11, STM32F3_PINMUX_FUNC_PA11_USB_DM}, {STM32_PIN_PA12, STM32F3_PINMUX_FUNC_PA12_USB_DP}, #endif /* CONFIG_USB_DC_STM32 */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PD0, STM32F3_PINMUX_FUNC_PD0_CAN1_RX}, {STM32_PIN_PD1, STM32F3_PINMUX_FUNC_PD1_CAN1_TX}, #endif diff --git a/boards/arm/stm32f411e_disco/pinmux.c b/boards/arm/stm32f411e_disco/pinmux.c index 01f740323e..dcff3daf12 100644 --- a/boards/arm/stm32f411e_disco/pinmux.c +++ b/boards/arm/stm32f411e_disco/pinmux.c @@ -14,11 +14,11 @@ /* pin assignments for STM32F411E-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) {STM32_PIN_PD12, STM32F4_PINMUX_FUNC_PD12_PWM4_CH1 }, #endif }; diff --git a/boards/arm/stm32f412g_disco/pinmux.c b/boards/arm/stm32f412g_disco/pinmux.c index 342e7ce31d..493a8a2fe5 100644 --- a/boards/arm/stm32f412g_disco/pinmux.c +++ b/boards/arm/stm32f412g_disco/pinmux.c @@ -14,7 +14,7 @@ /* pin assignments for STM32F412G-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif diff --git a/boards/arm/stm32f429i_disc1/pinmux.c b/boards/arm/stm32f429i_disc1/pinmux.c index a684cba763..0fb88e0071 100644 --- a/boards/arm/stm32f429i_disc1/pinmux.c +++ b/boards/arm/stm32f429i_disc1/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for STM32F429I-DISC1 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi5), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PF6, STM32F4_PINMUX_FUNC_PF6_SPI5_MASTER_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {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 edc3cc3263..0da43f1f1d 100644 --- a/boards/arm/stm32f469i_disco/pinmux.c +++ b/boards/arm/stm32f469i_disco/pinmux.c @@ -14,19 +14,19 @@ /* pin assignments for STM32F469I-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32F4_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX}, {STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) {STM32_PIN_PD3, STM32F4_PINMUX_FUNC_PD3_SPI2_SCK}, {STM32_PIN_PB14, STM32F4_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI}, diff --git a/boards/arm/stm32f4_disco/pinmux.c b/boards/arm/stm32f4_disco/pinmux.c index ec569eeb5d..2cb3380b87 100644 --- a/boards/arm/stm32f4_disco/pinmux.c +++ b/boards/arm/stm32f4_disco/pinmux.c @@ -14,26 +14,26 @@ /* pin assignments for STM32F4DISCOVERY board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32F4_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PB7, STM32F4_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1}, #endif #ifdef CONFIG_USB_DC_STM32 {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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) {STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_CAN1_RX}, {STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_CAN1_TX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can2), okay) {STM32_PIN_PB5, STM32F4_PINMUX_FUNC_PB5_CAN2_RX}, {STM32_PIN_PB13, STM32F4_PINMUX_FUNC_PB13_CAN2_TX}, #endif diff --git a/boards/arm/stm32f723e_disco/pinmux.c b/boards/arm/stm32f723e_disco/pinmux.c index 5e01f846a9..b33b542097 100644 --- a/boards/arm/stm32f723e_disco/pinmux.c +++ b/boards/arm/stm32f723e_disco/pinmux.c @@ -14,27 +14,27 @@ /* pin assignments for STM32F723E-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32F7_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32F7_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PC6, STM32F7_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F7_PINMUX_FUNC_PC7_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PH4, STM32F7_PINMUX_FUNC_PH4_I2C2_SCL}, {STM32_PIN_PH5, STM32F7_PINMUX_FUNC_PH5_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PA8, STM32F7_PINMUX_FUNC_PA8_I2C3_SCL}, {STM32_PIN_PH8, STM32F7_PINMUX_FUNC_PH8_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32F7_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PB4, STM32F7_PINMUX_FUNC_PB4_SPI1_MISO}, {STM32_PIN_PB5, STM32F7_PINMUX_FUNC_PB5_SPI1_MOSI}, diff --git a/boards/arm/stm32f746g_disco/pinmux.c b/boards/arm/stm32f746g_disco/pinmux.c index ef40f1d006..4cacdf6881 100644 --- a/boards/arm/stm32f746g_disco/pinmux.c +++ b/boards/arm/stm32f746g_disco/pinmux.c @@ -14,15 +14,15 @@ /* pin assignments for STM32F746G-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F7_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PB7, STM32F7_PINMUX_FUNC_PB7_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PC6, STM32F7_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F7_PINMUX_FUNC_PC7_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) {STM32_PIN_PB4, STM32F7_PINMUX_FUNC_PB4_PWM3_CH1}, #endif #ifdef CONFIG_ETH_STM32_HAL @@ -38,15 +38,15 @@ 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) {STM32_PIN_PH7, STM32F7_PINMUX_FUNC_PH7_I2C3_SCL}, {STM32_PIN_PH8, STM32F7_PINMUX_FUNC_PH8_I2C3_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PI0, STM32F7_PINMUX_FUNC_PI0_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -58,7 +58,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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(sdmmc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdmmc1), okay) {STM32_PIN_PC8, STM32F7_PINMUX_FUNC_PC8_SDMMC1_D0}, {STM32_PIN_PC9, STM32F7_PINMUX_FUNC_PC9_SDMMC1_D1}, {STM32_PIN_PC10, STM32F7_PINMUX_FUNC_PC10_SDMMC1_D2}, diff --git a/boards/arm/stm32f769i_disco/pinmux.c b/boards/arm/stm32f769i_disco/pinmux.c index 91478fd075..9b01367efc 100644 --- a/boards/arm/stm32f769i_disco/pinmux.c +++ b/boards/arm/stm32f769i_disco/pinmux.c @@ -14,19 +14,19 @@ /* pin assignments for STM32F769I-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32F7_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32F7_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart6), okay) {STM32_PIN_PC6, STM32F7_PINMUX_FUNC_PC6_USART6_TX}, {STM32_PIN_PC7, STM32F7_PINMUX_FUNC_PC7_USART6_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) {STM32_PIN_PA12, STM32F7_PINMUX_FUNC_PA12_SPI2_SCK}, {STM32_PIN_PB14, STM32F7_PINMUX_FUNC_PB14_SPI2_MISO}, {STM32_PIN_PB15, STM32F7_PINMUX_FUNC_PB15_SPI2_MOSI}, diff --git a/boards/arm/stm32g0316_disco/pinmux.c b/boards/arm/stm32g0316_disco/pinmux.c index 22752ff1b3..748be01570 100644 --- a/boards/arm/stm32g0316_disco/pinmux.c +++ b/boards/arm/stm32g0316_disco/pinmux.c @@ -11,7 +11,7 @@ /* pin assignments for STM32G0316-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32G0_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PB7, STM32G0_PINMUX_FUNC_PB7_USART1_RX}, #endif @@ -21,7 +21,7 @@ static int pinmux_stm32_init(struct device *port) { ARG_UNUSED(port); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) /* Remap PA11 to PA9 */ LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG); LL_SYSCFG_EnablePinRemap(LL_SYSCFG_PIN_RMP_PA11); diff --git a/boards/arm/stm32h747i_disco/pinmux.c b/boards/arm/stm32h747i_disco/pinmux.c index e3c21acea9..dbb93248df 100644 --- a/boards/arm/stm32h747i_disco/pinmux.c +++ b/boards/arm/stm32h747i_disco/pinmux.c @@ -14,11 +14,11 @@ /* pin assignments for STM32H747I-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32H7_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32H7_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart8)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart8), okay) {STM32_PIN_PJ8, STM32H7_PINMUX_FUNC_PJ8_UART8_TX}, {STM32_PIN_PJ9, STM32H7_PINMUX_FUNC_PJ9_UART8_RX}, #endif diff --git a/boards/arm/stm32l1_disco/pinmux.c b/boards/arm/stm32l1_disco/pinmux.c index da096a6a91..de096eb30b 100644 --- a/boards/arm/stm32l1_disco/pinmux.c +++ b/boards/arm/stm32l1_disco/pinmux.c @@ -13,27 +13,27 @@ #include static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PA9, STM32L1X_PINMUX_FUNC_PA9_USART1_TX}, {STM32_PIN_PA10, STM32L1X_PINMUX_FUNC_PA10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L1X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PA3, STM32L1X_PINMUX_FUNC_PA3_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) {STM32_PIN_PB10, STM32L1X_PINMUX_FUNC_PB10_USART3_TX}, {STM32_PIN_PB11, STM32L1X_PINMUX_FUNC_PB11_USART3_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB6, STM32L1X_PINMUX_FUNC_PB6_I2C1_SCL}, {STM32_PIN_PB7, STM32L1X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) {STM32_PIN_PB10, STM32L1X_PINMUX_FUNC_PB10_I2C2_SCL}, {STM32_PIN_PB11, STM32L1X_PINMUX_FUNC_PB11_I2C2_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PA4, STM32L1X_PINMUX_FUNC_PA4_SPI1_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -41,7 +41,7 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PA6, STM32L1X_PINMUX_FUNC_PA6_SPI1_MISO}, {STM32_PIN_PA7, STM32L1X_PINMUX_FUNC_PA7_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PB12, STM32L1X_PINMUX_FUNC_PB12_SPI2_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/stm32l476g_disco/pinmux.c b/boards/arm/stm32l476g_disco/pinmux.c index 587bfae4e4..3092d14751 100644 --- a/boards/arm/stm32l476g_disco/pinmux.c +++ b/boards/arm/stm32l476g_disco/pinmux.c @@ -14,7 +14,7 @@ /* pin assignments for STM32L476G DISCOVERY board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PD5, STM32L4X_PINMUX_FUNC_PD5_USART2_TX}, {STM32_PIN_PD6, STM32L4X_PINMUX_FUNC_PD6_USART2_RX}, #endif diff --git a/boards/arm/stm32l496g_disco/pinmux.c b/boards/arm/stm32l496g_disco/pinmux.c index 81628bf767..f80088a813 100644 --- a/boards/arm/stm32l496g_disco/pinmux.c +++ b/boards/arm/stm32l496g_disco/pinmux.c @@ -15,31 +15,31 @@ /* pin assignments for STM32L476G-DISCO board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) {STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_USART1_TX}, {STM32_PIN_PG10, STM32L4X_PINMUX_FUNC_PG10_USART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) {STM32_PIN_PA2, STM32L4X_PINMUX_FUNC_PA2_USART2_TX}, {STM32_PIN_PD6, STM32L4X_PINMUX_FUNC_PD6_USART2_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) {STM32_PIN_PG7, STM32L4X_PINMUX_FUNC_PG7_LPUART1_TX}, {STM32_PIN_PG8, STM32L4X_PINMUX_FUNC_PG8_LPUART1_RX}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) {STM32_PIN_PB8, STM32L4X_PINMUX_FUNC_PB8_I2C1_SCL}, {STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) {STM32_PIN_PA5, STM32L4X_PINMUX_FUNC_PA5_SPI1_SCK}, {STM32_PIN_PB4, STM32L4X_PINMUX_FUNC_PB4_SPI1_MISO}, {STM32_PIN_PB5, STM32L4X_PINMUX_FUNC_PB5_SPI1_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) {STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(sdmmc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdmmc1), okay) {STM32_PIN_PC8, STM32L4X_PINMUX_FUNC_PC8_SDMMC1_D0}, {STM32_PIN_PC9, STM32L4X_PINMUX_FUNC_PC9_SDMMC1_D1}, {STM32_PIN_PC10, STM32L4X_PINMUX_FUNC_PC10_SDMMC1_D2}, diff --git a/boards/arm/stm32mp157c_dk2/pinmux.c b/boards/arm/stm32mp157c_dk2/pinmux.c index eeb784810d..f16c820b73 100644 --- a/boards/arm/stm32mp157c_dk2/pinmux.c +++ b/boards/arm/stm32mp157c_dk2/pinmux.c @@ -14,19 +14,19 @@ /* pin assignments for STM32MP157c_dk2 board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) { STM32_PIN_PB10, STM32MP1X_PINMUX_FUNC_PB10_USART3_TX }, { STM32_PIN_PB12, STM32MP1X_PINMUX_FUNC_PB12_USART3_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart7)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart7), okay) { STM32_PIN_PE7, STM32MP1X_PINMUX_FUNC_PE7_UART7_RX }, { STM32_PIN_PE8, STM32MP1X_PINMUX_FUNC_PE8_UART7_TX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c5), okay) { STM32_PIN_PA11, STM32MP1X_PINMUX_FUNC_PA11_I2C5_SCL }, { STM32_PIN_PA12, STM32MP1X_PINMUX_FUNC_PA12_I2C5_SDA }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi4), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PE11, STM32MP1X_PINMUX_FUNC_PE11_SPI4_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -35,7 +35,7 @@ static const struct pin_config pinconf[] = { STM32_OSPEEDR_VERY_HIGH_SPEED}, {STM32_PIN_PE14, STM32MP1X_PINMUX_FUNC_PE14_SPI4_MOSI}, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi5), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS {STM32_PIN_PF6, STM32MP1X_PINMUX_FUNC_PF6_SPI5_NSS}, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ diff --git a/boards/arm/stm32vl_disco/pinmux.c b/boards/arm/stm32vl_disco/pinmux.c index 6a1fd9d6a9..edccd644a7 100644 --- a/boards/arm/stm32vl_disco/pinmux.c +++ b/boards/arm/stm32vl_disco/pinmux.c @@ -14,22 +14,22 @@ /* pin assignments for STM32 Discovery VL board */ static const struct pin_config pinconf[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) { STM32_PIN_PA9, STM32F1_PINMUX_FUNC_PA9_USART1_TX }, { STM32_PIN_PA10, STM32F1_PINMUX_FUNC_PA10_USART1_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) { STM32_PIN_PA2, STM32F1_PINMUX_FUNC_PA2_USART2_TX }, { STM32_PIN_PA3, STM32F1_PINMUX_FUNC_PA3_USART2_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(usart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) { STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX }, { STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) { STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1 }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS { STM32_PIN_PA4, STM32F1_PINMUX_FUNC_PA4_SPI1_MASTER_NSS }, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -37,7 +37,7 @@ static const struct pin_config pinconf[] = { { STM32_PIN_PA6, STM32F1_PINMUX_FUNC_PA6_SPI1_MASTER_MISO }, { STM32_PIN_PA7, STM32F1_PINMUX_FUNC_PA7_SPI1_MASTER_MOSI }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay) #ifdef CONFIG_SPI_STM32_USE_HW_SS { STM32_PIN_PB12, STM32F1_PINMUX_FUNC_PB12_SPI2_MASTER_NSS }, #endif /* CONFIG_SPI_STM32_USE_HW_SS */ @@ -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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) { STM32_PIN_PB6, STM32F1_PINMUX_FUNC_PB6_I2C1_SCL }, { STM32_PIN_PB7, STM32F1_PINMUX_FUNC_PB7_I2C1_SDA }, #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) { STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL }, { STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA }, #endif diff --git a/boards/arm/twr_ke18f/pinmux.c b/boards/arm/twr_ke18f/pinmux.c index 9de182225f..3c9450b854 100644 --- a/boards/arm/twr_ke18f/pinmux.c +++ b/boards/arm/twr_ke18f/pinmux.c @@ -64,13 +64,13 @@ static int twr_ke18f_pinmux_init(struct device *dev) pinmux_pin_set(portd, 3, PORT_PCR_MUX(kPORT_MuxAsGpio)); pinmux_pin_set(portd, 6, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) /* UART0 RX, TX */ pinmux_pin_set(portb, 0, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(portb, 1, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi0), okay) /* 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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) /* SPI1 SCK, SIN, SOUT */ pinmux_pin_set(portd, 0, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portd, 1, PORT_PCR_MUX(kPORT_MuxAlt3)); @@ -107,19 +107,19 @@ static int twr_ke18f_pinmux_init(struct device *dev) pinmux_pin_set(porte, 10, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c0), okay) /* LPI2C0 SCL, SDA - FXOS8700 */ pinmux_pin_set(porta, 3, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(porta, 2, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) /* LPI2C1 SCL, SDA - Elevator connector */ pinmux_pin_set(portd, 9, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(portd, 8, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(flexcan0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan0), okay) /* FlexCAN0 RX, TX */ pinmux_pin_set(porte, 4, PORT_PCR_MUX(kPORT_MuxAlt5)); pinmux_pin_set(porte, 5, PORT_PCR_MUX(kPORT_MuxAlt5)); @@ -134,7 +134,7 @@ static int twr_ke18f_pinmux_init(struct device *dev) #endif pinmux_pin_set(portc, 15, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) /* Thermistor A, B */ pinmux_pin_set(porta, 0, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); pinmux_pin_set(porta, 1, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); @@ -142,7 +142,7 @@ static int twr_ke18f_pinmux_init(struct device *dev) pinmux_pin_set(portc, 14, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(dac0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac0), okay) pinmux_pin_set(porte, 9, PORT_PCR_MUX(kPORT_PinDisabledOrAnalog)); #endif diff --git a/boards/arm/twr_kv58f220m/pinmux.c b/boards/arm/twr_kv58f220m/pinmux.c index 4ff6eca748..3a3862da6a 100644 --- a/boards/arm/twr_kv58f220m/pinmux.c +++ b/boards/arm/twr_kv58f220m/pinmux.c @@ -49,7 +49,7 @@ static int twr_kv58f220m_pinmux_init(struct device *dev) pinmux_pin_set(portc, 18, PORT_PCR_MUX(kPORT_MuxAsGpio)); pinmux_pin_set(portc, 19, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) /* I2C1 SCL, SDA */ pinmux_pin_set(portd, 8, PORT_PCR_MUX(kPORT_MuxAlt2) | PORT_PCR_ODE_MASK); @@ -57,7 +57,7 @@ static int twr_kv58f220m_pinmux_init(struct device *dev) | PORT_PCR_ODE_MASK); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) /* UART0 RX, TX */ pinmux_pin_set(portb, 0, PORT_PCR_MUX(kPORT_MuxAlt7)); pinmux_pin_set(portb, 1, PORT_PCR_MUX(kPORT_MuxAlt7)); diff --git a/boards/arm/udoo_neo_full_m4/pinmux.c b/boards/arm/udoo_neo_full_m4/pinmux.c index 1c943f6762..cde3e7d041 100644 --- a/boards/arm/udoo_neo_full_m4/pinmux.c +++ b/boards/arm/udoo_neo_full_m4/pinmux.c @@ -11,7 +11,7 @@ static int udoo_neo_full_m4_init(struct device *dev) { ARG_UNUSED(dev); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay) /* GPIO4_IO06 pin mux configuration (red LED) */ IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02 = IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02_MUX_MODE(5); @@ -22,7 +22,7 @@ static int udoo_neo_full_m4_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02_DSE(6); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart5), okay) /* UART5 pin mux configuration */ IOMUXC_SW_MUX_CTL_PAD_SD4_DATA4 = IOMUXC_SW_MUX_CTL_PAD_SD4_DATA4_MUX_MODE(2); diff --git a/boards/arm/usb_kw24d512/pinmux.c b/boards/arm/usb_kw24d512/pinmux.c index 14814155c6..0249f87ddd 100644 --- a/boards/arm/usb_kw24d512/pinmux.c +++ b/boards/arm/usb_kw24d512/pinmux.c @@ -29,7 +29,7 @@ static int usb_kw24d512_pinmux_init(struct device *dev) device_get_binding(CONFIG_PINMUX_MCUX_PORTD_NAME); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) /* UART0 RX, TX */ pinmux_pin_set(porta, 1, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(porta, 2, PORT_PCR_MUX(kPORT_MuxAlt2)); @@ -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_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(spi1), okay) /* 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)); diff --git a/boards/arm/warp7_m4/pinmux.c b/boards/arm/warp7_m4/pinmux.c index 822bbc2d63..61f350fa6a 100644 --- a/boards/arm/warp7_m4/pinmux.c +++ b/boards/arm/warp7_m4/pinmux.c @@ -25,7 +25,7 @@ static int warp7_m4_pinmux_init(struct device *dev) IOMUXC_SW_MUX_CTL_PAD_ENET1_RGMII_RD1_MUX_MODE(5); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA = IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA_MUX_MODE(0); IOMUXC_SW_MUX_CTL_PAD_UART2_TX_DATA = @@ -47,7 +47,7 @@ static int warp7_m4_pinmux_init(struct device *dev) IOMUXC_UART2_RX_DATA_SELECT_INPUT_DAISY(2); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart6), okay) IOMUXC_SW_MUX_CTL_PAD_ECSPI1_SCLK = IOMUXC_SW_MUX_CTL_PAD_ECSPI1_SCLK_MUX_MODE(1); IOMUXC_SW_MUX_CTL_PAD_ECSPI1_MOSI = @@ -69,7 +69,7 @@ static int warp7_m4_pinmux_init(struct device *dev) IOMUXC_UART6_RX_DATA_SELECT_INPUT_DAISY(2); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL_SION_MASK; @@ -93,7 +93,7 @@ static int warp7_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_I2C1_SDA_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_SION_MASK; @@ -117,7 +117,7 @@ static int warp7_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_I2C2_SDA_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_SION_MASK; @@ -141,7 +141,7 @@ static int warp7_m4_pinmux_init(struct device *dev) IOMUXC_SW_PAD_CTL_PAD_I2C3_SDA_HYS_MASK; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) IOMUXC_SW_MUX_CTL_PAD_I2C4_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C4_SCL_MUX_MODE(0) | IOMUXC_SW_MUX_CTL_PAD_I2C4_SCL_SION_MASK; diff --git a/boards/riscv/rv32m1_vega/pinmux.c b/boards/riscv/rv32m1_vega/pinmux.c index b6d63ac224..f2ccfba00a 100644 --- a/boards/riscv/rv32m1_vega/pinmux.c +++ b/boards/riscv/rv32m1_vega/pinmux.c @@ -19,46 +19,46 @@ static int rv32m1_vega_pinmux_init(struct device *dev) { ARG_UNUSED(dev); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(porta)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(porta), okay) __unused struct device *porta = device_get_binding(DT_LABEL(DT_NODELABEL(porta))); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(portb)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(portb), okay) __unused struct device *portb = device_get_binding(DT_LABEL(DT_NODELABEL(portb))); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(portc)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(portc), okay) __unused struct device *portc = device_get_binding(DT_LABEL(DT_NODELABEL(portc))); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(portd)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(portd), okay) __unused struct device *portd = device_get_binding(DT_LABEL(DT_NODELABEL(portd))); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(porte)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(porte), okay) __unused struct device *porte = device_get_binding(DT_LABEL(DT_NODELABEL(porte))); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) /* LPUART0 RX, TX */ pinmux_pin_set(portc, 7, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(portc, 8, PORT_PCR_MUX(kPORT_MuxAlt3)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) /* LPUART1 RX, TX */ pinmux_pin_set(portc, 29, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(portc, 30, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c0), okay) /* LPI2C0 SCL, SDA - Arduino header */ pinmux_pin_set(portc, 10, PORT_PCR_MUX(kPORT_MuxAlt4)); pinmux_pin_set(portc, 9, PORT_PCR_MUX(kPORT_MuxAlt4)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c3), okay) /* LPI2C3 SCL, SDA - FXOS8700 */ pinmux_pin_set(porte, 30, PORT_PCR_MUX(kPORT_MuxAlt3)); pinmux_pin_set(porte, 29, PORT_PCR_MUX(kPORT_MuxAlt3)); @@ -69,7 +69,7 @@ static int rv32m1_vega_pinmux_init(struct device *dev) pinmux_pin_set(porte, 22, PORT_PCR_MUX(kPORT_MuxAsGpio)); pinmux_pin_set(porte, 27, PORT_PCR_MUX(kPORT_MuxAsGpio)); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi0), okay) /* LPSPI0 SCK, SOUT, PCS2, SIN */ pinmux_pin_set(portb, 4, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(portb, 5, PORT_PCR_MUX(kPORT_MuxAlt2)); @@ -77,7 +77,7 @@ static int rv32m1_vega_pinmux_init(struct device *dev) pinmux_pin_set(portb, 7, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) /* LPSPI1 SCK, SIN, SOUT, CS */ pinmux_pin_set(portb, 20, PORT_PCR_MUX(kPORT_MuxAlt2)); pinmux_pin_set(portb, 21, PORT_PCR_MUX(kPORT_MuxAlt2)); @@ -85,7 +85,7 @@ static int rv32m1_vega_pinmux_init(struct device *dev) pinmux_pin_set(portb, 22, PORT_PCR_MUX(kPORT_MuxAlt2)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(tpm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm2), okay) /* RGB LEDs as PWM */ pinmux_pin_set(porta, 22, PORT_PCR_MUX(kPORT_MuxAlt6)); pinmux_pin_set(porta, 23, PORT_PCR_MUX(kPORT_MuxAlt6)); diff --git a/doc/guides/dts/api-usage.rst b/doc/guides/dts/api-usage.rst index 276ff85595..54a2437120 100644 --- a/doc/guides/dts/api-usage.rst +++ b/doc/guides/dts/api-usage.rst @@ -93,28 +93,6 @@ If you want something short to save typing, use C macros: #define I2C_0 INST(0) #define I2C_1 INST(1) -.. _not-all-dt-nodes: - -Not all nodes are usable -************************ - -Just because :ref:`zephyr.dts ` has a node doesn't mean you can use -it from a C or C++ source file. The node has to have a matching binding, and -its ``status`` property must be ``"okay"`` (instead of, say, ``"disabled"``). -Use :c:func:`DT_HAS_NODE_STATUS_OKAY` to check if a node identifier is valid for use. The -value is 1 if yes, and 0 if no. - -Here are some examples from the :ref:`above devicetree `: - -.. code-block:: c - - DT_HAS_NODE_STATUS_OKAY(DT_PATH(soc, i2c_40002000)) /* 1: node has binding and is enabled */ - DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(sensor_controller)) /* 1: that's an alias for the same node */ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) /* 1: that's also the same node */ - - DT_HAS_NODE_STATUS_OKAY(DT_PATH(i2c_40002000)) /* 0: there's no such node */ - DT_HAS_NODE_STATUS_OKAY(DT_PATH(soc)) /* 0: the /soc node has no binding */ - Property access *************** diff --git a/doc/guides/dts/design.rst b/doc/guides/dts/design.rst index 4e387732b0..3ea659fdea 100644 --- a/doc/guides/dts/design.rst +++ b/doc/guides/dts/design.rst @@ -16,8 +16,8 @@ Zephyr shall obtain its hardware descriptions exclusively from devicetree. Examples ======== -- New device drivers shall use devicetree APIs such as :c:func:`DT_HAS_NODE_STATUS_OKAY` to - determine whether a device is available and enabled. +- New device drivers shall use devicetree APIs to determine which :ref:`devices + to create ` if possible. - In-tree sample applications shall use :ref:`aliases ` to determine which of multiple possible generic devices of a given type will be diff --git a/doc/guides/dts/howtos.rst b/doc/guides/dts/howtos.rst index 1d1d4d4e1b..f0702d6451 100644 --- a/doc/guides/dts/howtos.rst +++ b/doc/guides/dts/howtos.rst @@ -110,7 +110,7 @@ that the node is has ``status = "okay"`` and has a matching binding, like this: #define MY_SERIAL DT_NODELABEL(my_serial) - #if DT_HAS_NODE_STATUS_OKAY(MY_SERIAL) + #if DT_NODE_HAS_STATUS(MY_SERIAL, okay) struct device *uart_dev = device_get_binding(DT_LABEL(MY_SERIAL)); #else #error "Node is disabled, has no matching binding, or initialization failed" @@ -522,11 +522,11 @@ Finally, manually detect each enabled devicetree node and use .. code-block:: c - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(mydevice0)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(mydevice0), okay) CREATE_MY_DEVICE(0) #endif - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(mydevice1)) + #if DT_NODE_HAS_STATUS(DT_NODELABEL(mydevice1), okay) CREATE_MY_DEVICE(1) #endif @@ -644,9 +644,9 @@ And if you're trying to **set** that property in a devicetree overlay: Validate properties =================== -If you're getting a compile error reading a node property, remember -:ref:`not-all-dt-nodes`, then check your node identifier and property. -For example, if you get a build error on a line that looks like this: +If you're getting a compile error reading a node property, check your node +identifier and property. For example, if you get a build error on a line that +looks like this: .. code-block:: c @@ -656,7 +656,7 @@ Try checking the node by adding this to the file and recompiling: .. code-block:: c - #if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(my_serial)) == 0 + #if !DT_NODE_EXISTS(DT_NODELABEL(my_serial)) #error "whoops" #endif @@ -666,15 +666,9 @@ there. Some hints: -- :ref:`dt-use-the-right-names` -- Is the node's ``status`` property set to ``"okay"``? If not, it's disabled. - The generated header will tell you if the node is disabled. -- Does the node have a matching binding? The generated header also tells you - this information for each node; see :ref:`dts-find-binding`. -- Does the property exist? See :ref:`dt-checking-property-exists`. - -If you're sure the property is defined but ``DT_NODE_HAS_PROP()`` disagrees, -check for a missing binding. +- did you :ref:`dt-use-the-right-names`? +- does the :ref:`property exist `? +- does the node have a :ref:`matching binding `? .. _missing-dt-binding: diff --git a/doc/reference/devicetree/index.rst b/doc/reference/devicetree/index.rst index df7eb125df..1181d806fd 100644 --- a/doc/reference/devicetree/index.rst +++ b/doc/reference/devicetree/index.rst @@ -23,7 +23,7 @@ Node identifiers You can use node identifiers for devicetree nodes which are enabled (i.e. have ``status = "okay";`` properties) and have matching compatibles. This can be -tested with :c:func:`DT_HAS_NODE_STATUS_OKAY()`. +tested with :c:func:`DT_NODE_HAS_STATUS`. .. doxygengroup:: devicetree-generic-id :project: Zephyr diff --git a/drivers/adc/adc_shell.c b/drivers/adc/adc_shell.c index 76298de078..b404011cd8 100644 --- a/drivers/adc/adc_shell.c +++ b/drivers/adc/adc_shell.c @@ -57,13 +57,13 @@ struct adc_hdl { * assume a semicolon separator. */ struct adc_hdl adc_list[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) ADC_HDL_LIST_ENTRY(0), #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) ADC_HDL_LIST_ENTRY(1), #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(2)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) ADC_HDL_LIST_ENTRY(2), #endif }; @@ -473,13 +473,13 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_adc_cmds, */ SHELL_STATIC_SUBCMD_SET_CREATE( sub_adc, -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) ADC_SHELL_COMMAND(0), #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) ADC_SHELL_COMMAND(1), #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(2)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) ADC_SHELL_COMMAND(2), #endif SHELL_SUBCMD_SET_END /* Array terminated. */ diff --git a/drivers/can/can_mcp2515.c b/drivers/can/can_mcp2515.c index 9a71e21f04..2cd5074e93 100644 --- a/drivers/can/can_mcp2515.c +++ b/drivers/can/can_mcp2515.c @@ -826,7 +826,7 @@ static int mcp2515_init(struct device *dev) return ret; } -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) static K_THREAD_STACK_DEFINE(mcp2515_int_thread_stack, CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE); @@ -864,4 +864,4 @@ DEVICE_AND_API_INIT(can_mcp2515_1, DT_INST_LABEL(0), &mcp2515_init, &mcp2515_data_1, &mcp2515_config_1, POST_KERNEL, CONFIG_CAN_MCP2515_INIT_PRIORITY, &can_api_funcs); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ diff --git a/drivers/can/can_mcux_flexcan.c b/drivers/can/can_mcux_flexcan.c index ea5555eb02..97d2242373 100644 --- a/drivers/can/can_mcux_flexcan.c +++ b/drivers/can/can_mcux_flexcan.c @@ -656,7 +656,7 @@ static const struct can_driver_api mcux_flexcan_driver_api = { .register_state_change_isr = mcux_flexcan_register_state_change_isr }; -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) static void mcux_flexcan_config_func_0(struct device *dev); static const struct mcux_flexcan_config mcux_flexcan_config_0 = { @@ -756,9 +756,9 @@ NET_DEVICE_INIT(socket_can_flexcan_0, SOCKET_CAN_NAME_1, socket_can_init_0, #endif /* CONFIG_NET_SOCKETS_CAN */ -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) static void mcux_flexcan_config_func_1(struct device *dev); static const struct mcux_flexcan_config mcux_flexcan_config_1 = { @@ -806,4 +806,4 @@ static void mcux_flexcan_config_func_1(struct device *dev) irq_enable(DT_INST_IRQ_BY_NAME(1, mb_0_15, irq)); } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ diff --git a/drivers/can/can_stm32.c b/drivers/can/can_stm32.c index efda958f8d..d865dce8db 100644 --- a/drivers/can/can_stm32.c +++ b/drivers/can/can_stm32.c @@ -388,7 +388,7 @@ static int can_stm32_init(struct device *dev) const struct can_stm32_config *cfg = DEV_CFG(dev); struct can_stm32_data *data = DEV_DATA(dev); CAN_TypeDef *can = cfg->can; -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can2), okay) CAN_TypeDef *master_can = cfg->master_can; #endif struct device *clock; @@ -429,7 +429,7 @@ static int can_stm32_init(struct device *dev) return ret; } -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can2), okay) master_can->FMR &= ~CAN_FMR_CAN2SB; /* Assign all filters to CAN2 */ #endif @@ -1132,7 +1132,7 @@ NET_DEVICE_INIT(socket_can_stm32_1, SOCKET_CAN_NAME_1, socket_can_init_1, #endif /* CONFIG_NET_SOCKETS_CAN */ -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(can1), okay) */ #if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(can2), st_stm32_can, okay) @@ -1215,4 +1215,4 @@ NET_DEVICE_INIT(socket_can_stm32_2, SOCKET_CAN_NAME_2, socket_can_init_2, #endif /* CONFIG_NET_SOCKETS_CAN */ -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(can2)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(can2), okay) */ diff --git a/drivers/clock_control/clock_control_mcux_sim.c b/drivers/clock_control/clock_control_mcux_sim.c index caf6db9714..c9d1e952d7 100644 --- a/drivers/clock_control/clock_control_mcux_sim.c +++ b/drivers/clock_control/clock_control_mcux_sim.c @@ -53,7 +53,7 @@ static int mcux_sim_get_subsys_rate(struct device *dev, return 0; } -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nxp_kinetis_ke1xf_sim)) +#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ke1xf_sim), okay) #define NXP_KINETIS_SIM_LABEL DT_LABEL(DT_INST(0, nxp_kinetis_ke1xf_sim)) #if DT_NODE_HAS_PROP(DT_INST(0, nxp_kinetis_ke1xf_sim), clkout_source) #define NXP_KINETIS_SIM_CLKOUT_SOURCE \ diff --git a/drivers/clock_control/nrf_clock_calibration.c b/drivers/clock_control/nrf_clock_calibration.c index 7d0ce2b3bb..315213b4a9 100644 --- a/drivers/clock_control/nrf_clock_calibration.c +++ b/drivers/clock_control/nrf_clock_calibration.c @@ -214,7 +214,7 @@ static void measure_temperature(struct k_work *work) #define TEMP_NODE DT_INST(0, nordic_nrf_temp) -#if DT_HAS_NODE_STATUS_OKAY(TEMP_NODE) +#if DT_NODE_HAS_STATUS(TEMP_NODE, okay) static inline struct device *temp_device(void) { return device_get_binding(DT_LABEL(TEMP_NODE)); diff --git a/drivers/counter/counter_mcux_lptmr.c b/drivers/counter/counter_mcux_lptmr.c index 933af99086..5a2d093dd5 100644 --- a/drivers/counter/counter_mcux_lptmr.c +++ b/drivers/counter/counter_mcux_lptmr.c @@ -207,7 +207,7 @@ static const struct counter_driver_api mcux_lptmr_driver_api = { BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) <= 1, "unsupported lptmr instance"); -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) static struct mcux_lptmr_data mcux_lptmr_data_0; static void mcux_lptmr_irq_config_0(struct device *dev); @@ -254,4 +254,4 @@ static void mcux_lptmr_irq_config_0(struct device *dev) mcux_lptmr_isr, DEVICE_GET(mcux_lptmr_0), 0); irq_enable(DT_INST_IRQN(0)); } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ diff --git a/drivers/dma/dma_stm32.c b/drivers/dma/dma_stm32.c index c92b6914c2..222e1740d9 100644 --- a/drivers/dma/dma_stm32.c +++ b/drivers/dma/dma_stm32.c @@ -666,7 +666,7 @@ do { \ data->max_streams++; \ } while (0) -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) DMA_INIT(0); static void dma_stm32_config_irq_0(struct device *dev) @@ -689,10 +689,10 @@ static void dma_stm32_config_irq_0(struct device *dev) #endif /* DT_INST_IRQ_HAS_IDX(0, 7) */ /* Either 5 or 6 or 7 or 8 channels for DMA across all stm32 series. */ } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) DMA_INIT(1); static void dma_stm32_config_irq_1(struct device *dev) @@ -715,4 +715,4 @@ static void dma_stm32_config_irq_1(struct device *dev) #endif /* DT_INST_IRQ_HAS_IDX(1, 7) */ /* Either 5 or 6 or 7 or 8 channels for DMA across all stm32 series. */ } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c index 61042774db..a2d6bd1ec3 100644 --- a/drivers/ethernet/eth_mcux.c +++ b/drivers/ethernet/eth_mcux.c @@ -888,7 +888,8 @@ static void generate_random_mac(u8_t *mac_addr) #endif #if !DT_INST_NODE_HAS_PROP(0, local_mac_address) || \ - DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) && !DT_INST_NODE_HAS_PROP(1, local_mac_address) + DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) && \ + !DT_INST_NODE_HAS_PROP(1, local_mac_address) static void generate_eth0_unique_mac(u8_t *mac_addr) { /* Trivially "hash" up to 128 bits of MCU unique identifier */ @@ -907,7 +908,7 @@ static void generate_eth0_unique_mac(u8_t *mac_addr) } #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) && !DT_INST_NODE_HAS_PROP(1, local_mac_address) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) && !DT_INST_NODE_HAS_PROP(1, local_mac_address) static void generate_eth1_unique_mac(u8_t *mac_addr) { generate_eth0_unique_mac(mac_addr); diff --git a/drivers/ethernet/eth_stm32_hal.c b/drivers/ethernet/eth_stm32_hal.c index 1c127e7f34..495a0034dc 100644 --- a/drivers/ethernet/eth_stm32_hal.c +++ b/drivers/ethernet/eth_stm32_hal.c @@ -28,12 +28,12 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include "eth_stm32_hal_priv.h" #if defined(CONFIG_ETH_STM32_HAL_USE_DTCM_FOR_DMA_BUFFER) && \ - !DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) + !DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) #error DTCM for DMA buffer is activated but zephyr,dtcm is not present in dts #endif #if defined(CONFIG_ETH_STM32_HAL_USE_DTCM_FOR_DMA_BUFFER) && \ - DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) + DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) static ETH_DMADescTypeDef dma_rx_desc_tab[ETH_RXBUFNB] __dtcm_noinit_section; static ETH_DMADescTypeDef dma_tx_desc_tab[ETH_TXBUFNB] __dtcm_noinit_section; static u8_t dma_rx_buffer[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __dtcm_noinit_section; diff --git a/drivers/flash/soc_flash_mcux.c b/drivers/flash/soc_flash_mcux.c index c16da53187..031ce10d6f 100644 --- a/drivers/flash/soc_flash_mcux.c +++ b/drivers/flash/soc_flash_mcux.c @@ -20,13 +20,13 @@ #include "fsl_flash.h" #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfa)) +#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfa), okay) #define DT_DRV_COMPAT nxp_kinetis_ftfa -#elif DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfe)) +#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfe), okay) #define DT_DRV_COMPAT nxp_kinetis_ftfe -#elif DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfl)) +#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfl), okay) #define DT_DRV_COMPAT nxp_kinetis_ftfl -#elif DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nxp_lpc_iap)) +#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_lpc_iap), okay) #define DT_DRV_COMPAT nxp_lpc_iap #else #error No matching compatible for soc_flash_mcux.c diff --git a/drivers/flash/soc_flash_nrf.c b/drivers/flash/soc_flash_nrf.c index 3ab3024a58..fb877d4a6d 100644 --- a/drivers/flash/soc_flash_nrf.c +++ b/drivers/flash/soc_flash_nrf.c @@ -16,13 +16,13 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nordic_nrf51_flash_controller)) +#if DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf51_flash_controller), okay) #define DT_DRV_COMPAT nordic_nrf51_flash_controller -#elif DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nordic_nrf52_flash_controller)) +#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52_flash_controller), okay) #define DT_DRV_COMPAT nordic_nrf52_flash_controller -#elif DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nordic_nrf53_flash_controller)) +#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf53_flash_controller), okay) #define DT_DRV_COMPAT nordic_nrf53_flash_controller -#elif DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nordic_nrf91_flash_controller)) +#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf91_flash_controller), okay) #define DT_DRV_COMPAT nordic_nrf91_flash_controller #else #error No matching compatible for soc_flash_nrf.c diff --git a/drivers/gpio/gpio_mchp_xec.c b/drivers/gpio/gpio_mchp_xec.c index 0d1d4f7a66..9948c93b5e 100644 --- a/drivers/gpio/gpio_mchp_xec.c +++ b/drivers/gpio/gpio_mchp_xec.c @@ -334,7 +334,7 @@ static const struct gpio_driver_api gpio_xec_driver_api = { .disable_callback = gpio_xec_disable_callback, }; -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_000_036), okay) static int gpio_xec_port000_036_init(struct device *dev); static const struct gpio_xec_config gpio_xec_port000_036_config = { @@ -377,9 +377,9 @@ static int gpio_xec_port000_036_init(struct device *dev) #endif return 0; } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_000_036)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_000_036), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_040_076)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_040_076), okay) static int gpio_xec_port040_076_init(struct device *dev); static const struct gpio_xec_config gpio_xec_port040_076_config = { @@ -422,9 +422,9 @@ static int gpio_xec_port040_076_init(struct device *dev) #endif return 0; } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_040_076)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_040_076), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_100_136), okay) static int gpio_xec_port100_136_init(struct device *dev); static const struct gpio_xec_config gpio_xec_port100_136_config = { @@ -467,9 +467,9 @@ static int gpio_xec_port100_136_init(struct device *dev) #endif return 0; } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_100_136)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_100_136), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_140_176), okay) static int gpio_xec_port140_176_init(struct device *dev); static const struct gpio_xec_config gpio_xec_port140_176_config = { @@ -512,9 +512,9 @@ static int gpio_xec_port140_176_init(struct device *dev) #endif return 0; } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_140_176)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_140_176), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_200_236)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_200_236), okay) static int gpio_xec_port200_236_init(struct device *dev); static const struct gpio_xec_config gpio_xec_port200_236_config = { @@ -557,9 +557,9 @@ static int gpio_xec_port200_236_init(struct device *dev) #endif return 0; } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_200_236)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_200_236), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_240_276)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_240_276), okay) static int gpio_xec_port240_276_init(struct device *dev); static const struct gpio_xec_config gpio_xec_port240_276_config = { @@ -602,4 +602,4 @@ static int gpio_xec_port240_276_init(struct device *dev) #endif return 0; } -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio_240_276)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_240_276), okay) */ diff --git a/drivers/gpio/gpio_sam0.c b/drivers/gpio/gpio_sam0.c index a13a330757..00743cfc91 100644 --- a/drivers/gpio/gpio_sam0.c +++ b/drivers/gpio/gpio_sam0.c @@ -302,7 +302,7 @@ static const struct gpio_driver_api gpio_sam0_api = { static int gpio_sam0_init(struct device *dev) { return 0; } /* Port A */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(porta)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(porta), okay) static const struct gpio_sam0_config gpio_sam0_config_0 = { .common = { @@ -323,7 +323,7 @@ DEVICE_AND_API_INIT(gpio_sam0_0, DT_LABEL(DT_NODELABEL(porta)), #endif /* Port B */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(portb)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(portb), okay) static const struct gpio_sam0_config gpio_sam0_config_1 = { .common = { @@ -344,7 +344,7 @@ DEVICE_AND_API_INIT(gpio_sam0_1, DT_LABEL(DT_NODELABEL(portb)), #endif /* Port C */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(portc)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(portc), okay) static const struct gpio_sam0_config gpio_sam0_config_2 = { .common = { @@ -365,7 +365,7 @@ DEVICE_AND_API_INIT(gpio_sam0_2, DT_LABEL(DT_NODELABEL(portc)), #endif /* Port D */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(portd)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(portd), okay) static const struct gpio_sam0_config gpio_sam0_config_3 = { .common = { diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c index 54a6d4b945..28fff40c7c 100644 --- a/drivers/gpio/gpio_stm32.c +++ b/drivers/gpio/gpio_stm32.c @@ -598,49 +598,49 @@ static int gpio_stm32_init(struct device *device) DT_CLOCKS_CELL(DT_NODELABEL(gpio##__suffix), bits),\ DT_CLOCKS_CELL(DT_NODELABEL(gpio##__suffix), bus)) -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioa)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpioa), okay) GPIO_DEVICE_INIT_STM32(a, A); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioa)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpioa), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiob)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpiob), okay) GPIO_DEVICE_INIT_STM32(b, B); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiob)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpiob), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioc)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpioc), okay) GPIO_DEVICE_INIT_STM32(c, C); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioc)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpioc), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiod)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpiod), okay) GPIO_DEVICE_INIT_STM32(d, D); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiod)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpiod), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioe)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpioe), okay) GPIO_DEVICE_INIT_STM32(e, E); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioe)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpioe), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiof)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpiof), okay) GPIO_DEVICE_INIT_STM32(f, F); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiof)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpiof), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiog)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpiog), okay) GPIO_DEVICE_INIT_STM32(g, G); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiog)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpiog), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioh)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpioh), okay) GPIO_DEVICE_INIT_STM32(h, H); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioh)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpioh), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioi)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpioi), okay) GPIO_DEVICE_INIT_STM32(i, I); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioi)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpioi), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioj)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpioj), okay) GPIO_DEVICE_INIT_STM32(j, J); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpioj)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpioj), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiok)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpiok), okay) GPIO_DEVICE_INIT_STM32(k, K); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpiok)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpiok), okay) */ #if defined(CONFIG_SOC_SERIES_STM32F1X) diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index 1bc410d091..292848f1ae 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -654,34 +654,34 @@ static int i2c_dw_initialize(struct device *dev) return 0; } -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) #include #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) #include #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(2)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) #include #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(3)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) #include #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(4)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) #include #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(5)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(5), okay) #include #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(6)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(6), okay) #include #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(7)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(7), okay) #include #endif diff --git a/drivers/i2c/i2c_esp32.c b/drivers/i2c/i2c_esp32.c index 3aeea8c6ba..a077d5d1d5 100644 --- a/drivers/i2c/i2c_esp32.c +++ b/drivers/i2c/i2c_esp32.c @@ -566,7 +566,7 @@ static const struct i2c_driver_api i2c_esp32_driver_api = { .transfer = i2c_esp32_transfer, }; -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) DEVICE_DECLARE(i2c_esp32_0); static void i2c_esp32_connect_irq_0(void) @@ -612,9 +612,9 @@ DEVICE_AND_API_INIT(i2c_esp32_0, DT_INST_LABEL(0), &i2c_esp32_init, &i2c_esp32_data_0, &i2c_esp32_config_0, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &i2c_esp32_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) DEVICE_DECLARE(i2c_esp32_1); static void i2c_esp32_connect_irq_1(void) @@ -660,7 +660,7 @@ DEVICE_AND_API_INIT(i2c_esp32_1, DT_INST_LABEL(1), &i2c_esp32_init, &i2c_esp32_data_1, &i2c_esp32_config_1, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &i2c_esp32_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ static int i2c_esp32_init(struct device *dev) { diff --git a/drivers/i2c/i2c_gecko.c b/drivers/i2c/i2c_gecko.c index e98134ab99..4ee8ddcc79 100644 --- a/drivers/i2c/i2c_gecko.c +++ b/drivers/i2c/i2c_gecko.c @@ -188,7 +188,7 @@ static const struct i2c_driver_api i2c_gecko_driver_api = { .transfer = i2c_gecko_transfer, }; -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) #define PIN_I2C_0_SDA {DT_INST_PROP_BY_IDX(0, location_sda, 1), \ DT_INST_PROP_BY_IDX(0, location_sda, 2), gpioModeWiredAnd, 1} @@ -220,9 +220,9 @@ DEVICE_AND_API_INIT(i2c_gecko_0, DT_INST_LABEL(0), &i2c_gecko_init, &i2c_gecko_data_0, &i2c_gecko_config_0, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &i2c_gecko_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) #define PIN_I2C_1_SDA {DT_INST_PROP_BY_IDX(1, location_sda, 1), \ DT_INST_PROP_BY_IDX(1, location_sda, 2), gpioModeWiredAnd, 1} @@ -254,4 +254,4 @@ DEVICE_AND_API_INIT(i2c_gecko_1, DT_INST_LABEL(1), &i2c_gecko_init, &i2c_gecko_data_1, &i2c_gecko_config_1, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &i2c_gecko_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ diff --git a/drivers/i2c/i2c_ll_stm32.c b/drivers/i2c/i2c_ll_stm32.c index 6918054b6e..432ac6db03 100644 --- a/drivers/i2c/i2c_ll_stm32.c +++ b/drivers/i2c/i2c_ll_stm32.c @@ -208,20 +208,20 @@ static int i2c_stm32_init(struct device *dev) */ switch ((u32_t)cfg->i2c) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) case DT_REG_ADDR(DT_NODELABEL(i2c1)): LL_RCC_SetI2CClockSource(LL_RCC_I2C1_CLKSOURCE_SYSCLK); break; #endif -#if defined(CONFIG_SOC_SERIES_STM32F3X) && \ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if defined(CONFIG_SOC_SERIES_STM32F3X) && \ + DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) case DT_REG_ADDR(DT_NODELABEL(i2c2)): LL_RCC_SetI2CClockSource(LL_RCC_I2C2_CLKSOURCE_SYSCLK); break; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) case DT_REG_ADDR(DT_NODELABEL(i2c3)): LL_RCC_SetI2CClockSource(LL_RCC_I2C3_CLKSOURCE_SYSCLK); break; @@ -314,22 +314,22 @@ STM32_I2C_IRQ_HANDLER(name) /* I2C instances declaration */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) STM32_I2C_INIT(i2c1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) STM32_I2C_INIT(i2c2); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) STM32_I2C_INIT(i2c3); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) STM32_I2C_INIT(i2c4); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c5), okay) STM32_I2C_INIT(i2c5); #endif diff --git a/drivers/i2s/i2s_ll_stm32.c b/drivers/i2s/i2s_ll_stm32.c index f49678717c..83ba81c266 100644 --- a/drivers/i2s/i2s_ll_stm32.c +++ b/drivers/i2s/i2s_ll_stm32.c @@ -919,22 +919,22 @@ static void i2s_stm32_irq_config_func_##index(struct device *dev) \ irq_enable(DT_IRQN(DT_NODELABEL(i2s##index))); \ } -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s1), okay) I2S_INIT(1, 2) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s2), okay) I2S_INIT(2, 1) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s3), okay) I2S_INIT(3, 1) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s4), okay) I2S_INIT(4, 2) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2s5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s5), okay) I2S_INIT(5, 2) #endif diff --git a/drivers/led_strip/lpd880x.c b/drivers/led_strip/lpd880x.c index 53626fdb70..dfe5d30c4d 100644 --- a/drivers/led_strip/lpd880x.c +++ b/drivers/led_strip/lpd880x.c @@ -9,7 +9,7 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, colorway_lpd8806)) +#if DT_NODE_HAS_STATUS(DT_INST(0, colorway_lpd8806), okay) #define DT_DRV_COMPAT colorway_lpd8806 #else #define DT_DRV_COMPAT colorway_lpd8803 diff --git a/drivers/lora/shell.c b/drivers/lora/shell.c index acff4c740f..3c81712928 100644 --- a/drivers/lora/shell.c +++ b/drivers/lora/shell.c @@ -13,7 +13,7 @@ LOG_MODULE_REGISTER(lora_shell, CONFIG_LORA_LOG_LEVEL); #define DEFAULT_RADIO_NODE DT_ALIAS(lora0) -BUILD_ASSERT(DT_HAS_NODE_STATUS_OKAY(DEFAULT_RADIO_NODE), +BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay), "No default LoRa radio specified in DT"); #define DEFAULT_RADIO DT_LABEL(DEFAULT_RADIO_NODE) diff --git a/drivers/pinmux/pinmux_mchp_xec.c b/drivers/pinmux/pinmux_mchp_xec.c index 94085e6e21..7b9fe7e690 100644 --- a/drivers/pinmux/pinmux_mchp_xec.c +++ b/drivers/pinmux/pinmux_mchp_xec.c @@ -119,7 +119,7 @@ static const struct pinmux_driver_api pinmux_xec_driver_api = { #define PINMUX_ADDR(n) DT_REG_ADDR(DT_PHANDLE(DT_NODELABEL(n), ph_reg)) -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) static const struct pinmux_xec_config pinmux_xec_port000_036_config = { .pcr1_base = (u32_t *) PINMUX_ADDR(pinmux_000_036), .port_num = MCHP_GPIO_000_036, @@ -131,9 +131,9 @@ DEVICE_AND_API_INIT(pinmux_xec_port000_036, NULL, &pinmux_xec_port000_036_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &pinmux_xec_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_000_036)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_040_076)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay) static const struct pinmux_xec_config pinmux_xec_port040_076_config = { .pcr1_base = (u32_t *) PINMUX_ADDR(pinmux_040_076), .port_num = MCHP_GPIO_040_076, @@ -145,9 +145,9 @@ DEVICE_AND_API_INIT(pinmux_xec_port040_076, NULL, &pinmux_xec_port040_076_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &pinmux_xec_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_040_076)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) static const struct pinmux_xec_config pinmux_xec_port100_136_config = { .pcr1_base = (u32_t *) PINMUX_ADDR(pinmux_100_136), .port_num = MCHP_GPIO_100_136, @@ -159,9 +159,9 @@ DEVICE_AND_API_INIT(pinmux_xec_port100_136, NULL, &pinmux_xec_port100_136_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &pinmux_xec_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_100_136)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) static const struct pinmux_xec_config pinmux_xec_port140_176_config = { .pcr1_base = (u32_t *) PINMUX_ADDR(pinmux_140_176), .port_num = MCHP_GPIO_140_176, @@ -173,9 +173,9 @@ DEVICE_AND_API_INIT(pinmux_xec_port140_176, NULL, &pinmux_xec_port140_176_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &pinmux_xec_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_140_176)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_200_236)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay) static const struct pinmux_xec_config pinmux_xec_port200_236_config = { .pcr1_base = (u32_t *) PINMUX_ADDR(pinmux_200_236), .port_num = MCHP_GPIO_200_236, @@ -187,9 +187,9 @@ DEVICE_AND_API_INIT(pinmux_xec_port200_236, NULL, &pinmux_xec_port200_236_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &pinmux_xec_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_200_236)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_240_276)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay) static const struct pinmux_xec_config pinmux_xec_port240_276_config = { .pcr1_base = (u32_t *) PINMUX_ADDR(pinmux_240_276), .port_num = MCHP_GPIO_240_276, @@ -201,4 +201,4 @@ DEVICE_AND_API_INIT(pinmux_xec_port240_276, NULL, &pinmux_xec_port240_276_config, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &pinmux_xec_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_240_276)) */ +#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay) */ diff --git a/drivers/pinmux/pinmux_sam0.c b/drivers/pinmux/pinmux_sam0.c index 914b452fba..86a959eb32 100644 --- a/drivers/pinmux/pinmux_sam0.c +++ b/drivers/pinmux/pinmux_sam0.c @@ -69,7 +69,7 @@ const struct pinmux_driver_api pinmux_sam0_api = { .input = pinmux_sam0_input, }; -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_a)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_a), okay) static const struct pinmux_sam0_config pinmux_sam0_config_0 = { .regs = (PortGroup *)DT_REG_ADDR(DT_NODELABEL(pinmux_a)), }; @@ -80,7 +80,7 @@ DEVICE_AND_API_INIT(pinmux_sam0_0, DT_LABEL(DT_NODELABEL(pinmux_a)), &pinmux_sam0_api); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_b)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_b), okay) static const struct pinmux_sam0_config pinmux_sam0_config_1 = { .regs = (PortGroup *)DT_REG_ADDR(DT_NODELABEL(pinmux_b)), }; @@ -91,7 +91,7 @@ DEVICE_AND_API_INIT(pinmux_sam0_1, DT_LABEL(DT_NODELABEL(pinmux_b)), &pinmux_sam0_api); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_c)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_c), okay) static const struct pinmux_sam0_config pinmux_sam0_config_2 = { .regs = (PortGroup *)DT_REG_ADDR(DT_NODELABEL(pinmux_c)), }; @@ -102,7 +102,7 @@ DEVICE_AND_API_INIT(pinmux_sam0_2, DT_LABEL(DT_NODELABEL(pinmux_c)), &pinmux_sam0_api); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pinmux_d)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_d), okay) static const struct pinmux_sam0_config pinmux_sam0_config_3 = { .regs = (PortGroup *)DT_REG_ADDR(DT_NODELABEL(pinmux_d)), }; diff --git a/drivers/pwm/pwm_nrfx.c b/drivers/pwm/pwm_nrfx.c index 7dc7b2852a..dc402b8de8 100644 --- a/drivers/pwm/pwm_nrfx.c +++ b/drivers/pwm/pwm_nrfx.c @@ -422,18 +422,18 @@ static int pwm_nrfx_pm_control(struct device *dev, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ &pwm_nrfx_drv_api_funcs) -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm0), okay) PWM_NRFX_DEVICE(0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) PWM_NRFX_DEVICE(1); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) PWM_NRFX_DEVICE(2); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) PWM_NRFX_DEVICE(3); #endif diff --git a/drivers/sensor/ak8975/ak8975.c b/drivers/sensor/ak8975/ak8975.c index 1c6379c482..59341c9284 100644 --- a/drivers/sensor/ak8975/ak8975.c +++ b/drivers/sensor/ak8975/ak8975.c @@ -129,7 +129,7 @@ int ak8975_init(struct device *dev) return -EINVAL; } -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, invensense_mpu9150)) +#if DT_NODE_HAS_STATUS(DT_INST(0, invensense_mpu9150), okay) /* wake up MPU9150 chip */ if (i2c_reg_update_byte(drv_data->i2c, MPU9150_I2C_ADDR, MPU9150_REG_PWR_MGMT1, MPU9150_SLEEP_EN, diff --git a/drivers/sensor/lis2dh/lis2dh.c b/drivers/sensor/lis2dh/lis2dh.c index aaaa445f7b..2215c7461b 100644 --- a/drivers/sensor/lis2dh/lis2dh.c +++ b/drivers/sensor/lis2dh/lis2dh.c @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(lis2dh, CONFIG_SENSOR_LOG_LEVEL); * multiplied by 100. */ static const u32_t lis2dh_reg_val_to_scale[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, st_lsm303agr_accel)) +#if DT_NODE_HAS_STATUS(DT_INST(0, st_lsm303agr_accel), okay) ACCEL_SCALE(1563), ACCEL_SCALE(3126), ACCEL_SCALE(6252), diff --git a/drivers/serial/leuart_gecko.c b/drivers/serial/leuart_gecko.c index 093be7c79b..931e73c135 100644 --- a/drivers/serial/leuart_gecko.c +++ b/drivers/serial/leuart_gecko.c @@ -317,7 +317,7 @@ static const struct uart_driver_api leuart_gecko_driver_api = { #endif }; -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) #define PIN_LEUART_0_RXD {DT_INST_PROP_BY_IDX(0, location_rx, 1), \ DT_INST_PROP_BY_IDX(0, location_rx, 2), gpioModeInput, 1} @@ -368,9 +368,9 @@ static void leuart_gecko_config_func_0(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) #define PIN_LEUART_1_RXD {DT_INST_PROP_BY_IDX(1, location_rx, 1), \ DT_INST_PROP_BY_IDX(1, location_rx, 2), gpioModeInput, 1} @@ -421,4 +421,4 @@ static void leuart_gecko_config_func_1(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ diff --git a/drivers/serial/uart_cmsdk_apb.c b/drivers/serial/uart_cmsdk_apb.c index 77cb77c1b0..dc297ffa7c 100644 --- a/drivers/serial/uart_cmsdk_apb.c +++ b/drivers/serial/uart_cmsdk_apb.c @@ -458,7 +458,7 @@ static const struct uart_driver_api uart_cmsdk_apb_driver_api = { #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ }; -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_0(struct device *dev); @@ -521,9 +521,9 @@ static void uart_cmsdk_apb_irq_config_func_0(struct device *dev) #endif #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_1(struct device *dev); @@ -586,9 +586,9 @@ static void uart_cmsdk_apb_irq_config_func_1(struct device *dev) #endif #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(2)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_2(struct device *dev); @@ -651,9 +651,9 @@ static void uart_cmsdk_apb_irq_config_func_2(struct device *dev) #endif #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(2)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(3)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_3(struct device *dev); @@ -716,9 +716,9 @@ static void uart_cmsdk_apb_irq_config_func_3(struct device *dev) #endif #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(3)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(4)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_4(struct device *dev); @@ -781,4 +781,4 @@ static void uart_cmsdk_apb_irq_config_func_4(struct device *dev) #endif #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(4)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) */ diff --git a/drivers/serial/uart_gecko.c b/drivers/serial/uart_gecko.c index 180bbc5b39..1dd8e8949b 100644 --- a/drivers/serial/uart_gecko.c +++ b/drivers/serial/uart_gecko.c @@ -303,7 +303,7 @@ static const struct uart_driver_api uart_gecko_driver_api = { #define DT_DRV_COMPAT silabs_gecko_uart -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) #define PIN_UART0_RXD {DT_INST_PROP_BY_IDX(0, location_rx, 1), \ DT_INST_PROP_BY_IDX(0, location_rx, 2), gpioModeInput, 1} @@ -356,9 +356,9 @@ static void uart_gecko_config_func_0(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) #define PIN_UART1_RXD {DT_INST_PROP_BY_IDX(1, location_rx, 1), \ DT_INST_PROP_BY_IDX(1, location_rx, 2), gpioModeInput, 1} @@ -411,12 +411,12 @@ static void uart_gecko_config_func_1(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ #undef DT_DRV_COMPAT #define DT_DRV_COMPAT silabs_gecko_usart -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) #define PIN_USART0_RXD {DT_INST_PROP_BY_IDX(0, location_rx, 1), \ DT_INST_PROP_BY_IDX(0, location_rx, 2), gpioModeInput, 1} @@ -470,9 +470,9 @@ static void usart_gecko_config_func_0(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) #define PIN_USART1_RXD {DT_INST_PROP_BY_IDX(1, location_rx, 1), \ DT_INST_PROP_BY_IDX(1, location_rx, 2), gpioModeInput, 1} @@ -526,9 +526,9 @@ static void usart_gecko_config_func_1(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(1)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(2)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) #define PIN_USART2_RXD {DT_INST_PROP_BY_IDX(2, location_rx, 1), \ DT_INST_PROP_BY_IDX(2, location_rx, 2), gpioModeInput, 1} @@ -582,9 +582,9 @@ static void usart_gecko_config_func_2(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(2)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(3)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) #define PIN_USART3_RXD {DT_INST_PROP_BY_IDX(3, location_rx, 1), \ DT_INST_PROP_BY_IDX(3, location_rx, 2), gpioModeInput, 1} @@ -638,9 +638,9 @@ static void usart_gecko_config_func_3(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(3)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(4)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) #define PIN_USART4_RXD {DT_INST_PROP_BY_IDX(4, location_rx, 1), \ DT_INST_PROP_BY_IDX(4, location_rx, 2), gpioModeInput, 1} @@ -694,9 +694,9 @@ static void usart_gecko_config_func_4(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(4)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(5)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(5), okay) #define PIN_USART5_RXD {DT_INST_PROP_BY_IDX(5, location_rx, 1), \ DT_INST_PROP_BY_IDX(5, location_rx, 2), gpioModeInput, 1} @@ -750,4 +750,4 @@ static void usart_gecko_config_func_5(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(5)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(5), okay) */ diff --git a/drivers/serial/uart_miv.c b/drivers/serial/uart_miv.c index 1a1267fb34..75bf125271 100644 --- a/drivers/serial/uart_miv.c +++ b/drivers/serial/uart_miv.c @@ -385,7 +385,7 @@ static const struct uart_driver_api uart_miv_driver_api = { BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) <= 1, "unsupported uart_miv instance"); -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) static struct uart_miv_data uart_miv_data_0; @@ -418,4 +418,4 @@ static void uart_miv_irq_cfg_func_0(struct device *dev) } #endif -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) */ +#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ diff --git a/drivers/serial/uart_ns16550_port_x.h b/drivers/serial/uart_ns16550_port_x.h index b02fda7b14..ee679393fe 100644 --- a/drivers/serial/uart_ns16550_port_x.h +++ b/drivers/serial/uart_ns16550_port_x.h @@ -7,7 +7,7 @@ * This file is a template for cmake and is not meant to be used directly! */ -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(@NUM@)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(@NUM@), okay) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void irq_config_func_@NUM@(struct device *port); diff --git a/drivers/spi/spi_xec_qmspi.c b/drivers/spi/spi_xec_qmspi.c index 767df6bc94..a0f2213736 100644 --- a/drivers/spi/spi_xec_qmspi.c +++ b/drivers/spi/spi_xec_qmspi.c @@ -656,7 +656,7 @@ static const struct spi_driver_api spi_qmspi_driver_api = { DT_INST_PROP(0, dldh), \ DT_INST_PROP(0, dcsda)) -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) static const struct spi_qmspi_config spi_qmspi_0_config = { .regs = (QMSPI_Type *)DT_INST_REG_ADDR(0), @@ -680,4 +680,4 @@ DEVICE_AND_API_INIT(spi_xec_qmspi_0, &spi_qmspi_0_config, POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, &spi_qmspi_driver_api); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) */ +#endif /* DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) */ diff --git a/drivers/watchdog/wdt_esp32.c b/drivers/watchdog/wdt_esp32.c index 22f5f35831..fc67b8f99a 100644 --- a/drivers/watchdog/wdt_esp32.c +++ b/drivers/watchdog/wdt_esp32.c @@ -270,10 +270,10 @@ static void wdt_esp32_isr(struct device *dev) } -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(wdt0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt0), okay) ESP32_WDT_INIT(0); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(wdt1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt1), okay) ESP32_WDT_INIT(1); #endif diff --git a/include/arch/arm/aarch32/cortex_m/scripts/linker.ld b/include/arch/arm/aarch32/cortex_m/scripts/linker.ld index b4c65cc988..020d77f0f1 100644 --- a/include/arch/arm/aarch32/cortex_m/scripts/linker.ld +++ b/include/arch/arm/aarch32/cortex_m/scripts/linker.ld @@ -95,10 +95,10 @@ MEMORY #ifdef CONFIG_HAS_TI_CCFG FLASH_CCFG (rwx): ORIGIN = CCFG_ADDR, LENGTH = CCFG_SIZE #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay) CCM (rw) : ORIGIN = DT_REG_ADDR(DT_CHOSEN(zephyr_ccm)), LENGTH = DT_REG_SIZE(DT_CHOSEN(zephyr_ccm)) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) DTCM (rw) : ORIGIN = DT_REG_ADDR(DT_CHOSEN(zephyr_dtcm)), LENGTH = DT_REG_SIZE(DT_CHOSEN(zephyr_dtcm)) #endif SRAM (wx) : ORIGIN = RAM_ADDR, LENGTH = RAM_SIZE @@ -436,7 +436,7 @@ SECTIONS GROUP_END(RAMABLE_REGION) -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) GROUP_START(DTCM) SECTION_PROLOGUE(_DTCM_BSS_SECTION_NAME, (NOLOAD),SUBALIGN(4)) diff --git a/include/devicetree.h b/include/devicetree.h index 23ed25b327..3684937958 100644 --- a/include/devicetree.h +++ b/include/devicetree.h @@ -930,34 +930,18 @@ * 0 otherwise. */ #define DT_NODE_HAS_STATUS(node_id, status) \ - DT_HAS_NODE_STATUS_INTERNAL(node_id, status) + DT_NODE_HAS_STATUS_INTERNAL(node_id, status) /** - * @brief Does a node identifier refer to a usable node? + * @brief Does the devicetree have an "okay" node with a compatible? * - * Example uses: + * Test for whether the devicetree has any nodes with status "okay" + * and the given compatible. That is, this returns 1 if and only if + * there is at least one "node_id" for which both of these + * expressions return 1: * - * DT_HAS_NODE_STATUS_OKAY(DT_PATH(soc, i2c@12340000)) - * DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(an_alias_name)) - * - * Tests whether a node identifier refers to a node which: - * - * - exists in the devicetree, and - * - is enabled (has status property "okay"), and - * - has a matching binding - * - * @param node_id a node identifier - * @return 1 if the node identifier refers to a usable node, - * 0 otherwise. - */ -#define DT_HAS_NODE_STATUS_OKAY(node_id) DT_NODE_HAS_STATUS(node_id, okay) - -/** - * @brief Does the devicetree have any usable nodes with a compatible? - * - * Test for whether the devicetree has any usable nodes (as determined by - * @ref DT_HAS_NODE_STATUS_OKAY()) with a given compatible, i.e. if there is at - * least one "x" for which "DT_HAS_NODE_STATUS_OKAY(DT_INST(x, compat))" is 1. + * DT_NODE_HAS_STATUS(node_id, okay) + * DT_NODE_HAS_COMPAT(node_id, compat) * * @param compat lowercase-and-underscores version of a compatible * @return 0 if no nodes of the compatible are available for use, @@ -1576,8 +1560,8 @@ #define DT_DASH(...) MACRO_MAP_CAT(DT_DASH_PREFIX, __VA_ARGS__) /** @internal helper for DT_DASH(): prepends _ to a name */ #define DT_DASH_PREFIX(name) _##name -/** @internal helper for DT_HAS_NODE_STATUS */ -#define DT_HAS_NODE_STATUS_INTERNAL(node_id, status) \ +/** @internal helper for DT_NODE_HAS_STATUS */ +#define DT_NODE_HAS_STATUS_INTERNAL(node_id, status) \ IS_ENABLED(DT_CAT(node_id, _STATUS_ ## status)) /** @internal helper for test cases and DT_ANY_INST_ON_BUS_STATUS_OKAY() */ #define DT_COMPAT_ON_BUS_INTERNAL(compat, bus) \ diff --git a/include/linker/linker-defs.h b/include/linker/linker-defs.h index cf32ef7d5e..77f9420ee3 100644 --- a/include/linker/linker-defs.h +++ b/include/linker/linker-defs.h @@ -24,13 +24,13 @@ #include #include -/* We need to dummy out DT_HAS_NODE_STATUS_OKAY when building the unittests - * since including devicetree.h would require generating dummy header files - * to match what the generate creates, so its easier to just dummy out - * DT_HAS_NODE_STATUS_OKAY. +/* We need to dummy out DT_NODE_HAS_STATUS when building the unittests. + * Including devicetree.h would require generating dummy header files + * to match what gen_defines creates, so it's easier to just dummy out + * DT_NODE_HAS_STATUS. */ #ifdef ZTEST_UNITTEST -#define DT_HAS_NODE_STATUS_OKAY(x) 0 +#define DT_NODE_HAS_STATUS(node, status) 0 #else #include #endif @@ -232,7 +232,7 @@ extern char __gcov_bss_size[]; /* end address of image, used by newlib for the heap */ extern char _end[]; -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay) extern char __ccm_data_rom_start[]; extern char __ccm_start[]; extern char __ccm_data_start[]; @@ -244,7 +244,7 @@ extern char __ccm_noinit_end[]; extern char __ccm_end[]; #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) extern char __dtcm_data_start[]; extern char __dtcm_data_end[]; extern char __dtcm_bss_start[]; diff --git a/kernel/init.c b/kernel/init.c index 6cbafcd834..1db33ea326 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -105,11 +105,11 @@ extern void idle(void *unused1, void *unused2, void *unused3); void z_bss_zero(void) { (void)memset(__bss_start, 0, __bss_end - __bss_start); -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay) (void)memset(&__ccm_bss_start, 0, ((u32_t) &__ccm_bss_end - (u32_t) &__ccm_bss_start)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) (void)memset(&__dtcm_bss_start, 0, ((u32_t) &__dtcm_bss_end - (u32_t) &__dtcm_bss_start)); #endif @@ -146,11 +146,11 @@ void z_data_copy(void) (void)memcpy(&_ramfunc_ram_start, &_ramfunc_rom_start, (uintptr_t) &_ramfunc_ram_size); #endif /* CONFIG_ARCH_HAS_RAMFUNC_SUPPORT */ -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay) (void)memcpy(&__ccm_data_start, &__ccm_data_rom_start, __ccm_data_end - __ccm_data_start); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) (void)memcpy(&__dtcm_data_start, &__dtcm_data_rom_start, __dtcm_data_end - __dtcm_data_start); #endif diff --git a/samples/basic/blinky/src/main.c b/samples/basic/blinky/src/main.c index 45f40a8307..5e21be3436 100644 --- a/samples/basic/blinky/src/main.c +++ b/samples/basic/blinky/src/main.c @@ -15,7 +15,7 @@ /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) -#if DT_HAS_NODE_STATUS_OKAY(LED0_NODE) +#if DT_NODE_HAS_STATUS(LED0_NODE, okay) #define LED0 DT_GPIO_LABEL(LED0_NODE, gpios) #define PIN DT_GPIO_PIN(LED0_NODE, gpios) #if DT_PHA_HAS_CELL(LED0_NODE, gpios, flags) diff --git a/samples/basic/servo_motor/src/main.c b/samples/basic/servo_motor/src/main.c index b477dd8b5d..ae7d758604 100644 --- a/samples/basic/servo_motor/src/main.c +++ b/samples/basic/servo_motor/src/main.c @@ -15,7 +15,7 @@ #include #include -#if !DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(pwm_0)) +#if !DT_NODE_HAS_STATUS(DT_ALIAS(pwm_0), okay) #error "Choose supported board or add new board for the application" #endif diff --git a/samples/boards/nrf/battery/src/battery.c b/samples/boards/nrf/battery/src/battery.c index f30cdc0fa4..1f4ffc4e84 100644 --- a/samples/boards/nrf/battery/src/battery.c +++ b/samples/boards/nrf/battery/src/battery.c @@ -57,7 +57,7 @@ struct divider_config { }; static const struct divider_config divider_config = { -#if DT_HAS_NODE_STATUS_OKAY(VBATT) +#if DT_NODE_HAS_STATUS(VBATT, okay) .io_channel = { DT_IO_CHANNELS_LABEL(VBATT), DT_IO_CHANNELS_INPUT(VBATT), diff --git a/samples/drivers/display/src/main.c b/samples/drivers/display/src/main.c index 50dce9b3a3..4e672c488a 100644 --- a/samples/drivers/display/src/main.c +++ b/samples/drivers/display/src/main.c @@ -14,23 +14,23 @@ LOG_MODULE_REGISTER(sample, LOG_LEVEL_INF); #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, ilitek_ili9340)) +#if DT_NODE_HAS_STATUS(DT_INST(0, ilitek_ili9340), okay) #define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, ilitek_ili9340)) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, solomon_ssd1306fb)) +#if DT_NODE_HAS_STATUS(DT_INST(0, solomon_ssd1306fb), okay) #define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, solomon_ssd1306fb)) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, gooddisplay_gdeh0213b1)) +#if DT_NODE_HAS_STATUS(DT_INST(0, gooddisplay_gdeh0213b1), okay) #define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, gooddisplay_gdeh0213b1)) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, sitronix_st7789v)) +#if DT_NODE_HAS_STATUS(DT_INST(0, sitronix_st7789v), okay) #define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, sitronix_st7789v)) #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, fsl_imx6sx_lcdif)) +#if DT_NODE_HAS_STATUS(DT_INST(0, fsl_imx6sx_lcdif), okay) #define DISPLAY_DEV_NAME DT_LABEL(DT_INST(0, fsl_imx6sx_lcdif)) #endif diff --git a/samples/drivers/lora/receive/src/main.c b/samples/drivers/lora/receive/src/main.c index e1e1256ba9..a0e07dd099 100644 --- a/samples/drivers/lora/receive/src/main.c +++ b/samples/drivers/lora/receive/src/main.c @@ -11,7 +11,7 @@ #include #define DEFAULT_RADIO_NODE DT_ALIAS(lora0) -BUILD_ASSERT(DT_HAS_NODE_STATUS_OKAY(DEFAULT_RADIO_NODE), +BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay), "No default LoRa radio specified in DT"); #define DEFAULT_RADIO DT_LABEL(DEFAULT_RADIO_NODE) diff --git a/samples/drivers/lora/send/src/main.c b/samples/drivers/lora/send/src/main.c index 49b55146e1..71f166f72b 100644 --- a/samples/drivers/lora/send/src/main.c +++ b/samples/drivers/lora/send/src/main.c @@ -11,7 +11,7 @@ #include #define DEFAULT_RADIO_NODE DT_ALIAS(lora0) -BUILD_ASSERT(DT_HAS_NODE_STATUS_OKAY(DEFAULT_RADIO_NODE), +BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay), "No default LoRa radio specified in DT"); #define DEFAULT_RADIO DT_LABEL(DEFAULT_RADIO_NODE) diff --git a/samples/drivers/peci/src/main.c b/samples/drivers/peci/src/main.c index 5fc34dc0ed..01db3cfe2a 100644 --- a/samples/drivers/peci/src/main.c +++ b/samples/drivers/peci/src/main.c @@ -176,7 +176,7 @@ static void monitor_temperature_func(void *dummy1, void *dummy2, void *dummy3) void main(void) { -#if DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(peci_0)) +#if DT_NODE_HAS_STATUS(DT_ALIAS(peci_0), okay) int ret; #endif @@ -186,7 +186,7 @@ void main(void) monitor_temperature_func, NULL, NULL, NULL, PRIORITY, K_INHERIT_PERMS, K_FOREVER); -#if DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(peci_0)) +#if DT_NODE_HAS_STATUS(DT_ALIAS(peci_0), okay) peci_dev = device_get_binding(DT_LABEL(DT_ALIAS(peci_0))); if (!peci_dev) { printk("Err: PECI device not found\n"); diff --git a/samples/drivers/ps2/src/main.c b/samples/drivers/ps2/src/main.c index 304718c49c..4558714980 100644 --- a/samples/drivers/ps2/src/main.c +++ b/samples/drivers/ps2/src/main.c @@ -175,7 +175,7 @@ void main(void) /* The ps2 blocks are generic, therefore, it is allowed to swap * keybaord and mouse as deired */ -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, microchip_xec_ps2)) +#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_ps2), okay) ps2_0_dev = device_get_binding(DT_LABEL(DT_INST(0, microchip_xec_ps2))); ps2_config(ps2_0_dev, mb_callback); /*Make sure there is a PS/2 device connected */ diff --git a/samples/drivers/spi_flash/src/main.c b/samples/drivers/spi_flash/src/main.c index 6ce32d5c73..a183c1d060 100644 --- a/samples/drivers/spi_flash/src/main.c +++ b/samples/drivers/spi_flash/src/main.c @@ -14,11 +14,12 @@ /* NB: W25Q16DV is a JEDEC spi-nor device, but has a separate driver. */ #define FLASH_DEVICE CONFIG_SPI_FLASH_W25QXXDV_DRV_NAME #define FLASH_NAME "W25QXXDV" -#elif (CONFIG_SPI_NOR - 0) || DT_HAS_NODE_STATUS_OKAY(DT_INST(0, jedec_spi_nor)) +#elif (CONFIG_SPI_NOR - 0) || \ + DT_NODE_HAS_STATUS(DT_INST(0, jedec_spi_nor), okay) #define FLASH_DEVICE DT_LABEL(DT_INST(0, jedec_spi_nor)) #define FLASH_NAME "JEDEC SPI-NOR" #elif (CONFIG_NORDIC_QSPI_NOR - 0) || \ - DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nordic_qspi_nor)) + DT_NODE_HAS_STATUS(DT_INST(0, nordic_qspi_nor), okay) #define FLASH_DEVICE DT_LABEL(DT_INST(0, nordic_qspi_nor)) #define FLASH_NAME "JEDEC QSPI-NOR" #else diff --git a/samples/drivers/watchdog/src/main.c b/samples/drivers/watchdog/src/main.c index c36c4a2a0e..3153391705 100644 --- a/samples/drivers/watchdog/src/main.c +++ b/samples/drivers/watchdog/src/main.c @@ -19,7 +19,7 @@ * 'watchdog0' property, or one of the following watchdog compatibles * must have an enabled node. */ -#if DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(watchdog0)) +#if DT_NODE_HAS_STATUS(DT_ALIAS(watchdog0), okay) #define WDT_NODE DT_ALIAS(watchdog0) #elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_window_watchdog) #define WDT_NODE DT_INST(0, st_stm32_window_watchdog) diff --git a/samples/sensor/bme280/src/main.c b/samples/sensor/bme280/src/main.c index 8f72f02047..dadf847aa9 100644 --- a/samples/sensor/bme280/src/main.c +++ b/samples/sensor/bme280/src/main.c @@ -11,7 +11,7 @@ #define BME280 DT_INST(0, bosch_bme280) -#if DT_HAS_NODE_STATUS_OKAY(BME280) +#if DT_NODE_HAS_STATUS(BME280, okay) #define BME280_LABEL DT_LABEL(BME280) #else #error Your devicetree has no enabled nodes with compatible "bosch,bme280" diff --git a/soc/arc/snps_emsk/soc_config.c b/soc/arc/snps_emsk/soc_config.c index 48b8488484..5d77f4d50a 100644 --- a/soc/arc/snps_emsk/soc_config.c +++ b/soc/arc/snps_emsk/soc_config.c @@ -18,14 +18,14 @@ static int uart_ns16550_init(struct device *dev) /* On ARC EM Starter kit board, * send the UART the command to clear the interrupt */ -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, ns16550)) +#if DT_NODE_HAS_STATUS(DT_INST(0, ns16550), okay) sys_write32(0, DT_REG_ADDR(DT_INST(0, ns16550))+0x4); sys_write32(0, DT_REG_ADDR(DT_INST(0, ns16550))+0x10); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_INST(0, ns16550)) */ -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, ns16550)) +#endif /* DT_NODE_HAS_STATUS(DT_INST(0, ns16550), okay) */ +#if DT_NODE_HAS_STATUS(DT_INST(1, ns16550), okay) sys_write32(0, DT_REG_ADDR(DT_INST(1, ns16550))+0x4); sys_write32(0, DT_REG_ADDR(DT_INST(1, ns16550))+0x10); -#endif /* DT_HAS_NODE_STATUS_OKAY(DT_INST(1, ns16550)) */ +#endif /* DT_NODE_HAS_STATUS(DT_INST(1, ns16550), okay) */ return 0; } diff --git a/soc/arm/arm/beetle/power.c b/soc/arm/arm/beetle/power.c index 5c10b9b7c9..ca84080f51 100644 --- a/soc/arm/arm/beetle/power.c +++ b/soc/arm/arm/beetle/power.c @@ -11,13 +11,13 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) #define CLK_BIT_GPIO0 _BEETLE_GPIO0 #else #define CLK_BIT_GPIO0 0 #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) #define CLK_BIT_GPIO1 _BEETLE_GPIO1 #else #define CLK_BIT_GPIO1 0 @@ -25,13 +25,13 @@ #define AHB_CLK_BITS (CLK_BIT_GPIO0 | CLK_BIT_GPIO1) -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(timer0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(timer0), okay) #define CLK_BIT_TIMER0 _BEETLE_TIMER0 #else #define CLK_BIT_TIMER0 0 #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(timer1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(timer1), okay) #define CLK_BIT_TIMER1 _BEETLE_TIMER1 #else #define CLK_BIT_TIMER1 0 @@ -43,13 +43,13 @@ #define CLK_BIT_WDOG 0 #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) #define CLK_BIT_UART0 _BEETLE_UART0 #else #define CLK_BIT_UART0 0 #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) #define CLK_BIT_UART1 _BEETLE_UART1 #else #define CLK_BIT_UART1 0 diff --git a/soc/arm/nordic_nrf/validate_base_addresses.c b/soc/arm/nordic_nrf/validate_base_addresses.c index 305333070d..41392a9e82 100644 --- a/soc/arm/nordic_nrf/validate_base_addresses.c +++ b/soc/arm/nordic_nrf/validate_base_addresses.c @@ -32,20 +32,19 @@ * Check that a devicetree node's "reg" base address matches the * correct value from the MDK. * - * This check will only happen if the node is enabled. Disabled or - * nonexistent nodes are not checked. + * Node reg values are checked against MDK addresses regardless of + * their status. * - * This allows the same file to work with multiple SoCs and devicetree - * configurations. + * Using a node label allows the same file to work with multiple SoCs + * and devicetree configurations. * * @param lbl lowercase-and-underscores devicetree node label to check * @param mdk_addr expected address from the Nordic MDK. */ #define CHECK_DT_REG(lbl, mdk_addr) \ BUILD_ASSERT( \ - UTIL_OR(UTIL_NOT(DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lbl))),\ - (DT_REG_ADDR(DT_NODELABEL(lbl)) == \ - (u32_t)(mdk_addr)))) + UTIL_OR(UTIL_NOT(DT_NODE_EXISTS(DT_NODELABEL(lbl))), \ + (DT_REG_ADDR(DT_NODELABEL(lbl)) == (u32_t)(mdk_addr)))) /** * If a node label "lbl" might have different addresses depending on diff --git a/soc/arm/nordic_nrf/validate_enabled_instances.c b/soc/arm/nordic_nrf/validate_enabled_instances.c index df3188560e..d8f94406df 100644 --- a/soc/arm/nordic_nrf/validate_enabled_instances.c +++ b/soc/arm/nordic_nrf/validate_enabled_instances.c @@ -7,15 +7,15 @@ #include #define I2C_ENABLED(idx) (IS_ENABLED(CONFIG_I2C) && \ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c##idx))) + DT_NODE_HAS_STATUS(DT_NODELABEL(i2c##idx), okay)) #define SPI_ENABLED(idx) (IS_ENABLED(CONFIG_SPI) && \ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(spi##idx))) + DT_NODE_HAS_STATUS(DT_NODELABEL(spi##idx), okay)) #define UART_ENABLED(idx) (IS_ENABLED(CONFIG_SERIAL) && \ (IS_ENABLED(CONFIG_SOC_SERIES_NRF53X) || \ IS_ENABLED(CONFIG_SOC_SERIES_NRF91X)) && \ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart##idx))) + DT_NODE_HAS_STATUS(DT_NODELABEL(uart##idx), okay)) /* * In most Nordic SoCs, SPI and TWI peripherals with the same instance number diff --git a/soc/arm/nxp_imx/mcimx6x_m4/soc.c b/soc/arm/nxp_imx/mcimx6x_m4/soc.c index af03dbb721..e324b31daa 100644 --- a/soc/arm/nxp_imx/mcimx6x_m4/soc.c +++ b/soc/arm/nxp_imx/mcimx6x_m4/soc.c @@ -21,55 +21,55 @@ static void SOC_RdcInit(void) RDC_DOMAIN_PERM(M4_DOMAIN_ID, RDC_DOMAIN_PERM_RW), false, false); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) /* Set access to UART_1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart1, RDC_DT_VAL(uart1), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) /* Set access to UART_2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart2, RDC_DT_VAL(uart2), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) /* Set access to UART_3 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart3, RDC_DT_VAL(uart3), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) /* Set access to UART_4 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart4, RDC_DT_VAL(uart4), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart5), okay) /* Set access to UART_5 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart5, RDC_DT_VAL(uart5), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart6), okay) /* Set access to UART_6 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart6, RDC_DT_VAL(uart6), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) /* Set access to GPIO_1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio1, RDC_DT_VAL(gpio1), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) /* Set access to GPIO_2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio2, RDC_DT_VAL(gpio2), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay) /* Set access to GPIO_3 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio3, RDC_DT_VAL(gpio3), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay) /* Set access to GPIO_4 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio4, RDC_DT_VAL(gpio4), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio5)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay) /* Set access to GPIO_5 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio5, RDC_DT_VAL(gpio5), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio6), okay) /* Set access to GPIO_6 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio6, RDC_DT_VAL(gpio6), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio7)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio7), okay) /* Set access to GPIO_7 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio7, RDC_DT_VAL(gpio7), false, false); #endif @@ -79,11 +79,11 @@ static void SOC_RdcInit(void) RDC_SetPdapAccess(RDC, rdcPdapMuB, RDC_DT_VAL(mub), false, false); #endif /* CONFIG_IPM_IMX */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(epit1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit1), okay) /* Set access to EPIT_1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapEpit1, RDC_DT_VAL(epit1), false, false); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(epit2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit2), okay) /* Set access to EPIT_2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapEpit2, RDC_DT_VAL(epit2), false, false); #endif @@ -151,10 +151,10 @@ static void SOC_ClockInit(void) CCM_SetRootDivider(CCM, ccmRootPerclkPodf, 0); /* Enable EPIT clocks */ -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(epit1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit1), okay) CCM_ControlGate(CCM, ccmCcgrGateEpit1Clk, ccmClockNeededAll); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(epit2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit2), okay) CCM_ControlGate(CCM, ccmCcgrGateEpit2Clk, ccmClockNeededAll); #endif #endif /* CONFIG_COUNTER_IMX_EPIT */ diff --git a/soc/arm/nxp_imx/mcimx7_m4/soc.c b/soc/arm/nxp_imx/mcimx7_m4/soc.c index be214c062d..ec8b32d9d0 100644 --- a/soc/arm/nxp_imx/mcimx7_m4/soc.c +++ b/soc/arm/nxp_imx/mcimx7_m4/soc.c @@ -56,21 +56,21 @@ void SOC_RdcInit(void) static void nxp_mcimx7_gpio_config(void) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) RDC_SetPdapAccess(RDC, rdcPdapGpio1, RDC_DT_VAL(gpio1), false, false); /* Enable gpio clock gate */ CCM_ControlGate(CCM, ccmCcgrGateGpio1, ccmClockNeededRunWait); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) RDC_SetPdapAccess(RDC, rdcPdapGpio2, RDC_DT_VAL(gpio2), false, false); /* Enable gpio clock gate */ CCM_ControlGate(CCM, ccmCcgrGateGpio2, ccmClockNeededRunWait); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(gpio7)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio7), okay) RDC_SetPdapAccess(RDC, rdcPdapGpio7, RDC_DT_VAL(gpio7), false, false); /* Enable gpio clock gate */ CCM_ControlGate(CCM, ccmCcgrGateGpio7, ccmClockNeededRunWait); @@ -83,7 +83,7 @@ static void nxp_mcimx7_gpio_config(void) static void nxp_mcimx7_uart_config(void) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) /* We need to grasp board uart exclusively */ RDC_SetPdapAccess(RDC, rdcPdapUart2, RDC_DT_VAL(uart2), false, false); /* Select clock derived from OSC clock(24M) */ @@ -98,7 +98,7 @@ static void nxp_mcimx7_uart_config(void) CCM_ControlGate(CCM, ccmCcgrGateUart2, ccmClockNeededAll); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart6)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart6), okay) /* We need to grasp board uart exclusively */ RDC_SetPdapAccess(RDC, rdcPdapUart6, RDC_DT_VAL(uart6), false, false); /* Select clock derived from OSC clock(24M) */ @@ -120,7 +120,7 @@ static void nxp_mcimx7_uart_config(void) static void nxp_mcimx7_i2c_config(void) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c1, RDC_DT_VAL(i2c1), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -130,7 +130,7 @@ static void nxp_mcimx7_i2c_config(void) CCM_ControlGate(CCM, ccmCcgrGateI2c1, ccmClockNeededRunWait); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c2, RDC_DT_VAL(i2c2), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -140,7 +140,7 @@ static void nxp_mcimx7_i2c_config(void) CCM_ControlGate(CCM, ccmCcgrGateI2c2, ccmClockNeededRunWait); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c3, RDC_DT_VAL(i2c3), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -150,7 +150,7 @@ static void nxp_mcimx7_i2c_config(void) CCM_ControlGate(CCM, ccmCcgrGateI2c3, ccmClockNeededRunWait); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(i2c4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c4, RDC_DT_VAL(i2c4), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -167,7 +167,7 @@ static void nxp_mcimx7_i2c_config(void) static void nxp_mcimx7_pwm_config(void) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm1, RDC_DT_VAL(pwm1), false, false); /* Select clock derived from OSC clock(24M) */ @@ -177,7 +177,7 @@ static void nxp_mcimx7_pwm_config(void) CCM_ControlGate(CCM, ccmCcgrGatePwm1, ccmClockNeededAll); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm2, RDC_DT_VAL(pwm2), false, false); /* Select clock derived from OSC clock(24M) */ @@ -187,7 +187,7 @@ static void nxp_mcimx7_pwm_config(void) CCM_ControlGate(CCM, ccmCcgrGatePwm2, ccmClockNeededAll); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm3, RDC_DT_VAL(pwm3), false, false); /* Select clock derived from OSC clock(24M) */ @@ -197,7 +197,7 @@ static void nxp_mcimx7_pwm_config(void) CCM_ControlGate(CCM, ccmCcgrGatePwm3, ccmClockNeededAll); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm4)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm4, RDC_DT_VAL(pwm4), false, false); /* Select clock derived from OSC clock(24M) */ diff --git a/soc/arm/nxp_kinetis/ke1xf/soc.c b/soc/arm/nxp_kinetis/ke1xf/soc.c index 60b2798c06..24ba6b158a 100644 --- a/soc/arm/nxp_kinetis/ke1xf/soc.c +++ b/soc/arm/nxp_kinetis/ke1xf/soc.c @@ -163,59 +163,59 @@ static ALWAYS_INLINE void clk_init(void) CLOCK_GetCurSysClkConfig(¤t); } while (current.src != scg_sys_clk_config.src); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) CLOCK_SetIpSrc(kCLOCK_Lpuart0, DT_CLOCKS_CELL(DT_NODELABEL(lpuart0), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) CLOCK_SetIpSrc(kCLOCK_Lpuart1, DT_CLOCKS_CELL(DT_NODELABEL(lpuart1), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart2), okay) CLOCK_SetIpSrc(kCLOCK_Lpuart2, DT_CLOCKS_CELL(DT_NODELABEL(lpuart2), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c0), okay) CLOCK_SetIpSrc(kCLOCK_Lpi2c0, DT_CLOCKS_CELL(DT_NODELABEL(lpi2c0), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) CLOCK_SetIpSrc(kCLOCK_Lpi2c1, DT_CLOCKS_CELL(DT_NODELABEL(lpi2c1), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi0), okay) CLOCK_SetIpSrc(kCLOCK_Lpspi0, DT_CLOCKS_CELL(DT_NODELABEL(lpspi0), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpspi1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) CLOCK_SetIpSrc(kCLOCK_Lpspi1, DT_CLOCKS_CELL(DT_NODELABEL(lpspi1), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) CLOCK_SetIpSrc(kCLOCK_Adc0, DT_CLOCKS_CELL(DT_NODELABEL(adc0), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) CLOCK_SetIpSrc(kCLOCK_Adc1, DT_CLOCKS_CELL(DT_NODELABEL(adc1), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(adc2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc2), okay) CLOCK_SetIpSrc(kCLOCK_Adc2, DT_CLOCKS_CELL(DT_NODELABEL(adc2), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(ftm0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm0), okay) CLOCK_SetIpSrc(kCLOCK_Ftm0, DT_CLOCKS_CELL(DT_NODELABEL(ftm0), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(ftm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm1), okay) CLOCK_SetIpSrc(kCLOCK_Ftm1, DT_CLOCKS_CELL(DT_NODELABEL(ftm1), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(ftm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm2), okay) CLOCK_SetIpSrc(kCLOCK_Ftm2, DT_CLOCKS_CELL(DT_NODELABEL(ftm2), ip_source)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(ftm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm3), okay) CLOCK_SetIpSrc(kCLOCK_Ftm3, DT_CLOCKS_CELL(DT_NODELABEL(ftm3), ip_source)); #endif diff --git a/soc/arm/nxp_kinetis/kl2x/soc.c b/soc/arm/nxp_kinetis/kl2x/soc.c index 5b87afcc35..290a37521e 100644 --- a/soc/arm/nxp_kinetis/kl2x/soc.c +++ b/soc/arm/nxp_kinetis/kl2x/soc.c @@ -63,7 +63,7 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetInternalRefClkConfig(kMCG_IrclkEnable, kMCG_IrcSlow, 0); CLOCK_SetSimConfig(&simConfig); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(uart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) CLOCK_SetLpsci0Clock(LPSCI0SRC_MCGFLLCLK); #endif #if CONFIG_USB_KINETIS diff --git a/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c b/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c index 401920f4e2..ba35c75dce 100644 --- a/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c +++ b/soc/arm/nxp_kinetis/kwx/soc_kw4xz.c @@ -67,14 +67,14 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetSimConfig(&simConfig); -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) CLOCK_SetLpuartClock(LPUART0SRC_OSCERCLK); #endif #if defined(CONFIG_PWM) && \ - (DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm0)) || \ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm1)) || \ - DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(pwm2))) + (DT_NODE_HAS_STATUS(DT_NODELABEL(pwm0), okay) || \ + DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) || \ + DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay)) CLOCK_SetTpmClock(TPMSRC_MCGPLLCLK); #endif } diff --git a/soc/arm/nxp_lpc/lpc55xxx/soc.c b/soc/arm/nxp_lpc/lpc55xxx/soc.c index 86431ef4fd..3b511d32aa 100644 --- a/soc/arm/nxp_lpc/lpc55xxx/soc.c +++ b/soc/arm/nxp_lpc/lpc55xxx/soc.c @@ -69,7 +69,7 @@ static ALWAYS_INLINE void clock_init(void) RESET_PeripheralReset(kFC4_RST_SHIFT_RSTn); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(hs_lspi)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay) /* Attach 12 MHz clock to HSLSPI */ CLOCK_AttachClk(kFRO_HF_DIV_to_HSLSPI); diff --git a/soc/riscv/openisa_rv32m1/soc.c b/soc/riscv/openisa_rv32m1/soc.c index 0c75aaaab4..e0d818692b 100644 --- a/soc/riscv/openisa_rv32m1/soc.c +++ b/soc/riscv/openisa_rv32m1/soc.c @@ -197,16 +197,16 @@ static void rv32m1_switch_to_sirc(void) */ static void rv32m1_setup_peripheral_clocks(void) { -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(tpm0)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm0), okay) CLOCK_SetIpSrc(kCLOCK_Tpm0, kCLOCK_IpSrcFircAsync); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(tpm1)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm1), okay) CLOCK_SetIpSrc(kCLOCK_Tpm1, kCLOCK_IpSrcFircAsync); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(tpm2)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm2), okay) CLOCK_SetIpSrc(kCLOCK_Tpm2, kCLOCK_IpSrcFircAsync); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(tpm3)) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm3), okay) CLOCK_SetIpSrc(kCLOCK_Tpm3, kCLOCK_IpSrcFircAsync); #endif } diff --git a/soc/x86/apollo_lake/soc.c b/soc/x86/apollo_lake/soc.c index d4158063a5..2bc560ecf4 100644 --- a/soc/x86/apollo_lake/soc.c +++ b/soc/x86/apollo_lake/soc.c @@ -31,22 +31,22 @@ MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(0, intel_hpet)), KB(4), MMU_ENTRY_WRITE); #endif /* CONFIG_HPET_TIMER */ /* for UARTs */ -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, ns16550)) +#if DT_NODE_HAS_STATUS(DT_INST(0, ns16550), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(0, ns16550)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, ns16550)) +#if DT_NODE_HAS_STATUS(DT_INST(1, ns16550), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(1, ns16550)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(2, ns16550)) +#if DT_NODE_HAS_STATUS(DT_INST(2, ns16550), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(2, ns16550)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(3, ns16550)) +#if DT_NODE_HAS_STATUS(DT_INST(3, ns16550), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(3, ns16550)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif @@ -54,42 +54,42 @@ MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(3, ns16550)), 0x1000, /* for I2C controllers */ #ifdef CONFIG_I2C -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(0, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(0, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(1, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(1, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(2, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(2, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(2, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(3, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(3, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(3, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(4, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(4, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(4, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(5, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(5, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(5, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(6, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(6, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(6, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(7, snps_designware_i2c)) +#if DT_NODE_HAS_STATUS(DT_INST(7, snps_designware_i2c), okay) MMU_BOOT_REGION(DT_REG_ADDR(DT_INST(7, snps_designware_i2c)), 0x1000, (MMU_ENTRY_READ | MMU_ENTRY_WRITE)); #endif diff --git a/subsys/disk/disk_access_spi_sdhc.c b/subsys/disk/disk_access_spi_sdhc.c index 3b917bf724..f416215e03 100644 --- a/subsys/disk/disk_access_spi_sdhc.c +++ b/subsys/disk/disk_access_spi_sdhc.c @@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(sdhc_spi, CONFIG_DISK_LOG_LEVEL); /* Clock speed used after initialisation */ #define SDHC_SPI_SPEED 4000000 -#if !DT_HAS_NODE_STATUS_OKAY(DT_INST(0, zephyr_mmc_spi_slot)) +#if !DT_NODE_HAS_STATUS(DT_INST(0, zephyr_mmc_spi_slot), okay) #warning NO SDHC slot specified on board #else struct sdhc_spi_data { diff --git a/subsys/disk/disk_access_stm32_sdmmc.c b/subsys/disk/disk_access_stm32_sdmmc.c index c3882cd819..c55a402396 100644 --- a/subsys/disk/disk_access_stm32_sdmmc.c +++ b/subsys/disk/disk_access_stm32_sdmmc.c @@ -387,7 +387,7 @@ err_card_detect: return err; } -#if DT_HAS_NODE_STATUS_OKAY(DT_DRV_INST(0)) +#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) static struct stm32_sdmmc_priv stm32_sdmmc_priv_1 = { .hsd = { .Instance = (SDMMC_TypeDef *)DT_INST_REG_ADDR(0), diff --git a/subsys/disk/disk_access_usdhc.c b/subsys/disk/disk_access_usdhc.c index 6f1179eeee..5b3aa8a002 100644 --- a/subsys/disk/disk_access_usdhc.c +++ b/subsys/disk/disk_access_usdhc.c @@ -2705,7 +2705,7 @@ static int usdhc_access_init(const struct device *dev) (void)k_mutex_lock(&z_usdhc_init_lock, K_FOREVER); memset((char *)priv, 0, sizeof(struct usdhc_priv)); -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nxp_imx_usdhc)) +#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_imx_usdhc), okay) if (!strcmp(dev->name, DT_LABEL(DT_INST(0, nxp_imx_usdhc)))) { priv->host_config.base = (USDHC_Type *)DT_REG_ADDR(DT_INST(0, nxp_imx_usdhc)); @@ -2721,7 +2721,7 @@ static int usdhc_access_init(const struct device *dev) } #endif -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, nxp_imx_usdhc)) +#if DT_NODE_HAS_STATUS(DT_INST(1, nxp_imx_usdhc), okay) if (!strcmp(dev->name, DT_LABEL(DT_INST(1, nxp_imx_usdhc)))) { priv->host_config.base = (USDHC_Type *)DT_REG_ADDR(DT_INST(1, nxp_imx_usdhc)); @@ -2876,7 +2876,7 @@ static int disk_usdhc_init(struct device *dev) #ifdef CONFIG_DISK_ACCESS_USDHC1 static struct usdhc_priv usdhc_priv_1; -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nxp_imx_usdhc)) +#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_imx_usdhc), okay) DEVICE_AND_API_INIT(usdhc_dev1, DT_LABEL(DT_INST(0, nxp_imx_usdhc)), disk_usdhc_init, &usdhc_priv_1, NULL, APPLICATION, @@ -2889,7 +2889,7 @@ DEVICE_AND_API_INIT(usdhc_dev1, #ifdef CONFIG_DISK_ACCESS_USDHC2 static struct usdhc_priv usdhc_priv_2; -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(1, nxp_imx_usdhc)) +#if DT_NODE_HAS_STATUS(DT_INST(1, nxp_imx_usdhc), okay) DEVICE_AND_API_INIT(usdhc_dev2, DT_LABEL(DT_INST(1, nxp_imx_usdhc)), disk_usdhc_init, usdhc_priv_2, NULL, APPLICATION, diff --git a/subsys/tracing/sysview/sysview_config.c b/subsys/tracing/sysview/sysview_config.c index 47a710f845..6ed1f6b1ed 100644 --- a/subsys/tracing/sysview/sysview_config.c +++ b/subsys/tracing/sysview/sysview_config.c @@ -21,7 +21,7 @@ void SEGGER_SYSVIEW_Conf(void) SEGGER_SYSVIEW_Init(sys_clock_hw_cycles_per_sec(), sys_clock_hw_cycles_per_sec(), &SYSVIEW_X_OS_TraceAPI, cbSendSystemDesc); -#if DT_HAS_NODE_STATUS_OKAY(DT_CHOSEN(zephyr_sram)) +#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_sram), okay) SEGGER_SYSVIEW_SetRAMBase(DT_REG_ADDR(DT_CHOSEN(zephyr_sram))); #else /* Setting RAMBase is just an optimization: this value is subtracted diff --git a/subsys/usb/usb_device.c b/subsys/usb/usb_device.c index d42b2d37c6..8707ef7252 100644 --- a/subsys/usb/usb_device.c +++ b/subsys/usb/usb_device.c @@ -1047,7 +1047,7 @@ static void forward_status_cb(enum usb_dc_status_code status, const u8_t *param) static int usb_vbus_set(bool on) { #define USB_DEV_NODE DT_CHOSEN(zephyr_usb_device) -#if DT_HAS_NODE_STATUS_OKAY(USB_DEV_NODE) && \ +#if DT_NODE_HAS_STATUS(USB_DEV_NODE, okay) && \ DT_NODE_HAS_PROP(USB_DEV_NODE, vbus_gpios) int ret = 0; struct device *gpio_dev; diff --git a/tests/drivers/clock_control/clock_control_api/src/test_clock_control.c b/tests/drivers/clock_control/clock_control_api/src/test_clock_control.c index 7db0fe38b1..576c88c381 100644 --- a/tests/drivers/clock_control/clock_control_api/src/test_clock_control.c +++ b/tests/drivers/clock_control/clock_control_api/src/test_clock_control.c @@ -8,7 +8,7 @@ #include LOG_MODULE_REGISTER(test); -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nordic_nrf_clock)) +#if DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf_clock), okay) #include #endif @@ -24,7 +24,7 @@ struct device_data { }; static const struct device_data devices[] = { -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, nordic_nrf_clock)) +#if DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf_clock), okay) { .name = DT_LABEL(DT_INST(0, nordic_nrf_clock)), .subsys_data = (const struct device_subsys_data[]){ diff --git a/tests/drivers/gpio/gpio_basic_api/src/main.c b/tests/drivers/gpio/gpio_basic_api/src/main.c index 292da988f1..c5d9d477da 100644 --- a/tests/drivers/gpio/gpio_basic_api/src/main.c +++ b/tests/drivers/gpio/gpio_basic_api/src/main.c @@ -22,7 +22,7 @@ static void board_setup(void) { -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, test_gpio_basic_api)) +#if DT_NODE_HAS_STATUS(DT_INST(0, test_gpio_basic_api), okay) /* PIN_IN and PIN_OUT must be on same controller. */ if (strcmp(DT_GPIO_LABEL(DT_INST(0, test_gpio_basic_api), out_gpios), DT_GPIO_LABEL(DT_INST(0, test_gpio_basic_api), in_gpios)) != 0) { diff --git a/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h b/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h index 2d2fb478ea..afb70669fe 100644 --- a/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h +++ b/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h @@ -12,7 +12,7 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_INST(0, test_gpio_basic_api)) +#if DT_NODE_HAS_STATUS(DT_INST(0, test_gpio_basic_api), okay) /* Execution of the test requires hardware configuration described in * devicetree. See the test,gpio_basic_api binding local to this test @@ -25,11 +25,11 @@ #define PIN_OUT DT_GPIO_PIN(DT_INST(0, test_gpio_basic_api), out_gpios) #define PIN_IN DT_GPIO_PIN(DT_INST(0, test_gpio_basic_api), in_gpios) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(gpio_0)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(gpio_0), okay) #define DEV_NAME DT_LABEL(DT_ALIAS(gpio_0)) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(gpio_1)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(gpio_1), okay) #define DEV_NAME DT_LABEL(DT_ALIAS(gpio_1)) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(gpio_3)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(gpio_3), okay) #define DEV_NAME DT_LABEL(DT_ALIAS(gpio_3)) #else #error Unsupported board diff --git a/tests/drivers/i2c/i2c_api/src/test_i2c.c b/tests/drivers/i2c/i2c_api/src/test_i2c.c index 0a8a9b4cb9..6df2bc8683 100644 --- a/tests/drivers/i2c/i2c_api/src/test_i2c.c +++ b/tests/drivers/i2c/i2c_api/src/test_i2c.c @@ -16,11 +16,11 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(i2c_0)) +#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_0), okay) #define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_0)) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(i2c_1)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_1), okay) #define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_1)) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(i2c_2)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_2), okay) #define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_2)) #else #error "Please set the correct I2C device" diff --git a/tests/drivers/pwm/pwm_api/src/test_pwm.c b/tests/drivers/pwm/pwm_api/src/test_pwm.c index 71b7ec1fd9..05886a7775 100644 --- a/tests/drivers/pwm/pwm_api/src/test_pwm.c +++ b/tests/drivers/pwm/pwm_api/src/test_pwm.c @@ -32,13 +32,13 @@ #include #include -#if DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(pwm_0)) +#if DT_NODE_HAS_STATUS(DT_ALIAS(pwm_0), okay) #define PWM_DEV_NAME DT_LABEL(DT_ALIAS(pwm_0)) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(pwm_1)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(pwm_1), okay) #define PWM_DEV_NAME DT_LABEL(DT_ALIAS(pwm_1)) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(pwm_2)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(pwm_2), okay) #define PWM_DEV_NAME DT_LABEL(DT_ALIAS(pwm_2)) -#elif DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(pwm_3)) +#elif DT_NODE_HAS_STATUS(DT_ALIAS(pwm_3), okay) #define PWM_DEV_NAME DT_LABEL(DT_ALIAS(pwm_3)) #else #error "Define a PWM device" diff --git a/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c b/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c index 78e47733aa..e5b19a8e33 100644 --- a/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c +++ b/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c @@ -67,7 +67,7 @@ * 'watchdog0' property, or one of the following watchdog compatibles * must have an enabled node. */ -#if DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(watchdog0)) +#if DT_NODE_HAS_STATUS(DT_ALIAS(watchdog0), okay) #define WDT_NODE DT_ALIAS(watchdog0) #elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_window_watchdog) #define WDT_NODE DT_INST(0, st_stm32_window_watchdog) diff --git a/tests/lib/devicetree/src/main.c b/tests/lib/devicetree/src/main.c index deca566b61..9ef13a925c 100644 --- a/tests/lib/devicetree/src/main.c +++ b/tests/lib/devicetree/src/main.c @@ -141,19 +141,19 @@ static void test_inst_props(void) static void test_has_path(void) { - zassert_equal(DT_HAS_NODE_STATUS_OKAY(DT_PATH(test, gpio_0)), 0, + zassert_equal(DT_NODE_HAS_STATUS(DT_PATH(test, gpio_0), okay), 0, "gpio@0"); - zassert_equal(DT_HAS_NODE_STATUS_OKAY(DT_PATH(test, gpio_deadbeef)), 1, + zassert_equal(DT_NODE_HAS_STATUS(DT_PATH(test, gpio_deadbeef), okay), 1, "gpio@deadbeef"); - zassert_equal(DT_HAS_NODE_STATUS_OKAY(DT_PATH(test, gpio_abcd1234)), 1, + zassert_equal(DT_NODE_HAS_STATUS(DT_PATH(test, gpio_abcd1234), okay), 1, "gpio@abcd1234"); } static void test_has_alias(void) { - zassert_equal(DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(test_alias)), 1, + zassert_equal(DT_NODE_HAS_STATUS(DT_ALIAS(test_alias), okay), 1, "test-alias"); - zassert_equal(DT_HAS_NODE_STATUS_OKAY(DT_ALIAS(test_undef)), 0, + zassert_equal(DT_NODE_HAS_STATUS(DT_ALIAS(test_undef), okay), 0, "test-undef"); } @@ -172,12 +172,13 @@ static void test_inst_checks(void) static void test_has_nodelabel(void) { - zassert_equal(DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(disabled_gpio)), 0, + zassert_equal(DT_NODE_HAS_STATUS(DT_NODELABEL(disabled_gpio), okay), 0, "disabled_gpio"); - zassert_equal(DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(test_nodelabel)), 1, + zassert_equal(DT_NODE_HAS_STATUS(DT_NODELABEL(test_nodelabel), okay), 1, "test_nodelabel"); - zassert_equal(DT_HAS_NODE_STATUS_OKAY( - DT_NODELABEL(test_nodelabel_allcaps)), 1, + zassert_equal(DT_NODE_HAS_STATUS(DT_NODELABEL(test_nodelabel_allcaps), + okay), + 1, "TEST_NODELABEL_ALLCAPS"); }