All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation
@ 2021-08-25 12:27 Adam Ford
  2021-08-25 12:47 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2021-08-25 12:27 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: geert+renesas, devicetree, 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")
Signed-off-by: Adam Ford <aford173@gmail.com>

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


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

* Re: [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation
  2021-08-25 12:27 [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation Adam Ford
@ 2021-08-25 12:47 ` Geert Uytterhoeven
  2021-09-14 10:41   ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-08-25 12:47 UTC (permalink / raw)
  To: Adam Ford, Wolfram Sang
  Cc: Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

CC Wolfram

On Wed, Aug 25, 2021 at 2:28 PM Adam Ford <aford173@gmail.com> wrote:
> 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 <aford173@gmail.com>
>
> 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

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

* Re: [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation
  2021-08-25 12:47 ` Geert Uytterhoeven
@ 2021-09-14 10:41   ` Wolfram Sang
  2021-09-20 12:25     ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2021-09-14 10:41 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Adam Ford, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

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

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 <aford173@gmail.com> wrote:
> > 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?


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

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

* Re: [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation
  2021-09-14 10:41   ` Wolfram Sang
@ 2021-09-20 12:25     ` Adam Ford
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Ford @ 2021-09-20 12:25 UTC (permalink / raw)
  To: Wolfram Sang, Geert Uytterhoeven, Adam Ford, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Tue, Sep 14, 2021 at 5:41 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> 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 <aford173@gmail.com> wrote:
> > > 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


>

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

end of thread, other threads:[~2021-09-20 12:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 12:27 [PATCH] arm64: dts: renesas: beacon: Fix i2c2 speed calcuation Adam Ford
2021-08-25 12:47 ` Geert Uytterhoeven
2021-09-14 10:41   ` Wolfram Sang
2021-09-20 12:25     ` Adam Ford

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.