Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2024-05-06 14:32:28 +08:00
35 changed files with 646 additions and 450 deletions

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .29
LINUX_KERNEL_HASH-6.6.29 = 7f26f74c08082c86b1daf866e4d49c5d8276cc1906a89d0e367e457ec167cbd0
LINUX_VERSION-6.6 = .30
LINUX_KERNEL_HASH-6.6.30 = b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6

View File

@@ -67,6 +67,9 @@ linksys,mr8300)
linksys,whw01)
ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x40000" "0x10000"
;;
linksys,whw03)
ubootenv_add_uci_config "/dev/mmcblk0p11" "0x0" "0x100000"
;;
linksys,whw03v2)
ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x80000" "0x20000"
;;

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libxml2
PKG_VERSION:=2.12.5
PKG_VERSION:=2.12.6
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
PKG_HASH:=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
PKG_HASH:=889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=COPYING

View File

@@ -579,7 +579,7 @@ SVN-Revision: 35130
goto next_ht;
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -259,7 +259,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
@@ -290,7 +290,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
continue;
iph2 = (struct ipv6hdr *)(p->data + off);

View File

@@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3305,6 +3305,9 @@ static int mv88e6xxx_setup_port(struct m
@@ -3353,6 +3353,9 @@ static int mv88e6xxx_setup_port(struct m
else
reg = 1 << port;

View File

@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void sock_def_write_space_wfree(struct sock *sk);
static void sock_def_write_space(struct sock *sk);
@@ -589,6 +591,21 @@ discard_and_relse:
@@ -590,6 +592,21 @@ discard_and_relse:
}
EXPORT_SYMBOL(__sk_receive_skb);
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
u32));
INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
@@ -2246,9 +2263,11 @@ static void __sk_free(struct sock *sk)
@@ -2247,9 +2264,11 @@ static void __sk_free(struct sock *sk)
if (likely(sk->sk_net_refcnt))
sock_inuse_add(sock_net(sk), -1);

View File

