From: Markus Stockhausen <markus.stockhausen@gmx.de>
To: brgl@kernel.org, wsa+renesas@sang-engineering.com,
andi.shyti@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org
Cc: Markus Stockhausen <markus.stockhausen@gmx.de>
Subject: [PATCH v2 0/2] i2c: Add i2c-shared-gpio driver
Date: Mon, 11 May 2026 18:25:26 +0200 [thread overview]
Message-ID: <20260511162528.84508-1-markus.stockhausen@gmx.de> (raw)
This series adds support for hardware designs where multiple I2C
gpio based busses are realized with dedicated SDA lines and a
shared SCL line. This way N busses can be realized with N+1 gpios.
Currently there are several Realtek switches that make use of
this design. Samples are:
HPE 1920-48G
Linksys LGS310C
Zyxel GS1920-24
Engenius EWS2910
D-Link DGS-1250
While at first glance this might be a usecase for the new shared
gpio architecture, discussion and testing shows that this is not
trivial at all. A shared gpio is handled by a voting system. If
there at least one user that votes for the GPIO to be "high",
it stays high.
So the implementation manages several classic bitbang buses with
locking/unlocking in the pre_xfer/post_xfer handlers.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
---
v1 -> v2:
- Adapted the dts so that all SDA/SCL gpios are defined in the
parent node. This way the i2c child nodes are kept clean.
Their <reg> property is used as an index into the parent SDA
list.
- Adapted the driver to make use of the new dts structure.
- Hardened the driver by adding multiple consistency checks
during probing (number of busses, duplicate dts nodes, ...).
- Added recovery handlers that are synchronized via the central
mutex like normal bus transfers.
v1: https://lore.kernel.org/linux-i2c/20260507181711.2696783-1-markus.stockhausen@gmx.de/
next reply other threads:[~2026-05-11 16:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 16:25 Markus Stockhausen [this message]
2026-05-11 16:25 ` [PATCH v2 1/2] dt-bindings: i2c: Add i2c-shared-gpio Markus Stockhausen
2026-05-11 17:36 ` Rob Herring (Arm)
2026-05-12 20:59 ` sashiko-bot
2026-05-11 16:25 ` [PATCH v2 2/2] i2c: Add driver for gpio based busses with shared SCL Markus Stockhausen
2026-05-12 21:44 ` sashiko-bot
2026-05-12 11:00 ` [PATCH v2 0/2] i2c: Add i2c-shared-gpio driver Bartosz Golaszewski
2026-05-13 5:33 ` AW: " markus.stockhausen
2026-05-13 7:12 ` Wolfram Sang
2026-05-13 7:26 ` Bartosz Golaszewski
2026-05-13 7:47 ` Wolfram Sang
2026-05-13 7:50 ` Bartosz Golaszewski
2026-05-13 12:11 ` Rob Herring
2026-05-13 12:25 ` AW: " markus.stockhausen
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=20260511162528.84508-1-markus.stockhausen@gmx.de \
--to=markus.stockhausen@gmx.de \
--cc=andi.shyti@kernel.org \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=robh@kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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