From: Ross Cawston <ross@r-sc.ca>
To: andi.shyti@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
kees@kernel.org, gustavoars@kernel.org,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
Ross Cawston <ross@r-sc.ca>
Subject: [PATCH 0/2] i2c: add GPIO buses sharing one SCL line
Date: Sun, 18 Oct 2026 12:43:13 -0700 [thread overview]
Message-ID: <20261018194315.945-1-ross@r-sc.ca> (raw)
Some Realtek RTL930x switches bit-bang several I2C buses on SoC GPIOs
with a single SCL line and one SDA line per bus. The MokerLink
POE-10G07110GSM, for example, has its fan controller, its PoE
controllers and its SFP+ cage on SDA GPIOs 9, 10 and 11, all clocked
by GPIO 8. i2c-gpio cannot describe this: every bus would request the
same SCL GPIO.
This series adds a binding and a small driver that requests SCL once
and registers one i2c-algo-bit adapter per SDA line, serializing the
transfers so that only one bus clocks SCL at a time.
The SoC's own I2C master (i2c-rtl9300) is wired to the same pins, but
it moves at most 16 bytes per transfer, and the PoE controllers on this
board only accept their 25 KiB firmware as one continuous write: sent
in 16-byte writes, they NAK the second one. Tested on the MokerLink
POE-10G07110GSM.
Ross Cawston (2):
dt-bindings: i2c: add GPIO buses sharing one SCL line
i2c: add driver for GPIO buses sharing one SCL line
.../bindings/i2c/i2c-gpio-shared-scl.yaml | 94 +++++++
MAINTAINERS | 7 +
drivers/i2c/busses/Kconfig | 12 +
drivers/i2c/busses/Makefile | 1 +
drivers/i2c/busses/i2c-gpio-shared-scl.c | 229 ++++++++++++++++++
5 files changed, 343 insertions(+)
create mode 100644 Documentation/devicetree/bindings/i2c/i2c-gpio-shared-scl.yaml
create mode 100644 drivers/i2c/busses/i2c-gpio-shared-scl.c
--
2.55.0.windows.5
next reply other threads:[~2026-10-18 19:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 19:43 Ross Cawston [this message]
2026-10-18 19:43 ` [PATCH 1/2] dt-bindings: " Ross Cawston
2026-10-18 19:43 ` [PATCH 2/2] i2c: add driver for " Ross Cawston
2026-10-19 6:59 ` Uwe Kleine-König
2026-10-18 21:20 ` [PATCH 0/2] i2c: add " Ross Cawston
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=20261018194315.945-1-ross@r-sc.ca \
--to=ross@r-sc.ca \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gustavoars@kernel.org \
--cc=kees@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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
all inboxes | Powered by JetHome®