[PATCH v2 0/5] 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/20200915113633.25449-1-g-tammana@ti.com/
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(+)

TI J7200 EVM has lp876441 pmic that is similar to tps65941. Add support for same with existing driver with new compatible.
Signed-off-by: Gowtham Tammana g-tammana@ti.com --- drivers/power/pmic/tps65941.c | 1 + include/power/tps65941.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/power/pmic/tps65941.c b/drivers/power/pmic/tps65941.c index 3dfc1918d5..114ef4d238 100644 --- a/drivers/power/pmic/tps65941.c +++ b/drivers/power/pmic/tps65941.c @@ -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 }, { } };
diff --git a/include/power/tps65941.h b/include/power/tps65941.h index 2d48b31ae3..a2bc6814ba 100644 --- a/include/power/tps65941.h +++ b/include/power/tps65941.h @@ -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)

On 6/24/21 6:14 AM, Gowtham Tammana wrote:
TI J7200 EVM has lp876441 pmic that is similar to tps65941. Add support for same with existing driver with new compatible.
Signed-off-by: Gowtham Tammana g-tammana@ti.com
Acked-by: Jaehoon Chung jh80.chung@samsung.com
Best Regards, Jaehoon Chung
drivers/power/pmic/tps65941.c | 1 + include/power/tps65941.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/power/pmic/tps65941.c b/drivers/power/pmic/tps65941.c index 3dfc1918d5..114ef4d238 100644 --- a/drivers/power/pmic/tps65941.c +++ b/drivers/power/pmic/tps65941.c @@ -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 }, { }
};
diff --git a/include/power/tps65941.h b/include/power/tps65941.h index 2d48b31ae3..a2bc6814ba 100644 --- a/include/power/tps65941.h +++ b/include/power/tps65941.h @@ -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)

Add pmic lp876411 node needed for CPU AVS support.
Signed-off-by: Gowtham Tammana g-tammana@ti.com --- .../arm/dts/k3-j7200-r5-common-proc-board.dts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts index 0491432060..2ecfc89500 100644 --- a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts +++ b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts @@ -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>;

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.
Signed-off-by: Gowtham Tammana g-tammana@ti.com --- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts index 2ecfc89500..23a2a5060c 100644 --- a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts +++ b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts @@ -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 {

Hook buck1_reg to vtm avs supply.
Signed-off-by: Gowtham Tammana g-tammana@ti.com --- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts index 23a2a5060c..45200b18ce 100644 --- a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts +++ b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts @@ -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>;

Enable AVS, PMIC and dependent configs.
Signed-off-by: Gowtham Tammana g-tammana@ti.com --- configs/j7200_evm_r5_defconfig | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig index 08fad3e04b..7593b32dfc 100644 --- a/configs/j7200_evm_r5_defconfig +++ b/configs/j7200_evm_r5_defconfig @@ -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

On Wed, Jun 23, 2021 at 04:14:49PM -0500, Gowtham Tammana wrote:
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:
Can you confirm there are no new dts warnings with this series? Thanks!

On 6/24/21 8:16 AM, Tom Rini wrote:
On Wed, Jun 23, 2021 at 04:14:49PM -0500, Gowtham Tammana wrote:
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:
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

On 24/06/21 2:44 am, Gowtham Tammana wrote:
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
v1:
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(+)

-----Original Message----- From: Vutla, Lokesh Sent: Tuesday, July 13, 2021 1:57 AM To: Tammana, Gowtham g-tammana@ti.com; Tom Rini trini@konsulko.com; jh80.chung@samsung.com Cc: Bajjuri, Praneeth praneeth@ti.com; u-boot@lists.denx.de Subject: Re: [PATCH v2 0/5] arm: dts: Add PMIC node for J7200
On 24/06/21 2:44 am, Gowtham Tammana wrote:
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
Thanks and regards, Lokesh
v1:
tammana@ti.com/
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(+)

On Wed, 23 Jun 2021 16:14:49 -0500, Gowtham Tammana wrote:
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
participants (5)
-
Gowtham Tammana
-
Jaehoon Chung
-
Lokesh Vutla
-
Tammana, Gowtham
-
Tom Rini