From: <markus.stockhausen@gmx.de>
To: "'Bartosz Golaszewski'" <brgl@kernel.org>
Cc: <andi.shyti@kernel.org>, <linux-i2c@vger.kernel.org>,
"'Wolfram Sang'" <wsa+renesas@sang-engineering.com>
Subject: AW: AW: [PATCH 1/2] dt-bindings: i2c: Add i2c-shared-gpio
Date: Sat, 9 May 2026 22:41:48 +0200 [thread overview]
Message-ID: <00ef01dcdff4$42318c70$c694a550$@gmx.de> (raw)
In-Reply-To: <af9xGlIWG_OmREzX@shikoro>
> Von: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Gesendet: Samstag, 9. Mai 2026 19:39
> An: markus.stockhausen@gmx.de; Bartosz Golaszewski <brgl@kernel.org>
> Cc: 'Rob Herring' <robh@kernel.org>; andi.shyti@kernel.org;
linux-i2c@vger.kernel.org
> Betreff: Re: AW: [PATCH 1/2] dt-bindings: i2c: Add i2c-shared-gpio
>...
>
> Now, the GPIO subsystem since recently allows for shared GPIOs[1]. This
> sounds like the proper approach to me. Sadly, I can't help much because
> I have not used this API so far. So, it seems you rather need a GPIO
> expert... CCing Bart.
>
> @Bart: is it possible to share a GPIO so that multiple i2c-gpio
> instances can use the same GPIO as SCL? Use case is explained in the
> cover letter[2].
Thanks fort he hint. That looks partly promising. I gave this a quick try
on Kernel 6.18 in OpenWrt. Set the target to HAVE_SHARED_GPIOS.
Finally added several backports (deadlock stalled the boot). Now it at
least starts.
This dts:
i2c0: i2c-sfp0 {
compatible = "i2c-gpio";
#address-cells = <1>;
#size-cells = <0>;
scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH |
GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
i2c1: i2c-sfp1 {
compatible = "i2c-gpio";
#address-cells = <1>;
#size-cells = <0>;
scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH |
GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
Gives these messages:
[ 2.048352] i2c-gpio i2c-sfp0: Slow GPIO pins might wreak havoc into
I2C/SMBus bus timing
[ 2.058333] i2c-gpio i2c-sfp0: using lines 542 (SDA) and 573 (SCL)
[ 2.066139] i2c-gpio i2c-sfp1: Slow GPIO pins might wreak havoc into
I2C/SMBus bus timing
[ 2.076333] i2c-gpio i2c-sfp1: using lines 543 (SDA) and 574 (SCL)
[ 2.084817] sfp sfp-p9: Host maximum power 1.0W
[ 2.091419] sfp sfp-p10: Host maximum power 1.0W
[ 2.200954] In rtldsa_vlan_setup
[ 2.397223] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.407907] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.418605] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.429275] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.439937] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.450584] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.461223] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.471875] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
[ 2.482539] gpio-574 (scl): gpio_set_open_drain_value_commit: Error in
set_value for open drain err -1
I assume I must dig deeper here.
Markus
next prev parent reply other threads:[~2026-05-09 20:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 18:17 [PATCH 0/2] i2c: Add i2c-shared-gpio driver Markus Stockhausen
2026-05-07 18:17 ` [PATCH 1/2] dt-bindings: i2c: Add i2c-shared-gpio Markus Stockhausen
2026-05-07 19:30 ` Rob Herring (Arm)
2026-05-08 13:18 ` Rob Herring
2026-05-08 14:43 ` AW: " markus.stockhausen
2026-05-09 17:38 ` Wolfram Sang
2026-05-09 20:41 ` markus.stockhausen [this message]
2026-05-11 12:43 ` Bartosz Golaszewski
2026-05-11 15:39 ` Wolfram Sang
2026-05-11 16:08 ` Bartosz Golaszewski
2026-05-13 16:21 ` Rob Herring
2026-05-13 17:19 ` AW: " markus.stockhausen
2026-05-13 21:34 ` 'Wolfram Sang'
2026-05-09 11:16 ` markus.stockhausen
2026-05-07 18:17 ` [PATCH 2/2] i2c: shared-gpio: Add driver for gpio based busses with shared SCL 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='00ef01dcdff4$42318c70$c694a550$@gmx.de' \
--to=markus.stockhausen@gmx.de \
--cc=andi.shyti@kernel.org \
--cc=brgl@kernel.org \
--cc=linux-i2c@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.