@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -4144,6 +4144,8 @@ static __net_initdata struct pernet_oper
@@ -4145,6 +4145,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@@ -0,0 +1,42 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sun, 5 May 2024 20:36:56 +0200
Subject: [PATCH] net: bridge: fix corrupted ethernet header on
multicast-to-unicast
The change from skb_copy to pskb_copy unfortunately changed the data
copying to omit the ethernet header, since it was pulled before reaching
this point. Fix this by calling __skb_push/pull around pskb_copy.
Fixes: 59c878cbcdd8 ("net: bridge: fix multicast-to-unicast with fraglist GSO")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -253,6 +253,7 @@ static void maybe_deliver_addr(struct ne
{
struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
const unsigned char *src = eth_hdr(skb)->h_source;
+ struct sk_buff *nskb;
if (!should_deliver(p, skb))
return;
@@ -261,12 +262,16 @@ static void maybe_deliver_addr(struct ne
if (skb->dev == p->dev && ether_addr_equal(src, addr))
return;
- skb = pskb_copy(skb, GFP_ATOMIC);
- if (!skb) {
+ __skb_push(skb, ETH_HLEN);
+ nskb = pskb_copy(skb, GFP_ATOMIC);
+ __skb_pull(skb, ETH_HLEN);
+ if (!nskb) {
DEV_STATS_INC(dev, tx_dropped);
return;
}
+ skb = nskb;
+ __skb_pull(skb, ETH_HLEN);
if (!is_broadcast_ether_addr(addr))
memcpy(eth_hdr(skb)->h_dest, addr, ETH_ALEN);

View File

@@ -0,0 +1,42 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Sun, 5 May 2024 20:36:56 +0200
Subject: [PATCH] net: bridge: fix corrupted ethernet header on
multicast-to-unicast
The change from skb_copy to pskb_copy unfortunately changed the data
copying to omit the ethernet header, since it was pulled before reaching
this point. Fix this by calling __skb_push/pull around pskb_copy.
Fixes: 59c878cbcdd8 ("net: bridge: fix multicast-to-unicast with fraglist GSO")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -258,6 +258,7 @@ static void maybe_deliver_addr(struct ne
{
struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
const unsigned char *src = eth_hdr(skb)->h_source;
+ struct sk_buff *nskb;
if (!should_deliver(p, skb))
return;
@@ -266,12 +267,16 @@ static void maybe_deliver_addr(struct ne
if (skb->dev == p->dev && ether_addr_equal(src, addr))
return;
- skb = pskb_copy(skb, GFP_ATOMIC);
- if (!skb) {
+ __skb_push(skb, ETH_HLEN);
+ nskb = pskb_copy(skb, GFP_ATOMIC);
+ __skb_pull(skb, ETH_HLEN);
+ if (!nskb) {
DEV_STATS_INC(dev, tx_dropped);
return;
}
+ skb = nskb;
+ __skb_pull(skb, ETH_HLEN);
if (!is_broadcast_ether_addr(addr))
memcpy(eth_hdr(skb)->h_dest, addr, ETH_ALEN);

View File

@@ -182,10 +182,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int min_rcvbuf = SOCK_MIN_RCVBUF;
static int max_skb_frags = MAX_SKB_FRAGS;
+static int backlog_threaded;
static int min_mem_pcpu_rsv = SK_MEMORY_PCPU_RESERVE;
static int net_msg_warn; /* Unused, but still a sysctl */
@@ -188,6 +189,23 @@ static int rps_sock_flow_sysctl(struct c
@@ -189,6 +190,23 @@ static int rps_sock_flow_sysctl(struct c
}
#endif /* CONFIG_RPS */
@@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#ifdef CONFIG_NET_FLOW_LIMIT
static DEFINE_MUTEX(flow_limit_update_mutex);
@@ -532,6 +550,15 @@ static struct ctl_table net_core_table[]
@@ -541,6 +559,15 @@ static struct ctl_table net_core_table[]
.proc_handler = rps_sock_flow_sysctl
},
#endif

View File

@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -6887,6 +6887,7 @@ static int mv88e6xxx_register_switch(str
@@ -6935,6 +6935,7 @@ static int mv88e6xxx_register_switch(str
ds->ops = &mv88e6xxx_switch_ops;
ds->ageing_time_min = chip->info->age_time_coeff;
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;

View File

@@ -37,6 +37,7 @@ ipq40xx_setup_interfaces()
glinet,gl-ap1300|\
glinet,gl-b2200|\
google,wifi|\
linksys,whw03|\
linksys,whw03v2|\
luma,wrtq-329acn|\
mikrotik,cap-ac|\
@@ -215,6 +216,10 @@ ipq40xx_setup_macs()
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
lan_mac=$(macaddr_add "$wan_mac" 1)
;;
linksys,whw03)
wan_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
lan_mac="$wan_mac"
;;
mikrotik,cap-ac |\
mikrotik,hap-ac2|\
mikrotik,hap-ac3|\

View File

@@ -40,6 +40,10 @@ case "$FIRMWARE" in
# OEM assigns 4 sequential MACs
ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
;;
linksys,whw03)
caldata_extract_mmc "0:ART" 0x9000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
;;
netgear,rbr40|\
netgear,rbs40|\
netgear,rbr50|\
@@ -104,6 +108,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
;;
linksys,whw03)
caldata_extract_mmc "0:ART" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
;;
meraki,mr33 |\
meraki,mr74)
caldata_extract_ubi "ART" 0x1000 0x2f20
@@ -200,6 +208,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
;;
linksys,whw03)
caldata_extract_mmc "0:ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
;;
meraki,mr33 |\
meraki,mr74)
caldata_extract_ubi "ART" 0x5000 0x2f20

View File

@@ -2,6 +2,35 @@
START=99
mmc_resetbc() {
local part_label="$1"
. /lib/functions.sh
local part_device="$(find_mmc_part "$part_label")"
if [ "$part_device" = "" ]; then
>&2 echo "mmc_resetbc: Unknown partition label: $part_label"
return 1
fi
local magic_number="$(hexdump -e '"0x%02x\n"' -n 4 "$part_device")"
if [ "$magic_number" != "0x20110811" ]; then
>&2 echo "mmc_resetbc: Unexpected partition magic: $magic_number"
return 1
fi
local last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
if [ "$last_count" != "0x00" ]; then
printf "\x00" | dd of="$part_device" bs=4 seek=1 count=1 conv=notrunc 2>/dev/null
last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
if [ "$last_count" != "0x00" ]; then
>&2 echo "mmc_resetbc: Unable to reset boot counter"
return 1
fi
fi
}
boot() {
case $(board_name) in
alfa-network,ap120c-ac)
@@ -15,6 +44,9 @@ boot() {
linksys,whw03v2)
mtd resetbc s_env || true
;;
linksys,whw03)
mmc_resetbc s_env || true
;;
netgear,wac510)
fw_setenv boot_cnt=0
;;

View File

@@ -30,6 +30,12 @@ preinit_set_mac_address() {
ip link set dev lan1 address $(macaddr_add "$base_mac" 1)
ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7)
;;
linksys,whw03)
base_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
ip link set dev eth0 address "$base_mac"
ip link set dev lan address "$base_mac"
ip link set dev wan address "$base_mac"
;;
mikrotik,wap-ac|\
mikrotik,wap-ac-lte|\
mikrotik,wap-r-ac)

