Merge Mainline

Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
This commit is contained in:
ZiMing Mo 2022-08-10 00:55:30 +08:00
commit 6405720a29
No known key found for this signature in database
GPG Key ID: 1BED2E3A77AE5ECF
69 changed files with 2571 additions and 284 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .134 LINUX_VERSION-5.10 = .135
LINUX_KERNEL_HASH-5.10.134 = ec3513acdf033dd8f8ac2545cd1bb826b0669e151185e5f70408a5c9fe273269 LINUX_KERNEL_HASH-5.10.135 = e499a61be9ce670716dd27b5124bb9ef6c6bc0e8fab443abf717a77136543344

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .58 LINUX_VERSION-5.15 = .59
LINUX_KERNEL_HASH-5.15.58 = d75bd9579c4b318e6162e21c591878fd37efda0f79c5cdd0dc4eb9ea9dfc4fa8 LINUX_KERNEL_HASH-5.15.59 = e6ddc642057340db06b3b921c2b31bfed2c611359e8f144c3e5cf9c3ac33bccb

View File

@ -29,7 +29,7 @@ load_led() {
config_get delay $1 delay "150" config_get delay $1 delay "150"
config_get message $1 message "" config_get message $1 message ""
config_get gpio $1 gpio "0" config_get gpio $1 gpio "0"
config_get inverted $1 inverted "0" config_get_bool inverted $1 inverted "0"
# execute application led trigger # execute application led trigger
[ -f "/usr/libexec/led-trigger/${trigger}" ] && { [ -f "/usr/libexec/led-trigger/${trigger}" ] && {
@ -69,6 +69,10 @@ load_led() {
return 1 return 1
} }
case "$trigger" in case "$trigger" in
"heartbeat")
echo "${inverted}" > "/sys/class/leds/${sysfs}/invert"
;;
"netdev") "netdev")
[ -n "$dev" ] && { [ -n "$dev" ] && {
echo $dev > /sys/class/leds/${sysfs}/device_name echo $dev > /sys/class/leds/${sysfs}/device_name

View File

@ -126,6 +126,7 @@ plasmacloud,pa300e)
qihoo,c301) qihoo,c301)
ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000" ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
;; ;;
sophos,ap15|\
sophos,ap55|\ sophos,ap55|\
sophos,ap55c|\ sophos,ap55c|\
sophos,ap100|\ sophos,ap100|\

View File

@ -47,7 +47,8 @@ zte,mf283plus)
h3c,tx1800-plus|\ h3c,tx1800-plus|\
h3c,tx1801-plus|\ h3c,tx1801-plus|\
h3c,tx1806|\ h3c,tx1806|\
jcg,q20) jcg,q20|\
netgear,wax202)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;; ;;
hootoo,ht-tm05|\ hootoo,ht-tm05|\
@ -80,6 +81,9 @@ xiaomi,redmi-router-ac2100)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "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) zyxel,nr7101)
idx="$(find_mtd_index Config)" idx="$(find_mtd_index Config)"
[ -n "$idx" ] && \ [ -n "$idx" ] && \
@ -94,6 +98,6 @@ xiaomi,mi-router-cr6609)
esac esac
config_load ubootenv config_load ubootenv
config_foreach ubootenv_add_app_config ubootenv config_foreach ubootenv_add_app_config
exit 0 exit 0

