diff --git a/drivers/gpio/gpio_nrfx.c b/drivers/gpio/gpio_nrfx.c index c2793cc6d7b..1c54604bc28 100644 --- a/drivers/gpio/gpio_nrfx.c +++ b/drivers/gpio/gpio_nrfx.c @@ -422,10 +422,11 @@ static int gpio_nrfx_init(struct device *port) if (!gpio_initialized) { gpio_initialized = true; - IRQ_CONNECT(DT_GPIOTE_IRQ, DT_GPIOTE_IRQ_PRI, + IRQ_CONNECT(DT_NORDIC_NRF_GPIOTE_GPIOTE_0_IRQ, + DT_NORDIC_NRF_GPIOTE_GPIOTE_0_IRQ_PRIORITY, gpiote_event_handler, NULL, 0); - irq_enable(DT_GPIOTE_IRQ); + irq_enable(DT_NORDIC_NRF_GPIOTE_GPIOTE_0_IRQ); nrf_gpiote_int_enable(NRF_GPIOTE_INT_PORT_MASK); } @@ -445,7 +446,7 @@ static int gpio_nrfx_init(struct device *port) static struct gpio_nrfx_data gpio_nrfx_p##id##_data; \ \ DEVICE_AND_API_INIT(gpio_nrfx_p##id, \ - DT_GPIO_P##id##_DEV_NAME, \ + DT_NORDIC_NRF_GPIO_GPIO_##id##_LABEL, \ gpio_nrfx_init, \ &gpio_nrfx_p##id##_data, \ &gpio_nrfx_p##id##_cfg, \ diff --git a/dts/arm/nordic/nrf51822.dtsi b/dts/arm/nordic/nrf51822.dtsi index 28c238d6d32..cb280d0ce57 100644 --- a/dts/arm/nordic/nrf51822.dtsi +++ b/dts/arm/nordic/nrf51822.dtsi @@ -43,6 +43,8 @@ spi-1 = &spi1; uart-0 = &uart0; adc-0 = &adc; + gpio-0 = &gpio0; + gpiote-0 = &gpiote; }; soc { @@ -66,7 +68,6 @@ compatible = "nordic,nrf-gpiote"; reg = <0x40006000 0x1000>; interrupts = <6 1>; - interrupt-names = "gpiote"; status = "disabled"; label = "GPIOTE_0"; }; diff --git a/dts/arm/nordic/nrf52810.dtsi b/dts/arm/nordic/nrf52810.dtsi index 54cdc90806e..ab534e6c301 100644 --- a/dts/arm/nordic/nrf52810.dtsi +++ b/dts/arm/nordic/nrf52810.dtsi @@ -40,6 +40,8 @@ spi-0 = &spi0; uart-0 = &uart0; adc-0 = &adc; + gpio-0 = &gpio0; + gpiote-0 = &gpiote; }; soc { @@ -63,7 +65,6 @@ compatible = "nordic,nrf-gpiote"; reg = <0x40006000 0x1000>; interrupts = <6 5>; - interrupt-names = "gpiote"; status = "disabled"; label = "GPIOTE_0"; }; diff --git a/dts/arm/nordic/nrf52832.dtsi b/dts/arm/nordic/nrf52832.dtsi index 12588e6026d..a5d77ae6c56 100644 --- a/dts/arm/nordic/nrf52832.dtsi +++ b/dts/arm/nordic/nrf52832.dtsi @@ -44,6 +44,8 @@ spi-2 = &spi2; uart-0 = &uart0; adc-0 = &adc; + gpio-0 = &gpio0; + gpiote-0 = &gpiote; }; soc { @@ -68,7 +70,6 @@ compatible = "nordic,nrf-gpiote"; reg = <0x40006000 0x1000>; interrupts = <6 5>; - interrupt-names = "gpiote"; status = "disabled"; label = "GPIOTE_0"; }; diff --git a/dts/arm/nordic/nrf52840.dtsi b/dts/arm/nordic/nrf52840.dtsi index 3cd0b779105..eb0f906739d 100644 --- a/dts/arm/nordic/nrf52840.dtsi +++ b/dts/arm/nordic/nrf52840.dtsi @@ -46,6 +46,9 @@ uart-0 = &uart0; uart-1 = &uart1; adc-0 = &adc; + gpio-0 = &gpio0; + gpio-1 = &gpio1; + gpiote-0 = &gpiote; }; soc { @@ -78,7 +81,6 @@ compatible = "nordic,nrf-gpiote"; reg = <0x40006000 0x1000>; interrupts = <6 5>; - interrupt-names = "gpiote"; status = "disabled"; label = "GPIOTE_0"; }; diff --git a/soc/arm/nordic_nrf/nrf51/dts_fixup.h b/soc/arm/nordic_nrf/nrf51/dts_fixup.h index 389cdb5fe23..2e5d78cd417 100644 --- a/soc/arm/nordic_nrf/nrf51/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf51/dts_fixup.h @@ -8,9 +8,7 @@ #define DT_FLASH_DEV_NAME DT_NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL -#define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_50000000_LABEL -#define DT_GPIOTE_IRQ_PRI DT_NORDIC_NRF_GPIOTE_40006000_IRQ_0_PRIORITY -#define DT_GPIOTE_IRQ DT_NORDIC_NRF_GPIOTE_40006000_IRQ_0 +#define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_0_LABEL #define DT_I2C_0_NAME DT_NORDIC_NRF_I2C_I2C_0_LABEL #define DT_I2C_1_NAME DT_NORDIC_NRF_I2C_I2C_1_LABEL diff --git a/soc/arm/nordic_nrf/nrf52/dts_fixup.h b/soc/arm/nordic_nrf/nrf52/dts_fixup.h index 48d75880a58..f186382f8eb 100644 --- a/soc/arm/nordic_nrf/nrf52/dts_fixup.h +++ b/soc/arm/nordic_nrf/nrf52/dts_fixup.h @@ -9,12 +9,8 @@ #define DT_FLASH_DEV_NAME DT_NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL -#define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_50000000_LABEL -#if CONFIG_HAS_HW_NRF_GPIO1 -#define DT_GPIO_P1_DEV_NAME DT_NORDIC_NRF_GPIO_50000300_LABEL -#endif -#define DT_GPIOTE_IRQ_PRI DT_NORDIC_NRF_GPIOTE_40006000_IRQ_0_PRIORITY -#define DT_GPIOTE_IRQ DT_NORDIC_NRF_GPIOTE_40006000_IRQ_0 +#define DT_GPIO_P0_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_0_LABEL +#define DT_GPIO_P1_DEV_NAME DT_NORDIC_NRF_GPIO_GPIO_1_LABEL #define DT_I2C_0_NAME DT_NORDIC_NRF_I2C_I2C_0_LABEL #define DT_I2C_1_NAME DT_NORDIC_NRF_I2C_I2C_1_LABEL