OSDN Git Service

arm64: dts: ti: k3-j721e-common-proc-board: Add support for SD card UHS modes
authorFaiz Abbas <faiz_abbas@ti.com>
Sun, 29 Nov 2020 17:52:23 +0000 (23:22 +0530)
committerNishanth Menon <nm@ti.com>
Mon, 30 Nov 2020 13:12:54 +0000 (07:12 -0600)
Add support for UHS modes for the SD card connected at sdhci1. This
involves adding regulators for voltage switching and power cycling the
SD card and removing the no-1-8-v property.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20201129175223.21751-3-nsekhar@ti.com
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi

index 5754892..6076436 100644 (file)
                regulator-boot-on;
        };
 
+       vdd_mmc1: fixedregulator-sd {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_mmc1";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               enable-active-high;
+               vin-supply = <&vsys_3v3>;
+               gpio = <&exp2 2 GPIO_ACTIVE_HIGH>;
+       };
+
+       vdd_sd_dv_alt: gpio-regulator-TLV71033 {
+               compatible = "regulator-gpio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&vdd_sd_dv_alt_pins_default>;
+               regulator-name = "tlv71033";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               vin-supply = <&vsys_5v0>;
+               gpios = <&main_gpio0 117 GPIO_ACTIVE_HIGH>;
+               states = <1800000 0x0>,
+                        <3300000 0x1>;
+       };
+
        sound0: sound@0 {
                compatible = "ti,j721e-cpb-audio";
                model = "j721e-cpb";
                >;
        };
 
+       vdd_sd_dv_alt_pins_default: vdd-sd-dv-alt-pins-default {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0x1d8, PIN_INPUT, 7) /* (W4) SPI1_CS1.GPIO0_117 */
+               >;
+       };
+
        main_usbss0_pins_default: main-usbss0-pins-default {
                pinctrl-single,pins = <
                        J721E_IOPAD(0x290, PIN_OUTPUT, 0) /* (U6) USB0_DRVVBUS */
 
 &main_sdhci1 {
        /* SD/MMC */
+       vmmc-supply = <&vdd_mmc1>;
+       vqmmc-supply = <&vdd_sd_dv_alt>;
        pinctrl-names = "default";
        pinctrl-0 = <&main_mmc1_pins_default>;
        ti,driver-strength-ohm = <50>;
index 556bc31..b32df59 100644 (file)
                ti,trm-icp = <0x8>;
                ti,clkbuf-sel = <0x7>;
                dma-coherent;
-               no-1-8-v;
        };
 
        main_sdhci2: sdhci@4f98000 {
                ti,trm-icp = <0x8>;
                ti,clkbuf-sel = <0x7>;
                dma-coherent;
-               no-1-8-v;
        };
 
        usbss0: cdns-usb@4104000 {