View File

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=trace-cmd PKG_NAME:=trace-cmd
PKG_VERSION:=v2.9.1 PKG_VERSION:=v3.1.2
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 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_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/
PKG_HASH:=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38 PKG_HASH:=206672af60aa0bc35cfc44a4be746efa575bac729060e54b6453f7d5dfbcd979
PKG_LICENSE:=GPL-2.0-only PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING
@ -21,42 +21,27 @@ define Package/trace-cmd
SECTION:=devel SECTION:=devel
CATEGORY:=Development CATEGORY:=Development
TITLE:=Linux trace command line utility TITLE:=Linux trace command line utility
DEPENDS:= DEPENDS:=+libtracefs +zlib
endef endef
define Package/trace-cmd-extra define Package/trace-cmd-extra
SECTION:=devel SECTION:=devel
CATEGORY:=Development CATEGORY:=Development
TITLE:=Extra plugins for trace-cmd TITLE:=Extra plugins for trace-cmd
DEPENDS:= DEPENDS:=+libtraceevent-extra
endef endef
MAKE_FLAGS += \ MAKE_FLAGS += \
NO_PYTHON=1 \ NO_PYTHON=1 \
NO_AUDIT=1 \ NO_AUDIT=1 \
NO_LIBZSTD=1 \
prefix=/usr 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 TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE
define Package/trace-cmd/install define Package/trace-cmd/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/ $(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 endef
$(eval $(call BuildPackage,trace-cmd)) $(eval $(call BuildPackage,trace-cmd))

View File

@ -1,104 +0,0 @@
From 1a000636c1828eecdcec5360a51623ef4ffbff04 Mon Sep 17 00:00:00 2001
From: Beniamin Sandu <beniaminsandu@gmail.com>
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) <tz.stoyanov@gmail.com>
Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com>
[ Fixed a whitespace issue ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
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 <pthread.h>
#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 <byteswap.h>
#endif /* _TRACE_CMD_LOCAL_H */
--- a/lib/tracefs/tracefs-events.c
+++ b/lib/tracefs/tracefs-events.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <limits.h>
#include "kbuffer.h"
#include "tracefs.h"
--- a/tracecmd/include/trace-local.h
+++ b/tracecmd/include/trace-local.h
@@ -8,6 +8,7 @@
#include <sys/types.h>
#include <dirent.h> /* for DIR */
+#include <limits.h>
#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);

View File

@ -0,0 +1,38 @@
From 4fcc23ee4291f445cada012b6bef6879274a25f1 Mon Sep 17 00:00:00 2001
From: Nick Hainke <vincent@systemli.org>
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 <vincent@systemli.org>
---
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 <CUnit/Basic.h>\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

View File

@ -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");

View File

@ -1402,8 +1402,9 @@ define KernelPackage/mhi-wwan-ctrl
SUBMENU:=$(NETWORK_DEVICES_MENU) SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=MHI WWAN Control TITLE:=MHI WWAN Control
DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus
KCONFIG:=CONFIG_MHI_WWAN_CTRL KCONFIG:=CONFIG_MHI_WWAN_CTRL \
FILES:=$(LINUX_DIR)/drivers/net/mhi_wwan_ctrl.ko CONFIG_WWAN=y
FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_ctrl.ko
AUTOLOAD:=$(call AutoProbe,mhi_wwan_ctrl) AUTOLOAD:=$(call AutoProbe,mhi_wwan_ctrl)
endef endef
@ -1418,8 +1419,9 @@ define KernelPackage/mhi-wwan-mbim
SUBMENU:=$(NETWORK_DEVICES_MENU) SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=MHI MBIM TITLE:=MHI MBIM
DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus
KCONFIG:=CONFIG_MHI_WWAN_MBIM KCONFIG:=CONFIG_MHI_WWAN_MBIM \
FILES:=$(LINUX_DIR)/drivers/net/mhi_wwan_mbim.ko CONFIG_WWAN=y
FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_mbim.ko
AUTOLOAD:=$(call AutoProbe,mhi_wwan_mbim) AUTOLOAD:=$(call AutoProbe,mhi_wwan_mbim)
endef endef

View File

@ -348,6 +348,7 @@ IPSET_MODULES:= \
ipset/ip_set_bitmap_ipmac \ ipset/ip_set_bitmap_ipmac \
ipset/ip_set_bitmap_port \ ipset/ip_set_bitmap_port \
ipset/ip_set_hash_ip \ ipset/ip_set_hash_ip \
ipset/ip_set_hash_ipmac \
ipset/ip_set_hash_ipmark \ ipset/ip_set_hash_ipmark \
ipset/ip_set_hash_ipport \ ipset/ip_set_hash_ipport \
ipset/ip_set_hash_ipportip \ ipset/ip_set_hash_ipportip \

View File

@ -738,12 +738,8 @@ endef
$(eval $(call KernelPackage,mppe)) $(eval $(call KernelPackage,mppe))
SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko)) 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_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_FILES_CORE = $(foreach mod,$(SCHED_MODULES_CORE),$(LINUX_DIR)/net/sched/$(mod).ko)
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))
define KernelPackage/sched-core define KernelPackage/sched-core
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
@ -754,7 +750,6 @@ define KernelPackage/sched-core
CONFIG_NET_SCH_HTB \ CONFIG_NET_SCH_HTB \
CONFIG_NET_SCH_TBF \ CONFIG_NET_SCH_TBF \
CONFIG_NET_SCH_INGRESS \ CONFIG_NET_SCH_INGRESS \
CONFIG_NET_SCH_FQ_CODEL \
CONFIG_NET_CLS=y \ CONFIG_NET_CLS=y \
CONFIG_NET_CLS_ACT=y \ CONFIG_NET_CLS_ACT=y \
CONFIG_NET_CLS_BASIC \ CONFIG_NET_CLS_BASIC \
@ -769,7 +764,7 @@ define KernelPackage/sched-core
CONFIG_NET_CLS_MATCHALL \ CONFIG_NET_CLS_MATCHALL \
CONFIG_NET_EMATCH=y \ CONFIG_NET_EMATCH=y \
CONFIG_NET_EMATCH_U32 CONFIG_NET_EMATCH_U32
FILES:=$(SCHED_FILES) FILES:=$(SCHED_FILES_CORE)
AUTOLOAD:=$(call AutoLoad,70, $(SCHED_MODULES_CORE)) AUTOLOAD:=$(call AutoLoad,70, $(SCHED_MODULES_CORE))
endef endef
@ -780,35 +775,36 @@ endef
$(eval $(call KernelPackage,sched-core)) $(eval $(call KernelPackage,sched-core))
define KernelPackage/sched-cake define KernelPackage/sched-act-police
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Cake fq_codel/blue derived shaper TITLE:=Traffic Policing
DEPENDS:=+kmod-sched-core DEPENDS:=+kmod-sched-core
KCONFIG:=CONFIG_NET_SCH_CAKE KCONFIG:=CONFIG_NET_ACT_POLICE
FILES:=$(LINUX_DIR)/net/sched/sch_cake.ko FILES:=$(LINUX_DIR)/net/sched/act_police.ko
AUTOLOAD:=$(call AutoProbe,sch_cake) AUTOLOAD:=$(call AutoProbe,act_police)
endef endef
define KernelPackage/sched-cake/description $(eval $(call KernelPackage,sched-act-police))
Common Applications Kept Enhanced fq_codel/blue derived shaper
endef
$(eval $(call KernelPackage,sched-cake))
define KernelPackage/sched-flower define KernelPackage/sched-act-sample
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Flower traffic classifier TITLE:=Traffic Sampling
DEPENDS:=+kmod-sched-core DEPENDS:=+kmod-sched-core
KCONFIG:=CONFIG_NET_CLS_FLOWER KCONFIG:= \
FILES:=$(LINUX_DIR)/net/sched/cls_flower.ko CONFIG_NET_ACT_SAMPLE \
AUTOLOAD:=$(call AutoProbe, cls_flower) CONFIG_PSAMPLE
FILES:= \
$(LINUX_DIR)/net/psample/psample.ko \
$(LINUX_DIR)/net/sched/act_sample.ko
AUTOLOAD:=$(call AutoProbe,act_sample psample)
endef endef
define KernelPackage/sched-flower/description define KernelPackage/sched-act-sample/description
Allows to classify packets based on a configurable combination of packet keys and masks. Packet sampling tc action.
endef endef
$(eval $(call KernelPackage,sched-flower)) $(eval $(call KernelPackage,sched-act-sample))
define KernelPackage/sched-act-vlan define KernelPackage/sched-act-vlan
@ -827,55 +823,6 @@ endef
$(eval $(call KernelPackage,sched-act-vlan)) $(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 define KernelPackage/sched-bpf
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Traffic shaper support for Berkeley Packet Filter TITLE:=Traffic shaper support for Berkeley Packet Filter
@ -891,6 +838,138 @@ endef
$(eval $(call KernelPackage,sched-bpf)) $(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 define KernelPackage/bpf-test
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Test Berkeley Packet Filter functionality TITLE:=Test Berkeley Packet Filter functionality
@ -901,23 +980,22 @@ endef
$(eval $(call KernelPackage,bpf-test)) $(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 define KernelPackage/sched
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=Extra traffic schedulers 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:= \ KCONFIG:= \
CONFIG_NET_SCH_CODEL \ CONFIG_NET_SCH_CODEL \
CONFIG_NET_SCH_DSMARK \ CONFIG_NET_SCH_DSMARK \
CONFIG_NET_SCH_FIFO \
CONFIG_NET_SCH_GRED \ CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_MULTIQ \ CONFIG_NET_SCH_MULTIQ \
CONFIG_NET_SCH_PRIO \
CONFIG_NET_SCH_RED \
CONFIG_NET_SCH_SFQ \ CONFIG_NET_SCH_SFQ \
CONFIG_NET_SCH_TEQL \ CONFIG_NET_SCH_TEQL \
CONFIG_NET_SCH_FQ \ CONFIG_NET_SCH_FQ \
CONFIG_NET_SCH_PIE \ CONFIG_NET_SCH_PIE \
CONFIG_NET_ACT_POLICE \
CONFIG_NET_ACT_IPT \ CONFIG_NET_ACT_IPT \
CONFIG_NET_ACT_PEDIT \ CONFIG_NET_ACT_PEDIT \
CONFIG_NET_ACT_SIMP \ CONFIG_NET_ACT_SIMP \

View File

@ -1542,8 +1542,8 @@ $(eval $(call KernelPackage,usb-hid))
define KernelPackage/usb-hid-cp2112 define KernelPackage/usb-hid-cp2112
SUBMENU:=$(USB_MENU) SUBMENU:=$(USB_MENU)
TITLE:=Silicon Labs CP2112 HID USB to SMBus Master Bridge TITLE:=Silicon Labs CP2112 HID USB to SMBus Master Bridge
KCONFIG:=CONFIG_GPIOLIB=y CONFIG_HID_CP2112 KCONFIG:=CONFIG_HID_CP2112
DEPENDS:=+kmod-usb-hid +kmod-i2c-core DEPENDS:=@GPIO_SUPPORT +kmod-usb-hid +kmod-i2c-core
FILES:=$(LINUX_DIR)/drivers/hid/hid-cp2112.ko FILES:=$(LINUX_DIR)/drivers/hid/hid-cp2112.ko
AUTOLOAD:=$(call AutoProbe,hid-cp2112) AUTOLOAD:=$(call AutoProbe,hid-cp2112)
endef endef
@ -1556,6 +1556,23 @@ endef
$(eval $(call KernelPackage,usb-hid-cp2112)) $(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 define KernelPackage/usb-yealink
TITLE:=USB Yealink VOIP phone TITLE:=USB Yealink VOIP phone
DEPENDS:=+kmod-input-evdev DEPENDS:=+kmod-input-evdev

View File

@ -0,0 +1,46 @@
From aa40d5a43526cca9439a2b45fcfdcd016594dece Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
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 <syzbot+eceab52db7c4b961e9d6@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: f856373e2f31ffd3 ("wifi: mac80211: do not wake queues on a vif that is being stopped")
Tested-by: syzbot <syzbot+eceab52db7c4b961e9d6@syzkaller.appspotmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
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 <kuba@kernel.org>
---
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)

View File

@ -7,12 +7,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=elfutils PKG_NAME:=elfutils
PKG_VERSION:=0.186 PKG_VERSION:=0.187
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
PKG_HASH:=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177 PKG_HASH:=e70b0dfbe610f90c4d1fe0d71af142a4e25c3c4ef9ebab8d2d72b65159d454c8
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com> PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE:=GPL-3.0-or-later

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=jansson PKG_NAME:=jansson
PKG_VERSION:=2.14 PKG_VERSION:=2.14
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/akheron/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)? PKG_SOURCE_URL:=https://codeload.github.com/akheron/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
@ -33,7 +33,7 @@ define Package/jansson
CATEGORY:=Libraries CATEGORY:=Libraries
TITLE:=Jansson library TITLE:=Jansson library
URL:=http://www.digip.org/jansson/ URL:=http://www.digip.org/jansson/
ABI_VERSION:=5 ABI_VERSION:=4
endef endef
define Package/jansson/description define Package/jansson/description
@ -45,7 +45,7 @@ TARGET_LDFLAGS += -flto
define Package/jansson/install define Package/jansson/install
$(INSTALL_DIR) $(1)/usr/lib $(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 endef
$(eval $(call BuildPackage,jansson)) $(eval $(call BuildPackage,jansson))

View File

@ -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 <vincent@systemli.org>
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))

View File

@ -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 <vincent@systemli.org>
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))

