Skip to contentSkip to conversation

dt-bindings: i2c: renesas,riic: Add interrupt-names

PATCH In review Geert Uytterhoeven 5 participants 11 messages Jul 14, 2021 – Aug 11, 2021

Subsystems (4)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover dt-bindings: i2c: renesas,riic: Add interrupt-names

Hi all,

The Renesas RZ/A and RZ/G2L I2C Bus Interface has no less than 8 interrupts. So I think it makes sense to use "interrupt-names" property, to make it easier to review the interrupt mappings in DTS files.

Hence this series documents the "interrupt-names" property in the DT bindings, adds the property to the DTS files, and marks it required in the DT bindings. Obviously the last step cannot be applied until all earlier patches are upstream.

What do you think?
Thanks for your comments!

Geert Uytterhoeven (4):
dt-bindings: i2c: renesas,riic: Add interrupt-names
ARM: dts: rza: Add I2C interrupt-names
arm64: dts: renesas: r9a07g044: Add I2C interrupt-names
dt-bindings: i2c: renesas,riic: Make interrupt-names required

 .../devicetree/bindings/i2c/renesas,riic.yaml | 30 ++++++++++++++-----
 arch/arm/boot/dts/r7s72100.dtsi               |  8 +++++
 arch/arm/boot/dts/r7s9210.dtsi                |  8 +++++
 arch/arm64/boot/dts/renesas/r9a07g044.dtsi    |  8 +++++
 4 files changed, 46 insertions(+), 8 deletions(-)
Signature · 12 lines
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
author maintainer
#1 lore raw

PATCH 1/4 dt-bindings: i2c: renesas,riic: Add interrupt-names

The Renesas RZ/A and RZ/G2L I2C Bus Interface has no less than 8 interrupts. Hence document the "interrupt-names" property, to make it easier to review the interrupt mappings in DTS files.

Note that this property cannot be made required yet, as the RIIC nodes in all DTS files lack the property.

---
 .../devicetree/bindings/i2c/renesas,riic.yaml | 29 ++++++++++++++-----
 1 file changed, 21 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/i2c/renesas,riic.yaml +21 -8
index 52d92ec7ec0b2112..70f998f006305c25 100644
@@ -27,14 +27,25 @@ properties:
 
   interrupts:
     items:
-      - description: Transmit End Interrupt (TEI)
-      - description: Receive Data Full Interrupt (RI)
-      - description: Transmit Data Empty Interrupt (TI)
-      - description: Stop Condition Detection Interrupt (SPI)
-      - description: Start Condition Detection Interrupt (STI)
-      - description: NACK Reception Interrupt (NAKI)
-      - description: Arbitration-Lost Interrupt (ALI)
-      - description: Timeout Interrupt (TMOI)
+      - description: Transmit End Interrupt
+      - description: Receive Data Full Interrupt
+      - description: Transmit Data Empty Interrupt
+      - description: Stop Condition Detection Interrupt
+      - description: Start Condition Detection Interrupt
+      - description: NACK Reception Interrupt
+      - description: Arbitration-Lost Interrupt
+      - description: Timeout Interrupt
+
+  interrupt-names:
+    items:
+      - const: tei
+      - const: ri
+      - const: ti
+      - const: spi
+      - const: sti
+      - const: naki
+      - const: ali
+      - const: tmoi
 
   clock-frequency:
     description:
@@ -85,6 +96,8 @@ examples:
                          <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
                          <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
                          <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+            interrupt-names = "tei", "ri", "ti", "spi", "sti", "naki", "ali",
+                              "tmoi";
             clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
             clock-frequency = <100000>;
             power-domains = <&cpg_clocks>;
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/4
#2 lore raw
Quoted 4 lines · Geert Uytterhoeven

The Renesas RZ/A and RZ/G2L I2C Bus Interface has no less than 8 interrupts. Hence document the "interrupt-names" property, to make it easier to review the interrupt mappings in DTS files.

Quoted 8 lines

Note that this property cannot be made required yet, as the RIIC nodes in all DTS files lack the property.

---
 .../devicetree/bindings/i2c/renesas,riic.yaml | 29 ++++++++++++++-----
 1 file changed, 21 insertions(+), 8 deletions(-)
author maintainer
#3 lore raw

PATCH 2/4 ARM: dts: rza: Add I2C interrupt-names

In reply to Geert Uytterhoeven

Add "interrupt-names" properties to the I2C device nodes of the RZ/A1H and RZ/A2M DTS files, to make it easier to review the interrupt mappings.

---
 arch/arm/boot/dts/r7s72100.dtsi | 8 ++++++++
 arch/arm/boot/dts/r7s9210.dtsi  | 8 ++++++++
 2 files changed, 16 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +8 -0
index 45cf75b5824cbe7f..b07b71307f24ad59 100644
@@ -608,6 +608,8 @@ i2c0: i2c@fcfee000 {
 				     <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
 			clock-frequency = <100000>;
 			power-domains = <&cpg_clocks>;
@@ -627,6 +629,8 @@ i2c1: i2c@fcfee400 {
 				     <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&mstp9_clks R7S72100_CLK_I2C1>;
 			clock-frequency = <100000>;
 			power-domains = <&cpg_clocks>;
@@ -646,6 +650,8 @@ i2c2: i2c@fcfee800 {
 				     <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&mstp9_clks R7S72100_CLK_I2C2>;
 			clock-frequency = <100000>;
 			power-domains = <&cpg_clocks>;
@@ -665,6 +671,8 @@ i2c3: i2c@fcfeec00 {
 				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&mstp9_clks R7S72100_CLK_I2C3>;
 			clock-frequency = <100000>;
 			power-domains = <&cpg_clocks>;
arch/arm/boot/dts/r7s9210.dtsi +8 -0
index 85c0399b1339585b..fdeb0bc12cb794d6 100644
@@ -236,6 +236,8 @@ i2c0: i2c@e803a000 {
 				     <GIC_SPI 237 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD 87>;
 			power-domains = <&cpg>;
 			clock-frequency = <100000>;
@@ -255,6 +257,8 @@ i2c1: i2c@e803a400 {
 				     <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD 86>;
 			power-domains = <&cpg>;
 			clock-frequency = <100000>;
@@ -274,6 +278,8 @@ i2c2: i2c@e803a800 {
 				     <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD 85>;
 			power-domains = <&cpg>;
 			clock-frequency = <100000>;
@@ -293,6 +299,8 @@ i2c3: i2c@e803ac00 {
 				     <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD 84>;
 			power-domains = <&cpg>;
 			clock-frequency = <100000>;
Signature · 1 line
2.25.1
author maintainer
#4 lore raw

PATCH 3/4 arm64: dts: renesas: r9a07g044: Add I2C interrupt-names

In reply to Geert Uytterhoeven

Add "interrupt-names" properties to the I2C device nodes, to make it easier to review the interrupt mappings.

---
 arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/renesas/r9a07g044.dtsi +8 -0
index 9a7489dc70d10882..0dd181739fdfc0f6 100644
@@ -102,6 +102,8 @@ i2c0: i2c@10058000 {
 				     <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C0_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C0_MRST>;
@@ -122,6 +124,8 @@ i2c1: i2c@10058400 {
 				     <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 362 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C1_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C1_MRST>;
@@ -142,6 +146,8 @@ i2c2: i2c@10058800 {
 				     <GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C2_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C2_MRST>;
@@ -162,6 +168,8 @@ i2c3: i2c@10058c00 {
 				     <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C3_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C3_MRST>;
Signature · 1 line
2.25.1
Reviewed-by on v1 3/4
#5 lore raw

RE: [PATCH/RFC 3/4] arm64: dts: renesas: r9a07g044: Add I2C interrupt-names

Hi Geert,

Thanks for the patch.

Quoted 7 lines

Subject: [PATCH/RFC 3/4] arm64: dts: renesas: r9a07g044: Add I2C interrupt-names

Add "interrupt-names" properties to the I2C device nodes, to make it easier to review the interrupt mappings.

Quoted 47 lines
---
 arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/renesas/r9a07g044.dtsi +2 -0
index 9a7489dc70d10882..0dd181739fdfc0f6 100644
@@ -102,6 +102,8 @@ i2c0: i2c@10058000 {
 				     <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C0_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C0_MRST>; @@ -122,6 +124,8 @@

i2c1: i2c@10058400 {

arch/arm64/boot/dts/renesas/r9a07g044.dtsi +2 -0
 				     <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 362 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 363 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C1_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C1_MRST>; @@ -142,6 +146,8 @@

i2c2: i2c@10058800 {

arch/arm64/boot/dts/renesas/r9a07g044.dtsi +2 -0
 				     <GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C2_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C2_MRST>; @@ -162,6 +168,8 @@

i2c3: i2c@10058c00 {

arch/arm64/boot/dts/renesas/r9a07g044.dtsi +2 -1
 				     <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tei", "ri", "ti", "spi", "sti",
+					  "naki", "ali", "tmoi";
 			clocks = <&cpg CPG_MOD R9A07G044_I2C3_PCLK>;
 			clock-frequency = <100000>;
 			resets = <&cpg R9A07G044_I2C3_MRST>;
--

2.25.1

author maintainer
#6 lore raw

PATCH 4/4 dt-bindings: i2c: renesas,riic: Make interrupt-names required

In reply to Geert Uytterhoeven

Now the I2C device nodes in all DTS files have gained "interrupt-names" properties, the "interrupt-names" property can be made required.

---
 Documentation/devicetree/bindings/i2c/renesas,riic.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/renesas,riic.yaml +1 -0
index 70f998f006305c25..402fd125e0104a6a 100644
@@ -62,6 +62,7 @@ required:
   - compatible
   - reg
   - interrupts
+  - interrupt-names
   - clocks
   - clock-frequency
   - power-domains
Signature · 1 line
2.25.1
maintainer Acked-by on v1 4/4
#7 lore raw

Re: [PATCH/RFC 4/4] dt-bindings: i2c: renesas,riic: Make interrupt-names required

Quoted 8 lines · Geert Uytterhoeven

Now the I2C device nodes in all DTS files have gained "interrupt-names" properties, the "interrupt-names" property can be made required.

---
 Documentation/devicetree/bindings/i2c/renesas,riic.yaml | 1 +
 1 file changed, 1 insertion(+)
Reviewed-by on the v1 series
#8 lore raw
In reply to Geert Uytterhoeven

Hi Geert,

Quoted 11 lines

The Renesas RZ/A and RZ/G2L I2C Bus Interface has no less than 8 interrupts. So I think it makes sense to use "interrupt-names" property, to make it easier to review the interrupt mappings in DTS files.

Hence this series documents the "interrupt-names" property in the DT bindings, adds the property to the DTS files, and marks it required in the DT bindings. Obviously the last step cannot be applied until all earlier patches are upstream.

What do you think?

I like it and I'd think it is good to go. It is probably easiest if you take the series via your tree to avoid merge conflicts and/or subsystem dependencies. It's unlikely the YAML file will see further updates. So, for the series:

Let me know if you think another way is better.

Happy hacking,

Wolfram

#9 lore raw

Hi Wolfram,

Quoted 10 lines · Wolfram Sang
Quoted 10 lines

The Renesas RZ/A and RZ/G2L I2C Bus Interface has no less than 8 interrupts. So I think it makes sense to use "interrupt-names" property, to make it easier to review the interrupt mappings in DTS files.

Hence this series documents the "interrupt-names" property in the DT bindings, adds the property to the DTS files, and marks it required in the DT bindings. Obviously the last step cannot be applied until all earlier patches are upstream.

Quoted 6 lines
Quoted 1 line

What do you think?

I like it and I'd think it is good to go. It is probably easiest if you take the series via your tree to avoid merge conflicts and/or subsystem dependencies. It's unlikely the YAML file will see further updates. So, for the series:

Probably it is not worth doing this in lockstep (1/4 in v5.15 through i2c, 2/4 and 3/4 in v5.16 through renesas-devel, and 4/4 in v5.17 through i2c).
I have different branches for DT binding and DTS, but I guess it doesn't hurt to deviate and apply both to renesas-arm-dt-for-v5.15...

Quoted 1 line

Thanks!

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#10 lore raw

Hi Geert,

Quoted 3 lines

Probably it is not worth doing this in lockstep (1/4 in v5.15 through i2c, 2/4 and 3/4 in v5.16 through renesas-devel, and 4/4 in v5.17 through i2c).

I agree!

Quoted 2 lines

I have different branches for DT binding and DTS, but I guess it doesn't hurt to deviate and apply both to renesas-arm-dt-for-v5.15...

Sounds good, thanks!

All the best,

Wolfram