Skip to contentSkip to conversation

arm64: dts: ti: J7200 GPIO support and warning fixes

PATCH In review Sekhar Nori 6 participants 18 messages Nov 17, 2020 – Mar 11, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover arm64: dts: ti: J7200 GPIO support and warning fixes

These patches add gpio support for TI's J7200 platform. The first two patches fix existing warnings in preparation for adding GPIO support.

Changes in v2:
- Add patches fixing existing warnings so GPIO support does not end up adding more warnings
- Addressed Nishanth's comments on GPIO patches
- merge patches adding main and wakeup domain GPIOs into single patch
- fix commit description going over 75 chars
- fix W=2 warnings about lack of #address-cells in GPIO nodes

Faiz Abbas (2):
arm64: dts: ti: k3-j7200: Add gpio nodes
arm64: dts: ti: k3-j7200-common-proc-board: Disable unused gpio
modules

Sekhar Nori (2):
arm64: dts: ti: k3: squelch warning about lack of #interrupt-cells
arm64: dts: ti: k3: squelch warnings regarding no #address-cells for
interrupt-controller

 arch/arm64/boot/dts/ti/k3-am65-main.dtsi      |  6 ++
 arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi    |  2 +
 .../arm64/boot/dts/ti/k3-am654-base-board.dts |  1 +
 .../dts/ti/k3-j7200-common-proc-board.dts     | 16 ++++
 arch/arm64/boot/dts/ti/k3-j7200-main.dtsi     | 75 +++++++++++++++++++
 .../boot/dts/ti/k3-j7200-mcu-wakeup.dtsi      | 35 +++++++++
 .../dts/ti/k3-j721e-common-proc-board.dts     |  1 +
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     | 12 +++
 .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi      |  3 +
 9 files changed, 151 insertions(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/4 arm64: dts: ti: k3: squelch warning about lack of #interrupt-cells

There are couple of places where INTA interrupt controller lacks #interrupt-cells property. This leads to warnings of the type:

arch/arm64/boot/dts/ti/k3-j721e-main.dtsi:147.51-156.5: Warning (interrupt_provider): /bus@100000/main-navss/interrupt-controller@33d00000: Missing #interrupt-cells in interrupt provider

When building TI device-tree files with W=2 warning level. Fix these.

---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi  | 1 +
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
index 3eeb6e9876db..aa8725db0187 100644
@@ -473,6 +473,7 @@
 			interrupt-controller;
 			interrupt-parent = <&intr_main_navss>;
 			msi-controller;
+			#interrupt-cells = <0>;
 			ti,sci = <&dmsc>;
 			ti,sci-dev-id = <179>;
 			ti,interrupt-ranges = <0 0 256>;
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +1 -0
index e2a96b2c423c..ffedd9531362 100644
@@ -148,6 +148,7 @@
 			interrupt-controller;
 			interrupt-parent = <&main_navss_intr>;
 			msi-controller;
+			#interrupt-cells = <0>;
 			ti,sci = <&dmsc>;
 			ti,sci-dev-id = <209>;
 			ti,interrupt-ranges = <0 0 256>;
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/4 arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

In reply to Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
 arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
 arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
 arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
 arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
 arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
 arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
 8 files changed, 27 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +5 -0
index aa8725db0187..55aaa1404d7d 100644
@@ -440,6 +440,7 @@
 		interrupt-controller;
 		interrupt-parent = <&gic500>;
 		#interrupt-cells = <1>;
+		#address-cells = <0>;
 		ti,sci = <&dmsc>;
 		ti,sci-dev-id = <100>;
 		ti,interrupt-ranges = <0 392 32>;
@@ -461,6 +462,7 @@
 			interrupt-controller;
 			interrupt-parent = <&gic500>;
 			#interrupt-cells = <1>;
+			#address-cells = <0>;
 			ti,sci = <&dmsc>;
 			ti,sci-dev-id = <182>;
 			ti,interrupt-ranges = <0 64 64>,
@@ -474,6 +476,7 @@
 			interrupt-parent = <&intr_main_navss>;
 			msi-controller;
 			#interrupt-cells = <0>;
+			#address-cells = <0>;
 			ti,sci = <&dmsc>;
 			ti,sci-dev-id = <179>;
 			ti,interrupt-ranges = <0 0 256>;
@@ -670,6 +673,7 @@
 		interrupts = <192>, <193>, <194>, <195>, <196>, <197>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <96>;
 		ti,davinci-gpio-unbanked = <0>;
 		clocks = <&k3_clks 57 0>;
@@ -685,6 +689,7 @@
 		interrupts = <200>, <201>, <202>, <203>, <204>, <205>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <90>;
 		ti,davinci-gpio-unbanked = <0>;
 		clocks = <&k3_clks 58 0>;
arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi +2 -0
index ed42f13e7663..7fe5782a1f79 100644
@@ -75,6 +75,7 @@
 		interrupt-controller;
 		interrupt-parent = <&gic500>;
 		#interrupt-cells = <1>;
+		#address-cells = <0>;
 		ti,sci = <&dmsc>;
 		ti,sci-dev-id = <156>;
 		ti,interrupt-ranges = <0 712 16>;
@@ -89,6 +90,7 @@
 		interrupts = <60>, <61>, <62>, <63>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <56>;
 		ti,davinci-gpio-unbanked = <0>;
 		clocks = <&k3_clks 59 0>;
arch/arm64/boot/dts/ti/k3-am654-base-board.dts +1 -0
index d12dd89f3405..376de272cb4e 100644
@@ -236,6 +236,7 @@
 		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 	};
 };
 