View File

@ -0,0 +1,32 @@
From eff308af425b67093bab25f80f1ae950166bece1 Mon Sep 17 00:00:00 2001
From: Mark Adler <fork@madler.net>
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);

View File

@ -0,0 +1,29 @@
From 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d Mon Sep 17 00:00:00 2001
From: Mark Adler <fork@madler.net>
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);

View File

@ -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) { 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) { static inline void m_str(const char *id, const char *value) {

View File

@ -12,9 +12,9 @@ PKG_RELEASE:=18
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
PKG_SOURCE_DATE:=2022-07-13 PKG_SOURCE_DATE:=2022-08-05
PKG_SOURCE_VERSION:=9212bfcbab7681cd30186ac7f1ef4c47bf38c89a PKG_SOURCE_VERSION:=7d21e8d8ecd6d776f64b6928f62893c0f5c9747a
PKG_MIRROR_HASH:=85118a9ae084701a00b4dc6a9b2e3279e4fd70eb5b31b539a121ce0a894f9e45 PKG_MIRROR_HASH:=6d918517de4ec47d83edddb6167bb52f08b2b696f336d5055a45290bb37ac4db
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com> PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0

View File

@ -19,12 +19,15 @@
"fcntl", "fcntl",
"fcntl64", "fcntl64",
"fstat", "fstat",
"getdents64",
"getsockname", "getsockname",
"getrandom",
"ioctl", "ioctl",
"madvise", "madvise",
"mmap", "mmap",
"mmap2", "mmap2",
"munmap", "munmap",
"newfstatat",
"open", "open",
"openat", "openat",
"pipe", "pipe",
@ -42,6 +45,7 @@
"setsockopt", "setsockopt",
"sigreturn", "sigreturn",
"socket", "socket",
"statx",
"time", "time",
"uname", "uname",
"write", "write",

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nftables PKG_NAME:=nftables
PKG_VERSION:=1.0.4 PKG_VERSION:=1.0.4
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files

View File

@ -0,0 +1,49 @@
From 1af8aabccd65e11caa397c4706353075f623cd01 Mon Sep 17 00:00:00 2001
From: Jo-Philipp Wich <jo@mein.io>
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 <jo@mein.io>
---
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

View File

@ -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";
};

View File

@ -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";
};

View File

@ -3,9 +3,6 @@
#include "ar7241_ubnt_unifi.dtsi" #include "ar7241_ubnt_unifi.dtsi"
/ { / {
compatible = "ubnt,unifi", "qca,ar7241";
model = "Ubiquiti UniFi AP";
aliases { aliases {
led-boot = &led_dome_green; led-boot = &led_dome_green;
led-failsafe = &led_dome_green; led-failsafe = &led_dome_green;

View File

@ -0,0 +1,138 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qca955x.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
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 = &eth0;
};
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;
};
};
&eth0 {
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>;
};
};

View File

@ -65,6 +65,7 @@ ath79_setup_interfaces()
pisen,wmb001n|\ pisen,wmb001n|\
pisen,wmm003n|\ pisen,wmm003n|\
siemens,ws-ap3610|\ siemens,ws-ap3610|\
sophos,ap15|\
sophos,ap55|\ sophos,ap55|\
sophos,ap55c|\ sophos,ap55c|\
sophos,ap100|\ sophos,ap100|\

View File

@ -30,6 +30,7 @@ case "$FIRMWARE" in
qxwlan,e1700ac-v2-16m|\ qxwlan,e1700ac-v2-16m|\
qxwlan,e600gac-v2-8m|\ qxwlan,e600gac-v2-8m|\
qxwlan,e600gac-v2-16m|\ qxwlan,e600gac-v2-16m|\
sophos,ap15|\
sophos,ap55|\ sophos,ap55|\
sophos,ap55c|\ sophos,ap55c|\
sophos,ap100|\ sophos,ap100|\

