[PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

Subsystems: the rest

STALE3273d

7 messages, 4 authors, 2017-09-21 · open the first message on its own page

[PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

From: Chris Paterson <hidden>
Date: 2017-09-13 17:05:37

From: Fabrizio Castro <redacted>

Enable the SDHI0 controller on iWave RZ/G1E carrier board.

Signed-off-by: Fabrizio Castro <redacted>
Signed-off-by: Chris Paterson <redacted>
---
This patch is based on renesas-devel-20170913-v4.13.


 arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 37 +++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts
index aac84c6..c34dbe7 100644
--- a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts
+++ b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts
@@ -24,6 +24,19 @@
 		bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
 		stdout-path = "serial0:115200n8";
 	};
+
+	vccq_sdhi0: regulator-vccq-sdhi0 {
+		compatible = "regulator-gpio";
+
+		regulator-name = "SDHI0 VccQ";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+		gpios-states = <1>;
+		states = <3300000 1
+			  1800000 0>;
+	};
 };
 
 &pfc {
@@ -36,6 +49,18 @@
 		groups = "avb_mdio", "avb_gmii";
 		function = "avb";
 	};
+
+	sdhi0_pins: sd0 {
+		groups = "sdhi0_data4", "sdhi0_ctrl";
+		function = "sdhi0";
+		power-source = <3300>;
+	};
+
+	sdhi0_pins_uhs: sd0_uhs {
+		groups = "sdhi0_data4", "sdhi0_ctrl";
+		function = "sdhi0";
+		power-source = <1800>;
+	};
 };
 
 &scif4 {
@@ -63,3 +88,15 @@
 		micrel,led-mode = <1>;
 	};
 };
+
+&sdhi0 {
+	pinctrl-0 = <&sdhi0_pins>;
+	pinctrl-1 = <&sdhi0_pins_uhs>;
+	pinctrl-names = "default", "state_uhs";
+
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&vccq_sdhi0>;
+	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
+	sd-uhs-sdr104;
+	status = "okay";
+};
-- 
1.9.1

Re: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

From: Simon Horman <horms@verge.net.au>
Date: 2017-09-15 08:05:30

On Wed, Sep 13, 2017 at 06:05:37PM +0100, Chris Paterson wrote:
From: Fabrizio Castro <redacted>

Enable the SDHI0 controller on iWave RZ/G1E carrier board.
...
quoted hunk
@@ -63,3 +88,15 @@
 		micrel,led-mode = <1>;
 	};
 };
+
+&sdhi0 {
+	pinctrl-0 = <&sdhi0_pins>;
+	pinctrl-1 = <&sdhi0_pins_uhs>;
+	pinctrl-names = "default", "state_uhs";
+
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&vccq_sdhi0>;
+	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
I take that the absence of a wp-gpio means that that this is a ?SD slot.
Could you help me by documenting this correctly on
http://elinux.org/index.php?title=Renesas-MMC-Enabled-Speeds ?

For some reason I thought that SDHI0 wasn't exposed at all, so I guess
my reading of the documentation was incorrect.


I think you also want sd-uhs-sdr50 here too.
You can test it by removing the sd-uhs-sdr104 property.
+	sd-uhs-sdr104;
+	status = "okay";
+};
-- 
1.9.1

RE: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

From: Fabrizio Castro <hidden>
Date: 2017-09-18 16:26:24

Hi Simon,

Apologies for the delay in getting back to you.
-----Original Message-----
From: Simon Horman [mailto:horms at verge.net.au]
Sent: 15 September 2017 09:06
To: Chris Paterson <redacted>
Cc: Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Magnus Damm <magnus.damm@gmail.com>;
Russell King [off-list ref]; Fabrizio Castro [off-list ref]; devicetree at vger.kernel.org; linux-renesas-
soc at vger.kernel.org; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

On Wed, Sep 13, 2017 at 06:05:37PM +0100, Chris Paterson wrote:
quoted
From: Fabrizio Castro <redacted>

Enable the SDHI0 controller on iWave RZ/G1E carrier board.
...
quoted
@@ -63,3 +88,15 @@
 micrel,led-mode = <1>;
 };
 };
