Re: [PATCH v2 1/5] riscv: dts: thead: th1520: remove pclk for I2C1
From: Drew Fustini
Date: Mon Jul 20 2026 - 14:25:56 EST
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@xxxxxxxxxxx>
> ---
> 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@xxxxxxxxxx>