dts: nordic: Use NRF_DEFAULT_IRQ_PRIORITY instead of hard-coded values

Instead of hard-coded values for interrupt priorities in DT nodes, use
a macro that additionally can be overridden at the board or application
level. This allows, for instance, changing the interrupt priorities for
all but one peripheral without using a lengthy overlay file.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2019-11-20 14:29:48 +01:00 committed by Anas Nashif
commit 4b38398c09
15 changed files with 268 additions and 249 deletions

View file

@ -46,7 +46,7 @@
adc: adc@40007000 {
compatible = "nordic,nrf-saadc";
reg = <0x40007000 0x1000>;
interrupts = <7 1>;
interrupts = <7 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled";
label = "ADC_0";
#io-channel-cells = <1>;
@ -55,7 +55,7 @@
clock: clock@40000000 {
compatible = "nordic,nrf-clock";
reg = <0x40000000 0x1000>;
interrupts = <0 1>;
interrupts = <0 NRF_DEFAULT_IRQ_PRIORITY>;
status = "okay";
label = "CLOCK";
};
@ -64,7 +64,7 @@
/* uart can be either UART or UARTE, for the user to pick */
/* compatible = "nordic,nrf-uarte" or "nordic,nrf-uart"; */
reg = <0x40002000 0x1000>;
interrupts = <2 1>;
interrupts = <2 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled";
label = "UART_0";
};
@ -98,7 +98,7 @@
#size-cells = <0>;
reg = <0x40003000 0x1000>;
clock-frequency = <I2C_BITRATE_STANDARD>;
interrupts = <3 1>;
interrupts = <3 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled";
label = "I2C_0";
};
@ -106,7 +106,7 @@
pwm0: pwm@4001c000 {
compatible = "nordic,nrf-pwm";
reg = <0x4001c000 0x1000>;
interrupts = <28 1>;
interrupts = <28 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled";
label = "PWM_0";
#pwm-cells = <1>;
@ -115,7 +115,7 @@
qdec: qdec@40012000 {
compatible = "nordic,nrf-qdec";
reg = <0x40012000 0x1000>;
interrupts = <18 1>;
interrupts = <18 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled";
label = "QDEC";
};
@ -123,7 +123,7 @@
rng: random@4000d000 {
compatible = "nordic,nrf-rng";
reg = <0x4000d000 0x1000>;
interrupts = <13 1>;
interrupts = <13 NRF_DEFAULT_IRQ_PRIORITY>;
status = "okay";
label = "RNG";
};
@ -139,7 +139,7 @@
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40004000 0x1000>;
interrupts = <4 1>;
interrupts = <4 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled";
label = "SPI_0";
};
@ -148,7 +148,7 @@
compatible = "nordic,nrf-rtc";
reg = <0x4000b000 0x1000>;
cc-num = <3>;
interrupts = <11 1>;
interrupts = <11 NRF_DEFAULT_IRQ_PRIORITY>;
status = "okay";
clock-frequency = <32768>;
prescaler = <1>;
@ -159,7 +159,7 @@
compatible = "nordic,nrf-rtc";
reg = <0x40011000 0x1000>;
cc-num = <4>;
interrupts = <17 1>;
interrupts = <17 NRF_DEFAULT_IRQ_PRIORITY>;
status = "okay";
clock-frequency = <32768>;
prescaler = <1>;
@ -171,7 +171,7 @@
status = "okay";
reg = <0x40008000 0x1000>;
cc-num = <4>;
interrupts = <8 1>;
interrupts = <8 NRF_DEFAULT_IRQ_PRIORITY>;
prescaler = <0>;
label = "TIMER_0";
};
@ -181,7 +181,7 @@
status = "okay";
reg = <0x40009000 0x1000>;
cc-num = <4>;
interrupts = <9 1>;
interrupts = <9 NRF_DEFAULT_IRQ_PRIORITY>;
prescaler = <0>;
label = "TIMER_1";
};
@ -191,7 +191,7 @@
status = "okay";
reg = <0x4000a000 0x1000>;
cc-num = <4>;
interrupts = <10 1>;
interrupts = <10 NRF_DEFAULT_IRQ_PRIORITY>;
prescaler = <0>;
label = "TIMER_2";
};
@ -199,7 +199,7 @@
temp: temp@4000c000 {
compatible = "nordic,nrf-temp";
reg = <0x4000c000 0x1000>;
interrupts = <12 1>;
interrupts = <12 NRF_DEFAULT_IRQ_PRIORITY>;
status = "okay";
label = "TEMP_0";
};
@ -207,7 +207,7 @@
wdt: wdt0: watchdog@40010000 {
compatible = "nordic,nrf-watchdog";
reg = <0x40010000 0x1000>;
interrupts = <16 1>;
interrupts = <16 NRF_DEFAULT_IRQ_PRIORITY>;
status = "okay";
label = "WDT";
};