ARM: dts: rcar-gen1: Correct internal delay for i2c[123]
cover ARM: dts: rcar-gen1: Correct internal delay for i2c[123]
Hi all,
This patch series lowers the internal delays for the second to fourth I2C instances on R-Car Gen1 SoCs, to match the Hardware User's Manuals.
This is untested, because these I2C instances are not used in upstream DTS files, and due to lack of direct hardware access for measurements.
If both patches are accepted, I'll probably squash them together while applying.
Thanks for your comments!
Geert Uytterhoeven (2):
ARM: dts: r8a7778: Correct internal delay for i2c[123]
ARM: dts: r8a7779: Correct internal delay for i2c[123]
arch/arm/boot/dts/r8a7778.dtsi | 3 +++ arch/arm/boot/dts/r8a7779.dtsi | 3 +++ 2 files changed, 6 insertions(+)
Signature · 12 lines
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH 1/2 ARM: dts: r8a7778: Correct internal delay for i2c[123]
According to the R-Car M1A Hardware User's Manual Rev. 1.00, the LSI internal delay for I2C instances 1 to 3 is 5 ns (typ.), which differs from the default 50 ns as specified for instance 0.
---
i2c[123] are not used in upstream DTS files.
--- arch/arm/boot/dts/r8a7778.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/r8a7778.dtsi +3 -0
@@ -166,6 +166,7 @@ i2c1: i2c@ffc71000 { interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7778_CLK_I2C1>; power-domains = <&cpg_clocks>; + i2c-scl-internal-delay-ns = <5>; status = "disabled"; };
@@ -177,6 +178,7 @@ i2c2: i2c@ffc72000 { interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7778_CLK_I2C2>; power-domains = <&cpg_clocks>; + i2c-scl-internal-delay-ns = <5>; status = "disabled"; };
@@ -188,6 +190,7 @@ i2c3: i2c@ffc73000 { interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7778_CLK_I2C3>; power-domains = <&cpg_clocks>; + i2c-scl-internal-delay-ns = <5>; status = "disabled"; };
Signature · 1 line
2.25.1
Re: [PATCH/RFC 1/2] ARM: dts: r8a7778: Correct internal delay for i2c[123]
Quoted 5 lines · Geert Uytterhoeven
According to the R-Car M1A Hardware User's Manual Rev. 1.00, the LSI internal delay for I2C instances 1 to 3 is 5 ns (typ.), which differs from the default 50 ns as specified for instance 0.
Signed-off-by Geert Uytterhoeven <[email protected]>
I wonder if we shouldn't also specify the 50ns for IIC0 because it is describing the HW instead of relying on the Linux-only default value in the driver? Other than that:
Re: [PATCH/RFC 1/2] ARM: dts: r8a7778: Correct internal delay for i2c[123]
Hi Wolfram,
Quoted 10 lines · Wolfram Sang
Quoted 5 lines · Geert Uytterhoeven
According to the R-Car M1A Hardware User's Manual Rev. 1.00, the LSI internal delay for I2C instances 1 to 3 is 5 ns (typ.), which differs from the default 50 ns as specified for instance 0.
Signed-off-by Geert Uytterhoeven <[email protected]>I wonder if we shouldn't also specify the 50ns for IIC0 because it is describing the HW instead of relying on the Linux-only default value in the driver? Other than that:
With the json-schema bindings, we do have:
+ i2c-scl-internal-delay-ns:
+ default: 50
Quoted 1 line
Reviewed-by Wolfram Sang <[email protected]>
Thanks!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
PATCH 2/2 ARM: dts: r8a7779: Correct internal delay for i2c[123]
In reply to Geert UytterhoevenAccording to the R-Car H1 Hardware User's Manual Rev. 1.00, the LSI internal delay for I2C instances 1 to 3 is 5 ns (typ.), which differs from the default 50 ns as specified for instance 0.
---
i2c[123] are not used in upstream DTS files.
--- arch/arm/boot/dts/r8a7779.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/r8a7779.dtsi +3 -0
@@ -198,6 +198,7 @@ i2c1: i2c@ffc71000 { interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7779_CLK_I2C1>; power-domains = <&sysc R8A7779_PD_ALWAYS_ON>; + i2c-scl-internal-delay-ns = <5>; status = "disabled"; };
@@ -209,6 +210,7 @@ i2c2: i2c@ffc72000 { interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7779_CLK_I2C2>; power-domains = <&sysc R8A7779_PD_ALWAYS_ON>; + i2c-scl-internal-delay-ns = <5>; status = "disabled"; };
@@ -220,6 +222,7 @@ i2c3: i2c@ffc73000 { interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7779_CLK_I2C3>; power-domains = <&sysc R8A7779_PD_ALWAYS_ON>; + i2c-scl-internal-delay-ns = <5>; status = "disabled"; };
Signature · 1 line
2.25.1
Re: [PATCH/RFC 2/2] ARM: dts: r8a7779: Correct internal delay for i2c[123]
Quoted 5 lines · Geert Uytterhoeven
According to the R-Car H1 Hardware User's Manual Rev. 1.00, the LSI internal delay for I2C instances 1 to 3 is 5 ns (typ.), which differs from the default 50 ns as specified for instance 0.
Signed-off-by Geert Uytterhoeven <[email protected]>
With the same comment as for patch 1: