[PATCH v5 0/5] i3c: Add basic HDR mode support

Frank Li posted 5 patches 4 months ago
There is a newer version of this series
.../devicetree/bindings/trivial-devices.yaml       |   4 +
drivers/i3c/device.c                               |  27 +-
drivers/i3c/internals.h                            |   6 +-
drivers/i3c/master.c                               |  19 +-
drivers/i3c/master/svc-i3c-master.c                |  96 +++-
drivers/iio/magnetometer/Kconfig                   |  12 +
drivers/iio/magnetometer/Makefile                  |   1 +
drivers/iio/magnetometer/mmc5633.c                 | 579 +++++++++++++++++++++
include/linux/i3c/device.h                         |  34 +-
include/linux/i3c/master.h                         |   4 +
10 files changed, 745 insertions(+), 37 deletions(-)
[PATCH v5 0/5] i3c: Add basic HDR mode support
Posted by Frank Li 4 months ago
Add basic HDR mode support, only support private transfer, not support
CCC command.

Update i3c framework API to allow pass down mode and extend driver callback
function.

Implement HDR transfer in svc i3c master driver.

Simplifed HDR flow is (ref i3c spec line 5514) Figure 129

<--              SDR            ---> | <--- HDR
START 0x7E RnW(0) ACK CCC(ENTHDR0) T   HDR-CMD(00-7f write, 80--ff read)

                                    ----> |
HDR-DATA HDR-CRC HDR-RESTART .... HDR-EXIT

Note: HDR-CMD is 16bit data, which included 7bit slave address and 8bit
read/write command.

svc hardware can auto issue SDR part.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Changes in v5:
- Just realized missed CC mail list devicetree@vger.kernel.org and resend
- Link to v4: https://lore.kernel.org/r/20251007-i3c_ddr-v4-0-3afea5105775@nxp.com

Changes in v4:
- use master's hdr_cap to check HDR cap.
- add mmc5603 support.
- Link to v3: https://lore.kernel.org/r/20250930-i3c_ddr-v3-0-b627dc2ef172@nxp.com

Changes in v3:
- Add new patch for change rnw to union for svc.
- Detial changes see each patch's change log.
- Link to v2: https://lore.kernel.org/r/20250924-i3c_ddr-v2-0-682a0eb32572@nxp.com

Changes in v2:
- Add sensor driver, which use HDR mode read/write data.
- change priv_xfer to i3c_xfer.
- Link to v1: https://lore.kernel.org/r/20250129-i3c_ddr-v1-0-028a7a5d4324@nxp.com

---
Frank Li (5):
      i3c: Add HDR API support
      i3c: master: svc: Replace bool rnw with union for HDR support
      i3c: master: svc: Add basic HDR mode support
      dt-bindings: trivial-devices: add MEMSIC 3-axis magnetometer
      iio: magnetometer: Add mmc5633 sensor

 .../devicetree/bindings/trivial-devices.yaml       |   4 +
 drivers/i3c/device.c                               |  27 +-
 drivers/i3c/internals.h                            |   6 +-
 drivers/i3c/master.c                               |  19 +-
 drivers/i3c/master/svc-i3c-master.c                |  96 +++-
 drivers/iio/magnetometer/Kconfig                   |  12 +
 drivers/iio/magnetometer/Makefile                  |   1 +
 drivers/iio/magnetometer/mmc5633.c                 | 579 +++++++++++++++++++++
 include/linux/i3c/device.h                         |  34 +-
 include/linux/i3c/master.h                         |   4 +
 10 files changed, 745 insertions(+), 37 deletions(-)
---
base-commit: 5248ab97a6dd1dc6856422f6b1595baaf4fa85ce
change-id: 20250129-i3c_ddr-b15488901eb8

Best regards,
--
Frank Li <Frank.Li@nxp.com>
Re: [PATCH v5 0/5] i3c: Add basic HDR mode support
Posted by Jonathan Cameron 3 months, 4 weeks ago
On Tue, 07 Oct 2025 16:06:12 -0400
Frank Li <Frank.Li@nxp.com> wrote:

