Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2230945/?format=api
{ "id": 2230945, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2230945/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260430084414.1354490-19-richard.genoud@bootlin.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.2/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260430084414.1354490-19-richard.genoud@bootlin.com>", "list_archive_url": null, "date": "2026-04-30T08:44:11", "name": "[18/20] board: ti: evm: Store wakeup reason on scratchpad memory", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ea712054384870a6220fc25be6396378eab9e9e8", "submitter": { "id": 88519, "url": "http://patchwork.ozlabs.org/api/1.2/people/88519/?format=api", "name": "Richard Genoud (TI)", "email": "richard.genoud@bootlin.com" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/1.2/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260430084414.1354490-19-richard.genoud@bootlin.com/mbox/", "series": [ { "id": 502237, "url": "http://patchwork.ozlabs.org/api/1.2/series/502237/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=502237", "date": "2026-04-30T08:43:53", "name": "Introduce resume for J7xx SoCs", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502237/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2230945/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2230945/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=IxbCj1un;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.b=\"IxbCj1un\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=richard.genoud@bootlin.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5nq60NGRz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 18:47:14 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 8C546846DF;\n\tThu, 30 Apr 2026 10:45:18 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 86881846A1; Thu, 30 Apr 2026 10:45:17 +0200 (CEST)", "from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 72F97846D7\n for <u-boot@lists.denx.de>; Thu, 30 Apr 2026 10:45:15 +0200 (CEST)", "from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n by smtpout-02.galae.net (Postfix) with ESMTPS id 27DF41A347D;\n Thu, 30 Apr 2026 08:45:15 +0000 (UTC)", "from mail.galae.net (mail.galae.net [212.83.136.155])\n by smtpout-01.galae.net (Postfix) with ESMTPS id F15CF60495;\n Thu, 30 Apr 2026 08:45:14 +0000 (UTC)", "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id B523B1072B7BE;\n Thu, 30 Apr 2026 10:45:11 +0200 (CEST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n t=1777538713; h=from:subject:date:message-id:to:cc:mime-version:\n content-transfer-encoding:in-reply-to:references;\n bh=S+2t3tvNvlZPlC8WNLXjRpR92IZZMA1OQx1yiioO/uE=;\n b=IxbCj1unIZawwGI/0wbQ0rBRn5uzQfU5OXDipqilLzO/CHXzfW+Sgg+UJKtTOGA6blAVaM\n /nuoD2EtK387HVfYcKqlpAzbd/4Y+d1e7NAP1n1MVcAc5SJgSKFIBZKkdduu/6bwXLDasq\n IzUgYKfmCiWd/SZOzpnRroqovOeoey6de7BFlJLerFJQlZN3wbpUnusbtA5i32/SVktT3n\n ECqtV2BrRptldxgq0eZryhgXp1PD53H2IUj806SLiunIbpDLqZI8vD87r6OzFPzpyDvhaw\n awG0uLaoORjOi5ZAJmdWl0uwatFDC/PoHxkA8igkdYbBYINXghnhAaclsMY2UQ==", "From": "\"Richard Genoud (TI)\" <richard.genoud@bootlin.com>", "To": "Tom Rini <trini@konsulko.com>, Manorit Chawdhry <m-chawdhry@ti.com>,\n Apurva Nandan <a-nandan@ti.com>, \"Andrew F . Davis\" <afd@ti.com>,\n Vignesh Raghavendra <vigneshr@ti.com>, Bryan Brattlof <bb@ti.com>,\n Vaishnav Achath <vaishnav.a@ti.com>, Jayesh Choudhary <j-choudhary@ti.com>,\n Simon Glass <sjg@chromium.org>, Alper Nebi Yasak <alpernebiyasak@gmail.com>", "Cc": "Markus Schneider-Pargmann <msp@baylibre.com>,\n Udit Kumar <u-kumar1@ti.com>,\n Abhash Kumar <a-kumar2@ti.com>,\n Thomas Richard <thomas.richard@bootlin.com>,\n Gregory CLEMENT <gregory.clement@bootlin.com>,\n Thomas Petazzoni <thomas.petazzoni@bootlin.com>,\n Richard Genoud <richard.genoud@bootlin.com>, u-boot@lists.denx.de", "Subject": "[PATCH 18/20] board: ti: evm: Store wakeup reason on scratchpad\n memory", "Date": "Thu, 30 Apr 2026 10:44:11 +0200", "Message-ID": "<20260430084414.1354490-19-richard.genoud@bootlin.com>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20260430084414.1354490-1-richard.genoud@bootlin.com>", "References": "<20260430084414.1354490-1-richard.genoud@bootlin.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Last-TLS-Session-Version": "TLSv1.3", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "From: Abhash Kumar Jha <a-kumar2@ti.com>\n\nWhile resuming from suspend, the wakeup reason need to be stored\nand this will be used by the Linux kernel once its up.\n\nUse the 32 bytes of MCU_PSRAM0_RAM area (addr = 0x40280000) to\nstore the wakeup reason.\n\nRead the value as soon as it starts and store it internally.\n\nSigned-off-by: Abhash Kumar Jha <a-kumar2@ti.com>\n---\n arch/arm/mach-k3/include/mach/j721e_hardware.h | 1 +\n arch/arm/mach-k3/include/mach/j784s4_hardware.h | 1 +\n board/ti/common/k3-lpm.h | 5 +++++\n board/ti/j721e/evm.c | 9 +++++++++\n board/ti/j784s4/evm.c | 9 +++++++++\n 5 files changed, 25 insertions(+)", "diff": "diff --git a/arch/arm/mach-k3/include/mach/j721e_hardware.h b/arch/arm/mach-k3/include/mach/j721e_hardware.h\nindex 587dd10eb1ea..d58e2b3e1bb2 100644\n--- a/arch/arm/mach-k3/include/mach/j721e_hardware.h\n+++ b/arch/arm/mach-k3/include/mach/j721e_hardware.h\n@@ -47,6 +47,7 @@\n \n /* MCU SCRATCHPAD usage */\n #define TI_SRAM_SCRATCH_BOARD_EEPROM_START\tCONFIG_SYS_K3_MCU_SCRATCHPAD_BASE\n+#define TI_SRAM_SCRATCH_LPM_START\t\t0x40280000\n \n #if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__)\n \ndiff --git a/arch/arm/mach-k3/include/mach/j784s4_hardware.h b/arch/arm/mach-k3/include/mach/j784s4_hardware.h\nindex dd51473419dd..2fc81902f879 100644\n--- a/arch/arm/mach-k3/include/mach/j784s4_hardware.h\n+++ b/arch/arm/mach-k3/include/mach/j784s4_hardware.h\n@@ -46,6 +46,7 @@\n \n /* MCU SCRATCHPAD usage */\n #define TI_SRAM_SCRATCH_BOARD_EEPROM_START\tCONFIG_SYS_K3_MCU_SCRATCHPAD_BASE\n+#define TI_SRAM_SCRATCH_LPM_START\t\t0x40280000\n \n #if defined(CONFIG_SYS_K3_SPL_ATF) && !defined(__ASSEMBLY__)\n \ndiff --git a/board/ti/common/k3-lpm.h b/board/ti/common/k3-lpm.h\nindex a2141a0c25a8..dfd8f8486f08 100644\n--- a/board/ti/common/k3-lpm.h\n+++ b/board/ti/common/k3-lpm.h\n@@ -13,5 +13,10 @@\n /* PMIC register where the magic value resides */\n #define K3_LPM_SCRATCH_PAD_REG 0xcb\n \n+struct lpm_scratch_space {\n+\tu16 wake_src;\n+\tu16 reserved;\n+} __packed;\n+\n #endif /* __K3_LPM_H */\n \ndiff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c\nindex 41eea1bdea95..a9f469fea1f7 100644\n--- a/board/ti/j721e/evm.c\n+++ b/board/ti/j721e/evm.c\n@@ -474,6 +474,9 @@ err_free_gpio:\n \n #if (IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_TARGET_J7200_R5_EVM))\n \n+#define LPM_WAKE_SOURCE_PMIC_GPIO 0x91\n+#define LPM_WAKE_SOURCE_MAIN_IO 0x80\n+\n static void clear_isolation(void)\n {\n \tint ret;\n@@ -498,12 +501,15 @@ bool j7xx_board_is_resuming(void)\n {\n \tstruct udevice *pmica;\n \tu32 pmctrl_val = readl(PMCTRL_IO_1);\n+\tstruct lpm_scratch_space *lpm_scratch;\n \tint ret;\n \n \tif (gd_k3_resuming() != K3_RESUME_STATE_UNKNOWN)\n \t\tgoto end;\n \n+\tlpm_scratch = (struct lpm_scratch_space *)TI_SRAM_SCRATCH_LPM_START;\n \tif ((pmctrl_val & IO_ISO_STATUS) == IO_ISO_STATUS) {\n+\t\tlpm_scratch->wake_src = LPM_WAKE_SOURCE_MAIN_IO;\n \t\tclear_isolation();\n \t\tgd_set_k3_resuming(K3_RESUME_STATE_RESUMING);\n \t\tdebug(\"Resuming from IO_DDR mode\\n\");\n@@ -520,6 +526,7 @@ bool j7xx_board_is_resuming(void)\n \n \tif (pmic_reg_read(pmica, K3_LPM_SCRATCH_PAD_REG) == K3_LPM_MAGIC_SUSPEND) {\n \t\tdebug(\"%s: board is resuming\\n\", __func__);\n+\t\tlpm_scratch->wake_src = LPM_WAKE_SOURCE_PMIC_GPIO;\n \t\tgd_set_k3_resuming(K3_RESUME_STATE_RESUMING);\n \n \t\t/* clean magic suspend */\n@@ -527,6 +534,8 @@ bool j7xx_board_is_resuming(void)\n \t\t\tprintf(\"Failed to clean magic value for suspend detection in PMICA\\n\");\n \t} else {\n \t\tdebug(\"%s: board is booting (no resume detected)\\n\", __func__);\n+\t\tlpm_scratch->wake_src = 0;\n+\t\tlpm_scratch->reserved = 0;\n \t\tgd_set_k3_resuming(K3_RESUME_STATE_BOOTING);\n \t}\n end:\ndiff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c\nindex eef56556a33c..b94ec7f3653b 100644\n--- a/board/ti/j784s4/evm.c\n+++ b/board/ti/j784s4/evm.c\n@@ -68,6 +68,9 @@ int board_late_init(void)\n #if (IS_ENABLED(CONFIG_SPL_BUILD) && (IS_ENABLED(CONFIG_TARGET_J784S4_R5_EVM) || \\\n \t\t\t\t IS_ENABLED(CONFIG_TARGET_J742S2_R5_EVM)))\n \n+#define LPM_WAKE_SOURCE_PMIC_GPIO 0x91\n+#define LPM_WAKE_SOURCE_MCU_IO 0x81\n+\n static void clear_isolation(void)\n {\n \tint ret;\n@@ -93,12 +96,15 @@ bool j7xx_board_is_resuming(void)\n {\n \tstruct udevice *pmic;\n \tu32 pmctrl_val = readl(WKUP_CTRL_MMR0_BASE + PMCTRL_IO_0);\n+\tstruct lpm_scratch_space *lpm_scratch;\n \tint err;\n \n \tif (gd_k3_resuming() != K3_RESUME_STATE_UNKNOWN)\n \t\tgoto end;\n \n+\tlpm_scratch = (struct lpm_scratch_space *)TI_SRAM_SCRATCH_LPM_START;\n \tif ((pmctrl_val & IO_ISO_STATUS) == IO_ISO_STATUS) {\n+\t\tlpm_scratch->wake_src = LPM_WAKE_SOURCE_MCU_IO;\n \t\tclear_isolation();\n \t\tgd_set_k3_resuming(K3_RESUME_STATE_RESUMING);\n \t\tdebug(\"board is resuming from IO_DDR mode\\n\");\n@@ -115,6 +121,7 @@ bool j7xx_board_is_resuming(void)\n \n \tif (pmic_reg_read(pmic, K3_LPM_SCRATCH_PAD_REG) == K3_LPM_MAGIC_SUSPEND) {\n \t\tdebug(\"%s: board is resuming\\n\", __func__);\n+\t\tlpm_scratch->wake_src = LPM_WAKE_SOURCE_PMIC_GPIO;\n \t\tgd_set_k3_resuming(K3_RESUME_STATE_RESUMING);\n \n \t\t/* clean magic suspend */\n@@ -122,6 +129,8 @@ bool j7xx_board_is_resuming(void)\n \t\t\tprintf(\"Failed to clean magic value for suspend detection in PMIC\\n\");\n \t} else {\n \t\tdebug(\"%s: board is booting (no resume detected)\\n\", __func__);\n+\t\tlpm_scratch->wake_src = 0;\n+\t\tlpm_scratch->reserved = 0;\n \t\tgd_set_k3_resuming(K3_RESUME_STATE_BOOTING);\n \t}\n end:\n", "prefixes": [ "18/20" ] }