Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2230941/?format=api
{ "id": 2230941, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2230941/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260430084414.1354490-14-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-14-richard.genoud@bootlin.com>", "list_archive_url": null, "date": "2026-04-30T08:44:06", "name": "[13/20] arm: mach-k3: j784s4: Enable LPM resume flow for J784s4/J742s2 SOCs", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "46db8f2f261aba688f7bb5f00b12125a2fa7993f", "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-14-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/2230941/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2230941/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=zKAS9NRu;\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=\"zKAS9NRu\";\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 4g5npR3qjjz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 18:46:39 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 8F30D846C1;\n\tThu, 30 Apr 2026 10:45:09 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id F3994846B1; Thu, 30 Apr 2026 10:45:07 +0200 (CEST)", "from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116])\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 4F87A846C0\n for <u-boot@lists.denx.de>; Thu, 30 Apr 2026 10:45:02 +0200 (CEST)", "from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n by smtpout-04.galae.net (Postfix) with ESMTPS id 61744C5CD69;\n Thu, 30 Apr 2026 08:45:46 +0000 (UTC)", "from mail.galae.net (mail.galae.net [212.83.136.155])\n by smtpout-01.galae.net (Postfix) with ESMTPS id D812D60495;\n Thu, 30 Apr 2026 08:45:01 +0000 (UTC)", "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 2FC771072B7AC;\n Thu, 30 Apr 2026 10:44:57 +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=1777538700; h=from:subject:date:message-id:to:cc:mime-version:\n content-transfer-encoding:in-reply-to:references;\n bh=tzNlnAlINfqftKYoXhRgCc9o569KQM9KDfWD5YBwQQY=;\n b=zKAS9NRuzhXLAVNfdRA3DMr07HOHaGuJG3/H1raXTc2w6HeDqMpuC2Ex9NLBTNpSh5fhMN\n R255tTpdQCTn2wDlOXO9O36SO2VbYxaSe++v0cxKbKP5tYjSLCDKrZylQDOZrP+wk08ctD\n Wa0So6uxQYtwbD8Rd8IFpXnTC1LEZLdmlvJ5V7MkuaE5jq/LDL2jcW0Pol1VjqQ+xsfWrL\n St1UqjtBvak/LRplTMC9I7ig7lVPFFxgGe5g2Lwho6wbxJIsFIOJeQG9rNhkUPUmOV3CIw\n A875eskyGRRGhE7XE0qzHtRO96U8lUPCy1pds8QObvn+mjecVHao2M3qcmpuBA==", "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 13/20] arm: mach-k3: j784s4: Enable LPM resume flow for\n J784s4/J742s2 SOCs", "Date": "Thu, 30 Apr 2026 10:44:06 +0200", "Message-ID": "<20260430084414.1354490-14-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": "Add support for resuming from suspend in board_init_f.\nThe resume state of the SOC is identified and lpm resume\nsequence is followed accordingly.\n\nFirst, add the board specific part of the exit retention sequence for\nk3-ddrss following the DDR resume sequence:\n - exit DDR from retention\n - de-assert the DDR_RET pin\n - restore DDR max frequency\n - exit DDR from low power\n\nThe self-refresh exit sequence is performed in a loop for each DDR\ncontroller. (J784S4 has 4 DDR controllers and J742S2 has only 2)\n\nSelect the number of ddr controllers on the basis of\nCONFIG_TARGET_J742S2_R5_EVM build flag.\n\nThen:\n - Extract context address from devicetree and send to TIFS.\n - Power on the rproc cluster.\n - Replay the certificates attached to saved images of ATF and OPTEE.\n - Resume sequence for context restore and rproc resume.\n - Image entry to DM firmware.\n(All those steps are done in do_resume())\n\nThe context address area is firewalled by TIFS to protect it from\nother hosts.\n\nCo-developed-by: Gregory CLEMENT (TI) <gregory.clement@bootlin.com>\nSigned-off-by: Gregory CLEMENT (TI) <gregory.clement@bootlin.com>\nSigned-off-by: Thomas Richard (TI) <thomas.richard@bootlin.com>\nCo-developed-by: Prasanth Babu Mantena <p-mantena@ti.com>\nSigned-off-by: Prasanth Babu Mantena <p-mantena@ti.com>\nCo-developed-by: Abhash Kumar Jha <a-kumar2@ti.com>\nSigned-off-by: Abhash Kumar Jha <a-kumar2@ti.com>\nSigned-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>\n---\n arch/arm/mach-k3/j784s4/j784s4_init.c | 70 ++++++++++++++++++++++++++-\n board/ti/j784s4/evm.c | 3 +-\n 2 files changed, 70 insertions(+), 3 deletions(-)", "diff": "diff --git a/arch/arm/mach-k3/j784s4/j784s4_init.c b/arch/arm/mach-k3/j784s4/j784s4_init.c\nindex 53f152ccd9c6..5646d41a59f4 100644\n--- a/arch/arm/mach-k3/j784s4/j784s4_init.c\n+++ b/arch/arm/mach-k3/j784s4/j784s4_init.c\n@@ -18,11 +18,18 @@\n #include <mmc.h>\n #include <remoteproc.h>\n #include <k3_bist.h>\n+#include <power/pmic.h>\n+#include <mach/k3-ddr.h>\n \n #include \"../sysfw-loader.h\"\n #include \"../common.h\"\n+#include \"../lpm-common.h\"\n \n-#define J784S4_MAX_DDR_CONTROLLERS\t4\n+#if IS_ENABLED(CONFIG_TARGET_J742S2_R5_EVM)\n+#define MAX_DDR_CONTROLLERS\t2\n+#else\n+#define MAX_DDR_CONTROLLERS\t4\n+#endif\n \n #define CTRL_MMR_CFG0_AUDIO_REFCLK1_CTRL\t0x001082e4\n #define AUDIO_REFCLK1_DEFAULT\t\t\t0x1c\n@@ -264,26 +271,85 @@ void k3_spl_init(void)\n \t\tk3_dm_print_ver();\n }\n \n+#define DDR_RET_VAL BIT(5)\n+#define GPIO_OUT_1 0x3D\n+#define PMIC_NSLEEP_REG 0x86\n+\n+static void k3_deassert_DDR_RET(void)\n+{\n+\tstruct udevice *pmic;\n+\tint regval;\n+\tint err;\n+\n+\terr = uclass_get_device_by_name(UCLASS_PMIC,\n+\t\t\t\t\t\"pmic@48\", &pmic);\n+\tif (err) {\n+\t\tprintf(\"Getting PMIC init failed: %d\\n\", err);\n+\t\treturn;\n+\t}\n+\n+\t/* Set DDR_RET Signal Low on PMIC B */\n+\tregval = pmic_reg_read(pmic, GPIO_OUT_1) & ~DDR_RET_VAL;\n+\n+\tpmic_reg_write(pmic, GPIO_OUT_1, regval);\n+\tpmic_reg_write(pmic, PMIC_NSLEEP_REG, 0x3);\n+}\n+\n+__weak bool j7xx_board_is_resuming(void)\n+{\n+\treturn false;\n+}\n+\n void k3_mem_init(void)\n {\n \tstruct udevice *dev;\n \tint ret, ctrl = 0;\n \n \tif (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {\n+\t\tstruct udevice *devs[MAX_DDR_CONTROLLERS];\n+\t\tstruct k3_ddrss_regs regs[MAX_DDR_CONTROLLERS];\n+\n \t\tret = uclass_get_device(UCLASS_RAM, 0, &dev);\n \t\tif (ret)\n \t\t\tpanic(\"DRAM 0 init failed: %d\\n\", ret);\n+\n+\t\tdevs[0] = dev;\n \t\tctrl++;\n \n-\t\twhile (ctrl < J784S4_MAX_DDR_CONTROLLERS) {\n+\t\twhile (ctrl < MAX_DDR_CONTROLLERS) {\n \t\t\tret = uclass_next_device_err(&dev);\n \t\t\tif (ret == -ENODEV)\n \t\t\t\tbreak;\n \n \t\t\tif (ret)\n \t\t\t\tpanic(\"DRAM %d init failed: %d\\n\", ctrl, ret);\n+\t\t\tdevs[ctrl] = dev;\n \t\t\tctrl++;\n \t\t}\n+\n+\t\tif (j7xx_board_is_resuming()) {\n+\t\t\t/* exit DDRs from retention */\n+\t\t\tfor (ctrl = 0; ctrl < MAX_DDR_CONTROLLERS; ctrl++) {\n+\t\t\t\tk3_ddrss_lpddr4_exit_retention(devs[ctrl],\n+\t\t\t\t\t\t\t ®s[ctrl]);\n+\t\t\t}\n+\n+\t\t\t/* de-assert DDR_RET pin */\n+\t\t\tk3_deassert_DDR_RET();\n+\n+\t\t\t/* restore DDR max frequency */\n+\t\t\tfor (ctrl = 0; ctrl < MAX_DDR_CONTROLLERS; ctrl++)\n+\t\t\t\tk3_ddrss_lpddr4_change_freq(devs[ctrl]);\n+\n+\t\t\t/* exit DDR from low power */\n+\t\t\tfor (ctrl = 0; ctrl < MAX_DDR_CONTROLLERS; ctrl++) {\n+\t\t\t\tk3_ddrss_lpddr4_exit_low_power(devs[ctrl],\n+\t\t\t\t\t\t\t ®s[ctrl]);\n+\t\t\t}\n+\t\t\tprintf(\"Initialized %d DRAM controllers\\n\", ctrl);\n+\n+\t\t\tdo_resume();\n+\t\t}\n \t\tprintf(\"Initialized %d DRAM controllers\\n\", ctrl);\n \t}\n \ndiff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c\nindex 4a74024fe4fe..57c2f7018323 100644\n--- a/board/ti/j784s4/evm.c\n+++ b/board/ti/j784s4/evm.c\n@@ -63,7 +63,8 @@ int board_late_init(void)\n }\n #endif\n \n-#if (IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_TARGET_J784S4_R5_EVM))\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 /* in board_init_f(), there's no BSS, so we can't use global/static variables */\n bool j7xx_board_is_resuming(void)\n", "prefixes": [ "13/20" ] }