* [PATCH RESEND v2 0/4] Add support for Nuvoton npcm845 i3c controller
@ 2025-02-21 6:35 Stanley Chu
2025-02-21 6:35 ` [PATCH v3 1/4] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Stanley Chu @ 2025-02-21 6:35 UTC (permalink / raw)
To: frank.li, miquel.raynal, alexandre.belloni, robh, krzk+dt,
conor+dt, linux-i3c
Cc: linux-kernel, devicetree, tomer.maimon, kwliu, yschu
This patchset adds support for the Nuvoton npcm845
Board Management controller (BMC) SoC family.
The Nuvoton npcm845 uses the same Silvico IP but an older version.
This patchset adds fixes for the npcm845 specific hardware issues.
--
v3:
- Add more description in dt-binging commit message
- Add the svc_i3c_drvdata structure in struct svc_i3c_master
- Improve the do_daa
---
v2:
- Add a new compatible string in dt-binding doc.
- Add driver data for npcm845 to address the quirks.
- Modify svc_i3c_master_write to be reused by SVC_I3C_QUIRK_FIFO_EMPTY fix.
- Fix typo of SVC_I3C_QUIRK_FALSE_SLVSTART fix.
- Remove the code changes in svc_i3c_master_do_daa_locked, will add it in
another patch series for common improvement.
---
Stanley Chu (4):
dt-bindings: i3c: silvaco: Add npcm845 compatible string
i3c: master: svc: Add support for Nuvoton npcm845 i3c
i3c: master: svc: Fix npcm845 FIFO empty issue
i3c: master: svc: Fix npcm845 invalid slvstart event
.../bindings/i3c/silvaco,i3c-master.yaml | 4 +-
drivers/i3c/master/svc-i3c-master.c | 57 +++++++++++++++++--
2 files changed, 56 insertions(+), 5 deletions(-)
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/4] dt-bindings: i3c: silvaco: Add npcm845 compatible string
2025-02-21 6:35 [PATCH RESEND v2 0/4] Add support for Nuvoton npcm845 i3c controller Stanley Chu
@ 2025-02-21 6:35 ` Stanley Chu
2025-02-21 9:44 ` Krzysztof Kozlowski
2025-02-21 6:35 ` [PATCH v3 2/4] i3c: master: svc: Add support for Nuvoton npcm845 i3c Stanley Chu
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Stanley Chu @ 2025-02-21 6:35 UTC (permalink / raw)
To: frank.li, miquel.raynal, alexandre.belloni, robh, krzk+dt,
conor+dt, linux-i3c
Cc: linux-kernel, devicetree, tomer.maimon, kwliu, yschu
From: Stanley Chu <yschu@nuvoton.com>
Nuvoton npcm845 SoC uses the same Silvico IP but an older version.
Need to add a new compatible string to distinguish between different
hardware versions.
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
---
Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml b/Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml
index c56ff77677f1..4fbdcdac0aee 100644
--- a/Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml
+++ b/Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml
@@ -14,7 +14,9 @@ allOf:
properties:
compatible:
- const: silvaco,i3c-master-v1
+ enum:
+ - nuvoton,npcm845-i3c
+ - silvaco,i3c-master-v1
reg:
maxItems: 1
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/4] i3c: master: svc: Add support for Nuvoton npcm845 i3c
2025-02-21 6:35 [PATCH RESEND v2 0/4] Add support for Nuvoton npcm845 i3c controller Stanley Chu
2025-02-21 6:35 ` [PATCH v3 1/4] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
@ 2025-02-21 6:35 ` Stanley Chu
2025-02-22 7:59 ` kernel test robot
2025-02-21 6:35 ` [PATCH v3 3/4] i3c: master: svc: Fix npcm845 FIFO empty issue Stanley Chu
2025-02-21 6:35 ` [PATCH v3 4/4] i3c: master: svc: Fix npcm845 invalid slvstart event Stanley Chu
3 siblings, 1 reply; 7+ messages in thread
From: Stanley Chu @ 2025-02-21 6:35 UTC (permalink / raw)
To: frank.li, miquel.raynal, alexandre.belloni, robh, krzk+dt,
conor+dt, linux-i3c
Cc: linux-kernel, devicetree, tomer.maimon, kwliu, yschu
From: Stanley Chu <yschu@nuvoton.com>
Nuvoton npcm845 SoC uses the same Silvico IP but an older version.
Add npcm845 specific quirks.
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
---
drivers/i3c/master/svc-i3c-master.c | 32 +++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index d6057d8c7dec..1e7e3e1f3d22 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -133,6 +133,22 @@
#define SVC_I3C_EVENT_IBI GENMASK(7, 0)
#define SVC_I3C_EVENT_HOTJOIN BIT(31)
+/*
+ * SVC_I3C_QUIRK_FIFO_EMPTY:
+ * I3C HW stalls the write transfer if the transmit FIFO becomes empty,
+ * when new data is written to FIFO, I3C HW resumes the transfer but
+ * the first transmitted data bit may have the wrong value.
+ * Workaround:
+ * Fill the FIFO in advance to prevent FIFO from becoming empty.
+ */
+#define SVC_I3C_QUIRK_FIFO_EMPTY BIT(0)
+/*
+ * SVC_I3C_QUIRK_FLASE_SLVSTART:
+ * I3C HW may generate an invalid SlvStart event when emitting a STOP.
+ * If it is a true SlvStart, the MSTATUS state is SLVREQ.
+ */
+#define SVC_I3C_QUIRK_FALSE_SLVSTART BIT(1)
+
struct svc_i3c_cmd {
u8 addr;
bool rnw;
@@ -158,6 +174,10 @@ struct svc_i3c_regs_save {
u32 mdynaddr;
};
+struct svc_i3c_drvdata {
+ u32 quirks;
+};
+
/**
* struct svc_i3c_master - Silvaco I3C Master structure
* @base: I3C master controller
@@ -214,6 +234,7 @@ struct svc_i3c_master {
spinlock_t lock;
} ibi;
struct mutex lock;
+ const struct svc_i3c_drvdata *drvdata;
u32 enabled_events;
u32 mctrl_config;
};
@@ -230,6 +251,15 @@ struct svc_i3c_i2c_dev_data {
struct i3c_generic_ibi_pool *ibi_pool;
};
+const struct svc_i3c_drvdata npcm845_drvdata = {
+ .quirks = SVC_I3C_QUIRK_FIFO_EMPTY | SVC_I3C_QUIRK_FALSE_SLVSTART,
+};
+
+static inline bool svc_has_quirk(struct svc_i3c_master *master, u32 quirk)
+{
+ return (master->drvdata && (master->drvdata->quirks & quirk));
+}
+
static inline bool is_events_enabled(struct svc_i3c_master *master, u32 mask)
{
return !!(master->enabled_events & mask);
@@ -1868,6 +1898,7 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, master);
+ master->drvdata = of_device_get_match_data(dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, SVC_I3C_PM_TIMEOUT_MS);
pm_runtime_use_autosuspend(&pdev->dev);
@@ -1960,6 +1991,7 @@ static const struct dev_pm_ops svc_i3c_pm_ops = {
static const struct of_device_id svc_i3c_master_of_match_tbl[] = {
{ .compatible = "silvaco,i3c-master-v1"},
+ { .compatible = "nuvoton,npcm845-i3c", .data = &npcm845_drvdata },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, svc_i3c_master_of_match_tbl);
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 3/4] i3c: master: svc: Fix npcm845 FIFO empty issue
2025-02-21 6:35 [PATCH RESEND v2 0/4] Add support for Nuvoton npcm845 i3c controller Stanley Chu
2025-02-21 6:35 ` [PATCH v3 1/4] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
2025-02-21 6:35 ` [PATCH v3 2/4] i3c: master: svc: Add support for Nuvoton npcm845 i3c Stanley Chu
@ 2025-02-21 6:35 ` Stanley Chu
2025-02-21 6:35 ` [PATCH v3 4/4] i3c: master: svc: Fix npcm845 invalid slvstart event Stanley Chu
3 siblings, 0 replies; 7+ messages in thread
From: Stanley Chu @ 2025-02-21 6:35 UTC (permalink / raw)
To: frank.li, miquel.raynal, alexandre.belloni, robh, krzk+dt,
conor+dt, linux-i3c
Cc: linux-kernel, devicetree, tomer.maimon, kwliu, yschu
From: Stanley Chu <yschu@nuvoton.com>
I3C HW stalls the write transfer if the transmit FIFO becomes empty,
when new data is written to FIFO, I3C HW resumes the transfer but the
first transmitted data bit may have the wrong value.
Fill the FIFO in advance to prevent FIFO from becoming empty.
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
---
drivers/i3c/master/svc-i3c-master.c | 43 +++++++++++++++++++++--------
1 file changed, 31 insertions(+), 12 deletions(-)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 1e7e3e1f3d22..7919a49e97c7 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -921,6 +921,7 @@ static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
unsigned int dev_nb = 0, last_addr = 0;
u32 reg;
int ret, i;
+ u32 dyn_addr;
while (true) {
/* clean SVC_I3C_MINT_IBIWON w1c bits */
@@ -961,6 +962,17 @@ static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
if (SVC_I3C_MSTATUS_RXPEND(reg)) {
u8 data[6];
+ /*
+ * Filling the dynamic address in advance can avoid SCL clock stalls
+ * and also fix the SVC_I3C_QUIRK_FIFO_EMPTY quirk.
+ */
+ dyn_addr = i3c_master_get_free_addr(&master->base, last_addr + 1);
+ if (dyn_addr < 0) {
+ ret = -ENOSPC;
+ break;
+ }
+ writel(dyn_addr, master->regs + SVC_I3C_MWDATAB);
+
/*
* We only care about the 48-bit provisioned ID yet to
* be sure a device does not nack an address twice.
@@ -1039,21 +1051,16 @@ static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
if (ret)
break;
- /* Give the slave device a suitable dynamic address */
- ret = i3c_master_get_free_addr(&master->base, last_addr + 1);
- if (ret < 0)
- break;
-
- addrs[dev_nb] = ret;
+ addrs[dev_nb] = dyn_addr;
dev_dbg(master->dev, "DAA: device %d assigned to 0x%02x\n",
dev_nb, addrs[dev_nb]);
-
- writel(addrs[dev_nb], master->regs + SVC_I3C_MWDATAB);
last_addr = addrs[dev_nb++];
}
/* Need manual issue STOP except for Complete condition */
svc_i3c_master_emit_stop(master);
+ svc_i3c_master_flush_fifo(master);
+
return ret;
}
@@ -1201,8 +1208,8 @@ static int svc_i3c_master_read(struct svc_i3c_master *master,
return offset;
}
-static int svc_i3c_master_write(struct svc_i3c_master *master,
- const u8 *out, unsigned int len)
+static int svc_i3c_master_write(struct svc_i3c_master *master, const u8 *out,
+ unsigned int len, bool last)
{
int offset = 0, ret;
u32 mdctrl;
@@ -1219,7 +1226,7 @@ static int svc_i3c_master_write(struct svc_i3c_master *master,
* The last byte to be sent over the bus must either have the
* "end" bit set or be written in MWDATABE.
*/
- if (likely(offset < (len - 1)))
+ if (likely(offset < (len - 1)) || !last)
writel(out[offset++], master->regs + SVC_I3C_MWDATAB);
else
writel(out[offset++], master->regs + SVC_I3C_MWDATABE);
@@ -1250,6 +1257,17 @@ static int svc_i3c_master_xfer(struct svc_i3c_master *master,
SVC_I3C_MCTRL_RDTERM(*actual_len),
master->regs + SVC_I3C_MCTRL);
+ if (svc_has_quirk(master, SVC_I3C_QUIRK_FIFO_EMPTY) && !rnw && xfer_len) {
+ u32 len = min_t(u32, xfer_len, SVC_I3C_FIFO_SIZE);
+
+ ret = svc_i3c_master_write(master, out, len,
+ xfer_len <= SVC_I3C_FIFO_SIZE);
+ if (ret < 0)
+ goto emit_stop;
+ xfer_len -= len;
+ out += len;
+ }
+
ret = readl_poll_timeout(master->regs + SVC_I3C_MSTATUS, reg,
SVC_I3C_MSTATUS_MCTRLDONE(reg), 0, 1000);
if (ret)
@@ -1311,7 +1329,7 @@ static int svc_i3c_master_xfer(struct svc_i3c_master *master,
if (rnw)
ret = svc_i3c_master_read(master, in, xfer_len);
else
- ret = svc_i3c_master_write(master, out, xfer_len);
+ ret = svc_i3c_master_write(master, out, xfer_len, true);
if (ret < 0)
goto emit_stop;
@@ -1338,6 +1356,7 @@ static int svc_i3c_master_xfer(struct svc_i3c_master *master,
emit_stop:
svc_i3c_master_emit_stop(master);
svc_i3c_master_clear_merrwarn(master);
+ svc_i3c_master_flush_fifo(master);
return ret;
}
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 4/4] i3c: master: svc: Fix npcm845 invalid slvstart event
2025-02-21 6:35 [PATCH RESEND v2 0/4] Add support for Nuvoton npcm845 i3c controller Stanley Chu
` (2 preceding siblings ...)
2025-02-21 6:35 ` [PATCH v3 3/4] i3c: master: svc: Fix npcm845 FIFO empty issue Stanley Chu
@ 2025-02-21 6:35 ` Stanley Chu
3 siblings, 0 replies; 7+ messages in thread
From: Stanley Chu @ 2025-02-21 6:35 UTC (permalink / raw)
To: frank.li, miquel.raynal, alexandre.belloni, robh, krzk+dt,
conor+dt, linux-i3c
Cc: linux-kernel, devicetree, tomer.maimon, kwliu, yschu, Frank Li
From: Stanley Chu <yschu@nuvoton.com>
I3C HW may generate an invalid SlvStart event when emitting a STOP.
If it is a true SlvStart, the MSTATUS state is SLVREQ. Check the
MSTATUS state to ignore the false event.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
---
drivers/i3c/master/svc-i3c-master.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 7919a49e97c7..fca4848d02e5 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -58,6 +58,7 @@
#define SVC_I3C_MSTATUS 0x088
#define SVC_I3C_MSTATUS_STATE(x) FIELD_GET(GENMASK(2, 0), (x))
#define SVC_I3C_MSTATUS_STATE_DAA(x) (SVC_I3C_MSTATUS_STATE(x) == 5)
+#define SVC_I3C_MSTATUS_STATE_SLVREQ(x) (SVC_I3C_MSTATUS_STATE(x) == 1)
#define SVC_I3C_MSTATUS_STATE_IDLE(x) (SVC_I3C_MSTATUS_STATE(x) == 0)
#define SVC_I3C_MSTATUS_BETWEEN(x) FIELD_GET(BIT(4), (x))
#define SVC_I3C_MSTATUS_NACKED(x) FIELD_GET(BIT(5), (x))
@@ -594,6 +595,11 @@ static irqreturn_t svc_i3c_master_irq_handler(int irq, void *dev_id)
/* Clear the interrupt status */
writel(SVC_I3C_MINT_SLVSTART, master->regs + SVC_I3C_MSTATUS);
+ /* Ignore the false event */
+ if (svc_has_quirk(master, SVC_I3C_QUIRK_FALSE_SLVSTART) &&
+ !SVC_I3C_MSTATUS_STATE_SLVREQ(active))
+ return IRQ_HANDLED;
+
svc_i3c_master_disable_interrupts(master);
/* Handle the interrupt in a non atomic context */
--
2.34.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/4] dt-bindings: i3c: silvaco: Add npcm845 compatible string
2025-02-21 6:35 ` [PATCH v3 1/4] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
@ 2025-02-21 9:44 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-21 9:44 UTC (permalink / raw)
To: Stanley Chu
Cc: frank.li, miquel.raynal, alexandre.belloni, robh, krzk+dt,
conor+dt, linux-i3c, linux-kernel, devicetree, tomer.maimon,
kwliu, yschu
On Fri, Feb 21, 2025 at 02:35:25PM +0800, Stanley Chu wrote:
> From: Stanley Chu <yschu@nuvoton.com>
>
> Nuvoton npcm845 SoC uses the same Silvico IP but an older version.
> Need to add a new compatible string to distinguish between different
> hardware versions.
>
> Signed-off-by: Stanley Chu <yschu@nuvoton.com>
> ---
> Documentation/devicetree/bindings/i3c/silvaco,i3c-master.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/4] i3c: master: svc: Add support for Nuvoton npcm845 i3c
2025-02-21 6:35 ` [PATCH v3 2/4] i3c: master: svc: Add support for Nuvoton npcm845 i3c Stanley Chu
@ 2025-02-22 7:59 ` kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-02-22 7:59 UTC (permalink / raw)
To: Stanley Chu, frank.li, miquel.raynal, alexandre.belloni, robh,
krzk+dt, conor+dt, linux-i3c
Cc: llvm, oe-kbuild-all, linux-kernel, devicetree, tomer.maimon,
kwliu, yschu
Hi Stanley,
kernel test robot noticed the following build warnings:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.14-rc3 next-20250221]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Stanley-Chu/dt-bindings-i3c-silvaco-Add-npcm845-compatible-string/20250221-143909
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20250221063528.1810007-3-yschu%40nuvoton.com
patch subject: [PATCH v3 2/4] i3c: master: svc: Add support for Nuvoton npcm845 i3c
config: arm-randconfig-003-20250222 (https://download.01.org/0day-ci/archive/20250222/202502221511.0BCyUyEU-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250222/202502221511.0BCyUyEU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502221511.0BCyUyEU-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/i3c/master/svc-i3c-master.c:240: warning: Function parameter or struct member 'drvdata' not described in 'svc_i3c_master'
vim +240 drivers/i3c/master/svc-i3c-master.c
28c82e7b13d49b1 Stanley Chu 2025-02-21 180
dd3c52846d5954a Miquel Raynal 2021-01-21 181 /**
dd3c52846d5954a Miquel Raynal 2021-01-21 182 * struct svc_i3c_master - Silvaco I3C Master structure
dd3c52846d5954a Miquel Raynal 2021-01-21 183 * @base: I3C master controller
dd3c52846d5954a Miquel Raynal 2021-01-21 184 * @dev: Corresponding device
dd3c52846d5954a Miquel Raynal 2021-01-21 185 * @regs: Memory mapping
5496eac6ad7428f Miquel Raynal 2023-08-17 186 * @saved_regs: Volatile values for PM operations
dd3c52846d5954a Miquel Raynal 2021-01-21 187 * @free_slots: Bit array of available slots
dd3c52846d5954a Miquel Raynal 2021-01-21 188 * @addrs: Array containing the dynamic addresses of each attached device
dd3c52846d5954a Miquel Raynal 2021-01-21 189 * @descs: Array of descriptors, one per attached device
dd3c52846d5954a Miquel Raynal 2021-01-21 190 * @hj_work: Hot-join work
dd3c52846d5954a Miquel Raynal 2021-01-21 191 * @ibi_work: IBI work
dd3c52846d5954a Miquel Raynal 2021-01-21 192 * @irq: Main interrupt
dd3c52846d5954a Miquel Raynal 2021-01-21 193 * @pclk: System clock
dd3c52846d5954a Miquel Raynal 2021-01-21 194 * @fclk: Fast clock (bus)
dd3c52846d5954a Miquel Raynal 2021-01-21 195 * @sclk: Slow clock (other events)
dd3c52846d5954a Miquel Raynal 2021-01-21 196 * @xferqueue: Transfer queue structure
dd3c52846d5954a Miquel Raynal 2021-01-21 197 * @xferqueue.list: List member
dd3c52846d5954a Miquel Raynal 2021-01-21 198 * @xferqueue.cur: Current ongoing transfer
dd3c52846d5954a Miquel Raynal 2021-01-21 199 * @xferqueue.lock: Queue lock
dd3c52846d5954a Miquel Raynal 2021-01-21 200 * @ibi: IBI structure
dd3c52846d5954a Miquel Raynal 2021-01-21 201 * @ibi.num_slots: Number of slots available in @ibi.slots
dd3c52846d5954a Miquel Raynal 2021-01-21 202 * @ibi.slots: Available IBI slots
dd3c52846d5954a Miquel Raynal 2021-01-21 203 * @ibi.tbq_slot: To be queued IBI slot
dd3c52846d5954a Miquel Raynal 2021-01-21 204 * @ibi.lock: IBI lock
6bf3fc268183816 Frank Li 2023-10-23 205 * @lock: Transfer lock, protect between IBI work thread and callbacks from master
05b26c31a4859af Frank Li 2023-12-01 206 * @enabled_events: Bit masks for enable events (IBI, HotJoin).
20ade67bb1645f5 Carlos Song 2024-09-10 207 * @mctrl_config: Configuration value in SVC_I3C_MCTRL for setting speed back.
dd3c52846d5954a Miquel Raynal 2021-01-21 208 */
dd3c52846d5954a Miquel Raynal 2021-01-21 209 struct svc_i3c_master {
dd3c52846d5954a Miquel Raynal 2021-01-21 210 struct i3c_master_controller base;
dd3c52846d5954a Miquel Raynal 2021-01-21 211 struct device *dev;
dd3c52846d5954a Miquel Raynal 2021-01-21 212 void __iomem *regs;
1c5ee2a77b1bacd Clark Wang 2023-05-17 213 struct svc_i3c_regs_save saved_regs;
dd3c52846d5954a Miquel Raynal 2021-01-21 214 u32 free_slots;
dd3c52846d5954a Miquel Raynal 2021-01-21 215 u8 addrs[SVC_I3C_MAX_DEVS];
dd3c52846d5954a Miquel Raynal 2021-01-21 216 struct i3c_dev_desc *descs[SVC_I3C_MAX_DEVS];
dd3c52846d5954a Miquel Raynal 2021-01-21 217 struct work_struct hj_work;
dd3c52846d5954a Miquel Raynal 2021-01-21 218 struct work_struct ibi_work;
dd3c52846d5954a Miquel Raynal 2021-01-21 219 int irq;
dd3c52846d5954a Miquel Raynal 2021-01-21 220 struct clk *pclk;
dd3c52846d5954a Miquel Raynal 2021-01-21 221 struct clk *fclk;
dd3c52846d5954a Miquel Raynal 2021-01-21 222 struct clk *sclk;
dd3c52846d5954a Miquel Raynal 2021-01-21 223 struct {
dd3c52846d5954a Miquel Raynal 2021-01-21 224 struct list_head list;
dd3c52846d5954a Miquel Raynal 2021-01-21 225 struct svc_i3c_xfer *cur;
dd3c52846d5954a Miquel Raynal 2021-01-21 226 /* Prevent races between transfers */
dd3c52846d5954a Miquel Raynal 2021-01-21 227 spinlock_t lock;
dd3c52846d5954a Miquel Raynal 2021-01-21 228 } xferqueue;
dd3c52846d5954a Miquel Raynal 2021-01-21 229 struct {
dd3c52846d5954a Miquel Raynal 2021-01-21 230 unsigned int num_slots;
dd3c52846d5954a Miquel Raynal 2021-01-21 231 struct i3c_dev_desc **slots;
dd3c52846d5954a Miquel Raynal 2021-01-21 232 struct i3c_ibi_slot *tbq_slot;
dd3c52846d5954a Miquel Raynal 2021-01-21 233 /* Prevent races within IBI handlers */
dd3c52846d5954a Miquel Raynal 2021-01-21 234 spinlock_t lock;
dd3c52846d5954a Miquel Raynal 2021-01-21 235 } ibi;
6bf3fc268183816 Frank Li 2023-10-23 236 struct mutex lock;
28c82e7b13d49b1 Stanley Chu 2025-02-21 237 const struct svc_i3c_drvdata *drvdata;
25bc99be5fe5385 Frank Li 2024-11-01 238 u32 enabled_events;
20ade67bb1645f5 Carlos Song 2024-09-10 239 u32 mctrl_config;
dd3c52846d5954a Miquel Raynal 2021-01-21 @240 };
dd3c52846d5954a Miquel Raynal 2021-01-21 241
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-22 8:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 6:35 [PATCH RESEND v2 0/4] Add support for Nuvoton npcm845 i3c controller Stanley Chu
2025-02-21 6:35 ` [PATCH v3 1/4] dt-bindings: i3c: silvaco: Add npcm845 compatible string Stanley Chu
2025-02-21 9:44 ` Krzysztof Kozlowski
2025-02-21 6:35 ` [PATCH v3 2/4] i3c: master: svc: Add support for Nuvoton npcm845 i3c Stanley Chu
2025-02-22 7:59 ` kernel test robot
2025-02-21 6:35 ` [PATCH v3 3/4] i3c: master: svc: Fix npcm845 FIFO empty issue Stanley Chu
2025-02-21 6:35 ` [PATCH v3 4/4] i3c: master: svc: Fix npcm845 invalid slvstart event Stanley Chu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox