All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 0/2] ARM: dts: rcar-gen1: Correct internal delay for i2c[123]
@ 2021-05-04 14:41 Geert Uytterhoeven
  2021-05-04 14:41 ` [PATCH/RFC 1/2] ARM: dts: r8a7778: " Geert Uytterhoeven
  2021-05-04 14:41 ` [PATCH/RFC 2/2] ARM: dts: r8a7779: " Geert Uytterhoeven
  0 siblings, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-05-04 14:41 UTC (permalink / raw)
  To: Magnus Damm, Wolfram Sang; +Cc: linux-renesas-soc, Geert Uytterhoeven

	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(+)

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH/RFC 1/2] ARM: dts: r8a7778: Correct internal delay for i2c[123]
  2021-05-04 14:41 [PATCH/RFC 0/2] ARM: dts: rcar-gen1: Correct internal delay for i2c[123] Geert Uytterhoeven
@ 2021-05-04 14:41 ` Geert Uytterhoeven
  2021-05-05  7:13   ` Wolfram Sang
  2021-05-04 14:41 ` [PATCH/RFC 2/2] ARM: dts: r8a7779: " Geert Uytterhoeven
  1 sibling, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-05-04 14:41 UTC (permalink / raw)
  To: Magnus Damm, Wolfram Sang; +Cc: linux-renesas-soc, 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 <geert+renesas@glider.be>
---
i2c[123] are not used in upstream DTS files.
---
 arch/arm/boot/dts/r8a7778.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index c9f8735860bf824c..95efbafb0b7077a2 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -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";
 	};
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH/RFC 2/2] ARM: dts: r8a7779: Correct internal delay for i2c[123]
  2021-05-04 14:41 [PATCH/RFC 0/2] ARM: dts: rcar-gen1: Correct internal delay for i2c[123] Geert Uytterhoeven
  2021-05-04 14:41 ` [PATCH/RFC 1/2] ARM: dts: r8a7778: " Geert Uytterhoeven
@ 2021-05-04 14:41 ` Geert Uytterhoeven
  2021-05-05  7:13   ` Wolfram Sang
  1 sibling, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-05-04 14:41 UTC (permalink / raw)
  To: Magnus Damm, Wolfram Sang; +Cc: linux-renesas-soc, 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 <geert+renesas@glider.be>
---
i2c[123] are not used in upstream DTS files.
---
 arch/arm/boot/dts/r8a7779.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index 3c5fcdfe16b87182..39fc58f32df61b9a 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -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";
 	};
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH/RFC 1/2] ARM: dts: r8a7778: Correct internal delay for i2c[123]
  2021-05-04 14:41 ` [PATCH/RFC 1/2] ARM: dts: r8a7778: " Geert Uytterhoeven
@ 2021-05-05  7:13   ` Wolfram Sang
  2021-05-05  7:41     ` Geert Uytterhoeven
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2021-05-05  7:13 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

On Tue, May 04, 2021 at 04:41:24PM +0200, Geert Uytterhoeven wrote:
> 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 <geert+renesas@glider.be>

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:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH/RFC 2/2] ARM: dts: r8a7779: Correct internal delay for i2c[123]
  2021-05-04 14:41 ` [PATCH/RFC 2/2] ARM: dts: r8a7779: " Geert Uytterhoeven
@ 2021-05-05  7:13   ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2021-05-05  7:13 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

On Tue, May 04, 2021 at 04:41:25PM +0200, Geert Uytterhoeven wrote:
> 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 <geert+renesas@glider.be>

With the same comment as for patch 1:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH/RFC 1/2] ARM: dts: r8a7778: Correct internal delay for i2c[123]
  2021-05-05  7:13   ` Wolfram Sang
@ 2021-05-05  7:41     ` Geert Uytterhoeven
  0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-05-05  7:41 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Magnus Damm, Linux-Renesas

Hi Wolfram,

On Wed, May 5, 2021 at 9:13 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> On Tue, May 04, 2021 at 04:41:24PM +0200, Geert Uytterhoeven wrote:
> > 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 <geert+renesas@glider.be>
>
> 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

> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-05  7:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 14:41 [PATCH/RFC 0/2] ARM: dts: rcar-gen1: Correct internal delay for i2c[123] Geert Uytterhoeven
2021-05-04 14:41 ` [PATCH/RFC 1/2] ARM: dts: r8a7778: " Geert Uytterhoeven
2021-05-05  7:13   ` Wolfram Sang
2021-05-05  7:41     ` Geert Uytterhoeven
2021-05-04 14:41 ` [PATCH/RFC 2/2] ARM: dts: r8a7779: " Geert Uytterhoeven
2021-05-05  7:13   ` Wolfram Sang

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.