From: Udit Kumar <u-kumar1@ti.com>
To: <trini@konsulko.com>, <vigneshr@ti.com>
Cc: <n-francis@ti.com>, <u-boot@lists.denx.de>, <nm@ti.com>,
<m-chawdhry@ti.com>, <j-keerthy@ti.com>, <p-mantena@ti.com>,
<j-choudhary@ti.com>, Udit Kumar <u-kumar1@ti.com>
Subject: [PATCH 1/3] board: ti: j721s2: Initialize the ESM & PMIC ESM
Date: Tue, 26 Nov 2024 11:04:24 +0530 [thread overview]
Message-ID: <20241126053426.2627686-2-u-kumar1@ti.com> (raw)
In-Reply-To: <20241126053426.2627686-1-u-kumar1@ti.com>
From: Keerthy <j-keerthy@ti.com>
Initialize the 3 instances of SOC ESM & PMIC ESM.
This is needed for watchdog functionality.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
---
board/ti/j721s2/evm.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c
index 2cfeb3bec6c..9bcf67b7bfb 100644
--- a/board/ti/j721s2/evm.c
+++ b/board/ti/j721s2/evm.c
@@ -326,4 +326,27 @@ int board_late_init(void)
void spl_board_init(void)
{
+ struct udevice *dev;
+ int ret;
+
+ if (IS_ENABLED(CONFIG_ESM_K3)) {
+ const char * const esms[] = {"esm@700000", "esm@40800000", "esm@42080000"};
+
+ for (int i = 0; i < ARRAY_SIZE(esms); ++i) {
+ ret = uclass_get_device_by_name(UCLASS_MISC, esms[i],
+ &dev);
+ if (ret) {
+ printf("MISC init for %s failed: %d\n", esms[i], ret);
+ break;
+ }
+ }
+ }
+
+ if (IS_ENABLED(CONFIG_ESM_PMIC) && ret == 0) {
+ ret = uclass_get_device_by_driver(UCLASS_MISC,
+ DM_DRIVER_GET(pmic_esm),
+ &dev);
+ if (ret)
+ printf("ESM PMIC init failed: %d\n", ret);
+ }
}
--
2.34.1
next prev parent reply other threads:[~2024-11-26 5:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 5:34 [PATCH 0/3] J721S2: Enable ESMs and related PMIC Udit Kumar
2024-11-26 5:34 ` Udit Kumar [this message]
2024-11-26 5:34 ` [PATCH 2/3] arch: arm: dts: k3-j721s2-r5-common-proc-board: Add esm node Udit Kumar
2024-11-26 5:34 ` [PATCH 3/3] configs: j721s2_evm_r5_defconfig: Add ESM configs Udit Kumar
2024-12-13 23:16 ` [PATCH 0/3] J721S2: Enable ESMs and related PMIC Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241126053426.2627686-2-u-kumar1@ti.com \
--to=u-kumar1@ti.com \
--cc=j-choudhary@ti.com \
--cc=j-keerthy@ti.com \
--cc=m-chawdhry@ti.com \
--cc=n-francis@ti.com \
--cc=nm@ti.com \
--cc=p-mantena@ti.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox