1 From: Wenli Looi <wlooi@ucalgary.ca>
2 Date: Sun, 20 Jun 2021 23:32:28 -0700
3 Subject: [PATCH] ath79: add support for booting QCN550x
5 Based on wikidevi, QCN550x is a "Dragonfly" like QCA9561 and QCA9563.
6 Treating it as QCA956x seems to work.
7 Tested on Netgear EX7300v2 which boots successfully with
8 the same CPU clock as the stock firmware.
10 Link: https://wikidevi.wi-cat.ru/Qualcomm#bgn
11 Link: https://wikidevi.wi-cat.ru/Qualcomm_Atheros#.28a.29bgn_2
12 Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
14 --- a/arch/mips/ath79/early_printk.c
15 +++ b/arch/mips/ath79/early_printk.c
16 @@ -121,6 +121,7 @@ static void prom_putchar_init(void)
17 case REV_ID_MAJOR_QCA9558:
18 case REV_ID_MAJOR_TP9343:
19 case REV_ID_MAJOR_QCA956X:
20 + case REV_ID_MAJOR_QCN550X:
21 _prom_putchar = prom_putchar_ar71xx;
24 --- a/arch/mips/ath79/setup.c
25 +++ b/arch/mips/ath79/setup.c
26 @@ -168,6 +168,12 @@ static void __init ath79_detect_sys_type
27 rev = id & QCA956X_REV_ID_REVISION_MASK;
30 + case REV_ID_MAJOR_QCN550X:
31 + ath79_soc = ATH79_SOC_QCA956X;
33 + rev = id & QCA956X_REV_ID_REVISION_MASK;
36 case REV_ID_MAJOR_TP9343:
37 ath79_soc = ATH79_SOC_TP9343;
39 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
40 +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
42 #define REV_ID_MAJOR_QCA9558 0x1130
43 #define REV_ID_MAJOR_TP9343 0x0150
44 #define REV_ID_MAJOR_QCA956X 0x1150
45 +#define REV_ID_MAJOR_QCN550X 0x2170
47 #define AR71XX_REV_ID_MINOR_MASK 0x3
48 #define AR71XX_REV_ID_MINOR_AR7130 0x0