diff mbox series

[5/6] arm64: dts: meson-sm1-odroid-hc4: add regulators controlled by GPIOH_8

Message ID 20210601090140.261768-6-narmstrong@baylibre.com (mailing list archive)
State Superseded
Headers show
Series arm64: dts: meson-sm1-odroid: various fixes for C4/HC4 | expand

Commit Message

Neil Armstrong June 1, 2021, 9:01 a.m. UTC
As described in the HC4 schematics, GPIOH_8 controls the USB 5V and 12V
regulators used to power the SATA drives.

And is set as Open Drain since this GPIO doesn't support Push-Pull.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Martin Blumenstingl June 3, 2021, 6:08 p.m. UTC | #1
On Tue, Jun 1, 2021 at 11:01 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> As described in the HC4 schematics, GPIOH_8 controls the USB 5V and 12V
> regulators used to power the SATA drives.
>
> And is set as Open Drain since this GPIO doesn't support Push-Pull.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
index 0a34b658f994..d36c25b5b690 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
@@ -44,6 +44,32 @@  led-red {
 		};
 	};
 
+	/* Powers the SATA Disk 0 regulator, which is enabled when a disk load is detected */
+	p12v_0: regulator-p12v_0 {
+		compatible = "regulator-fixed";
+		regulator-name = "P12V_0";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		vin-supply = <&main_12v>;
+
+		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
+	/* Powers the SATA Disk 1 regulator, which is enabled when a disk load is detected */
+	p12v_1: regulator-p12v_1 {
+		compatible = "regulator-fixed";
+		regulator-name = "P12V_1";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		vin-supply = <&main_12v>;
+
+		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
+		enable-active-high;
+		regulator-always-on;
+	};
+
 	sound {
 		model = "ODROID-HC4";
 	};
@@ -98,3 +124,8 @@  &usb {
 &usb2_phy0 {
 	status = "disabled";
 };
+
+&vcc_5v {
+	gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
+	enable-active-high;
+};