From: Jisheng Zhang <jszhang@kernel.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Frank Li <Frank.Li@nxp.com>
Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] i3c: dw: Add apb reset support
Date: Sun, 2 Nov 2025 18:02:37 +0800 [thread overview]
Message-ID: <20251102100237.9451-1-jszhang@kernel.org> (raw)
Add support of apb reset which is to reset the APB interface.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/i3c/master/dw-i3c-master.c | 9 +++++++++
drivers/i3c/master/dw-i3c-master.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 9ceedf09c3b6..ca2863d2b2b7 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -1558,7 +1558,13 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
if (IS_ERR(master->core_rst))
return PTR_ERR(master->core_rst);
+ master->apb_rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
+ "apb_rst");
+ if (IS_ERR(master->apb_rst))
+ return PTR_ERR(master->apb_rst);
+
reset_control_deassert(master->core_rst);
+ reset_control_deassert(master->apb_rst);
spin_lock_init(&master->xferqueue.lock);
INIT_LIST_HEAD(&master->xferqueue.list);
@@ -1607,6 +1613,7 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
err_assert_rst:
reset_control_assert(master->core_rst);
+ reset_control_assert(master->apb_rst);
return ret;
}
@@ -1711,6 +1718,7 @@ static int __maybe_unused dw_i3c_master_runtime_suspend(struct device *dev)
dw_i3c_master_disable(master);
reset_control_assert(master->core_rst);
+ reset_control_assert(master->apb_rst);
dw_i3c_master_disable_clks(master);
pinctrl_pm_select_sleep_state(dev);
return 0;
@@ -1723,6 +1731,7 @@ static int __maybe_unused dw_i3c_master_runtime_resume(struct device *dev)
pinctrl_pm_select_default_state(dev);
dw_i3c_master_enable_clks(master);
reset_control_deassert(master->core_rst);
+ reset_control_deassert(master->apb_rst);
dw_i3c_master_set_intr_regs(master);
dw_i3c_master_restore_timing_regs(master);
diff --git a/drivers/i3c/master/dw-i3c-master.h b/drivers/i3c/master/dw-i3c-master.h
index c5cb695c16ab..a4ba60043288 100644
--- a/drivers/i3c/master/dw-i3c-master.h
+++ b/drivers/i3c/master/dw-i3c-master.h
@@ -37,6 +37,7 @@ struct dw_i3c_master {
struct dw_i3c_master_caps caps;
void __iomem *regs;
struct reset_control *core_rst;
+ struct reset_control *apb_rst;
struct clk *core_clk;
struct clk *pclk;
char version[5];
--
2.51.0
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next reply other threads:[~2025-11-02 10:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-02 10:02 Jisheng Zhang [this message]
2025-11-03 15:44 ` [PATCH] i3c: dw: Add apb reset support Frank Li
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=20251102100237.9451-1-jszhang@kernel.org \
--to=jszhang@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).