[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250617130455.32682-9-ansuelsmth@gmail.com>
Date: Tue, 17 Jun 2025 15:04:51 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Felix Fietkau <nbd@....name>,
linux-clk@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Christian Marangi <ansuelsmth@...il.com>
Subject: [PATCH v2 08/10] clk: en7523: add support for probing SCU child
On new Airoha SoC in the SCU register space additional pheriperal might
be present aside from the clock/reset. The Airoha AN7583 SoC is an
example of this where 2 MDIO controller are present.
Introduce a bool "probe_child" to trigger probe of child node of the SCU
node.
Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
---
drivers/clk/clk-en7523.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index 5236119bca83..00c80221a274 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -5,6 +5,7 @@
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
+#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>
@@ -83,6 +84,7 @@ struct en_rst_data {
};
struct en_clk_soc_data {
+ bool probe_child;
u32 num_clocks;
const struct en_clk_desc *base_clks;
const struct clk_ops pcie_ops;
@@ -900,8 +902,19 @@ static int en7523_clk_probe(struct platform_device *pdev)
if (err)
return err;
- return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
- clk_data);
+ err = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get,
+ clk_data);
+ if (err)
+ return err;
+
+ if (soc_data->probe_child) {
+ err = of_platform_populate(dev->of_node, NULL, NULL,
+ dev);
+ if (err)
+ return err;
+ }
+
+ return 0;
}
static const struct en_clk_soc_data en7523_data = {
--
2.48.1
Powered by blists - more mailing lists