Skip to contentSkip to conversation

Add ESM Support for J7200

PATCH In review Aniket Limaye 4 participants 15 messages May 31, 2024 – Aug 29, 2024 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

cover Add ESM Support for J7200

This series adds the required nodes in the devicetree, and enables the configs for the ESM and PMIC.

Test Logs AVS and ESM:
https://gist.github.com/aniket-l/96b85a25733095b4fd87f48f730518bf

---
Aniket Limaye (2):
arm: dts: k3-j7200-r5: Add the pmic node in R5 dt
arm: dts: k3-j7200-r5: Fix indentation to use tabs

Gowtham Tammana (2):
arm: dts: k3-j7200-r5-common: Hook buckb1 to vtm supply
arm: dts: k3-j7200: Add ESM PMIC support for tps659413

Neha Malcom Francis (2):
configs: j7200_evm_r5: Add ESM config for J7200
configs: j7200_evm_r5: Add ESM config for J7200

 .../arm/dts/k3-j7200-r5-common-proc-board.dts | 23 +++++++++++++++----
 configs/j7200_evm_r5_defconfig                |  2 ++
 2 files changed, 21 insertions(+), 4 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/6 arm: dts: k3-j7200-r5: Add the pmic node in R5 dt

Add bootph-pre-ram property to the buck node in the pmic needed for ESM error event handling.

---
 arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +9 -0
index fb7e2e50239..78d07ff4e70 100644
@@ -96,3 +96,12 @@
 &mcu_udmap {
     ti,sci = <&dm_tifs>;
 };
+
+&tps659414 {
+	regulators {
+		bucka1: buck1 {
+			bootph-pre-ram;
+		};
+	};
+};
+
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 1/6] arm: dts: k3-j7200-r5: Add the pmic node in R5 dt

Quoted 13 lines · Aniket Limaye

Add bootph-pre-ram property to the buck node in the pmic needed for ESM error event handling.

---
  arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 9 +++++++++
  1 file changed, 9 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0 -0
index fb7e2e50239..78d07ff4e70 100644

arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 104

Quoted 9 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +6 -0
@@ -96,3 +96,12 @@
  &mcu_udmap {
      ti,sci = <&dm_tifs>;
  };
+
+&tps659414 {
+	regulators {
+		bucka1: buck1 {
+			bootph-pre-ram;
+		};

why not to add this in kernel DT

Quoted 3 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +3 -0
+	};
+};
+
#3 lore raw

Re: [PATCH 1/6] arm: dts: k3-j7200-r5: Add the pmic node in R5 dt

Quoted 19 lines · Udit
Quoted 17 lines · Aniket Limaye

Add bootph-pre-ram property to the buck node in the pmic needed for ESM error event handling.

---
  arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 9 +++++++++

  1 file changed, 9 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1 -0
index fb7e2e50239..78d07ff4e70 100644
@@ -96,3 +96,12 @@
   &mcu_udmap {
       ti,sci = <&dm_tifs>;
   };
+
Quoted 8 lines

arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 104

Quoted 5 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5 -0
+&tps659414 {
+    regulators {
+        bucka1: buck1 {
+            bootph-pre-ram;
+        };

why not to add this in kernel DT

Manorit has already posted a series to kernel to add bootph- properties across platforms... Specifically the patch here [0] addresses this.

Once that is merged, and goes through the rebasing tree in u-boot we will need to send patches to remove the bootph properties from the -u-boot and -r5 files. Until then we need this patch for the ESM to work. Else we can wait till the kernel dt patches make it through to u-boot for me to roll out a v2.

[0]: https://lore.kernel.org/all/[email protected]/

Quoted 5 lines
Quoted 5 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +3 -0
+    };
+};
+
#4 lore raw

Re: [PATCH 1/6] arm: dts: k3-j7200-r5: Add the pmic node in R5 dt

Quoted 32 lines · Aniket
Quoted 20 lines · Udit
Quoted 18 lines · Aniket Limaye

Add bootph-pre-ram property to the buck node in the pmic needed for ESM error event handling.

---
  arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 9 +++++++++

  1 file changed, 9 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1 -0
