summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2026-01-13 09:26:42 +0200
committerSasha Levin <sashal@kernel.org>2026-03-04 07:19:33 -0500
commit0d9cdb7030653d71b3481decdb947b66b04a6386 (patch)
tree3dc3e3ff14aabf5d9ffe8fed8e4562f5dbeba9f2 /drivers/i3c
parent33f51b058c139f7e34869bcc6f4aafa975907cfd (diff)
downloadlinux-0d9cdb7030653d71b3481decdb947b66b04a6386.tar.gz
linux-0d9cdb7030653d71b3481decdb947b66b04a6386.tar.bz2
linux-0d9cdb7030653d71b3481decdb947b66b04a6386.zip
i3c: mipi-i3c-hci: Reset RING_OPERATION1 fields during init
[ Upstream commit 78f63ae4a82db173f93adca462e63d11ba06b126 ] The MIPI I3C HCI specification does not define reset values for RING_OPERATION1 fields, and some controllers (e.g., Intel) do not clear them during a software reset. Ensure the ring pointers are explicitly set to zero during bus initialization to avoid inconsistent state. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260113072702.16268-2-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master/mipi-i3c-hci/dma.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i3c/master/mipi-i3c-hci/dma.c b/drivers/i3c/master/mipi-i3c-hci/dma.c
index c401a9425cdc..951abfea5a6f 100644
--- a/drivers/i3c/master/mipi-i3c-hci/dma.c
+++ b/drivers/i3c/master/mipi-i3c-hci/dma.c
@@ -342,6 +342,14 @@ static int hci_dma_init(struct i3c_hci *hci)
rh_reg_write(INTR_SIGNAL_ENABLE, regval);
ring_ready:
+ /*
+ * The MIPI I3C HCI specification does not document reset values for
+ * RING_OPERATION1 fields and some controllers (e.g. Intel controllers)
+ * do not reset the values, so ensure the ring pointers are set to zero
+ * here.
+ */
+ rh_reg_write(RING_OPERATION1, 0);
+
rh_reg_write(RING_CONTROL, RING_CTRL_ENABLE |
RING_CTRL_RUN_STOP);
}