View File

@@ -123,3 +123,71 @@ platform_do_upgrade_linksys() {
get_image "$1" | mtd -e "$part_label" write - "$part_label"
}
}
linksys_get_cmdline_rootfs_device() {
if read cmdline < /proc/cmdline; then
case "$cmdline" in
*root=*)
local str="${cmdline##*root=}"
echo "${str%% *}"
return
;;
esac
fi
return 1
}
linksys_get_current_boot_part_emmc() {
local boot_part="$(fw_printenv -n boot_part)"
if [ "$boot_part" = 1 ] || [ "$boot_part" = 2 ]; then
v "Current boot_part=$boot_part selected from bootloader environment"
else
local rootfs_device="$(linksys_get_cmdline_rootfs_device)"
if [ "$rootfs_device" = "$(find_mmc_part "rootfs")" ]; then
boot_part=1
elif [ "$rootfs_device" = "$(find_mmc_part "alt_rootfs")" ]; then
boot_part=2
else
v "Could not determine current boot_part"
return 1
fi
v "Current boot_part=$boot_part selected from cmdline rootfs=$rootfs_device"
fi
echo $boot_part
}
linksys_set_target_partitions_emmc() {
local current_boot_part="$1"
if [ "$current_boot_part" = 1 ]; then
CI_KERNPART="alt_kernel"
CI_ROOTPART="alt_rootfs"
fw_setenv -s - <<-EOF
boot_part 2
auto_recovery yes
EOF
elif [ "$current_boot_part" = 2 ]; then
CI_KERNPART="kernel"
CI_ROOTPART="rootfs"
fw_setenv -s - <<-EOF
boot_part 1
auto_recovery yes
EOF
else
v "Could not set target eMMC partitions"
return 1
fi
v "Target eMMC partitions: $CI_KERNPART, $CI_ROOTPART"
}
platform_do_upgrade_linksys_emmc() {
local file="$1"
mkdir -p /var/lock
local current_boot_part="$(linksys_get_current_boot_part_emmc)"
linksys_set_target_partitions_emmc "$current_boot_part" || exit 1
touch /var/lock/fw_printenv.lock
emmc_do_upgrade "$file"
}

View File

@@ -175,6 +175,9 @@ platform_do_upgrade() {
linksys,whw03v2)
platform_do_upgrade_linksys "$1"
;;
linksys,whw03)
platform_do_upgrade_linksys_emmc "$1"
;;
meraki,mr33 |\
meraki,mr74)
CI_KERNPART="part.safe"
@@ -236,7 +239,8 @@ platform_do_upgrade() {
platform_copy_config() {
case "$(board_name)" in
glinet,gl-b2200 |\
google,wifi)
google,wifi |\
linksys,whw03)
emmc_copy_config
;;
esac

View File

