]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: amlogic: t7: khadas-vim4: Add power regulators
authorRonald Claveau <linux-kernel-dev@aliel.fr>
Thu, 26 Mar 2026 09:59:17 +0000 (10:59 +0100)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 2 Jun 2026 07:49:13 +0000 (09:49 +0200)
Add voltage regulator nodes describing the VIM4 power tree,
required by peripheral nodes such as the SD card controller.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-6-d3f182b48e9d@aliel.fr
[narmstrong: squashed "Remove invalid property fix" from Ronald]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts

index f4c953034be394d4e9d31ff6e20bbe38906848fc..003b3bcdaf2bcff0721c6f35834bfc322806f4ab 100644 (file)
@@ -6,6 +6,8 @@
 /dts-v1/;
 
 #include "amlogic-t7.dtsi"
+#include <dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "Khadas VIM4";
                #clock-cells = <0>;
        };
 
+       dc_in: regulator-dc-in {
+               compatible = "regulator-fixed";
+               regulator-name = "DC_IN";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
+
+       sd_3v3: regulator-sdcard-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "SD_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vddao_3v3>;
+               gpio = <&gpio GPIOD_11 GPIO_ACTIVE_LOW>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       vcc5v: regulator-vcc-5v {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC5V";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&dc_in>;
+
+               gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vcc5v0_usb: regulator-vcc-usb {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC5V0_USB";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&vcc5v>;
+
+               gpio = <&gpio GPIOY_5 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vddao_1v8: regulator-vddao-1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDAO_1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&vddao_3v3>;
+               regulator-always-on;
+       };
+
+       vddao_3v3: regulator-vddao-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDAO_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&dc_in>;
+               regulator-always-on;
+       };
+
+       vddio_1v8: regulator-vddio-1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDIO_1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&vddio_3v3>;
+               regulator-always-on;
+       };
+
+       vddio_3v3: regulator-vddio-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDIO_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vddao_3v3>;
+               regulator-always-on;
+       };
+
+       vddio_c: regulator-gpio-c {
+               compatible = "regulator-gpio";
+               regulator-name = "VDDIO_C";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vddio_3v3>;
+               gpios = <&gpio GPIOD_9 GPIO_ACTIVE_HIGH>;
+               states = <1800000 1
+                         3300000 0>;
+       };
 };
 
 &uart_a {