From: Jonas Jelonek <jelonek.jonas@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, linux-i2c@vger.kernel.org
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>,
Markus Stockhausen <markus.stockhausen@gmx.de>
Subject: Re: [PATCH 3/3] dt-bindings: i2c: realtek,rtl9301-i2c: extend for RTL9310 support
Date: Wed, 2 Jul 2025 11:24:26 +0200 [thread overview]
Message-ID: <2873450e-468c-4d63-8cc2-060724227e52@gmail.com> (raw)
In-Reply-To: <07cd4e2c-0419-4877-9a2a-d66f8dbe4279@kernel.org>
(sorry for double sending, previous one had HTML)
Hi Krzysztof,
On 02.07.2025 09:49, Krzysztof Kozlowski wrote:
> If people sent complete bindings, they would see that you are now in
> tricky spot and this maybe has to be redone to standard approach - I2C
> is not a child of syscon block, but separate device. When it is a
> separate device we solve it (plenty of examples) with phandle to syscon
> with offset or value argument.
Was this assumption probably made based on that the I2C peripherals are
controlled via mapped registers within the address space that is
designated to that 'switchcore'/syscon node?
If using a phandle instead solves this, I'd be fine. Moving the I2C
controller out of the syscon shouldn't be an issue. Is changing this
behavior fine with changing the dt-bindings then? IIRC there's a rule
that dt-bindings must not be changed once they are published.
>
> But no! Some incomplete hardware description was sent, stuffing
> everything into syscon and claiming that everything is child of syscon,
> and now you are stuck with this:
>
> system controller
> |
> |
> i2c-controller-for-multiple-SDA
> |
> |
> i2c-controllers-for-each-SDA
>
> This is not only just confusing but maybe even not correct.
At least I'm confused already.
To make sure we're talking about the same hardware architecture:
RTL93xx have two I2C controllers each having a hardwired SCL and being
able to use any of the 8/12 SDA lines.
As far as I understood, the 'i2c-controller-for-each-SDA' you
mention is meant to handle the muxing behavior (being able to use each
SDA on either controller). Being more like a channel than a dedicated
controller.
In comparison, downstream in OpenWrt there's currently a separate
driver i2c-rtl9300-mux. The child nodes belong to the Mux node there
instead of to the I2C controller. The mux node has a reference to the
I2C controller it uses.
> I understand that either i2c controller can take any SCL line. If so,
> that could be a pinctrl, but again this is child of that device, so
> pinctrl to parent would be odd.
Either I2C controller can take any SDA line, SCL line is fixed.
I see that adding the property implies the opposite, so I agree
if this is not acceptable.
>
> Vendor (not generic) property seems the only solution, but then this
> should not be part of the existing binding or you should clearly narrow
> this per variant.
Based on the previous comment, I could completely omit this property
and somehow hardcode it in the driver based on e.g. the address of the
I2C controller. But I need advice in this case. Either use a property
to explicitly mention this in the device tree or infer it from an
already used property.
> It was made very clear that rtl9301-family has only
> one SCL per controller and you cannot choose.
This hasn't changed in RTL9310 family.
And to clarify since this is already confusing for me in how the
compatibles are named: there is no rtl9301-family, RTL9301X SoCs (among
RTL9302X and RTL9303X) are part of the RTL9300 / longan family.Similarly, RTL9311X, RTL9312X and RTL9313X SoCs are part of the RTL9310 / mango family.
> Best regards,
> Krzysztof
Best regards,
Jonas
next prev parent reply other threads:[~2025-07-02 9:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 9:17 [PATCH 0/3] i2c: rework and extend RTL9300 I2C driver Jonas Jelonek
2025-07-01 9:17 ` [PATCH 1/3] i2c: rework RTL9300 I2C controller driver Jonas Jelonek
2025-07-02 0:36 ` Chris Packham
2025-07-01 9:17 ` [PATCH 2/3] i2c: add RTL9310 support to " Jonas Jelonek
2025-07-01 20:14 ` AW: " markus.stockhausen
2025-07-01 9:17 ` [PATCH 3/3] dt-bindings: i2c: realtek,rtl9301-i2c: extend for RTL9310 support Jonas Jelonek
2025-07-01 11:33 ` Krzysztof Kozlowski
2025-07-01 12:34 ` Jonas Jelonek
2025-07-01 13:17 ` Krzysztof Kozlowski
2025-07-01 14:31 ` Jonas Jelonek
2025-07-02 6:11 ` Krzysztof Kozlowski
2025-07-02 7:34 ` Jonas Jelonek
2025-07-02 7:49 ` Krzysztof Kozlowski
2025-07-02 9:24 ` Jonas Jelonek [this message]
2025-07-01 11:35 ` Krzysztof Kozlowski
2025-07-01 12:34 ` Jonas Jelonek
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=2873450e-468c-4d63-8cc2-060724227e52@gmail.com \
--to=jelonek.jonas@gmail.com \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=krzk@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=markus.stockhausen@gmx.de \
/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.