Re: [PATCH v3 1/1] schemas: i2c: Introduce I2C bus extensions

Rob Herring <[email protected]> Fri, 1 Aug 2025 13:09:54 -0500
Newsgroups org.kernel.vger.devicetree-spec,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel
Message-ID <CAL_JsqJ=jmXVwjtNCjRpUKj02dnJEz4GHMX2wMRaWw=M+sZQ0w@mail.gmail.com>
On Wed, Jun 18, 2025 at 3:23 AM Herve Codina <[email protected]> wrote:
>
> An I2C bus can be wired to the connector and allows an add-on board to
> connect additional I2C devices to this bus.
>
> Those additional I2C devices could be described as sub-nodes of the I2C
> bus controller node however for hotplug connectors described via device
> tree overlays there is additional level of indirection, which is needed
> to decouple the overlay and the base tree:
>
>   --- base device tree ---
>
>   i2c1: i2c@abcd0000 {
>       compatible = "xyz,foo";
>       i2c-bus-extension@0 {

This is at I2C bus address 0? No. You are mixing 2 different address
spaces. Don't do that.

You could solve this with just a property in the parent. If there's
more than 1, then it's just multiple phandles. However I don't think
you need this at all. You can just search the DT for 'i2c-parent' and
find phandles that match the i2c controller node. But why does the
controller driver need to know about connectors? Shouldn't the
connector driver drive this and tell the controller there's more
devices?

Rob