arch/arm64/boot/dts/ti/k3-j7200-main.dtsi +3 -0
index 72d6496e88dd..d07081b20aee 100644
@@ -67,6 +67,7 @@
 		interrupt-controller;
 		interrupt-parent = <&gic500>;
 		#interrupt-cells = <1>;
+		#address-cells = <0>;
 		ti,sci = <&dmsc>;
 		ti,sci-dev-id = <131>;
 		ti,interrupt-ranges = <8 392 56>;
@@ -85,6 +86,7 @@
 			interrupt-controller;
 			interrupt-parent = <&gic500>;
 			#interrupt-cells = <1>;
+			#address-cells = <0>;
 			ti,sci = <&dmsc>;
 			ti,sci-dev-id = <213>;
 			ti,interrupt-ranges = <0 64 64>,
@@ -97,6 +99,7 @@
 			reg = <0x00 0x33d00000 0x00 0x100000>;
 			interrupt-controller;
 			#interrupt-cells = <0>;
+			#address-cells = <0>;
 			interrupt-parent = <&main_navss_intr>;
 			msi-controller;
 			ti,sci = <&dmsc>;
arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi +1 -0
index eb2a78a53512..4801876bd107 100644
@@ -102,6 +102,7 @@
 		interrupt-controller;
 		interrupt-parent = <&gic500>;
 		#interrupt-cells = <1>;
+		#address-cells = <0>;
 		ti,sci = <&dmsc>;
 		ti,sci-dev-id = <137>;
 		ti,interrupt-ranges = <16 960 16>;
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +1 -0
index 52e121155563..0490cb15f0c9 100644
@@ -442,6 +442,7 @@
 		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 	};
 };
 
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +11 -0
index ffedd9531362..7f44692e15ec 100644
@@ -114,6 +114,7 @@
 		interrupt-controller;
 		interrupt-parent = <&gic500>;
 		#interrupt-cells = <1>;
+		#address-cells = <0>;
 		ti,sci = <&dmsc>;
 		ti,sci-dev-id = <131>;
 		ti,interrupt-ranges = <8 392 56>;
@@ -135,6 +136,7 @@
 			interrupt-controller;
 			interrupt-parent = <&gic500>;
 			#interrupt-cells = <1>;
+			#address-cells = <0>;
 			ti,sci = <&dmsc>;
 			ti,sci-dev-id = <213>;
 			ti,interrupt-ranges = <0 64 64>,
@@ -149,6 +151,7 @@
 			interrupt-parent = <&main_navss_intr>;
 			msi-controller;
 			#interrupt-cells = <0>;
+			#address-cells = <0>;
 			ti,sci = <&dmsc>;
 			ti,sci-dev-id = <209>;
 			ti,interrupt-ranges = <0 0 256>;
@@ -948,6 +951,7 @@
 			     <260>, <261>, <262>, <263>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <128>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
@@ -964,6 +968,7 @@
 		interrupts = <288>, <289>, <290>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <36>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 106 TI_SCI_PD_EXCLUSIVE>;
@@ -981,6 +986,7 @@
 			     <268>, <269>, <270>, <271>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <128>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
