All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gen3: dts: enable on-board eMMC
@ 2016-09-14 17:09 Wolfram Sang
  2016-09-14 17:09 ` [PATCH 1/2] arm64: dts: r8a7795: salvator: " Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-09-14 17:09 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: linux-mmc, Simon Horman, Dirk Behme, Wolfram Sang

From: Wolfram Sang <wsa@the-dreams.de>

Here are the DTS changes to enable the on-board eMMC memory at 8 bit bus
widths on R-Car Gen3 Salvator-X boards.

Note that 'non-removable' is not supported yet because of Runtime PM issues. It
seems we need to overhaul Runtime PM handling for other reasons as well, so I
suggest the basic support goes in like this and DTS do not use 'non-removable'
for now.

Note also that I decided to use the pattern that pinctrl-0 is 3.3v and
pinctrl-1 is 1.8v, although the eMMC is fixed at 1.8v. I tried a few ways to
only use pinctrl-0 being 1.8v here, but they all ended up to be confusing for
users IMO, so I sticked to the most consistent solution after all.

These patches are based on top of Simon's sdr104-v7 patches and the accompanied
driver patches sent a minute ago. A branch can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/topic/sdhi-8bit-emmc

Please review, comment, apply...

   Wolfram

Wolfram Sang (2):
  arm64: dts: r8a7795: salvator: enable on-board eMMC
  arm64: dts: r8a7796: salvator: enable on board eMMC

 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 43 +++++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 44 +++++++++++++++++++++-
 2 files changed, 86 insertions(+), 1 deletion(-)

-- 
2.9.3

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

* [PATCH 1/2] arm64: dts: r8a7795: salvator: enable on-board eMMC
  2016-09-14 17:09 [PATCH 0/2] gen3: dts: enable on-board eMMC Wolfram Sang
@ 2016-09-14 17:09 ` Wolfram Sang
  2016-09-14 17:09 ` [PATCH 2/2] arm64: dts: r8a7796: salvator: enable on board eMMC Wolfram Sang
  2016-09-16  9:38 ` [PATCH 0/2] gen3: dts: enable on-board eMMC Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-09-14 17:09 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: linux-mmc, Simon Horman, Dirk Behme, Wolfram Sang

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 8964b1ea3cea69..c299919e5e2fdc 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -62,6 +62,24 @@
 		clock-frequency = <24576000>;
 	};
 
+	reg_1p8v: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator1 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
 	vcc_sdhi0: regulator-vcc-sdhi0 {
 		compatible = "regulator-fixed";
 
@@ -246,6 +264,18 @@
 		power-source = <1800>;
 	};
 
+	sdhi2_pins: sd2 {
+		groups = "sdhi2_data8", "sdhi2_ctrl";
+		function = "sdhi2";
+		power-source = <3300>;
+	};
+
+	sdhi2_pins_uhs: sd2 {
+		groups = "sdhi2_data8", "sdhi2_ctrl";
+		function = "sdhi2";
+		power-source = <1800>;
+	};
+
 	sdhi3_pins: sd3 {
 		groups = "sdhi3_data4", "sdhi3_ctrl";
 		function = "sdhi3";
@@ -398,6 +428,19 @@
 	status = "okay";
 };
 
