From: Drew Fustini <fustini@kernel.org>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Cc: Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, MoeLeak <i@leak.moe>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Icenowy Zheng <uwu@icenowy.me>
Subject: Re: [PATCH v2 1/5] riscv: dts: thead: th1520: remove pclk for I2C1
Date: Mon, 20 Jul 2026 11:25:45 -0700 [thread overview]
Message-ID: <al5oKdC22LIlLbSm@thelio> (raw)
In-Reply-To: <20260714074515.1959352-2-zhengxingda@iscas.ac.cn>
On Tue, Jul 14, 2026 at 03:45:11PM +0800, Icenowy Zheng wrote:
> The I2C1 node added previously to the th1520.dtsi file has two clocks
> set -- one "ref" clock (CLK_I2C1) and one "pclk" (CLK_PERI_APB_PCLK).
>
> However, the CLK_I2C1 clock is just a clock gate with the
> CLK_PERI_APB_PCLK clock as its input. In addition, when it's gated,
> reading registers from the I2C controller returns fixed value (the last
> read value) for all registers. These facts indicate that the CLK_I2C1
> clock is the true APB clock fed into the I2C controller instead of a
> dedicated reference clock.
>
> Leave only the CLK_I2C1 clock as the `clocks` property of the I2C1
> device node and remove `clock-names` property, which represents the I2C
> controller only takes a single clock both as the APB clock and the
> reference clock.
>
> Fixes: 2f60e3516330 ("riscv: dts: thead: Add TH1520 I2C1 controller")
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> arch/riscv/boot/dts/thead/th1520.dtsi | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
> index 94932c51b7e39..db23624696b73 100644
> --- a/arch/riscv/boot/dts/thead/th1520.dtsi
> +++ b/arch/riscv/boot/dts/thead/th1520.dtsi
> @@ -415,8 +415,7 @@ i2c1: i2c@ffe7f24000 {
> compatible = "thead,th1520-i2c", "snps,designware-i2c";
> reg = <0xff 0xe7f24000 0x0 0x4000>;
> interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk CLK_I2C1>, <&clk CLK_PERI_APB_PCLK>;
> - clock-names = "ref", "pclk";
> + clocks = <&clk CLK_I2C1>;
> #address-cells = <1>;
> #size-cells = <0>;
> status = "disabled";
> --
> 2.52.0
Reviewed-by: Drew Fustini <fustini@kernel.org>
WARNING: multiple messages have this Message-ID (diff)
From: Drew Fustini <fustini@kernel.org>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Cc: Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
Albert Ou <aou@eecs.berkeley.edu>,
devicetree@vger.kernel.org, MoeLeak <i@leak.moe>,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
Guo Ren <guoren@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Paul Walmsley <pjw@kernel.org>, Fu Wei <wefu@redhat.com>
Subject: Re: [PATCH v2 1/5] riscv: dts: thead: th1520: remove pclk for I2C1
Date: Mon, 20 Jul 2026 11:25:45 -0700 [thread overview]
Message-ID: <al5oKdC22LIlLbSm@thelio> (raw)
In-Reply-To: <20260714074515.1959352-2-zhengxingda@iscas.ac.cn>
On Tue, Jul 14, 2026 at 03:45:11PM +0800, Icenowy Zheng wrote:
> The I2C1 node added previously to the th1520.dtsi file has two clocks
> set -- one "ref" clock (CLK_I2C1) and one "pclk" (CLK_PERI_APB_PCLK).
>
> However, the CLK_I2C1 clock is just a clock gate with the
> CLK_PERI_APB_PCLK clock as its input. In addition, when it's gated,
> reading registers from the I2C controller returns fixed value (the last
> read value) for all registers. These facts indicate that the CLK_I2C1
> clock is the true APB clock fed into the I2C controller instead of a
> dedicated reference clock.
>
> Leave only the CLK_I2C1 clock as the `clocks` property of the I2C1
> device node and remove `clock-names` property, which represents the I2C
> controller only takes a single clock both as the APB clock and the
> reference clock.
>
> Fixes: 2f60e3516330 ("riscv: dts: thead: Add TH1520 I2C1 controller")
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> arch/riscv/boot/dts/thead/th1520.dtsi | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
> index 94932c51b7e39..db23624696b73 100644
> --- a/arch/riscv/boot/dts/thead/th1520.dtsi
> +++ b/arch/riscv/boot/dts/thead/th1520.dtsi
> @@ -415,8 +415,7 @@ i2c1: i2c@ffe7f24000 {
> compatible = "thead,th1520-i2c", "snps,designware-i2c";
> reg = <0xff 0xe7f24000 0x0 0x4000>;
> interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk CLK_I2C1>, <&clk CLK_PERI_APB_PCLK>;
> - clock-names = "ref", "pclk";
> + clocks = <&clk CLK_I2C1>;
> #address-cells = <1>;
> #size-cells = <0>;
> status = "disabled";
> --
> 2.52.0
Reviewed-by: Drew Fustini <fustini@kernel.org>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-07-20 18:25 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 7:45 [PATCH v2 0/5] Add remaining IO expansions on Lichee Pi 4A Icenowy Zheng
2026-07-14 7:45 ` Icenowy Zheng
2026-07-14 7:45 ` [PATCH v2 1/5] riscv: dts: thead: th1520: remove pclk for I2C1 Icenowy Zheng
2026-07-14 7:45 ` Icenowy Zheng
2026-07-20 18:25 ` Drew Fustini [this message]
2026-07-20 18:25 ` Drew Fustini
2026-07-14 7:45 ` [PATCH v2 2/5] riscv: dts: thead: Add TH1520 I2C nodes Icenowy Zheng
2026-07-14 7:45 ` Icenowy Zheng
2026-07-20 18:26 ` Drew Fustini
2026-07-20 18:26 ` Drew Fustini
2026-07-14 7:45 ` [PATCH v2 3/5] riscv: dts: thead: lpi4a: sort nodes Icenowy Zheng
2026-07-14 7:45 ` Icenowy Zheng
2026-07-20 18:26 ` Drew Fustini
2026-07-20 18:26 ` Drew Fustini
2026-07-14 7:45 ` [PATCH v2 4/5] riscv: dts: thead: Add IO labels for the IO expansion on I2C1 Icenowy Zheng
2026-07-14 7:45 ` Icenowy Zheng
2026-07-14 7:56 ` sashiko-bot
2026-07-16 20:52 ` Drew Fustini
2026-07-16 20:52 ` Drew Fustini
2026-07-17 4:11 ` Icenowy Zheng
2026-07-17 4:11 ` Icenowy Zheng
2026-07-20 16:56 ` Drew Fustini
2026-07-20 16:56 ` Drew Fustini
2026-07-20 17:28 ` Icenowy Zheng
2026-07-20 17:28 ` Icenowy Zheng
2026-07-20 18:27 ` Drew Fustini
2026-07-20 18:27 ` Drew Fustini
2026-07-14 7:45 ` [PATCH v2 5/5] riscv: dts: thead: Add remaining Lichee Pi 4A IO expansions Icenowy Zheng
2026-07-14 7:45 ` Icenowy Zheng
2026-07-20 18:28 ` Drew Fustini
2026-07-20 18:28 ` Drew Fustini
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=al5oKdC22LIlLbSm@thelio \
--to=fustini@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=guoren@kernel.org \
--cc=i@leak.moe \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=uwu@icenowy.me \
--cc=wefu@redhat.com \
--cc=zhengxingda@iscas.ac.cn \
/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.