From: Daniel Machon <daniel.machon@microchip.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Kavyasree Kotagiri <kavyasree.kotagiri@microchip.com>,
Steen Hegelund <Steen.Hegelund@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: <linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH 4/4] clk: lan966x: add support for lan969x SoC clock driver
Date: Mon, 16 Sep 2024 11:49:22 +0200 [thread overview]
Message-ID: <20240916-lan969x-clock-v1-4-0e150336074d@microchip.com> (raw)
In-Reply-To: <20240916-lan969x-clock-v1-0-0e150336074d@microchip.com>
Add support for the lan969x SoC clock driver in the existing lan966x
driver. The lan969x clock controller contains 3 PLLs - cpu_clk, ddr_clk
and sys_clk (same as lan966x) which generates and supplies the clock to
various peripherals within the SoC.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
---
drivers/clk/clk-lan966x.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c
index b25330159446..9b928e4a1c62 100644
--- a/drivers/clk/clk-lan966x.c
+++ b/drivers/clk/clk-lan966x.c
@@ -31,6 +31,13 @@ static const char * const lan966x_clk_names[] = {
"flexcom4", "timer1", "usb_refclk",
};
+static const char * const lan969x_clk_names[] = {
+ "qspi0", "qspi2", "sdmmc0", "sdmmc1",
+ "mcan0", "mcan1", "flexcom0",
+ "flexcom1", "flexcom2", "flexcom3",
+ "timer1", "usb_refclk",
+};
+
struct lan966x_gck {
struct clk_hw hw;
void __iomem *reg;
@@ -61,6 +68,13 @@ static const struct clk_gate_soc_desc lan966x_clk_gate_desc[] = {
{ }
};
+static const struct clk_gate_soc_desc lan969x_clk_gate_desc[] = {
+ { "usb_drd", 10 },
+ { "mcramc", 9 },
+ { "hmatrix", 8 },
+ { }
+};
+
struct lan966x_match_data {
char *name;
const char * const *clk_name;
@@ -77,6 +91,14 @@ static struct lan966x_match_data lan966x_desc = {
.num_generic_clks = 14,
};
+static struct lan966x_match_data lan969x_desc = {
+ .name = "lan969x",
+ .clk_name = lan969x_clk_names,
+ .clk_gate_desc = lan969x_clk_gate_desc,
+ .num_total_clks = 15,
+ .num_generic_clks = 12,
+};
+
static DEFINE_SPINLOCK(clk_gate_lock);
static void __iomem *base;
@@ -282,6 +304,7 @@ static int lan966x_clk_probe(struct platform_device *pdev)
static const struct of_device_id lan966x_clk_dt_ids[] = {
{ .compatible = "microchip,lan966x-gck", .data = &lan966x_desc },
+ { .compatible = "microchip,lan9691-gck", .data = &lan969x_desc },
{ }
};
MODULE_DEVICE_TABLE(of, lan966x_clk_dt_ids);
--
2.34.1
next prev parent reply other threads:[~2024-09-16 9:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 9:49 [PATCH 0/4] clk: lan966x: add support for lan969x SoC clock driver Daniel Machon
2024-09-16 9:49 ` [PATCH 1/4] dt-bindings: clock: add support for lan969x Daniel Machon
2024-09-16 15:33 ` Conor Dooley
2024-09-16 9:49 ` [PATCH 2/4] clk: lan966x: make clk_names const char * const Daniel Machon
2024-09-16 9:49 ` [PATCH 3/4] clk: lan966x: prepare driver for lan969x support Daniel Machon
2024-09-16 9:49 ` Daniel Machon [this message]
2024-10-17 22:59 ` [PATCH 0/4] clk: lan966x: add support for lan969x SoC clock driver Stephen Boyd
2024-10-18 8:34 ` claudiu beznea
2024-10-19 6:01 ` Stephen Boyd
2024-10-20 15:39 ` Claudiu Beznea
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=20240916-lan969x-clock-v1-4-0e150336074d@microchip.com \
--to=daniel.machon@microchip.com \
--cc=Steen.Hegelund@microchip.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=horatiu.vultur@microchip.com \
--cc=kavyasree.kotagiri@microchip.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).