@@ -997,6 +1003,7 @@
 		interrupts = <292>, <293>, <294>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <36>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 108 TI_SCI_PD_EXCLUSIVE>;
@@ -1014,6 +1021,7 @@
 			     <276>, <277>, <278>, <279>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <128>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 109 TI_SCI_PD_EXCLUSIVE>;
@@ -1030,6 +1038,7 @@
 		interrupts = <296>, <297>, <298>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <36>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 110 TI_SCI_PD_EXCLUSIVE>;
@@ -1047,6 +1056,7 @@
 			     <284>, <285>, <286>, <287>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <128>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
@@ -1063,6 +1073,7 @@
 		interrupts = <300>, <301>, <302>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <36>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 112 TI_SCI_PD_EXCLUSIVE>;
arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi +3 -0
index e581cb1d87ee..ed3098ed7b56 100644
@@ -102,6 +102,7 @@
 		interrupt-controller;
 		interrupt-parent = <&gic500>;
 		#interrupt-cells = <1>;
+		#address-cells = <0>;
 		ti,sci = <&dmsc>;
 		ti,sci-dev-id = <137>;
 		ti,interrupt-ranges = <16 960 16>;
@@ -116,6 +117,7 @@
 		interrupts = <103>, <104>, <105>, <106>, <107>, <108>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <84>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
@@ -132,6 +134,7 @@
 		interrupts = <112>, <113>, <114>, <115>, <116>, <117>;
 		interrupt-controller;
 		#interrupt-cells = <2>;
+		#address-cells = <0>;
 		ti,ngpio = <84>;
 		ti,davinci-gpio-unbanked = <0>;
 		power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Hi Rob,

Quoted 27 lines · Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
  arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
  arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
  arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
  arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
  arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
  arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
  arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
  arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
  8 files changed, 27 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +0 -0
index aa8725db0187..55aaa1404d7d 100644

arch/arm64/boot/dts/ti/k3-am65-main.dtsi line 443

Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
@@ -440,6 +440,7 @@
  		interrupt-controller;
  		interrupt-parent = <&gic500>;
  		#interrupt-cells = <1>;
+		#address-cells = <0>;

Does it really required or mandatory to have #address-cells = <0>; defined for interrupt-controller DT nodes which do not have child nodes and no "interrupt-map"?

Signature · 2 lines
Best regards,
grygorii
maintainer
#4 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Quoted 25 lines · Grygorii Strashko

Hi Rob,

Quoted 22 lines · Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
  arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
  arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
  arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
  arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
  arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
  arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
  arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
  arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
  8 files changed, 27 insertions(+)
Quoted 11 lines

arch/arm64/boot/dts/ti/k3-am65-main.dtsi line 443

Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
index aa8725db0187..55aaa1404d7d 100644
@@ -440,6 +440,7 @@
  		interrupt-controller;
  		interrupt-parent = <&gic500>;
  		#interrupt-cells = <1>;
+		#address-cells = <0>;

Does it really required or mandatory to have #address-cells = <0>; defined for interrupt-controller DT nodes which do not have child nodes and no "interrupt-map"?

Just to help clarify (I could be mistaken as well): is'nt the interrupt map for user interrupt map nodes that refer to this interrupt controller node to state they dont need a parent address specifier - so are we claiming none of the users will have an interrupt-map (now and never in the future as well) - we we might want to explain why we think that is the case, and if we are expecting dtc to deduce that (if so how?)?

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#5 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Quoted 38 lines · Nishanth Menon
Quoted 25 lines · Grygorii Strashko

Hi Rob,

Quoted 22 lines · Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
   arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
   arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
   arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
   arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
   arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
   arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
   8 files changed, 27 insertions(+)
Quoted 11 lines

arch/arm64/boot/dts/ti/k3-am65-main.dtsi line 443

Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
index aa8725db0187..55aaa1404d7d 100644
@@ -440,6 +440,7 @@
   		interrupt-controller;
   		interrupt-parent = <&gic500>;
   		#interrupt-cells = <1>;
+		#address-cells = <0>;

Does it really required or mandatory to have #address-cells = <0>; defined for interrupt-controller DT nodes which do not have child nodes and no "interrupt-map"?

Quoted 8 lines

