All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>
Cc: Chris Paterson <chris.paterson2@renesas.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: [PATCH 5.10.y-cip 05/26] clk: renesas: r9a07g043: Add ethernet clock sources
Date: Wed, 31 Aug 2022 17:46:24 +0100	[thread overview]
Message-ID: <20220831164645.2134258-6-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20220831164645.2134258-1-biju.das.jz@bp.renesas.com>

commit f201eb84450f98decb1834e73409bb2271441dd7 upstream.

Ethernet reference clock can be sourced from PLL5_500 or PLL6. Add
support for ethernet source clock selection using SEL_PLL_6_2 mux.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220402074626.25624-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/clk/renesas/r9a07g043-cpg.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/clk/renesas/r9a07g043-cpg.c b/drivers/clk/renesas/r9a07g043-cpg.c
index 0c574e153d4d..b9011bc7fe49 100644
--- a/drivers/clk/renesas/r9a07g043-cpg.c
+++ b/drivers/clk/renesas/r9a07g043-cpg.c
@@ -32,7 +32,10 @@ enum clk_ids {
 	CLK_PLL3_DIV2_4,
 	CLK_PLL3_DIV2_4_2,
 	CLK_PLL5,
+	CLK_PLL5_500,
+	CLK_PLL5_250,
 	CLK_PLL6,
+	CLK_PLL6_250,
 	CLK_P1_DIV2,
 
 	/* Module Clocks */
@@ -57,6 +60,9 @@ static const struct clk_div_table dtable_1_32[] = {
 	{0, 0},
 };
 
+/* Mux clock tables */
+static const char * const sel_pll6_2[]	= { ".pll6_250", ".pll5_250" };
+
 static const struct cpg_core_clk r9a07g043_core_clks[] __initconst = {
 	/* External Clock Inputs */
 	DEF_INPUT("extal", CLK_EXTAL),
@@ -73,7 +79,10 @@ static const struct cpg_core_clk r9a07g043_core_clks[] __initconst = {
 	DEF_FIXED(".pll3_div2_4", CLK_PLL3_DIV2_4, CLK_PLL3_DIV2, 1, 4),
 	DEF_FIXED(".pll3_div2_4_2", CLK_PLL3_DIV2_4_2, CLK_PLL3_DIV2_4, 1, 2),
 	DEF_FIXED(".pll5", CLK_PLL5, CLK_EXTAL, 125, 1),
+	DEF_FIXED(".pll5_500", CLK_PLL5_500, CLK_PLL5, 1, 6),
+	DEF_FIXED(".pll5_250", CLK_PLL5_250, CLK_PLL5_500, 1, 2),
 	DEF_FIXED(".pll6", CLK_PLL6, CLK_EXTAL, 125, 6),
+	DEF_FIXED(".pll6_250", CLK_PLL6_250, CLK_PLL6, 1, 2),
 
 	/* Core output clk */
 	DEF_DIV("I", R9A07G043_CLK_I, CLK_PLL1, DIVPL1A, dtable_1_8,
@@ -85,6 +94,10 @@ static const struct cpg_core_clk r9a07g043_core_clks[] __initconst = {
 	DEF_FIXED("P1_DIV2", CLK_P1_DIV2, R9A07G043_CLK_P1, 1, 2),
 	DEF_DIV("P2", R9A07G043_CLK_P2, CLK_PLL3_DIV2_4_2,
 		DIVPL3A, dtable_1_32, CLK_DIVIDER_HIWORD_MASK),
+	DEF_FIXED("M0", R9A07G043_CLK_M0, CLK_PLL3_DIV2_4, 1, 1),
+	DEF_FIXED("ZT", R9A07G043_CLK_ZT, CLK_PLL3_DIV2_4_2, 1, 1),
+	DEF_MUX("HP", R9A07G043_CLK_HP, SEL_PLL6_2,
+		sel_pll6_2, ARRAY_SIZE(sel_pll6_2), 0, CLK_MUX_HIWORD_MASK),
 };
 
 static struct rzg2l_mod_clk r9a07g043_mod_clks[] = {
-- 
2.25.1



  parent reply	other threads:[~2022-08-31 16:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 16:46 [PATCH 5.10.y-cip 00/26] Add RZ/G2UL support Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 01/26] dt-bindings: clock: Add R9A07G043 CPG Clock and Reset Definitions Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 02/26] soc: renesas: Identify RZ/G2UL SoC Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 03/26] clk: renesas: Add support for " Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 04/26] clk: renesas: r9a07g043: Add GPIO clock and reset entries Biju Das
2022-08-31 16:46 ` Biju Das [this message]
2022-08-31 16:46 ` [PATCH 5.10.y-cip 06/26] clk: renesas: r9a07g043: Add GbEthernet clock/reset Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 07/26] clk: renesas: r9a07g043: Add SDHI clock and reset entries Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 08/26] clk: renesas: r9a07g043: Add I2C clocks/resets Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 09/26] clk: renesas: r9a07g043: Add SSIF-2 clock and reset entries Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 10/26] clk: renesas: r9a07g043: Add USB clocks/resets Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 11/26] clk: renesas: r9a07g043: Add clock and reset entries for CANFD Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 12/26] clk: renesas: r9a07g043: Add OSTM clock and reset entries Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 13/26] clk: renesas: r9a07g043: Add WDT " Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 14/26] pinctrl: renesas: rzg2l: Add RZ/G2UL support Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 15/26] pinctrl: renesas: rzg2l: Restore pin config order Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 16/26] pinctrl: renesas: rzg2l: Return -EINVAL for pins which have input disabled Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 17/26] arm64: dts: renesas: Add initial DTSI for RZ/G2UL SoC Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 18/26] arm64: dts: renesas: Add initial device tree for RZ/G2UL Type-1 SMARC EVK Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 19/26] arm64: dts: renesas: r9a07g043: Fillup the pinctrl stub node Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 20/26] arm64: dts: renesas: rzg2ul-smarc: Add scif0 and audio clk pins Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 21/26] arm64: dts: renesas: r9a07g043: Add SDHI nodes Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 22/26] arm64: dts: renesas: r9a07g043: Add GbEthernet nodes Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 23/26] arm64: defconfig: Enable ARCH_R9A07G043 Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 24/26] arm64: dts: renesas: rzg2ul-smarc: Enable microSD on SMARC platform Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 25/26] arm64: dts: renesas: rzg2ul-smarc-som: Enable eMMC " Biju Das
2022-08-31 16:46 ` [PATCH 5.10.y-cip 26/26] arm64: dts: renesas: rzg2ul-smarc-som: Enable Ethernet " Biju Das
2022-09-02 10:33 ` [PATCH 5.10.y-cip 00/26] Add RZ/G2UL support Pavel Machek
2022-09-02 11:04   ` Biju Das
2022-09-06  7:04 ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220831164645.2134258-6-biju.das.jz@bp.renesas.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=chris.paterson2@renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.