diff --git a/include/bpf.mk b/include/bpf.mk index a3357f0e29..9abc660123 100644 --- a/include/bpf.mk +++ b/include/bpf.mk @@ -33,7 +33,7 @@ BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el) BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers BPF_KERNEL_INCLUDE := \ - -nostdinc -isystem $(TOOLCHAIN_INC_DIRS) \ + -nostdinc $(patsubst %,-isystem %,$(TOOLCHAIN_INC_DIRS)) \ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \ -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \ diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 7760c440af..6717917ac1 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .86 -LINUX_KERNEL_HASH-6.1.86 = d3d3c8c44f0f0a870a95bd2823f9d91979d1aa6f266da5d8cccd0c4b15e3115b +LINUX_VERSION-6.1 = .89 +LINUX_KERNEL_HASH-6.1.89 = 12bab8e092618d1d4eeaf4201e6e70054c94896198956bd84ff0e908b0264719 diff --git a/package/boot/opensbi/Makefile b/package/boot/opensbi/Makefile index 99a4631630..b2ef27dd71 100644 --- a/package/boot/opensbi/Makefile +++ b/package/boot/opensbi/Makefile @@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=opensbi -PKG_RELEASE:=1.2 +PKG_RELEASE:=1.4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/riscv/opensbi -PKG_SOURCE_DATE:=2022-12-24 -PKG_SOURCE_VERSION:=6b5188ca14e59ce7bf71afe4e7d3d557c3d31bf8 -PKG_MIRROR_HASH:=5939a3225cb37c1dde0b5b9f28f9980c0712533676774ae244d6d84bb09a1439 +PKG_SOURCE_DATE:=2023-12-24 +PKG_SOURCE_VERSION:=a2b255b88918715173942f2c5e1f97ac9e90c877 +PKG_MIRROR_HASH:=a81d7b3622feba80b2a45fe0d38600be73cfbee64a0426be82a71545c10c54d3 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/boot/uboot-bmips/Makefile b/package/boot/uboot-bmips/Makefile new file mode 100644 index 0000000000..5581a6fbfc --- /dev/null +++ b/package/boot/uboot-bmips/Makefile @@ -0,0 +1,32 @@ +include $(TOPDIR)/rules.mk + +PKG_VERSION:=2024.04 +PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a +PKG_RELEASE:=$(AUTORELEASE) + +include $(INCLUDE_DIR)/u-boot.mk +include $(INCLUDE_DIR)/package.mk + +define U-Boot/Default + BUILD_TARGET:=bmips + BUILD_SUBTARGET:=bcm6328 + UBOOT_CONFIG:=inteno_xg6846_ram + UBOOT_BOARD:=$(1) +endef + +define U-Boot/xg6846 + NAME:=Inteno XG6846 + BUILD_DEVICES:=inteno_xg6846 +endef + +UBOOT_TARGETS := xg6846 + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot.bin +endef + +define Package/u-boot/install/default +endef + +$(eval $(call BuildPackage/U-Boot)) diff --git a/package/kernel/bpf-headers/patches/101-linux-netlink-drop-NL_SET_ERR_MSG-for-kernel-modules.patch b/package/kernel/bpf-headers/patches/101-linux-netlink-drop-NL_SET_ERR_MSG-for-kernel-modules.patch new file mode 100644 index 0000000000..5771b32954 --- /dev/null +++ b/package/kernel/bpf-headers/patches/101-linux-netlink-drop-NL_SET_ERR_MSG-for-kernel-modules.patch @@ -0,0 +1,30 @@ +From 7ed95633bff19950069c348b94c9c13164a57a2a Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Wed, 18 Jan 2023 20:20:39 +0100 +Subject: [PATCH] linux/netlink: drop NL_SET_ERR_MSG for kernel modules + +We don't need NL_SET_ERR_MSG_MOD for bpf modules and we can drop it to +solve missing KBUILD_MODNAME define. + +Signed-off-by: Christian Marangi +--- + include/linux/netlink.h | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/include/linux/netlink.h b/include/linux/netlink.h +index 61b1c7f..93561fb 100644 +--- a/include/linux/netlink.h ++++ b/include/linux/netlink.h +@@ -98,9 +98,6 @@ struct netlink_ext_ack { + __extack->_msg = __msg; \ + } while (0) + +-#define NL_SET_ERR_MSG_MOD(extack, msg) \ +- NL_SET_ERR_MSG((extack), KBUILD_MODNAME ": " msg) +- + #define NL_SET_BAD_ATTR_POLICY(extack, attr, pol) do { \ + if ((extack)) { \ + (extack)->bad_attr = (attr); \ +-- +2.38.1 + diff --git a/package/kernel/bpf-headers/patches/102-net-flow_offload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch b/package/kernel/bpf-headers/patches/102-net-flow_offload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch new file mode 100644 index 0000000000..4dec16874e --- /dev/null +++ b/package/kernel/bpf-headers/patches/102-net-flow_offload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch @@ -0,0 +1,44 @@ +From 6e7cd9c0abffea55e39a4160949bc6fba972d161 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Thu, 19 Jan 2023 13:37:46 +0100 +Subject: [PATCH] net/flow_offload: use NL_SET_ERR_MSG instead of + NL_SET_ERR_MSG_MOD + +Use NL_SET_ERR_MSG instead of NL_SET_ERR_MSG_MOD for bpf modules as +kernel modules are not supported. + +Signed-off-by: Christian Marangi +--- + include/net/flow_offload.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h +index 7a2b022..f17c485 100644 +--- a/include/net/flow_offload.h ++++ b/include/net/flow_offload.h +@@ -321,7 +321,7 @@ flow_action_mixed_hw_stats_check(const struct flow_action *action, + + flow_action_for_each(i, action_entry, action) { + if (i && action_entry->hw_stats != last_hw_stats) { +- NL_SET_ERR_MSG_MOD(extack, "Mixing HW stats types for actions is not supported"); ++ NL_SET_ERR_MSG(extack, "Mixing HW stats types for actions is not supported"); + return false; + } + last_hw_stats = action_entry->hw_stats; +@@ -356,11 +356,11 @@ __flow_action_hw_stats_check(const struct flow_action *action, + + if (!check_allow_bit && + ~action_entry->hw_stats & FLOW_ACTION_HW_STATS_ANY) { +- NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\""); ++ NL_SET_ERR_MSG(extack, "Driver supports only default HW stats type \"any\""); + return false; + } else if (check_allow_bit && + !(action_entry->hw_stats & BIT(allow_bit))) { +- NL_SET_ERR_MSG_MOD(extack, "Driver does not support selected HW stats type"); ++ NL_SET_ERR_MSG(extack, "Driver does not support selected HW stats type"); + return false; + } + return true; +-- +2.38.1 + diff --git a/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch new file mode 100644 index 0000000000..85d5127f60 --- /dev/null +++ b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch @@ -0,0 +1,20 @@ +From: Felix Fietkau +Date: Wed, 1 May 2024 18:55:24 +0200 +Subject: [PATCH] AP: add missing null pointer check in hostapd_free_hapd_data + +When called from wpa_supplicant, iface->interfaces can be NULL + +Signed-off-by: Felix Fietkau +--- + +--- a/src/ap/hostapd.c ++++ b/src/ap/hostapd.c +@@ -502,7 +502,7 @@ void hostapd_free_hapd_data(struct hosta + struct hapd_interfaces *ifaces = hapd->iface->interfaces; + size_t i; + +- for (i = 0; i < ifaces->count; i++) { ++ for (i = 0; ifaces && i < ifaces->count; i++) { + struct hostapd_iface *iface = ifaces->iface[i]; + size_t j; + diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile index dba775e4ea..8a839954e9 100644 --- a/package/network/utils/xdp-tools/Makefile +++ b/package/network/utils/xdp-tools/Makefile @@ -85,8 +85,13 @@ CONFIGURE_VARS += \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ CLANG="$(CLANG)" \ - BPF_TARGET="$(BPF_TARGET)" \ - LLC="$(LLVM_LLC)" + BPF_TARGET="$(BPF_ARCH)-linux-gnu" \ + LLC="$(LLVM_LLC)" \ + BPF_LDFLAGS="-march=$(BPF_TARGET) -mcpu=v3" + +ifneq ($(findstring s,$(OPENWRT_VERBOSE)),) + MAKE_FLAGS+=V=1 +endif MAKE_VARS += \ PREFIX=/usr \ @@ -94,7 +99,7 @@ MAKE_VARS += \ define Build/Configure $(call Build/Configure/Default) - echo "BPF_CFLAGS += -I$(BPF_HEADERS_DIR)/tools/lib -fno-stack-protector" >> $(PKG_BUILD_DIR)/config.mk + echo "BPF_CFLAGS += $(BPF_CFLAGS) -Wno-error -fno-stack-protector" >> $(PKG_BUILD_DIR)/config.mk endef define Build/InstallDev diff --git a/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch b/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch new file mode 100644 index 0000000000..1a157df32c --- /dev/null +++ b/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch @@ -0,0 +1,49 @@ +From 1f160c287c14b4300c4248752e20da5981c9763e Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Wed, 18 Jan 2023 19:00:54 +0100 +Subject: [PATCH] libxdp: Use __noinline__ reserved attribute for XDP + dispatcher + +The use of noinline is wrong as noline is not a reserved attribute and +with gcc12 this became an error. Use the reserved __noinline__ attribute +to fix compilation error. + +Signed-off-by: Christian Marangi +[a.heider: adapt lib/libxdp/protocol.org too] +Signed-off-by: Andre Heider +--- + lib/libxdp/protocol.org | 2 +- + lib/libxdp/xdp-dispatcher.c.in | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/lib/libxdp/protocol.org ++++ b/lib/libxdp/protocol.org +@@ -54,7 +54,7 @@ static volatile const struct xdp_dispatc + /* The volatile return value prevents the compiler from assuming it knows the + * return value and optimising based on that. + */ +-__attribute__ ((noinline)) ++__attribute__ ((__noinline__)) + int prog0(struct xdp_md *ctx) { + volatile int ret = XDP_DISPATCHER_RETVAL; + +--- a/lib/libxdp/xdp-dispatcher.c.in ++++ b/lib/libxdp/xdp-dispatcher.c.in +@@ -30,7 +30,7 @@ static volatile const struct xdp_dispatc + * return value and optimising based on that. + */ + forloop(`i', `0', NUM_PROGS, +-`__attribute__ ((noinline)) ++`__attribute__ ((__noinline__)) + int format(`prog%d', i)(struct xdp_md *ctx) { + volatile int ret = XDP_DISPATCHER_RETVAL; + +@@ -40,7 +40,7 @@ int format(`prog%d', i)(struct xdp_md *c + } + ') + +-__attribute__ ((noinline)) ++__attribute__ ((__noinline__)) + int compat_test(struct xdp_md *ctx) { + volatile int ret = XDP_DISPATCHER_RETVAL; + diff --git a/package/network/utils/xdp-tools/patches/021-headers-xdp-drop-vlan_hdr-as-already-defined.patch b/package/network/utils/xdp-tools/patches/021-headers-xdp-drop-vlan_hdr-as-already-defined.patch new file mode 100644 index 0000000000..d508e489ea --- /dev/null +++ b/package/network/utils/xdp-tools/patches/021-headers-xdp-drop-vlan_hdr-as-already-defined.patch @@ -0,0 +1,31 @@ +From bc2a11227b5bed29d33926d5ff7e707228db9e87 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Wed, 18 Jan 2023 20:07:58 +0100 +Subject: [PATCH] headers: xdp: drop vlan_hdr as already defined + +Drop vlan_hdr as already defined by bpf headers. + +Signed-off-by: Christian Marangi +--- + headers/xdp/parsing_helpers.h | 10 ---------- + 1 file changed, 10 deletions(-) + +--- a/headers/xdp/parsing_helpers.h ++++ b/headers/xdp/parsing_helpers.h +@@ -33,16 +33,6 @@ struct hdr_cursor { + }; + + /* +- * struct vlan_hdr - vlan header +- * @h_vlan_TCI: priority and VLAN ID +- * @h_vlan_encapsulated_proto: packet type ID or len +- */ +-struct vlan_hdr { +- __be16 h_vlan_TCI; +- __be16 h_vlan_encapsulated_proto; +-}; +- +-/* + * Struct icmphdr_common represents the common part of the icmphdr and icmp6hdr + * structures. + */ diff --git a/package/network/utils/xdp-tools/patches/022-xdp-dump-add-missing-perf_event-include-for-bpf-and-.patch b/package/network/utils/xdp-tools/patches/022-xdp-dump-add-missing-perf_event-include-for-bpf-and-.patch new file mode 100644 index 0000000000..edeb403281 --- /dev/null +++ b/package/network/utils/xdp-tools/patches/022-xdp-dump-add-missing-perf_event-include-for-bpf-and-.patch @@ -0,0 +1,34 @@ +From 0388d7447de027e0d2369d6b8a9c58ea0f8f027c Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Wed, 18 Jan 2023 20:37:12 +0100 +Subject: [PATCH] xdp-dump: add missing perf_event include for bpf and xdp + +Add missing perf_event include needed for struct perf_event_header for +bpf and xdp. + +Signed-off-by: Christian Marangi +--- + xdp-dump/xdpdump_bpf.c | 1 + + xdp-dump/xdpdump_xdp.c | 1 + + 2 files changed, 2 insertions(+) + +--- a/xdp-dump/xdpdump_bpf.c ++++ b/xdp-dump/xdpdump_bpf.c +@@ -4,6 +4,7 @@ + * Include files + *****************************************************************************/ + #include ++#include + #include + #include + #include +--- a/xdp-dump/xdpdump_xdp.c ++++ b/xdp-dump/xdpdump_xdp.c +@@ -4,6 +4,7 @@ + * Include files + *****************************************************************************/ + #include ++#include + #include + #include + #include diff --git a/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch b/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch new file mode 100644 index 0000000000..cc60ebf611 --- /dev/null +++ b/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch @@ -0,0 +1,30 @@ +From cb1ef3322671a67e2050a3eee18b49cdb4ed4bed Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Wed, 18 Jan 2023 20:54:41 +0100 +Subject: [PATCH] libxdp: fix compilation on multiarch systems + +Multiarch systems require an additional include path, which is covered +by ARCH_INCLUDES here. Just as lib/util, add it to BPF_CFLAGS. + +Fixes compilation on debian: + +In file included from xdp-dispatcher.c:3: +In file included from ../../headers/linux/bpf.h:11: +/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found + +Signed-off-by: Andre Heider +--- + lib/libxdp/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc + TEMPLATED_SOURCES := xdp-dispatcher.c + + CFLAGS += -I$(HEADER_DIR) +-BPF_CFLAGS += -I$(HEADER_DIR) ++BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) + + + ifndef BUILD_STATIC_ONLY diff --git a/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch b/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch new file mode 100644 index 0000000000..16835eae37 --- /dev/null +++ b/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch @@ -0,0 +1,49 @@ +From e2d8eae9477f6ba41ab75ad77202f235e34c04f7 Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Wed, 18 Jan 2023 22:30:23 +0100 +Subject: [PATCH] lib: allow overwriting -W* flags via BPF_CFLAGS + +The bpf header file situation is a mess, and the default warning +compiler flags may not be suitable everywhere, especially with -Werror +in the mix. + +Move BPF_CFLAGS further down, so these can be overwritten by builders. + +Signed-off-by: Andre Heider +--- + lib/common.mk | 2 +- + lib/libxdp/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/lib/common.mk ++++ b/lib/common.mk +@@ -108,12 +108,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX + $(QUIET_CLANG)$(CLANG) -S \ + -target $(BPF_TARGET) \ + -D __BPF_TRACING__ \ +- $(BPF_CFLAGS) \ + -Wall \ + -Wno-unused-value \ + -Wno-pointer-sign \ + -Wno-compare-distinct-pointer-types \ + -Werror \ ++ $(BPF_CFLAGS) \ + -O2 -emit-llvm -c -g -o ${@:.o=.ll} $< + $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll} + +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -139,12 +139,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L + $(QUIET_CLANG)$(CLANG) -S \ + -target $(BPF_TARGET) \ + -D __BPF_TRACING__ \ +- $(BPF_CFLAGS) \ + -Wall \ + -Wno-unused-value \ + -Wno-pointer-sign \ + -Wno-compare-distinct-pointer-types \ + -Werror \ ++ $(BPF_CFLAGS) \ + -O2 -emit-llvm -c -g -o ${@:.o=.ll} $< + $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll} + diff --git a/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch b/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch new file mode 100644 index 0000000000..d375e1db0c --- /dev/null +++ b/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch @@ -0,0 +1,55 @@ +From 7b00d4a90af1d7bff50833ffe1216cf59592353a Mon Sep 17 00:00:00 2001 +From: Andre Heider +Date: Wed, 18 Jan 2023 22:42:28 +0100 +Subject: [PATCH] Add BPF_LDFLAGS to allow overwriting llc's -march argument + +The argument to clang's -target isn't necessarily the same as to +llc's -march. + +Analogue to BPF_CFLAGS, introduce BPF_LDFLAGS to allow e.g.: +BPF_TARGET="mipsel-linux-gnu" BPF_LDFLAGS="-march=bpfel -mcpu=v3" + +Signed-off-by: Andre Heider +--- + configure | 2 ++ + lib/common.mk | 2 +- + lib/libxdp/Makefile | 2 +- + 3 files changed, 4 insertions(+), 2 deletions(-) + +--- a/configure ++++ b/configure +@@ -17,10 +17,12 @@ check_opts() + : ${DYNAMIC_LIBXDP:=0} + : ${MAX_DISPATCHER_ACTIONS:=10} + : ${BPF_TARGET:=bpf} ++ : ${BPF_LDFLAGS:=-march=$(BPF_TARGET)} + echo "PRODUCTION:=${PRODUCTION}" >>$CONFIG + echo "DYNAMIC_LIBXDP:=${DYNAMIC_LIBXDP}" >>$CONFIG + echo "MAX_DISPATCHER_ACTIONS:=${MAX_DISPATCHER_ACTIONS}" >>$CONFIG + echo "BPF_TARGET:=${BPF_TARGET}" >>$CONFIG ++ echo "BPF_LDFLAGS:=${BPF_LDFLAGS}" >>$CONFIG + } + + find_tool() +--- a/lib/common.mk ++++ b/lib/common.mk +@@ -115,7 +115,7 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX + -Werror \ + $(BPF_CFLAGS) \ + -O2 -emit-llvm -c -g -o ${@:.o=.ll} $< +- $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll} ++ $(QUIET_LLC)$(LLC) $(BPF_LDFLAGS) -filetype=obj -o $@ ${@:.o=.ll} + + .PHONY: man + ifeq ($(EMACS),) +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -146,7 +146,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L + -Werror \ + $(BPF_CFLAGS) \ + -O2 -emit-llvm -c -g -o ${@:.o=.ll} $< +- $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll} ++ $(QUIET_LLC)$(LLC) $(BPF_LDFLAGS) -filetype=obj -o $@ ${@:.o=.ll} + + .PHONY: man + ifeq ($(EMACS),) diff --git a/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch b/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch new file mode 100644 index 0000000000..a1659be3c8 --- /dev/null +++ b/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch @@ -0,0 +1,26 @@ +From: Felix Fietkau +Date: Wed, 1 May 2024 18:40:19 +0200 +Subject: [PATCH] ubus: fix uc_ubus_have_uloop for eloop+uloop combination + +When uloop has been integrated with eloop (in hostapd/wpa_supplicant), +uloop_cancelling will return false, since uloop_run is not being called. +This leads to ubus.defer() calling uloop_run in a context where it can +prevent the other event loop from running. + +Fix this by detecting event loop integration via uloop_fd_set_cb being set + +Signed-off-by: Felix Fietkau +--- + +--- a/lib/ubus.c ++++ b/lib/ubus.c +@@ -665,6 +665,9 @@ uc_ubus_have_uloop(void) + bool prev = uloop_cancelled; + bool active; + ++ if (uloop_fd_set_cb) ++ return true; ++ + uloop_cancelled = true; + active = uloop_cancelling(); + uloop_cancelled = prev; diff --git a/target/linux/bcm27xx/image/cmdline.txt b/target/linux/bcm27xx/image/cmdline.txt index 41f76f10af..bdd1e59a09 100644 --- a/target/linux/bcm27xx/image/cmdline.txt +++ b/target/linux/bcm27xx/image/cmdline.txt @@ -1 +1 @@ -console=serial0,115200 console=tty1 root=@ROOT@ rootfstype=squashfs,ext4 rootwait +console=tty1 console=serial0,115200 root=@ROOT@ rootfstype=squashfs,ext4 rootwait diff --git a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch index ab145eb66f..600fe08126 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch @@ -1185,7 +1185,7 @@ Signed-off-by: Jonathan Bell } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5686,7 +5686,7 @@ static void port_event(struct usb_hub *h +@@ -5697,7 +5697,7 @@ static void port_event(struct usb_hub *h port_dev->over_current_count++; port_over_current_notify(port_dev); diff --git a/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch index 34b923fb23..3feabeaf9d 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch @@ -90,10 +90,10 @@ Signed-off-by: Jonathan Bell + */ + void (*fixup_endpoint)(struct usb_hcd *hcd, struct usb_device *udev, + struct usb_host_endpoint *ep, int interval); - /* Returns the hardware-chosen device address */ - int (*address_device)(struct usb_hcd *, struct usb_device *udev); - /* prepares the hardware to send commands to the device */ -@@ -435,6 +440,8 @@ extern void usb_hcd_unmap_urb_setup_for_ + /* Set the hardware-chosen device address */ + int (*address_device)(struct usb_hcd *, struct usb_device *udev, + unsigned int timeout_ms); +@@ -436,6 +441,8 @@ extern void usb_hcd_unmap_urb_setup_for_ extern void usb_hcd_unmap_urb_for_dma(struct usb_hcd *, struct urb *); extern void usb_hcd_flush_endpoint(struct usb_device *udev, struct usb_host_endpoint *ep); diff --git a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch index 3c1e41ba0a..a5e08d4cca 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch @@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell * non-error returns are a promise to giveback() the urb later * we drop ownership so next owner (or urb unlink) can get it */ -@@ -5471,6 +5574,7 @@ static const struct hc_driver xhci_hc_dr +@@ -5480,6 +5583,7 @@ static const struct hc_driver xhci_hc_dr .endpoint_reset = xhci_endpoint_reset, .check_bandwidth = xhci_check_bandwidth, .reset_bandwidth = xhci_reset_bandwidth, diff --git a/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch index 93f7ffde9c..1188b4dbe4 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c -@@ -2522,9 +2522,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2524,9 +2524,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, * Event ring setup: Allocate a normal ring, but also setup * the event ring segment table (ERST). Section 4.9.3. */ @@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell if (!xhci->event_ring) goto fail; if (xhci_check_trb_in_td_math(xhci) < 0) -@@ -2537,7 +2539,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2539,7 +2541,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, /* set ERST count with the number of entries in the segment table */ val = readl(&xhci->ir_set->erst_size); val &= ERST_SIZE_MASK; @@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell val); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1672,8 +1672,8 @@ struct urb_priv { +@@ -1677,8 +1677,8 @@ struct urb_priv { * Each segment table entry is 4*32bits long. 1K seems like an ok size: * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, * meaning 64 ring segments. diff --git a/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch b/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch index db15c65809..ed242cbbe4 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch @@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -674,9 +674,9 @@ deq_found: +@@ -675,9 +675,9 @@ deq_found: } if ((ep->ep_state & SET_DEQ_PENDING)) { diff --git a/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 073bb8be79..0725689bf8 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) { --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -664,6 +664,15 @@ static int xhci_move_dequeue_past_td(str +@@ -665,6 +665,15 @@ static int xhci_move_dequeue_past_td(str } while (!cycle_found || !td_last_trb_found); deq_found: @@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell addr = xhci_trb_virt_to_dma(new_seg, new_deq); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1902,6 +1902,7 @@ struct xhci_hcd { +@@ -1907,6 +1907,7 @@ struct xhci_hcd { #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) #define XHCI_ZHAOXIN_HOST BIT_ULL(46) diff --git a/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch b/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch index ab76ad76cd..4147167600 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch @@ -144,7 +144,7 @@ Signed-off-by: Jonathan Bell if (ret) return -ENOMEM; -@@ -1811,7 +1815,7 @@ int xhci_alloc_erst(struct xhci_hcd *xhc +@@ -1813,7 +1817,7 @@ int xhci_alloc_erst(struct xhci_hcd *xhc for (val = 0; val < evt_ring->num_segs; val++) { entry = &erst->entries[val]; entry->seg_addr = cpu_to_le64(seg->dma); @@ -204,7 +204,7 @@ Signed-off-by: Jonathan Bell xhci_err(xhci, "Tried to move enqueue past ring segment\n"); return; } -@@ -3150,7 +3153,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd +@@ -3151,7 +3154,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd * that clears the EHB. */ while (xhci_handle_event(xhci) > 0) { @@ -213,7 +213,7 @@ Signed-off-by: Jonathan Bell continue; xhci_update_erst_dequeue(xhci, event_ring_deq); event_ring_deq = xhci->event_ring->dequeue; -@@ -3292,7 +3295,8 @@ static int prepare_ring(struct xhci_hcd +@@ -3293,7 +3296,8 @@ static int prepare_ring(struct xhci_hcd } } @@ -247,7 +247,7 @@ Signed-off-by: Jonathan Bell * when the cycle bit is set to 1. --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1634,6 +1634,7 @@ struct xhci_ring { +@@ -1639,6 +1639,7 @@ struct xhci_ring { unsigned int num_trbs_free; unsigned int num_trbs_free_temp; unsigned int bounce_buf_len; diff --git a/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch index 041f98a97d..da0d7cd969 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch @@ -63,7 +63,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1904,6 +1904,7 @@ struct xhci_hcd { +@@ -1909,6 +1909,7 @@ struct xhci_hcd { #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) #define XHCI_ZHAOXIN_HOST BIT_ULL(46) #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) diff --git a/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch b/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch index 0dd7b78b30..df13f539bd 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch @@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3605,14 +3605,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3606,14 +3606,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd * unsigned int num_trbs; unsigned int start_cycle, num_sgs = 0; unsigned int enqd_len, block_len, trb_buff_len, full_len; @@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell full_len = urb->transfer_buffer_length; /* If we have scatter/gather list, we use it. */ if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) { -@@ -3649,6 +3650,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3650,6 +3651,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd * start_cycle = ring->cycle_state; send_addr = addr; @@ -72,7 +72,7 @@ Signed-off-by: Jonathan Bell /* Queue the TRBs, even if they are zero-length */ for (enqd_len = 0; first_trb || enqd_len < full_len; enqd_len += trb_buff_len) { -@@ -3661,6 +3673,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3662,6 +3674,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd * if (enqd_len + trb_buff_len > full_len) trb_buff_len = full_len - enqd_len; @@ -86,7 +86,7 @@ Signed-off-by: Jonathan Bell first_trb = false; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1905,6 +1905,7 @@ struct xhci_hcd { +@@ -1910,6 +1910,7 @@ struct xhci_hcd { #define XHCI_ZHAOXIN_HOST BIT_ULL(46) #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48) diff --git a/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch index e3f1848ad5..fecee7d952 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch @@ -13,7 +13,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3605,7 +3605,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3606,7 +3606,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * unsigned int num_trbs; unsigned int start_cycle, num_sgs = 0; unsigned int enqd_len, block_len, trb_buff_len, full_len; @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell u32 field, length_field, remainder, maxpacket; u64 addr, send_addr; -@@ -3651,14 +3651,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3652,14 +3652,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd * send_addr = addr; if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG && @@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell } /* Queue the TRBs, even if they are zero-length */ -@@ -3673,7 +3668,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3674,7 +3669,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd * if (enqd_len + trb_buff_len > full_len) trb_buff_len = full_len - enqd_len; diff --git a/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch b/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch index f604759c2f..1afe830091 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch @@ -31,7 +31,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -1012,11 +1012,13 @@ static int xhci_invalidate_cancelled_tds +@@ -1013,11 +1013,13 @@ static int xhci_invalidate_cancelled_tds td->urb->stream_id, td->urb, cached_td->urb->stream_id, cached_td->urb); cached_td = td; @@ -45,7 +45,7 @@ Signed-off-by: Jonathan Bell } } -@@ -1264,10 +1266,7 @@ static void update_ring_for_set_deq_comp +@@ -1265,10 +1267,7 @@ static void update_ring_for_set_deq_comp unsigned int ep_index) { union xhci_trb *dequeue_temp; @@ -56,7 +56,7 @@ Signed-off-by: Jonathan Bell dequeue_temp = ep_ring->dequeue; /* If we get two back-to-back stalls, and the first stalled transfer -@@ -1282,8 +1281,6 @@ static void update_ring_for_set_deq_comp +@@ -1283,8 +1282,6 @@ static void update_ring_for_set_deq_comp } while (ep_ring->dequeue != dev->eps[ep_index].queued_deq_ptr) { @@ -65,7 +65,7 @@ Signed-off-by: Jonathan Bell ep_ring->dequeue++; if (trb_is_link(ep_ring->dequeue)) { if (ep_ring->dequeue == -@@ -1293,15 +1290,10 @@ static void update_ring_for_set_deq_comp +@@ -1294,15 +1291,10 @@ static void update_ring_for_set_deq_comp ep_ring->dequeue = ep_ring->deq_seg->trbs; } if (ep_ring->dequeue == dequeue_temp) { diff --git a/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index ade55cf337..ab0bae587b 100644 --- a/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3582,6 +3582,48 @@ static int xhci_align_td(struct xhci_hcd +@@ -3583,6 +3583,48 @@ static int xhci_align_td(struct xhci_hcd return 1; } @@ -89,7 +89,7 @@ Signed-off-by: Jonathan Bell /* This is very similar to what ehci-q.c qtd_fill() does */ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index) -@@ -3750,6 +3792,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3751,6 +3793,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * } check_trb_math(urb, enqd_len); @@ -98,7 +98,7 @@ Signed-off-by: Jonathan Bell giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, start_cycle, start_trb); return 0; -@@ -3885,6 +3929,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3886,6 +3930,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * /* Event on completion */ field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state); @@ -109,7 +109,7 @@ Signed-off-by: Jonathan Bell return 0; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1906,6 +1906,7 @@ struct xhci_hcd { +@@ -1911,6 +1911,7 @@ struct xhci_hcd { #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(47) #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48) #define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(49) diff --git a/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index edae77ccd1..9c769880a0 100644 --- a/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -108,7 +108,7 @@ it on BCM4708 family. if (xhci->quirks & XHCI_NEC_HOST) --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1902,6 +1902,7 @@ struct xhci_hcd { +@@ -1907,6 +1907,7 @@ struct xhci_hcd { #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) #define XHCI_ZHAOXIN_HOST BIT_ULL(46) diff --git a/target/linux/bmips/bcm6328/base-files/etc/board.d/02_network b/target/linux/bmips/bcm6328/base-files/etc/board.d/02_network index 104f20ef0e..78c0794f23 100644 --- a/target/linux/bmips/bcm6328/base-files/etc/board.d/02_network +++ b/target/linux/bmips/bcm6328/base-files/etc/board.d/02_network @@ -9,6 +9,9 @@ arcadyan,ar7516) ucidef_set_bridge_device switch ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; +inteno,xg6846) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan ext1" + ;; comtrend,ar-5381u |\ comtrend,ar-5387un |\ innacomm,w3400v6 |\ diff --git a/target/linux/bmips/bcm6328/config-6.1 b/target/linux/bmips/bcm6328/config-6.1 index 5b33e93236..de7784e80a 100644 --- a/target/linux/bmips/bcm6328/config-6.1 +++ b/target/linux/bmips/bcm6328/config-6.1 @@ -170,6 +170,7 @@ CONFIG_MTD_RAW_NAND=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_BCM63XX_FW=y CONFIG_MTD_SPLIT_BCM_WFI_FW=y +CONFIG_MTD_SPLIT_UIMAGE_FW=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 CONFIG_MTD_UBI_BLOCK=y diff --git a/target/linux/bmips/dts/bcm6328-inteno-xg6846.dts b/target/linux/bmips/dts/bcm6328-inteno-xg6846.dts new file mode 100644 index 0000000000..72f85a53ca --- /dev/null +++ b/target/linux/bmips/dts/bcm6328-inteno-xg6846.dts @@ -0,0 +1,313 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +/* + * Devicetree for the Inteno XG6846 router, mostly used as a + * media converter from fiber to twisted pair ethernet + * "fiber modem" in many households in Sweden. The Marvell + * switch has one of its ports connected to an SFP (Small Form + * Factor pluggable) optical fiber receiver, which is bridged + * to the twisted pair connector LAN1. + * + * This device tree is inspired by research from the OpenWrt + * and Sweclockers forums, including contributions from + * NPeca75, mrhaav and csom. + * + * Some devices have a USB type A host receptacle mounted, + * some do not. + */ +#include "bcm6328.dtsi" +#include +#include + +/ { + model = "Inteno XG6846"; + compatible = "inteno,xg6846", "brcm,bcm6328"; + + /* OpenWrt-specific aliases */ + aliases { + led-boot = &led_pwr_red; + led-failsafe = &led_pwr_red; + led-running = &led_pwr_green; + led-upgrade = &led_pwr_red; + led-usb = &led_usb_green; + }; + + chosen { + bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; + }; + + /* + * This I2C port is connected to the SFP and reflects the EEPROM etc + * inside the SFP module. If the module is not plugged in, consequently + * nothing will be found on the bus. + */ + i2c0: i2c-sfp { + compatible = "i2c-gpio"; + sda-gpios = <&gpio 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + #address-cells = <1>; + #size-cells = <0>; + }; + + /* This I2C bus is used for the external CATV connector (usually unused) */ + i2c1: i2c-catv { + compatible = "i2c-gpio"; + sda-gpios = <&gpio 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp0: sfp0 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpios = <&gpio 29 GPIO_ACTIVE_HIGH>; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio 24 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; +}; + +&hsspi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + /* + * HW 1.0-1.1: Spansion S25FL128S1 + * HW 1.3: Winbond W25Q128 + * + * Fast Read Data max speed is 50MHz, see the Winbond W25Q128 + * datasheet table 9.5 "AC Electrical Characteristics", we can + * use this speed because the chip supports fast reads. Older + * HW has different NOR chips, I assume they can all do fast + * reads. + */ + spi-max-frequency = <104000000>; + spi-tx-bus-width = <2>; + spi-rx-bus-width = <2>; + m25p,fast-read; + reg = <0>; + + #address-cells = <1>; + #size-cells = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + cfe: partition@0 { + label = "cfe"; + reg = <0x0000000 0x0010000>; + read-only; + }; + + partition@10000 { + compatible = "openwrt,uimage", "denx,uimage"; + reg = <0x010000 0xfe0000>; + label = "firmware"; + openwrt,offset = <0x30000>; + }; + + partition@ff0000 { + reg = <0xff0000 0x010000>; + label = "nvram"; + }; + }; + }; +}; + +&cfe { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_cfe_6a0: macaddr@6a0 { + reg = <0x6a0 0x6>; + }; +}; + +ðernet { + status = "okay"; + + nvmem-cells = <&macaddr_cfe_6a0>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + dsa,member = <0 0>; + + ports { + switch0port4: port@4 { + reg = <4>; + label = "extsw"; + + phy-mode = "rgmii"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +&mdio_ext { + switch1: switch@0 { + /* The switch is not using any external IRQ, sadly */ + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + dsa,member = <1 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + phy-handle = <&lan1phy>; + }; + + port@1 { + reg = <1>; + label = "lan2"; + phy-handle = <&lan2phy>; + }; + + port@2 { + reg = <2>; + label = "lan3"; + phy-handle = <&lan3phy>; + }; + + port@3 { + reg = <3>; + label = "lan4"; + phy-handle = <&lan4phy>; + }; + + port@4 { + reg = <4>; + label = "ext1"; + phy-handle = <&ext1phy>; + }; + + port@5 { + reg = <5>; + phy-mode = "rgmii-id"; + label = "wan"; + sfp = <&sfp0>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + port@6 { + reg = <6>; + phy-mode = "rgmii-id"; + label = "cpu"; + ethernet = <&switch0port4>; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + lan1phy: ethernet-phy@0 { + reg = <0>; + interrupt-parent = <&switch1>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; + }; + lan2phy: ethernet-phy@1 { + reg = <1>; + interrupt-parent = <&switch1>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH>; + }; + lan3phy: ethernet-phy@2 { + reg = <2>; + interrupt-parent = <&switch1>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; + }; + lan4phy: ethernet-phy@3 { + reg = <3>; + interrupt-parent = <&switch1>; + interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; + }; + ext1phy: ethernet-phy@4 { + reg = <4>; + interrupt-parent = <&switch1>; + interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + }; +}; + +&uart0 { + status = "okay"; +}; + +&pinctrl { + pinctrl_xg6846_usb_spd_led: xg6846_usb_spd_led-pins { + function = "led"; + pins = "gpio17"; + }; +}; + +&leds { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_xg6846_usb_spd_led>, /* GPIO16 LED USB */ + <&pinctrl_ephy1_spd_led>, /* GPIO18 LED PWR red */ + <&pinctrl_ephy3_spd_led>; /* GPIO20 LED PWR green */ + + /* On board variants without USB this LED is not mounted */ + led_usb_green: led@16 { + reg = <16>; + active-low; + label = "green:usb"; + default-state = "off"; + }; + + /* + * LED 18 and 20 drive the same physical LED, the PWR + * LED that can be both red and green. + */ + led_pwr_red: led@18 { + reg = <18>; + active-low; + label = "red:pwr"; + default-state = "off"; + }; + + led_pwr_green: led@20 { + reg = <20>; + active-low; + label = "green:pwr"; + default-state = "off"; + }; + +}; diff --git a/target/linux/bmips/image/Makefile b/target/linux/bmips/image/Makefile index c4e6e51f3d..00580a2f7b 100644 --- a/target/linux/bmips/image/Makefile +++ b/target/linux/bmips/image/Makefile @@ -4,6 +4,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR := 0x80010000 # RAM start + 64K +UBOOT_ENTRY := 0x81c00000 LOADER_ENTRY := 0x81000000 # RAM start + 16M, for relocate LZMA_TEXT_START := 0x82000000 # RAM start + 32M @@ -94,6 +95,21 @@ define Build/cfe-bin $(CFE_EXTRAS) $(1) endef +# Build a CFE image with just U-Boot +define Build/cfe-bin-uboot + cp $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin $@ + $(call Build/lzma) + mv $@ $@.uboot.lzma + echo "dummy" > $@.dummyfs + $(STAGING_DIR_HOST)/bin/imagetag -i $@.uboot.lzma -f $@.dummyfs \ + --output $@ --boardid $(CFE_BOARD_ID) --chipid $(CHIP_ID) \ + --entry $(UBOOT_ENTRY) --load-addr $(UBOOT_ENTRY) \ + --info1 "$(call ModelNameLimit16,$(DEVICE_NAME))" \ + $(CFE_EXTRAS) $(1) + rm $@.uboot.lzma + rm $@.dummyfs +endef + define Build/cfe-jffs2 $(STAGING_DIR_HOST)/bin/mkfs.jffs2 \ --big-endian \ @@ -284,6 +300,21 @@ define Device/bcm63xx-cfe-legacy KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe endef +# CFE images with U-Boot in front of the kernel, these will execute +# U-Boot instead of the kernel and U-Boot will then proceed to load +# the kernel. The reason to do this is that CFE is sometimes unable to +# load big kernels even with the lzma loader tricks. +define Device/bcm63xx-cfe-uboot + $(Device/bcm63xx-cfe) + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma + IMAGE/cfe.bin := cfe-bin-uboot | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \ + append-kernel | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \ + append-rootfs $$$$(if $$$$(FLASH_MB),--pad $$$$(shell expr $$$$(FLASH_MB) / 2)) + IMAGE/sysupgrade.bin := cfe-bin-uboot | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \ + append-kernel | pad-to $$$$$$$$(($$(BLOCKSIZE))) | \ + append-rootfs | append-metadata +endef + # CFE expects a single JFFS2 partition with cferam and kernel. However, # it's possible to fool CFE into properly loading both cferam and kernel # from two different JFFS2 partitions by adding dummy files (see diff --git a/target/linux/bmips/image/bcm6328.mk b/target/linux/bmips/image/bcm6328.mk index b28926b1e7..b85b6ac7a8 100644 --- a/target/linux/bmips/image/bcm6328.mk +++ b/target/linux/bmips/image/bcm6328.mk @@ -51,6 +51,20 @@ define Device/innacomm_w3400v6 endef TARGET_DEVICES += innacomm_w3400v6 +define Device/inteno_xg6846 + $(Device/bcm63xx-cfe-uboot) + DEVICE_VENDOR := Inteno + DEVICE_MODEL := XG6846 + CHIP_ID := 6328 + CFE_BOARD_ID := 96328avng + FLASH_MB := 16 + DEVICE_PACKAGES := $(USB2_PACKAGES) \ + kmod-i2c-core kmod-i2c-gpio \ + kmod-leds-bcm6328 kmod-dsa-mv88e6xxx \ + kmod-sfp +endef +TARGET_DEVICES += inteno_xg6846 + define Device/nucom_r5010unv2 $(Device/bcm63xx-cfe) DEVICE_VENDOR := NuCom diff --git a/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch b/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch deleted file mode 100644 index 29f211e8a5..0000000000 --- a/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Pablo Neira Ayuso -Date: Thu, 11 Apr 2024 13:28:59 +0200 -Subject: [PATCH] netfilter: flowtable: validate pppoe header - -Ensure there is sufficient room to access the protocol field of the -PPPoe header. Validate it once before the flowtable lookup, then use a -helper function to access protocol field. - -Reported-by: syzbot+b6f07e1c07ef40199081@syzkaller.appspotmail.com -Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support") -Signed-off-by: Pablo Neira Ayuso ---- - ---- a/include/net/netfilter/nf_flow_table.h -+++ b/include/net/netfilter/nf_flow_table.h -@@ -335,7 +335,7 @@ int nf_flow_rule_route_ipv6(struct net * - int nf_flow_table_offload_init(void); - void nf_flow_table_offload_exit(void); - --static inline __be16 nf_flow_pppoe_proto(const struct sk_buff *skb) -+static inline __be16 __nf_flow_pppoe_proto(const struct sk_buff *skb) - { - __be16 proto; - -@@ -351,6 +351,16 @@ static inline __be16 nf_flow_pppoe_proto - return 0; - } - -+static inline bool nf_flow_pppoe_proto(struct sk_buff *skb, __be16 *inner_proto) -+{ -+ if (!pskb_may_pull(skb, PPPOE_SES_HLEN)) -+ return false; -+ -+ *inner_proto = __nf_flow_pppoe_proto(skb); -+ -+ return true; -+} -+ - #define NF_FLOW_TABLE_STAT_INC(net, count) __this_cpu_inc((net)->ft.stat->count) - #define NF_FLOW_TABLE_STAT_DEC(net, count) __this_cpu_dec((net)->ft.stat->count) - #define NF_FLOW_TABLE_STAT_INC_ATOMIC(net, count) \ ---- a/net/netfilter/nf_flow_table_inet.c -+++ b/net/netfilter/nf_flow_table_inet.c -@@ -21,7 +21,8 @@ nf_flow_offload_inet_hook(void *priv, st - proto = veth->h_vlan_encapsulated_proto; - break; - case htons(ETH_P_PPP_SES): -- proto = nf_flow_pppoe_proto(skb); -+ if (!nf_flow_pppoe_proto(skb, &proto)) -+ return NF_ACCEPT; - break; - default: - proto = skb->protocol; ---- a/net/netfilter/nf_flow_table_ip.c -+++ b/net/netfilter/nf_flow_table_ip.c -@@ -267,10 +267,11 @@ static unsigned int nf_flow_xmit_xfrm(st - return NF_STOLEN; - } - --static bool nf_flow_skb_encap_protocol(const struct sk_buff *skb, __be16 proto, -+static bool nf_flow_skb_encap_protocol(struct sk_buff *skb, __be16 proto, - u32 *offset) - { - struct vlan_ethhdr *veth; -+ __be16 inner_proto; - - switch (skb->protocol) { - case htons(ETH_P_8021Q): -@@ -281,7 +282,8 @@ static bool nf_flow_skb_encap_protocol(c - } - break; - case htons(ETH_P_PPP_SES): -- if (nf_flow_pppoe_proto(skb) == proto) { -+ if (nf_flow_pppoe_proto(skb, &inner_proto) && -+ inner_proto == proto) { - *offset += PPPOE_SES_HLEN; - return true; - } -@@ -310,7 +312,7 @@ static void nf_flow_encap_pop(struct sk_ - skb_reset_network_header(skb); - break; - case htons(ETH_P_PPP_SES): -- skb->protocol = nf_flow_pppoe_proto(skb); -+ skb->protocol = __nf_flow_pppoe_proto(skb); - skb_pull(skb, PPPOE_SES_HLEN); - skb_reset_network_header(skb); - break; diff --git a/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch b/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch deleted file mode 100644 index 3b822b169d..0000000000 --- a/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Pablo Neira Ayuso -Date: Thu, 11 Apr 2024 13:29:00 +0200 -Subject: [PATCH] netfilter: flowtable: incorrect pppoe tuple - -pppoe traffic reaching ingress path does not match the flowtable entry -because the pppoe header is expected to be at the network header offset. -This bug causes a mismatch in the flow table lookup, so pppoe packets -enter the classical forwarding path. - -Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support") -Signed-off-by: Pablo Neira Ayuso ---- - ---- a/net/netfilter/nf_flow_table_ip.c -+++ b/net/netfilter/nf_flow_table_ip.c -@@ -156,7 +156,7 @@ static void nf_flow_tuple_encap(struct s - tuple->encap[i].proto = skb->protocol; - break; - case htons(ETH_P_PPP_SES): -- phdr = (struct pppoe_hdr *)skb_mac_header(skb); -+ phdr = (struct pppoe_hdr *)skb_network_header(skb); - tuple->encap[i].id = ntohs(phdr->sid); - tuple->encap[i].proto = skb->protocol; - break; diff --git a/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch b/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch index 51250ac97a..0119925ab0 100644 --- a/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch +++ b/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch @@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski } --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c -@@ -1736,6 +1736,15 @@ static int dsa_switch_probe(struct dsa_s +@@ -1758,6 +1758,15 @@ static int dsa_switch_probe(struct dsa_s if (!ds->num_ports) return -EINVAL; diff --git a/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch b/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch index f662a76368..e0319fd355 100644 --- a/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch +++ b/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch @@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3010,9 +3010,6 @@ static void mt753x_phylink_get_caps(stru +@@ -3198,9 +3198,6 @@ static void mt753x_phylink_get_caps(stru config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; diff --git a/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch index 36ff3549e9..2697f2e563 100644 --- a/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch +++ b/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch @@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski #include #include #include -@@ -2651,128 +2652,11 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2839,128 +2840,11 @@ static int mt7531_rgmii_setup(struct mt7 return 0; } @@ -173,7 +173,7 @@ Signed-off-by: Jakub Kicinski static int mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) -@@ -2795,11 +2679,11 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2983,11 +2867,11 @@ mt7531_mac_config(struct dsa_switch *ds, phydev = dp->slave->phydev; return mt7531_rgmii_setup(priv, port, interface, phydev); case PHY_INTERFACE_MODE_SGMII: @@ -187,7 +187,7 @@ Signed-off-by: Jakub Kicinski default: return -EINVAL; } -@@ -2824,11 +2708,11 @@ mt753x_phylink_mac_select_pcs(struct dsa +@@ -3012,11 +2896,11 @@ mt753x_phylink_mac_select_pcs(struct dsa switch (interface) { case PHY_INTERFACE_MODE_TRGMII: @@ -201,7 +201,7 @@ Signed-off-by: Jakub Kicinski default: return NULL; } -@@ -3066,86 +2950,6 @@ static void mt7530_pcs_get_state(struct +@@ -3254,86 +3138,6 @@ static void mt7530_pcs_get_state(struct state->pause |= MLO_PAUSE_TX; } @@ -288,7 +288,7 @@ Signed-off-by: Jakub Kicinski static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode, phy_interface_t interface, const unsigned long *advertising, -@@ -3165,18 +2969,57 @@ static const struct phylink_pcs_ops mt75 +@@ -3353,18 +3157,57 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -352,7 +352,7 @@ Signed-off-by: Jakub Kicinski int i, ret; /* Initialise the PCS devices */ -@@ -3184,8 +3027,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3372,8 +3215,6 @@ mt753x_setup(struct dsa_switch *ds) priv->pcs[i].pcs.ops = priv->info->pcs_ops; priv->pcs[i].priv = priv; priv->pcs[i].port = i; @@ -361,7 +361,7 @@ Signed-off-by: Jakub Kicinski } ret = priv->info->sw_setup(ds); -@@ -3200,6 +3041,16 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3388,6 +3229,16 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -378,7 +378,7 @@ Signed-off-by: Jakub Kicinski return ret; } -@@ -3291,7 +3142,7 @@ static const struct mt753x_info mt753x_t +@@ -3480,7 +3331,7 @@ static const struct mt753x_info mt753x_t }, [ID_MT7531] = { .id = ID_MT7531, @@ -387,7 +387,7 @@ Signed-off-by: Jakub Kicinski .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, -@@ -3399,7 +3250,7 @@ static void +@@ -3588,7 +3439,7 @@ static void mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); @@ -396,7 +396,7 @@ Signed-off-by: Jakub Kicinski if (!priv) return; -@@ -3418,6 +3269,10 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3607,6 +3458,10 @@ mt7530_remove(struct mdio_device *mdiode mt7530_free_irq(priv); dsa_unregister_switch(priv->ds); @@ -409,7 +409,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -391,47 +391,8 @@ enum mt7530_vlan_port_acc_frm { +@@ -401,47 +401,8 @@ enum mt7530_vlan_port_acc_frm { CCR_TX_OCT_CNT_BAD) /* MT7531 SGMII register group */ @@ -459,7 +459,7 @@ Signed-off-by: Jakub Kicinski /* Register for system reset */ #define MT7530_SYS_CTRL 0x7000 -@@ -730,13 +691,13 @@ struct mt7530_fdb { +@@ -741,13 +702,13 @@ struct mt7530_fdb { * @pm: The matrix used to show all connections with the port. * @pvid: The VLAN specified is to be considered a PVID at ingress. Any * untagged frames will be assigned to the related VLAN. diff --git a/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch index ed24c452e2..1bf19a813e 100644 --- a/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch +++ b/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3001,26 +3001,56 @@ static const struct regmap_bus mt7531_re +@@ -3189,26 +3189,56 @@ static const struct regmap_bus mt7531_re .reg_update_bits = mt7530_regmap_update_bits, }; @@ -88,7 +88,7 @@ Signed-off-by: David S. Miller int i, ret; /* Initialise the PCS devices */ -@@ -3042,15 +3072,11 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3230,15 +3260,11 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch index 0298ebd274..bd28b4be76 100644 --- a/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch +++ b/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2974,7 +2974,7 @@ static int mt7530_regmap_read(void *cont +@@ -3162,7 +3162,7 @@ static int mt7530_regmap_read(void *cont { struct mt7530_priv *priv = context; @@ -28,7 +28,7 @@ Signed-off-by: David S. Miller return 0; }; -@@ -2982,23 +2982,25 @@ static int mt7530_regmap_write(void *con +@@ -3170,23 +3170,25 @@ static int mt7530_regmap_write(void *con { struct mt7530_priv *priv = context; @@ -62,7 +62,7 @@ Signed-off-by: David S. Miller }; static int -@@ -3024,6 +3026,9 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -3212,6 +3214,9 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->reg_stride = 4; mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i); mt7531_pcs_config[i]->max_register = 0x17c; diff --git a/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch index e5625f67de..42c225d91c 100644 --- a/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch +++ b/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller } static void -@@ -2970,22 +2991,6 @@ static const struct phylink_pcs_ops mt75 +@@ -3158,22 +3179,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -156,7 +156,7 @@ Signed-off-by: David S. Miller static void mt7530_mdio_regmap_lock(void *mdio_lock) { -@@ -2998,7 +3003,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc +@@ -3186,7 +3191,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc mutex_unlock(mdio_lock); } @@ -165,7 +165,7 @@ Signed-off-by: David S. Miller .reg_write = mt7530_regmap_write, .reg_read = mt7530_regmap_read, }; -@@ -3031,7 +3036,7 @@ mt7531_create_sgmii(struct mt7530_priv * +@@ -3219,7 +3224,7 @@ mt7531_create_sgmii(struct mt7530_priv * mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock; regmap = devm_regmap_init(priv->dev, @@ -174,7 +174,7 @@ Signed-off-by: David S. Miller mt7531_pcs_config[i]); if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); -@@ -3196,6 +3201,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) +@@ -3385,6 +3390,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match) static int mt7530_probe(struct mdio_device *mdiodev) { @@ -182,7 +182,7 @@ Signed-off-by: David S. Miller struct mt7530_priv *priv; struct device_node *dn; -@@ -3275,6 +3281,21 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3464,6 +3470,21 @@ mt7530_probe(struct mdio_device *mdiodev mutex_init(&priv->reg_mutex); dev_set_drvdata(&mdiodev->dev, priv); @@ -206,7 +206,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -774,6 +774,7 @@ struct mt753x_info { +@@ -785,6 +785,7 @@ struct mt753x_info { * @dev: The device pointer * @ds: The pointer to the dsa core structure * @bus: The bus used for the device and built-in PHY @@ -214,7 +214,7 @@ Signed-off-by: David S. Miller * @rstc: The pointer to reset control used by MCM * @core_pwr: The power supplied into the core * @io_pwr: The power supplied into the I/O -@@ -794,6 +795,7 @@ struct mt7530_priv { +@@ -805,6 +806,7 @@ struct mt7530_priv { struct device *dev; struct dsa_switch *ds; struct mii_bus *bus; diff --git a/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch index ca1f38f9c2..9cd817c056 100644 --- a/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch +++ b/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch @@ -18,7 +18,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3082,12 +3082,6 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3270,12 +3270,6 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -31,7 +31,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -3204,6 +3198,7 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3393,6 +3387,7 @@ mt7530_probe(struct mdio_device *mdiodev static struct regmap_config *regmap_config; struct mt7530_priv *priv; struct device_node *dn; @@ -39,7 +39,7 @@ Signed-off-by: David S. Miller dn = mdiodev->dev.of_node; -@@ -3296,6 +3291,12 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3485,6 +3480,12 @@ mt7530_probe(struct mdio_device *mdiodev if (IS_ERR(priv->regmap)) return PTR_ERR(priv->regmap); diff --git a/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch index 813e976810..4f77078eef 100644 --- a/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch +++ b/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch @@ -114,7 +114,7 @@ Signed-off-by: David S. Miller } static void -@@ -645,14 +649,13 @@ static int +@@ -659,14 +663,13 @@ static int mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad, int regnum) { @@ -130,7 +130,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val, !(val & MT7531_PHY_ACS_ST), 20, 100000); -@@ -685,7 +688,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr +@@ -699,7 +702,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr ret = val & MT7531_MDIO_RW_DATA_MASK; out: @@ -139,7 +139,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -694,14 +697,13 @@ static int +@@ -708,14 +711,13 @@ static int mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad, int regnum, u32 data) { @@ -155,7 +155,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val, !(val & MT7531_PHY_ACS_ST), 20, 100000); -@@ -733,7 +735,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p +@@ -747,7 +749,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p } out: @@ -164,7 +164,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -741,14 +743,13 @@ out: +@@ -755,14 +757,13 @@ out: static int mt7531_ind_c22_phy_read(struct mt7530_priv *priv, int port, int regnum) { @@ -180,7 +180,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val, !(val & MT7531_PHY_ACS_ST), 20, 100000); -@@ -771,7 +772,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr +@@ -785,7 +786,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr ret = val & MT7531_MDIO_RW_DATA_MASK; out: @@ -189,7 +189,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -780,14 +781,13 @@ static int +@@ -794,14 +795,13 @@ static int mt7531_ind_c22_phy_write(struct mt7530_priv *priv, int port, int regnum, u16 data) { @@ -205,7 +205,7 @@ Signed-off-by: David S. Miller ret = readx_poll_timeout(_mt7530_unlocked_read, &p, reg, !(reg & MT7531_PHY_ACS_ST), 20, 100000); -@@ -809,7 +809,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p +@@ -823,7 +823,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p } out: @@ -214,7 +214,7 @@ Signed-off-by: David S. Miller return ret; } -@@ -1161,7 +1161,6 @@ static int +@@ -1343,7 +1343,6 @@ static int mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu) { struct mt7530_priv *priv = ds->priv; @@ -222,7 +222,7 @@ Signed-off-by: David S. Miller int length; u32 val; -@@ -1172,7 +1171,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1354,7 +1353,7 @@ mt7530_port_change_mtu(struct dsa_switch if (!dsa_is_cpu_port(ds, port)) return 0; @@ -231,7 +231,7 @@ Signed-off-by: David S. Miller val = mt7530_mii_read(priv, MT7530_GMACCR); val &= ~MAX_RX_PKT_LEN_MASK; -@@ -1193,7 +1192,7 @@ mt7530_port_change_mtu(struct dsa_switch +@@ -1375,7 +1374,7 @@ mt7530_port_change_mtu(struct dsa_switch mt7530_mii_write(priv, MT7530_GMACCR, val); @@ -240,7 +240,7 @@ Signed-off-by: David S. Miller return 0; } -@@ -1994,10 +1993,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ +@@ -2176,10 +2175,10 @@ mt7530_irq_thread_fn(int irq, void *dev_ u32 val; int p; @@ -253,7 +253,7 @@ Signed-off-by: David S. Miller for (p = 0; p < MT7530_NUM_PHYS; p++) { if (BIT(p) & val) { -@@ -2033,7 +2032,7 @@ mt7530_irq_bus_lock(struct irq_data *d) +@@ -2215,7 +2214,7 @@ mt7530_irq_bus_lock(struct irq_data *d) { struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); @@ -262,7 +262,7 @@ Signed-off-by: David S. Miller } static void -@@ -2042,7 +2041,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da +@@ -2224,7 +2223,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable); diff --git a/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch index 177f6af780..9cb0b2dd61 100644 --- a/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch +++ b/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch @@ -21,7 +21,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -950,6 +950,24 @@ mt7530_set_ageing_time(struct dsa_switch +@@ -964,6 +964,24 @@ mt7530_set_ageing_time(struct dsa_switch return 0; } @@ -48,7 +48,7 @@ Signed-off-by: David S. Miller struct mt7530_priv *priv = ds->priv; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -709,24 +709,6 @@ enum p5_interface_select { +@@ -720,24 +720,6 @@ enum p5_interface_select { P5_INTF_SEL_GMAC5_SGMII, }; diff --git a/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch index 8950caaaef..a6af682826 100644 --- a/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch +++ b/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3210,44 +3210,21 @@ static const struct of_device_id mt7530_ +@@ -3399,44 +3399,21 @@ static const struct of_device_id mt7530_ MODULE_DEVICE_TABLE(of, mt7530_of_match); static int @@ -67,7 +67,7 @@ Signed-off-by: David S. Miller if (!priv->info) return -EINVAL; -@@ -3261,23 +3238,53 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3450,23 +3427,53 @@ mt7530_probe(struct mdio_device *mdiodev return -EINVAL; priv->id = priv->info->id; @@ -131,7 +131,7 @@ Signed-off-by: David S. Miller priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(priv->reset)) { -@@ -3286,12 +3293,15 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3475,12 +3482,15 @@ mt7530_probe(struct mdio_device *mdiodev } } diff --git a/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch index 24eadb589e..4192753e89 100644 --- a/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch +++ b/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3328,6 +3328,17 @@ mt7530_probe(struct mdio_device *mdiodev +@@ -3517,6 +3517,17 @@ mt7530_probe(struct mdio_device *mdiodev } static void @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller mt7530_remove(struct mdio_device *mdiodev) { struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev); -@@ -3346,15 +3357,10 @@ mt7530_remove(struct mdio_device *mdiode +@@ -3535,15 +3546,10 @@ mt7530_remove(struct mdio_device *mdiode dev_err(priv->dev, "Failed to disable io pwr: %d\n", ret); diff --git a/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch index a6bb7d9e7b..72a499381f 100644 --- a/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch +++ b/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch @@ -420,7 +420,7 @@ Signed-off-by: David S. Miller static u32 mt7530_mii_read(struct mt7530_priv *priv, u32 reg) { -@@ -3008,72 +2959,6 @@ static const struct phylink_pcs_ops mt75 +@@ -3196,72 +3147,6 @@ static const struct phylink_pcs_ops mt75 .pcs_an_restart = mt7530_pcs_an_restart, }; @@ -493,7 +493,7 @@ Signed-off-by: David S. Miller static int mt753x_setup(struct dsa_switch *ds) { -@@ -3132,7 +3017,7 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3320,7 +3205,7 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -501,8 +501,8 @@ Signed-off-by: David S. Miller +const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, - .get_strings = mt7530_get_strings, -@@ -3166,8 +3051,9 @@ static const struct dsa_switch_ops mt753 + .preferred_default_local_cpu_port = mt753x_preferred_default_local_cpu_port, +@@ -3355,8 +3240,9 @@ static const struct dsa_switch_ops mt753 .get_mac_eee = mt753x_get_mac_eee, .set_mac_eee = mt753x_set_mac_eee, }; @@ -513,7 +513,7 @@ Signed-off-by: David S. Miller [ID_MT7621] = { .id = ID_MT7621, .pcs_ops = &mt7530_pcs_ops, -@@ -3200,16 +3086,9 @@ static const struct mt753x_info mt753x_t +@@ -3389,16 +3275,9 @@ static const struct mt753x_info mt753x_t .mac_port_config = mt7531_mac_config, }, }; @@ -532,7 +532,7 @@ Signed-off-by: David S. Miller mt7530_probe_common(struct mt7530_priv *priv) { struct device *dev = priv->dev; -@@ -3246,88 +3125,9 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3435,88 +3314,9 @@ mt7530_probe_common(struct mt7530_priv * return 0; } @@ -623,7 +623,7 @@ Signed-off-by: David S. Miller mt7530_remove_common(struct mt7530_priv *priv) { if (priv->irq) -@@ -3337,55 +3137,7 @@ mt7530_remove_common(struct mt7530_priv +@@ -3526,55 +3326,7 @@ mt7530_remove_common(struct mt7530_priv mutex_destroy(&priv->reg_mutex); } @@ -682,7 +682,7 @@ Signed-off-by: David S. Miller MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch"); --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -834,4 +834,10 @@ static inline void INIT_MT7530_DUMMY_POL +@@ -845,4 +845,10 @@ static inline void INIT_MT7530_DUMMY_POL p->reg = reg; } diff --git a/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch index 9bc3f54c23..f5573fc6c4 100644 --- a/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch +++ b/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch @@ -184,7 +184,7 @@ Signed-off-by: David S. Miller +MODULE_LICENSE("GPL"); --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2041,6 +2041,47 @@ static const struct irq_domain_ops mt753 +@@ -2223,6 +2223,47 @@ static const struct irq_domain_ops mt753 }; static void @@ -232,7 +232,7 @@ Signed-off-by: David S. Miller mt7530_setup_mdio_irq(struct mt7530_priv *priv) { struct dsa_switch *ds = priv->ds; -@@ -2074,8 +2115,15 @@ mt7530_setup_irq(struct mt7530_priv *pri +@@ -2256,8 +2297,15 @@ mt7530_setup_irq(struct mt7530_priv *pri return priv->irq ? : -EINVAL; } @@ -250,7 +250,7 @@ Signed-off-by: David S. Miller if (!priv->irq_domain) { dev_err(dev, "failed to create IRQ domain\n"); return -ENOMEM; -@@ -2574,6 +2622,25 @@ static void mt7531_mac_port_get_caps(str +@@ -2762,6 +2810,25 @@ static void mt7531_mac_port_get_caps(str } } @@ -276,7 +276,7 @@ Signed-off-by: David S. Miller static int mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state) { -@@ -2650,6 +2717,17 @@ static bool mt753x_is_mac_port(u32 port) +@@ -2838,6 +2905,17 @@ static bool mt753x_is_mac_port(u32 port) } static int @@ -294,7 +294,7 @@ Signed-off-by: David S. Miller mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2719,7 +2797,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2907,7 +2985,8 @@ mt753x_phylink_mac_config(struct dsa_swi switch (port) { case 0 ... 4: /* Internal phy */ @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller goto unsupported; break; case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */ -@@ -2797,7 +2876,8 @@ static void mt753x_phylink_mac_link_up(s +@@ -2985,7 +3064,8 @@ static void mt753x_phylink_mac_link_up(s /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ @@ -314,7 +314,7 @@ Signed-off-by: David S. Miller (phy_interface_mode_is_8023z(interface))) { speed = SPEED_1000; duplex = DUPLEX_FULL; -@@ -2877,6 +2957,21 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3065,6 +3145,21 @@ mt7531_cpu_port_config(struct dsa_switch return 0; } @@ -336,7 +336,7 @@ Signed-off-by: David S. Miller static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { -@@ -3019,6 +3114,27 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3207,6 +3302,27 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -364,7 +364,7 @@ Signed-off-by: David S. Miller const struct dsa_switch_ops mt7530_switch_ops = { .get_tag_protocol = mtk_get_tag_protocol, .setup = mt753x_setup, -@@ -3087,6 +3203,17 @@ const struct mt753x_info mt753x_table[] +@@ -3276,6 +3392,17 @@ const struct mt753x_info mt753x_table[] .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, }, @@ -392,9 +392,9 @@ Signed-off-by: David S. Miller }; #define NUM_TRGMII_CTRL 5 -@@ -54,11 +55,11 @@ enum mt753x_id { - #define MT7531_MIRROR_PORT_SET(x) (((x) & MIRROR_MASK) << 16) +@@ -59,11 +60,11 @@ enum mt753x_id { #define MT7531_CPU_PMAP_MASK GENMASK(7, 0) + #define MT7531_CPU_PMAP(x) FIELD_PREP(MT7531_CPU_PMAP_MASK, x) -#define MT753X_MIRROR_REG(id) (((id) == ID_MT7531) ? \ +#define MT753X_MIRROR_REG(id) ((((id) == ID_MT7531) || ((id) == ID_MT7988)) ? \ @@ -407,7 +407,7 @@ Signed-off-by: David S. Miller MT7531_MIRROR_MASK : MIRROR_MASK) /* Registers for BPDU and PAE frame control*/ -@@ -322,9 +323,8 @@ enum mt7530_vlan_port_acc_frm { +@@ -332,9 +333,8 @@ enum mt7530_vlan_port_acc_frm { MT7531_FORCE_DPX | \ MT7531_FORCE_RX_FC | \ MT7531_FORCE_TX_FC) diff --git a/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch index ef2d07ab79..40209b0305 100644 --- a/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch +++ b/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch @@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski } --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3081,6 +3081,12 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3269,6 +3269,12 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); @@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -768,10 +768,10 @@ struct mt753x_info { +@@ -779,10 +779,10 @@ struct mt753x_info { * registers * @p6_interface Holding the current port 6 interface * @p5_intf_sel: Holding the current port 5 interface select @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski */ struct mt7530_priv { struct device *dev; -@@ -790,7 +790,6 @@ struct mt7530_priv { +@@ -801,7 +801,6 @@ struct mt7530_priv { unsigned int p5_intf_sel; u8 mirror_rx; u8 mirror_tx; @@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski struct mt7530_port ports[MT7530_NUM_PORTS]; struct mt753x_pcs pcs[MT7530_NUM_PORTS]; /* protect among processes for registers access*/ -@@ -798,6 +797,7 @@ struct mt7530_priv { +@@ -809,6 +808,7 @@ struct mt7530_priv { int irq; struct irq_domain *irq_domain; u32 irq_enable; diff --git a/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch b/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch deleted file mode 100644 index 068fb38a4e..0000000000 --- a/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 4b11e3eb0eb7245a0d22a5dc4161c54eea42910c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Sat, 17 Jun 2023 09:26:44 +0300 -Subject: [PATCH 16/48] net: dsa: mt7530: set all CPU ports in MT7531_CPU_PMAP -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -MT7531_CPU_PMAP represents the destination port mask for trapped-to-CPU -frames (further restricted by PCR_MATRIX). - -Currently the driver sets the first CPU port as the single port in this bit -mask, which works fine regardless of whether the device tree defines port -5, 6 or 5+6 as CPU ports. This is because the logic coincides with DSA's -logic of picking the first CPU port as the CPU port that all user ports are -affine to, by default. - -An upcoming change would like to influence DSA's selection of the default -CPU port to no longer be the first one, and in that case, this logic needs -adaptation. - -Since there is no observed leakage or duplication of frames if all CPU -ports are defined in this bit mask, simply include them all. - -Suggested-by: Russell King (Oracle) -Suggested-by: Vladimir Oltean -Signed-off-by: Arınç ÜNAL -Reviewed-by: Vladimir Oltean -Reviewed-by: Russell King (Oracle) -Reviewed-by: Florian Fainelli -Signed-off-by: David S. Miller ---- - drivers/net/dsa/mt7530.c | 15 +++++++-------- - drivers/net/dsa/mt7530.h | 1 + - 2 files changed, 8 insertions(+), 8 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -1069,6 +1069,13 @@ mt753x_cpu_port_enable(struct dsa_switch - if (priv->id == ID_MT7530 || priv->id == ID_MT7621) - mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port)); - -+ /* Add the CPU port to the CPU port bitmap for MT7531 and the switch on -+ * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that -+ * is affine to the inbound user port. -+ */ -+ if (priv->id == ID_MT7531 || priv->id == ID_MT7988) -+ mt7530_set(priv, MT7531_CFC, MT7531_CPU_PMAP(BIT(port))); -+ - /* CPU port gets connected to all user ports of - * the switch. - */ -@@ -2411,16 +2418,8 @@ static int - mt7531_setup_common(struct dsa_switch *ds) - { - struct mt7530_priv *priv = ds->priv; -- struct dsa_port *cpu_dp; - int ret, i; - -- /* BPDU to CPU port */ -- dsa_switch_for_each_cpu_port(cpu_dp, ds) { -- mt7530_rmw(priv, MT7531_CFC, MT7531_CPU_PMAP_MASK, -- BIT(cpu_dp->index)); -- break; -- } -- - mt753x_trap_frames(priv); - - /* Enable and reset MIB counters */ ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -54,6 +54,7 @@ enum mt753x_id { - #define MT7531_MIRROR_PORT_GET(x) (((x) >> 16) & MIRROR_MASK) - #define MT7531_MIRROR_PORT_SET(x) (((x) & MIRROR_MASK) << 16) - #define MT7531_CPU_PMAP_MASK GENMASK(7, 0) -+#define MT7531_CPU_PMAP(x) FIELD_PREP(MT7531_CPU_PMAP_MASK, x) - - #define MT753X_MIRROR_REG(id) ((((id) == ID_MT7531) || ((id) == ID_MT7988)) ? \ - MT7531_CFC : MT7530_MFC) diff --git a/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch b/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch index bbf6d9b16f..78e332b1c2 100644 --- a/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch +++ b/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch @@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3036,7 +3036,7 @@ static void mt7530_pcs_get_state(struct +@@ -3225,7 +3225,7 @@ static void mt7530_pcs_get_state(struct state->pause |= MLO_PAUSE_TX; } @@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski phy_interface_t interface, const unsigned long *advertising, bool permit_pause_to_mac) -@@ -3064,6 +3064,7 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3253,6 +3253,7 @@ mt753x_setup(struct dsa_switch *ds) /* Initialise the PCS devices */ for (i = 0; i < priv->ds->num_ports; i++) { priv->pcs[i].pcs.ops = priv->info->pcs_ops; diff --git a/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch b/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch index e9a36eea41..d69ee7f104 100644 --- a/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch +++ b/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2851,15 +2851,6 @@ static void mt753x_phylink_mac_link_down +@@ -3040,15 +3040,6 @@ static void mt753x_phylink_mac_link_down mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); } @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface, -@@ -2948,8 +2939,6 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3137,8 +3128,6 @@ mt7531_cpu_port_config(struct dsa_switch return ret; mt7530_write(priv, MT7530_PMCR_P(port), PMCR_CPU_PORT_SETTING(priv->id)); diff --git a/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch b/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch index e8fec3f6a1..8af6820270 100644 --- a/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch +++ b/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch @@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -829,8 +829,7 @@ mt7530_get_strings(struct dsa_switch *ds +@@ -843,8 +843,7 @@ mt7530_get_strings(struct dsa_switch *ds return; for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++) diff --git a/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch b/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch index 8b374679ca..4c6c057739 100644 --- a/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch +++ b/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch @@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2175,24 +2175,40 @@ mt7530_free_irq_common(struct mt7530_pri +@@ -2350,24 +2350,40 @@ mt7530_free_irq_common(struct mt7530_pri static void mt7530_free_irq(struct mt7530_priv *priv) { @@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni bus->priv = priv; bus->name = KBUILD_MODNAME "-mii"; snprintf(bus->id, MII_BUS_ID_SIZE, KBUILD_MODNAME "-%d", idx++); -@@ -2201,16 +2217,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr +@@ -2376,16 +2392,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr bus->parent = dev; bus->phy_mask = ~ds->phys_mii_mask; diff --git a/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch index 381902472c..0b141b4a3f 100644 --- a/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch +++ b/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch @@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2883,8 +2883,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -3072,8 +3072,7 @@ static void mt753x_phylink_mac_link_up(s /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ diff --git a/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch b/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch index c3f55f8106..44d8e07c12 100644 --- a/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch +++ b/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1064,10 +1064,6 @@ mt753x_cpu_port_enable(struct dsa_switch +@@ -1239,10 +1239,6 @@ mt753x_cpu_port_enable(struct dsa_switch mt7530_set(priv, MT7530_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) | UNU_FFP(BIT(port))); @@ -46,10 +46,10 @@ Signed-off-by: Jakub Kicinski - if (priv->id == ID_MT7530 || priv->id == ID_MT7621) - mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port)); - - /* Add the CPU port to the CPU port bitmap for MT7531 and the switch on - * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that - * is affine to the inbound user port. -@@ -3125,6 +3121,36 @@ static int mt753x_set_mac_eee(struct dsa + /* Add the CPU port to the CPU port bitmap for MT7531. Trapped frames + * will be forwarded to the CPU port that is affine to the inbound user + * port. +@@ -3314,6 +3310,36 @@ static int mt753x_set_mac_eee(struct dsa return 0; } @@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface) { return 0; -@@ -3179,6 +3205,7 @@ const struct dsa_switch_ops mt7530_switc +@@ -3369,6 +3395,7 @@ const struct dsa_switch_ops mt7530_switc .phylink_mac_link_up = mt753x_phylink_mac_link_up, .get_mac_eee = mt753x_get_mac_eee, .set_mac_eee = mt753x_set_mac_eee, @@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -41,8 +41,8 @@ enum mt753x_id { +@@ -45,8 +45,8 @@ enum mt753x_id { #define UNU_FFP(x) (((x) & 0xff) << 8) #define UNU_FFP_MASK UNU_FFP(~0) #define CPU_EN BIT(7) @@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski #define MIRROR_EN BIT(3) #define MIRROR_PORT(x) ((x) & 0x7) #define MIRROR_MASK 0x7 -@@ -773,6 +773,7 @@ struct mt753x_info { +@@ -783,6 +783,7 @@ struct mt753x_info { * @irq_domain: IRQ domain of the switch irq_chip * @irq_enable: IRQ enable bits, synced to SYS_INT_EN * @create_sgmii: Pointer to function creating SGMII PCS instance(s) @@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski */ struct mt7530_priv { struct device *dev; -@@ -799,6 +800,7 @@ struct mt7530_priv { +@@ -809,6 +810,7 @@ struct mt7530_priv { struct irq_domain *irq_domain; u32 irq_enable; int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii); diff --git a/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch b/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch index 35abed6b03..3454948b86 100644 --- a/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch +++ b/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch @@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -703,7 +703,7 @@ struct mt7530_port { +@@ -713,7 +713,7 @@ struct mt7530_port { /* Port 5 interface select definitions */ enum p5_interface_select { @@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski P5_INTF_SEL_PHY_P0, P5_INTF_SEL_PHY_P4, P5_INTF_SEL_GMAC5, -@@ -789,7 +789,7 @@ struct mt7530_priv { +@@ -799,7 +799,7 @@ struct mt7530_priv { bool mcm; phy_interface_t p6_interface; phy_interface_t p5_interface; diff --git a/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch b/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch index 03329f8ba8..357579e2bd 100644 --- a/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch +++ b/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski GFP_KERNEL); --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -473,15 +473,6 @@ mt7530_pad_clk_setup(struct dsa_switch * +@@ -487,15 +487,6 @@ mt7530_pad_clk_setup(struct dsa_switch * return 0; } @@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski static int mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface) { -@@ -496,9 +487,6 @@ mt7531_pll_setup(struct mt7530_priv *pri +@@ -510,9 +501,6 @@ mt7531_pll_setup(struct mt7530_priv *pri u32 xtal; u32 val; @@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski val = mt7530_read(priv, MT7531_CREV); top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR); hwstrap = mt7530_read(priv, MT7531_HWTRAP); -@@ -913,8 +901,6 @@ static const char *p5_intf_modes(unsigne +@@ -927,8 +915,6 @@ static const char *p5_intf_modes(unsigne return "PHY P4"; case P5_INTF_SEL_GMAC5: return "GMAC5"; @@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski default: return "unknown"; } -@@ -2515,6 +2501,12 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2697,6 +2683,12 @@ mt7531_setup(struct dsa_switch *ds) return -ENODEV; } @@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski /* all MACs must be forced link-down before sw reset */ for (i = 0; i < MT7530_NUM_PORTS; i++) mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK); -@@ -2524,21 +2516,18 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2706,21 +2698,18 @@ mt7531_setup(struct dsa_switch *ds) SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST | SYS_CTRL_REG_RST); @@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK, MT7531_GPIO0_INTERRUPT); -@@ -2598,11 +2587,6 @@ static void mt7530_mac_port_get_caps(str +@@ -2787,11 +2776,6 @@ static void mt7530_mac_port_get_caps(str } } @@ -153,7 +153,7 @@ Signed-off-by: Jakub Kicinski static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { -@@ -2615,7 +2599,7 @@ static void mt7531_mac_port_get_caps(str +@@ -2804,7 +2788,7 @@ static void mt7531_mac_port_get_caps(str break; case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */ @@ -162,7 +162,7 @@ Signed-off-by: Jakub Kicinski phy_interface_set_rgmii(config->supported_interfaces); break; } -@@ -2682,7 +2666,7 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2871,7 +2855,7 @@ static int mt7531_rgmii_setup(struct mt7 { u32 val; @@ -171,7 +171,7 @@ Signed-off-by: Jakub Kicinski dev_err(priv->dev, "RGMII mode is not available for port %d\n", port); return -EINVAL; -@@ -2925,7 +2909,7 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3114,7 +3098,7 @@ mt7531_cpu_port_config(struct dsa_switch switch (port) { case 5: @@ -180,7 +180,7 @@ Signed-off-by: Jakub Kicinski interface = PHY_INTERFACE_MODE_RGMII; else interface = PHY_INTERFACE_MODE_2500BASEX; -@@ -3083,7 +3067,7 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3272,7 +3256,7 @@ mt753x_setup(struct dsa_switch *ds) mt7530_free_irq_common(priv); if (priv->create_sgmii) { @@ -191,7 +191,7 @@ Signed-off-by: Jakub Kicinski } --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -707,7 +707,6 @@ enum p5_interface_select { +@@ -717,7 +717,6 @@ enum p5_interface_select { P5_INTF_SEL_PHY_P0, P5_INTF_SEL_PHY_P4, P5_INTF_SEL_GMAC5, @@ -199,7 +199,7 @@ Signed-off-by: Jakub Kicinski }; struct mt7530_priv; -@@ -769,6 +768,8 @@ struct mt753x_info { +@@ -779,6 +778,8 @@ struct mt753x_info { * registers * @p6_interface Holding the current port 6 interface * @p5_intf_sel: Holding the current port 5 interface select @@ -208,7 +208,7 @@ Signed-off-by: Jakub Kicinski * @irq: IRQ number of the switch * @irq_domain: IRQ domain of the switch irq_chip * @irq_enable: IRQ enable bits, synced to SYS_INT_EN -@@ -790,6 +791,7 @@ struct mt7530_priv { +@@ -800,6 +801,7 @@ struct mt7530_priv { phy_interface_t p6_interface; phy_interface_t p5_interface; enum p5_interface_select p5_intf_sel; @@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski u8 mirror_rx; u8 mirror_tx; struct mt7530_port ports[MT7530_NUM_PORTS]; -@@ -799,7 +801,7 @@ struct mt7530_priv { +@@ -809,7 +811,7 @@ struct mt7530_priv { int irq; struct irq_domain *irq_domain; u32 irq_enable; diff --git a/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch b/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch index 1489c4f2f3..46dbd53ede 100644 --- a/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch +++ b/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch @@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2565,12 +2565,14 @@ static void mt7530_mac_port_get_caps(str +@@ -2754,12 +2754,14 @@ static void mt7530_mac_port_get_caps(str struct phylink_config *config) { switch (port) { @@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski phy_interface_set_rgmii(config->supported_interfaces); __set_bit(PHY_INTERFACE_MODE_MII, config->supported_interfaces); -@@ -2578,7 +2580,8 @@ static void mt7530_mac_port_get_caps(str +@@ -2767,7 +2769,8 @@ static void mt7530_mac_port_get_caps(str config->supported_interfaces); break; @@ -64,7 +64,7 @@ Signed-off-by: Jakub Kicinski __set_bit(PHY_INTERFACE_MODE_RGMII, config->supported_interfaces); __set_bit(PHY_INTERFACE_MODE_TRGMII, -@@ -2593,19 +2596,24 @@ static void mt7531_mac_port_get_caps(str +@@ -2782,19 +2785,24 @@ static void mt7531_mac_port_get_caps(str struct mt7530_priv *priv = ds->priv; switch (port) { @@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski __set_bit(PHY_INTERFACE_MODE_SGMII, config->supported_interfaces); __set_bit(PHY_INTERFACE_MODE_1000BASEX, -@@ -2624,11 +2632,13 @@ static void mt7988_mac_port_get_caps(str +@@ -2813,11 +2821,13 @@ static void mt7988_mac_port_get_caps(str phy_interface_zero(config->supported_interfaces); switch (port) { @@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski case 6: __set_bit(PHY_INTERFACE_MODE_INTERNAL, config->supported_interfaces); -@@ -2792,12 +2802,12 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2981,12 +2991,12 @@ mt753x_phylink_mac_config(struct dsa_swi u32 mcr_cur, mcr_new; switch (port) { @@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski if (priv->p5_interface == state->interface) break; -@@ -2807,7 +2817,7 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2996,7 +3006,7 @@ mt753x_phylink_mac_config(struct dsa_swi if (priv->p5_intf_sel != P5_DISABLED) priv->p5_interface = state->interface; break; diff --git a/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch b/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch index 6fbf259735..43f629b243 100644 --- a/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch +++ b/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2353,16 +2353,15 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2532,16 +2532,15 @@ mt7530_setup(struct dsa_switch *ds) return ret; /* Setup port 5 */ @@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski for_each_child_of_node(dn, mac_np) { if (!of_device_is_compatible(mac_np, "mediatek,eth-mac")) -@@ -2393,6 +2392,8 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2572,6 +2571,8 @@ mt7530_setup(struct dsa_switch *ds) of_node_put(phy_node); break; } @@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski } #ifdef CONFIG_GPIOLIB -@@ -2403,8 +2404,6 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2582,8 +2583,6 @@ mt7530_setup(struct dsa_switch *ds) } #endif /* CONFIG_GPIOLIB */ diff --git a/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch b/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch index 94692d948f..385d587729 100644 --- a/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch +++ b/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch @@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -971,8 +971,6 @@ static void mt7530_setup_port5(struct ds +@@ -985,8 +985,6 @@ static void mt7530_setup_port5(struct ds dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n", val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface)); diff --git a/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch b/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch index c121eb4a35..b4c0b75c49 100644 --- a/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch +++ b/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch @@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -935,9 +935,6 @@ static void mt7530_setup_port5(struct ds +@@ -949,9 +949,6 @@ static void mt7530_setup_port5(struct ds /* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */ val &= ~MHWTRAP_P5_DIS; break; @@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski default: dev_err(ds->dev, "Unsupported p5_intf_sel %d\n", priv->p5_intf_sel); -@@ -2358,8 +2355,6 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2537,8 +2534,6 @@ mt7530_setup(struct dsa_switch *ds) * Set priv->p5_intf_sel to the appropriate value if PHY muxing * is detected. */ @@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski for_each_child_of_node(dn, mac_np) { if (!of_device_is_compatible(mac_np, "mediatek,eth-mac")) -@@ -2391,7 +2386,9 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2570,7 +2565,9 @@ mt7530_setup(struct dsa_switch *ds) break; } diff --git a/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch b/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch index 9b610e0bdb..89527e2b39 100644 --- a/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch +++ b/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch @@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -936,9 +936,7 @@ static void mt7530_setup_port5(struct ds +@@ -950,9 +950,7 @@ static void mt7530_setup_port5(struct ds val &= ~MHWTRAP_P5_DIS; break; default: @@ -48,7 +48,7 @@ Signed-off-by: Jakub Kicinski } /* Setup RGMII settings */ -@@ -968,7 +966,6 @@ static void mt7530_setup_port5(struct ds +@@ -982,7 +980,6 @@ static void mt7530_setup_port5(struct ds dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n", val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface)); diff --git a/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch b/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch index dba1cb734e..0dc4baf0c7 100644 --- a/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch +++ b/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -408,13 +408,6 @@ mt7530_pad_clk_setup(struct dsa_switch * +@@ -422,13 +422,6 @@ mt7530_pad_clk_setup(struct dsa_switch * xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK; @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski switch (interface) { case PHY_INTERFACE_MODE_RGMII: trgint = 0; -@@ -2286,6 +2279,12 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2461,6 +2454,12 @@ mt7530_setup(struct dsa_switch *ds) return -ENODEV; } diff --git a/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch b/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch index 90f8e095ef..46e1b50f24 100644 --- a/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch +++ b/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch @@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -404,65 +404,54 @@ static int +@@ -418,65 +418,54 @@ static int mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface) { struct mt7530_priv *priv = ds->priv; diff --git a/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch b/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch index 93eccc8637..7d78b7df70 100644 --- a/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch +++ b/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch @@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -400,8 +400,8 @@ static void mt7530_pll_setup(struct mt75 +@@ -414,8 +414,8 @@ mt753x_preferred_default_local_cpu_port( } /* Setup port 6 interface mode and TRGMII TX circuit */ @@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski { struct mt7530_priv *priv = ds->priv; u32 ncpo1, ssc_delta, xtal; -@@ -412,7 +412,7 @@ mt7530_pad_clk_setup(struct dsa_switch * +@@ -426,7 +426,7 @@ mt7530_pad_clk_setup(struct dsa_switch * if (interface == PHY_INTERFACE_MODE_RGMII) { mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(0)); @@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski } mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1)); -@@ -451,7 +451,11 @@ mt7530_pad_clk_setup(struct dsa_switch * +@@ -465,7 +465,11 @@ mt7530_pad_clk_setup(struct dsa_switch * /* Enable the MT7530 TRGMII clocks */ core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN); @@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski return 0; } -@@ -2640,11 +2644,10 @@ mt7530_mac_config(struct dsa_switch *ds, +@@ -2829,11 +2833,10 @@ mt7530_mac_config(struct dsa_switch *ds, { struct mt7530_priv *priv = ds->priv; diff --git a/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch b/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch index a423c0899c..725830e769 100644 --- a/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch +++ b/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch @@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -453,18 +453,6 @@ mt7530_setup_port6(struct dsa_switch *ds +@@ -467,18 +467,6 @@ mt7530_setup_port6(struct dsa_switch *ds core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN); } @@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski static void mt7531_pll_setup(struct mt7530_priv *priv) { -@@ -2631,14 +2619,6 @@ static void mt7988_mac_port_get_caps(str +@@ -2820,14 +2808,6 @@ static void mt7988_mac_port_get_caps(str } static int @@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2803,8 +2783,6 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2992,8 +2972,6 @@ mt753x_phylink_mac_config(struct dsa_swi if (priv->p6_interface == state->interface) break; @@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski if (mt753x_mac_config(ds, port, mode, state) < 0) goto unsupported; -@@ -3127,11 +3105,6 @@ mt753x_conduit_state_change(struct dsa_s +@@ -3316,11 +3294,6 @@ mt753x_conduit_state_change(struct dsa_s mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val); } @@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski static int mt7988_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; -@@ -3192,7 +3165,6 @@ const struct mt753x_info mt753x_table[] +@@ -3382,7 +3355,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7530_setup, .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, @@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski .mac_port_get_caps = mt7530_mac_port_get_caps, .mac_port_config = mt7530_mac_config, }, -@@ -3202,7 +3174,6 @@ const struct mt753x_info mt753x_table[] +@@ -3392,7 +3364,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7530_setup, .phy_read = mt7530_phy_read, .phy_write = mt7530_phy_write, @@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski .mac_port_get_caps = mt7530_mac_port_get_caps, .mac_port_config = mt7530_mac_config, }, -@@ -3212,7 +3183,6 @@ const struct mt753x_info mt753x_table[] +@@ -3402,7 +3373,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, @@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski .cpu_port_config = mt7531_cpu_port_config, .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, -@@ -3223,7 +3193,6 @@ const struct mt753x_info mt753x_table[] +@@ -3413,7 +3383,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7988_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, @@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski .cpu_port_config = mt7988_cpu_port_config, .mac_port_get_caps = mt7988_mac_port_get_caps, .mac_port_config = mt7988_mac_config, -@@ -3253,9 +3222,8 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3443,9 +3412,8 @@ mt7530_probe_common(struct mt7530_priv * /* Sanity check if these required device operations are filled * properly. */ @@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -722,8 +722,6 @@ struct mt753x_pcs { +@@ -732,8 +732,6 @@ struct mt753x_pcs { * @sw_setup: Holding the handler to a device initialization * @phy_read: Holding the way reading PHY port * @phy_write: Holding the way writing PHY port @@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski * @phy_mode_supported: Check if the PHY type is being supported on a certain * port * @mac_port_validate: Holding the way to set addition validate type for a -@@ -739,7 +737,6 @@ struct mt753x_info { +@@ -749,7 +747,6 @@ struct mt753x_info { int (*sw_setup)(struct dsa_switch *ds); int (*phy_read)(struct mt7530_priv *priv, int port, int regnum); int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val); diff --git a/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch b/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch index 3667dbf54a..606c48234c 100644 --- a/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch +++ b/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch @@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2604,7 +2604,7 @@ static void mt7988_mac_port_get_caps(str +@@ -2793,7 +2793,7 @@ static void mt7988_mac_port_get_caps(str switch (port) { /* Ports which are connected to switch PHYs. There is no MII pinout. */ diff --git a/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch b/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch index 48433705f6..e2f1f23435 100644 --- a/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch +++ b/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch @@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2600,8 +2600,6 @@ static void mt7531_mac_port_get_caps(str +@@ -2789,8 +2789,6 @@ static void mt7531_mac_port_get_caps(str static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { diff --git a/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch b/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch index b707de87ed..be6fe39f38 100644 --- a/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch +++ b/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2683,17 +2683,6 @@ static bool mt753x_is_mac_port(u32 port) +@@ -2872,17 +2872,6 @@ static bool mt753x_is_mac_port(u32 port) } static int @@ -51,7 +51,7 @@ Signed-off-by: Paolo Abeni mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2733,6 +2722,9 @@ mt753x_mac_config(struct dsa_switch *ds, +@@ -2922,6 +2911,9 @@ mt753x_mac_config(struct dsa_switch *ds, { struct mt7530_priv *priv = ds->priv; @@ -61,7 +61,7 @@ Signed-off-by: Paolo Abeni return priv->info->mac_port_config(ds, port, mode, state->interface); } -@@ -3193,7 +3185,6 @@ const struct mt753x_info mt753x_table[] +@@ -3383,7 +3375,6 @@ const struct mt753x_info mt753x_table[] .phy_write = mt7531_ind_phy_write, .cpu_port_config = mt7988_cpu_port_config, .mac_port_get_caps = mt7988_mac_port_get_caps, @@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni }, }; EXPORT_SYMBOL_GPL(mt753x_table); -@@ -3221,8 +3212,7 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3411,8 +3402,7 @@ mt7530_probe_common(struct mt7530_priv * * properly. */ if (!priv->info->sw_setup || !priv->info->phy_read || diff --git a/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch b/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch index 5dfb8bddbb..b8473ed128 100644 --- a/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch +++ b/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2084,7 +2084,7 @@ mt7530_setup_irq(struct mt7530_priv *pri +@@ -2259,7 +2259,7 @@ mt7530_setup_irq(struct mt7530_priv *pri } /* This register must be set for MT7530 to properly fire interrupts */ diff --git a/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch b/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch index 565f16a47f..216a781087 100644 --- a/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch +++ b/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch @@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2478,14 +2478,12 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2660,14 +2660,12 @@ mt7531_setup(struct dsa_switch *ds) val = mt7530_read(priv, MT7531_TOP_SIG_SR); priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN); diff --git a/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch b/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch index d636e2d564..f920a6604d 100644 --- a/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch +++ b/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch @@ -36,7 +36,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2614,7 +2614,7 @@ static void mt7988_mac_port_get_caps(str +@@ -2803,7 +2803,7 @@ static void mt7988_mac_port_get_caps(str } } @@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2624,22 +2624,14 @@ mt7530_mac_config(struct dsa_switch *ds, +@@ -2813,22 +2813,14 @@ mt7530_mac_config(struct dsa_switch *ds, mt7530_setup_port5(priv->ds, interface); else if (port == 6) mt7530_setup_port6(priv->ds, interface); @@ -71,7 +71,7 @@ Signed-off-by: Paolo Abeni val = mt7530_read(priv, MT7531_CLKGEN_CTRL); val |= GP_CLK_EN; val &= ~GP_MODE_MASK; -@@ -2667,20 +2659,14 @@ static int mt7531_rgmii_setup(struct mt7 +@@ -2856,20 +2848,14 @@ static int mt7531_rgmii_setup(struct mt7 case PHY_INTERFACE_MODE_RGMII_ID: break; default: @@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, phy_interface_t interface) { -@@ -2688,42 +2674,21 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2877,42 +2863,21 @@ mt7531_mac_config(struct dsa_switch *ds, struct phy_device *phydev; struct dsa_port *dp; @@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni } static struct phylink_pcs * -@@ -2752,17 +2717,11 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2941,17 +2906,11 @@ mt753x_phylink_mac_config(struct dsa_swi u32 mcr_cur, mcr_new; switch (port) { @@ -162,7 +162,7 @@ Signed-off-by: Paolo Abeni if (priv->p5_intf_sel != P5_DISABLED) priv->p5_interface = state->interface; -@@ -2771,16 +2730,10 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2960,16 +2919,10 @@ mt753x_phylink_mac_config(struct dsa_swi if (priv->p6_interface == state->interface) break; @@ -180,7 +180,7 @@ Signed-off-by: Paolo Abeni } mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); -@@ -2863,7 +2816,6 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3052,7 +3005,6 @@ mt7531_cpu_port_config(struct dsa_switch struct mt7530_priv *priv = ds->priv; phy_interface_t interface; int speed; @@ -188,7 +188,7 @@ Signed-off-by: Paolo Abeni switch (port) { case 5: -@@ -2888,9 +2840,8 @@ mt7531_cpu_port_config(struct dsa_switch +@@ -3077,9 +3029,8 @@ mt7531_cpu_port_config(struct dsa_switch else speed = SPEED_1000; @@ -202,7 +202,7 @@ Signed-off-by: Paolo Abeni mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL, --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -743,9 +743,9 @@ struct mt753x_info { +@@ -753,9 +753,9 @@ struct mt753x_info { void (*mac_port_validate)(struct dsa_switch *ds, int port, phy_interface_t interface, unsigned long *supported); diff --git a/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch index 60b369c8f8..eb0a5706ec 100644 --- a/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch +++ b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch @@ -57,8 +57,8 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -995,18 +995,10 @@ mt753x_trap_frames(struct mt7530_priv *p - MT753X_BPDU_CPU_ONLY); +@@ -1170,18 +1170,10 @@ mt753x_trap_frames(struct mt7530_priv *p + MT753X_BPDU_CPU_ONLY); } -static int @@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni /* Enable Mediatek header mode on the cpu port */ mt7530_write(priv, MT7530_PVC_P(port), -@@ -1032,8 +1024,6 @@ mt753x_cpu_port_enable(struct dsa_switch +@@ -1207,8 +1199,6 @@ mt753x_cpu_port_enable(struct dsa_switch /* Set to fallback mode for independent VLAN learning */ mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, MT7530_PORT_FALLBACK_MODE); @@ -86,16 +86,16 @@ Signed-off-by: Paolo Abeni } static int -@@ -2288,8 +2278,6 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2461,8 +2451,6 @@ mt7530_setup(struct dsa_switch *ds) val |= MHWTRAP_MANUAL; mt7530_write(priv, MT7530_MHWTRAP, val); - priv->p6_interface = PHY_INTERFACE_MODE_NA; - - mt753x_trap_frames(priv); + if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ) + mt7530_pll_setup(priv); - /* Enable and reset MIB counters */ -@@ -2304,9 +2292,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2480,9 +2468,7 @@ mt7530_setup(struct dsa_switch *ds) mt7530_set(priv, MT7530_PSC_P(i), SA_DIS); if (dsa_is_cpu_port(ds, i)) { @@ -106,7 +106,7 @@ Signed-off-by: Paolo Abeni } else { mt7530_port_disable(ds, i); -@@ -2410,9 +2396,7 @@ mt7531_setup_common(struct dsa_switch *d +@@ -2589,9 +2575,7 @@ mt7531_setup_common(struct dsa_switch *d mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR); if (dsa_is_cpu_port(ds, i)) { @@ -117,7 +117,7 @@ Signed-off-by: Paolo Abeni } else { mt7530_port_disable(ds, i); -@@ -2501,10 +2485,6 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2683,10 +2667,6 @@ mt7531_setup(struct dsa_switch *ds) mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK, MT7531_GPIO0_INTERRUPT); @@ -125,10 +125,10 @@ Signed-off-by: Paolo Abeni - priv->p5_interface = PHY_INTERFACE_MODE_NA; - priv->p6_interface = PHY_INTERFACE_MODE_NA; - - /* Enable PHY core PLL, since phy_device has not yet been created - * provided for phy_[read,write]_mmd_indirect is called, we provide - * our own mt7531_ind_mmd_phy_[read,write] to complete this -@@ -2716,26 +2696,9 @@ mt753x_phylink_mac_config(struct dsa_swi + /* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since + * phy_device has not yet been created provided for + * phy_[read,write]_mmd_indirect is called, we provide our own +@@ -2905,26 +2885,9 @@ mt753x_phylink_mac_config(struct dsa_swi struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; @@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); mcr_new = mcr_cur; mcr_new &= ~PMCR_LINK_SETTINGS_MASK; -@@ -2771,17 +2734,10 @@ static void mt753x_phylink_mac_link_up(s +@@ -2960,17 +2923,10 @@ static void mt753x_phylink_mac_link_up(s mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; @@ -176,7 +176,7 @@ Signed-off-by: Paolo Abeni mcr |= PMCR_FORCE_SPEED_1000; break; case SPEED_100: -@@ -2799,6 +2755,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -2988,6 +2944,7 @@ static void mt753x_phylink_mac_link_up(s if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) { switch (speed) { case SPEED_1000: @@ -184,7 +184,7 @@ Signed-off-by: Paolo Abeni mcr |= PMCR_FORCE_EEE1G; break; case SPEED_100: -@@ -2810,61 +2767,6 @@ static void mt753x_phylink_mac_link_up(s +@@ -2999,61 +2956,6 @@ static void mt753x_phylink_mac_link_up(s mt7530_set(priv, MT7530_PMCR_P(port), mcr); } @@ -246,7 +246,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { -@@ -3122,7 +3024,6 @@ const struct mt753x_info mt753x_table[] +@@ -3312,7 +3214,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7531_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, @@ -254,7 +254,7 @@ Signed-off-by: Paolo Abeni .mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_config = mt7531_mac_config, }, -@@ -3132,7 +3033,6 @@ const struct mt753x_info mt753x_table[] +@@ -3322,7 +3223,6 @@ const struct mt753x_info mt753x_table[] .sw_setup = mt7988_setup, .phy_read = mt7531_ind_phy_read, .phy_write = mt7531_ind_phy_write, @@ -264,7 +264,7 @@ Signed-off-by: Paolo Abeni }; --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -331,13 +331,6 @@ enum mt7530_vlan_port_acc_frm { +@@ -340,13 +340,6 @@ enum mt7530_vlan_port_acc_frm { PMCR_TX_FC_EN | PMCR_RX_FC_EN | \ PMCR_FORCE_FDX | PMCR_FORCE_LNK | \ PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100) @@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni #define MT7530_PMEEECR_P(x) (0x3004 + (x) * 0x100) #define WAKEUP_TIME_1000(x) (((x) & 0xFF) << 24) -@@ -737,7 +730,6 @@ struct mt753x_info { +@@ -747,7 +740,6 @@ struct mt753x_info { int (*sw_setup)(struct dsa_switch *ds); int (*phy_read)(struct mt7530_priv *priv, int port, int regnum); int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val); @@ -286,7 +286,7 @@ Signed-off-by: Paolo Abeni void (*mac_port_get_caps)(struct dsa_switch *ds, int port, struct phylink_config *config); void (*mac_port_validate)(struct dsa_switch *ds, int port, -@@ -763,7 +755,6 @@ struct mt753x_info { +@@ -773,7 +765,6 @@ struct mt753x_info { * @ports: Holding the state among ports * @reg_mutex: The lock for protecting among process accessing * registers @@ -294,7 +294,7 @@ Signed-off-by: Paolo Abeni * @p5_intf_sel: Holding the current port 5 interface select * @p5_sgmii: Flag for distinguishing if port 5 of the MT7531 switch * has got SGMII -@@ -785,8 +776,6 @@ struct mt7530_priv { +@@ -795,8 +786,6 @@ struct mt7530_priv { const struct mt753x_info *info; unsigned int id; bool mcm; diff --git a/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch b/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch index f14634c17a..c83a627808 100644 --- a/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch +++ b/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2661,16 +2661,6 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2850,16 +2850,6 @@ mt7531_mac_config(struct dsa_switch *ds, } } @@ -35,7 +35,7 @@ Signed-off-by: Paolo Abeni static struct phylink_pcs * mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port, phy_interface_t interface) -@@ -2696,8 +2686,8 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2885,8 +2875,8 @@ mt753x_phylink_mac_config(struct dsa_swi struct mt7530_priv *priv = ds->priv; u32 mcr_cur, mcr_new; diff --git a/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch b/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch index 2fa17d4558..84ee7416bf 100644 --- a/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch +++ b/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2845,17 +2845,9 @@ static int +@@ -3034,17 +3034,9 @@ static int mt753x_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; @@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni if (ret) return ret; -@@ -2867,6 +2859,14 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3056,6 +3048,14 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch b/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch index d7c8180c8a..814a9d06e7 100644 --- a/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch +++ b/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch @@ -24,7 +24,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1047,7 +1047,6 @@ mt7530_port_enable(struct dsa_switch *ds +@@ -1222,7 +1222,6 @@ mt7530_port_enable(struct dsa_switch *ds priv->ports[port].enable = true; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, priv->ports[port].pm); @@ -32,7 +32,7 @@ Signed-off-by: Paolo Abeni mutex_unlock(&priv->reg_mutex); -@@ -1067,7 +1066,6 @@ mt7530_port_disable(struct dsa_switch *d +@@ -1242,7 +1241,6 @@ mt7530_port_disable(struct dsa_switch *d priv->ports[port].enable = false; mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, PCR_MATRIX_CLR); @@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni mutex_unlock(&priv->reg_mutex); } -@@ -2284,6 +2282,12 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2460,6 +2458,12 @@ mt7530_setup(struct dsa_switch *ds) mt7530_mib_reset(ds); for (i = 0; i < MT7530_NUM_PORTS; i++) { @@ -53,7 +53,7 @@ Signed-off-by: Paolo Abeni /* Disable forwarding by default on all ports */ mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, PCR_MATRIX_CLR); -@@ -2386,6 +2390,12 @@ mt7531_setup_common(struct dsa_switch *d +@@ -2565,6 +2569,12 @@ mt7531_setup_common(struct dsa_switch *d UNU_FFP_MASK); for (i = 0; i < MT7530_NUM_PORTS; i++) { diff --git a/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch b/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch index d29b183be1..d9f91a932a 100644 --- a/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch +++ b/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch @@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2694,23 +2694,13 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2883,23 +2883,13 @@ mt753x_phylink_mac_config(struct dsa_swi const struct phylink_link_state *state) { struct mt7530_priv *priv = ds->priv; @@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port, --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h -@@ -324,8 +324,6 @@ enum mt7530_vlan_port_acc_frm { +@@ -333,8 +333,6 @@ enum mt7530_vlan_port_acc_frm { MT7531_FORCE_DPX | \ MT7531_FORCE_RX_FC | \ MT7531_FORCE_TX_FC) diff --git a/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch b/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch deleted file mode 100644 index e00615d540..0000000000 --- a/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch +++ /dev/null @@ -1,74 +0,0 @@ -From cfa7c85f92cd3814ad9748eb1ab25658c7f7cc67 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Wed, 20 Mar 2024 23:45:30 +0300 -Subject: [PATCH 48/48] net: dsa: mt7530: fix improper frames on all 25MHz and - 40MHz XTAL MT7530 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The MT7530 switch after reset initialises with a core clock frequency that -works with a 25MHz XTAL connected to it. For 40MHz XTAL, the core clock -frequency must be set to 500MHz. - -The mt7530_pll_setup() function is responsible of setting the core clock -frequency. Currently, it runs on MT7530 with 25MHz and 40MHz XTAL. This -causes MT7530 switch with 25MHz XTAL to egress and ingress frames -improperly. - -Introduce a check to run it only on MT7530 with 40MHz XTAL. - -The core clock frequency is set by writing to a switch PHY's register. -Access to the PHY's register is done via the MDIO bus the switch is also -on. Therefore, it works only when the switch makes switch PHYs listen on -the MDIO bus the switch is on. This is controlled either by the state of -the ESW_P1_LED_1 pin after reset deassertion or modifying bit 5 of the -modifiable trap register. - -When ESW_P1_LED_1 is pulled high, PHY indirect access is used. That means -accessing PHY registers via the PHY indirect access control register of the -switch. - -When ESW_P1_LED_1 is pulled low, PHY direct access is used. That means -accessing PHY registers via the MDIO bus the switch is on. - -For MT7530 switch with 40MHz XTAL on a board with ESW_P1_LED_1 pulled high, -the core clock frequency won't be set to 500MHz, causing the switch to -egress and ingress frames improperly. - -Run mt7530_pll_setup() after PHY direct access is set on the modifiable -trap register. - -With these two changes, all MT7530 switches with 25MHz and 40MHz, and -P1_LED_1 pulled high or low, will egress and ingress frames properly. - -Link: https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/4a5dd143f2172ec97a2872fa29c7c4cd520f45b5/linux-mt/drivers/net/ethernet/mediatek/gsw_mt7623.c#L1039 -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Signed-off-by: Arınç ÜNAL -Link: https://lore.kernel.org/r/20240320-for-net-mt7530-fix-25mhz-xtal-with-direct-phy-access-v1-1-d92f605f1160@arinc9.com -Signed-off-by: Paolo Abeni ---- - drivers/net/dsa/mt7530.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -2259,8 +2259,6 @@ mt7530_setup(struct dsa_switch *ds) - SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST | - SYS_CTRL_REG_RST); - -- mt7530_pll_setup(priv); -- - /* Lower Tx driving for TRGMII path */ - for (i = 0; i < NUM_TRGMII_CTRL; i++) - mt7530_write(priv, MT7530_TRGMII_TD_ODT(i), -@@ -2276,6 +2274,9 @@ mt7530_setup(struct dsa_switch *ds) - val |= MHWTRAP_MANUAL; - mt7530_write(priv, MT7530_MHWTRAP, val); - -+ if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ) -+ mt7530_pll_setup(priv); -+ - mt753x_trap_frames(priv); - - /* Enable and reset MIB counters */ diff --git a/target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch deleted file mode 100644 index dc202a55e6..0000000000 --- a/target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch +++ /dev/null @@ -1,92 +0,0 @@ -From ef972fc9f5743da589ce9546dd565d6c56e679b8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Mon, 8 Apr 2024 10:08:53 +0300 -Subject: [PATCH 1/2] net: dsa: mt7530: fix enabling EEE on MT7531 switch on - all boards -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features") -brought EEE support but did not enable EEE on MT7531 switch MACs. EEE is -enabled on MT7531 switch MACs by pulling the LAN2LED0 pin low on the board -(bootstrapping), unsetting the EEE_DIS bit on the trap register, or setting -the internal EEE switch bit on the CORE_PLL_GROUP4 register. Thanks to -SkyLake Huang (黃啟澤) from MediaTek for providing information on the -internal EEE switch bit. - -There are existing boards that were not designed to pull the pin low. -Because of that, the EEE status currently depends on the board design. - -The EEE_DIS bit on the trap pertains to the LAN2LED0 pin which is usually -used to control an LED. Once the bit is unset, the pin will be low. That -will make the active low LED turn on. The pin is controlled by the switch -PHY. It seems that the PHY controls the pin in the way that it inverts the -pin state. That means depending on the wiring of the LED connected to -LAN2LED0 on the board, the LED may be on without an active link. - -To not cause this unwanted behaviour whilst enabling EEE on all boards, set -the internal EEE switch bit on the CORE_PLL_GROUP4 register. - -My testing on MT7531 shows a certain amount of traffic loss when EEE is -enabled. That said, I haven't come across a board that enables EEE. So -enable EEE on the switch MACs but disable EEE advertisement on the switch -PHYs. This way, we don't change the behaviour of the majority of the boards -that have this switch. The mediatek-ge PHY driver already disables EEE -advertisement on the switch PHYs but my testing shows that it is somehow -enabled afterwards. Disabling EEE advertisement before the PHY driver -initialises keeps it off. - -With this change, EEE can now be enabled using ethtool. - -Fixes: 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features") -Reviewed-by: Florian Fainelli -Signed-off-by: Arınç ÜNAL ---- - drivers/net/dsa/mt7530.c | 17 ++++++++++++----- - drivers/net/dsa/mt7530.h | 1 + - 2 files changed, 13 insertions(+), 5 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -2496,18 +2496,25 @@ mt7531_setup(struct dsa_switch *ds) - mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK, - MT7531_GPIO0_INTERRUPT); - -- /* Enable PHY core PLL, since phy_device has not yet been created -- * provided for phy_[read,write]_mmd_indirect is called, we provide -- * our own mt7531_ind_mmd_phy_[read,write] to complete this -- * function. -+ /* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since -+ * phy_device has not yet been created provided for -+ * phy_[read,write]_mmd_indirect is called, we provide our own -+ * mt7531_ind_mmd_phy_[read,write] to complete this function. - */ - val = mt7531_ind_c45_phy_read(priv, MT753X_CTRL_PHY_ADDR, - MDIO_MMD_VEND2, CORE_PLL_GROUP4); -- val |= MT7531_PHY_PLL_BYPASS_MODE; -+ val |= MT7531_RG_SYSPLL_DMY2 | MT7531_PHY_PLL_BYPASS_MODE; - val &= ~MT7531_PHY_PLL_OFF; - mt7531_ind_c45_phy_write(priv, MT753X_CTRL_PHY_ADDR, MDIO_MMD_VEND2, - CORE_PLL_GROUP4, val); - -+ /* Disable EEE advertisement on the switch PHYs. */ -+ for (i = MT753X_CTRL_PHY_ADDR; -+ i < MT753X_CTRL_PHY_ADDR + MT7530_NUM_PHYS; i++) { -+ mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN, MDIO_AN_EEE_ADV, -+ 0); -+ } -+ - mt7531_setup_common(ds); - - /* Setup VLAN ID 0 for VLAN-unaware bridges */ ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -616,6 +616,7 @@ enum mt7531_clk_skew { - #define RG_SYSPLL_DDSFBK_EN BIT(12) - #define RG_SYSPLL_BIAS_EN BIT(11) - #define RG_SYSPLL_BIAS_LPF_EN BIT(10) -+#define MT7531_RG_SYSPLL_DMY2 BIT(6) - #define MT7531_PHY_PLL_OFF BIT(5) - #define MT7531_PHY_PLL_BYPASS_MODE BIT(4) - diff --git a/target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch b/target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch deleted file mode 100644 index 4d70e774a4..0000000000 --- a/target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch +++ /dev/null @@ -1,483 +0,0 @@ -From b7427d66cb3d6dca5165de5f7d80d59f08c2795b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Tue, 9 Apr 2024 18:01:14 +0300 -Subject: [PATCH 2/2] net: dsa: mt7530: trap link-local frames regardless of ST - Port State -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer -(DLL) of the Open Systems Interconnection basic reference model (OSI/RM) -are described; the medium access control (MAC) and logical link control -(LLC) sublayers. The MAC sublayer is the one facing the physical layer. - -In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A -Bridge component comprises a MAC Relay Entity for interconnecting the Ports -of the Bridge, at least two Ports, and higher layer entities with at least -a Spanning Tree Protocol Entity included. - -Each Bridge Port also functions as an end station and shall provide the MAC -Service to an LLC Entity. Each instance of the MAC Service is provided to a -distinct LLC Entity that supports protocol identification, multiplexing, -and demultiplexing, for protocol data unit (PDU) transmission and reception -by one or more higher layer entities. - -It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC -Entity associated with each Bridge Port is modeled as being directly -connected to the attached Local Area Network (LAN). - -On the switch with CPU port architecture, CPU port functions as Management -Port, and the Management Port functionality is provided by software which -functions as an end station. Software is connected to an IEEE 802 LAN that -is wholly contained within the system that incorporates the Bridge. -Software provides access to the LLC Entity associated with each Bridge Port -by the value of the source port field on the special tag on the frame -received by software. - -We call frames that carry control information to determine the active -topology and current extent of each Virtual Local Area Network (VLAN), -i.e., spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN -Registration Protocol Data Units (MVRPDUs), and frames from other link -constrained protocols, such as Extensible Authentication Protocol over LAN -(EAPOL) and Link Layer Discovery Protocol (LLDP), link-local frames. They -are not forwarded by a Bridge. Permanently configured entries in the -filtering database (FDB) ensure that such frames are discarded by the -Forwarding Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in -detail: - -Each of the reserved MAC addresses specified in Table 8-1 -(01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be -permanently configured in the FDB in C-VLAN components and ERs. - -Each of the reserved MAC addresses specified in Table 8-2 -(01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently -configured in the FDB in S-VLAN components. - -Each of the reserved MAC addresses specified in Table 8-3 -(01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB -in TPMR components. - -The FDB entries for reserved MAC addresses shall specify filtering for all -Bridge Ports and all VIDs. Management shall not provide the capability to -modify or remove entries for reserved MAC addresses. - -The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of -propagation of PDUs within a Bridged Network, as follows: - - The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that - no conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN) - component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward. - PDUs transmitted using this destination address, or any other addresses - that appear in Table 8-1, Table 8-2, and Table 8-3 - (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can - therefore travel no further than those stations that can be reached via a - single individual LAN from the originating station. - - The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an - address that no conformant S-VLAN component, C-VLAN component, or MAC - Bridge can forward; however, this address is relayed by a TPMR component. - PDUs using this destination address, or any of the other addresses that - appear in both Table 8-1 and Table 8-2 but not in Table 8-3 - (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed - by any TPMRs but will propagate no further than the nearest S-VLAN - component, C-VLAN component, or MAC Bridge. - - The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an - address that no conformant C-VLAN component, MAC Bridge can forward; - however, it is relayed by TPMR components and S-VLAN components. PDUs - using this destination address, or any of the other addresses that appear - in Table 8-1 but not in either Table 8-2 or Table 8-3 - (01-80-C2-00-00-[00,0B,0C,0D,0F]), will be relayed by TPMR components and - S-VLAN components but will propagate no further than the nearest C-VLAN - component or MAC Bridge. - -Because the LLC Entity associated with each Bridge Port is provided via CPU -port, we must not filter these frames but forward them to CPU port. - -In a Bridge, the transmission Port is majorly decided by ingress and egress -rules, FDB, and spanning tree Port State functions of the Forwarding -Process. For link-local frames, only CPU port should be designated as -destination port in the FDB, and the other functions of the Forwarding -Process must not interfere with the decision of the transmission Port. We -call this process trapping frames to CPU port. - -Therefore, on the switch with CPU port architecture, link-local frames must -be trapped to CPU port, and certain link-local frames received by a Port of -a Bridge comprising a TPMR component or an S-VLAN component must be -excluded from it. - -A Bridge of the switch with CPU port architecture cannot comprise a -Two-Port MAC Relay (TPMR) component as a TPMR component supports only a -subset of the functionality of a MAC Bridge. A Bridge comprising two Ports -(Management Port doesn't count) of this architecture will either function -as a standard MAC Bridge or a standard VLAN Bridge. - -Therefore, a Bridge of this architecture can only comprise S-VLAN -components, C-VLAN components, or MAC Bridge components. Since there's no -TPMR component, we don't need to relay PDUs using the destination addresses -specified on the Nearest non-TPMR section, and the proportion of the -Nearest Customer Bridge section where they must be relayed by TPMR -components. - -One option to trap link-local frames to CPU port is to add static FDB -entries with CPU port designated as destination port. However, because that -Independent VLAN Learning (IVL) is being used on every VID, each entry only -applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC -Bridge component or a C-VLAN component, there would have to be 16 times -4096 entries. This switch intellectual property can only hold a maximum of -2048 entries. Using this option, there also isn't a mechanism to prevent -link-local frames from being discarded when the spanning tree Port State of -the reception Port is discarding. - -The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4 -registers. Whilst this applies to every VID, it doesn't contain all of the -reserved MAC addresses without affecting the remaining Standard Group MAC -Addresses. The REV_UN frame tag utilised using the RGAC4 register covers -the remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination -addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF -destination addresses which may be relayed by MAC Bridges or VLAN Bridges. -The latter option provides better but not complete conformance. - -This switch intellectual property also does not provide a mechanism to trap -link-local frames with specific destination addresses to CPU port by -Bridge, to conform to the filtering rules for the distinct Bridge -components. - -Therefore, regardless of the type of the Bridge component, link-local -frames with these destination addresses will be trapped to CPU port: - -01-80-C2-00-00-[00,01,02,03,0E] - -In a Bridge comprising a MAC Bridge component or a C-VLAN component: - - Link-local frames with these destination addresses won't be trapped to - CPU port which won't conform to IEEE Std 802.1Q-2022: - - 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] - -In a Bridge comprising an S-VLAN component: - - Link-local frames with these destination addresses will be trapped to CPU - port which won't conform to IEEE Std 802.1Q-2022: - - 01-80-C2-00-00-00 - - Link-local frames with these destination addresses won't be trapped to - CPU port which won't conform to IEEE Std 802.1Q-2022: - - 01-80-C2-00-00-[04,05,06,07,08,09,0A] - -Currently on this switch intellectual property, if the spanning tree Port -State of the reception Port is discarding, link-local frames will be -discarded. - -To trap link-local frames regardless of the spanning tree Port State, make -the switch regard them as Bridge Protocol Data Units (BPDUs). This switch -intellectual property only lets the frames regarded as BPDUs bypass the -spanning tree Port State function of the Forwarding Process. - -With this change, the only remaining interference is the ingress rules. -When the reception Port has no PVID assigned on software, VLAN-untagged -frames won't be allowed in. There doesn't seem to be a mechanism on the -switch intellectual property to have link-local frames bypass this function -of the Forwarding Process. - -Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") -Reviewed-by: Daniel Golle -Signed-off-by: Arınç ÜNAL ---- - drivers/net/dsa/mt7530.c | 229 +++++++++++++++++++++++++++++++++------ - drivers/net/dsa/mt7530.h | 5 + - 2 files changed, 200 insertions(+), 34 deletions(-) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -943,20 +943,173 @@ static void mt7530_setup_port5(struct ds - mutex_unlock(&priv->reg_mutex); - } - --/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std -- * 802.1Q™-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA -- * must only be propagated to C-VLAN and MAC Bridge components. That means -- * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports, -- * these frames are supposed to be processed by the CPU (software). So we make -- * the switch only forward them to the CPU port. And if received from a CPU -- * port, forward to a single port. The software is responsible of making the -- * switch conform to the latter by setting a single port as destination port on -- * the special tag. -- * -- * This switch intellectual property cannot conform to this part of the standard -- * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC -- * DAs, it also includes :22-FF which the scope of propagation is not supposed -- * to be restricted for these MAC DAs. -+/* In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer (DLL) -+ * of the Open Systems Interconnection basic reference model (OSI/RM) are -+ * described; the medium access control (MAC) and logical link control (LLC) -+ * sublayers. The MAC sublayer is the one facing the physical layer. -+ * -+ * In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A -+ * Bridge component comprises a MAC Relay Entity for interconnecting the Ports -+ * of the Bridge, at least two Ports, and higher layer entities with at least a -+ * Spanning Tree Protocol Entity included. -+ * -+ * Each Bridge Port also functions as an end station and shall provide the MAC -+ * Service to an LLC Entity. Each instance of the MAC Service is provided to a -+ * distinct LLC Entity that supports protocol identification, multiplexing, and -+ * demultiplexing, for protocol data unit (PDU) transmission and reception by -+ * one or more higher layer entities. -+ * -+ * It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC -+ * Entity associated with each Bridge Port is modeled as being directly -+ * connected to the attached Local Area Network (LAN). -+ * -+ * On the switch with CPU port architecture, CPU port functions as Management -+ * Port, and the Management Port functionality is provided by software which -+ * functions as an end station. Software is connected to an IEEE 802 LAN that is -+ * wholly contained within the system that incorporates the Bridge. Software -+ * provides access to the LLC Entity associated with each Bridge Port by the -+ * value of the source port field on the special tag on the frame received by -+ * software. -+ * -+ * We call frames that carry control information to determine the active -+ * topology and current extent of each Virtual Local Area Network (VLAN), i.e., -+ * spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN Registration -+ * Protocol Data Units (MVRPDUs), and frames from other link constrained -+ * protocols, such as Extensible Authentication Protocol over LAN (EAPOL) and -+ * Link Layer Discovery Protocol (LLDP), link-local frames. They are not -+ * forwarded by a Bridge. Permanently configured entries in the filtering -+ * database (FDB) ensure that such frames are discarded by the Forwarding -+ * Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in detail: -+ * -+ * Each of the reserved MAC addresses specified in Table 8-1 -+ * (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be -+ * permanently configured in the FDB in C-VLAN components and ERs. -+ * -+ * Each of the reserved MAC addresses specified in Table 8-2 -+ * (01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently -+ * configured in the FDB in S-VLAN components. -+ * -+ * Each of the reserved MAC addresses specified in Table 8-3 -+ * (01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB in -+ * TPMR components. -+ * -+ * The FDB entries for reserved MAC addresses shall specify filtering for all -+ * Bridge Ports and all VIDs. Management shall not provide the capability to -+ * modify or remove entries for reserved MAC addresses. -+ * -+ * The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of -+ * propagation of PDUs within a Bridged Network, as follows: -+ * -+ * The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that no -+ * conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN) -+ * component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward. -+ * PDUs transmitted using this destination address, or any other addresses -+ * that appear in Table 8-1, Table 8-2, and Table 8-3 -+ * (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can -+ * therefore travel no further than those stations that can be reached via a -+ * single individual LAN from the originating station. -+ * -+ * The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an -+ * address that no conformant S-VLAN component, C-VLAN component, or MAC -+ * Bridge can forward; however, this address is relayed by a TPMR component. -+ * PDUs using this destination address, or any of the other addresses that -+ * appear in both Table 8-1 and Table 8-2 but not in Table 8-3 -+ * (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed by -+ * any TPMRs but will propagate no further than the nearest S-VLAN component, -+ * C-VLAN component, or MAC Bridge. -+ * -+ * The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an address -+ * that no conformant C-VLAN component, MAC Bridge can forward; however, it is -+ * relayed by TPMR components and S-VLAN components. PDUs using this -+ * destination address, or any of the other addresses that appear in Table 8-1 -+ * but not in either Table 8-2 or Table 8-3 (01-80-C2-00-00-[00,0B,0C,0D,0F]), -+ * will be relayed by TPMR components and S-VLAN components but will propagate -+ * no further than the nearest C-VLAN component or MAC Bridge. -+ * -+ * Because the LLC Entity associated with each Bridge Port is provided via CPU -+ * port, we must not filter these frames but forward them to CPU port. -+ * -+ * In a Bridge, the transmission Port is majorly decided by ingress and egress -+ * rules, FDB, and spanning tree Port State functions of the Forwarding Process. -+ * For link-local frames, only CPU port should be designated as destination port -+ * in the FDB, and the other functions of the Forwarding Process must not -+ * interfere with the decision of the transmission Port. We call this process -+ * trapping frames to CPU port. -+ * -+ * Therefore, on the switch with CPU port architecture, link-local frames must -+ * be trapped to CPU port, and certain link-local frames received by a Port of a -+ * Bridge comprising a TPMR component or an S-VLAN component must be excluded -+ * from it. -+ * -+ * A Bridge of the switch with CPU port architecture cannot comprise a Two-Port -+ * MAC Relay (TPMR) component as a TPMR component supports only a subset of the -+ * functionality of a MAC Bridge. A Bridge comprising two Ports (Management Port -+ * doesn't count) of this architecture will either function as a standard MAC -+ * Bridge or a standard VLAN Bridge. -+ * -+ * Therefore, a Bridge of this architecture can only comprise S-VLAN components, -+ * C-VLAN components, or MAC Bridge components. Since there's no TPMR component, -+ * we don't need to relay PDUs using the destination addresses specified on the -+ * Nearest non-TPMR section, and the proportion of the Nearest Customer Bridge -+ * section where they must be relayed by TPMR components. -+ * -+ * One option to trap link-local frames to CPU port is to add static FDB entries -+ * with CPU port designated as destination port. However, because that -+ * Independent VLAN Learning (IVL) is being used on every VID, each entry only -+ * applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC -+ * Bridge component or a C-VLAN component, there would have to be 16 times 4096 -+ * entries. This switch intellectual property can only hold a maximum of 2048 -+ * entries. Using this option, there also isn't a mechanism to prevent -+ * link-local frames from being discarded when the spanning tree Port State of -+ * the reception Port is discarding. -+ * -+ * The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4 -+ * registers. Whilst this applies to every VID, it doesn't contain all of the -+ * reserved MAC addresses without affecting the remaining Standard Group MAC -+ * Addresses. The REV_UN frame tag utilised using the RGAC4 register covers the -+ * remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination -+ * addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF -+ * destination addresses which may be relayed by MAC Bridges or VLAN Bridges. -+ * The latter option provides better but not complete conformance. -+ * -+ * This switch intellectual property also does not provide a mechanism to trap -+ * link-local frames with specific destination addresses to CPU port by Bridge, -+ * to conform to the filtering rules for the distinct Bridge components. -+ * -+ * Therefore, regardless of the type of the Bridge component, link-local frames -+ * with these destination addresses will be trapped to CPU port: -+ * -+ * 01-80-C2-00-00-[00,01,02,03,0E] -+ * -+ * In a Bridge comprising a MAC Bridge component or a C-VLAN component: -+ * -+ * Link-local frames with these destination addresses won't be trapped to CPU -+ * port which won't conform to IEEE Std 802.1Q-2022: -+ * -+ * 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] -+ * -+ * In a Bridge comprising an S-VLAN component: -+ * -+ * Link-local frames with these destination addresses will be trapped to CPU -+ * port which won't conform to IEEE Std 802.1Q-2022: -+ * -+ * 01-80-C2-00-00-00 -+ * -+ * Link-local frames with these destination addresses won't be trapped to CPU -+ * port which won't conform to IEEE Std 802.1Q-2022: -+ * -+ * 01-80-C2-00-00-[04,05,06,07,08,09,0A] -+ * -+ * To trap link-local frames to CPU port as conformant as this switch -+ * intellectual property can allow, link-local frames are made to be regarded as -+ * Bridge Protocol Data Units (BPDUs). This is because this switch intellectual -+ * property only lets the frames regarded as BPDUs bypass the spanning tree Port -+ * State function of the Forwarding Process. -+ * -+ * The only remaining interference is the ingress rules. When the reception Port -+ * has no PVID assigned on software, VLAN-untagged frames won't be allowed in. -+ * There doesn't seem to be a mechanism on the switch intellectual property to -+ * have link-local frames bypass this function of the Forwarding Process. - */ - static void - mt753x_trap_frames(struct mt7530_priv *priv) -@@ -964,35 +1117,43 @@ mt753x_trap_frames(struct mt7530_priv *p - /* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them - * VLAN-untagged. - */ -- mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK | -- MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK | -- MT753X_BPDU_PORT_FW_MASK, -- MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) | -- MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_BPDU_CPU_ONLY); -+ mt7530_rmw(priv, MT753X_BPC, -+ MT753X_PAE_BPDU_FR | MT753X_PAE_EG_TAG_MASK | -+ MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK | -+ MT753X_BPDU_PORT_FW_MASK, -+ MT753X_PAE_BPDU_FR | -+ MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_BPDU_CPU_ONLY); - - /* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress - * them VLAN-untagged. - */ -- mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK | -- MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK | -- MT753X_R01_PORT_FW_MASK, -- MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) | -- MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_BPDU_CPU_ONLY); -+ mt7530_rmw(priv, MT753X_RGAC1, -+ MT753X_R02_BPDU_FR | MT753X_R02_EG_TAG_MASK | -+ MT753X_R02_PORT_FW_MASK | MT753X_R01_BPDU_FR | -+ MT753X_R01_EG_TAG_MASK | MT753X_R01_PORT_FW_MASK, -+ MT753X_R02_BPDU_FR | -+ MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_R01_BPDU_FR | -+ MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_BPDU_CPU_ONLY); - - /* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress - * them VLAN-untagged. - */ -- mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK | -- MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK | -- MT753X_R03_PORT_FW_MASK, -- MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) | -- MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -- MT753X_BPDU_CPU_ONLY); -+ mt7530_rmw(priv, MT753X_RGAC2, -+ MT753X_R0E_BPDU_FR | MT753X_R0E_EG_TAG_MASK | -+ MT753X_R0E_PORT_FW_MASK | MT753X_R03_BPDU_FR | -+ MT753X_R03_EG_TAG_MASK | MT753X_R03_PORT_FW_MASK, -+ MT753X_R0E_BPDU_FR | -+ MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) | -+ MT753X_R03_BPDU_FR | -+ MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) | -+ MT753X_BPDU_CPU_ONLY); - } - - static void ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -65,6 +65,7 @@ enum mt753x_id { - - /* Registers for BPDU and PAE frame control*/ - #define MT753X_BPC 0x24 -+#define MT753X_PAE_BPDU_FR BIT(25) - #define MT753X_PAE_EG_TAG_MASK GENMASK(24, 22) - #define MT753X_PAE_EG_TAG(x) FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x) - #define MT753X_PAE_PORT_FW_MASK GENMASK(18, 16) -@@ -75,20 +76,24 @@ enum mt753x_id { - - /* Register for :01 and :02 MAC DA frame control */ - #define MT753X_RGAC1 0x28 -+#define MT753X_R02_BPDU_FR BIT(25) - #define MT753X_R02_EG_TAG_MASK GENMASK(24, 22) - #define MT753X_R02_EG_TAG(x) FIELD_PREP(MT753X_R02_EG_TAG_MASK, x) - #define MT753X_R02_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_R02_PORT_FW(x) FIELD_PREP(MT753X_R02_PORT_FW_MASK, x) -+#define MT753X_R01_BPDU_FR BIT(9) - #define MT753X_R01_EG_TAG_MASK GENMASK(8, 6) - #define MT753X_R01_EG_TAG(x) FIELD_PREP(MT753X_R01_EG_TAG_MASK, x) - #define MT753X_R01_PORT_FW_MASK GENMASK(2, 0) - - /* Register for :03 and :0E MAC DA frame control */ - #define MT753X_RGAC2 0x2c -+#define MT753X_R0E_BPDU_FR BIT(25) - #define MT753X_R0E_EG_TAG_MASK GENMASK(24, 22) - #define MT753X_R0E_EG_TAG(x) FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x) - #define MT753X_R0E_PORT_FW_MASK GENMASK(18, 16) - #define MT753X_R0E_PORT_FW(x) FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x) -+#define MT753X_R03_BPDU_FR BIT(9) - #define MT753X_R03_EG_TAG_MASK GENMASK(8, 6) - #define MT753X_R03_EG_TAG(x) FIELD_PREP(MT753X_R03_EG_TAG_MASK, x) - #define MT753X_R03_PORT_FW_MASK GENMASK(2, 0) diff --git a/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch b/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch index ca2657d57d..8962e560f7 100644 --- a/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch +++ b/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2841,28 +2841,34 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2861,28 +2861,34 @@ mt7531_mac_config(struct dsa_switch *ds, } static struct phylink_pcs * @@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni if ((port == 5 || port == 6) && priv->info->mac_port_config) priv->info->mac_port_config(ds, port, mode, state->interface); -@@ -2872,23 +2878,25 @@ mt753x_phylink_mac_config(struct dsa_swi +@@ -2892,23 +2898,25 @@ mt753x_phylink_mac_config(struct dsa_swi mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY); } @@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni u32 mcr; mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; -@@ -2923,7 +2931,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -2943,7 +2951,7 @@ static void mt753x_phylink_mac_link_up(s } } @@ -101,7 +101,7 @@ Signed-off-by: Paolo Abeni } static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, -@@ -3148,16 +3156,19 @@ const struct dsa_switch_ops mt7530_switc +@@ -3169,16 +3177,19 @@ const struct dsa_switch_ops mt7530_switc .port_mirror_add = mt753x_port_mirror_add, .port_mirror_del = mt753x_port_mirror_del, .phylink_get_caps = mt753x_phylink_get_caps, @@ -125,7 +125,7 @@ Signed-off-by: Paolo Abeni const struct mt753x_info mt753x_table[] = { [ID_MT7621] = { .id = ID_MT7621, -@@ -3227,6 +3238,7 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3248,6 +3259,7 @@ mt7530_probe_common(struct mt7530_priv * priv->dev = dev; priv->ds->priv = priv; priv->ds->ops = &mt7530_switch_ops; diff --git a/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch b/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch deleted file mode 100644 index 7640a9cb41..0000000000 --- a/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch +++ /dev/null @@ -1,70 +0,0 @@ -From d4097ddef078a113643a6dcde01e99741f852adb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= -Date: Sat, 13 Apr 2024 16:01:39 +0300 -Subject: [PATCH 2/5] net: dsa: mt7530: fix mirroring frames received on local - port -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This switch intellectual property provides a bit on the ARL global control -register which controls allowing mirroring frames which are received on the -local port (monitor port). This bit is unset after reset. - -This ability must be enabled to fully support the port mirroring feature on -this switch intellectual property. - -Therefore, this patch fixes the traffic not being reflected on a port, -which would be configured like below: - - tc qdisc add dev swp0 clsact - - tc filter add dev swp0 ingress matchall skip_sw \ - action mirred egress mirror dev swp0 - -As a side note, this configuration provides the hairpinning feature for a -single port. - -Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring") -Signed-off-by: Arınç ÜNAL -Signed-off-by: David S. Miller ---- - drivers/net/dsa/mt7530.c | 6 ++++++ - drivers/net/dsa/mt7530.h | 4 ++++ - 2 files changed, 10 insertions(+) - ---- a/drivers/net/dsa/mt7530.c -+++ b/drivers/net/dsa/mt7530.c -@@ -2471,6 +2471,9 @@ mt7530_setup(struct dsa_switch *ds) - PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT)); - } - -+ /* Allow mirroring frames received on the local port (monitor port). */ -+ mt7530_set(priv, MT753X_AGC, LOCAL_EN); -+ - /* Setup VLAN ID 0 for VLAN-unaware bridges */ - ret = mt7530_setup_vlan0(priv); - if (ret) -@@ -2582,6 +2585,9 @@ mt7531_setup_common(struct dsa_switch *d - PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT)); - } - -+ /* Allow mirroring frames received on the local port (monitor port). */ -+ mt7530_set(priv, MT753X_AGC, LOCAL_EN); -+ - /* Flush the FDB table */ - ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL); - if (ret < 0) ---- a/drivers/net/dsa/mt7530.h -+++ b/drivers/net/dsa/mt7530.h -@@ -32,6 +32,10 @@ enum mt753x_id { - #define SYSC_REG_RSTCTRL 0x34 - #define RESET_MCM BIT(2) - -+/* Register for ARL global control */ -+#define MT753X_AGC 0xc -+#define LOCAL_EN BIT(7) -+ - /* Registers to mac forward control for unknown frames */ - #define MT7530_MFC 0x10 - #define BC_FFP(x) (((x) & 0xff) << 24) diff --git a/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch b/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch index 304ea21adc..cd5b7b287d 100644 --- a/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch +++ b/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1876,14 +1876,16 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1890,14 +1890,16 @@ mt7530_port_vlan_del(struct dsa_switch * static int mt753x_mirror_port_get(unsigned int id, u32 val) { diff --git a/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch b/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch index 6b6a255e26..e9c8f955c9 100644 --- a/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch +++ b/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch @@ -184,7 +184,7 @@ Signed-off-by: Paolo Abeni err: if (ret < 0) dev_err(&bus->dev, -@@ -2670,16 +2678,19 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2684,16 +2692,19 @@ mt7531_setup(struct dsa_switch *ds) * phy_[read,write]_mmd_indirect is called, we provide our own * mt7531_ind_mmd_phy_[read,write] to complete this function. */ diff --git a/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch b/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch index 3cbd62e929..158e5f8c00 100644 --- a/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch +++ b/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch @@ -33,7 +33,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -889,7 +889,7 @@ static void mt7530_setup_port5(struct ds +@@ -903,7 +903,7 @@ static void mt7530_setup_port5(struct ds val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS; /* Setup the MAC by default for the cpu port */ @@ -42,7 +42,7 @@ Signed-off-by: Arınç ÜNAL break; case P5_INTF_SEL_GMAC5: /* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */ -@@ -2435,8 +2435,8 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2449,8 +2449,8 @@ mt7530_setup(struct dsa_switch *ds) /* Clear link settings and enable force mode to force link down * on all ports until they're enabled later. */ @@ -53,7 +53,7 @@ Signed-off-by: Arınç ÜNAL /* Disable forwarding by default on all ports */ mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, -@@ -2546,8 +2546,8 @@ mt7531_setup_common(struct dsa_switch *d +@@ -2560,8 +2560,8 @@ mt7531_setup_common(struct dsa_switch *d /* Clear link settings and enable force mode to force link down * on all ports until they're enabled later. */ @@ -64,7 +64,7 @@ Signed-off-by: Arınç ÜNAL /* Disable forwarding by default on all ports */ mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, -@@ -2630,7 +2630,7 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2644,7 +2644,7 @@ mt7531_setup(struct dsa_switch *ds) /* Force link down on all ports before internal reset */ for (i = 0; i < MT7530_NUM_PORTS; i++) @@ -73,7 +73,7 @@ Signed-off-by: Arınç ÜNAL /* Reset the switch through internal reset */ mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST); -@@ -2872,7 +2872,7 @@ mt753x_phylink_mac_config(struct phylink +@@ -2886,7 +2886,7 @@ mt753x_phylink_mac_config(struct phylink /* Are we connected to external phy */ if (port == 5 && dsa_is_user_port(ds, 5)) @@ -82,7 +82,7 @@ Signed-off-by: Arınç ÜNAL } static void mt753x_phylink_mac_link_down(struct phylink_config *config, -@@ -2882,7 +2882,7 @@ static void mt753x_phylink_mac_link_down +@@ -2896,7 +2896,7 @@ static void mt753x_phylink_mac_link_down struct dsa_port *dp = dsa_phylink_to_port(config); struct mt7530_priv *priv = dp->ds->priv; @@ -91,7 +91,7 @@ Signed-off-by: Arınç ÜNAL } static void mt753x_phylink_mac_link_up(struct phylink_config *config, -@@ -2896,7 +2896,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -2910,7 +2910,7 @@ static void mt753x_phylink_mac_link_up(s struct mt7530_priv *priv = dp->ds->priv; u32 mcr; @@ -100,7 +100,7 @@ Signed-off-by: Arınç ÜNAL switch (speed) { case SPEED_1000: -@@ -2911,9 +2911,9 @@ static void mt753x_phylink_mac_link_up(s +@@ -2925,9 +2925,9 @@ static void mt753x_phylink_mac_link_up(s if (duplex == DUPLEX_FULL) { mcr |= PMCR_FORCE_FDX; if (tx_pause) @@ -112,7 +112,7 @@ Signed-off-by: Arınç ÜNAL } if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) { -@@ -2928,7 +2928,7 @@ static void mt753x_phylink_mac_link_up(s +@@ -2942,7 +2942,7 @@ static void mt753x_phylink_mac_link_up(s } } diff --git a/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch b/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch index 9697e7eb4f..9a0ce7c36c 100644 --- a/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch +++ b/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch @@ -25,7 +25,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -850,19 +850,15 @@ mt7530_set_ageing_time(struct dsa_switch +@@ -864,19 +864,15 @@ mt7530_set_ageing_time(struct dsa_switch return 0; } @@ -52,7 +52,7 @@ Signed-off-by: Arınç ÜNAL } } -@@ -879,23 +875,23 @@ static void mt7530_setup_port5(struct ds +@@ -893,23 +889,23 @@ static void mt7530_setup_port5(struct ds val |= MHWTRAP_MANUAL | MHWTRAP_P5_MAC_SEL | MHWTRAP_P5_DIS; val &= ~MHWTRAP_P5_RGMII_MODE & ~MHWTRAP_PHY0_SEL; @@ -85,7 +85,7 @@ Signed-off-by: Arınç ÜNAL break; } -@@ -923,8 +919,8 @@ static void mt7530_setup_port5(struct ds +@@ -937,8 +933,8 @@ static void mt7530_setup_port5(struct ds mt7530_write(priv, MT7530_MHWTRAP, val); @@ -96,7 +96,7 @@ Signed-off-by: Arınç ÜNAL mutex_unlock(&priv->reg_mutex); } -@@ -2467,13 +2463,11 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2481,13 +2477,11 @@ mt7530_setup(struct dsa_switch *ds) if (ret) return ret; @@ -114,7 +114,7 @@ Signed-off-by: Arınç ÜNAL */ for_each_child_of_node(dn, mac_np) { if (!of_device_is_compatible(mac_np, -@@ -2497,17 +2491,16 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2511,17 +2505,16 @@ mt7530_setup(struct dsa_switch *ds) } id = of_mdio_parse_addr(ds->dev, phy_node); if (id == 0) @@ -135,7 +135,7 @@ Signed-off-by: Arınç ÜNAL mt7530_setup_port5(ds, interface); } -@@ -2645,9 +2638,6 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2659,9 +2652,6 @@ mt7531_setup(struct dsa_switch *ds) MT7531_EXT_P_MDIO_12); } diff --git a/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch b/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch index 77a2df8586..c8ffd5f07c 100644 --- a/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch +++ b/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch @@ -21,7 +21,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1100,42 +1100,34 @@ mt753x_trap_frames(struct mt7530_priv *p +@@ -1114,42 +1114,34 @@ mt753x_trap_frames(struct mt7530_priv *p * VLAN-untagged. */ mt7530_rmw(priv, MT753X_BPC, diff --git a/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch b/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch index 95cdfac02e..c977fe46cd 100644 --- a/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch +++ b/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch @@ -25,7 +25,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1140,7 +1140,7 @@ mt753x_cpu_port_enable(struct dsa_switch +@@ -1154,7 +1154,7 @@ mt753x_cpu_port_enable(struct dsa_switch PORT_SPEC_TAG); /* Enable flooding on the CPU port */ @@ -33,8 +33,8 @@ Signed-off-by: Arınç ÜNAL + mt7530_set(priv, MT753X_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) | UNU_FFP(BIT(port))); - /* Add the CPU port to the CPU port bitmap for MT7531 and the switch on -@@ -1304,15 +1304,15 @@ mt7530_port_bridge_flags(struct dsa_swit + /* Add the CPU port to the CPU port bitmap for MT7531. Trapped frames +@@ -1318,15 +1318,15 @@ mt7530_port_bridge_flags(struct dsa_swit flags.val & BR_LEARNING ? 0 : SA_DIS); if (flags.mask & BR_FLOOD) @@ -53,7 +53,7 @@ Signed-off-by: Arınç ÜNAL flags.val & BR_BCAST_FLOOD ? BC_FFP(BIT(port)) : 0); return 0; -@@ -1848,20 +1848,6 @@ mt7530_port_vlan_del(struct dsa_switch * +@@ -1862,20 +1862,6 @@ mt7530_port_vlan_del(struct dsa_switch * return 0; } @@ -74,7 +74,7 @@ Signed-off-by: Arınç ÜNAL static int mt753x_port_mirror_add(struct dsa_switch *ds, int port, struct dsa_mall_mirror_tc_entry *mirror, bool ingress, struct netlink_ext_ack *extack) -@@ -1877,14 +1863,14 @@ static int mt753x_port_mirror_add(struct +@@ -1891,14 +1877,14 @@ static int mt753x_port_mirror_add(struct val = mt7530_read(priv, MT753X_MIRROR_REG(priv->id)); /* MT7530 only supports one monitor port */ @@ -92,7 +92,7 @@ Signed-off-by: Arınç ÜNAL mt7530_write(priv, MT753X_MIRROR_REG(priv->id), val); val = mt7530_read(priv, MT7530_PCR_P(port)); -@@ -2524,7 +2510,7 @@ mt7531_setup_common(struct dsa_switch *d +@@ -2538,7 +2524,7 @@ mt7531_setup_common(struct dsa_switch *d mt7530_mib_reset(ds); /* Disable flooding on all ports */ @@ -101,7 +101,7 @@ Signed-off-by: Arınç ÜNAL UNU_FFP_MASK); for (i = 0; i < MT7530_NUM_PORTS; i++) { -@@ -3086,10 +3072,12 @@ mt753x_conduit_state_change(struct dsa_s +@@ -3100,10 +3086,12 @@ mt753x_conduit_state_change(struct dsa_s else priv->active_cpu_ports &= ~mask; diff --git a/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch b/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch index d2497d5c90..3c487d21f6 100644 --- a/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch +++ b/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch @@ -30,7 +30,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -403,23 +403,23 @@ mt7530_setup_port6(struct dsa_switch *ds +@@ -417,23 +417,23 @@ mt7530_setup_port6(struct dsa_switch *ds mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1)); @@ -60,7 +60,7 @@ Signed-off-by: Arınç ÜNAL ncpo1 = 0x1400; } -@@ -442,19 +442,20 @@ mt7530_setup_port6(struct dsa_switch *ds +@@ -456,19 +456,20 @@ mt7530_setup_port6(struct dsa_switch *ds static void mt7531_pll_setup(struct mt7530_priv *priv) { @@ -86,7 +86,7 @@ Signed-off-by: Arınç ÜNAL /* Step 1 : Disable MT7531 COREPLL */ val = mt7530_read(priv, MT7531_PLLGP_EN); -@@ -483,13 +484,13 @@ mt7531_pll_setup(struct mt7530_priv *pri +@@ -497,13 +498,13 @@ mt7531_pll_setup(struct mt7530_priv *pri usleep_range(25, 35); switch (xtal) { @@ -102,7 +102,7 @@ Signed-off-by: Arınç ÜNAL val = mt7530_read(priv, MT7531_PLLGP_CR0); val &= ~RG_COREPLL_SDM_PCW_M; val |= 0x190000 << RG_COREPLL_SDM_PCW_S; -@@ -870,20 +871,20 @@ static void mt7530_setup_port5(struct ds +@@ -884,20 +885,20 @@ static void mt7530_setup_port5(struct ds mutex_lock(&priv->reg_mutex); @@ -128,7 +128,7 @@ Signed-off-by: Arınç ÜNAL /* Setup the MAC by default for the cpu port */ mt7530_write(priv, MT753X_PMCR_P(5), 0x56300); -@@ -891,13 +892,13 @@ static void mt7530_setup_port5(struct ds +@@ -905,13 +906,13 @@ static void mt7530_setup_port5(struct ds /* GMAC5: P5 -> SoC MAC or external PHY */ default: @@ -144,7 +144,7 @@ Signed-off-by: Arınç ÜNAL /* P5 RGMII RX Clock Control: delay setting for 1000M */ mt7530_write(priv, MT7530_P5RGMIIRXCR, CSR_RGMII_EDGE_ALIGN); -@@ -917,7 +918,7 @@ static void mt7530_setup_port5(struct ds +@@ -931,7 +932,7 @@ static void mt7530_setup_port5(struct ds P5_IO_CLK_DRV(1) | P5_IO_DATA_DRV(1)); } @@ -153,7 +153,7 @@ Signed-off-by: Arınç ÜNAL dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, mode=%s, phy-mode=%s\n", val, mt7530_p5_mode_str(priv->p5_mode), phy_modes(interface)); -@@ -2356,7 +2357,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2370,7 +2371,7 @@ mt7530_setup(struct dsa_switch *ds) } /* Waiting for MT7530 got to stable */ @@ -162,7 +162,7 @@ Signed-off-by: Arınç ÜNAL ret = readx_poll_timeout(_mt7530_read, &p, val, val != 0, 20, 1000000); if (ret < 0) { -@@ -2371,7 +2372,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2385,7 +2386,7 @@ mt7530_setup(struct dsa_switch *ds) return -ENODEV; } @@ -171,7 +171,7 @@ Signed-off-by: Arınç ÜNAL dev_err(priv->dev, "MT7530 with a 20MHz XTAL is not supported!\n"); return -EINVAL; -@@ -2392,12 +2393,12 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2406,12 +2407,12 @@ mt7530_setup(struct dsa_switch *ds) RD_TAP_MASK, RD_TAP(16)); /* Enable port 6 */ @@ -189,7 +189,7 @@ Signed-off-by: Arınç ÜNAL mt7530_pll_setup(priv); mt753x_trap_frames(priv); -@@ -2577,7 +2578,7 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2591,7 +2592,7 @@ mt7531_setup(struct dsa_switch *ds) } /* Waiting for MT7530 got to stable */ diff --git a/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch index e7da939588..cfc38f81d0 100644 --- a/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch +++ b/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch @@ -28,7 +28,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -873,8 +873,7 @@ static void mt7530_setup_port5(struct ds +@@ -887,8 +887,7 @@ static void mt7530_setup_port5(struct ds val = mt7530_read(priv, MT753X_MTRAP); @@ -38,7 +38,7 @@ Signed-off-by: Arınç ÜNAL switch (priv->p5_mode) { /* MUX_PHY_P0: P0 -> P5 -> SoC MAC */ -@@ -884,15 +883,13 @@ static void mt7530_setup_port5(struct ds +@@ -898,15 +897,13 @@ static void mt7530_setup_port5(struct ds /* MUX_PHY_P4: P4 -> P5 -> SoC MAC */ case MUX_PHY_P4: @@ -55,7 +55,7 @@ Signed-off-by: Arınç ÜNAL break; } -@@ -1186,6 +1183,14 @@ mt7530_port_enable(struct dsa_switch *ds +@@ -1200,6 +1197,14 @@ mt7530_port_enable(struct dsa_switch *ds mutex_unlock(&priv->reg_mutex); @@ -70,7 +70,7 @@ Signed-off-by: Arınç ÜNAL return 0; } -@@ -1204,6 +1209,14 @@ mt7530_port_disable(struct dsa_switch *d +@@ -1218,6 +1223,14 @@ mt7530_port_disable(struct dsa_switch *d PCR_MATRIX_CLR); mutex_unlock(&priv->reg_mutex); @@ -85,7 +85,7 @@ Signed-off-by: Arınç ÜNAL } static int -@@ -2392,11 +2405,11 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2406,11 +2419,11 @@ mt7530_setup(struct dsa_switch *ds) mt7530_rmw(priv, MT7530_TRGMII_RD(i), RD_TAP_MASK, RD_TAP(16)); @@ -102,7 +102,7 @@ Signed-off-by: Arınç ÜNAL if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ) mt7530_pll_setup(priv); -@@ -2479,8 +2492,11 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2493,8 +2506,11 @@ mt7530_setup(struct dsa_switch *ds) break; } diff --git a/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch index 7cc145327c..178ac8022f 100644 --- a/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch +++ b/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch @@ -17,7 +17,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2658,7 +2658,9 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2672,7 +2672,9 @@ mt7531_setup(struct dsa_switch *ds) 0); } @@ -28,7 +28,7 @@ Signed-off-by: Arınç ÜNAL /* Setup VLAN ID 0 for VLAN-unaware bridges */ ret = mt7530_setup_vlan0(priv); -@@ -3017,6 +3019,8 @@ mt753x_setup(struct dsa_switch *ds) +@@ -3031,6 +3033,8 @@ mt753x_setup(struct dsa_switch *ds) ret = mt7530_setup_mdio(priv); if (ret && priv->irq) mt7530_free_irq_common(priv); diff --git a/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch index f4d19db274..af8edf5a42 100644 --- a/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch +++ b/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch @@ -24,7 +24,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2676,6 +2676,8 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2690,6 +2690,8 @@ mt7531_setup(struct dsa_switch *ds) static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port, struct phylink_config *config) { @@ -33,7 +33,7 @@ Signed-off-by: Arınç ÜNAL switch (port) { /* Ports which are connected to switch PHYs. There is no MII pinout. */ case 0 ... 4: -@@ -2707,6 +2709,8 @@ static void mt7531_mac_port_get_caps(str +@@ -2721,6 +2723,8 @@ static void mt7531_mac_port_get_caps(str { struct mt7530_priv *priv = ds->priv; @@ -42,7 +42,7 @@ Signed-off-by: Arınç ÜNAL switch (port) { /* Ports which are connected to switch PHYs. There is no MII pinout. */ case 0 ... 4: -@@ -2746,14 +2750,17 @@ static void mt7988_mac_port_get_caps(str +@@ -2760,14 +2764,17 @@ static void mt7988_mac_port_get_caps(str case 0 ... 3: __set_bit(PHY_INTERFACE_MODE_INTERNAL, config->supported_interfaces); @@ -62,7 +62,7 @@ Signed-off-by: Arınç ÜNAL } } -@@ -2923,9 +2930,7 @@ static void mt753x_phylink_get_caps(stru +@@ -2937,9 +2944,7 @@ static void mt753x_phylink_get_caps(stru { struct mt7530_priv *priv = ds->priv; diff --git a/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch index 5bb7756c51..3825952dc3 100644 --- a/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch +++ b/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch @@ -17,7 +17,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3220,13 +3220,6 @@ mt7530_probe_common(struct mt7530_priv * +@@ -3235,13 +3235,6 @@ mt7530_probe_common(struct mt7530_priv * if (!priv->info) return -EINVAL; diff --git a/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch index f8147b6412..df47458014 100644 --- a/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch +++ b/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch @@ -19,7 +19,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -3048,10 +3048,10 @@ static int mt753x_get_mac_eee(struct dsa +@@ -3062,10 +3062,10 @@ static int mt753x_get_mac_eee(struct dsa struct ethtool_eee *e) { struct mt7530_priv *priv = ds->priv; @@ -32,7 +32,7 @@ Signed-off-by: Arınç ÜNAL return 0; } -@@ -3065,11 +3065,11 @@ static int mt753x_set_mac_eee(struct dsa +@@ -3079,11 +3079,11 @@ static int mt753x_set_mac_eee(struct dsa if (e->tx_lpi_timer > 0xFFF) return -EINVAL; diff --git a/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch index 0037f97499..e9512421c2 100644 --- a/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch +++ b/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch @@ -19,7 +19,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1404,7 +1404,7 @@ mt7530_port_set_vlan_unaware(struct dsa_ +@@ -1418,7 +1418,7 @@ mt7530_port_set_vlan_unaware(struct dsa_ mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK, G0_PORT_VID_DEF); @@ -28,7 +28,7 @@ Signed-off-by: Arınç ÜNAL if (dsa_is_user_port(ds, i) && dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) { all_user_ports_removed = false; -@@ -2419,7 +2419,7 @@ mt7530_setup(struct dsa_switch *ds) +@@ -2433,7 +2433,7 @@ mt7530_setup(struct dsa_switch *ds) /* Enable and reset MIB counters */ mt7530_mib_reset(ds); @@ -37,7 +37,7 @@ Signed-off-by: Arınç ÜNAL /* Clear link settings and enable force mode to force link down * on all ports until they're enabled later. */ -@@ -2530,7 +2530,7 @@ mt7531_setup_common(struct dsa_switch *d +@@ -2544,7 +2544,7 @@ mt7531_setup_common(struct dsa_switch *d mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK | UNU_FFP_MASK); @@ -46,7 +46,7 @@ Signed-off-by: Arınç ÜNAL /* Clear link settings and enable force mode to force link down * on all ports until they're enabled later. */ -@@ -2617,7 +2617,7 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2631,7 +2631,7 @@ mt7531_setup(struct dsa_switch *ds) priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN); /* Force link down on all ports before internal reset */ diff --git a/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch index ee8e13ea70..3b3330bdce 100644 --- a/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch +++ b/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch @@ -17,7 +17,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2776,7 +2776,7 @@ mt7530_mac_config(struct dsa_switch *ds, +@@ -2790,7 +2790,7 @@ mt7530_mac_config(struct dsa_switch *ds, mt7530_setup_port6(priv->ds, interface); } @@ -26,7 +26,7 @@ Signed-off-by: Arınç ÜNAL phy_interface_t interface, struct phy_device *phydev) { -@@ -2827,7 +2827,7 @@ mt7531_mac_config(struct dsa_switch *ds, +@@ -2841,7 +2841,7 @@ mt7531_mac_config(struct dsa_switch *ds, if (phy_interface_mode_is_rgmii(interface)) { dp = dsa_to_port(ds, port); phydev = dp->slave->phydev; diff --git a/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch index 666bcb75e8..6d28e5b5f9 100644 --- a/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch +++ b/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch @@ -19,7 +19,7 @@ Signed-off-by: Arınç ÜNAL --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -2626,7 +2626,10 @@ mt7531_setup(struct dsa_switch *ds) +@@ -2640,7 +2640,10 @@ mt7531_setup(struct dsa_switch *ds) if (!priv->p5_sgmii) { mt7531_pll_setup(priv); } else { diff --git a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch index dfbe88e8e6..2729a0ec38 100644 --- a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch @@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1152,6 +1157,11 @@ static const struct usb_device_id option +@@ -1156,6 +1161,11 @@ static const struct usb_device_id option { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */ .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) }, @@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support /* Quectel products using Qualcomm vendor ID */ { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)}, { USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20), -@@ -1193,6 +1203,11 @@ static const struct usb_device_id option +@@ -1197,6 +1207,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, diff --git a/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch index 93a2d146b5..ac4a3138a5 100644 --- a/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch +++ b/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch @@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -222,6 +222,9 @@ static void __br_handle_local_finish(str +@@ -227,6 +227,9 @@ static void __br_handle_local_finish(str /* note: already called with rcu_read_lock */ static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb) { @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau __br_handle_local_finish(skb); /* return 1 to signal the okfn() was called so it's ok to use the skb */ -@@ -390,6 +393,17 @@ forward: +@@ -397,6 +400,17 @@ forward: goto defer_stp_filtering; switch (p->state) { diff --git a/target/linux/generic/pending-6.1/350-mips-kernel-fix-detect_memory_region-function.patch b/target/linux/generic/pending-6.1/350-mips-kernel-fix-detect_memory_region-function.patch new file mode 100644 index 0000000000..3bf7ae98bf --- /dev/null +++ b/target/linux/generic/pending-6.1/350-mips-kernel-fix-detect_memory_region-function.patch @@ -0,0 +1,74 @@ +From: Shiji Yang +Date: Wed, 13 Mar 2024 20:28:37 +0800 +Subject: [PATCH] mips: kernel: fix detect_memory_region() function + +1. Do not use memcmp() on unallocated memory, as the new introduced + fortify dynamic object size check[1] will report unexpected result. +2. Use a fixed pattern instead of a random function pointer as the + magic value. +3. Flip magic value and double check it. +4. Enable this feature only for 32-bit CPUs. Currently, only ath79 and + ralink CPUs are using it. + +[1] 439a1bcac648 ("fortify: Use __builtin_dynamic_object_size() when available") +Signed-off-by: Shiji Yang +--- + arch/mips/include/asm/bootinfo.h | 2 ++ + arch/mips/kernel/setup.c | 17 ++++++++++++----- + 2 files changed, 14 insertions(+), 5 deletions(-) + +--- a/arch/mips/include/asm/bootinfo.h ++++ b/arch/mips/include/asm/bootinfo.h +@@ -93,7 +93,9 @@ const char *get_system_type(void); + + extern unsigned long mips_machtype; + ++#ifndef CONFIG_64BIT + extern void detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max); ++#endif + + extern void prom_init(void); + extern void prom_free_prom_memory(void); +--- a/arch/mips/kernel/setup.c ++++ b/arch/mips/kernel/setup.c +@@ -90,21 +90,27 @@ static struct resource bss_resource = { + unsigned long __kaslr_offset __ro_after_init; + EXPORT_SYMBOL(__kaslr_offset); + +-static void *detect_magic __initdata = detect_memory_region; +- + #ifdef CONFIG_MIPS_AUTO_PFN_OFFSET + unsigned long ARCH_PFN_OFFSET; + EXPORT_SYMBOL(ARCH_PFN_OFFSET); + #endif + ++#ifndef CONFIG_64BIT ++static u32 detect_magic __initdata; ++#define MIPS_MEM_TEST_PATTERN 0xaa5555aa ++ + void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max) + { +- void *dm = &detect_magic; ++ void *dm = (void *)KSEG1ADDR(&detect_magic); + phys_addr_t size; + + for (size = sz_min; size < sz_max; size <<= 1) { +- if (!memcmp(dm, dm + size, sizeof(detect_magic))) +- break; ++ __raw_writel(MIPS_MEM_TEST_PATTERN, dm); ++ if (__raw_readl(dm) == __raw_readl(dm + size)) { ++ __raw_writel(~MIPS_MEM_TEST_PATTERN, dm); ++ if (__raw_readl(dm) == __raw_readl(dm + size)) ++ break; ++ } + } + + pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n", +@@ -115,6 +121,7 @@ void __init detect_memory_region(phys_ad + + memblock_add(start, size); + } ++#endif /* CONFIG_64BIT */ + + /* + * Manage initrd diff --git a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch index 56d62ab8e2..0ab89564ee 100644 --- a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch +++ b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau for (i = sizeof(struct ipt_entry); i < e->target_offset; i += m->u.match_size) { -@@ -1225,12 +1262,15 @@ compat_copy_entry_to_user(struct ipt_ent +@@ -1227,12 +1264,15 @@ compat_copy_entry_to_user(struct ipt_ent compat_uint_t origsize; const struct xt_entry_match *ematch; int ret = 0; diff --git a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index fb6eb73232..9f8c3d6ff5 100644 --- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -7951,7 +7951,7 @@ static int nft_register_flowtable_net_ho +@@ -7959,7 +7959,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch index 989aca8f35..20d1c13045 100644 --- a/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch +++ b/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch @@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev) --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c -@@ -344,6 +344,8 @@ static rx_handler_result_t br_handle_fra +@@ -349,6 +349,8 @@ static rx_handler_result_t br_handle_fra fwd_mask |= p->group_fwd_mask; switch (dest[5]) { case 0x00: /* Bridge Group Address */ diff --git a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch index da3fd7cbe1..04d8c8760f 100644 --- a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch +++ b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch @@ -68,7 +68,7 @@ Best regards, --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c -@@ -1213,7 +1213,7 @@ mt7530_port_disable(struct dsa_switch *d +@@ -1227,7 +1227,7 @@ mt7530_port_disable(struct dsa_switch *d if (priv->id != ID_MT7530 && priv->id != ID_MT7621) return; diff --git a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch new file mode 100644 index 0000000000..5db834e23f --- /dev/null +++ b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch @@ -0,0 +1,136 @@ +From patchwork Tue Apr 30 05:01:33 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?= + +X-Patchwork-Id: 13648264 +X-Patchwork-Delegate: kuba@kernel.org +Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org + [10.30.226.201]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89; + Tue, 30 Apr 2024 05:01:39 +0000 (UTC) +Authentication-Results: smtp.subspace.kernel.org; + arc=none smtp.client-ip=10.30.226.201 +ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; + t=1714453299; cv=none; + b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ= +ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; + s=arc-20240116; t=1714453299; c=relaxed/simple; + bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=; + h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; + b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY= +ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; + dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org + header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201 +Authentication-Results: smtp.subspace.kernel.org; + dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org + header.b="LTwGL2cB" +Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC; + Tue, 30 Apr 2024 05:01:39 +0000 (UTC) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; + s=k20201202; t=1714453299; + bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=; + h=From:Date:Subject:To:Cc:Reply-To:From; + b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp + FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V + jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK + yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw + QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn + aa8XczXBSlBVw== +Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org + (localhost.localdomain [127.0.0.1]) + by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10; + Tue, 30 Apr 2024 05:01:39 +0000 (UTC) +From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?= + +Date: Tue, 30 Apr 2024 08:01:33 +0300 +Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY + is defined on switch MDIO bus +Precedence: bulk +X-Mailing-List: netdev@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Message-Id: + <20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db@arinc9.com> +X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI + e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6 + O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb + ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA== +To: Daniel Golle , DENG Qingfang , + Sean Wang , Andrew Lunn , + Florian Fainelli , + Vladimir Oltean , + "David S. Miller" , Eric Dumazet , + Jakub Kicinski , Paolo Abeni , + Matthias Brugger , + AngeloGioacchino Del Regno +Cc: Bartel Eerdekens , + mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, + linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, + linux-mediatek@lists.infradead.org, + =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= +X-Mailer: b4 0.13.0 +X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949; + i=arinc.unal@arinc9.com; s=arinc9-PC; h=from:subject:message-id; + bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=; + b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se + lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae +X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; + pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20= +X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-PC with + auth_id=158 +X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= +Reply-To: arinc.unal@arinc9.com +X-Patchwork-Delegate: kuba@kernel.org + +From: Arınç ÜNAL + +Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide +direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO +bus the switch listens on. The PHY muxing feature makes use of this. + +This is problematic as the PHY may be attached before the switch is +initialised, in which case, the PHY will fail to be attached. + +Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration +of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of +the switch on the device tree. Extend the check to detect PHY muxing when +the PHY is defined on the MDIO bus of the switch on the device tree. + +When the PHY is described this way, the switch will be initialised first, +then the switch MDIO bus will be registered. Only after these steps, the +PHY will be attached. + +Signed-off-by: Arınç ÜNAL +--- +Changes in v2: +- Address the terminology on the patch log. +- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155@arinc9.com +--- + drivers/net/dsa/mt7530.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + + +--- +base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c +change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55 + +Best regards, + +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c +@@ -2488,7 +2488,8 @@ mt7530_setup(struct dsa_switch *ds) + if (!phy_node) + continue; + +- if (phy_node->parent == priv->dev->of_node->parent) { ++ if (phy_node->parent == priv->dev->of_node->parent || ++ phy_node->parent->parent == priv->dev->of_node) { + ret = of_get_phy_mode(mac_np, &interface); + if (ret && ret != -ENODEV) { + of_node_put(mac_np); diff --git a/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch index 98ea4c06d9..fcb77e5174 100644 --- a/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch +++ b/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau static struct amd_chipset_info { struct pci_dev *nb_dev; struct pci_dev *smbus_dev; -@@ -633,6 +635,10 @@ bool usb_amd_pt_check_port(struct device +@@ -631,6 +633,10 @@ bool usb_amd_pt_check_port(struct device } EXPORT_SYMBOL_GPL(usb_amd_pt_check_port); @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau /* * Make sure the controller is completely inactive, unable to * generate interrupts or do DMA. -@@ -712,8 +718,17 @@ reset_needed: +@@ -710,8 +716,17 @@ reset_needed: uhci_reset_hc(pdev, base); return 1; } @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask) { u16 cmd; -@@ -1285,3 +1300,4 @@ static void quirk_usb_early_handoff(stru +@@ -1283,3 +1298,4 @@ static void quirk_usb_early_handoff(stru } DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff); @@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau #endif /* __LINUX_USB_PCI_QUIRKS_H */ --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h -@@ -483,7 +483,14 @@ extern int usb_hcd_pci_probe(struct pci_ +@@ -484,7 +484,14 @@ extern int usb_hcd_pci_probe(struct pci_ extern void usb_hcd_pci_remove(struct pci_dev *dev); extern void usb_hcd_pci_shutdown(struct pci_dev *dev); diff --git a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch index 76e3f2544d..ca36d0ccab 100644 --- a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch +++ b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch @@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz /* * We need to store the untouched command line for future reference. * We also need to store the touched command line since the parameter -@@ -959,6 +982,7 @@ asmlinkage __visible void __init __no_sa +@@ -961,6 +984,7 @@ asmlinkage __visible void __init __no_sa pr_notice("%s", linux_banner); early_security_init(); setup_arch(&command_line); diff --git a/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch b/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch index 4654bc14ef..3bf7ae98bf 100644 --- a/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch +++ b/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch @@ -7,35 +7,45 @@ Subject: [PATCH] mips: kernel: fix detect_memory_region() function 2. Use a fixed pattern instead of a random function pointer as the magic value. 3. Flip magic value and double check it. +4. Enable this feature only for 32-bit CPUs. Currently, only ath79 and + ralink CPUs are using it. [1] 439a1bcac648 ("fortify: Use __builtin_dynamic_object_size() when available") Signed-off-by: Shiji Yang --- - arch/mips/kernel/setup.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) + arch/mips/include/asm/bootinfo.h | 2 ++ + arch/mips/kernel/setup.c | 17 ++++++++++++----- + 2 files changed, 14 insertions(+), 5 deletions(-) +--- a/arch/mips/include/asm/bootinfo.h ++++ b/arch/mips/include/asm/bootinfo.h +@@ -93,7 +93,9 @@ const char *get_system_type(void); + + extern unsigned long mips_machtype; + ++#ifndef CONFIG_64BIT + extern void detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max); ++#endif + + extern void prom_init(void); + extern void prom_free_prom_memory(void); --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -46,6 +46,8 @@ - #include - #include - -+#define MIPS_MEM_TEST_PATTERN 0xaa5555aa -+ - #ifdef CONFIG_MIPS_ELF_APPENDED_DTB - char __section(".appended_dtb") __appended_dtb[0x100000]; - #endif /* CONFIG_MIPS_ELF_APPENDED_DTB */ -@@ -90,7 +92,7 @@ static struct resource bss_resource = { +@@ -90,21 +90,27 @@ static struct resource bss_resource = { unsigned long __kaslr_offset __ro_after_init; EXPORT_SYMBOL(__kaslr_offset); -static void *detect_magic __initdata = detect_memory_region; -+static u32 detect_magic __initdata; - +- #ifdef CONFIG_MIPS_AUTO_PFN_OFFSET unsigned long ARCH_PFN_OFFSET; -@@ -99,12 +101,16 @@ EXPORT_SYMBOL(ARCH_PFN_OFFSET); + EXPORT_SYMBOL(ARCH_PFN_OFFSET); + #endif ++#ifndef CONFIG_64BIT ++static u32 detect_magic __initdata; ++#define MIPS_MEM_TEST_PATTERN 0xaa5555aa ++ void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max) { - void *dm = &detect_magic; @@ -54,3 +64,11 @@ Signed-off-by: Shiji Yang } pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n", +@@ -115,6 +121,7 @@ void __init detect_memory_region(phys_ad + + memblock_add(start, size); + } ++#endif /* CONFIG_64BIT */ + + /* + * Manage initrd diff --git a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch new file mode 100644 index 0000000000..f181be933a --- /dev/null +++ b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch @@ -0,0 +1,136 @@ +From patchwork Tue Apr 30 05:01:33 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit +X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?= + +X-Patchwork-Id: 13648264 +X-Patchwork-Delegate: kuba@kernel.org +Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org + [10.30.226.201]) + (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) + (No client certificate requested) + by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89; + Tue, 30 Apr 2024 05:01:39 +0000 (UTC) +Authentication-Results: smtp.subspace.kernel.org; + arc=none smtp.client-ip=10.30.226.201 +ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; + t=1714453299; cv=none; + b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ= +ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; + s=arc-20240116; t=1714453299; c=relaxed/simple; + bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=; + h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; + b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY= +ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; + dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org + header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201 +Authentication-Results: smtp.subspace.kernel.org; + dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org + header.b="LTwGL2cB" +Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC; + Tue, 30 Apr 2024 05:01:39 +0000 (UTC) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; + s=k20201202; t=1714453299; + bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=; + h=From:Date:Subject:To:Cc:Reply-To:From; + b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp + FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V + jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK + yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw + QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn + aa8XczXBSlBVw== +Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org + (localhost.localdomain [127.0.0.1]) + by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10; + Tue, 30 Apr 2024 05:01:39 +0000 (UTC) +From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?= + +Date: Tue, 30 Apr 2024 08:01:33 +0300 +Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY + is defined on switch MDIO bus +Precedence: bulk +X-Mailing-List: netdev@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 +Message-Id: + <20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db@arinc9.com> +X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI + e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6 + O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb + ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA== +To: Daniel Golle , DENG Qingfang , + Sean Wang , Andrew Lunn , + Florian Fainelli , + Vladimir Oltean , + "David S. Miller" , Eric Dumazet , + Jakub Kicinski , Paolo Abeni , + Matthias Brugger , + AngeloGioacchino Del Regno +Cc: Bartel Eerdekens , + mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, + linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, + linux-mediatek@lists.infradead.org, + =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= +X-Mailer: b4 0.13.0 +X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949; + i=arinc.unal@arinc9.com; s=arinc9-PC; h=from:subject:message-id; + bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=; + b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se + lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae +X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; + pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20= +X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-PC with + auth_id=158 +X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= +Reply-To: arinc.unal@arinc9.com +X-Patchwork-Delegate: kuba@kernel.org + +From: Arınç ÜNAL + +Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide +direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO +bus the switch listens on. The PHY muxing feature makes use of this. + +This is problematic as the PHY may be attached before the switch is +initialised, in which case, the PHY will fail to be attached. + +Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration +of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of +the switch on the device tree. Extend the check to detect PHY muxing when +the PHY is defined on the MDIO bus of the switch on the device tree. + +When the PHY is described this way, the switch will be initialised first, +then the switch MDIO bus will be registered. Only after these steps, the +PHY will be attached. + +Signed-off-by: Arınç ÜNAL +--- +Changes in v2: +- Address the terminology on the patch log. +- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155@arinc9.com +--- + drivers/net/dsa/mt7530.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + + +--- +base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c +change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55 + +Best regards, + +--- a/drivers/net/dsa/mt7530.c ++++ b/drivers/net/dsa/mt7530.c +@@ -2483,7 +2483,8 @@ mt7530_setup(struct dsa_switch *ds) + if (!phy_node) + continue; + +- if (phy_node->parent == priv->dev->of_node->parent) { ++ if (phy_node->parent == priv->dev->of_node->parent || ++ phy_node->parent->parent == priv->dev->of_node) { + ret = of_get_phy_mode(mac_np, &interface); + if (ret && ret != -ENODEV) { + of_node_put(mac_np); diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts index 7d683cdf65..10f21a5947 100644 --- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts +++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts @@ -23,16 +23,6 @@ status = "okay"; }; - mdio@90000 { - status = "okay"; - pinctrl-0 = <&mdio_pins>; - pinctrl-names = "default"; - - ethphy: ethernet-phy@0 { - reg = <0x0>; - }; - }; - tcsr@1949000 { compatible = "qcom,tcsr"; reg = <0x1949000 0x100>; @@ -255,6 +245,16 @@ qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200"; }; +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + + ethphy: ethernet-phy@0 { + reg = <0x0>; + }; +}; + &gmac { status = "okay"; }; @@ -273,6 +273,10 @@ phy-mode = "rgmii-id"; }; +&qca807x { + status = "disabled"; +}; + ðphy1 { status = "disabled"; }; diff --git a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch index 6a37cc1f5e..50c8e64534 100644 --- a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch +++ b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch @@ -21,7 +21,7 @@ Signed-off-by: Christian Marangi status = "disabled"; - ethphy0: ethernet-phy@0 { -+ ethernet-phy-package@0 { ++ qca807x: ethernet-phy-package@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "qcom,qca8075-package"; diff --git a/target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch b/target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch deleted file mode 100644 index af5715e1f5..0000000000 --- a/target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch +++ /dev/null @@ -1,536 +0,0 @@ -From fe5c8d03f3de89ae058e365b783f8c1314f47490 Mon Sep 17 00:00:00 2001 -From: AngeloGioacchino Del Regno -Date: Fri, 20 Jan 2023 10:20:33 +0100 -Subject: [PATCH 01/15] clk: mediatek: clk-gate: Propagate struct device with - mtk_clk_register_gates() - -Commit e4c23e19aa2a ("clk: mediatek: Register clock gate with device") -introduces a helper function for the sole purpose of propagating a -struct device pointer to the clk API when registering the mtk-gate -clocks to take advantage of Runtime PM when/where needed and where -a power domain is defined in devicetree. - -Function mtk_clk_register_gates() then becomes a wrapper around the -new mtk_clk_register_gates_with_dev() function that will simply pass -NULL as struct device: this is essential when registering drivers -with CLK_OF_DECLARE instead of as a platform device, as there will -be no struct device to pass... but we can as well simply have only -one function that always takes such pointer as a param and pass NULL -when unavoidable. - -This commit removes the mtk_clk_register_gates() wrapper and renames -mtk_clk_register_gates_with_dev() to the former and all of the calls -to either of the two functions were fixed in all drivers in order to -reflect this change; also, to improve consistency with other kernel -functions, the pointer to struct device was moved as the first param. - -Since a lot of MediaTek clock drivers are actually registering as a -platform device, but were still registering the mtk-gate clocks -without passing any struct device to the clock framework, they've -been changed to pass a valid one now, as to make all those platforms -able to use runtime power management where available. - -While at it, some much needed indentation changes were also done. - -Signed-off-by: AngeloGioacchino Del Regno -Reviewed-by: Chen-Yu Tsai -Reviewed-by: Markus Schneider-Pargmann -Tested-by: Miles Chen -Link: https://lore.kernel.org/r/20230120092053.182923-4-angelogioacchino.delregno@collabora.com -Tested-by: Mingming Su -Signed-off-by: Stephen Boyd - -[daniel@makrotopia.org: dropped parts not relevant for OpenWrt] ---- - drivers/clk/mediatek/clk-gate.c | 23 +++++++--------------- - drivers/clk/mediatek/clk-gate.h | 7 +------ - drivers/clk/mediatek/clk-mt2701-aud.c | 4 ++-- - drivers/clk/mediatek/clk-mt2701-eth.c | 4 ++-- - drivers/clk/mediatek/clk-mt2701-g3d.c | 2 +- - drivers/clk/mediatek/clk-mt2701-hif.c | 4 ++-- - drivers/clk/mediatek/clk-mt2701-mm.c | 4 ++-- - drivers/clk/mediatek/clk-mt2701.c | 12 +++++------ - drivers/clk/mediatek/clk-mt2712-mm.c | 4 ++-- - drivers/clk/mediatek/clk-mt2712.c | 12 +++++------ - drivers/clk/mediatek/clk-mt7622-aud.c | 4 ++-- - drivers/clk/mediatek/clk-mt7622-eth.c | 8 ++++---- - drivers/clk/mediatek/clk-mt7622-hif.c | 8 ++++---- - drivers/clk/mediatek/clk-mt7622.c | 14 ++++++------- - drivers/clk/mediatek/clk-mt7629-eth.c | 7 ++++--- - drivers/clk/mediatek/clk-mt7629-hif.c | 8 ++++---- - drivers/clk/mediatek/clk-mt7629.c | 10 +++++----- - drivers/clk/mediatek/clk-mt7986-eth.c | 10 +++++----- - drivers/clk/mediatek/clk-mt7986-infracfg.c | 4 ++-- - 19 files changed, 68 insertions(+), 81 deletions(-) - ---- a/drivers/clk/mediatek/clk-gate.c -+++ b/drivers/clk/mediatek/clk-gate.c -@@ -152,12 +152,12 @@ const struct clk_ops mtk_clk_gate_ops_no - }; - EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_no_setclr_inv); - --static struct clk_hw *mtk_clk_register_gate(const char *name, -+static struct clk_hw *mtk_clk_register_gate(struct device *dev, const char *name, - const char *parent_name, - struct regmap *regmap, int set_ofs, - int clr_ofs, int sta_ofs, u8 bit, - const struct clk_ops *ops, -- unsigned long flags, struct device *dev) -+ unsigned long flags) - { - struct mtk_clk_gate *cg; - int ret; -@@ -202,10 +202,9 @@ static void mtk_clk_unregister_gate(stru - kfree(cg); - } - --int mtk_clk_register_gates_with_dev(struct device_node *node, -- const struct mtk_gate *clks, int num, -- struct clk_hw_onecell_data *clk_data, -- struct device *dev) -+int mtk_clk_register_gates(struct device *dev, struct device_node *node, -+ const struct mtk_gate *clks, int num, -+ struct clk_hw_onecell_data *clk_data) - { - int i; - struct clk_hw *hw; -@@ -229,13 +228,13 @@ int mtk_clk_register_gates_with_dev(stru - continue; - } - -- hw = mtk_clk_register_gate(gate->name, gate->parent_name, -+ hw = mtk_clk_register_gate(dev, gate->name, gate->parent_name, - regmap, - gate->regs->set_ofs, - gate->regs->clr_ofs, - gate->regs->sta_ofs, - gate->shift, gate->ops, -- gate->flags, dev); -+ gate->flags); - - if (IS_ERR(hw)) { - pr_err("Failed to register clk %s: %pe\n", gate->name, -@@ -261,14 +260,6 @@ err: - - return PTR_ERR(hw); - } --EXPORT_SYMBOL_GPL(mtk_clk_register_gates_with_dev); -- --int mtk_clk_register_gates(struct device_node *node, -- const struct mtk_gate *clks, int num, -- struct clk_hw_onecell_data *clk_data) --{ -- return mtk_clk_register_gates_with_dev(node, clks, num, clk_data, NULL); --} - EXPORT_SYMBOL_GPL(mtk_clk_register_gates); - - void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num, ---- a/drivers/clk/mediatek/clk-gate.h -+++ b/drivers/clk/mediatek/clk-gate.h -@@ -50,15 +50,10 @@ struct mtk_gate { - #define GATE_MTK(_id, _name, _parent, _regs, _shift, _ops) \ - GATE_MTK_FLAGS(_id, _name, _parent, _regs, _shift, _ops, 0) - --int mtk_clk_register_gates(struct device_node *node, -+int mtk_clk_register_gates(struct device *dev, struct device_node *node, - const struct mtk_gate *clks, int num, - struct clk_hw_onecell_data *clk_data); - --int mtk_clk_register_gates_with_dev(struct device_node *node, -- const struct mtk_gate *clks, int num, -- struct clk_hw_onecell_data *clk_data, -- struct device *dev); -- - void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num, - struct clk_hw_onecell_data *clk_data); - ---- a/drivers/clk/mediatek/clk-mt2701-aud.c -+++ b/drivers/clk/mediatek/clk-mt2701-aud.c -@@ -127,8 +127,8 @@ static int clk_mt2701_aud_probe(struct p - - clk_data = mtk_alloc_clk_data(CLK_AUD_NR); - -- mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, audio_clks, -+ ARRAY_SIZE(audio_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) { ---- a/drivers/clk/mediatek/clk-mt2701-eth.c -+++ b/drivers/clk/mediatek/clk-mt2701-eth.c -@@ -51,8 +51,8 @@ static int clk_mt2701_eth_probe(struct p - - clk_data = mtk_alloc_clk_data(CLK_ETHSYS_NR); - -- mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, eth_clks, -+ ARRAY_SIZE(eth_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) ---- a/drivers/clk/mediatek/clk-mt2701-g3d.c -+++ b/drivers/clk/mediatek/clk-mt2701-g3d.c -@@ -45,7 +45,7 @@ static int clk_mt2701_g3dsys_init(struct - - clk_data = mtk_alloc_clk_data(CLK_G3DSYS_NR); - -- mtk_clk_register_gates(node, g3d_clks, ARRAY_SIZE(g3d_clks), -+ mtk_clk_register_gates(&pdev->dev, node, g3d_clks, ARRAY_SIZE(g3d_clks), - clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); ---- a/drivers/clk/mediatek/clk-mt2701-hif.c -+++ b/drivers/clk/mediatek/clk-mt2701-hif.c -@@ -48,8 +48,8 @@ static int clk_mt2701_hif_probe(struct p - - clk_data = mtk_alloc_clk_data(CLK_HIFSYS_NR); - -- mtk_clk_register_gates(node, hif_clks, ARRAY_SIZE(hif_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, hif_clks, -+ ARRAY_SIZE(hif_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) { ---- a/drivers/clk/mediatek/clk-mt2701-mm.c -+++ b/drivers/clk/mediatek/clk-mt2701-mm.c -@@ -76,8 +76,8 @@ static int clk_mt2701_mm_probe(struct pl - - clk_data = mtk_alloc_clk_data(CLK_MM_NR); - -- mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, mm_clks, -+ ARRAY_SIZE(mm_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) ---- a/drivers/clk/mediatek/clk-mt2701.c -+++ b/drivers/clk/mediatek/clk-mt2701.c -@@ -685,8 +685,8 @@ static int mtk_topckgen_init(struct plat - mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), - base, &mt2701_clk_lock, clk_data); - -- mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, top_clks, -+ ARRAY_SIZE(top_clks), clk_data); - - return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - } -@@ -789,8 +789,8 @@ static int mtk_infrasys_init(struct plat - } - } - -- mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), -- infra_clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, infra_clks, -+ ARRAY_SIZE(infra_clks), infra_clk_data); - mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs), - infra_clk_data); - -@@ -902,8 +902,8 @@ static int mtk_pericfg_init(struct platf - if (!clk_data) - return -ENOMEM; - -- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, peri_clks, -+ ARRAY_SIZE(peri_clks), clk_data); - - mtk_clk_register_composites(peri_muxs, ARRAY_SIZE(peri_muxs), base, - &mt2701_clk_lock, clk_data); ---- a/drivers/clk/mediatek/clk-mt2712-mm.c -+++ b/drivers/clk/mediatek/clk-mt2712-mm.c -@@ -117,8 +117,8 @@ static int clk_mt2712_mm_probe(struct pl - - clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK); - -- mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, mm_clks, -+ ARRAY_SIZE(mm_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - ---- a/drivers/clk/mediatek/clk-mt2712.c -+++ b/drivers/clk/mediatek/clk-mt2712.c -@@ -1324,8 +1324,8 @@ static int clk_mt2712_top_probe(struct p - &mt2712_clk_lock, top_clk_data); - mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), base, - &mt2712_clk_lock, top_clk_data); -- mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), -- top_clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, top_clks, -+ ARRAY_SIZE(top_clks), top_clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, top_clk_data); - -@@ -1344,8 +1344,8 @@ static int clk_mt2712_infra_probe(struct - - clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK); - -- mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, infra_clks, -+ ARRAY_SIZE(infra_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - -@@ -1366,8 +1366,8 @@ static int clk_mt2712_peri_probe(struct - - clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK); - -- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, peri_clks, -+ ARRAY_SIZE(peri_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - ---- a/drivers/clk/mediatek/clk-mt7622-aud.c -+++ b/drivers/clk/mediatek/clk-mt7622-aud.c -@@ -114,8 +114,8 @@ static int clk_mt7622_audiosys_init(stru - - clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK); - -- mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, audio_clks, -+ ARRAY_SIZE(audio_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) { ---- a/drivers/clk/mediatek/clk-mt7622-eth.c -+++ b/drivers/clk/mediatek/clk-mt7622-eth.c -@@ -69,8 +69,8 @@ static int clk_mt7622_ethsys_init(struct - - clk_data = mtk_alloc_clk_data(CLK_ETH_NR_CLK); - -- mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, eth_clks, -+ ARRAY_SIZE(eth_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) -@@ -91,8 +91,8 @@ static int clk_mt7622_sgmiisys_init(stru - - clk_data = mtk_alloc_clk_data(CLK_SGMII_NR_CLK); - -- mtk_clk_register_gates(node, sgmii_clks, ARRAY_SIZE(sgmii_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, sgmii_clks, -+ ARRAY_SIZE(sgmii_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) ---- a/drivers/clk/mediatek/clk-mt7622-hif.c -+++ b/drivers/clk/mediatek/clk-mt7622-hif.c -@@ -80,8 +80,8 @@ static int clk_mt7622_ssusbsys_init(stru - - clk_data = mtk_alloc_clk_data(CLK_SSUSB_NR_CLK); - -- mtk_clk_register_gates(node, ssusb_clks, ARRAY_SIZE(ssusb_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, ssusb_clks, -+ ARRAY_SIZE(ssusb_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) -@@ -102,8 +102,8 @@ static int clk_mt7622_pciesys_init(struc - - clk_data = mtk_alloc_clk_data(CLK_PCIE_NR_CLK); - -- mtk_clk_register_gates(node, pcie_clks, ARRAY_SIZE(pcie_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, pcie_clks, -+ ARRAY_SIZE(pcie_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) ---- a/drivers/clk/mediatek/clk-mt7622.c -+++ b/drivers/clk/mediatek/clk-mt7622.c -@@ -621,8 +621,8 @@ static int mtk_topckgen_init(struct plat - mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), - base, &mt7622_clk_lock, clk_data); - -- mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, top_clks, -+ ARRAY_SIZE(top_clks), clk_data); - - return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - } -@@ -635,8 +635,8 @@ static int mtk_infrasys_init(struct plat - - clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK); - -- mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, infra_clks, -+ ARRAY_SIZE(infra_clks), clk_data); - - mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes), - clk_data); -@@ -663,7 +663,7 @@ static int mtk_apmixedsys_init(struct pl - mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), - clk_data); - -- mtk_clk_register_gates(node, apmixed_clks, -+ mtk_clk_register_gates(&pdev->dev, node, apmixed_clks, - ARRAY_SIZE(apmixed_clks), clk_data); - - return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); -@@ -682,8 +682,8 @@ static int mtk_pericfg_init(struct platf - - clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK); - -- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, peri_clks, -+ ARRAY_SIZE(peri_clks), clk_data); - - mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base, - &mt7622_clk_lock, clk_data); ---- a/drivers/clk/mediatek/clk-mt7629-eth.c -+++ b/drivers/clk/mediatek/clk-mt7629-eth.c -@@ -82,7 +82,8 @@ static int clk_mt7629_ethsys_init(struct - if (!clk_data) - return -ENOMEM; - -- mtk_clk_register_gates(node, eth_clks, CLK_ETH_NR_CLK, clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, eth_clks, -+ CLK_ETH_NR_CLK, clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) -@@ -106,8 +107,8 @@ static int clk_mt7629_sgmiisys_init(stru - if (!clk_data) - return -ENOMEM; - -- mtk_clk_register_gates(node, sgmii_clks[id++], CLK_SGMII_NR_CLK, -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, sgmii_clks[id++], -+ CLK_SGMII_NR_CLK, clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) ---- a/drivers/clk/mediatek/clk-mt7629-hif.c -+++ b/drivers/clk/mediatek/clk-mt7629-hif.c -@@ -75,8 +75,8 @@ static int clk_mt7629_ssusbsys_init(stru - - clk_data = mtk_alloc_clk_data(CLK_SSUSB_NR_CLK); - -- mtk_clk_register_gates(node, ssusb_clks, ARRAY_SIZE(ssusb_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, ssusb_clks, -+ ARRAY_SIZE(ssusb_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) -@@ -97,8 +97,8 @@ static int clk_mt7629_pciesys_init(struc - - clk_data = mtk_alloc_clk_data(CLK_PCIE_NR_CLK); - -- mtk_clk_register_gates(node, pcie_clks, ARRAY_SIZE(pcie_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, pcie_clks, -+ ARRAY_SIZE(pcie_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) ---- a/drivers/clk/mediatek/clk-mt7629.c -+++ b/drivers/clk/mediatek/clk-mt7629.c -@@ -585,8 +585,8 @@ static int mtk_infrasys_init(struct plat - if (!clk_data) - return -ENOMEM; - -- mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, infra_clks, -+ ARRAY_SIZE(infra_clks), clk_data); - - mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes), - clk_data); -@@ -610,8 +610,8 @@ static int mtk_pericfg_init(struct platf - if (!clk_data) - return -ENOMEM; - -- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, peri_clks, -+ ARRAY_SIZE(peri_clks), clk_data); - - mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base, - &mt7629_clk_lock, clk_data); -@@ -637,7 +637,7 @@ static int mtk_apmixedsys_init(struct pl - mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), - clk_data); - -- mtk_clk_register_gates(node, apmixed_clks, -+ mtk_clk_register_gates(&pdev->dev, node, apmixed_clks, - ARRAY_SIZE(apmixed_clks), clk_data); - - clk_prepare_enable(clk_data->hws[CLK_APMIXED_ARMPLL]->clk); ---- a/drivers/clk/mediatek/clk-mt7986-eth.c -+++ b/drivers/clk/mediatek/clk-mt7986-eth.c -@@ -72,8 +72,8 @@ static void __init mtk_sgmiisys_0_init(s - - clk_data = mtk_alloc_clk_data(ARRAY_SIZE(sgmii0_clks)); - -- mtk_clk_register_gates(node, sgmii0_clks, ARRAY_SIZE(sgmii0_clks), -- clk_data); -+ mtk_clk_register_gates(NULL, node, sgmii0_clks, -+ ARRAY_SIZE(sgmii0_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) -@@ -90,8 +90,8 @@ static void __init mtk_sgmiisys_1_init(s - - clk_data = mtk_alloc_clk_data(ARRAY_SIZE(sgmii1_clks)); - -- mtk_clk_register_gates(node, sgmii1_clks, ARRAY_SIZE(sgmii1_clks), -- clk_data); -+ mtk_clk_register_gates(NULL, node, sgmii1_clks, -+ ARRAY_SIZE(sgmii1_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - -@@ -109,7 +109,7 @@ static void __init mtk_ethsys_init(struc - - clk_data = mtk_alloc_clk_data(ARRAY_SIZE(eth_clks)); - -- mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks), clk_data); -+ mtk_clk_register_gates(NULL, node, eth_clks, ARRAY_SIZE(eth_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - ---- a/drivers/clk/mediatek/clk-mt7986-infracfg.c -+++ b/drivers/clk/mediatek/clk-mt7986-infracfg.c -@@ -180,8 +180,8 @@ static int clk_mt7986_infracfg_probe(str - mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data); - mtk_clk_register_muxes(infra_muxes, ARRAY_SIZE(infra_muxes), node, - &mt7986_clk_lock, clk_data); -- mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), -- clk_data); -+ mtk_clk_register_gates(&pdev->dev, node, infra_clks, -+ ARRAY_SIZE(infra_clks), clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) { ---- a/drivers/clk/mediatek/clk-mtk.c -+++ b/drivers/clk/mediatek/clk-mtk.c -@@ -459,8 +459,8 @@ int mtk_clk_simple_probe(struct platform - if (!clk_data) - return -ENOMEM; - -- r = mtk_clk_register_gates_with_dev(node, mcd->clks, mcd->num_clks, -- clk_data, &pdev->dev); -+ r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks, mcd->num_clks, -+ clk_data); - if (r) - goto free_data; - diff --git a/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch b/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch index 223155c59b..c7f37718af 100644 --- a/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch +++ b/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch @@ -78,7 +78,7 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c -@@ -761,7 +761,7 @@ static void __init mtk_infrasys_init_ear +@@ -762,7 +762,7 @@ static void __init mtk_infrasys_init_ear mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs), infra_clk_data); @@ -89,7 +89,7 @@ Signed-off-by: Stephen Boyd r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, --- a/drivers/clk/mediatek/clk-mt6795-infracfg.c +++ b/drivers/clk/mediatek/clk-mt6795-infracfg.c -@@ -105,7 +105,8 @@ static int clk_mt6795_infracfg_probe(str +@@ -106,7 +106,8 @@ static int clk_mt6795_infracfg_probe(str if (ret) goto free_clk_data; @@ -101,7 +101,7 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/mediatek/clk-mt7622.c +++ b/drivers/clk/mediatek/clk-mt7622.c -@@ -638,8 +638,8 @@ static int mtk_infrasys_init(struct plat +@@ -639,8 +639,8 @@ static int mtk_infrasys_init(struct plat mtk_clk_register_gates(&pdev->dev, node, infra_clks, ARRAY_SIZE(infra_clks), clk_data); @@ -114,7 +114,7 @@ Signed-off-by: Stephen Boyd clk_data); --- a/drivers/clk/mediatek/clk-mt7629.c +++ b/drivers/clk/mediatek/clk-mt7629.c -@@ -588,8 +588,8 @@ static int mtk_infrasys_init(struct plat +@@ -589,8 +589,8 @@ static int mtk_infrasys_init(struct plat mtk_clk_register_gates(&pdev->dev, node, infra_clks, ARRAY_SIZE(infra_clks), clk_data); @@ -127,8 +127,8 @@ Signed-off-by: Stephen Boyd clk_data); --- a/drivers/clk/mediatek/clk-mt8173.c +++ b/drivers/clk/mediatek/clk-mt8173.c -@@ -892,8 +892,8 @@ static void __init mtk_infrasys_init(str - clk_data); +@@ -893,8 +893,8 @@ static void __init mtk_infrasys_init(str + ARRAY_SIZE(infra_clks), clk_data); mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data); - mtk_clk_register_cpumuxes(node, cpu_muxes, ARRAY_SIZE(cpu_muxes), diff --git a/target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch b/target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch deleted file mode 100644 index eca1b614cd..0000000000 --- a/target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch +++ /dev/null @@ -1,181 +0,0 @@ -From f23375db001ec0fe9f565be75eff43adde15407e Mon Sep 17 00:00:00 2001 -From: AngeloGioacchino Del Regno -Date: Fri, 20 Jan 2023 10:20:35 +0100 -Subject: [PATCH 03/15] clk: mediatek: clk-mtk: Propagate struct device for - composites - -Like done for cpumux clocks, propagate struct device for composite -clocks registered through clk-mtk helpers to be able to get runtime -pm support for MTK clocks. - -Signed-off-by: AngeloGioacchino Del Regno -Tested-by: Miles Chen -Link: https://lore.kernel.org/r/20230120092053.182923-6-angelogioacchino.delregno@collabora.com -Tested-by: Mingming Su -Signed-off-by: Stephen Boyd - -[daniel@makrotopia.org: remove parts not relevant for OpenWrt] ---- - drivers/clk/mediatek/clk-mt2701.c | 10 ++++++---- - drivers/clk/mediatek/clk-mt2712.c | 12 ++++++++---- - drivers/clk/mediatek/clk-mt7622.c | 8 +++++--- - drivers/clk/mediatek/clk-mt7629.c | 8 +++++--- - drivers/clk/mediatek/clk-mtk.c | 11 ++++++----- - drivers/clk/mediatek/clk-mtk.h | 3 ++- - 6 files changed, 32 insertions(+), 20 deletions(-) - ---- a/drivers/clk/mediatek/clk-mt2701.c -+++ b/drivers/clk/mediatek/clk-mt2701.c -@@ -679,8 +679,9 @@ static int mtk_topckgen_init(struct plat - mtk_clk_register_factors(top_fixed_divs, ARRAY_SIZE(top_fixed_divs), - clk_data); - -- mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), -- base, &mt2701_clk_lock, clk_data); -+ mtk_clk_register_composites(&pdev->dev, top_muxes, -+ ARRAY_SIZE(top_muxes), base, -+ &mt2701_clk_lock, clk_data); - - mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), - base, &mt2701_clk_lock, clk_data); -@@ -905,8 +906,9 @@ static int mtk_pericfg_init(struct platf - mtk_clk_register_gates(&pdev->dev, node, peri_clks, - ARRAY_SIZE(peri_clks), clk_data); - -- mtk_clk_register_composites(peri_muxs, ARRAY_SIZE(peri_muxs), base, -- &mt2701_clk_lock, clk_data); -+ mtk_clk_register_composites(&pdev->dev, peri_muxs, -+ ARRAY_SIZE(peri_muxs), base, -+ &mt2701_clk_lock, clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) ---- a/drivers/clk/mediatek/clk-mt2712.c -+++ b/drivers/clk/mediatek/clk-mt2712.c -@@ -1320,8 +1320,9 @@ static int clk_mt2712_top_probe(struct p - mtk_clk_register_factors(top_early_divs, ARRAY_SIZE(top_early_divs), - top_clk_data); - mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data); -- mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base, -- &mt2712_clk_lock, top_clk_data); -+ mtk_clk_register_composites(&pdev->dev, top_muxes, -+ ARRAY_SIZE(top_muxes), base, -+ &mt2712_clk_lock, top_clk_data); - mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), base, - &mt2712_clk_lock, top_clk_data); - mtk_clk_register_gates(&pdev->dev, node, top_clks, -@@ -1395,8 +1396,11 @@ static int clk_mt2712_mcu_probe(struct p - - clk_data = mtk_alloc_clk_data(CLK_MCU_NR_CLK); - -- mtk_clk_register_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), base, -- &mt2712_clk_lock, clk_data); -+ r = mtk_clk_register_composites(&pdev->dev, mcu_muxes, -+ ARRAY_SIZE(mcu_muxes), base, -+ &mt2712_clk_lock, clk_data); -+ if (r) -+ dev_err(&pdev->dev, "Could not register composites: %d\n", r); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - ---- a/drivers/clk/mediatek/clk-mt7622.c -+++ b/drivers/clk/mediatek/clk-mt7622.c -@@ -615,8 +615,9 @@ static int mtk_topckgen_init(struct plat - mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), - clk_data); - -- mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), -- base, &mt7622_clk_lock, clk_data); -+ mtk_clk_register_composites(&pdev->dev, top_muxes, -+ ARRAY_SIZE(top_muxes), base, -+ &mt7622_clk_lock, clk_data); - - mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), - base, &mt7622_clk_lock, clk_data); -@@ -685,7 +686,8 @@ static int mtk_pericfg_init(struct platf - mtk_clk_register_gates(&pdev->dev, node, peri_clks, - ARRAY_SIZE(peri_clks), clk_data); - -- mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base, -+ mtk_clk_register_composites(&pdev->dev, peri_muxes, -+ ARRAY_SIZE(peri_muxes), base, - &mt7622_clk_lock, clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); ---- a/drivers/clk/mediatek/clk-mt7629.c -+++ b/drivers/clk/mediatek/clk-mt7629.c -@@ -566,8 +566,9 @@ static int mtk_topckgen_init(struct plat - mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), - clk_data); - -- mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), -- base, &mt7629_clk_lock, clk_data); -+ mtk_clk_register_composites(&pdev->dev, top_muxes, -+ ARRAY_SIZE(top_muxes), base, -+ &mt7629_clk_lock, clk_data); - - clk_prepare_enable(clk_data->hws[CLK_TOP_AXI_SEL]->clk); - clk_prepare_enable(clk_data->hws[CLK_TOP_MEM_SEL]->clk); -@@ -613,7 +614,8 @@ static int mtk_pericfg_init(struct platf - mtk_clk_register_gates(&pdev->dev, node, peri_clks, - ARRAY_SIZE(peri_clks), clk_data); - -- mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base, -+ mtk_clk_register_composites(&pdev->dev, peri_muxes, -+ ARRAY_SIZE(peri_muxes), base, - &mt7629_clk_lock, clk_data); - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); ---- a/drivers/clk/mediatek/clk-mtk.c -+++ b/drivers/clk/mediatek/clk-mtk.c -@@ -197,8 +197,8 @@ void mtk_clk_unregister_factors(const st - } - EXPORT_SYMBOL_GPL(mtk_clk_unregister_factors); - --static struct clk_hw *mtk_clk_register_composite(const struct mtk_composite *mc, -- void __iomem *base, spinlock_t *lock) -+static struct clk_hw *mtk_clk_register_composite(struct device *dev, -+ const struct mtk_composite *mc, void __iomem *base, spinlock_t *lock) - { - struct clk_hw *hw; - struct clk_mux *mux = NULL; -@@ -264,7 +264,7 @@ static struct clk_hw *mtk_clk_register_c - div_ops = &clk_divider_ops; - } - -- hw = clk_hw_register_composite(NULL, mc->name, parent_names, num_parents, -+ hw = clk_hw_register_composite(dev, mc->name, parent_names, num_parents, - mux_hw, mux_ops, - div_hw, div_ops, - gate_hw, gate_ops, -@@ -308,7 +308,8 @@ static void mtk_clk_unregister_composite - kfree(mux); - } - --int mtk_clk_register_composites(const struct mtk_composite *mcs, int num, -+int mtk_clk_register_composites(struct device *dev, -+ const struct mtk_composite *mcs, int num, - void __iomem *base, spinlock_t *lock, - struct clk_hw_onecell_data *clk_data) - { -@@ -327,7 +328,7 @@ int mtk_clk_register_composites(const st - continue; - } - -- hw = mtk_clk_register_composite(mc, base, lock); -+ hw = mtk_clk_register_composite(dev, mc, base, lock); - - if (IS_ERR(hw)) { - pr_err("Failed to register clk %s: %pe\n", mc->name, ---- a/drivers/clk/mediatek/clk-mtk.h -+++ b/drivers/clk/mediatek/clk-mtk.h -@@ -149,7 +149,8 @@ struct mtk_composite { - .flags = 0, \ - } - --int mtk_clk_register_composites(const struct mtk_composite *mcs, int num, -+int mtk_clk_register_composites(struct device *dev, -+ const struct mtk_composite *mcs, int num, - void __iomem *base, spinlock_t *lock, - struct clk_hw_onecell_data *clk_data); - void mtk_clk_unregister_composites(const struct mtk_composite *mcs, int num, diff --git a/target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch b/target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch deleted file mode 100644 index a50422da58..0000000000 --- a/target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 5d911479e4c732729bfa798e4a9e3e5aec3e30a7 Mon Sep 17 00:00:00 2001 -From: AngeloGioacchino Del Regno -Date: Fri, 20 Jan 2023 10:20:36 +0100 -Subject: [PATCH 04/15] clk: mediatek: clk-mux: Propagate struct device for - mtk-mux - -Like done for other clocks, propagate struct device for mtk mux clocks -registered through clk-mux helpers to enable runtime pm support. - -Signed-off-by: AngeloGioacchino Del Regno -Tested-by: Miles Chen -Link: https://lore.kernel.org/r/20230120092053.182923-7-angelogioacchino.delregno@collabora.com -Tested-by: Mingming Su -Signed-off-by: Stephen Boyd - -[daniel@makrotopia.org: removed parts not relevant for OpenWrt] ---- - drivers/clk/mediatek/clk-mt7986-infracfg.c | 3 ++- - drivers/clk/mediatek/clk-mt7986-topckgen.c | 3 ++- - drivers/clk/mediatek/clk-mux.c | 14 ++++++++------ - drivers/clk/mediatek/clk-mux.h | 3 ++- - 4 files changed, 14 insertions(+), 9 deletions(-) - ---- a/drivers/clk/mediatek/clk-mt7986-infracfg.c -+++ b/drivers/clk/mediatek/clk-mt7986-infracfg.c -@@ -178,7 +178,8 @@ static int clk_mt7986_infracfg_probe(str - return -ENOMEM; - - mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data); -- mtk_clk_register_muxes(infra_muxes, ARRAY_SIZE(infra_muxes), node, -+ mtk_clk_register_muxes(&pdev->dev, infra_muxes, -+ ARRAY_SIZE(infra_muxes), node, - &mt7986_clk_lock, clk_data); - mtk_clk_register_gates(&pdev->dev, node, infra_clks, - ARRAY_SIZE(infra_clks), clk_data); ---- a/drivers/clk/mediatek/clk-mt7986-topckgen.c -+++ b/drivers/clk/mediatek/clk-mt7986-topckgen.c -@@ -303,7 +303,8 @@ static int clk_mt7986_topckgen_probe(str - mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks), - clk_data); - mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data); -- mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node, -+ mtk_clk_register_muxes(&pdev->dev, top_muxes, -+ ARRAY_SIZE(top_muxes), node, - &mt7986_clk_lock, clk_data); - - clk_prepare_enable(clk_data->hws[CLK_TOP_SYSAXI_SEL]->clk); ---- a/drivers/clk/mediatek/clk-mux.c -+++ b/drivers/clk/mediatek/clk-mux.c -@@ -154,9 +154,10 @@ const struct clk_ops mtk_mux_gate_clr_se - }; - EXPORT_SYMBOL_GPL(mtk_mux_gate_clr_set_upd_ops); - --static struct clk_hw *mtk_clk_register_mux(const struct mtk_mux *mux, -- struct regmap *regmap, -- spinlock_t *lock) -+static struct clk_hw *mtk_clk_register_mux(struct device *dev, -+ const struct mtk_mux *mux, -+ struct regmap *regmap, -+ spinlock_t *lock) - { - struct mtk_clk_mux *clk_mux; - struct clk_init_data init = {}; -@@ -177,7 +178,7 @@ static struct clk_hw *mtk_clk_register_m - clk_mux->lock = lock; - clk_mux->hw.init = &init; - -- ret = clk_hw_register(NULL, &clk_mux->hw); -+ ret = clk_hw_register(dev, &clk_mux->hw); - if (ret) { - kfree(clk_mux); - return ERR_PTR(ret); -@@ -198,7 +199,8 @@ static void mtk_clk_unregister_mux(struc - kfree(mux); - } - --int mtk_clk_register_muxes(const struct mtk_mux *muxes, -+int mtk_clk_register_muxes(struct device *dev, -+ const struct mtk_mux *muxes, - int num, struct device_node *node, - spinlock_t *lock, - struct clk_hw_onecell_data *clk_data) -@@ -222,7 +224,7 @@ int mtk_clk_register_muxes(const struct - continue; - } - -- hw = mtk_clk_register_mux(mux, regmap, lock); -+ hw = mtk_clk_register_mux(dev, mux, regmap, lock); - - if (IS_ERR(hw)) { - pr_err("Failed to register clk %s: %pe\n", mux->name, ---- a/drivers/clk/mediatek/clk-mux.h -+++ b/drivers/clk/mediatek/clk-mux.h -@@ -83,7 +83,8 @@ extern const struct clk_ops mtk_mux_gate - 0, _upd_ofs, _upd, CLK_SET_RATE_PARENT, \ - mtk_mux_clr_set_upd_ops) - --int mtk_clk_register_muxes(const struct mtk_mux *muxes, -+int mtk_clk_register_muxes(struct device *dev, -+ const struct mtk_mux *muxes, - int num, struct device_node *node, - spinlock_t *lock, - struct clk_hw_onecell_data *clk_data); diff --git a/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch b/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch index de2e6976c3..c7de44fcf3 100644 --- a/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch +++ b/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch @@ -21,9 +21,9 @@ Signed-off-by: Stephen Boyd --- a/drivers/clk/mediatek/clk-mtk.c +++ b/drivers/clk/mediatek/clk-mtk.c -@@ -18,6 +18,22 @@ - #include "clk-mtk.h" +@@ -21,6 +21,22 @@ #include "clk-gate.h" + #include "clk-mux.h" +const struct mtk_gate_regs cg_regs_dummy = { 0, 0, 0 }; +EXPORT_SYMBOL_GPL(cg_regs_dummy); diff --git a/target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch b/target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch deleted file mode 100644 index ad02df10b6..0000000000 --- a/target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 7b6183108c8ccf0dc295f39cdf78bd8078455636 Mon Sep 17 00:00:00 2001 -From: AngeloGioacchino Del Regno -Date: Fri, 20 Jan 2023 10:20:42 +0100 -Subject: [PATCH] clk: mediatek: clk-mtk: Extend mtk_clk_simple_probe() - -As a preparation to increase probe functions commonization across -various MediaTek SoC clock controller drivers, extend function -mtk_clk_simple_probe() to be able to register not only gates, but -also fixed clocks, factors, muxes and composites. - -Signed-off-by: AngeloGioacchino Del Regno -Reviewed-by: Miles Chen -Reviewed-by: Chen-Yu Tsai -Tested-by: Miles Chen -Link: https://lore.kernel.org/r/20230120092053.182923-13-angelogioacchino.delregno@collabora.com -Tested-by: Mingming Su -Signed-off-by: Stephen Boyd ---- - drivers/clk/mediatek/clk-mtk.c | 101 ++++++++++++++++++++++++++++++--- - drivers/clk/mediatek/clk-mtk.h | 10 ++++ - 2 files changed, 103 insertions(+), 8 deletions(-) - ---- a/drivers/clk/mediatek/clk-mtk.c -+++ b/drivers/clk/mediatek/clk-mtk.c -@@ -11,12 +11,14 @@ - #include - #include - #include -+#include - #include - #include - #include - - #include "clk-mtk.h" - #include "clk-gate.h" -+#include "clk-mux.h" - - const struct mtk_gate_regs cg_regs_dummy = { 0, 0, 0 }; - EXPORT_SYMBOL_GPL(cg_regs_dummy); -@@ -466,20 +468,71 @@ int mtk_clk_simple_probe(struct platform - const struct mtk_clk_desc *mcd; - struct clk_hw_onecell_data *clk_data; - struct device_node *node = pdev->dev.of_node; -- int r; -+ void __iomem *base; -+ int num_clks, r; - - mcd = of_device_get_match_data(&pdev->dev); - if (!mcd) - return -EINVAL; - -- clk_data = mtk_alloc_clk_data(mcd->num_clks); -+ /* Composite clocks needs us to pass iomem pointer */ -+ if (mcd->composite_clks) { -+ if (!mcd->shared_io) -+ base = devm_platform_ioremap_resource(pdev, 0); -+ else -+ base = of_iomap(node, 0); -+ -+ if (IS_ERR_OR_NULL(base)) -+ return IS_ERR(base) ? PTR_ERR(base) : -ENOMEM; -+ } -+ -+ /* Calculate how many clk_hw_onecell_data entries to allocate */ -+ num_clks = mcd->num_clks + mcd->num_composite_clks; -+ num_clks += mcd->num_fixed_clks + mcd->num_factor_clks; -+ num_clks += mcd->num_mux_clks; -+ -+ clk_data = mtk_alloc_clk_data(num_clks); - if (!clk_data) - return -ENOMEM; - -- r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks, mcd->num_clks, -- clk_data); -- if (r) -- goto free_data; -+ if (mcd->fixed_clks) { -+ r = mtk_clk_register_fixed_clks(mcd->fixed_clks, -+ mcd->num_fixed_clks, clk_data); -+ if (r) -+ goto free_data; -+ } -+ -+ if (mcd->factor_clks) { -+ r = mtk_clk_register_factors(mcd->factor_clks, -+ mcd->num_factor_clks, clk_data); -+ if (r) -+ goto unregister_fixed_clks; -+ } -+ -+ if (mcd->mux_clks) { -+ r = mtk_clk_register_muxes(&pdev->dev, mcd->mux_clks, -+ mcd->num_mux_clks, node, -+ mcd->clk_lock, clk_data); -+ if (r) -+ goto unregister_factors; -+ }; -+ -+ if (mcd->composite_clks) { -+ /* We don't check composite_lock because it's optional */ -+ r = mtk_clk_register_composites(&pdev->dev, -+ mcd->composite_clks, -+ mcd->num_composite_clks, -+ base, mcd->clk_lock, clk_data); -+ if (r) -+ goto unregister_muxes; -+ } -+ -+ if (mcd->clks) { -+ r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks, -+ mcd->num_clks, clk_data); -+ if (r) -+ goto unregister_composites; -+ } - - r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data); - if (r) -@@ -497,9 +550,28 @@ int mtk_clk_simple_probe(struct platform - return r; - - unregister_clks: -- mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data); -+ if (mcd->clks) -+ mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data); -+unregister_composites: -+ if (mcd->composite_clks) -+ mtk_clk_unregister_composites(mcd->composite_clks, -+ mcd->num_composite_clks, clk_data); -+unregister_muxes: -+ if (mcd->mux_clks) -+ mtk_clk_unregister_muxes(mcd->mux_clks, -+ mcd->num_mux_clks, clk_data); -+unregister_factors: -+ if (mcd->factor_clks) -+ mtk_clk_unregister_factors(mcd->factor_clks, -+ mcd->num_factor_clks, clk_data); -+unregister_fixed_clks: -+ if (mcd->fixed_clks) -+ mtk_clk_unregister_fixed_clks(mcd->fixed_clks, -+ mcd->num_fixed_clks, clk_data); - free_data: - mtk_free_clk_data(clk_data); -+ if (mcd->shared_io && base) -+ iounmap(base); - return r; - } - EXPORT_SYMBOL_GPL(mtk_clk_simple_probe); -@@ -511,7 +583,20 @@ int mtk_clk_simple_remove(struct platfor - struct device_node *node = pdev->dev.of_node; - - of_clk_del_provider(node); -- mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data); -+ if (mcd->clks) -+ mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data); -+ if (mcd->composite_clks) -+ mtk_clk_unregister_composites(mcd->composite_clks, -+ mcd->num_composite_clks, clk_data); -+ if (mcd->mux_clks) -+ mtk_clk_unregister_muxes(mcd->mux_clks, -+ mcd->num_mux_clks, clk_data); -+ if (mcd->factor_clks) -+ mtk_clk_unregister_factors(mcd->factor_clks, -+ mcd->num_factor_clks, clk_data); -+ if (mcd->fixed_clks) -+ mtk_clk_unregister_fixed_clks(mcd->fixed_clks, -+ mcd->num_fixed_clks, clk_data); - mtk_free_clk_data(clk_data); - - return 0; ---- a/drivers/clk/mediatek/clk-mtk.h -+++ b/drivers/clk/mediatek/clk-mtk.h -@@ -215,7 +215,17 @@ void mtk_clk_unregister_ref2usb_tx(struc - struct mtk_clk_desc { - const struct mtk_gate *clks; - size_t num_clks; -+ const struct mtk_composite *composite_clks; -+ size_t num_composite_clks; -+ const struct mtk_fixed_clk *fixed_clks; -+ size_t num_fixed_clks; -+ const struct mtk_fixed_factor *factor_clks; -+ size_t num_factor_clks; -+ const struct mtk_mux *mux_clks; -+ size_t num_mux_clks; - const struct mtk_clk_rst_desc *rst_desc; -+ spinlock_t *clk_lock; -+ bool shared_io; - }; - - int mtk_clk_simple_probe(struct platform_device *pdev); diff --git a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch index 7ab735af4c..ec6cef800a 100644 --- a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -258,7 +258,7 @@ Signed-off-by: Michael Gray static int kernel_init(void *); extern void init_IRQ(void); -@@ -994,6 +998,18 @@ asmlinkage __visible void __init __no_sa +@@ -996,6 +1000,18 @@ asmlinkage __visible void __init __no_sa page_alloc_init(); pr_notice("Kernel command line: %s\n", saved_command_line); diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 086719a43d..54fe13123d 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -474,6 +474,36 @@ #interrupt-cells = <1>; interrupts = ; + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethphy0: ethernet-phy@0 { + reg = <0>; + interrupts = <0>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + interrupts = <1>; + }; + + ethphy2: ethernet-phy@2 { + reg = <2>; + interrupts = <2>; + }; + + ethphy3: ethernet-phy@3 { + reg = <3>; + interrupts = <3>; + }; + + ethphy4: ethernet-phy@4 { + reg = <4>; + interrupts = <4>; + }; + }; + ports { #address-cells = <1>; #size-cells = <0>; @@ -482,30 +512,35 @@ status = "disabled"; reg = <0>; label = "lan0"; + phy-handle = <ðphy0>; }; port@1 { status = "disabled"; reg = <1>; label = "lan1"; + phy-handle = <ðphy1>; }; port@2 { status = "disabled"; reg = <2>; label = "lan2"; + phy-handle = <ðphy2>; }; port@3 { status = "disabled"; reg = <3>; label = "lan3"; + phy-handle = <ðphy3>; }; port@4 { status = "disabled"; reg = <4>; label = "lan4"; + phy-handle = <ðphy4>; }; port@6 { diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 6ca9eccd2d..2dea282bf5 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -136,10 +136,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index 4f942f1602..f2f5719af2 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -155,10 +155,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts b/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts index 85fda96ce5..c0e208d33d 100644 --- a/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts +++ b/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts @@ -176,10 +176,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts index 07e0d23788..6280a643a9 100644 --- a/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts +++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts @@ -13,10 +13,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts index 48506907eb..4a5194c363 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts +++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts @@ -203,10 +203,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &pcie { diff --git a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi index 78627b2157..ec9da152ce 100644 --- a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi +++ b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi @@ -185,10 +185,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi index edfdc9b173..2f03082688 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi @@ -111,10 +111,8 @@ status = "okay"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &gmac0 { diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts index 4915f8125e..d5b46b14ee 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts @@ -170,10 +170,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi index 5bccddec0b..bee8afdc90 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -166,10 +166,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts index faf58e0187..76645987b2 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts @@ -183,10 +183,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts index 7bb375cb29..972b3d5bd8 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts @@ -157,10 +157,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts index b18bd113da..d73dfe9421 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts @@ -182,10 +182,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts index 12ff04ed28..e2fa019d07 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts @@ -216,10 +216,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts index 84ec15b872..56080ff917 100644 --- a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts @@ -209,10 +209,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts index 25fc335c56..be519abf6e 100644 --- a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts +++ b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts @@ -162,10 +162,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index c065997ea1..7b1cc64b50 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -174,10 +174,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index 66b47d2fa0..fa90fba3d5 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -199,10 +199,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index e3b165c640..00b2165836 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -208,10 +208,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_cudy_m1800.dts b/target/linux/ramips/dts/mt7621_cudy_m1800.dts index 12f5ce3ec9..1aa5821006 100644 --- a/target/linux/ramips/dts/mt7621_cudy_m1800.dts +++ b/target/linux/ramips/dts/mt7621_cudy_m1800.dts @@ -66,10 +66,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &pcie { diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts index 9d5701a7cc..265b48143e 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts @@ -193,10 +193,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi index 55da73dcda..da62648bc9 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi @@ -153,10 +153,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index 5b21cff130..8278551267 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -208,10 +208,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_cudy_x6.dtsi b/target/linux/ramips/dts/mt7621_cudy_x6.dtsi index 81a34e9302..0542640f13 100644 --- a/target/linux/ramips/dts/mt7621_cudy_x6.dtsi +++ b/target/linux/ramips/dts/mt7621_cudy_x6.dtsi @@ -116,10 +116,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts index 90a5c196fc..cf924cffb6 100644 --- a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts @@ -184,10 +184,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts index 7e5809ed3a..7bc3a3f186 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts @@ -187,10 +187,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts index 434a6d9f1a..9d47674959 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -203,10 +203,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts index a3753f37d4..25d2768d23 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts @@ -120,10 +120,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts index 8939e523fe..589669c36a 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -144,10 +144,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi index 11d673dc87..0f5b4f0d90 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi @@ -110,10 +110,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index 57652fb278..d5adb8728c 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -188,10 +188,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi index d7309dbdfe..8e7652cac7 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -151,10 +151,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts index bbc135ad83..503ec40b50 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -85,10 +85,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi index 418b0cfa9a..cdb94dcdc1 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi @@ -124,10 +124,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi index dae247f4ce..4b61b9faf2 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi @@ -94,10 +94,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_etisalat_s3.dts b/target/linux/ramips/dts/mt7621_etisalat_s3.dts index 2fb3aedaff..60452a63f4 100644 --- a/target/linux/ramips/dts/mt7621_etisalat_s3.dts +++ b/target/linux/ramips/dts/mt7621_etisalat_s3.dts @@ -209,10 +209,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts index 9030c051f1..a017baa1ba 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -144,10 +144,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 849074111b..e4b254ebce 100644 --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -145,10 +145,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index 7ef7201faf..2710aa6f3e 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -116,10 +116,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi index 88148c6759..1520aaf5b1 100644 --- a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi +++ b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi @@ -58,10 +58,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &nand { diff --git a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi index 53c5912397..dd7b72707e 100644 --- a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi +++ b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi @@ -73,10 +73,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &nand { diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts index cae9f717b1..195a12b7d1 100644 --- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts +++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts @@ -77,10 +77,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index 1bf6640137..5a8f32d723 100644 --- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts +++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts @@ -153,10 +153,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts index a7610070de..e764139451 100644 --- a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts +++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts @@ -169,10 +169,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_humax_e10.dts b/target/linux/ramips/dts/mt7621_humax_e10.dts index dfa91ad43a..39eac32d53 100644 --- a/target/linux/ramips/dts/mt7621_humax_e10.dts +++ b/target/linux/ramips/dts/mt7621_humax_e10.dts @@ -169,10 +169,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index 4f84302417..9e64077e0c 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -174,10 +174,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts index 4543f45a9f..86d8a93da6 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts @@ -186,10 +186,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts index 9de7297405..bcb7e57678 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts @@ -170,10 +170,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index b055afc3ad..519c52065b 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -160,10 +160,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi index b3063a333e..07187d8bfe 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi +++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi @@ -161,10 +161,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts index 790668cc41..e322e4efdb 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -153,10 +153,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts index e8c7f12d01..bfb6207199 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts @@ -130,10 +130,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts index 6990d31e39..7c46635fb5 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts @@ -134,10 +134,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts index a96e89b3f3..7b2465c14f 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts @@ -135,10 +135,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi index 848891056a..6bfdffefb7 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi +++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi @@ -152,10 +152,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index 249904da6a..7f28d7af3f 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -138,10 +138,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts index 88067a4fa5..8263c062dd 100644 --- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts @@ -148,10 +148,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iptime_t5004.dts b/target/linux/ramips/dts/mt7621_iptime_t5004.dts index f7a5e8ca17..4a7f9aaaa1 100644 --- a/target/linux/ramips/dts/mt7621_iptime_t5004.dts +++ b/target/linux/ramips/dts/mt7621_iptime_t5004.dts @@ -91,10 +91,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index 05980caa6f..548ab7ba59 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -168,10 +168,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index 49f51ded7f..a8892ac8b1 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -180,10 +180,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts index 54141cc2a2..5012bc3d62 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -121,10 +121,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts b/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts index 1017e1984d..38602bc446 100644 --- a/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts +++ b/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts @@ -61,6 +61,10 @@ }; }; +ðphy4 { + /delete-property/ interrupts; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_3fff4>; nvmem-cell-names = "mac-address"; @@ -75,12 +79,6 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &pcie { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts index cad13da5e4..f3c91dedf2 100644 --- a/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts +++ b/target/linux/ramips/dts/mt7621_jdcloud_re-sp-01b.dts @@ -56,6 +56,10 @@ }; }; +ðphy0 { + /delete-property/ interrupts; +}; + &gmac0 { nvmem-cells = <&macaddr_config_4429 0>; nvmem-cell-names = "mac-address"; @@ -70,12 +74,6 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - &sdhci { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts index 35d09832f2..6ee20c29c5 100644 --- a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts +++ b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts @@ -201,10 +201,8 @@ }; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &gmac0 { diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index 0323769990..3b6026f377 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -179,10 +179,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts index a059fd0698..08fcbbc515 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts @@ -175,10 +175,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_linksys_e7350.dts b/target/linux/ramips/dts/mt7621_linksys_e7350.dts index 77c123720f..db7387ddec 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e7350.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e7350.dts @@ -156,10 +156,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts b/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts index 35a90ea070..83c86ee11d 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts +++ b/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts @@ -16,14 +16,12 @@ phy-handle = <ðphy4>; }; -&mdio { - ethernet-phy@0 { - status = "disabled"; - }; +ðphy0 { + interrupts = <0>; +}; - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi index 5804f21591..70cf425b2c 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi +++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi @@ -203,10 +203,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts index d269899980..3c026a41a5 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -148,10 +148,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts index aaa75b0573..c6fa3622ef 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -138,10 +138,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts index 2da7f983a9..ecce30330b 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts @@ -45,10 +45,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_meig_slt866.dts b/target/linux/ramips/dts/mt7621_meig_slt866.dts index d364a91794..d4e040649e 100644 --- a/target/linux/ramips/dts/mt7621_meig_slt866.dts +++ b/target/linux/ramips/dts/mt7621_meig_slt866.dts @@ -185,11 +185,6 @@ }; }; -ðernet { - pinctrl-names = "default"; - pinctrl-0 = <&mdio_pins>; -}; - &gmac0 { nvmem-cells = <&macaddr_custom_40 0>; nvmem-cell-names = "mac-address"; @@ -204,10 +199,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts index fb14bd7829..145b0eeb40 100644 --- a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts +++ b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts @@ -145,10 +145,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts index aad8a6776d..faa4e53f09 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts @@ -42,10 +42,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts index 223d03b9fd..11171d9535 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts @@ -96,10 +96,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi index 6e225c0825..f8dc6ebdbf 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -118,10 +118,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 61c3ec3761..c125bcc4e3 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -184,10 +184,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index 13ce338588..273bb9469c 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -115,10 +115,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index 9c706530d4..01583e8887 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -170,10 +170,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_netgear_wax202.dts b/target/linux/ramips/dts/mt7621_netgear_wax202.dts index bf580de6b8..226c461543 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wax202.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wax202.dts @@ -244,10 +244,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index 58d2c70655..0baf9d6483 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -162,10 +162,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts index 7b33efd6e6..b9bccf0f28 100644 --- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts +++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts @@ -156,10 +156,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index 6a733698d2..92c76d4206 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -146,10 +146,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index 4d281670ef..df12331e24 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -104,10 +104,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts index 98a2ffad5f..f4d893a366 100644 --- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -163,10 +163,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts index b3aaffeafe..b567b14f8e 100644 --- a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts +++ b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts @@ -140,10 +140,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts b/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts index 8afe5f5485..1c2cb42fa0 100644 --- a/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts +++ b/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts @@ -228,10 +228,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index 5afed4c695..b5818a7e60 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -146,10 +146,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi index fd952cbc93..b13b621d2f 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi +++ b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi @@ -208,10 +208,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts index 6ea2c199e3..b287056bf1 100644 --- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts @@ -90,10 +90,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &pcie { diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts index 3b474819e1..cd0e7465ff 100644 --- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts +++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts @@ -112,10 +112,8 @@ status = "okay"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &gmac0 { diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index 3448db5f03..4497531aee 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -154,10 +154,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts index d1310ad954..42e39c3152 100644 --- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts +++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts @@ -125,10 +125,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts index 8c0062973d..e4937c55c5 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -135,10 +135,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts index 24606904e1..e2d706c5db 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -130,10 +130,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts index 71ef4bc6b6..ac03545eca 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts @@ -181,10 +181,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index e9879128a3..b1a3e3e1bc 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -206,10 +206,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts index d814cba261..bc56b82cd1 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts @@ -189,10 +189,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts index 2aea6bbbc0..2694b3890f 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts @@ -182,10 +182,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts index 6203308515..02560669d5 100644 --- a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts @@ -283,10 +283,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts b/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts index 33070ef6ca..b71b7ad914 100644 --- a/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts +++ b/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts @@ -155,11 +155,8 @@ }; }; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &state_default { diff --git a/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts b/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts index c501727ca8..d6f9a368e4 100644 --- a/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts @@ -219,10 +219,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts index db460b43b2..234202ba87 100644 --- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts +++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts @@ -198,13 +198,10 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; - &switch0 { ports { port@1 { diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts index 4665f04f02..80467c88e9 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts @@ -14,10 +14,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts index 0d6d500222..f2fb48cac2 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts @@ -73,10 +73,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi index b193aed103..77c06545e8 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi @@ -64,10 +64,8 @@ phy-handle = <ðphy0>; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi index 42f6cea2d3..79deb7559d 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -81,10 +81,8 @@ phy-handle = <ðphy4>; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts index 05d8e4a5ae..7080dad145 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts @@ -47,12 +47,6 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &pcie { status = "okay"; }; @@ -119,17 +113,6 @@ }; }; -&gmac0 { - nvmem-cells = <&macaddr_factory_3fff4>; - nvmem-cell-names = "mac-address"; -}; - -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &switch0 { ports { port@3 { diff --git a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts index f9e37bee6e..78bc0ba4b0 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts @@ -166,10 +166,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts index f0c7646b26..96054135ae 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts @@ -224,10 +224,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts index 1dfded14b1..3b377fca7c 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -85,10 +85,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi index 61359e8b21..2d2bf3d699 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi @@ -47,10 +47,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi index ef637278af..598fafe871 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi @@ -173,10 +173,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi index 468f9456bf..e0950e7c64 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi @@ -45,10 +45,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index f1227552e8..e04afc81ba 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -111,10 +111,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index c47e34a5d6..6475c142e7 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -165,10 +165,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts index 9f4e8cf1ce..9d2491f634 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -175,10 +175,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts index 0cdad1bfe5..316c180098 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts @@ -174,10 +174,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts index 2cc3435a89..536b45e03f 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts @@ -189,13 +189,10 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; - &switch0 { gpio-controller; #gpio-cells = <2>; diff --git a/target/linux/ramips/dts/mt7621_yuncore_g720.dts b/target/linux/ramips/dts/mt7621_yuncore_g720.dts index 4b88064b49..2170bc83ec 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_g720.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_g720.dts @@ -137,10 +137,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts b/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts index 34b151be75..3acc1529e5 100644 --- a/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts +++ b/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts @@ -93,10 +93,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &nand { diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts index e15c676c8a..7dfe9a7699 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -109,10 +109,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts index dfa49a2bc5..31a4e4482a 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -133,10 +133,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi index bbf121036c..c3712fea7b 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi @@ -187,10 +187,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi index b0182ee896..dcad7b26d2 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi @@ -186,10 +186,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi index 321274bb15..fc8a91e398 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi @@ -156,10 +156,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; +ðphy4 { + /delete-property/ interrupts; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_zte_e8820s.dts b/target/linux/ramips/dts/mt7621_zte_e8820s.dts index 911b6371e5..1a35994c36 100644 --- a/target/linux/ramips/dts/mt7621_zte_e8820s.dts +++ b/target/linux/ramips/dts/mt7621_zte_e8820s.dts @@ -61,6 +61,10 @@ }; }; +ðphy4 { + /delete-property/ interrupts; +}; + &gmac0 { nvmem-cells = <&macaddr_config_12 0>; nvmem-cell-names = "mac-address"; @@ -75,12 +79,6 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy4: ethernet-phy@4 { - reg = <4>; - }; -}; - &nand { status = "okay"; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts index b82a8669b3..6bf65a0218 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts @@ -193,10 +193,8 @@ nvmem-cell-names = "mac-address"; }; -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; +ðphy0 { + /delete-property/ interrupts; }; &pcie { diff --git a/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch b/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch index 26a28167c6..ac3f3b7aba 100644 --- a/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch +++ b/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch @@ -17,7 +17,7 @@ Signed-off-by: David Bauer --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -557,8 +557,28 @@ static int __init bootcmdline_scan_chose +@@ -564,8 +564,28 @@ static int __init bootcmdline_scan_chose #endif /* CONFIG_OF_EARLY_FLATTREE */ @@ -46,7 +46,7 @@ Signed-off-by: David Bauer bool dt_bootargs = false; /* -@@ -572,6 +592,14 @@ static void __init bootcmdline_init(void +@@ -579,6 +599,14 @@ static void __init bootcmdline_init(void } /* diff --git a/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch index c31e6d7cde..f296c2d18d 100644 --- a/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch +++ b/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -699,7 +699,6 @@ static void __init arch_mem_init(char ** +@@ -706,7 +706,6 @@ static void __init arch_mem_init(char ** mips_reserve_vmcore(); mips_parse_crashkernel(); @@ -18,7 +18,7 @@ Signed-off-by: John Crispin /* * In order to reduce the possibility of kernel panic when failed to -@@ -834,6 +833,7 @@ void __init setup_arch(char **cmdline_p) +@@ -841,6 +840,7 @@ void __init setup_arch(char **cmdline_p) cpu_cache_init(); paging_init(); diff --git a/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch b/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch index f9975986fe..ac3f3b7aba 100644 --- a/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch +++ b/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch @@ -17,7 +17,7 @@ Signed-off-by: David Bauer --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -563,8 +563,28 @@ static int __init bootcmdline_scan_chose +@@ -564,8 +564,28 @@ static int __init bootcmdline_scan_chose #endif /* CONFIG_OF_EARLY_FLATTREE */ @@ -46,7 +46,7 @@ Signed-off-by: David Bauer bool dt_bootargs = false; /* -@@ -578,6 +598,14 @@ static void __init bootcmdline_init(void +@@ -579,6 +599,14 @@ static void __init bootcmdline_init(void } /* diff --git a/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch index 04f0a67325..2bb3d55d70 100644 --- a/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch +++ b/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c -@@ -705,7 +705,6 @@ static void __init arch_mem_init(char ** +@@ -706,7 +706,6 @@ static void __init arch_mem_init(char ** mips_reserve_vmcore(); mips_parse_crashkernel(); @@ -18,7 +18,7 @@ Signed-off-by: John Crispin /* * In order to reduce the possibility of kernel panic when failed to -@@ -841,6 +840,7 @@ void __init setup_arch(char **cmdline_p) +@@ -842,6 +841,7 @@ void __init setup_arch(char **cmdline_p) cpu_cache_init(); paging_init(); diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile index 3c6f27ee47..5bf76b0d50 100644 --- a/target/linux/sunxi/Makefile +++ b/target/linux/sunxi/Makefile @@ -10,8 +10,7 @@ BOARDNAME:=Allwinner ARM SoCs FEATURES:=usb ext4 display rootfs-part rtc squashfs SUBTARGETS:=cortexa8 cortexa7 cortexa53 -KERNEL_PATCHVER:=6.1 -KERNEL_TESTING_PATCHVER:=6.6 +KERNEL_PATCHVER:=6.6 KERNELNAME:=zImage dtbs diff --git a/target/linux/sunxi/config-6.1 b/target/linux/sunxi/config-6.1 deleted file mode 100644 index bd25f51490..0000000000 --- a/target/linux/sunxi/config-6.1 +++ /dev/null @@ -1,539 +0,0 @@ -# CONFIG_AHCI_SUNXI is not set -CONFIG_ALIGNMENT_TRAP=y -CONFIG_ARCH_32BIT_OFF_T=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_ARCH_FORCE_MAX_ORDER=11 -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_KEEP_MEMBLOCK=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MULTIPLATFORM=y -CONFIG_ARCH_MULTI_V6_V7=y -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_NR_GPIO=416 -CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SUNXI=y -CONFIG_ARCH_SUNXI_MC_SMP=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARM=y -CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y -CONFIG_ARM_CCI=y -CONFIG_ARM_CCI400_COMMON=y -CONFIG_ARM_CCI400_PORT_CTRL=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARM_CRYPTO=y -CONFIG_ARM_ERRATA_643719=y -CONFIG_ARM_GIC=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_ARM_HEAVY_MB=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_LPAE=y -CONFIG_ARM_PATCH_IDIV=y -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_ARM_PSCI=y -CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_UNWIND=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_ATA=y -CONFIG_ATAGS=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_AXP20X_POWER=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_PM=y -CONFIG_BOUNCE=y -# CONFIG_BPF_LIRC_MODE2 is not set -CONFIG_CACHE_L2X0=y -CONFIG_CAN=y -CONFIG_CLKSRC_MMIO=y -CONFIG_CLK_SUNXI=y -CONFIG_CLK_SUNXI_CLOCKS=y -CONFIG_CLK_SUNXI_PRCM_SUN6I=y -CONFIG_CLK_SUNXI_PRCM_SUN8I=y -CONFIG_CLK_SUNXI_PRCM_SUN9I=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_COMMON_CLK=y -CONFIG_COMPAT_32BIT_TIME=y -CONFIG_CONFIGFS_FS=y -CONFIG_CONNECTOR=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_COREDUMP=y -CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y -CONFIG_CPUFREQ_DT=y -CONFIG_CPUFREQ_DT_PLATDEV=y -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_ATTR_SET=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_PM=y -CONFIG_CPU_RMAP=y -CONFIG_CPU_SPECTRE=y -CONFIG_CPU_THERMAL=y -CONFIG_CPU_THUMB_CAPABLE=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_V7=y -CONFIG_CRC16=y -CONFIG_CRC_T10DIF=y -CONFIG_CRYPTO_CRC32=y -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRCT10DIF=y -CONFIG_CRYPTO_CRCT10DIF_ARM_CE=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_DEV_ALLWINNER=y -CONFIG_CRYPTO_DEV_SUN4I_SS=y -# CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG is not set -CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y -# CONFIG_CRYPTO_DEV_SUN8I_CE is not set -# CONFIG_CRYPTO_DEV_SUN8I_SS is not set -CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_LIB_DES=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_SHA1=y -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_DEBUG_MEMORY_INIT=y -CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y -# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set -# CONFIG_DEVFREQ_GOV_POWERSAVE is not set -# CONFIG_DEVFREQ_GOV_USERSPACE is not set -# CONFIG_DEVFREQ_GOV_PASSIVE is not set -# CONFIG_DEVFREQ_THERMAL is not set -CONFIG_DMADEVICES=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_OF=y -CONFIG_DMA_OPS=y -CONFIG_DMA_REMAP=y -CONFIG_DMA_SUN4I=y -CONFIG_DMA_SUN6I=y -CONFIG_DMA_VIRTUAL_CHANNELS=y -CONFIG_DNOTIFY=y -CONFIG_DTC=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_DVB_CORE=y -CONFIG_DWMAC_GENERIC=y -# CONFIG_DWMAC_SUN8I is not set -CONFIG_DWMAC_SUNXI=y -CONFIG_DYNAMIC_DEBUG=y -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -CONFIG_ELF_CORE=y -CONFIG_EXT4_FS=y -CONFIG_EXTCON=y -CONFIG_F2FS_FS=y -CONFIG_FAT_FS=y -CONFIG_FB=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_IMAGEBLIT=y -CONFIG_FB_CMDLINE=y -CONFIG_FB_FOREIGN_ENDIAN=y -CONFIG_FB_LITTLE_ENDIAN=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_SIMPLE=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FIXED_PHY=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_FONT_8x16=y -CONFIG_FONT_8x8=y -CONFIG_FONT_SUPPORT=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FRAME_WARN=2048 -CONFIG_FREEZER=y -CONFIG_FS_IOMAP=y -CONFIG_FS_MBCACHE=y -CONFIG_FS_POSIX_ACL=y -CONFIG_FWNODE_MDIO=y -CONFIG_FW_CACHE=y -CONFIG_FW_LOADER_PAGED_BUF=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_ARCH_TOPOLOGY=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_VULNERABILITIES=y -CONFIG_GENERIC_EARLY_IOREMAP=y -CONFIG_GENERIC_GETTIMEOFDAY=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_MIGRATION=y -CONFIG_GENERIC_IRQ_MULTI_HANDLER=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_PHY=y -CONFIG_GENERIC_PINCONF=y -CONFIG_GENERIC_PINCTRL_GROUPS=y -CONFIG_GENERIC_PINMUX_FUNCTIONS=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_VDSO_32=y -CONFIG_GLOB=y -CONFIG_GPIO_CDEV=y -CONFIG_HANDLE_DOMAIN_IRQ=y -CONFIG_HARDEN_BRANCH_PREDICTOR=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAVE_SMP=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_HOTPLUG_CPU=y -CONFIG_HWMON=y -CONFIG_HW_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_TIMERIOMEM=y -CONFIG_HZ_FIXED=0 -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_COMPAT=y -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_MV64XXX=y -CONFIG_I2C_SUN6I_P2WI=y -CONFIG_IIO=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_INPUT=y -CONFIG_INPUT_AXP20X_PEK=y -CONFIG_INPUT_KEYBOARD=y -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_IOMMU_DEBUGFS is not set -# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set -# CONFIG_IOMMU_IO_PGTABLE_DART is not set -# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set -CONFIG_IRQCHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_WORK=y -CONFIG_JBD2=y -CONFIG_KALLSYMS=y -CONFIG_KEYBOARD_SUN4I_LRADC=y -CONFIG_KMAP_LOCAL=y -CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y -CONFIG_KSM=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_PLATFORM=y -CONFIG_LEDS_GPIO=y -CONFIG_LIBFDT=y -CONFIG_LOCK_DEBUGGING_SUPPORT=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_MACH_SUN4I=y -CONFIG_MACH_SUN5I=y -CONFIG_MACH_SUN6I=y -CONFIG_MACH_SUN7I=y -CONFIG_MACH_SUN8I=y -CONFIG_MACH_SUN9I=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_MDIO_BUS=y -CONFIG_MDIO_DEVICE=y -CONFIG_MDIO_DEVRES=y -CONFIG_MDIO_SUN4I=y -CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -CONFIG_MEDIA_ATTACH=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -CONFIG_MEDIA_PLATFORM_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_SDR_SUPPORT=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_TEST_SUPPORT=y -CONFIG_MEDIA_TUNER=y -CONFIG_MEMFD_CREATE=y -CONFIG_MFD_AXP20X=y -CONFIG_MFD_AXP20X_I2C=y -CONFIG_MFD_AXP20X_RSB=y -CONFIG_MFD_CORE=y -CONFIG_MFD_SUN6I_PRCM=y -CONFIG_MFD_SYSCON=y -CONFIG_MIGHT_HAVE_CACHE_L2X0=y -CONFIG_MIGRATION=y -CONFIG_MMC=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_SUNXI=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_SPLIT_FIT_FW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEON=y -CONFIG_NET_FLOW_LIMIT=y -CONFIG_NET_PTP_CLASSIFY=y -CONFIG_NET_SELFTESTS=y -CONFIG_NET_VENDOR_ALLWINNER=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NO_HZ=y -CONFIG_NO_HZ_COMMON=y -CONFIG_NO_HZ_IDLE=y -CONFIG_NR_CPUS=8 -CONFIG_NVMEM=y -CONFIG_NVMEM_SUNXI_SID=y -CONFIG_NVMEM_SYSFS=y -CONFIG_OF=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_FLATTREE=y -CONFIG_OF_GPIO=y -CONFIG_OF_IRQ=y -CONFIG_OF_KOBJ=y -CONFIG_OF_MDIO=y -CONFIG_OLD_SIGACTION=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OUTER_CACHE=y -CONFIG_OUTER_CACHE_SYNC=y -CONFIG_PADATA=y -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_PAGE_POOL=y -CONFIG_PCS_XPCS=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=3 -CONFIG_PHYLIB=y -CONFIG_PHYLINK=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_PHY_SUN4I_USB=y -# CONFIG_PHY_SUN50I_USB3 is not set -# CONFIG_PHY_SUN6I_MIPI_DPHY is not set -CONFIG_PHY_SUN9I_USB=y -CONFIG_PINCTRL=y -CONFIG_PINCTRL_AXP209=y -# CONFIG_PINCTRL_SUN20I_D1 is not set -CONFIG_PINCTRL_SUN4I_A10=y -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set -# CONFIG_PINCTRL_SUN50I_A64 is not set -# CONFIG_PINCTRL_SUN50I_A64_R is not set -# CONFIG_PINCTRL_SUN50I_H5 is not set -# CONFIG_PINCTRL_SUN50I_H6 is not set -# CONFIG_PINCTRL_SUN50I_H616 is not set -# CONFIG_PINCTRL_SUN50I_H616_R is not set -# CONFIG_PINCTRL_SUN50I_H6_R is not set -CONFIG_PINCTRL_SUN5I=y -CONFIG_PINCTRL_SUN6I_A31=y -CONFIG_PINCTRL_SUN6I_A31_R=y -CONFIG_PINCTRL_SUN8I_A23=y -CONFIG_PINCTRL_SUN8I_A23_R=y -CONFIG_PINCTRL_SUN8I_A33=y -CONFIG_PINCTRL_SUN8I_A83T=y -CONFIG_PINCTRL_SUN8I_A83T_R=y -CONFIG_PINCTRL_SUN8I_H3=y -CONFIG_PINCTRL_SUN8I_H3_R=y -CONFIG_PINCTRL_SUN8I_V3S=y -CONFIG_PINCTRL_SUN9I_A80=y -CONFIG_PINCTRL_SUN9I_A80_R=y -CONFIG_PINCTRL_SUNXI=y -CONFIG_PM=y -CONFIG_PM_CLK=y -# CONFIG_PM_DEVFREQ_EVENT is not set -CONFIG_PM_OPP=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_POWER_RESET=y -CONFIG_POWER_SUPPLY=y -CONFIG_PPS=y -CONFIG_PRINTK_TIME=y -CONFIG_PROC_EVENTS=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_PTP_1588_CLOCK_OPTIONAL=y -CONFIG_PWM=y -CONFIG_PWM_SUN4I=y -CONFIG_PWM_SYSFS=y -CONFIG_RATIONAL=y -CONFIG_REALTEK_PHY=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_IRQ=y -CONFIG_REGMAP_MMIO=y -CONFIG_REGMAP_SPI=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_AXP20X=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_SY8106A=y -CONFIG_RELAY=y -CONFIG_RESET_CONTROLLER=y -CONFIG_RESET_SIMPLE=y -CONFIG_RESET_SUNXI=y -CONFIG_RFS_ACCEL=y -CONFIG_RPS=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_SATA_HOST=y -CONFIG_SATA_PMP=y -CONFIG_SCSI=y -CONFIG_SCSI_COMMON=y -CONFIG_SDIO_UART=y -CONFIG_SECURITYFS=y -CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y -CONFIG_SERIAL_8250_DW=y -CONFIG_SERIAL_8250_DWLIB=y -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_RUNTIME_UARTS=8 -CONFIG_SERIAL_MCTRL_GPIO=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -CONFIG_SG_POOL=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_SND=y -CONFIG_SND_COMPRESS_OFFLOAD=y -CONFIG_SND_JACK=y -CONFIG_SND_JACK_INPUT_DEV=y -CONFIG_SND_PCM=y -CONFIG_SND_SIMPLE_CARD=y -CONFIG_SND_SIMPLE_CARD_UTILS=y -CONFIG_SND_SOC=y -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SUN4I_I2S is not set -# CONFIG_SND_SUN4I_SPDIF is not set -# CONFIG_SND_SUN50I_DMIC is not set -# CONFIG_SND_SUN8I_CODEC is not set -# CONFIG_SND_SUN8I_CODEC_ANALOG is not set -CONFIG_SOCK_RX_QUEUE_MAPPING=y -CONFIG_SOUND=y -CONFIG_SOUND_OSS_CORE=y -CONFIG_SPARSE_IRQ=y -CONFIG_SPI=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_MEM=y -CONFIG_SPI_SUN4I=y -CONFIG_SPI_SUN6I=y -CONFIG_SRCU=y -CONFIG_STMMAC_ETH=y -CONFIG_STMMAC_PLATFORM=y -CONFIG_SUN4I_A10_CCU=y -# CONFIG_SUN4I_EMAC is not set -CONFIG_SUN4I_TIMER=y -CONFIG_SUN5I_CCU=y -CONFIG_SUN5I_HSTIMER=y -CONFIG_SUN6I_A31_CCU=y -# CONFIG_SUN6I_RTC_CCU is not set -CONFIG_SUN8I_A23_CCU=y -CONFIG_SUN8I_A33_CCU=y -CONFIG_SUN8I_A83T_CCU=y -CONFIG_SUN8I_DE2_CCU=y -CONFIG_SUN8I_H3_CCU=y -CONFIG_SUN8I_R40_CCU=y -CONFIG_SUN8I_R_CCU=y -CONFIG_SUN8I_THERMAL=y -CONFIG_SUN8I_V3S_CCU=y -CONFIG_SUN9I_A80_CCU=y -CONFIG_SUNXI_CCU=y -CONFIG_SUNXI_MBUS=y -CONFIG_SUNXI_RSB=y -CONFIG_SUNXI_SRAM=y -CONFIG_SUNXI_WATCHDOG=y -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_SWIOTLB=y -CONFIG_SWPHY=y -CONFIG_SWP_EMULATE=y -CONFIG_SYSFS_SYSCALL=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y -CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 -CONFIG_THERMAL_GOV_STEP_WISE=y -CONFIG_THERMAL_HWMON=y -CONFIG_THERMAL_OF=y -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TIMER_OF=y -CONFIG_TIMER_PROBE=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TOUCHSCREEN_SUN4I=y -CONFIG_TREE_RCU=y -CONFIG_TREE_SRCU=y -# CONFIG_UCLAMP_TASK is not set -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -CONFIG_UNWINDER_ARM=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_COMMON=y -CONFIG_USB_DWC2=y -CONFIG_USB_DWC2_HOST=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -CONFIG_USB_GADGET=y -CONFIG_USB_NET_DRIVERS=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PLATFORM=y -CONFIG_USB_ROLE_SWITCH=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SUPPORT=y -CONFIG_USERIO=y -CONFIG_USE_OF=y -CONFIG_VFAT_FS=y -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_VHOST=y -CONFIG_VHOST_IOTLB=y -CONFIG_VHOST_NET=y -# CONFIG_VIDEO_SUN4I_CSI is not set -# CONFIG_VIDEO_SUN6I_CSI is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_WATCHDOG_CORE=y -CONFIG_XPS=y -CONFIG_XXHASH=y -CONFIG_XZ_DEC_ARM=y -CONFIG_XZ_DEC_BCJ=y -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_ZBOOT_ROM_TEXT=0 diff --git a/target/linux/sunxi/config-6.6 b/target/linux/sunxi/config-6.6 index 3e73f44c90..c250403aa8 100644 --- a/target/linux/sunxi/config-6.6 +++ b/target/linux/sunxi/config-6.6 @@ -40,6 +40,7 @@ CONFIG_ARM_PATCH_IDIV=y CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_PSCI=y CONFIG_ARM_PSCI_FW=y +# CONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ is not set CONFIG_ARM_THUMB=y CONFIG_ARM_UNWIND=y CONFIG_ARM_VIRT_EXT=y @@ -54,6 +55,7 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_PM=y CONFIG_BOUNCE=y +# CONFIG_BPF_LIRC_MODE2 is not set CONFIG_CACHE_L2X0=y CONFIG_CAN=y CONFIG_CLKSRC_MMIO=y @@ -88,6 +90,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_HAS_ASID=y @@ -123,6 +126,12 @@ CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" CONFIG_DEBUG_MEMORY_INIT=y ++CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y +# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set +# CONFIG_DEVFREQ_GOV_POWERSAVE is not set +# CONFIG_DEVFREQ_GOV_USERSPACE is not set +# CONFIG_DEVFREQ_GOV_PASSIVE is not set +# CONFIG_DEVFREQ_THERMAL is not set CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y CONFIG_DMA_OF=y @@ -234,6 +243,10 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_IOMMU_DEBUGFS is not set +# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set +# CONFIG_IOMMU_IO_PGTABLE_DART is not set +# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y @@ -364,6 +377,7 @@ CONFIG_PINCTRL_SUN9I_A80_R=y CONFIG_PINCTRL_SUNXI=y CONFIG_PM=y CONFIG_PM_CLK=y +# CONFIG_PM_DEVFREQ_EVENT is not set CONFIG_PM_OPP=y CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y @@ -486,6 +500,7 @@ CONFIG_TMPFS_POSIX_ACL=y CONFIG_TOUCHSCREEN_SUN4I=y CONFIG_TREE_RCU=y CONFIG_TREE_SRCU=y +# CONFIG_UCLAMP_TASK is not set CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNWINDER_ARM=y CONFIG_USB=y diff --git a/target/linux/sunxi/cortexa53/config-6.1 b/target/linux/sunxi/cortexa53/config-6.1 deleted file mode 100644 index 948faf82ef..0000000000 --- a/target/linux/sunxi/cortexa53/config-6.1 +++ /dev/null @@ -1,120 +0,0 @@ -CONFIG_64BIT=y -CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y -CONFIG_ARCH_MMAP_RND_BITS=18 -CONFIG_ARCH_MMAP_RND_BITS_MAX=24 -CONFIG_ARCH_MMAP_RND_BITS_MIN=18 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 -CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_ARCH_STACKWALK=y -CONFIG_ARCH_WANTS_NO_INSTR=y -CONFIG_ARM64=y -CONFIG_ARM64_4K_PAGES=y -CONFIG_ARM64_CRYPTO=y -CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y -CONFIG_ARM64_ERRATUM_2051678=y -CONFIG_ARM64_ERRATUM_2077057=y -CONFIG_ARM64_ERRATUM_2658417=y -CONFIG_ARM64_ERRATUM_2054223=y -CONFIG_ARM64_ERRATUM_2067961=y -CONFIG_ARM64_PAGE_SHIFT=12 -CONFIG_ARM64_PA_BITS=48 -CONFIG_ARM64_PA_BITS_48=y -CONFIG_ARM64_TAGGED_ADDR_ABI=y -CONFIG_ARM64_VA_BITS=39 -CONFIG_ARM64_VA_BITS_39=y -CONFIG_ARM_AMBA=y -CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y -CONFIG_ARM_GIC_V3=y -CONFIG_ARM_GIC_V3_ITS=y -CONFIG_ARM_SMCCC_SOC_ID=y -CONFIG_ARM_SMMU=y -CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y -# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set -CONFIG_ARM_SMMU_V3=y -# CONFIG_ARM_SMMU_V3_SVA is not set -CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y -CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CRYPTO_AES_ARM64=y -CONFIG_CRYPTO_AES_ARM64_CE=y -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -CONFIG_CRYPTO_AES_ARM64_CE_CCM=y -CONFIG_CRYPTO_BLAKE2S=y -CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y -CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_GHASH_ARM64_CE=y -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -CONFIG_CRYPTO_SHA1_ARM64_CE=y -CONFIG_CRYPTO_SIMD=y -CONFIG_DMA_DIRECT_REMAP=y -CONFIG_DWMAC_SUN8I=y -CONFIG_EEPROM_AT24=y -CONFIG_FRAME_POINTER=y -CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_FIND_FIRST_BIT=y -CONFIG_GENERIC_MSI_IRQ=y -CONFIG_GENERIC_MSI_IRQ_DOMAIN=y -CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set -CONFIG_IOMMU_DEFAULT_DMA_STRICT=y -# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set -CONFIG_MDIO_BUS_MUX=y -CONFIG_MICREL_PHY=y -# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_MOTORCOMM_PHY=y -CONFIG_MUSB_PIO_ONLY=y -CONFIG_NEED_SG_DMA_LENGTH=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_NO_IOPORT_MAP=y -CONFIG_PARTITION_PERCPU=y -CONFIG_PHY_SUN50I_USB3=y -CONFIG_PINCTRL_SUN50I_A100=y -CONFIG_PINCTRL_SUN50I_A100_R=y -CONFIG_PINCTRL_SUN50I_A64=y -CONFIG_PINCTRL_SUN50I_A64_R=y -CONFIG_PINCTRL_SUN50I_H5=y -CONFIG_PINCTRL_SUN50I_H6=y -CONFIG_PINCTRL_SUN50I_H6_R=y -CONFIG_PINCTRL_SUN50I_H616=y -CONFIG_PINCTRL_SUN50I_H616_R=y -# CONFIG_PREEMPT_DYNAMIC is not set -CONFIG_QUEUED_RWLOCKS=y -CONFIG_QUEUED_SPINLOCKS=y -CONFIG_RODATA_FULL_DEFAULT_ENABLED=y -# CONFIG_SCHED_CLUSTER is not set -# CONFIG_SHADOW_CALL_STACK is not set -# CONFIG_SND_SUN50I_CODEC_ANALOG is not set -CONFIG_SOUND_OSS_CORE_PRECLAIM=y -CONFIG_SPARSEMEM=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SUN50I_A100_CCU=y -CONFIG_SUN50I_A100_R_CCU=y -CONFIG_SUN50I_A64_CCU=y -CONFIG_SUN50I_DE2_BUS=y -CONFIG_SUN50I_ERRATUM_UNKNOWN1=y -CONFIG_SUN50I_H616_CCU=y -CONFIG_SUN50I_H6_CCU=y -CONFIG_SUN50I_H6_R_CCU=y -CONFIG_SUN50I_IOMMU=y -# CONFIG_SUN6I_RTC_CCU is not set -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_THREAD_INFO_IN_TASK=y -# CONFIG_UACCE is not set -CONFIG_UNMAP_KERNEL_AT_EL0=y -CONFIG_USB_MUSB_DUAL_ROLE=y -CONFIG_USB_MUSB_HDRC=y -CONFIG_USB_MUSB_SUNXI=y -CONFIG_USB_PHY=y -CONFIG_VMAP_STACK=y -CONFIG_ZONE_DMA32=y -CONFIG_SURFACE_PLATFORMS=y -# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set -# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set -# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set -# CONFIG_PAGE_TABLE_CHECK is not set -CONFIG_RANDOMIZE_KSTACK_OFFSET=y -# CONFIG_ARCH_NXP is not set diff --git a/target/linux/sunxi/cortexa53/config-6.6 b/target/linux/sunxi/cortexa53/config-6.6 index 55bcd4e8e5..948faf82ef 100644 --- a/target/linux/sunxi/cortexa53/config-6.6 +++ b/target/linux/sunxi/cortexa53/config-6.6 @@ -26,6 +26,12 @@ CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y +CONFIG_ARM_SMCCC_SOC_ID=y +CONFIG_ARM_SMMU=y +CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y +# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set +CONFIG_ARM_SMMU_V3=y +# CONFIG_ARM_SMMU_V3_SVA is not set CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y CONFIG_CPU_LITTLE_ENDIAN=y @@ -50,6 +56,9 @@ CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set +CONFIG_IOMMU_DEFAULT_DMA_STRICT=y +# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set CONFIG_MDIO_BUS_MUX=y CONFIG_MICREL_PHY=y # CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set @@ -90,9 +99,11 @@ CONFIG_SUN50I_ERRATUM_UNKNOWN1=y CONFIG_SUN50I_H616_CCU=y CONFIG_SUN50I_H6_CCU=y CONFIG_SUN50I_H6_R_CCU=y +CONFIG_SUN50I_IOMMU=y # CONFIG_SUN6I_RTC_CCU is not set CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_THREAD_INFO_IN_TASK=y +# CONFIG_UACCE is not set CONFIG_UNMAP_KERNEL_AT_EL0=y CONFIG_USB_MUSB_DUAL_ROLE=y CONFIG_USB_MUSB_HDRC=y diff --git a/target/linux/sunxi/cortexa7/config-6.1 b/target/linux/sunxi/cortexa7/config-6.1 deleted file mode 100644 index 67f6d9c291..0000000000 --- a/target/linux/sunxi/cortexa7/config-6.1 +++ /dev/null @@ -1,30 +0,0 @@ -# CONFIG_ARM_LPAE is not set -# CONFIG_ARM_SMMU is not set -CONFIG_B53=y -CONFIG_B53_MDIO_DRIVER=y -CONFIG_CRYPTO_BLAKE2S_ARM=y -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -CONFIG_DWMAC_SUN8I=y -CONFIG_GRO_CELLS=y -# CONFIG_HARDEN_BRANCH_HISTORY is not set -# CONFIG_HARDEN_BRANCH_PREDICTOR is not set -# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set -# CONFIG_MACH_SUN4I is not set -# CONFIG_MACH_SUN5I is not set -CONFIG_MDIO_BUS_MUX=y -CONFIG_MICREL_PHY=y -CONFIG_MUSB_PIO_ONLY=y -CONFIG_NET_DEVLINK=y -CONFIG_NET_DSA=y -CONFIG_NET_DSA_TAG_BRCM=y -CONFIG_NET_DSA_TAG_BRCM_COMMON=y -CONFIG_NET_DSA_TAG_BRCM_LEGACY=y -CONFIG_NET_DSA_TAG_BRCM_PREPEND=y -CONFIG_NET_SWITCHDEV=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_RTC_DRV_SUN6I=y -# CONFIG_SUN50I_IOMMU is not set -CONFIG_USB_MUSB_DUAL_ROLE=y -CONFIG_USB_MUSB_HDRC=y -CONFIG_USB_MUSB_SUNXI=y -CONFIG_USB_PHY=y diff --git a/target/linux/sunxi/cortexa7/config-6.6 b/target/linux/sunxi/cortexa7/config-6.6 index 105c090890..0580a9be58 100644 --- a/target/linux/sunxi/cortexa7/config-6.6 +++ b/target/linux/sunxi/cortexa7/config-6.6 @@ -1,3 +1,5 @@ +# CONFIG_ARM_LPAE is not set +# CONFIG_ARM_SMMU is not set CONFIG_B53=y CONFIG_B53_MDIO_DRIVER=y CONFIG_CRYPTO_BLAKE2S_ARM=y @@ -6,6 +8,7 @@ CONFIG_DWMAC_SUN8I=y CONFIG_GRO_CELLS=y # CONFIG_HARDEN_BRANCH_HISTORY is not set # CONFIG_HARDEN_BRANCH_PREDICTOR is not set +# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set # CONFIG_MACH_SUN4I is not set # CONFIG_MACH_SUN5I is not set CONFIG_MDIO_BUS_MUX=y @@ -20,6 +23,7 @@ CONFIG_NET_DSA_TAG_BRCM_PREPEND=y CONFIG_NET_SWITCHDEV=y CONFIG_NOP_USB_XCEIV=y CONFIG_RTC_DRV_SUN6I=y +# CONFIG_SUN50I_IOMMU is not set CONFIG_SUN20I_D1_CCU=y CONFIG_SUN20I_D1_R_CCU=y CONFIG_USB_MUSB_DUAL_ROLE=y diff --git a/target/linux/sunxi/cortexa8/config-6.1 b/target/linux/sunxi/cortexa8/config-6.1 deleted file mode 100644 index f77eeca76a..0000000000 --- a/target/linux/sunxi/cortexa8/config-6.1 +++ /dev/null @@ -1,15 +0,0 @@ -# CONFIG_ARM_LPAE is not set -# CONFIG_ARM_SMMU is not set -CONFIG_CRYPTO_BLAKE2S_ARM=y -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set -# CONFIG_MACH_SUN6I is not set -# CONFIG_MACH_SUN7I is not set -# CONFIG_MACH_SUN8I is not set -# CONFIG_MACH_SUN9I is not set -CONFIG_PGTABLE_LEVELS=2 -# CONFIG_PHY_SUN9I_USB is not set -# CONFIG_SPI_SUN6I is not set -# CONFIG_SUN8I_A83T_CCU is not set -# CONFIG_SUN8I_THERMAL is not set -# CONFIG_SUN50I_IOMMU is not set diff --git a/target/linux/sunxi/cortexa8/config-6.6 b/target/linux/sunxi/cortexa8/config-6.6 index b893b3142e..f77eeca76a 100644 --- a/target/linux/sunxi/cortexa8/config-6.6 +++ b/target/linux/sunxi/cortexa8/config-6.6 @@ -1,6 +1,8 @@ # CONFIG_ARM_LPAE is not set +# CONFIG_ARM_SMMU is not set CONFIG_CRYPTO_BLAKE2S_ARM=y CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set # CONFIG_MACH_SUN6I is not set # CONFIG_MACH_SUN7I is not set # CONFIG_MACH_SUN8I is not set @@ -10,3 +12,4 @@ CONFIG_PGTABLE_LEVELS=2 # CONFIG_SPI_SUN6I is not set # CONFIG_SUN8I_A83T_CCU is not set # CONFIG_SUN8I_THERMAL is not set +# CONFIG_SUN50I_IOMMU is not set diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index fc1359d173..ee36df598a 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -34,9 +34,7 @@ define Device/Default KERNEL := kernel-bin | uImage none IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip -ifdef CONFIG_LINUX_6_6 SUNXI_DTS_DIR :=allwinner/ -endif SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1))) endef diff --git a/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch b/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch deleted file mode 100644 index c24d479534..0000000000 --- a/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 28a1a6474c5053bae01bd29946b4d5ede539176b Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Mon, 31 Oct 2022 11:13:52 +0000 -Subject: [PATCH] dt-bindings: usb: Add H616 compatible string - -The Allwinner H616 contains four fully OHCI/EHCI compatible USB host -controllers, so just add their compatible strings to the list of -generic OHCI/EHCI controllers. - -Signed-off-by: Andre Przywara -Acked-by: Krzysztof Kozlowski -Link: https://lore.kernel.org/r/20221031111358.3387297-2-andre.przywara@arm.com -Signed-off-by: Jernej Skrabec ---- - Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 + - Documentation/devicetree/bindings/usb/generic-ohci.yaml | 1 + - 2 files changed, 2 insertions(+) - ---- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml -+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml -@@ -30,6 +30,7 @@ properties: - - allwinner,sun4i-a10-ehci - - allwinner,sun50i-a64-ehci - - allwinner,sun50i-h6-ehci -+ - allwinner,sun50i-h616-ehci - - allwinner,sun5i-a13-ehci - - allwinner,sun6i-a31-ehci - - allwinner,sun7i-a20-ehci ---- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml -+++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml -@@ -20,6 +20,7 @@ properties: - - allwinner,sun4i-a10-ohci - - allwinner,sun50i-a64-ohci - - allwinner,sun50i-h6-ohci -+ - allwinner,sun50i-h616-ohci - - allwinner,sun5i-a13-ohci - - allwinner,sun6i-a31-ohci - - allwinner,sun7i-a20-ohci diff --git a/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch b/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch deleted file mode 100644 index 5739172ceb..0000000000 --- a/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 6964affe65066651eca21e97247d3b7cac5153dc Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Mon, 31 Oct 2022 11:13:53 +0000 -Subject: [PATCH] dt-bindings: phy: Add special clock for Allwinner H616 PHY - -The USB PHY IP in the Allwinner H616 SoC requires a quirk that involves -some resources from port 2's PHY and HCI IP. In particular the PMU clock -for port 2 must be surely ungated before accessing the REG_HCI_PHY_CTL -register of port 2. To allow each USB port to be controlled -independently of port 2, we need a handle to that particular PMU clock -in the *PHY* node, as the HCI and PHY part might be handled by separate -drivers. - -Add that clock to the requirements of the H616 PHY binding, so that a -PHY driver can apply the quirk in isolation, without requiring help from -port 2's HCI driver. - -Signed-off-by: Andre Przywara -Reviewed-by: Rob Herring -Link: https://lore.kernel.org/r/20221031111358.3387297-3-andre.przywara@arm.com -Signed-off-by: Vinod Koul ---- - .../phy/allwinner,sun8i-h3-usb-phy.yaml | 26 +++++++++++++++++++ - 1 file changed, 26 insertions(+) - ---- a/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml -+++ b/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml -@@ -36,18 +36,22 @@ properties: - - const: pmu3 - - clocks: -+ minItems: 4 - items: - - description: USB OTG PHY bus clock - - description: USB Host 0 PHY bus clock - - description: USB Host 1 PHY bus clock - - description: USB Host 2 PHY bus clock -+ - description: PMU clock for host port 2 - - clock-names: -+ minItems: 4 - items: - - const: usb0_phy - - const: usb1_phy - - const: usb2_phy - - const: usb3_phy -+ - const: pmu2_clk - - resets: - items: -@@ -96,6 +100,28 @@ required: - - resets - - reset-names - -+allOf: -+ - if: -+ properties: -+ compatible: -+ contains: -+ enum: -+ - allwinner,sun50i-h616-usb-phy -+ then: -+ properties: -+ clocks: -+ minItems: 5 -+ -+ clock-names: -+ minItems: 5 -+ else: -+ properties: -+ clocks: -+ maxItems: 4 -+ -+ clock-names: -+ maxItems: 4 -+ - additionalProperties: false - - examples: diff --git a/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch deleted file mode 100644 index 6dc1cf2f36..0000000000 --- a/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch +++ /dev/null @@ -1,188 +0,0 @@ -From f40cf244c3feb4e1a442f8029b691add2c65b3ab Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Mon, 31 Oct 2022 11:13:56 +0000 -Subject: [PATCH] arm64: dts: allwinner: h616: Add USB nodes - -Add the nodes for the MUSB and the four USB host controllers to the SoC -.dtsi, along with the PHY node needed to bind all of them together. - -EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY requires -some quirks (handled in the driver). - -Signed-off-by: Andre Przywara -Reviewed-by: Jernej Skrabec -Link: https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara@arm.com -Signed-off-by: Jernej Skrabec ---- - .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 ++++++++++++++++++ - 1 file changed, 160 insertions(+) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -@@ -504,6 +504,166 @@ - }; - }; - -+ usbotg: usb@5100000 { -+ compatible = "allwinner,sun50i-h616-musb", -+ "allwinner,sun8i-h3-musb"; -+ reg = <0x05100000 0x0400>; -+ clocks = <&ccu CLK_BUS_OTG>; -+ resets = <&ccu RST_BUS_OTG>; -+ interrupts = ; -+ interrupt-names = "mc"; -+ phys = <&usbphy 0>; -+ phy-names = "usb"; -+ extcon = <&usbphy 0>; -+ status = "disabled"; -+ }; -+ -+ usbphy: phy@5100400 { -+ compatible = "allwinner,sun50i-h616-usb-phy"; -+ reg = <0x05100400 0x24>, -+ <0x05101800 0x14>, -+ <0x05200800 0x14>, -+ <0x05310800 0x14>, -+ <0x05311800 0x14>; -+ reg-names = "phy_ctrl", -+ "pmu0", -+ "pmu1", -+ "pmu2", -+ "pmu3"; -+ clocks = <&ccu CLK_USB_PHY0>, -+ <&ccu CLK_USB_PHY1>, -+ <&ccu CLK_USB_PHY2>, -+ <&ccu CLK_USB_PHY3>, -+ <&ccu CLK_BUS_EHCI2>; -+ clock-names = "usb0_phy", -+ "usb1_phy", -+ "usb2_phy", -+ "usb3_phy", -+ "pmu2_clk"; -+ resets = <&ccu RST_USB_PHY0>, -+ <&ccu RST_USB_PHY1>, -+ <&ccu RST_USB_PHY2>, -+ <&ccu RST_USB_PHY3>; -+ reset-names = "usb0_reset", -+ "usb1_reset", -+ "usb2_reset", -+ "usb3_reset"; -+ status = "disabled"; -+ #phy-cells = <1>; -+ }; -+ -+ ehci0: usb@5101000 { -+ compatible = "allwinner,sun50i-h616-ehci", -+ "generic-ehci"; -+ reg = <0x05101000 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI0>, -+ <&ccu CLK_BUS_EHCI0>, -+ <&ccu CLK_USB_OHCI0>; -+ resets = <&ccu RST_BUS_OHCI0>, -+ <&ccu RST_BUS_EHCI0>; -+ phys = <&usbphy 0>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ohci0: usb@5101400 { -+ compatible = "allwinner,sun50i-h616-ohci", -+ "generic-ohci"; -+ reg = <0x05101400 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI0>, -+ <&ccu CLK_USB_OHCI0>; -+ resets = <&ccu RST_BUS_OHCI0>; -+ phys = <&usbphy 0>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ehci1: usb@5200000 { -+ compatible = "allwinner,sun50i-h616-ehci", -+ "generic-ehci"; -+ reg = <0x05200000 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI1>, -+ <&ccu CLK_BUS_EHCI1>, -+ <&ccu CLK_USB_OHCI1>; -+ resets = <&ccu RST_BUS_OHCI1>, -+ <&ccu RST_BUS_EHCI1>; -+ phys = <&usbphy 1>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ohci1: usb@5200400 { -+ compatible = "allwinner,sun50i-h616-ohci", -+ "generic-ohci"; -+ reg = <0x05200400 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI1>, -+ <&ccu CLK_USB_OHCI1>; -+ resets = <&ccu RST_BUS_OHCI1>; -+ phys = <&usbphy 1>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ehci2: usb@5310000 { -+ compatible = "allwinner,sun50i-h616-ehci", -+ "generic-ehci"; -+ reg = <0x05310000 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI2>, -+ <&ccu CLK_BUS_EHCI2>, -+ <&ccu CLK_USB_OHCI2>; -+ resets = <&ccu RST_BUS_OHCI2>, -+ <&ccu RST_BUS_EHCI2>; -+ phys = <&usbphy 2>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ohci2: usb@5310400 { -+ compatible = "allwinner,sun50i-h616-ohci", -+ "generic-ohci"; -+ reg = <0x05310400 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI2>, -+ <&ccu CLK_USB_OHCI2>; -+ resets = <&ccu RST_BUS_OHCI2>; -+ phys = <&usbphy 2>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ehci3: usb@5311000 { -+ compatible = "allwinner,sun50i-h616-ehci", -+ "generic-ehci"; -+ reg = <0x05311000 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI3>, -+ <&ccu CLK_BUS_EHCI3>, -+ <&ccu CLK_USB_OHCI3>; -+ resets = <&ccu RST_BUS_OHCI3>, -+ <&ccu RST_BUS_EHCI3>; -+ phys = <&usbphy 3>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ -+ ohci3: usb@5311400 { -+ compatible = "allwinner,sun50i-h616-ohci", -+ "generic-ohci"; -+ reg = <0x05311400 0x100>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_OHCI3>, -+ <&ccu CLK_USB_OHCI3>; -+ resets = <&ccu RST_BUS_OHCI3>; -+ phys = <&usbphy 3>; -+ phy-names = "usb"; -+ status = "disabled"; -+ }; -+ - rtc: rtc@7000000 { - compatible = "allwinner,sun50i-h616-rtc"; - reg = <0x07000000 0x400>; diff --git a/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch deleted file mode 100644 index a544e482f3..0000000000 --- a/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch +++ /dev/null @@ -1,81 +0,0 @@ -From db5f028309ede13767e2ba356c1975ac37a4fd6c Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Mon, 31 Oct 2022 11:13:57 +0000 -Subject: [PATCH] arm64: dts: allwinner: h616: OrangePi Zero 2: Add USB nodes - -The OrangePi Zero 2 has one USB-A host port, VBUS is provided by -a GPIO controlled regulator. -The USB-C port is meant to power the board, but is also connected to -the USB 0 port, which we configure as an MUSB peripheral. - -Signed-off-by: Andre Przywara -Reviewed-by: Jernej Skrabec -Link: https://lore.kernel.org/r/20221031111358.3387297-7-andre.przywara@arm.com -Signed-off-by: Jernej Skrabec ---- - .../allwinner/sun50i-h616-orangepi-zero2.dts | 41 +++++++++++++++++++ - 1 file changed, 41 insertions(+) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts -@@ -49,8 +49,24 @@ - regulator-max-microvolt = <5000000>; - regulator-always-on; - }; -+ -+ reg_usb1_vbus: regulator-usb1-vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <®_vcc5v>; -+ enable-active-high; -+ gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */ -+ }; -+}; -+ -+&ehci1 { -+ status = "okay"; - }; - -+/* USB 2 & 3 are on headers only. */ -+ - &emac0 { - pinctrl-names = "default"; - pinctrl-0 = <&ext_rgmii_pins>; -@@ -76,6 +92,10 @@ - status = "okay"; - }; - -+&ohci1 { -+ status = "okay"; -+}; -+ - &r_rsb { - status = "okay"; - -@@ -211,3 +231,24 @@ - pinctrl-0 = <&uart0_ph_pins>; - status = "okay"; - }; -+ -+&usbotg { -+ /* -+ * PHY0 pins are connected to a USB-C socket, but a role switch -+ * is not implemented: both CC pins are pulled to GND. -+ * The VBUS pins power the device, so a fixed peripheral mode -+ * is the best choice. -+ * The board can be powered via GPIOs, in this case port0 *can* -+ * act as a host (with a cable/adapter ignoring CC), as VBUS is -+ * then provided by the GPIOs. Any user of this setup would -+ * need to adjust the DT accordingly: dr_mode set to "host", -+ * enabling OHCI0 and EHCI0. -+ */ -+ dr_mode = "peripheral"; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_usb1_vbus>; -+ status = "okay"; -+}; diff --git a/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch b/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch deleted file mode 100644 index 0747e6a8e0..0000000000 --- a/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch +++ /dev/null @@ -1,305 +0,0 @@ -From 322bf103204b8f786547acbeed85569254e7088f Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Fri, 4 Aug 2023 18:08:54 +0100 -Subject: [PATCH] arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT - -The Orange Pi Zero 2 got a successor (Zero 3), which shares quite some -DT nodes with the Zero 2, but comes with a different PMIC. - -Move the common parts (except the PMIC) into a new shared file, and -include that from the existing board .dts file. - -No functional change, the generated DTB is the same, except for some -phandle numbering differences. - -Signed-off-by: Andre Przywara -Acked-by: Jernej Skrabec -Link: https://lore.kernel.org/r/20230804170856.1237202-2-andre.przywara@arm.com -Signed-off-by: Jernej Skrabec ---- - .../allwinner/sun50i-h616-orangepi-zero.dtsi | 134 ++++++++++++++++++ - .../allwinner/sun50i-h616-orangepi-zero2.dts | 119 +--------------- - 2 files changed, 135 insertions(+), 118 deletions(-) - create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi - ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi -@@ -0,0 +1,134 @@ -+// SPDX-License-Identifier: (GPL-2.0+ or MIT) -+/* -+ * Copyright (C) 2020 Arm Ltd. -+ * -+ * DT nodes common between Orange Pi Zero 2 and Orange Pi Zero 3. -+ * Excludes PMIC nodes and properties, since they are different between the two. -+ */ -+ -+#include "sun50i-h616.dtsi" -+ -+#include -+#include -+#include -+ -+/ { -+ aliases { -+ ethernet0 = &emac0; -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ led-0 { -+ function = LED_FUNCTION_POWER; -+ color = ; -+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ -+ default-state = "on"; -+ }; -+ -+ led-1 { -+ function = LED_FUNCTION_STATUS; -+ color = ; -+ gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */ -+ }; -+ }; -+ -+ reg_vcc5v: vcc5v { -+ /* board wide 5V supply directly from the USB-C socket */ -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc-5v"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ }; -+ -+ reg_usb1_vbus: regulator-usb1-vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb1-vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <®_vcc5v>; -+ enable-active-high; -+ gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */ -+ }; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+/* USB 2 & 3 are on headers only. */ -+ -+&emac0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ext_rgmii_pins>; -+ phy-mode = "rgmii"; -+ phy-handle = <&ext_rgmii_phy>; -+ allwinner,rx-delay-ps = <3100>; -+ allwinner,tx-delay-ps = <700>; -+ status = "okay"; -+}; -+ -+&mdio0 { -+ ext_rgmii_phy: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ }; -+}; -+ -+&mmc0 { -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&spi0 { -+ status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>; -+ -+ flash@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "jedec,spi-nor"; -+ reg = <0>; -+ spi-max-frequency = <40000000>; -+ }; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_ph_pins>; -+ status = "okay"; -+}; -+ -+&usbotg { -+ /* -+ * PHY0 pins are connected to a USB-C socket, but a role switch -+ * is not implemented: both CC pins are pulled to GND. -+ * The VBUS pins power the device, so a fixed peripheral mode -+ * is the best choice. -+ * The board can be powered via GPIOs, in this case port0 *can* -+ * act as a host (with a cable/adapter ignoring CC), as VBUS is -+ * then provided by the GPIOs. Any user of this setup would -+ * need to adjust the DT accordingly: dr_mode set to "host", -+ * enabling OHCI0 and EHCI0. -+ */ -+ dr_mode = "peripheral"; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb1_vbus-supply = <®_usb1_vbus>; -+ status = "okay"; -+}; ---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts -@@ -5,95 +5,19 @@ - - /dts-v1/; - --#include "sun50i-h616.dtsi" -- --#include --#include --#include -+#include "sun50i-h616-orangepi-zero.dtsi" - - / { - model = "OrangePi Zero2"; - compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616"; -- -- aliases { -- ethernet0 = &emac0; -- serial0 = &uart0; -- }; -- -- chosen { -- stdout-path = "serial0:115200n8"; -- }; -- -- leds { -- compatible = "gpio-leds"; -- -- led-0 { -- function = LED_FUNCTION_POWER; -- color = ; -- gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ -- default-state = "on"; -- }; -- -- led-1 { -- function = LED_FUNCTION_STATUS; -- color = ; -- gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */ -- }; -- }; -- -- reg_vcc5v: vcc5v { -- /* board wide 5V supply directly from the USB-C socket */ -- compatible = "regulator-fixed"; -- regulator-name = "vcc-5v"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- regulator-always-on; -- }; -- -- reg_usb1_vbus: regulator-usb1-vbus { -- compatible = "regulator-fixed"; -- regulator-name = "usb1-vbus"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- vin-supply = <®_vcc5v>; -- enable-active-high; -- gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */ -- }; --}; -- --&ehci1 { -- status = "okay"; - }; - --/* USB 2 & 3 are on headers only. */ -- - &emac0 { -- pinctrl-names = "default"; -- pinctrl-0 = <&ext_rgmii_pins>; -- phy-mode = "rgmii"; -- phy-handle = <&ext_rgmii_phy>; - phy-supply = <®_dcdce>; -- allwinner,rx-delay-ps = <3100>; -- allwinner,tx-delay-ps = <700>; -- status = "okay"; --}; -- --&mdio0 { -- ext_rgmii_phy: ethernet-phy@1 { -- compatible = "ethernet-phy-ieee802.3-c22"; -- reg = <1>; -- }; - }; - - &mmc0 { - vmmc-supply = <®_dcdce>; -- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ -- bus-width = <4>; -- status = "okay"; --}; -- --&ohci1 { -- status = "okay"; - }; - - &r_rsb { -@@ -211,44 +135,3 @@ - vcc-ph-supply = <®_aldo1>; - vcc-pi-supply = <®_aldo1>; - }; -- --&spi0 { -- status = "okay"; -- pinctrl-names = "default"; -- pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>; -- -- flash@0 { -- #address-cells = <1>; -- #size-cells = <1>; -- compatible = "jedec,spi-nor"; -- reg = <0>; -- spi-max-frequency = <40000000>; -- }; --}; -- --&uart0 { -- pinctrl-names = "default"; -- pinctrl-0 = <&uart0_ph_pins>; -- status = "okay"; --}; -- --&usbotg { -- /* -- * PHY0 pins are connected to a USB-C socket, but a role switch -- * is not implemented: both CC pins are pulled to GND. -- * The VBUS pins power the device, so a fixed peripheral mode -- * is the best choice. -- * The board can be powered via GPIOs, in this case port0 *can* -- * act as a host (with a cable/adapter ignoring CC), as VBUS is -- * then provided by the GPIOs. Any user of this setup would -- * need to adjust the DT accordingly: dr_mode set to "host", -- * enabling OHCI0 and EHCI0. -- */ -- dr_mode = "peripheral"; -- status = "okay"; --}; -- --&usbphy { -- usb1_vbus-supply = <®_usb1_vbus>; -- status = "okay"; --}; diff --git a/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch b/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch deleted file mode 100644 index 4081a82d52..0000000000 --- a/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch +++ /dev/null @@ -1,140 +0,0 @@ -From f1b3ddb3ecc2eec1f912383e01156c226daacfab Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Fri, 4 Aug 2023 18:08:56 +0100 -Subject: [PATCH] arm64: dts: allwinner: h616: Add OrangePi Zero 3 board - support - -The OrangePi Zero 3 is a development board based on the Allwinner H618 SoC, -which seems to be just an H616 with more L2 cache. The board itself is a -slightly updated version of the Orange Pi Zero 2. It features: -- Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU -- 1/1.5/2/4 GiB LPDDR4 DRAM SKUs (only up to 1GB on the Zero2) -- AXP313a PMIC (more capable AXP305 on the Zero2) -- Raspberry-Pi-1 compatible GPIO header -- extra 13 pin expansion header, exposing pins for 2x USB 2.0 ports -- 1 USB 2.0 host port -- 1 USB 2.0 type C port (power supply + OTG) -- MicroSD slot -- on-board 16MiB bootable SPI NOR flash (only 2MB on the Zero2) -- 1Gbps Ethernet port (via Motorcomm YT8531 PHY) (RTL8211 on the Zero2) -- micro-HDMI port -- (yet) unsupported Allwinner WiFi/BT chip - -Add the devicetree file describing the currently supported features, -namely LEDs, SD card, PMIC, SPI flash, USB. Ethernet seems unstable at -the moment, though the basic functionality works. - -Signed-off-by: Andre Przywara -Reviewed-by: Jernej Skrabec -Link: https://lore.kernel.org/r/20230804170856.1237202-4-andre.przywara@arm.com -Signed-off-by: Jernej Skrabec ---- - arch/arm64/boot/dts/allwinner/Makefile | 1 + - .../allwinner/sun50i-h618-orangepi-zero3.dts | 94 +++++++++++++++++++ - 2 files changed, 95 insertions(+) - create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts - ---- a/arch/arm64/boot/dts/allwinner/Makefile -+++ b/arch/arm64/boot/dts/allwinner/Makefile -@@ -40,3 +40,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-ta - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts -@@ -0,0 +1,94 @@ -+// SPDX-License-Identifier: (GPL-2.0+ or MIT) -+/* -+ * Copyright (C) 2023 Arm Ltd. -+ */ -+ -+/dts-v1/; -+ -+#include "sun50i-h616-orangepi-zero.dtsi" -+ -+/ { -+ model = "OrangePi Zero3"; -+ compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618"; -+}; -+ -+&emac0 { -+ phy-supply = <®_dldo1>; -+}; -+ -+&ext_rgmii_phy { -+ motorcomm,clk-out-frequency-hz = <125000000>; -+}; -+ -+&mmc0 { -+ /* -+ * The schematic shows the card detect pin wired up to PF6, via an -+ * inverter, but it just doesn't work. -+ */ -+ broken-cd; -+ vmmc-supply = <®_dldo1>; -+}; -+ -+&r_i2c { -+ status = "okay"; -+ -+ axp313: pmic@36 { -+ compatible = "x-powers,axp313a"; -+ reg = <0x36>; -+ #interrupt-cells = <1>; -+ interrupt-controller; -+ interrupt-parent = <&pio>; -+ interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */ -+ -+ vin1-supply = <®_vcc5v>; -+ vin2-supply = <®_vcc5v>; -+ vin3-supply = <®_vcc5v>; -+ -+ regulators { -+ /* Supplies VCC-PLL, so needs to be always on. */ -+ reg_aldo1: aldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "vcc1v8"; -+ }; -+ -+ /* Supplies VCC-IO, so needs to be always on. */ -+ reg_dldo1: dldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc3v3"; -+ }; -+ -+ reg_dcdc1: dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <810000>; -+ regulator-max-microvolt = <990000>; -+ regulator-name = "vdd-gpu-sys"; -+ }; -+ -+ reg_dcdc2: dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <810000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-cpu"; -+ }; -+ -+ reg_dcdc3: dcdc3 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-dram"; -+ }; -+ }; -+ }; -+}; -+ -+&pio { -+ vcc-pc-supply = <®_dldo1>; -+ vcc-pf-supply = <®_dldo1>; -+ vcc-pg-supply = <®_aldo1>; -+ vcc-ph-supply = <®_dldo1>; -+ vcc-pi-supply = <®_dldo1>; -+}; diff --git a/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch b/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch deleted file mode 100644 index a492eed551..0000000000 --- a/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b9622937d95809ef89904583191571a9fa326402 Mon Sep 17 00:00:00 2001 -From: Chukun Pan -Date: Sun, 29 Oct 2023 15:40:09 +0800 -Subject: [PATCH] arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3 - -The current emac setting is not suitable for Orange Pi Zero 3, -move it back to Orange Pi Zero 2 DT. Also update phy mode and -delay values for emac on Orange Pi Zero 3. -With these changes, Ethernet now looks stable. - -Fixes: 322bf103204b ("arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT") -Signed-off-by: Chukun Pan -Reviewed-by: Jernej Skrabec -Link: https://lore.kernel.org/r/20231029074009.7820-2-amadeus@jmu.edu.cn -Signed-off-by: Jernej Skrabec ---- - arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 3 --- - arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 3 +++ - arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 2 ++ - 3 files changed, 5 insertions(+), 3 deletions(-) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi -@@ -68,10 +68,7 @@ - &emac0 { - pinctrl-names = "default"; - pinctrl-0 = <&ext_rgmii_pins>; -- phy-mode = "rgmii"; - phy-handle = <&ext_rgmii_phy>; -- allwinner,rx-delay-ps = <3100>; -- allwinner,tx-delay-ps = <700>; - status = "okay"; - }; - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts -@@ -13,6 +13,9 @@ - }; - - &emac0 { -+ allwinner,rx-delay-ps = <3100>; -+ allwinner,tx-delay-ps = <700>; -+ phy-mode = "rgmii"; - phy-supply = <®_dcdce>; - }; - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts -@@ -13,6 +13,8 @@ - }; - - &emac0 { -+ allwinner,tx-delay-ps = <700>; -+ phy-mode = "rgmii-rxid"; - phy-supply = <®_dldo1>; - }; - diff --git a/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch b/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch deleted file mode 100644 index ce8add18ab..0000000000 --- a/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 951992797378a2177946400438f4d23c9fceae5b Mon Sep 17 00:00:00 2001 -From: Martin Botka -Date: Tue, 12 Sep 2023 14:25:13 +0200 -Subject: [PATCH] arm64: dts: allwinner: h616: Add SID controller node - -Add node for the H616 SID controller - -Signed-off-by: Martin Botka -Acked-by: Jernej Skrabec -Link: https://lore.kernel.org/r/20230912-sid-h616-v3-2-ee18e1c5bbb5@somainline.org -Signed-off-by: Jernej Skrabec ---- - arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 7 +++++++ - 1 file changed, 7 insertions(+) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -@@ -133,6 +133,13 @@ - #reset-cells = <1>; - }; - -+ sid: efuse@3006000 { -+ compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid"; -+ reg = <0x03006000 0x1000>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ }; -+ - watchdog: watchdog@30090a0 { - compatible = "allwinner,sun50i-h616-wdt", - "allwinner,sun6i-a31-wdt"; diff --git a/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch b/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch deleted file mode 100644 index 3453e2aa53..0000000000 --- a/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 898d96c5464b69af44f6407c5de81ebc349d574b Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Mon, 19 Feb 2024 15:36:33 +0000 -Subject: [PATCH] soc: sunxi: sram: export register 0 for THS on H616 - -The Allwinner H616 SoC contains a mysterious bit at register offset 0x0 -in the SRAM control block. If bit 16 is set (the reset value), the -temperature readings of the THS are way off, leading to reports about -200C, at normal ambient temperatures. Clearing this bits brings the -reported values down to the expected values. -The BSP code clears this bit in firmware (U-Boot), and has an explicit -comment about this, but offers no real explanation. - -Experiments in U-Boot show that register 0x0 has no effect on the SRAM C -visibility: all tested bit settings still allow full read and write -access by the CPU to the whole of SRAM C. Only bit 24 of the register at -offset 0x4 makes all of SRAM C inaccessible by the CPU. So modelling -the THS switch functionality as an SRAM region would not reflect reality. - -Since we should not rely on firmware settings, allow other code (the THS -driver) to access this register, by exporting it through the already -existing regmap. This mimics what we already do for the LDO control and -the EMAC register. - -To avoid concurrent accesses to the same register at the same time, by -the SRAM switch code and the regmap code, use the same lock to protect -the access. The regmap subsystem allows to use an existing lock, so we -just need to hook in there. - -Signed-off-by: Andre Przywara -Reviewed-by: Jernej Skrabec -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara@arm.com ---- - drivers/soc/sunxi/sunxi_sram.c | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - ---- a/drivers/soc/sunxi/sunxi_sram.c -+++ b/drivers/soc/sunxi/sunxi_sram.c -@@ -284,6 +284,7 @@ EXPORT_SYMBOL(sunxi_sram_release); - struct sunxi_sramc_variant { - int num_emac_clocks; - bool has_ldo_ctrl; -+ bool has_ths_offset; - }; - - static const struct sunxi_sramc_variant sun4i_a10_sramc_variant = { -@@ -305,8 +306,10 @@ static const struct sunxi_sramc_variant - - static const struct sunxi_sramc_variant sun50i_h616_sramc_variant = { - .num_emac_clocks = 2, -+ .has_ths_offset = true, - }; - -+#define SUNXI_SRAM_THS_OFFSET_REG 0x0 - #define SUNXI_SRAM_EMAC_CLOCK_REG 0x30 - #define SUNXI_SYS_LDO_CTRL_REG 0x150 - -@@ -315,6 +318,8 @@ static bool sunxi_sram_regmap_accessible - { - const struct sunxi_sramc_variant *variant = dev_get_drvdata(dev); - -+ if (reg == SUNXI_SRAM_THS_OFFSET_REG && variant->has_ths_offset) -+ return true; - if (reg >= SUNXI_SRAM_EMAC_CLOCK_REG && - reg < SUNXI_SRAM_EMAC_CLOCK_REG + variant->num_emac_clocks * 4) - return true; -@@ -324,6 +329,20 @@ static bool sunxi_sram_regmap_accessible - return false; - } - -+static void sunxi_sram_lock(void *_lock) -+{ -+ spinlock_t *lock = _lock; -+ -+ spin_lock(lock); -+} -+ -+static void sunxi_sram_unlock(void *_lock) -+{ -+ spinlock_t *lock = _lock; -+ -+ spin_unlock(lock); -+} -+ - static struct regmap_config sunxi_sram_regmap_config = { - .reg_bits = 32, - .val_bits = 32, -@@ -333,6 +352,9 @@ static struct regmap_config sunxi_sram_r - /* other devices have no business accessing other registers */ - .readable_reg = sunxi_sram_regmap_accessible_reg, - .writeable_reg = sunxi_sram_regmap_accessible_reg, -+ .lock = sunxi_sram_lock, -+ .unlock = sunxi_sram_unlock, -+ .lock_arg = &sram_lock, - }; - - static int __init sunxi_sram_probe(struct platform_device *pdev) diff --git a/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch b/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch deleted file mode 100644 index 8b19989118..0000000000 --- a/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch +++ /dev/null @@ -1,47 +0,0 @@ -From ebbf19e36d021f253425344b4d4b987f3b7d9be5 Mon Sep 17 00:00:00 2001 -From: Maxim Kiselev -Date: Mon, 18 Dec 2023 00:06:23 +0300 -Subject: [PATCH] thermal/drivers/sun8i: Add D1/T113s THS controller support - -This patch adds a thermal sensor controller support for the D1/T113s, -which is similar to the one on H6, but with only one sensor and -different scale and offset values. - -Signed-off-by: Maxim Kiselev -Acked-by: Jernej Skrabec -Reviewed-by: Andre Przywara -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20231217210629.131486-3-bigunclemax@gmail.com ---- - drivers/thermal/sun8i_thermal.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - ---- a/drivers/thermal/sun8i_thermal.c -+++ b/drivers/thermal/sun8i_thermal.c -@@ -610,6 +610,18 @@ static const struct ths_thermal_chip sun - .calc_temp = sun8i_ths_calc_temp, - }; - -+static const struct ths_thermal_chip sun20i_d1_ths = { -+ .sensor_num = 1, -+ .has_bus_clk_reset = true, -+ .offset = 188552, -+ .scale = 673, -+ .temp_data_base = SUN50I_H6_THS_TEMP_DATA, -+ .calibrate = sun50i_h6_ths_calibrate, -+ .init = sun50i_h6_thermal_init, -+ .irq_ack = sun50i_h6_irq_ack, -+ .calc_temp = sun8i_ths_calc_temp, -+}; -+ - static const struct of_device_id of_ths_match[] = { - { .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths }, - { .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths }, -@@ -618,6 +630,7 @@ static const struct of_device_id of_ths_ - { .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths }, - { .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths }, - { .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths }, -+ { .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths }, - { /* sentinel */ }, - }; - MODULE_DEVICE_TABLE(of, of_ths_match); diff --git a/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch b/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch deleted file mode 100644 index b8138a3870..0000000000 --- a/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 14f118aa50fe7c7c7330f56d007ecacca487cea8 Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Mon, 19 Feb 2024 15:36:35 +0000 -Subject: [PATCH] thermal/drivers/sun8i: Explain unknown H6 register value - -So far we were ORing in some "unknown" value into the THS control -register on the Allwinner H6. This part of the register is not explained -in the H6 manual, but the H616 manual details those bits, and on closer -inspection the THS IP blocks in both SoCs seem very close: -- The BSP code for both SoCs writes the same values into THS_CTRL. -- The reset values of at least the first three registers are the same. - -Replace the "unknown" value with its proper meaning: "acquire time", -most probably the sample part of the sample & hold circuit of the ADC, -according to its explanation in the H616 manual. - -No functional change, just a macro rename and adjustment. - -Signed-off-by: Andre Przywara -Reviewed-by: Jernej Skrabec -Acked-by: Vasily Khoruzhick -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20240219153639.179814-4-andre.przywara@arm.com ---- - drivers/thermal/sun8i_thermal.c | 29 ++++++++++++++++------------- - 1 file changed, 16 insertions(+), 13 deletions(-) - ---- a/drivers/thermal/sun8i_thermal.c -+++ b/drivers/thermal/sun8i_thermal.c -@@ -50,7 +50,8 @@ - #define SUN8I_THS_CTRL2_T_ACQ1(x) ((GENMASK(15, 0) & (x)) << 16) - #define SUN8I_THS_DATA_IRQ_STS(x) BIT(x + 8) - --#define SUN50I_THS_CTRL0_T_ACQ(x) ((GENMASK(15, 0) & (x)) << 16) -+#define SUN50I_THS_CTRL0_T_ACQ(x) (GENMASK(15, 0) & ((x) - 1)) -+#define SUN50I_THS_CTRL0_T_SAMPLE_PER(x) ((GENMASK(15, 0) & ((x) - 1)) << 16) - #define SUN50I_THS_FILTER_EN BIT(2) - #define SUN50I_THS_FILTER_TYPE(x) (GENMASK(1, 0) & (x)) - #define SUN50I_H6_THS_PC_TEMP_PERIOD(x) ((GENMASK(19, 0) & (x)) << 12) -@@ -410,25 +411,27 @@ static int sun8i_h3_thermal_init(struct - return 0; - } - --/* -- * Without this undocumented value, the returned temperatures would -- * be higher than real ones by about 20C. -- */ --#define SUN50I_H6_CTRL0_UNK 0x0000002f -- - static int sun50i_h6_thermal_init(struct ths_device *tmdev) - { - int val; - - /* -- * T_acq = 20us -- * clkin = 24MHz -- * -- * x = T_acq * clkin - 1 -- * = 479 -+ * The manual recommends an overall sample frequency of 50 KHz (20us, -+ * 480 cycles at 24 MHz), which provides plenty of time for both the -+ * acquisition time (>24 cycles) and the actual conversion time -+ * (>14 cycles). -+ * The lower half of the CTRL register holds the "acquire time", in -+ * clock cycles, which the manual recommends to be 2us: -+ * 24MHz * 2us = 48 cycles. -+ * The high half of THS_CTRL encodes the sample frequency, in clock -+ * cycles: 24MHz * 20us = 480 cycles. -+ * This is explained in the H616 manual, but apparently wrongly -+ * described in the H6 manual, although the BSP code does the same -+ * for both SoCs. - */ - regmap_write(tmdev->regmap, SUN50I_THS_CTRL0, -- SUN50I_H6_CTRL0_UNK | SUN50I_THS_CTRL0_T_ACQ(479)); -+ SUN50I_THS_CTRL0_T_ACQ(48) | -+ SUN50I_THS_CTRL0_T_SAMPLE_PER(480)); - /* average over 4 samples */ - regmap_write(tmdev->regmap, SUN50I_H6_THS_MFC, - SUN50I_THS_FILTER_EN | diff --git a/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch b/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch deleted file mode 100644 index 3d01a507fa..0000000000 --- a/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 6c04a419a4c5fb18edefc44dd676fb95c7f6c55d Mon Sep 17 00:00:00 2001 -From: Maksim Kiselev -Date: Mon, 19 Feb 2024 15:36:36 +0000 -Subject: [PATCH] thermal/drivers/sun8i: Extend H6 calibration to support 4 - sensors - -The H616 SoC resembles the H6 thermal sensor controller, with a few -changes like four sensors. - -Extend sun50i_h6_ths_calibrate() function to support calibration of -these sensors. - -Co-developed-by: Martin Botka -Signed-off-by: Martin Botka -Signed-off-by: Maksim Kiselev -Reviewed-by: Andre Przywara -Signed-off-by: Andre Przywara -Reviewed-by: Jernej Skrabec -Acked-by: Vasily Khoruzhick -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20240219153639.179814-5-andre.przywara@arm.com ---- - drivers/thermal/sun8i_thermal.c | 28 ++++++++++++++++++++-------- - 1 file changed, 20 insertions(+), 8 deletions(-) - ---- a/drivers/thermal/sun8i_thermal.c -+++ b/drivers/thermal/sun8i_thermal.c -@@ -224,16 +224,21 @@ static int sun50i_h6_ths_calibrate(struc - struct device *dev = tmdev->dev; - int i, ft_temp; - -- if (!caldata[0] || callen < 2 + 2 * tmdev->chip->sensor_num) -+ if (!caldata[0]) - return -EINVAL; - - /* - * efuse layout: - * -- * 0 11 16 32 -- * +-------+-------+-------+ -- * |temp| |sensor0|sensor1| -- * +-------+-------+-------+ -+ * 0 11 16 27 32 43 48 57 -+ * +----------+-----------+-----------+-----------+ -+ * | temp | |sensor0| |sensor1| |sensor2| | -+ * +----------+-----------+-----------+-----------+ -+ * ^ ^ ^ -+ * | | | -+ * | | sensor3[11:8] -+ * | sensor3[7:4] -+ * sensor3[3:0] - * - * The calibration data on the H6 is the ambient temperature and - * sensor values that are filled during the factory test stage. -@@ -246,9 +251,16 @@ static int sun50i_h6_ths_calibrate(struc - ft_temp = (caldata[0] & FT_TEMP_MASK) * 100; - - for (i = 0; i < tmdev->chip->sensor_num; i++) { -- int sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK; -- int cdata, offset; -- int sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg); -+ int sensor_reg, sensor_temp, cdata, offset; -+ -+ if (i == 3) -+ sensor_reg = (caldata[1] >> 12) -+ | ((caldata[2] >> 12) << 4) -+ | ((caldata[3] >> 12) << 8); -+ else -+ sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK; -+ -+ sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg); - - /* - * Calibration data is CALIBRATE_DEFAULT - (calculated diff --git a/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch b/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch deleted file mode 100644 index 6db1e32cfb..0000000000 --- a/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch +++ /dev/null @@ -1,126 +0,0 @@ -From f8b54d1120b81ed57bed96cc8e814ba08886d1e5 Mon Sep 17 00:00:00 2001 -From: Andre Przywara -Date: Mon, 19 Feb 2024 15:36:37 +0000 -Subject: [PATCH] thermal/drivers/sun8i: Add SRAM register access code - -The Allwinner H616 SoC needs to clear a bit in one register in the SRAM -controller, to report reasonable temperature values. On reset, bit 16 in -register 0x3000000 is set, which leads to the driver reporting -temperatures around 200C. Clearing this bit brings the values down to the -expected range. The BSP code does a one-time write in U-Boot, with a -comment just mentioning the effect on the THS, but offering no further -explanation. - -To not rely on firmware to set things up for us, add code that queries -the SRAM controller device via a DT phandle link, then clear just this -single bit. - -Signed-off-by: Andre Przywara -Acked-by: Vasily Khoruzhick -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20240219153639.179814-6-andre.przywara@arm.com ---- - drivers/thermal/sun8i_thermal.c | 51 +++++++++++++++++++++++++++++++++ - 1 file changed, 51 insertions(+) - ---- a/drivers/thermal/sun8i_thermal.c -+++ b/drivers/thermal/sun8i_thermal.c -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -68,6 +69,7 @@ struct tsensor { - struct ths_thermal_chip { - bool has_mod_clk; - bool has_bus_clk_reset; -+ bool needs_sram; - int sensor_num; - int offset; - int scale; -@@ -85,12 +87,16 @@ struct ths_device { - const struct ths_thermal_chip *chip; - struct device *dev; - struct regmap *regmap; -+ struct regmap_field *sram_regmap_field; - struct reset_control *reset; - struct clk *bus_clk; - struct clk *mod_clk; - struct tsensor sensor[MAX_SENSOR_NUM]; - }; - -+/* The H616 needs to have a bit 16 in the SRAM control register cleared. */ -+static const struct reg_field sun8i_ths_sram_reg_field = REG_FIELD(0x0, 16, 16); -+ - /* Temp Unit: millidegree Celsius */ - static int sun8i_ths_calc_temp(struct ths_device *tmdev, - int id, int reg) -@@ -337,6 +343,34 @@ static void sun8i_ths_reset_control_asse - reset_control_assert(data); - } - -+static struct regmap *sun8i_ths_get_sram_regmap(struct device_node *node) -+{ -+ struct device_node *sram_node; -+ struct platform_device *sram_pdev; -+ struct regmap *regmap = NULL; -+ -+ sram_node = of_parse_phandle(node, "allwinner,sram", 0); -+ if (!sram_node) -+ return ERR_PTR(-ENODEV); -+ -+ sram_pdev = of_find_device_by_node(sram_node); -+ if (!sram_pdev) { -+ /* platform device might not be probed yet */ -+ regmap = ERR_PTR(-EPROBE_DEFER); -+ goto out_put_node; -+ } -+ -+ /* If no regmap is found then the other device driver is at fault */ -+ regmap = dev_get_regmap(&sram_pdev->dev, NULL); -+ if (!regmap) -+ regmap = ERR_PTR(-EINVAL); -+ -+ platform_device_put(sram_pdev); -+out_put_node: -+ of_node_put(sram_node); -+ return regmap; -+} -+ - static int sun8i_ths_resource_init(struct ths_device *tmdev) - { - struct device *dev = tmdev->dev; -@@ -381,6 +415,19 @@ static int sun8i_ths_resource_init(struc - if (ret) - return ret; - -+ if (tmdev->chip->needs_sram) { -+ struct regmap *regmap; -+ -+ regmap = sun8i_ths_get_sram_regmap(dev->of_node); -+ if (IS_ERR(regmap)) -+ return PTR_ERR(regmap); -+ tmdev->sram_regmap_field = devm_regmap_field_alloc(dev, -+ regmap, -+ sun8i_ths_sram_reg_field); -+ if (IS_ERR(tmdev->sram_regmap_field)) -+ return PTR_ERR(tmdev->sram_regmap_field); -+ } -+ - ret = sun8i_ths_calibrate(tmdev); - if (ret) - return ret; -@@ -427,6 +474,10 @@ static int sun50i_h6_thermal_init(struct - { - int val; - -+ /* The H616 needs to have a bit in the SRAM control register cleared. */ -+ if (tmdev->sram_regmap_field) -+ regmap_field_write(tmdev->sram_regmap_field, 0); -+ - /* - * The manual recommends an overall sample frequency of 50 KHz (20us, - * 480 cycles at 24 MHz), which provides plenty of time for both the diff --git a/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch b/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch deleted file mode 100644 index e743d344c6..0000000000 --- a/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch +++ /dev/null @@ -1,50 +0,0 @@ -From e7dbfa19572a1440a2e67ef70f94ff204849a0a8 Mon Sep 17 00:00:00 2001 -From: Martin Botka -Date: Mon, 19 Feb 2024 15:36:38 +0000 -Subject: [PATCH] thermal/drivers/sun8i: Add support for H616 THS controller - -Add support for the thermal sensor found in H616 SoCs, is the same as -the H6 thermal sensor controller, but with four sensors. -Also the registers readings are wrong, unless a bit in the first SYS_CFG -register cleared, so set exercise the SRAM regmap to take care of that. - -Signed-off-by: Martin Botka -Signed-off-by: Andre Przywara -Acked-by: Vasily Khoruzhick -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20240219153639.179814-7-andre.przywara@arm.com ---- - drivers/thermal/sun8i_thermal.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - ---- a/drivers/thermal/sun8i_thermal.c -+++ b/drivers/thermal/sun8i_thermal.c -@@ -688,6 +688,20 @@ static const struct ths_thermal_chip sun - .calc_temp = sun8i_ths_calc_temp, - }; - -+static const struct ths_thermal_chip sun50i_h616_ths = { -+ .sensor_num = 4, -+ .has_bus_clk_reset = true, -+ .needs_sram = true, -+ .ft_deviation = 8000, -+ .offset = 263655, -+ .scale = 810, -+ .temp_data_base = SUN50I_H6_THS_TEMP_DATA, -+ .calibrate = sun50i_h6_ths_calibrate, -+ .init = sun50i_h6_thermal_init, -+ .irq_ack = sun50i_h6_irq_ack, -+ .calc_temp = sun8i_ths_calc_temp, -+}; -+ - static const struct of_device_id of_ths_match[] = { - { .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths }, - { .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths }, -@@ -697,6 +711,7 @@ static const struct of_device_id of_ths_ - { .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths }, - { .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths }, - { .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths }, -+ { .compatible = "allwinner,sun50i-h616-ths", .data = &sun50i_h616_ths }, - { /* sentinel */ }, - }; - MODULE_DEVICE_TABLE(of, of_ths_match); diff --git a/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch b/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch deleted file mode 100644 index 384bf55084..0000000000 --- a/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9ac53d5532cc4bb595bbee86ccba2172ccc336c3 Mon Sep 17 00:00:00 2001 -From: Mark Brown -Date: Tue, 23 Jan 2024 23:33:07 +0000 -Subject: [PATCH] thermal/drivers/sun8i: Don't fail probe due to zone - registration failure - -Currently the sun8i thermal driver will fail to probe if any of the -thermal zones it is registering fails to register with the thermal core. -Since we currently do not define any trip points for the GPU thermal -zones on at least A64 or H5 this means that we have no thermal support -on these platforms: - -[ 1.698703] thermal_sys: Failed to find 'trips' node -[ 1.698707] thermal_sys: Failed to find trip points for thermal-sensor id=1 - -even though the main CPU thermal zone on both SoCs is fully configured. -This does not seem ideal, while we may not be able to use all the zones -it seems better to have those zones which are usable be operational. -Instead just carry on registering zones if we get any non-deferral -error, allowing use of those zones which are usable. - -This means that we also need to update the interrupt handler to not -attempt to notify the core for events on zones which we have not -registered, I didn't see an ability to mask individual interrupts and -I would expect that interrupts would still be indicated in the ISR even -if they were masked. - -Reviewed-by: Vasily Khoruzhick -Acked-by: Jernej Skrabec -Signed-off-by: Mark Brown -Signed-off-by: Daniel Lezcano -Link: https://lore.kernel.org/r/20240123-thermal-sun8i-registration-v3-1-3e5771b1bbdd@kernel.org ---- - drivers/thermal/sun8i_thermal.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - ---- a/drivers/thermal/sun8i_thermal.c -+++ b/drivers/thermal/sun8i_thermal.c -@@ -197,6 +197,9 @@ static irqreturn_t sun8i_irq_thread(int - int i; - - for_each_set_bit(i, &irq_bitmap, tmdev->chip->sensor_num) { -+ /* We allow some zones to not register. */ -+ if (IS_ERR(tmdev->sensor[i].tzd)) -+ continue; - thermal_zone_device_update(tmdev->sensor[i].tzd, - THERMAL_EVENT_UNSPECIFIED); - } -@@ -531,8 +534,17 @@ static int sun8i_ths_register(struct ths - i, - &tmdev->sensor[i], - &ths_ops); -- if (IS_ERR(tmdev->sensor[i].tzd)) -- return PTR_ERR(tmdev->sensor[i].tzd); -+ -+ /* -+ * If an individual zone fails to register for reasons -+ * other than probe deferral (eg, a bad DT) then carry -+ * on, other zones might register successfully. -+ */ -+ if (IS_ERR(tmdev->sensor[i].tzd)) { -+ if (PTR_ERR(tmdev->sensor[i].tzd) == -EPROBE_DEFER) -+ return PTR_ERR(tmdev->sensor[i].tzd); -+ continue; -+ } - - if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd)) - dev_warn(tmdev->dev, diff --git a/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch b/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch deleted file mode 100644 index cd6542bf14..0000000000 --- a/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch +++ /dev/null @@ -1,138 +0,0 @@ -From f4318af40544b8e7ff5a6b667ede60e6cf808262 Mon Sep 17 00:00:00 2001 -From: Martin Botka -Date: Mon, 19 Feb 2024 15:36:39 +0000 -Subject: [PATCH] arm64: dts: allwinner: h616: Add thermal sensor and zones - -There are four thermal sensors: -- CPU -- GPU -- VE -- DRAM - -Add the thermal sensor configuration and the thermal zones. - -Signed-off-by: Martin Botka -Signed-off-by: Andre Przywara -Reviewed-by: Jernej Skrabec -Link: https://lore.kernel.org/r/20240219153639.179814-8-andre.przywara@arm.com -Signed-off-by: Jernej Skrabec ---- - .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 88 +++++++++++++++++++ - 1 file changed, 88 insertions(+) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - - / { - interrupt-parent = <&gic>; -@@ -138,6 +139,10 @@ - reg = <0x03006000 0x1000>; - #address-cells = <1>; - #size-cells = <1>; -+ -+ ths_calibration: thermal-sensor-calibration@14 { -+ reg = <0x14 0x8>; -+ }; - }; - - watchdog: watchdog@30090a0 { -@@ -511,6 +516,19 @@ - }; - }; - -+ ths: thermal-sensor@5070400 { -+ compatible = "allwinner,sun50i-h616-ths"; -+ reg = <0x05070400 0x400>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_THS>; -+ clock-names = "bus"; -+ resets = <&ccu RST_BUS_THS>; -+ nvmem-cells = <&ths_calibration>; -+ nvmem-cell-names = "calibration"; -+ allwinner,sram = <&syscon>; -+ #thermal-sensor-cells = <1>; -+ }; -+ - usbotg: usb@5100000 { - compatible = "allwinner,sun50i-h616-musb", - "allwinner,sun8i-h3-musb"; -@@ -755,4 +773,74 @@ - #size-cells = <0>; - }; - }; -+ -+ thermal-zones { -+ cpu-thermal { -+ polling-delay-passive = <500>; -+ polling-delay = <1000>; -+ thermal-sensors = <&ths 2>; -+ sustainable-power = <1000>; -+ -+ trips { -+ cpu_threshold: cpu-trip-0 { -+ temperature = <60000>; -+ type = "passive"; -+ hysteresis = <0>; -+ }; -+ cpu_target: cpu-trip-1 { -+ temperature = <70000>; -+ type = "passive"; -+ hysteresis = <0>; -+ }; -+ cpu_critical: cpu-trip-2 { -+ temperature = <110000>; -+ type = "critical"; -+ hysteresis = <0>; -+ }; -+ }; -+ }; -+ -+ gpu-thermal { -+ polling-delay-passive = <500>; -+ polling-delay = <1000>; -+ thermal-sensors = <&ths 0>; -+ sustainable-power = <1100>; -+ -+ trips { -+ gpu_temp_critical: gpu-trip-0 { -+ temperature = <110000>; -+ type = "critical"; -+ hysteresis = <0>; -+ }; -+ }; -+ }; -+ -+ ve-thermal { -+ polling-delay-passive = <0>; -+ polling-delay = <0>; -+ thermal-sensors = <&ths 1>; -+ -+ trips { -+ ve_temp_critical: ve-trip-0 { -+ temperature = <110000>; -+ type = "critical"; -+ hysteresis = <0>; -+ }; -+ }; -+ }; -+ -+ ddr-thermal { -+ polling-delay-passive = <0>; -+ polling-delay = <0>; -+ thermal-sensors = <&ths 3>; -+ -+ trips { -+ ddr_temp_critical: ddr-trip-0 { -+ temperature = <110000>; -+ type = "critical"; -+ hysteresis = <0>; -+ }; -+ }; -+ }; -+ }; - }; diff --git a/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch b/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch deleted file mode 100644 index 30c98aa737..0000000000 --- a/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a896bc1d79e3c00f0aacfe225499d811775616f3 Mon Sep 17 00:00:00 2001 -From: Chukun Pan -Date: Sun, 10 Oct 2021 21:50:17 +0800 -Subject: [PATCH] arm64: allwinner: add OF node for USB eth on NanoPi R1S H5 - -This adds the OF node for the USB3 ethernet adapter on the FriendlyARM -NanoPi R1S H5. Add the correct value for the RTL8153 LED configuration -register to match the blink behavior of the other port on the device. - -Signed-off-by: Chukun Pan ---- - arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 7 +++++++ - 1 file changed, 7 insertions(+) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts -@@ -116,6 +116,13 @@ - - &ehci1 { - status = "okay"; -+ -+ usb-eth@1 { -+ compatible = "realtek,rtl8153"; -+ reg = <1>; -+ -+ realtek,led-data = <0x78>; -+ }; - }; - - &ehci2 { diff --git a/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch b/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch deleted file mode 100644 index 2c5ccd7d96..0000000000 --- a/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts -@@ -59,7 +59,7 @@ - - key-sw4 { - label = "sw4"; -- linux,code = ; -+ linux,code = ; - gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; - wakeup-source; - }; -@@ -220,7 +220,7 @@ - }; - - &usb_otg { -- dr_mode = "otg"; -+ dr_mode = "host"; - status = "okay"; - }; - diff --git a/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch b/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch deleted file mode 100644 index a8dfcd9dbc..0000000000 --- a/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 7d87d3dafc4b1ea5659eb71ee6c5fd5308490d1f Mon Sep 17 00:00:00 2001 -From: Oskari Lemmela -Date: Mon, 31 Dec 2018 07:44:49 +0200 -Subject: [PATCH] arm64: allwinner: a64-sopine: Add Sopine flash partitions. - -First 896kB to u-boot. Enough space for SPL, u-boot and ATF. -Next 128kB to u-boot environment and rest to firmware. - -Firmware partition is compatible FIT image dynamic splitting. - -Signed-off-by: Oskari Lemmela ---- - .../boot/dts/allwinner/sun50i-a64-sopine.dtsi | 22 +++++++++++++++++++ - 1 file changed, 22 insertions(+) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi -@@ -58,6 +58,28 @@ - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <40000000>; -+ -+ partitions { -+ compatible = "fixed-partitions"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ partition@0 { -+ label = "u-boot"; -+ reg = <0x000000 0x0E0000>; -+ }; -+ -+ partition@e0000 { -+ label = "u-boot-env"; -+ reg = <0x0E0000 0x020000>; -+ }; -+ -+ partition@100000 { -+ compatible = "denx,fit"; -+ label = "firmware"; -+ reg = <0x100000 0xF00000>; -+ }; -+ }; - }; - }; - diff --git a/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch b/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch deleted file mode 100644 index 5b8dd170c5..0000000000 --- a/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch +++ /dev/null @@ -1,292 +0,0 @@ ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -1352,6 +1352,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ - sun8i-a83t-cubietruck-plus.dtb \ - sun8i-a83t-tbs-a711.dtb \ - sun8i-h2-plus-bananapi-m2-zero.dtb \ -+ sun8i-h2-plus-bananapi-p2-zero.dtb \ - sun8i-h2-plus-libretech-all-h3-cc.dtb \ - sun8i-h2-plus-orangepi-r1.dtb \ - sun8i-h2-plus-orangepi-zero.dtb \ ---- /dev/null -+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-p2-zero.dts -@@ -0,0 +1,279 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (C) 2023 Zoltan HERPAI -+ * -+ * Based on sun8i-h2-plus-bananapi-m2-zero.dts, which is: -+ * Copyright (C) 2017 Icenowy Zheng -+ */ -+ -+/dts-v1/; -+#include "sun8i-h3.dtsi" -+#include "sunxi-common-regulators.dtsi" -+ -+#include -+#include -+ -+/ { -+ model = "Banana Pi BPI-P2-Zero"; -+ compatible = "sinovoip,bpi-p2-zero", "allwinner,sun8i-h2-plus"; -+ -+ aliases { -+ serial0 = &uart0; -+ serial1 = &uart1; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ connector { -+ compatible = "hdmi-connector"; -+ type = "c"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ pwr_led { -+ label = "bananapi-p2-zero:red:pwr"; -+ gpios = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */ -+ default-state = "on"; -+ }; -+ }; -+ -+ gpio_keys { -+ compatible = "gpio-keys"; -+ -+ sw4 { -+ label = "power"; -+ linux,code = ; -+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ reg_vdd_cpux: vdd-cpux-regulator { -+ compatible = "regulator-gpio"; -+ regulator-name = "vdd-cpux"; -+ regulator-type = "voltage"; -+ regulator-boot-on; -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1300000>; -+ regulator-ramp-delay = <50>; /* 4ms */ -+ -+ gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */ -+ enable-active-high; -+ gpios-states = <0x1>; -+ states = <1100000 0>, <1300000 1>; -+ }; -+ -+ reg_vcc_dram: vcc-dram { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc-dram"; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-always-on; -+ regulator-boot-on; -+ enable-active-high; -+ gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */ -+ vin-supply = <®_vcc5v0>; -+ }; -+ -+ reg_vcc1v2: vcc1v2 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc1v2"; -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <1200000>; -+ regulator-always-on; -+ regulator-boot-on; -+ enable-active-high; -+ gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ -+ vin-supply = <®_vcc5v0>; -+ }; -+ -+ poweroff { -+ compatible = "regulator-poweroff"; -+ cpu-supply = <®_vcc1v2>; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ -+ clocks = <&rtc 1>; -+ clock-names = "ext_clock"; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <®_vdd_cpux>; -+}; -+ -+&de { -+ status = "okay"; -+}; -+ -+&ehci0 { -+ status = "okay"; -+}; -+ -+&emac { -+ phy-handle = <&int_mii_phy>; -+ phy-mode = "mii"; -+ allwinner,leds-active-low; -+ status = "okay"; -+}; -+ -+&hdmi { -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ -+&mmc0 { -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <4>; -+ /* -+ * On the production batch of this board the card detect GPIO is -+ * high active (card inserted), although on the early samples it's -+ * low active. -+ */ -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ -+ status = "okay"; -+}; -+ -+&mmc1 { -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ brcmf: wifi@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ interrupt-parent = <&pio>; -+ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ -+ interrupt-names = "host-wake"; -+ }; -+}; -+ -+&ohci0 { -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pa_pins>; -+ status = "okay"; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; -+ uart-has-rtscts; -+ status = "okay"; -+ -+ bluetooth { -+ compatible = "brcm,bcm43438-bt"; -+ max-speed = <1500000>; -+ clocks = <&rtc 1>; -+ clock-names = "lpo"; -+ vbat-supply = <®_vcc3v3>; -+ vddio-supply = <®_vcc3v3>; -+ device-wakeup-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */ -+ host-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ -+ shutdown-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ -+ }; -+ -+}; -+ -+&pio { -+ gpio-line-names = -+ /* PA */ -+ "CON2-P13", "CON2-P11", "CON2-P22", "CON2-P15", -+ "CON3-P03", "CON3-P02", "CON2-P07", "CON2-P29", -+ "CON2-P31", "CON2-P33", "CON2-P35", "CON2-P05", -+ "CON2-P03", "CON2-P08", "CON2-P10", "CON2-P16", -+ "CON2-P12", "CON2-P37", "CON2-P28", "CON2-P27", -+ "CON2-P40", "CON2-P38", "", "", -+ "", "", "", "", "", "", "", "", -+ -+ /* PB */ -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ -+ /* PC */ -+ "CON2-P19", "CON2-P21", "CON2-P23", "CON2-P24", -+ "CON2-P18", "", "", "CON2-P26", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ -+ /* PD */ -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "CSI-PWR-EN", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ -+ /* PE */ -+ "CN3-P17", "CN3-P13", "CN3-P09", "CN3-P07", -+ "CN3-P19", "CN3-P21", "CN3-P22", "CN3-P20", -+ "CN3-P18", "CN3-P16", "CN3-P14", "CN3-P12", -+ "CN3-P05", "CN3-P03", "CN3-P06", "CN3-P08", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ -+ /* PF */ -+ "SDC0-D1", "SDC0-D0", "SDC0-CLK", "SDC0-CMD", "SDC0-D3", -+ "SDC0-D2", "SDC0-DET", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ -+ /* PG */ -+ "WL-SDIO-CLK", "WL-SDIO-CMD", "WL-SDIO-D0", "WL-SDIO-D1", -+ "WL-SDIO-D2", "WL-SDIO-D3", "BT-UART-TX", "BT-UART-RX", -+ "BT-UART-RTS", "BT-UART-CTS", "WL-WAKE-AP", "BT-WAKE-AP", -+ "BT-RST-N", "AP-WAKE-BT", "", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", ""; -+}; -+ -+&r_pio { -+ gpio-line-names = -+ /* PL */ -+ "", "CPUX-SET", "CON2-P32", "POWER-KEY", "CON2-P36", -+ "VCC-IO-EN", "USB0-ID", "WL-PWR-EN", -+ "PWR-STB", "PWR-DRAM", "PWR-LED", "IR-RX", "", "", "", "", -+ "", "", "", "", "", "", "", "", -+ "", "", "", "", "", "", "", ""; -+}; -+ -+&usb_otg { -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+&usbphy { -+ usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ -+ /* -+ * There're two micro-USB connectors, one is power-only and another is -+ * OTG. The Vbus of these two connectors are connected together, so -+ * the external USB device will be powered just by the power input -+ * from the power-only USB port. -+ */ -+ status = "okay"; -+}; diff --git a/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch b/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch deleted file mode 100644 index 68ec333e37..0000000000 --- a/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20=C5=A0tetiar?= -Date: Thu, 26 Mar 2020 10:09:19 +0100 -Subject: [PATCH] arm64: dts: allwinner: a64: olinuxino: add status LED aliases -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar - ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts -@@ -15,6 +15,10 @@ - aliases { - ethernet0 = &emac; - serial0 = &uart0; -+ led-boot = &led_user; -+ led-failsafe = &led_user; -+ led-running = &led_user; -+ led-upgrade = &led_user; - }; - - chosen { -@@ -35,7 +39,7 @@ - leds { - compatible = "gpio-leds"; - -- led-0 { -+ led_user: led-0 { - label = "a64-olinuxino:red:user"; - gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */ - }; diff --git a/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch b/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch deleted file mode 100644 index 8670d06109..0000000000 --- a/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1845163a052efac124f00656eb72f38947630a42 Mon Sep 17 00:00:00 2001 -From: Chukun Pan -Date: Sun, 10 Oct 2021 21:50:18 +0800 -Subject: [PATCH] arm64: dts: allwinner: NanoPi R1S H5: add status LED aliases - -Use the SYS LED on the casing for showing system status. - -Signed-off-by: Chukun Pan ---- - arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - ---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts -@@ -23,6 +23,11 @@ - ethernet0 = &emac; - ethernet1 = &rtl8189etv; - serial0 = &uart0; -+ -+ led-boot = &led_sys; -+ led-failsafe = &led_sys; -+ led-running = &led_sys; -+ led-upgrade = &led_sys; - }; - - chosen { -@@ -38,7 +43,7 @@ - gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; - }; - -- led-1 { -+ led_sys: led-1 { - function = LED_FUNCTION_STATUS; - color = ; - gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; diff --git a/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch b/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch deleted file mode 100644 index 76a73ee1f0..0000000000 --- a/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts -@@ -41,3 +41,7 @@ - reg = <1>; - }; - }; -+ -+&pwm { -+ status = "okay"; -+}; diff --git a/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch b/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch deleted file mode 100644 index 3876852c2b..0000000000 --- a/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts -@@ -42,6 +42,11 @@ - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ -+ }; - }; - - &ac_power_supply { -@@ -102,6 +107,21 @@ - reg = <1>; - }; - }; -+ -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_dldo4>; -+ vqmmc-supply = <®_eldo1>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ rtl8723cs: wifi@1 { -+ reg = <1>; -+ }; -+}; - - &mmc2 { - pinctrl-names = "default"; ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -@@ -35,6 +35,11 @@ - }; - }; - }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ -+ }; - }; - - &codec { -@@ -124,6 +129,21 @@ - status = "okay"; - }; - -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_dldo4>; -+ vqmmc-supply = <®_eldo1>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ rtl8723cs: wifi@1 { -+ reg = <1>; -+ }; -+}; -+ - &ohci0 { - status = "okay"; - }; diff --git a/target/linux/x86/config-6.1 b/target/linux/x86/config-6.1 index a04d3d87f7..8252d61690 100644 --- a/target/linux/x86/config-6.1 +++ b/target/linux/x86/config-6.1 @@ -236,6 +236,7 @@ CONFIG_MICROCODE_INTEL=y CONFIG_MICROCODE_LATE_LOADING=y CONFIG_MIGRATION=y CONFIG_MITIGATION_RFDS=y +CONFIG_MITIGATION_SPECTRE_BHI=y # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MK8 is not set @@ -352,9 +353,6 @@ CONFIG_SG_POOL=y CONFIG_SOFTIRQ_ON_OWN_STACK=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPARSE_IRQ=y -# CONFIG_SPECTRE_BHI_AUTO is not set -# CONFIG_SPECTRE_BHI_OFF is not set -CONFIG_SPECTRE_BHI_ON=y CONFIG_SPECULATION_MITIGATIONS=y CONFIG_SRCU=y # CONFIG_STATIC_CALL_SELFTEST is not set diff --git a/target/linux/zynq/Makefile b/target/linux/zynq/Makefile index 7e4ff32881..90e49df878 100644 --- a/target/linux/zynq/Makefile +++ b/target/linux/zynq/Makefile @@ -18,8 +18,7 @@ define Target/Description Build firmware image for Zynq 7000 SoC devices. endef -KERNEL_PATCHVER:=5.15 -KERNEL_TESTING_PATCHVER:=6.1 +KERNEL_PATCHVER:=6.1 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/zynq/config-5.15 b/target/linux/zynq/config-5.15 deleted file mode 100644 index d1d7392440..0000000000 --- a/target/linux/zynq/config-5.15 +++ /dev/null @@ -1,552 +0,0 @@ -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_ALTERA_FREEZE_BRIDGE is not set -# CONFIG_ALTERA_PR_IP_CORE is not set -CONFIG_ARCH_32BIT_OFF_T=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_KEEP_MEMBLOCK=y -CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -CONFIG_ARCH_MULTIPLATFORM=y -CONFIG_ARCH_MULTI_V6_V7=y -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_NR_GPIO=1024 -CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_ARCH_VEXPRESS=y -CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y -# CONFIG_ARCH_VEXPRESS_SPC is not set -CONFIG_ARCH_ZYNQ=y -CONFIG_ARM=y -CONFIG_ARM_AMBA=y -CONFIG_ARM_CPU_SUSPEND=y -CONFIG_ARM_CRYPTO=y -CONFIG_ARM_ERRATA_643719=y -CONFIG_ARM_ERRATA_720789=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_ARM_ERRATA_754327=y -CONFIG_ARM_ERRATA_764369=y -CONFIG_ARM_ERRATA_775420=y -CONFIG_ARM_GIC=y -CONFIG_ARM_GLOBAL_TIMER=y -CONFIG_ARM_GT_INITIAL_PRESCALER_VAL=2 -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_ARM_HEAVY_MB=y -CONFIG_ARM_L1_CACHE_SHIFT=6 -CONFIG_ARM_L1_CACHE_SHIFT_6=y -CONFIG_ARM_PATCH_IDIV=y -CONFIG_ARM_PATCH_PHYS_VIRT=y -# CONFIG_ARM_PL172_MPMC is not set -# CONFIG_ARM_SMMU is not set -CONFIG_ARM_THUMB=y -CONFIG_ARM_TIMER_SP804=y -CONFIG_ARM_UNWIND=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_ARM_ZYNQ_CPUIDLE=y -CONFIG_ATAGS=y -CONFIG_AUTO_ZRELADDR=y -# CONFIG_AXI_DMAC is not set -CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_MQ_PCI=y -CONFIG_BLK_PM=y -CONFIG_BOUNCE=y -CONFIG_CACHE_L2X0=y -CONFIG_CADENCE_TTC_TIMER=y -CONFIG_CADENCE_WATCHDOG=y -CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y -CONFIG_CLKSRC_MMIO=y -CONFIG_CLKSRC_VERSATILE=y -CONFIG_CLK_SP810=y -CONFIG_CLK_VEXPRESS_OSC=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_CMA=y -CONFIG_CMA_ALIGNMENT=8 -CONFIG_CMA_AREAS=7 -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_SIZE_MBYTES=16 -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -# CONFIG_CMA_SYSFS is not set -CONFIG_COMMON_CLK=y -CONFIG_COMMON_CLK_SI570=y -CONFIG_COMPAT_32BIT_TIME=y -CONFIG_CONNECTOR=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_CONTIG_ALLOC=y -CONFIG_COREDUMP=y -# CONFIG_CPUFREQ_DT is not set -CONFIG_CPU_32v6K=y -CONFIG_CPU_32v7=y -CONFIG_CPU_ABRT_EV7=y -CONFIG_CPU_CACHE_V7=y -CONFIG_CPU_CACHE_VIPT=y -CONFIG_CPU_COPY_V6=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y -CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ATTR_SET=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_GOV_LADDER=y -CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_CPU_PABRT_V7=y -CONFIG_CPU_PM=y -CONFIG_CPU_RMAP=y -CONFIG_CPU_SPECTRE=y -CONFIG_CPU_THERMAL=y -CONFIG_CPU_THUMB_CAPABLE=y -CONFIG_CPU_TLB_V7=y -CONFIG_CPU_V7=y -CONFIG_CRC16=y -# CONFIG_CRC32_SARWATE is not set -CONFIG_CRC32_SLICEBY8=y -CONFIG_CROSS_MEMORY_ATTACH=y -CONFIG_CRYPTO_CRC32=y -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -CONFIG_CRYPTO_RNG2=y -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_DMADEVICES=y -CONFIG_DMA_CMA=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_OF=y -CONFIG_DMA_OPS=y -CONFIG_DMA_REMAP=y -CONFIG_DMA_SHARED_BUFFER=y -CONFIG_DRM=y -CONFIG_DRM_BRIDGE=y -CONFIG_DRM_FBDEV_EMULATION=y -CONFIG_DRM_FBDEV_OVERALLOC=100 -CONFIG_DRM_KMS_HELPER=y -CONFIG_DRM_PANEL=y -CONFIG_DRM_PANEL_BRIDGE=y -CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y -CONFIG_DTC=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_E1000E=y -CONFIG_EDAC=y -CONFIG_EDAC_ATOMIC_SCRUB=y -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_LEGACY_SYSFS=y -CONFIG_EDAC_SUPPORT=y -# CONFIG_EDAC_SYNOPSYS is not set -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -CONFIG_ELF_CORE=y -CONFIG_EXT4_FS=y -CONFIG_EXTCON=y -CONFIG_F2FS_FS=y -CONFIG_FB=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_IMAGEBLIT=y -CONFIG_FB_CMDLINE=y -CONFIG_FB_DEFERRED_IO=y -CONFIG_FB_SYS_COPYAREA=y -CONFIG_FB_SYS_FILLRECT=y -CONFIG_FB_SYS_FOPS=y -CONFIG_FB_SYS_IMAGEBLIT=y -# CONFIG_FB_XILINX is not set -CONFIG_FHANDLE=y -CONFIG_FIXED_PHY=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_FPGA=y -CONFIG_FPGA_BRIDGE=y -# CONFIG_FPGA_DFL is not set -# CONFIG_FPGA_MGR_ALTERA_CVP is not set -# CONFIG_FPGA_MGR_ALTERA_PS_SPI is not set -# CONFIG_FPGA_MGR_ICE40_SPI is not set -# CONFIG_FPGA_MGR_MACHXO2_SPI is not set -# CONFIG_FPGA_MGR_XILINX_SPI is not set -CONFIG_FPGA_MGR_ZYNQ_FPGA=y -CONFIG_FPGA_REGION=y -CONFIG_FREEZER=y -CONFIG_FS_IOMAP=y -CONFIG_FS_MBCACHE=y -CONFIG_FWNODE_MDIO=y -CONFIG_FW_CACHE=y -CONFIG_FW_LOADER_PAGED_BUF=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_ARCH_TOPOLOGY=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_GENERIC_CPU_VULNERABILITIES=y -CONFIG_GENERIC_EARLY_IOREMAP=y -CONFIG_GENERIC_GETTIMEOFDAY=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_MIGRATION=y -CONFIG_GENERIC_IRQ_MULTI_HANDLER=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y -CONFIG_GENERIC_MSI_IRQ=y -CONFIG_GENERIC_MSI_IRQ_DOMAIN=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_PINCONF=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_VDSO_32=y -CONFIG_GLOB=y -CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_CDEV=y -CONFIG_GPIO_GENERIC=y -CONFIG_GPIO_GENERIC_PLATFORM=y -CONFIG_GPIO_ZYNQ=y -CONFIG_HANDLE_DOMAIN_IRQ=y -CONFIG_HARDEN_BRANCH_PREDICTOR=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAVE_SMP=y -CONFIG_HDMI=y -CONFIG_HID=y -CONFIG_HID_GENERIC=y -CONFIG_HID_MICROSOFT=y -CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_HOTPLUG_CPU=y -CONFIG_HWMON=y -CONFIG_HW_CONSOLE=y -CONFIG_HZ_FIXED=0 -CONFIG_I2C=y -CONFIG_I2C_ALGOBIT=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CADENCE=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_COMPAT=y -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_MUX=y -CONFIG_I2C_MUX_PCA954x=y -CONFIG_ICST=y -CONFIG_IIO=y -CONFIG_IIO_BUFFER=y -CONFIG_IIO_KFIFO_BUF=y -CONFIG_IIO_TRIGGER=y -CONFIG_IIO_TRIGGERED_BUFFER=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_INPUT=y -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_FF_MEMLESS=y -CONFIG_INPUT_KEYBOARD=y -CONFIG_INPUT_MOUSE=y -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_SPARSEKMAP=y -# CONFIG_IOMMU_DEBUGFS is not set -# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set -# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set -CONFIG_IOMMU_SUPPORT=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_RARP=y -CONFIG_IRQCHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_WORK=y -# CONFIG_ISDN is not set -CONFIG_JBD2=y -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_KCMP=y -CONFIG_KERNEL_GZIP=y -# CONFIG_KERNEL_XZ is not set -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_GPIO_POLLED=y -CONFIG_KMAP_LOCAL=y -CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CAMERA=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_TRANSIENT=y -CONFIG_LIBFDT=y -CONFIG_LOCK_DEBUGGING_SUPPORT=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_MACB=y -# CONFIG_MACB_PCI is not set -CONFIG_MACB_USE_HWSTAMP=y -CONFIG_MARVELL_PHY=y -CONFIG_MDIO_BITBANG=y -CONFIG_MDIO_BUS=y -CONFIG_MDIO_DEVICE=y -CONFIG_MDIO_DEVRES=y -# CONFIG_MDIO_GPIO is not set -CONFIG_MEMFD_CREATE=y -CONFIG_MEMORY=y -CONFIG_MEMORY_ISOLATION=y -CONFIG_MFD_CORE=y -CONFIG_MFD_SYSCON=y -CONFIG_MFD_VEXPRESS_SYSREG=y -CONFIG_MIGHT_HAVE_CACHE_L2X0=y -CONFIG_MIGRATION=y -CONFIG_MMC=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_CQHCI=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_OF_ARASAN=y -# CONFIG_MMC_SDHCI_PCI is not set -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODULE_STRIPPED is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_BYD=y -CONFIG_MOUSE_PS2_CYPRESS=y -# CONFIG_MOUSE_PS2_ELANTECH is not set -CONFIG_MOUSE_PS2_FOCALTECH=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SMBUS=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y -CONFIG_MTD_SPLIT_FIRMWARE=y -# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEON=y -CONFIG_NET_FLOW_LIMIT=y -CONFIG_NET_PTP_CLASSIFY=y -CONFIG_NET_SELFTESTS=y -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_VIA is not set -CONFIG_NLS=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_NO_HZ=y -CONFIG_NO_HZ_COMMON=y -CONFIG_NO_HZ_IDLE=y -CONFIG_NO_IOPORT_MAP=y -CONFIG_NR_CPUS=4 -CONFIG_NVMEM=y -CONFIG_NVMEM_SYSFS=y -CONFIG_OF=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_FLATTREE=y -# CONFIG_OF_FPGA_REGION is not set -CONFIG_OF_GPIO=y -CONFIG_OF_IRQ=y -CONFIG_OF_KOBJ=y -CONFIG_OF_MDIO=y -CONFIG_OLD_SIGACTION=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OUTER_CACHE=y -CONFIG_OUTER_CACHE_SYNC=y -CONFIG_PADATA=y -CONFIG_PAGE_OFFSET=0xC0000000 -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_PCI=y -CONFIG_PCIE_XILINX=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_DOMAINS_GENERIC=y -CONFIG_PCI_MSI=y -CONFIG_PCI_MSI_IRQ_DOMAIN=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_PHYLIB=y -CONFIG_PHYLINK=y -CONFIG_PINCTRL=y -# CONFIG_PINCTRL_SINGLE is not set -CONFIG_PINCTRL_ZYNQ=y -CONFIG_PL310_ERRATA_588369=y -CONFIG_PL310_ERRATA_727915=y -CONFIG_PL310_ERRATA_753970=y -CONFIG_PL310_ERRATA_769419=y -CONFIG_PL330_DMA=y -# CONFIG_PL353_SMC is not set -CONFIG_PLAT_VERSATILE=y -CONFIG_PM=y -CONFIG_PMBUS=y -CONFIG_PM_CLK=y -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_VEXPRESS=y -CONFIG_POWER_SUPPLY=y -CONFIG_PPS=y -CONFIG_PROC_EVENTS=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_PTP_1588_CLOCK_OPTIONAL=y -CONFIG_R8169=y -CONFIG_RAS=y -CONFIG_RATIONAL=y -CONFIG_REALTEK_PHY=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_MMIO=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -# CONFIG_REGULATOR_VEXPRESS is not set -CONFIG_RESET_CONTROLLER=y -CONFIG_RESET_ZYNQ=y -CONFIG_RFS_ACCEL=y -CONFIG_RPS=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_PCF8563=y -CONFIG_RTC_I2C_AND_SPI=y -CONFIG_RTC_MC146818_LIB=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -# CONFIG_SCHED_CORE is not set -CONFIG_SCHED_MC=y -CONFIG_SCHED_SMT=y -CONFIG_SENSORS_PMBUS=y -CONFIG_SENSORS_UCD9000=y -CONFIG_SENSORS_UCD9200=y -# CONFIG_SERIAL_8250 is not set -CONFIG_SERIAL_XILINX_PS_UART=y -CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y -CONFIG_SERIO=y -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_SERPORT=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_SOCK_RX_QUEUE_MAPPING=y -CONFIG_SOC_BUS=y -CONFIG_SPARSE_IRQ=y -CONFIG_SPI=y -CONFIG_SPI_BITBANG=y -CONFIG_SPI_CADENCE=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_MEM=y -CONFIG_SPI_XILINX=y -CONFIG_SPI_ZYNQ_QSPI=y -CONFIG_SRAM=y -CONFIG_SRAM_EXEC=y -CONFIG_SRCU=y -# CONFIG_STRIP_ASM_SYMS is not set -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_SWPHY=y -CONFIG_SWP_EMULATE=y -CONFIG_SYNC_FILE=y -CONFIG_SYSFS_SYSCALL=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -# CONFIG_TEXTSEARCH is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y -CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 -CONFIG_THERMAL_GOV_STEP_WISE=y -CONFIG_THERMAL_HWMON=y -CONFIG_THERMAL_OF=y -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TIMER_OF=y -CONFIG_TIMER_PROBE=y -CONFIG_TREE_RCU=y -CONFIG_TREE_SRCU=y -CONFIG_UIO=y -# CONFIG_UIO_AEC is not set -# CONFIG_UIO_CIF is not set -# CONFIG_UIO_DMEM_GENIRQ is not set -# CONFIG_UIO_MF624 is not set -# CONFIG_UIO_NETX is not set -# CONFIG_UIO_PCI_GENERIC is not set -CONFIG_UIO_PDRV_GENIRQ=y -# CONFIG_UIO_PRUSS is not set -# CONFIG_UIO_SERCOS3 is not set -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -CONFIG_UNWINDER_ARM=y -CONFIG_USB=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_COMMON=y -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_HCD_PLATFORM is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_XILINX=y -CONFIG_USB_HID=y -CONFIG_USB_NET_DRIVERS=y -CONFIG_USB_OTG=y -CONFIG_USB_OTG_FSM=y -CONFIG_USB_PHY=y -CONFIG_USB_ROLE_SWITCH=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_ULPI=y -CONFIG_USB_ULPI_BUS=y -CONFIG_USB_ULPI_VIEWPORT=y -CONFIG_USE_OF=y -CONFIG_VEXPRESS_CONFIG=y -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_VGA_ARB=y -CONFIG_VGA_ARB_MAX_GPUS=16 -CONFIG_VITESSE_PHY=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -CONFIG_WATCHDOG_CORE=y -# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set -CONFIG_XILINX_EMACLITE=y -# CONFIG_XILINX_INTC is not set -# CONFIG_XILINX_PR_DECOUPLER is not set -CONFIG_XILINX_WATCHDOG=y -CONFIG_XILINX_XADC=y -CONFIG_XPS=y -CONFIG_XZ_DEC_ARM=y -CONFIG_XZ_DEC_ARMTHUMB=y -CONFIG_XZ_DEC_BCJ=y -CONFIG_XZ_DEC_IA64=y -CONFIG_XZ_DEC_POWERPC=y -CONFIG_XZ_DEC_SPARC=y -CONFIG_XZ_DEC_X86=y -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZLIB_DEFLATE=y -CONFIG_ZLIB_INFLATE=y diff --git a/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch b/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch new file mode 100644 index 0000000000..6aa3f549da --- /dev/null +++ b/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch @@ -0,0 +1,25 @@ +From bfba6445a778007f40af5cbfbe725e12c0fcafc6 Mon Sep 17 00:00:00 2001 +From: Tomas Volf <~@wolfsden.cz> +Date: Tue, 5 Mar 2024 22:25:20 +0100 +Subject: [PATCH] gm_utils.cpp: Call clear instead of empty. + +Since the intention seem to be to erase the next word, I believe calling empty +was a mistake and it should have been clear. Empty does nothing in this +context. + +* src/gm_utils.cpp (wrap_cstr): Call clear. +--- + src/gm_utils.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/gm_utils.cpp ++++ b/src/gm_utils.cpp +@@ -311,7 +311,7 @@ void wrap_cstr(string& wrapped, unsigned + // trim leading spaces + std::size_t pos = next_word.find_first_not_of(' '); + if( pos == std::string::npos ) +- next_word.empty(); ++ next_word.clear(); + else if( pos ) + next_word.erase( 0, pos ); + diff --git a/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch b/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch new file mode 100644 index 0000000000..ce997f4505 --- /dev/null +++ b/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch @@ -0,0 +1,33 @@ +From a3d0a0419a35bef9b80a6a12432ab30e2d1e0f5a Mon Sep 17 00:00:00 2001 +From: Tomas Volf <~@wolfsden.cz> +Date: Tue, 5 Mar 2024 22:27:42 +0100 +Subject: [PATCH] gm_utils.h: Drop std::unary_function. + +I am not sure what it does, it is deprecated/removed (depending on C++ version) +and the advice seems to be that is just is not necessary. So just remove it. + +* src/gm_utils.h (print_f, pair_print_f): Drop std::unary_function. +--- + src/gm_utils.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/gm_utils.h ++++ b/src/gm_utils.h +@@ -117,7 +117,7 @@ bool string_contains(const char *s, cons + * Function object to print something into a stream (to be used with for_each) + */ + template +-struct print_f : public std::unary_function ++struct print_f + { + print_f(std::ostream& out, const string &s = ", ") : os(out), sep(s) {} + void operator() (T x) { os << x << sep; } +@@ -129,7 +129,7 @@ struct print_f : public std::unary_funct + * Function object to print a pair into two streams (to be used with for_each) + */ + template +-struct pair_print_f : public std::unary_function ++struct pair_print_f + { + pair_print_f(std::ostream& out1, std::ostream& out2, const string &s = ", ") : + os1(out1), os2(out2), sep(s) {}