Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-03-15 18:49:14 +08:00
commit 548267c6bd
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
44 changed files with 1485 additions and 46 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .103
LINUX_KERNEL_HASH-5.10.103 = 4fb8ad55e6430342e4fbc94d54e594e9be8eb6a8bea1d71eccf835948d08580a
LINUX_VERSION-5.10 = .104
LINUX_KERNEL_HASH-5.10.104 = 394a9267ea8e24d0f0cfaad3439bf43abe7bcf6479dc9548e485b48a0ac562f1

View File

@ -20,6 +20,9 @@ alfa-network,pi-wifi4|\
alfa-network,r36a|\
alfa-network,tube-2hq|\
allnet,all-wap02860ac|\
araknis,an-300-ap-i-n|\
araknis,an-500-ap-i-ac|\
araknis,an-700-ap-i-ac|\
arduino,yun|\
buffalo,bhr-4grv2|\
devolo,magic-2-wifi|\

View File

@ -15,6 +15,7 @@ zyxel,gs1900-8|\
zyxel,gs1900-8hp-v1|\
zyxel,gs1900-8hp-v2|\
zyxel,gs1900-10hp|\
zyxel,gs1900-24-v1|\
zyxel,gs1900-24hp-v2)
idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && \

View File

@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=5.15.8-1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.8/
PKG_HASH:=9f71b659c034f19d156532ec780fcb606cee3c4ccc42e2f8ef18dd3e9f1b6820

View File

@ -0,0 +1,39 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
Date: Fri, 11 Mar 2022 18:21:04 +0100
Subject: [PATCH] headers: fix lockdep_assert_not_held()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
LOCK_STATE_HELD define was omitted during backport of
lockdep_assert_not_held() which leads to build failures of kernels with
CONFIG_LOCKDEP=y:
backports-5.15.8-1/backport-include/linux/lockdep.h:16:47: error: 'LOCK_STATE_HELD' undeclared (first use in this function)
Fix it by adding missing LOCK_STATE_HELD define.
References: https://github.com/openwrt/openwrt/pull/9373
References: https://lore.kernel.org/backports/20220311194800.452-1-ynezz@true.cz/T/#u
Fixes: af58b27b1b1a ("headers: Add lockdep_assert_not_held()")
Reported-by: Oskari Rauta <oskari.rauta@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
backport-include/linux/lockdep.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/backport-include/linux/lockdep.h b/backport-include/linux/lockdep.h
index ed5ea67894e4..842e24b7ff8f 100644
--- a/backport-include/linux/lockdep.h
+++ b/backport-include/linux/lockdep.h
@@ -11,6 +11,9 @@ struct lockdep_map { };
#ifndef lockdep_assert_not_held
#ifdef CONFIG_LOCKDEP
+#ifndef LOCK_STATE_HELD
+#define LOCK_STATE_HELD 1
+#endif /* LOCK_STATE_HELD */
#define lockdep_assert_not_held(l) do { \
WARN_ON(debug_locks && \
lockdep_is_held(l) == LOCK_STATE_HELD); \

View File

@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-02-15
PKG_SOURCE_VERSION:=c67df0d3130a51d79b558f0329c2ca289c73b16e
PKG_MIRROR_HASH:=57526f62adc1c1cc2c594ff23b883314ad83df8cdfab54c9e3503a8ec4c3a33f
PKG_SOURCE_DATE:=2022-03-15
PKG_SOURCE_VERSION:=053668acdaf83d0350ce3e21720e20eac9fbbcd7
PKG_MIRROR_HASH:=0102bc20ec385fcdb336dec97a1a345d4c37c2c6be2f3f428938c2ec1fa5d49a
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0
@ -234,9 +234,17 @@ define KernelPackage/mt7921-common
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko
endef
define KernelPackage/mt7921u
$(KernelPackage/mt76-default)
TITLE:=MediaTek MT7921U wireless driver
DEPENDS+=+kmod-mt76-usb +kmod-mt7921-common
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921u.ko
AUTOLOAD:=$(call AutoProbe,mt7921u)
endef
define KernelPackage/mt7921s
$(KernelPackage/mt76-default)
TITLE:=MediaTek MT7921s wireless driver
TITLE:=MediaTek MT7921S wireless driver
DEPENDS+=+kmod-mt76-sdio +kmod-mt7921-common
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921s.ko
AUTOLOAD:=$(call AutoProbe,mt7921s)
@ -339,6 +347,9 @@ endif
ifdef CONFIG_PACKAGE_kmod-mt7921-common
PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m
endif
ifdef CONFIG_PACKAGE_kmod-mt7921u
PKG_MAKE_FLAGS += CONFIG_MT7921U=m
endif
ifdef CONFIG_PACKAGE_kmod-mt7921s
PKG_MAKE_FLAGS += CONFIG_MT7921S=m
endif
@ -475,6 +486,7 @@ $(eval $(call KernelPackage,mt7663u))
$(eval $(call KernelPackage,mt7663s))
$(eval $(call KernelPackage,mt7915e))
$(eval $(call KernelPackage,mt7921-common))
$(eval $(call KernelPackage,mt7921u))
$(eval $(call KernelPackage,mt7921s))
$(eval $(call KernelPackage,mt7921e))
$(eval $(call KernelPackage,mt76))

View File

@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ipset
PKG_VERSION:=7.15
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ipset.netfilter.org

View File