> Add basic HDR mode support, only support private transfer, not support
> CCC command.
> 
> Update i3c framework API to allow pass down mode and extend driver callback
> function.
> 
> Implement HDR transfer in svc i3c master driver.
> 
> Simplifed HDR flow is (ref i3c spec line 5514) Figure 129
> 
> <--              SDR            ---> | <--- HDR
> START 0x7E RnW(0) ACK CCC(ENTHDR0) T   HDR-CMD(00-7f write, 80--ff read)
> 
>                                     ----> |  
> HDR-DATA HDR-CRC HDR-RESTART .... HDR-EXIT
> 
> Note: HDR-CMD is 16bit data, which included 7bit slave address and 8bit
> read/write command.
> 
> svc hardware can auto issue SDR part.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

Whilst there will probably have to be a v6 for the ACPI ID issue in patch 5,
I'd like to ask the question of how are we planning to merge this?

Maybe an immutable branch either in IIO or I3C trees that the other one picks up?

It's a new driver so could gamble on taking the IIO driver the I3C tree but even
then I'd like a topic / immutable branch in case any IIO wide refactors or similar
hit this cycle.

Thanks,

Jonathan

> ---
> Changes in v5:
> - Just realized missed CC mail list devicetree@vger.kernel.org and resend
> - Link to v4: https://lore.kernel.org/r/20251007-i3c_ddr-v4-0-3afea5105775@nxp.com
> 
> Changes in v4:
> - use master's hdr_cap to check HDR cap.
> - add mmc5603 support.
> - Link to v3: https://lore.kernel.org/r/20250930-i3c_ddr-v3-0-b627dc2ef172@nxp.com
> 
> Changes in v3:
> - Add new patch for change rnw to union for svc.
> - Detial changes see each patch's change log.
> - Link to v2: https://lore.kernel.org/r/20250924-i3c_ddr-v2-0-682a0eb32572@nxp.com
> 
> Changes in v2:
> - Add sensor driver, which use HDR mode read/write data.
> - change priv_xfer to i3c_xfer.
> - Link to v1: https://lore.kernel.org/r/20250129-i3c_ddr-v1-0-028a7a5d4324@nxp.com
> 
> ---
> Frank Li (5):
>       i3c: Add HDR API support
>       i3c: master: svc: Replace bool rnw with union for HDR support
>       i3c: master: svc: Add basic HDR mode support
>       dt-bindings: trivial-devices: add MEMSIC 3-axis magnetometer
>       iio: magnetometer: Add mmc5633 sensor
> 
>  .../devicetree/bindings/trivial-devices.yaml       |   4 +
>  drivers/i3c/device.c                               |  27 +-
>  drivers/i3c/internals.h                            |   6 +-
>  drivers/i3c/master.c                               |  19 +-
>  drivers/i3c/master/svc-i3c-master.c                |  96 +++-
>  drivers/iio/magnetometer/Kconfig                   |  12 +
>  drivers/iio/magnetometer/Makefile                  |   1 +
>  drivers/iio/magnetometer/mmc5633.c                 | 579 +++++++++++++++++++++
>  include/linux/i3c/device.h                         |  34 +-
>  include/linux/i3c/master.h                         |   4 +
>  10 files changed, 745 insertions(+), 37 deletions(-)
> ---
> base-commit: 5248ab97a6dd1dc6856422f6b1595baaf4fa85ce
> change-id: 20250129-i3c_ddr-b15488901eb8
> 
> Best regards,
> --
> Frank Li <Frank.Li@nxp.com>
>
Re: [PATCH v5 0/5] i3c: Add basic HDR mode support
Posted by Alexandre Belloni 3 months, 3 weeks ago
On 12/10/2025 18:03:27+0100, Jonathan Cameron wrote:
> On Tue, 07 Oct 2025 16:06:12 -0400
> Frank Li <Frank.Li@nxp.com> wrote:
> 
> > Add basic HDR mode support, only support private transfer, not support
> > CCC command.
> > 
> > Update i3c framework API to allow pass down mode and extend driver callback
> > function.
> > 
> > Implement HDR transfer in svc i3c master driver.
> > 
> > Simplifed HDR flow is (ref i3c spec line 5514) Figure 129
> > 
> > <--              SDR            ---> | <--- HDR
> > START 0x7E RnW(0) ACK CCC(ENTHDR0) T   HDR-CMD(00-7f write, 80--ff read)
> > 
> >                                     ----> |  
> > HDR-DATA HDR-CRC HDR-RESTART .... HDR-EXIT
> > 
> > Note: HDR-CMD is 16bit data, which included 7bit slave address and 8bit
> > read/write command.
> > 
> > svc hardware can auto issue SDR part.
> > 
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> 
> Whilst there will probably have to be a v6 for the ACPI ID issue in patch 5,
> I'd like to ask the question of how are we planning to merge this?
> 
> Maybe an immutable branch either in IIO or I3C trees that the other one picks up?
> 
> It's a new driver so could gamble on taking the IIO driver the I3C tree but even
> then I'd like a topic / immutable branch in case any IIO wide refactors or similar
> hit this cycle.
> 

