ARM64: dts: marvell: armada-37xx: Enable uSD on ESPRESSObin
authorMarcin Wojtas <mw@semihalf.com>
Thu, 20 Jul 2017 23:50:36 +0000 (01:50 +0200)
committerGregory CLEMENT <gregory.clement@free-electrons.com>
Thu, 3 Aug 2017 12:16:14 +0000 (14:16 +0200)
The ESPRESSObin board exposes one of the SDHCI interfaces
via J1 uSD slot. This patch enables it.

Tested-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Zbigniew Bodek <zbodek@gmail.com>
[gregory.clement@free-electrons.com:  removed "no-1-8-v"]
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts

index b1af3f988b296e3dc0c60c36eb18e0904c719bd2..2ce52ba74f73bac47244aaa5896f29ed4b56596a 100644 (file)
@@ -45,6 +45,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include "armada-372x.dtsi"
 
 / {
                device_type = "memory";
                reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
        };
+
+       vcc_sd_reg1: regulator {
+               compatible = "regulator-gpio";
+               regulator-name = "vcc_sd1";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+
+               gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
+               gpios-states = <0>;
+               states = <1800000 0x1
+                         3300000 0x0>;
+               enable-active-high;
+       };
 };
 
 /* J9 */
        status = "okay";
 };
 
+/* J1 */
+&sdhci1 {
+       wp-inverted;
+       bus-width = <4>;
+       cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
+       marvell,pad-type = "sd";
+       vqmmc-supply = <&vcc_sd_reg1>;
+       status = "okay";
+};
+
 /* Exported on the micro USB connector J5 through an FTDI */
 &uart0 {
        status = "okay";