From afc874c990aff16d277c2a534b7b6a5b2fa74bec Mon Sep 17 00:00:00 2001
From: Zijian.He <Zijian.He@desaysv.com>
Date: Tue, 11 Mar 2025 14:34:21 +0800
Subject: [PATCH] [PMIC][Feature][PMIC & sd卡供电配置][TASK20250228_33247][Testable]

[root_cause]:PMIC changed
[solution]:PMIC & sd卡供电配置
[affected_area]:PMIC&sd卡供电
[self_test_result]:Pass
[test_suggestion]:NA
[others]:NA

Change-Id: Ia99ada3b5947b7ad22f13291056ea582e024f136
---

diff --git a/board-support/ti-u-boot/arch/arm/dts/k3-am625-sk.dts b/board-support/ti-u-boot/arch/arm/dts/k3-am625-sk.dts
index ad567a0..02be3d0 100644
--- a/board-support/ti-u-boot/arch/arm/dts/k3-am625-sk.dts
+++ b/board-support/ti-u-boot/arch/arm/dts/k3-am625-sk.dts
@@ -72,18 +72,19 @@
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 		regulator-boot-on;
-		enable-active-high;
+		regulator-always-on;
 		vin-supply = <&vcc_3v3_sys>;
-		gpio = <&exp1 3 GPIO_ACTIVE_HIGH>;
+		/* TODO pin L25 */
+		/* gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; */
 	};
 
-	vdd_sd_dv: regulator-4 {
+	vddshv_sdio: regulator-4 {
 		/* Output of TLV71033 */
 		bootph-all;
 		compatible = "regulator-gpio";
-		regulator-name = "tlv71033";
+		regulator-name = "vddshv_sdio";
 		pinctrl-names = "default";
-		pinctrl-0 = <&vdd_sd_dv_pins_default>;
+		pinctrl-0 = <&vddshv_sdio_pins_default>;
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <3300000>;
 		regulator-boot-on;
@@ -141,7 +142,7 @@
 		>;
 	};
 
-	vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
+	vddshv_sdio_pins_default: vddshv_sdio-default-pins {
 		bootph-all;
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x07c, PIN_OUTPUT, 7) /* (P25) GPMC0_CLK.GPIO0_31 */
@@ -197,7 +198,7 @@
 
 &sdhci1 {
 	vmmc-supply = <&vdd_mmc1>;
-	vqmmc-supply = <&vdd_sd_dv>;
+	vqmmc-supply = <&vddshv_sdio>;
 };
 
 &cpsw3g {
diff --git a/board-support/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi b/board-support/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi
index 59ee496..4c6df0b 100644
--- a/board-support/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi
+++ b/board-support/ti-u-boot/arch/arm/dts/k3-am62x-sk-common.dtsi
@@ -320,6 +320,13 @@
 			AM62X_IOPAD(0x078, PIN_OUTPUT, 1) /* (U24) GPMC0_AD15.VOUT0_DATA23 */
 		>;
 	};
+
+	pmic_irq_pins_default: pmic-irq-default-pins {
+		bootph-all;
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x01f4, PIN_INPUT, 0) /* (B16) EXTINTn */
+		>;
+	};
 };
 
 &mcu_pmx0 {
@@ -395,6 +402,82 @@
 			};
 		};
 	};
+
+	tps65219: pmic@30 {
+		bootph-all;
+		compatible = "ti,tps65219";
+		reg = <0x30>;
+		buck1-supply = <&vcc_3v3_sys>;
+		buck2-supply = <&vcc_3v3_sys>;
+		buck3-supply = <&vcc_3v3_sys>;
+		ldo1-supply = <&vcc_3v3_sys>;
+		ldo2-supply = <&buck2_reg>;
+		ldo3-supply = <&vcc_3v3_sys>;
+		ldo4-supply = <&vcc_3v3_sys>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pmic_irq_pins_default>;
+
+		interrupt-parent = <&gic500>;
+		interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
+		ti,power-button;
+
+		regulators {
+			buck1_reg: buck1 {
+				regulator-name = "VDD_CORE";
+				regulator-min-microvolt = <750000>;
+				regulator-max-microvolt = <750000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			buck2_reg: buck2 {
+				regulator-name = "VCC1V8_SYS";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			buck3_reg: buck3 {
+				regulator-name = "VDD_LPDDR4";
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1100000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo1_reg: ldo1 {
+				regulator-name = "VDDSHV_SDIO";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+			};
+
+			ldo2_reg: ldo2 {
+				regulator-name = "VDDAR_CORE";
+				regulator-min-microvolt = <850000>;
+				regulator-max-microvolt = <850000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo3_reg: ldo3 {
+				regulator-name = "VDDA_1V8";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo4_reg: ldo4 {
+				regulator-name = "VDD_1V2";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+		};
+	};
 };
 
 &main_i2c1 {