Just to help clarify (I could be mistaken as well): is'nt the interrupt map for user interrupt map nodes that refer to this interrupt controller node to state they dont need a parent address specifier - so are we claiming none of the users will have an interrupt-map (now and never in the future as well) - we we might want to explain why we think that is the case, and if we are expecting dtc to deduce that (if so how?)?

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

And there is no "never" here - #address-cells always can be added if really required.

Signature · 2 lines
Best regards,
grygorii
maintainer
#6 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Punting over to Rob and DT team's wisdom..

Quoted 50 lines · Grygorii Strashko
Quoted 38 lines · Nishanth Menon
Quoted 25 lines · Grygorii Strashko

Hi Rob,

Quoted 22 lines · Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
   arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
   arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
   arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
   arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
   arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
   arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
   8 files changed, 27 insertions(+)
Quoted 11 lines

arch/arm64/boot/dts/ti/k3-am65-main.dtsi line 443

Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
index aa8725db0187..55aaa1404d7d 100644
@@ -440,6 +440,7 @@
   		interrupt-controller;
   		interrupt-parent = <&gic500>;
   		#interrupt-cells = <1>;
+		#address-cells = <0>;

Does it really required or mandatory to have #address-cells = <0>; defined for interrupt-controller DT nodes which do not have child nodes and no "interrupt-map"?

Quoted 8 lines

Just to help clarify (I could be mistaken as well): is'nt the interrupt map for user interrupt map nodes that refer to this interrupt controller node to state they dont need a parent address specifier - so are we claiming none of the users will have an interrupt-map (now and never in the future as well) - we we might want to explain why we think that is the case, and if we are expecting dtc to deduce that (if so how?)?

Quoted 6 lines

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

And there is no "never" here - #address-cells always can be added if really required.

OK - as a GPIO node, but as an interrupt-controller node, I was looking at [1] and wondering if that was the precedence.

Yes, will be good to get direction from the DT maintainers on this topic.

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/interrupt-controller/open-pic.txt

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#7 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Quoted 58 lines · Nishanth Menon

Punting over to Rob and DT team's wisdom..

Quoted 55 lines · Grygorii Strashko
Quoted 38 lines · Nishanth Menon
Quoted 25 lines · Grygorii Strashko

Hi Rob,

Quoted 22 lines · Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
   arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
   arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
   arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
   arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
   arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
   arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
   8 files changed, 27 insertions(+)
Quoted 11 lines

arch/arm64/boot/dts/ti/k3-am65-main.dtsi line 443

Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
index aa8725db0187..55aaa1404d7d 100644
@@ -440,6 +440,7 @@
   		interrupt-controller;
   		interrupt-parent = <&gic500>;
   		#interrupt-cells = <1>;
+		#address-cells = <0>;

Does it really required or mandatory to have #address-cells = <0>; defined for interrupt-controller DT nodes which do not have child nodes and no "interrupt-map"?

Quoted 8 lines

Just to help clarify (I could be mistaken as well): is'nt the interrupt map for user interrupt map nodes that refer to this interrupt controller node to state they dont need a parent address specifier - so are we claiming none of the users will have an interrupt-map (now and never in the future as well) - we we might want to explain why we think that is the case, and if we are expecting dtc to deduce that (if so how?)?

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

Quoted 8 lines
Quoted 1 line

And there is no "never" here - #address-cells always can be added if really required.

OK - as a GPIO node, but as an interrupt-controller node, I was looking at [1] and wondering if that was the precedence.

Yes, will be good to get direction from the DT maintainers on this topic.

Shall I respin this series with 2/4 dropped while we wait for decision on this?

#address-cells warnings on interrupt controller can perhaps be handled all at once (there are many of those in existing DT anyway).

GPIO is basic support and holds up many other modules (like MMC/SD).

Thanks,
Sekhar

maintainer
#8 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Quoted 14 lines · Sekhar Nori
Quoted 5 lines
Quoted 5 lines

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

Quoted 8 lines
Quoted 1 line

And there is no "never" here - #address-cells always can be added if really required.

OK - as a GPIO node, but as an interrupt-controller node, I was looking at [1] and wondering if that was the precedence.

Yes, will be good to get direction from the DT maintainers on this topic.

Quoted 7 lines

Shall I respin this series with 2/4 dropped while we wait for decision on this?

#address-cells warnings on interrupt controller can perhaps be handled all at once (there are many of those in existing DT anyway).

GPIO is basic support and holds up many other modules (like MMC/SD).