+
+&sdhi0 {
+pinctrl-0 = <&sdhi0_pins>;
+pinctrl-1 = <&sdhi0_pins_uhs>;
+pinctrl-names = "default", "state_uhs";
+
+vmmc-supply = <&reg_3p3v>;
+vqmmc-supply = <&vccq_sdhi0>;
+cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
I take that the absence of a wp-gpio means that that this is a ?SD slot.
Could you help me by documenting this correctly on
http://elinux.org/index.php?title=Renesas-MMC-Enabled-Speeds ?

For some reason I thought that SDHI0 wasn't exposed at all, so I guess
my reading of the documentation was incorrect.


I think you also want sd-uhs-sdr50 here too.
You can test it by removing the sd-uhs-sdr104 property.
Whilst playing with uhs properties I have noticed that with the version of the DT I was using I couldn't put sdhi0 into an uhs mode and that was down to the fact that the driver wasn't driving the regulator to 1.8V. This happens because (in my case) the power regulator gets probed after the sdhi does, and the sdhi code doesn't seem to deal with it. Am I the only one with this problem or is it a known problem?

Thanks,
Fabrizio
quoted
+sd-uhs-sdr104;
+status = "okay";
+};
--
1.9.1


Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

Re: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2017-09-20 11:40:20

On Wed, Sep 13, 2017 at 7:05 PM, Chris Paterson
[off-list ref] wrote:
From: Fabrizio Castro <redacted>

Enable the SDHI0 controller on iWave RZ/G1E carrier board.

Signed-off-by: Fabrizio Castro <redacted>
Signed-off-by: Chris Paterson <redacted>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

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

Re: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

From: Simon Horman <horms@verge.net.au>
Date: 2017-09-21 08:38:40

On Wed, Sep 20, 2017 at 01:40:20PM +0200, Geert Uytterhoeven wrote:
On Wed, Sep 13, 2017 at 7:05 PM, Chris Paterson
[off-list ref] wrote:
quoted
From: Fabrizio Castro <redacted>

Enable the SDHI0 controller on iWave RZ/G1E carrier board.

Signed-off-by: Fabrizio Castro <redacted>
Signed-off-by: Chris Paterson <redacted>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, applied.

Re: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

From: Simon Horman <horms@verge.net.au>
Date: 2017-09-21 08:42:20

On Thu, Sep 21, 2017 at 10:38:40AM +0200, Simon Horman wrote:
On Wed, Sep 20, 2017 at 01:40:20PM +0200, Geert Uytterhoeven wrote:
quoted
On Wed, Sep 13, 2017 at 7:05 PM, Chris Paterson
[off-list ref] wrote:
quoted
From: Fabrizio Castro <redacted>

Enable the SDHI0 controller on iWave RZ/G1E carrier board.

Signed-off-by: Fabrizio Castro <redacted>
Signed-off-by: Chris Paterson <redacted>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, applied.
Sorry, I somehow overlooked Fabrizio's comments.
I have dropped this patch for now.

RE: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

From: Fabrizio Castro <hidden>
Date: 2017-09-21 08:53:00

Hello Simon,
-----Original Message-----
From: Simon Horman [mailto:horms at verge.net.au]
Sent: 21 September 2017 09:42
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Chris Paterson <redacted>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>;
Magnus Damm [off-list ref]; Russell King [off-list ref]; Fabrizio Castro
[off-list ref]; devicetree at vger.kernel.org; Linux-Renesas [off-list ref]; linux-arm-
kernel at lists.infradead.org
Subject: Re: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller

On Thu, Sep 21, 2017 at 10:38:40AM +0200, Simon Horman wrote:
quoted
On Wed, Sep 20, 2017 at 01:40:20PM +0200, Geert Uytterhoeven wrote:
quoted
On Wed, Sep 13, 2017 at 7:05 PM, Chris Paterson
[off-list ref] wrote:
quoted
From: Fabrizio Castro <redacted>

Enable the SDHI0 controller on iWave RZ/G1E carrier board.

Signed-off-by: Fabrizio Castro <redacted>
Signed-off-by: Chris Paterson <redacted>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, applied.
Sorry, I somehow overlooked Fabrizio's comments.
I have dropped this patch for now.
Thank you for doing this.
We are working on a new patch now, I'll submit a V2 as soon as it is ready.
Just to recap (all in one place), we found an HW issue and a SW one preventing SDHI0 from working properly at UHS SDR50 and SDR104, therefore we need a new patch to limit the speed of this interface.

Thanks,
Fabrizio





Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help