Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] i2c: sh_mobile: updates to compatibles
@ 2019-02-04 22:00 Wolfram Sang
  2019-02-04 22:00 ` [PATCH 1/2] i2c: sh_mobile: sort compatible entries Wolfram Sang
  2019-02-04 22:00 ` [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3 Wolfram Sang
  0 siblings, 2 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-02-04 22:00 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

As I could finally use a logic analyzer on a Gen3 Ebisu board and
measure, we can switch now to better formulas for clock generation and
add some sorting to compatibles before.

Wolfram Sang (2):
  i2c: sh_mobile: sort compatible entries
  i2c: sh_mobile: use new clock calculation formulas for Gen3

 drivers/i2c/busses/i2c-sh_mobile.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.19.1


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

* [PATCH 1/2] i2c: sh_mobile: sort compatible entries
  2019-02-04 22:00 [PATCH 0/2] i2c: sh_mobile: updates to compatibles Wolfram Sang
@ 2019-02-04 22:00 ` Wolfram Sang
  2019-02-05 13:14   ` Geert Uytterhoeven
                     ` (2 more replies)
  2019-02-04 22:00 ` [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3 Wolfram Sang
  1 sibling, 3 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-02-04 22:00 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

Makes it easier to add new ones.

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

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index a64f2ff3cb49..875cc5d09aa2 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,rcar-gen2-iic", .data = &fast_clock_dt_config },
 	{ .compatible = "renesas,iic-r8a7795", .data = &fast_clock_dt_config },
-	{ .compatible = "renesas,rcar-gen3-iic", .data = &fast_clock_dt_config },
 	{ .compatible = "renesas,iic-r8a77990", .data = &fast_clock_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,rmobile-iic", .data = &default_dt_config },
 	{},
 };
-- 
2.19.1


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

* [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3
  2019-02-04 22:00 [PATCH 0/2] i2c: sh_mobile: updates to compatibles Wolfram Sang
  2019-02-04 22:00 ` [PATCH 1/2] i2c: sh_mobile: sort compatible entries Wolfram Sang
@ 2019-02-04 22:00 ` Wolfram Sang
  2019-02-05 13:16   ` Geert Uytterhoeven
                     ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-02-04 22:00 UTC (permalink / raw)
  To: linux-i2c; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

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

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 },
 	{},
 };
-- 
2.19.1


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

* Re: [PATCH 1/2] i2c: sh_mobile: sort compatible entries
  2019-02-04 22:00 ` [PATCH 1/2] i2c: sh_mobile: sort compatible entries Wolfram Sang
@ 2019-02-05 13:14   ` Geert Uytterhoeven
  2019-02-05 14:31   ` Simon Horman
  2019-02-08 21:29   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2019-02-05 13:14 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux I2C, Linux-Renesas, Yoshihiro Shimoda

On Mon, Feb 4, 2019 at 11:00 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Makes it easier to add new ones.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

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

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] 10+ messages in thread

* Re: [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3
  2019-02-04 22:00 ` [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3 Wolfram Sang
@ 2019-02-05 13:16   ` Geert Uytterhoeven
  2019-02-05 16:47     ` Wolfram Sang
  2019-02-05 14:33   ` Simon Horman
  2019-02-08 21:29   ` Wolfram Sang
  2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2019-02-05 13:16 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux I2C, Linux-Renesas, Yoshihiro Shimoda

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

-- 
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] 10+ messages in thread

* Re: [PATCH 1/2] i2c: sh_mobile: sort compatible entries
  2019-02-04 22:00 ` [PATCH 1/2] i2c: sh_mobile: sort compatible entries Wolfram Sang
  2019-02-05 13:14   ` Geert Uytterhoeven
@ 2019-02-05 14:31   ` Simon Horman
  2019-02-08 21:29   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2019-02-05 14:31 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc, Yoshihiro Shimoda

On Mon, Feb 04, 2019 at 11:00:09PM +0100, Wolfram Sang wrote:
> Makes it easier to add new ones.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3
  2019-02-04 22:00 ` [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3 Wolfram Sang
  2019-02-05 13:16   ` Geert Uytterhoeven
@ 2019-02-05 14:33   ` Simon Horman
  2019-02-08 21:29   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: Simon Horman @ 2019-02-05 14:33 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc, Yoshihiro Shimoda

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>


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

* Re: [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3
  2019-02-05 13:16   ` Geert Uytterhoeven
@ 2019-02-05 16:47     ` Wolfram Sang
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-02-05 16:47 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Wolfram Sang, Linux I2C, Linux-Renesas, Yoshihiro Shimoda

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


> 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!


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

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

* Re: [PATCH 1/2] i2c: sh_mobile: sort compatible entries
  2019-02-04 22:00 ` [PATCH 1/2] i2c: sh_mobile: sort compatible entries Wolfram Sang
  2019-02-05 13:14   ` Geert Uytterhoeven
  2019-02-05 14:31   ` Simon Horman
@ 2019-02-08 21:29   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-02-08 21:29 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc, Yoshihiro Shimoda

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

On Mon, Feb 04, 2019 at 11:00:09PM +0100, Wolfram Sang wrote:
> Makes it easier to add new ones.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!


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

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

* Re: [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3
  2019-02-04 22:00 ` [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3 Wolfram Sang
  2019-02-05 13:16   ` Geert Uytterhoeven
  2019-02-05 14:33   ` Simon Horman
@ 2019-02-08 21:29   ` Wolfram Sang
  2 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2019-02-08 21:29 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc, Yoshihiro Shimoda

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

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!


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

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

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 22:00 [PATCH 0/2] i2c: sh_mobile: updates to compatibles Wolfram Sang
2019-02-04 22:00 ` [PATCH 1/2] i2c: sh_mobile: sort compatible entries Wolfram Sang
2019-02-05 13:14   ` Geert Uytterhoeven
2019-02-05 14:31   ` Simon Horman
2019-02-08 21:29   ` Wolfram Sang
2019-02-04 22:00 ` [PATCH 2/2] i2c: sh_mobile: use new clock calculation formulas for Gen3 Wolfram Sang
2019-02-05 13:16   ` Geert Uytterhoeven
2019-02-05 16:47     ` Wolfram Sang
2019-02-05 14:33   ` Simon Horman
2019-02-08 21:29   ` Wolfram Sang

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org linux-renesas-soc@archiver.kernel.org
	public-inbox-index linux-renesas-soc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox