Skip to contentSkip to conversation

spi: sh-msiof: Add support for R-Car X5H

PATCH In review Geert Uytterhoeven 5 participants 9 messages Sep 22

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

cover spi: sh-msiof: Add support for R-Car X5H

Hi all,

This patch series adds support for the Clock-Synchronized Serial Interfaces with FIFO (MSIOF) in the Renesas R-Car X5H (R8A78000) SoC, which is the first member of the R-Car Gen5 family.

It has been tested on the Ironhide development board. Thanks for your comments!

Geert Uytterhoeven (1):
spi: sh-msiof: Add support for R-Car Gen5

Thanh Quan (1):
dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

 .../devicetree/bindings/spi/renesas,sh-msiof.yaml        | 9 +++++++--
 drivers/spi/spi-sh-msiof.c                               | 1 +
 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 12 lines
2.43.0

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
#1 lore raw

PATCH 1/2 dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

From: Thanh Quan <[email protected]>

Document support for Clock-Synchronized Serial Interfaces with FIFO (MSIOF) in the Renesas R-Car X5H (R8A78000) SoC, which is the first member of the R-Car Gen5 family.

On R-Car X5H, MSIOF modules are wired to three DMACs, hence increase the maximum number of DMA channels to six.

---
Changes compared to the BSP:
- Increase maximum number of DMA channels.

---
 .../devicetree/bindings/spi/renesas,sh-msiof.yaml        | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +7 -2
index e0c7047ae8adb6c3..41e423a42654d05e 100644
@@ -54,6 +54,11 @@ properties:
               - renesas,msiof-r8a779h0      # R-Car V4M
           - const: renesas,rcar-gen4-msiof  # generic R-Car Gen4
                                             # compatible device
+      - items:
+          - enum:
+              - renesas,msiof-r8a78000      # R-Car X5H
+          - const: renesas,rcar-gen5-msiof  # generic R-Car Gen5
+                                            # compatible device
       - items:
           - const: renesas,sh-msiof  # deprecated
 
@@ -100,11 +105,11 @@ properties:
 
   dmas:
     minItems: 2
-    maxItems: 4
+    maxItems: 6
 
   dma-names:
     minItems: 2
-    maxItems: 4
+    maxItems: 6
     items:
       enum: [ tx, rx ]
 
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 1/2] dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dt-bindings: weakened schema validation for older generations' dma counts --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: weakened schema validation for older generations' dma counts --

commit 339efeecd4721be8f1b5b945500191b6aa6436e7
Author: Thanh Quan <[email protected]>

dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

Document support for Clock-Synchronized Serial Interfaces with FIFO (MSIOF) in the Renesas R-Car X5H (R8A78000) SoC, which is the first member of the R-Car Gen5 family.

Quoted 4 lines
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +0 -0
index e0c7047ae8adb..41e423a42654d 100644

[ ... ]

Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml properties: · line 108

Quoted 6 lines
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +1 -1
@@ -100,11 +105,11 @@ properties:
 
   dmas:
     minItems: 2
-    maxItems: 4
+    maxItems: 6

[Severity: Medium]
Does this unintentionally weaken schema validation for older generations?

By relaxing the global maximum to 6, a device tree for older hardware (which only supports up to 4 DMAs) could now silently pass validation with an invalid number of DMA channels.

Should this preserve maxItems: 4 globally and only override it to 6 inside an
allOf: if-then conditional block for the new Gen5 compatible?

Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml properties: · line 112

Quoted 5 lines
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +1 -1
   dma-names:
     minItems: 2
-    maxItems: 4
+    maxItems: 6

[Severity: Medium]
Similarly, does relaxing this limit globally allow older generations to define more dma-names than supported without generating a validation warning?

Quoted 3 lines
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +0 -0
     items:
       enum: [ tx, rx ]
 
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

Re: [PATCH 1/2] dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

Hi Sashiko,

Quoted 30 lines · On Tue, 22 Sept 2026 at 10:33, <[email protected]> wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: weakened schema validation for older generations' dma counts --

commit 339efeecd4721be8f1b5b945500191b6aa6436e7
Author: Thanh Quan <[email protected]>

dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

Document support for Clock-Synchronized Serial Interfaces with FIFO (MSIOF) in the Renesas R-Car X5H (R8A78000) SoC, which is the first member of the R-Car Gen5 family.

Quoted 4 lines
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +0 -0
index e0c7047ae8adb..41e423a42654d 100644

[ ... ]

Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml properties: · line 108

Quoted 6 lines
Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml +1 -1
@@ -100,11 +105,11 @@ properties:
 
   dmas:
     minItems: 2
-    maxItems: 4
+    maxItems: 6

[Severity: Medium]
Does this unintentionally weaken schema validation for older generations?

Quoted 6 lines

By relaxing the global maximum to 6, a device tree for older hardware (which only supports up to 4 DMAs) could now silently pass validation with an invalid number of DMA channels.

Should this preserve maxItems: 4 globally and only override it to 6 inside an
allOf: if-then conditional block for the new Gen5 compatible?

I wouldn't bother adding further restrictions, as these are not related to the actual MSIOF block, but to on-SoC wiring. DMARQ is just a single signal going from the MSIOF block to one or more DMAC instances. The number also differs among MSIOF instances on an SoC.

See also my similar replies for rcar-i2c and serial:
https://lore.kernel.org/all/CAMuHMdXj04QoxituCF3wRcyzN7qZrVBn7-ukNkKDd0OfhB8zOQ@mail.gmail.com/
https://lore.kernel.org/all/CAMuHMdVgJkwkoF0-ptQ9g_8E5j1Oa8G41nBiiOfY+KF_p7XAxQ@mail.gmail.com/

Perhaps it would be a good idea to remember this?
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
Reviewed-by on v1 1/2
#4 lore raw

Re: [PATCH 1/2] dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

In reply to Geert Uytterhoeven
Quoted 11 lines · Geert Uytterhoeven

From: Thanh Quan <[email protected]>

Document support for Clock-Synchronized Serial Interfaces with FIFO (MSIOF) in the Renesas R-Car X5H (R8A78000) SoC, which is the first member of the R-Car Gen5 family.

On R-Car X5H, MSIOF modules are wired to three DMACs, hence increase the maximum number of DMA channels to six.

maintainer
#5 lore raw

Re: [PATCH 1/2] dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

In reply to Geert Uytterhoeven
Quoted 5 lines · Geert Uytterhoeven

From: Thanh Quan <[email protected]>

Document support for Clock-Synchronized Serial Interfaces with FIFO (MSIOF) in the Renesas R-Car X5H (R8A78000) SoC, which is the first member of the R-Car Gen5 family.

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.

#6 lore raw

PATCH 2/2 spi: sh-msiof: Add support for R-Car Gen5

In reply to Geert Uytterhoeven

The Clock-Synchronized Serial Interfaces with FIFO (MSIOF) on R-Car Gen5 have FIFOs with 256 entries, just like on R-Car Gen4.

---
 drivers/spi/spi-sh-msiof.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-sh-msiof.c +1 -0
index 4c425ec627767a46..90a671e9de70ebbb 100644
@@ -1016,6 +1016,7 @@ static const struct of_device_id sh_msiof_match[] __maybe_unused = {
 	{ .compatible = "renesas,msiof-r8a779a0",  .data = &rcar_gen3_data },
 	{ .compatible = "renesas,msiof-r8a779f0",  .data = &rcar_gen3_data },
 	{ .compatible = "renesas,rcar-gen4-msiof", .data = &rcar_gen4_data },
+	{ .compatible = "renesas,rcar-gen5-msiof", .data = &rcar_gen4_data },
 	{ .compatible = "renesas,sh-msiof",        .data = &sh_data }, /* Deprecated */
 	{ /* sentinel */ }
 };
Signature · 1 line
2.43.0
maintainer
#8 lore raw
In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven

spi: sh-msiof: Add support for R-Car X5H

Hi all,

This patch series adds support for the Clock-Synchronized Serial Interfaces with FIFO (MSIOF) in the Renesas R-Car X5H (R8A78000) SoC, which is the first member of the R-Car Gen5 family.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4

Thanks!

[1/2] dt-bindings: spi: renesas,sh-msiof: Add support for R-Car X5H

      https://git.kernel.org/broonie/spi/c/51e04054e299
[2/2] spi: sh-msiof: Add support for R-Car Gen5
      https://git.kernel.org/broonie/spi/c/8157bb8232a4

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark