Introduce resume for J7xx SoCs
Subsystems (4)
v7 cover Introduce resume for J7xx SoCs
This series allows J7200/J721s2/J784s4/J722s to resume from suspend.
On those SoCs, a magic value is set in a PMIC register by the DM firmware just before suspend, then everything but the PMIC and DDR is powered off.
At resume/boot time, the magic value has to be read back by U-Boot SPL in order to know if we are indeed in a resume situation.
That's the purpose of j7xx_board_is_resuming() introduced here.
Then, if the SoC is resuming, the DDR has to be brought out of retention, at full speed and get out of low power mode. Between those steps, the DDR_RET pin has to be de-asserted. But the DDR_RET pins of all DDR chips are tied together on a single GPIO, so it's impossible to resume one DDR chip after the other, they must be all resumed at once.
That's why it's orchestrated from board_init_f() and not in the k3ddrss driver.
Once the DDR is fully functional, the next steps are:
- retrieve the LPM memory region from DTS
- authenticate certificates from LPM memory region and apply firewalls
- ask TIFS to restore TFA and its own minimal context
- start TFA on remote proc
- load and jump to DM
Disclaimer:
---------
There's a potential attack vector in this sequence, because OPTEE could be modified before being reloaded.
Also, if the certificate replay is skipped, then TFA can be read from MSMC.
Patches 1-3 add LPM helpers for all SoCs
Patch 4 adds the resume detection for all SoCs
Patch 5 adds common code for DDR retention pin
Patch 6 enables GTC at resume
Patch 7 detects IO+DDR resume state for j7200/j784s4
Patch 8 stores the wakeup reason in MCU_PSRAM0_RAM for j7200/j784s4 Patch 9 sets the PMIC NSLEEP triggers
Patches 10-12 add the DDR resume sequence for all SoCs Patches 13-16 add the resume flow for all SoCs
Patch 17 updates the pm-cfg and schema to a new version
Patch 18 removes now unneeded background firewall on DDR for j7200/j784s4 Patch 19 extends the firewall for ATF region to TIFS
Patch 20 add the resume flow documentation
Tested on J722s HS-FS, J7200 GP, J784s4 GP, J721s2 GP
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#tisci-msg-min-context-restore
It needs lpm_memory_regions described in DTS [updated to v6]:
https://lore.kernel.org/lkml/[email protected]/
Changes from v6:
- rebase on u-boot/next:
commit 6201222134cd ("lzma: Update LZMA SDK code from 25.01 to 26.05")- drop patches from am62 LPM series (merged in u-boot/next)
- apply errata i2487 as am62 does (indeed, the memory was seen as corrupted when the first suspend was longer than 40 seconds) in patch 11 ("ram: k3-ddrss: Add j722s DDR resume sequence")
Changes from v5:
- gather {Acked,Reviewed}-bys
- remove j721e support
- Check lpm image size retrieved from DTS
- Fix size when loading optee+certificate
- Update U-Boot documentation TODO
- drop resume state from global data since EARLY_BSS is set, using static variable is ok
- make CONFIG_K3_LPM default n to prevent from breaking configs with older TIFS
- check lpm_reg_size in extract_lpm_region
- replay DM certificate with ti_secure_image_auth_apply_fwls()
- drop special hanling for j722s in j7xx_board_is_resuming by adding another call to ctrl_mmr_unlock()
- add missing calls to k3_set_lpm_core_* for each soc
- panic if clearing isolation fails
- add resume boot flow and disclaimer in uboot docs
Changes from v4:
- rebase onto v2026.10-rc2
- add disclaimer in do_resume() for 2 potential attack vectors
- include needed patches from AM62 LPM series
- fix minor checkpatch warning (!xxx instead of == NULL)
Changes from v3:
- rebase on:
commit 8d5f30b52f7c ("Merge patch series "env: migrate static flags list to Kconfig"")
+ AM62 LPM series
Changes from v2:
- enable GTC counter at resume
- factorise __weak j7xx_board_is_resuming()
- reset PMIC NSLEEP triggers register in one place
- gather Reviewed-by
- fix comment style in k3-ddrss.c
- clean and Factorize k3_deassert_ddr_ret()
- change printf in dev_err in ti_sci_cmd_proc_auth_apply_fwls()
Changes from v1:
- drop unneeded patch: configs: j784s4_evm_r5: enable TI_SCI_POWER_DOMAIN
- factorize j7xx_board_is_resuming (that lead to patch renumbering)
- drop From: field duplication from patch 1
- use SYS_K3_SCRATCH_LPM_ADDR config option instead of hardcoded value
- add missing board/ti/j722s/pm-cfg.yaml
- migrate missing K3 platforms to new pm-boardcfg
- remove struct lpm_addr_info mem_addr_lpm; (globals are forbidden at this stage)
- rework ti_secure_image_auth_apply_fwls()
- Fix pointer arithmetic: mem_addr_lpm->context_save_addr + FW_IMAGE_SIZE
- Fix K3_LPM_WAKE_SOURCE_PMIC_GPIO value
- Fix spellings/comments
Abhash Kumar Jha (4):
board: mach-k3: r5: common: enable GTC after core_resume
board: evm: Enable de-isolation of IOs at resume for j7200 and j784s4
board: mach-k3: r5: common: Store wakeup reason on scratchpad memory
arm: mach-k3: Update pm-boardcfg for all k3 platforms
Prasanth Babu Mantena (4):
firmware: ti_sci: add low power mode operations
mach-k3: r5: common: add helper functions needed in LPM resume
sequence
arm: dts: k3-j7200: Remove background firewall on DDR
arm: dts: k3-j7200: Extend firewall for ATF region to TIFS
Richard Genoud (TI) (9):
arm: mach-k3: security: introduce ti_secure_skip_cert()
mach-k3: r5: common: introduce j7xx_board_is_resuming()
mach-k3: r5: common: introduce k3_deassert_ddr_ret()
board: mach-k3: r5: common: Set PMIC NSLEEP triggers bits at resume
ram: k3-ddrss: Add j722s DDR resume sequence
ram: k3-ddrss: support j784s4/j721s2 DDR resume
arm: mach-k3: j784s4: Enable LPM resume flow for J784s4/J742s2 SOCs
arm: mach-k3: j722s: Enable LPM resume flow
doc: board: ti: Add Jacinto resume flow
Thomas Richard (TI) (3):
ram: k3-ddrss: Add exit retention support
arm: mach-k3: j721e: Enable LPM resume flow for J7200 SOC
arm: mach-k3: j721s2: Enable LPM resume flow
arch/arm/dts/k3-binman.dtsi | 7 +- arch/arm/dts/k3-j7200-binman.dtsi | 4 + arch/arm/dts/k3-j722s-r5-evm.dts | 4 + arch/arm/dts/k3-security.h | 1 + arch/arm/mach-k3/Kconfig | 10 + arch/arm/mach-k3/common.c | 6 + arch/arm/mach-k3/common.h | 17 + arch/arm/mach-k3/include/mach/hardware.h | 1 + .../arm/mach-k3/include/mach/j721e_hardware.h | 11 + .../mach-k3/include/mach/j784s4_hardware.h | 10 + arch/arm/mach-k3/include/mach/k3-ddr.h | 16 + arch/arm/mach-k3/include/mach/security.h | 2 + arch/arm/mach-k3/j721e/j721e_init.c | 32 + arch/arm/mach-k3/j721s2/j721s2_init.c | 57 +- arch/arm/mach-k3/j722s/j722s_init.c | 8 + arch/arm/mach-k3/j784s4/j784s4_init.c | 52 +- arch/arm/mach-k3/lpm-common.h | 33 + arch/arm/mach-k3/r5/Kconfig | 8 + arch/arm/mach-k3/r5/Makefile | 1 + arch/arm/mach-k3/r5/common.c | 21 +- arch/arm/mach-k3/r5/lpm-common.c | 444 +++++ arch/arm/mach-k3/schema.yaml | 146 +- arch/arm/mach-k3/security.c | 108 +- board/beagle/beagleboneai64/pm-cfg.yaml | 5 +- board/beagle/beagleplay/pm-cfg.yaml | 7 +- board/beagle/beagley-ai/pm-cfg.yaml | 7 +- board/phytec/phycore_am62ax/pm-cfg.yaml | 7 +- board/phytec/phycore_am62x/pm-cfg.yaml | 7 +- board/phytec/phycore_am64x/pm-cfg.yaml | 5 +- board/phytec/phycore_am68x/pm-cfg.yaml | 7 +- board/ti/am62ax/pm-cfg.yaml | 7 +- board/ti/am62px/pm-cfg.yaml | 7 +- board/ti/am62x/pm-cfg.yaml | 7 +- board/ti/am64x/pm-cfg.yaml | 5 +- board/ti/am65x/pm-cfg.yaml | 7 +- board/ti/j7200/pm-cfg.yaml | 92 +- board/ti/j721e/evm.c | 25 + board/ti/j721e/pm-cfg.yaml | 92 +- board/ti/j721s2/pm-cfg.yaml | 94 +- board/ti/j722s/pm-cfg.yaml | 94 +- board/ti/j784s4/evm.c | 25 + board/ti/j784s4/pm-cfg.yaml | 94 +- board/toradex/aquila-am69/pm-cfg.yaml | 7 +- board/toradex/verdin-am62/pm-cfg.yaml | 7 +- board/toradex/verdin-am62p/pm-cfg.yaml | 7 +- doc/board/ti/img/boot_diagram_k3_current.svg | 444 ++++- doc/board/ti/img/resume_diagram_k3.svg | 1638 +++++++++++++++++ doc/board/ti/j7200_evm.rst | 14 + doc/board/ti/j721s2_evm.rst | 14 + doc/board/ti/j722s_evm.rst | 14 + doc/board/ti/j784s4_evm.rst | 14 + drivers/firmware/ti_sci.c | 181 ++ drivers/firmware/ti_sci.h | 92 + drivers/ram/k3-ddrss/k3-ddrss-lpm.c | 2 +- drivers/ram/k3-ddrss/k3-ddrss.c | 270 +++ drivers/ram/k3-ddrss/lpddr4_k3_reg.h | 94 + drivers/remoteproc/ti_k3_arm64_rproc.c | 10 +- include/linux/soc/ti/ti_sci_protocol.h | 8 + tools/binman/etype/ti_board_config.py | 4 +- 59 files changed, 4214 insertions(+), 199 deletions(-) create mode 100644 arch/arm/mach-k3/lpm-common.h create mode 100644 arch/arm/mach-k3/r5/lpm-common.c create mode 100644 doc/board/ti/img/resume_diagram_k3.svg create mode 100644 drivers/ram/k3-ddrss/lpddr4_k3_reg.h
base-commit: 6201222134cd704b5717211fc917e2ca6263577a
PATCH v7 1/20 firmware: ti_sci: add low power mode operations
From: Prasanth Babu Mantena <[email protected]>
On TI-k3 platform, at resume, uboot SPL needs to do several tasks:
- restore TIFS minimal context from DDR
- send DDR save address to TIFS
- load TFA and its context in MSMC
- set TFA resume vector to its warm_entrypoint
- authenticate certificates and apply firewalls
All those operations are now done by TIFS with those messages:ti_sci_cmd_min_context_restore ti_sci_cmd_decrypt_tfati_sci_cmd_core_resumeti_sci_cmd_lpm_save_addr ti_sci_cmd_proc_auth_apply_fwls
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/security/PROC_BOOT.html
--- arch/arm/mach-k3/include/mach/security.h | 1 + arch/arm/mach-k3/security.c | 62 ++++++++ drivers/firmware/ti_sci.c | 181 +++++++++++++++++++++++ drivers/firmware/ti_sci.h | 92 ++++++++++++ include/linux/soc/ti/ti_sci_protocol.h | 8 + 5 files changed, 344 insertions(+)
arch/arm/mach-k3/include/mach/security.h +1 -0
@@ -9,3 +9,4 @@#include <linux/types.h> void ti_secure_image_post_process (void **p_image,size_t *p_size); +void ti_secure_image_auth_apply_fwls (void **p_image,size_t image_size);
arch/arm/mach-k3/security.c +62 -0
65 lines not on this page · raw message
drivers/firmware/ti_sci.c +181 -0
205 lines not on this page · raw message
drivers/firmware/ti_sci.h +92 -0
108 lines not on this page · raw message
include/linux/soc/ti/ti_sci_protocol.h +8 -0
@@ -336,6 +336,8 @@ struct ti_sci_proc_ops { u32 *sts_flags);int (*proc_shutdown_no_wait)(const struct ti_sci_handle *handle,u8 pid); +int (*proc_auth_apply_fwls)(const struct ti_sci_handle *handle, +u64 *image_addr,u32 *image_size); };#define TI_SCI_RING_MODE_RING (0)
@@ -635,9 +637,15 @@ struct ti_sci_fwl_ops {/** * struct ti_sci_lpm_ops - Low Power Mode operations * @min_context_restore: Request restoring context from DDR. +* @decrypt_tfa: Request for decrypting TFA at specific address. +* @core_resume: Request for resuming TFA once decrypted. +* @lpm_save_addr: Send DDR Save address to TIFS */ struct ti_sci_lpm_ops {int (*min_context_restore)(const struct ti_sci_handle *handle,u64 ctx_addr); +int (*decrypt_tfa)(const struct ti_sci_handle *handle,u64 unencrypted_address); +int (*core_resume)(const struct ti_sci_handle *handle); +int (*lpm_save_addr)(const struct ti_sci_handle *handle,u64 context_addr,u32 size); };/**
PATCH v7 2/20 arm: mach-k3: security: introduce ti_secure_skip_cert()
In reply to Richard Genoud (TI)ti_secure_image_check_binary() skips the signing certificate prepended to an image when it is loaded on a GP device, so that the actual payload can be processed.
This functionality will also be used in resume_to_dm_f() to skip the certificate once it has been authenticated.
So, factorize that in ti_secure_skip_cert().
No functional change intended.
--- arch/arm/mach-k3/include/mach/security.h | 1 + arch/arm/mach-k3/security.c | 46 +++++++++++++----------- 2 files changed, 27 insertions(+), 20 deletions(-)
arch/arm/mach-k3/include/mach/security.h +1 -0
@@ -10,3 +10,4 @@void ti_secure_image_post_process (void **p_image,size_t *p_size);void ti_secure_image_auth_apply_fwls (void **p_image,size_t image_size); +void ti_secure_skip_cert (void **p_image,size_t *p_size);
arch/arm/mach-k3/security.c +26 -20
61 lines not on this page · raw message
PATCH v7 3/20 mach-k3: r5: common: add helper functions needed in LPM resume sequence
In reply to Richard Genoud (TI)From: Prasanth Babu Mantena <[email protected]>
Add helper functions that are used by respective SoCs in LPM resume flow.
Those functions will only be compiled if K3_LPM is selected. As it only works with TIFS 11.02.06 or superior, K3_LPM is default n to prevent breaking board with older TIFS.
Very early at boot time, save_lpm_region_idx() is called to:
- retrieve the LPM memory region from DTS
- save ATF/OPTEE certificates information and DM code in this memory region
It has to be called before the DM image is processed, has we want to keep it's certificate intact. (and ti_secure_image_post_process() consumes the DM certificate)
- Later on at boot time, lpm_process() is called to:
- Forward the LPM address to TIFS via TISCI_MSG_LPM_SAVE_ADDR
TIFS will use this address to save TFA context and its own minimal context just before suspend.
- do_resume() is called at resume, just after bringing the DDR out of retention to:
- retrieve the LPM memory region from DTS
- authenticate certificates from LPM memory region and apply firewalls
- ask TIFS to restore TFA and its own minimal context
- start TFA on remote proc
- load and jump to DM
- k3_set_lpm_core_bus_node_path() and k3_set_lpm_core_compatible() are used to locate the lpm memory region in the DTB
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
--- arch/arm/mach-k3/common.h | 17 ++ arch/arm/mach-k3/lpm-common.h | 31 ++++ arch/arm/mach-k3/r5/Kconfig | 8 + arch/arm/mach-k3/r5/Makefile | 1 + arch/arm/mach-k3/r5/common.c | 21 +-- arch/arm/mach-k3/r5/lpm-common.c | 294 +++++++++++++++++++++++++++++++ 6 files changed, 359 insertions(+), 13 deletions(-) create mode 100644 arch/arm/mach-k3/lpm-common.h create mode 100644 arch/arm/mach-k3/r5/lpm-common.c
arch/arm/mach-k3/common.h +17 -0
@@ -8,6 +8,7 @@#include <asm/armv7_mpu.h> #include <asm/hardware.h> +#include <image.h> #include <mach/security.h> /* keep ram_top in the 32-bit address space */
@@ -16,6 +17,22 @@#define K3_FIREWALL_BACKGROUND_BIT (8)#define K3_SPEED_GRADE_UNKNOWN '\0' +#if IS_ENABLED (CONFIG_SYS_K3_SPL_ATF ) +enum { +IMAGE_ID_ATF , +IMAGE_ID_OPTEE , +IMAGE_ID_SPL , +IMAGE_ID_DM_FW , +IMAGE_ID_TIFSSTUB_HS , +IMAGE_ID_TIFSSTUB_FS , +IMAGE_ID_TIFSSTUB_GP , +IMAGE_ID_HSM , +IMAGE_AMT , +}; + +extern struct image_info fit_image_info[IMAGE_AMT ]; +#endif +struct fwl_data {const char *name;u16 fwl_id;
arch/arm/mach-k3/lpm-common.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* K3: LPM Architecture common definitions +* +* Copyright (C) 2026 Texas Instruments Incorporated - https://www.ti.com/ +* Copyright (C) 2026 Bootlin +*/ + +#ifndef _LPM_COMMON_H_ +#define _LPM_COMMON_H_ + +#include <linux/errno.h> + +#if IS_ENABLED (CONFIG_K3_LPM ) +void __noreturn do_resume (void ); +void lpm_process (void ); +int save_lpm_region_idx (unsigned int image_id,unsigned long image_start); +void k3_set_lpm_core_bus_node_path (const char *node_path); +void k3_set_lpm_core_compatible (const char *compatible); +#else +static inline void do_resume (void ) { ; } +static inline void lpm_process (void ) { ; } +static inline int save_lpm_region_idx (unsigned int image_id, +unsigned long image_start) {return -EOPNOTSUPP ; } +static inline void k3_deassert_ddr_ret (const char *pmic_name, +unsigned int ddr_ret_val, +unsigned int ddr_ret_clk,bool toggle) { ; } +static inline void k3_set_lpm_core_bus_node_path (const char *node_path) { ; } +static inline void k3_set_lpm_core_compatible (const char *compatible) { ; } +#endif +#endif
arch/arm/mach-k3/r5/Kconfig +8 -0
@@ -1,6 +1,14 @@ config K3_LOAD_SYSFW bool +config K3_LPM + bool "Enable suspend on supported TI K3 SoCs" + depends on SPL_EARLY_BSS && \ + (SOC_K3_J7200 || SOC_K3_J784S4 || SOC_K3_J722S || SOC_K3_J721S2) + help + Enable suspend to RAM on J7200, J784S4, J722S and J721S2. + NB: it will need TIFS 11.02.06 or newer. + config K3_OPP_LOW depends on ARCH_K3 && K3_AVS0 bool "Enable OPP_LOW on supported TI K3 SoCs"
arch/arm/mach-k3/r5/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_SOC_K3_J722S) += j722s/ obj-$(CONFIG_SOC_K3_J784S4) += j784s4/ obj-y += common.o +obj-$(CONFIG_K3_LPM) += lpm-common.o obj-y += lowlevel_init.o obj-y += r5_mpu.o
arch/arm/mach-k3/r5/common.c +8 -13
@@ -18,20 +18,9 @@#include <elf.h> #include "../common.h" +#include "../lpm-common.h" #if IS_ENABLED (CONFIG_SYS_K3_SPL_ATF ) -enum { -IMAGE_ID_ATF , -IMAGE_ID_OPTEE , -IMAGE_ID_SPL , -IMAGE_ID_DM_FW , -IMAGE_ID_TIFSSTUB_HS , -IMAGE_ID_TIFSSTUB_FS , -IMAGE_ID_TIFSSTUB_GP , -IMAGE_ID_HSM , -IMAGE_AMT , -}; -#if CONFIG_IS_ENABLED (FIT_IMAGE_POST_PROCESS )static const char *image_os_match[IMAGE_AMT ] = { "arm-trusted-firmware",
@@ -45,7 +34,7 @@ static const char *image_os_match[IMAGE_AMT] = { };#endif -static struct image_info fit_image_info[IMAGE_AMT ]; +struct image_info fit_image_info[IMAGE_AMT ];void init_env (void ) {
@@ -189,6 +178,9 @@ void __noreturn jump_to_image(struct spl_image_info *spl_image)if (ret)panic ("%s: ATF failed to load on rproc (%d)\n" , __func__, ret); +if (IS_ENABLED (CONFIG_K3_LPM )) +lpm_process (); +#if CONFIG_IS_ENABLED (FIT_IMAGE_POST_PROCESS )/* Authenticate ATF */ void *image_addr = (void *)fit_image_info[IMAGE_ID_ATF ].image_start;
@@ -373,6 +365,9 @@ void board_fit_image_post_process(const void *fit, int node, void **p_image,return ; } +if (IS_ENABLED (CONFIG_K3_LPM )) +save_lpm_region_idx (i, (unsigned int )*p_image); +/* * Only DM and the DTBs are being authenticated here, * rest will be authenticated when A72 cluster is up
arch/arm/mach-k3/r5/lpm-common.c new file +294 -0
294 lines not on this page · raw message
PATCH v7 4/20 mach-k3: r5: common: introduce j7xx_board_is_resuming()
In reply to Richard Genoud (TI)Add the capability to detect a resume on J7200, J784s4, j722s, j721s2 SoCs.
To detect the resume, SPL searches a magic value (0xBA) in a register of PMIC.
This value is set by DM-Firmware during the suspend sequence.
NB: Although this is called in board_init_f(), we can use global/static variables because CONFIG_SPL_EARLY_BSS is selected.
--- arch/arm/mach-k3/common.c | 6 +++ arch/arm/mach-k3/include/mach/hardware.h | 1 + arch/arm/mach-k3/r5/lpm-common.c | 53 +++++++++++++++++++++++- 3 files changed, 58 insertions(+), 2 deletions(-)
arch/arm/mach-k3/common.c +6 -0
@@ -713,3 +713,9 @@ int spl_start_uboot(void) return 0; }#endif + +/* if r5/lpm-common.c is compiled, this will be overridden */ +__weak bool j7xx_board_is_resuming (void ) +{ +return false; +}
arch/arm/mach-k3/include/mach/hardware.h +1 -0
@@ -137,6 +137,7 @@ u32 get_boot_device(void);const char *get_reset_reason (void );enum k3_device_type get_device_type (void );int k3_fit_config_match_security_state (const char *name); +bool j7xx_board_is_resuming (void );#define writel_verify (val, addr) \ do { \
arch/arm/mach-k3/r5/lpm-common.c +51 -2
77 lines not on this page · raw message
PATCH v7 5/20 mach-k3: r5: common: introduce k3_deassert_ddr_ret()
In reply to Richard Genoud (TI)Deasserting DDR retention pin is quite similar from J7200, J784s4 and j721s2 SoCs.
Instead of duplicating almost the same code, add it in lpm-common.c.
NB: On J7200, there's a latch, so the clock needs to be toggled.
--- arch/arm/mach-k3/lpm-common.h | 2 ++ arch/arm/mach-k3/r5/lpm-common.c | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+)
arch/arm/mach-k3/lpm-common.h +2 -0
@@ -15,6 +15,8 @@void __noreturn do_resume (void );void lpm_process (void );int save_lpm_region_idx (unsigned int image_id,unsigned long image_start); +void k3_deassert_ddr_ret (const char *pmic_name,unsigned int ddr_ret_val, +unsigned int ddr_ret_clk,bool toggle);void k3_set_lpm_core_bus_node_path (const char *node_path);void k3_set_lpm_core_compatible (const char *compatible);#else
arch/arm/mach-k3/r5/lpm-common.c +27 -0
@@ -46,6 +46,33 @@ enum k3_resume_state {K3_RESUME_STATE_RESUMING }; +#define GPIO_OUT_1 0x3D +void k3_deassert_ddr_ret (const char *pmic_name,unsigned int ddr_ret_val, +unsigned int ddr_ret_clk,bool toggle) +{ +struct udevice *pmic; +int regval; +int err; + + err =uclass_get_device_by_name (UCLASS_PMIC , pmic_name, &pmic); +if (err) { +printf ("Getting %s init failed: %d\n" , pmic_name, err); +return ; + } + +/* Set DDR_RET Signal Low on PMIC */ + regval =pmic_reg_read (pmic,GPIO_OUT_1 ) & ~ddr_ret_val; +pmic_reg_write (pmic,GPIO_OUT_1 , regval); + +if (toggle) { +/* Now toggle the CLK of the latch for DDR retention */ +pmic_reg_write (pmic,GPIO_OUT_1 , regval | ddr_ret_clk); +pmic_reg_write (pmic,GPIO_OUT_1 , regval & ~ddr_ret_clk); +pmic_reg_write (pmic,GPIO_OUT_1 , regval | ddr_ret_clk); +pmic_reg_write (pmic,GPIO_OUT_1 , regval & ~ddr_ret_clk); + } +} +bool j7xx_board_is_resuming (void ) {static enum k3_resume_state k3_resuming;
PATCH v7 6/20 board: mach-k3: r5: common: enable GTC after core_resume
In reply to Richard Genoud (TI)From: Abhash Kumar Jha <[email protected]>
The GTC counter values are restored in the resume sequence by TIFS as part of the core_resume API. Enable GTC counter after it is restored.
Also add a check to make sure that rproc_load only enables the GTC counter in the case of a cold boot.
--- arch/arm/mach-k3/r5/lpm-common.c | 11 +++++++++++ drivers/remoteproc/ti_k3_arm64_rproc.c | 10 ++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-)
arch/arm/mach-k3/r5/lpm-common.c +11 -0
@@ -313,6 +313,7 @@ static void resume_rproc_f(void) {struct power_domain rproc_pwrdmn;struct udevice *dev; +void *gtc_base;int ret; ret =uclass_get_device_by_seq (UCLASS_REMOTEPROC ,1 , &dev);
@@ -323,6 +324,16 @@ static void resume_rproc_f(void)if (ret)panic ("power_domain_get_rproc() failed: %d\n" , ret); + gtc_base =dev_read_addr_ptr (dev); +if (!gtc_base) +panic ("Get GTC address failed\n" ); + +#define GTC_CNTCR_REG 0x0 +#define GTC_CNTR_EN 0x3 + +/* GTC counter values have been restored by TIFS, so enable the counter */ +writel (GTC_CNTR_EN , gtc_base +GTC_CNTCR_REG ); + ret =power_domain_on (&rproc_pwrdmn);if (ret)panic ("power_domain_on failed: %d\n" , ret);
drivers/remoteproc/ti_k3_arm64_rproc.c +8 -2
@@ -17,6 +17,7 @@#include <dm/device_compat.h> #include <linux/err.h> #include <linux/soc/ti/ti_sci_protocol.h> +#include <mach/hardware.h> #include "ti_sci_proc.h" #define INVALID_ID 0xff
@@ -78,8 +79,13 @@ static int k3_arm64_load(struct udevice *dev, ulong addr, ulong size)/* Store the clock frequency down for GTC users to pick up */ writel ((u32 )gtc_rate, rproc->gtc_base +GTC_CNTFID0_REG ); -/* Enable the timer before starting remote core */ -writel (GTC_CNTR_EN , rproc->gtc_base +GTC_CNTCR_REG ); +if (!j7xx_board_is_resuming ()) { +/* +* In case of a fresh boot, enable the timer before +* starting the remote core. +*/ +writel (GTC_CNTR_EN , rproc->gtc_base +GTC_CNTCR_REG ); + }/* * Setting the right clock frequency would have taken care by
PATCH v7 7/20 board: evm: Enable de-isolation of IOs at resume for j7200 and j784s4
In reply to Richard Genoud (TI)From: Abhash Kumar Jha <[email protected]>
In IO_ONLY_PLUS_DDR low power mode, the DDR is in self refresh, and the SoC is powered off except wake-up IOs.
When resuming from IO_ONLY_PLUS_DDR low power mode, the IOs are isolated. Remove that isolation in resume sequence.
On j7200, The canuart IOs are isolated whereas on j784s4, the mcu_general IOs are isolated.
--- .../arm/mach-k3/include/mach/j721e_hardware.h | 11 ++++++++ .../mach-k3/include/mach/j784s4_hardware.h | 10 ++++++++ arch/arm/mach-k3/r5/lpm-common.c | 16 ++++++++++++ board/ti/j721e/evm.c | 25 +++++++++++++++++++ board/ti/j784s4/evm.c | 24 ++++++++++++++++++ 5 files changed, 86 insertions(+)
arch/arm/mach-k3/include/mach/j721e_hardware.h +11 -0
@@ -14,6 +14,17 @@#define WKUP_CTRL_MMR0_BASE 0x43000000#define MCU_CTRL_MMR0_BASE 0x40f00000#define CTRL_MMR0_BASE 0x00100000 +#define DMSC_PWRCTRL_BASE 0x44130000 + +#define PMCTRL_IO_1 (DMSC_PWRCTRL_BASE + 0x88) +#define PMCTRL_IO_LPM PMCTRL_IO_1 +#define CANUART_WAKE_CTRL 0x18300 +#define CANUART_WAKE_STAT0 0x18308 +#define CANUART_WAKE_STAT1 0x1830C + +#define IO_ISO_MAGIC_VAL 0x55555554 +#define CANUART_WAKE_STAT1_CANUART_IO_MODE BIT(0) +#define DEISOLATION_TIMEOUT_MS 10#define CTRLMMR_MAIN_DEVSTAT (CTRL_MMR0_BASE + 0x30)#define MAIN_DEVSTAT_BOOT_MODE_B_MASK BIT(0)
arch/arm/mach-k3/include/mach/j784s4_hardware.h +10 -0
@@ -15,6 +15,16 @@#define MCU_CTRL_MMR0_BASE 0x40f00000#define CTRL_MMR0_BASE 0x00100000 +#define PMCTRL_IO_0 (WKUP_CTRL_MMR0_BASE + 0x14084) +#define PMCTRL_IO_LPM PMCTRL_IO_0 +#define MCU_GEN_WAKE_CTRL 0x18310 +#define MCU_GEN_WAKE_STAT0 0x18318 +#define MCU_GEN_WAKE_STAT1 0x1831C + +#define IO_ISO_MAGIC_VAL 0x55555554 +#define MCU_GEN_WAKE_STAT1_MCU_GEN_IO_MODE BIT(0) +#define DEISOLATION_TIMEOUT_MS 10 +#define CTRLMMR_MAIN_DEVSTAT (CTRL_MMR0_BASE + 0x30)#define MAIN_DEVSTAT_BOOT_MODE_B_MASK BIT(0)#define MAIN_DEVSTAT_BOOT_MODE_B_SHIFT 0
arch/arm/mach-k3/r5/lpm-common.c +16 -0
@@ -6,6 +6,7 @@* Copyright (C) 2026 Bootlin */ +#include <asm/arch/hardware.h> #include <clk.h> #include <dm/device.h> #include <dm/read.h>
@@ -26,6 +27,8 @@/* PMIC register where the magic value resides */ #define K3_LPM_SCRATCH_PAD_REG_3 0xcb +#define IO_ISO_STATUS BIT(25) +#define CONTEXT_SAVE_SZ 0x80000#define ATF_CERT_SZ 0x80000#define OPTEE_CERT_SZ 0x100000
@@ -46,6 +49,8 @@ enum k3_resume_state { K3_RESUME_STATE_RESUMING }; +__weak void clear_isolation (void ) { } +#define GPIO_OUT_1 0x3Dvoid k3_deassert_ddr_ret (const char *pmic_name,unsigned int ddr_ret_val,unsigned int ddr_ret_clk,bool toggle)
@@ -77,11 +82,22 @@ bool j7xx_board_is_resuming(void) {static enum k3_resume_state k3_resuming;struct udevice *pmic; +u32 pmctrl_val =0 ;int ret, magic;if (k3_resuming !=K3_RESUME_STATE_UNKNOWN ) goto end; +#ifdef PMCTRL_IO_LPM + pmctrl_val =readl (PMCTRL_IO_LPM ); +#endif +if ((pmctrl_val &IO_ISO_STATUS ) ==IO_ISO_STATUS ) { +clear_isolation (); + k3_resuming =K3_RESUME_STATE_RESUMING ; +debug ("board is resuming from IO_DDR mode\n" ); + goto end; + } + ret =uclass_get_device_by_name (UCLASS_PMIC ,"pmic@48" , &pmic);if (ret) {
board/ti/j721e/evm.c +25 -0
@@ -17,6 +17,7 @@#include <spl.h> #include <dm.h> #include <asm/arch/k3-ddr.h> +#include <wait_bit.h> #include "../common/board_detect.h" #include "../common/fdt_ops.h"
@@ -472,6 +473,30 @@ err_free_gpio: } } +#if (IS_ENABLED (CONFIG_SPL_BUILD ) &&IS_ENABLED (CONFIG_TARGET_J7200_R5_EVM )) + +void clear_isolation (void ) +{ +int ret; +const void *wait_reg = (const void *)(WKUP_CTRL_MMR0_BASE +CANUART_WAKE_STAT1 ); + +/* un-set the magic word for canuart IOs */ +writel (IO_ISO_MAGIC_VAL ,WKUP_CTRL_MMR0_BASE +CANUART_WAKE_CTRL ); +writel ((IO_ISO_MAGIC_VAL +0x1 ),WKUP_CTRL_MMR0_BASE +CANUART_WAKE_CTRL ); +writel (IO_ISO_MAGIC_VAL ,WKUP_CTRL_MMR0_BASE +CANUART_WAKE_CTRL ); + +/* wait for CANUART_IO_MODE bit to be cleared */ + ret =wait_for_bit_32 (wait_reg, +CANUART_WAKE_STAT1_CANUART_IO_MODE , + false, +DEISOLATION_TIMEOUT_MS , + false); +if (ret <0 ) +panic ("Deisolation timeout" ); +} + +#endif /* CONFIG_SPL_BUILD && CONFIG_TARGET_J7200_R5_EVM */ +void spl_board_init (void ) {struct udevice *dev;
board/ti/j784s4/evm.c +24 -0
@@ -11,7 +11,9 @@#include <efi_loader.h> #include <init.h> #include <spl.h> +#include <asm/arch/hardware.h> #include <asm/arch/k3-ddr.h> +#include <wait_bit.h> #include "../common/fdt_ops.h" struct efi_fw_image fw_images[] = {
@@ -59,6 +61,28 @@ int board_late_init(void) }#endif +#if (IS_ENABLED (CONFIG_SPL_BUILD ) &&IS_ENABLED (CONFIG_TARGET_J784S4_R5_EVM )) +void clear_isolation (void ) +{ +int ret; +const void *wait_reg = (const void *)(WKUP_CTRL_MMR0_BASE +MCU_GEN_WAKE_STAT1 ); + +/* un-set the magic word for MCU_GENERAL IOs */ +writel (IO_ISO_MAGIC_VAL ,WKUP_CTRL_MMR0_BASE +MCU_GEN_WAKE_CTRL ); +writel ((IO_ISO_MAGIC_VAL +0x1 ),WKUP_CTRL_MMR0_BASE +MCU_GEN_WAKE_CTRL ); +writel (IO_ISO_MAGIC_VAL ,WKUP_CTRL_MMR0_BASE +MCU_GEN_WAKE_CTRL ); + +/* wait for MCU_GEN_IO_MODE bit to be cleared */ + ret =wait_for_bit_32 (wait_reg, +MCU_GEN_WAKE_STAT1_MCU_GEN_IO_MODE , + false, +DEISOLATION_TIMEOUT_MS , + false); +if (ret <0 ) +panic ("Deisolation timeout" ); +} +#endif /* CONFIG_SPL_BUILD && CONFIG_TARGET_J784s4_R5_EVM */ +void spl_board_init (void ) {struct udevice *dev;
PATCH v7 8/20 board: mach-k3: r5: common: Store wakeup reason on scratchpad memory
In reply to Richard Genoud (TI)From: Abhash Kumar Jha <[email protected]>
While resuming from suspend, the wakeup reason need to be stored and this will be used by the Linux kernel once its up.
Use the 32 bytes of MCU_PSRAM0_RAM area (addr = 0x40280000) to store the wakeup reason.
Read the value as soon as it starts and store it internally.
--- arch/arm/mach-k3/Kconfig | 10 ++++++++++ arch/arm/mach-k3/r5/lpm-common.c | 25 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+)
arch/arm/mach-k3/Kconfig +10 -0
@@ -101,6 +101,16 @@ config SYS_K3_BOOT_CORE_ID int default 16 +config SYS_K3_SCRATCH_LPM_ADDR + hex + default 0x40280000 if SOC_K3_J721E || SOC_K3_J7200 || SOC_K3_J784S4 + default 0x0 + help + Address where the wake-up reason is stored at resume (32 bits). + It will be read by the Linux kernel once its up. + On J7200/J784s4 the MCU_PSRAM0_RAM is used by default. + Set it to 0 if unused. + config K3_EARLY_CONS bool "Activate to allow for an early console during SPL" depends on SPL
arch/arm/mach-k3/r5/lpm-common.c +25 -0
@@ -27,6 +27,11 @@/* PMIC register where the magic value resides */ #define K3_LPM_SCRATCH_PAD_REG_3 0xcb +/* Wake-up source IDs */ +#define K3_LPM_WAKE_SOURCE_MAIN_IO 0x80 +#define K3_LPM_WAKE_SOURCE_MCU_IO 0x81 +#define K3_LPM_WAKE_SOURCE_PMIC_GPIO 0xB0 +#define IO_ISO_STATUS BIT(25)#define CONTEXT_SAVE_SZ 0x80000
@@ -49,6 +54,11 @@ enum k3_resume_state { K3_RESUME_STATE_RESUMING }; +struct lpm_scratch_space { +u16 wake_src; +u16 reserved; +} __packed; +__weak void clear_isolation (void ) { }#define GPIO_OUT_1 0x3D
@@ -81,6 +91,7 @@ void k3_deassert_ddr_ret(const char *pmic_name, unsigned int ddr_ret_val,bool j7xx_board_is_resuming (void ) {static enum k3_resume_state k3_resuming; +struct lpm_scratch_space *lpm_scratch;struct udevice *pmic;u32 pmctrl_val =0 ;int ret, magic;
@@ -91,7 +102,18 @@ bool j7xx_board_is_resuming(void)#ifdef PMCTRL_IO_LPM pmctrl_val =readl (PMCTRL_IO_LPM );#endif + lpm_scratch = (struct lpm_scratch_space *)CONFIG_SYS_K3_SCRATCH_LPM_ADDR ; +if (lpm_scratch) { + lpm_scratch->wake_src =0 ; + lpm_scratch->reserved =0 ; + }if ((pmctrl_val &IO_ISO_STATUS ) ==IO_ISO_STATUS ) { +if (lpm_scratch) { +if (IS_ENABLED (CONFIG_SOC_K3_J784S4 )) + lpm_scratch->wake_src =K3_LPM_WAKE_SOURCE_MCU_IO ; +else + lpm_scratch->wake_src =K3_LPM_WAKE_SOURCE_MAIN_IO ; + }clear_isolation (); k3_resuming =K3_RESUME_STATE_RESUMING ;debug ("board is resuming from IO_DDR mode\n" );
@@ -110,6 +132,9 @@ bool j7xx_board_is_resuming(void)if (magic ==K3_LPM_MAGIC_SUSPEND ) {debug ("%s: board is resuming\n" , __func__); +if (lpm_scratch) + lpm_scratch->wake_src =K3_LPM_WAKE_SOURCE_PMIC_GPIO ; + k3_resuming =K3_RESUME_STATE_RESUMING ;/* clean magic suspend */
PATCH v7 9/20 board: mach-k3: r5: common: Set PMIC NSLEEP triggers bits at resume
In reply to Richard Genoud (TI)If we are resuming NSLEEP triggers bits of PMIC-A and PMIC-B shall be set to prevent transition to S2R state while clearing interrupts. For example PMIC RTC Linux driver accesses to interrupt registers, in this case if NSLEEP triggers bits are not set it triggers a S2R transition.
--- arch/arm/mach-k3/r5/lpm-common.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
arch/arm/mach-k3/r5/lpm-common.c +23 -1
@@ -27,6 +27,9 @@/* PMIC register where the magic value resides */ #define K3_LPM_SCRATCH_PAD_REG_3 0xcb +/* PMIC NSLEEP register */ +#define K3_LPM_NSLEEP_TRIGGER_REG 0x86 +/* Wake-up source IDs */ #define K3_LPM_WAKE_SOURCE_MAIN_IO 0x80#define K3_LPM_WAKE_SOURCE_MCU_IO 0x81
@@ -92,7 +95,7 @@ bool j7xx_board_is_resuming(void) {static enum k3_resume_state k3_resuming;struct lpm_scratch_space *lpm_scratch; -struct udevice *pmic; +struct udevice *pmic, *pmic_b;u32 pmctrl_val =0 ;int ret, magic;
@@ -142,6 +145,25 @@ bool j7xx_board_is_resuming(void)if (ret)printf ("Failed to clean magic value for suspend detection in PMIC\n" ); + +/* +* Ensure that NSLEEP triggers bits are set to prevent a +* suspend/resume transition when accessing PMIC interrupt +* registers. +*/ + +/* Some boards may have more than one pmic */ + ret =uclass_get_device_by_name (UCLASS_PMIC ,"pmic@4c" , &pmic_b); +if (ret ==0 ) { + ret =pmic_reg_write (pmic_b,K3_LPM_NSLEEP_TRIGGER_REG ,0x03 ); +if (ret) +printf ("Failed to set NSLEEP triggers bits on PMIC-B\n" ); + } + + ret =pmic_reg_write (pmic,K3_LPM_NSLEEP_TRIGGER_REG ,0x3 ); +if (ret) +printf ("Failed to set PMIC NSLEEP triggers. Spurious suspend/resume may happen.\n" ); +/* * For robustness, the DM should also clean the magic value at * startup.
PATCH v7 10/20 ram: k3-ddrss: Add exit retention support
In reply to Richard Genoud (TI)From: "Thomas Richard (TI)" <[email protected]>
Add functions that implements retention exit sequence of DDR.
Typical DDR resume sequence is:
- exit DDR from retention
- de-assert the DDR_RET pin
- restore DDR max frequency
- exit DDR from low power
We have to separate each action in order to de-assert the DDR_RET pins at the right time, because the DDR_RET pins are all tied together in hardware.
Additional interleaving to be taken care and configuring of PMIC differs device to device depending on number of PMIC.
--- arch/arm/mach-k3/include/mach/k3-ddr.h | 16 ++ drivers/ram/k3-ddrss/k3-ddrss.c | 253 +++++++++++++++++++++++++ drivers/ram/k3-ddrss/lpddr4_k3_reg.h | 94 +++++++++ 3 files changed, 363 insertions(+) create mode 100644 drivers/ram/k3-ddrss/lpddr4_k3_reg.h
arch/arm/mach-k3/include/mach/k3-ddr.h +16 -0
@@ -7,6 +7,7 @@#define _K3_DDR_H_#include <spl.h> +#include <compiler.h> /* We need 4 extra entries for: * 1. SoC peripherals
@@ -17,10 +18,25 @@#define K3_MEM_MAP_LEN ((CONFIG_NR_DRAM_BANKS) + 4)#define K3_MEM_MAP_FIRST_BANK_IDX 3 +struct k3_ddrss_regs { +u32 ctl_141; +u32 phy_1305; +u32 ctl_88; +u32 pi_134; +u32 pi_7; +u32 ctl_20; +u32 wdqlvl_f1; +u32 wdqlvl_f2; +}; +int dram_init (void );int dram_init_banksize (void );void fixup_ddr_driver_for_ecc (struct spl_image_info *spl_image);void fixup_memory_node (struct spl_image_info *spl_image); +/* LPDDR4 power management functions */ +void k3_ddrss_lpddr4_exit_retention (struct udevice *dev,struct k3_ddrss_regs *regs); +void k3_ddrss_lpddr4_change_freq (struct udevice *dev); +void k3_ddrss_lpddr4_exit_low_power (struct udevice *dev,struct k3_ddrss_regs *regs);#endif /* _K3_DDR_H_ */
drivers/ram/k3-ddrss/k3-ddrss.c +253 -0
271 lines not on this page · raw message
drivers/ram/k3-ddrss/lpddr4_k3_reg.h new file +94 -0
94 lines not on this page · raw message
PATCH v7 11/20 ram: k3-ddrss: Add j722s DDR resume sequence
In reply to Richard Genoud (TI)As the j722s and am62p resume sequence differs on the way they are detecting that the board is resuming, we should have a specific compatible for each one of them.
For that purpose, introduce ti,j722s-ddrss compatible.
But still, j722s is affected by the errata i2487, so the same workaround as the one done for am62p is applied.
--- arch/arm/dts/k3-j722s-r5-evm.dts | 4 ++++ drivers/ram/k3-ddrss/k3-ddrss-lpm.c | 2 +- drivers/ram/k3-ddrss/k3-ddrss.c | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-)
arch/arm/dts/k3-j722s-r5-evm.dts +4 -0
@@ -11,6 +11,10 @@ #include "k3-am62a-ddr.dtsi" #include "k3-j722s-r5.dtsi" +&memorycontroller { + compatible = "ti,j722s-ddrss", "ti,am62a-ddrss"; +}; + /* WKUP UART0 is used for DM firmware logs */ &wkup_uart0 { status = "okay";
drivers/ram/k3-ddrss/k3-ddrss-lpm.c +1 -1
@@ -256,6 +256,6 @@ void am62xx_ddrss_run_retention_latch_clear_sequence(void)* DDR into retention mode, which will lead to corruption of the DDR * data. */ -if (IS_ENABLED (CONFIG_K3_IODDR )) +if (IS_ENABLED (CONFIG_K3_IODDR ) ||IS_ENABLED (CONFIG_K3_LPM ))am62xx_ddrss_clear_retention_latch_and_magic_words (); }
drivers/ram/k3-ddrss/k3-ddrss.c +9 -0
@@ -19,6 +19,7 @@#include <power-domain.h> #include <wait_bit.h> #include <power/regulator.h> +#include <mach/hardware.h> #include <mach/k3-ddr.h> #include "k3-ddrss-lpm.h"
@@ -1305,11 +1306,19 @@ static const struct k3_ddrss_data j721s2_data = { .flags = MULTI_DDR_SUBSYSTEM, }; +static const struct k3_ddrss_data j722s_data = { + .flags =SINGLE_DDR_SUBSYSTEM , + .is_lpm_resume = j7xx_board_is_resuming, + .ddrss_deassert_retention = am62xx_ddrss_deassert_retention, + .ddrss_clear_retention_latch = am62xx_ddrss_run_retention_latch_clear_sequence, +}; +static const struct udevice_id k3_ddrss_ids[] = { {.compatible ="ti,am62a-ddrss" , .data = (ulong)&am62xx_data, }, {.compatible ="ti,am64-ddrss" , .data = (ulong)&k3_data, }, {.compatible ="ti,j721e-ddrss" , .data = (ulong)&k3_data, }, {.compatible ="ti,j721s2-ddrss" , .data = (ulong)&j721s2_data, }, + {.compatible ="ti,j722s-ddrss" , .data = (ulong)&j722s_data, }, {} };
PATCH v7 12/20 ram: k3-ddrss: support j784s4/j721s2 DDR resume
In reply to Richard Genoud (TI)j78s4/j7200/J721s2 can't use the standard resume sequence. Typical DDR resume sequence is:
- exit DDR from retention
- de-assert the DDR_RET pin
- restore DDR max frequency
- exit DDR from low power
We have to separate each action in order to de-assert the DDR_RET pins at the right time, because the DDR_RET pins are all tied together in hardware.
At resume, only the initialization of the DDR is done by the driver, the rest is handled in boart_init_f().
So, introduce lpm_init_only flag to only initialize the DDR when resume is detected for those boards.
--- drivers/ram/k3-ddrss/k3-ddrss.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/ram/k3-ddrss/k3-ddrss.c +8 -0
@@ -123,6 +123,7 @@ enum intrlv_size {struct k3_ddrss_data {u32 flags; +bool lpm_init_only;bool (*is_lpm_resume)(void );void (*ddrss_deassert_retention)(void );void (*ddrss_clear_retention_latch)(void );
@@ -1162,6 +1163,9 @@ static int k3_ddrss_probe(struct udevice *dev)k3_lpddr4_init (ddrss);k3_lpddr4_hardware_reg_init (ddrss); +if (is_lpm_resume && ddrss_data->lpm_init_only) +return k3_ddrss_init_freq (ddrss); +if (is_lpm_resume)k3_ddrss_self_refresh_exit (ddrss->ddrss_ctl_cfg);
@@ -1293,6 +1297,8 @@ static struct ram_ops k3_ddrss_ops = {static const struct k3_ddrss_data k3_data = { .flags =SINGLE_DDR_SUBSYSTEM , + .lpm_init_only = true, + .is_lpm_resume = j7xx_board_is_resuming, };static const struct k3_ddrss_data am62xx_data = {
@@ -1304,6 +1310,8 @@ static const struct k3_ddrss_data am62xx_data = {static const struct k3_ddrss_data j721s2_data = { .flags =MULTI_DDR_SUBSYSTEM , + .lpm_init_only = true, + .is_lpm_resume = j7xx_board_is_resuming, };static const struct k3_ddrss_data j722s_data = {
PATCH v7 13/20 arm: mach-k3: j721e: Enable LPM resume flow for J7200 SOC
In reply to Richard Genoud (TI)From: "Thomas Richard (TI)" <[email protected]>
Add support for resuming from suspend in board_init_f. The resume state of the SOC is identified and LPM resume sequence is followed accordingly.
First, set LPM core bus path and compatible needed by extract_lpm_region to find lpm-metadata memory region (at boot and at resume time)
Then, add the board specific part of the exit retention sequence for k3-ddrss following the DDR resume sequence:
- exit DDR from retention
- de-assert the DDR_RET pin
- restore DDR max frequency
- exit DDR from low power
Finally:
- Extract context address from devicetree
- Power on the rproc cluster power domain.
- Ask TIFS to authenticate the certificates attached to saved images of ATF, OPTEE and DM and apply the firewalls in it.
- Send the context address to TIFS.
- Ask TIFS to firewall the context address area.
- Ask TIFS to decrypt and restore TFA.
- Ask TIFS to resume TFA.
- Power on the rproc power domain.
- Jump to DM firmware.
(All those steps are done in do_resume())
--- arch/arm/mach-k3/j721e/j721e_init.c | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/arm/mach-k3/j721e/j721e_init.c +32 -0
@@ -20,9 +20,12 @@#include <mmc.h> #include <remoteproc.h> #include <k3-avs.h> +#include <power/pmic.h> +#include <mach/k3-ddr.h> #include "../sysfw-loader.h" #include "../common.h" +#include "../lpm-common.h" /* NAVSS North Bridge (NB) registers */ #define NAVSS0_NBSS_NB0_CFG_MMRS 0x03802000
@@ -46,6 +49,10 @@#define DEV_A72SS0_CORE0_ID 4#define DEV_A72SS0_CORE0_MSMC_CLK_ID 1 +/* DDR retention bits */ +#define DDR_RET_VAL BIT(1) +#define DDR_RET_CLK BIT(2) +#ifdef CONFIG_K3_LOAD_SYSFW struct fwl_data cbass_hc_cfg0_fwls[] = {#if defined(CONFIG_SOC_K3_J721E )
@@ -298,6 +305,7 @@ void board_init_f(ulong dummy) {int ret;#if defined(CONFIG_K3_J721E_DDRSS ) || defined(CONFIG_K3_LOAD_SYSFW ) +struct k3_ddrss_regs regs;struct udevice *dev;#endif /*
@@ -410,6 +418,30 @@ void board_init_f(ulong dummy) ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret)panic ("DRAM init failed: %d\n" , ret); + +k3_set_lpm_core_bus_node_path ("/bus@100000/bus@28380000" ); +k3_set_lpm_core_compatible ("ti,j7200-r5f" ); + +if (j7xx_board_is_resuming ()) { +/* +* The DDR resume sequence is: +* - exit DDR from retention +* - de-assert the DDR_RET pin +* - restore DDR max frequency +* - exit DDR from low power +*/ +k3_ddrss_lpddr4_exit_retention (dev, ®s); +k3_deassert_ddr_ret ("pmic@4c" ,DDR_RET_VAL ,DDR_RET_CLK , true); +k3_ddrss_lpddr4_change_freq (dev); +k3_ddrss_lpddr4_exit_low_power (dev, ®s); + +/* +* The DM (PDK) doesn't support being started with caches +* enabled, and there no gain enabling them here and disabling +* them just before jumping to DM +*/ +do_resume (); + }#endif spl_enable_cache ();
PATCH v7 14/20 arm: mach-k3: j784s4: Enable LPM resume flow for J784s4/J742s2 SOCs
In reply to Richard Genoud (TI)Add support for resuming from suspend in board_init_f. The resume state of the SOC is identified and LPM resume sequence is followed accordingly.
First, set LPM core bus path and compatible needed by extract_lpm_region to find lpm-metadata memory region (at boot and at resume time)
Then, add the board specific part of the exit retention sequence for k3-ddrss following the DDR resume sequence:
- exit DDR from retention
- de-assert the DDR_RET pin
- restore DDR max frequency
- exit DDR from low power
The self-refresh exit sequence is performed in a loop for each DDR controller. (J784S4 has 4 DDR controllers and J742S2 has only 2)
Select the number of ddr controllers on the basis of CONFIG_TARGET_J742S2_R5_EVM build flag.
Finally:
- Extract context address from devicetree
- Power on the rproc cluster power domain.
- Ask TIFS to authenticate the certificates attached to saved images of ATF, OPTEE and DM and apply the firewalls in it.
- Send the context address to TIFS.
- Ask TIFS to firewall the context address area.
- Ask TIFS to decrypt and restore TFA.
- Ask TIFS to resume TFA.
- Power on the rproc power domain.
- Jump to DM firmware.
(All those steps are done in do_resume())
--- arch/arm/mach-k3/j784s4/j784s4_init.c | 52 +++++++++++++++++++++++++-- board/ti/j784s4/evm.c | 3 +- 2 files changed, 52 insertions(+), 3 deletions(-)
arch/arm/mach-k3/j784s4/j784s4_init.c +50 -2
@@ -18,11 +18,21 @@#include <mmc.h> #include <remoteproc.h> #include <k3_bist.h> +#include <power/pmic.h> +#include <mach/k3-ddr.h> #include "../sysfw-loader.h" #include "../common.h" +#include "../lpm-common.h" -#define J784S4_MAX_DDR_CONTROLLERS 4 +#if IS_ENABLED (CONFIG_TARGET_J742S2_R5_EVM ) +#define MAX_DDR_CONTROLLERS 2 +#else +#define MAX_DDR_CONTROLLERS 4 +#endif + +/* DDR retention bits */ +#define DDR_RET_VAL BIT(5)#define CTRL_MMR_CFG0_AUDIO_REFCLK1_CTRL 0x001082e4#define AUDIO_REFCLK1_DEFAULT 0x1c
@@ -279,20 +289,58 @@ void k3_mem_init(void)int ret, ctrl =0 ;if (IS_ENABLED (CONFIG_K3_J721E_DDRSS )) { +struct udevice *devs[MAX_DDR_CONTROLLERS ]; +struct k3_ddrss_regs regs[MAX_DDR_CONTROLLERS ]; + ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret)panic ("DRAM 0 init failed: %d\n" , ret); + + devs[0 ] = dev; ctrl++; -while (ctrl <J784S4_MAX_DDR_CONTROLLERS ) { +while (ctrl <MAX_DDR_CONTROLLERS ) { ret =uclass_next_device_err (&dev);if (ret == -ENODEV )break ;if (ret)panic ("DRAM %d init failed: %d\n" , ctrl, ret); + devs[ctrl] = dev; ctrl++; } + +k3_set_lpm_core_bus_node_path ("/bus@100000/bus@28380000" ); +k3_set_lpm_core_compatible ("ti,j721s2-r5f" ); + +if (j7xx_board_is_resuming ()) { +/* exit DDRs from retention */ +for (ctrl =0 ; ctrl <MAX_DDR_CONTROLLERS ; ctrl++) { +k3_ddrss_lpddr4_exit_retention (devs[ctrl], + ®s[ctrl]); + } + +/* de-assert DDR_RET pin */ +k3_deassert_ddr_ret ("pmic@48" ,DDR_RET_VAL ,0 , false); + +/* restore DDR max frequency */ +for (ctrl =0 ; ctrl <MAX_DDR_CONTROLLERS ; ctrl++) +k3_ddrss_lpddr4_change_freq (devs[ctrl]); + +/* exit DDR from low power */ +for (ctrl =0 ; ctrl <MAX_DDR_CONTROLLERS ; ctrl++) { +k3_ddrss_lpddr4_exit_low_power (devs[ctrl], + ®s[ctrl]); + } +printf ("Initialized %d DRAM controllers\n" , ctrl); + +/* +* The DM (PDK) doesn't support being started with +* caches enabled, and there no gain enabling them here +* and disabling them just before jumping to DM +*/ +do_resume (); + }printf ("Initialized %d DRAM controllers\n" , ctrl); }
board/ti/j784s4/evm.c +2 -1
@@ -61,7 +61,8 @@ int board_late_init(void) }#endif -#if (IS_ENABLED (CONFIG_SPL_BUILD ) &&IS_ENABLED (CONFIG_TARGET_J784S4_R5_EVM )) +#if (IS_ENABLED (CONFIG_SPL_BUILD ) && (IS_ENABLED (CONFIG_TARGET_J784S4_R5_EVM ) || \ +IS_ENABLED (CONFIG_TARGET_J742S2_R5_EVM )))void clear_isolation (void ) {int ret;
PATCH v7 15/20 arm: mach-k3: j722s: Enable LPM resume flow
In reply to Richard Genoud (TI)Add support for resuming from suspend in board_init_f for J722S. The resume state of the SOC is identified and lpm resume sequence is followed accordingly:
First, set LPM core bus path and compatible needed by extract_lpm_region to find lpm-metadata memory region (at boot and at resume time)
Then:
- Extract context address from devicetree
- Power on the rproc cluster power domain.
- Ask TIFS to authenticate the certificates attached to saved images of ATF, OPTEE and DM and apply the firewalls in it.
- Send the context address to TIFS.
- Ask TIFS to firewall the context address area.
- Ask TIFS to decrypt and restore TFA.
- Ask TIFS to resume TFA.
- Power on the rproc power domain.
- Jump to DM firmware.
(All those steps are done in do_resume())
Moreover, ctrl_mmr_unlock() needs to be called again after the TIFS version message, otherwise the pmic calls in j7xx_board_is_resuming() are failling.
Just moving ctrl_mmr_unlock() is not enough, since in this case, TFA fails to start on J722S HS-FS device.
--- arch/arm/mach-k3/j722s/j722s_init.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/mach-k3/j722s/j722s_init.c +8 -0
@@ -14,6 +14,7 @@#include "../sysfw-loader.h" #include "../common.h" +#include "../lpm-common.h" struct fwl_data cbass_main_fwls[] = { {"FSS_DAT_REG3" ,7 ,8 },
@@ -151,6 +152,8 @@ static void k3_spl_init(void)/* Output System Firmware version info */ k3_sysfw_print_ver (); +ctrl_mmr_unlock (); +/* Output DM Firmware version info */ if (IS_ENABLED (CONFIG_ARM64 ))k3_dm_print_ver ();
@@ -165,6 +168,8 @@ static void k3_mem_init(void) ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret)panic ("DRAM init failed: %d\n" , ret); +k3_set_lpm_core_bus_node_path ("/bus@f0000/bus@b00000" ); +k3_set_lpm_core_compatible ("ti,am62-r5f" ); }spl_enable_cache ();
@@ -186,6 +191,9 @@ void board_init_f(ulong dummy)k3_spl_init ();k3_mem_init (); +if (j7xx_board_is_resuming ()) +do_resume ();/* no return */ +setup_qos ();if (IS_ENABLED (CONFIG_ESM_K3 )) {
PATCH v7 16/20 arm: mach-k3: j721s2: Enable LPM resume flow
In reply to Richard Genoud (TI)From: "Thomas Richard (TI)" <[email protected]>
First, set LPM core bus path and compatible needed by extract_lpm_region to find lpm-metadata memory region (at boot and at resume time)
Then, add the board specific part of the exit retention sequence for k3-ddrss:
- exit DDR from retention
- de-assert the DDR_RET pin
- restore DDR max frequency
- exit DDR from low power
After that, the generic resume path is run.
--- arch/arm/mach-k3/j721s2/j721s2_init.c | 57 +++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-)
arch/arm/mach-k3/j721s2/j721s2_init.c +53 -4
@@ -16,12 +16,20 @@#include <dm/uclass-internal.h> #include <dm/pinctrl.h> #include <dm/root.h> +#include <mach/k3-ddr.h> #include <mmc.h> +#include <power/pmic.h> #include <remoteproc.h> #include "../sysfw-loader.h" +#include "../lpm-common.h" #include "../common.h" +#define MAX_DDR_CONTROLLERS 2 + +/* DDR retention bits */ +#define DDR_RET_VAL BIT(3) +/* NAVSS North Bridge (NB) */ #define NAVSS0_NBSS_NB0_CFG_MMRS 0x03702000#define NAVSS0_NBSS_NB1_CFG_MMRS 0x03703000
@@ -262,9 +270,12 @@ bool check_rom_loaded_sysfw(void)void k3_mem_init (void ) {struct udevice *dev; -int ret; +int ret, ctrl =0 ;if (IS_ENABLED (CONFIG_K3_J721E_DDRSS )) { +struct udevice *devs[MAX_DDR_CONTROLLERS ]; +struct k3_ddrss_regs regs[MAX_DDR_CONTROLLERS ]; + ret =uclass_get_device_by_name (UCLASS_MISC ,"msmc" , &dev);if (ret)panic ("Probe of msmc failed: %d\n" , ret);
@@ -272,10 +283,48 @@ void k3_mem_init(void) ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret)panic ("DRAM 0 init failed: %d\n" , ret); + devs[0 ] = dev; + ctrl++; - ret =uclass_next_device_err (&dev); -if (ret && ret != -ENODEV ) -panic ("DRAM 1 init failed: %d\n" , ret); +while (ctrl <MAX_DDR_CONTROLLERS ) { + ret =uclass_next_device_err (&dev); +if (ret == -ENODEV ) +break ; + +if (ret) +panic ("DRAM %d init failed: %d\n" , ctrl, ret); + devs[ctrl] = dev; + ctrl++; + } + +k3_set_lpm_core_bus_node_path ("/bus@100000/bus@28380000" ); +k3_set_lpm_core_compatible ("ti,j721s2-r5f" ); + +if (j7xx_board_is_resuming ()) { +/* exit DDRs from retention */ +for (ctrl =0 ; ctrl <MAX_DDR_CONTROLLERS ; ctrl++) +k3_ddrss_lpddr4_exit_retention (devs[ctrl], + ®s[ctrl]); + +/* de-assert DDR_RET pin */ +k3_deassert_ddr_ret ("pmic@4c" ,DDR_RET_VAL ,0 , false); + +/* restore DDR max frequency */ +for (ctrl =0 ; ctrl <MAX_DDR_CONTROLLERS ; ctrl++) +k3_ddrss_lpddr4_change_freq (devs[ctrl]); + +/* exit DDR from low power */ +for (ctrl =0 ; ctrl <MAX_DDR_CONTROLLERS ; ctrl++) +k3_ddrss_lpddr4_exit_low_power (devs[ctrl], + ®s[ctrl]); + +/* +* The DM (PDK) doesn't support being started with +* caches enabled, and there no gain enabling them here +* and disabling them just before jumping to DM +*/ +do_resume (); + } }spl_enable_cache (); }
PATCH v7 17/20 arm: mach-k3: Update pm-boardcfg for all k3 platforms
In reply to Richard Genoud (TI)From: Abhash Kumar Jha <[email protected]>
Update the pm-cfg and schema to a new version. The new pm-boardcfg has the following substructures
- lpm_cfg : Low Power Mode configuration
- pll_cfg : PLL configuration
- dev_cfg : Device Power configuration
- rsvd_pmic_cfg : Reserved PMIC configuration
- rsvd_cfg : Reserved configuration containing the size for the flexible array appended at the end of pm-boardcfg
The ABI revision for pm-cfg is also changed from 0:1 to 1:1
Modify the pm-cfg for am62ax, am62dx, am62px, am62x, am64x, am65x, j721s2, j722s to change the hierarchy from "pm-cfg -> rev" to "pm-cfg -> pm-boardcfg -> rev".
This change only adds a new 'pm-boardcfg' property as a parent of the 'rev' property, this does not affect the generated pm-cfg binary.
Add u64 type in schema and update the boardcfg script to deal with u64 types.
--- arch/arm/mach-k3/schema.yaml | 146 ++++++++++++++++++++++-- board/beagle/beagleboneai64/pm-cfg.yaml | 5 +- board/beagle/beagleplay/pm-cfg.yaml | 7 +- board/beagle/beagley-ai/pm-cfg.yaml | 7 +- board/phytec/phycore_am62ax/pm-cfg.yaml | 7 +- board/phytec/phycore_am62x/pm-cfg.yaml | 7 +- board/phytec/phycore_am64x/pm-cfg.yaml | 5 +- board/phytec/phycore_am68x/pm-cfg.yaml | 7 +- board/ti/am62ax/pm-cfg.yaml | 7 +- board/ti/am62px/pm-cfg.yaml | 7 +- board/ti/am62x/pm-cfg.yaml | 7 +- board/ti/am64x/pm-cfg.yaml | 5 +- board/ti/am65x/pm-cfg.yaml | 7 +- board/ti/j7200/pm-cfg.yaml | 92 ++++++++++++++- board/ti/j721e/pm-cfg.yaml | 92 ++++++++++++++- board/ti/j721s2/pm-cfg.yaml | 94 ++++++++++++++- board/ti/j722s/pm-cfg.yaml | 94 ++++++++++++++- board/ti/j784s4/pm-cfg.yaml | 94 ++++++++++++++- board/toradex/aquila-am69/pm-cfg.yaml | 7 +- board/toradex/verdin-am62/pm-cfg.yaml | 7 +- board/toradex/verdin-am62p/pm-cfg.yaml | 7 +- tools/binman/etype/ti_board_config.py | 4 +- 22 files changed, 649 insertions(+), 66 deletions(-)
arch/arm/mach-k3/schema.yaml +136 -10
@@ -19,21 +19,15 @@ definitions: type: integer minimum: 0 maximum: 0xffffffff + u64: + type: integer + minimum: 0 + maximum: 0xffffffffffffffff type: object properties: - pm-cfg: - type: object - properties: - rev: - type: object - properties: - boardcfg_abi_maj: - $ref: "#/definitions/u8" - boardcfg_abi_min: - $ref: "#/definitions/u8" board-cfg: type: object properties:
@@ -283,6 +277,138 @@ properties: items: $ref: "#/definitions/u8" + pm-cfg: + type: object + properties: + pm_boardcfg: + type: object + properties: + rev: + type: object + properties: + boardcfg_abi_maj: + $ref: "#/definitions/u8" + boardcfg_abi_min: + $ref: "#/definitions/u8" + + lpm_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + suspend_initiator: + $ref: "#/definitions/u8" + lpm_mode: + $ref: "#/definitions/u8" + lpm_rsvd1: + $ref: "#/definitions/u16" + lpm_rsvd2: + $ref: "#/definitions/u32" + + pll_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + pll_cfg_entries: + type: array + minItems: 0 + maxItems: 5 + items: + type: object + properties: + dev_id: + $ref: "#/definitions/u32" + clk_id: + $ref: "#/definitions/u32" + pll_freq: + $ref: "#/definitions/u64" + dev_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + dev_cfg_entries: + type: array + minItems: 0 + maxItems: 5 + items: + type: object + properties: + dev_id: + $ref: "#/definitions/u32" + state: + $ref: "#/definitions/u32" + flag: + $ref: "#/definitions/u32" + rsvd_pmic_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + pmic_rsvd1: + $ref: "#/definitions/u32" + pmic_rsvd2: + $ref: "#/definitions/u32" + pmic_rsvd3: + $ref: "#/definitions/u32" + rsvd_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + rsvd1: + $ref: "#/definitions/u32" + rsvd2: + $ref: "#/definitions/u32" + rsvd3: + $ref: "#/definitions/u32" + reserved_entry_size: + $ref: "#/definitions/u16" + + reserved_entries: + type: array + minItems: 0 + maxItems: 2 + items: + type: object + properties: + reserved1: + $ref: "#/definitions/u16" + reserved2: + $ref: "#/definitions/u16" + reserved3: + $ref: "#/definitions/u16" + reserved4: + $ref: "#/definitions/u8" + reserved5: + $ref: "#/definitions/u8" + rm-cfg: type: object properties:
board/beagle/beagleboneai64/pm-cfg.yaml +3 -2
@@ -7,6 +7,7 @@ --- pm-cfg: + pm_boardcfg: rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/beagle/beagleplay/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/beagle/beagley-ai/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/phytec/phycore_am62ax/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/phytec/phycore_am62x/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/phytec/phycore_am64x/pm-cfg.yaml +3 -2
@@ -7,6 +7,7 @@ --- pm-cfg: + pm_boardcfg: rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/phytec/phycore_am68x/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/ti/am62ax/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/ti/am62px/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ # --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/ti/am62x/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/ti/am64x/pm-cfg.yaml +3 -2
@@ -7,6 +7,7 @@ --- pm-cfg: + pm_boardcfg: rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/ti/am65x/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/ti/j7200/pm-cfg.yaml +90 -2
96 lines not on this page · raw message
board/ti/j721e/pm-cfg.yaml +90 -2
96 lines not on this page · raw message
board/ti/j721s2/pm-cfg.yaml +91 -3
97 lines not on this page · raw message
board/ti/j722s/pm-cfg.yaml +91 -3
97 lines not on this page · raw message
board/ti/j784s4/pm-cfg.yaml +91 -3
97 lines not on this page · raw message
board/toradex/aquila-am69/pm-cfg.yaml +4 -3
@@ -8,6 +8,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/toradex/verdin-am62/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
board/toradex/verdin-am62p/pm-cfg.yaml +4 -3
@@ -7,6 +7,7 @@ # --- pm-cfg: - rev: - boardcfg_abi_maj: 0x0 - boardcfg_abi_min: 0x1 + pm_boardcfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1
tools/binman/etype/ti_board_config.py +3 -1
@@ -126,8 +126,10 @@ class Entry_ti_board_config(Entry_section): size = 1 elif (data_type == '#/definitions/u16'): size = 2 - else: + elif (data_type == '#/definitions/u32'): size = 4 + else: + size = 8 br = None if type(val) == int: br = val.to_bytes(size, byteorder='little')
PATCH v7 18/20 arm: dts: k3-j7200: Remove background firewall on DDR
In reply to Richard Genoud (TI)From: Prasanth Babu Mantena <[email protected]>
With updated TIFS version tag v11.02.06, the background firewall for DDR firewalls are applied by the TIFS. This removes the dependency of applying firewalls through binman.
Remove background firewall on the whole DDR, as this background firewall is applied by the TIFS init for j7200 and j784s4. Modify for j7200 only, as there are no firewalls applied for j784s4 from SPL.
Removing the firewalls only when CONFIG_K3_LPM is set preserve compatibility with older TIFS.
--- arch/arm/dts/k3-j7200-binman.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/dts/k3-j7200-binman.dtsi +4 -0
@@ -294,12 +294,14 @@ region = <2>; }; +#ifndef CONFIG_K3_LPM firewall-4762-0 { /* nb_slv2__mem0 Background Firewall - 0 */ insert-template = <&firewall_bg_3>; id = <4762>; region = <0>; }; +#endif firewall-4762-1 { /* nb_slv2__mem0 Foreground Firewall */
@@ -308,12 +310,14 @@ region = <1>; }; +#ifndef CONFIG_K3_LPM firewall-4763-0 { /* nb_slv3__mem0 Background Firewall - 0 */ insert-template = <&firewall_bg_3>; id = <4763>; region = <0>; }; +#endif firewall-4763-1 { /* nb_slv3__mem0 Foreground Firewall */
PATCH v7 19/20 arm: dts: k3-j7200: Extend firewall for ATF region to TIFS
In reply to Richard Genoud (TI)From: Prasanth Babu Mantena <[email protected]>
Extend the access to SRAM region of ATF to TIFS as well. This is needed for TIFS for encryption and decryption of ATF as a part of low power mode sequence. TIFS encrypts the ATF while entering into low power mode and decrypts it back while resuming back. So, giving permissions for TIFS to access this region.
--- arch/arm/dts/k3-binman.dtsi | 7 ++++++- arch/arm/dts/k3-security.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/dts/k3-binman.dtsi +6 -1
@@ -501,7 +501,12 @@ FWCTRL_CACHE)>; permissions = <((FWPRIVID_ARMV8 << FWPRIVID_SHIFT) | FWPERM_SECURE_PRIV_RWCD | - FWPERM_SECURE_USER_RWCD)>; + FWPERM_SECURE_USER_RWCD)>, + <((FWPRIVID_TIFS << FWPRIVID_SHIFT) | + FWPERM_SECURE_PRIV_RWCD | + FWPERM_SECURE_USER_RWCD | + FWPERM_NON_SECURE_PRIV_RWCD | + FWPERM_NON_SECURE_USER_RWCD)>; start_address = <0x0 CONFIG_K3_ATF_LOAD_ADDR>; end_address = <0x0 (CONFIG_K3_ATF_LOAD_ADDR + CONFIG_K3_ATF_RESERVED_SIZE - 1)>; };
arch/arm/dts/k3-security.h +1 -0
@@ -7,6 +7,7 @@#define DTS_ARM64_TI_K3_FIREWALL_H #define FWPRIVID_ALL 0xc3 +#define FWPRIVID_TIFS 0xca#define FWPRIVID_ARMV8 1#define FWPRIVID_SHIFT 16
PATCH v7 20/20 doc: board: ti: Add Jacinto resume flow
In reply to Richard Genoud (TI)Update Jacinto documentation with the resume flow.
Add a new diagram for the resume flow and modify the boot flow by adding:
- Extract context address from device tree
- Power on rproc cluster PD
- Auth ATF/OP-TEE/DM certs and apply firewalls
- Send context address
- Firewall context address area
--- doc/board/ti/img/boot_diagram_k3_current.svg | 444 ++++- doc/board/ti/img/resume_diagram_k3.svg | 1638 ++++++++++++++++++ doc/board/ti/j7200_evm.rst | 14 + doc/board/ti/j721s2_evm.rst | 14 + doc/board/ti/j722s_evm.rst | 14 + doc/board/ti/j784s4_evm.rst | 14 + 6 files changed, 2048 insertions(+), 90 deletions(-) create mode 100644 doc/board/ti/img/resume_diagram_k3.svg
doc/board/ti/img/boot_diagram_k3_current.svg +354 -90
@@ -6,8 +6,8 @@ <svg version="1.1" width="706px" - height="951px" - viewBox="-0.5 -0.5 706 951" + height="1191px" + viewBox="-0.5 -0.5 706 1191" id="svg408" sodipodi:docname="boot_diagram_j7200_am62x.svg" inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
@@ -51,7 +51,7 @@ pointer-events="all" id="rect4" /> <path - d="M 304.25 90 L 304.25 940" + d="M 304.25 90 L 304.25 1180" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -142,7 +142,7 @@ x="299.75" y="305" width="10" - height="205" + height="445" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"
@@ -272,9 +272,51 @@ config data</xhtml:div> id="text44">Load system...</text> </switch> </g> - <rect + <rect x="310" y="336" + width="150" + height="40" + rx="6" + ry="6" + fill="none" + stroke="rgb(0, 0, 0)" + pointer-events="all" + id="rect400" /> + <g + transform="translate(-0.5 -0.5)" + id="g401"> + <switch + id="switch402"> + <foreignObject + style="overflow: visible; text-align: left;" + pointer-events="none" + width="100%" + height="100%" + requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> + <xhtml:div + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 148px; height: 1px; padding-top: 356px; margin-left: 311px;"> + <xhtml:div + style="box-sizing: border-box; font-size: 0px; text-align: center;" + data-drawio-colors="color: rgb(0, 0, 0); "> + <xhtml:div + style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Set LPM core bus path<xhtml:br />and compatible</xhtml:div> + </xhtml:div> + </xhtml:div> + </foreignObject> + <text + x="385" + y="360" + fill="rgb(0, 0, 0)" + font-family="Helvetica" + font-size="12px" + text-anchor="middle" + id="text403">Set LPM core bus path</text> + </switch> + </g> +<rect + x="310" + y="376" width="90" height="32" rx="4.8"
@@ -295,7 +337,7 @@ config data</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 352px; margin-left: 311px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 392px; margin-left: 311px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -306,17 +348,239 @@ config data</xhtml:div> </foreignObject> <text x="355" - y="356" + y="396" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle" id="text52">DDR Config</text> </switch> + </g> <rect + x="310" + y="408" + width="140" + height="40" + rx="6" + ry="6" + fill="none" + stroke="rgb(0, 0, 0)" + pointer-events="all" + id="rect410" /> + <g + transform="translate(-0.5 -0.5)" + id="g411"> + <switch + id="switch412"> + <foreignObject + style="overflow: visible; text-align: left;" + pointer-events="none" + width="100%" + height="100%" + requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> + <xhtml:div + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 428px; margin-left: 311px;"> + <xhtml:div + style="box-sizing: border-box; font-size: 0px; text-align: center;" + data-drawio-colors="color: rgb(0, 0, 0); "> + <xhtml:div + style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Extract context address<xhtml:br />from device tree</xhtml:div> + </xhtml:div> + </xhtml:div> + </foreignObject> + <text + x="380" + y="432" + fill="rgb(0, 0, 0)" + font-family="Helvetica" + font-size="12px" + text-anchor="middle" + id="text413">Extract context address</text> + </switch> </g> + <path + d="M 297 478 L 141 478" + fill="none" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="stroke" + id="path411" /> + <path + d="M 134 478 L 141 474.5 L 139.25 478 L 141 481.5 Z" + fill="rgb(0, 0, 0)" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="all" + id="path412" /> + <g + transform="translate(-0.5 -0.5)" + id="g413"> + <switch + id="switch414"> + <foreignObject + style="overflow: visible; text-align: left;" + pointer-events="none" + width="100%" + height="100%" + requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> + <xhtml:div + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 462px; margin-left: 215px;"> + <xhtml:div + style="box-sizing: border-box; font-size: 0px; text-align: center;" + data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "> + <xhtml:div + style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">Power on rproc cluster PD</xhtml:div> + </xhtml:div> + </xhtml:div> + </foreignObject> + <text + x="215" + y="465" + fill="rgb(0, 0, 0)" + font-family="Helvetica" + font-size="11px" + text-anchor="middle" + id="text415">Power on rproc cluster PD</text> + </switch> + </g> + <path + d="M 297 522 L 141 522" + fill="none" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="stroke" + id="path421" /> + <path + d="M 134 522 L 141 518.5 L 139.25 522 L 141 525.5 Z" + fill="rgb(0, 0, 0)" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="all" + id="path422" /> + <g + transform="translate(-0.5 -0.5)" + id="g423"> + <switch + id="switch424"> + <foreignObject + style="overflow: visible; text-align: left;" + pointer-events="none" + width="100%" + height="100%" + requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> + <xhtml:div + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 150px; height: 1px; padding-top: 499px; margin-left: 144px;"> + <xhtml:div + style="box-sizing: border-box; font-size: 0px; text-align: center;" + data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "> + <xhtml:div + style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">Auth ATF/OP-TEE/DM certs<xhtml:br />and apply firewalls</xhtml:div> + </xhtml:div> + </xhtml:div> + </foreignObject> + <text + x="219" + y="502" + fill="rgb(0, 0, 0)" + font-family="Helvetica" + font-size="11px" + text-anchor="middle" + id="text425">Auth ATF/OP-TEE/DM certs</text> + </switch> + </g> + <path + d="M 297 552 L 141 552" + fill="none" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="stroke" + id="path431" /> + <path + d="M 134 552 L 141 548.5 L 139.25 552 L 141 555.5 Z" + fill="rgb(0, 0, 0)" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="all" + id="path432" /> + <g + transform="translate(-0.5 -0.5)" + id="g433"> + <switch + id="switch434"> + <foreignObject + style="overflow: visible; text-align: left;" + pointer-events="none" + width="100%" + height="100%" + requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> + <xhtml:div + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 536px; margin-left: 215px;"> + <xhtml:div + style="box-sizing: border-box; font-size: 0px; text-align: center;" + data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "> + <xhtml:div + style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">Send context address</xhtml:div> + </xhtml:div> + </xhtml:div> + </foreignObject> + <text + x="215" + y="539" + fill="rgb(0, 0, 0)" + font-family="Helvetica" + font-size="11px" + text-anchor="middle" + id="text435">Send context address</text> + </switch> + </g> + <path + d="M 297 582 L 141 582" + fill="none" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="stroke" + id="path441" /> + <path + d="M 134 582 L 141 578.5 L 139.25 582 L 141 585.5 Z" + fill="rgb(0, 0, 0)" + stroke="rgb(0, 0, 0)" + stroke-miterlimit="10" + pointer-events="all" + id="path442" /> + <g + transform="translate(-0.5 -0.5)" + id="g443"> + <switch + id="switch444"> + <foreignObject + style="overflow: visible; text-align: left;" + pointer-events="none" + width="100%" + height="100%" + requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> + <xhtml:div + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 566px; margin-left: 218px;"> + <xhtml:div + style="box-sizing: border-box; font-size: 0px; text-align: center;" + data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); "> + <xhtml:div + style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">Firewall context address area</xhtml:div> + </xhtml:div> + </xhtml:div> + </foreignObject> + <text + x="218" + y="569" + fill="rgb(0, 0, 0)" + font-family="Helvetica" + font-size="11px" + text-anchor="middle" + id="text445">Firewall context address area</text> + </switch> + </g> + <rect x="310" - y="368" + y="608" width="90" height="32" rx="4.8"
@@ -337,7 +601,7 @@ config data</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 384px; margin-left: 311px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 624px; margin-left: 311px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -348,7 +612,7 @@ config data</xhtml:div> </foreignObject> <text x="355" - y="388" + y="628" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -358,7 +622,7 @@ config data</xhtml:div> </g> <rect x="310" - y="440" + y="680" width="90" height="32" rx="4.8"
@@ -379,7 +643,7 @@ config data</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 456px; margin-left: 311px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 696px; margin-left: 311px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -390,7 +654,7 @@ config data</xhtml:div> </foreignObject> <text x="355" - y="460" + y="700" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -400,7 +664,7 @@ config data</xhtml:div> </g> <rect x="310" - y="472" + y="712" width="90" height="32" rx="4.8"
@@ -421,7 +685,7 @@ config data</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 488px; margin-left: 311px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 728px; margin-left: 311px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -432,7 +696,7 @@ config data</xhtml:div> </foreignObject> <text x="355" - y="492" + y="732" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -442,7 +706,7 @@ config data</xhtml:div> </g> <rect x="300" - y="530" + y="770" width="10" height="410" fill="rgb(255, 255, 255)"
@@ -451,7 +715,7 @@ config data</xhtml:div> id="rect82" /> <rect x="302" - y="535" + y="775" width="71.5" height="30" fill="#e1d5e7"
@@ -470,7 +734,7 @@ config data</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 550px; margin-left: 303px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 790px; margin-left: 303px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -481,7 +745,7 @@ config data</xhtml:div> </foreignObject> <text x="338" - y="554" + y="794" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -490,14 +754,14 @@ config data</xhtml:div> </switch> </g> <path - d="M 299 456 L 139.37 456" + d="M 299 696 L 139.37 696" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path92" /> <path - d="M 134.12 456 L 141.12 452.5 L 139.37 456 L 141.12 459.5 Z" + d="M 134.12 696 L 141.12 692.5 L 139.37 696 L 141.12 699.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -515,7 +779,7 @@ config data</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 440px; margin-left: 257px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 680px; margin-left: 257px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); ">
@@ -526,7 +790,7 @@ config data</xhtml:div> </foreignObject> <text x="257" - y="443" + y="683" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px"
@@ -535,98 +799,98 @@ config data</xhtml:div> </switch> </g> <path - d="M 481 601 L 139.37 601" + d="M 481 841 L 139.37 841" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path102" /> <path - d="M 134.12 601 L 141.12 597.5 L 139.37 601 L 141.12 604.5 Z" + d="M 134.12 841 L 141.12 837.5 L 139.37 841 L 141.12 844.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all" id="path104" /> <path - d="M 481 711 L 139.37 711" + d="M 481 951 L 139.37 951" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path106" /> <path - d="M 134.12 711 L 141.12 707.5 L 139.37 711 L 141.12 714.5 Z" + d="M 134.12 951 L 141.12 947.5 L 139.37 951 L 141.12 954.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all" id="path108" /> <path - d="M 482 692 L 317.37 691.04" + d="M 482 932 L 317.37 931.04" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path110" /> <path - d="M 312.12 691.01 L 319.14 687.55 L 317.37 691.04 L 319.1 694.55 Z" + d="M 312.12 931.01 L 319.14 927.55 L 317.37 931.04 L 319.1 934.55 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all" id="path112" /> <path - d="M 482 799 L 317.37 798.04" + d="M 482 1039 L 317.37 1038.04" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path114" /> <path - d="M 312.12 798.01 L 319.14 794.55 L 317.37 798.04 L 319.1 801.55 Z" + d="M 312.12 1038.01 L 319.14 1034.55 L 317.37 1038.04 L 319.1 1041.55 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all" id="path116" /> <path - d="M 481 791 L 139.37 791" + d="M 481 1031 L 139.37 1031" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path118" /> <path - d="M 134.12 791 L 141.12 787.5 L 139.37 791 L 141.12 794.5 Z" + d="M 134.12 1031 L 141.12 1027.5 L 139.37 1031 L 141.12 1034.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all" id="path120" /> <path - d="M 481 890 L 315.37 890.96" + d="M 481 1130 L 315.37 1130.96" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path122" /> <path - d="M 310.12 890.99 L 317.1 887.45 L 315.37 890.96 L 317.14 894.45 Z" + d="M 310.12 1130.99 L 317.1 1127.45 L 315.37 1130.96 L 317.14 1134.45 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all" id="path124" /> <path - d="M 481 879 L 139.37 881.95" + d="M 481 1119 L 139.37 1121.95" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path126" /> <path - d="M 134.12 881.99 L 141.09 878.43 L 139.37 881.95 L 141.15 885.43 Z" + d="M 134.12 1121.99 L 141.09 1118.43 L 139.37 1121.95 L 141.15 1125.43 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -644,7 +908,7 @@ config data</xhtml:div> pointer-events="all" id="rect130" /> <path - d="M 487 90 L 487 820" + d="M 487 90 L 487 1060" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -684,7 +948,7 @@ config data</xhtml:div> </g> <rect x="482" - y="510" + y="750" width="10" height="70" fill="rgb(255, 255, 255)"
@@ -692,14 +956,14 @@ config data</xhtml:div> pointer-events="all" id="rect140" /> <path - d="M 482 565 L 139.37 565" + d="M 482 805 L 139.37 805" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path142" /> <path - d="M 134.12 565 L 141.12 561.5 L 139.37 565 L 141.12 568.5 Z" + d="M 134.12 805 L 141.12 801.5 L 139.37 805 L 141.12 808.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -717,7 +981,7 @@ config data</xhtml:div> pointer-events="all" id="rect146" /> <path - d="M 635.25 90 L 635.25 950" + d="M 635.25 90 L 635.25 1190" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -758,7 +1022,7 @@ C6x/C7x</xhtml:div> </g> <rect x="631" - y="910" + y="1150" width="10" height="38" fill="rgb(255, 255, 255)"
@@ -767,7 +1031,7 @@ C6x/C7x</xhtml:div> id="rect156" /> <rect x="633" - y="912" + y="1152" width="71.5" height="30" fill="#e1d5e7"
@@ -786,7 +1050,7 @@ C6x/C7x</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 927px; margin-left: 634px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 1167px; margin-left: 634px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -797,7 +1061,7 @@ C6x/C7x</xhtml:div> </foreignObject> <text x="669" - y="931" + y="1171" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -817,7 +1081,7 @@ C6x/C7x</xhtml:div> pointer-events="all" id="rect166" /> <path - d="M 127 90 L 127 940" + d="M 127 90 L 127 1180" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -908,7 +1172,7 @@ C6x/C7x</xhtml:div> x="122" y="253" width="10" - height="687" + height="927" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"
@@ -1404,7 +1668,7 @@ Processor</xhtml:div> </g> <rect x="310" - y="400" + y="640" width="90" height="32" rx="4.8"
@@ -1425,7 +1689,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 416px; margin-left: 311px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 656px; margin-left: 311px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1436,7 +1700,7 @@ Processor</xhtml:div> </foreignObject> <text x="355" - y="420" + y="660" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1445,14 +1709,14 @@ Processor</xhtml:div> </switch> </g> <path - d="M 303 510 L 333 510 L 333 530 L 309.12 530" + d="M 303 750 L 333 750 L 333 770 L 309.12 770" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path302" /> <path - d="M 302.12 530 L 309.12 526.5 L 309.12 533.5 Z" + d="M 302.12 770 L 309.12 766.5 L 309.12 773.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -1470,7 +1734,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 521px; margin-left: 337px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 761px; margin-left: 337px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: left;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); ">
@@ -1481,7 +1745,7 @@ Processor</xhtml:div> </foreignObject> <text x="337" - y="524" + y="764" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px"
@@ -1489,14 +1753,14 @@ Processor</xhtml:div> </switch> </g> <path - d="M 133 511 L 137 511 L 476.63 511" + d="M 133 751 L 137 751 L 476.63 751" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path312" /> <path - d="M 481.88 511 L 474.88 514.5 L 476.63 511 L 474.88 507.5 Z" + d="M 481.88 751 L 474.88 754.5 L 476.63 751 L 474.88 747.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -1514,7 +1778,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 500px; margin-left: 177px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 740px; margin-left: 177px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); ">
@@ -1525,7 +1789,7 @@ Processor</xhtml:div> </foreignObject> <text x="177" - y="503" + y="743" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px"
@@ -1535,7 +1799,7 @@ Processor</xhtml:div> </g> <rect x="484" - y="513" + y="753" width="71.5" height="30" fill="#d5e8d4"
@@ -1554,7 +1818,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 528px; margin-left: 485px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 768px; margin-left: 485px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1565,7 +1829,7 @@ Processor</xhtml:div> </foreignObject> <text x="520" - y="532" + y="772" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1575,7 +1839,7 @@ Processor</xhtml:div> </g> <rect x="482" - y="581" + y="821" width="10" height="70" fill="rgb(255, 255, 255)"
@@ -1584,7 +1848,7 @@ Processor</xhtml:div> id="rect330" /> <rect x="484" - y="584" + y="824" width="71.5" height="30" fill="#d5e8d4"
@@ -1603,7 +1867,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 599px; margin-left: 485px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 70px; height: 1px; padding-top: 839px; margin-left: 485px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1614,7 +1878,7 @@ Processor</xhtml:div> </foreignObject> <text x="520" - y="603" + y="843" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1624,7 +1888,7 @@ Processor</xhtml:div> </g> <rect x="482" - y="662" + y="902" width="10" height="78" fill="rgb(255, 255, 255)"
@@ -1633,7 +1897,7 @@ Processor</xhtml:div> id="rect340" /> <rect x="484" - y="665" + y="905" width="83" height="30" fill="#d5e8d4"
@@ -1652,7 +1916,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 81px; height: 1px; padding-top: 680px; margin-left: 485px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 81px; height: 1px; padding-top: 920px; margin-left: 485px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1663,7 +1927,7 @@ Processor</xhtml:div> </foreignObject> <text x="526" - y="684" + y="924" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1673,7 +1937,7 @@ Processor</xhtml:div> </g> <rect x="482" - y="748" + y="988" width="10" height="192" fill="rgb(255, 255, 255)"
@@ -1682,7 +1946,7 @@ Processor</xhtml:div> id="rect350" /> <rect x="484" - y="751" + y="991" width="83" height="30" fill="#d5e8d4"
@@ -1701,7 +1965,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 81px; height: 1px; padding-top: 766px; margin-left: 485px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 81px; height: 1px; padding-top: 1006px; margin-left: 485px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1712,7 +1976,7 @@ Processor</xhtml:div> </foreignObject> <text x="526" - y="770" + y="1010" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1722,7 +1986,7 @@ Processor</xhtml:div> </g> <rect x="492" - y="700" + y="940" width="103" height="32" rx="4.8"
@@ -1743,7 +2007,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 101px; height: 1px; padding-top: 716px; margin-left: 493px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 101px; height: 1px; padding-top: 956px; margin-left: 493px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1754,7 +2018,7 @@ Processor</xhtml:div> </foreignObject> <text x="544" - y="720" + y="960" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1764,7 +2028,7 @@ Processor</xhtml:div> </g> <rect x="492" - y="820" + y="1060" width="103" height="32" rx="4.8"
@@ -1785,7 +2049,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 101px; height: 1px; padding-top: 836px; margin-left: 493px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 101px; height: 1px; padding-top: 1076px; margin-left: 493px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1797,7 +2061,7 @@ Processor</xhtml:div> </foreignObject> <text x="544" - y="840" + y="1080" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1807,7 +2071,7 @@ Processor</xhtml:div> </g> <rect x="492" - y="860" + y="1100" width="103" height="32" rx="4.8"
@@ -1828,7 +2092,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 101px; height: 1px; padding-top: 876px; margin-left: 493px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 101px; height: 1px; padding-top: 1116px; margin-left: 493px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); ">
@@ -1840,7 +2104,7 @@ Processor</xhtml:div> </foreignObject> <text x="544" - y="880" + y="1120" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px"
@@ -1849,14 +2113,14 @@ Processor</xhtml:div> </switch> </g> <path - d="M 311 909 L 628.38 909" + d="M 311 1149 L 628.38 1149" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path384" /> <path - d="M 633.63 909 L 626.63 912.5 L 628.38 909 L 626.63 905.5 Z" + d="M 633.63 1149 L 626.63 1152.5 L 628.38 1149 L 626.63 1145.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
@@ -1874,7 +2138,7 @@ Processor</xhtml:div> height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"> <xhtml:div - style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 900px; margin-left: 357px;"> + style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 1140px; margin-left: 357px;"> <xhtml:div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); ">
@@ -1885,7 +2149,7 @@ Processor</xhtml:div> </foreignObject> <text x="357" - y="903" + y="1143" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px"
@@ -1894,14 +2158,14 @@ Processor</xhtml:div> </switch> </g> <path - d="M 482 632.91 L 315.37 632.91" + d="M 482 872.91 L 315.37 872.91" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke" id="path394" /> <path - d="M 310.12 632.91 L 317.12 629.41 L 315.37 632.91 L 317.12 636.41 Z" + d="M 310.12 872.91 L 317.12 869.41 L 315.37 872.91 L 317.12 876.41 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"
doc/board/ti/img/resume_diagram_k3.svg new file +1638 -0
1,638 lines not on this page · raw message
doc/board/ti/j7200_evm.rst +14 -0
@@ -40,6 +40,20 @@ Below is the pictorial representation of boot flow: - Here DMSC acts as master and provides all the critical services. R5/A72 requests DMSC to get these services done as shown in the above diagram. +Resume Flow: +------------ +Below is the pictorial representation of resume flow: + +.. image:: img/resume_diagram_k3.svg + :alt: Resume flow diagram + +**Disclaimer:** + +*There's a potential attack vector in this sequence, because OPTEE could +be modified before being reloaded.* +*Also, if the certificate replay is skipped, then TFA can be read from +MSMC.* + Sources: --------
doc/board/ti/j721s2_evm.rst +14 -0
@@ -53,6 +53,20 @@ Below is the pictorial representation of boot flow: the C7x (Aux core) software components request TIFS/DM to handle security or device management services. +Resume Flow: +------------ +Below is the pictorial representation of resume flow: + +.. image:: img/resume_diagram_k3.svg + :alt: Resume flow diagram + +**Disclaimer:** + +*There's a potential attack vector in this sequence, because OPTEE could +be modified before being reloaded.* +*Also, if the certificate replay is skipped, then TFA can be read from +MSMC.* + Sources: --------
doc/board/ti/j722s_evm.rst +14 -0
@@ -38,6 +38,20 @@ family. Below is the pictorial representation: - Here TIFS acts as master and provides all the critical services. R5/A53 requests TIFS to get these services done as shown in the above diagram. +Resume Flow: +------------ +Below is the pictorial representation of resume flow: + +.. image:: img/resume_diagram_k3.svg + :alt: Resume flow diagram + +**Disclaimer:** + +*There's a potential attack vector in this sequence, because OPTEE could +be modified before being reloaded.* +*Also, if the certificate replay is skipped, then TFA can be read from +MSMC.* + Sources: --------
doc/board/ti/j784s4_evm.rst +14 -0
@@ -58,6 +58,20 @@ Below is the pictorial representation of boot flow: the C7x (Aux core) software components request TIFS/DM to handle security or device management services. +Resume Flow: +------------ +Below is the pictorial representation of resume flow: + +.. image:: img/resume_diagram_k3.svg + :alt: Resume flow diagram + +**Disclaimer:** + +*There's a potential attack vector in this sequence, because OPTEE could +be modified before being reloaded.* +*Also, if the certificate replay is skipped, then TFA can be read from +MSMC.* + Sources -------
Quoted 46 lines · Richard Genoud (TI)
This series allows J7200/J721s2/J784s4/J722s to resume from suspend.
On those SoCs, a magic value is set in a PMIC register by the DM firmware just before suspend, then everything but the PMIC and DDR is powered off.
At resume/boot time, the magic value has to be read back by U-Boot SPL in order to know if we are indeed in a resume situation.
That's the purpose ofj7xx_board_is_resuming()introduced here.Then, if the SoC is resuming, the DDR has to be brought out of retention, at full speed and get out of low power mode. Between those steps, the
DDR_RETpin has to be de-asserted. But theDDR_RETpins of all DDR chips are tied together on a single GPIO, so it's impossible to resume one DDR chip after the other, they must be all resumed at once.
That's why it's orchestrated fromboard_init_f()and not in the k3ddrss driver.Once the DDR is fully functional, the next steps are:
- retrieve the LPM memory region from DTS
- authenticate certificates from LPM memory region and apply firewalls
- ask TIFS to restore TFA and its own minimal context
- start TFA on remote proc
- load and jump to DMDisclaimer:
---------
There's a potential attack vector in this sequence, because OPTEE could be modified before being reloaded.
Also, if the certificate replay is skipped, then TFA can be read from MSMC.Patches 1-3 add LPM helpers for all SoCs
Patch 4 adds the resume detection for all SoCs
Patch 5 adds common code for DDR retention pin
Patch 6 enables GTC at resume
Patch 7 detects IO+DDR resume state for j7200/j784s4
Patch 8 stores the wakeup reason inMCU_PSRAM0_RAMfor j7200/j784s4 Patch 9 sets the PMIC NSLEEP triggers
Patches 10-12 add the DDR resume sequence for all SoCs Patches 13-16 add the resume flow for all SoCs
Patch 17 updates the pm-cfg and schema to a new version
Patch 18 removes now unneeded background firewall on DDR for j7200/j784s4 Patch 19 extends the firewall for ATF region to TIFS
Patch 20 add the resume flow documentation
Quoted 6 lines
Tested on J722s HS-FS, J7200 GP, J784s4 GP, J721s2 GP
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#tisci-msg-min-context-restore
It needs
lpm_memory_regionsdescribed in DTS [updated to v6]:
https://lore.kernel.org/lkml/[email protected]/
Please let us know when this has landed in Linus' tree. I assume the dts stuff will need to be cherry-picked. Thanks!
Signature · 1 line
Tom