@@ -0,0 +1,71 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4019-whw03.dtsi"
/ {
model = "Linksys WHW03 (Velop)";
compatible = "linksys,whw03", "qcom,ipq4019";
// Default bootargs include rootfstype=ext4 and need to be overriden.
chosen {
bootargs-append = " rootfstype=squashfs";
};
};
&tlmm {
sd_pins: sd-pinmux {
pins = "gpio23", "gpio24", "gpio25", "gpio26",
"gpio27", "gpio28", "gpio29", "gpio30",
"gpio31", "gpio32";
function = "sdio";
};
i2c_0_pins: i2c-0-pinmux {
pins = "gpio58", "gpio59";
function = "blsp_i2c0";
bias-disable;
};
spi_0_pins: spi-0-pinmux {
pins = "gpio12", "gpio13", "gpio14", "gpio15";
function = "blsp_spi0";
bias-disable;
};
};
&mdio {
status = "okay";
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
};
&vqmmc {
status = "okay";
};
&sdhci {
status = "okay";
pinctrl-0 = <&sd_pins>;
pinctrl-names = "default";
cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
sd-ldo-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
vqmmc-supply = <&vqmmc>;
};
&wifi0 {
qcom,ath10k-calibration-variant = "linksys-whw03";
};
&wifi1 {
qcom,ath10k-calibration-variant = "linksys-whw03";
};
&wifi2 {
reg = <0x00000000 0 0 0 0>;
qcom,ath10k-calibration-variant = "linksys-whw03";
};

View File

@@ -0,0 +1,293 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
led-boot = &led_blue;
led-failsafe = &led_red;
led-running = &led_blue;
led-upgrade = &led_red;
};
soc {
ess-tcsr@1953000 {
compatible = "qcom,tcsr";
reg = <0x1953000 0x1000>;
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
};
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
};
tcsr@194b000 {
compatible = "qcom,tcsr";
reg = <0x194b000 0x100>;
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
};
tcsr@1957000 {
compatible = "qcom,tcsr";
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&tlmm {
mdio_pins: mdio-pinmux {
mux-1 {
pins = "gpio6";
function = "mdio";
bias-pull-up;
};
mux-2 {
pins = "gpio7";
function = "mdc";
bias-pull-up;
};
};
serial_0_pins: serial0-pinmux {
pins = "gpio16", "gpio17";
function = "blsp_uart0";
bias-disable;
};
serial_1_pins: serial1-pinmux {
pins = "gpio8", "gpio9", "gpio10", "gpio11";
function = "blsp_uart1";
bias-disable;
};
spi_1_pins: spi-1-pinmux {
mux-1 {
pins = "gpio44", "gpio46", "gpio47";
function = "blsp_spi1";
bias-disable;
};
mux-2 {
pins = "gpio45", "gpio49";
function = "gpio";
bias-pull-up;
output-high;
};
host-interrupt {
pins = "gpio42";
function = "gpio";
input;
};
};
wifi_0_pins: wifi0-pinmux {
pins = "gpio52";
function = "gpio";
drive-strength = <6>;
bias-pull-up;
output-high;
};
zigbee-0 {
gpio-hog;
gpios = <29 GPIO_ACTIVE_HIGH>;
bias-disable;
output-low;
};
zigbee-1 {
gpio-hog;
gpios = <50 GPIO_ACTIVE_HIGH>;
bias-disable;
input;
};
bluetooth-enable {
gpio-hog;
gpios = <32 GPIO_ACTIVE_HIGH>;
output-high;
};
};
&ethphy0 {
status = "disabled";
};
&ethphy1 {
status = "disabled";
};
&ethphy2 {
status = "disabled";
};
&watchdog {
status = "okay";
};
&prng {
status = "okay";
};
&blsp_dma {
status = "okay";
};
&cryptobam {
status = "okay";
num-channels = <4>;
qcom,num-ees = <2>;
};
&crypto {
status = "okay";
};
&blsp1_uart1 {
status = "okay";
pinctrl-0 = <&serial_0_pins>;
pinctrl-names = "default";
};
&blsp1_uart2 {
status = "okay";
pinctrl-0 = <&serial_1_pins>;
pinctrl-names = "default";
bluetooth {
compatible = "csr,8811";
enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
};
};
&blsp1_spi2 {
status = "okay";
pinctrl-0 = <&spi_1_pins>;
pinctrl-names = "default";
cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
zigbee@0 {
compatible = "silabs,em3581";
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <12000000>;
};
};
&blsp1_i2c3 {
status = "okay";
pinctrl-0 = <&i2c_0_pins>;
pinctrl-names = "default";
// RGB LEDs
pca9633: led-controller@62 {
compatible = "nxp,pca9633";
nxp,hw-blink;
reg = <0x62>;
#address-cells = <1>;
#size-cells = <0>;
led_red: red@0 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_INDICATOR;
reg = <0>;
};
led_green: green@1 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
reg = <1>;
};
led_blue: blue@2 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_INDICATOR;
reg = <2>;
};
};
};
&pcie0 {
status = "okay";
perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
clkreq-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi2: wifi@1,0 {
compatible = "qcom,ath10k";
};
};
};
&qpic_bam {
status = "okay";
};
&gmac {
status = "okay";
};
&switch {
status = "okay";
};
&swport4 {
status = "okay";
label = "lan";
};
&swport5 {
status = "okay";
label = "wan";
};
&wifi0 {
status = "okay";
pinctrl-0 = <&wifi_0_pins>;
pinctrl-names = "default";
qcom,coexist-support = <1>;
qcom,coexist-gpio-pin = <52>;
};
&wifi1 {
status = "okay";
ieee80211-freq-limit = <5170000 5330000>;
};
&wifi2 {
status = "okay";
ieee80211-freq-limit = <5490000 5835000>;
};

