Skip to contentSkip to conversation

arm64: dts: renesas: beacon: Fix i2c2 speed calcuation

PATCH In review Adam Ford 3 participants 4 messages Aug 25, 2021 – Sep 20, 2021

Subsystems (2)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 arm64: dts: renesas: beacon: Fix i2c2 speed calcuation

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")
arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi +1 -0
index 2692cc64bff6..987357c58390 100644
@@ -328,6 +328,7 @@ &hsusb {
 &i2c2 {
 	status = "okay";
 	clock-frequency = <400000>;
+	i2c-scl-rising-time-ns = <50>;
 	pinctrl-0 = <&i2c2_pins>;
 	pinctrl-names = "default";
 
Signature · 1 line
2.25.1
#1 lore raw

CC Wolfram

Quoted 21 lines · Adam Ford

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")
arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi +1 -1
index 2692cc64bff6..987357c58390 100644
@@ -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

#2 lore raw
Quoted 6 lines · Geert Uytterhoeven

CC Wolfram

Quoted 3 lines · Adam Ford

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?

author
#3 lore raw
Quoted 4 lines · Wolfram Sang
Quoted 2 lines · Geert Uytterhoeven

CC Wolfram

Quoted 8 lines
Quoted 4 lines · Adam Ford
Quoted 3 lines

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

Quoted 1 line