Re: [PATCH v3 0/8] Suspend to RAM support for K3 J7200

2024-01-10 Thread Thomas Richard
On 1/9/24 18:32, Andrew Davis wrote: > On 1/8/24 10:56 AM, Thomas Richard wrote: >> This series is the U-Boot part of the work to add the suspend to RAM >> support for the K3 J7200 EVM board. >> >> During the boot R5 SPL makes a copy of DM-Firmware and TF-A in memory.

[PATCH v3 8/8] arm: mach-k3: j7200: Skip fit processing when resuming

2024-01-08 Thread Thomas Richard
No need to process fit image during resume. All needed parts are already available in DRAM. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- (no changes since v1) arch/arm/mach-k3/sysfw-loader.c | 7 ++- 1 file changed, 6 insertions

[PATCH v3 7/8] board: ti: j721e: During resume spl notify tf-a that the board is resuming

2024-01-08 Thread Thomas Richard
: Thomas Richard Signed-off-by: Gregory CLEMENT --- Changes in v3: - At resume, R5 SPL doesn't restore TF-A anymore. TF-A is started like during a cold boot. R5 SPL will notify that the board is resuming using a magic value written in the scratchpad ram. TF-A will restore itself. Chang

[PATCH v3 6/8] board: ti: j721e: Add the missing part of exit retention for k3-ddrss (J7200)

2024-01-08 Thread Thomas Richard
Add the board specific part of the exit retention sequence for k3-ddrss Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- (no changes since v1) board/ti/j721e/evm.c | 27 ++- 1 file changed, 26 insertions(+), 1

[PATCH v3 5/8] ram: k3-ddrss: Add exit retention support

2024-01-08 Thread Thomas Richard
Add the exit retention support. The enter retention is done by DM-Firmware. A part of the exit retention sequence is specific to the board. It is done in board_k3_ddrss_lpddr4_release_retention. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT

[PATCH v3 4/8] board: ti: j721e: Add resume detection for J7200

2024-01-08 Thread Thomas Richard
Add the capability to detect a resume. To detect the resume, SPL searches a magic value (0xBA) in a register of PMICA. This value is set by DM-Firmware during the suspend sequence. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- Changes

[PATCH v3 3/8] configs: j7200_evm_r5: Move address used for allocation in the reserved space

2024-01-08 Thread Thomas Richard
From: Gregory CLEMENT Else it could corrupt the memory of Linux when exiting suspend to ram. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Richard --- (no changes since v1) configs/j7200_evm_r5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs

[PATCH v3 2/8] configs: j7200_evm_r5: Used reserved memory in DDR for stack

2024-01-08 Thread Thomas Richard
location that won't be used by Linux. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Richard --- (no changes since v1) configs/j7200_evm_r5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig

[PATCH v3 1/8] DO NOT MERGE: arm: dts: k3-j7200-r5-common: Add pmic node for esm

2024-01-08 Thread Thomas Richard
From: Gowtham Tammana Add pmic tps659413 node needed for ESM error event handling. Signed-off-by: Gowtham Tammana Signed-off-by: Neha Malcom Francis Signed-off-by: Thomas Richard --- (no changes since v1) arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 17 ++--- 1 file

[PATCH v3 0/8] Suspend to RAM support for K3 J7200

2024-01-08 Thread Thomas Richard
erved space Thomas Richard (5): board: ti: j721e: Add resume detection for J7200 ram: k3-ddrss: Add exit retention support board: ti: j721e: Add the missing part of exit retention for k3-ddrss (J7200) board: ti: j721e: During resume spl notify tf-a that the board is resuming arm:

Re: [PATCH v7 7/9] arm: dts: k3-j7200-binman: Add firewall configurations

2024-01-02 Thread Thomas Richard
ation: - SoC: J7200 SR2.0 HS-SE - TIFS: v09.01.02 Tested-by: Thomas Richard -- Thomas Richard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 7/8] board: ti: j721e: During resume spl restores TF-A and DM-Firmware

2023-11-09 Thread Thomas Richard
On 11/8/23 18:30, Andrew Davis wrote: >>   void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) >>   { >>   typedef void __noreturn (*image_entry_noargs_t)(void); >> @@ -235,6 +241,32 @@ void __noreturn jump_to_image_no_args(struct >> spl_image_info *spl_image) >>   if (r

Re: [PATCH v2 6/8] board: ti: j721e: Add the missing part of exit retention for k3-ddrss (J7200)

2023-11-09 Thread Thomas Richard
On 11/7/23 19:18, Tom Rini wrote: > On Tue, Nov 07, 2023 at 05:18:00PM +0100, Thomas Richard wrote: > >> Add the board specific part of the exit retention sequence for k3-ddrss >> >> Based on the work of Gregory CLEMENT >> >> Signed-off-by: Thomas Richar

[PATCH v2 8/8] arm: mach-k3: j7200: Skip fit processing when resuming

2023-11-07 Thread Thomas Richard
No need to process fit image during resume. All needed parts are already available in DRAM. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- (no changes since v1) arch/arm/mach-k3/sysfw-loader.c | 7 ++- 1 file changed, 6 insertions

[PATCH v2 7/8] board: ti: j721e: During resume spl restores TF-A and DM-Firmware

2023-11-07 Thread Thomas Richard
-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- Changes in v2: - Check if TF-A is running in DRAM, if yes no need to restore it - Remove BL31_START macro, and get TF-A start address from the fit image arch/arm/mach-k3/common.c | 48 ++- arch/arm/mach

[PATCH v2 5/8] ram: k3-ddrss: Add exit retention support

2023-11-07 Thread Thomas Richard
Add the exit retention support. The enter retention is done by DM-Firmware. A part of the exit retention sequence is specific to the board. It is done in board_k3_ddrss_lpddr4_release_retention. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT

[PATCH v2 6/8] board: ti: j721e: Add the missing part of exit retention for k3-ddrss (J7200)

2023-11-07 Thread Thomas Richard
Add the board specific part of the exit retention sequence for k3-ddrss Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- (no changes since v1) board/ti/j721e/evm.c | 27 ++- 1 file changed, 26 insertions(+), 1

[PATCH v2 4/8] board: ti: j721e: Add resume detection for J7200

2023-11-07 Thread Thomas Richard
Add the capability to detect a resume. To detect the resume, SPL searches a magic value (0xBA) in a register of PMICA. This value is set by DM-Firmware during the suspend sequence. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- (no

[PATCH v2 3/8] configs: j7200_evm_r5: Move address used for allocation in the reserved space

2023-11-07 Thread Thomas Richard
From: Gregory CLEMENT Else it could corrupt the memory of Linux when exiting suspend to ram. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Richard --- (no changes since v1) configs/j7200_evm_r5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs

[PATCH v2 2/8] configs: j7200_evm_r5: Used reserved memory in DDR for stack

2023-11-07 Thread Thomas Richard
location that won't be used by Linux. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Richard --- (no changes since v1) configs/j7200_evm_r5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig

[PATCH v2 1/8] DO NOT MERGE: arm: dts: k3-j7200-r5-common: Add pmic node for esm

2023-11-07 Thread Thomas Richard
From: Gowtham Tammana Add pmic tps659413 node needed for ESM error event handling. Signed-off-by: Gowtham Tammana Signed-off-by: Neha Malcom Francis Signed-off-by: Thomas Richard --- (no changes since v1) arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 17 ++--- 1 file

[PATCH v2 0/8] Suspend to RAM support for K3 J7200

2023-11-07 Thread Thomas Richard
: Move address used for allocation in the reserved space Thomas Richard (5): board: ti: j721e: Add resume detection for J7200 ram: k3-ddrss: Add exit retention support board: ti: j721e: Add the missing part of exit retention for k3-ddrss (J7200) board: ti: j721e: During resume spl

Re: [PATCH 1/9] DO NOT MERGE: arm: dts: k3-j7200-r5-common: Add pmic node for esm

2023-10-19 Thread Thomas Richard
On 10/16/23 18:29, Nishanth Menon wrote: > On 16:11-20231016, Thomas Richard wrote: >> From: Gowtham Tammana >> >> Add pmic tps659413 node needed for ESM error event handling. >> >> Signed-off-by: Gowtham Tammana >> Signed-off-by: Neha Malcom Fr

Re: [PATCH 5/9] ram: k3-ddrss: Add exit retention support

2023-10-19 Thread Thomas Richard
On 10/19/23 00:42, Bryan Brattlof wrote: > Hi Thomas! > > On October 16, 2023 thus sayeth Thomas Richard: >> Add the exit retention support. >> The enter retention is done by DM-Firmware. >> A part of the exit retention sequence is specific to

Re: [PATCH 9/9] cmd: test_enter_suspend: Add test_enter_suspend command

2023-10-19 Thread Thomas Richard
On 10/16/23 20:14, Heinrich Schuchardt wrote: > On 10/16/23 16:11, Thomas Richard wrote: >> From: Gregory CLEMENT >> >> Add test_enter_suspend command using PSCI. >> This command is only to test suspend sequence from U-Boot. >> The resume will not work. >

[PATCH 9/9] cmd: test_enter_suspend: Add test_enter_suspend command

2023-10-16 Thread Thomas Richard
From: Gregory CLEMENT Add test_enter_suspend command using PSCI. This command is only to test suspend sequence from U-Boot. The resume will not work. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Richard --- cmd/Kconfig | 7 +++ cmd/boot.c | 8

[PATCH 8/9] arm: mach-k3: j7200: Skip fit processing when resuming

2023-10-16 Thread Thomas Richard
No need to process fit image during resume. All needed parts are already available in DRAM. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- arch/arm/mach-k3/sysfw-loader.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff

[PATCH 7/9] board: ti: j721e: During resume spl restores TF-A and DM-Firmware

2023-10-16 Thread Thomas Richard
-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- arch/arm/mach-k3/common.c | 37 ++- arch/arm/mach-k3/include/mach/j721e_spl.h | 29 ++ arch/arm/mach-k3/sysfw-loader.c | 9 -- 3 files changed, 71 insertions(+), 4 deletions

[PATCH 3/9] configs: j7200_evm_r5: Move address used for allocation in the reserved space

2023-10-16 Thread Thomas Richard
From: Gregory CLEMENT Else it could corrupt the memory of Linux when exiting suspend to ram. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Richard --- configs/j7200_evm_r5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/j7200_evm_r5_defconfig b

[PATCH 6/9] board: ti: j721e: Add the missing part of exit retention for k3-ddrss (J7200)

2023-10-16 Thread Thomas Richard
Add the board specific part of the exit retention sequence for k3-ddrss Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- board/ti/j721e/evm.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a

[PATCH 5/9] ram: k3-ddrss: Add exit retention support

2023-10-16 Thread Thomas Richard
Add the exit retention support. The enter retention is done by DM-Firmware. A part of the exit retention sequence is specific to the board. It is done in board_k3_ddrss_lpddr4_release_retention. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT

[PATCH 4/9] board: ti: j721e: Add resume detection for J7200

2023-10-16 Thread Thomas Richard
Add the capability to detect a resume. To detect the resume, SPL searches a magic value (0xBA) in a register of PMICA. This value is set by DM-Firmware during the suspend sequence. Based on the work of Gregory CLEMENT Signed-off-by: Thomas Richard Signed-off-by: Gregory CLEMENT --- board/ti

[PATCH 2/9] configs: j7200_evm_r5: Used reserved memory in DDR for stack

2023-10-16 Thread Thomas Richard
location that won't be used by Linux. Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Richard --- configs/j7200_evm_r5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig index c4dd33627b..74505

[PATCH 1/9] DO NOT MERGE: arm: dts: k3-j7200-r5-common: Add pmic node for esm

2023-10-16 Thread Thomas Richard
From: Gowtham Tammana Add pmic tps659413 node needed for ESM error event handling. Signed-off-by: Gowtham Tammana Signed-off-by: Neha Malcom Francis Signed-off-by: Thomas Richard --- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 17 ++--- 1 file changed, 14 insertions(+), 3

[PATCH 0/9] Suspend to RAM support for K3 J7200

2023-10-16 Thread Thomas Richard
): configs: j7200_evm_r5: Used reserved memory in DDR for stack configs: j7200_evm_r5: Move address used for allocation in the reserved space cmd: test_enter_suspend: Add test_enter_suspend command Thomas Richard (5): board: ti: j721e: Add resume detection for J7200 ram: k3-ddrss: Add