[PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation

Subsystems: arm/risc-v/renesas architecture, the rest

STALE1848d

4 messages, 3 authors, 2021-09-20 · open the first message on its own page

[PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation

From: Adam Ford <hidden>
Date: 2021-08-25 12:28:15

The desired i2c2 speed is 400KHz, but when measured on a scope, it
is incorrect.  The driver can use the i2c-scl-rising-time-ns to help
calculate the proper setting to get exactly 400KHz.

Fixes: 900d9fc3bece ("arm64: dts: renesas: beacon: Correct I2C bus speeds")
Signed-off-by: Adam Ford <redacted>
diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
index 2692cc64bff6..987357c58390 100644
--- a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
+++ b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
@@ -328,6 +328,7 @@ &hsusb {
 &i2c2 {
 	status = "okay";
 	clock-frequency = <400000>;
+	i2c-scl-rising-time-ns = <50>;
 	pinctrl-0 = <&i2c2_pins>;
 	pinctrl-names = "default";
 
-- 
2.25.1

Re: [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2021-08-25 12:47:36

CC Wolfram

On Wed, Aug 25, 2021 at 2:28 PM Adam Ford [off-list ref] wrote:
quoted hunk
The desired i2c2 speed is 400KHz, but when measured on a scope, it
is incorrect.  The driver can use the i2c-scl-rising-time-ns to help
calculate the proper setting to get exactly 400KHz.

Fixes: 900d9fc3bece ("arm64: dts: renesas: beacon: Correct I2C bus speeds")
Signed-off-by: Adam Ford <redacted>
diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
index 2692cc64bff6..987357c58390 100644
--- a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
+++ b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi
@@ -328,6 +328,7 @@ &hsusb {
 &i2c2 {
        status = "okay";
        clock-frequency = <400000>;
+       i2c-scl-rising-time-ns = <50>;
        pinctrl-0 = <&i2c2_pins>;
        pinctrl-names = "default";

--
2.25.1

Re: [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation

From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date: 2021-09-14 10:41:48

On Wed, Aug 25, 2021 at 02:47:21PM +0200, Geert Uytterhoeven wrote:
CC Wolfram

On Wed, Aug 25, 2021 at 2:28 PM Adam Ford [off-list ref] wrote:
quoted
The desired i2c2 speed is 400KHz, but when measured on a scope, it
is incorrect.  The driver can use the i2c-scl-rising-time-ns to help
calculate the proper setting to get exactly 400KHz.
The question for me is: Has it been measured that SCL rising time is
really 50ns or has it been measured that the bus clock is now exactly
400kHz?

Re: [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation

From: Adam Ford <hidden>
Date: 2021-09-20 12:25:23

On Tue, Sep 14, 2021 at 5:41 AM Wolfram Sang
[off-list ref] wrote:
On Wed, Aug 25, 2021 at 02:47:21PM +0200, Geert Uytterhoeven wrote:
quoted
CC Wolfram

On Wed, Aug 25, 2021 at 2:28 PM Adam Ford [off-list ref] wrote:
quoted
The desired i2c2 speed is 400KHz, but when measured on a scope, it
is incorrect.  The driver can use the i2c-scl-rising-time-ns to help
calculate the proper setting to get exactly 400KHz.
The question for me is: Has it been measured that SCL rising time is
really 50ns or has it been measured that the bus clock is now exactly
400kHz?
The person who originally reported this to me moved on, so I don't
know if he measured both the rise time or just the clock speed.  I
know originally, the clock speed was measured to be 426KHz instead of
400KHz, and with the change to the rise time, the measured clock speed
was exactly 400KHz.  I do not know if the measured rise time is really
50ns or not.

adam

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help