Skip to content

Commit

Permalink
dts: arm: add new gpiote instances definition
Browse files Browse the repository at this point in the history
Added GPIOTE0, GPIOTE1 instances for legacy devices,
GPIOTE20, GPIOTE30 for Moonlight and GPIOTE130,
GPIOTE131 instances for Haltium.

Signed-off-by: Jakub Zymelka <[email protected]>
  • Loading branch information
jaz1-nordic committed Jan 5, 2024
1 parent 1fab997 commit 11a93ec
Show file tree
Hide file tree
Showing 22 changed files with 158 additions and 73 deletions.
4 changes: 3 additions & 1 deletion dts/arm/nordic/nrf51822.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@
status = "disabled";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 NRF_DEFAULT_IRQ_PRIORITY>;
status = "disabled";
instance = <0>;
};

adc: adc@40007000 {
Expand Down Expand Up @@ -316,6 +317,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/arm/nordic/nrf52805.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@
status = "disabled";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 5>;
status = "disabled";
instance = <0>;
};

adc: adc@40007000 {
Expand Down Expand Up @@ -311,6 +312,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/arm/nordic/nrf52810.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@
status = "disabled";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 5>;
status = "disabled";
instance = <0>;
};

adc: adc@40007000 {
Expand Down Expand Up @@ -337,6 +338,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/arm/nordic/nrf52811.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@
status = "disabled";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 5>;
status = "disabled";
instance = <0>;
};

adc: adc@40007000 {
Expand Down Expand Up @@ -372,6 +373,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/arm/nordic/nrf52820.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,12 @@
status = "disabled";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 5>;
status = "disabled";
instance = <0>;
};

timer0: timer@40008000 {
Expand Down Expand Up @@ -389,6 +390,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/arm/nordic/nrf52832.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,12 @@
status = "okay";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 5>;
status = "disabled";
instance = <0>;
};

adc: adc@40007000 {
Expand Down Expand Up @@ -465,6 +466,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};
};
};
Expand Down
5 changes: 4 additions & 1 deletion dts/arm/nordic/nrf52833.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,12 @@
status = "okay";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 5>;
status = "disabled";
instance = <0>;
};

adc: adc@40007000 {
Expand Down Expand Up @@ -521,6 +522,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};

gpio1: gpio@50000300 {
Expand All @@ -532,6 +534,7 @@
ngpios = <10>;
status = "disabled";
port = <1>;
gpiote-instance = <&gpiote>;
};
};
};
Expand Down
5 changes: 4 additions & 1 deletion dts/arm/nordic/nrf52840.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,12 @@
status = "okay";
};

gpiote: gpiote@40006000 {
gpiote: gpiote0: gpiote@40006000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40006000 0x1000>;
interrupts = <6 5>;
status = "disabled";
instance = <0>;
};

adc: adc@40007000 {
Expand Down Expand Up @@ -525,6 +526,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};

gpio1: gpio@50000300 {
Expand All @@ -536,6 +538,7 @@
ngpios = <16>;
status = "disabled";
port = <1>;
gpiote-instance = <&gpiote>;
};

cryptocell: crypto@5002a000 {
Expand Down
17 changes: 10 additions & 7 deletions dts/arm/nordic/nrf5340_cpuapp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
reg = <0x5000d000 0x1000>;
interrupts = <13 5>;
status = "disabled";
instance = <0>;
};

/* Additional Non-Secure GPIOTE instance */
gpiote1: gpiote@4002f000 {
compatible = "nordic,nrf-gpiote";
reg = <0x4002f000 0x1000>;
interrupts = <47 5>;
status = "disabled";
instance = <1>;
};