View File

@@ -1,112 +1,29 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h>
#include <dt-bindings/leds/common.h>
#include "qcom-ipq4019-whw03.dtsi"
/ {
model = "Linksys WHW03 V2 (Velop)";
compatible = "linksys,whw03v2", "qcom,ipq4019";
aliases {
led-boot = &led_blue;
led-failsafe = &led_red;
led-running = &led_blue;
led-upgrade = &led_red;
};
// The arguments rootfstype and ro are needed
// to override the default bootargs
// Default bootargs include rootfstype=ext4 and need to be overriden.
chosen {
bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
stdout-path = &blsp1_uart1;
};
soc {
ess-tcsr@1953000 {
compatible = "qcom,tcsr";
reg = <0x1953000 0x1000>;
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
};
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
};
tcsr@194b000 {
compatible = "qcom,tcsr";
reg = <0x194b000 0x100>;
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
};
tcsr@1957000 {
compatible = "qcom,tcsr";
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&tlmm {
mdio_pins: mdio-pinmux {
mux-1 {
pins = "gpio6";
function = "mdio";
bias-pull-up;
};
mux-2 {
pins = "gpio7";
function = "mdc";
bias-pull-up;
};
};
i2c_0_pins: i2c-0-pinmux {
mux {
function = "blsp_i2c0";
pins = "gpio20", "gpio21";
bias-disable;
};
};
serial_0_pins: serial0-pinmux {
mux {
pins = "gpio16", "gpio17";
function = "blsp_uart0";
bias-disable;
};
};
serial_1_pins: serial1-pinmux {
mux {
pins = "gpio8", "gpio9", "gpio10", "gpio11";
function = "blsp_uart1";
bias-disable;
};
pins = "gpio20", "gpio21";
function = "blsp_i2c0";
bias-disable;
};
spi_0_pins: spi-0-pinmux {
mux {
function = "blsp_spi0";
pins = "gpio13", "gpio14", "gpio15";
function = "blsp_spi0";
drive-strength = <12>;
bias-disable;
};
@@ -118,55 +35,13 @@
output-high;
};
};
};
spi_1_pins: spi-1-pinmux {
mux-1 {
function = "blsp_spi1";
pins = "gpio44", "gpio46","gpio47";
bias-disable;
};
mux-2 {
pins = "gpio31", "gpio45", "gpio49";
function = "gpio";
bias-pull-up;
output-high;
};
host-interrupt {
pins = "gpio42";
function = "gpio";
input;
};
};
wifi_0_pins: wifi0-pinmux {
btcoexist {
bias-pull-up;
drive-strength = <6>;
function = "gpio";
output-high;
pins = "gpio52";
};
};
zigbee-0 {
gpio-hog;
gpios = <29 GPIO_ACTIVE_HIGH>;
bias-disable;
output-low;
};
zigbee-1 {
gpio-hog;
gpios = <50 GPIO_ACTIVE_HIGH>;
bias-disable;
input;
};
bluetooth-enable {
gpio-hog;
gpios = <32 GPIO_ACTIVE_HIGH>;
&spi_1_pins {
mux-wake {
pins = "gpio31";
function = "gpio";
bias-pull-up;
output-high;
};
};
@@ -175,21 +50,10 @@
status = "okay";
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
phy-reset-gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
};
&ethphy0 {
status = "disabled";
};
&ethphy1 {
status = "disabled";
};
&ethphy2 {
status = "disabled";
};
&ethphy3 {
reg = <0x1b>;
};
@@ -202,98 +66,6 @@
reg = <0x1d>;
};
&watchdog {
status = "okay";
};
&prng {
status = "okay";
};
&blsp_dma {
status = "okay";
};
&cryptobam {
num-channels = <4>;
qcom,num-ees = <2>;
status = "okay";
};
&crypto {
status = "okay";
};
&blsp1_uart1 {
status = "okay";
pinctrl-0 = <&serial_0_pins>;
pinctrl-names = "default";
};
&blsp1_uart2 {
status = "okay";
pinctrl-0 = <&serial_1_pins>;
pinctrl-names = "default";
bluetooth {
compatible = "csr,8811";
enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
};
};
&blsp1_spi2 {
pinctrl-0 = <&spi_1_pins>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
zigbee@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "silabs,em3581";
reg = <0>;
spi-max-frequency = <12000000>;
};
};
&blsp1_i2c3 {
pinctrl-0 = <&i2c_0_pins>;
pinctrl-names = "default";
status = "okay";
// RGB LEDs
pca9633: led-controller@62 {
compatible = "nxp,pca9633";
nxp,hw-blink;
reg = <0x62>;
#address-cells = <1>;
#size-cells = <0>;
led_red: red@0 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_INDICATOR;
reg = <0>;
};
led_green: green@1 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
reg = <1>;
};
led_blue: blue@2 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_INDICATOR;
reg = <2>;
};
};
};
&usb3_ss_phy {
status = "okay";
};
@@ -430,63 +202,17 @@
};
};
&pcie0 {
status = "okay";
perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
clkreq-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi2: wifi@1,0 {
compatible = "qcom,ath10k";
reg = <0x00010000 0 0 0 0>;
};
};
};
&qpic_bam {
status = "okay";
};
&gmac {
status = "okay";
};
&switch {
status = "okay";
};
&swport4 {
status = "okay";
label = "lan";
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_gmac1>;
};
&swport5 {
status = "okay";
label = "wan";
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_gmac0 0>;
};
&wifi0 {
pinctrl-0 = <&wifi_0_pins>;
pinctrl-names = "default";
status = "okay";
qcom,coexist-support = <1>;
qcom,coexist-gpio-pin = <0x34>;
qcom,ath10k-calibration-variant = "linksys-whw03v2";
nvmem-cell-names = "pre-calibration", "mac-address";
@@ -494,9 +220,6 @@
};
&wifi1 {
status = "okay";
ieee80211-freq-limit = <5170000 5330000>;
qcom,ath10k-calibration-variant = "linksys-whw03v2";
nvmem-cell-names = "pre-calibration", "mac-address";
@@ -504,9 +227,8 @@
};
&wifi2 {
status = "okay";
reg = <0x00010000 0 0 0 0>;
ieee80211-freq-limit = <5490000 5835000>;
qcom,ath10k-calibration-variant = "linksys-whw03v2";
nvmem-cell-names = "pre-calibration", "mac-address";

View File

@@ -723,6 +723,20 @@ define Device/linksys_mr8300
endef
TARGET_DEVICES += linksys_mr8300
define Device/linksys_whw03
$(call Device/FitzImage)
DEVICE_VENDOR := Linksys
DEVICE_MODEL := WHW03
SOC := qcom-ipq4019
KERNEL_SIZE := 8192k
IMAGE_SIZE := 131072k
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | linksys-image type=WHW03
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-bluetooth \
kmod-fs-ext4 e2fsprogs kmod-fs-f2fs mkf2fs losetup
endef
TARGET_DEVICES += linksys_whw03
define Device/linksys_whw03v2
$(call Device/FitzImage)
DEVICE_VENDOR := Linksys

View File

@@ -1,46 +0,0 @@
From 9732c4f2d93a4a39ffc903c88ab7d531a8bb2e74 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Wed, 20 Mar 2024 00:47:58 +0100
Subject: [PATCH] mtd: rawnand: qcom: Fix broken misc_cmd_type in exec_op
misc_cmd_type in exec_op have multiple problems. With commit a82990c8a409
("mtd: rawnand: qcom: Add read/read_start ops in exec_op path") it was
reworked and generalized but actually dropped the handling of the
RESET_DEVICE command.
Also additional logic was added without clear explaination causing the
erase command to be broken on testing it on a ipq806x nandc.
Add some additional logic to restore RESET_DEVICE command handling and
fix erase command.
Fixes: a82990c8a409 ("mtd: rawnand: qcom: Add read/read_start ops in exec_op path")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/mtd/nand/raw/qcom_nandc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/mtd/nand/raw/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
@@ -2815,7 +2815,7 @@ static int qcom_misc_cmd_type_exec(struc
host->cfg0_raw & ~(7 << CW_PER_PAGE));
nandc_set_reg(chip, NAND_DEV0_CFG1, host->cfg1_raw);
instrs = 3;
- } else {
+ } else if (q_op.cmd_reg != OP_RESET_DEVICE) {
return 0;
}
@@ -2830,9 +2830,8 @@ static int qcom_misc_cmd_type_exec(struc
nandc_set_reg(chip, NAND_EXEC_CMD, 1);
write_reg_dma(nandc, NAND_FLASH_CMD, instrs, NAND_BAM_NEXT_SGL);
- (q_op.cmd_reg == OP_BLOCK_ERASE) ? write_reg_dma(nandc, NAND_DEV0_CFG0,
- 2, NAND_BAM_NEXT_SGL) : read_reg_dma(nandc,
- NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
+ if (q_op.cmd_reg == OP_BLOCK_ERASE)
+ write_reg_dma(nandc, NAND_DEV0_CFG0, 2, NAND_BAM_NEXT_SGL);
write_reg_dma(nandc, NAND_EXEC_CMD, 1, NAND_BAM_NEXT_SGL);
read_reg_dma(nandc, NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);

View File

@@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -578,6 +578,7 @@
@@ -575,6 +575,7 @@
compatible = "mediatek,mt7622-nor",
"mediatek,mt8173-nor";
reg = <0 0x11014000 0 0xe0>;

View File

@@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -347,7 +347,7 @@
@@ -345,7 +345,7 @@
#interrupt-cells = <3>;
interrupt-parent = <&gic>;
reg = <0 0x10310000 0 0x1000>,

View File

@@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -849,6 +849,12 @@
@@ -844,6 +844,12 @@
#address-cells = <0>;
#interrupt-cells = <1>;
};
@@ -13,7 +13,7 @@
};
pcie1: pcie@1a145000 {
@@ -887,6 +893,12 @@
@@ -882,6 +888,12 @@
#address-cells = <0>;
#interrupt-cells = <1>;
};

