Add SDHI/eMMC/USB2.0 support
Subsystems (6)
cover Add SDHI/eMMC/USB2.0 support
This patch series add SDHI/eMMC/USB2.0 support for iWave iwg20d platform based on RZ/G1N.
This patch series is based on linux-4.4.y-cip and all the patches in this series are cherry-picked from linux rc tree.
Biju Das (10):
dt-bindings: mmc: renesas_sdhi: Add r8a7744 support
mmc: renesas_sdhi: Add r8a7744 support
ARM: dts: r8a7744: Add SDHI nodes
dt-bindings: mmc: sh_mmcif: Document r8a7744 DT bindings
ARM: dts: r8a7744: Add MMC node
ARM: dts: r8a7744-iwg20m: Add eMMC support
ARM: dts: r8a7744-iwg20m: Enable SDHI0 controller
dt-bindings: PCI: rcar: Add device tree support for r8a7744
ARM: dts: r8a7744: USB 2.0 host support
ARM: dts: r8a7744: Add USB-DMAC and HSUSB device nodes
.../devicetree/bindings/mmc/renesas,mmcif.txt | 1 + Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 + .../devicetree/bindings/pci/pci-rcar-gen2.txt | 1 + arch/arm/boot/dts/r8a7744-iwg20m.dtsi | 33 +++++ arch/arm/boot/dts/r8a7744.dtsi | 162 ++++++++++++++++++++- drivers/mmc/host/sh_mobile_sdhi.c | 1 + 6 files changed, 191 insertions(+), 8 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/10 dt-bindings: mmc: renesas_sdhi: Add r8a7744 support
commit bd451c2df99bb5b7cd2b51fe05f7bb15ddf92791 upstream.
Add support for r8a7744 SoC. Renesas RZ/G1N (R8A7744) SDHI is identical to the R-Car Gen2 family.
--- Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mmc/tmio_mmc.txt +1 -0
@@ -16,6 +16,7 @@ Required properties: "renesas,sdhi-r8a73a4" - SDHI IP on R8A73A4 SoC "renesas,sdhi-r8a7740" - SDHI IP on R8A7740 SoC "renesas,sdhi-r8a7743" - SDHI IP on R8A7743 SoC + "renesas,sdhi-r8a7744" - SDHI IP on R8A7744 SoC "renesas,sdhi-r8a7745" - SDHI IP on R8A7745 SoC "renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC "renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
Signature · 1 line
2.7.4
PATCH 2/10 mmc: renesas_sdhi: Add r8a7744 support
In reply to Biju DasUpstream commit uses generic compatible which is not present in 4.4-cip kernel.
Add support for r8a7744 SoC.Renesas RZ/G1N (R8A7744) SDHI is identical to the R-Car Gen2 family.
--- drivers/mmc/host/sh_mobile_sdhi.c | 1 + 1 file changed, 1 insertion(+)
drivers/mmc/host/sh_mobile_sdhi.c +1 -0
@@ -127,6 +127,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = { { .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, }, { .compatible = "renesas,sdhi-r8a7779", .data = &of_rcar_gen1_compatible, }, { .compatible = "renesas,sdhi-r8a7743", .data = &of_rcar_gen2_compatible, }, + { .compatible = "renesas,sdhi-r8a7744", .data = &of_rcar_gen2_compatible, }, { .compatible = "renesas,sdhi-r8a7745", .data = &of_rcar_gen2_compatible, }, { .compatible = "renesas,sdhi-r8a7790", .data = &of_rcar_gen2_compatible, }, { .compatible = "renesas,sdhi-r8a7791", .data = &of_rcar_gen2_compatible, },
Signature · 1 line
2.7.4
PATCH 3/10 ARM: dts: r8a7744: Add SDHI nodes
In reply to Biju Dascommit b591e323b271fdc2ffdc40eaf06e926a1e272994 upstream.
Add SDHI nodes to the DT of the r8a7744 SoC.
--- arch/arm/boot/dts/r8a7744.dtsi | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7744.dtsi +31 -2
@@ -814,14 +814,43 @@ /* placeholder */ }; + sdhi0: sd at ee100000 { + compatible = "renesas,sdhi-r8a7744"; + reg = <0 0xee100000 0 0x328>; + interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7744_CLK_SDHI0>; + dmas = <&dmac0 0xcd>, <&dmac0 0xce>, + <&dmac1 0xcd>, <&dmac1 0xce>; + dma-names = "tx", "rx", "tx", "rx"; + max-frequency = <195000000>; + power-domains = <&cpg_clocks>; + status = "disabled"; + }; + sdhi1: sd at ee140000 { + compatible = "renesas,sdhi-r8a7744"; reg = <0 0xee140000 0 0x100>; - /* placeholder */ + interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7744_CLK_SDHI1>; + dmas = <&dmac0 0xc1>, <&dmac0 0xc2>, + <&dmac1 0xc1>, <&dmac1 0xc2>; + dma-names = "tx", "rx", "tx", "rx"; + max-frequency = <97500000>; + power-domains = <&cpg_clocks>; + status = "disabled"; }; sdhi2: sd at ee160000 { + compatible = "renesas,sdhi-r8a7744"; reg = <0 0xee160000 0 0x100>; - /* placeholder */ + interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7744_CLK_SDHI2>; + dmas = <&dmac0 0xd3>, <&dmac0 0xd4>, + <&dmac1 0xd3>, <&dmac1 0xd4>; + dma-names = "tx", "rx", "tx", "rx"; + max-frequency = <97500000>; + power-domains = <&cpg_clocks>; + status = "disabled"; }; gic: interrupt-controller at f1001000 {
Signature · 1 line
2.7.4
PATCH 4/10 dt-bindings: mmc: sh_mmcif: Document r8a7744 DT bindings
In reply to Biju Dascommit 2ffca7a34df5ce95efff4a481cd79ec47abf3d6d upstream.
Add support for r8a7744 SoC. Renesas RZ/G1N (R8A7744) MMCIF is identical to the R-Car Gen2 family.
--- Documentation/devicetree/bindings/mmc/renesas,mmcif.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mmc/renesas,mmcif.txt +1 -0
@@ -10,6 +10,7 @@ Required properties: fallback. Examples with <soctype> are: - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs - "renesas,mmcif-r8a7743" for the MMCIF found in r8a7743 SoCs + - "renesas,mmcif-r8a7744" for the MMCIF found in r8a7744 SoCs - "renesas,mmcif-r8a7745" for the MMCIF found in r8a7745 SoCs - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
Signature · 1 line
2.7.4
PATCH 5/10 ARM: dts: r8a7744: Add MMC node
In reply to Biju Dascommit d9e792206d2101de871ea99220b59fe2930ebbcc upstream.
Add MMC node to the DT of the r8a7744 SoC.
--- arch/arm/boot/dts/r8a7744.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm/boot/dts/r8a7744.dtsi +15 -0
@@ -853,6 +853,21 @@ status = "disabled"; }; + mmcif0: mmc at ee200000 { + compatible = "renesas,mmcif-r8a7744", + "renesas,sh-mmcif"; + reg = <0 0xee200000 0 0x80>; + interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7744_CLK_MMCIF0>; + dmas = <&dmac0 0xd1>, <&dmac0 0xd2>, + <&dmac1 0xd1>, <&dmac1 0xd2>; + dma-names = "tx", "rx", "tx", "rx"; + power-domains = <&cpg_clocks>; + reg-io-width = <4>; + max-frequency = <97500000>; + status = "disabled"; + }; + gic: interrupt-controller at f1001000 { compatible = "arm,gic-400"; #interrupt-cells = <3>;
Signature · 1 line
2.7.4
PATCH 6/10 ARM: dts: r8a7744-iwg20m: Add eMMC support
In reply to Biju Dascommit 266d863eece3f0b1e333203f9efe8fa89e042b3b upstream.
Add eMMC support for iWave RZ/G1N Qseven System On Module.
--- arch/arm/boot/dts/r8a7744-iwg20m.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/boot/dts/r8a7744-iwg20m.dtsi +17 -0
@@ -29,3 +29,20 @@ &extal_clk { clock-frequency = <20000000>; }; + +&pfc { + mmcif0_pins: mmc { + groups = "mmc_data8_b", "mmc_ctrl"; + function = "mmc"; + }; +}; + +&mmcif0 { + pinctrl-0 = <&mmcif0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <®_3p3v>; + bus-width = <8>; + non-removable; + status = "okay"; +};
Signature · 1 line
2.7.4
PATCH 7/10 ARM: dts: r8a7744-iwg20m: Enable SDHI0 controller
In reply to Biju Dascommit f9a3d5f23b6c8e4029a3474945971477d1f9365a upstream.
Enable the SDHI0 controller on iWave RZ/G1N Qseven System On Module.
--- arch/arm/boot/dts/r8a7744-iwg20m.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/boot/dts/r8a7744-iwg20m.dtsi +16 -0
@@ -35,6 +35,12 @@ groups = "mmc_data8_b", "mmc_ctrl"; function = "mmc"; }; + + sdhi0_pins: sd0 { + groups = "sdhi0_data4", "sdhi0_ctrl"; + function = "sdhi0"; + power-source = <3300>; + }; }; &mmcif0 {
@@ -46,3 +52,13 @@ non-removable; status = "okay"; }; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_3p3v>; + cd-gpios = <&gpio7 11 GPIO_ACTIVE_LOW>; + status = "okay"; +};
Signature · 1 line
2.7.4
PATCH 8/10 dt-bindings: PCI: rcar: Add device tree support for r8a7744
In reply to Biju Dascommit 6adb734bb9c72c0fdcb1868edcc5fde3b6333d11 upstream.
Add internal PCI bridge support for r8a7744 SoC. The Renesas RZ/G1N (R8A7744) internal PCI bridge is identical to the R-Car Gen2 family.
This doesn't change the driver, so it does nothing by itself. But it does mean that checkpatch won't complain about a future patch that adds "renesas,pci-r8a7744" to a DT, which helps ensure that shipped DTs use documented compatibility strings.
--- Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt +1 -0
@@ -7,6 +7,7 @@ OHCI and EHCI controllers. Required properties: - compatible: "renesas,pci-r8a7743" for the R8A7743 SoC; + "renesas,pci-r8a7744" for the R8A7744 SoC; "renesas,pci-r8a7745" for the R8A7745 SoC; "renesas,pci-r8a7790" for the R8A7790 SoC; "renesas,pci-r8a7791" for the R8A7791 SoC;
Signature · 1 line
2.7.4
PATCH 9/10 ARM: dts: r8a7744: USB 2.0 host support
In reply to Biju Dascommit ce28396b7a8621e048cfb8d002bc869b428a905e upstream.
Describe internal PCI bridge devices, USB phy device and link PCI USB devices to USB phy.
--- arch/arm/boot/dts/r8a7744.dtsi | 75 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 5 deletions(-)
arch/arm/boot/dts/r8a7744.dtsi +70 -5
@@ -423,8 +423,25 @@ }; usbphy: usb-phy at e6590100 { + compatible = "renesas,usb-phy-r8a7744", + "renesas,rcar-gen2-usb-phy"; reg = <0 0xe6590100 0 0x100>; - /* placeholder */ + #address-cells = <1>; + #size-cells = <0>; + clocks = <&mstp7_clks R8A7744_CLK_HSUSB>; + clock-names = "usbhs"; + power-domains = <&cpg_clocks>; + + status = "disabled"; + + usb0: usb-channel at 0 { + reg = <0>; + #phy-cells = <1>; + }; + usb2: usb-channel at 2 { + reg = <2>; + #phy-cells = <1>; + }; }; dmac0: dma-controller at e6700000 {
@@ -795,23 +812,71 @@ }; pci0: pci at ee090000 { - reg = <0 0xee090000 0 0xc00>; + compatible = "renesas,pci-r8a7744", + "renesas,pci-rcar-gen2"; + device_type = "pci"; + reg = <0 0xee090000 0 0xc00>, + <0 0xee080000 0 0x1100>; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp7_clks R8A7744_CLK_USB_EHCI>; + power-domains = <&cpg_clocks>; + status = "disabled"; bus-range = <0 0>; #address-cells = <3>; #size-cells = <2>; #interrupt-cells = <1>; - /* placeholder */ + ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>; + interrupt-map-mask = <0xff00 0 0 0x7>; + interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH + 0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH + 0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; + + usb at 1,0 { + reg = <0x800 0 0 0 0>; + phys = <&usb0 0>; + phy-names = "usb"; + }; + + usb at 2,0 { + reg = <0x1000 0 0 0 0>; + phys = <&usb0 0>; + phy-names = "usb"; + }; }; pci1: pci at ee0d0000 { - reg = <0 0xee0d0000 0 0xc00>; + compatible = "renesas,pci-r8a7744", + "renesas,pci-rcar-gen2"; + device_type = "pci"; + reg = <0 0xee0d0000 0 0xc00>, + <0 0xee0c0000 0 0x1100>; + interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp7_clks R8A7744_CLK_USB_EHCI>; + power-domains = <&cpg_clocks>; + status = "disabled"; bus-range = <1 1>; #address-cells = <3>; #size-cells = <2>; #interrupt-cells = <1>; - /* placeholder */ + ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>; + interrupt-map-mask = <0xff00 0 0 0x7>; + interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH + 0x0800 0 0 1 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH + 0x1000 0 0 2 &gic GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; + + usb at 1,0 { + reg = <0x10800 0 0 0 0>; + phys = <&usb2 0>; + phy-names = "usb"; + }; + + usb at 2,0 { + reg = <0x11000 0 0 0 0>; + phys = <&usb2 0>; + phy-names = "usb"; + }; }; sdhi0: sd at ee100000 {
Signature · 1 line
2.7.4
PATCH 10/10 ARM: dts: r8a7744: Add USB-DMAC and HSUSB device nodes
In reply to Biju Dascommit a5d56930c703ddbdd8712553247c38ec6f406b74 upstream.
Add usb dmac and hsusb device nodes on RZ/G1N SoC dtsi.
--- arch/arm/boot/dts/r8a7744.dtsi | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-)
arch/arm/boot/dts/r8a7744.dtsi +38 -1
@@ -418,8 +418,19 @@ }; hsusb: usb at e6590000 { + compatible = "renesas,usbhs-r8a7744", + "renesas,rcar-gen2-usbhs"; reg = <0 0xe6590000 0 0x100>; - /* placeholder */ + interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp7_clks R8A7744_CLK_HSUSB>; + dmas = <&usb_dmac0 0>, <&usb_dmac0 1>, + <&usb_dmac1 0>, <&usb_dmac1 1>; + dma-names = "ch0", "ch1", "ch2", "ch3"; + power-domains = <&cpg_clocks>; + renesas,buswait = <4>; + phys = <&usb0 1>; + phy-names = "usb"; + status = "disabled"; }; usbphy: usb-phy at e6590100 {
@@ -444,6 +455,32 @@ }; }; + usb_dmac0: dma-controller at e65a0000 { + compatible = "renesas,r8a7744-usb-dmac", + "renesas,usb-dmac"; + reg = <0 0xe65a0000 0 0x100>; + interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1"; + clocks = <&mstp3_clks R8A7744_CLK_USBDMAC0>; + power-domains = <&cpg_clocks>; + #dma-cells = <1>; + dma-channels = <2>; + }; + + usb_dmac1: dma-controller at e65b0000 { + compatible = "renesas,r8a7744-usb-dmac", + "renesas,usb-dmac"; + reg = <0 0xe65b0000 0 0x100>; + interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH + GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "ch0", "ch1"; + clocks = <&mstp3_clks R8A7744_CLK_USBDMAC1>; + power-domains = <&cpg_clocks>; + #dma-cells = <1>; + dma-channels = <2>; + }; + dmac0: dma-controller at e6700000 { compatible = "renesas,dmac-r8a7744", "renesas,rcar-dmac";
Signature · 1 line
2.7.4
cover Add SDHI/eMMC/USB2.0 support
In reply to Biju DasHi!
Quoted 5 lines
This patch series add SDHI/eMMC/USB2.0 support for iWave iwg20d platform based on RZ/G1N.
This patch series is based on linux-4.4.y-cip and all the patches in this series are cherry-picked from linux rc tree.
I went through the patches, and they look ok. I will apply them unless someone objects.
Best regards,
Pavel
Signature · 9 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 195 bytes Desc: not available URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191126/7d0d2b27/attachment-0001.sig>
Pavel Machek
Appliedcover Add SDHI/eMMC/USB2.0 support
In reply to Biju DasHi!
Quoted 5 lines
This patch series add SDHI/eMMC/USB2.0 support for iWave iwg20d platform based on RZ/G1N.
This patch series is based on linux-4.4.y-cip and all the patches in this series are cherry-picked from linux rc tree.
Thanks, applied and pushed out.
Best regards,
Pavel
Signature · 9 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20191127/0bd3ca46/attachment.sig>