[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250712194255.7022-1-jelonek.jonas@gmail.com>
Date: Sat, 12 Jul 2025 19:42:52 +0000
From: Jonas Jelonek <jelonek.jonas@...il.com>
To: linux-i2c@...r.kernel.org,
Chris Packham <chris.packham@...iedtelesis.co.nz>,
Andi Shyti <andi.shyti@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Markus Stockhausen <markus.stockhausen@....de>,
Jonas Jelonek <jelonek.jonas@...il.com>
Subject: [PATCH v2 0/3] i2c: rework and extend RTL9300 I2C driver
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
Powered by blists - more mailing lists