From: Stanley Chu <stanley.chuys@gmail.com>
To: frank.li@nxp.com, miquel.raynal@bootlin.com,
alexandre.belloni@bootlin.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
linux-i3c@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
tomer.maimon@nuvoton.com, kwliu@nuvoton.com, yschu@nuvoton.com,
Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v5 5/5] i3c: master: svc: Fix npcm845 DAA process corruption
Date: Thu, 27 Feb 2025 14:01:31 +0800 [thread overview]
Message-ID: <20250227060131.2206860-6-yschu@nuvoton.com> (raw)
In-Reply-To: <20250227060131.2206860-1-yschu@nuvoton.com>
From: Stanley Chu <yschu@nuvoton.com>
When MCONFIG.SKEW=0 and MCONFIG.ODHPP=0, the ENTDAA transaction gets
corrupted and results in a no repeated-start condition at the end of
address assignment.
Workaround: Set MCONFIG.SKEW to 1 before initiating the DAA process.
After the DAA process is completed, return MCONFIG.SKEW to its previous
value.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
---
drivers/i3c/master/svc-i3c-master.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 952afc75f6e4..774f94ee761c 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1169,7 +1169,16 @@ static int svc_i3c_master_do_daa(struct i3c_master_controller *m)
}
spin_lock_irqsave(&master->xferqueue.lock, flags);
+
+ if (svc_has_daa_corrupt(master))
+ writel(master->mctrl_config | SVC_I3C_MCONFIG_SKEW(1),
+ master->regs + SVC_I3C_MCONFIG);
+
ret = svc_i3c_master_do_daa_locked(master, addrs, &dev_nb);
+
+ if (svc_has_daa_corrupt(master))
+ writel(master->mctrl_config, master->regs + SVC_I3C_MCONFIG);
+
spin_unlock_irqrestore(&master->xferqueue.lock, flags);
svc_i3c_master_clear_merrwarn(master);
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
prev parent reply other threads:[~2025-02-27 6:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 6:01 [PATCH v5 0/5] Add support for Nuvoton npcm845 i3c controller Stanley Chu
2025-02-27 6:01 ` [PATCH v5 1/5] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
2025-02-27 6:01 ` [PATCH v5 2/5] i3c: master: svc: Add support for Nuvoton npcm845 i3c Stanley Chu
2025-02-27 17:11 ` Frank Li
2025-02-27 6:01 ` [PATCH v5 3/5] i3c: master: svc: Fix npcm845 FIFO empty issue Stanley Chu
2025-02-27 17:23 ` Frank Li
2025-03-03 19:48 ` Frank Li
2025-02-27 6:01 ` [PATCH v5 4/5] i3c: master: svc: Fix npcm845 invalid slvstart event Stanley Chu
2025-02-27 6:01 ` Stanley Chu [this message]
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=20250227060131.2206860-6-yschu@nuvoton.com \
--to=stanley.chuys@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frank.li@nxp.com \
--cc=krzk+dt@kernel.org \
--cc=kwliu@nuvoton.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=robh@kernel.org \
--cc=tomer.maimon@nuvoton.com \
--cc=yschu@nuvoton.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