Skip to content

Commit

Permalink
ramips: dts: add the missing interrupt properties for GPIO nodes
Browse files Browse the repository at this point in the history
The Ralink GPIO driver supports irqchip function. Hence we need to
add "interrupt-parent" and "interrupt-controller" properties to make
sure it works properly. It is worth noting that all GPIO devices
share the same interrupt line.

Signed-off-by: Shiji Yang <[email protected]>
Link: openwrt/openwrt#16764
Signed-off-by: Robert Marko <[email protected]>
  • Loading branch information
DragonBluep authored and robimarko committed Oct 25, 2024
1 parent 2b2abdb commit 0d4616b
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 9 deletions.
8 changes: 8 additions & 0 deletions target/linux/ramips/dts/mt7620a.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand All @@ -156,6 +158,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand All @@ -174,6 +178,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand All @@ -192,6 +198,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand Down
8 changes: 8 additions & 0 deletions target/linux/ramips/dts/mt7620n.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand All @@ -111,6 +113,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand All @@ -129,6 +133,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand All @@ -147,6 +153,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand Down
15 changes: 15 additions & 0 deletions target/linux/ramips/dts/rt2880.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <24>;
ralink,register-map = [ 00 04 08 0c
20 24 28 2c
Expand All @@ -100,6 +105,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <16>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand All @@ -115,6 +125,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <32>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand Down
18 changes: 15 additions & 3 deletions target/linux/ramips/dts/rt3050.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <24>;
ralink,register-map = [ 00 04 08 0c
20 24 28 2c
30 34 ];

interrupt-parent = <&intc>;
interrupts = <6>;
};

gpio1: gpio@638 {
Expand All @@ -127,6 +129,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <16>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand All @@ -142,6 +149,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <12>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand Down
18 changes: 15 additions & 3 deletions target/linux/ramips/dts/rt3352.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,15 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <24>;
ralink,register-map = [ 00 04 08 0c
20 24 28 2c
30 34 ];

interrupt-parent = <&intc>;
interrupts = <6>;
};

gpio1: gpio@638 {
Expand All @@ -128,6 +130,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <16>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand All @@ -143,6 +150,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <6>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand Down
23 changes: 20 additions & 3 deletions target/linux/ramips/dts/rt3883.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@
compatible = "ralink,rt2880-gpio";
reg = <0x600 0x34>;

interrupt-parent = <&intc>;
interrupts = <6>;

gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <24>;
ralink,register-map = [ 00 04 08 0c
20 24 28 2c
Expand All @@ -128,6 +130,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <16>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand All @@ -143,6 +150,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <32>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand All @@ -158,6 +170,11 @@
gpio-controller;
#gpio-cells = <2>;

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

ngpios = <24>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
Expand Down
4 changes: 4 additions & 0 deletions target/linux/ramips/dts/rt5350.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand All @@ -127,6 +129,8 @@

interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-controller;
#gpio-cells = <2>;
Expand Down

0 comments on commit 0d4616b

Please sign in to comment.