There are'nt too many new patches in my queue that depends on GPIO, I'd rather not introduce new warnings unless we are completely at a stalemate. I'd rather use this opportunity to understand where what we need to be doing.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#9 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Quoted 21 lines · Nishanth Menon
Quoted 20 lines · Sekhar Nori
Quoted 5 lines
Quoted 5 lines

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

Quoted 8 lines
Quoted 1 line

And there is no "never" here - #address-cells always can be added if really required.

OK - as a GPIO node, but as an interrupt-controller node, I was looking at [1] and wondering if that was the precedence.

Yes, will be good to get direction from the DT maintainers on this topic.

Shall I respin this series with 2/4 dropped while we wait for decision on this?

#address-cells warnings on interrupt controller can perhaps be handled all at once (there are many of those in existing DT anyway).

Quoted 7 lines
Quoted 1 line

GPIO is basic support and holds up many other modules (like MMC/SD).

There are'nt too many new patches in my queue that depends on GPIO, I'd rather not introduce new warnings unless we are completely at a stalemate. I'd rather use this opportunity to understand where what we need to be doing.

GPIO was originally submitted as part of 8 patch series titled "[PATCH 0/8] Add support for UHS modes in TI's J721e and J7200 boards"

Rest of those patches need to be resubmitted after GPIO is accepted.

Can you apply patch 1/4 at least. Its fairly non-controversial. It will help reduce patch backlog and fix some warnings too.

Thanks,
Sekhar

maintainer
#10 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Quoted 29 lines · Sekhar Nori
Quoted 21 lines · Nishanth Menon
Quoted 20 lines · Sekhar Nori
Quoted 5 lines
Quoted 5 lines

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

Quoted 8 lines
Quoted 1 line

And there is no "never" here - #address-cells always can be added if really required.

OK - as a GPIO node, but as an interrupt-controller node, I was looking at [1] and wondering if that was the precedence.

Yes, will be good to get direction from the DT maintainers on this topic.

Shall I respin this series with 2/4 dropped while we wait for decision on this?

#address-cells warnings on interrupt controller can perhaps be handled all at once (there are many of those in existing DT anyway).

Quoted 7 lines
Quoted 1 line

GPIO is basic support and holds up many other modules (like MMC/SD).

There are'nt too many new patches in my queue that depends on GPIO, I'd rather not introduce new warnings unless we are completely at a stalemate. I'd rather use this opportunity to understand where what we need to be doing.

Quoted 7 lines

GPIO was originally submitted as part of 8 patch series titled "[PATCH 0/8] Add support for UHS modes in TI's J721e and J7200 boards"

Rest of those patches need to be resubmitted after GPIO is accepted.

Can you apply patch 1/4 at least. Its fairly non-controversial. It will help reduce patch backlog and fix some warnings too.

I see that Grygorii is suggesting 1,3,4 to be pulled in. can you repost with just the required patches alone and pick up the reviewed-bys?

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#11 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Hi Rob, Grygorii,

Quoted 11 lines · Nishanth Menon
Quoted 10 lines · Sekhar Nori
Quoted 9 lines · Nishanth Menon
Quoted 8 lines · Sekhar Nori
Quoted 8 lines
Quoted 6 lines

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

And there is no "never" here - #address-cells always can be added if really required.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

OK - as a GPIO node, but as an interrupt-controller node, I was looking at [1] and wondering if that was the precedence.

Yes, will be good to get direction from the DT maintainers on this topic.

Is there a conclusion on this topic? Without adding address-cells for interrupt controller we will be introducing new warning for all the new nodes we are adding.

Thanks and regards,
Lokesh

maintainer
#12 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

In reply to Grygorii Strashko
Quoted 50 lines · Grygorii Strashko
Quoted 38 lines · Nishanth Menon
Quoted 25 lines · Grygorii Strashko

Hi Rob,

Quoted 22 lines · Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
   arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
   arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
   arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
   arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
   arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
   arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
   8 files changed, 27 insertions(+)
Quoted 11 lines

arch/arm64/boot/dts/ti/k3-am65-main.dtsi line 443

Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
index aa8725db0187..55aaa1404d7d 100644
@@ -440,6 +440,7 @@
   		interrupt-controller;
   		interrupt-parent = <&gic500>;
   		#interrupt-cells = <1>;
+		#address-cells = <0>;

Does it really required or mandatory to have #address-cells = <0>; defined for interrupt-controller DT nodes which do not have child nodes and no "interrupt-map"?

