Skip to contentSkip to conversation

arm: dts: Add PMIC node for J7200

PATCH Superseded Gowtham Tammana 4 participants 12 messages Jun 23, 2021 – Jul 15, 2021 Arm (32-bit)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm: dts: Add PMIC node for J7200

The J7200 EVM has PMIC LP876441 for supporting CPU AVS. This patchset adds dt nodes, compatible string, and configs to enable the corresponding driver.

v2:
- rebased the changes are reordered patches 3/4

v1:
- https://lore.kernel.org/u-boot/[email protected]/

Gowtham Tammana (5):
power: pmic: tps65941: Add compatible for LP876441 arm/dts: k3-j7200-r5-common: Add pmic lp876441 node arm/dts: k3-j7200-r5-common: Add VTM node
arm/dts: k3-j7200-r5-common: Hook buck1_reg to vtm supply
configs: j7200_evm_r5_defconfig: Enable AVS, PMIC and dependent
configs

 .../arm/dts/k3-j7200-r5-common-proc-board.dts | 38 +++++++++++++++++++
 configs/j7200_evm_r5_defconfig                |  6 +++
 drivers/power/pmic/tps65941.c                 |  1 +
 include/power/tps65941.h                      |  1 +
 4 files changed, 46 insertions(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/5 power: pmic: tps65941: Add compatible for LP876441

TI J7200 EVM has lp876441 pmic that is similar to tps65941. Add support for same with existing driver with new compatible.

---
 drivers/power/pmic/tps65941.c | 1 +
 include/power/tps65941.h      | 1 +
 2 files changed, 2 insertions(+)
drivers/power/pmic/tps65941.c +1 -0
index 3dfc1918d5..114ef4d238 100644
@@ -72,6 +72,7 @@ static struct dm_pmic_ops tps65941_ops = {
 static const struct udevice_id tps65941_ids[] = {
 	{ .compatible = "ti,tps659411", .data = TPS659411 },
 	{ .compatible = "ti,tps659413", .data = TPS659413 },
+	{ .compatible = "ti,lp876441",  .data =  LP876441 },
 	{ }
 };
 
include/power/tps65941.h +1 -0
index 2d48b31ae3..a2bc6814ba 100644
@@ -2,6 +2,7 @@
 #define TPS659412		0x1
 #define TPS659413		0x2
 #define TPS659414		0x3
+#define  LP876441		0x4
 
 /* I2C device address for pmic tps65941 */
 #define TPS65941_I2C_ADDR	(0x12 >> 1)
Signature · 1 line
2.17.1
Acked-by on v2 1/5
#2 lore raw

Re: [PATCH v2 1/5] power: pmic: tps65941: Add compatible for LP876441

Quoted 4 lines · Gowtham Tammana

TI J7200 EVM has lp876441 pmic that is similar to tps65941. Add support for same with existing driver with new compatible.

Best Regards,
Jaehoon Chung

Quoted 30 lines
---
 drivers/power/pmic/tps65941.c | 1 +
 include/power/tps65941.h      | 1 +
 2 files changed, 2 insertions(+)
drivers/power/pmic/tps65941.c +1 -0
index 3dfc1918d5..114ef4d238 100644
@@ -72,6 +72,7 @@ static struct dm_pmic_ops tps65941_ops = {
 static const struct udevice_id tps65941_ids[] = {
 	{ .compatible = "ti,tps659411", .data = TPS659411 },
 	{ .compatible = "ti,tps659413", .data = TPS659413 },
+	{ .compatible = "ti,lp876441",  .data =  LP876441 },
 	{ }
 };
 
include/power/tps65941.h +1 -0
index 2d48b31ae3..a2bc6814ba 100644
@@ -2,6 +2,7 @@
 #define TPS659412		0x1
 #define TPS659413		0x2
 #define TPS659414		0x3
+#define  LP876441		0x4
 
 /* I2C device address for pmic tps65941 */
 #define TPS65941_I2C_ADDR	(0x12 >> 1)
#3 lore raw

PATCH v2 2/5 arm/dts: k3-j7200-r5-common: Add pmic lp876441 node

In reply to Gowtham Tammana

Add pmic lp876411 node needed for CPU AVS support.

---
 .../arm/dts/k3-j7200-r5-common-proc-board.dts | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +26 -0
index 0491432060..2ecfc89500 100644
@@ -229,6 +229,32 @@
 	ti,driver-strength-ohm = <50>;
 };
 
+&wkup_i2c0 {
+	u-boot,dm-spl;
+	lp876441: lp876441@4c {
+		compatible = "ti,lp876441";
+		reg = <0x4c>;
+		u-boot,dm-spl;
+		pinctrl-names = "default";
+		pinctrl-0 = <&wkup_i2c0_pins_default>;
+		clock-frequency = <400000>;
+
+		regulators: regulators {
+			u-boot,dm-spl;
+			buck1_reg: buck1 {
+				/*VDD_CPU_AVS_REG*/
+				regulator-name = "buck1";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <1250000>;
+				regulator-always-on;
+				regulator-boot-on;
+				u-boot,dm-spl;
+			};
+		};
+	};
+
+};
+
 &main_i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_i2c0_pins_default>;
Signature · 1 line
2.17.1
#4 lore raw

PATCH v2 3/5 arm/dts: k3-j7200-r5-common: Add VTM node

In reply to Gowtham Tammana

Add voltage and thermal management (VTM) node. The efuse values for the OPPs are stored under the VTM, and is needed for AVS class 0 support.

---
 arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +7 -0
index 2ecfc89500..23a2a5060c 100644
@@ -79,6 +79,13 @@
 		mboxes= <&mcu_secproxy 4>, <&mcu_secproxy 5>;
 		mbox-names = "tx", "rx";
 	};
+
+	wkup_vtm0: vtm@42040000 {
+		compatible = "ti,am654-vtm", "ti,j721e-avs";
+		reg = <0x0 0x42040000 0x0 0x330>;
+		power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>;
+		#thermal-sensor-cells = <1>;
+	};
 };
 
 &dmsc {
Signature · 1 line
2.17.1
#5 lore raw

PATCH v2 4/5 arm/dts: k3-j7200-r5-common: Hook buck1_reg to vtm supply

In reply to Gowtham Tammana

Hook buck1_reg to vtm avs supply.

---
 arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5 -0
index 23a2a5060c..45200b18ce 100644
@@ -262,6 +262,11 @@
 
 };
 
+&wkup_vtm0 {
+	vdd-supply-2 = <&buck1_reg>;
+	u-boot,dm-spl;
+};
+
 &main_i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_i2c0_pins_default>;
Signature · 1 line
2.17.1
#6 lore raw

PATCH v2 5/5 configs: j7200_evm_r5_defconfig: Enable AVS, PMIC and dependent configs

In reply to Gowtham Tammana

Enable AVS, PMIC and dependent configs.

---
 configs/j7200_evm_r5_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)
configs/j7200_evm_r5_defconfig +6 -0
index 08fad3e04b..7593b32dfc 100644
@@ -111,6 +111,12 @@ CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_TI_SCI_POWER_DOMAIN=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_TPS65941=y
+CONFIG_DM_REGULATOR=y
+CONFIG_SPL_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_TPS65941=y
+CONFIG_K3_AVS0=y
 CONFIG_K3_SYSTEM_CONTROLLER=y
 CONFIG_REMOTEPROC_TI_K3_ARM64=y
 CONFIG_DM_RESET=y
Signature · 1 line
2.17.1
#8 lore raw
Quoted 6 lines · Tom Rini
Quoted 4 lines · Gowtham Tammana

The J7200 EVM has PMIC LP876441 for supporting CPU AVS. This patchset adds dt nodes, compatible string, and configs to enable the corresponding driver.

Quoted 8 lines
Quoted 5 lines

v2:
- rebased the changes are reordered patches 3/4

v1:
- https://lore.kernel.org/u-boot/[email protected]/

Can you confirm there are no new dts warnings with this series? Thanks!

Yes, I dont see any new dts warnings with this series.

Thanks,
Gowtham

