Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] i3c: renesas: add R-Car Gen5 support
@ 2026-12-01  9:52 Wolfram Sang
  2026-12-01  9:52 ` [PATCH 1/2] dt-bindings: i3c: renesas,i3c: " Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2026-12-01  9:52 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Alexandre Belloni, Conor Dooley, devicetree,
	Frank Li, Geert Uytterhoeven, Krzysztof Kozlowski, linux-i3c,
	Magnus Damm, Rob Herring, Tommaso Merciai

Here are the driver changes to make I3C work on R-Car Gen5 based SoCs.
Details can be found in the patch descriptions. A complete branch for
testing on the Ironhide board is here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/x5h/i3c-experimental

Looking forward to comments!

Happy hacking.


Wolfram Sang (2):
  dt-bindings: i3c: renesas,i3c: add R-Car Gen 5 support
  i3c: renesas: add R-Car Gen5 support

 .../devicetree/bindings/i3c/renesas,i3c.yaml  | 108 ++++++++++++------
 drivers/i3c/master/renesas-i3c.c              |  84 ++++++++++++--
 2 files changed, 147 insertions(+), 45 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] dt-bindings: i3c: renesas,i3c: add R-Car Gen5 support
  2026-12-01  9:52 [PATCH 0/2] i3c: renesas: add R-Car Gen5 support Wolfram Sang
@ 2026-12-01  9:52 ` Wolfram Sang
  2026-12-01 21:12   ` Frank Li
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2026-12-01  9:52 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Tommaso Merciai, Alexandre Belloni, Frank Li,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Geert Uytterhoeven, Magnus Damm, linux-i3c, devicetree

X5H is the first member of the R-Car Gen5 family. The biggest change is
that only one interrupt is used instead of many. Also, only one reset is
needed.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Passed 'dt_binding_check' and 'dtbs_check' for all users of this I3C
controller here.

 .../devicetree/bindings/i3c/renesas,i3c.yaml  | 108 ++++++++++++------
 1 file changed, 70 insertions(+), 38 deletions(-)

diff --git a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
index a20d875086d4..ceff97a5ddf7 100644
--- a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
+++ b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
@@ -22,51 +22,59 @@ properties:
               - renesas,r9a09g056-i3c # RZ/V2N
               - renesas,r9a09g057-i3c # RZ/V2H(P)
           - const: renesas,r9a09g047-i3c
+      - items:
+          - enum:
+              - renesas,r8a78000-i3c # R-Car X5H
+          - const: renesas,rcar-gen5-i3c
 
   reg:
     maxItems: 1
 
   interrupts:
-    items:
-      - description: Non-recoverable internal error interrupt
-      - description: Normal transfer error interrupt
-      - description: Normal transfer abort interrupt
-      - description: Normal response status buffer full interrupt
-      - description: Normal command buffer empty interrupt
-      - description: Normal IBI status buffer full interrupt
-      - description: Normal Rx data buffer full interrupt
-      - description: Normal Tx data buffer empty interrupt
-      - description: Normal receive status buffer full interrupt
-      - description: START condition detection interrupt
-      - description: STOP condition detection interrupt
-      - description: Transmit end interrupt
-      - description: NACK detection interrupt
-      - description: Arbitration lost interrupt
-      - description: Timeout detection interrupt
-      - description: Wake-up condition detection interrupt
-      - description: HDR Exit Pattern detection interrupt
-    minItems: 16
+    oneOf:
+      - items:
+          - description: Non-recoverable internal error interrupt
+          - description: Normal transfer error interrupt
+          - description: Normal transfer abort interrupt
+          - description: Normal response status buffer full interrupt
+          - description: Normal command buffer empty interrupt
+          - description: Normal IBI status buffer full interrupt
+          - description: Normal Rx data buffer full interrupt
+          - description: Normal Tx data buffer empty interrupt
+          - description: Normal receive status buffer full interrupt
+          - description: START condition detection interrupt
+          - description: STOP condition detection interrupt
+          - description: Transmit end interrupt
+          - description: NACK detection interrupt
+          - description: Arbitration lost interrupt
+          - description: Timeout detection interrupt
+          - description: Wake-up condition detection interrupt
+          - description: HDR Exit Pattern detection interrupt
+      - items:
+          - description: Main interrupt
 
   interrupt-names:
-    items:
-      - const: ierr
-      - const: terr
-      - const: abort
-      - const: resp
-      - const: cmd
-      - const: ibi
-      - const: rx
-      - const: tx
-      - const: rcv
-      - const: st
-      - const: sp
-      - const: tend
-      - const: nack
-      - const: al
-      - const: tmo
-      - const: wu
-      - const: exit
-    minItems: 16
+    oneOf:
+      - items:
+          - const: ierr
+          - const: terr
+          - const: abort
+          - const: resp
+          - const: cmd
+          - const: ibi
+          - const: rx
+          - const: tx
+          - const: rcv
+          - const: st
+          - const: sp
+          - const: tend
+          - const: nack
+          - const: al
+          - const: tmo
+          - const: wu
+          - const: exit
+      - items:
+          - const: main
 
   clocks:
     items:
@@ -89,11 +97,13 @@ properties:
     items:
       - description: Reset signal
       - description: APB interface reset signal/SCAN reset signal
+    minItems: 1
 
   reset-names:
     items:
       - const: presetn
       - const: tresetn
+    minItems: 1
 
 required:
   - compatible
@@ -137,10 +147,32 @@ allOf:
         clock-names:
           minItems: 3
         interrupts:
+          minItems: 16
           maxItems: 16
         interrupt-names:
+          minItems: 16
           maxItems: 16
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: renesas,rcar-gen5-i3c
+    then:
+      properties:
+        clocks:
+          maxItems: 2
+        clock-names:
+          maxItems: 2
+        resets:
+          maxItems: 1
+        reset-names:
+          maxItems: 1
+        interrupts:
+          maxItems: 1
+        interrupt-names:
+          maxItems: 1
+
 unevaluatedProperties: false
 
 examples:
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: i3c: renesas,i3c: add R-Car Gen5 support
  2026-12-01  9:52 ` [PATCH 1/2] dt-bindings: i3c: renesas,i3c: " Wolfram Sang