Quoted 8 lines

Just to help clarify (I could be mistaken as well): is'nt the interrupt map for user interrupt map nodes that refer to this interrupt controller node to state they dont need a parent address specifier - so are we claiming none of the users will have an interrupt-map (now and never in the future as well) - we we might want to explain why we think that is the case, and if we are expecting dtc to deduce that (if so how?)?

Quoted 6 lines

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

And there is no "never" here - #address-cells always can be added if really required.

Once required, how does one figure that out? It's not obvious and requires booting. So we need something at build time. I'm okay with loosening the check as long as it warns when a interrupt parent phandle in an interrupt-map is missing '#address-cells'.

Now that I look back at the dtc change, I'm now confused why this check got applied. Both David and I wanted changes in regards to #address-cells. Either a separate check or part of interrupt-map checks. And the interrupt-map check never got applied. Andre?

Rob

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#13 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

On Mon, 25 Jan 2021 18:01:08 -0600
Rob Herring <[email protected]> wrote:

Hi,

Quoted 56 lines · Grygorii Strashko
Quoted 55 lines · Nishanth Menon
Quoted 38 lines · Grygorii Strashko
Quoted 25 lines

Hi Rob,

Quoted 22 lines · Sekhar Nori

With dtc 1.6.0, building TI device-tree files with W=2 results in warnings like below for all interrupt controllers.

/bus@100000/bus@30000000/interrupt-controller1: Missing #address-cells in interrupt provider

Fix these by adding #address-cells = <0>; for all interrupt controllers in TI device-tree files. Any other #address-cells value is really only needed if interrupt-map property is being used (which is not the case for existing TI device-tree files)

---
   arch/arm64/boot/dts/ti/k3-am65-main.dtsi              |  5 +++++
   arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi            |  2 ++
   arch/arm64/boot/dts/ti/k3-am654-base-board.dts        |  1 +
   arch/arm64/boot/dts/ti/k3-j7200-main.dtsi             |  3 +++
   arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi       |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts |  1 +
   arch/arm64/boot/dts/ti/k3-j721e-main.dtsi             | 11 +++++++++++
   arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi       |  3 +++
   8 files changed, 27 insertions(+)
Quoted 11 lines

arch/arm64/boot/dts/ti/k3-am65-main.dtsi line 443

Quoted 9 lines
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -0
index aa8725db0187..55aaa1404d7d 100644
@@ -440,6 +440,7 @@
   		interrupt-controller;
   		interrupt-parent = <&gic500>;
   		#interrupt-cells = <1>;
+		#address-cells = <0>;  

Does it really required or mandatory to have #address-cells = <0>; defined for interrupt-controller DT nodes which do not have child nodes and no "interrupt-map"?

Quoted 8 lines

Just to help clarify (I could be mistaken as well): is'nt the interrupt map for user interrupt map nodes that refer to this interrupt controller node to state they dont need a parent address specifier - so are we claiming none of the users will have an interrupt-map (now and never in the future as well) - we we might want to explain why we think that is the case, and if we are expecting dtc to deduce that (if so how?)?

The main reason I commented - is hope to get some clarification from DT maintainers.
90% of interrupt-controller nodes do not have #address-cells and I never seen in in GPIO nodes
(most often is present in PCI and GIC nodes).
and nobody seems fixing it. So, if we are going to move this direction it's reasonable to get clarification to be sure.

Quoted 6 lines
Quoted 1 line

And there is no "never" here - #address-cells always can be added if really required.

Once required, how does one figure that out? It's not obvious and requires booting. So we need something at build time. I'm okay with loosening the check as long as it warns when a interrupt parent phandle in an interrupt-map is missing '#address-cells'.

So I think the rationale for requiring #address-cells is that the usage of an interrupt in an interrupt-map can be totally disconnected from the actual interrupt controller node. Typically the controller is in the .dtsi, but an interrupt map could be anywhere, down in some board .dts, or even some "common peripherals" intermediate .dts. Possibly even in an overlay (I2C IRQ lines?).

So while not having this property works today, for your board, it might surprisingly break for someone else. And those things are hard to find (unless you know what you are looking for).
Been there, done that with the VExpress DTs, and that was the reason I pushed for more tests.

On top of that is the standard's default value of "2" for #address-cells, which Linux observes in this case. That leads to somewhat surprising results when interpreting interrupt-maps without an explicit #address-cells (cost me a few hours to figure out back then!)

So given the already somewhat complicated nature of interrupt-maps I think it's comparably little to ask for explicit #address-cells properties, even though you might not immediately benefit from it.

Quoted 4 lines

Now that I look back at the dtc change, I'm now confused why this check got applied. Both David and I wanted changes in regards to #address-cells. Either a separate check or part of interrupt-map checks. And the interrupt-map check never got applied. Andre?

Yeah, I somewhat dropped the ball on this, after some iterations and a partial merge. Will put it on my list to revive this.

Cheers,
Andre.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#14 lore raw

Re: [PATCH v2 2/4] arm64: dts: ti: k3: squelch warnings regarding no #address-cells for interrupt-controller

Andre, Rob,

Quoted 7 lines · Andre Przywara
Quoted 4 lines

Now that I look back at the dtc change, I'm now confused why this check got applied. Both David and I wanted changes in regards to #address-cells. Either a separate check or part of interrupt-map checks. And the interrupt-map check never got applied. Andre?

Yeah, I somewhat dropped the ball on this, after some iterations and a partial merge. Will put it on my list to revive this.

I was hoping we made some steps, but I did see [1] as well and it is possible that I am missing some discussion, but it is starting to get W=2 builds warnings noisy enough to start interfering with discovering real problems as we keep adding new stuff in.. Just wondering...

[1] https://lore.kernel.org/linux-devicetree/CAL_Jsq++DyiKG9smQGx9FAPDJnVrezcXNb0Y5uh-5_2GBzTQpQ@mail.gmail.com/
[2] https://pastebin.ubuntu.com/p/ns6hPCBxVM/

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#15 lore raw

PATCH v2 3/4 arm64: dts: ti: k3-j7200: Add gpio nodes

In reply to Sekhar Nori

From: Faiz Abbas <[email protected]>

There are 4 instances of gpio modules in main domain:
gpio0, gpio2, gpio4 and gpio6

Groups are created to provide protection between different processor virtual worlds. Each of these modules I/O pins are muxed within the group. Exactly one module can be selected to control the corresponding pin by selecting it in the pad mux configuration registers.

This group pins out 69 lines (5 banks). Add DT modes for each module instance in the main domain.

Similar to the gpio groups in main domain, there is one gpio group in wakeup domain with 2 mdoules instances in it.

The gpio group pins out 73 pins (5 banks). Add DT nodes for each module instance in the wakeup domain.

---
 arch/arm64/boot/dts/ti/k3-j7200-main.dtsi     | 72 +++++++++++++++++++
 .../boot/dts/ti/k3-j7200-mcu-wakeup.dtsi      | 34 +++++++++
 2 files changed, 106 insertions(+)
arch/arm64/boot/dts/ti/k3-j7200-main.dtsi +72 -0
index d07081b20aee..b313b895fd31 100644
@@ -449,4 +449,76 @@
 			dr_mode = "otg";
 		};
 	};
+
+	main_gpio0: gpio@600000 {
+		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+		reg = <0x00 0x00600000 0x00 0x100>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&main_gpio_intr>;
+		interrupts = <145>, <146>, <147>, <148>,
+			     <149>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		#address-cells = <0>;
+		ti,ngpio = <69>;
+		ti,davinci-gpio-unbanked = <0>;
+		power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 105 0>;
+		clock-names = "gpio";
+	};
+
+	main_gpio2: gpio@610000 {
+		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+		reg = <0x00 0x00610000 0x00 0x100>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&main_gpio_intr>;
+		interrupts = <154>, <155>, <156>, <157>,
+			     <158>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		#address-cells = <0>;
+		ti,ngpio = <69>;
+		ti,davinci-gpio-unbanked = <0>;
+		power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 107 0>;
+		clock-names = "gpio";
+	};
+
+	main_gpio4: gpio@620000 {
+		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+		reg = <0x00 0x00620000 0x00 0x100>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&main_gpio_intr>;
+		interrupts = <163>, <164>, <165>, <166>,
+			     <167>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		#address-cells = <0>;
+		ti,ngpio = <69>;
+		ti,davinci-gpio-unbanked = <0>;
+		power-domains = <&k3_pds 109 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 109 0>;
+		clock-names = "gpio";
+	};
+
+	main_gpio6: gpio@630000 {
+		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+		reg = <0x00 0x00630000 0x00 0x100>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&main_gpio_intr>;
+		interrupts = <172>, <173>, <174>, <175>,
+			     <176>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		#address-cells = <0>;
+		ti,ngpio = <69>;
+		ti,davinci-gpio-unbanked = <0>;
+		power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 111 0>;
+		clock-names = "gpio";
+	};
 };
arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi +34 -0
index 4801876bd107..a09e2157d80f 100644
@@ -108,6 +108,40 @@
 		ti,interrupt-ranges = <16 960 16>;
 	};
 
+	wkup_gpio0: gpio@42110000 {
+		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+		reg = <0x00 0x42110000 0x00 0x100>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&wkup_gpio_intr>;
+		interrupts = <103>, <104>, <105>, <106>, <107>, <108>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		#address-cells = <0>;
+		ti,ngpio = <73>;
+		ti,davinci-gpio-unbanked = <0>;
+		power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 113 0>;
+		clock-names = "gpio";
+	};
+
+	wkup_gpio1: gpio@42100000 {
+		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
+		reg = <0x00 0x42100000 0x00 0x100>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-parent = <&wkup_gpio_intr>;
+		interrupts = <112>, <113>, <114>, <115>, <116>, <117>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		#address-cells = <0>;
+		ti,ngpio = <73>;
+		ti,davinci-gpio-unbanked = <0>;
+		power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 114 0>;
+		clock-names = "gpio";
+	};
+
 	mcu_navss: bus@28380000 {
 		compatible = "simple-mfd";
 		#address-cells = <2>;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#16 lore raw

PATCH v2 4/4 arm64: dts: ti: k3-j7200-common-proc-board: Disable unused gpio modules

In reply to Sekhar Nori

From: Faiz Abbas <[email protected]>

There are 6 gpio instances inside SoC with 2 groups as show below:
Group one: wkup_gpio0, wkup_gpio1
Group two: main_gpio0, main_gpio2, main_gpio4, main_gpio6

Only one instance from each group can be used at a time. So use main_gpio0 and wkup_gpio0 in current linux context and disable the rest of the nodes.

---
 .../boot/dts/ti/k3-j7200-common-proc-board.dts   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts +16 -0
index ef03e7636b66..0bc4170225d5 100644
@@ -127,6 +127,22 @@
 	status = "disabled";
 };
 
+&main_gpio2 {
+	status = "disabled";
+};
+
+&main_gpio4 {
+	status = "disabled";
+};
+
+&main_gpio6 {
+	status = "disabled";
+};
+
+&wkup_gpio1 {
+	status = "disabled";
+};
+
 &mcu_cpsw {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
Signature · 1 line
2.17.1
Reviewed-by on the v2 series
#17 lore raw
In reply to Sekhar Nori
Quoted 24 lines · Sekhar Nori

These patches add gpio support for TI's J7200 platform. The first two patches fix existing warnings in preparation for adding GPIO support.

Changes in v2:
- Add patches fixing existing warnings so GPIO support does not end up adding more warnings
- Addressed Nishanth's comments on GPIO patches
- merge patches adding main and wakeup domain GPIOs into single patch
- fix commit description going over 75 chars
- fix W=2 warnings about lack of #address-cells in GPIO nodes

Faiz Abbas (2):
arm64: dts: ti: k3-j7200: Add gpio nodes
arm64: dts: ti: k3-j7200-common-proc-board: Disable unused gpio
modules

Sekhar Nori (2):
arm64: dts: ti: k3: squelch warning about lack of #interrupt-cells
arm64: dts: ti: k3: squelch warnings regarding no #address-cells for
interrupt-controller

Quoted 11 lines
  arch/arm64/boot/dts/ti/k3-am65-main.dtsi      |  6 ++
  arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi    |  2 +
  .../arm64/boot/dts/ti/k3-am654-base-board.dts |  1 +
  .../dts/ti/k3-j7200-common-proc-board.dts     | 16 ++++
  arch/arm64/boot/dts/ti/k3-j7200-main.dtsi     | 75 +++++++++++++++++++
  .../boot/dts/ti/k3-j7200-mcu-wakeup.dtsi      | 35 +++++++++
  .../dts/ti/k3-j721e-common-proc-board.dts     |  1 +
  arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     | 12 +++
  .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi      |  3 +
  9 files changed, 151 insertions(+)

For patches 1,3,4

Signature · 2 lines
Best regards,
grygorii