ARM: dts: Declare RPi 4B SD card power regulator
authorPhil Elwell <phil@raspberrypi.org>
Tue, 30 Jul 2019 11:37:02 +0000 (12:37 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:18 +0000 (16:33 +0100)
Later revisions of the Raspberry Pi 4B have a separate control over the
SD card power. Expose that control to Linux as a fixed regulator with
a GPIO enable.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
arch/arm/boot/dts/bcm2711-rpi-4-b.dts
arch/arm/configs/bcm2711_defconfig
arch/arm64/configs/bcm2711_defconfig

index 78273ec..84915c8 100644 (file)
                states = <1800000 0x1
                          3300000 0x0>;
        };
+
+       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>;
+       };
 };
 
 &sdhost {
        status = "okay";
        broken-cd;
        vqmmc-supply = <&sd_io_1v8_reg>;
+       vmmc-supply = <&sd_vcc_reg>;
 };
 
 &genet {
index 6cb1124..32d3f64 100644 (file)
@@ -696,7 +696,7 @@ CONFIG_MFD_ARIZONA_I2C=m
 CONFIG_MFD_ARIZONA_SPI=m
 CONFIG_MFD_WM5102=y
 CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=m
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_REGULATOR_ARIZONA_LDO1=m
 CONFIG_REGULATOR_ARIZONA_MICSUPP=m
 CONFIG_REGULATOR_GPIO=y
index a0605e2..315576a 100644 (file)
@@ -723,7 +723,7 @@ CONFIG_MFD_ARIZONA_I2C=m
 CONFIG_MFD_ARIZONA_SPI=m
 CONFIG_MFD_WM5102=y
 CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=m
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_REGULATOR_ARIZONA_LDO1=m
 CONFIG_REGULATOR_ARIZONA_MICSUPP=m
 CONFIG_REGULATOR_GPIO=y