View File

@ -210,12 +210,20 @@ define Device/ubnt_routerstation-pro
endef endef
TARGET_DEVICES += ubnt_routerstation-pro TARGET_DEVICES += ubnt_routerstation-pro
define Device/ubnt_unifi define Device/ubnt_unifi-ap
$(Device/ubnt-bz) $(Device/ubnt-bz)
DEVICE_MODEL := UniFi AP DEVICE_MODEL := UniFi AP
SUPPORTED_DEVICES += unifi SUPPORTED_DEVICES += unifi ubnt,unifi
endef 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 define Device/ubnt_unifiac
DEVICE_VENDOR := Ubiquiti DEVICE_VENDOR := Ubiquiti

View File

@ -2419,6 +2419,15 @@ define Device/sitecom_wlr-8100
endef endef
TARGET_DEVICES += sitecom_wlr-8100 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 define Device/sophos_ap55
SOC := qca9558 SOC := qca9558
DEVICE_VENDOR := Sophos DEVICE_VENDOR := Sophos

View File

@ -17,6 +17,7 @@ glinet,gl-ar300m-nor)
glinet,gl-xe300) glinet,gl-xe300)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10" ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10"
ucidef_set_led_netdev "3gnet" "LTE" "green:lte" "wwan0"
;; ;;
netgear,pgzng1) netgear,pgzng1)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"

View File

@ -305,7 +305,7 @@
list_for_each_entry(p, head, list) { list_for_each_entry(p, head, list) {
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/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 */ u16 options = opts->options; /* mungable copy */
if (unlikely(OPTION_MD5 & options)) { if (unlikely(OPTION_MD5 & options)) {
@ -382,7 +382,7 @@
} }
if (unlikely(opts->num_sack_blocks)) { 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; tp->duplicate_sack : tp->selective_acks;
int this_sack; int this_sack;
@ -406,7 +406,7 @@
} }
tp->rx_opt.dsack = 0; 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) { if (foc->exp) {
len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
@ -706,7 +706,7 @@
EXPORT_SYMBOL(xfrm_parse_spi); EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/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); const __be32 *ptr = (const __be32 *)(th + 1);

View File

@ -305,7 +305,7 @@
list_for_each_entry(p, head, list) { list_for_each_entry(p, head, list) {
--- a/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c
+++ b/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 */ u16 options = opts->options; /* mungable copy */
if (unlikely(OPTION_MD5 & options)) { if (unlikely(OPTION_MD5 & options)) {
@ -382,7 +382,7 @@
} }
if (unlikely(opts->num_sack_blocks)) { 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; tp->duplicate_sack : tp->selective_acks;
int this_sack; int this_sack;
@ -406,7 +406,7 @@
} }
tp->rx_opt.dsack = 0; 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) { if (foc->exp) {
len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
@ -706,7 +706,7 @@
EXPORT_SYMBOL(xfrm_parse_spi); EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c
+++ b/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); const __be32 *ptr = (const __be32 *)(th + 1);

View File

@ -0,0 +1,80 @@
From 789d3eeb2367f92193a0882f7cdab03f0f9d6930 Mon Sep 17 00:00:00 2001
From: Thomas Perrot <thomas.perrot@bootlin.com>
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 <aleksander@aleksander.es>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20211216081227.237749-11-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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 },

View File

@ -18,6 +18,7 @@ CONFIG_64BIT_TIME=y
# CONFIG_ACORN_PARTITION is not set # CONFIG_ACORN_PARTITION is not set
# CONFIG_ACPI_ALS is not set # CONFIG_ACPI_ALS is not set
# CONFIG_ACPI_APEI is not set # CONFIG_ACPI_APEI is not set
# CONFIG_ACPI_APEI_PCIEAER is not set
# CONFIG_ACPI_BUTTON is not set # CONFIG_ACPI_BUTTON is not set
# CONFIG_ACPI_CONFIGFS is not set # CONFIG_ACPI_CONFIGFS is not set
# CONFIG_ACPI_CUSTOM_METHOD 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_DWARF4 is not set
# CONFIG_DEBUG_INFO_DWARF5 is not set # CONFIG_DEBUG_INFO_DWARF5 is not set
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_IRQFLAGS is not set # CONFIG_DEBUG_IRQFLAGS is not set
CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_KERNEL=y
@ -5132,6 +5134,7 @@ CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_MAX6900 is not set # CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_MAX6902 is not set # CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_MAX6916 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_MCP795 is not set
# CONFIG_RTC_DRV_MOXART is not set # CONFIG_RTC_DRV_MOXART is not set
# CONFIG_RTC_DRV_MPC5121 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_SNVS is not set
# CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_SUN6I 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_TEST is not set
# CONFIG_RTC_DRV_V3020 is not set # CONFIG_RTC_DRV_V3020 is not set
# CONFIG_RTC_DRV_X1205 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_AUD2HTX is not set
# CONFIG_SND_SOC_FSL_AUDMIX is not set # CONFIG_SND_SOC_FSL_AUDMIX is not set
# CONFIG_SND_SOC_FSL_ESAI 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_MICFIL is not set
# CONFIG_SND_SOC_FSL_RPMSG is not set
# CONFIG_SND_SOC_FSL_SAI is not set # CONFIG_SND_SOC_FSL_SAI is not set
# CONFIG_SND_SOC_FSL_SPDIF is not set # CONFIG_SND_SOC_FSL_SPDIF is not set
# CONFIG_SND_SOC_FSL_SSI 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_POWER_EFFICIENT_DEFAULT=y
# CONFIG_WQ_WATCHDOG is not set # CONFIG_WQ_WATCHDOG is not set
# CONFIG_WWAN is not set # CONFIG_WWAN is not set
# CONFIG_WWAN_HWSIM is not set
# CONFIG_WW_MUTEX_SELFTEST is not set # CONFIG_WW_MUTEX_SELFTEST is not set
# CONFIG_X25 is not set # CONFIG_X25 is not set
# CONFIG_X509_CERTIFICATE_PARSER is not set # CONFIG_X509_CERTIFICATE_PARSER is not set

View File

@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c
+++ b/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) int __net_init fib_proc_init(struct net *net)
{ {
@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
fib_triestat_seq_show, NULL)) fib_triestat_seq_show, NULL))
goto out2; 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; return 0;
out3: out3:

