devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] i2c: rework and extend RTL9300 I2C driver
@ 2025-07-12 19:42 Jonas Jelonek
  2025-07-12 19:42 ` [PATCH v2 1/3] i2c: rework RTL9300 I2C controller driver Jonas Jelonek
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jonas Jelonek @ 2025-07-12 19:42 UTC (permalink / raw)
  To: linux-i2c, Chris Packham, Andi Shyti, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, linux-kernel
  Cc: Markus Stockhausen, Jonas Jelonek

This patch series reworks the current implementation of the driver for
I2C controller integrated into RTL9300 SoCs to simplify support
extension, and adds support for the RTL9310 series.
Goal of this is to have RTL9310 support upstream in a proper
implementation to be able to drop downstream versions of this driver.

The first patch reworks the driver to use more of the regmap API.
Instead of using macros, all registers are defined as reg_field and
operations on these registers are performed using regmap_field and the
corresponding API. This simplifies adding support for further chip
families and avoids potential redundant code by just providing
chip-specific functions for every chip family.

The second patch extends the existing dt-bindings of RTL9300 for RTL9310
support.

The third patch makes use of previous changes by adding support for the
RTL9310 series, providing the correct register definitions and a few
specifics. This also uses a new vendor dt-property which was added by
the second patch to properly manage the I2C controllers. Having this
property is necessary to properly describe the hardware and allow the
driver to correctly work with the I2C controllers.

Both has been tested successfully on RTL9302B-based Zyxel XGS1210-12
and RTL9313-based Netgear MS510TXM.

Compile-tested with Linux, run-tested as backport in OpenWrt on the
aforementioned devices.

--
Changelog

v2: - Patch 1: 
	- adjusted commit message
    	- retained Tested-By and Reviewed-By from Chris Packham
    - Patch 2:
    	- simplified check as suggested by Markus Stockhausen
	- fixed commit message
    - Patch 3 (all requested by Krzysztof):
    	- use vendor property instead of generic
	- add front compatibles to make binding complete
	- fix commit message
    - reordered patches, dt-bindings patch now comes before its 'user'
    - properly add device-tree list and relevant maintainers to To/Cc

--

Jonas Jelonek (3):
  i2c: rework RTL9300 I2C controller driver
  dt-bindings: i2c: realtek,rtl9301-i2c: extend for RTL9310 support
  i2c: add RTL9310 support to RTL9300 I2C controller driver

 .../bindings/i2c/realtek,rtl9301-i2c.yaml     |  38 ++-
 drivers/i2c/busses/i2c-rtl9300.c              | 231 +++++++++++++-----
 2 files changed, 199 insertions(+), 70 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-07-23  7:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-12 19:42 [PATCH v2 0/3] i2c: rework and extend RTL9300 I2C driver Jonas Jelonek
2025-07-12 19:42 ` [PATCH v2 1/3] i2c: rework RTL9300 I2C controller driver Jonas Jelonek
2025-07-12 19:42 ` [PATCH v2 2/3] dt-bindings: i2c: realtek,rtl9301-i2c: extend for RTL9310 support Jonas Jelonek
2025-07-12 21:22   ` Rob Herring (Arm)
2025-07-14  6:00   ` Krzysztof Kozlowski
2025-07-20 19:51     ` Jonas Jelonek
2025-07-21  7:02       ` Krzysztof Kozlowski
2025-07-22 18:25         ` Jonas Jelonek
2025-07-23  6:22           ` Krzysztof Kozlowski
2025-07-23  7:49             ` Jonas Jelonek
2025-07-12 19:42 ` [PATCH v2 3/3] i2c: add RTL9310 support to RTL9300 I2C controller driver Jonas Jelonek

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).