cryptocell: crypto@50844000 {
Expand All @@ -104,10 +114,3 @@
&nvic {
arm,num-irq-priority-bits = <3>;
};

/*
* Include the non-secure peripherals file here since
* it expects to be at the root level. This provides
* a node for GPIOTE1.
*/
#include "nrf5340_cpuapp_peripherals_ns.dtsi"
2 changes: 2 additions & 0 deletions dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ gpio0: gpio@842500 {
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};

gpio1: gpio@842800 {
Expand All @@ -537,6 +538,7 @@ gpio1: gpio@842800 {
ngpios = <16>;
status = "disabled";
port = <1>;
gpiote-instance = <&gpiote>;
};

ieee802154: ieee802154 {
Expand Down
20 changes: 0 additions & 20 deletions dts/arm/nordic/nrf5340_cpuapp_peripherals_ns.dtsi

This file was deleted.

22 changes: 13 additions & 9 deletions dts/arm/nordic/nrf5340_cpuappns.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@
*/
#include "nrf5340_cpuapp_peripherals.dtsi"
};

/*
* GPIOTE1 is always accessible as a non-secure peripheral,
* so we give it the 'gpiote' label for use when building
* code for this target.
*/
gpiote: gpiote1: gpiote@4002f000 {
compatible = "nordic,nrf-gpiote";
reg = <0x4002f000 0x1000>;
interrupts = <47 5>;
status = "disabled";
instance = <1>;
};
};

/* Default IPC description */
Expand All @@ -64,12 +77,3 @@
&nvic {
arm,num-irq-priority-bits = <3>;
};

/*
* Include the non-secure peripherals file here since
* it expects to be at the root level, adding a 'gpiote' label
* for the GPIOTE1 peripheral defined in that file which is
* always accessible as a non-secure peripheral.
*/
#include "nrf5340_cpuapp_peripherals_ns.dtsi"
gpiote: &gpiote1 {};
5 changes: 4 additions & 1 deletion dts/arm/nordic/nrf5340_cpunet.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@
status = "okay";
};

gpiote: gpiote@4100a000 {
gpiote: gpiote0: gpiote@4100a000 {
compatible = "nordic,nrf-gpiote";
reg = <0x4100a000 0x1000>;
interrupts = <10 5>;
status = "disabled";
instance = <0>;
};

wdt: wdt0: watchdog@4100b000 {
Expand Down Expand Up @@ -317,6 +318,7 @@
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};

gpio1: gpio@418c0800 {
Expand All @@ -327,6 +329,7 @@
ngpios = <16>;
status = "disabled";
port = <1>;
gpiote-instance = <&gpiote>;
};
};

Expand Down
17 changes: 16 additions & 1 deletion dts/arm/nordic/nrf91.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,26 @@
status = "okay";
};

gpiote: gpiote@5000d000 {
/*
* GPIOTE0 is always accessible as a secure peripheral,
* so we give it the 'gpiote' label for use when building
* code for this target.
*/
gpiote: gpiote0: gpiote@5000d000 {
compatible = "nordic,nrf-gpiote";
reg = <0x5000d000 0x1000>;
interrupts = <13 5>;
status = "disabled";
instance = <0>;
};

/* Additional Non-Secure GPIOTE instance */
gpiote1: gpiote@40031000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40031000 0x1000>;
interrupts = <49 5>;
status = "disabled";
instance = <1>;
};

spu: spu@50003000 {
Expand Down
1 change: 1 addition & 0 deletions dts/arm/nordic/nrf91_peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ gpio0: gpio@842500 {
#gpio-cells = <2>;
status = "disabled";
port = <0>;
gpiote-instance = <&gpiote>;
};

rtc0: rtc@14000 {
Expand Down
9 changes: 7 additions & 2 deletions dts/arm/nordic/nrf91ns.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@
#include "nrf91_peripherals.dtsi"
};

/* Additional Non-Secure peripherals */
gpiote: gpiote@40031000 {
/*
* GPIOTE1 is always accessible as a non-secure peripheral,
* so we give it the 'gpiote' label for use when building
* code for this target.
*/
gpiote: gpiote1: gpiote@40031000 {
compatible = "nordic,nrf-gpiote";
reg = <0x40031000 0x1000>;
interrupts = <49 5>;
status = "disabled";
instance = <1>;
};
};

Expand Down
Loading

0 comments on commit 11a93ec

Please sign in to comment.