mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-11-01 22:00:09 +00:00
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>
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From 397a132fb8173a9d728bc7c7a31ff5c0590d076f Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Tue, 17 Jun 2025 12:48:35 +0200
|
|
Subject: [PATCH 05/10] clk: en7523: permit to reference Chip SCU from phandle
|
|
|
|
In preparation for support of AN7583 and to make Chip SCU reference more
|
|
robust, permit to reference the Chip SCU syscon regmap also with the
|
|
"airoha,chip-scu" property in DT.
|
|
|
|
Legacy implementation is kept by fallbacking in the absence of
|
|
"airoha,chip-scu" property.
|
|
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
---
|
|
drivers/clk/clk-en7523.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/clk/clk-en7523.c
|
|
+++ b/drivers/clk/clk-en7523.c
|
|
@@ -846,11 +846,16 @@ static int en7581_clk_hw_init(struct pla
|
|
const struct en_clk_soc_data *soc_data,
|
|
struct clk_hw_onecell_data *clk_data)
|
|
{
|
|
+ struct device *dev = &pdev->dev;
|
|
struct regmap *map, *clk_map;
|
|
void __iomem *base;
|
|
int err;
|
|
|
|
- map = syscon_regmap_lookup_by_compatible("airoha,en7581-chip-scu");
|
|
+ if (of_property_present(dev->of_node, "airoha,chip-scu"))
|
|
+ map = syscon_regmap_lookup_by_phandle(dev->of_node,
|
|
+ "airoha,chip-scu");
|
|
+ else
|
|
+ map = syscon_regmap_lookup_by_compatible("airoha,en7581-chip-scu");
|
|
if (IS_ERR(map))
|
|
return PTR_ERR(map);
|
|
|