[openwrt/openwrt] ath79: qca955x ag71xx upstream driver fix

LEDE Commits lede-commits at lists.infradead.org
Sun Sep 22 09:46:27 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cf8d32745e54dde0571ab1362f2a30a0778cf800

commit cf8d32745e54dde0571ab1362f2a30a0778cf800
Author: Oskari Lemmela <oskari at lemmela.net>
AuthorDate: Sun Aug 4 10:02:09 2024 +0300

    ath79: qca955x ag71xx upstream driver fix
    
    Fix mdio probe in qca95xx devices and add mandatory clocks to dtsi
    
    Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
    Link: https://github.com/openwrt/openwrt/pull/15926
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ath79/dts/qca955x.dtsi                |  4 ++++
 ...ag71xx-fix-qca9530-and-qca9550-mdio-probe.patch | 25 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/target/linux/ath79/dts/qca955x.dtsi b/target/linux/ath79/dts/qca955x.dtsi
index 9d410ceb46..c6cf83d4da 100644
--- a/target/linux/ath79/dts/qca955x.dtsi
+++ b/target/linux/ath79/dts/qca955x.dtsi
@@ -362,6 +362,8 @@
 
 	resets = <&rst 9>, <&rst 22>;
 	reset-names = "mac", "mdio";
+	clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_REF>;
+	clock-names = "eth", "mdio";
 };
 
 &mdio1 {
@@ -379,4 +381,6 @@
 
 	resets = <&rst 13>, <&rst 23>;
 	reset-names = "mac", "mdio";
+	clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_REF>;
+	clock-names = "eth", "mdio";
 };
diff --git a/target/linux/generic/pending-6.6/900-net-ag71xx-fix-qca9530-and-qca9550-mdio-probe.patch b/target/linux/generic/pending-6.6/900-net-ag71xx-fix-qca9530-and-qca9550-mdio-probe.patch
new file mode 100644
index 0000000000..f2c197d4f1
--- /dev/null
+++ b/target/linux/generic/pending-6.6/900-net-ag71xx-fix-qca9530-and-qca9550-mdio-probe.patch
@@ -0,0 +1,25 @@
+From 440415703692af4548e836832ef0434e87fbc357 Mon Sep 17 00:00:00 2001
+From: Oskari Lemmela <oskari at lemmela.net>
+Date: Sat, 13 Jul 2024 18:56:59 +0300
+Subject: [PATCH] net: ag71xx: fix qca9530 and qca9550 mdio probe
+
+Newer QCA9530 and QCA9550 devices should use same div table as AR933X.
+
+Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver")
+Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
+---
+ drivers/net/ethernet/atheros/ag71xx.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/atheros/ag71xx.c
++++ b/drivers/net/ethernet/atheros/ag71xx.c
+@@ -638,7 +638,8 @@ static int ag71xx_mdio_get_divider(struc
+ 	if (!ref_clock)
+ 		return -EINVAL;
+ 
+-	if (ag71xx_is(ag, AR9330) || ag71xx_is(ag, AR9340)) {
++	if (ag71xx_is(ag, AR9330) || ag71xx_is(ag, AR9340) ||
++	    ag71xx_is(ag, QCA9530) || ag71xx_is(ag, QCA9550)) {
+ 		table = ar933x_mdio_div_table;
+ 		ndivs = ARRAY_SIZE(ar933x_mdio_div_table);
+ 	} else if (ag71xx_is(ag, AR7240)) {




More information about the lede-commits mailing list