* [PATCH v2 00/22] am62: IO+DDR resume support
@ 2025-06-13 13:19 Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 01/22] arm: mach-k3: Remove CANUART IO isolation Markus Schneider-Pargmann
` (22 more replies)
0 siblings, 23 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
Hi,
this series introduces support to resume from IO+DDR. IO+DDR is a low
power mode of am62a and am62p in which nearly everything is powered off
except DDR which is in self-refresh and a few pins which detect
activity and can wakeup the system again.
On resume uboot SPL is loaded and checks if this is a IO+DDR resume. If
it is, the DDR initialization sequence in k3-ddrss differs slightly as
it has to get the DDR out of the self-refresh.
Afterward a specific address determined from DT is used to get the
metadata that stores relevant context addresses. The context is restored
using the tisci message TI_SCI_MSG_MIN_CONTEXT_RESTORE. At the end all
further initializations are skipped and uboot SPL directly jumps into
the DM resume address which takes care of the rest.
The devicetree R5F related patches were picked up from the devicetree
repository tag v6.16-rc1-dts and are required to find the correct
address of the metadata. I picked some additional patches to avoid
conflicts.
k3-ddrss is using absolute register accesses at the moment. I am trying
to submit syscon DT patches upstream to access these through syscon,
unfortunately there is ongoing discussion regarding syscon.
This series is based on next.
I tested this on am62a.
Best,
Markus
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
Changes in v2:
- Remove 'default n' from K3_IODDR
- Pick devicetree patches from upstream instead of mailinglist
- Link to v1: https://lore.kernel.org/r/20250311-topic-am62-ioddr-v2025-04-rc1-v1-0-666de9c105cb@baylibre.com
---
Devarsh Thakkar (3):
arm64: dts: ti: k3-am62a-wakeup: Add R5F device node
arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors
arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
Hari Nagalla (2):
arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node
arm64: dts: ti: k3-am62x-sk-common: Enable IPC with remote processors
Jai Luthra (1):
arm64: dts: ti: k3-am62a-main: Add C7xv device node
Judith Mendez (3):
arm64: dts: ti: k3-am62a7-sk: Enable PWM
arm64: dts: ti: k3-am6*: Add boot phase flag to support MMC boot
arm64: dts: ti: k3-am6*: Remove disable-wp for eMMC
Markus Schneider-Pargmann (13):
arm: mach-k3: Remove CANUART IO isolation
arm: mach-k3: Kconfig: Add symbols for IO+DDR Low Power Mode
ram: k3-ddrss: Add support for DDR in self-refresh
firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE
arm: mach-k3: common: Add CANUART wakeup check helpers
arm: mach-k3: common: Add lpm_resume_from_ddr
arm: mach-k3: common: Helper for LPM meta data address from DT
arm: mach-k3: am62a7_init: Resume on LPM exit
arm: mach-k3: am62p5_init: Resume on LPM exit
arm: dts: k3-am62a: Add r5 device nodes
arm: dts: k3-am62p: Add r5 device nodes
configs: am62ax_evm_r5: Enable IODDR resume support
configs: am62p_evm_r5_defconfig: Enable IODDR resume support
arch/arm/dts/k3-am62a7-sk-u-boot.dtsi | 16 ++
arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 20 +++
arch/arm/mach-k3/Kconfig | 8 +
arch/arm/mach-k3/am62ax/am62a7_init.c | 11 ++
arch/arm/mach-k3/am62px/am62p5_init.c | 12 ++
arch/arm/mach-k3/am62x/am625_init.c | 2 +
arch/arm/mach-k3/common.c | 162 ++++++++++++++++++++
arch/arm/mach-k3/common.h | 4 +
arch/arm/mach-k3/include/mach/hardware.h | 32 ++++
configs/am62ax_evm_r5_defconfig | 1 +
configs/am62px_evm_r5_defconfig | 1 +
drivers/firmware/ti_sci.c | 38 +++++
drivers/firmware/ti_sci.h | 14 ++
drivers/ram/k3-ddrss/k3-ddrss.c | 165 +++++++++++++++++++++
dts/upstream/src/arm64/ti/k3-am62-lp-sk.dts | 12 ++
dts/upstream/src/arm64/ti/k3-am62-phycore-som.dtsi | 1 -
dts/upstream/src/arm64/ti/k3-am625-beagleplay.dts | 1 -
dts/upstream/src/arm64/ti/k3-am62a-main.dtsi | 12 ++
dts/upstream/src/arm64/ti/k3-am62a-mcu.dtsi | 25 ++++
.../src/arm64/ti/k3-am62a-phycore-som.dtsi | 1 -
dts/upstream/src/arm64/ti/k3-am62a-wakeup.dtsi | 25 ++++
dts/upstream/src/arm64/ti/k3-am62a7-sk.dts | 139 ++++++++++++++++-
dts/upstream/src/arm64/ti/k3-am62p5-sk.dts | 51 ++++++-
dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi | 35 ++++-
dts/upstream/src/arm64/ti/k3-am642-evm.dts | 1 -
dts/upstream/src/arm64/ti/k3-am654-base-board.dts | 1 -
.../ti/k3-am6548-iot2050-advanced-common.dtsi | 1 -
dts/upstream/src/arm64/ti/k3-am69-sk.dts | 1 -
include/linux/soc/ti/ti_sci_protocol.h | 9 ++
29 files changed, 774 insertions(+), 27 deletions(-)
---
base-commit: 548d997229b7929bd7f0782415952d5a85eb7e64
change-id: 20250306-topic-am62-ioddr-v2025-04-rc1-0b3a0ffe92b1
Best regards,
--
Markus Schneider-Pargmann <msp@baylibre.com>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v2 01/22] arm: mach-k3: Remove CANUART IO isolation
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 02/22] arm: mach-k3: Kconfig: Add symbols for IO+DDR Low Power Mode Markus Schneider-Pargmann
` (21 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
After leaving the Partial-IO mode or other deep sleep states, the IO
isolation needs to be removed. This routine is shared by at least am62,
am62a and am62p.
The original function for testing was developed by
Akashdeep Kaur <a-kaur@ti.com>
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/am62ax/am62a7_init.c | 2 ++
arch/arm/mach-k3/am62px/am62p5_init.c | 2 ++
arch/arm/mach-k3/am62x/am625_init.c | 2 ++
arch/arm/mach-k3/common.c | 56 ++++++++++++++++++++++++++++++++
arch/arm/mach-k3/common.h | 1 +
arch/arm/mach-k3/include/mach/hardware.h | 29 +++++++++++++++++
6 files changed, 92 insertions(+)
diff --git a/arch/arm/mach-k3/am62ax/am62a7_init.c b/arch/arm/mach-k3/am62ax/am62a7_init.c
index edd43a1d78daa600969f468cf3fbdbd0bc6892a0..d50de75ff669938c0803c0622d040fc1e5d0cf4c 100644
--- a/arch/arm/mach-k3/am62ax/am62a7_init.c
+++ b/arch/arm/mach-k3/am62ax/am62a7_init.c
@@ -102,6 +102,8 @@ void board_init_f(ulong dummy)
/* Init DM early */
spl_early_init();
+ wkup_ctrl_remove_can_io_isolation_if_set();
+
/*
* Process pinctrl for the serial0 and serial3, aka WKUP_UART0 and
* MAIN_UART1 modules and continue regardless of the result of pinctrl.
diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c
index 6e3c66e5107a2674ba8781272df8cf5f05338986..357012b3e52b4a381fb8592c7afb624d01583776 100644
--- a/arch/arm/mach-k3/am62px/am62p5_init.c
+++ b/arch/arm/mach-k3/am62px/am62p5_init.c
@@ -160,6 +160,8 @@ void board_init_f(ulong dummy)
if (ret)
panic("spl_early_init() failed: %d\n", ret);
+ wkup_ctrl_remove_can_io_isolation_if_set();
+
/*
* Process pinctrl for the serial0 and serial3, aka WKUP_UART0 and
* MAIN_UART1 modules and continue regardless of the result of pinctrl.
diff --git a/arch/arm/mach-k3/am62x/am625_init.c b/arch/arm/mach-k3/am62x/am625_init.c
index a422919fab131a099b1f7786f2a84ca0a413dd38..9a5eb6e47249e18f7f4e3ded62d936490f2fec6d 100644
--- a/arch/arm/mach-k3/am62x/am625_init.c
+++ b/arch/arm/mach-k3/am62x/am625_init.c
@@ -201,6 +201,8 @@ void board_init_f(ulong dummy)
/* Init DM early */
spl_early_init();
+ wkup_ctrl_remove_can_io_isolation_if_set();
+
/*
* Process pinctrl for the serial0 and serial3, aka WKUP_UART0 and
* MAIN_UART1 modules and continue regardless of the result of pinctrl.
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 0323001d6d3746801b2c379a849c7b2e0d5b977a..517065bd3a18a5d28270e9cf2f552afa8acb1ed6 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -30,6 +30,9 @@
#include <soc.h>
#include <dm/uclass-internal.h>
#include <dm/device-internal.h>
+#include <wait_bit.h>
+
+#define CLKSTOP_TRANSITION_TIMEOUT_MS 10
#include <asm/arch/k3-qos.h>
@@ -78,6 +81,59 @@ void mmr_unlock(uintptr_t base, u32 partition)
writel(CTRLMMR_LOCK_KICK1_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK1);
}
+static void wkup_ctrl_remove_can_io_isolation(void)
+{
+ const void *wait_reg = (const void *)(WKUP_CTRL_MMR0_BASE +
+ WKUP_CTRL_MMR_CANUART_WAKE_STAT1);
+ int ret;
+ u32 reg = 0;
+
+ /* Program magic word */
+ reg = readl(WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_CTRL);
+ reg |= WKUP_CTRL_MMR_CANUART_WAKE_CTRL_MW << WKUP_CTRL_MMR_CANUART_WAKE_CTRL_MW_SHIFT;
+ writel(reg, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_CTRL);
+
+ /* Set enable bit. */
+ reg |= WKUP_CTRL_MMR_CANUART_WAKE_CTRL_MW_LOAD_EN;
+ writel(reg, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_CTRL);
+
+ /* Clear enable bit. */
+ reg &= ~WKUP_CTRL_MMR_CANUART_WAKE_CTRL_MW_LOAD_EN;
+ writel(reg, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_CTRL);
+
+ /* wait for CAN_ONLY_IO signal to be 0 */
+ ret = wait_for_bit_32(wait_reg,
+ WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE,
+ false,
+ CLKSTOP_TRANSITION_TIMEOUT_MS,
+ false);
+ if (ret < 0)
+ return;
+
+ /* Reset magic word */
+ writel(0, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_CTRL);
+
+ /* Remove WKUP IO isolation */
+ reg = readl(WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_PMCTRL_IO_0);
+ reg = reg & WKUP_CTRL_MMR_PMCTRL_IO_0_WRITE_MASK & ~WKUP_CTRL_MMR_PMCTRL_IO_0_GLOBAL_WUEN_0;
+ writel(reg, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_PMCTRL_IO_0);
+
+ /* clear global IO isolation */
+ reg = readl(WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_PMCTRL_IO_0);
+ reg = reg & WKUP_CTRL_MMR_PMCTRL_IO_0_WRITE_MASK & ~WKUP_CTRL_MMR_PMCTRL_IO_0_IO_ISO_CTRL_0;
+ writel(reg, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_PMCTRL_IO_0);
+
+ writel(0, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_DEEPSLEEP_CTRL);
+ writel(0, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_PMCTRL_IO_GLB);
+}
+
+void wkup_ctrl_remove_can_io_isolation_if_set(void)
+{
+ if (readl(WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_STAT1) &
+ WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE)
+ wkup_ctrl_remove_can_io_isolation();
+}
+
bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data)
{
if (strncmp(data->header, K3_ROM_BOOT_HEADER_MAGIC, 7))
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index 02c74731feab84bd0b14375c30538bb7963e8d51..390a6fd41f6a30c9e7837342deb000d308fd802d 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -49,6 +49,7 @@ enum k3_device_type get_device_type(void);
struct ti_sci_handle *get_ti_sci_handle(void);
void do_board_detect(void);
void ti_secure_image_check_binary(void **p_image, size_t *p_size);
+void wkup_ctrl_remove_can_io_isolation_if_set(void);
#if (IS_ENABLED(CONFIG_K3_QOS))
void setup_qos(void);
diff --git a/arch/arm/mach-k3/include/mach/hardware.h b/arch/arm/mach-k3/include/mach/hardware.h
index 81b5f1fa45ea30456a43c6640aad01388ea6a3f2..d7c759420524faf48ea26c66607c6a899d1321b3 100644
--- a/arch/arm/mach-k3/include/mach/hardware.h
+++ b/arch/arm/mach-k3/include/mach/hardware.h
@@ -117,6 +117,35 @@ K3_SOC_ID(j722s, J722S)
#define CTRLMMR_LOCK_KICK1 0x100c
#define CTRLMMR_LOCK_KICK1_UNLOCK_VAL 0xd172bc5a
+/*
+ * Shared WKUP_CTRL_MMR0 definitions used to remove IO isolation
+ */
+#define WKUP_CTRL_MMR_CANUART_WAKE_CTRL 0x18300
+#define WKUP_CTRL_MMR_CANUART_WAKE_CTRL_MW 0x2aaaaaaa
+#define WKUP_CTRL_MMR_CANUART_WAKE_CTRL_MW_SHIFT 1
+#define WKUP_CTRL_MMR_CANUART_WAKE_CTRL_MW_LOAD_EN BIT(0)
+
+#define WKUP_CTRL_MMR_CANUART_WAKE_STAT1 0x1830c
+#define WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE BIT(0)
+
+#define WKUP_CTRL_MMR_PMCTRL_IO_0 0x18084
+#define WKUP_CTRL_MMR_PMCTRL_IO_0_ISOCLK_OVRD_0 BIT(0)
+#define WKUP_CTRL_MMR_PMCTRL_IO_0_ISOOVR_EXTEND_0 BIT(4)
+#define WKUP_CTRL_MMR_PMCTRL_IO_0_ISO_BYPASS_OVR_0 BIT(6)
+#define WKUP_CTRL_MMR_PMCTRL_IO_0_WUCLK_CTRL_0 BIT(8)
+#define WKUP_CTRL_MMR_PMCTRL_IO_0_GLOBAL_WUEN_0 BIT(16)
+#define WKUP_CTRL_MMR_PMCTRL_IO_0_IO_ISO_CTRL_0 BIT(24)
+#define WKUP_CTRL_MMR_PMCTRL_IO_0_WRITE_MASK ( \
+ WKUP_CTRL_MMR_PMCTRL_IO_0_ISOCLK_OVRD_0 | \
+ WKUP_CTRL_MMR_PMCTRL_IO_0_ISOOVR_EXTEND_0 | \
+ WKUP_CTRL_MMR_PMCTRL_IO_0_ISO_BYPASS_OVR_0 | \
+ WKUP_CTRL_MMR_PMCTRL_IO_0_WUCLK_CTRL_0 | \
+ WKUP_CTRL_MMR_PMCTRL_IO_0_GLOBAL_WUEN_0 | \
+ WKUP_CTRL_MMR_PMCTRL_IO_0_IO_ISO_CTRL_0)
+
+#define WKUP_CTRL_MMR_PMCTRL_IO_GLB 0x1809c
+#define WKUP_CTRL_MMR_DEEPSLEEP_CTRL 0x18160
+
#define K3_ROM_BOOT_HEADER_MAGIC "EXTBOOT"
struct rom_extended_boot_data {
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 02/22] arm: mach-k3: Kconfig: Add symbols for IO+DDR Low Power Mode
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 01/22] arm: mach-k3: Remove CANUART IO isolation Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 03/22] ram: k3-ddrss: Add support for DDR in self-refresh Markus Schneider-Pargmann
` (20 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
There is one new symbol to enable support to resume from IO+DDR where
the SoC is turned off and DDR is in self-refresh.
The other symbol is the address of a memory region to be used to store
meta data. This has to be the same address as is used by the firmware.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/Kconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index 1b8c0b1eb968f0414107c0bf3142f744ce8364c8..4b7cef64935c7b403051c080eba7bdb48f727bf1 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -148,6 +148,14 @@ config K3_DM_FW
bootloader, it makes RM and PM services not being available
during R5 SPL execution time.
+config K3_IODDR
+ bool "Enable IO+DDR Low Power Mode support"
+ depends on SPL && (SOC_K3_AM62A7 || SOC_K3_AM62P5)
+ help
+ Enable support for IO+DDR Low Power Mode. If this is enabled and a
+ resume from IO+DDR is detected, metadata in the DDR is used to
+ restore TIFS and resume DM.
+
config K3_X509_SWRV
int "SWRV for X509 certificate used for boot images"
default 1
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 03/22] ram: k3-ddrss: Add support for DDR in self-refresh
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 01/22] arm: mach-k3: Remove CANUART IO isolation Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 02/22] arm: mach-k3: Kconfig: Add symbols for IO+DDR Low Power Mode Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-16 13:57 ` Bryan Brattlof
2025-06-13 13:19 ` [PATCH v2 04/22] firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE Markus Schneider-Pargmann
` (19 subsequent siblings)
22 siblings, 1 reply; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
In IO+DDR the DDR is kept in self-refresh while the SoC cores are
powered off completely. During boot the normal initialization routine of
DDR is slightly different to exit self-refresh and keep the DDR contents.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
| 165 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 165 insertions(+)
--git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index ff87faf6a22419e54d3639817ad2b884a97a3911..d7ae6e9ef24d5aebdb61656e6ca797b1799ca0f6 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -57,6 +57,16 @@
#define DDRSS_V2A_INT_SET_REG_ECC2BERR_EN BIT(4)
#define DDRSS_V2A_INT_SET_REG_ECCM1BERR_EN BIT(5)
+#define K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL 0x430080d0
+#define K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RET_LD BIT(31)
+#define K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RETENTION_MASK GENMASK(3, 0)
+
+#define K3_WKUP_CTRL_MMR_CANUART_WAKE_STAT1 0x430c
+#define K3_WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE BIT(0)
+
+#define K3_WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT 0x4318
+#define K3_WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT_MW 0x555555
+
#define SINGLE_DDR_SUBSYSTEM 0x1
#define MULTI_DDR_SUBSYSTEM 0x2
@@ -189,6 +199,32 @@ struct reginitdata {
#define DENALI_CTL_0_DRAM_CLASS_DDR4 0xA
#define DENALI_CTL_0_DRAM_CLASS_LPDDR4 0xB
+#define K3_DDRSS_CFG_DENALI_CTL_20 0x0050
+#define K3_DDRSS_CFG_DENALI_CTL_20_PHY_INDEP_TRAIN_MODE BIT(24)
+#define K3_DDRSS_CFG_DENALI_CTL_21 0x0054
+#define K3_DDRSS_CFG_DENALI_CTL_21_PHY_INDEP_INIT_MODE BIT(8)
+#define K3_DDRSS_CFG_DENALI_CTL_106 0x01a8
+#define K3_DDRSS_CFG_DENALI_CTL_106_PWRUP_SREFRESH_EXIT BIT(16)
+#define K3_DDRSS_CFG_DENALI_CTL_160 0x0280
+#define K3_DDRSS_CFG_DENALI_CTL_160_LP_CMD_MASK GENMASK(14, 8)
+#define K3_DDRSS_CFG_DENALI_CTL_160_LP_CMD_ENTRY BIT(9)
+#define K3_DDRSS_CFG_DENALI_CTL_169 0x02a4
+#define K3_DDRSS_CFG_DENALI_CTL_169_LP_AUTO_EXIT_EN_MASK GENMASK(27, 24)
+#define K3_DDRSS_CFG_DENALI_CTL_169_LP_AUTO_ENTRY_EN_MASK GENMASK(19, 16)
+#define K3_DDRSS_CFG_DENALI_CTL_169_LP_STATE_MASK GENMASK(14, 8)
+#define K3_DDRSS_CFG_DENALI_CTL_169_LP_STATE_SHIFT 8
+#define K3_DDRSS_CFG_DENALI_CTL_345 0x0564
+#define K3_DDRSS_CFG_DENALI_CTL_345_INT_STATUS_LOWPOWER_SHIFT 16
+#define K3_DDRSS_CFG_DENALI_CTL_353 0x0584
+#define K3_DDRSS_CFG_DENALI_CTL_353_INT_ACK_LOWPOWER_SHIFT 16
+#define K3_DDRSS_CFG_DENALI_PI_6 0x2018
+#define K3_DDRSS_CFG_DENALI_PI_6_PI_DFI_PHYMSTR_STATE_SEL_R BIT(8)
+#define K3_DDRSS_CFG_DENALI_PI_146 0x2248
+#define K3_DDRSS_CFG_DENALI_PI_150 0x2258
+#define K3_DDRSS_CFG_DENALI_PI_150_PI_DRAM_INIT_EN BIT(8)
+#define K3_DDRSS_CFG_DENALI_PHY_1820 0x5C70
+#define K3_DDRSS_CFG_DENALI_PHY_1820_SET_DFI_INPUT_2_SHIFT 16
+
#define TH_OFFSET_FROM_REG(REG, SHIFT, offset) do {\
char *i, *pstr = xstr(REG); offset = 0;\
for (i = &pstr[SHIFT]; *i != '\0'; ++i) {\
@@ -775,10 +811,125 @@ static void k3_ddrss_lpddr4_ecc_init(struct k3_ddrss_desc *ddrss)
writel(val, base + DDRSS_ECC_CTRL_REG);
}
+static void k3_ddrss_reg_update_bits(void __iomem *addr, u32 offset, u32 mask, u32 set)
+{
+ u32 val = readl(addr + offset);
+
+ val &= ~mask;
+ val |= set;
+ writel(val, addr + offset);
+}
+
+static void k3_ddrss_self_refresh_exit(struct k3_ddrss_desc *ddrss)
+{
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_CTL_169,
+ K3_DDRSS_CFG_DENALI_CTL_169_LP_AUTO_EXIT_EN_MASK |
+ K3_DDRSS_CFG_DENALI_CTL_169_LP_AUTO_ENTRY_EN_MASK,
+ 0x0);
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_PHY_1820,
+ 0,
+ BIT(2) << K3_DDRSS_CFG_DENALI_PHY_1820_SET_DFI_INPUT_2_SHIFT);
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_CTL_106,
+ 0,
+ K3_DDRSS_CFG_DENALI_CTL_106_PWRUP_SREFRESH_EXIT);
+ writel(0, ddrss->ddrss_ctl_cfg + K3_DDRSS_CFG_DENALI_PI_146);
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_PI_150,
+ K3_DDRSS_CFG_DENALI_PI_150_PI_DRAM_INIT_EN,
+ 0x0);
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_PI_6,
+ 0,
+ K3_DDRSS_CFG_DENALI_PI_6_PI_DFI_PHYMSTR_STATE_SEL_R);
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_CTL_21,
+ K3_DDRSS_CFG_DENALI_CTL_21_PHY_INDEP_INIT_MODE,
+ 0);
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_CTL_20,
+ 0,
+ K3_DDRSS_CFG_DENALI_CTL_20_PHY_INDEP_TRAIN_MODE);
+}
+
+static void k3_ddrss_lpm_resume(struct k3_ddrss_desc *ddrss)
+{
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_CTL_160,
+ K3_DDRSS_CFG_DENALI_CTL_160_LP_CMD_MASK,
+ K3_DDRSS_CFG_DENALI_CTL_160_LP_CMD_ENTRY);
+ while (!(readl(ddrss->ddrss_ctl_cfg + K3_DDRSS_CFG_DENALI_CTL_345) &
+ (1 << K3_DDRSS_CFG_DENALI_CTL_345_INT_STATUS_LOWPOWER_SHIFT)))
+ ;
+
+ k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
+ K3_DDRSS_CFG_DENALI_CTL_353,
+ 0,
+ 1 << K3_DDRSS_CFG_DENALI_CTL_353_INT_ACK_LOWPOWER_SHIFT);
+ while ((readl(ddrss->ddrss_ctl_cfg + K3_DDRSS_CFG_DENALI_CTL_169) &
+ K3_DDRSS_CFG_DENALI_CTL_169_LP_STATE_MASK) !=
+ 0x40 << K3_DDRSS_CFG_DENALI_CTL_169_LP_STATE_SHIFT)
+ ;
+}
+
+static void k3_ddrss_deassert_retention(struct k3_ddrss_desc *ddrss)
+{
+ k3_ddrss_reg_update_bits((void *)K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL,
+ 0x0,
+ K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RET_LD |
+ K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RETENTION_MASK,
+ 0);
+ k3_ddrss_reg_update_bits((void *)K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL,
+ 0x0,
+ K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RET_LD,
+ K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RET_LD);
+
+ while (true) {
+ u32 val;
+
+ val = readl((void *)K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL);
+ if (val & K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RET_LD)
+ break;
+ }
+
+ k3_ddrss_reg_update_bits((void *)K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL,
+ 0x0,
+ K3_WKUP_CTRL_MMR0_DDR16SS_PMCTRL_DATA_RET_LD,
+ 0);
+}
+
+static bool k3_ddrss_wkup_conf_canuart_wakeup_active(struct k3_ddrss_desc *ddrss)
+{
+ u32 active;
+
+ active = readl(ddrss->ddrss_ctrl_mmr + K3_WKUP_CTRL_MMR_CANUART_WAKE_STAT1);
+
+ return !!(active & K3_WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE);
+}
+
+static bool k3_ddrss_wkup_conf_canuart_magic_word_set(struct k3_ddrss_desc *ddrss)
+{
+ u32 magic_word;
+
+ magic_word = readl(ddrss->ddrss_ctrl_mmr + K3_WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT);
+
+ return magic_word == K3_WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT_MW;
+}
+
+static bool k3_ddrss_wkup_conf_boot_is_resume(struct k3_ddrss_desc *ddrss)
+{
+ return IS_ENABLED(CONFIG_K3_IODDR) &&
+ k3_ddrss_wkup_conf_canuart_wakeup_active(ddrss) &&
+ k3_ddrss_wkup_conf_canuart_magic_word_set(ddrss);
+}
+
static int k3_ddrss_probe(struct udevice *dev)
{
int ret;
struct k3_ddrss_desc *ddrss = dev_get_priv(dev);
+ bool is_lpm_resume;
debug("%s(dev=%p)\n", __func__, dev);
@@ -786,6 +937,11 @@ static int k3_ddrss_probe(struct udevice *dev)
if (ret)
return ret;
+ is_lpm_resume = k3_ddrss_wkup_conf_boot_is_resume(ddrss);
+
+ if (is_lpm_resume)
+ dev_info(dev, "Detected IO+DDR resume\n");
+
ddrss->dev = dev;
ret = k3_ddrss_power_on(ddrss);
if (ret)
@@ -801,12 +957,21 @@ static int k3_ddrss_probe(struct udevice *dev)
k3_lpddr4_init(ddrss);
k3_lpddr4_hardware_reg_init(ddrss);
+ if (is_lpm_resume)
+ k3_ddrss_self_refresh_exit(ddrss);
+
ret = k3_ddrss_init_freq(ddrss);
if (ret)
return ret;
+ if (is_lpm_resume)
+ k3_ddrss_deassert_retention(ddrss);
+
k3_lpddr4_start(ddrss);
+ if (is_lpm_resume)
+ k3_ddrss_lpm_resume(ddrss);
+
if (IS_ENABLED(CONFIG_K3_INLINE_ECC)) {
if (!ddrss->ddrss_ss_cfg) {
printf("%s: ss_cfg is required if ecc is enabled but not provided.",
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 04/22] firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (2 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 03/22] ram: k3-ddrss: Add support for DDR in self-refresh Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 05/22] arm: mach-k3: common: Add CANUART wakeup check helpers Markus Schneider-Pargmann
` (18 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
This patch adds code to be able to call TI_SCI_MSG_MIN_CONTEXT_RESTORE.
The context needs to be restored after booting SPL when resuming from
IO+DDR.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
drivers/firmware/ti_sci.c | 38 ++++++++++++++++++++++++++++++++++
drivers/firmware/ti_sci.h | 14 +++++++++++++
include/linux/soc/ti/ti_sci_protocol.h | 9 ++++++++
3 files changed, 61 insertions(+)
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 344df9454b3b604afe678d96a4eae178955324fe..9ae49ab850bbfb4785f446f45cad34fff4cc7cdc 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -2613,6 +2613,41 @@ static int ti_sci_cmd_change_fwl_owner(const struct ti_sci_handle *handle,
return ret;
}
+static int ti_sci_cmd_restore_context(const struct ti_sci_handle *handle, u64 ctx_addr)
+{
+ struct ti_sci_msg_min_restore_context_req req;
+ struct ti_sci_msg_hdr *resp;
+ struct ti_sci_info *info;
+ struct ti_sci_xfer *xfer;
+ int ret = 0;
+
+ if (IS_ERR(handle))
+ return PTR_ERR(handle);
+ if (!handle)
+ return -EINVAL;
+
+ info = handle_to_ti_sci_info(handle);
+
+ xfer = ti_sci_setup_one_xfer(info, TI_SCI_MSG_MIN_CONTEXT_RESTORE,
+ TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+ (u32 *)&req, sizeof(req), sizeof(*resp));
+ if (IS_ERR(xfer)) {
+ ret = PTR_ERR(xfer);
+ return ret;
+ }
+
+ req.ctx_lo = (u32)(ctx_addr & 0xffffffff);
+ req.ctx_hi = (u32)(ctx_addr >> 32);
+
+ ret = ti_sci_do_xfer(info, xfer);
+ if (ret) {
+ dev_err(info->dev, "Failed restoring context %d\n", ret);
+ return ret;
+ }
+
+ return ret;
+}
+
/*
* ti_sci_setup_ops() - Setup the operations structures
* @info: pointer to TISCI pointer
@@ -2630,6 +2665,7 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
struct ti_sci_rm_psil_ops *psilops = &ops->rm_psil_ops;
struct ti_sci_rm_udmap_ops *udmap_ops = &ops->rm_udmap_ops;
struct ti_sci_fwl_ops *fwl_ops = &ops->fwl_ops;
+ struct ti_sci_lpm_ops *lpm_ops = &ops->lpm_ops;
bops->board_config = ti_sci_cmd_set_board_config;
bops->board_config_rm = ti_sci_cmd_set_board_config_rm;
@@ -2694,6 +2730,8 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
fwl_ops->set_fwl_region = ti_sci_cmd_set_fwl_region;
fwl_ops->get_fwl_region = ti_sci_cmd_get_fwl_region;
fwl_ops->change_fwl_owner = ti_sci_cmd_change_fwl_owner;
+
+ lpm_ops->restore_context = ti_sci_cmd_restore_context;
}
/**
diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
index bb8bc7beeadbed5415eb4450735d488de019e9af..e8fdc652b855e9057b734c3e4f526e380d0b78bd 100644
--- a/drivers/firmware/ti_sci.h
+++ b/drivers/firmware/ti_sci.h
@@ -43,6 +43,9 @@
#define TI_SCI_MSG_QUERY_CLOCK_FREQ 0x010d
#define TI_SCI_MSG_GET_CLOCK_FREQ 0x010e
+/* Low Power Mode Requests */
+#define TI_SCI_MSG_MIN_CONTEXT_RESTORE 0x0308
+
/* Processor Control Messages */
#define TISCI_MSG_PROC_REQUEST 0xc000
#define TISCI_MSG_PROC_RELEASE 0xc001
@@ -1530,4 +1533,15 @@ struct ti_sci_msg_fwl_change_owner_info_resp {
u16 owner_permission_bits;
} __packed;
+/**
+ * struct ti_sci_msg_min_restore_context_req - Request to restore context from DDR
+ *
+ * @hdr: Generic Header
+ */
+struct ti_sci_msg_min_restore_context_req {
+ struct ti_sci_msg_hdr hdr;
+ u32 ctx_lo;
+ u32 ctx_hi;
+} __packed;
+
#endif /* __TI_SCI_H */
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index aa4d105ee988e9e14b5f5028733fe84cf2fc3a98..ce1c8a29cc1eccd90f19dc3c593986b68eac22f1 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -594,6 +594,14 @@ struct ti_sci_fwl_ops {
int (*change_fwl_owner)(const struct ti_sci_handle *handle, struct ti_sci_msg_fwl_owner *owner);
};
+/**
+ * struct ti_sci_lpm_ops - Low Power Mode operations
+ * @restore_context: Request restoring context from DDR.
+ */
+struct ti_sci_lpm_ops {
+ int (*restore_context)(const struct ti_sci_handle *handle, u64 ctx_addr);
+};
+
/**
* struct ti_sci_ops - Function support for TI SCI
* @board_ops: Miscellaneous operations
@@ -615,6 +623,7 @@ struct ti_sci_ops {
struct ti_sci_rm_psil_ops rm_psil_ops;
struct ti_sci_rm_udmap_ops rm_udmap_ops;
struct ti_sci_fwl_ops fwl_ops;
+ struct ti_sci_lpm_ops lpm_ops;
};
/**
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 05/22] arm: mach-k3: common: Add CANUART wakeup check helpers
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (3 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 04/22] firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 06/22] arm: mach-k3: common: Add lpm_resume_from_ddr Markus Schneider-Pargmann
` (17 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
Add dedicated helper functions to check CANUART wake registers and magic
word. This helps determining if we are in a wakeup or if CAN IO
isolation has to be removed.
Also add a helper to detect a low power mode exit/resume.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/common.c | 22 ++++++++++++++++++++--
arch/arm/mach-k3/common.h | 1 +
arch/arm/mach-k3/include/mach/hardware.h | 3 +++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 517065bd3a18a5d28270e9cf2f552afa8acb1ed6..9ee47732929dd08f77aefb2f0d65ac93c79d25a2 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -127,13 +127,31 @@ static void wkup_ctrl_remove_can_io_isolation(void)
writel(0, WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_PMCTRL_IO_GLB);
}
+static bool wkup_ctrl_canuart_wakeup_active(void)
+{
+ return !!(readl(WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_STAT1) &
+ WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE);
+}
+
+static bool wkup_ctrl_canuart_magic_word_set(void)
+{
+ return readl(WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT) ==
+ WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT_MW;
+}
+
void wkup_ctrl_remove_can_io_isolation_if_set(void)
{
- if (readl(WKUP_CTRL_MMR0_BASE + WKUP_CTRL_MMR_CANUART_WAKE_STAT1) &
- WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE)
+ if (wkup_ctrl_canuart_wakeup_active() && !wkup_ctrl_canuart_magic_word_set())
wkup_ctrl_remove_can_io_isolation();
}
+bool wkup_ctrl_is_lpm_exit(void)
+{
+ return IS_ENABLED(CONFIG_K3_IODDR) &&
+ wkup_ctrl_canuart_wakeup_active() &&
+ wkup_ctrl_canuart_magic_word_set();
+}
+
bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data)
{
if (strncmp(data->header, K3_ROM_BOOT_HEADER_MAGIC, 7))
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index 390a6fd41f6a30c9e7837342deb000d308fd802d..b3c1702b8125d0c8248ac15dee4387a807b516d6 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -50,6 +50,7 @@ struct ti_sci_handle *get_ti_sci_handle(void);
void do_board_detect(void);
void ti_secure_image_check_binary(void **p_image, size_t *p_size);
void wkup_ctrl_remove_can_io_isolation_if_set(void);
+bool wkup_ctrl_is_lpm_exit(void);
#if (IS_ENABLED(CONFIG_K3_QOS))
void setup_qos(void);
diff --git a/arch/arm/mach-k3/include/mach/hardware.h b/arch/arm/mach-k3/include/mach/hardware.h
index d7c759420524faf48ea26c66607c6a899d1321b3..e4e7dd61c0689db11083b81f2e74ba8bea74577e 100644
--- a/arch/arm/mach-k3/include/mach/hardware.h
+++ b/arch/arm/mach-k3/include/mach/hardware.h
@@ -128,6 +128,9 @@ K3_SOC_ID(j722s, J722S)
#define WKUP_CTRL_MMR_CANUART_WAKE_STAT1 0x1830c
#define WKUP_CTRL_MMR_CANUART_WAKE_STAT1_CANUART_IO_MODE BIT(0)
+#define WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT 0x18318
+#define WKUP_CTRL_MMR_CANUART_WAKE_OFF_MODE_STAT_MW 0x555555
+
#define WKUP_CTRL_MMR_PMCTRL_IO_0 0x18084
#define WKUP_CTRL_MMR_PMCTRL_IO_0_ISOCLK_OVRD_0 BIT(0)
#define WKUP_CTRL_MMR_PMCTRL_IO_0_ISOOVR_EXTEND_0 BIT(4)
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 06/22] arm: mach-k3: common: Add lpm_resume_from_ddr
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (4 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 05/22] arm: mach-k3: common: Add CANUART wakeup check helpers Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 07/22] arm: mach-k3: common: Helper for LPM meta data address from DT Markus Schneider-Pargmann
` (16 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
This is a common function that helps to resume from DDR. There are two
pointers which are fetched from DDR to resume, the TIFS context pointer
which points to the context in DDR. There is another pointer to the DM
loadaddr to jump back into DM.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/common.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-k3/common.h | 1 +
2 files changed, 46 insertions(+)
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 9ee47732929dd08f77aefb2f0d65ac93c79d25a2..c6b230ad46a891ff0250a2bc65af2aa72d09fbc9 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -152,6 +152,51 @@ bool wkup_ctrl_is_lpm_exit(void)
wkup_ctrl_canuart_magic_word_set();
}
+#if IS_ENABLED(CONFIG_K3_IODDR)
+static int lpm_restore_context(u64 ctx_addr)
+{
+ struct ti_sci_handle *ti_sci = get_ti_sci_handle();
+ int ret;
+
+ ret = ti_sci->ops.lpm_ops.restore_context(ti_sci, ctx_addr);
+ if (ret)
+ printf("Failed to restore context from DDR %d\n", ret);
+
+ return ret;
+}
+
+struct lpm_meta_data {
+ u64 dm_jump_address;
+ u64 tifs_context_save_address;
+ u64 reserved[30];
+} __packed__;
+
+void __noreturn lpm_resume_from_ddr(u64 meta_data_addr)
+{
+ struct lpm_meta_data *lpm_data = (struct lpm_meta_data *)meta_data_addr;
+ typedef void __noreturn (*image_entry_noargs_t)(void);
+ image_entry_noargs_t image_entry;
+ int ret;
+
+ ret = lpm_restore_context(lpm_data->tifs_context_save_address);
+ if (ret)
+ panic("Failed to restore context from 0x%p\n",
+ (void *)lpm_data->tifs_context_save_address);
+
+ image_entry = (image_entry_noargs_t)(u64 *)lpm_data->dm_jump_address;
+ printf("Resuming from DDR, jumping to stored DM loadaddr 0x%p, TIFS context restored from 0x%p\n",
+ image_entry, (void *)lpm_data->tifs_context_save_address);
+
+ image_entry();
+}
+#else
+
+void __noreturn lpm_resume_from_ddr(u64 meta_data_addr)
+{
+ panic("No IO+DDR support");
+}
+#endif
+
bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data)
{
if (strncmp(data->header, K3_ROM_BOOT_HEADER_MAGIC, 7))
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index b3c1702b8125d0c8248ac15dee4387a807b516d6..53a509f4ff5159b32d1c359ab458ec9a7aa07956 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -51,6 +51,7 @@ void do_board_detect(void);
void ti_secure_image_check_binary(void **p_image, size_t *p_size);
void wkup_ctrl_remove_can_io_isolation_if_set(void);
bool wkup_ctrl_is_lpm_exit(void);
+void lpm_resume_from_ddr(u64 meta_data_addr);
#if (IS_ENABLED(CONFIG_K3_QOS))
void setup_qos(void);
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 07/22] arm: mach-k3: common: Helper for LPM meta data address from DT
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (5 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 06/22] arm: mach-k3: common: Add lpm_resume_from_ddr Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 08/22] arm: mach-k3: am62a7_init: Resume on LPM exit Markus Schneider-Pargmann
` (15 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
Add a small helper that uses memory regions referenced by the R5
devicetree node to calculate the LPM meta data address.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/common.c | 43 +++++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-k3/common.h | 1 +
2 files changed, 44 insertions(+)
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index c6b230ad46a891ff0250a2bc65af2aa72d09fbc9..706dc9a300cd90dbd7b3da10e7bb0eee11ffea38 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -16,6 +16,8 @@
#include <linux/printk.h>
#include "common.h"
#include <dm.h>
+#include <dm/of_access.h>
+#include <dm/ofnode.h>
#include <remoteproc.h>
#include <asm/cache.h>
#include <linux/soc/ti/ti_sci_protocol.h>
@@ -33,6 +35,7 @@
#include <wait_bit.h>
#define CLKSTOP_TRANSITION_TIMEOUT_MS 10
+#define K3_R5_MEMREGION_LPM_METADATA_OFFSET 0x108000
#include <asm/arch/k3-qos.h>
@@ -153,6 +156,42 @@ bool wkup_ctrl_is_lpm_exit(void)
}
#if IS_ENABLED(CONFIG_K3_IODDR)
+int wkup_r5f_am62_lpm_meta_data_addr(u64 *meta_data_addr)
+{
+ struct ofnode_phandle_args memregion_phandle;
+ ofnode memregion;
+ ofnode wkup_bus;
+ int ret;
+
+ wkup_bus = ofnode_path("/bus@f0000/bus@b00000");
+ if (!ofnode_valid(wkup_bus)) {
+ printf("Failed to find wkup bus\n");
+ return -EINVAL;
+ }
+
+ memregion = ofnode_by_compatible(wkup_bus, "ti,am62-r5f");
+ if (!ofnode_valid(memregion)) {
+ printf("Failed to find r5f devicetree node ti,am62-r5f\n");
+ return -EINVAL;
+ }
+
+ ret = ofnode_parse_phandle_with_args(memregion, "memory-region", NULL,
+ 0, 1, &memregion_phandle);
+ if (ret) {
+ printf("Failed to parse phandle for second memory region\n");
+ return ret;
+ }
+
+ ret = ofnode_read_u64_index(memregion_phandle.node, "reg", 0, meta_data_addr);
+ if (ret) {
+ printf("Failed to read memory region offset\n");
+ return ret;
+ }
+
+ *meta_data_addr += K3_R5_MEMREGION_LPM_METADATA_OFFSET;
+
+ return 0;
+}
static int lpm_restore_context(u64 ctx_addr)
{
struct ti_sci_handle *ti_sci = get_ti_sci_handle();
@@ -190,6 +229,10 @@ void __noreturn lpm_resume_from_ddr(u64 meta_data_addr)
image_entry();
}
#else
+int wkup_r5f_am62_lpm_meta_data_addr(u64 *meta_data_addr)
+{
+ return -EINVAL;
+}
void __noreturn lpm_resume_from_ddr(u64 meta_data_addr)
{
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index 53a509f4ff5159b32d1c359ab458ec9a7aa07956..096b4859040c464394c0d4a543917b783ade1597 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -51,6 +51,7 @@ void do_board_detect(void);
void ti_secure_image_check_binary(void **p_image, size_t *p_size);
void wkup_ctrl_remove_can_io_isolation_if_set(void);
bool wkup_ctrl_is_lpm_exit(void);
+int wkup_r5f_am62_lpm_meta_data_addr(u64 *meta_data_addr);
void lpm_resume_from_ddr(u64 meta_data_addr);
#if (IS_ENABLED(CONFIG_K3_QOS))
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 08/22] arm: mach-k3: am62a7_init: Resume on LPM exit
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (6 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 07/22] arm: mach-k3: common: Helper for LPM meta data address from DT Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 09/22] arm: mach-k3: am62p5_init: " Markus Schneider-Pargmann
` (14 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
When exiting a low power mode with DDR self-refresh, we can directly
resume after DDR setup is done. Call the common function to resume.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/am62ax/am62a7_init.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/mach-k3/am62ax/am62a7_init.c b/arch/arm/mach-k3/am62ax/am62a7_init.c
index d50de75ff669938c0803c0622d040fc1e5d0cf4c..7f2e8265bc2af942edbfcb94b8149ec15862d41f 100644
--- a/arch/arm/mach-k3/am62ax/am62a7_init.c
+++ b/arch/arm/mach-k3/am62ax/am62a7_init.c
@@ -192,6 +192,15 @@ void board_init_f(ulong dummy)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret)
panic("DRAM init failed: %d\n", ret);
+
+ if (wkup_ctrl_is_lpm_exit()) {
+ u64 meta_data_addr;
+
+ ret = wkup_r5f_am62_lpm_meta_data_addr(&meta_data_addr);
+ if (ret)
+ panic("Failed to get LPM meta data address %d\n", ret);
+ lpm_resume_from_ddr(meta_data_addr);
+ }
#endif
spl_enable_cache();
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 09/22] arm: mach-k3: am62p5_init: Resume on LPM exit
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (7 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 08/22] arm: mach-k3: am62a7_init: Resume on LPM exit Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 10/22] arm64: dts: ti: k3-am62a7-sk: Enable PWM Markus Schneider-Pargmann
` (13 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
When exiting a low power mode with DDR self-refresh, we can directly
resume after DDR setup is done. Call the common function to resume.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c
index 357012b3e52b4a381fb8592c7afb624d01583776..8cb54fcb42003ecdd5dbe80fbd3e6a19ae668103 100644
--- a/arch/arm/mach-k3/am62px/am62p5_init.c
+++ b/arch/arm/mach-k3/am62px/am62p5_init.c
@@ -249,6 +249,16 @@ void board_init_f(ulong dummy)
spl_enable_cache();
setup_qos();
+
+ if (wkup_ctrl_is_lpm_exit()) {
+ u64 meta_data_addr;
+
+ ret = wkup_r5f_am62_lpm_meta_data_addr(&meta_data_addr);
+ if (ret)
+ panic("Failed to get LPM meta data address %d\n", ret);
+ lpm_resume_from_ddr(meta_data_addr);
+ }
+
debug("am62px_init: %s done\n", __func__);
fixup_a53_cpu_freq_by_speed_grade();
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 10/22] arm64: dts: ti: k3-am62a7-sk: Enable PWM
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (8 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 09/22] arm: mach-k3: am62p5_init: " Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 11/22] arm64: dts: ti: k3-am6*: Add boot phase flag to support MMC boot Markus Schneider-Pargmann
` (12 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Judith Mendez <jm@ti.com>
PWM signals can be routed to the user expansion header on am62a7
SK. Enable eCAP0, eCAP1, eHRPWM1, and route the output PWM signals
to pins on J3 header.
Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Link: https://lore.kernel.org/r/20250422000851.4118545-3-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: 5aec1169b53969d07cc288814f7eebd2ef01f9a0 ]
(cherry picked from commit 16c71470bff15f5ea677edebe3cba8a2504dc5e0)
---
dts/upstream/src/arm64/ti/k3-am62a7-sk.dts | 40 ++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
index 1c9d95696c839a51b607839abb9429a8de6fa620..a9557ee73b8311087db9ce9cd9596efb8bb8975d 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
@@ -383,6 +383,25 @@
AM62AX_IOPAD(0x07c, PIN_OUTPUT, 7) /* (M19) GPMC0_CLK.GPIO0_31 */
>;
};
+
+ main_ecap0_pins_default: main-ecap0-default-pins {
+ pinctrl-single,pins = <
+ AM62AX_IOPAD(0x01b8, PIN_OUTPUT, 3) /* (C16) SPI0_CS1.ECAP0_IN_APWM_OUT */
+ >;
+ };
+
+ main_ecap2_pins_default: main-ecap2-default-pins {
+ pinctrl-single,pins = <
+ AM62AX_IOPAD(0x01a4, PIN_OUTPUT, 2) /* (A19) MCASP0_ACLKX.ECAP2_IN_APWM_OUT */
+ >;
+ };
+
+ main_epwm1_pins_default: main-epwm1-default-pins {
+ pinctrl-single,pins = <
+ AM62AX_IOPAD(0x019c, PIN_OUTPUT, 6) /* (B18) MCASP0_AXR1.EHRPWM1_A */
+ AM62AX_IOPAD(0x01a0, PIN_OUTPUT, 6) /* (B20) MCASP0_AXR0.EHRPWM1_B */
+ >;
+ };
};
&mcu_pmx0 {
@@ -741,3 +760,24 @@
};
};
};
+
+&ecap0 {
+ /* P26 of J3 */
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_ecap0_pins_default>;
+ status = "okay";
+};
+
+&ecap2 {
+ /* P11 of J3 */
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_ecap2_pins_default>;
+ status = "okay";
+};
+
+&epwm1 {
+ /* P36/P33 of J3 */
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_epwm1_pins_default>;
+ status = "okay";
+};
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 11/22] arm64: dts: ti: k3-am6*: Add boot phase flag to support MMC boot
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (9 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 10/22] arm64: dts: ti: k3-am62a7-sk: Enable PWM Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 12/22] arm64: dts: ti: k3-am6*: Remove disable-wp for eMMC Markus Schneider-Pargmann
` (11 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Judith Mendez <jm@ti.com>
The bootph-all flag was introduced in dt-schema
(dtschema/schemas/bootph.yaml) to define node usage across
different boot phases.
For eMMC and SD boot modes, voltage regulator nodes, io-expander
nodes, gpio nodes, and MMC nodes need to be present in all boot
stages, so add missing bootph-all phase flag to these nodes to
support SD boot and eMMC boot.
Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Moteen Shah <m-shah@ti.com>
Link: https://lore.kernel.org/r/20250429151454.4160506-2-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: db3cd905b8c8cd40f15a34e30a225704bb8a2fcb ]
(cherry picked from commit efc9013586bda11485bbc190592bd25d83d0c1bc)
---
dts/upstream/src/arm64/ti/k3-am62-lp-sk.dts | 12 ++++++++++++
dts/upstream/src/arm64/ti/k3-am62a7-sk.dts | 2 ++
2 files changed, 14 insertions(+)
diff --git a/dts/upstream/src/arm64/ti/k3-am62-lp-sk.dts b/dts/upstream/src/arm64/ti/k3-am62-lp-sk.dts
index 8e9fc00a6b3c7459a360f9e1d6bbb60e68c460ab..aafdb90c0eb700b554c6c308be6c1732d0459a8c 100644
--- a/dts/upstream/src/arm64/ti/k3-am62-lp-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62-lp-sk.dts
@@ -69,6 +69,7 @@
gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
states = <1800000 0x0>,
<3300000 0x1>;
+ bootph-all;
};
};
@@ -77,12 +78,14 @@
pinctrl-single,pins = <
AM62X_IOPAD(0x07c, PIN_OUTPUT, 7) /* (M19) GPMC0_CLK.GPIO0_31 */
>;
+ bootph-all;
};
main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (C13) UART0_RTSn.GPIO1_23 */
>;
+ bootph-all;
};
pmic_irq_pins_default: pmic-irq-default-pins {
@@ -118,6 +121,7 @@
pinctrl-names = "default";
pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
+ bootph-all;
};
exp2: gpio@23 {
@@ -229,6 +233,14 @@
DVDD-supply = <&buck2_reg>;
};
+&main_gpio0 {
+ bootph-all;
+};
+
+&main_gpio1 {
+ bootph-all;
+};
+
&gpmc0 {
ranges = <0 0 0x00 0x51000000 0x01000000>; /* CS0 space. Min partition = 16MB */
};
diff --git a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
index a9557ee73b8311087db9ce9cd9596efb8bb8975d..22be41d46eb519917516fba5f2439bdb492c46f4 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
@@ -313,6 +313,7 @@
AM62AX_IOPAD(0x1fc, PIN_INPUT_PULLUP, 0) /* (AD2) MMC0_DAT6 */
AM62AX_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
>;
+ bootph-all;
};
main_mmc1_pins_default: main-mmc1-default-pins {
@@ -634,6 +635,7 @@
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
disable-wp;
+ bootph-all;
};
&sdhci1 {
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 12/22] arm64: dts: ti: k3-am6*: Remove disable-wp for eMMC
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (10 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 11/22] arm64: dts: ti: k3-am6*: Add boot phase flag to support MMC boot Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 13/22] arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node Markus Schneider-Pargmann
` (10 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Judith Mendez <jm@ti.com>
Remove disable-wp flag for eMMC nodes since this flag is
only applicable to SD according to the binding doc
(mmc/mmc-controller-common.yaml).
For eMMC, this flag should be ignored but lets remove
anyways to cleanup sdhci nodes.
Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Moteen Shah <m-shah@ti.com>
Link: https://lore.kernel.org/r/20250429151454.4160506-4-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: ef839ba8142f14513ba396a033110526b7008096 ]
(cherry picked from commit 9bd6216a75f9f2be497b6f66fcfcbd75b685e92a)
---
dts/upstream/src/arm64/ti/k3-am62-phycore-som.dtsi | 1 -
dts/upstream/src/arm64/ti/k3-am625-beagleplay.dts | 1 -
dts/upstream/src/arm64/ti/k3-am62a-phycore-som.dtsi | 1 -
dts/upstream/src/arm64/ti/k3-am62a7-sk.dts | 1 -
dts/upstream/src/arm64/ti/k3-am62p5-sk.dts | 1 -
dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi | 1 -
dts/upstream/src/arm64/ti/k3-am642-evm.dts | 1 -
dts/upstream/src/arm64/ti/k3-am654-base-board.dts | 1 -
dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi | 1 -
dts/upstream/src/arm64/ti/k3-am69-sk.dts | 1 -
10 files changed, 10 deletions(-)
diff --git a/dts/upstream/src/arm64/ti/k3-am62-phycore-som.dtsi b/dts/upstream/src/arm64/ti/k3-am62-phycore-som.dtsi
index 55ed418c023bc1f03a04514d12a0950ee9f498bb..e5be92aa121891d167a0e29713aca3434f32657c 100644
--- a/dts/upstream/src/arm64/ti/k3-am62-phycore-som.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am62-phycore-som.dtsi
@@ -381,7 +381,6 @@
&sdhci0 {
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
- disable-wp;
non-removable;
bootph-all;
status = "okay";
diff --git a/dts/upstream/src/arm64/ti/k3-am625-beagleplay.dts b/dts/upstream/src/arm64/ti/k3-am625-beagleplay.dts
index a5469f2712f0945d5717d9570767fedf2681013a..91c50ff8d5d0c2d188d68e8ccaeaf256a150b7ae 100644
--- a/dts/upstream/src/arm64/ti/k3-am625-beagleplay.dts
+++ b/dts/upstream/src/arm64/ti/k3-am625-beagleplay.dts
@@ -834,7 +834,6 @@
bootph-all;
pinctrl-names = "default";
pinctrl-0 = <&emmc_pins_default>;
- disable-wp;
status = "okay";
};
diff --git a/dts/upstream/src/arm64/ti/k3-am62a-phycore-som.dtsi b/dts/upstream/src/arm64/ti/k3-am62a-phycore-som.dtsi
index 147d56b879843ec832d0849e6ed877aa83a72229..0d4115590b9c3d2f92140521e99a6ff8440e398f 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a-phycore-som.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am62a-phycore-som.dtsi
@@ -338,7 +338,6 @@
&sdhci0 {
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
- disable-wp;
non-removable;
bootph-all;
status = "okay";
diff --git a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
index 22be41d46eb519917516fba5f2439bdb492c46f4..c65ada5a22abbd88a70e81703c28b7b83461c6c8 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
@@ -634,7 +634,6 @@
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
- disable-wp;
bootph-all;
};
diff --git a/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts b/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts
index d29f524600af017af607e2cb6122d3a581575ffc..7cc730e27ce69dc30feb97d68c9cec88b553a4bd 100644
--- a/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts
@@ -455,7 +455,6 @@
&sdhci0 {
status = "okay";
ti,driver-strength-ohm = <50>;
- disable-wp;
bootph-all;
};
diff --git a/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi b/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi
index d52cb2a5a589a8e5eb325fd90324d57ec1e3783b..17f97434b91ae8c9e46da872e0a08a60ec4fbc0c 100644
--- a/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi
@@ -436,7 +436,6 @@
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
- disable-wp;
};
&sdhci1 {
diff --git a/dts/upstream/src/arm64/ti/k3-am642-evm.dts b/dts/upstream/src/arm64/ti/k3-am642-evm.dts
index f8ec40523254ba1ee9b0bec7c00541dceef25526..5c6197ba842e4e1c604d3063d25b7f99c274057f 100644
--- a/dts/upstream/src/arm64/ti/k3-am642-evm.dts
+++ b/dts/upstream/src/arm64/ti/k3-am642-evm.dts
@@ -597,7 +597,6 @@
status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
- disable-wp;
bootph-all;
};
diff --git a/dts/upstream/src/arm64/ti/k3-am654-base-board.dts b/dts/upstream/src/arm64/ti/k3-am654-base-board.dts
index aa7139cc8a92b44fe94b556d392038edf6e9f35e..c30425960398ebb75ebda44726ed90cd78947d58 100644
--- a/dts/upstream/src/arm64/ti/k3-am654-base-board.dts
+++ b/dts/upstream/src/arm64/ti/k3-am654-base-board.dts
@@ -456,7 +456,6 @@
bus-width = <8>;
non-removable;
ti,driver-strength-ohm = <50>;
- disable-wp;
};
/*
diff --git a/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi b/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi
index ae842b85b70de0b0524e9429f4e1c338c5425d40..12af6cb7f65cfb5045e756080f3970971101f18e 100644
--- a/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am6548-iot2050-advanced-common.dtsi
@@ -50,5 +50,4 @@
bus-width = <8>;
non-removable;
ti,driver-strength-ohm = <50>;
- disable-wp;
};
diff --git a/dts/upstream/src/arm64/ti/k3-am69-sk.dts b/dts/upstream/src/arm64/ti/k3-am69-sk.dts
index b85227052f97eab2ac22e95d30ec3f6bfde85c0d..f28375629739cbb76567a805d9655a1cd19d4d83 100644
--- a/dts/upstream/src/arm64/ti/k3-am69-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am69-sk.dts
@@ -940,7 +940,6 @@
status = "okay";
non-removable;
ti,driver-strength-ohm = <50>;
- disable-wp;
};
&main_sdhci1 {
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 13/22] arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (11 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 12/22] arm64: dts: ti: k3-am6*: Remove disable-wp for eMMC Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 14/22] arm64: dts: ti: k3-am62a-wakeup: Add R5F device node Markus Schneider-Pargmann
` (9 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Hari Nagalla <hnagalla@ti.com>
AM62A SoCs have a single R5F core in the MCU voltage domain.
Add the R5FSS node with the child node for core0 in MCU voltage
domain .dtsi file.
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Tested-by: Daniel Schultz <d.schultz@phytec.de>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20250502220325.3230653-4-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: 7f321892dc53015e29cd1055231727b8cdc24923 ]
(cherry picked from commit 349f1d769bb67fda0271159557589c849c843b12)
---
dts/upstream/src/arm64/ti/k3-am62a-mcu.dtsi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dts/upstream/src/arm64/ti/k3-am62a-mcu.dtsi b/dts/upstream/src/arm64/ti/k3-am62a-mcu.dtsi
index 9ed9d703ff24d80171fdb29abbb0d5e3819c8a90..ee961ced7208f99acf239ba9c8d8cbef0c326481 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a-mcu.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am62a-mcu.dtsi
@@ -174,4 +174,29 @@
bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
status = "disabled";
};
+
+ mcu_r5fss0: r5fss@79000000 {
+ compatible = "ti,am62-r5fss";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x79000000 0x00 0x79000000 0x8000>,
+ <0x79020000 0x00 0x79020000 0x8000>;
+ power-domains = <&k3_pds 7 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+
+ mcu_r5fss0_core0: r5f@79000000 {
+ compatible = "ti,am62-r5f";
+ reg = <0x79000000 0x00008000>,
+ <0x79020000 0x00008000>;
+ reg-names = "atcm", "btcm";
+ resets = <&k3_reset 9 1>;
+ firmware-name = "am62a-mcu-r5f0_0-fw";
+ ti,atcm-enable = <0>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <0>;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <9>;
+ ti,sci-proc-ids = <0x03 0xff>;
+ };
+ };
};
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 14/22] arm64: dts: ti: k3-am62a-wakeup: Add R5F device node
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (12 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 13/22] arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 15/22] arm64: dts: ti: k3-am62a-main: Add C7xv " Markus Schneider-Pargmann
` (8 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Devarsh Thakkar <devarsht@ti.com>
AM62A SoCs have a single R5F core in wakeup domain. This core is
also used as a device manager for the SoC.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Tested-by: Daniel Schultz <d.schultz@phytec.de>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20250502220325.3230653-5-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: f0623719c2a612cbb9d5927fc5ffef9b54a12fb7 ]
(cherry picked from commit 87d1a5e90b69c4d995561fe9c1e077bad5db7416)
---
dts/upstream/src/arm64/ti/k3-am62a-wakeup.dtsi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dts/upstream/src/arm64/ti/k3-am62a-wakeup.dtsi b/dts/upstream/src/arm64/ti/k3-am62a-wakeup.dtsi
index b2c8f5351743857a54385178cce5c82a961917e3..259ae6ebbfb5ac5f83cc2c159c779ecaf9f96dcf 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a-wakeup.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am62a-wakeup.dtsi
@@ -103,6 +103,31 @@
status = "reserved";
};
+ wkup_r5fss0: r5fss@78000000 {
+ compatible = "ti,am62-r5fss";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x78000000 0x00 0x78000000 0x8000>,
+ <0x78100000 0x00 0x78100000 0x8000>;
+ power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+
+ wkup_r5fss0_core0: r5f@78000000 {
+ compatible = "ti,am62-r5f";
+ reg = <0x78000000 0x00008000>,
+ <0x78100000 0x00008000>;
+ reg-names = "atcm", "btcm";
+ resets = <&k3_reset 121 1>;
+ firmware-name = "am62a-wkup-r5f0_0-fw";
+ ti,atcm-enable = <1>;
+ ti,btcm-enable = <1>;
+ ti,loczrama = <1>;
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <121>;
+ ti,sci-proc-ids = <0x01 0xff>;
+ };
+ };
+
wkup_vtm0: temperature-sensor@b00000 {
compatible = "ti,j7200-vtm";
reg = <0x00 0xb00000 0x00 0x400>,
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 15/22] arm64: dts: ti: k3-am62a-main: Add C7xv device node
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (13 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 14/22] arm64: dts: ti: k3-am62a-wakeup: Add R5F device node Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 16/22] arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors Markus Schneider-Pargmann
` (7 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Jai Luthra <j-luthra@ti.com>
AM62A SoCs have a C7xv DSP subsystem with Analytics engine capability.
This subsystem is intended for deep learning purposes. Define the
device node for C7xv DSP.
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Tested-by: Daniel Schultz <d.schultz@phytec.de>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20250502220325.3230653-6-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: 56f13d79430f8faa27943e376ac25aca0836ee93 ]
(cherry picked from commit d115e1eada3ede7e3598de8758e0ef48ff76f499)
---
dts/upstream/src/arm64/ti/k3-am62a-main.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dts/upstream/src/arm64/ti/k3-am62a-main.dtsi b/dts/upstream/src/arm64/ti/k3-am62a-main.dtsi
index a1daba7b1fad5dee026ce4ba52077e01baca0131..d296e9e179738aa6661756c82ccf608ac53959bb 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a-main.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am62a-main.dtsi
@@ -1123,6 +1123,18 @@
power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
};
+ c7x_0: dsp@7e000000 {
+ compatible = "ti,am62a-c7xv-dsp";
+ reg = <0x00 0x7e000000 0x00 0x00100000>;
+ reg-names = "l2sram";
+ resets = <&k3_reset 208 1>;
+ firmware-name = "am62a-c71_0-fw";
+ ti,sci = <&dmsc>;
+ ti,sci-dev-id = <208>;
+ ti,sci-proc-ids = <0x04 0xff>;
+ status = "disabled";
+ };
+
e5010: jpeg-encoder@fd20000 {
compatible = "ti,am62a-jpeg-enc", "img,e5010-jpeg-enc";
reg = <0x00 0xfd20000 0x00 0x100>,
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 16/22] arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (14 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 15/22] arm64: dts: ti: k3-am62a-main: Add C7xv " Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 17/22] arm64: dts: ti: k3-am62p5-sk: " Markus Schneider-Pargmann
` (6 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Devarsh Thakkar <devarsht@ti.com>
For each remote proc, reserve memory for IPC and bind the mailbox
assignments. Two memory regions are reserved for each remote processor.
The first region of 1MB of memory is used for Vring shared buffers
and the second region is used as external memory to the remote processor
for the resource table and for tracebuffer allocations.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Beleswar Padhi <b-padhi@ti.com>
Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20250502220325.3230653-7-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: 77c29ebe76d80174d5735b61edd3c95e32a75d2e ]
(cherry picked from commit 2cf6f198463cb250137fc009db599ca93241ef0a)
---
dts/upstream/src/arm64/ti/k3-am62a7-sk.dts | 96 ++++++++++++++++++++++++++++--
1 file changed, 90 insertions(+), 6 deletions(-)
diff --git a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
index c65ada5a22abbd88a70e81703c28b7b83461c6c8..59a872413bab1f580610d8c7cc0a0eb2187d7db1 100644
--- a/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62a7-sk.dts
@@ -52,6 +52,42 @@
linux,cma-default;
};
+ c7x_0_dma_memory_region: c7x-dma-memory@99800000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x99800000 0x00 0x100000>;
+ no-map;
+ };
+
+ c7x_0_memory_region: c7x-memory@99900000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x99900000 0x00 0xf00000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@9b800000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9b800000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core0_memory_region: r5f-dma-memory@9b900000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9b900000 0x00 0xf00000>;
+ no-map;
+ };
+
+ wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9c800000 0x00 0x100000>;
+ no-map;
+ };
+
+ wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9c900000 0x00 0xf00000>;
+ no-map;
+ };
+
secure_tfa_ddr: tfa@9e780000 {
reg = <0x00 0x9e780000 0x00 0x80000>;
alignment = <0x1000>;
@@ -63,12 +99,6 @@
alignment = <0x1000>;
no-map;
};
-
- wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
- compatible = "shared-dma-pool";
- reg = <0x00 0x9c900000 0x00 0x01e00000>;
- no-map;
- };
};
opp-table {
@@ -782,3 +812,57 @@
pinctrl-0 = <&main_epwm1_pins_default>;
status = "okay";
};
+
+&mailbox0_cluster0 {
+ status = "okay";
+
+ mbox_r5_0: mbox-r5-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+};
+
+&mailbox0_cluster1 {
+ status = "okay";
+
+ mbox_c7x_0: mbox-c7x-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+};
+
+&mailbox0_cluster2 {
+ status = "okay";
+
+ mbox_mcu_r5_0: mbox-mcu-r5-0 {
+ ti,mbox-rx = <0 0 0>;
+ ti,mbox-tx = <1 0 0>;
+ };
+};
+
+&wkup_r5fss0 {
+ status = "okay";
+};
+
+&wkup_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster0>, <&mbox_r5_0>;
+ memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
+ <&wkup_r5fss0_core0_memory_region>;
+};
+
+&mcu_r5fss0 {
+ status = "okay";
+};
+
+&mcu_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster2>, <&mbox_mcu_r5_0>;
+ memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+ <&mcu_r5fss0_core0_memory_region>;
+};
+
+&c7x_0 {
+ mboxes = <&mailbox0_cluster1>, <&mbox_c7x_0>;
+ memory-region = <&c7x_0_dma_memory_region>,
+ <&c7x_0_memory_region>;
+ status = "okay";
+};
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 17/22] arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (15 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 16/22] arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 18/22] arm64: dts: ti: k3-am62x-sk-common: " Markus Schneider-Pargmann
` (5 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Devarsh Thakkar <devarsht@ti.com>
For each remote proc, reserve memory for IPC and bind the mailbox
assignments. Two memory regions are reserved for each remote processor.
The first region of 1MB of memory is used for Vring shared buffers
and the second region is used as external memory to the remote processor
for the resource table and for tracebuffer allocations.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20250502220325.3230653-8-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: b05a6c145001e99348a2fe33958be912f4eb8d4d ]
(cherry picked from commit ccd74102c4199bb661090168ca5035d8ad438869)
---
dts/upstream/src/arm64/ti/k3-am62p5-sk.dts | 50 ++++++++++++++++++++++++++----
1 file changed, 44 insertions(+), 6 deletions(-)
diff --git a/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts b/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts
index 7cc730e27ce69dc30feb97d68c9cec88b553a4bd..731252d84330b69c7b2911c1216118c02a787569 100644
--- a/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62p5-sk.dts
@@ -49,6 +49,30 @@
#size-cells = <2>;
ranges;
+ mcu_r5fss0_core0_dma_memory_region: mcu-r5fss-dma-memory-region@9b800000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9b800000 0x00 0x100000>;
+ no-map;
+ };
+
+ mcu_r5fss0_core0_memory_region: mcu-r5fss-memory-region@9b900000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9b900000 0x00 0xf00000>;
+ no-map;
+ };
+
+ wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9c800000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9c800000 0x00 0x100000>;
+ no-map;
+ };
+
+ wkup_r5fss0_core0_memory_region: r5f-memory@9c900000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9c900000 0x00 0xf00000>;
+ no-map;
+ };
+
secure_tfa_ddr: tfa@9e780000 {
reg = <0x00 0x9e780000 0x00 0x80000>;
no-map;
@@ -58,12 +82,6 @@
reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
no-map;
};
-
- wkup_r5fss0_core0_memory_region: r5f-dma-memory@9c900000 {
- compatible = "shared-dma-pool";
- reg = <0x00 0x9c900000 0x00 0x01e00000>;
- no-map;
- };
};
vmain_pd: regulator-0 {
@@ -639,6 +657,26 @@
};
};
+&wkup_r5fss0 {
+ status = "okay";
+};
+
+&wkup_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
+ memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
+ <&wkup_r5fss0_core0_memory_region>;
+};
+
+&mcu_r5fss0 {
+ status = "okay";
+};
+
+&mcu_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster1 &mbox_mcu_r5_0>;
+ memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+ <&mcu_r5fss0_core0_memory_region>;
+};
+
&main_uart0 {
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 18/22] arm64: dts: ti: k3-am62x-sk-common: Enable IPC with remote processors
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (16 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 17/22] arm64: dts: ti: k3-am62p5-sk: " Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 19/22] arm: dts: k3-am62a: Add r5 device nodes Markus Schneider-Pargmann
` (4 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
From: Hari Nagalla <hnagalla@ti.com>
For each remote proc, reserve memory for IPC and bind the mailbox
assignments. Two memory regions are reserved for each remote processor.
The first region of 1MB of memory is used for Vring shared buffers
and the second region is used as external memory to the remote processor
for the resource table and for tracebuffer allocations.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20250502220325.3230653-9-jm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
[ upstream commit: 8fb034b8402ead1028ed63394a177947b1450fcd ]
(cherry picked from commit 4dc654f3ea4fca3be4b8140bbb0df9b6416f3b67)
---
dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi | 34 +++++++++++++++++++----
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi b/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi
index 17f97434b91ae8c9e46da872e0a08a60ec4fbc0c..4060e740a659e88af6b3ee9d3fa258a85705e80e 100644
--- a/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi
+++ b/dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi
@@ -70,6 +70,18 @@
no-map;
};
+ wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9da00000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9da00000 0x00 0x100000>;
+ no-map;
+ };
+
+ wkup_r5fss0_core0_memory_region: r5f-memory@9db00000 {
+ compatible = "shared-dma-pool";
+ reg = <0x00 0x9db00000 0x00 0xc00000>;
+ no-map;
+ };
+
secure_tfa_ddr: tfa@9e780000 {
reg = <0x00 0x9e780000 0x00 0x80000>;
alignment = <0x1000>;
@@ -82,11 +94,6 @@
no-map;
};
- wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9db00000 {
- compatible = "shared-dma-pool";
- reg = <0x00 0x9db00000 0x00 0xc00000>;
- no-map;
- };
};
leds {
@@ -475,10 +482,17 @@
};
&mailbox0_cluster0 {
+ status = "okay";
+
mbox_m4_0: mbox-m4-0 {
ti,mbox-rx = <0 0 0>;
ti,mbox-tx = <1 0 0>;
};
+
+ mbox_r5_0: mbox-r5-0 {
+ ti,mbox-rx = <2 0 0>;
+ ti,mbox-tx = <3 0 0>;
+ };
};
&mcu_m4fss {
@@ -488,6 +502,16 @@
status = "okay";
};
+&wkup_r5fss0 {
+ status = "okay";
+};
+
+&wkup_r5fss0_core0 {
+ mboxes = <&mailbox0_cluster0 &mbox_r5_0>;
+ memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
+ <&wkup_r5fss0_core0_memory_region>;
+};
+
&usbss0 {
bootph-all;
status = "okay";
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 19/22] arm: dts: k3-am62a: Add r5 device nodes
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (17 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 18/22] arm64: dts: ti: k3-am62x-sk-common: " Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 20/22] arm: dts: k3-am62p: " Markus Schneider-Pargmann
` (3 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
These are needed in SPL to be able to resume from DDR immediately after
booting from IO+DDR.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/dts/k3-am62a7-sk-u-boot.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/dts/k3-am62a7-sk-u-boot.dtsi b/arch/arm/dts/k3-am62a7-sk-u-boot.dtsi
index a70fc88317e04de032e4da1428e25eb78ecc30cf..7e6a76f72b2a63bf706c3839189b6213aee4497d 100644
--- a/arch/arm/dts/k3-am62a7-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62a7-sk-u-boot.dtsi
@@ -14,6 +14,14 @@
memory@80000000 {
bootph-all;
};
+
+ reserved-memory {
+ bootph-pre-ram;
+ };
+};
+
+&wkup_r5fss0_core0_memory_region {
+ bootph-pre-ram;
};
&cbass_main {
@@ -68,6 +76,14 @@
bootph-all;
};
+&wkup_r5fss0 {
+ bootph-pre-ram;
+};
+
+&wkup_r5fss0_core0 {
+ bootph-pre-ram;
+};
+
&cbass_wakeup {
bootph-all;
};
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 20/22] arm: dts: k3-am62p: Add r5 device nodes
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (18 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 19/22] arm: dts: k3-am62a: Add r5 device nodes Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 21/22] configs: am62ax_evm_r5: Enable IODDR resume support Markus Schneider-Pargmann
` (2 subsequent siblings)
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
These are needed in SPL to be able to resume from DDR immediately after
booting from IO+DDR.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi b/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi
index cf087c6e343a8af6f4bb2093bb6c3f28395a2686..8c2b198dede03fd77f16786f8743313a34902e46 100644
--- a/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62p5-sk-u-boot.dtsi
@@ -11,8 +11,28 @@
stdout-path = "serial2:115200n8";
tick-timer = &main_timer0;
};
+
+ reserved-memory {
+ bootph-pre-ram;
+ };
+};
+
+&wkup_r5fss0_core0_memory_region {
+ bootph-pre-ram;
+};
+
+&cbass_wakeup {
+ bootph-pre-ram;
};
&dmsc {
bootph-pre-ram;
};
+
+&wkup_r5fss0 {
+ bootph-pre-ram;
+};
+
+&wkup_r5fss0_core0 {
+ bootph-pre-ram;
+};
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 21/22] configs: am62ax_evm_r5: Enable IODDR resume support
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (19 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 20/22] arm: dts: k3-am62p: " Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 22/22] configs: am62p_evm_r5_defconfig: " Markus Schneider-Pargmann
2025-06-17 10:01 ` [PATCH v2 00/22] am62: IO+DDR " Sumit Garg
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
Enable K3_IODDR to enable support to resume from DDR after exiting
IO+DDR.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
configs/am62ax_evm_r5_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig
index 4ea551b509bdff2541453046a54b2dc87720d08b..c57cff530089b2f4ca1db1e298259f64416eb9fe 100644
--- a/configs/am62ax_evm_r5_defconfig
+++ b/configs/am62ax_evm_r5_defconfig
@@ -105,3 +105,4 @@ CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_LIB_RATIONAL=y
CONFIG_SPL_LIB_RATIONAL=y
+CONFIG_K3_IODDR=y
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [PATCH v2 22/22] configs: am62p_evm_r5_defconfig: Enable IODDR resume support
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (20 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 21/22] configs: am62ax_evm_r5: Enable IODDR resume support Markus Schneider-Pargmann
@ 2025-06-13 13:19 ` Markus Schneider-Pargmann
2025-06-17 10:01 ` [PATCH v2 00/22] am62: IO+DDR " Sumit Garg
22 siblings, 0 replies; 25+ messages in thread
From: Markus Schneider-Pargmann @ 2025-06-13 13:19 UTC (permalink / raw)
To: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, Bryan Brattlof
Cc: u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
Enable K3_IODDR to enable support to resume from DDR after exiting
IO+DDR.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
configs/am62px_evm_r5_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/am62px_evm_r5_defconfig b/configs/am62px_evm_r5_defconfig
index f2e1f31ef0f5c1d30706ba676f9608943dcc929f..266883f523e701d18df3acaf51427ebfa37e3108 100644
--- a/configs/am62px_evm_r5_defconfig
+++ b/configs/am62px_evm_r5_defconfig
@@ -122,3 +122,4 @@ CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_LIB_RATIONAL=y
CONFIG_SPL_LIB_RATIONAL=y
+CONFIG_K3_IODDR=y
--
2.49.0
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH v2 03/22] ram: k3-ddrss: Add support for DDR in self-refresh
2025-06-13 13:19 ` [PATCH v2 03/22] ram: k3-ddrss: Add support for DDR in self-refresh Markus Schneider-Pargmann
@ 2025-06-16 13:57 ` Bryan Brattlof
0 siblings, 0 replies; 25+ messages in thread
From: Bryan Brattlof @ 2025-06-16 13:57 UTC (permalink / raw)
To: Markus Schneider-Pargmann
Cc: Vignesh Raghavendra, Nishanth Menon, Sumit Garg, Robert Nelson,
Tom Rini, u-boot, Kevin Hilman, Vishal Mahaveer, Akashdeep Kaur,
Kendall Willis, Sebin Francis, Dhruva Gole
On June 13, 2025 thus sayeth Markus Schneider-Pargmann:
> In IO+DDR the DDR is kept in self-refresh while the SoC cores are
> powered off completely. During boot the normal initialization routine of
> DDR is slightly different to exit self-refresh and keep the DDR contents.
>
> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> ---
> drivers/ram/k3-ddrss/k3-ddrss.c | 165 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 165 insertions(+)
>
> diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
> index ff87faf6a22419e54d3639817ad2b884a97a3911..d7ae6e9ef24d5aebdb61656e6ca797b1799ca0f6 100644
> --- a/drivers/ram/k3-ddrss/k3-ddrss.c
> +++ b/drivers/ram/k3-ddrss/k3-ddrss.c
...
> +
> +static void k3_ddrss_lpm_resume(struct k3_ddrss_desc *ddrss)
> +{
> + k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
> + K3_DDRSS_CFG_DENALI_CTL_160,
> + K3_DDRSS_CFG_DENALI_CTL_160_LP_CMD_MASK,
> + K3_DDRSS_CFG_DENALI_CTL_160_LP_CMD_ENTRY);
> + while (!(readl(ddrss->ddrss_ctl_cfg + K3_DDRSS_CFG_DENALI_CTL_345) &
> + (1 << K3_DDRSS_CFG_DENALI_CTL_345_INT_STATUS_LOWPOWER_SHIFT)))
> + ;
Can we use the wait_for_bit_* logic here?
> +
> + k3_ddrss_reg_update_bits(ddrss->ddrss_ctl_cfg,
> + K3_DDRSS_CFG_DENALI_CTL_353,
> + 0,
> + 1 << K3_DDRSS_CFG_DENALI_CTL_353_INT_ACK_LOWPOWER_SHIFT);
> + while ((readl(ddrss->ddrss_ctl_cfg + K3_DDRSS_CFG_DENALI_CTL_169) &
> + K3_DDRSS_CFG_DENALI_CTL_169_LP_STATE_MASK) !=
> + 0x40 << K3_DDRSS_CFG_DENALI_CTL_169_LP_STATE_SHIFT)
> + ;
I know DRAM is so early on in the bringup that we'll probably have a
debugger nearby already but just having an error message to grep for
could really help if the controller never acknowledges this.
~Bryan
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH v2 00/22] am62: IO+DDR resume support
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
` (21 preceding siblings ...)
2025-06-13 13:19 ` [PATCH v2 22/22] configs: am62p_evm_r5_defconfig: " Markus Schneider-Pargmann
@ 2025-06-17 10:01 ` Sumit Garg
22 siblings, 0 replies; 25+ messages in thread
From: Sumit Garg @ 2025-06-17 10:01 UTC (permalink / raw)
To: Markus Schneider-Pargmann
Cc: Vignesh Raghavendra, Nishanth Menon, Robert Nelson, Tom Rini,
Bryan Brattlof, u-boot, Kevin Hilman, Vishal Mahaveer,
Akashdeep Kaur, Kendall Willis, Sebin Francis, Dhruva Gole
Hi Markus,
On Fri, Jun 13, 2025 at 03:19:20PM +0200, Markus Schneider-Pargmann wrote:
> Hi,
>
> this series introduces support to resume from IO+DDR. IO+DDR is a low
> power mode of am62a and am62p in which nearly everything is powered off
> except DDR which is in self-refresh and a few pins which detect
> activity and can wakeup the system again.
>
> On resume uboot SPL is loaded and checks if this is a IO+DDR resume. If
> it is, the DDR initialization sequence in k3-ddrss differs slightly as
> it has to get the DDR out of the self-refresh.
>
> Afterward a specific address determined from DT is used to get the
> metadata that stores relevant context addresses. The context is restored
> using the tisci message TI_SCI_MSG_MIN_CONTEXT_RESTORE. At the end all
> further initializations are skipped and uboot SPL directly jumps into
> the DM resume address which takes care of the rest.
>
> The devicetree R5F related patches were picked up from the devicetree
> repository tag v6.16-rc1-dts and are required to find the correct
> address of the metadata. I picked some additional patches to avoid
> conflicts.
The DT cherry-picks seems fine to me. Feel free to add following to
those DT cherry-picks:
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
-Sumit
>
> k3-ddrss is using absolute register accesses at the moment. I am trying
> to submit syscon DT patches upstream to access these through syscon,
> unfortunately there is ongoing discussion regarding syscon.
>
> This series is based on next.
>
> I tested this on am62a.
>
> Best,
> Markus
>
> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> ---
> Changes in v2:
> - Remove 'default n' from K3_IODDR
> - Pick devicetree patches from upstream instead of mailinglist
> - Link to v1: https://lore.kernel.org/r/20250311-topic-am62-ioddr-v2025-04-rc1-v1-0-666de9c105cb@baylibre.com
>
> ---
> Devarsh Thakkar (3):
> arm64: dts: ti: k3-am62a-wakeup: Add R5F device node
> arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors
> arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors
>
> Hari Nagalla (2):
> arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node
> arm64: dts: ti: k3-am62x-sk-common: Enable IPC with remote processors
>
> Jai Luthra (1):
> arm64: dts: ti: k3-am62a-main: Add C7xv device node
>
> Judith Mendez (3):
> arm64: dts: ti: k3-am62a7-sk: Enable PWM
> arm64: dts: ti: k3-am6*: Add boot phase flag to support MMC boot
> arm64: dts: ti: k3-am6*: Remove disable-wp for eMMC
>
> Markus Schneider-Pargmann (13):
> arm: mach-k3: Remove CANUART IO isolation
> arm: mach-k3: Kconfig: Add symbols for IO+DDR Low Power Mode
> ram: k3-ddrss: Add support for DDR in self-refresh
> firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE
> arm: mach-k3: common: Add CANUART wakeup check helpers
> arm: mach-k3: common: Add lpm_resume_from_ddr
> arm: mach-k3: common: Helper for LPM meta data address from DT
> arm: mach-k3: am62a7_init: Resume on LPM exit
> arm: mach-k3: am62p5_init: Resume on LPM exit
> arm: dts: k3-am62a: Add r5 device nodes
> arm: dts: k3-am62p: Add r5 device nodes
> configs: am62ax_evm_r5: Enable IODDR resume support
> configs: am62p_evm_r5_defconfig: Enable IODDR resume support
>
> arch/arm/dts/k3-am62a7-sk-u-boot.dtsi | 16 ++
> arch/arm/dts/k3-am62p5-sk-u-boot.dtsi | 20 +++
> arch/arm/mach-k3/Kconfig | 8 +
> arch/arm/mach-k3/am62ax/am62a7_init.c | 11 ++
> arch/arm/mach-k3/am62px/am62p5_init.c | 12 ++
> arch/arm/mach-k3/am62x/am625_init.c | 2 +
> arch/arm/mach-k3/common.c | 162 ++++++++++++++++++++
> arch/arm/mach-k3/common.h | 4 +
> arch/arm/mach-k3/include/mach/hardware.h | 32 ++++
> configs/am62ax_evm_r5_defconfig | 1 +
> configs/am62px_evm_r5_defconfig | 1 +
> drivers/firmware/ti_sci.c | 38 +++++
> drivers/firmware/ti_sci.h | 14 ++
> drivers/ram/k3-ddrss/k3-ddrss.c | 165 +++++++++++++++++++++
> dts/upstream/src/arm64/ti/k3-am62-lp-sk.dts | 12 ++
> dts/upstream/src/arm64/ti/k3-am62-phycore-som.dtsi | 1 -
> dts/upstream/src/arm64/ti/k3-am625-beagleplay.dts | 1 -
> dts/upstream/src/arm64/ti/k3-am62a-main.dtsi | 12 ++
> dts/upstream/src/arm64/ti/k3-am62a-mcu.dtsi | 25 ++++
> .../src/arm64/ti/k3-am62a-phycore-som.dtsi | 1 -
> dts/upstream/src/arm64/ti/k3-am62a-wakeup.dtsi | 25 ++++
> dts/upstream/src/arm64/ti/k3-am62a7-sk.dts | 139 ++++++++++++++++-
> dts/upstream/src/arm64/ti/k3-am62p5-sk.dts | 51 ++++++-
> dts/upstream/src/arm64/ti/k3-am62x-sk-common.dtsi | 35 ++++-
> dts/upstream/src/arm64/ti/k3-am642-evm.dts | 1 -
> dts/upstream/src/arm64/ti/k3-am654-base-board.dts | 1 -
> .../ti/k3-am6548-iot2050-advanced-common.dtsi | 1 -
> dts/upstream/src/arm64/ti/k3-am69-sk.dts | 1 -
> include/linux/soc/ti/ti_sci_protocol.h | 9 ++
> 29 files changed, 774 insertions(+), 27 deletions(-)
> ---
> base-commit: 548d997229b7929bd7f0782415952d5a85eb7e64
> change-id: 20250306-topic-am62-ioddr-v2025-04-rc1-0b3a0ffe92b1
>
> Best regards,
> --
> Markus Schneider-Pargmann <msp@baylibre.com>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2025-06-17 10:01 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 13:19 [PATCH v2 00/22] am62: IO+DDR resume support Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 01/22] arm: mach-k3: Remove CANUART IO isolation Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 02/22] arm: mach-k3: Kconfig: Add symbols for IO+DDR Low Power Mode Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 03/22] ram: k3-ddrss: Add support for DDR in self-refresh Markus Schneider-Pargmann
2025-06-16 13:57 ` Bryan Brattlof
2025-06-13 13:19 ` [PATCH v2 04/22] firmware: ti_sci: Add TI_SCI_MSG_MIN_CONTEXT_RESTORE Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 05/22] arm: mach-k3: common: Add CANUART wakeup check helpers Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 06/22] arm: mach-k3: common: Add lpm_resume_from_ddr Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 07/22] arm: mach-k3: common: Helper for LPM meta data address from DT Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 08/22] arm: mach-k3: am62a7_init: Resume on LPM exit Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 09/22] arm: mach-k3: am62p5_init: " Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 10/22] arm64: dts: ti: k3-am62a7-sk: Enable PWM Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 11/22] arm64: dts: ti: k3-am6*: Add boot phase flag to support MMC boot Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 12/22] arm64: dts: ti: k3-am6*: Remove disable-wp for eMMC Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 13/22] arm64: dts: ti: k3-am62a-mcu: Add R5F remote proc node Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 14/22] arm64: dts: ti: k3-am62a-wakeup: Add R5F device node Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 15/22] arm64: dts: ti: k3-am62a-main: Add C7xv " Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 16/22] arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 17/22] arm64: dts: ti: k3-am62p5-sk: " Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 18/22] arm64: dts: ti: k3-am62x-sk-common: " Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 19/22] arm: dts: k3-am62a: Add r5 device nodes Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 20/22] arm: dts: k3-am62p: " Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 21/22] configs: am62ax_evm_r5: Enable IODDR resume support Markus Schneider-Pargmann
2025-06-13 13:19 ` [PATCH v2 22/22] configs: am62p_evm_r5_defconfig: " Markus Schneider-Pargmann
2025-06-17 10:01 ` [PATCH v2 00/22] am62: IO+DDR " Sumit Garg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.