Add MSIOF support to r8a7743
Subsystems (2)
cover Add MSIOF support to r8a7743
Dear All,
this series backports all that is required to add MSIOF support to r8a7743.
Thanks,
Fabrizio Castro (3):
spi: sh-msiof: Add compatible strings for r8a774[35]
spi: sh-msiof: Add r8a774[35] to the compatible list
ARM: dts: r8a7743: Add MSIOF[012] support
Simon Horman (1):
spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings
Documentation/devicetree/bindings/spi/sh-msiof.txt | 18 +++++--- arch/arm/boot/dts/r8a7743.dtsi | 48 ++++++++++++++++++++++ drivers/spi/spi-sh-msiof.c | 5 ++- 3 files changed, 65 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/4 spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings
From: Simon Horman <[email protected]>
In the case of Renesas R-Car hardware we know that there are generations of SoCs, e.g. Gen 2 and Gen 3. But beyond that it's not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa.
We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation.
For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme is being adopted for drivers for Renesas SoCs.
Also:
* Deprecate renesas,sh-msiof. It seems poorly named as it is only compatible with SH-Mobile. It also appears unused in mainline.
(removed "renesas,rcar-gen3-msiof")
--- Documentation/devicetree/bindings/spi/sh-msiof.txt | 18 ++++++++++++------ drivers/spi/spi-sh-msiof.c | 3 ++- 2 files changed, 14 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/spi/sh-msiof.txt +12 -6
@@ -1,15 +1,20 @@ Renesas MSIOF spi controller Required properties: -- compatible : "renesas,msiof-<soctype>" for SoCs, - "renesas,sh-msiof" for SuperH, or - "renesas,sh-mobile-msiof" for SH Mobile series. - Examples with soctypes are: - "renesas,msiof-r8a7790" (R-Car H2) +- compatible : "renesas,msiof-r8a7790" (R-Car H2) "renesas,msiof-r8a7791" (R-Car M2-W) "renesas,msiof-r8a7792" (R-Car V2H) "renesas,msiof-r8a7793" (R-Car M2-N) "renesas,msiof-r8a7794" (R-Car E2) + "renesas,sh-mobile-msiof" (generic SH-Mobile compatibile device) + "renesas,rcar-gen2-msiof" (generic R-Car Gen2 compatible device) + "renesas,sh-msiof" (deprecated) + + When compatible with the generic version, nodes + must list the SoC-specific version corresponding + to the platform first followed by the generic + version. + - reg : A list of offsets and lengths of the register sets for the device. If only one register set is present, it is to be used
@@ -59,7 +64,8 @@ Documentation/devicetree/bindings/pinctrl/renesas,*. Example: msiof0: spi at e6e20000 { - compatible = "renesas,msiof-r8a7791"; + compatible = "renesas,msiof-r8a7791", + "renesas,rcar-gen2-msiof"; reg = <0 0xe6e20000 0 0x0064>; interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
drivers/spi/spi-sh-msiof.c +2 -1
@@ -974,13 +974,14 @@ static const struct sh_msiof_chipdata r8a779x_data = { };static const struct of_device_id sh_msiof_match[] = { - { .compatible ="renesas,sh-msiof" , .data = &sh_data }, { .compatible ="renesas,sh-mobile-msiof" , .data = &sh_data }, { .compatible ="renesas,msiof-r8a7790" , .data = &r8a779x_data }, { .compatible ="renesas,msiof-r8a7791" , .data = &r8a779x_data }, { .compatible ="renesas,msiof-r8a7792" , .data = &r8a779x_data }, { .compatible ="renesas,msiof-r8a7793" , .data = &r8a779x_data }, { .compatible ="renesas,msiof-r8a7794" , .data = &r8a779x_data }, + { .compatible ="renesas,rcar-gen2-msiof" , .data = &r8a779x_data }, + { .compatible ="renesas,sh-msiof" , .data = &sh_data },// Deprecated {}, };MODULE_DEVICE_TABLE (of, sh_msiof_match);
Signature · 1 line
2.7.4
PATCH 1/4 spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings
Quoted 20 lines · Fabrizio Castro
From: Simon Horman <[email protected]>
In the case of Renesas R-Car hardware we know that there are generations of SoCs, e.g. Gen 2 and Gen 3. But beyond that it's not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa.
We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation.
For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme is being adopted for drivers for Renesas SoCs.
Also:
* Deprecate renesas,sh-msiof. It seems poorly named as it is only ? compatible with SH-Mobile. It also appears unused in mainline.
Quoted 6 lines
Signed-off-by Simon Horman <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Signed-off-by Mark Brown <[email protected]>(cherry picked from commit 4286db8456f4fa0c6af2b6b9abc5991a7e7da69c)Signed-off-by Fabrizio Castro <[email protected]>(cherry picked from commit 77f252646eb0ec1e78847fe5725c98ee9e70b39e)
I deleted this second commit reference, which I assume refers to some private branch.
Ben.
Quoted 2 lines
(removed "renesas,rcar-gen3-msiof")
Signed-off-by Fabrizio Castro <[email protected]>
[...]
Signature · 2 lines
Ben Hutchings Software Developer, Codethink Ltd.
PATCH 1/4 spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings
Hello Ben,
Quoted 30 lines
Subject: Re: [cip-dev][PATCH 1/4] spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings
Quoted 20 lines · Fabrizio Castro
From: Simon Horman <[email protected]>
In the case of Renesas R-Car hardware we know that there are generations of SoCs, e.g. Gen 2 and Gen 3. But beyond that it's not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa.
We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation.
For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme is being adopted for drivers for Renesas SoCs.
Also:
* Deprecate renesas,sh-msiof. It seems poorly named as it is only compatible with SH-Mobile. It also appears unused in mainline.Quoted 6 lines
Signed-off-by Simon Horman <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Signed-off-by Mark Brown <[email protected]>(cherry picked from commit 4286db8456f4fa0c6af2b6b9abc5991a7e7da69c)Signed-off-by Fabrizio Castro <[email protected]>(cherry picked from commit 77f252646eb0ec1e78847fe5725c98ee9e70b39e)
Quoted 2 lines
I deleted this second commit reference, which I assume refers to some private branch.
You are right, this must have been from a temporary local branch. Well spotted!
Thanks,
Fab
Quoted 10 lines
Ben.
Quoted 2 lines
(removed "renesas,rcar-gen3-msiof")
Signed-off-by Fabrizio Castro <[email protected]>[...]
--
Ben Hutchings
Software Developer, Codethink Ltd.
Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
PATCH 2/4 spi: sh-msiof: Add compatible strings for r8a774[35]
In reply to Fabrizio Castro(using r8a779x_data instead of rcar_gen2_data)
--- drivers/spi/spi-sh-msiof.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/spi/spi-sh-msiof.c +2 -0
@@ -975,6 +975,8 @@ static const struct sh_msiof_chipdata r8a779x_data = {static const struct of_device_id sh_msiof_match[] = { { .compatible ="renesas,sh-mobile-msiof" , .data = &sh_data }, + { .compatible ="renesas,msiof-r8a7743" , .data = &r8a779x_data }, + { .compatible ="renesas,msiof-r8a7745" , .data = &r8a779x_data }, { .compatible ="renesas,msiof-r8a7790" , .data = &r8a779x_data }, { .compatible ="renesas,msiof-r8a7791" , .data = &r8a779x_data }, { .compatible ="renesas,msiof-r8a7792" , .data = &r8a779x_data },
Signature · 1 line
2.7.4
PATCH 3/4 spi: sh-msiof: Add r8a774[35] to the compatible list
In reply to Fabrizio Castro(removed "renesas,rcar-gen3-msiof")
--- Documentation/devicetree/bindings/spi/sh-msiof.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/sh-msiof.txt +4 -2
@@ -1,13 +1,15 @@ Renesas MSIOF spi controller Required properties: -- compatible : "renesas,msiof-r8a7790" (R-Car H2) +- compatible : "renesas,msiof-r8a7743" (RZ/G1M) + "renesas,msiof-r8a7745" (RZ/G1E) + "renesas,msiof-r8a7790" (R-Car H2) "renesas,msiof-r8a7791" (R-Car M2-W) "renesas,msiof-r8a7792" (R-Car V2H) "renesas,msiof-r8a7793" (R-Car M2-N) "renesas,msiof-r8a7794" (R-Car E2) "renesas,sh-mobile-msiof" (generic SH-Mobile compatibile device) - "renesas,rcar-gen2-msiof" (generic R-Car Gen2 compatible device) + "renesas,rcar-gen2-msiof" (generic R-Car Gen2 and RZ/G1 compatible device) "renesas,sh-msiof" (deprecated) When compatible with the generic version, nodes
Signature · 1 line
2.7.4
PATCH 4/4 ARM: dts: r8a7743: Add MSIOF[012] support
In reply to Fabrizio CastroAdd the DT nodes needed by MSIOF[012] interfaces to the SoC dtsi. Also, define aliases for spi[123].
(changed clocks and power-domains properties, removed resets property)
--- arch/arm/boot/dts/r8a7743.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
arch/arm/boot/dts/r8a7743.dtsi +48 -0
@@ -28,6 +28,9 @@ i2c6 = &iic0; i2c7 = &iic1; i2c8 = &iic3; + spi1 = &msiof0; + spi2 = &msiof1; + spi3 = &msiof2; }; cpus {
@@ -779,6 +782,51 @@ status = "disabled"; }; + msiof0: spi at e6e20000 { + compatible = "renesas,msiof-r8a7743", + "renesas,rcar-gen2-msiof"; + reg = <0 0xe6e20000 0 0x0064>; + interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7743_CLK_MSIOF0>; + dmas = <&dmac0 0x51>, <&dmac0 0x52>, + <&dmac1 0x51>, <&dmac1 0x52>; + dma-names = "tx", "rx", "tx", "rx"; + power-domains = <&cpg_clocks>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof1: spi at e6e10000 { + compatible = "renesas,msiof-r8a7743", + "renesas,rcar-gen2-msiof"; + reg = <0 0xe6e10000 0 0x0064>; + interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7743_CLK_MSIOF1>; + dmas = <&dmac0 0x55>, <&dmac0 0x56>, + <&dmac1 0x55>, <&dmac1 0x56>; + dma-names = "tx", "rx", "tx", "rx"; + power-domains = <&cpg_clocks>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof2: spi at e6e00000 { + compatible = "renesas,msiof-r8a7743", + "renesas,rcar-gen2-msiof"; + reg = <0 0xe6e00000 0 0x0064>; + interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7743_CLK_MSIOF2>; + dmas = <&dmac0 0x41>, <&dmac0 0x42>, + <&dmac1 0x41>, <&dmac1 0x42>; + dma-names = "tx", "rx", "tx", "rx"; + power-domains = <&cpg_clocks>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + clocks { #address-cells = <2>; #size-cells = <2>;
Signature · 1 line
2.7.4
Ben Hutchings
Appliedcover Add MSIOF support to r8a7743
In reply to Fabrizio CastroI've applied this series, thanks.
Ben.
Quoted 20 lines · Fabrizio Castro
Dear All,
this series backports all that is required to add MSIOF support to r8a7743.
Thanks,
Fabrizio Castro (3):
? spi: sh-msiof: Add compatible strings for r8a774[35] ? spi: sh-msiof: Add r8a774[35] to the compatible list ? ARM: dts: r8a7743: Add MSIOF[012] supportSimon Horman (1):
? spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings?Documentation/devicetree/bindings/spi/sh-msiof.txt | 18 +++++--- ?arch/arm/boot/dts/r8a7743.dtsi?????????????????????| 48 ++++++++++++++++++++++ ?drivers/spi/spi-sh-msiof.c?????????????????????????|??5 ++-?3 files changed, 65 insertions(+), 6 deletions(-)
Signature · 2 lines
Ben Hutchings Software Developer, Codethink Ltd.