#9 lore raw
In reply to Gowtham Tammana
Quoted 6 lines · Gowtham Tammana

The J7200 EVM has PMIC LP876441 for supporting CPU AVS. This patchset adds dt nodes, compatible string, and configs to enable the corresponding driver.

v2:
- rebased the changes are reordered patches 3/4

There are minor conflicts with latest master. Can you rebase and repost?

Thanks and regards,
Lokesh

Quoted 18 lines

v1:
- https://lore.kernel.org/u-boot/[email protected]/

Gowtham Tammana (5):
power: pmic: tps65941: Add compatible for LP876441 arm/dts: k3-j7200-r5-common: Add pmic lp876441 node arm/dts: k3-j7200-r5-common: Add VTM node
arm/dts: k3-j7200-r5-common: Hook buck1_reg to vtm supply
configs: j7200_evm_r5_defconfig: Enable AVS, PMIC and dependent
configs

 .../arm/dts/k3-j7200-r5-common-proc-board.dts | 38 +++++++++++++++++++
 configs/j7200_evm_r5_defconfig                |  6 +++
 drivers/power/pmic/tps65941.c                 |  1 +
 include/power/tps65941.h                      |  1 +
 4 files changed, 46 insertions(+)
#10 lore raw
Quoted 13 lines

-----Original Message-----
From: Vutla, Lokesh
Sent: Tuesday, July 13, 2021 1:57 AM
To: Tammana, Gowtham <[email protected]>; Tom Rini <[email protected]>; [email protected]
Cc: Bajjuri, Praneeth <[email protected]>; [email protected]
Subject: Re: [PATCH v2 0/5] arm: dts: Add PMIC node for J7200

On 24/06/21 2:44 am, Gowtham Tammana wrote:

Quoted 8 lines
Quoted 6 lines

The J7200 EVM has PMIC LP876441 for supporting CPU AVS. This patchset adds dt nodes, compatible string, and configs to enable the corresponding driver.

v2:
- rebased the changes are reordered patches 3/4

There are minor conflicts with latest master. Can you rebase and repost?

Sure. Will rebase and post v3.

Gowtham

Quoted 23 lines

Thanks and regards,
Lokesh

Quoted 3 lines

v1:
- https://lore.kernel.org/u-boot/20200915113633.25449-1-g-

[email protected]/

Quoted 15 lines

Gowtham Tammana (5):
power: pmic: tps65941: Add compatible for LP876441 arm/dts: k3-j7200-r5-common: Add pmic lp876441 node arm/dts: k3-j7200-r5-common: Add VTM node
arm/dts: k3-j7200-r5-common: Hook buck1_reg to vtm supply
configs: j7200_evm_r5_defconfig: Enable AVS, PMIC and dependent
configs

 .../arm/dts/k3-j7200-r5-common-proc-board.dts | 38 +++++++++++++++++++
 configs/j7200_evm_r5_defconfig                |  6 +++
 drivers/power/pmic/tps65941.c                 |  1 +
 include/power/tps65941.h                      |  1 +
 4 files changed, 46 insertions(+)
#11 lore raw
In reply to Gowtham Tammana
Quoted 8 lines · Gowtham Tammana

The J7200 EVM has PMIC LP876441 for supporting CPU AVS. This patchset adds dt nodes, compatible string, and configs to enable the corresponding driver.

v2:
- rebased the changes are reordered patches 3/4

[...]

Applied to https://source.denx.de/u-boot/custodians/u-boot-ti.git for-rc, thanks! [1/5] power: pmic: tps65941: Add compatible for LP876441

      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/d4a344c393
[2/5] arm/dts: k3-j7200-r5-common: Add pmic lp876441 node
      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/cbd49ed9d6
[3/5] arm/dts: k3-j7200-r5-common: Add VTM node
      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/993fa93f2d
[4/5] arm/dts: k3-j7200-r5-common: Hook buck1_reg to vtm supply
      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/9925c76752
[5/5] configs: j7200_evm_r5_defconfig: Enable AVS, PMIC and dependent configs
      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/672758829a

--
Thanks and Regards,
Lokesh