View File

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -837,6 +837,9 @@
@@ -832,6 +832,9 @@
bus-range = <0x00 0xff>;
ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>;
status = "disabled";
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
@@ -881,6 +884,9 @@
@@ -876,6 +879,9 @@
bus-range = <0x00 0xff>;
ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>;
status = "disabled";

View File

@@ -9,8 +9,8 @@ Subject: [PATCH] arm64: dts: mt7986: add afe
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -248,6 +248,28 @@
status = "disabled";
@@ -202,6 +202,28 @@
#interrupt-cells = <2>;
};
+ afe: audio-controller@11210000 {

View File

@@ -23,8 +23,8 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
-
};
timer {
@@ -543,10 +537,11 @@
soc {
@@ -532,10 +526,11 @@
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
@@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
};
wed1: wed@15011000 {
@@ -556,10 +551,11 @@
@@ -545,10 +540,11 @@
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>,
@@ -51,8 +51,8 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+ mediatek,wo-cpuboot = <&wo_cpuboot>;
};
wo_ccif0: syscon@151a5000 {
@@ -576,6 +572,11 @@
eth: ethernet@15100000 {
@@ -606,6 +602,11 @@
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
};
@@ -61,6 +61,6 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+ reg = <0 0x15194000 0 0x1000>;
+ };
+
eth: ethernet@15100000 {
compatible = "mediatek,mt7986-eth";
reg = <0 0x15100000 0 0x80000>;
wifi: wifi@18000000 {
compatible = "mediatek,mt7986-wmac";
reg = <0 0x18000000 0 0x1000000>,

View File

@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
wo_data: wo-data@4fd80000 {
reg = <0 0x4fd80000 0 0x240000>;
no-map;
@@ -536,11 +526,10 @@
@@ -525,11 +515,10 @@
reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>;
};
@@ -550,11 +539,10 @@
@@ -539,11 +528,10 @@
reg = <0 0x15011000 0 0x1000>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@@ -64,7 +64,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>;
};
@@ -572,6 +560,16 @@
@@ -602,6 +590,16 @@
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
};

View File

@@ -33,8 +33,8 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
- };
};
timer {
@@ -526,10 +516,11 @@
soc {
@@ -515,10 +505,11 @@
reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>;
};
@@ -539,10 +530,11 @@
@@ -528,10 +519,11 @@
reg = <0 0x15011000 0 0x1000>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>;
};
@@ -570,6 +562,16 @@
@@ -600,6 +592,16 @@
reg = <0 0x151f0000 0 0x8000>;
};