@ -0,0 +1,82 @@
From 50ef784944c60cd291970c47e4b831ff7ef9c923 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon, 28 Feb 2022 20:02:17 +0100
Subject: [PATCH] Fix IPv6 sets nftables translation
The parser assumes the set is an IPv4 ipset because IPSET_OPT_FAMILY is
not set.
# ipset-translate restore < ./ipset-mwan3_set_connected_ipv6.dump
add table inet global
add set inet global mwan3_connected_v6 { type ipv6_addr; flags interval; }
flush set inet global mwan3_connected_v6
ipset v7.15: Error in line 4: Syntax error: '64' is out of range 0-32
Remove ipset_xlate_type_get(), call ipset_xlate_set_get() instead to
obtain the set type and family.
Reported-by: Florian Eckert <fe@dev.tdt.de>
Fixes: 325af556cd3a ("add ipset to nftables translation infrastructure")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
lib/ipset.c | 24 ++++++++++--------------
tests/xlate/xlate.t | 2 ++
tests/xlate/xlate.t.nft | 2 ++
3 files changed, 14 insertions(+), 14 deletions(-)
--- a/lib/ipset.c
+++ b/lib/ipset.c
@@ -949,18 +949,6 @@ ipset_xlate_set_get(struct ipset *ipset,
return NULL;
}
-static const struct ipset_type *ipset_xlate_type_get(struct ipset *ipset,
- const char *name)
-{
- const struct ipset_xlate_set *set;
-
- set = ipset_xlate_set_get(ipset, name);
- if (!set)
- return NULL;
-
- return set->type;
-}
-
static int
ipset_parser(struct ipset *ipset, int oargc, char *oargv[])
{
@@ -1282,8 +1270,16 @@ ipset_parser(struct ipset *ipset, int oa
if (!ipset->xlate) {
type = ipset_type_get(session, cmd);
} else {
- type = ipset_xlate_type_get(ipset, arg0);
- ipset_session_data_set(session, IPSET_OPT_TYPE, type);
+ const struct ipset_xlate_set *xlate_set;
+
+ xlate_set = ipset_xlate_set_get(ipset, arg0);
+ if (xlate_set) {
+ ipset_session_data_set(session, IPSET_OPT_TYPE,
+ xlate_set->type);
+ ipset_session_data_set(session, IPSET_OPT_FAMILY,
+ &xlate_set->family);
+ type = xlate_set->type;
+ }
}
if (type == NULL)
return ipset->standard_error(ipset, p);
--- a/tests/xlate/xlate.t
+++ b/tests/xlate/xlate.t
@@ -53,3 +53,5 @@ create bp1 bitmap:port range 1-1024
add bp1 22
create bim1 bitmap:ip,mac range 1.1.1.0/24
add bim1 1.1.1.1,aa:bb:cc:dd:ee:ff
+create hn6 hash:net family inet6
+add hn6 fe80::/64
--- a/tests/xlate/xlate.t.nft
+++ b/tests/xlate/xlate.t.nft
@@ -54,3 +54,5 @@ add set inet global bp1 { type inet_serv
add element inet global bp1 { 22 }
add set inet global bim1 { type ipv4_addr . ether_addr; }
add element inet global bim1 { 1.1.1.1 . aa:bb:cc:dd:ee:ff }
+add set inet global hn6 { type ipv6_addr; flags interval; }
+add element inet global hn6 { fe80::/64 }

View File

@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=iptables
PKG_VERSION:=1.8.7
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE_URL:=https://netfilter.org/projects/iptables/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2

View File

@ -0,0 +1,68 @@
From e727ccad036e2cdba3339536c65c7ceef43c0740 Mon Sep 17 00:00:00 2001
From: Erik Wilson <erik.e.wilson@gmail.com>
Date: Tue, 13 Jul 2021 16:48:23 -0700
Subject: [PATCH] xtables: Call init_extensions6() for static builds
Initialize extensions from libext6 for cases where xtables is built statically.
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1550
Signed-off-by: Erik Wilson <Erik.E.Wilson@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
iptables/xtables-monitor.c | 1 +
iptables/xtables-restore.c | 1 +
iptables/xtables-save.c | 1 +
iptables/xtables-standalone.c | 1 +
iptables/xtables-translate.c | 1 +
5 files changed, 5 insertions(+)
--- a/iptables/xtables-monitor.c
+++ b/iptables/xtables-monitor.c
@@ -628,6 +628,7 @@ int xtables_monitor_main(int argc, char
#if defined(ALL_INCLUSIVE) || defined(NO_SHARED_LIBS)
init_extensions();
init_extensions4();
+ init_extensions6();
#endif
if (nft_init(&h, AF_INET, xtables_ipv4)) {
--- a/iptables/xtables-restore.c
+++ b/iptables/xtables-restore.c
@@ -364,6 +364,7 @@ xtables_restore_main(int family, const c
#if defined(ALL_INCLUSIVE) || defined(NO_SHARED_LIBS)
init_extensions();
init_extensions4();
+ init_extensions6();
#endif
break;
case NFPROTO_ARP:
--- a/iptables/xtables-save.c
+++ b/iptables/xtables-save.c
@@ -202,6 +202,7 @@ xtables_save_main(int family, int argc,
#if defined(ALL_INCLUSIVE) || defined(NO_SHARED_LIBS)
init_extensions();
init_extensions4();
+ init_extensions6();
#endif
tables = xtables_ipv4;
d.commit = true;
--- a/iptables/xtables-standalone.c
+++ b/iptables/xtables-standalone.c
@@ -57,6 +57,7 @@ xtables_main(int family, const char *pro
#if defined(ALL_INCLUSIVE) || defined(NO_SHARED_LIBS)
init_extensions();
init_extensions4();
+ init_extensions6();
#endif
if (nft_init(&h, family, xtables_ipv4) < 0) {
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -469,6 +469,7 @@ static int xtables_xlate_main_common(str
#if defined(ALL_INCLUSIVE) || defined(NO_SHARED_LIBS)
init_extensions();
init_extensions4();
+ init_extensions6();
#endif
tables = xtables_ipv4;
break;

View File

@ -0,0 +1,120 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ar9344.dtsi"
#include "ar934x_senao_loader.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "araknis,an-300-ap-i-n", "qca,ar9344";
model = "Araknis AN-300-AP-I-N";
aliases {
label-mac-device = &eth0;
led-boot = &led_power;
led-failsafe = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "amber:power";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wifi5g {
label = "blue:wifi5g";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wps {
label = "blue:wps";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
};
ath9k-leds {
compatible = "gpio-leds";
wifi2g {
label = "blue:wifi2g";
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
&mdio0 {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
eee-broken-100tx;
eee-broken-1000t;
};
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
phy-handle = <&phy0>;
phy-mode = "rgmii-txid";
pll-data = <0x02000000 0x00000101 0x00001313>;
};
&pcie {
status = "okay";
ath9k: wifi@0,0,0 {
compatible = "pci168c,0030";
reg = <0x0 0 0 0 0>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
qca,disable-5ghz;
qca,no-eeprom;
#gpio-cells = <2>;
gpio-controller;
};
};
&wmac {
status = "okay";
qca,disable-2ghz;
mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
};

View File

@ -32,12 +32,14 @@
compatible = "gpio-leds";
led_power_amber: power-amber {
label = "amber:power";
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_POWER;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_power_green: power-green {
label = "green:power";
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;

View File

@ -0,0 +1,105 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca955x_senao_loader.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "araknis,an-500-ap-i-ac", "qca,qca9557";
model = "Araknis AN-500-AP-I-AC";
aliases {
label-mac-device = &eth0;
led-boot = &led_power;
led-failsafe = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "amber:power";
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wifi2g {
label = "blue:wifi2g";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wifi5g {
label = "blue:wifi5g";
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wps {
label = "blue:wps";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
};
};
&partitions {
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
&mdio0 {
status = "okay";
phy5: ethernet-phy@5 {
reg = <5>;
eee-broken-100tx;
eee-broken-1000t;
};
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
phy-handle = <&phy5>;
phy-mode = "rgmii-id";
pll-data = <0x82000000 0x80000101 0x80001313>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
};

View File

@ -0,0 +1,104 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca955x_senao_loader.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "araknis,an-700-ap-i-ac", "qca,qca9558";
model = "Araknis AN-700-AP-I-AC";
aliases {
label-mac-device = &eth0;
led-boot = &led_power;
led-failsafe = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "amber:power";
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wifi2g {
label = "blue:wifi2g";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wifi5g {
label = "blue:wifi5g";
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wps {
label = "blue:wps";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
};
};
&partitions {
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
&mdio0 {
status = "okay";
phy5: ethernet-phy@5 {
reg = <5>;
eee-broken-100tx;
eee-broken-1000t;
};
};
&eth0 {
status = "okay";
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
phy-handle = <&phy5>;
phy-mode = "rgmii-id";
pll-data = <0x82000000 0x80000101 0x80001313>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
&art {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
};

View File

@ -14,6 +14,9 @@ ath79_setup_interfaces()
alfa-network,ap121f|\
alfa-network,pi-wifi4|\
alfa-network,tube-2hq|\
araknis,an-300-ap-i-n|\
araknis,an-500-ap-i-ac|\
araknis,an-700-ap-i-ac|\
arduino,yun|\
aruba,ap-105|\
asus,rp-ac66|\

View File

@ -72,6 +72,7 @@ case "$FIRMWARE" in
;;
"ath9k-eeprom-pci-0000:00:00.0.bin")
case $board in
araknis,an-300-ap-i-n|\
atheros,db120|\
engenius,eap600|\
engenius,ecb600|\

View File

@ -11,6 +11,8 @@ case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin")
case $board in
allnet,all-wap02860ac|\
araknis,an-500-ap-i-ac|\
araknis,an-700-ap-i-ac|\
engenius,eap1200h|\
engenius,enstationac-v1|\
glinet,gl-x750)

View File

@ -48,6 +48,9 @@ platform_do_upgrade() {
redboot_fis_do_upgrade "$1" vmlinux_2
;;
allnet,all-wap02860ac|\
araknis,an-300-ap-i-n|\
araknis,an-500-ap-i-ac|\
araknis,an-700-ap-i-ac|\
engenius,eap1200h|\
engenius,eap300-v2|\
engenius,eap600|\

View File

@ -1,6 +1,6 @@
DEVICE_VARS += SENAO_IMGNAME
# This needs to make /tmp/_sys/sysupgrade.tgz an empty file prior to
# This needs to make OEM config archive 'sysupgrade.tgz' an empty file prior to OEM
# sysupgrade, as otherwise it will implant the old configuration from
# OEM firmware when writing rootfs from factory.bin
# rootfs size and checksum is taken from a squashfs header
@ -9,7 +9,9 @@ define Build/senao-tar-gz
-[ -f "$@" ] && \
mkdir -p $@.tmp && \
touch $@.tmp/failsafe.bin && \
touch $@.tmp/FWINFO-$(word 1,$(1))-$(REVISION) && \
echo '#!/bin/sh' > $@.tmp/before-upgrade.sh && \
echo ': > /tmp/sysupgrade.tgz' >> $@.tmp/before-upgrade.sh && \
echo ': > /tmp/_sys/sysupgrade.tgz' >> $@.tmp/before-upgrade.sh && \
echo -n $$(( $$(cat $@ | wc -c) / 4096 * 4096 )) > $@.len && \
dd if=$@ bs=$$(cat $@.len) count=1 | md5sum - | cut -d ' ' -f 1 > $@.md5 && \

View File

@ -319,6 +319,41 @@ define Device/allnet_all-wap02860ac
endef
TARGET_DEVICES += allnet_all-wap02860ac
define Device/araknis_an-300-ap-i-n
$(Device/senao_loader_okli)
SOC := ar9344
DEVICE_VENDOR := Araknis
DEVICE_MODEL := AN-300-AP-I-N
IMAGE_SIZE := 12096k
LOADER_FLASH_OFFS := 0x220000
SENAO_IMGNAME := senao-an300
endef
TARGET_DEVICES += araknis_an-300-ap-i-n
define Device/araknis_an-500-ap-i-ac
$(Device/senao_loader_okli)
SOC := qca9557
DEVICE_VENDOR := Araknis
DEVICE_MODEL := AN-500-AP-I-AC
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
IMAGE_SIZE := 11584k
LOADER_FLASH_OFFS := 0x220000
SENAO_IMGNAME := senao-generic-v1-an500
endef
TARGET_DEVICES += araknis_an-500-ap-i-ac
define Device/araknis_an-700-ap-i-ac
$(Device/senao_loader_okli)
SOC := qca9558
DEVICE_VENDOR := Araknis
DEVICE_MODEL := AN-700-AP-I-AC
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
IMAGE_SIZE := 11584k
LOADER_FLASH_OFFS := 0x220000
SENAO_IMGNAME := senao-generic-v1-an700
endef
TARGET_DEVICES += araknis_an-700-ap-i-ac
define Device/arduino_yun
SOC := ar9331
DEVICE_VENDOR := Arduino

View File

@ -37,7 +37,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -51,6 +51,18 @@
@@ -56,6 +56,18 @@
#define BCM2835_I2C_CDIV_MIN 0x0002
#define BCM2835_I2C_CDIV_MAX 0xFFFE
@ -56,7 +56,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
struct bcm2835_i2c_dev {
struct device *dev;
void __iomem *regs;
@@ -63,8 +75,78 @@ struct bcm2835_i2c_dev {
@@ -68,8 +80,78 @@ struct bcm2835_i2c_dev {
u32 msg_err;
u8 *msg_buf;
size_t msg_buf_remaining;
@ -135,7 +135,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
static inline void bcm2835_i2c_writel(struct bcm2835_i2c_dev *i2c_dev,
u32 reg, u32 val)
{
@@ -252,6 +334,7 @@ static void bcm2835_i2c_start_transfer(s
@@ -257,6 +339,7 @@ static void bcm2835_i2c_start_transfer(s
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_A, msg->addr);
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_DLEN, msg->len);
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C, c);
@ -143,7 +143,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
}
static void bcm2835_i2c_finish_transfer(struct bcm2835_i2c_dev *i2c_dev)
@@ -278,6 +361,7 @@ static irqreturn_t bcm2835_i2c_isr(int t
@@ -283,6 +366,7 @@ static irqreturn_t bcm2835_i2c_isr(int t
u32 val, err;
val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S);
@ -151,7 +151,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
err = val & (BCM2835_I2C_S_CLKT | BCM2835_I2C_S_ERR);
if (err) {
@@ -344,6 +428,13 @@ static int bcm2835_i2c_xfer(struct i2c_a
@@ -349,6 +433,13 @@ static int bcm2835_i2c_xfer(struct i2c_a
unsigned long time_left;
int i;
@ -165,7 +165,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
for (i = 0; i < (num - 1); i++)
if (msgs[i].flags & I2C_M_RD) {
dev_warn_once(i2c_dev->dev,
@@ -362,6 +453,10 @@ static int bcm2835_i2c_xfer(struct i2c_a
@@ -367,6 +458,10 @@ static int bcm2835_i2c_xfer(struct i2c_a
bcm2835_i2c_finish_transfer(i2c_dev);
@ -176,7 +176,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
if (!time_left) {
bcm2835_i2c_writel(i2c_dev, BCM2835_I2C_C,
BCM2835_I2C_C_CLEAR);
@@ -372,7 +467,9 @@ static int bcm2835_i2c_xfer(struct i2c_a
@@ -377,7 +472,9 @@ static int bcm2835_i2c_xfer(struct i2c_a
if (!i2c_dev->msg_err)
return num;

View File

@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/i2c/busses/i2c-bcm2835.c
+++ b/drivers/i2c/busses/i2c-bcm2835.c
@@ -188,6 +188,7 @@ static int clk_bcm2835_i2c_set_rate(stru
@@ -193,6 +193,7 @@ static int clk_bcm2835_i2c_set_rate(stru
{
struct clk_bcm2835_i2c *div = to_clk_bcm2835_i2c(hw);
u32 redl, fedl;
@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
u32 divider = clk_bcm2835_i2c_calc_divider(rate, parent_rate);
if (divider == -EINVAL)
@@ -211,6 +212,17 @@ static int clk_bcm2835_i2c_set_rate(stru
@@ -216,6 +217,17 @@ static int clk_bcm2835_i2c_set_rate(stru
bcm2835_i2c_writel(div->i2c_dev, BCM2835_I2C_DEL,
(fedl << BCM2835_I2C_FEDL_SHIFT) |
(redl << BCM2835_I2C_REDL_SHIFT));

View File

@ -30,9 +30,9 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
--- a/drivers/mtd/parsers/parser_trx.c
+++ b/drivers/mtd/parsers/parser_trx.c
@@ -85,6 +85,10 @@ static int parser_trx_parse(struct mtd_i
uint8_t curr_part = 0, i = 0;
int err;
@@ -92,6 +92,10 @@ static int parser_trx_parse(struct mtd_i
if (err != 0 && err != -EINVAL)
pr_err("failed to parse \"brcm,trx-magic\" DT attribute, using default: %d\n", err);
+ /* Don't parse any failsafe / backup partitions */
+ if (strcmp(mtd->name, "firmware"))

View File

@ -0,0 +1,88 @@
From 7164a8cde4b42f76474088ccaf53f1e463d4e2f6 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Mon, 24 Jan 2022 22:09:43 +0100
Subject: [PATCH 5.10 1/2] net: dsa: Move VLAN filtering syncing out of
dsa_switch_bridge_leave
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 381a730182f1d174e1950cd4e63e885b1c302051 upstream.
Most of dsa_switch_bridge_leave was, in fact, dealing with the syncing
of VLAN filtering for switches on which that is a global
setting. Separate the two phases to prepare for the cross-chip related
bugfix in the following commit.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Marek Behún <kabel@kernel.org>
---
net/dsa/switch.c | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index a44035872cff..659fd979cc0a 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -104,23 +104,12 @@ static int dsa_switch_bridge_join(struct dsa_switch *ds,
return 0;
}
-static int dsa_switch_bridge_leave(struct dsa_switch *ds,
- struct dsa_notifier_bridge_info *info)
+static int dsa_switch_sync_vlan_filtering(struct dsa_switch *ds,
+ struct dsa_notifier_bridge_info *info)
{
bool unset_vlan_filtering = br_vlan_enabled(info->br);
- struct dsa_switch_tree *dst = ds->dst;
int err, i;
- if (dst->index == info->tree_index && ds->index == info->sw_index &&
- ds->ops->port_bridge_leave)
- ds->ops->port_bridge_leave(ds, info->port, info->br);
-
- if ((dst->index != info->tree_index || ds->index != info->sw_index) &&
- ds->ops->crosschip_bridge_leave)
- ds->ops->crosschip_bridge_leave(ds, info->tree_index,
- info->sw_index, info->port,
- info->br);
-
/* If the bridge was vlan_filtering, the bridge core doesn't trigger an
* event for changing vlan_filtering setting upon slave ports leaving
* it. That is a good thing, because that lets us handle it and also
@@ -153,6 +142,30 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
if (err && err != EOPNOTSUPP)
return err;
}
+
+ return 0;
+}
+
+static int dsa_switch_bridge_leave(struct dsa_switch *ds,
+ struct dsa_notifier_bridge_info *info)
+{
+ struct dsa_switch_tree *dst = ds->dst;
+ int err;
+
+ if (dst->index == info->tree_index && ds->index == info->sw_index &&
+ ds->ops->port_bridge_leave)
+ ds->ops->port_bridge_leave(ds, info->port, info->br);
+
+ if ((dst->index != info->tree_index || ds->index != info->sw_index) &&
+ ds->ops->crosschip_bridge_leave)
+ ds->ops->crosschip_bridge_leave(ds, info->tree_index,
+ info->sw_index, info->port,
+ info->br);
+
+ err = dsa_switch_sync_vlan_filtering(ds, info);
+ if (err)
+ return err;
+
return 0;
}
--
2.34.1

View File

@ -0,0 +1,63 @@
From 6948a6654ffc878fc0258b363da77e7fd775b2d9 Mon Sep 17 00:00:00 2001
From: Tobias Waldekranz <tobias@waldekranz.com>
Date: Mon, 24 Jan 2022 22:09:44 +0100
Subject: [PATCH 5.10 2/2] net: dsa: Avoid cross-chip syncing of VLAN filtering
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 108dc8741c203e9d6ce4e973367f1bac20c7192b upstream.
Changes to VLAN filtering are not applicable to cross-chip
notifications.
On a system like this:
.-----. .-----. .-----.
| sw1 +---+ sw2 +---+ sw3 |
'-1-2-' '-1-2-' '-1-2-'
Before this change, upon sw1p1 leaving a bridge, a call to
dsa_port_vlan_filtering would also be made to sw2p1 and sw3p1.
In this scenario:
.---------. .-----. .-----.
| sw1 +---+ sw2 +---+ sw3 |
'-1-2-3-4-' '-1-2-' '-1-2-'
When sw1p4 would leave a bridge, dsa_port_vlan_filtering would be
called for sw2 and sw3 with a non-existing port - leading to array
out-of-bounds accesses and crashes on mv88e6xxx.
Fixes: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Marek Behún <kabel@kernel.org>
---
net/dsa/switch.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 659fd979cc0a..2fe2f328d2d2 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -162,9 +162,11 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
info->sw_index, info->port,
info->br);
- err = dsa_switch_sync_vlan_filtering(ds, info);
- if (err)
- return err;
+ if (dst->index == info->tree_index && ds->index == info->sw_index) {
+ err = dsa_switch_sync_vlan_filtering(ds, info);
+ if (err)
+ return err;
+ }
return 0;
}
--
2.34.1

View File

@ -2891,6 +2891,7 @@ CONFIG_KERNEL_XZ=y
CONFIG_KERNFS=y
# CONFIG_KEXEC is not set
# CONFIG_KEXEC_FILE is not set
# CONFIG_KEXEC_SIG is not set
# CONFIG_KEYBOARD_ADC is not set
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not set

View File

@ -2630,6 +2630,7 @@ CONFIG_KERNEL_XZ=y
CONFIG_KERNFS=y
# CONFIG_KEXEC is not set
# CONFIG_KEXEC_FILE is not set
# CONFIG_KEXEC_SIG is not set
# CONFIG_KEYBOARD_ADC is not set
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not set

View File

@ -0,0 +1,198 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "dual-q,h721", "mediatek,mt7621-soc";
model = "Dual-Q H721";
aliases {
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};
chosen {
bootargs = "console=ttyS0,115200";
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
usb-30-power {
gpio-export,name = "usb-30-power";
gpio-export,output = <0>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
usb-20-power {
gpio-export,name = "usb-20-power";
gpio-export,output = <0>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
usb1 {
label = "green:usb1";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
sig1 {
label = "green:sig1";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
usb2 {
label = "green:usb2";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
sig2 {
label = "green:sig2";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
tf {
label = "green:tf";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
wifi1 {
label = "green:wifi1";
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
wifi2 {
label = "green:wifi2";
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
led_status: status {
label = "green:status";
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "bootloader";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&sdhci {
status = "okay";
};
&pcie {
status = "okay";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
nvmem-cells = <&macaddr_factory_e000>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};
};
&ethernet {
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
};
&gmac0 {
nvmem-cells = <&macaddr_factory_e000>;
nvmem-cell-names = "mac-address";
};
&state_default {
gpio {
groups = "jtag", "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -96,9 +96,15 @@
};
&pcie0 {
mt76@0,0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0>;
/* 5 GHz (phy1) does not take the address from calibration data,
but setting it manually here works */
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
};
};
@ -150,6 +156,10 @@
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};

View File

@ -7,7 +7,7 @@
/ {
compatible = "tplink,tl-wpa8631p-v3", "mediatek,mt7621-soc";
model = "TP-Link WPA8631P v3";
model = "TP-Link TL-WPA8631P v3";
aliases {
label-mac-device = &gmac0;
@ -75,15 +75,15 @@
};
};
gpio-export {
compatible = "gpio-export";
gpio-export {
compatible = "gpio-export";
led_control {
gpio-export,name = "tp-link:led:control";
gpio-export,output = <0>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
};
led_control {
gpio-export,name = "tp-link:led:control";
gpio-export,output = <0>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
};
};
&spi0 {
@ -160,6 +160,10 @@
};
};
&ethernet {
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
};
&gmac0 {
nvmem-cells = <&macaddr_config_2008>;
nvmem-cell-names = "mac-address";

View File

@ -396,6 +396,16 @@ define Device/dlink_dir-882-r1
endef
TARGET_DEVICES += dlink_dir-882-r1
define Device/dual-q_h721
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)
IMAGE_SIZE := 16064k
DEVICE_VENDOR := Dual-Q
DEVICE_MODEL := H721
DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 -wpad-basic-wolfssl
endef
TARGET_DEVICES += dual-q_h721
define Device/d-team_newifi-d2
$(Device/dsa-migration)
$(Device/uimage-lzma-loader)

View File

@ -15,7 +15,8 @@ case "$board" in
macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \
> /sys${DEVPATH}/macaddress
;;
dlink,dir-853-r1)
dlink,dir-853-r1|\
phicomm,k2p)
if [ "$PHYNBR" = "0" ]; then
base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1)
macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
@ -42,6 +43,10 @@ case "$board" in
[ "$PHYNBR" = "1" ] && \
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
;;
jcg,y2)
[ "$PHYNBR" = "1" ] && \
macaddr_setbit_la "$(mtd_get_mac_binary factory 0x4)" > /sys${DEVPATH}/macaddress
;;
linksys,e5600|\
linksys,ea6350-v4|\
linksys,ea7300-v1|\

View File

@ -0,0 +1,133 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "rtl838x.dtsi"
#include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
/ {
compatible = "panasonic,m8eg-pn28080k", "realtek,rtl8380-soc";
model = "Panasonic Switch-M8eG PN28080K";
aliases {
led-boot = &led_status_eco_green;
led-failsafe = &led_status_eco_amber;
led-running = &led_status_eco_green;
led-upgrade = &led_status_eco_green;
};
sfp0: sfp-p9 {
compatible = "sff,sfp";
i2c-bus = <&i2c0>;
tx-fault-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
tx-disable-gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 2 GPIO_ACTIVE_LOW>;
los-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
};
};
&leds {
led_status_eco_amber: led-5 {
label = "amber:status_eco";
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_STATUS;
function-enumerator = <1>;
};
led_status_eco_green: led-6 {
label = "green:status_eco";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
function-enumerator = <2>;
};
};
&i2c_gpio_0 {
scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&i2c_gpio_1 {
scl-gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&gpio1 {
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&gpio0>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
};
&gpio2 {
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&gpio0>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
};
&i2c_switch {
i2c0: i2c@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
};
};
&ethernet0 {
mdio-bus {
compatible = "realtek,rtl838x-mdio";
regmap = <&ethernet0>;
#address-cells = <1>;
#size-cells = <0>;
INTERNAL_PHY(8)
INTERNAL_PHY(9)
INTERNAL_PHY(10)
INTERNAL_PHY(11)
INTERNAL_PHY(12)
INTERNAL_PHY(13)
INTERNAL_PHY(14)
INTERNAL_PHY(15)
INTERNAL_PHY(24)
};
};
&switch0 {
ports {
#address-cells = <1>;
#size-cells = <0>;
SWITCH_PORT(8, 1, internal)
SWITCH_PORT(9, 2, internal)
SWITCH_PORT(10, 3, internal)
SWITCH_PORT(11, 4, internal)
SWITCH_PORT(12, 5, internal)
SWITCH_PORT(13, 6, internal)
SWITCH_PORT(14, 7, internal)
SWITCH_PORT(15, 8, internal)
port@24 {
reg = <24>;
label = "lan9";
phy-mode = "1000base-x";
phy-handle = <&phy24>;
managed = "in-band-status";
sfp = <&sfp0>;
};
port@28 {
ethernet = <&ethernet0>;
reg = <28>;
phy-mode = "internal";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};

View File

@ -0,0 +1,128 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "rtl8380_zyxel_gs1900.dtsi"
/ {
compatible = "zyxel,gs1900-24-v1", "realtek,rtl838x-soc";
model = "ZyXEL GS1900-24 v1";
memory@0 {
reg = <0x0 0x4000000>;
};
/* i2c of the left SFP cage: port 25 */
i2c0: i2c-gpio-0 {
compatible = "i2c-gpio";
sda-gpios = <&gpio1 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio1 25 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <2>;
#address-cells = <1>;
#size-cells = <0>;
};
sfp0: sfp-p25 {
compatible = "sff,sfp";
i2c-bus = <&i2c0>;
los-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
tx-fault-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 26 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
};
/* i2c of the right SFP cage: port 26 */
i2c1: i2c-gpio-1 {
compatible = "i2c-gpio";
sda-gpios = <&gpio1 30 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <2>;
#address-cells = <1>;
#size-cells = <0>;
};
sfp1: sfp-p26 {
compatible = "sff,sfp";
i2c-bus = <&i2c1>;
los-gpio = <&gpio1 33 GPIO_ACTIVE_HIGH>;
tx-fault-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>;
mod-def0-gpio = <&gpio1 32 GPIO_ACTIVE_LOW>;
tx-disable-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>;
};
};
&uart1 {
status = "okay";
};
&mdio {
EXTERNAL_PHY(0)
EXTERNAL_PHY(1)
EXTERNAL_PHY(2)
EXTERNAL_PHY(3)
EXTERNAL_PHY(4)
EXTERNAL_PHY(5)
EXTERNAL_PHY(6)
EXTERNAL_PHY(7)
EXTERNAL_PHY(16)
EXTERNAL_PHY(17)
EXTERNAL_PHY(18)
EXTERNAL_PHY(19)
EXTERNAL_PHY(20)
EXTERNAL_PHY(21)
EXTERNAL_PHY(22)
EXTERNAL_PHY(23)
INTERNAL_PHY(24)
INTERNAL_PHY(26)
};
&switch0 {
ports {
SWITCH_PORT(0, 1, qsgmii)
SWITCH_PORT(1, 2, qsgmii)
SWITCH_PORT(2, 3, qsgmii)
SWITCH_PORT(3, 4, qsgmii)
SWITCH_PORT(4, 5, qsgmii)
SWITCH_PORT(5, 6, qsgmii)
SWITCH_PORT(6, 7, qsgmii)
SWITCH_PORT(7, 8, qsgmii)
SWITCH_PORT(8, 9, internal)
SWITCH_PORT(9, 10, internal)
SWITCH_PORT(10, 11, internal)
SWITCH_PORT(11, 12, internal)
SWITCH_PORT(12, 13, internal)
SWITCH_PORT(13, 14, internal)
SWITCH_PORT(14, 15, internal)
SWITCH_PORT(15, 16, internal)
SWITCH_PORT(16, 17, qsgmii)
SWITCH_PORT(17, 18, qsgmii)
SWITCH_PORT(18, 19, qsgmii)
SWITCH_PORT(19, 20, qsgmii)
SWITCH_PORT(20, 21, qsgmii)
SWITCH_PORT(21, 22, qsgmii)
SWITCH_PORT(22, 23, qsgmii)
SWITCH_PORT(23, 24, qsgmii)
port@24 {
reg = <24>;
label = "lan25";
phy-mode = "1000base-x";
managed = "in-band-status";
sfp = <&sfp0>;
};
port@26 {
reg = <26>;
label = "lan26";
phy-mode = "1000base-x";
managed = "in-band-status";
sfp = <&sfp1>;
};
};
};
&gpio1 {
/delete-node/ poe_enable;
};

View File

@ -0,0 +1,195 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
/ {
chosen {
bootargs = "console=ttyS0,9600";
};
memory@0 {
device_type = "memory";
reg = <0x0 0x8000000>;
};
leds: leds {
compatible = "gpio-leds";
led-0 {
label = "amber:any_col";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_FAULT;
};
led-1 {
label = "green:giga";
gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <1>;
};
led-2 {
label = "green:100m";
gpios = <&gpio2 9 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <2>;
};
led-3 {
label = "green:full";
gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <3>;
};
led-4 {
label = "green:loop_history";
gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
function-enumerator = <4>;
};
};
keys {
compatible = "gpio-keys";
led_mode {
label = "led-mode";
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
};
gpio-restart {
compatible = "gpio-restart";
gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
};
i2c_gpio_0: i2c-gpio-0 {
compatible = "i2c-gpio";
i2c-gpio,delay-us = <2>;
#address-cells = <1>;
#size-cells = <0>;
gpio1: gpio@20 {
compatible = "nxp,pca9555";
reg = <0x20>;
gpio-controller;
#gpio-cells = <2>;
};
gpio2: gpio@75 {
compatible = "nxp,pca9539";
reg = <0x75>;
gpio-controller;
#gpio-cells = <2>;
/*
* GPIO14 (IO1_6): Shift Register RESET (port LED)
* - Switch-M8eG PN28080K: 3x 74HC164
* - Switch-M24eG PN28240K: 6x 74HC164
* - Switch-M48eG PN28480K: 12x 74HC164
*/
portled_sregister_reset {
gpio-hog;
gpios = <14 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "portled-sregister-reset";
};
};
};
i2c_gpio_1: i2c-gpio-1 {
compatible = "i2c-gpio";
i2c-gpio,delay-us = <2>;
#address-cells = <1>;
#size-cells = <0>;
i2c_switch: i2c-switch@70 {
compatible = "nxp,pca9545";
reset-gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
reg = <0x70>;
#address-cells = <1>;
#size-cells = <0>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x80000>;
read-only;
};
partition@80000 {
label = "u-boot-env";
reg = <0x80000 0x10000>;
};
partition@90000 {
label = "u-boot-env2";
reg = <0x90000 0x10000>;
};
partition@a0000 {
label = "sysinfo";
reg = <0xa0000 0x60000>;
read-only;
};
/*
* Filesystem area in stock firmware
* (0x100000-0x1DFFFFF)
*
* stock firmware images are required to pass
* the checking by the U-Boot, also for OpenWrt
*
* in OpenWrt:
* - 0x100000-0xDFFFFF (13M): stock images
* - 0xE00000-0x1DFFFFF(16M): OpenWrt image
*/
partition@100000 {
label = "fs_reserved";
reg = <0x100000 0xd00000>;
};
partition@e00000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0xe00000 0x1000000>;
};
partition@1e00000 {
label = "vlog_data";
reg = <0x1e00000 0x100000>;
read-only;
};
partition@1f00000 {
label = "elog_data";
reg = <0x1f00000 0x100000>;
read-only;
};
};
};
};

View File

@ -85,6 +85,16 @@ define Device/netgear_gs310tp-v1
endef
TARGET_DEVICES += netgear_gs310tp-v1
define Device/panasonic_m8eg-pn28080k
SOC := rtl8380
IMAGE_SIZE := 16384k
DEVICE_VENDOR := Panasonic
DEVICE_MODEL := Switch-M8eG
DEVICE_VARIANT := PN28080K
DEVICE_PACKAGES := kmod-i2c-mux-pca954x
endef
TARGET_DEVICES += panasonic_m8eg-pn28080k
define Device/zyxel_gs1900
SOC := rtl8380
IMAGE_SIZE := 6976k
@ -126,6 +136,15 @@ define Device/zyxel_gs1900-8hp-v2
endef
TARGET_DEVICES += zyxel_gs1900-8hp-v2
define Device/zyxel_gs1900-24-v1
$(Device/zyxel_gs1900)
SOC := rtl8382
DEVICE_MODEL := GS1900-24
DEVICE_VARIANT := v1
ZYXEL_VERS := AAHL
endef
TARGET_DEVICES += zyxel_gs1900-24-v1
define Device/zyxel_gs1900-24hp-v2
$(Device/zyxel_gs1900)
SOC := rtl8382

View File

@ -69,6 +69,8 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_GENERIC=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GPIO_REALTEK_OTTO=y
CONFIG_GPIO_RTL8231=y
CONFIG_GRO_CELLS=y
@ -166,6 +168,7 @@ CONFIG_REALTEK_OTTO_WDT=y
CONFIG_REALTEK_PHY=y
CONFIG_REALTEK_SOC_PHY=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_MMIO=y
CONFIG_RESET_CONTROLLER=y
CONFIG_RTL83XX=y

View File

@ -308,7 +308,6 @@ CONFIG_JUMP_LABEL=y
CONFIG_KALLSYMS=y
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
CONFIG_KSM=y
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
CONFIG_LEDS_GPIO=y

View File

@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/target.mk
PKG_NAME:=ccache
PKG_VERSION:=4.5.1
PKG_VERSION:=4.6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION)
PKG_HASH:=51186ebe0326365f4e6131e1caa8911de7da4aa6718efc00680322d63a759517
PKG_HASH:=3d2bb860f4359169e640f60cf7cc11da5fab5fb9aed55230d78141e49c3945e9
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk

View File

@ -7,14 +7,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=cmake
PKG_VERSION:=3.22.2
PKG_VERSION:=3.22.3
PKG_RELEASE:=1
PKG_CPE_ID:=cpe:/a:kitware:cmake
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
https://cmake.org/files/v3.19/
PKG_HASH:=3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced
PKG_HASH:=9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0
HOST_BUILD_PARALLEL:=1
HOST_CONFIGURE_PARALLEL:=1

View File

@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=expat
PKG_CPE_ID:=cpe:/a:libexpat:expat
PKG_VERSION:=2.4.6
PKG_VERSION:=2.4.7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_HASH:=ce317706b07cae150f90cddd4253f5b4fba929607488af5ac47bf2bc08e31f09
PKG_HASH:=e149bdd8b90254c62b3d195da53a09bd531a4d63a963b0d8a5268d48dd2f6a65
PKG_SOURCE_URL:=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(PKG_VERSION))
include $(INCLUDE_DIR)/host-build.mk
@ -26,7 +26,7 @@ CMAKE_HOST_OPTIONS += \
-DEXPAT_BUILD_DOCS=OFF \
-DEXPAT_WITH_LIBBSD=OFF \
-DEXPAT_ENABLE_INSTALL=ON \
-DEXPAT_DTD=OFF \
-DEXPAT_DTD=ON \
-DEXPAT_NS=OFF \
-DEXPAT_DEV_URANDOM=OFF

View File

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fakeroot
PKG_VERSION:=1.27
PKG_VERSION:=1.28
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot
PKG_HASH:=3c45eb2d1802a2762069e2e9d21bdd6fb533592bc0cda74c9aff066ab01caddc
PKG_HASH:=56d405e36ff685f83879be08fdd654255ab9aa38632b4605a98e896ad63990c2
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf

View File

@ -21,7 +21,7 @@ Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: sy
#define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
#endif
@@ -136,8 +138,9 @@
@@ -140,8 +142,9 @@
/* 10.10 uses id_t in getpriority/setpriority calls, so pretend
id_t is used everywhere, just happens to be int on some OSes */

View File

@ -7,11 +7,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mtools
PKG_VERSION:=4.0.37
PKG_VERSION:=4.0.38
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=799b197e23e47b61259628810b27790efb7a1fe36037ef1da8a27b0ae4fa8342
PKG_HASH:=7b94485f486e7df08cca68b00a164a13cd38f4c63cb8684d188759ee7bc5e729
HOST_BUILD_PARALLEL:=1