I can definitively provide an immutable branch once this goes in or if
you are more comfortable with this, I guess there is no urgency and we
could apply this over two cycles, first the I3C part and then you can
take the driver.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Re: [PATCH v5 0/5] i3c: Add basic HDR mode support
Posted by Jonathan Cameron 3 months, 3 weeks ago
On Mon, 13 Oct 2025 21:54:55 +0200
Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:

> On 12/10/2025 18:03:27+0100, Jonathan Cameron wrote:
> > On Tue, 07 Oct 2025 16:06:12 -0400
> > Frank Li <Frank.Li@nxp.com> wrote:
> >   
> > > Add basic HDR mode support, only support private transfer, not support
> > > CCC command.
> > > 
> > > Update i3c framework API to allow pass down mode and extend driver callback
> > > function.
> > > 
> > > Implement HDR transfer in svc i3c master driver.
> > > 
> > > Simplifed HDR flow is (ref i3c spec line 5514) Figure 129
> > > 
> > > <--              SDR            ---> | <--- HDR
> > > START 0x7E RnW(0) ACK CCC(ENTHDR0) T   HDR-CMD(00-7f write, 80--ff read)
> > >   
> > >                                     ----> |    
> > > HDR-DATA HDR-CRC HDR-RESTART .... HDR-EXIT
> > > 
> > > Note: HDR-CMD is 16bit data, which included 7bit slave address and 8bit
> > > read/write command.
> > > 
> > > svc hardware can auto issue SDR part.
> > > 
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>  
> > 
> > Whilst there will probably have to be a v6 for the ACPI ID issue in patch 5,
> > I'd like to ask the question of how are we planning to merge this?
> > 
> > Maybe an immutable branch either in IIO or I3C trees that the other one picks up?
> > 
> > It's a new driver so could gamble on taking the IIO driver the I3C tree but even
> > then I'd like a topic / immutable branch in case any IIO wide refactors or similar
> > hit this cycle.
> >   
> 
> I can definitively provide an immutable branch once this goes in or if
> you are more comfortable with this, I guess there is no urgency and we
> could apply this over two cycles, first the I3C part and then you can
> take the driver.
> 
Mostly because I'm really forgetful and hence don't like tracking stuff over
multiple cycles, I'd prefer an immutable once all patches are ready to go.

Thanks,

Jonathan

