ath79: Convert incorrect 5.10 and 5.15 patches
[openwrt/openwrt.git] / target / linux / ath79 / patches-5.15 / 0040-ath79-sgmii-config.patch
1 From: David Bauer <mail@david-bauer.net>
2 Subject: [PATCH] ath79: force SGMII SerDes mode to MAC operation
3
4 The mode on the SGMII SerDes on the QCA9563 is 1000 Base-X by default.
5 This only allows for 1000 Mbit/s links, however when used with an SGMII
6 PHY in 100 Mbit/s link mode, the link remains dead.
7
8 This strictly has nothing to do with the SerDes calibration, however it
9 is done at the same point in the QCA reference U-Boot which is the
10 blueprint for everything happening here. As the current state is more or
11 less a hack, this should be fine.
12
13 This fixes the issues outlined above on a TP-Link EAP-225 Outdoor.
14
15 Reported-by: Tom Herbers <freifunk@tomherbers.de>
16 Tested-by: Tom Herbers <freifunk@tomherbers.de>
17 Submitted-by: David Bauer <mail@david-bauer.net>
18 ---
19 arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 1 +
20 1 files changed, 1 insertion(+)
21
22 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
23 +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
24 @@ -1376,5 +1376,6 @@
25
26 #define QCA956X_SGMII_CONFIG_MODE_CTRL_SHIFT 0
27 #define QCA956X_SGMII_CONFIG_MODE_CTRL_MASK 0x7
28 +#define QCA956X_SGMII_CONFIG_MODE_CTRL_SGMII_MAC 0x2
29
30 #endif /* __ASM_MACH_AR71XX_REGS_H */