From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Peter Rosin <peda@axentia.se>,
Michael Hennerich <michael.hennerich@analog.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Andi Shyti <andi.shyti@kernel.org>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v9 5/5] docs: i2c: i2c-topology: add section about bus speed
Date: Sun, 31 May 2026 12:25:30 +0200 [thread overview]
Message-ID: <ahwMmgy8hRaQ-x_7@gmail.com> (raw)
In-Reply-To: <ahX4_WaqodYt3PmD@shikoro>
Hi,
On Tue, May 26, 2026 at 09:48:13PM +0200, Wolfram Sang wrote:
>
> > +Multiple muxes in series
> > +--------------------------
> > +
> > +When multiple muxes are used in series the same rules applies.
> > +
> > +Transfers to D3 may interleave between select-transfer-deselect to D1, which
> > +results that the bus speed to D2 or D3 will be at 100KHz.
> > +
> > +Transfers to D2 may interleave between select-transfer-deselect to D1, which
> > +results in that the bus speed to D1 may be at 400kHz as the transfer to D2
> > +will set the bus speed to before the transfer to D1 starts.
> > +
> > +This is probably a bad topology ::
>
> In documentation, we probably shouldn't say "probably" ;)
Answer in next mail.
>
> > +
> > + .----------. 400kHz .----------. 100kHz .--------.
> > + .--------.400kHz | mux- |--------| mux- |--------| dev D1 |
> > + | root |--+----| locked | 400kHz | locked | '--------'
> > + '--------' | | mux M1 |--. | mux M2 |
> > + | '----------' | '----------'
> > + | .--------. | .--------.
> > + '--| dev D3 | '--| dev D2 |
> > + '--------' '--------'
>
> 400kHz leaking to a 100kHz device is bad. I guess we cannot do much
> about it here because the bus speed is a board specific parameter...
>
> > +Idle state
> > +-----------
> > +
> > +Muxes have an idle state, which is the state the channels are put into when no channel
> > +is active. The state is typically one of the following:
> > +
> > +- All channels are disconnected
> > +- The last selected channel is left as-is
> > +- A predefined channel is selected
> > +
> > +Muxes that support an idle state where all channels are disconnected are preferred when using
> > +different bus speeds. Otherwise high bus speeds may "leak" through to devices that
> > +may not support that higher speed.
> > +
> > +Consider the following example: ::
> > +
> > + .----------. 100kHz .--------.
> > + .--------. 400kHz | mux- |--------| dev D1 |
> > + | root |--+-----| locked | '--------'
> > + '--------' | | mux M1 |--. 400kHz .--------.
> > + | '----------' '--------| dev D2 |
> > + | .--------. '--------'
> > + '--| dev D3 |
> > + '--------'
> > +
> > +If the idle state of M1 is:
> > +
> > +- All channels disconnected: No problem, D1 and D2 are not affected by communication
> > + to D3.
> > +- Last selected channel: Problem if D1 was the last selected channel. High speed
> > + communication to D3 will be "leaked" to D1.
> > +- Predefined channel: Problem if the predefined channel D1. Set predefined channel
> > + to D2 as D2 may handle 400kHz.
>
> ... unlike here. We have MUX_IDLE_AS_IS and MUX_IDLE_DISCONNECT defined
> already. And I'd think we should only allow bus speed switching for
> MUX_IDLE_DISCONNECT to avoid out-of-spec scenarios. Opinions?
Answer in next mail.
>
> > +Supported controllers
> > +-----------------------
> > +
> > +Not all I2C controllers support setting the bus speed dynamically.
> > +At the time of writing, the following controllers have support:
> > +
> > +============================ =============================================
> > +i2c-davinci Supports dynamic bus speed
> > +============================ =============================================
>
> This paragaph is easy to get outdated. We can document that only
> controller drivers with the callback function implemented will work.
> People then can find out if that applies for their driver...
>
> There are some grammar correction in the Sashiko-review[1]. Most of them
> look correct to me. Can you have a look at these, too, please?
Sure, thanks for pointing that out. I will update the patch with the
grammar corrections.
>
> [1] https://sashiko.dev/#/patchset/20260324-i2c-mux-v9-0-5292b0608243%40gmail.com
Best regards,
Marcus Folkesson
next prev parent reply other threads:[~2026-05-31 10:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 13:54 [PATCH v9 0/5] I2C Mux per channel bus speed Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 1/5] i2c: core: add callback to change bus frequency Marcus Folkesson
2026-05-26 19:47 ` Wolfram Sang
2026-05-31 10:18 ` Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 2/5] i2c: mux: add support for per channel " Marcus Folkesson
2026-03-24 14:10 ` Andy Shevchenko
2026-03-26 11:39 ` Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 3/5] i2c: davinci: calculate bus freq from Hz instead of kHz Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 4/5] i2c: davinci: add support for setting bus frequency Marcus Folkesson
2026-03-24 13:54 ` [PATCH v9 5/5] docs: i2c: i2c-topology: add section about bus speed Marcus Folkesson
2026-05-26 19:48 ` Wolfram Sang
2026-05-30 6:54 ` Peter Rosin
2026-05-30 9:17 ` Wolfram Sang
2026-05-31 10:51 ` Marcus Folkesson
2026-05-31 10:42 ` Marcus Folkesson
2026-05-31 10:25 ` Marcus Folkesson [this message]
2026-03-26 12:17 ` [PATCH v9 0/5] I2C Mux per channel " Marcus Folkesson
2026-04-13 7:45 ` Marcus Folkesson
2026-05-08 13:14 ` Marcus Folkesson
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=ahwMmgy8hRaQ-x_7@gmail.com \
--to=marcus.folkesson@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=brgl@bgdev.pl \
--cc=brgl@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=peda@axentia.se \
--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