]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: dts: k3-j7200-common-proc-board: Enable support for UHS modes
authorFaiz Abbas <faiz_abbas@ti.com>
Thu, 4 Feb 2021 09:41:00 +0000 (15:11 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Thu, 4 Feb 2021 15:07:57 +0000 (20:37 +0530)
Add support for UHS modes by adding the regulators to power cycle
and voltage switch the card. Also add pinmuxes required for each
node

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
arch/arm/dts/k3-j7200-common-proc-board.dts
arch/arm/dts/k3-j7200-main.dtsi
arch/arm/dts/k3-j7200-r5-common-proc-board.dts

index cc3d933cbb51b2368990b9037935a2b85d03e074..85cb159838e3a241dba24f7e3a17dc5a2c43f230 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <dt-bindings/net/ti-dp83867.h>
 #include "k3-j7200-som-p0.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        chosen {
                remoteproc2 = &main_r5fss0_core0;
                remoteproc3 = &main_r5fss0_core1;
        };
+
+       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;
+               gpio = <&exp2 2 GPIO_ACTIVE_HIGH>;
+       };
+
+       vdd_sd_dv: gpio-regulator-vdd-sd-dv {
+               compatible = "regulator-gpio";
+               regulator-name = "vdd_sd_dv";
+               pinctrl-names = "default";
+               pinctrl-0 = <&vdd_sd_dv_pins_default>;
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               gpios = <&main_gpio0 55 GPIO_ACTIVE_HIGH>;
+               states = <1800000 0x0
+                         3300000 0x1>;
+       };
 };
 
 &wkup_pmx0 {
                >;
        };
 
+       main_mmc1_pins_default: main_mmc1_pins_default {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0x104, PIN_INPUT, 0) /* (M20) MMC1_CMD */
+                       J721E_IOPAD(0x100, PIN_INPUT, 0) /* (P21) MMC1_CLK */
+                       J721E_IOPAD(0xfc, PIN_INPUT, 0) /* (P25) MMC1_CLKLB */
+                       J721E_IOPAD(0xf8, PIN_INPUT, 0) /* (M19) MMC1_DAT0 */
+                       J721E_IOPAD(0xf4, PIN_INPUT, 0) /* (N21) MMC1_DAT1 */
+                       J721E_IOPAD(0xf0, PIN_INPUT, 0) /* (N20) MMC1_DAT2 */
+                       J721E_IOPAD(0xec, PIN_INPUT, 0) /* (N19) MMC1_DAT3 */
+                       J721E_IOPAD(0xe4, PIN_INPUT, 8) /* (V1) TIMER_IO0.MMC1_SDCD */
+               >;
+       };
+
+       vdd_sd_dv_pins_default: vdd_sd_dv_pins_default {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0xd0, PIN_OUTPUT, 7) /* (T5) SPI0_D1.GPIO0_55 */
+               >;
+       };
+
        main_usbss0_pins_default: main_usbss0_pins_default {
                pinctrl-single,pins = <
                        J721E_IOPAD(0x120, PIN_OUTPUT, 0) /* (T4) USB0_DRVVBUS */
 
 &main_sdhci1 {
        /* SD card */
+       pinctrl-0 = <&main_mmc1_pins_default>;
+       pinctrl-names = "default";
+       vmmc-supply = <&vdd_mmc1>;
+       vqmmc-supply = <&vdd_sd_dv>;
        ti,driver-strength-ohm = <50>;
        disable-wp;
-       no-1-8-v;
-       sdhci-caps-mask = <0x8000000F 0x0>;
 };
 
 &main_i2c0 {
index ba9fcc0e51c162a283b98ddd178753810530eb0b..9e6f738c644ea3c506db476000339a6515759b06 100644 (file)
                ti,otap-del-sel-sdr50 = <0xc>;
                ti,otap-del-sel-sdr104 = <0x5>;
                ti,otap-del-sel-ddr50 = <0xc>;
+               ti,clkbuf-sel = <0x7>;
                dma-coherent;
        };
 
index 2ac887b180c9b389055a304deee52a1c9122546e..04914320609c4ad141e1367c0707a495610bac2a 100644 (file)
                >;
        };
 
+       main_mmc1_pins_default: main_mmc1_pins_default {
+               pinctrl-single,pins = <
+                       J721E_IOPAD(0x104, PIN_INPUT, 0) /* (M20) MMC1_CMD */
+                       J721E_IOPAD(0x100, PIN_INPUT, 0) /* (P21) MMC1_CLK */
+                       J721E_IOPAD(0xfc, PIN_INPUT, 0) /* (P25) MMC1_CLKLB */
+                       J721E_IOPAD(0xf8, PIN_INPUT, 0) /* (M19) MMC1_DAT0 */
+                       J721E_IOPAD(0xf4, PIN_INPUT, 0) /* (N21) MMC1_DAT1 */
+                       J721E_IOPAD(0xf0, PIN_INPUT, 0) /* (N20) MMC1_DAT2 */
+                       J721E_IOPAD(0xec, PIN_INPUT, 0) /* (N19) MMC1_DAT3 */
+                       J721E_IOPAD(0xe4, PIN_INPUT, 8) /* (V1) TIMER_IO0.MMC1_SDCD */
+               >;
+       };
+
        main_usbss0_pins_default: main_usbss0_pins_default {
                pinctrl-single,pins = <
                        J721E_IOPAD(0x120, PIN_OUTPUT, 0) /* (T4) USB0_DRVVBUS */
        /delete-property/ power-domains;
        /delete-property/ assigned-clocks;
        /delete-property/ assigned-clock-parents;
+       pinctrl-0 = <&main_mmc1_pins_default>;
+       pinctrl-names = "default";
        clock-names = "clk_xin";
        clocks = <&clk_200mhz>;
        ti,driver-strength-ohm = <50>;