+&sdhi2 {
+	/* used for on-board 8bit eMMC */
+	pinctrl-0 = <&sdhi2_pins>;
+	pinctrl-1 = <&sdhi2_pins_uhs>;
+	pinctrl-names = "default", "state_uhs";
+
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
+	bus-width = <8>;
+	status = "okay";
+	/* 'non-removable;' does not work currently. Needs PM fixes. */
+};
+
 &sdhi3 {
 	pinctrl-0 = <&sdhi3_pins>;
 	pinctrl-1 = <&sdhi3_pins_uhs>;
-- 
2.9.3

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

* [PATCH 2/2] arm64: dts: r8a7796: salvator: enable on board eMMC
  2016-09-14 17:09 [PATCH 0/2] gen3: dts: enable on-board eMMC Wolfram Sang
  2016-09-14 17:09 ` [PATCH 1/2] arm64: dts: r8a7795: salvator: " Wolfram Sang
@ 2016-09-14 17:09 ` Wolfram Sang
  2016-09-16  9:38 ` [PATCH 0/2] gen3: dts: enable on-board eMMC Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-09-14 17:09 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: linux-mmc, Simon Horman, Dirk Behme, Wolfram Sang

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 44 +++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
index 91440eb2237e72..db27615fc6ff9f 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
@@ -31,6 +31,24 @@
 		reg = <0x0 0x48000000 0x0 0x78000000>;
 	};
 
+	reg_1p8v: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator1 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
 	vcc_sdhi0: regulator-vcc-sdhi0 {
 		compatible = "regulator-fixed";
 
@@ -78,7 +96,6 @@
 		states = <3300000 1
 			  1800000 0>;
 	};
-
 };
 
 &pfc {
@@ -106,6 +123,18 @@
 		power-source = <1800>;
 	};
 
+	sdhi2_pins: sd2 {
+		groups = "sdhi2_data8", "sdhi2_ctrl";
+		function = "sdhi2";
+		power-source = <3300>;
+	};
+
+	sdhi2_pins_uhs: sd2 {
+		groups = "sdhi2_data8", "sdhi2_ctrl";
+		function = "sdhi2";
+		power-source = <1800>;
+	};
+
 	sdhi3_pins: sd3 {
 		groups = "sdhi3_data4", "sdhi3_ctrl";
 		function = "sdhi3";
@@ -138,6 +167,19 @@
 	status = "okay";
 };
 
+&sdhi2 {
+	/* used for on-board 8bit eMMC */
+	pinctrl-0 = <&sdhi2_pins>;
+	pinctrl-1 = <&sdhi2_pins_uhs>;
+	pinctrl-names = "default", "state_uhs";
+
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
+	bus-width = <8>;
+	status = "okay";
+	/* 'non-removable;' does not work currently. Needs PM fixes. */
+};
+
 &sdhi3 {
 	pinctrl-0 = <&sdhi3_pins>;
 	pinctrl-1 = <&sdhi3_pins_uhs>;
-- 
2.9.3

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

* Re: [PATCH 0/2] gen3: dts: enable on-board eMMC
  2016-09-14 17:09 [PATCH 0/2] gen3: dts: enable on-board eMMC Wolfram Sang
  2016-09-14 17:09 ` [PATCH 1/2] arm64: dts: r8a7795: salvator: " Wolfram Sang
  2016-09-14 17:09 ` [PATCH 2/2] arm64: dts: r8a7796: salvator: enable on board eMMC Wolfram Sang
@ 2016-09-16  9:38 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2016-09-16  9:38 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-renesas-soc, linux-mmc, Dirk Behme, Wolfram Sang

On Wed, Sep 14, 2016 at 07:09:41PM +0200, Wolfram Sang wrote:
> From: Wolfram Sang <wsa@the-dreams.de>
> 
> Here are the DTS changes to enable the on-board eMMC memory at 8 bit bus
> widths on R-Car Gen3 Salvator-X boards.
> 
> Note that 'non-removable' is not supported yet because of Runtime PM issues. It
> seems we need to overhaul Runtime PM handling for other reasons as well, so I
> suggest the basic support goes in like this and DTS do not use 'non-removable'
> for now.
> 
> Note also that I decided to use the pattern that pinctrl-0 is 3.3v and
> pinctrl-1 is 1.8v, although the eMMC is fixed at 1.8v. I tried a few ways to
> only use pinctrl-0 being 1.8v here, but they all ended up to be confusing for
> users IMO, so I sticked to the most consistent solution after all.
> 
> These patches are based on top of Simon's sdr104-v7 patches and the accompanied
> driver patches sent a minute ago. A branch can be found here:

Please ping me / repost once these patches are ready to be merged.

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

end of thread, other threads:[~2016-09-16  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 17:09 [PATCH 0/2] gen3: dts: enable on-board eMMC Wolfram Sang
2016-09-14 17:09 ` [PATCH 1/2] arm64: dts: r8a7795: salvator: " Wolfram Sang
2016-09-14 17:09 ` [PATCH 2/2] arm64: dts: r8a7796: salvator: enable on board eMMC Wolfram Sang
2016-09-16  9:38 ` [PATCH 0/2] gen3: dts: enable on-board eMMC Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.