index fb7e2e50239..78d07ff4e70 100644
@@ -96,3 +96,12 @@
   &mcu_udmap {
       ti,sci = <&dm_tifs>;
   };
+
Quoted 8 lines

arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 104

Quoted 5 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5 -0
+&tps659414 {
+    regulators {
+        bucka1: buck1 {
+            bootph-pre-ram;
+        };

why not to add this in kernel DT

Quoted 8 lines

Manorit has already posted a series to kernel to add bootph- properties across platforms... Specifically the patch here [0] addresses this.

Once that is merged, and goes through the rebasing tree in u-boot we will need to send patches to remove the bootph properties from the -u-boot and -r5 files. Until then we need this patch for the ESM to work. Else we can wait till the kernel dt patches make it through to u-boot for me to roll out a v2.

Yes, we'll wait until we can get this all in via OF_UPSTREAM.

Signature · 1 line
Tom
#5 lore raw

Re: [EXTERNAL] Re: [PATCH 1/6] arm: dts: k3-j7200-r5: Add the pmic node in R5 dt

Quoted 36 lines · Tom Rini
Quoted 35 lines · Aniket
Quoted 20 lines · Udit
Quoted 18 lines · Aniket Limaye

Add bootph-pre-ram property to the buck node in the pmic needed for ESM error event handling.

---
   arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 9 +++++++++
   1 file changed, 9 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1 -0
index fb7e2e50239..78d07ff4e70 100644
@@ -96,3 +96,12 @@
   &mcu_udmap {
       ti,sci = <&dm_tifs>;
   };
+
Quoted 8 lines

arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 104

Quoted 5 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5 -0
+&tps659414 {
+    regulators {
+        bucka1: buck1 {
+            bootph-pre-ram;
+        };

why not to add this in kernel DT

Manorit has already posted a series to kernel to add bootph- properties across platforms... Specifically the patch here [0] addresses this.

Quoted 8 lines
Quoted 5 lines

Once that is merged, and goes through the rebasing tree in u-boot we will need to send patches to remove the bootph properties from the -u-boot and -r5 files. Until then we need this patch for the ESM to work. Else we can wait till the kernel dt patches make it through to u-boot for me to roll out a v2.

Yes, we'll wait until we can get this all in via OF_UPSTREAM.

Tom, Udit,

The patch in Kernel DT here [0] seems to be taking longer to go through.
In the meantime, does it make sense for me to send this current series in u-boot with the bootph patch above, to unblock ESM support for j7200-evm?

When the Kernel DT patch is merged and taken through OF_UPSTREAM, I will anyway send a patch to remove all of the bootph from the u-boot DT files. With that, I can take care of removing the above bootph property too.

Let me know what you think, and I'll rebase this series and resend it then.

[0]: https://lore.kernel.org/all/[email protected]/

Thanks,
Aniket

#6 lore raw

Re: [EXTERNAL] Re: [PATCH 1/6] arm: dts: k3-j7200-r5: Add the pmic node in R5 dt

Quoted 45 lines · Aniket
Quoted 42 lines · Tom Rini
Quoted 40 lines · Aniket
Quoted 20 lines · Udit
Quoted 18 lines · Aniket Limaye

Add bootph-pre-ram property to the buck node in the pmic needed for ESM error event handling.

---
   arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 9 +++++++++
   1 file changed, 9 insertions(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1 -0
index fb7e2e50239..78d07ff4e70 100644
@@ -96,3 +96,12 @@
   &mcu_udmap {
       ti,sci = <&dm_tifs>;
   };
+
Quoted 8 lines

arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 104

Quoted 5 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +5 -0
+&tps659414 {
+    regulators {
+        bucka1: buck1 {
+            bootph-pre-ram;
+        };

why not to add this in kernel DT

Manorit has already posted a series to kernel to add bootph- properties across platforms... Specifically the patch here [0] addresses this.

Once that is merged, and goes through the rebasing tree in u-boot we will need to send patches to remove the bootph properties from the -u-boot and -r5 files. Until then we need this patch for the ESM to work. Else we can wait till the kernel dt patches make it through to u-boot for me to roll out a v2.

Quoted 8 lines
Quoted 2 lines

Yes, we'll wait until we can get this all in via OF_UPSTREAM.

Tom, Udit,

The patch in Kernel DT here [0] seems to be taking longer to go through. In the meantime, does it make sense for me to send this current series in u-boot with the bootph patch above, to unblock ESM support for j7200-evm?

NAK! This is why there is a review process in upstream. Lack of ESM survived in j7200 for years now - there is no urgency to carry that stuff and then have someone to start tracking and cleaning up behind. Please DO NOT. The only exception we have permitted now is for you to add patches in dts/ which *have* been upstreamed and accepted by maintainers but it is a couple of months away for OF_UPSTREAM to sync (aka for the next rebase, those changes will be dropped).

This policy has been asserted over and over again on these platforms. Please focus instead on helping getting kernel changes upstream by helping support engineers in that effort.

Quoted 11 lines

When the Kernel DT patch is merged and taken through OF_UPSTREAM, I will anyway send a patch to remove all of the bootph from the u-boot DT files. With that, I can take care of removing the above bootph property too.

Let me know what you think, and I'll rebase this series and resend it then.

[0]: https://lore.kernel.org/all/[email protected]/

Thanks,
Aniket

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#7 lore raw

PATCH 2/6 arm: dts: k3-j7200-r5: Fix indentation to use tabs

In reply to Aniket Limaye

To avoid whitespace diff, use tabs throughout the file for indent

---
 arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +4 -4
index 78d07ff4e70..c7086791ef8 100644
@@ -85,16 +85,16 @@
 };
 
 &ospi0 {
-    reg = <0x0 0x47040000 0x0 0x100>,
-          <0x0 0x50000000 0x0 0x8000000>;
+	reg = <0x0 0x47040000 0x0 0x100>,
+		  <0x0 0x50000000 0x0 0x8000000>;
 };
 
 &mcu_ringacc {
-    ti,sci = <&dm_tifs>;
+	ti,sci = <&dm_tifs>;
 };
 
 &mcu_udmap {
-    ti,sci = <&dm_tifs>;
+	ti,sci = <&dm_tifs>;
 };
 
 &tps659414 {
Signature · 1 line
2.34.1
#8 lore raw

Re: [PATCH 2/6] arm: dts: k3-j7200-r5: Fix indentation to use tabs

Quoted 20 lines · Aniket Limaye

To avoid whitespace diff, use tabs throughout the file for indent

---
  arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +2 -2
index 78d07ff4e70..c7086791ef8 100644
@@ -85,16 +85,16 @@
  };
 
  &ospi0 {
-    reg = <0x0 0x47040000 0x0 0x100>,
-          <0x0 0x50000000 0x0 0x8000000>;
+	reg = <0x0 0x47040000 0x0 0x100>,
+		  <0x0 0x50000000 0x0 0x8000000>;
  };

arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 98

Quoted 10 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +2 -2
 
  &mcu_ringacc {
-    ti,sci = <&dm_tifs>;
+	ti,sci = <&dm_tifs>;
  };
 
  &mcu_udmap {
-    ti,sci = <&dm_tifs>;
+	ti,sci = <&dm_tifs>;
  };

I think this is unrelated to this series ,

my suggestion will be post these changes in different patch

Quoted 2 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0 -0
  &tps659414 {
#9 lore raw

PATCH 3/6 arm: dts: k3-j7200-r5-common: Hook buckb1 to vtm supply

In reply to Aniket Limaye

From: Gowtham Tammana <[email protected]>

Hook buckb1 to vtm avs supply.

---
 arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1 -0
index c7086791ef8..176cc0a0fbb 100644
@@ -81,6 +81,7 @@
 };
 
 &wkup_vtm0 {
+	vdd-supply-2 = <&buckb1>;
 	bootph-pre-ram;
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v1 3/6
#10 lore raw

Re: [PATCH 3/6] arm: dts: k3-j7200-r5-common: Hook buckb1 to vtm supply

Quoted 15 lines · Aniket Limaye

From: Gowtham Tammana <[email protected]>

Hook buckb1 to vtm avs supply.

---
  arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 1 +
  1 file changed, 1 insertion(+)
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0 -0
index c7086791ef8..176cc0a0fbb 100644

arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 84

Quoted 4 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1 -0
@@ -81,6 +81,7 @@
  };
 
  &wkup_vtm0 {
+	vdd-supply-2 = <&buckb1>;
Quoted 3 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +0 -0
  	bootph-pre-ram;
  };
 
#11 lore raw

PATCH 4/6 configs: j7200_evm_r5: Add ESM config for J7200

In reply to Aniket Limaye

From: Neha Malcom Francis <[email protected]>

Add CONFIG_ESM_K3 to enable ESM initialization in J7200.

---
 configs/j7200_evm_r5_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/j7200_evm_r5_defconfig +1 -0
index e023af24674..c9f586a1695 100644
@@ -101,6 +101,7 @@ CONFIG_DM_MAILBOX=y
 CONFIG_K3_SEC_PROXY=y
 CONFIG_FS_LOADER=y
 CONFIG_SPL_FS_LOADER=y
+CONFIG_ESM_K3=y
 CONFIG_K3_AVS0=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_SPL_MMC_HS400_SUPPORT=y
Signature · 1 line
2.34.1
#12 lore raw

PATCH 5/6 arm: dts: k3-j7200: Add ESM PMIC support for tps659413

In reply to Aniket Limaye

From: Gowtham Tammana <[email protected]>

On J7200 processor board MCU_SAFETY_ERROR signal is routed to PMIC for ESM error handling. The PMIC resets the board on receipt of the signal. Enable the support for the board by adding ESM PMIC node.

---
 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 176cc0a0fbb..9c83a629504 100644
@@ -99,6 +99,11 @@
 };
 
 &tps659414 {
+	esm: esm {
+		compatible = "ti,tps659413-esm";
+		bootph-pre-ram;
+	};
+
 	regulators {
 		bucka1: buck1 {
 			bootph-pre-ram;
Signature · 1 line
2.34.1
#13 lore raw

PATCH 6/6 configs: j7200_evm_r5: Add ESM config for J7200

In reply to Aniket Limaye

From: Neha Malcom Francis <[email protected]>

Add CONFIG_ESM_PMIC to enable PMIC initialization in J7200.

---
 configs/j7200_evm_r5_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/j7200_evm_r5_defconfig +1 -0
index c9f586a1695..7b2ff65fcee 100644
@@ -103,6 +103,7 @@ CONFIG_FS_LOADER=y
 CONFIG_SPL_FS_LOADER=y
 CONFIG_ESM_K3=y
 CONFIG_K3_AVS0=y
+CONFIG_ESM_PMIC=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_SPL_MMC_HS400_SUPPORT=y
 CONFIG_MMC_SDHCI=y
Signature · 1 line
2.34.1
#14 lore raw
In reply to Aniket Limaye
Quoted 5 lines · Aniket Limaye

This series adds the required nodes in the devicetree, and enables the configs for the ESM and PMIC.

Test Logs AVS and ESM:
https://gist.github.com/aniket-l/96b85a25733095b4fd87f48f730518bf

Forgot to add that this series depends on the patch [0] "arm: dts: k3-j7200: Move to OF_UPSTREAM"

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

Quoted 18 lines

---
Aniket Limaye (2):
arm: dts: k3-j7200-r5: Add the pmic node in R5 dt
arm: dts: k3-j7200-r5: Fix indentation to use tabs

Gowtham Tammana (2):
arm: dts: k3-j7200-r5-common: Hook buckb1 to vtm supply
arm: dts: k3-j7200: Add ESM PMIC support for tps659413

Neha Malcom Francis (2):
configs: j7200_evm_r5: Add ESM config for J7200
configs: j7200_evm_r5: Add ESM config for J7200

  .../arm/dts/k3-j7200-r5-common-proc-board.dts | 23 +++++++++++++++----
  configs/j7200_evm_r5_defconfig                |  2 ++
  2 files changed, 21 insertions(+), 4 deletions(-)