diff --git a/include/kernel-5.10 b/include/kernel-5.10 index c2df3cb11a..8a4895d91b 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .134 -LINUX_KERNEL_HASH-5.10.134 = ec3513acdf033dd8f8ac2545cd1bb826b0669e151185e5f70408a5c9fe273269 +LINUX_VERSION-5.10 = .135 +LINUX_KERNEL_HASH-5.10.135 = e499a61be9ce670716dd27b5124bb9ef6c6bc0e8fab443abf717a77136543344 diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 5bbf12d6f4..716bcddf80 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .58 -LINUX_KERNEL_HASH-5.15.58 = d75bd9579c4b318e6162e21c591878fd37efda0f79c5cdd0dc4eb9ea9dfc4fa8 +LINUX_VERSION-5.15 = .59 +LINUX_KERNEL_HASH-5.15.59 = e6ddc642057340db06b3b921c2b31bfed2c611359e8f144c3e5cf9c3ac33bccb diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led index 51cb8b5178..08a1e6df3b 100755 --- a/package/base-files/files/etc/init.d/led +++ b/package/base-files/files/etc/init.d/led @@ -29,7 +29,7 @@ load_led() { config_get delay $1 delay "150" config_get message $1 message "" config_get gpio $1 gpio "0" - config_get inverted $1 inverted "0" + config_get_bool inverted $1 inverted "0" # execute application led trigger [ -f "/usr/libexec/led-trigger/${trigger}" ] && { @@ -69,6 +69,10 @@ load_led() { return 1 } case "$trigger" in + "heartbeat") + echo "${inverted}" > "/sys/class/leds/${sysfs}/invert" + ;; + "netdev") [ -n "$dev" ] && { echo $dev > /sys/class/leds/${sysfs}/device_name diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index e1a4423497..a435e06a0d 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -126,6 +126,7 @@ plasmacloud,pa300e) qihoo,c301) ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000" ;; +sophos,ap15|\ sophos,ap55|\ sophos,ap55c|\ sophos,ap100|\ diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 738d983af2..f7f4821cef 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -47,7 +47,8 @@ zte,mf283plus) h3c,tx1800-plus|\ h3c,tx1801-plus|\ h3c,tx1806|\ -jcg,q20) +jcg,q20|\ +netgear,wax202) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" ;; hootoo,ht-tm05|\ @@ -80,6 +81,9 @@ xiaomi,redmi-router-ac2100) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000" ;; +zyxel,lte3301-plus) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000" + ;; zyxel,nr7101) idx="$(find_mtd_index Config)" [ -n "$idx" ] && \ @@ -94,6 +98,6 @@ xiaomi,mi-router-cr6609) esac config_load ubootenv -config_foreach ubootenv_add_app_config ubootenv +config_foreach ubootenv_add_app_config exit 0 diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile index e15b04ad23..3f96d43b77 100644 --- a/package/devel/trace-cmd/Makefile +++ b/package/devel/trace-cmd/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trace-cmd -PKG_VERSION:=v2.9.1 -PKG_RELEASE:=1 +PKG_VERSION:=v3.1.2 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/ -PKG_HASH:=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38 +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/ +PKG_HASH:=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979 PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING @@ -21,42 +21,27 @@ define Package/trace-cmd SECTION:=devel CATEGORY:=Development TITLE:=Linux trace command line utility - DEPENDS:= + DEPENDS:=+libtracefs +zlib endef define Package/trace-cmd-extra SECTION:=devel CATEGORY:=Development TITLE:=Extra plugins for trace-cmd - DEPENDS:= + DEPENDS:=+libtraceevent-extra endef MAKE_FLAGS += \ NO_PYTHON=1 \ NO_AUDIT=1 \ + NO_LIBZSTD=1 \ prefix=/usr -PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins -PLUGINS_MAIN := function hrtimer mac80211 sched_switch - TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE define Package/trace-cmd/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/ - $(CP) \ - $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \ - $(1)/usr/lib/traceevent/plugins -endef - -define Package/trace-cmd-extra/install - $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins - $(CP) \ - $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \ - $$(filter-out $(PLUGINS_MAIN), \ - $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \ - $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \ - $(1)/usr/lib/traceevent/plugins endef $(eval $(call BuildPackage,trace-cmd)) diff --git a/package/devel/trace-cmd/patches/100-musl.patch b/package/devel/trace-cmd/patches/100-musl.patch deleted file mode 100644 index 80b419eb82..0000000000 --- a/package/devel/trace-cmd/patches/100-musl.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 1a000636c1828eecdcec5360a51623ef4ffbff04 Mon Sep 17 00:00:00 2001 -From: Beniamin Sandu -Date: Mon, 30 Nov 2020 14:27:55 +0200 -Subject: trace-cmd: make it build against musl C library - -* add some missing headers and macros -* set pthread affinity using pthread_setaffinity_np after creating the thread -instead of pthread_attr_setaffinity_np (which seems to not be implemented -in musl) - -Tested using https://musl.cc/x86_64-linux-musl-native.tgz - -Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com - -Reviewed-by: Tzvetomir Stoyanov (VMware) -Signed-off-by: Beniamin Sandu -[ Fixed a whitespace issue ] -Signed-off-by: Steven Rostedt (VMware) ---- - include/trace-cmd/trace-cmd.h | 1 + - lib/trace-cmd/include/trace-cmd-local.h | 1 + - lib/tracefs/tracefs-events.c | 1 + - tracecmd/include/trace-local.h | 1 + - tracecmd/trace-tsync.c | 16 +++++++++++----- - 5 files changed, 20 insertions(+), 5 deletions(-) - ---- a/include/trace-cmd/trace-cmd.h -+++ b/include/trace-cmd/trace-cmd.h -@@ -6,6 +6,7 @@ - #ifndef _TRACE_CMD_H - #define _TRACE_CMD_H - -+#include - #include "traceevent/event-parse.h" - - #define TRACECMD_MAGIC { 23, 8, 68 } ---- a/lib/trace-cmd/include/trace-cmd-local.h -+++ b/lib/trace-cmd/include/trace-cmd-local.h -@@ -26,5 +26,6 @@ void warning(const char *fmt, ...); - #endif - #endif - -+#include - - #endif /* _TRACE_CMD_LOCAL_H */ ---- a/lib/tracefs/tracefs-events.c -+++ b/lib/tracefs/tracefs-events.c -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - #include "kbuffer.h" - #include "tracefs.h" ---- a/tracecmd/include/trace-local.h -+++ b/tracecmd/include/trace-local.h -@@ -8,6 +8,7 @@ - - #include - #include /* for DIR */ -+#include - - #include "trace-cmd.h" - #include "event-utils.h" ---- a/tracecmd/trace-tsync.c -+++ b/tracecmd/trace-tsync.c -@@ -104,13 +104,16 @@ int tracecmd_host_tsync(struct buffer_in - - pthread_attr_init(&attrib); - pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); -- if (!get_first_cpu(&pin_mask, &mask_size)) -- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); - - ret = pthread_create(&instance->tsync_thread, &attrib, - tsync_host_thread, &instance->tsync); -- if (!ret) -+ -+ if (!ret) { -+ if (!get_first_cpu(&pin_mask, &mask_size)) -+ pthread_setaffinity_np(instance->tsync_thread, mask_size, pin_mask); - instance->tsync_thread_running = true; -+ } -+ - if (pin_mask) - CPU_FREE(pin_mask); - pthread_attr_destroy(&attrib); -@@ -243,11 +246,14 @@ unsigned int tracecmd_guest_tsync(char * - pthread_attr_init(&attrib); - tsync->sync_proto = proto; - pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); -- if (!get_first_cpu(&pin_mask, &mask_size)) -- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); - - ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync); - -+ if (!ret) { -+ if (!get_first_cpu(&pin_mask, &mask_size)) -+ pthread_setaffinity_np(*thr_id, mask_size, pin_mask); -+ } -+ - if (pin_mask) - CPU_FREE(pin_mask); - pthread_attr_destroy(&attrib); diff --git a/package/devel/trace-cmd/patches/100-tracecmd-add-NO_LIBZSTD-option-to-disable-libzstd.patch b/package/devel/trace-cmd/patches/100-tracecmd-add-NO_LIBZSTD-option-to-disable-libzstd.patch new file mode 100644 index 0000000000..447e3b0790 --- /dev/null +++ b/package/devel/trace-cmd/patches/100-tracecmd-add-NO_LIBZSTD-option-to-disable-libzstd.patch @@ -0,0 +1,38 @@ +From 4fcc23ee4291f445cada012b6bef6879274a25f1 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sun, 7 Aug 2022 10:11:06 +0200 +Subject: [PATCH] tracecmd: add NO_LIBZSTD option to disable libzstd + +Other Linux kernel tools like perf already include options to disable +libzstd manually. Add this option also to trace-cmd. + +The OpenWrt SDK fails to build trace-cmd due to the autodetection of +libzstd. The package is present in some feed repositories but should +not be used by trace-cmd. The compilation will fail with: + + Package trace-cmd is missing dependencies for the following libraries: + libzstd.so.1 + +Signed-off-by: Nick Hainke +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/Makefile ++++ b/Makefile +@@ -320,6 +320,7 @@ CFLAGS += -DHAVE_ZLIB + $(info Have zlib compression support) + endif + ++ifndef NO_LIBZSTD + TEST_LIBZSTD = $(shell sh -c "$(PKG_CONFIG) --atleast-version 1.4.0 libzstd > /dev/null 2>&1 && echo y") + + ifeq ("$(TEST_LIBZSTD)", "y") +@@ -335,6 +336,7 @@ $(info ******************************* + endif + + export LIBZSTD_CFLAGS LIBZSTD_LDLAGS ZSTD_INSTALLED ++endif + + CUNIT_INSTALLED := $(shell if (printf "$(pound)include \n void main(){CU_initialize_registry();}" | $(CC) -o /dev/null -x c - -lcunit >/dev/null 2>&1) ; then echo 1; else echo 0 ; fi) + export CUNIT_INSTALLED diff --git a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch deleted file mode 100644 index cffcaa06b5..0000000000 --- a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/lib/traceevent/plugins/plugin_mac80211.c -+++ b/lib/traceevent/plugins/plugin_mac80211.c -@@ -165,12 +165,15 @@ static int drv_config(struct trace_seq * - { 2, "IDLE" }, - { 3, "QOS"}, - ); -- tep_print_num_field(s, " chan:%d/", event, "center_freq", record, 1); -- print_enum(s, event, "channel_type", data, -- { 0, "noht" }, -- { 1, "ht20" }, -- { 2, "ht40-" }, -- { 3, "ht40+" }); -+ tep_print_num_field(s, " chan:%d@", event, "control_freq", record, 1); -+ print_enum(s, event, "chan_width", data, -+ { 0, "20_noht" }, -+ { 1, "20" }, -+ { 2, "40" }, -+ { 3, "80" }, -+ { 4, "80p80" }, -+ { 5, "160" }); -+ - trace_seq_putc(s, ' '); - SF("power_level"); - diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index a23f2e8e0b..2d68505933 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1402,8 +1402,9 @@ define KernelPackage/mhi-wwan-ctrl SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=MHI WWAN Control DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus - KCONFIG:=CONFIG_MHI_WWAN_CTRL - FILES:=$(LINUX_DIR)/drivers/net/mhi_wwan_ctrl.ko + KCONFIG:=CONFIG_MHI_WWAN_CTRL \ + CONFIG_WWAN=y + FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_ctrl.ko AUTOLOAD:=$(call AutoProbe,mhi_wwan_ctrl) endef @@ -1418,8 +1419,9 @@ define KernelPackage/mhi-wwan-mbim SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=MHI MBIM DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus - KCONFIG:=CONFIG_MHI_WWAN_MBIM - FILES:=$(LINUX_DIR)/drivers/net/mhi_wwan_mbim.ko + KCONFIG:=CONFIG_MHI_WWAN_MBIM \ + CONFIG_WWAN=y + FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_mbim.ko AUTOLOAD:=$(call AutoProbe,mhi_wwan_mbim) endef diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 4586b827c0..c19203dbb0 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -348,6 +348,7 @@ IPSET_MODULES:= \ ipset/ip_set_bitmap_ipmac \ ipset/ip_set_bitmap_port \ ipset/ip_set_hash_ip \ + ipset/ip_set_hash_ipmac \ ipset/ip_set_hash_ipmark \ ipset/ip_set_hash_ipport \ ipset/ip_set_hash_ipportip \ diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index af720128eb..9b99aa1d21 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -738,12 +738,8 @@ endef $(eval $(call KernelPackage,mppe)) -SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko)) -SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall -SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan -SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES)) -SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES))) -SCHED_FILES_EXTRA = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(SCHED_MODULES_EXTRA)) +SCHED_MODULES_CORE = sch_ingress sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall +SCHED_FILES_CORE = $(foreach mod,$(SCHED_MODULES_CORE),$(LINUX_DIR)/net/sched/$(mod).ko) define KernelPackage/sched-core SUBMENU:=$(NETWORK_SUPPORT_MENU) @@ -754,7 +750,6 @@ define KernelPackage/sched-core CONFIG_NET_SCH_HTB \ CONFIG_NET_SCH_TBF \ CONFIG_NET_SCH_INGRESS \ - CONFIG_NET_SCH_FQ_CODEL \ CONFIG_NET_CLS=y \ CONFIG_NET_CLS_ACT=y \ CONFIG_NET_CLS_BASIC \ @@ -769,7 +764,7 @@ define KernelPackage/sched-core CONFIG_NET_CLS_MATCHALL \ CONFIG_NET_EMATCH=y \ CONFIG_NET_EMATCH_U32 - FILES:=$(SCHED_FILES) + FILES:=$(SCHED_FILES_CORE) AUTOLOAD:=$(call AutoLoad,70, $(SCHED_MODULES_CORE)) endef @@ -780,35 +775,36 @@ endef $(eval $(call KernelPackage,sched-core)) -define KernelPackage/sched-cake +define KernelPackage/sched-act-police SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Cake fq_codel/blue derived shaper + TITLE:=Traffic Policing DEPENDS:=+kmod-sched-core - KCONFIG:=CONFIG_NET_SCH_CAKE - FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko - AUTOLOAD:=$(call AutoProbe,sch_cake) + KCONFIG:=CONFIG_NET_ACT_POLICE + FILES:=$(LINUX_DIR)/net/sched/act_police.ko + AUTOLOAD:=$(call AutoProbe,act_police) endef -define KernelPackage/sched-cake/description - Common Applications Kept Enhanced fq_codel/blue derived shaper -endef +$(eval $(call KernelPackage,sched-act-police)) -$(eval $(call KernelPackage,sched-cake)) -define KernelPackage/sched-flower +define KernelPackage/sched-act-sample SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Flower traffic classifier + TITLE:=Traffic Sampling DEPENDS:=+kmod-sched-core - KCONFIG:=CONFIG_NET_CLS_FLOWER - FILES:=$(LINUX_DIR)/net/sched/cls_flower.ko - AUTOLOAD:=$(call AutoProbe, cls_flower) + KCONFIG:= \ + CONFIG_NET_ACT_SAMPLE \ + CONFIG_PSAMPLE + FILES:= \ + $(LINUX_DIR)/net/psample/psample.ko \ + $(LINUX_DIR)/net/sched/act_sample.ko + AUTOLOAD:=$(call AutoProbe,act_sample psample) endef -define KernelPackage/sched-flower/description - Allows to classify packets based on a configurable combination of packet keys and masks. +define KernelPackage/sched-act-sample/description + Packet sampling tc action. endef -$(eval $(call KernelPackage,sched-flower)) +$(eval $(call KernelPackage,sched-act-sample)) define KernelPackage/sched-act-vlan @@ -827,55 +823,6 @@ endef $(eval $(call KernelPackage,sched-act-vlan)) -define KernelPackage/sched-mqprio - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Multi-queue priority scheduler (MQPRIO) - DEPENDS:=+kmod-sched-core - KCONFIG:=CONFIG_NET_SCH_MQPRIO - FILES:=$(LINUX_DIR)/net/sched/sch_mqprio.ko - AUTOLOAD:=$(call AutoProbe, sch_mqprio) -endef - -define KernelPackage/sched-mqprio/description - This scheduler allows QOS to be offloaded on NICs that have support for offloading QOS schedulers. -endef - -$(eval $(call KernelPackage,sched-mqprio)) - -define KernelPackage/sched-connmark - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic shaper conntrack mark support - DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-ipt-conntrack-extra - KCONFIG:=CONFIG_NET_ACT_CONNMARK - FILES:=$(LINUX_DIR)/net/sched/act_connmark.ko - AUTOLOAD:=$(call AutoLoad,71, act_connmark) -endef -$(eval $(call KernelPackage,sched-connmark)) - -define KernelPackage/sched-ctinfo - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic shaper ctinfo support - DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-ipt-conntrack-extra - KCONFIG:=CONFIG_NET_ACT_CTINFO - FILES:=$(LINUX_DIR)/net/sched/act_ctinfo.ko - AUTOLOAD:=$(call AutoLoad,71, act_ctinfo) -endef -$(eval $(call KernelPackage,sched-ctinfo)) - -define KernelPackage/sched-ipset - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Traffic shaper ipset support - DEPENDS:=+kmod-sched-core +kmod-ipt-ipset - KCONFIG:= \ - CONFIG_NET_EMATCH_IPSET - FILES:= \ - $(LINUX_DIR)/net/sched/em_ipset.ko - AUTOLOAD:=$(call AutoLoad,72,em_ipset) -endef - -$(eval $(call KernelPackage,sched-ipset)) - - define KernelPackage/sched-bpf SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Traffic shaper support for Berkeley Packet Filter @@ -891,6 +838,138 @@ endef $(eval $(call KernelPackage,sched-bpf)) +define KernelPackage/sched-cake + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Cake fq_codel/blue derived shaper + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_SCH_CAKE + FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko + AUTOLOAD:=$(call AutoProbe,sch_cake) +endef + +define KernelPackage/sched-cake/description + Common Applications Kept Enhanced fq_codel/blue derived shaper +endef + +$(eval $(call KernelPackage,sched-cake)) + + +define KernelPackage/sched-connmark + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Traffic shaper conntrack mark support + DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-ipt-conntrack-extra + KCONFIG:=CONFIG_NET_ACT_CONNMARK + FILES:=$(LINUX_DIR)/net/sched/act_connmark.ko + AUTOLOAD:=$(call AutoLoad,71, act_connmark) +endef +$(eval $(call KernelPackage,sched-connmark)) + + +define KernelPackage/sched-ctinfo + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Traffic shaper ctinfo support + DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-ipt-conntrack-extra + KCONFIG:=CONFIG_NET_ACT_CTINFO + FILES:=$(LINUX_DIR)/net/sched/act_ctinfo.ko + AUTOLOAD:=$(call AutoLoad,71, act_ctinfo) +endef +$(eval $(call KernelPackage,sched-ctinfo)) + + +define KernelPackage/sched-drr + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Deficit Round Robin scheduler (DRR) + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_SCH_DRR + FILES:=$(LINUX_DIR)/net/sched/sch_drr.ko + AUTOLOAD:=$(call AutoProbe,sch_drr) +endef + +define KernelPackage/sched-drr/description + DRR algorithm Configuration +endef + +$(eval $(call KernelPackage,sched-drr)) + + +define KernelPackage/sched-flower + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Flower traffic classifier + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_CLS_FLOWER + FILES:=$(LINUX_DIR)/net/sched/cls_flower.ko + AUTOLOAD:=$(call AutoProbe, cls_flower) +endef + +define KernelPackage/sched-flower/description + Allows to classify packets based on a configurable combination of packet keys and masks. +endef + +$(eval $(call KernelPackage,sched-flower)) + + +define KernelPackage/sched-ipset + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Traffic shaper ipset support + DEPENDS:=+kmod-sched-core +kmod-ipt-ipset + KCONFIG:= \ + CONFIG_NET_EMATCH_IPSET + FILES:= \ + $(LINUX_DIR)/net/sched/em_ipset.ko + AUTOLOAD:=$(call AutoLoad,72,em_ipset) +endef + +$(eval $(call KernelPackage,sched-ipset)) + + +define KernelPackage/sched-mqprio + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Multi-queue priority scheduler (MQPRIO) + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_SCH_MQPRIO + FILES:=$(LINUX_DIR)/net/sched/sch_mqprio.ko + AUTOLOAD:=$(call AutoProbe, sch_mqprio) +endef + +define KernelPackage/sched-mqprio/description + This scheduler allows QOS to be offloaded on NICs that have support for offloading QOS schedulers. +endef + +$(eval $(call KernelPackage,sched-mqprio)) + + +define KernelPackage/sched-prio + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Multi Band Priority Queueing (PRIO) + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_SCH_PRIO + FILES:=$(LINUX_DIR)/net/sched/sch_prio.ko + AUTOLOAD:=$(call AutoProbe,sch_prio) +endef + +define KernelPackage/sched-prio/description + PRIO algorithm Configuration +endef + +$(eval $(call KernelPackage,sched-prio)) + + +define KernelPackage/sched-red + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Random Early Detection (RED) + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_SCH_RED + FILES:=$(LINUX_DIR)/net/sched/sch_red.ko + AUTOLOAD:=$(call AutoProbe,sch_red) +endef + +define KernelPackage/sched-red/description + Random Early Detection (RED) algorithm Configuration +endef + +$(eval $(call KernelPackage,sched-red)) + + define KernelPackage/bpf-test SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Test Berkeley Packet Filter functionality @@ -901,23 +980,22 @@ endef $(eval $(call KernelPackage,bpf-test)) +SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq sch_teql sch_fq sch_pie act_ipt act_pedit act_simple act_csum em_cmp em_nbyte em_meta em_text +SCHED_FILES_EXTRA = $(foreach mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko) + define KernelPackage/sched SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Extra traffic schedulers - DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c + DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c +kmod-lib-textsearch KCONFIG:= \ CONFIG_NET_SCH_CODEL \ CONFIG_NET_SCH_DSMARK \ - CONFIG_NET_SCH_FIFO \ CONFIG_NET_SCH_GRED \ CONFIG_NET_SCH_MULTIQ \ - CONFIG_NET_SCH_PRIO \ - CONFIG_NET_SCH_RED \ CONFIG_NET_SCH_SFQ \ CONFIG_NET_SCH_TEQL \ CONFIG_NET_SCH_FQ \ CONFIG_NET_SCH_PIE \ - CONFIG_NET_ACT_POLICE \ CONFIG_NET_ACT_IPT \ CONFIG_NET_ACT_PEDIT \ CONFIG_NET_ACT_SIMP \ diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 3b42b3b125..30562022c7 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1542,8 +1542,8 @@ $(eval $(call KernelPackage,usb-hid)) define KernelPackage/usb-hid-cp2112 SUBMENU:=$(USB_MENU) TITLE:=Silicon Labs CP2112 HID USB to SMBus Master Bridge - KCONFIG:=CONFIG_GPIOLIB=y CONFIG_HID_CP2112 - DEPENDS:=+kmod-usb-hid +kmod-i2c-core + KCONFIG:=CONFIG_HID_CP2112 + DEPENDS:=@GPIO_SUPPORT +kmod-usb-hid +kmod-i2c-core FILES:=$(LINUX_DIR)/drivers/hid/hid-cp2112.ko AUTOLOAD:=$(call AutoProbe,hid-cp2112) endef @@ -1556,6 +1556,23 @@ endef $(eval $(call KernelPackage,usb-hid-cp2112)) +define KernelPackage/usb-hid-mcp2221 + SUBMENU:=$(USB_MENU) + TITLE:=Microchip USB 2.0 to I2C/UART Protocol Converter with GPIO + KCONFIG:=CONFIG_HID_MCP2221 + DEPENDS:=@GPIO_SUPPORT +kmod-usb-hid +kmod-i2c-core + FILES:=$(LINUX_DIR)/drivers/hid/hid-mcp2221.ko + AUTOLOAD:=$(call AutoProbe,hid-mcp2221) +endef + +define KernelPackage/usb-hid-mcp2221/description + HID device driver which registers as an i2c adapter and gpiochip to expose + these functions of the MCP2221. +endef + +$(eval $(call KernelPackage,usb-hid-mcp2221)) + + define KernelPackage/usb-yealink TITLE:=USB Yealink VOIP phone DEPENDS:=+kmod-input-evdev diff --git a/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch b/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch new file mode 100644 index 0000000000..82243f1d98 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-do-not-abuse-fq.lock-in-ieee80211_do_s.patch @@ -0,0 +1,46 @@ +From aa40d5a43526cca9439a2b45fcfdcd016594dece Mon Sep 17 00:00:00 2001 +From: Tetsuo Handa +Date: Sun, 17 Jul 2022 21:21:52 +0900 +Subject: [PATCH] wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +lockdep complains use of uninitialized spinlock at ieee80211_do_stop() [1], +for commit f856373e2f31ffd3 ("wifi: mac80211: do not wake queues on a vif +that is being stopped") guards clear_bit() using fq.lock even before +fq_init() from ieee80211_txq_setup_flows() initializes this spinlock. + +According to discussion [2], Toke was not happy with expanding usage of +fq.lock. Since __ieee80211_wake_txqs() is called under RCU read lock, we +can instead use synchronize_rcu() for flushing ieee80211_wake_txqs(). + +Link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6 [1] +Link: https://lkml.kernel.org/r/874k0zowh2.fsf@toke.dk [2] +Reported-by: syzbot +Signed-off-by: Tetsuo Handa +Fixes: f856373e2f31ffd3 ("wifi: mac80211: do not wake queues on a vif that is being stopped") +Tested-by: syzbot +Acked-by: Toke Høiland-Jørgensen +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/9cc9b81d-75a3-3925-b612-9d0ad3cab82b@I-love.SAKURA.ne.jp +[ pick up commit 3598cb6e1862 ("wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop()") from -next] +Link: https://lore.kernel.org/all/87o7xcq6qt.fsf@kernel.org/ +Signed-off-by: Jakub Kicinski +--- + net/mac80211/iface.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -377,9 +377,8 @@ static void ieee80211_do_stop(struct iee + bool cancel_scan; + struct cfg80211_nan_func *func; + +- spin_lock_bh(&local->fq.lock); + clear_bit(SDATA_STATE_RUNNING, &sdata->state); +- spin_unlock_bh(&local->fq.lock); ++ synchronize_rcu(); /* flush _ieee80211_wake_txqs() */ + + cancel_scan = rcu_access_pointer(local->scan_sdata) == sdata; + if (cancel_scan) diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index 2a7b5c50e2..4ca37d3b06 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.186 +PKG_VERSION:=0.187 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177 +PKG_HASH:=e70b0dfbe610f90c4d1fe0d71af142a4e25c3c4ef9ebab8d2d72b65159d454c8 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-3.0-or-later diff --git a/package/libs/jansson/Makefile b/package/libs/jansson/Makefile index 4b0b7601c9..6de48c1d86 100644 --- a/package/libs/jansson/Makefile +++ b/package/libs/jansson/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=jansson PKG_VERSION:=2.14 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/akheron/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)? @@ -33,7 +33,7 @@ define Package/jansson CATEGORY:=Libraries TITLE:=Jansson library URL:=http://www.digip.org/jansson/ - ABI_VERSION:=5 + ABI_VERSION:=4 endef define Package/jansson/description @@ -45,7 +45,7 @@ TARGET_LDFLAGS += -flto define Package/jansson/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,jansson)) diff --git a/package/libs/libtraceevent/Makefile b/package/libs/libtraceevent/Makefile new file mode 100644 index 0000000000..9fb9304e76 --- /dev/null +++ b/package/libs/libtraceevent/Makefile @@ -0,0 +1,74 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libtraceevent +PKG_VERSION:=1.6.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/ +PKG_HASH:=1aaeb12f5842a843a06b733e3f4230b0937ba9c2ecd39345edf6f66cc8cbe795 + +PKG_MAINTAINER:=Nick Hainke + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libtraceevent + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Linux kernel trace event library + URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git + ABI_VERSION:=0 +endef + +define Package/libtraceevent/description +The libtraceevent library provides APIs to access kernel tracepoint events, located in +the tracefs file system under the events directory. +endef + +define Package/libtraceevent-extra + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Extra plugins for libtraceevent + DEPENDS:= +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static + +PLUGINS_DIR := $(PKG_BUILD_DIR)/plugins +PLUGINS_MAIN := function hrtimer mac80211 sched_switch + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/include/traceevent $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libtraceevent.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/libtraceevent.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libtraceevent/install + $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins + $(CP) $(PKG_BUILD_DIR)/lib/libtraceevent.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \ + $(1)/usr/lib/traceevent/plugins +endef + +define Package/libtraceevent-extra/install + $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins + $(CP) \ + $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \ + $$(filter-out $(PLUGINS_MAIN), \ + $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \ + $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \ + $(1)/usr/lib/traceevent/plugins +endef + +$(eval $(call BuildPackage,libtraceevent)) +$(eval $(call BuildPackage,libtraceevent-extra)) diff --git a/package/libs/libtracefs/Makefile b/package/libs/libtracefs/Makefile new file mode 100644 index 0000000000..412c5fd122 --- /dev/null +++ b/package/libs/libtracefs/Makefile @@ -0,0 +1,49 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libtracefs +PKG_VERSION:=1.4.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/ +PKG_HASH:=8ad03e6d2a6227f6eb11692d9f04614d3da60ac6c5e4fe436e59b2bed90f031b + +PKG_MAINTAINER:=Nick Hainke + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libtracefs + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Linux kernel trace file system library + URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git + DEPENDS+=+libpthread +libtraceevent + ABI_VERSION:=0 +endef + +define Package/libtracefs/description +The libtracefs library provides APIs to access kernel trace file system. +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/libtracefs.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libtracefs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libtracefs)) diff --git a/package/libs/zlib/patches/006-fix-CVE-2022-37434.patch b/package/libs/zlib/patches/006-fix-CVE-2022-37434.patch new file mode 100644 index 0000000000..dc84d3a1d3 --- /dev/null +++ b/package/libs/zlib/patches/006-fix-CVE-2022-37434.patch @@ -0,0 +1,32 @@ +From eff308af425b67093bab25f80f1ae950166bece1 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sat, 30 Jul 2022 15:51:11 -0700 +Subject: [PATCH] Fix a bug when getting a gzip header extra field with + inflate(). + +If the extra field was larger than the space the user provided with +inflateGetHeader(), and if multiple calls of inflate() delivered +the extra header data, then there could be a buffer overflow of the +provided space. This commit assures that provided space is not +exceeded. +--- + inflate.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/inflate.c b/inflate.c +index 7be8c6366..7a7289749 100644 +--- a/inflate.c ++++ b/inflate.c +@@ -763,9 +763,10 @@ int flush; + copy = state->length; + if (copy > have) copy = have; + if (copy) { ++ len = state->head->extra_len - state->length; + if (state->head != Z_NULL && +- state->head->extra != Z_NULL) { +- len = state->head->extra_len - state->length; ++ state->head->extra != Z_NULL && ++ len < state->head->extra_max) { + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); diff --git a/package/libs/zlib/patches/007-fix-null-dereference-in-fix-CVE-2022-37434.patch b/package/libs/zlib/patches/007-fix-null-dereference-in-fix-CVE-2022-37434.patch new file mode 100644 index 0000000000..c5c95a92b2 --- /dev/null +++ b/package/libs/zlib/patches/007-fix-null-dereference-in-fix-CVE-2022-37434.patch @@ -0,0 +1,29 @@ +From 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Mon, 8 Aug 2022 10:50:09 -0700 +Subject: [PATCH] Fix extra field processing bug that dereferences NULL + state->head. + +The recent commit to fix a gzip header extra field processing bug +introduced the new bug fixed here. +--- + inflate.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/inflate.c b/inflate.c +index 7a7289749..2a3c4fe98 100644 +--- a/inflate.c ++++ b/inflate.c +@@ -763,10 +763,10 @@ int flush; + copy = state->length; + if (copy > have) copy = have; + if (copy) { +- len = state->head->extra_len - state->length; + if (state->head != Z_NULL && + state->head->extra != Z_NULL && +- len < state->head->extra_max) { ++ (len = state->head->extra_len - state->length) < ++ state->head->extra_max) { + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); diff --git a/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c b/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c index 93eecaf71d..61ac7708ba 100644 --- a/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c +++ b/package/network/config/ltq-vdsl-app/src/src/dsl_cpe_ubus.c @@ -146,7 +146,7 @@ static inline void m_bool(const char *id, bool value) { } static inline void m_u32(const char *id, uint32_t value) { - blobmsg_add_u32(&b, id, value); + blobmsg_add_u64(&b, id, value); } static inline void m_str(const char *id, const char *value) { diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index c646b85856..82bc719139 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=18 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git -PKG_SOURCE_DATE:=2022-07-13 -PKG_SOURCE_VERSION:=9212bfcbab7681cd30186ac7f1ef4c47bf38c89a -PKG_MIRROR_HASH:=85118a9ae084701a00b4dc6a9b2e3279e4fd70eb5b31b539a121ce0a894f9e45 +PKG_SOURCE_DATE:=2022-08-05 +PKG_SOURCE_VERSION:=7d21e8d8ecd6d776f64b6928f62893c0f5c9747a +PKG_MIRROR_HASH:=6d918517de4ec47d83edddb6167bb52f08b2b696f336d5055a45290bb37ac4db PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/umdns/files/umdns.json b/package/network/services/umdns/files/umdns.json index 92f1a17b52..554b616633 100644 --- a/package/network/services/umdns/files/umdns.json +++ b/package/network/services/umdns/files/umdns.json @@ -19,12 +19,15 @@ "fcntl", "fcntl64", "fstat", + "getdents64", "getsockname", + "getrandom", "ioctl", "madvise", "mmap", "mmap2", "munmap", + "newfstatat", "open", "openat", "pipe", @@ -42,6 +45,7 @@ "setsockopt", "sigreturn", "socket", + "statx", "time", "uname", "write", diff --git a/package/network/utils/nftables/Makefile b/package/network/utils/nftables/Makefile index 88d7aebefc..850355df8d 100644 --- a/package/network/utils/nftables/Makefile +++ b/package/network/utils/nftables/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nftables PKG_VERSION:=1.0.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files diff --git a/package/network/utils/nftables/patches/0001-meta-don-t-use-non-POSIX-formats-in-strptime.patch b/package/network/utils/nftables/patches/0001-meta-don-t-use-non-POSIX-formats-in-strptime.patch new file mode 100644 index 0000000000..a9d0ee5451 --- /dev/null +++ b/package/network/utils/nftables/patches/0001-meta-don-t-use-non-POSIX-formats-in-strptime.patch @@ -0,0 +1,49 @@ +From 1af8aabccd65e11caa397c4706353075f623cd01 Mon Sep 17 00:00:00 2001 +From: Jo-Philipp Wich +Date: Mon, 8 Aug 2022 23:57:03 +0200 +Subject: [PATCH] meta: don't use non-POSIX formats in strptime() + +The current strptime() invocations in meta.c use the `%F` format which +is not specified by POSIX and thus unimplemented by some libc flavors +such as musl libc. + +Replace all occurrences of `%F` with an equivalent `%Y-%m-%d` format +in order to be able to properly parse user supplied dates in such +environments. + +Signed-off-by: Jo-Philipp Wich +--- + src/meta.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/meta.c b/src/meta.c +index 80ace25b..257bbc9f 100644 +--- a/src/meta.c ++++ b/src/meta.c +@@ -399,7 +399,7 @@ static void date_type_print(const struct expr *expr, struct output_ctx *octx) + tstamp += cur_tm->tm_gmtoff; + + if ((tm = gmtime((time_t *) &tstamp)) != NULL && +- strftime(timestr, sizeof(timestr) - 1, "%F %T", tm)) ++ strftime(timestr, sizeof(timestr) - 1, "%Y-%m-%d %T", tm)) + nft_print(octx, "\"%s\"", timestr); + else + nft_print(octx, "Error converting timestamp to printed time"); +@@ -412,11 +412,11 @@ static bool parse_iso_date(uint64_t *tstamp, const char *sym) + + memset(&tm, 0, sizeof(struct tm)); + +- if (strptime(sym, "%F %T", &tm)) ++ if (strptime(sym, "%Y-%m-%d %T", &tm)) + goto success; +- if (strptime(sym, "%F %R", &tm)) ++ if (strptime(sym, "%Y-%m-%d %R", &tm)) + goto success; +- if (strptime(sym, "%F", &tm)) ++ if (strptime(sym, "%Y-%m-%d", &tm)) + goto success; + + return false; +-- +2.35.1 + diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-lr.dts b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-lr.dts new file mode 100644 index 0000000000..ab2b455228 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-lr.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar7241_ubnt_unifi-ap.dtsi" + +/ { + compatible = "ubnt,unifi", "qca,ar7241"; + model = "Ubiquiti UniFi AP LR"; +}; diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dts b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dts new file mode 100644 index 0000000000..e9f57c0bbe --- /dev/null +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar7241_ubnt_unifi-ap.dtsi" + +/ { + compatible = "ubnt,unifi", "qca,ar7241"; + model = "Ubiquiti UniFi AP"; +}; diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi.dts b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dtsi similarity index 95% rename from target/linux/ath79/dts/ar7241_ubnt_unifi.dts rename to target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dtsi index 3c50e89d01..c70a1c02db 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_unifi.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap.dtsi @@ -3,9 +3,6 @@ #include "ar7241_ubnt_unifi.dtsi" / { - compatible = "ubnt,unifi", "qca,ar7241"; - model = "Ubiquiti UniFi AP"; - aliases { led-boot = &led_dome_green; led-failsafe = &led_dome_green; diff --git a/target/linux/ath79/dts/qca9558_sophos_ap15.dts b/target/linux/ath79/dts/qca9558_sophos_ap15.dts new file mode 100644 index 0000000000..bb4b058a9a --- /dev/null +++ b/target/linux/ath79/dts/qca9558_sophos_ap15.dts @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca955x.dtsi" + +#include +#include + +/ { + compatible = "sophos,ap15", "qca,qca9558"; + model = "Sophos AP15"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_yellow; + led-running = &led_status_green; + led-upgrade = &led_status_yellow; + label-mac-device = ð0; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led_status_yellow: status_yellow { + label = "yellow:status"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + art: partition@50000 { + label = "art"; + reg = <0x050000 0x010000>; + read-only; + }; + + config: partition@60000 { + label = "config"; + reg = <0x060000 0x010000>; + read-only; + }; + + partition@70000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x070000 0xf90000>; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0x10>; + + phy4: ethernet-phy@4 { + reg = <4>; + eee-broken-100tx; + eee-broken-1000t; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0xa6000000 0xa0000101 0xa0001313>; + + nvmem-cells = <&macaddr_config_201a>; + nvmem-cell-names = "mac-address"; + + phy-mode = "rgmii-id"; + phy-handle = <&phy4>; + + gmac_config: gmac-config { + device = <&gmac>; + + rgmii-enabled = <1>; + + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; + }; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_201a: macaddr@201a { + reg = <0x201a 0x6>; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 84221da80d..f10737f2fb 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -65,6 +65,7 @@ ath79_setup_interfaces() pisen,wmb001n|\ pisen,wmm003n|\ siemens,ws-ap3610|\ + sophos,ap15|\ sophos,ap55|\ sophos,ap55c|\ sophos,ap100|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 56e42f1e31..0aa3e006f6 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -30,6 +30,7 @@ case "$FIRMWARE" in qxwlan,e1700ac-v2-16m|\ qxwlan,e600gac-v2-8m|\ qxwlan,e600gac-v2-16m|\ + sophos,ap15|\ sophos,ap55|\ sophos,ap55c|\ sophos,ap100|\ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index cf8541f641..84016d451c 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -210,12 +210,20 @@ define Device/ubnt_routerstation-pro endef TARGET_DEVICES += ubnt_routerstation-pro -define Device/ubnt_unifi +define Device/ubnt_unifi-ap $(Device/ubnt-bz) DEVICE_MODEL := UniFi AP - SUPPORTED_DEVICES += unifi + SUPPORTED_DEVICES += unifi ubnt,unifi endef -TARGET_DEVICES += ubnt_unifi +TARGET_DEVICES += ubnt_unifi-ap + +define Device/ubnt_unifi-ap-lr + $(Device/ubnt-bz) + DEVICE_MODEL := UniFi AP + DEVICE_VARIANT := LR + SUPPORTED_DEVICES += unifi ubnt,unifi ubnt,unifi-ap +endef +TARGET_DEVICES += ubnt_unifi-ap-lr define Device/ubnt_unifiac DEVICE_VENDOR := Ubiquiti diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index f39a87c008..ae3c902409 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2419,6 +2419,15 @@ define Device/sitecom_wlr-8100 endef TARGET_DEVICES += sitecom_wlr-8100 +define Device/sophos_ap15 + SOC := qca9558 + DEVICE_VENDOR := Sophos + DEVICE_MODEL := AP15 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += sophos_ap15 + define Device/sophos_ap55 SOC := qca9558 DEVICE_VENDOR := Sophos diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds index 41c4fa2527..ce22d0e3ce 100644 --- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds @@ -17,6 +17,7 @@ glinet,gl-ar300m-nor) glinet,gl-xe300) ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10" + ucidef_set_led_netdev "3gnet" "LTE" "green:lte" "wwan0" ;; netgear,pgzng1) ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" diff --git a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch index ad19f8eaf9..713f01f20f 100644 --- a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch @@ -305,7 +305,7 @@ list_for_each_entry(p, head, list) { --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c -@@ -612,48 +612,53 @@ static void tcp_options_write(__be32 *pt +@@ -609,48 +609,53 @@ static void tcp_options_write(__be32 *pt u16 options = opts->options; /* mungable copy */ if (unlikely(OPTION_MD5 & options)) { @@ -382,7 +382,7 @@ } if (unlikely(opts->num_sack_blocks)) { -@@ -661,16 +666,17 @@ static void tcp_options_write(__be32 *pt +@@ -658,16 +663,17 @@ static void tcp_options_write(__be32 *pt tp->duplicate_sack : tp->selective_acks; int this_sack; @@ -406,7 +406,7 @@ } tp->rx_opt.dsack = 0; -@@ -683,13 +689,14 @@ static void tcp_options_write(__be32 *pt +@@ -680,13 +686,14 @@ static void tcp_options_write(__be32 *pt if (foc->exp) { len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; @@ -706,7 +706,7 @@ EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4092,14 +4092,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -4093,14 +4093,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch index ef9dab5508..1eaeefef00 100644 --- a/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.15/910-unaligned_access_hacks.patch @@ -305,7 +305,7 @@ list_for_each_entry(p, head, list) { --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c -@@ -613,48 +613,53 @@ static void tcp_options_write(__be32 *pt +@@ -610,48 +610,53 @@ static void tcp_options_write(__be32 *pt u16 options = opts->options; /* mungable copy */ if (unlikely(OPTION_MD5 & options)) { @@ -382,7 +382,7 @@ } if (unlikely(opts->num_sack_blocks)) { -@@ -662,16 +667,17 @@ static void tcp_options_write(__be32 *pt +@@ -659,16 +664,17 @@ static void tcp_options_write(__be32 *pt tp->duplicate_sack : tp->selective_acks; int this_sack; @@ -406,7 +406,7 @@ } tp->rx_opt.dsack = 0; -@@ -684,13 +690,14 @@ static void tcp_options_write(__be32 *pt +@@ -681,13 +687,14 @@ static void tcp_options_write(__be32 *pt if (foc->exp) { len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; @@ -706,7 +706,7 @@ EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4138,14 +4138,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -4140,14 +4140,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/generic/backport-5.15/780-v5.16-bus-mhi-pci_generic-Introduce-Sierra-EM919X-support.patch b/target/linux/generic/backport-5.15/780-v5.16-bus-mhi-pci_generic-Introduce-Sierra-EM919X-support.patch new file mode 100644 index 0000000000..5fe10e0caa --- /dev/null +++ b/target/linux/generic/backport-5.15/780-v5.16-bus-mhi-pci_generic-Introduce-Sierra-EM919X-support.patch @@ -0,0 +1,80 @@ +From 789d3eeb2367f92193a0882f7cdab03f0f9d6930 Mon Sep 17 00:00:00 2001 +From: Thomas Perrot +Date: Thu, 16 Dec 2021 13:42:27 +0530 +Subject: [PATCH] bus: mhi: pci_generic: Introduce Sierra EM919X support + +Add support for EM919X modems, this modem series is based on SDX55 +qcom chip. + +It is mandatory to use the same ring for control+data and diag events. + +Link: https://lore.kernel.org/r/20211123081541.648426-1-thomas.perrot@bootlin.com +Tested-by: Aleksander Morgado +Reviewed-by: Manivannan Sadhasivam +Signed-off-by: Thomas Perrot +Signed-off-by: Manivannan Sadhasivam +Link: https://lore.kernel.org/r/20211216081227.237749-11-manivannan.sadhasivam@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/bus/mhi/pci_generic.c | 43 +++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +--- a/drivers/bus/mhi/pci_generic.c ++++ b/drivers/bus/mhi/pci_generic.c +@@ -406,6 +406,46 @@ static const struct mhi_pci_dev_info mhi + .mru_default = 32768, + }; + ++static const struct mhi_channel_config mhi_sierra_em919x_channels[] = { ++ MHI_CHANNEL_CONFIG_UL_SBL(2, "SAHARA", 32, 0), ++ MHI_CHANNEL_CONFIG_DL_SBL(3, "SAHARA", 256, 0), ++ MHI_CHANNEL_CONFIG_UL(4, "DIAG", 32, 0), ++ MHI_CHANNEL_CONFIG_DL(5, "DIAG", 32, 0), ++ MHI_CHANNEL_CONFIG_UL(12, "MBIM", 128, 0), ++ MHI_CHANNEL_CONFIG_DL(13, "MBIM", 128, 0), ++ MHI_CHANNEL_CONFIG_UL(14, "QMI", 32, 0), ++ MHI_CHANNEL_CONFIG_DL(15, "QMI", 32, 0), ++ MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0), ++ MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0), ++ MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0", 512, 1), ++ MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0", 512, 2), ++}; ++ ++static struct mhi_event_config modem_sierra_em919x_mhi_events[] = { ++ /* first ring is control+data and DIAG ring */ ++ MHI_EVENT_CONFIG_CTRL(0, 2048), ++ /* Hardware channels request dedicated hardware event rings */ ++ MHI_EVENT_CONFIG_HW_DATA(1, 2048, 100), ++ MHI_EVENT_CONFIG_HW_DATA(2, 2048, 101) ++}; ++ ++static const struct mhi_controller_config modem_sierra_em919x_config = { ++ .max_channels = 128, ++ .timeout_ms = 24000, ++ .num_channels = ARRAY_SIZE(mhi_sierra_em919x_channels), ++ .ch_cfg = mhi_sierra_em919x_channels, ++ .num_events = ARRAY_SIZE(modem_sierra_em919x_mhi_events), ++ .event_cfg = modem_sierra_em919x_mhi_events, ++}; ++ ++static const struct mhi_pci_dev_info mhi_sierra_em919x_info = { ++ .name = "sierra-em919x", ++ .config = &modem_sierra_em919x_config, ++ .bar_num = MHI_PCI_DEFAULT_BAR_NUM, ++ .dma_data_width = 32, ++ .sideband_wake = false, ++}; ++ + static const struct mhi_channel_config mhi_telit_fn980_hw_v1_channels[] = { + MHI_CHANNEL_CONFIG_UL(14, "QMI", 32, 0), + MHI_CHANNEL_CONFIG_DL(15, "QMI", 32, 0), +@@ -480,6 +520,9 @@ static const struct mhi_pci_dev_info mhi + }; + + static const struct pci_device_id mhi_pci_id_table[] = { ++ /* EM919x (sdx55), use the same vid:pid as qcom-sdx55m */ ++ { PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0306, 0x18d7, 0x0200), ++ .driver_data = (kernel_ulong_t) &mhi_sierra_em919x_info }, + /* Telit FN980 hardware revision v1 */ + { PCI_DEVICE_SUB(PCI_VENDOR_ID_QCOM, 0x0306, 0x1C5D, 0x2000), + .driver_data = (kernel_ulong_t) &mhi_telit_fn980_hw_v1_info }, diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index b5ae117075..394b887cfb 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -18,6 +18,7 @@ CONFIG_64BIT_TIME=y # CONFIG_ACORN_PARTITION is not set # CONFIG_ACPI_ALS is not set # CONFIG_ACPI_APEI is not set +# CONFIG_ACPI_APEI_PCIEAER is not set # CONFIG_ACPI_BUTTON is not set # CONFIG_ACPI_CONFIGFS is not set # CONFIG_ACPI_CUSTOM_METHOD is not set @@ -1317,6 +1318,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_DWARF5 is not set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y +# CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_IRQFLAGS is not set CONFIG_DEBUG_KERNEL=y @@ -5132,6 +5134,7 @@ CONFIG_RTC_DRV_CMOS=y # CONFIG_RTC_DRV_MAX6900 is not set # CONFIG_RTC_DRV_MAX6902 is not set # CONFIG_RTC_DRV_MAX6916 is not set +# CONFIG_RTC_DRV_MAX77686 is not set # CONFIG_RTC_DRV_MCP795 is not set # CONFIG_RTC_DRV_MOXART is not set # CONFIG_RTC_DRV_MPC5121 is not set @@ -5169,6 +5172,7 @@ CONFIG_RTC_DRV_CMOS=y # CONFIG_RTC_DRV_SNVS is not set # CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_SUN6I is not set +# CONFIG_RTC_DRV_TEGRA is not set # CONFIG_RTC_DRV_TEST is not set # CONFIG_RTC_DRV_V3020 is not set # CONFIG_RTC_DRV_X1205 is not set @@ -5967,7 +5971,9 @@ CONFIG_SND_PROC_FS=y # CONFIG_SND_SOC_FSL_AUD2HTX is not set # CONFIG_SND_SOC_FSL_AUDMIX is not set # CONFIG_SND_SOC_FSL_ESAI is not set +# CONFIG_SND_SOC_IMX_RPMSG is not set # CONFIG_SND_SOC_FSL_MICFIL is not set +# CONFIG_SND_SOC_FSL_RPMSG is not set # CONFIG_SND_SOC_FSL_SAI is not set # CONFIG_SND_SOC_FSL_SPDIF is not set # CONFIG_SND_SOC_FSL_SSI is not set @@ -7465,6 +7471,7 @@ CONFIG_WLAN=y CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y # CONFIG_WQ_WATCHDOG is not set # CONFIG_WWAN is not set +# CONFIG_WWAN_HWSIM is not set # CONFIG_WW_MUTEX_SELFTEST is not set # CONFIG_X25 is not set # CONFIG_X509_CERTIFICATE_PARSER is not set diff --git a/target/linux/generic/hack-5.15/902-debloat_proc.patch b/target/linux/generic/hack-5.15/902-debloat_proc.patch index fef28464bc..33d637f13e 100644 --- a/target/linux/generic/hack-5.15/902-debloat_proc.patch +++ b/target/linux/generic/hack-5.15/902-debloat_proc.patch @@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c -@@ -3019,11 +3019,13 @@ static const struct seq_operations fib_r +@@ -3022,11 +3022,13 @@ static const struct seq_operations fib_r int __net_init fib_proc_init(struct net *net) { @@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau fib_triestat_seq_show, NULL)) goto out2; -@@ -3034,17 +3036,21 @@ int __net_init fib_proc_init(struct net +@@ -3037,17 +3039,21 @@ int __net_init fib_proc_init(struct net return 0; out3: diff --git a/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 0d1d3e1137..f788deabac 100644 --- a/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7055,7 +7055,7 @@ static void __ref alloc_node_mem_map(str +@@ -7059,7 +7059,7 @@ static void __ref alloc_node_mem_map(str if (pgdat == NODE_DATA(0)) { mem_map = NODE_DATA(0)->node_mem_map; if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-5.10/430-mtd-add-myloader-partition-parser.patch b/target/linux/generic/pending-5.10/430-mtd-add-myloader-partition-parser.patch index 0889c9a343..8a6e630530 100644 --- a/target/linux/generic/pending-5.10/430-mtd-add-myloader-partition-parser.patch +++ b/target/linux/generic/pending-5.10/430-mtd-add-myloader-partition-parser.patch @@ -20,7 +20,7 @@ Signed-off-by: Adrian Schmutzler + help + MyLoader is a bootloader which allows the user to define partitions + in flash devices, by putting a table in the second erase block -+ on the device, similar to a partition table. This table gives the ++ on the device, similar to a partition table. This table gives the + offsets and lengths of the user defined partitions. + + If you need code which can detect and parse these tables, and diff --git a/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index 30c70a6be9..4e347a4671 100644 --- a/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7552,7 +7552,7 @@ static void __init alloc_node_mem_map(st +@@ -7556,7 +7556,7 @@ static void __init alloc_node_mem_map(st if (pgdat == NODE_DATA(0)) { mem_map = NODE_DATA(0)->node_mem_map; if (page_to_pfn(mem_map) != pgdat->node_start_pfn) diff --git a/target/linux/generic/pending-5.15/430-mtd-add-myloader-partition-parser.patch b/target/linux/generic/pending-5.15/430-mtd-add-myloader-partition-parser.patch index 0889c9a343..8a6e630530 100644 --- a/target/linux/generic/pending-5.15/430-mtd-add-myloader-partition-parser.patch +++ b/target/linux/generic/pending-5.15/430-mtd-add-myloader-partition-parser.patch @@ -20,7 +20,7 @@ Signed-off-by: Adrian Schmutzler + help + MyLoader is a bootloader which allows the user to define partitions + in flash devices, by putting a table in the second erase block -+ on the device, similar to a partition table. This table gives the ++ on the device, similar to a partition table. This table gives the + offsets and lengths of the user defined partitions. + + If you need code which can detect and parse these tables, and diff --git a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch index 68960765bb..ac4396209e 100644 --- a/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch +++ b/target/linux/generic/pending-5.15/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch @@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski static void rt_fibinfo_free(struct rtable __rcu **rtp) --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c -@@ -2767,6 +2767,7 @@ static const char *const rtn_type_names[ +@@ -2770,6 +2770,7 @@ static const char *const rtn_type_names[ [RTN_THROW] = "THROW", [RTN_NAT] = "NAT", [RTN_XRESOLVE] = "XRESOLVE", diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts index 5a3f2e5836..ba88a81270 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3390.dts @@ -170,14 +170,14 @@ port@0 { reg = <0>; label = "lan3"; - phy-mode = "rgmii"; + phy-mode = "rgmii-rxid"; phy-handle = <&phy0>; }; port@1 { reg = <1>; label = "lan4"; - phy-mode = "rgmii"; + phy-mode = "rgmii-rxid"; phy-handle = <&phy1>; }; diff --git a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts new file mode 100644 index 0000000000..25287ebc0b --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts @@ -0,0 +1,132 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "netcore,nw5212", "ralink,mt7620a-soc"; + model = "Netcore NW5212"; + + aliases { + label-mac-device = ðernet; + }; + + leds { + compatible = "gpio-leds"; + + lan4 { + label = "green:lan4"; + gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "green:lan3"; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "green:lan2"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "green:lan1"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "green:wan"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <70000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "uartf", "wled", "ephy"; + function = "gpio"; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; + mediatek,portmap = "llllw"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; +}; diff --git a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts new file mode 100644 index 0000000000..6b4dde5432 --- /dev/null +++ b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620n.dtsi" + +#include +#include + +/ { + compatible = "netgear,pr2000", "ralink,mt7620n-soc"; + model = "Netgear PR2000"; + + aliases { + label-mac-device = ðernet; + }; + + leds { + compatible = "gpio-leds"; + + internet { + label = "green:internet"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + }; + + wifi { + label = "green:wifi"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + usb { + label = "green:usb"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + trigger-sources = <&ohci_port1>, <&ehci_port1>; + linux,default-trigger = "usbport"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wireless { + label = "wireless"; + gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + + wired { + label = "wired"; + gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + }; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + /* sercomm header for kernel starts at 0x3ffba + * can be safely ignored since not used by OpenWRT + */ + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x40000 0xf20000>; + }; + + factory: partition@f60000 { + label = "factory"; + reg = <0xf60000 0x10000>; + read-only; + }; + + board_data: partition@f70000 { + label = "board_data"; + reg = <0xf70000 0x10000>; + read-only; + }; + + partition@f80000 { + label = "POT"; + reg = <0xf80000 0x10000>; + read-only; + }; + + partition@f90000 { + label = "Traffic Meter"; + reg = <0xf90000 0x10000>; + read-only; + }; + + partition@fa0000 { + label = "Traffic Meter2"; + reg = <0xfa0000 0x10000>; + read-only; + }; + + partition@fb0000 { + label = "nvram"; + reg = <0xfb0000 0x10000>; + }; + + partition@fc0000 { + label = "DPF"; + reg = <0xfc0000 0x10000>; + read-only; + }; + + partition@fd0000 { + label = "ralink_nvram"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "reserved1"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + partition@ff0000 { + label = "reserved2"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + mtd-mac-address = <&board_data 0xb0>; + mediatek,portmap = "wllll"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; + mtd-mac-address = <&board_data 0xb0>; +}; + +&state_default { + default { + groups = "ephy", "wled", "pa", "i2c"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts new file mode 100644 index 0000000000..5ae0ca6e82 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts @@ -0,0 +1,243 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "asus,rp-ac56", "mediatek,mt7621-soc"; + model = "Asus RP-AC56"; + + aliases { + led-boot = &led_power_orange; + led-failsafe = &led_power_orange; + led-running = &led_power_white; + led-upgrade = &led_power_blue; + label-mac-device = &gmac0; + }; + + leds { + compatible = "gpio-leds"; + + wlan2g_red { + label = "red:wlan2g"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }; + + wlan2g_blue { + label = "blue:wlan2g"; + gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + + wlan2g_green { + label = "green:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + + wlan5g_red { + label = "red:wlan5g"; + gpios = <&gpio 45 GPIO_ACTIVE_HIGH>; + }; + + wlan5g_blue { + label = "blue:wlan5g"; + gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; + }; + + wlan5g_green { + label = "green:wlan5g"; + gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1tpt"; + }; + + led_power_white: power_white { + label = "white:power"; + gpios = <&gpio 48 GPIO_ACTIVE_HIGH>; + }; + + led_power_orange: power_orange { + label = "orange:power"; + gpios = <&gpio 47 GPIO_ACTIVE_HIGH>; + }; + + led_power_blue: power_blue { + label = "blue:power"; + gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 41 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "Audio-I2S"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&dailink0_master>; + simple-audio-card,frame-master = <&dailink0_master>; + simple-audio-card,routing = + "Headphone Jack", "HP_L", + "Headphone Jack", "HP_R"; + simple-audio-card,mclk-fs = <256>; + + simple-audio-card,cpu { + sound-dai = <&i2s>; + }; + + dailink0_master: simple-audio-card,codec { + sound-dai = <&codec>; + }; + }; +}; + +&gpio { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "nvram"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfa0000>; + }; + + radio: partition@ff0000 { + label = "radio"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "uart2"; + function = "gpio"; + }; +}; + +&pinctrl { + i2s_pins: i2s { + i2s { + groups = "uart3"; + function = "i2s"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; + +&i2c { + status = "okay"; + + codec: wm8960@18 { + #sound-dai-cells = <0>; + compatible = "wlf,wm8960"; + reg = <0x18>; + wlf,shared-lrclk; + }; +}; + +&gdma { + status = "okay"; +}; + +&i2s { + #sound-dai-cells = <0>; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2s_pins>; +}; diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts new file mode 100644 index 0000000000..ed8260534e --- /dev/null +++ b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts @@ -0,0 +1,217 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "zyxel,lte3301-plus", "mediatek,mt7621-soc"; + model = "ZyXEL LTE3301-Plus"; + + aliases { + label-mac-device = &gmac0; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + power_modem { + gpio-export,name = "power_modem"; + gpio-export,output = <1>; + gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + }; + + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "lte3301-plus:white:power"; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + }; + + wifi { + label = "lte3301-plus:white:wifi"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + internet { + label = "lte3301-plus:white:internet"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + }; + + usb { + label = "lte3301-plus:white:usb"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + }; + + lte { + label = "lte3301-plus:white:lte"; + gpios = <&gpio 26 GPIO_ACTIVE_LOW>; + }; + + mobile_green { + label = "lte3301-plus:green:mobile"; + gpios = <&gpio 31 GPIO_ACTIVE_LOW>; + }; + + mobile_orange { + label = "lte3301-plus:orange:mobile"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + mobile_red { + label = "lte3301-plus:red:mobile"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + }; + +}; + +&gpio { + status = "okay"; + + enable_usb_power { + gpio-hog; + line-name = "enable USB power"; + gpios = <7 GPIO_ACTIVE_HIGH>; + output-high; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot"; + reg = <0x00000 0x80000>; /* 64 KB */ + }; + partition@80000 { + label = "uboot_env"; + reg = <0x80000 0x80000>; /* 64 KB */ + }; + factory: partition@100000 { + label = "factory"; + reg = <0x100000 0x40000>; + }; + partition@140000 { + label = "Kernel"; + reg = <0x140000 0x1ec0000>; + }; + partition@2140000 { + label = "kernel2"; + reg = <0x2140000 0x1ec0000>; + }; + partition@4000000 { + label = "wwan"; + reg = <0x4000000 0x100000>; + }; + partition@4100000 { + label = "ubi"; + reg = <0x4100000 0x3ee0000>; + }; + }; +}; + +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + +&state_default { + gpio { + groups = "i2c", "rgmii2", "uart3", "jtag", "wdt"; + function = "gpio"; + }; + +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_fe6e>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan4"; + }; + port@1 { + status = "okay"; + label = "lan3"; + }; + port@2 { + status = "okay"; + label = "lan2"; + }; + port@3 { + status = "okay"; + label = "lan1"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + status = "okay"; + mt7615d@0,0 { + /* In reality at hangs at pcie1, this is a driver bug */ + compatible = "pci14c3,7615"; + reg = <0x0000 0 0 0 0>; + mediatek,firmware-eeprom = "mt7615e_eeprom.bin"; + mediatek,mtd-eeprom = <&factory 0x0000>; + nvmem-cells = <&macaddr_factory_fe6e>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(1)>; + }; + +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + mtd-mac-address = <&factory 0xfe6e>; + + macaddr_factory_fe6e: macaddr@fe6e { + reg = <0xfe6e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index 7bc001207b..8ef73dce80 100644 --- a/target/linux/ramips/dts/mt7628an.dtsi +++ b/target/linux/ramips/dts/mt7628an.dtsi @@ -76,7 +76,7 @@ compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc"; reg = <0x300 0x100>; - resets = <&rstctrl 20>; + resets = <&rstctrl 10>; reset-names = "mc"; interrupt-parent = <&intc>; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index caa03c19f3..9c4327143e 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -731,6 +731,16 @@ define Device/microduino_microwrt endef TARGET_DEVICES += microduino_microwrt +define Device/netcore_nw5212 + SOC := mt7620a + IMAGE_SIZE := 16064k + BLOCKSIZE := 4k + DEVICE_VENDOR := Netcore + DEVICE_MODEL := NW5212 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci +endef +TARGET_DEVICES += netcore_nw5212 + define Device/netgear_ex2700 SOC := mt7620a NETGEAR_HW_ID := 29764623+4+0+32+2x2+0 @@ -804,6 +814,21 @@ define Device/netgear_jwnr2010-v5 endef TARGET_DEVICES += netgear_jwnr2010-v5 +define Device/netgear_pr2000 + $(Device/netgear_sercomm_nor) + SOC := mt7620n + BLOCKSIZE := 4k + IMAGE_SIZE := 15488k + DEVICE_MODEL := PR2000 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci + SERCOMM_HWNAME := PR2000 + SERCOMM_HWID := AQ7 + SERCOMM_HWVER := A001 + SERCOMM_SWVER := 0x0000 + SERCOMM_PAD := 640k +endef +TARGET_DEVICES += netgear_pr2000 + define Device/netgear_wn3000rp-v3 SOC := mt7620a IMAGE_SIZE := 7872k diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index d96e37cb07..1e4530cd12 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -189,6 +189,22 @@ define Device/asiarf_ap7621-nv1 endef TARGET_DEVICES += asiarf_ap7621-nv1 +define Device/asus_rp-ac56 + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := RP-AC56 + IMAGE_SIZE := 16000k + BLOCKSIZE := 64k + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 \ + kmod-i2c-ralink kmod-sound-mt7620 + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ + check-size | append-metadata +endef +TARGET_DEVICES += asus_rp-ac56 + define Device/asus_rp-ac87 $(Device/dsa-migration) $(Device/uimage-lzma-loader) @@ -2244,6 +2260,25 @@ define Device/zio_freezio endef TARGET_DEVICES += zio_freezio +define Device/zyxel_lte3301-plus + $(Device/dsa-migration) + BLOCKSIZE := 128k + PAGESIZE := 2048 + UBINIZE_OPTS := -E 5 + DEVICE_VENDOR := ZyXEL + DEVICE_MODEL := LTE3301-PLUS + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \ + uboot-envtools kmod-usb-ledtrig-usbport kmod-usb-net-qmi-wwan \ + kmod-usb-serial-option uqmi + KERNEL := $(KERNEL_DTB) | uImage lzma | \ + zytrx-header $$(DEVICE_MODEL) $$(VERSION_DIST)-$$(REVISION) + KERNEL_INITRAMFS := $(KERNEL_DTB) | uImage lzma | \ + zytrx-header $$(DEVICE_MODEL) 9.99(ABQU.1)$$(VERSION_DIST)-recovery + KERNEL_INITRAMFS_SUFFIX := -recovery.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += zyxel_lte3301-plus + define Device/zyxel_nr7101 $(Device/dsa-migration) BLOCKSIZE := 128k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 1293c34cbf..b1dc36672d 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -160,6 +160,14 @@ lenovo,newifi-y1s) ucidef_set_led_netdev "wifi5g" "WIFI5G" "blue:wifi" "wlan0" ucidef_set_led_netdev "wan" "WAN" "blue:internet" "eth0.2" "tx rx" ;; +netcore,nw5212|\ +netgear,jwnr2010-v5) + ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x08" + ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x04" + ucidef_set_led_switch "lan3" "lan3" "green:lan3" "switch0" "0x02" + ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x01" + ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10" + ;; netgear,ex2700|\ netgear,wn3000rp-v3|\ netgear,wn3100rp-v2) @@ -170,12 +178,8 @@ netgear,ex6130) ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "green:router" "wlan0" ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "green:device" "wlan1" ;; -netgear,jwnr2010-v5) - ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x08" - ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x04" - ucidef_set_led_switch "lan3" "lan3" "green:lan3" "switch0" "0x02" - ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x01" - ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10" +netgear,pr2000) + ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01" ;; phicomm,psg1208) ucidef_set_led_netdev "wifi_led" "wifi" "white:wlan2g" "wlan0" diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index f7bc41669f..79df102056 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -111,6 +111,7 @@ ramips_setup_interfaces() "0:lan" "6@eth0" ;; dlink,dir-810l|\ + netcore,nw5212|\ netgear,jwnr2010-v5|\ phicomm,k2-v22.4|\ phicomm,k2-v22.5|\ @@ -202,6 +203,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch1" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; + netgear,pr2000|\ nexx,wt3020-4m|\ nexx,wt3020-8m) ucidef_add_switch "switch0" \ diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 4b912283e1..9f62a29aa7 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -168,6 +168,9 @@ zbtlink,zbt-wg1608-16m) ucidef_set_led_netdev "lan4" "LAN4" "green:lan-4" "lan4" ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" ;; +zyxel,lte3301-plus) + ucidef_set_led_netdev "internet" "internet" "white:internet" "wwan0" + ;; esac board_config_flush diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 400b03133e..7211422364 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -9,6 +9,7 @@ ramips_setup_interfaces() case $board in ampedwireless,ally-00x19k|\ + asus,rp-ac56|\ asus,rp-ac87|\ edimax,re23s|\ mikrotik,routerboard-m11g|\ @@ -75,7 +76,8 @@ ramips_setup_interfaces() ucidef_set_interface_lan "lan1 lan2" ;; linksys,re6500|\ - netgear,wac104) + netgear,wac104|\ + zyxel,lte3301-plus) ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ;; mikrotik,routerboard-750gr3) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches index ed728b07c4..4bf2aa37e0 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/03_gpio_switches @@ -22,6 +22,10 @@ ubnt,edgerouter-x-sfp) ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "403" ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "404" ;; +zyxel,lte3301-plus) + ucidef_add_gpio_switch "usb_power" "Power USB Port" "usb_power" "1" + ucidef_add_gpio_switch "lte_power" "Power LTE modem" "lte_power" "1" + ;; zyxel,nr7101) ucidef_add_gpio_switch "lte_reset" "Reset LTE/5G modem" "483" ;; diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount index 8382bdf0c5..4ebe50fdfe 100755 --- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount +++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount @@ -20,6 +20,11 @@ boot() { samknows,whitebox-v8) fw_setenv bootcount 0 ;; + zyxel,lte3301-plus) + [ $(printf %d $(fw_printenv -n DebugFlag)) -gt 0 ] || fw_setenv DebugFlag 1 + [ $(printf %d $(fw_printenv -n Image1Stable)) -gt 0 ] || fw_setenv Image1Stable 1 + [ $(printf %d $(fw_printenv -n Image1Try)) -gt 0 ] && fw_setenv Image1Try 0 + ;; zyxel,nr7101) [ $(printf %d $(fw_printenv -n DebugFlag)) -gt 0 ] || fw_setenv DebugFlag 0x1 [ $(printf %d $(fw_printenv -n Image1Stable)) -gt 0 ] || fw_setenv Image1Stable 1 diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index 9af46202ba..80490c377d 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -119,6 +119,7 @@ platform_do_upgrade() { ubnt,edgerouter-x-sfp) platform_upgrade_ubnt_erx "$1" ;; + zyxel,lte3301-plus|\ zyxel,nr7101) fw_setenv CheckBypass 0 fw_setenv Image1Stable 0 diff --git a/target/linux/realtek/dts-5.10/rtl8382_panasonic_m16eg-pn28160k.dts b/target/linux/realtek/dts-5.10/rtl8382_panasonic_m16eg-pn28160k.dts new file mode 100644 index 0000000000..c3b29a87ff --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8382_panasonic_m16eg-pn28160k.dts @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl838x.dtsi" +#include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi" + +#include + +/ { + compatible = "panasonic,m16eg-pn28160k", "realtek,rtl8382-soc"; + model = "Panasonic Switch-M16eG PN28160K"; + + 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/1 are "combo" port with each TP port (23/24), and they are + * connected to the RTL8218FB. Currently, there is no support for + * the chip and only TP ports work by the RTL8218D support. + */ + sfp0: sfp-p23 { + 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>; + }; + + sfp1: sfp-p24 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + tx-fault-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; + tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>; + los-gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>; + }; +}; + +&leds { + led_status_eco_amber: led-5 { + label = "amber:status_eco"; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + }; + + led_status_eco_green: led-6 { + label = "green:status_eco"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + color = ; + 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)>; +}; + +&gpio2 { + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + + /* + * GPIO12 (IO1_4): RTL8218FB + * + * This GPIO pin should be specified as "reset-gpio" in mdio node, but + * RTL8218FB phy won't be configured on RTL8218D support in the current + * phy driver. So, ethernet ports on the phy will be broken after hard- + * resetting. + * (RTL8218FB phy will be detected as RTL8218D by the phy driver) + * At the moment, configure this GPIO pin as gpio-hog to avoid breaking + * by resetting. + */ + ext_switch_reset { + gpio-hog; + gpios = <12 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "ext-switch-reset"; + }; +}; + +&i2c_switch { + i2c0: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + i2c1: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; +}; + +ðernet0 { + mdio-bus { + compatible = "realtek,rtl838x-mdio"; + #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) + + /* RTL8218FB */ + EXTERNAL_PHY(16) + EXTERNAL_PHY(17) + EXTERNAL_PHY(18) + EXTERNAL_PHY(19) + EXTERNAL_PHY(20) + EXTERNAL_PHY(21) + EXTERNAL_PHY(22) + EXTERNAL_PHY(23) + }; +}; + +&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) + + SWITCH_PORT(16, 9, qsgmii) + SWITCH_PORT(17, 10, qsgmii) + SWITCH_PORT(18, 11, qsgmii) + SWITCH_PORT(19, 12, qsgmii) + SWITCH_PORT(20, 13, qsgmii) + SWITCH_PORT(21, 14, qsgmii) + SWITCH_PORT(22, 15, qsgmii) + SWITCH_PORT(23, 16, qsgmii) + + port@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/target/linux/realtek/dts-5.10/rtl8382_panasonic_m24eg-pn28240k.dts b/target/linux/realtek/dts-5.10/rtl8382_panasonic_m24eg-pn28240k.dts new file mode 100644 index 0000000000..1fa9d2cdc7 --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8382_panasonic_m24eg-pn28240k.dts @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl838x.dtsi" +#include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi" + +#include + +/ { + compatible = "panasonic,m24eg-pn28240k", "realtek,rtl8382-soc"; + model = "Panasonic Switch-M24eG PN28240K"; + + 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/1 are "combo" port with each TP port (23/24), and they are + * connected to the RTL8218FB. Currently, there is no support for + * the chip and only TP ports work by the RTL8218D support. + */ + sfp0: sfp-p23 { + 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>; + }; + + sfp1: sfp-p24 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + tx-fault-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; + tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>; + los-gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>; + }; +}; + +&leds { + led_status_eco_amber: led-5 { + label = "amber:status_eco"; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + }; + + led_status_eco_green: led-6 { + label = "green:status_eco"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + color = ; + 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)>; +}; + +&gpio2 { + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + + /* + * GPIO12 (IO1_4): RTL8218B + RTL8218FB + * + * This GPIO pin should be specified as "reset-gpio" in mdio node, + * but the current configuration of RTL8218B phy in the phy driver + * seems to be incomplete and RTL8218FB phy won't be configured on + * RTL8218D support. So, ethernet ports on these phys will be broken + * after hard-resetting. + * (RTL8218FB phy will be detected as RTL8218D by the phy driver) + * At the moment, configure this GPIO pin as gpio-hog to avoid breaking + * by resetting. + */ + ext_switch_reset { + gpio-hog; + gpios = <12 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "ext-switch-reset"; + }; +}; + +&i2c_switch { + i2c0: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + i2c1: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; +}; + +ðernet0 { + mdio-bus { + compatible = "realtek,rtl838x-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + EXTERNAL_PHY(0) + EXTERNAL_PHY(1) + EXTERNAL_PHY(2) + EXTERNAL_PHY(3) + EXTERNAL_PHY(4) + EXTERNAL_PHY(5) + EXTERNAL_PHY(6) + EXTERNAL_PHY(7) + + INTERNAL_PHY(8) + INTERNAL_PHY(9) + INTERNAL_PHY(10) + INTERNAL_PHY(11) + INTERNAL_PHY(12) + INTERNAL_PHY(13) + INTERNAL_PHY(14) + INTERNAL_PHY(15) + + /* RTL8218FB */ + EXTERNAL_PHY(16) + EXTERNAL_PHY(17) + EXTERNAL_PHY(18) + EXTERNAL_PHY(19) + EXTERNAL_PHY(20) + EXTERNAL_PHY(21) + EXTERNAL_PHY(22) + EXTERNAL_PHY(23) + }; +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + 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@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/target/linux/realtek/dts-5.10/rtl8393_panasonic_m48eg-pn28480k.dts b/target/linux/realtek/dts-5.10/rtl8393_panasonic_m48eg-pn28480k.dts new file mode 100644 index 0000000000..6a7eb6eb81 --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8393_panasonic_m48eg-pn28480k.dts @@ -0,0 +1,380 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl839x.dtsi" +#include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi" + +#include + +/ { + compatible = "panasonic,m48eg-pn28480k", "realtek,rtl8393-soc"; + model = "Panasonic Switch-M48eG PN28480K"; + + 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; + }; + + fan: gpio-fan { + compatible = "gpio-fan"; + gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; + /* the actual speeds (rpm) are unknown, just use dummy values */ + gpio-fan,speed-map = <1 0>, <2 1>; + #cooling-cells = <2>; + }; + + /* + * sfp0/1/2/3 are "combo" port with each TP port (45/46/47/48), + * and they are connected to the RTL8218FB. Currently, there is + * no support for the chip and only TP ports work by the RTL8218B + * support. + */ + sfp0: sfp-p45 { + 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>; + }; + + sfp1: sfp-p46 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + tx-fault-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; + tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>; + los-gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>; + }; + + sfp2: sfp-p47 { + compatible = "sff,sfp"; + i2c-bus = <&i2c2>; + tx-fault-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>; + tx-disable-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 10 GPIO_ACTIVE_LOW>; + los-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>; + }; + + sfp3: sfp-p48 { + compatible = "sff,sfp"; + i2c-bus = <&i2c3>; + tx-fault-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; + tx-disable-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 14 GPIO_ACTIVE_LOW>; + los-gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>; + }; + + thermal-zones { + /* + * Zone for SoC temperature + * + * Fan speed: + * + * - 0-44 celsius: Low + * - 45-54 celsius: High + */ + cpu-thermal { + polling-delay-passive = <1000>; + polling-delay = <2000>; + + thermal-sensors = <&tsens_soc>; + + trips { + cpu_alert: trip-point { + temperature = <45000>; + hysteresis = <4000>; + type = "active"; + }; + + cpu_crit { + temperature = <55000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + map { + trip = <&cpu_alert>; + cooling-device = <&fan 0 1>; + }; + }; + }; + + /* + * Zone for system temperature + * + * Fan speed: + * + * - 0-39 celsius: Low + * - 40-49 celsius: High + * + * Note: official recommended ranges of temperature on each + * fan speed setting: + * + * - Low speed : 0-40 celsius + * - High speed: 0-50 celsius + * + * (stock firmware doesn't support auto-selection of + * speed and need to be selected manually by user) + */ + sys-thermal { + polling-delay-passive = <1000>; + polling-delay = <2000>; + + thermal-sensors = <&tsens_sys>; + + trips { + sys_alert: trip-point { + temperature = <40000>; + hysteresis = <4000>; + type = "active"; + }; + + sys_crit { + temperature = <50000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map { + trip = <&sys_alert>; + cooling-device = <&fan 0 1>; + }; + }; + }; + }; +}; + +&leds { + led_status_eco_amber: led-5 { + label = "amber:status_eco"; + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + }; + + led_status_eco_green: led-6 { + label = "green:status_eco"; + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; + color = ; + function = LED_FUNCTION_STATUS; + function-enumerator = <2>; + }; +}; + +&i2c_gpio_0 { + scl-gpios = <&gpio0 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio0 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + + /* Microchip TCN75A (for SoC) */ + tsens_soc: sensor@48 { + compatible = "microchip,tcn75"; + reg = <0x48>; + #thermal-sensor-cells = <0>; + }; + + /* Microchip TCN75A (for System) */ + tsens_sys: sensor@49 { + compatible = "microchip,tcn75"; + reg = <0x49>; + #thermal-sensor-cells = <0>; + }; +}; + +&i2c_gpio_1 { + scl-gpios = <&gpio0 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio0 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; +}; + +&gpio2 { + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio0>; + interrupts = <18 IRQ_TYPE_EDGE_FALLING>; + + /* + * GPIO12 (IO1_4): 5x RTL8218B + RTL8218FB + * + * This GPIO pin should be specified as "reset-gpio" in mdio node, + * but the current configuration of RTL8218B phy in the phy driver + * seems to be incomplete and RTL8218FB phy won't be configured on + * RTL8218D support. So, ethernet ports on these phys will be broken + * after hard-resetting. + * (RTL8218FB phy will be detected as RTL8218D by the phy driver) + * At the moment, configure this GPIO pin as gpio-hog to avoid breaking + * by resetting. + */ + ext_switch_reset { + gpio-hog; + gpios = <12 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "ext-switch-reset"; + }; +}; + +&i2c_switch { + i2c0: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + i2c1: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + i2c2: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + i2c3: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; +}; + +ðernet0 { + mdio-bus { + compatible = "realtek,rtl838x-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + 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(8) + EXTERNAL_PHY(9) + EXTERNAL_PHY(10) + EXTERNAL_PHY(11) + EXTERNAL_PHY(12) + EXTERNAL_PHY(13) + EXTERNAL_PHY(14) + EXTERNAL_PHY(15) + + EXTERNAL_PHY(16) + EXTERNAL_PHY(17) + EXTERNAL_PHY(18) + EXTERNAL_PHY(19) + EXTERNAL_PHY(20) + EXTERNAL_PHY(21) + EXTERNAL_PHY(22) + EXTERNAL_PHY(23) + + EXTERNAL_PHY(24) + EXTERNAL_PHY(25) + EXTERNAL_PHY(26) + EXTERNAL_PHY(27) + EXTERNAL_PHY(28) + EXTERNAL_PHY(29) + EXTERNAL_PHY(30) + EXTERNAL_PHY(31) + + EXTERNAL_PHY(32) + EXTERNAL_PHY(33) + EXTERNAL_PHY(34) + EXTERNAL_PHY(35) + EXTERNAL_PHY(36) + EXTERNAL_PHY(37) + EXTERNAL_PHY(38) + EXTERNAL_PHY(39) + + /* RTL8218FB */ + EXTERNAL_PHY(40) + EXTERNAL_PHY(41) + EXTERNAL_PHY(42) + EXTERNAL_PHY(43) + EXTERNAL_PHY(44) + EXTERNAL_PHY(45) + EXTERNAL_PHY(46) + EXTERNAL_PHY(47) + }; +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + 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, qsgmii) + SWITCH_PORT(9, 10, qsgmii) + SWITCH_PORT(10, 11, qsgmii) + SWITCH_PORT(11, 12, qsgmii) + SWITCH_PORT(12, 13, qsgmii) + SWITCH_PORT(13, 14, qsgmii) + SWITCH_PORT(14, 15, qsgmii) + SWITCH_PORT(15, 16, qsgmii) + + 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) + + SWITCH_PORT(24, 25, qsgmii) + SWITCH_PORT(25, 26, qsgmii) + SWITCH_PORT(26, 27, qsgmii) + SWITCH_PORT(27, 28, qsgmii) + SWITCH_PORT(28, 29, qsgmii) + SWITCH_PORT(29, 30, qsgmii) + SWITCH_PORT(30, 31, qsgmii) + SWITCH_PORT(31, 32, qsgmii) + + SWITCH_PORT(32, 33, qsgmii) + SWITCH_PORT(33, 34, qsgmii) + SWITCH_PORT(34, 35, qsgmii) + SWITCH_PORT(35, 36, qsgmii) + SWITCH_PORT(36, 37, qsgmii) + SWITCH_PORT(37, 38, qsgmii) + SWITCH_PORT(38, 39, qsgmii) + SWITCH_PORT(39, 40, qsgmii) + + SWITCH_PORT(40, 41, qsgmii) + SWITCH_PORT(41, 42, qsgmii) + SWITCH_PORT(42, 43, qsgmii) + SWITCH_PORT(43, 44, qsgmii) + SWITCH_PORT(44, 45, qsgmii) + SWITCH_PORT(45, 46, qsgmii) + SWITCH_PORT(46, 47, qsgmii) + SWITCH_PORT(47, 48, qsgmii) + + port@52 { + ethernet = <ðernet0>; + reg = <52>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/target/linux/realtek/dts-5.10/rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi b/target/linux/realtek/dts-5.10/rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi index 48aa1849d6..fb2aa18d21 100644 --- a/target/linux/realtek/dts-5.10/rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi +++ b/target/linux/realtek/dts-5.10/rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi @@ -94,6 +94,7 @@ /* * GPIO14 (IO1_6): Shift Register RESET (port LED) * - Switch-M8eG PN28080K: 3x 74HC164 + * - Switch-M16eG PN28160K: 4x 74HC164 * - Switch-M24eG PN28240K: 6x 74HC164 * - Switch-M48eG PN28480K: 12x 74HC164 */ diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index 60eda5359d..9e1dd0308d 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -138,6 +138,26 @@ define Device/netgear_gs310tp-v1 endef TARGET_DEVICES += netgear_gs310tp-v1 +define Device/panasonic_m16eg-pn28160k + SOC := rtl8382 + IMAGE_SIZE := 16384k + DEVICE_VENDOR := Panasonic + DEVICE_MODEL := Switch-M16eG + DEVICE_VARIANT := PN28160K + DEVICE_PACKAGES := kmod-i2c-mux-pca954x +endef +TARGET_DEVICES += panasonic_m16eg-pn28160k + +define Device/panasonic_m24eg-pn28240k + SOC := rtl8382 + IMAGE_SIZE := 16384k + DEVICE_VENDOR := Panasonic + DEVICE_MODEL := Switch-M24eG + DEVICE_VARIANT := PN28240K + DEVICE_PACKAGES := kmod-i2c-mux-pca954x +endef +TARGET_DEVICES += panasonic_m24eg-pn28240k + define Device/panasonic_m8eg-pn28080k SOC := rtl8380 IMAGE_SIZE := 16384k diff --git a/target/linux/realtek/image/rtl839x.mk b/target/linux/realtek/image/rtl839x.mk index 2363b91849..8917e8550f 100644 --- a/target/linux/realtek/image/rtl839x.mk +++ b/target/linux/realtek/image/rtl839x.mk @@ -1,5 +1,16 @@ # SPDX-License-Identifier: GPL-2.0-only +define Device/panasonic_m48eg-pn28480k + SOC := rtl8393 + IMAGE_SIZE := 16384k + DEVICE_VENDOR := Panasonic + DEVICE_MODEL := Switch-M48eG + DEVICE_VARIANT := PN28480K + DEVICE_PACKAGES := kmod-hwmon-gpiofan kmod-hwmon-lm75 kmod-i2c-mux-pca954x \ + kmod-thermal +endef +TARGET_DEVICES += panasonic_m48eg-pn28480k + define Device/zyxel_gs1900-48 SOC := rtl8393 IMAGE_SIZE := 13952k diff --git a/target/linux/realtek/patches-5.10/300-mips-add-rtl838x-platform.patch b/target/linux/realtek/patches-5.10/300-mips-add-rtl838x-platform.patch index 8292c82ef1..373bcff421 100644 --- a/target/linux/realtek/patches-5.10/300-mips-add-rtl838x-platform.patch +++ b/target/linux/realtek/patches-5.10/300-mips-add-rtl838x-platform.patch @@ -49,7 +49,7 @@ + select SYS_SUPPORTS_MULTITHREADING + +config RTL930X -+ bool "Realtek RTL839X based platforms" ++ bool "Realtek RTL930X based platforms" + depends on RTL83XX + select MIPS_CPU_SCACHE + select CSRC_R4K diff --git a/target/linux/realtek/rtl839x/config-5.10 b/target/linux/realtek/rtl839x/config-5.10 index 76a0517ede..1b4e1de43f 100644 --- a/target/linux/realtek/rtl839x/config-5.10 +++ b/target/linux/realtek/rtl839x/config-5.10 @@ -70,6 +70,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 @@ -169,6 +171,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 diff --git a/target/linux/x86/patches-5.10/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch b/target/linux/x86/patches-5.10/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch new file mode 100644 index 0000000000..3cff37c918 --- /dev/null +++ b/target/linux/x86/patches-5.10/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch @@ -0,0 +1,52 @@ +From: Hans de Goede +Date: Thu, 28 Jul 2022 20:06:35 +0200 +Subject: platform/x86: pmc_atom: Match all Lex BayTrail boards with + critclk_systems DMI table + +The critclk_systems[] DMI match table already contains 2 Lex BayTrail +boards and patches were just submitted to add 3 more entries for the +following models: 3I380NX, 3I380A, 3I380CW. + +Looking at: https://www.lex.com.tw/products/embedded-ipc-board/ +we can see that Lex BayTrail makes many embedded boards with +multiple ethernet boards and none of their products are battery +powered so we don't need to worry (too much) about power consumption +when suspended. + +Add a new DMI match which simply matches all Lex BayTrail boards and drop +the 2 existing board specific quirks. + +Reported-by: Michael Schöne +Reported-by: Paul Spooren +Reported-by: Matwey V. Kornilov +Signed-off-by: Hans de Goede +--- +--- a/drivers/platform/x86/pmc_atom.c ++++ b/drivers/platform/x86/pmc_atom.c +@@ -376,19 +376,15 @@ + }, + }, + { +- /* pmc_plt_clk0 - 3 are used for the 4 ethernet controllers */ +- .ident = "Lex 3I380D", ++ /* ++ * Lex System / Lex Computech Co. makes a lot of Bay Trail ++ * based embedded boards which often come with multiple ++ * ethernet controllers using multiple pmc_plt_clks. See: ++ * https://www.lex.com.tw/products/embedded-ipc-board/ ++ */ ++ .ident = "Lex BayTrail", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"), +- DMI_MATCH(DMI_PRODUCT_NAME, "3I380D"), +- }, +- }, +- { +- /* pmc_plt_clk* - are used for ethernet controllers */ +- .ident = "Lex 2I385SW", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"), +- DMI_MATCH(DMI_PRODUCT_NAME, "2I385SW"), + }, + }, + { diff --git a/target/linux/x86/patches-5.15/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch b/target/linux/x86/patches-5.15/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch new file mode 100644 index 0000000000..3cff37c918 --- /dev/null +++ b/target/linux/x86/patches-5.15/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch @@ -0,0 +1,52 @@ +From: Hans de Goede +Date: Thu, 28 Jul 2022 20:06:35 +0200 +Subject: platform/x86: pmc_atom: Match all Lex BayTrail boards with + critclk_systems DMI table + +The critclk_systems[] DMI match table already contains 2 Lex BayTrail +boards and patches were just submitted to add 3 more entries for the +following models: 3I380NX, 3I380A, 3I380CW. + +Looking at: https://www.lex.com.tw/products/embedded-ipc-board/ +we can see that Lex BayTrail makes many embedded boards with +multiple ethernet boards and none of their products are battery +powered so we don't need to worry (too much) about power consumption +when suspended. + +Add a new DMI match which simply matches all Lex BayTrail boards and drop +the 2 existing board specific quirks. + +Reported-by: Michael Schöne +Reported-by: Paul Spooren +Reported-by: Matwey V. Kornilov +Signed-off-by: Hans de Goede +--- +--- a/drivers/platform/x86/pmc_atom.c ++++ b/drivers/platform/x86/pmc_atom.c +@@ -376,19 +376,15 @@ + }, + }, + { +- /* pmc_plt_clk0 - 3 are used for the 4 ethernet controllers */ +- .ident = "Lex 3I380D", ++ /* ++ * Lex System / Lex Computech Co. makes a lot of Bay Trail ++ * based embedded boards which often come with multiple ++ * ethernet controllers using multiple pmc_plt_clks. See: ++ * https://www.lex.com.tw/products/embedded-ipc-board/ ++ */ ++ .ident = "Lex BayTrail", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"), +- DMI_MATCH(DMI_PRODUCT_NAME, "3I380D"), +- }, +- }, +- { +- /* pmc_plt_clk* - are used for ethernet controllers */ +- .ident = "Lex 2I385SW", +- .matches = { +- DMI_MATCH(DMI_SYS_VENDOR, "Lex BayTrail"), +- DMI_MATCH(DMI_PRODUCT_NAME, "2I385SW"), + }, + }, + {