Skip to contentSkip to conversation

i3c: mipi-i3c-hci-pci: Define Multi-Bus Instances for Intel controllers

PATCH Applied Adrian Hunter 2 participants 14 messages Jan 6 – Jan 14 I3C

lore
Share & tools
lore
#0 lore raw

v4 cover i3c: mipi-i3c-hci-pci: Define Multi-Bus Instances for Intel controllers

Hi

All patches now have Frank's Rev'd-by

Changes in V4:

	Add Frank's Rev'd-by for patches 5 - 8, 10 - 11

Changes in V3:

A notable change in V3 is the introduction of patch 6 "Assign unique device names and IDs for Intel LPSS I3C" which does away with dynamic devid allocaion.

i3c: mipi-i3c-hci: Quieten initialization messages
Minor white space tweaks to fix alignment

i3c: mipi-i3c-hci-pci: Enable MSI support
Enhance commit message

i3c: mipi-i3c-hci-pci: Assign unique device names and IDs for Intel LPSS I3C
New patch

i3c: mipi-i3c-hci: Allow for Multi-Bus Instances
Enhance commit message

i3c: mipi-i3c-hci-pci: Pass base regs as platform data to i3c core device
Enhance commit message

i3c: mipi-i3c-hci-pci: Convert to MFD driver
Add Frank's Rev'd-by
Adjust for doing away with dynamic devid allocation

i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances
Make hci a parameter of mipi_i3c_hci_pci_alloc() Adjust for doing away with dynamic devid allocation Enhance commit message

i3c: mipi-i3c-hci-pci: Define Multi-Bus instances for supported controllers
Adjust for doing away with dynamic devid allocation

Changes in V2:
Add Frank's Rev'd-by for patches 1 - 3
Drop default driver data
New patches split from "i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances"
Conversion to MFD split into separate patch Simplify ID allocation / free
Correct use of __free()
Also define instance 0 in driver_data

Add support for MIPI I3C Host Controllers with the Multi-Bus Instance capability. These controllers can host multiple I3C buses (up to 15) within a single hardware function (e.g., PCIe B/D/F), providing one indepedent HCI register set and corresponding I3C bus controller logic per bus.

Add support for that to mipi-i3c-hci-pci and mipi-i3c-hci and define Multi-Bus Instances for Intel controllers.

There are also some tidy-up patches to start with.

Adrian Hunter (11):
i3c: mipi-i3c-hci: Remove duplicate blank lines
i3c: mipi-i3c-hci: Stop reading Extended Capabilities if capability ID is 0
i3c: mipi-i3c-hci: Quieten initialization messages
i3c: mipi-i3c-hci-pci: Do not repeatedly check for NULL driver_data
i3c: mipi-i3c-hci-pci: Enable MSI support
i3c: mipi-i3c-hci-pci: Assign unique device names and IDs for Intel LPSS I3C
i3c: mipi-i3c-hci: Allow for Multi-Bus Instances
i3c: mipi-i3c-hci-pci: Pass base regs as platform data to i3c core device
i3c: mipi-i3c-hci-pci: Convert to MFD driver
i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances
i3c: mipi-i3c-hci-pci: Define Multi-Bus instances for supported controllers

 drivers/i3c/master/Kconfig                         |   1 +
 drivers/i3c/master/mipi-i3c-hci/cmd_v1.c           |   2 -
 drivers/i3c/master/mipi-i3c-hci/cmd_v2.c           |   2 -
 drivers/i3c/master/mipi-i3c-hci/core.c             |  48 +++++--
 drivers/i3c/master/mipi-i3c-hci/dat_v1.c           |   1 -
 drivers/i3c/master/mipi-i3c-hci/dma.c              |   6 +-
 drivers/i3c/master/mipi-i3c-hci/ext_caps.c         |  58 ++++----
 drivers/i3c/master/mipi-i3c-hci/ext_caps.h         |   1 -
 drivers/i3c/master/mipi-i3c-hci/hci.h              |   5 -
 drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 160 +++++++++++++--------
 drivers/i3c/master/mipi-i3c-hci/pio.c              |  17 ++-
 include/linux/platform_data/mipi-i3c-hci.h         |  15 ++
 12 files changed, 185 insertions(+), 131 deletions(-)
 create mode 100644 include/linux/platform_data/mipi-i3c-hci.h

Regards
Adrian

Signature · 3 lines
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#1 lore raw

PATCH v4 1/11 i3c: mipi-i3c-hci: Remove duplicate blank lines

Remove duplicate blank lines from mipi-i3c-hci code.

---

Changes in V3 and V4:

None

Changes in V2:

Add Frank's Rev'd-by

 drivers/i3c/master/mipi-i3c-hci/cmd_v1.c   | 2 --
 drivers/i3c/master/mipi-i3c-hci/cmd_v2.c   | 2 --
 drivers/i3c/master/mipi-i3c-hci/core.c     | 2 --
 drivers/i3c/master/mipi-i3c-hci/dat_v1.c   | 1 -
 drivers/i3c/master/mipi-i3c-hci/dma.c      | 2 --
 drivers/i3c/master/mipi-i3c-hci/ext_caps.c | 1 -
 drivers/i3c/master/mipi-i3c-hci/ext_caps.h | 1 -
 drivers/i3c/master/mipi-i3c-hci/hci.h      | 5 -----
 drivers/i3c/master/mipi-i3c-hci/pio.c      | 1 -
 9 files changed, 17 deletions(-)
drivers/i3c/master/mipi-i3c-hci/cmd_v1.c +0 -2
index eb8a3ae2990d..fe260461e7e6 100644
@@ -15,7 +15,6 @@
 #include "dat.h"
 #include "dct.h"
 
-
 /*
  * Address Assignment Command
  */
@@ -100,7 +99,6 @@
 #define CMD_M0_VENDOR_INFO_PRESENT		   W0_BIT_( 7)
 #define CMD_M0_TID(v)			FIELD_PREP(W0_MASK( 6,  3), v)
 
