devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Add uSD and eMMC to iwg23s
@ 2018-10-08  8:51 Fabrizio Castro
  2018-10-08  8:51 ` [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Fabrizio Castro
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Fabrizio Castro @ 2018-10-08  8:51 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Mark Rutland, Laurent Pinchart,
	Geert Uytterhoeven, Simon Horman, Linus Walleij
  Cc: Fabrizio Castro, Magnus Damm, Wolfram Sang, Adrian Hunter,
	Shawn Lin, Masahiro Yamada, tianshuliang, Jan Glauber,
	Venkat Gopalakrishnan, Carlo Caione, Jisheng Zhang, Liming Sun,
	Arnd Bergmann, Alex Smith, linux-mmc, devicetree,
	linux-renesas-soc, linux-gpio, Chris Paterson, Biju Das

Dear All,

this new version incorporates Geert's comments.
This series applies on top of next-20181005.

Thanks,
Fab

Fabrizio Castro (6):
  dt-bindings: mmc: renesas_sdhi: Add r8a77470 support
  pinctrl: sh-pfc: r8a77470: Add SDHI support
  mmc: renesas_sdhi: Add r8a77470 SDHI1 support
  ARM: dts: r8a77470: Add SDHI0 support
  ARM: dts: r8a77470: Add SDHI1 support
  ARM: dts: iwg23s-sbc: Add uSD and eMMC support

 Documentation/devicetree/bindings/mmc/tmio_mmc.txt |   6 +-
 arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts          |  76 ++++++++++
 arch/arm/boot/dts/r8a77470.dtsi                    |  28 +++-
 drivers/mmc/host/Kconfig                           |   4 +-
 drivers/mmc/host/renesas_sdhi_internal_dmac.c      |   6 +-
 drivers/pinctrl/sh-pfc/pfc-r8a77470.c              | 162 ++++++++++++++++++++-
 6 files changed, 273 insertions(+), 9 deletions(-)

-- 
2.7.4

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

* [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support
  2018-10-08  8:51 [PATCH v3 0/6] Add uSD and eMMC to iwg23s Fabrizio Castro
@ 2018-10-08  8:51 ` Fabrizio Castro
  2018-10-09  9:48   ` Simon Horman
                     ` (2 more replies)
  2018-10-08  8:51 ` [PATCH v3 4/6] ARM: dts: r8a77470: Add SDHI0 support Fabrizio Castro
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 12+ messages in thread
From: Fabrizio Castro @ 2018-10-08  8:51 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Geert Uytterhoeven, Simon Horman,
	Mark Rutland
  Cc: Fabrizio Castro, linux-mmc, devicetree, Chris Paterson, Biju Das,
	linux-renesas-soc

The RZ/G1C (a.k.a. R8A77470) comes with three SDHI interfaces,
SDHI0 and SDHI2 are compatible with R-Car Gen2 SDHIs, and
SDHI1 is compatible with R-Car Gen3 SDHIs, as it comes with an
internal DMAC, therefore SDHI1 is fully compatible with driver
renesas_sdhi_internal_dmac driver. As a result, the compatible
strings for the R8A77470 SDHI interfaces are a little bit special.
Document SDHI support for the RZ/G1C SoC.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

---
v2->v3:
* Incorporated comments from Geert

v1->v2:
* Added "renesas,sdhi-mmc-r8a77470"
* Using generic/fallback compatibilty only for SDHI[02]
* Reworked changelog
---
 Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
index d39d5e4..27f2eab 100644
--- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
@@ -19,6 +19,8 @@ Required properties:
 		"renesas,sdhi-r8a7744" - SDHI IP on R8A7744 SoC
 		"renesas,sdhi-r8a7745" - SDHI IP on R8A7745 SoC
 		"renesas,sdhi-r8a774a1" - SDHI IP on R8A774A1 SoC
+		"renesas,sdhi-r8a77470" - SDHI IP on R8A77470 SoC
+		"renesas,sdhi-mmc-r8a77470" - SDHI/MMC IP on R8A77470 SoC
 		"renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
 		"renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
 		"renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC
@@ -35,8 +37,8 @@ Required properties:
 		"renesas,sdhi-r8a77995" - SDHI IP on R8A77995 SoC
 		"renesas,sdhi-shmobile" - a generic sh-mobile SDHI controller
 		"renesas,rcar-gen1-sdhi" - a generic R-Car Gen1 SDHI controller
-		"renesas,rcar-gen2-sdhi" - a generic R-Car Gen2 or RZ/G1
-					   SDHI controller
+		"renesas,rcar-gen2-sdhi" - a generic R-Car Gen2 and RZ/G1 SDHI
+					   (not SDHI/MMC) controller
 		"renesas,rcar-gen3-sdhi" - a generic R-Car Gen3 or RZ/G2
 					   SDHI controller
 
-- 
2.7.4

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

* [PATCH v3 4/6] ARM: dts: r8a77470: Add SDHI0 support
  2018-10-08  8:51 [PATCH v3 0/6] Add uSD and eMMC to iwg23s Fabrizio Castro
  2018-10-08  8:51 ` [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Fabrizio Castro
@ 2018-10-08  8:51 ` Fabrizio Castro
  2018-10-15 15:19   ` Simon Horman
  2018-10-08  8:51 ` [PATCH v3 5/6] ARM: dts: r8a77470: Add SDHI1 support Fabrizio Castro
  2018-10-08  8:51 ` [PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support Fabrizio Castro
  3 siblings, 1 reply; 12+ messages in thread
From: Fabrizio Castro @ 2018-10-08  8:51 UTC (permalink / raw)
  To: Rob Herring, Geert Uytterhoeven, Simon Horman, Mark Rutland
  Cc: Fabrizio Castro, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Biju Das

RZ/G1C comes with two different types of IP for the SDHI
interfaces, SDHI0 and SDHI2 share the same IP type, and
such an IP is also compatible with the one found in R-Car
Gen2. SDHI1 IP on the other hand is compatible with R-Car
Gen3 with internal DMA.
This patch completes the SDHI support of the R-Car Gen2
compatible IPs, including fixing the max-frequency
definition of SDHI2, as it turns out there is a bug in
Section 1.3.9 of the RZ/G1C Hardware User's Manual (Rev.
1.00 Oct. 2017).

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>

---
v2->v3:
* No change

v2:
* New patch
---
 arch/arm/boot/dts/r8a77470.dtsi | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a77470.dtsi b/arch/arm/boot/dts/r8a77470.dtsi
index 9e7f86d..e01df9c 100644
--- a/arch/arm/boot/dts/r8a77470.dtsi
+++ b/arch/arm/boot/dts/r8a77470.dtsi
@@ -412,6 +412,21 @@
 			status = "disabled";
 		};
 
+		sdhi0: sd@ee100000 {
+			compatible = "renesas,sdhi-r8a77470",
+				     "renesas,rcar-gen2-sdhi";
+			reg = <0 0xee100000 0 0x328>;
+			interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 314>;
+			dmas = <&dmac0 0xcd>, <&dmac0 0xce>,
+			       <&dmac1 0xcd>, <&dmac1 0xce>;
+			dma-names = "tx", "rx", "tx", "rx";
+			max-frequency = <156000000>;
+			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+			resets = <&cpg 314>;
+			status = "disabled";
+		};
+
 		sdhi2: sd@ee160000 {
 			compatible = "renesas,sdhi-r8a77470",
 				     "renesas,rcar-gen2-sdhi";
@@ -421,7 +436,7 @@
 			dmas = <&dmac0 0xd3>, <&dmac0 0xd4>,
 			       <&dmac1 0xd3>, <&dmac1 0xd4>;
 			dma-names = "tx", "rx", "tx", "rx";
-			max-frequency = <97500000>;
+			max-frequency = <78000000>;
 			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
 			resets = <&cpg 312>;
 			status = "disabled";
-- 
2.7.4

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

* [PATCH v3 5/6] ARM: dts: r8a77470: Add SDHI1 support
  2018-10-08  8:51 [PATCH v3 0/6] Add uSD and eMMC to iwg23s Fabrizio Castro
  2018-10-08  8:51 ` [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Fabrizio Castro
  2018-10-08  8:51 ` [PATCH v3 4/6] ARM: dts: r8a77470: Add SDHI0 support Fabrizio Castro
@ 2018-10-08  8:51 ` Fabrizio Castro
  2018-10-15 15:38   ` Simon Horman
  2018-10-08  8:51 ` [PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support Fabrizio Castro
  3 siblings, 1 reply; 12+ messages in thread
From: Fabrizio Castro @ 2018-10-08  8:51 UTC (permalink / raw)
  To: Rob Herring, Geert Uytterhoeven, Simon Horman, Mark Rutland
  Cc: Fabrizio Castro, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Biju Das

Althought interface SDHI1 found on the RZ/G1C SoC (a.k.a.
r8a77470) is compatible with the R-Car Gen3 ones, its OF
compatibility is restricted to the SoC specific compatible
string to avoid confusion, as from a more generic perspective
the RZ/G1C is sharing the most similarities with the R-Car
Gen2 family of SoCs, and there is a combination of R-Car
Gen2 compatible SDHI IPs and R-Car Gen3 compatible SDHI IP
on this specific chip.
This patch adds the SoC specific part of SDHI1 support, and
since SDHI1 comes with internal DMA, its DT node looks fairly
different from SDHI0 and SDHI2.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>

---
v2->v3:
* No change

v2:
* New patch
---
 arch/arm/boot/dts/r8a77470.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/r8a77470.dtsi b/arch/arm/boot/dts/r8a77470.dtsi
index e01df9c..3e39777 100644
--- a/arch/arm/boot/dts/r8a77470.dtsi
+++ b/arch/arm/boot/dts/r8a77470.dtsi
@@ -427,6 +427,17 @@
 			status = "disabled";
 		};
 
+		sdhi1: sd@ee300000 {
+			compatible = "renesas,sdhi-mmc-r8a77470";
+			reg = <0 0xee300000 0 0x2000>;
+			interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 313>;
+			max-frequency = <156000000>;
+			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+			resets = <&cpg 313>;
+			status = "disabled";
+		};
+
 		sdhi2: sd@ee160000 {
 			compatible = "renesas,sdhi-r8a77470",
 				     "renesas,rcar-gen2-sdhi";
-- 
2.7.4

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

* [PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support
  2018-10-08  8:51 [PATCH v3 0/6] Add uSD and eMMC to iwg23s Fabrizio Castro
                   ` (2 preceding siblings ...)
  2018-10-08  8:51 ` [PATCH v3 5/6] ARM: dts: r8a77470: Add SDHI1 support Fabrizio Castro
@ 2018-10-08  8:51 ` Fabrizio Castro
  2018-10-15 15:38   ` Simon Horman
  3 siblings, 1 reply; 12+ messages in thread
From: Fabrizio Castro @ 2018-10-08  8:51 UTC (permalink / raw)
  To: Rob Herring, Simon Horman, Geert Uytterhoeven, Mark Rutland
  Cc: Fabrizio Castro, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Biju Das

Add uSD card and eMMC support to the iwg23s single board
computer powered by the RZ/G1C SoC (a.k.a. r8a77470).

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>

---
v2->v3:
* No change

v1->v2:
* Added eMMC support as well
* Reworked title and changelog
* Reworked voltage regulators for uSD card on sdhi2
---
 arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts | 76 +++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts b/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
index 22da819..e5cfb50 100644
--- a/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
+++ b/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
@@ -6,6 +6,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
 #include "r8a77470.dtsi"
 / {
 	model = "iWave iW-RainboW-G23S single board computer based on RZ/G1C";
@@ -25,6 +26,37 @@
 		device_type = "memory";
 		reg = <0 0x40000000 0 0x20000000>;
 	};
+
+	reg_1p8v: reg-1p8v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: reg-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	vccq_sdhi2: regulator-vccq-sdhi2 {
+		compatible = "regulator-gpio";
+
+		regulator-name = "SDHI2 VccQ";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
+		gpios-states = <1>;
+		states = <3300000 1
+			  1800000 0>;
+	};
 };
 
 &avb {
@@ -46,10 +78,28 @@
 };
 
 &pfc {
+	mmc_pins_uhs: mmc_uhs {
+		groups = "mmc_data8", "mmc_ctrl";
+		function = "mmc";
+		power-source = <1800>;
+	};
+
 	scif1_pins: scif1 {
 		groups = "scif1_data_b";
 		function = "scif1";
 	};
+
+	sdhi2_pins: sd2 {
+		groups = "sdhi2_data4", "sdhi2_ctrl";
+		function = "sdhi2";
+		power-source = <3300>;
+	};
+
+	sdhi2_pins_uhs: sd2_uhs {
+		groups = "sdhi2_data4", "sdhi2_ctrl";
+		function = "sdhi2";
+		power-source = <1800>;
+	};
 };
 
 &scif1 {
@@ -58,3 +108,29 @@
 
 	status = "okay";
 };
+
+&sdhi1 {
+	pinctrl-0 = <&mmc_pins_uhs>;
+	pinctrl-names = "state_uhs";
+
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
+	bus-width = <8>;
+	mmc-hs200-1_8v;
+	non-removable;
+	fixed-emmc-driver-type = <1>;
+	status = "okay";
+};
+
+&sdhi2 {
+	pinctrl-0 = <&sdhi2_pins>;
+	pinctrl-1 = <&sdhi2_pins_uhs>;
+	pinctrl-names = "default", "state_uhs";
+
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&vccq_sdhi2>;
+	bus-width = <4>;
+	cd-gpios = <&gpio4 20 GPIO_ACTIVE_LOW>;
+	sd-uhs-sdr50;
+	status = "okay";
+};
-- 
2.7.4

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

* Re: [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support
  2018-10-08  8:51 ` [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Fabrizio Castro
@ 2018-10-09  9:48   ` Simon Horman
  2018-10-12 14:53   ` Rob Herring
  2018-10-15 13:15   ` Ulf Hansson
  2 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2018-10-09  9:48 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Ulf Hansson, Rob Herring, Geert Uytterhoeven, Mark Rutland,
	linux-mmc, devicetree, Chris Paterson, Biju Das,
	linux-renesas-soc

On Mon, Oct 08, 2018 at 09:51:47AM +0100, Fabrizio Castro wrote:
> The RZ/G1C (a.k.a. R8A77470) comes with three SDHI interfaces,
> SDHI0 and SDHI2 are compatible with R-Car Gen2 SDHIs, and
> SDHI1 is compatible with R-Car Gen3 SDHIs, as it comes with an
> internal DMAC, therefore SDHI1 is fully compatible with driver
> renesas_sdhi_internal_dmac driver. As a result, the compatible
> strings for the R8A77470 SDHI interfaces are a little bit special.
> Document SDHI support for the RZ/G1C SoC.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> 
> ---
> v2->v3:
> * Incorporated comments from Geert
> 
> v1->v2:
> * Added "renesas,sdhi-mmc-r8a77470"
> * Using generic/fallback compatibilty only for SDHI[02]
> * Reworked changelog
> ---
>  Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> index d39d5e4..27f2eab 100644
> --- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> @@ -19,6 +19,8 @@ Required properties:
>  		"renesas,sdhi-r8a7744" - SDHI IP on R8A7744 SoC
>  		"renesas,sdhi-r8a7745" - SDHI IP on R8A7745 SoC
>  		"renesas,sdhi-r8a774a1" - SDHI IP on R8A774A1 SoC
> +		"renesas,sdhi-r8a77470" - SDHI IP on R8A77470 SoC
> +		"renesas,sdhi-mmc-r8a77470" - SDHI/MMC IP on R8A77470 SoC
>  		"renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
>  		"renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
>  		"renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC
> @@ -35,8 +37,8 @@ Required properties:
>  		"renesas,sdhi-r8a77995" - SDHI IP on R8A77995 SoC
>  		"renesas,sdhi-shmobile" - a generic sh-mobile SDHI controller
>  		"renesas,rcar-gen1-sdhi" - a generic R-Car Gen1 SDHI controller
> -		"renesas,rcar-gen2-sdhi" - a generic R-Car Gen2 or RZ/G1
> -					   SDHI controller
> +		"renesas,rcar-gen2-sdhi" - a generic R-Car Gen2 and RZ/G1 SDHI
> +					   (not SDHI/MMC) controller
>  		"renesas,rcar-gen3-sdhi" - a generic R-Car Gen3 or RZ/G2
>  					   SDHI controller
>  
> -- 
> 2.7.4
> 

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

* Re: [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support
  2018-10-08  8:51 ` [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Fabrizio Castro
  2018-10-09  9:48   ` Simon Horman
@ 2018-10-12 14:53   ` Rob Herring
  2018-10-15 13:15   ` Ulf Hansson
  2 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2018-10-12 14:53 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Ulf Hansson, Geert Uytterhoeven, Simon Horman, Mark Rutland,
	linux-mmc, devicetree, Chris Paterson, Biju Das,
	linux-renesas-soc

On Mon,  8 Oct 2018 09:51:47 +0100, Fabrizio Castro wrote:
> The RZ/G1C (a.k.a. R8A77470) comes with three SDHI interfaces,
> SDHI0 and SDHI2 are compatible with R-Car Gen2 SDHIs, and
> SDHI1 is compatible with R-Car Gen3 SDHIs, as it comes with an
> internal DMAC, therefore SDHI1 is fully compatible with driver
> renesas_sdhi_internal_dmac driver. As a result, the compatible
> strings for the R8A77470 SDHI interfaces are a little bit special.
> Document SDHI support for the RZ/G1C SoC.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> ---
> v2->v3:
> * Incorporated comments from Geert
> 
> v1->v2:
> * Added "renesas,sdhi-mmc-r8a77470"
> * Using generic/fallback compatibilty only for SDHI[02]
> * Reworked changelog
> ---
>  Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support
  2018-10-08  8:51 ` [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Fabrizio Castro
  2018-10-09  9:48   ` Simon Horman
  2018-10-12 14:53   ` Rob Herring
@ 2018-10-15 13:15   ` Ulf Hansson
  2 siblings, 0 replies; 12+ messages in thread
From: Ulf Hansson @ 2018-10-15 13:15 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Rob Herring, Geert Uytterhoeven, Simon Horman, Mark Rutland,
	linux-mmc@vger.kernel.org, DTML, Chris Paterson, Biju Das,
	Linux-Renesas

On 8 October 2018 at 10:51, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> The RZ/G1C (a.k.a. R8A77470) comes with three SDHI interfaces,
> SDHI0 and SDHI2 are compatible with R-Car Gen2 SDHIs, and
> SDHI1 is compatible with R-Car Gen3 SDHIs, as it comes with an
> internal DMAC, therefore SDHI1 is fully compatible with driver
> renesas_sdhi_internal_dmac driver. As a result, the compatible
> strings for the R8A77470 SDHI interfaces are a little bit special.
> Document SDHI support for the RZ/G1C SoC.
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied for next, thanks!

Kind regards
Uffe

>
> ---
> v2->v3:
> * Incorporated comments from Geert
>
> v1->v2:
> * Added "renesas,sdhi-mmc-r8a77470"
> * Using generic/fallback compatibilty only for SDHI[02]
> * Reworked changelog
> ---
>  Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> index d39d5e4..27f2eab 100644
> --- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
> @@ -19,6 +19,8 @@ Required properties:
>                 "renesas,sdhi-r8a7744" - SDHI IP on R8A7744 SoC
>                 "renesas,sdhi-r8a7745" - SDHI IP on R8A7745 SoC
>                 "renesas,sdhi-r8a774a1" - SDHI IP on R8A774A1 SoC
> +               "renesas,sdhi-r8a77470" - SDHI IP on R8A77470 SoC
> +               "renesas,sdhi-mmc-r8a77470" - SDHI/MMC IP on R8A77470 SoC
>                 "renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
>                 "renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
>                 "renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC
> @@ -35,8 +37,8 @@ Required properties:
>                 "renesas,sdhi-r8a77995" - SDHI IP on R8A77995 SoC
>                 "renesas,sdhi-shmobile" - a generic sh-mobile SDHI controller
>                 "renesas,rcar-gen1-sdhi" - a generic R-Car Gen1 SDHI controller
> -               "renesas,rcar-gen2-sdhi" - a generic R-Car Gen2 or RZ/G1
> -                                          SDHI controller
> +               "renesas,rcar-gen2-sdhi" - a generic R-Car Gen2 and RZ/G1 SDHI
> +                                          (not SDHI/MMC) controller
>                 "renesas,rcar-gen3-sdhi" - a generic R-Car Gen3 or RZ/G2
>                                            SDHI controller
>
> --
> 2.7.4
>

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

* Re: [PATCH v3 4/6] ARM: dts: r8a77470: Add SDHI0 support
  2018-10-08  8:51 ` [PATCH v3 4/6] ARM: dts: r8a77470: Add SDHI0 support Fabrizio Castro
@ 2018-10-15 15:19   ` Simon Horman
  2018-10-15 15:38     ` Simon Horman
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Horman @ 2018-10-15 15:19 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Rob Herring, Geert Uytterhoeven, Mark Rutland, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Biju Das

On Mon, Oct 08, 2018 at 09:51:50AM +0100, Fabrizio Castro wrote:
> RZ/G1C comes with two different types of IP for the SDHI
> interfaces, SDHI0 and SDHI2 share the same IP type, and
> such an IP is also compatible with the one found in R-Car
> Gen2. SDHI1 IP on the other hand is compatible with R-Car
> Gen3 with internal DMA.
> This patch completes the SDHI support of the R-Car Gen2
> compatible IPs, including fixing the max-frequency
> definition of SDHI2, as it turns out there is a bug in
> Section 1.3.9 of the RZ/G1C Hardware User's Manual (Rev.
> 1.00 Oct. 2017).
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>
> 
> ---
> v2->v3:
> * No change
> 
> v2:
> * New patch
> ---
>  arch/arm/boot/dts/r8a77470.dtsi | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/r8a77470.dtsi b/arch/arm/boot/dts/r8a77470.dtsi
> index 9e7f86d..e01df9c 100644
> --- a/arch/arm/boot/dts/r8a77470.dtsi
> +++ b/arch/arm/boot/dts/r8a77470.dtsi
> @@ -412,6 +412,21 @@
>  			status = "disabled";
>  		};
>  
> +		sdhi0: sd@ee100000 {
> +			compatible = "renesas,sdhi-r8a77470",
> +				     "renesas,rcar-gen2-sdhi";
> +			reg = <0 0xee100000 0 0x328>;

I am unable to verify the base address of this register range,
but I am prepared to take your word for it.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

I'm happy to apply this patch but I'm holding off for the moment
as I have a question about the following patch in the series.


> +			interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 314>;
> +			dmas = <&dmac0 0xcd>, <&dmac0 0xce>,
> +			       <&dmac1 0xcd>, <&dmac1 0xce>;
> +			dma-names = "tx", "rx", "tx", "rx";
> +			max-frequency = <156000000>;
> +			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
> +			resets = <&cpg 314>;
> +			status = "disabled";
> +		};
> +
>  		sdhi2: sd@ee160000 {
>  			compatible = "renesas,sdhi-r8a77470",
>  				     "renesas,rcar-gen2-sdhi";
> @@ -421,7 +436,7 @@
>  			dmas = <&dmac0 0xd3>, <&dmac0 0xd4>,
>  			       <&dmac1 0xd3>, <&dmac1 0xd4>;
>  			dma-names = "tx", "rx", "tx", "rx";
> -			max-frequency = <97500000>;
> +			max-frequency = <78000000>;
>  			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
>  			resets = <&cpg 312>;
>  			status = "disabled";
> -- 
> 2.7.4
> 

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

* Re: [PATCH v3 4/6] ARM: dts: r8a77470: Add SDHI0 support
  2018-10-15 15:19   ` Simon Horman
@ 2018-10-15 15:38     ` Simon Horman
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2018-10-15 15:38 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Rob Herring, Geert Uytterhoeven, Mark Rutland, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Biju Das

On Mon, Oct 15, 2018 at 05:19:30PM +0200, Simon Horman wrote:
> On Mon, Oct 08, 2018 at 09:51:50AM +0100, Fabrizio Castro wrote:
> > RZ/G1C comes with two different types of IP for the SDHI
> > interfaces, SDHI0 and SDHI2 share the same IP type, and
> > such an IP is also compatible with the one found in R-Car
> > Gen2. SDHI1 IP on the other hand is compatible with R-Car
> > Gen3 with internal DMA.
> > This patch completes the SDHI support of the R-Car Gen2
> > compatible IPs, including fixing the max-frequency
> > definition of SDHI2, as it turns out there is a bug in
> > Section 1.3.9 of the RZ/G1C Hardware User's Manual (Rev.
> > 1.00 Oct. 2017).
> > 
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Reviewed-by: Biju Das <biju.das@bp.renesas.com>
> > 
> > ---
> > v2->v3:
> > * No change
> > 
> > v2:
> > * New patch
> > ---
> >  arch/arm/boot/dts/r8a77470.dtsi | 17 ++++++++++++++++-
> >  1 file changed, 16 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/r8a77470.dtsi b/arch/arm/boot/dts/r8a77470.dtsi
> > index 9e7f86d..e01df9c 100644
> > --- a/arch/arm/boot/dts/r8a77470.dtsi
> > +++ b/arch/arm/boot/dts/r8a77470.dtsi
> > @@ -412,6 +412,21 @@
> >  			status = "disabled";
> >  		};
> >  
> > +		sdhi0: sd@ee100000 {
> > +			compatible = "renesas,sdhi-r8a77470",
> > +				     "renesas,rcar-gen2-sdhi";
> > +			reg = <0 0xee100000 0 0x328>;
> 
> I am unable to verify the base address of this register range,
> but I am prepared to take your word for it.
> 
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> 
> I'm happy to apply this patch but I'm holding off for the moment
> as I have a question about the following patch in the series.

Sorry for the noise, I am now happy with the other patches in this series.
I have applied patches 4, 5 and 6 of this series for v4.21.

> 
> 
> > +			interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
> > +			clocks = <&cpg CPG_MOD 314>;
> > +			dmas = <&dmac0 0xcd>, <&dmac0 0xce>,
> > +			       <&dmac1 0xcd>, <&dmac1 0xce>;
> > +			dma-names = "tx", "rx", "tx", "rx";
> > +			max-frequency = <156000000>;
> > +			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
> > +			resets = <&cpg 314>;
> > +			status = "disabled";
> > +		};
> > +
> >  		sdhi2: sd@ee160000 {
> >  			compatible = "renesas,sdhi-r8a77470",
> >  				     "renesas,rcar-gen2-sdhi";
> > @@ -421,7 +436,7 @@
> >  			dmas = <&dmac0 0xd3>, <&dmac0 0xd4>,
> >  			       <&dmac1 0xd3>, <&dmac1 0xd4>;
> >  			dma-names = "tx", "rx", "tx", "rx";
> > -			max-frequency = <97500000>;
> > +			max-frequency = <78000000>;
> >  			power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
> >  			resets = <&cpg 312>;
> >  			status = "disabled";
> > -- 
> > 2.7.4
> > 

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

* Re: [PATCH v3 5/6] ARM: dts: r8a77470: Add SDHI1 support
  2018-10-08  8:51 ` [PATCH v3 5/6] ARM: dts: r8a77470: Add SDHI1 support Fabrizio Castro
@ 2018-10-15 15:38   ` Simon Horman
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2018-10-15 15:38 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Rob Herring, Geert Uytterhoeven, Mark Rutland, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Biju Das

On Mon, Oct 08, 2018 at 09:51:51AM +0100, Fabrizio Castro wrote:
> Althought interface SDHI1 found on the RZ/G1C SoC (a.k.a.
> r8a77470) is compatible with the R-Car Gen3 ones, its OF
> compatibility is restricted to the SoC specific compatible
> string to avoid confusion, as from a more generic perspective
> the RZ/G1C is sharing the most similarities with the R-Car
> Gen2 family of SoCs, and there is a combination of R-Car
> Gen2 compatible SDHI IPs and R-Car Gen3 compatible SDHI IP
> on this specific chip.
> This patch adds the SoC specific part of SDHI1 support, and
> since SDHI1 comes with internal DMA, its DT node looks fairly
> different from SDHI0 and SDHI2.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>

Thanks, applied for v4.21.

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

* Re: [PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support
  2018-10-08  8:51 ` [PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support Fabrizio Castro
@ 2018-10-15 15:38   ` Simon Horman
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2018-10-15 15:38 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Rob Herring, Geert Uytterhoeven, Mark Rutland, Magnus Damm,
	linux-renesas-soc, devicetree, Chris Paterson, Biju Das

On Mon, Oct 08, 2018 at 09:51:52AM +0100, Fabrizio Castro wrote:
> Add uSD card and eMMC support to the iwg23s single board
> computer powered by the RZ/G1C SoC (a.k.a. r8a77470).
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das@bp.renesas.com>

Thanks, applied for v4.21.

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

end of thread, other threads:[~2018-10-15 15:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08  8:51 [PATCH v3 0/6] Add uSD and eMMC to iwg23s Fabrizio Castro
2018-10-08  8:51 ` [PATCH v3 1/6] dt-bindings: mmc: renesas_sdhi: Add r8a77470 support Fabrizio Castro
2018-10-09  9:48   ` Simon Horman
2018-10-12 14:53   ` Rob Herring
2018-10-15 13:15   ` Ulf Hansson
2018-10-08  8:51 ` [PATCH v3 4/6] ARM: dts: r8a77470: Add SDHI0 support Fabrizio Castro
2018-10-15 15:19   ` Simon Horman
2018-10-15 15:38     ` Simon Horman
2018-10-08  8:51 ` [PATCH v3 5/6] ARM: dts: r8a77470: Add SDHI1 support Fabrizio Castro
2018-10-15 15:38   ` Simon Horman
2018-10-08  8:51 ` [PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support Fabrizio Castro
2018-10-15 15:38   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).