>
Re: [PATCH v5 0/5] i3c: Add basic HDR mode support
Posted by Frank Li 3 months, 3 weeks ago
On Sun, Oct 12, 2025 at 06:03:27PM +0100, Jonathan Cameron wrote:
> On Tue, 07 Oct 2025 16:06:12 -0400
> Frank Li <Frank.Li@nxp.com> wrote:
>
> > Add basic HDR mode support, only support private transfer, not support
> > CCC command.
> >
> > Update i3c framework API to allow pass down mode and extend driver callback
> > function.
> >
> > Implement HDR transfer in svc i3c master driver.
> >
> > Simplifed HDR flow is (ref i3c spec line 5514) Figure 129
> >
> > <--              SDR            ---> | <--- HDR
> > START 0x7E RnW(0) ACK CCC(ENTHDR0) T   HDR-CMD(00-7f write, 80--ff read)
> >
> >                                     ----> |
> > HDR-DATA HDR-CRC HDR-RESTART .... HDR-EXIT
> >
> > Note: HDR-CMD is 16bit data, which included 7bit slave address and 8bit
> > read/write command.
> >
> > svc hardware can auto issue SDR part.
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
>
> Whilst there will probably have to be a v6 for the ACPI ID issue in patch 5,
> I'd like to ask the question of how are we planning to merge this?
>
> Maybe an immutable branch either in IIO or I3C trees that the other one picks up?
>
> It's a new driver so could gamble on taking the IIO driver the I3C tree but even
> then I'd like a topic / immutable branch in case any IIO wide refactors or similar
> hit this cycle.

It is up to Alexandre Belloni.

Frank
>
> Thanks,
>
> Jonathan
>
> > ---
> > Changes in v5:
> > - Just realized missed CC mail list devicetree@vger.kernel.org and resend
> > - Link to v4: https://lore.kernel.org/r/20251007-i3c_ddr-v4-0-3afea5105775@nxp.com
> >
> > Changes in v4:
> > - use master's hdr_cap to check HDR cap.
> > - add mmc5603 support.
> > - Link to v3: https://lore.kernel.org/r/20250930-i3c_ddr-v3-0-b627dc2ef172@nxp.com
> >
> > Changes in v3:
> > - Add new patch for change rnw to union for svc.
> > - Detial changes see each patch's change log.
> > - Link to v2: https://lore.kernel.org/r/20250924-i3c_ddr-v2-0-682a0eb32572@nxp.com
> >
> > Changes in v2:
> > - Add sensor driver, which use HDR mode read/write data.
> > - change priv_xfer to i3c_xfer.
> > - Link to v1: https://lore.kernel.org/r/20250129-i3c_ddr-v1-0-028a7a5d4324@nxp.com
> >
> > ---
> > Frank Li (5):
> >       i3c: Add HDR API support
> >       i3c: master: svc: Replace bool rnw with union for HDR support
> >       i3c: master: svc: Add basic HDR mode support
> >       dt-bindings: trivial-devices: add MEMSIC 3-axis magnetometer
> >       iio: magnetometer: Add mmc5633 sensor
> >
> >  .../devicetree/bindings/trivial-devices.yaml       |   4 +
> >  drivers/i3c/device.c                               |  27 +-
> >  drivers/i3c/internals.h                            |   6 +-
> >  drivers/i3c/master.c                               |  19 +-
> >  drivers/i3c/master/svc-i3c-master.c                |  96 +++-
> >  drivers/iio/magnetometer/Kconfig                   |  12 +
> >  drivers/iio/magnetometer/Makefile                  |   1 +
> >  drivers/iio/magnetometer/mmc5633.c                 | 579 +++++++++++++++++++++
> >  include/linux/i3c/device.h                         |  34 +-
> >  include/linux/i3c/master.h                         |   4 +
> >  10 files changed, 745 insertions(+), 37 deletions(-)
> > ---
> > base-commit: 5248ab97a6dd1dc6856422f6b1595baaf4fa85ce
> > change-id: 20250129-i3c_ddr-b15488901eb8
> >
> > Best regards,
> > --
> > Frank Li <Frank.Li@nxp.com>
> >
>