-
 /* Data Transfer Speed and Mode */
 enum hci_cmd_mode {
 	MODE_I3C_SDR0		= 0x0,
drivers/i3c/master/mipi-i3c-hci/cmd_v2.c +0 -2
index efb4326a25b7..3729e6419581 100644
@@ -16,7 +16,6 @@
 #include "cmd.h"
 #include "xfer_mode_rate.h"
 
-
 /*
  * Unified Data Transfer Command
  */
@@ -62,7 +61,6 @@
 #define CMD_A0_ASSIGN_ADDRESS(v)	FIELD_PREP(W0_MASK( 14,   8), v)
 #define CMD_A0_TID(v)			FIELD_PREP(W0_MASK(  6,   3), v)
 
-
 static unsigned int get_i3c_rate_idx(struct i3c_hci *hci)
 {
 	struct i3c_bus *bus = i3c_master_get_bus(&hci->master);
drivers/i3c/master/mipi-i3c-hci/core.c +0 -2
index 607d77ab0e54..211321f73e02 100644
@@ -21,7 +21,6 @@
 #include "cmd.h"
 #include "dat.h"
 
-
 /*
  * Host Controller Capabilities and Operation Registers
  */
@@ -109,7 +108,6 @@
 #define DEV_CTX_BASE_LO			0x60
 #define DEV_CTX_BASE_HI			0x64
 
-
 static inline struct i3c_hci *to_i3c_hci(struct i3c_master_controller *m)
 {
 	return container_of(m, struct i3c_hci, master);
drivers/i3c/master/mipi-i3c-hci/dat_v1.c +0 -1
index 85c4916972e4..cc5d2deb23ab 100644
@@ -15,7 +15,6 @@
 #include "hci.h"
 #include "dat.h"
 
-
 /*
  * Device Address Table Structure
  */
drivers/i3c/master/mipi-i3c-hci/dma.c +0 -2
index c401a9425cdc..f20db2899989 100644
@@ -20,7 +20,6 @@
 #include "cmd.h"
 #include "ibi.h"
 
-
 /*
  * Software Parameter Values (somewhat arb itrary for now).
  * Some of them could be determined at run time eventually.
@@ -124,7 +123,6 @@
 #define DATA_BUF_IOC			BIT(30)	/* Interrupt on Completion */
 #define DATA_BUF_BLOCK_SIZE		GENMASK(15, 0)
 
-
 struct hci_rh_data {
 	void __iomem *regs;
 	void *xfer, *resp, *ibi_status, *ibi_data;
drivers/i3c/master/mipi-i3c-hci/ext_caps.c +0 -1
index 7714f00ea9cc..40939af0b0e3 100644
@@ -16,7 +16,6 @@
 #include "ext_caps.h"
 #include "xfer_mode_rate.h"
 
-
 /* Extended Capability Header */
 #define CAP_HEADER_LENGTH		GENMASK(23, 8)
 #define CAP_HEADER_ID			GENMASK(7, 0)
drivers/i3c/master/mipi-i3c-hci/ext_caps.h +0 -1
index 9df17822fdb4..b15e629951f0 100644
@@ -13,7 +13,6 @@
 /* MIPI vendor IDs */
 #define MIPI_VENDOR_NXP			0x11b
 
-
 int i3c_hci_parse_ext_caps(struct i3c_hci *hci);
 
 #endif
drivers/i3c/master/mipi-i3c-hci/hci.h +0 -5
index 249ccb13c909..3f88b67bc5cc 100644
@@ -62,7 +62,6 @@ struct i3c_hci {
 	void *vendor_data;
 };
 
-
 /*
  * Structure to represent a master initiated transfer.
  * The rnw, data and data_len fields must be initialized before calling any
@@ -108,7 +107,6 @@ static inline void hci_free_xfer(struct hci_xfer *xfer, unsigned int n)
 	kfree(xfer);
 }
 
-
 /* This abstracts PIO vs DMA operations */
 struct hci_io_ops {
 	bool (*irq_handler)(struct i3c_hci *hci);
@@ -126,21 +124,18 @@ struct hci_io_ops {
 extern const struct hci_io_ops mipi_i3c_hci_pio;
 extern const struct hci_io_ops mipi_i3c_hci_dma;
 
-
 /* Our per device master private data */
 struct i3c_hci_dev_data {
 	int dat_idx;
 	void *ibi_data;
 };
 
-
 /* list of quirks */
 #define HCI_QUIRK_RAW_CCC	BIT(1)	/* CCC framing must be explicit */
 #define HCI_QUIRK_PIO_MODE	BIT(2)  /* Set PIO mode for AMD platforms */
 #define HCI_QUIRK_OD_PP_TIMING		BIT(3)  /* Set OD and PP timings for AMD platforms */
 #define HCI_QUIRK_RESP_BUF_THLD		BIT(4)  /* Set resp buf thld to 0 for AMD platforms */
 
-
 /* global functions */
 void mipi_i3c_hci_resume(struct i3c_hci *hci);
 void mipi_i3c_hci_pio_reset(struct i3c_hci *hci);
drivers/i3c/master/mipi-i3c-hci/pio.c +0 -1
index 710faa46a00f..142f3f79415b 100644
@@ -15,7 +15,6 @@
 #include "cmd.h"
 #include "ibi.h"
 
-
 /*
  * PIO Access Area
  */
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#2 lore raw

PATCH v4 2/11 i3c: mipi-i3c-hci: Stop reading Extended Capabilities if capability ID is 0

In reply to Adrian Hunter

Extended Capability ID value 0 is special. It signifies the end of the list. Stop reading Extended Capabilities if capability ID is 0.

---

Changes in V3 and V4:

None

Changes in V2:

Add Frank's Rev'd-by

 drivers/i3c/master/mipi-i3c-hci/ext_caps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master/mipi-i3c-hci/ext_caps.c +1 -1
index 40939af0b0e3..024bccf23fd0 100644
@@ -271,7 +271,7 @@ int i3c_hci_parse_ext_caps(struct i3c_hci *hci)
 		cap_length = FIELD_GET(CAP_HEADER_LENGTH, cap_header);
 		dev_dbg(&hci->master.dev, "id=0x%02x length=%d",
 			cap_id, cap_length);
-		if (!cap_length)
+		if (!cap_id || !cap_length)
 			break;
 		if (curr_cap + cap_length * 4 >= end) {
 			dev_err(&hci->master.dev,
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#3 lore raw

PATCH v4 3/11 i3c: mipi-i3c-hci: Quieten initialization messages

In reply to Adrian Hunter

The copious initialization messages are at most useful only for debugging. Change them from dev_info() or dev_notice() to dev_dbg().

---

Changes in V4:

None

Changes in V3:

Minor white space tweaks to fix alignment

Changes in V2:

Add Frank's Rev'd-by

 drivers/i3c/master/mipi-i3c-hci/core.c     | 18 +++----
 drivers/i3c/master/mipi-i3c-hci/dma.c      |  4 +-
 drivers/i3c/master/mipi-i3c-hci/ext_caps.c | 55 ++++++++++------------
 drivers/i3c/master/mipi-i3c-hci/pio.c      | 16 +++----
 4 files changed, 45 insertions(+), 48 deletions(-)
drivers/i3c/master/mipi-i3c-hci/core.c +9 -9
index 211321f73e02..07fb91a12593 100644
@@ -597,8 +597,8 @@ static int i3c_hci_init(struct i3c_hci *hci)
 	hci->DAT_entry_size = FIELD_GET(DAT_ENTRY_SIZE, regval) ? 0 : 8;
 	if (size_in_dwords)
 		hci->DAT_entries = 4 * hci->DAT_entries / hci->DAT_entry_size;
-	dev_info(&hci->master.dev, "DAT: %u %u-bytes entries at offset %#x\n",
-		 hci->DAT_entries, hci->DAT_entry_size, offset);
+	dev_dbg(&hci->master.dev, "DAT: %u %u-bytes entries at offset %#x\n",
+		hci->DAT_entries, hci->DAT_entry_size, offset);
 
 	regval = reg_read(DCT_SECTION);
 	offset = FIELD_GET(DCT_TABLE_OFFSET, regval);
@@ -607,23 +607,23 @@ static int i3c_hci_init(struct i3c_hci *hci)
 	hci->DCT_entry_size = FIELD_GET(DCT_ENTRY_SIZE, regval) ? 0 : 16;
 	if (size_in_dwords)
 		hci->DCT_entries = 4 * hci->DCT_entries / hci->DCT_entry_size;
-	dev_info(&hci->master.dev, "DCT: %u %u-bytes entries at offset %#x\n",
-		 hci->DCT_entries, hci->DCT_entry_size, offset);
+	dev_dbg(&hci->master.dev, "DCT: %u %u-bytes entries at offset %#x\n",
+		hci->DCT_entries, hci->DCT_entry_size, offset);
 
 	regval = reg_read(RING_HEADERS_SECTION);
 	offset = FIELD_GET(RING_HEADERS_OFFSET, regval);
 	hci->RHS_regs = offset ? hci->base_regs + offset : NULL;
-	dev_info(&hci->master.dev, "Ring Headers at offset %#x\n", offset);
+	dev_dbg(&hci->master.dev, "Ring Headers at offset %#x\n", offset);
 
 	regval = reg_read(PIO_SECTION);
 	offset = FIELD_GET(PIO_REGS_OFFSET, regval);
 	hci->PIO_regs = offset ? hci->base_regs + offset : NULL;
-	dev_info(&hci->master.dev, "PIO section at offset %#x\n", offset);
+	dev_dbg(&hci->master.dev, "PIO section at offset %#x\n", offset);
 
 	regval = reg_read(EXT_CAPS_SECTION);
 	offset = FIELD_GET(EXT_CAPS_OFFSET, regval);
 	hci->EXTCAPS_regs = offset ? hci->base_regs + offset : NULL;
-	dev_info(&hci->master.dev, "Extended Caps at offset %#x\n", offset);
+	dev_dbg(&hci->master.dev, "Extended Caps at offset %#x\n", offset);
 
 	ret = i3c_hci_parse_ext_caps(hci);
 	if (ret)
@@ -705,7 +705,7 @@ static int i3c_hci_init(struct i3c_hci *hci)
 			ret = -EIO;
 		} else {
 			hci->io = &mipi_i3c_hci_dma;
-			dev_info(&hci->master.dev, "Using DMA\n");
+			dev_dbg(&hci->master.dev, "Using DMA\n");
 		}
 	}
 
@@ -717,7 +717,7 @@ static int i3c_hci_init(struct i3c_hci *hci)
 			ret = -EIO;
 		} else {
 			hci->io = &mipi_i3c_hci_pio;
-			dev_info(&hci->master.dev, "Using PIO\n");
+			dev_dbg(&hci->master.dev, "Using PIO\n");
 		}
 	}
 
drivers/i3c/master/mipi-i3c-hci/dma.c +2 -2
index f20db2899989..0f6bbe184e85 100644
@@ -212,7 +212,7 @@ static int hci_dma_init(struct i3c_hci *hci)
 
 	regval = rhs_reg_read(CONTROL);
 	nr_rings = FIELD_GET(MAX_HEADER_COUNT_CAP, regval);
-	dev_info(&hci->master.dev, "%d DMA rings available\n", nr_rings);
+	dev_dbg(&hci->master.dev, "%d DMA rings available\n", nr_rings);
 	if (unlikely(nr_rings > 8)) {
 		dev_err(&hci->master.dev, "number of rings should be <= 8\n");
 		nr_rings = 8;
@@ -232,7 +232,7 @@ static int hci_dma_init(struct i3c_hci *hci)
 	for (i = 0; i < rings->total; i++) {
 		u32 offset = rhs_reg_read(RHn_OFFSET(i));
 
-		dev_info(&hci->master.dev, "Ring %d at offset %#x\n", i, offset);
+		dev_dbg(&hci->master.dev, "Ring %d at offset %#x\n", i, offset);
 		ret = -EINVAL;
 		if (!offset)
 			goto err_out;
drivers/i3c/master/mipi-i3c-hci/ext_caps.c +26 -29

154 lines not on this page · raw message

drivers/i3c/master/mipi-i3c-hci/pio.c +8 -8
index 142f3f79415b..109c6c5d83d6 100644
@@ -148,14 +148,14 @@ static int hci_pio_init(struct i3c_hci *hci)
 	spin_lock_init(&pio->lock);
 
 	size_val = pio_reg_read(QUEUE_SIZE);
-	dev_info(&hci->master.dev, "CMD/RESP FIFO = %ld entries\n",
-		 FIELD_GET(CR_QUEUE_SIZE, size_val));
-	dev_info(&hci->master.dev, "IBI FIFO = %ld bytes\n",
-		 4 * FIELD_GET(IBI_STATUS_SIZE, size_val));
-	dev_info(&hci->master.dev, "RX data FIFO = %d bytes\n",
-		 4 * (2 << FIELD_GET(RX_DATA_BUFFER_SIZE, size_val)));
-	dev_info(&hci->master.dev, "TX data FIFO = %d bytes\n",
-		 4 * (2 << FIELD_GET(TX_DATA_BUFFER_SIZE, size_val)));
+	dev_dbg(&hci->master.dev, "CMD/RESP FIFO = %ld entries\n",
+		FIELD_GET(CR_QUEUE_SIZE, size_val));
+	dev_dbg(&hci->master.dev, "IBI FIFO = %ld bytes\n",
+		4 * FIELD_GET(IBI_STATUS_SIZE, size_val));
+	dev_dbg(&hci->master.dev, "RX data FIFO = %d bytes\n",
+		4 * (2 << FIELD_GET(RX_DATA_BUFFER_SIZE, size_val)));
+	dev_dbg(&hci->master.dev, "TX data FIFO = %d bytes\n",
+		4 * (2 << FIELD_GET(TX_DATA_BUFFER_SIZE, size_val)));
 
 	/*
 	 * Let's initialize data thresholds to half of the actual FIFO size.
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#4 lore raw

PATCH v4 4/11 i3c: mipi-i3c-hci-pci: Do not repeatedly check for NULL driver_data

In reply to Adrian Hunter

All entries in the id_table have driver_data. Do not repeatedly check for NULL driver_data.

---

Changes in V4:

None

Changes in V3:

Add Frank's Rev'd-by

Changes in V2:

Drop default driver data

 drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +3 -3
index dc8ede0f8ad8..8ade911e3835 100644
@@ -229,7 +229,7 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 		goto err;
 
 	hci->info = (const struct mipi_i3c_hci_pci_info *)id->driver_data;
-	if (hci->info && hci->info->init) {
+	if (hci->info->init) {
 		ret = hci->info->init(hci);
 		if (ret)
 			goto err;
@@ -244,7 +244,7 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 	return 0;
 
 err_exit:
-	if (hci->info && hci->info->exit)
+	if (hci->info->exit)
 		hci->info->exit(hci);
 err:
 	platform_device_put(hci->pdev);
@@ -258,7 +258,7 @@ static void mipi_i3c_hci_pci_remove(struct pci_dev *pci)
 	struct platform_device *pdev = hci->pdev;
 	int dev_id = pdev->id;
 
-	if (hci->info && hci->info->exit)
+	if (hci->info->exit)
 		hci->info->exit(hci);
 
 	platform_device_unregister(pdev);
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#5 lore raw

PATCH v4 5/11 i3c: mipi-i3c-hci-pci: Enable MSI support

In reply to Adrian Hunter

Enable MSI support by using pci_alloc_irq_vectors() to request all supported IRQ types. Do not call pci_free_irq_vectors() because for resource-managed devices (those initialized with pcim_enable_device()), IRQ vector allocation is automatically managed. See pci_setup_msi_context() and pcim_setup_msi_release() for details.

Note: The current documentation for pci_alloc_irq_vectors() does not mention this behavior.

---

Changes in V4:

Add Frank's Rev'd-by

Changes in V3:

Enhance commit message

Changes in V2:
New patch split from "i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances"

 drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +6 -2
index 8ade911e3835..0fd3587671e1 100644
@@ -203,6 +203,10 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 
 	pci_set_master(pci);
 
+	ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_ALL_TYPES);
+	if (ret < 0)
+		return ret;
+
 	memset(&res, 0, sizeof(res));
 
 	res[0].flags = IORESOURCE_MEM;
@@ -210,8 +214,8 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 	res[0].end = pci_resource_end(pci, 0);
 
 	res[1].flags = IORESOURCE_IRQ;
-	res[1].start = pci->irq;
-	res[1].end = pci->irq;
+	res[1].start = pci_irq_vector(hci->pci, 0);
+	res[1].end = res[1].start;
 
 	dev_id = ida_alloc(&mipi_i3c_hci_pci_ida, GFP_KERNEL);
 	if (dev_id < 0)
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#6 lore raw

PATCH v4 6/11 i3c: mipi-i3c-hci-pci: Assign unique device names and IDs for Intel LPSS I3C

In reply to Adrian Hunter

Simplify the code and ensure names and IDs align with device documentation. Use explicit device names and IDs for Intel LPSS I3C controllers instead of dynamically allocated values.

Add "intel-lpss-i3c" to the platform_device_id table in the mipi-i3c-hci driver and use the same name for Intel I3C controllers in the mipi_i3c_hci_pci driver. Assign hard-coded IDs to reflect the hardware layout.

Intel SoCs include two I3C PCI devices in the Low Power Subsystem (LPSS), each supporting up to two I3C buses. The second PCI device is assigned ID 2 (not 1) to match this topology. Additional IDs will be introduced when Multi-Bus Instance support is implemented.

---

Changes in V4:

Add Frank's Rev'd-by

Change in V3:

New patch

 drivers/i3c/master/mipi-i3c-hci/core.c        |  7 +++
 .../master/mipi-i3c-hci/mipi-i3c-hci-pci.c    | 43 ++++++++++---------
 2 files changed, 30 insertions(+), 20 deletions(-)
drivers/i3c/master/mipi-i3c-hci/core.c +7 -0
index 07fb91a12593..3d6544a64188 100644
@@ -790,9 +790,16 @@ static const struct acpi_device_id i3c_hci_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, i3c_hci_acpi_match);
 
+static const struct platform_device_id i3c_hci_driver_ids[] = {
+	{ .name = "intel-lpss-i3c" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(platform, i3c_hci_driver_ids);
+
 static struct platform_driver i3c_hci_driver = {
 	.probe = i3c_hci_probe,
 	.remove = i3c_hci_remove,
+	.id_table = i3c_hci_driver_ids,
 	.driver = {
 		.name = "mipi-i3c-hci",
 		.of_match_table = of_match_ptr(i3c_hci_of_match),
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +23 -20

102 lines not on this page · raw message

Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#7 lore raw

PATCH v4 7/11 i3c: mipi-i3c-hci: Allow for Multi-Bus Instances

In reply to Adrian Hunter

Add support for MIPI I3C Host Controllers with the Multi-Bus Instance capability. These controllers can host multiple I3C buses (up to 15) within a single hardware function (e.g., PCIe B/D/F), providing one indepedent HCI register set and corresponding I3C bus controller logic per bus.

A separate platform device will represent each instance, but it is necessary to allow for shared resources.

Multi-bus instances share the same MMIO address space, but the ranges are not guaranteed to be contiguous. To avoid overlapping mappings, pass base_regs from the parent mapping to child devices.

Allow the IRQ to be shared among instances.

---

Changes in V4:

Add Frank's Rev'd-by

Changes in V3:

Enhance commit message

Changes in V2:

None

 drivers/i3c/master/mipi-i3c-hci/core.c     | 21 +++++++++++++++++----
 include/linux/platform_data/mipi-i3c-hci.h | 15 +++++++++++++++
 2 files changed, 32 insertions(+), 4 deletions(-)
 create mode 100644 include/linux/platform_data/mipi-i3c-hci.h
drivers/i3c/master/mipi-i3c-hci/core.c +17 -4
index 3d6544a64188..6da5daf18166 100644
@@ -14,6 +14,7 @@
 #include <linux/interrupt.h>
 #include <linux/iopoll.h>
 #include <linux/module.h>
+#include <linux/platform_data/mipi-i3c-hci.h>
 #include <linux/platform_device.h>
 
 #include "hci.h"
@@ -737,15 +738,27 @@ static int i3c_hci_init(struct i3c_hci *hci)
 
 static int i3c_hci_probe(struct platform_device *pdev)
 {
+	const struct mipi_i3c_hci_platform_data *pdata = pdev->dev.platform_data;
 	struct i3c_hci *hci;
 	int irq, ret;
 
 	hci = devm_kzalloc(&pdev->dev, sizeof(*hci), GFP_KERNEL);
 	if (!hci)
 		return -ENOMEM;
-	hci->base_regs = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(hci->base_regs))
-		return PTR_ERR(hci->base_regs);
+
+	/*
+	 * Multi-bus instances share the same MMIO address range, but not
+	 * necessarily in separate contiguous sub-ranges. To avoid overlapping
+	 * mappings, provide base_regs from the parent mapping.
+	 */
+	if (pdata)
+		hci->base_regs = pdata->base_regs;
+
+	if (!hci->base_regs) {
+		hci->base_regs = devm_platform_ioremap_resource(pdev, 0);
+		if (IS_ERR(hci->base_regs))
+			return PTR_ERR(hci->base_regs);
+	}
 
 	platform_set_drvdata(pdev, hci);
 	/* temporary for dev_printk's, to be replaced in i3c_master_register */
@@ -759,7 +772,7 @@ static int i3c_hci_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	ret = devm_request_irq(&pdev->dev, irq, i3c_hci_irq_handler,
-			       0, NULL, hci);
+			       IRQF_SHARED, NULL, hci);
 	if (ret)
 		return ret;
 
include/linux/platform_data/mipi-i3c-hci.h new file +15 -0
new file mode 100644
index 000000000000..ab7395f455f9
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef INCLUDE_PLATFORM_DATA_MIPI_I3C_HCI_H
+#define INCLUDE_PLATFORM_DATA_MIPI_I3C_HCI_H
+
+#include <linux/compiler_types.h>
+
+/**
+ * struct mipi_i3c_hci_platform_data - Platform-dependent data for mipi_i3c_hci
+ * @base_regs: Register set base address (to support multi-bus instances)
+ */
+struct mipi_i3c_hci_platform_data {
+	void __iomem *base_regs;
+};
+
+#endif
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#8 lore raw

PATCH v4 8/11 i3c: mipi-i3c-hci-pci: Pass base regs as platform data to i3c core device

In reply to Adrian Hunter

Use the parent's MMIO mapping for multi-bus instances to avoid overlapping regions. These instances share the same MMIO address space, but the ranges are not guaranteed to be contiguous. By passing base_regs from the parent mapping, child devices can access their registers without creating conflicting mappings.

Prepare for multi-bus instance support by passing base_regs to child devices.

---

Changes in V4:

Add Frank's Rev'd-by

Changes in V3:

Enhance commit message

Changes in V2:
New patch split from "i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances"

 .../master/mipi-i3c-hci/mipi-i3c-hci-pci.c    | 39 ++++++++++---------
 1 file changed, 20 insertions(+), 19 deletions(-)
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +20 -19
index 3b319fbf18ce..ca562a5634e8 100644
@@ -14,12 +14,14 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/platform_data/mipi-i3c-hci.h>
 #include <linux/platform_device.h>
 #include <linux/pm_qos.h>
 
 struct mipi_i3c_hci_pci {
 	struct pci_dev *pci;
 	struct platform_device *pdev;
+	void __iomem *base;
 	const struct mipi_i3c_hci_pci_info *info;
 	void *private;
 };
@@ -32,7 +34,6 @@ struct mipi_i3c_hci_pci_info {
 };
 
 #define INTEL_PRIV_OFFSET		0x2b0
-#define INTEL_PRIV_SIZE			0x28
 #define INTEL_RESETS			0x04
 #define INTEL_RESETS_RESET		BIT(0)
 #define INTEL_RESETS_RESET_DONE		BIT(1)
@@ -143,19 +144,12 @@ static void intel_reset(void __iomem *priv)
 	writel(INTEL_RESETS_RESET, priv + INTEL_RESETS);
 }
 
-static void __iomem *intel_priv(struct pci_dev *pci)
-{
-	resource_size_t base = pci_resource_start(pci, 0);
-
-	return devm_ioremap(&pci->dev, base + INTEL_PRIV_OFFSET, INTEL_PRIV_SIZE);
-}
-
 static int intel_i3c_init(struct mipi_i3c_hci_pci *hci)
 {
 	struct intel_host *host = devm_kzalloc(&hci->pci->dev, sizeof(*host), GFP_KERNEL);
-	void __iomem *priv = intel_priv(hci->pci);
+	void __iomem *priv = hci->base + INTEL_PRIV_OFFSET;
 
-	if (!host || !priv)
+	if (!host)
 		return -ENOMEM;
 
 	dma_set_mask_and_coherent(&hci->pci->dev, DMA_BIT_MASK(64));
@@ -196,8 +190,9 @@ static const struct mipi_i3c_hci_pci_info intel_2_info = {
 static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 				  const struct pci_device_id *id)
 {
+	struct mipi_i3c_hci_platform_data pdata = {};
 	struct mipi_i3c_hci_pci *hci;
-	struct resource res[2];
+	struct resource res;
 	int ret;
 
 	hci = devm_kzalloc(&pci->dev, sizeof(*hci), GFP_KERNEL);
@@ -212,19 +207,19 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 
 	pci_set_master(pci);
 
+	hci->base = pcim_iomap_region(pci, 0, pci_name(pci));
+	if (IS_ERR(hci->base))
+		return PTR_ERR(hci->base);
+
 	ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_ALL_TYPES);
 	if (ret < 0)
 		return ret;
 
 	memset(&res, 0, sizeof(res));
 
-	res[0].flags = IORESOURCE_MEM;
-	res[0].start = pci_resource_start(pci, 0);
-	res[0].end = pci_resource_end(pci, 0);
-
-	res[1].flags = IORESOURCE_IRQ;
-	res[1].start = pci_irq_vector(hci->pci, 0);
-	res[1].end = res[1].start;
+	res.flags = IORESOURCE_IRQ;
+	res.start = pci_irq_vector(hci->pci, 0);
+	res.end = res.start;
 
 	hci->info = (const struct mipi_i3c_hci_pci_info *)id->driver_data;
 
@@ -235,7 +230,13 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
 	hci->pdev->dev.parent = &pci->dev;
 	device_set_node(&hci->pdev->dev, dev_fwnode(&pci->dev));
 
-	ret = platform_device_add_resources(hci->pdev, res, ARRAY_SIZE(res));
+	ret = platform_device_add_resources(hci->pdev, &res, 1);
+	if (ret)
+		goto err;
+
+	pdata.base_regs = hci->base;
+
+	ret = platform_device_add_data(hci->pdev, &pdata, sizeof(pdata));
 	if (ret)
 		goto err;
 
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#9 lore raw

PATCH v4 9/11 i3c: mipi-i3c-hci-pci: Convert to MFD driver

In reply to Adrian Hunter

Prepare for Multi-Bus instance support. Convert to MFD driver but still support only 1 instance.

---

Changes in V4:

None

Changes in V3:

Add Frank's Rev'd-by
Adjust for doing away with dynamic devid allocation

Changes in V2:
New patch split from "i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances"

 drivers/i3c/master/Kconfig                    |  1 +
 .../master/mipi-i3c-hci/mipi-i3c-hci-pci.c    | 75 ++++++++++---------
 2 files changed, 41 insertions(+), 35 deletions(-)
drivers/i3c/master/Kconfig +1 -0
index 82cf330778d5..2609f2b18e0a 100644
@@ -69,6 +69,7 @@ config MIPI_I3C_HCI_PCI
 	tristate "MIPI I3C Host Controller Interface PCI support"
 	depends on MIPI_I3C_HCI
 	depends on PCI
+	select MFD_CORE
 	help
 	  Support for MIPI I3C Host Controller Interface compatible hardware
 	  on the PCI bus.
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +40 -35

123 lines not on this page · raw message

Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#10 lore raw

PATCH v4 10/11 i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances

In reply to Adrian Hunter

Add support for MIPI I3C Host Controllers with the Multi-Bus Instance capability. These controllers can host multiple I3C buses (up to 15) within a single hardware function (e.g., PCIe B/D/F), providing one indepedent HCI register set and corresponding I3C bus controller logic per bus.

Create an MFD cell for each instance and use platform_data to pass the starting address of the instance's register set.

The MIPI I3C HCI specification defines an Extended Capability that holds the offset of each instance register set. Parsing this information is relatively complex, so include the offsets in driver data for now.

Driver data for additional instances beyond instance 0 will be added in a subsequent patch.

---

Changes in V4:

Add Frank's Rev'd-by

Changes in V3:

Make hci a parameter of mipi_i3c_hci_pci_alloc() Adjust for doing away with dynamic devid allocation Enhance commit message

Changes in V2:
Conversion to MFD split into separate patch Simplify ID allocation / free Correct use of __free()
Also define instance 0 in driver_data

 .../master/mipi-i3c-hci/mipi-i3c-hci-pci.c    | 36 +++++++++++++------
 1 file changed, 26 insertions(+), 10 deletions(-)
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +26 -10
index 7ef17255c312..782f46989423 100644
@@ -19,6 +19,12 @@
 #include <linux/platform_device.h>
 #include <linux/pm_qos.h>
 
+/*
+ * There can up to 15 instances, but implementations have at most 2 at this
+ * time.
+ */
+#define INST_MAX 2
+
 struct mipi_i3c_hci_pci {
 	struct pci_dev *pci;
 	void __iomem *base;
@@ -30,7 +36,9 @@ struct mipi_i3c_hci_pci_info {
 	int (*init)(struct mipi_i3c_hci_pci *hci);
 	void (*exit)(struct mipi_i3c_hci_pci *hci);
 	const char *name;
-	int id;
+	int id[INST_MAX];
+	u32 instance_offset[INST_MAX];
+	int instance_count;
 };
 
 #define INTEL_PRIV_OFFSET		0x2b0
@@ -177,14 +185,18 @@ static const struct mipi_i3c_hci_pci_info intel_1_info = {
 	.init = intel_i3c_init,
 	.exit = intel_i3c_exit,
 	.name = "intel-lpss-i3c",
-	.id = 0,
+	.id = {0},
+	.instance_offset = {0},
+	.instance_count = 1,
 };
 
 static const struct mipi_i3c_hci_pci_info intel_2_info = {
 	.init = intel_i3c_init,
 	.exit = intel_i3c_exit,
 	.name = "intel-lpss-i3c",
-	.id = 2,
+	.id = {2},
+	.instance_offset = {0},
+	.instance_count = 1,
 };
 
 struct mipi_i3c_hci_pci_cell_data {
@@ -192,34 +204,38 @@ struct mipi_i3c_hci_pci_cell_data {
 	struct resource res;
 };
 
-static void mipi_i3c_hci_pci_setup_cell(struct mipi_i3c_hci_pci *hci,
+static void mipi_i3c_hci_pci_setup_cell(struct mipi_i3c_hci_pci *hci, int idx,
 					struct mipi_i3c_hci_pci_cell_data *data,
 					struct mfd_cell *cell)
 {
-	data->pdata.base_regs = hci->base;
+	data->pdata.base_regs = hci->base + hci->info->instance_offset[idx];
 
 	data->res = DEFINE_RES_IRQ(0);
 
 	cell->name = hci->info->name;
-	cell->id = hci->info->id;
+	cell->id = hci->info->id[idx];
 	cell->platform_data = &data->pdata;
 	cell->pdata_size = sizeof(data->pdata);
 	cell->num_resources = 1;
 	cell->resources = &data->res;
 }
 
+#define mipi_i3c_hci_pci_alloc(h, x) kcalloc((h)->info->instance_count, sizeof(*(x)), GFP_KERNEL)
+
 static int mipi_i3c_hci_pci_add_instances(struct mipi_i3c_hci_pci *hci)
 {
-	struct mipi_i3c_hci_pci_cell_data *data __free(kfree) = kzalloc(sizeof(*data), GFP_KERNEL);
-	struct mfd_cell *cells __free(kfree) = kzalloc(sizeof(*cells), GFP_KERNEL);
+	struct mipi_i3c_hci_pci_cell_data *data __free(kfree) = mipi_i3c_hci_pci_alloc(hci, data);
+	struct mfd_cell *cells __free(kfree) = mipi_i3c_hci_pci_alloc(hci, cells);
 	int irq = pci_irq_vector(hci->pci, 0);
+	int nr = hci->info->instance_count;
 
 	if (!cells || !data)
 		return -ENOMEM;
 
-	mipi_i3c_hci_pci_setup_cell(hci, data, cells);
+	for (int i = 0; i < nr; i++)
+		mipi_i3c_hci_pci_setup_cell(hci, i, data + i, cells + i);
 
-	return mfd_add_devices(&hci->pci->dev, 0, cells, 1, NULL, irq, NULL);
+	return mfd_add_devices(&hci->pci->dev, 0, cells, nr, NULL, irq, NULL);
 }
 
 static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#11 lore raw

PATCH v4 11/11 i3c: mipi-i3c-hci-pci: Define Multi-Bus instances for supported controllers

In reply to Adrian Hunter

Define Multi-Bus Instances at offset 0x400 for Intel controllers.

Intel SoCs include two I3C PCI devices in the Low Power Subsystem (LPSS), each capable of hosting two I3C buses. Panther Lake and Wildcat Lake support three buses in total (IDs 0–2), while Nova Lake supports four (IDs 0–3).

---

Changes in V4:

Add Frank's Rev'd-by

Changes in V3:

Adjust for doing away with dynamic devid allocation

Changes in V2:

Also define instance 0 in driver_data

 .../master/mipi-i3c-hci/mipi-i3c-hci-pci.c    | 35 ++++++++++++-------
 1 file changed, 22 insertions(+), 13 deletions(-)
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c +22 -13
index 782f46989423..458f871a2e61 100644
@@ -181,16 +181,25 @@ static void intel_i3c_exit(struct mipi_i3c_hci_pci *hci)
 	intel_ltr_hide(&hci->pci->dev);
 }
 
-static const struct mipi_i3c_hci_pci_info intel_1_info = {
+static const struct mipi_i3c_hci_pci_info intel_mi_1_info = {
 	.init = intel_i3c_init,
 	.exit = intel_i3c_exit,
 	.name = "intel-lpss-i3c",
-	.id = {0},
-	.instance_offset = {0},
-	.instance_count = 1,
+	.id = {0, 1},
+	.instance_offset = {0, 0x400},
+	.instance_count = 2,
+};
+
+static const struct mipi_i3c_hci_pci_info intel_mi_2_info = {
+	.init = intel_i3c_init,
+	.exit = intel_i3c_exit,
+	.name = "intel-lpss-i3c",
+	.id = {2, 3},
+	.instance_offset = {0, 0x400},
+	.instance_count = 2,
 };
 
-static const struct mipi_i3c_hci_pci_info intel_2_info = {
+static const struct mipi_i3c_hci_pci_info intel_si_2_info = {
 	.init = intel_i3c_init,
 	.exit = intel_i3c_exit,
 	.name = "intel-lpss-i3c",
@@ -296,17 +305,17 @@ static void mipi_i3c_hci_pci_remove(struct pci_dev *pci)
 
 static const struct pci_device_id mipi_i3c_hci_pci_devices[] = {
 	/* Wildcat Lake-U */
-	{ PCI_VDEVICE(INTEL, 0x4d7c), (kernel_ulong_t)&intel_1_info},
-	{ PCI_VDEVICE(INTEL, 0x4d6f), (kernel_ulong_t)&intel_2_info},
+	{ PCI_VDEVICE(INTEL, 0x4d7c), (kernel_ulong_t)&intel_mi_1_info},
+	{ PCI_VDEVICE(INTEL, 0x4d6f), (kernel_ulong_t)&intel_si_2_info},
 	/* Panther Lake-H */
-	{ PCI_VDEVICE(INTEL, 0xe37c), (kernel_ulong_t)&intel_1_info},
-	{ PCI_VDEVICE(INTEL, 0xe36f), (kernel_ulong_t)&intel_2_info},
+	{ PCI_VDEVICE(INTEL, 0xe37c), (kernel_ulong_t)&intel_mi_1_info},
+	{ PCI_VDEVICE(INTEL, 0xe36f), (kernel_ulong_t)&intel_si_2_info},
 	/* Panther Lake-P */
-	{ PCI_VDEVICE(INTEL, 0xe47c), (kernel_ulong_t)&intel_1_info},
-	{ PCI_VDEVICE(INTEL, 0xe46f), (kernel_ulong_t)&intel_2_info},
+	{ PCI_VDEVICE(INTEL, 0xe47c), (kernel_ulong_t)&intel_mi_1_info},
+	{ PCI_VDEVICE(INTEL, 0xe46f), (kernel_ulong_t)&intel_si_2_info},
 	/* Nova Lake-S */
-	{ PCI_VDEVICE(INTEL, 0x6e2c), (kernel_ulong_t)&intel_1_info},
-	{ PCI_VDEVICE(INTEL, 0x6e2d), (kernel_ulong_t)&intel_2_info},
+	{ PCI_VDEVICE(INTEL, 0x6e2c), (kernel_ulong_t)&intel_mi_1_info},
+	{ PCI_VDEVICE(INTEL, 0x6e2d), (kernel_ulong_t)&intel_mi_2_info},
 	{ },
 };
 MODULE_DEVICE_TABLE(pci, mipi_i3c_hci_pci_devices);
Signature · 7 lines
2.51.0


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
#12 lore raw
In reply to Adrian Hunter
Quoted 3 lines · Adrian Hunter

Hi

All patches now have Frank's Rev'd-by

Can these be applied?

Quoted 94 lines

Changes in V4:

	Add Frank's Rev'd-by for patches 5 - 8, 10 - 11

Changes in V3:

A notable change in V3 is the introduction of patch 6 "Assign unique device names and IDs for Intel LPSS I3C" which does away with dynamic devid allocaion.

i3c: mipi-i3c-hci: Quieten initialization messages
Minor white space tweaks to fix alignment

i3c: mipi-i3c-hci-pci: Enable MSI support
Enhance commit message

i3c: mipi-i3c-hci-pci: Assign unique device names and IDs for Intel LPSS I3C
New patch

i3c: mipi-i3c-hci: Allow for Multi-Bus Instances
Enhance commit message

i3c: mipi-i3c-hci-pci: Pass base regs as platform data to i3c core device
Enhance commit message

i3c: mipi-i3c-hci-pci: Convert to MFD driver
Add Frank's Rev'd-by
Adjust for doing away with dynamic devid allocation

i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances
Make hci a parameter of mipi_i3c_hci_pci_alloc() Adjust for doing away with dynamic devid allocation Enhance commit message

i3c: mipi-i3c-hci-pci: Define Multi-Bus instances for supported controllers
Adjust for doing away with dynamic devid allocation

Changes in V2:
Add Frank's Rev'd-by for patches 1 - 3
Drop default driver data
New patches split from "i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances"
Conversion to MFD split into separate patch Simplify ID allocation / free
Correct use of __free()
Also define instance 0 in driver_data

Add support for MIPI I3C Host Controllers with the Multi-Bus Instance capability. These controllers can host multiple I3C buses (up to 15) within a single hardware function (e.g., PCIe B/D/F), providing one indepedent HCI register set and corresponding I3C bus controller logic per bus.

Add support for that to mipi-i3c-hci-pci and mipi-i3c-hci and define Multi-Bus Instances for Intel controllers.

There are also some tidy-up patches to start with.

Adrian Hunter (11):
i3c: mipi-i3c-hci: Remove duplicate blank lines
i3c: mipi-i3c-hci: Stop reading Extended Capabilities if capability ID is 0
i3c: mipi-i3c-hci: Quieten initialization messages
i3c: mipi-i3c-hci-pci: Do not repeatedly check for NULL driver_data
i3c: mipi-i3c-hci-pci: Enable MSI support
i3c: mipi-i3c-hci-pci: Assign unique device names and IDs for Intel LPSS I3C
i3c: mipi-i3c-hci: Allow for Multi-Bus Instances
i3c: mipi-i3c-hci-pci: Pass base regs as platform data to i3c core device
i3c: mipi-i3c-hci-pci: Convert to MFD driver
i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances
i3c: mipi-i3c-hci-pci: Define Multi-Bus instances for supported controllers

 drivers/i3c/master/Kconfig                         |   1 +
 drivers/i3c/master/mipi-i3c-hci/cmd_v1.c           |   2 -
 drivers/i3c/master/mipi-i3c-hci/cmd_v2.c           |   2 -
 drivers/i3c/master/mipi-i3c-hci/core.c             |  48 +++++--
 drivers/i3c/master/mipi-i3c-hci/dat_v1.c           |   1 -
 drivers/i3c/master/mipi-i3c-hci/dma.c              |   6 +-
 drivers/i3c/master/mipi-i3c-hci/ext_caps.c         |  58 ++++----
 drivers/i3c/master/mipi-i3c-hci/ext_caps.h         |   1 -
 drivers/i3c/master/mipi-i3c-hci/hci.h              |   5 -
 drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 160 +++++++++++++--------
 drivers/i3c/master/mipi-i3c-hci/pio.c              |  17 ++-
 include/linux/platform_data/mipi-i3c-hci.h         |  15 ++
 12 files changed, 185 insertions(+), 131 deletions(-)
 create mode 100644 include/linux/platform_data/mipi-i3c-hci.h

Regards
Adrian

Signature · 3 lines
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
maintainer Applied
#13 lore raw
In reply to Adrian Hunter
Quoted 8 lines · Adrian Hunter

All patches now have Frank's Rev'd-by

Changes in V4:

	Add Frank's Rev'd-by for patches 5 - 8, 10 - 11

[...]

Applied, thanks!

[01/11] i3c: mipi-i3c-hci: Remove duplicate blank lines

        https://git.kernel.org/i3c/c/840688d8e65c
[02/11] i3c: mipi-i3c-hci: Stop reading Extended Capabilities if capability ID is 0
        https://git.kernel.org/i3c/c/0818e4aa8fde
[03/11] i3c: mipi-i3c-hci: Quieten initialization messages
        https://git.kernel.org/i3c/c/581d5b7953b8
[04/11] i3c: mipi-i3c-hci-pci: Do not repeatedly check for NULL driver_data
        https://git.kernel.org/i3c/c/d540d090be8f
[05/11] i3c: mipi-i3c-hci-pci: Enable MSI support
        https://git.kernel.org/i3c/c/b43181b724e8
[06/11] i3c: mipi-i3c-hci-pci: Assign unique device names and IDs for Intel LPSS I3C
        https://git.kernel.org/i3c/c/35c0bfe8fd10
[07/11] i3c: mipi-i3c-hci: Allow for Multi-Bus Instances
        https://git.kernel.org/i3c/c/b8460480f62e
[08/11] i3c: mipi-i3c-hci-pci: Pass base regs as platform data to i3c core device
        https://git.kernel.org/i3c/c/9a4d56b42ff0
[09/11] i3c: mipi-i3c-hci-pci: Convert to MFD driver
        https://git.kernel.org/i3c/c/0590fe32f904
[10/11] i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances
        https://git.kernel.org/i3c/c/9b1679028e76
[11/11] i3c: mipi-i3c-hci-pci: Define Multi-Bus instances for supported controllers
        https://git.kernel.org/i3c/c/540a55a5bafd

Best regards,

Signature · 8 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c