[PATCH v5 0/8] i2c: rtl9300: support for RTL9607C I2C controller

Rustam Adilov posted 8 patches 1 week ago
There is a newer version of this series
.../bindings/i2c/realtek,rtl9301-i2c.yaml     |  15 ++
drivers/i2c/busses/i2c-rtl9300.c              | 191 ++++++++++++++----
2 files changed, 171 insertions(+), 35 deletions(-)
[PATCH v5 0/8] i2c: rtl9300: support for RTL9607C I2C controller
Posted by Rustam Adilov 1 week ago
This patch series for the RTL9300 I2C driver adds i2c support for
RTL9607C SoC. They are somewhat different to the RTL9300 and
RTL9310 but not enough to warrant a new whole driver.

The patch series was split into patches that add/change something in the
driver to smooth out the RTL9607C support addition in the end and for
ease of review. Because of that, the patch 8 depends on all the prior
patches before it.

RTL9607C primarly uses the i2c controller for communication with laser
driver over on i2c interface 1 or 2.

I have successfully tested the byte read operations on my RTL9607C board
which has GN25L95 laser driver in OpenWrt.

This patch series now depends on the patch [1] from Jan Kantert.

[1] -
https://lore.kernel.org/all/20260227111134.2163701-1-jan-kernel@kantert.net/

---
Changelog in v5
- reworded the commit message in Patch 5 to make it clear that the existing
  devices also have i2c master controller clocks.
- Link to v4: https://lore.kernel.org/linux-i2c/20260323071337.15410-1-adilov@disroot.org/

Changelog in v4
- moved the patch 7 that changes bindings to be before patch 5 where clk
  is introduced in the driver.
- changed the "realtek,rtl9607-i2c" compatible to require the "clocks" to
  be specified and with it moved it out of "realtek,rtl9310-i2c" check to its
  own place for cleanliness (how it was originally in v1).
- Link to v3: https://lore.kernel.org/linux-i2c/20260322123411.32102-1-adilov@disroot.org/

Changelog in v3
- Patch 7
  - reworded the commit message to better describe i2c clock.
  - make clocks property available for all compatibles.
  - change "realtek,rtl9607-i2c" compatible to be under the same if statement
    as "realtek,rtl9310-i2c" for "realtek,scl".
- Link to v2: https://lore.kernel.org/linux-i2c/20260319175753.32338-1-adilov@disroot.org/

