Skip to content

Commit 848bdee

Browse files
Merge branch 'openwrt:main' into main
2 parents 419780e + a1f5273 commit 848bdee

9 files changed

Lines changed: 168 additions & 64 deletions

File tree

package/base-files/files/sbin/sysupgrade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ list_conffiles() {
146146
' /usr/lib/opkg/status
147147
elif [ -d /lib/apk/packages ]; then
148148
conffiles=""
149-
for file in /lib/apk/packages/*.conffiles_static; do
149+
for file in $(find /lib/apk/packages -name "*.conffiles_static" -type f); do
150150
conffiles="$(echo -e "$(cat $file)\n$conffiles")"
151151
done
152152
echo "$conffiles"

package/kernel/mac80211/patches/ath9k/550-ath9k-of.patch

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,26 @@
164164
return 0;
165165
}
166166

167+
--- a/drivers/net/wireless/ath/ath9k/hw.c
168+
+++ b/drivers/net/wireless/ath/ath9k/hw.c
169+
@@ -2429,6 +2429,7 @@ static bool ath9k_hw_dfs_tested(struct ath_hw *ah)
170+
static void ath9k_gpio_cap_init(struct ath_hw *ah)
171+
{
172+
struct ath9k_hw_capabilities *pCap = &ah->caps;
173+
+ u32 gpio_mask = pCap->gpio_mask;
174+
175+
if (AR_SREV_9271(ah)) {
176+
pCap->num_gpio_pins = AR9271_NUM_GPIO;
177+
@@ -2479,6 +2480,12 @@ static void ath9k_gpio_cap_init(struct ath_hw *ah)
178+
pCap->num_gpio_pins = AR_NUM_GPIO;
179+
pCap->gpio_mask = AR_GPIO_MASK;
180+
}
181+
+
182+
+ if (gpio_mask) {
183+
+ pCap->gpio_mask = gpio_mask;
184+
+ ath_info(ath9k_hw_common(ah), "Use overridden gpio mask 0x%x\n",
185+
+ gpio_mask);
186+
+ }
187+
}
188+
189+
int ath9k_hw_fill_cap_info(struct ath_hw *ah)

package/kernel/mt76/patches/0001-wifi-mt76-mt7915-set-mt76-specific-PS-flag.patch

Lines changed: 0 additions & 42 deletions
This file was deleted.

target/linux/ath79/generic/base-files/etc/board.d/02_network

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ ath79_setup_interfaces()
136136
;;
137137
airtight,c-75)
138138
ucidef_add_switch "switch0" \
139-
"0@eth0" "2:wan" "3:lan" "6@eth1"
139+
"0u@eth0" "2:wan" "3:lan" "6u@eth1"
140140
;;
141141
alfa-network,ap121fe)
142142
ucidef_set_interface_lan "eth0 usb0"
@@ -200,7 +200,7 @@ ath79_setup_interfaces()
200200
tplink,tl-wdr4900-v2|\
201201
tplink,tl-wdr7500-v3)
202202
ucidef_add_switch "switch0" \
203-
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
203+
"0u@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6u@eth0" "1:wan"
204204
;;
205205
buffalo,bhr-4grv|\
206206
buffalo,wzr-hp-g450h)
@@ -210,11 +210,11 @@ ath79_setup_interfaces()
210210
buffalo,bhr-4grv2|\
211211
trendnet,tew-823dru)
212212
ucidef_add_switch "switch0" \
213-
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
213+
"0u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6u@eth0"
214214
;;
215215
buffalo,wzr-450hp2)
216216
ucidef_add_switch "switch0" \
217-
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
217+
"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0u@eth0"
218218
;;
219219
buffalo,wzr-600dhp|\
220220
buffalo,wzr-hp-ag300h|\
@@ -287,7 +287,7 @@ ath79_setup_interfaces()
287287
comfast,cf-wr650ac-v2|\
288288
zyxel,nbg6616)
289289
ucidef_add_switch "switch0" \
290-
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
290+
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6u@eth1"
291291
;;
292292
compex,wpj344-16m|\
293293
compex,wpj563)
@@ -301,7 +301,7 @@ ath79_setup_interfaces()
301301
dell,apl26-0ae|\
302302
dell,apl27-0b1)
303303
ucidef_add_switch "switch0" \
304-
"0@eth0" "2:lan:1" "3:lan:2" "6@eth1"
304+
"0u@eth0" "2:lan:1" "3:lan:2" "6u@eth1"
305305
;;
306306
devolo,dlan-pro-1200plus-ac|\
307307
devolo,magic-2-wifi)
@@ -318,11 +318,11 @@ ath79_setup_interfaces()
318318
;;
319319
dlink,dap-2695-a1)
320320
ucidef_add_switch "switch0" \
321-
"0@eth0" "2:lan" "3:wan" "6@eth1"
321+
"0u@eth0" "2:lan" "3:wan" "6u@eth1"
322322
;;
323323
dlink,dap-3662-a1)
324324
ucidef_add_switch "switch0" \
325-
"0@eth0" "1:lan:2" "2:lan:1" "6@eth1"
325+
"0u@eth0" "1:lan:2" "2:lan:1" "6u@eth1"
326326
;;
327327
dlink,dch-g020-a1)
328328
ucidef_add_switch "switch0" \
@@ -393,7 +393,7 @@ ath79_setup_interfaces()
393393
;;
394394
jjplus,jwap230)
395395
ucidef_add_switch "switch0" \
396-
"0@eth0" "5:wan:1" "1:lan:2" "6@eth1"
396+
"0u@eth0" "5:wan:1" "1:lan:2" "6u@eth1"
397397
;;
398398
joyit,jt-or750i)
399399
ucidef_set_interface_wan "eth1"
@@ -416,7 +416,7 @@ ath79_setup_interfaces()
416416
;;
417417
librerouter,librerouter-v1)
418418
ucidef_add_switch "switch0" \
419-
"0@eth0" "5:wan" "6@eth1" "4:lan"
419+
"0u@eth0" "5:wan" "6u@eth1" "4:lan"
420420
;;
421421
longdata,aps256)
422422
ucidef_set_interface_wan "eth1"
@@ -512,7 +512,7 @@ ath79_setup_interfaces()
512512
;;
513513
ruckus,r500)
514514
ucidef_add_switch "switch0" \
515-
"6u@eth0" "5:lan:1" "3:lan:2" "0@eth1"
515+
"6u@eth0" "5:lan:1" "3:lan:2" "0u@eth1"
516516
;;
517517
teltonika,rut955|\
518518
teltonika,rut955-h7v3c0)
@@ -527,7 +527,7 @@ ath79_setup_interfaces()
527527
tplink,archer-d7-v1|\
528528
tplink,archer-d7b-v1)
529529
ucidef_add_switch "switch0" \
530-
"0@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6@eth0" "2:wan:4" "1:wan:5"
530+
"0u@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6u@eth0" "2:wan:4" "1:wan:5"
531531
;;
532532
tplink,deco-m4r-v1|\
533533
tplink,deco-s4-v2)
@@ -567,7 +567,7 @@ ath79_setup_interfaces()
567567
tplink,tl-wr1043nd-v3|\
568568
tplink,tl-wr1045nd-v2)
569569
ucidef_add_switch "switch0" \
570-
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0"
570+
"0u@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6u@eth0"
571571
;;
572572
tplink,tl-wr2543-v1)
573573
ucidef_add_switch "switch0" \

target/linux/ath79/nand/base-files/etc/board.d/02_network

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ath79_setup_interfaces()
1313
;;
1414
domywifi,dw33d)
1515
ucidef_add_switch "switch0" \
16-
"0@eth0" "1:wan" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1"
16+
"0u@eth0" "1:wan" "2:lan" "3:lan" "4:lan" "5:lan" "6u@eth1"
1717
;;
1818
dongwon,dw02-412h-64m|\
1919
dongwon,dw02-412h-128m)
@@ -42,7 +42,7 @@ ath79_setup_interfaces()
4242
;;
4343
linksys,ea4500-v3)
4444
ucidef_add_switch "switch0" \
45-
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
45+
"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0u@eth0"
4646
;;
4747
netgear,pgzng1)
4848
ucidef_set_interfaces_lan_wan "eth1" "eth0"
@@ -81,7 +81,7 @@ ath79_setup_interfaces()
8181
zyxel,emg2926-q10a|\
8282
zyxel,nbg6716)
8383
ucidef_add_switch "switch0" \
84-
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
84+
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6u@eth1"
8585
;;
8686
*)
8787
ucidef_set_interfaces_lan_wan "eth0" "eth1"

target/linux/realtek/files-6.12/drivers/clk/realtek/Kconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ menuconfig COMMON_CLK_REALTEK
77
if COMMON_CLK_REALTEK
88

99
config COMMON_CLK_RTL83XX
10-
bool "Clock driver for Realtek RTL83XX"
10+
bool "Clock driver for Realtek RTL83XX and RTL960X"
1111
depends on MACH_REALTEK_RTL
1212
select SRAM
1313
help
1414
This driver adds support for the Realtek RTL83xx series basic clocks.
1515
This includes chips in the RTL838x series, such as RTL8380, RTL8381,
16-
RTL832, as well as chips from the RTL839x series, such as RTL8390,
17-
RT8391, RTL8392, RTL8393 and RTL8396.
16+
RTL832, chips from the RTL839x series, such as RTL8390, RT8391,
17+
RTL8392, RTL8393 and RTL8396 as well as chips from the RTL960X
18+
series, such as RTL9607C, RTL8198D.
1819

1920
endif

target/linux/realtek/files-6.12/drivers/clk/realtek/clk-rtl83xx.c

Lines changed: 101 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@
9292

9393
#define SOC_RTL838X 0
9494
#define SOC_RTL839X 1
95-
#define SOC_COUNT 2
95+
#define SOC_RTL960X 2
96+
#define SOC_COUNT 3
9697

9798
#define MEM_DDR1 1
9899
#define MEM_DDR2 2
@@ -264,6 +265,8 @@ static const struct rtcl_round_set rtcl_round_set[SOC_COUNT][CLK_COUNT] = {
264265
RTCL_ROUND_SET(400000000, 850000000, 25000000),
265266
RTCL_ROUND_SET(100000000, 400000000, 25000000),
266267
RTCL_ROUND_SET(50000000, 200000000, 50000000)
268+
}, {
269+
RTCL_ROUND_SET(500000000, 1200000000, 25000000)
267270
}
268271
};
269272

@@ -465,6 +468,91 @@ static long rtcl_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long
465468
return rrate;
466469
}
467470

471+
static unsigned long rtcl_960x_cpu_recalc_rate(struct clk_hw *hw,
472+
unsigned long parent_rate)
473+
{
474+
u32 ocp_pll_ctrl0, ocp_pll_ctrl3, cmu_gcr;
475+
u32 cpu_freq_sel0, en_div2_cpu0, cmu_mode, freq_div;
476+
unsigned long rate;
477+
478+
ocp_pll_ctrl0 = read_soc(RTL960X_OCP_PLL_CTRL0);
479+
ocp_pll_ctrl3 = read_soc(RTL960X_OCP_PLL_CTRL3);
480+
cmu_gcr = read_soc(RTL960X_CMU_GCR);
481+
482+
cpu_freq_sel0 = RTL960X_OCP_CTRL0_CPU_FREQ_SEL0(ocp_pll_ctrl0);
483+
en_div2_cpu0 = RTL960X_OCP_CTRL3_EN_DIV2_CPU0(ocp_pll_ctrl3);
484+
cmu_mode = RTL960X_CMU_GCR_CMU_MODE(cmu_gcr);
485+
freq_div = RTL960X_CMU_GCR_FREQ_DIV(cmu_gcr);
486+
487+
rate = ((cpu_freq_sel0 + 2) * 2 * parent_rate) >> en_div2_cpu0;
488+
if (cmu_mode != 0)
489+
rate >>= freq_div;
490+
491+
return rate;
492+
}
493+
494+
static unsigned long rtcl_960x_lxb_recalc_rate(struct clk_hw *hw,
495+
unsigned long parent_rate)
496+
{
497+
u32 phy_rg5x_pll, lx_freq_sel;
498+
unsigned long rate;
499+
500+
phy_rg5x_pll = read_sw(RTL960X_PHY_RG5X_PLL);
501+
lx_freq_sel = RTL960X_LX_FREQ_SEL(phy_rg5x_pll);
502+
503+
rate = (40 * parent_rate) / (lx_freq_sel + 5);
504+
505+
return rate;
506+
}
507+
508+
static unsigned long rtcl_960x_mem_recalc_rate(struct clk_hw *hw,
509+
unsigned long parent_rate)
510+
{
511+
u32 mem_pll_ctrl2, mem_pll_ctrl3, mem_pll_ctrl5;
512+
u32 n_code, pdiv, f_code;
513+
unsigned long rate;
514+
u64 t;
515+
516+
mem_pll_ctrl2 = read_soc(RTL960X_MEM_PLL_CTRL2);
517+
mem_pll_ctrl3 = read_soc(RTL960X_MEM_PLL_CTRL3);
518+
mem_pll_ctrl5 = read_soc(RTL960X_MEM_PLL_CTRL5);
519+
520+
pdiv = RTL960X_MEM_CTRL2_PDIV(mem_pll_ctrl2);
521+
n_code = RTL960X_MEM_CTRL3_N_CODE(mem_pll_ctrl3);
522+
f_code = RTL960X_MEM_CTRL5_F_CODE(mem_pll_ctrl5);
523+
524+
rate = (parent_rate * (n_code + 3)) / (2 * (1 << pdiv));
525+
t = parent_rate;
526+
t *= f_code;
527+
t /= 16384;
528+
rate += t;
529+
530+
return rate;
531+
}
532+
533+
static unsigned long rtcl_960x_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
534+
{
535+
struct rtcl_clk *clk = rtcl_hw_to_clk(hw);
536+
unsigned long rate;
537+
538+
if ((clk->idx >= CLK_COUNT) || (!rtcl_ccu) || (rtcl_ccu->soc >= SOC_COUNT))
539+
return 0;
540+
541+
switch (clk->idx) {
542+
case CLK_CPU:
543+
rate = rtcl_960x_cpu_recalc_rate(hw, parent_rate);
544+
break;
545+
case CLK_MEM:
546+
rate = rtcl_960x_mem_recalc_rate(hw, parent_rate);
547+
break;
548+
case CLK_LXB:
549+
rate = rtcl_960x_lxb_recalc_rate(hw, parent_rate);
550+
break;
551+
}
552+
553+
return rate;
554+
}
555+
468556
/*
469557
* Initialization functions to register the CCU and its clocks
470558
*/
@@ -474,6 +562,10 @@ static long rtcl_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long
474562
(void *)&rtcl_##SOC##_dram_start) + \
475563
(void *)PBASE; })
476564