View File

@@ -396,7 +396,6 @@ CONFIG_MDIO_BUS_MUX_MMIOREG=y
CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_DEVRES=y
CONFIG_MEDIATEK_GE_PHY=y
CONFIG_MEMFD_CREATE=y
CONFIG_MEMORY_ISOLATION=y
CONFIG_MFD_CORE=y
# CONFIG_MFD_KHADAS_MCU is not set

View File

@@ -1,33 +0,0 @@
From 433d54818f64a2fe0562f8c04c7a81f562368515 Mon Sep 17 00:00:00 2001
From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Date: Tue, 5 Mar 2024 15:32:18 +0100
Subject: [PATCH] arm64: dts: rockchip: regulator for sd needs to be always on
for BPI-R2Pro
With default dts configuration for BPI-R2Pro, the regulator for sd card is
powered off when reboot is commanded, and the only solution to detect the
sd card again, and therefore, allow rebooting from there, is to do a
hardware reset.
Configure the regulator for sd to be always on for BPI-R2Pro in order to
avoid this issue.
Fixes: f901aaadaa2a ("arm64: dts: rockchip: Add Bananapi R2 Pro")
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Link: https://lore.kernel.org/r/20240305143222.189413-1-jtornosm@redhat.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
@@ -412,6 +412,8 @@
vccio_sd: LDO_REG5 {
regulator-name = "vccio_sd";
+ regulator-always-on;
+ regulator-boot-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;

View File

@@ -1,40 +0,0 @@
From a2ac2a1b02590a22a236c43c455f421cdede45f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
Date: Thu, 14 Mar 2024 15:24:35 +0300
Subject: [PATCH] arm64: dts: rockchip: set PHY address of MT7531 switch to
0x1f
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The MT7531 switch listens on PHY address 0x1f on an MDIO bus. I've got two
findings that support this. There's no bootstrapping option to change the
PHY address of the switch. The Linux driver hardcodes 0x1f as the PHY
address of the switch. So the reg property on the device tree is currently
ignored by the Linux driver.
Therefore, describe the correct PHY address on Banana Pi BPI-R2 Pro that
has this switch.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Fixes: c1804463e5c6 ("arm64: dts: rockchip: Add mt7531 dsa node to BPI-R2-Pro board")
Link: https://lore.kernel.org/r/20240314-for-rockchip-mt7531-phy-address-v1-1-743b5873358f@arinc9.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
@@ -521,9 +521,9 @@
#address-cells = <1>;
#size-cells = <0>;
- switch@0 {
+ switch@1f {
compatible = "mediatek,mt7531";
- reg = <0>;
+ reg = <0x1f>;
ports {
#address-cells = <1>;

View File

@@ -61,6 +61,7 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_MITIGATIONS=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_CYRIX_32=y
@@ -361,7 +362,6 @@ CONFIG_SG_POOL=y
CONFIG_SOFTIRQ_ON_OWN_STACK=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_SPARSE_IRQ=y
CONFIG_SPECULATION_MITIGATIONS=y
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
# CONFIG_STATIC_CALL_SELFTEST is not set
# CONFIG_STRICT_SIGALTSTACK_SIZE is not set

View File

@@ -4,6 +4,8 @@ ${STAGING_DIR_HOST}/bin/pkg-config.real \
--keep-system-cflags \
--keep-system-libs \
--define-variable=prefix="${STAGING_PREFIX}" \
--define-variable=prefix_host="${STAGING_DIR_HOST}" \
--define-variable=prefix_hostpkg="${STAGING_DIR_HOSTPKG}" \
--define-variable=exec_prefix="${STAGING_PREFIX}" \
--define-variable=bindir="${STAGING_PREFIX}/bin" \
$PKG_CONFIG_EXTRAARGS "$@"