f08fd3d6ce0187863f6ebe52f539216957ba3976
[openwrt/staging/jow.git] / target / linux / brcm2708 / patches-4.19 / 950-0803-ARM-dts-Declare-RPi-4B-SD-card-power-regulator.patch
1 From 03bd617d5ba9124a59e86f285385b95415962af7 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 30 Jul 2019 12:37:02 +0100
4 Subject: [PATCH] ARM: dts: Declare RPi 4B SD card power regulator
5
6 Later revisions of the Raspberry Pi 4B have a separate control over the
7 SD card power. Expose that control to Linux as a fixed regulator with
8 a GPIO enable.
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
11 ---
12 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 11 +++++++++++
13 arch/arm/configs/bcm2711_defconfig | 2 +-
14 arch/arm64/configs/bcm2711_defconfig | 2 +-
15 3 files changed, 13 insertions(+), 2 deletions(-)
16
17 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
18 +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
19 @@ -122,6 +122,16 @@
20 states = <1800000 0x1
21 3300000 0x0>;
22 };
23 +
24 + sd_vcc_reg: sd_vcc_reg {
25 + compatible = "regulator-fixed";
26 + regulator-name = "vcc-sd";
27 + regulator-min-microvolt = <3300000>;
28 + regulator-max-microvolt = <3300000>;
29 + regulator-boot-on;
30 + enable-active-high;
31 + gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
32 + };
33 };
34
35 &sdhost {
36 @@ -132,6 +142,7 @@
37 status = "okay";
38 broken-cd;
39 vqmmc-supply = <&sd_io_1v8_reg>;
40 + vmmc-supply = <&sd_vcc_reg>;
41 };
42
43 &leds {