ARM: dts: bcm2711: Add vmmc regulator in emmc2
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Fri, 6 Mar 2020 17:44:13 +0000 (18:44 +0100)
committerNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Fri, 27 Mar 2020 20:25:35 +0000 (21:25 +0100)
The SD card power can be controlled trough a pin routed into the board's
external GPIO expander. Turn that into a regulator and provide it to
emmc2.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200306174413.20634-12-nsaenzjulienne@suse.de
arch/arm/boot/dts/bcm2711-rpi-4-b.dts

index 685667de30c05714ae0dce3c367401997a7bf5ab..dd94e92aa7c4cb9024d9c7fd7ef7cff4133ffaa6 100644 (file)
                          3300000 0x0>;
                status = "okay";
        };
+
+       sd_vcc_reg: sd_vcc_reg {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-sd";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               enable-active-high;
+               gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &firmware {
 /* EMMC2 is used to drive the SD card */
 &emmc2 {
        vqmmc-supply = <&sd_io_1v8_reg>;
+       vmmc-supply = <&sd_vcc_reg>;
        broken-cd;
        status = "okay";
 };