diff mbox series

[2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3

Message ID 20190204220010.5671-3-wsa+renesas@sang-engineering.com
State Accepted
Headers show
Series i2c: sh_mobile: updates to compatibles | expand

Commit Message

Wolfram Sang Feb. 4, 2019, 10 p.m. UTC
We could finally measure the clock on an Ebisu board. The new formula
gives way better results, i.e. 100kHz instead of 106kHz and 400kHz
instead of 387kHz. Switch to these formulas for all Gen3 SoCs.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-sh_mobile.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Geert Uytterhoeven Feb. 5, 2019, 1:16 p.m. UTC | #1
Hi Wolfram,

On Mon, Feb 4, 2019 at 11:00 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> We could finally measure the clock on an Ebisu board. The new formula
> gives way better results, i.e. 100kHz instead of 106kHz and 400kHz
> instead of 387kHz. Switch to these formulas for all Gen3 SoCs.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/drivers/i2c/busses/i2c-sh_mobile.c
> +++ b/drivers/i2c/busses/i2c-sh_mobile.c
> @@ -806,11 +806,11 @@ static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
>         { .compatible = "renesas,iic-r8a7792", .data = &fast_clock_dt_config },
>         { .compatible = "renesas,iic-r8a7793", .data = &fast_clock_dt_config },
>         { .compatible = "renesas,iic-r8a7794", .data = &fast_clock_dt_config },
> -       { .compatible = "renesas,iic-r8a7795", .data = &fast_clock_dt_config },
> -       { .compatible = "renesas,iic-r8a77990", .data = &fast_clock_dt_config },
> +       { .compatible = "renesas,iic-r8a7795", .data = &v2_freq_calc_dt_config },
> +       { .compatible = "renesas,iic-r8a77990", .data = &v2_freq_calc_dt_config },
>         { .compatible = "renesas,iic-sh73a0", .data = &fast_clock_dt_config },
>         { .compatible = "renesas,rcar-gen2-iic", .data = &fast_clock_dt_config },
> -       { .compatible = "renesas,rcar-gen3-iic", .data = &fast_clock_dt_config },
> +       { .compatible = "renesas,rcar-gen3-iic", .data = &v2_freq_calc_dt_config },
>         { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
>         {},

I guess you want to make a similar change for R-Car Gen2 (both SoC-specific
and family-specific)?
Currently only R-Car H2 uses the new formula, which should apply to all
R-Car Gen2/Gen3 SoCs.

Gr{oetje,eeting}s,

                        Geert
Simon Horman Feb. 5, 2019, 2:33 p.m. UTC | #2
On Mon, Feb 04, 2019 at 11:00:10PM +0100, Wolfram Sang wrote:
> We could finally measure the clock on an Ebisu board. The new formula
> gives way better results, i.e. 100kHz instead of 106kHz and 400kHz
> instead of 387kHz. Switch to these formulas for all Gen3 SoCs.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Wolfram Sang Feb. 5, 2019, 4:47 p.m. UTC | #3
> I guess you want to make a similar change for R-Car Gen2 (both SoC-specific
> and family-specific)?
> Currently only R-Car H2 uses the new formula, which should apply to all
> R-Car Gen2/Gen3 SoCs.

Yes, can be argued. Thanks!
Wolfram Sang Feb. 8, 2019, 9:29 p.m. UTC | #4
On Mon, Feb 04, 2019 at 11:00:10PM +0100, Wolfram Sang wrote:
> We could finally measure the clock on an Ebisu board. The new formula
> gives way better results, i.e. 100kHz instead of 106kHz and 400kHz
> instead of 387kHz. Switch to these formulas for all Gen3 SoCs.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 875cc5d09aa2..3c1552f14bec 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -806,11 +806,11 @@  static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
 	{ .compatible = "renesas,iic-r8a7792", .data = &fast_clock_dt_config },
 	{ .compatible = "renesas,iic-r8a7793", .data = &fast_clock_dt_config },
 	{ .compatible = "renesas,iic-r8a7794", .data = &fast_clock_dt_config },
-	{ .compatible = "renesas,iic-r8a7795", .data = &fast_clock_dt_config },
-	{ .compatible = "renesas,iic-r8a77990", .data = &fast_clock_dt_config },
+	{ .compatible = "renesas,iic-r8a7795", .data = &v2_freq_calc_dt_config },
+	{ .compatible = "renesas,iic-r8a77990", .data = &v2_freq_calc_dt_config },
 	{ .compatible = "renesas,iic-sh73a0", .data = &fast_clock_dt_config },
 	{ .compatible = "renesas,rcar-gen2-iic", .data = &fast_clock_dt_config },
-	{ .compatible = "renesas,rcar-gen3-iic", .data = &fast_clock_dt_config },
+	{ .compatible = "renesas,rcar-gen3-iic", .data = &v2_freq_calc_dt_config },
 	{ .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
 	{},
 };