mirror of
https://github.com/openwrt/openwrt.git
synced 2026-05-05 22:25:44 +04:00
c5b12fc02a
Introduce initial support for Airoha AN7583 SoC and add all the required patch for basic functionality of the SoC. Airoha AN7583 is based on Airoha EN7581 SoC with some major changes on the PHY handling and Serdes. It can be see as a lower spec of EN7581 with modern and simplified implementations. All the patch are sent upstream and are pending revision. Support for PCIe and USB will come later as soon as DT structure is accepted upstream. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
58 lines
1.6 KiB
Diff
58 lines
1.6 KiB
Diff
From 8f1aea6f4aa61e09eb29b41ff9fffeedd5b2fc0d Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Tue, 17 Jun 2025 13:15:19 +0200
|
|
Subject: [PATCH 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@gmail.com>
|
|
---
|
|
drivers/clk/clk-en7523.c | 17 +++++++++++++++--
|
|
1 file changed, 15 insertions(+), 2 deletions(-)
|
|
|
|
--- 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 platf
|
|
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 = {
|