linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and MMCIF support
@ 2016-08-09 12:19 Simon Horman
  2016-08-09 12:19 ` [PATCH 1/2] ARM: dts: alt: add SDHI0 and 1 support Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Simon Horman @ 2016-08-09 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

this short series enables SDHI 0 and 1, and MMCIF on the r8a7794/Alt board.
The SDHI IP blocks are exposed as SD card slots while the MMCIF block
is wired up to on-board eMMC.

N.B.: I do not currently have physical access to an Alt board but I do
      have remote access which I used to test these patches.

Simon Horman (2):
  ARM: dts: alt: add SDHI0 and 1 support
  ARM: dts: alt: add MMCIF support

 arch/arm/boot/dts/r8a7794-alt.dts | 106 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

-- 
2.7.0.rc3.207.g0ac5344

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

* [PATCH 1/2] ARM: dts: alt: add SDHI0 and 1 support
  2016-08-09 12:19 [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and MMCIF support Simon Horman
@ 2016-08-09 12:19 ` Simon Horman
  2016-08-09 12:19 ` [PATCH 2/2] ARM: dts: alt: add MMCIF support Simon Horman
  2016-08-17  7:08 ` [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and " Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2016-08-09 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

Define the Alt board dependent part of the SDHI0 and 1
device nodes along with the necessary voltage regulators.

Based on work by the original patch by Vladimir Barinov and
Sergei Shtylyov for the Silk board.

Cc: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7794-alt.dts | 81 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index 1ad37d431a2a..fe7c128cc965 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -10,6 +10,7 @@
 
 /dts-v1/;
 #include "r8a7794.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Alt";
@@ -29,6 +30,54 @@
 		reg = <0 0x40000000 0 0x40000000>;
 	};
 
+	vcc_sdhi0: regulator-vcc-sdhi0 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "SDHI0 Vcc";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	vccq_sdhi0: regulator-vccq-sdhi0 {
+		compatible = "regulator-gpio";
+
+		regulator-name = "SDHI0 VccQ";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
+		gpios-states = <1>;
+		states = <3300000 1
+			  1800000 0>;
+	};
+
+	vcc_sdhi1: regulator-vcc-sdhi1 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "SDHI1 Vcc";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	vccq_sdhi1: regulator-vccq-sdhi1 {
+		compatible = "regulator-gpio";
+
+		regulator-name = "SDHI1 VccQ";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+		gpios-states = <1>;
+		states = <3300000 1
+			  1800000 0>;
+	};
+
 	lbsc {
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -140,6 +189,16 @@
 		groups = "vin0_data8", "vin0_clk";
 		function = "vin0";
 	};
+
+	sdhi0_pins: sd0 {
+		groups = "sdhi0_data4", "sdhi0_ctrl";
+		function = "sdhi0";
+	};
+
+	sdhi1_pins: sd1 {
+		groups = "sdhi1_data4", "sdhi1_ctrl";
+		function = "sdhi1";
+	};
 };
 
 &cmt0 {
@@ -169,6 +228,28 @@
 	};
 };
 
+&sdhi0 {
+	pinctrl-0 = <&sdhi0_pins>;
+	pinctrl-names = "default";
+
+	vmmc-supply = <&vcc_sdhi0>;
+	vqmmc-supply = <&vccq_sdhi0>;
+	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
+	wp-gpios = <&gpio6 7 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
+
+&sdhi1 {
+	pinctrl-0 = <&sdhi1_pins>;
+	pinctrl-names = "default";
+
+	vmmc-supply = <&vcc_sdhi1>;
+	vqmmc-supply = <&vccq_sdhi1>;
+	cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
+	wp-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
+
 &i2c1 {
 	pinctrl-0 = <&i2c1_pins>;
 	pinctrl-names = "default";
-- 
2.7.0.rc3.207.g0ac5344

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

* [PATCH 2/2] ARM: dts: alt: add MMCIF support
  2016-08-09 12:19 [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and MMCIF support Simon Horman
  2016-08-09 12:19 ` [PATCH 1/2] ARM: dts: alt: add SDHI0 and 1 support Simon Horman
@ 2016-08-09 12:19 ` Simon Horman
  2016-08-17  7:08 ` [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and " Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2016-08-09 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

Define the Alt board dependent part of the MMCIF device node.

Like the Silk the board has eMMC chip along with the  necessary voltage
regulator (note that the Vcc/Vccq regulator is dummy -- it's required by
the MMCIF driver but doesn't actually exist on the board).

Based on work for the Silk board by Vladimir Barinov and Sergei Shtylyov.

Cc: Vladimir Barinov <vladimir.barinov@cogentembedded.com>.
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7794-alt.dts | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index fe7c128cc965..8d1b35afaf82 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -30,6 +30,15 @@
 		reg = <0 0x40000000 0 0x40000000>;
 	};
 
+	d3_3v: regulator-d3-3v {
+		compatible = "regulator-fixed";
+		regulator-name = "D3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
 	vcc_sdhi0: regulator-vcc-sdhi0 {
 		compatible = "regulator-fixed";
 
@@ -190,6 +199,11 @@
 		function = "vin0";
 	};
 
+	mmcif0_pins: mmcif0 {
+		groups = "mmc_data8", "mmc_ctrl";
+		function = "mmc";
+	};
+
 	sdhi0_pins: sd0 {
 		groups = "sdhi0_data4", "sdhi0_ctrl";
 		function = "sdhi0";
@@ -228,6 +242,17 @@
 	};
 };
 
+&mmcif0 {
+	pinctrl-0 = <&mmcif0_pins>;
+	pinctrl-names = "default";
+
+	vmmc-supply = <&d3_3v>;
+	vqmmc-supply = <&d3_3v>;
+	bus-width = <8>;
+	non-removable;
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
-- 
2.7.0.rc3.207.g0ac5344

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

* [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and MMCIF support
  2016-08-09 12:19 [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and MMCIF support Simon Horman
  2016-08-09 12:19 ` [PATCH 1/2] ARM: dts: alt: add SDHI0 and 1 support Simon Horman
  2016-08-09 12:19 ` [PATCH 2/2] ARM: dts: alt: add MMCIF support Simon Horman
@ 2016-08-17  7:08 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2016-08-17  7:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 09, 2016 at 02:19:02PM +0200, Simon Horman wrote:
> Hi,
> 
> this short series enables SDHI 0 and 1, and MMCIF on the r8a7794/Alt board.
> The SDHI IP blocks are exposed as SD card slots while the MMCIF block
> is wired up to on-board eMMC.
> 
> N.B.: I do not currently have physical access to an Alt board but I do
>       have remote access which I used to test these patches.
> 
> Simon Horman (2):
>   ARM: dts: alt: add SDHI0 and 1 support
>   ARM: dts: alt: add MMCIF support

I have queued these up.

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

end of thread, other threads:[~2016-08-17  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 12:19 [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and MMCIF support Simon Horman
2016-08-09 12:19 ` [PATCH 1/2] ARM: dts: alt: add SDHI0 and 1 support Simon Horman
2016-08-09 12:19 ` [PATCH 2/2] ARM: dts: alt: add MMCIF support Simon Horman
2016-08-17  7:08 ` [PATCH 0/2] ARM: dts: alt: add SDHI0 and 1, and " 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).