565+
static const struct clk_ops rtcl_960x_clk_ops = {
566+
.recalc_rate = rtcl_960x_recalc_rate,
567+
};
568+
477569
static const struct clk_ops rtcl_clk_ops = {
478570
.set_rate = rtcl_set_rate,
479571
.round_rate = rtcl_round_rate,
@@ -488,6 +580,8 @@ static int rtcl_ccu_create(struct device_node *np)
488580
soc = SOC_RTL838X;
489581
else if (of_device_is_compatible(np, "realtek,rtl8390-clock"))
490582
soc = SOC_RTL839X;
583+
else if (of_device_is_compatible(np, "realtek,rtl9607-clock"))
584+
soc = SOC_RTL960X;
491585
else
492586
return -ENXIO;
493587

@@ -516,10 +610,14 @@ static int rtcl_register_clkhw(int clk_idx)
516610
rclk->hw.init = &hw_init;
517611

518612
hw_init.num_parents = 1;
519-
hw_init.ops = &rtcl_clk_ops;
520613
hw_init.parent_data = &parent_data;
521614
hw_init.name = rtcl_clk_info[clk_idx].name;
522615

616+
if (rtcl_ccu->soc == SOC_RTL960X)
617+
hw_init.ops = &rtcl_960x_clk_ops;
618+
else
619+
hw_init.ops = &rtcl_clk_ops;
620+
523621
ret = of_clk_hw_register(rtcl_ccu->np, &rclk->hw);
524622
if (ret)
525623
return ret;
@@ -719,6 +817,7 @@ static void __init rtcl_probe_early(struct device_node *np)
719817

720818
CLK_OF_DECLARE_DRIVER(rtl838x_clk, "realtek,rtl8380-clock", rtcl_probe_early);
721819
CLK_OF_DECLARE_DRIVER(rtl839x_clk, "realtek,rtl8390-clock", rtcl_probe_early);
820+
CLK_OF_DECLARE_DRIVER(rtl960x_clk, "realtek,rtl9607-clock", rtcl_probe_early);
722821

723822
/*
724823
* Late registration: Finally register as normal platform driver. At this point

0 commit comments

Comments
 (0)