View File

@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/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)) { if (pgdat == NODE_DATA(0)) {
mem_map = NODE_DATA(0)->node_mem_map; mem_map = NODE_DATA(0)->node_mem_map;
if (page_to_pfn(mem_map) != pgdat->node_start_pfn) if (page_to_pfn(mem_map) != pgdat->node_start_pfn)

View File

@ -20,7 +20,7 @@ Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
+ help + help
+ MyLoader is a bootloader which allows the user to define partitions + MyLoader is a bootloader which allows the user to define partitions
+ in flash devices, by putting a table in the second erase block + 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. + offsets and lengths of the user defined partitions.
+ +
+ If you need code which can detect and parse these tables, and + If you need code which can detect and parse these tables, and

View File

@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/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)) { if (pgdat == NODE_DATA(0)) {
mem_map = NODE_DATA(0)->node_mem_map; mem_map = NODE_DATA(0)->node_mem_map;
if (page_to_pfn(mem_map) != pgdat->node_start_pfn) if (page_to_pfn(mem_map) != pgdat->node_start_pfn)

View File

@ -20,7 +20,7 @@ Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
+ help + help
+ MyLoader is a bootloader which allows the user to define partitions + MyLoader is a bootloader which allows the user to define partitions
+ in flash devices, by putting a table in the second erase block + 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. + offsets and lengths of the user defined partitions.
+ +
+ If you need code which can detect and parse these tables, and + If you need code which can detect and parse these tables, and

View File

@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static void rt_fibinfo_free(struct rtable __rcu **rtp) static void rt_fibinfo_free(struct rtable __rcu **rtp)
--- a/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c
+++ b/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_THROW] = "THROW",
[RTN_NAT] = "NAT", [RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE", [RTN_XRESOLVE] = "XRESOLVE",

View File

@ -170,14 +170,14 @@
port@0 { port@0 {
reg = <0>; reg = <0>;
label = "lan3"; label = "lan3";
phy-mode = "rgmii"; phy-mode = "rgmii-rxid";
phy-handle = <&phy0>; phy-handle = <&phy0>;
}; };
port@1 { port@1 {
reg = <1>; reg = <1>;
label = "lan4"; label = "lan4";
phy-mode = "rgmii"; phy-mode = "rgmii-rxid";
phy-handle = <&phy1>; phy-handle = <&phy1>;
}; };

View File

@ -0,0 +1,132 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "netcore,nw5212", "ralink,mt7620a-soc";
model = "Netcore NW5212";
aliases {
label-mac-device = &ethernet;
};
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 = <KEY_RESTART>;
};
};
};
&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";
};
};
&ethernet {
mtd-mac-address = <&factory 0x28>;
mediatek,portmap = "llllw";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&wmac {
ralink,mtd-eeprom = <&factory 0x0>;
};

View File

@ -0,0 +1,191 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620n.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "netgear,pr2000", "ralink,mt7620n-soc";
model = "Netgear PR2000";
aliases {
label-mac-device = &ethernet;
};
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 = <KEY_RESTART>;
};
wireless {
label = "wireless";
gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
wired {
label = "wired";
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
};
&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;
};
};
};
};
&ethernet {
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";
};
};

View File

@ -0,0 +1,243 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "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 = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
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>;
};

View File

@ -0,0 +1,217 @@
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
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 = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
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>;
};
};
};
&ethernet {
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>;
};
};

View File

@ -76,7 +76,7 @@
compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc"; compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc";
reg = <0x300 0x100>; reg = <0x300 0x100>;
resets = <&rstctrl 20>; resets = <&rstctrl 10>;
reset-names = "mc"; reset-names = "mc";
interrupt-parent = <&intc>; interrupt-parent = <&intc>;

View File

@ -731,6 +731,16 @@ define Device/microduino_microwrt
endef endef
TARGET_DEVICES += microduino_microwrt 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 define Device/netgear_ex2700
SOC := mt7620a SOC := mt7620a
NETGEAR_HW_ID := 29764623+4+0+32+2x2+0 NETGEAR_HW_ID := 29764623+4+0+32+2x2+0
@ -804,6 +814,21 @@ define Device/netgear_jwnr2010-v5
endef endef
TARGET_DEVICES += netgear_jwnr2010-v5 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 define Device/netgear_wn3000rp-v3
SOC := mt7620a SOC := mt7620a
IMAGE_SIZE := 7872k IMAGE_SIZE := 7872k

View File

@ -189,6 +189,22 @@ define Device/asiarf_ap7621-nv1
endef endef
TARGET_DEVICES += asiarf_ap7621-nv1 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 define Device/asus_rp-ac87
$(Device/dsa-migration) $(Device/dsa-migration)
$(Device/uimage-lzma-loader) $(Device/uimage-lzma-loader)
@ -2244,6 +2260,25 @@ define Device/zio_freezio
endef endef
TARGET_DEVICES += zio_freezio 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 define Device/zyxel_nr7101
$(Device/dsa-migration) $(Device/dsa-migration)
BLOCKSIZE := 128k BLOCKSIZE := 128k

View File

@ -160,6 +160,14 @@ lenovo,newifi-y1s)
ucidef_set_led_netdev "wifi5g" "WIFI5G" "blue:wifi" "wlan0" ucidef_set_led_netdev "wifi5g" "WIFI5G" "blue:wifi" "wlan0"
ucidef_set_led_netdev "wan" "WAN" "blue:internet" "eth0.2" "tx rx" 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,ex2700|\
netgear,wn3000rp-v3|\ netgear,wn3000rp-v3|\
netgear,wn3100rp-v2) netgear,wn3100rp-v2)
@ -170,12 +178,8 @@ netgear,ex6130)
ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "green:router" "wlan0" ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "green:router" "wlan0"
ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "green:device" "wlan1" ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "green:device" "wlan1"
;; ;;
netgear,jwnr2010-v5) netgear,pr2000)
ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x08" ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01"
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"
;; ;;
phicomm,psg1208) phicomm,psg1208)
ucidef_set_led_netdev "wifi_led" "wifi" "white:wlan2g" "wlan0" ucidef_set_led_netdev "wifi_led" "wifi" "white:wlan2g" "wlan0"

View File

@ -111,6 +111,7 @@ ramips_setup_interfaces()
"0:lan" "6@eth0" "0:lan" "6@eth0"
;; ;;
dlink,dir-810l|\ dlink,dir-810l|\
netcore,nw5212|\
netgear,jwnr2010-v5|\ netgear,jwnr2010-v5|\
phicomm,k2-v22.4|\ phicomm,k2-v22.4|\
phicomm,k2-v22.5|\ phicomm,k2-v22.5|\
@ -202,6 +203,7 @@ ramips_setup_interfaces()
ucidef_add_switch "switch1" \ ucidef_add_switch "switch1" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;; ;;
netgear,pr2000|\
nexx,wt3020-4m|\ nexx,wt3020-4m|\
nexx,wt3020-8m) nexx,wt3020-8m)
ucidef_add_switch "switch0" \ ucidef_add_switch "switch0" \

View File

@ -168,6 +168,9 @@ zbtlink,zbt-wg1608-16m)
ucidef_set_led_netdev "lan4" "LAN4" "green:lan-4" "lan4" ucidef_set_led_netdev "lan4" "LAN4" "green:lan-4" "lan4"
ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan" ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
;; ;;
zyxel,lte3301-plus)
ucidef_set_led_netdev "internet" "internet" "white:internet" "wwan0"
;;
esac esac
board_config_flush board_config_flush

View File

@ -9,6 +9,7 @@ ramips_setup_interfaces()
case $board in case $board in
ampedwireless,ally-00x19k|\ ampedwireless,ally-00x19k|\
asus,rp-ac56|\
asus,rp-ac87|\ asus,rp-ac87|\
edimax,re23s|\ edimax,re23s|\
mikrotik,routerboard-m11g|\ mikrotik,routerboard-m11g|\
@ -75,7 +76,8 @@ ramips_setup_interfaces()
ucidef_set_interface_lan "lan1 lan2" ucidef_set_interface_lan "lan1 lan2"
;; ;;
linksys,re6500|\ linksys,re6500|\
netgear,wac104) netgear,wac104|\
zyxel,lte3301-plus)
ucidef_set_interface_lan "lan1 lan2 lan3 lan4" ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
;; ;;
mikrotik,routerboard-750gr3) mikrotik,routerboard-750gr3)

View File