Changelog in v2
- rebased on top of the patch from Jan Kantert.
- Patch 7 (to my best understanding of Krzysztof's request):
 - added the "clocks: false" for compatibles that are not realtek,rtl9607-i2c.
- Link to v1: https://lore.kernel.org/linux-i2c/20260314082628.25206-1-adilov@disroot.org/

Rustam Adilov (8):
  i2c: rtl9300: split data_reg into read and write reg
  i2c: rtl9300: introduce max length property to driver data
  i2c: rtl9300: introduce F_BUSY to the reg_fields struct
  i2c: rtl9300: introduce a property for 8 bit width reg address
  dt-bindings: i2c: realtek,rtl9301-i2c: extend for clocks and RTL9607C
    support
  i2c: rtl9300: introduce clk struct for upcoming rtl9607 support
  i2c: rtl9300: intoduce new function properties to driver data
  i2c: rtl9300: add RTL9607C i2c controller support

 .../bindings/i2c/realtek,rtl9301-i2c.yaml     |  15 ++
 drivers/i2c/busses/i2c-rtl9300.c              | 191 ++++++++++++++----
 2 files changed, 171 insertions(+), 35 deletions(-)

-- 
2.53.0
Re: [PATCH v5 0/8] i2c: rtl9300: support for RTL9607C I2C controller
Posted by Andi Shyti 1 day, 20 hours ago
Hi Rustam,

> Rustam Adilov (8):
>   i2c: rtl9300: split data_reg into read and write reg
>   i2c: rtl9300: introduce max length property to driver data
>   i2c: rtl9300: introduce F_BUSY to the reg_fields struct
>   i2c: rtl9300: introduce a property for 8 bit width reg address
>   dt-bindings: i2c: realtek,rtl9301-i2c: extend for clocks and RTL9607C
>     support
>   i2c: rtl9300: introduce clk struct for upcoming rtl9607 support
>   i2c: rtl9300: intoduce new function properties to driver data

Patch 7 does not apply (not even in i2c-host-next, next,
mainline). Which branch are you on? Can you please
rebase on top of i2c/i2c-host, please?

Thanks,
Andi

>   i2c: rtl9300: add RTL9607C i2c controller support
Re: [PATCH v5 0/8] i2c: rtl9300: support for RTL9607C I2C controller
Posted by Rustam Adilov 1 day, 4 hours ago
Hello Andi,
On 2026-03-31 22:38, Andi Shyti wrote:
> Hi Rustam,
> 
>> Rustam Adilov (8):
>>   i2c: rtl9300: split data_reg into read and write reg
>>   i2c: rtl9300: introduce max length property to driver data
>>   i2c: rtl9300: introduce F_BUSY to the reg_fields struct
>>   i2c: rtl9300: introduce a property for 8 bit width reg address
>>   dt-bindings: i2c: realtek,rtl9301-i2c: extend for clocks and 
>> RTL9607C
>>     support
>>   i2c: rtl9300: introduce clk struct for upcoming rtl9607 support
>>   i2c: rtl9300: intoduce new function properties to driver data
> 
> Patch 7 does not apply (not even in i2c-host-next, next,
> mainline). Which branch are you on? Can you please
> rebase on top of i2c/i2c-host, please?
> 
> Thanks,
> Andi
> 
>>   i2c: rtl9300: add RTL9607C i2c controller support

As per the request of Chris Packham [1] this whole patch sets depends on 
[2] to be applied
first before my patches.
I don't know if you have seen it yet cause Jan Kantert didn't include 
you in the emails to
the send the patch to.

Although, i just now have noticed patch 7 has a typo in its commit 
subject which i have to fix.

[1] - 
https://lore.kernel.org/linux-i2c/c933a245-2b35-41a5-9eee-cb655c8231ae@alliedtelesis.co.nz/
[2] - 
https://lore.kernel.org/all/20260227111134.2163701-1-jan-kernel@kantert.net/

Best,
Rustam
Re: [PATCH v5 0/8] i2c: rtl9300: support for RTL9607C I2C controller
Posted by Andi Shyti 21 hours ago
Hi Rustam,

On Wed, Apr 01, 2026 at 02:09:35PM +0000, Rustam Adilov wrote:
> On 2026-03-31 22:38, Andi Shyti wrote:
> > > Rustam Adilov (8):
> > >   i2c: rtl9300: split data_reg into read and write reg
> > >   i2c: rtl9300: introduce max length property to driver data
> > >   i2c: rtl9300: introduce F_BUSY to the reg_fields struct
> > >   i2c: rtl9300: introduce a property for 8 bit width reg address
> > >   dt-bindings: i2c: realtek,rtl9301-i2c: extend for clocks and
> > > RTL9607C
> > >     support
> > >   i2c: rtl9300: introduce clk struct for upcoming rtl9607 support
> > >   i2c: rtl9300: intoduce new function properties to driver data
> > 
> > Patch 7 does not apply (not even in i2c-host-next, next,
> > mainline). Which branch are you on? Can you please
> > rebase on top of i2c/i2c-host, please?
> > 
> > Thanks,
> > Andi
> > 
> > >   i2c: rtl9300: add RTL9607C i2c controller support
> 
> As per the request of Chris Packham [1] this whole patch sets depends on [2]
> to be applied
> first before my patches.
> I don't know if you have seen it yet cause Jan Kantert didn't include you in
> the emails to
> the send the patch to.
> 
> Although, i just now have noticed patch 7 has a typo in its commit subject
> which i have to fix.
> 
> [1] - https://lore.kernel.org/linux-i2c/c933a245-2b35-41a5-9eee-cb655c8231ae@alliedtelesis.co.nz/
> [2] -
> https://lore.kernel.org/all/20260227111134.2163701-1-jan-kernel@kantert.net/

Thanks, I overlooked that. I will follow the dependencies.

Andi