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
Subject: [PATCH v4 5/5] i3c: master: svc: Fix npcm845 DAA process corruption
Date: Mon, 24 Feb 2025 16:39:08 +0800 [thread overview]
Message-ID: <20250224083908.1880383-6-yschu@nuvoton.com> (raw)
In-Reply-To: <20250224083908.1880383-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.
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 4eb4b8888725..403d625e999e 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1162,7 +1162,16 @@ static int svc_i3c_master_do_daa(struct i3c_master_controller *m)
}
spin_lock_irqsave(&master->xferqueue.lock, flags);
+
+ if (svc_has_quirk(master, SVC_I3C_QUIRK_DAA_CORRUPT))
+ 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_quirk(master, SVC_I3C_QUIRK_DAA_CORRUPT))
+ 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
next prev parent reply other threads:[~2025-02-24 8:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 8:39 [PATCH v4 0/5] Add support for Nuvoton npcm845 i3c controller Stanley Chu
2025-02-24 8:39 ` [PATCH v4 1/5] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
2025-02-24 16:18 ` Frank Li
2025-02-24 8:39 ` [PATCH v4 2/5] i3c: master: svc: Add support for Nuvoton npcm845 i3c Stanley Chu
2025-02-24 16:23 ` Frank Li
2025-02-24 8:39 ` [PATCH v4 3/5] i3c: master: svc: Fix npcm845 FIFO empty issue Stanley Chu
2025-02-24 16:32 ` Frank Li
2025-02-25 9:28 ` Stanley Chu
2025-02-25 16:32 ` Frank Li
2025-02-26 3:26 ` Stanley Chu
2025-02-26 16:53 ` Frank Li
2025-02-24 8:39 ` [PATCH v4 4/5] i3c: master: svc: Fix npcm845 invalid slvstart event Stanley Chu
2025-02-24 8:39 ` Stanley Chu [this message]
2025-02-24 16:35 ` [PATCH v4 5/5] i3c: master: svc: Fix npcm845 DAA process corruption Frank Li
2025-02-25 9:43 ` Markus Elfring
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=20250224083908.1880383-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