@ -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_port3" "PoE Power Port3" "403"
ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "404" 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) zyxel,nr7101)
ucidef_add_gpio_switch "lte_reset" "Reset LTE/5G modem" "483" ucidef_add_gpio_switch "lte_reset" "Reset LTE/5G modem" "483"
;; ;;

View File

@ -20,6 +20,11 @@ boot() {
samknows,whitebox-v8) samknows,whitebox-v8)
fw_setenv bootcount 0 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) zyxel,nr7101)
[ $(printf %d $(fw_printenv -n DebugFlag)) -gt 0 ] || fw_setenv DebugFlag 0x1 [ $(printf %d $(fw_printenv -n DebugFlag)) -gt 0 ] || fw_setenv DebugFlag 0x1
[ $(printf %d $(fw_printenv -n Image1Stable)) -gt 0 ] || fw_setenv Image1Stable 1 [ $(printf %d $(fw_printenv -n Image1Stable)) -gt 0 ] || fw_setenv Image1Stable 1

View File

@ -119,6 +119,7 @@ platform_do_upgrade() {
ubnt,edgerouter-x-sfp) ubnt,edgerouter-x-sfp)
platform_upgrade_ubnt_erx "$1" platform_upgrade_ubnt_erx "$1"
;; ;;
zyxel,lte3301-plus|\
zyxel,nr7101) zyxel,nr7101)
fw_setenv CheckBypass 0 fw_setenv CheckBypass 0
fw_setenv Image1Stable 0 fw_setenv Image1Stable 0

View File

@ -0,0 +1,171 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "rtl838x.dtsi"
#include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
/ {
compatible = "panasonic,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 = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_STATUS;
function-enumerator = <1>;
};
led_status_eco_green: led-6 {
label = "green:status_eco";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
function-enumerator = <2>;
};
};
&i2c_gpio_0 {
scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&i2c_gpio_1 {
scl-gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&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>;
};
};
&ethernet0 {
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 = <&ethernet0>;
reg = <28>;
phy-mode = "internal";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};

View File

@ -0,0 +1,190 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "rtl838x.dtsi"
#include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
/ {
compatible = "panasonic,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 = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_STATUS;
function-enumerator = <1>;
};
led_status_eco_green: led-6 {
label = "green:status_eco";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
function-enumerator = <2>;
};
};
&i2c_gpio_0 {
scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&i2c_gpio_1 {
scl-gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};
&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>;
};
};
&ethernet0 {
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 = <&ethernet0>;
reg = <28>;
phy-mode = "internal";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};

View File

@ -0,0 +1,380 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "rtl839x.dtsi"
#include "rtl83xx_panasonic_mxxeg-pn28xx0k.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
/ {
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 = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_STATUS;
function-enumerator = <1>;
};
led_status_eco_green: led-6 {
label = "green:status_eco";
gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
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>;
};
};
&ethernet0 {
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 = <&ethernet0>;
reg = <52>;
phy-mode = "internal";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};

View File

@ -94,6 +94,7 @@
/* /*
* GPIO14 (IO1_6): Shift Register RESET (port LED) * GPIO14 (IO1_6): Shift Register RESET (port LED)
* - Switch-M8eG PN28080K: 3x 74HC164 * - Switch-M8eG PN28080K: 3x 74HC164
* - Switch-M16eG PN28160K: 4x 74HC164
* - Switch-M24eG PN28240K: 6x 74HC164 * - Switch-M24eG PN28240K: 6x 74HC164
* - Switch-M48eG PN28480K: 12x 74HC164 * - Switch-M48eG PN28480K: 12x 74HC164
*/ */

View File

@ -138,6 +138,26 @@ define Device/netgear_gs310tp-v1
endef endef
TARGET_DEVICES += netgear_gs310tp-v1 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 define Device/panasonic_m8eg-pn28080k
SOC := rtl8380 SOC := rtl8380
IMAGE_SIZE := 16384k IMAGE_SIZE := 16384k

View File

@ -1,5 +1,16 @@
# SPDX-License-Identifier: GPL-2.0-only # 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 define Device/zyxel_gs1900-48
SOC := rtl8393 SOC := rtl8393
IMAGE_SIZE := 13952k IMAGE_SIZE := 13952k

View File

@ -49,7 +49,7 @@
+ select SYS_SUPPORTS_MULTITHREADING + select SYS_SUPPORTS_MULTITHREADING
+ +
+config RTL930X +config RTL930X
+ bool "Realtek RTL839X based platforms" + bool "Realtek RTL930X based platforms"
+ depends on RTL83XX + depends on RTL83XX
+ select MIPS_CPU_SCACHE + select MIPS_CPU_SCACHE
+ select CSRC_R4K + select CSRC_R4K

View File

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

View File

@ -0,0 +1,52 @@
From: Hans de Goede <hdegoede@redhat.com>
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 <michael.schoene@rhebo.com>
Reported-by: Paul Spooren <paul.spooren@rhebo.com>
Reported-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
--- 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"),
},
},
{

View File

@ -0,0 +1,52 @@
From: Hans de Goede <hdegoede@redhat.com>
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 <michael.schoene@rhebo.com>
Reported-by: Paul Spooren <paul.spooren@rhebo.com>
Reported-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
--- 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"),
},
},
{