aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c5
-rw-r--r--target/linux/ath79/patches-5.4/0040-ath79-sgmii-config.patch9
2 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 07d9992ca7..84b0f9e4ac 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -602,6 +602,11 @@ static void ag71xx_sgmii_serdes_init_qca956x(struct device_node *np)
goto err_iomap;
}
+ t = __raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_CONFIG);
+ t &= ~(QCA956X_SGMII_CONFIG_MODE_CTRL_MASK << QCA956X_SGMII_CONFIG_MODE_CTRL_SHIFT);
+ t |= QCA956X_SGMII_CONFIG_MODE_CTRL_SGMII_MAC;
+ __raw_writel(t, gmac_base + QCA956X_GMAC_REG_SGMII_CONFIG);
+
pr_debug("%pOF: fixup SERDES calibration to value %i\n",
np_dev, serdes_cal);
t = __raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_SERDES);
diff --git a/target/linux/ath79/patches-5.4/0040-ath79-sgmii-config.patch b/target/linux/ath79/patches-5.4/0040-ath79-sgmii-config.patch
new file mode 100644
index 0000000000..bf7cbf2716
--- /dev/null
+++ b/target/linux/ath79/patches-5.4/0040-ath79-sgmii-config.patch
@@ -0,0 +1,9 @@
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -1376,5 +1376,6 @@
+
+ #define QCA956X_SGMII_CONFIG_MODE_CTRL_SHIFT 0
+ #define QCA956X_SGMII_CONFIG_MODE_CTRL_MASK 0x7
++#define QCA956X_SGMII_CONFIG_MODE_CTRL_SGMII_MAC 0x2
+
+ #endif /* __ASM_MACH_AR71XX_REGS_H */