]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm64: allwinner: pine64: add MMC support
authorAndre Przywara <andre.przywara@arm.com>
Tue, 10 Jan 2017 01:22:31 +0000 (01:22 +0000)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 30 Jan 2017 10:37:38 +0000 (11:37 +0100)
All Pine64 boards connect an micro-SD card slot to the first MMC
controller.
Enable the respective DT node and specify the (always-on) regulator
and card-detect pin.
As a micro-SD slot does not feature a write-protect switch, we disable
this feature.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts

index cf9105179bcb3a28a3b4d03ab0757160b54ac056..c680ed385da3565da0291e325b5429fcb1e3eeec 100644 (file)
@@ -44,6 +44,8 @@
 
 #include "sun50i-a64.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 / {
        model = "Pine64";
        compatible = "pine64,pine64", "allwinner,sun50i-a64";
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       reg_vcc3v3: vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
 };
 
 &ehci1 {
        bias-pull-up;
 };
 
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+       disable-wp;
+       bus-width = <4>;
+       status = "okay";
+};
+
 &ohci1 {
        status = "okay";
 };