diff mbox series

clk: renesas: r8a779[56]x: add MLP clock

Message ID 20210929213431.5275-1-nikita.yoush@cogentembedded.com (mailing list archive)
State Changes Requested, archived
Headers show
Series clk: renesas: r8a779[56]x: add MLP clock | expand

Commit Message

Nikita Yushchenko Sept. 29, 2021, 9:34 p.m. UTC
From: Andrey Gusakov <andrey.gusakov@cogentembedded.com>

Add clocks for MLP module on Renesas H3 and M3.

Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
 drivers/clk/renesas/r8a7795-cpg-mssr.c  | 1 +
 drivers/clk/renesas/r8a7796-cpg-mssr.c  | 1 +
 drivers/clk/renesas/r8a77965-cpg-mssr.c | 1 +
 3 files changed, 3 insertions(+)

Comments

Geert Uytterhoeven Oct. 5, 2021, 3:53 p.m. UTC | #1
Hi Nikita,

On Wed, Sep 29, 2021 at 11:35 PM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> From: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
>
> Add clocks for MLP module on Renesas H3 and M3.
>
> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>

Thanks for your patch!

> --- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
> @@ -229,6 +229,7 @@ static struct mssr_mod_clk r8a7795_mod_clks[] __initdata = {
>         DEF_MOD("lvds",                  727,   R8A7795_CLK_S0D4),
>         DEF_MOD("hdmi1",                 728,   R8A7795_CLK_HDMI),
>         DEF_MOD("hdmi0",                 729,   R8A7795_CLK_HDMI),
> +       DEF_MOD("mlp",                   802,   R8A7795_CLK_S2D1),
>         DEF_MOD("vin7",                  804,   R8A7795_CLK_S0D2),
>         DEF_MOD("vin6",                  805,   R8A7795_CLK_S0D2),
>         DEF_MOD("vin5",                  806,   R8A7795_CLK_S0D2),
> diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
> index 41593c126faf..9c22977e42c2 100644
> --- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
> @@ -207,6 +207,7 @@ static struct mssr_mod_clk r8a7796_mod_clks[] __initdata = {
>         DEF_MOD("du0",                   724,   R8A7796_CLK_S2D1),
>         DEF_MOD("lvds",                  727,   R8A7796_CLK_S2D1),
>         DEF_MOD("hdmi0",                 729,   R8A7796_CLK_HDMI),
> +       DEF_MOD("mlp",                   802,   R8A7796_CLK_S2D1),
>         DEF_MOD("vin7",                  804,   R8A7796_CLK_S0D2),
>         DEF_MOD("vin6",                  805,   R8A7796_CLK_S0D2),
>         DEF_MOD("vin5",                  806,   R8A7796_CLK_S0D2),
> diff --git a/drivers/clk/renesas/r8a77965-cpg-mssr.c b/drivers/clk/renesas/r8a77965-cpg-mssr.c
> index bc1be8bcbbe4..52c5da26b756 100644
> --- a/drivers/clk/renesas/r8a77965-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a77965-cpg-mssr.c
> @@ -205,6 +205,7 @@ static const struct mssr_mod_clk r8a77965_mod_clks[] __initconst = {
>         DEF_MOD("lvds",                 727,    R8A77965_CLK_S2D1),
>         DEF_MOD("hdmi0",                729,    R8A77965_CLK_HDMI),
>
> +       DEF_MOD("mlp",                  802,    R8A77965_CLK_S2D1),
>         DEF_MOD("vin7",                 804,    R8A77965_CLK_S0D2),
>         DEF_MOD("vin6",                 805,    R8A77965_CLK_S0D2),
>         DEF_MOD("vin5",                 806,    R8A77965_CLK_S0D2),

These additions look fine to me.  I'm only wondering about the
actual parent clocks, which are not well-documented in the Hardware
User's Manual.
It does say that MLP uses the Audio main bus (AXI).
The related AUDIO-DMAC uses S1D2, which runs at 266 MHz, while S2D1
runs at 400 MHz?

BTW, do you plan to enable full support for MLP in the upstream kernel?

Gr{oetje,eeting}s,

                        Geert
Nikita Yushchenko Oct. 7, 2021, 8:09 p.m. UTC | #2
> These additions look fine to me.  I'm only wondering about the
> actual parent clocks, which are not well-documented in the Hardware
> User's Manual.
> It does say that MLP uses the Audio main bus (AXI).
> The related AUDIO-DMAC uses S1D2, which runs at 266 MHz, while S2D1
> runs at 400 MHz?

This patch was included in this form into Renesas BSP for years.

Indeed, the information on the parent clock is missing in the manual, and can be inexact here. I've sent 
a question to our contact at Renesas but not sure they will reply.

But, AFAIU, these parent clocks are not software-controlled, so having them wrong does not result in any 
issues other than inexact information exported via sysfs/debugfs.

> BTW, do you plan to enable full support for MLP in the upstream kernel?

Yes, we are upstreaming full KF board support now.

Nikita
Geert Uytterhoeven Oct. 8, 2021, 6:57 a.m. UTC | #3
Hi Nikita,

On Thu, Oct 7, 2021 at 10:09 PM Nikita Yushchenko
<nikita.yoush@cogentembedded.com> wrote:
> > These additions look fine to me.  I'm only wondering about the
> > actual parent clocks, which are not well-documented in the Hardware
> > User's Manual.
> > It does say that MLP uses the Audio main bus (AXI).
> > The related AUDIO-DMAC uses S1D2, which runs at 266 MHz, while S2D1
> > runs at 400 MHz?
>
> This patch was included in this form into Renesas BSP for years.
>
> Indeed, the information on the parent clock is missing in the manual, and can be inexact here. I've sent
> a question to our contact at Renesas but not sure they will reply.
>
> But, AFAIU, these parent clocks are not software-controlled, so having them wrong does not result in any
> issues other than inexact information exported via sysfs/debugfs.

True.  So in case we don't get feedback, I'll take this patch as-is.

> > BTW, do you plan to enable full support for MLP in the upstream kernel?
>
> Yes, we are upstreaming full KF board support now.

I'm happy to hear that, thanks a lot!

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index c32d2c678046..d6b1d0148bfd 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -229,6 +229,7 @@  static struct mssr_mod_clk r8a7795_mod_clks[] __initdata = {
 	DEF_MOD("lvds",			 727,	R8A7795_CLK_S0D4),
 	DEF_MOD("hdmi1",		 728,	R8A7795_CLK_HDMI),
 	DEF_MOD("hdmi0",		 729,	R8A7795_CLK_HDMI),
+	DEF_MOD("mlp",			 802,	R8A7795_CLK_S2D1),
 	DEF_MOD("vin7",			 804,	R8A7795_CLK_S0D2),
 	DEF_MOD("vin6",			 805,	R8A7795_CLK_S0D2),
 	DEF_MOD("vin5",			 806,	R8A7795_CLK_S0D2),
diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index 41593c126faf..9c22977e42c2 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -207,6 +207,7 @@  static struct mssr_mod_clk r8a7796_mod_clks[] __initdata = {
 	DEF_MOD("du0",			 724,	R8A7796_CLK_S2D1),
 	DEF_MOD("lvds",			 727,	R8A7796_CLK_S2D1),
 	DEF_MOD("hdmi0",		 729,	R8A7796_CLK_HDMI),
+	DEF_MOD("mlp",			 802,	R8A7796_CLK_S2D1),
 	DEF_MOD("vin7",			 804,	R8A7796_CLK_S0D2),
 	DEF_MOD("vin6",			 805,	R8A7796_CLK_S0D2),
 	DEF_MOD("vin5",			 806,	R8A7796_CLK_S0D2),
diff --git a/drivers/clk/renesas/r8a77965-cpg-mssr.c b/drivers/clk/renesas/r8a77965-cpg-mssr.c
index bc1be8bcbbe4..52c5da26b756 100644
--- a/drivers/clk/renesas/r8a77965-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77965-cpg-mssr.c
@@ -205,6 +205,7 @@  static const struct mssr_mod_clk r8a77965_mod_clks[] __initconst = {
 	DEF_MOD("lvds",			727,	R8A77965_CLK_S2D1),
 	DEF_MOD("hdmi0",		729,	R8A77965_CLK_HDMI),
 
+	DEF_MOD("mlp",			802,	R8A77965_CLK_S2D1),
 	DEF_MOD("vin7",			804,	R8A77965_CLK_S0D2),
 	DEF_MOD("vin6",			805,	R8A77965_CLK_S0D2),
 	DEF_MOD("vin5",			806,	R8A77965_CLK_S0D2),