From: Rustam Adilov <adilov@disroot.org>
To: Conor Dooley <conor@kernel.org>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>,
Andi Shyti <andi.shyti@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 5/8] dt-bindings: i2c: realtek,rtl9301-i2c: extend for clocks and RTL9607C support
Date: Tue, 24 Mar 2026 15:30:34 +0000 [thread overview]
Message-ID: <be24b1e5651ba3a059cefdbbee361ed7@disroot.org> (raw)
In-Reply-To: <20260323-stash-contend-ea5974195eac@spud>
Hello,
On 2026-03-23 19:41, Conor Dooley wrote:
> On Mon, Mar 23, 2026 at 12:13:34PM +0500, Rustam Adilov wrote:
>> Add the "realtek,rtl9607-i2c" compatible for i2c controller on the
>> RTL9607C SoC series.
>>
>> Add a clocks property to the properties to describe the i2c reference
>> clock and make it available for all the compatibles. This i2c reference
>
> Why? I can see that you're doing that, and it's good to know that that
> is intentional, but why is it being done? Need to explain that all of
> these devices actually do have this clock etc.
As far as available information goes, there are some datasheets that note
the existence of these clocks. For example, RTL9310 Developer Guide 1.0 in [1]
mentions "I2C master support 12 peripherals with 2 clocks" at page 19.
And RTL9607 calculates the clk_div with this equation found in Realtek SDK code
data = (62500 / clock) - 1;
where clock is clock frequency in kHz and so the 62500 must be the clock frequency
of the i2c master controller clock in kHz. And since there are 2 i2c controllers,
there are 2 clocks.
That is also the reason why it the rtl9607 is the only one to require the clocks to
be specified and also why the clocks property was added at all.
That's how the rtl9607 i2c controller would look like
i2cclock: i2cclock {
#clock-cells = <0>;
compatible = "fixed-clock";
/* 62.5 MHz */
clock-frequency = <62500000>;
};
i2c@b4 {
compatible = "realtek,rtl9607-i2c";
reg = <0xb4 0x4>;
#address-cells = <1>;
#size-cells = <0>;
clocks = <&i2cclock>;
realtek,scl = <0>;
i2c@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
};
};
I hope this explains the whole intention behind it. And if there is better way to explain
this in the commit message, let me know.
[1] - https://github.com/plappermaul/realtek-doc/tree/main/datasheets
Best,
Rustam
next prev parent reply other threads:[~2026-03-24 15:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 7:13 [PATCH v4 0/8] i2c: rtl9300: support for RTL9607C I2C controller Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 1/8] i2c: rtl9300: split data_reg into read and write reg Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 2/8] i2c: rtl9300: introduce max length property to driver data Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 3/8] i2c: rtl9300: introduce F_BUSY to the reg_fields struct Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 4/8] i2c: rtl9300: introduce a property for 8 bit width reg address Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 5/8] dt-bindings: i2c: realtek,rtl9301-i2c: extend for clocks and RTL9607C support Rustam Adilov
2026-03-23 19:41 ` Conor Dooley
2026-03-24 15:30 ` Rustam Adilov [this message]
2026-03-24 17:48 ` Conor Dooley
2026-03-26 14:59 ` Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 6/8] i2c: rtl9300: introduce clk struct for upcoming rtl9607 support Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 7/8] i2c: rtl9300: intoduce new function properties to driver data Rustam Adilov
2026-03-23 7:13 ` [PATCH v4 8/8] i2c: rtl9300: add RTL9607C i2c controller support Rustam Adilov
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=be24b1e5651ba3a059cefdbbee361ed7@disroot.org \
--to=adilov@disroot.org \
--cc=andi.shyti@kernel.org \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@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