@ 2026-12-01 21:12   ` Frank Li
  2026-12-03 12:13     ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Li @ 2026-12-01 21:12 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Tommaso Merciai, Alexandre Belloni, Frank Li,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Geert Uytterhoeven, Magnus Damm, linux-i3c, devicetree

On Tue, Dec 01, 2026 at 10:52:58AM +0100, Wolfram Sang wrote:
> X5H is the first member of the R-Car Gen5 family. The biggest change is
> that only one interrupt is used instead of many. Also, only one reset is
> needed.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Passed 'dt_binding_check' and 'dtbs_check' for all users of this I3C
> controller here.
>
>  .../devicetree/bindings/i3c/renesas,i3c.yaml  | 108 ++++++++++++------
>  1 file changed, 70 insertions(+), 38 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
> index a20d875086d4..ceff97a5ddf7 100644
> --- a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
> +++ b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
> @@ -22,51 +22,59 @@ properties:
>                - renesas,r9a09g056-i3c # RZ/V2N
>                - renesas,r9a09g057-i3c # RZ/V2H(P)
>            - const: renesas,r9a09g047-i3c
> +      - items:
> +          - enum:
> +              - renesas,r8a78000-i3c # R-Car X5H
> +          - const: renesas,rcar-gen5-i3c

not sure why need this fallback? if new soc coming, should fallback to
renesas,r8a78000-i3c

Frank
>
>    reg:
>      maxItems: 1
>
>    interrupts:
> -    items:
> -      - description: Non-recoverable internal error interrupt
> -      - description: Normal transfer error interrupt
> -      - description: Normal transfer abort interrupt
> -      - description: Normal response status buffer full interrupt
> -      - description: Normal command buffer empty interrupt
> -      - description: Normal IBI status buffer full interrupt
> -      - description: Normal Rx data buffer full interrupt
> -      - description: Normal Tx data buffer empty interrupt
> -      - description: Normal receive status buffer full interrupt
> -      - description: START condition detection interrupt
> -      - description: STOP condition detection interrupt
> -      - description: Transmit end interrupt
> -      - description: NACK detection interrupt
> -      - description: Arbitration lost interrupt
> -      - description: Timeout detection interrupt
> -      - description: Wake-up condition detection interrupt
> -      - description: HDR Exit Pattern detection interrupt
> -    minItems: 16
> +    oneOf:
> +      - items:
> +          - description: Non-recoverable internal error interrupt
> +          - description: Normal transfer error interrupt
> +          - description: Normal transfer abort interrupt
> +          - description: Normal response status buffer full interrupt
> +          - description: Normal command buffer empty interrupt
> +          - description: Normal IBI status buffer full interrupt
> +          - description: Normal Rx data buffer full interrupt
> +          - description: Normal Tx data buffer empty interrupt
> +          - description: Normal receive status buffer full interrupt
> +          - description: START condition detection interrupt
> +          - description: STOP condition detection interrupt
> +          - description: Transmit end interrupt
> +          - description: NACK detection interrupt
> +          - description: Arbitration lost interrupt
> +          - description: Timeout detection interrupt
> +          - description: Wake-up condition detection interrupt
> +          - description: HDR Exit Pattern detection interrupt
> +      - items:
> +          - description: Main interrupt
>
>    interrupt-names:
> -    items:
> -      - const: ierr
> -      - const: terr
> -      - const: abort
> -      - const: resp
> -      - const: cmd
> -      - const: ibi
> -      - const: rx
> -      - const: tx
> -      - const: rcv
> -      - const: st
> -      - const: sp
> -      - const: tend
> -      - const: nack
> -      - const: al
> -      - const: tmo
> -      - const: wu
> -      - const: exit
> -    minItems: 16
> +    oneOf:
> +      - items:
> +          - const: ierr
> +          - const: terr
> +          - const: abort
> +          - const: resp
> +          - const: cmd
> +          - const: ibi
> +          - const: rx
> +          - const: tx
> +          - const: rcv
> +          - const: st
> +          - const: sp
> +          - const: tend
> +          - const: nack
> +          - const: al
> +          - const: tmo
> +          - const: wu
> +          - const: exit
> +      - items:
> +          - const: main
>
>    clocks:
>      items:
> @@ -89,11 +97,13 @@ properties:
>      items:
>        - description: Reset signal
>        - description: APB interface reset signal/SCAN reset signal
> +    minItems: 1
>
>    reset-names:
>      items:
>        - const: presetn
>        - const: tresetn
> +    minItems: 1
>
>  required:
>    - compatible
> @@ -137,10 +147,32 @@ allOf:
>          clock-names:
>            minItems: 3
>          interrupts:
> +          minItems: 16
>            maxItems: 16
>          interrupt-names:
> +          minItems: 16
>            maxItems: 16
>
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: renesas,rcar-gen5-i3c
> +    then:
> +      properties:
> +        clocks:
> +          maxItems: 2
> +        clock-names:
> +          maxItems: 2
> +        resets:
> +          maxItems: 1
> +        reset-names:
> +          maxItems: 1
> +        interrupts:
> +          maxItems: 1
> +        interrupt-names:
> +          maxItems: 1
> +
>  unevaluatedProperties: false
>
>  examples:
> --
> 2.53.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: i3c: renesas,i3c: add R-Car Gen5 support
  2026-12-01 21:12   ` Frank Li
@ 2026-12-03 12:13     ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2026-12-03 12:13 UTC (permalink / raw)
  To: Frank Li
  Cc: linux-renesas-soc, Tommaso Merciai, Alexandre Belloni, Frank Li,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Geert Uytterhoeven, Magnus Damm, linux-i3c, devicetree


> > +      - items:
> > +          - enum:
> > +              - renesas,r8a78000-i3c # R-Car X5H
> > +          - const: renesas,rcar-gen5-i3c
> 
> not sure why need this fallback? if new soc coming, should fallback to
> renesas,r8a78000-i3c

We tried this ages ago and concluded that family-compatibles match our
chips best. See, e.g.:

Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml
Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml

I could list many more...


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-03 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01  9:52 [PATCH 0/2] i3c: renesas: add R-Car Gen5 support Wolfram Sang
2026-12-01  9:52 ` [PATCH 1/2] dt-bindings: i3c: renesas,i3c: " Wolfram Sang
2026-12-01 21:12   ` Frank Li
2026-12-03 12:13     ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox