[PATCH 03/20] board: ti: j721e: Add resume detection for J721e/J7200
Thomas Richard
thomas.richard at bootlin.com
Mon Jun 1 10:29:22 CEST 2026
On 4/30/26 10:43 AM, Richard Genoud (TI) wrote:
> From: "Thomas Richard (TI)" <thomas.richard at bootlin.com>
>
> Add the capability to detect a resume. This overrides the weak
> function j7xx_board_is_resuming(void).
> To detect the resume, SPL searches a magic value (0xBA) in a register
> of PMICA.
> This value is set by DM-Firmware during the suspend sequence.
>
> Signed-off-by: Thomas Richard (TI) <thomas.richard at bootlin.com>
> Co-developed-by: Gregory CLEMENT (TI) <gregory.clement at bootlin.com>
> Signed-off-by: Gregory CLEMENT (TI) <gregory.clement at bootlin.com>
> Co-developed-by: Richard Genoud (TI) <richard.genoud at bootlin.com>
> Signed-off-by: Richard Genoud (TI) <richard.genoud at bootlin.com>
> ---
> board/ti/common/k3-lpm.h | 17 +++++++++++++++++
> board/ti/j721e/evm.c | 37 +++++++++++++++++++++++++++++++++++++
> 2 files changed, 54 insertions(+)
> create mode 100644 board/ti/common/k3-lpm.h
>
> diff --git a/board/ti/common/k3-lpm.h b/board/ti/common/k3-lpm.h
> new file mode 100644
> index 000000000000..a2141a0c25a8
> --- /dev/null
> +++ b/board/ti/common/k3-lpm.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright (C) 2026, Texas Instruments Incorporated - https://www.ti.com/
> + * Copyright (C) 2026, Bootlin
> + */
> +
> +#ifndef __K3_LPM_H
> +#define __K3_LPM_H
> +
> +/* Magic value in PMIC register to indicate the suspend state (SOC_OFF) */
> +#define K3_LPM_MAGIC_SUSPEND 0xba
> +
> +/* PMIC register where the magic value resides */
> +#define K3_LPM_SCRATCH_PAD_REG 0xcb
K3_LPM_SCRATCH_PAD_REG_3 so we easily know it is scratchpad reg 3.
We currently use the entire SCRATCH_PAD_REG_3 register to mark a resume.
Some PMICs in certain configurations use some scratchpad registers for
other purposes, so we could consider using only a specific bit range (or
even a single bit) and document it. This would free up the remaining
bits for other uses.
However, an 8-bit magic value is likely more robust against accidental
user modification.
No strong opinion, just raising the topic for discussion.
Best Regards,
Thomas
More information about the U-Boot
mailing list