Re: [PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support

2018-10-15 Thread Simon Horman
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 
> Reviewed-by: Biju Das 

Thanks, applied for v4.21.


[PATCH v3 6/6] ARM: dts: iwg23s-sbc: Add uSD and eMMC support

2018-10-08 Thread Fabrizio Castro
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 
Reviewed-by: Biju Das 

---
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 
 #include "r8a77470.dtsi"
 / {
model = "iWave iW-RainboW-G23S single board computer based on RZ/G1C";
@@ -25,6 +26,37 @@
device_type = "memory";
reg = <0 0x4000 0 0x2000>;
};
+
+   reg_1p8v: reg-1p8v {
+   compatible = "regulator-fixed";
+   regulator-name = "fixed-1.8V";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   reg_3p3v: reg-3p3v {
+   compatible = "regulator-fixed";
+   regulator-name = "fixed-3.3V";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   vccq_sdhi2: regulator-vccq-sdhi2 {
+   compatible = "regulator-gpio";
+
+   regulator-name = "SDHI2 VccQ";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+
+   gpios = < 24 GPIO_ACTIVE_LOW>;
+   gpios-states = <1>;
+   states = <330 1
+ 180 0>;
+   };
 };
 
  {
@@ -46,10 +78,28 @@
 };
 
  {
+   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>;
+   };
 };
 
  {
@@ -58,3 +108,29 @@
 
status = "okay";
 };
+
+ {
+   pinctrl-0 = <_pins_uhs>;
+   pinctrl-names = "state_uhs";
+
+   vmmc-supply = <_3p3v>;
+   vqmmc-supply = <_1p8v>;
+   bus-width = <8>;
+   mmc-hs200-1_8v;
+   non-removable;
+   fixed-emmc-driver-type = <1>;
+   status = "okay";
+};
+
+ {
+   pinctrl-0 = <_pins>;
+   pinctrl-1 = <_pins_uhs>;
+   pinctrl-names = "default", "state_uhs";
+
+   vmmc-supply = <_3p3v>;
+   vqmmc-supply = <_sdhi2>;
+   bus-width = <4>;
+   cd-gpios = < 20 GPIO_ACTIVE_LOW>;
+   sd-uhs-sdr50;
+   status = "okay";
+};
-- 
2.7.4