Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] i2c: Add i2c-shared-gpio driver
@ 2026-05-11 16:25 Markus Stockhausen
  2026-05-11 16:25 ` [PATCH v2 1/2] dt-bindings: i2c: Add i2c-shared-gpio Markus Stockhausen
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Markus Stockhausen @ 2026-05-11 16:25 UTC (permalink / raw)
  To: brgl, wsa+renesas, andi.shyti, robh, krzk+dt, conor+dt, linux-i2c,
	devicetree
  Cc: Markus Stockhausen

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/



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

end of thread, other threads:[~2026-05-13 12:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 16:25 [PATCH v2 0/2] i2c: Add i2c-shared-gpio driver Markus Stockhausen
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox