From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Frank Li <Frank.li@nxp.com>,
Durai Manickam KR <durai.manickamkr@microchip.com>
Cc: linux-i3c@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, alexandre.belloni@bootlin.com,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
balamanikandan.gunasundar@microchip.com,
nicolas.ferre@microchip.com
Subject: Re: [PATCH 2/4] i3c: mipi-i3c-hci: add microchip sama7d65 SoC
Date: Thu, 25 Sep 2025 16:23:10 +0300 [thread overview]
Message-ID: <9708c09f-5cd7-4197-b245-04d92f6b1400@linux.intel.com> (raw)
In-Reply-To: <aMwy9MQOf3pG4Fvw@lizhi-Precision-Tower-5810>
Hi
On 9/18/25 7:27 PM, Frank Li wrote:
> On Thu, Sep 18, 2025 at 03:24:27PM +0530, Durai Manickam KR wrote:
>> Add support for microchip sama7d65 SoC I3C HCI master only IP.
>> Features tested and supported :
>> Standard CCC commands.
>> I3C SDR mode private transfers in PIO mode.
>> I2C transfers in PIO mode.
>> Pure bus mode and mixed bus mode.
>>
>> Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
>> ---
>> drivers/i3c/master/mipi-i3c-hci/Makefile | 3 +-
>> drivers/i3c/master/mipi-i3c-hci/core.c | 28 ++++++++++++
>> drivers/i3c/master/mipi-i3c-hci/hci.h | 12 ++++++
>> .../i3c/master/mipi-i3c-hci/hci_quirks_mchp.c | 43 +++++++++++++++++++
>> 4 files changed, 85 insertions(+), 1 deletion(-)
>> create mode 100644 drivers/i3c/master/mipi-i3c-hci/hci_quirks_mchp.c
>>
>> diff --git a/drivers/i3c/master/mipi-i3c-hci/Makefile b/drivers/i3c/master/mipi-i3c-hci/Makefile
>> index e3d3ef757035..f463afc4566a 100644
>> --- a/drivers/i3c/master/mipi-i3c-hci/Makefile
>> +++ b/drivers/i3c/master/mipi-i3c-hci/Makefile
>> @@ -4,5 +4,6 @@ obj-$(CONFIG_MIPI_I3C_HCI) += mipi-i3c-hci.o
>> mipi-i3c-hci-y := core.o ext_caps.o pio.o dma.o \
>> cmd_v1.o cmd_v2.o \
>> dat_v1.o dct_v1.o \
>> - hci_quirks.o
>> + hci_quirks.o \
>> + hci_quirks_mchp.o
>> obj-$(CONFIG_MIPI_I3C_HCI_PCI) += mipi-i3c-hci-pci.o
>> diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
>> index 60f1175f1f37..cb0673d62c03 100644
>> --- a/drivers/i3c/master/mipi-i3c-hci/core.c
>> +++ b/drivers/i3c/master/mipi-i3c-hci/core.c
>> @@ -8,6 +8,7 @@
>> */
>>
>> #include <linux/bitfield.h>
>> +#include <linux/clk.h>
>> #include <linux/device.h>
>> #include <linux/errno.h>
>> #include <linux/i3c/master.h>
>> @@ -651,6 +652,9 @@ static int i3c_hci_init(struct i3c_hci *hci)
>> hci->DAT_regs = offset ? hci->base_regs + offset : NULL;
>> hci->DAT_entries = FIELD_GET(DAT_TABLE_SIZE, regval);
>> hci->DAT_entry_size = FIELD_GET(DAT_ENTRY_SIZE, regval) ? 0 : 8;
>> + /* Microchip SAMA7D65 SoC doesnot support DAT entry size bits in the DAT section offset register */
>> + if (hci->quirks & MCHP_HCI_QUIRK_SAMA7D65)
>> + hci->DAT_entry_size = 8;
>
> #define MCHP_HCI_QUIRK_FIX_DATA_ENTRY_SIZE_8
>
> if (hci->quirks & MCHP_HCI_QUIRK_FIX_DATA_ENTRY_SIZE_8)
> hci->DAT_entry_size = 8;
> else
> hci->DAT_entry_size = FIELD_GET(DAT_ENTRY_SIZE, regval) ? 0 : 8;
>
> in case other vendor have similar problem.
>
Are DAT_entry_size and DCT_entry_size quirks even needed? Does your HW
read nonzero values and you need the quirk?
>> + /* Microchip SAMA7d65 SoC supports only PIO mode */
>> + if (hci->quirks & MCHP_HCI_QUIRK_PIO_MODE)
>> + hci->RHS_regs = NULL;
>> +
Please use existing HCI_QUIRK_PIO_MODE quirk and then you don't need
this added code.
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-09-25 13:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 9:54 [PATCH 0/4] Add microchip sama7d65 SoC I3C support Durai Manickam KR
2025-09-18 9:54 ` [PATCH 1/4] clk: at91: sama7d65: add peripheral clock for I3C Durai Manickam KR
2025-09-18 9:54 ` [PATCH 2/4] i3c: mipi-i3c-hci: add microchip sama7d65 SoC Durai Manickam KR
2025-09-18 16:27 ` Frank Li
2025-09-25 13:23 ` Jarkko Nikula [this message]
2025-09-18 9:54 ` [PATCH 3/4] ARM: configs: at91: sama7: add sama7d65 i3c-hci Durai Manickam KR
2025-09-18 9:54 ` [PATCH 4/4] ARM: dts: microchip: add I3C controller Durai Manickam KR
2025-09-18 15:44 ` Frank Li
2025-09-18 15:48 ` Conor Dooley
2025-09-18 14:50 ` [PATCH 0/4] Add microchip sama7d65 SoC I3C support Rob Herring (Arm)
2025-09-18 15:11 ` Conor Dooley
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=9708c09f-5cd7-4197-b245-04d92f6b1400@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=Frank.li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=balamanikandan.gunasundar@microchip.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=durai.manickamkr@microchip.com \
--cc=krzk+dt@kernel.org \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).