ARM64: dts: meson-gxbb: add MMC support
authorKevin Hilman <khilman@baylibre.com>
Thu, 20 Oct 2016 11:42:54 +0000 (13:42 +0200)
committerKevin Hilman <khilman@baylibre.com>
Thu, 20 Oct 2016 17:16:39 +0000 (10:16 -0700)
Add binding and basic support for the SD/eMMC controller on Amlogic
S905/GXBB devices.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[narmstrong: added nodes for GX, enabled SDIO on P20x]
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
arch/arm64/boot/dts/amlogic/meson-gx.dtsi
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi

index a6cd953ef7e17864219ca8ed40ef3718456d81fa..fd1d0deef8896d11bc70e4faec52b748740aeef0 100644 (file)
                        #address-cells = <2>;
                        #size-cells = <2>;
                        ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>;
+
+                       sd_emmc_a: mmc@70000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x70000 0x0 0x2000>;
+                               interrupts = <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                       };
+
+                       sd_emmc_b: mmc@72000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x72000 0x0 0x2000>;
+                               interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                       };
+
+                       sd_emmc_c: mmc@74000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x74000 0x0 0x2000>;
+                               interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                       };
                };
        };
 };
index a45d1013c225bcfb5af09359f5581b4135c55995..238fbeacd330ab7a8bf7a2a6fdf7f1a6e0365499 100644 (file)
                        default-state = "off";
                };
        };
+
+       tflash_vdd: regulator-tflash_vdd {
+               /*
+                * signal name from schematics: TFLASH_VDD_EN
+                */
+               compatible = "regulator-fixed";
+
+               regulator-name = "TFLASH_VDD";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&gpio_ao GPIOAO_12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       tf_io: gpio-regulator-tf_io {
+               compatible = "regulator-gpio";
+
+               regulator-name = "TF_IO";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+
+               /*
+                * signal name from schematics: TF_3V3N_1V8_EN
+                */
+               gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+               gpios-states = <0>;
+
+               states = <3300000 0
+                         1800000 1>;
+       };
+
+       vcc1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       vcc3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       emmc_pwrseq: emmc-pwrseq {
+               compatible = "mmc-pwrseq-emmc";
+               reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
+       };
 };
 
 &uart_AO {
 &usb1 {
        status = "okay";
 };
+
+/* SD */
+&sd_emmc_b {
+       status = "okay";
+       pinctrl-0 = <&sdcard_pins>;
+       pinctrl-names = "default";
+
+       bus-width = <4>;
+       cap-sd-highspeed;
+       max-frequency = <100000000>;
+       disable-wp;
+
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+
+       vmmc-supply = <&tflash_vdd>;
+       vqmmc-supply = <&tf_io>;
+};
+
+/* eMMC */
+&sd_emmc_c {
+       status = "okay";
+       pinctrl-0 = <&emmc_pins>;
+       pinctrl-names = "default";
+
+       bus-width = <8>;
+       cap-sd-highspeed;
+       max-frequency = <200000000>;
+       non-removable;
+       disable-wp;
+       cap-mmc-highspeed;
+       mmc-ddr-1_8v;
+       mmc-hs200-1_8v;
+
+       mmc-pwrseq = <&emmc_pwrseq>;
+       vmmc-supply = <&vcc3v3>;
+       vqmmc-supply = <&vcc1v8>;
+};
index 031d69bee16acf5a79387c17a9982fe10329fe21..86e740fb5969a3e460d2ac23f4e4d4791797a05e 100644 (file)
                gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };
+
+       vddio_card: gpio-regulator {
+               compatible = "regulator-gpio";
+
+               regulator-name = "VDDIO_CARD";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+               gpios-states = <1>;
+
+               /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */
+               states = <1800000 0
+                         3300000 1>;
+       };
+
+       vddio_boot: regulator-vddio_boot {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDIO_BOOT";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       vddao_3v3: regulator-vddao_3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDAO_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       vcc_3v3: regulator-vcc_3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       emmc_pwrseq: emmc-pwrseq {
+               compatible = "mmc-pwrseq-emmc";
+               reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
+       };
 };
 
 /* This UART is brought out to the DB9 connector */
 &usb1 {
        status = "okay";
 };
+
+/* Wireless SDIO Module */
+&sd_emmc_a {
+       status = "okay";
+       pinctrl-0 = <&sdio_pins>;
+       pinctrl-names = "default";
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       bus-width = <4>;
+       cap-sd-highspeed;
+       max-frequency = <100000000>;
+
+       non-removable;
+       disable-wp;
+
+       vmmc-supply = <&vddao_3v3>;
+       vqmmc-supply = <&vddio_boot>;
+};
+
+/* SD card */
+&sd_emmc_b {
+       status = "okay";
+       pinctrl-0 = <&sdcard_pins>;
+       pinctrl-names = "default";
+
+       bus-width = <4>;
+       cap-sd-highspeed;
+       max-frequency = <100000000>;
+       disable-wp;
+
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+
+       vmmc-supply = <&vddao_3v3>;
+       vqmmc-supply = <&vddio_card>;
+};
+
+/* eMMC */
+&sd_emmc_c {
+       status = "okay";
+       pinctrl-0 = <&emmc_pins>;
+       pinctrl-names = "default";
+
+       bus-width = <8>;
+       cap-sd-highspeed;
+       cap-mmc-highspeed;
+       max-frequency = <200000000>;
+       non-removable;
+       disable-wp;
+       mmc-ddr-1_8v;
+       mmc-hs200-1_8v;
+
+       mmc-pwrseq = <&emmc_pwrseq>;
+       vmmc-supply = <&vcc_3v3>;
+       vqmmc-supply = <&vddio_boot>;
+};
index aad639ab01127af7405c142edd6b2f58f48d8234..22940bbab7ffbe7344b589089ddb34a00fe84dab 100644 (file)
                        mux {
                                groups = "emmc_nand_d07",
                                       "emmc_cmd",
-                                      "emmc_clk";
+                                      "emmc_clk",
+                                      "emmc_ds";
                                function = "emmc";
                        };
                };
                #mbox-cells = <1>;
        };
 };
+
+&sd_emmc_a {
+       clocks = <&clkc CLKID_SD_EMMC_A>,
+                <&xtal>,
+                <&clkc CLKID_FCLK_DIV2>;
+       clock-names = "core", "clkin0", "clkin1";
+};
+
+&sd_emmc_b {
+       clocks = <&clkc CLKID_SD_EMMC_B>,
+                <&xtal>,
+                <&clkc CLKID_FCLK_DIV2>;
+       clock-names = "core", "clkin0", "clkin1";
+};
+
+&sd_emmc_c {
+       clocks = <&clkc CLKID_SD_EMMC_C>,
+                <&xtal>,
+                <&clkc CLKID_FCLK_DIV2>;
+       clock-names = "core", "clkin0", "clkin1";
+};