diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 6a341c3225..b17ff7f932 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -166,7 +166,7 @@ define Kernel/CompileImage/Initramfs $(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init) rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio* ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y) -ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),) +ifneq ($(call qstrip,$(CONFIG_EXTERNAL_CPIO)),) $(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio else ( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio ) diff --git a/include/prereq.mk b/include/prereq.mk index 88ed1f406a..9f1ff70eed 100644 --- a/include/prereq.mk +++ b/include/prereq.mk @@ -107,16 +107,9 @@ define SetupHostCommand bin="$$$$$$$$(command -v "$$$$$$$${cmd%% *}")"; \ if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \ case "$$$$$$$$(ls -dl -- $(STAGING_DIR_HOST)/bin/$(strip $(1)))" in \ - *" -> $$$$$$$$bin"*) \ - [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \ - ;; \ - "-"*) \ - find "$(STAGING_DIR_HOST)/stamp" | grep $(strip $(1)) && \ - [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \ - ;; \ - *" -> /"*) \ - ;; \ - *" -> "*) \ + "-"* | \ + *" -> $$$$$$$$bin"* | \ + *" -> "[!/]*) \ [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \ ;; \ esac; \ diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 38866ab219..d9e12d6f46 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl -PKG_VERSION:=3.0.11 +PKG_VERSION:=3.0.12 PKG_RELEASE:=1 PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto @@ -26,7 +26,7 @@ PKG_SOURCE_URL:= \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/ -PKG_HASH:=b3425d3bb4a2218d0697eb41f7fc0cdede016ed19ca49d168b78e8d947887f55 +PKG_HASH:=f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE diff --git a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch index c4f2540395..ebdb940b42 100644 --- a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch +++ b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch @@ -10,7 +10,7 @@ Signed-off-by: Eneas U de Queiroz --- a/crypto/build.info +++ b/crypto/build.info -@@ -111,7 +111,7 @@ DEFINE[../libcrypto]=$UPLINKDEF +@@ -109,7 +109,7 @@ DEFINE[../libcrypto]=$UPLINKDEF DEPEND[info.o]=buildinf.h DEPEND[cversion.o]=buildinf.h diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index 6671719321..e7de3ef77d 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uqmi -PKG_RELEASE:=5 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git -PKG_SOURCE_DATE:=2022-05-04 -PKG_SOURCE_VERSION:=56cb2d4056fef132ccf78dfb6f3074ae5d109992 -PKG_MIRROR_HASH:=cc832b5318805df8c8387a3650f250dee72d5f1dbda4e4866b5503e186b2210c +PKG_SOURCE_DATE:=2022-10-20 +PKG_SOURCE_VERSION:=c8c9f105aa2d03146664fa1cc1bd2c837aa4aadd +PKG_MIRROR_HASH:=5fd1b3c8f5e7c4b52ed81a0c69504fbf39e69c0ecd1f8278969cf22f57fdb2a9 PKG_MAINTAINER:=Matti Laakso PKG_LICENSE:=GPL-2.0 diff --git a/package/utils/nvram/files/nvram-bcm53xx.init b/package/utils/nvram/files/nvram-bcm53xx.init index 0502cd28b6..4319c761bb 100755 --- a/package/utils/nvram/files/nvram-bcm53xx.init +++ b/package/utils/nvram/files/nvram-bcm53xx.init @@ -9,6 +9,7 @@ clear_partialboots() { # clear partialboots case $(board_name) in + linksys,ea9200|\ linksys,panamera) COMMIT=1 nvram set partialboots=0 diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 13e7311e79..6d84442da4 100644 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -50,6 +50,7 @@ bcm53xx_setup_macs() offset=1 ;; dlink,dir-885l | \ + linksys,ea9200 | \ linksys,panamera | \ netgear,r7900 | \ netgear,r8000 | \ diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 15b4fc350b..f3c7622c26 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -137,6 +137,7 @@ USB2_PACKAGES += kmod-usb-ledtrig-usbport automount USB3_PACKAGES := $(USB2_PACKAGES) kmod-usb3 kmod-phy-bcm-ns-usb3 define Device/Default + PROFILES = Generic $$(DEVICE_NAME) # .dtb files are prefixed by SoC type, e.g. bcm4708- which is not included in device/image names # extract the full dtb name based on the device info DEVICE_DTS := $(patsubst %.dtb,%,$(notdir $(wildcard $(if $(IB),$(KDIR),$(DTS_DIR))/*-$(subst _,-,$(1)).dtb))) @@ -159,6 +160,14 @@ define Device/asus IMAGE/trx := append-ubi | trx-nand | asus-trx endef +define Device/asus_rt-ac3100 + $(call Device/asus) + DEVICE_MODEL := RT-AC3100 + DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES) + ASUS_PRODUCTID := RT-AC3100 +endef +TARGET_DEVICES += asus_rt-ac3100 + define Device/asus_rt-ac56u $(call Device/asus) DEVICE_MODEL := RT-AC56U @@ -461,8 +470,16 @@ TARGET_DEVICES += smartrg_sr400ac define Device/phicomm_k3 DEVICE_VENDOR := PHICOMM DEVICE_MODEL := K3 +<<<<<<< HEAD DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) \ -brcmfmac-firmware-4366c0-pcie brcmfmac-firmware-4366c0-pcie-k3 +======= + DEVICE_ALT0_VENDOR := Wavlink + DEVICE_ALT0_MODEL := QUANTUM DAX + DEVICE_ALT1_VENDOR := Wavlink + DEVICE_ALT1_MODEL := WL-WN538A8 + DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES) +>>>>>>> op-of/openwrt-23.05 IMAGES := trx endef TARGET_DEVICES += phicomm_k3 diff --git a/target/linux/bcm53xx/patches-5.15/037-v6.6-0016-ARM-dts-BCM5301X-Add-DT-for-Asus-RT-AC3100.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0016-ARM-dts-BCM5301X-Add-DT-for-Asus-RT-AC3100.patch new file mode 100644 index 0000000000..6c2af02589 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0016-ARM-dts-BCM5301X-Add-DT-for-Asus-RT-AC3100.patch @@ -0,0 +1,431 @@ +From 2900083269f7c0f0ff430bffc6ced2038aed9b6b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= +Date: Thu, 3 Aug 2023 10:14:54 +0300 +Subject: [PATCH] ARM: dts: BCM5301X: Add DT for ASUS RT-AC3100 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ASUS RT-AC3100 is ASUS RT-AC88U without the external switch. Move the +shared bindings to bcm47094-asus-rt-ac3100.dtsi. + +Remove the fixed-link node on port@7 as commit ba4aebce23b2 ("ARM: dts: +BCM5301X: Describe switch ports in the main DTS") states it's not +necessary. + +Replace the copyright notice with an author notice. + +Rename the model name from Asus to ASUS on bcm47094-asus-rt-ac88u.dts. + +Signed-off-by: Arınç ÜNAL +Reviewed-by: Linus Walleij +Link: https://lore.kernel.org/r/20230803071454.5902-2-arinc.unal@arinc9.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/Makefile | 1 + + .../dts/bcm47094-asus-rt-ac3100.dts | 23 +++ + .../dts/bcm47094-asus-rt-ac3100.dtsi | 163 ++++++++++++++++++ + .../dts/bcm47094-asus-rt-ac88u.dts | 155 +---------------- + 4 files changed, 190 insertions(+), 152 deletions(-) + create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dts + create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dtsi + +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -119,6 +119,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ + bcm4709-netgear-r7000.dtb \ + bcm4709-netgear-r8000.dtb \ + bcm4709-tplink-archer-c9-v1.dtb \ ++ bcm47094-asus-rt-ac3100.dtb \ + bcm47094-asus-rt-ac88u.dtb \ + bcm47094-dlink-dir-885l.dtb \ + bcm47094-dlink-dir-890l.dtb \ +--- /dev/null ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dts +@@ -0,0 +1,23 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Author: Arınç ÜNAL ++ */ ++ ++/dts-v1/; ++ ++#include "bcm47094-asus-rt-ac3100.dtsi" ++ ++/ { ++ compatible = "asus,rt-ac3100", "brcm,bcm47094", "brcm,bcm4708"; ++ model = "ASUS RT-AC3100"; ++ ++ nvram@1c080000 { ++ et0macaddr: et0macaddr { ++ }; ++ }; ++}; ++ ++&gmac0 { ++ nvmem-cells = <&et0macaddr>; ++ nvmem-cell-names = "mac-address"; ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac3100.dtsi +@@ -0,0 +1,163 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* ++ * Author: Arınç ÜNAL ++ */ ++ ++#include "bcm47094.dtsi" ++#include "bcm5301x-nand-cs0-bch8.dtsi" ++ ++/ { ++ chosen { ++ bootargs = "earlycon"; ++ }; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00000000 0x08000000>, ++ <0x88000000 0x18000000>; ++ }; ++ ++ nvram@1c080000 { ++ compatible = "brcm,nvram"; ++ reg = <0x1c080000 0x00180000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led-power { ++ label = "white:power"; ++ gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "default-on"; ++ }; ++ ++ led-wan-red { ++ label = "red:wan"; ++ gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ led-lan { ++ label = "white:lan"; ++ gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; ++ }; ++ ++ led-usb2 { ++ label = "white:usb2"; ++ gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ehci_port2>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ led-usb3 { ++ label = "white:usb3"; ++ gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; ++ trigger-sources = <&ehci_port1>, <&xhci_port1>; ++ linux,default-trigger = "usbport"; ++ }; ++ ++ led-wps { ++ label = "white:wps"; ++ gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ button-wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; ++ }; ++ ++ button-reset { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; ++ }; ++ ++ button-wifi { ++ label = "Wi-Fi"; ++ linux,code = ; ++ gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ button-led { ++ label = "Backlight"; ++ linux,code = ; ++ gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&srab { ++ compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab"; ++ status = "okay"; ++ ++ ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@4 { ++ label = "wan"; ++ }; ++ ++ port@5 { ++ label = "cpu"; ++ }; ++ ++ port@7 { ++ label = "cpu"; ++ }; ++ ++ port@8 { ++ label = "cpu"; ++ }; ++ }; ++}; ++ ++&usb2 { ++ vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; ++}; ++ ++&usb3_phy { ++ status = "okay"; ++}; ++ ++&nandcs { ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "boot"; ++ reg = <0x00000000 0x00080000>; ++ read-only; ++ }; ++ ++ partition@80000 { ++ label = "nvram"; ++ reg = <0x00080000 0x00180000>; ++ }; ++ ++ partition@200000 { ++ label = "firmware"; ++ reg = <0x00200000 0x07e00000>; ++ compatible = "brcm,trx"; ++ }; ++ }; ++}; +--- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts ++++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts +@@ -1,102 +1,21 @@ + // SPDX-License-Identifier: GPL-2.0-or-later OR MIT + /* +- * Copyright (C) 2021-2022 Arınç ÜNAL ++ * Author: Arınç ÜNAL + */ + + /dts-v1/; + +-#include "bcm47094.dtsi" +-#include "bcm5301x-nand-cs0-bch8.dtsi" ++#include "bcm47094-asus-rt-ac3100.dtsi" + + / { + compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708"; +- model = "Asus RT-AC88U"; +- +- chosen { +- bootargs = "earlycon"; +- }; +- +- memory@0 { +- device_type = "memory"; +- reg = <0x00000000 0x08000000>, +- <0x88000000 0x18000000>; +- }; ++ model = "ASUS RT-AC88U"; + + nvram@1c080000 { +- compatible = "brcm,nvram"; +- reg = <0x1c080000 0x00180000>; +- + et1macaddr: et1macaddr { + }; + }; + +- leds { +- compatible = "gpio-leds"; +- +- led-power { +- label = "white:power"; +- gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; +- linux,default-trigger = "default-on"; +- }; +- +- led-wan-red { +- label = "red:wan"; +- gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>; +- }; +- +- led-lan { +- label = "white:lan"; +- gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; +- }; +- +- led-usb2 { +- label = "white:usb2"; +- gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>; +- trigger-sources = <&ehci_port2>; +- linux,default-trigger = "usbport"; +- }; +- +- led-usb3 { +- label = "white:usb3"; +- gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; +- trigger-sources = <&ehci_port1>, <&xhci_port1>; +- linux,default-trigger = "usbport"; +- }; +- +- led-wps { +- label = "white:wps"; +- gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>; +- }; +- }; +- +- gpio-keys { +- compatible = "gpio-keys"; +- +- button-wps { +- label = "WPS"; +- linux,code = ; +- gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>; +- }; +- +- button-reset { +- label = "Reset"; +- linux,code = ; +- gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>; +- }; +- +- button-wifi { +- label = "Wi-Fi"; +- linux,code = ; +- gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; +- }; +- +- button-led { +- label = "Backlight"; +- linux,code = ; +- gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>; +- }; +- }; +- + switch { + compatible = "realtek,rtl8365mb"; + /* 7 = MDIO (has input reads), 6 = MDC (clock, output only) */ +@@ -175,31 +94,9 @@ + }; + + &srab { +- compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab"; +- status = "okay"; + dsa,member = <0 0>; + + ports { +- port@0 { +- label = "lan4"; +- }; +- +- port@1 { +- label = "lan3"; +- }; +- +- port@2 { +- label = "lan2"; +- }; +- +- port@3 { +- label = "lan1"; +- }; +- +- port@4 { +- label = "wan"; +- }; +- + sw0_p5: port@5 { + /delete-property/ethernet; + +@@ -212,19 +109,6 @@ + pause; + }; + }; +- +- port@7 { +- label = "cpu"; +- +- fixed-link { +- speed = <1000>; +- full-duplex; +- }; +- }; +- +- port@8 { +- label = "cpu"; +- }; + }; + }; + +@@ -236,36 +120,3 @@ + nvmem-cells = <&et1macaddr>; + nvmem-cell-names = "mac-address"; + }; +- +-&usb2 { +- vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; +-}; +- +-&usb3_phy { +- status = "okay"; +-}; +- +-&nandcs { +- partitions { +- compatible = "fixed-partitions"; +- #address-cells = <1>; +- #size-cells = <1>; +- +- partition@0 { +- label = "boot"; +- reg = <0x00000000 0x00080000>; +- read-only; +- }; +- +- partition@80000 { +- label = "nvram"; +- reg = <0x00080000 0x00180000>; +- }; +- +- partition@200000 { +- label = "firmware"; +- reg = <0x00200000 0x07e00000>; +- compatible = "brcm,trx"; +- }; +- }; +-}; diff --git a/target/linux/bcm53xx/patches-5.15/038-v6.7-0001-ARM-dts-BCM5301X-Set-MACs-for-D-Link-DIR-885L.patch b/target/linux/bcm53xx/patches-5.15/038-v6.7-0001-ARM-dts-BCM5301X-Set-MACs-for-D-Link-DIR-885L.patch new file mode 100644 index 0000000000..78b8975f1f --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/038-v6.7-0001-ARM-dts-BCM5301X-Set-MACs-for-D-Link-DIR-885L.patch @@ -0,0 +1,56 @@ +From 5cbee5828219c4f7b33e96b5d8ce5e467b2857c8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 1 Sep 2023 12:55:49 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Set MACs for D-Link DIR-885L +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Specify NVRAM access and use its "et2macaddr" NVMEM cell. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230901105549.7076-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../dts/broadcom/bcm47094-dlink-dir-885l.dts | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +@@ -25,6 +25,15 @@ + <0x88000000 0x08000000>; + }; + ++ nvram@1e3f0000 { ++ compatible = "brcm,nvram"; ++ reg = <0x1e3f0000 0x10000>; ++ ++ et2macaddr: et2macaddr { ++ #nvmem-cell-cells = <1>; ++ }; ++ }; ++ + nand_controller: nand-controller@18028000 { + nand@0 { + partitions { +@@ -112,6 +121,11 @@ + vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; + }; + ++&gmac0 { ++ nvmem-cells = <&et2macaddr 0>; ++ nvmem-cell-names = "mac-address"; ++}; ++ + &spi_nor { + status = "okay"; + }; +@@ -142,6 +156,8 @@ + + port@4 { + label = "wan"; ++ nvmem-cells = <&et2macaddr 3>; ++ nvmem-cell-names = "mac-address"; + }; + + port@8 { diff --git a/target/linux/bcm53xx/patches-5.15/038-v6.7-0002-ARM-dts-BCM5301X-Set-MAC-address-for-Asus-RT-AC87U.patch b/target/linux/bcm53xx/patches-5.15/038-v6.7-0002-ARM-dts-BCM5301X-Set-MAC-address-for-Asus-RT-AC87U.patch new file mode 100644 index 0000000000..11ce7acb53 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/038-v6.7-0002-ARM-dts-BCM5301X-Set-MAC-address-for-Asus-RT-AC87U.patch @@ -0,0 +1,44 @@ +From a9e79863b62aaaefcdf469fc331bf482ae00db0d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 1 Sep 2023 14:43:11 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Set MAC address for Asus RT-AC87U +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Specify NVRAM access and use its "et1macaddr" NVMEM cell. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230901124311.31156-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac87u.dts | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts ++++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +@@ -25,6 +25,12 @@ + <0x88000000 0x08000000>; + }; + ++ nvram@1c080000 { ++ et1macaddr: et1macaddr { ++ #nvmem-cell-cells = <1>; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + +@@ -62,6 +68,11 @@ + }; + }; + ++&gmac0 { ++ nvmem-cells = <&et1macaddr 0>; ++ nvmem-cell-names = "mac-address"; ++}; ++ + &usb3_phy { + status = "okay"; + }; diff --git a/target/linux/bcm53xx/patches-5.15/038-v6.7-0003-ARM-dts-BCM5301X-Relicense-Felix-s-code-to-the-GPL-2.patch b/target/linux/bcm53xx/patches-5.15/038-v6.7-0003-ARM-dts-BCM5301X-Relicense-Felix-s-code-to-the-GPL-2.patch new file mode 100644 index 0000000000..6df1e555e9 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/038-v6.7-0003-ARM-dts-BCM5301X-Relicense-Felix-s-code-to-the-GPL-2.patch @@ -0,0 +1,57 @@ +From 81ea360a16978a4df61df9db56b171909bd659c0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sat, 16 Sep 2023 10:30:57 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Relicense Felix's code to the GPL 2.0+ / + MIT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Move code added by Felix to the bcm-ns.dtsi which uses dual licensing. +That syncs more Northstar code to be based on the same licensing schema. + +This code was added in the commit 1ff80363524c ("ARM: BCM5301X: Add +profiling support"). + +Cc: Felix Fietkau +Signed-off-by: Rafał Miłecki +Acked-by: Felix Fietkau +Link: https://lore.kernel.org/r/20230916083057.10458-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 7 +++++++ + arch/arm/boot/dts/broadcom/bcm5301x.dtsi | 7 ------- + 2 files changed, 7 insertions(+), 7 deletions(-) + +--- a/arch/arm/boot/dts/bcm-ns.dtsi ++++ b/arch/arm/boot/dts/bcm-ns.dtsi +@@ -14,6 +14,13 @@ + #address-cells = <1>; + #size-cells = <1>; + ++ pmu { ++ compatible = "arm,cortex-a9-pmu"; ++ interrupts = ++ , ++ ; ++ }; ++ + chipcommon-a-bus@18000000 { + compatible = "simple-bus"; + ranges = <0x00000000 0x18000000 0x00001000>; +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -26,13 +26,6 @@ + }; + }; + +- pmu { +- compatible = "arm,cortex-a9-pmu"; +- interrupts = +- , +- ; +- }; +- + clocks { + #address-cells = <1>; + #size-cells = <1>; diff --git a/target/linux/bcm53xx/patches-5.15/038-v6.7-0004-ARM-dts-BCM5301X-Relicense-Vivek-s-code-to-the-GPL-2.patch b/target/linux/bcm53xx/patches-5.15/038-v6.7-0004-ARM-dts-BCM5301X-Relicense-Vivek-s-code-to-the-GPL-2.patch new file mode 100644 index 0000000000..66db4a291f --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/038-v6.7-0004-ARM-dts-BCM5301X-Relicense-Vivek-s-code-to-the-GPL-2.patch @@ -0,0 +1,104 @@ +From b8d4f7c1be04d66c37c119c501c87bccc4197694 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sat, 16 Sep 2023 10:58:55 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Relicense Vivek's code to the GPL 2.0+ / + MIT +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Move code added by Vivek to the bcm-ns.dtsi which uses dual licensing. +That syncs more Northstar code to be based on the same licensing schema. + +This code was added in the commit 37f6130ec39f ("ARM: dts: BCM5301X: +Make USB 3.0 PHY use MDIO PHY driver"). + +Cc: Vivek Unune +Signed-off-by: Rafał Miłecki +Acked-by: Vivek Unune +Link: https://lore.kernel.org/r/20230916085855.28375-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 27 ++++++++++++++++++++++++ + arch/arm/boot/dts/broadcom/bcm5301x.dtsi | 27 ------------------------ + 2 files changed, 27 insertions(+), 27 deletions(-) + +--- a/arch/arm/boot/dts/bcm-ns.dtsi ++++ b/arch/arm/boot/dts/bcm-ns.dtsi +@@ -327,6 +327,29 @@ + #address-cells = <1>; + }; + ++ mdio-mux@18003000 { ++ compatible = "mdio-mux-mmioreg", "mdio-mux"; ++ mdio-parent-bus = <&mdio>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x18003000 0x4>; ++ mux-mask = <0x200>; ++ ++ mdio@0 { ++ reg = <0x0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ usb3_phy: usb3-phy@10 { ++ compatible = "brcm,ns-ax-usb3-phy"; ++ reg = <0x10>; ++ usb3-dmp-syscon = <&usb3_dmp>; ++ #phy-cells = <0>; ++ status = "disabled"; ++ }; ++ }; ++ }; ++ + rng: rng@18004000 { + compatible = "brcm,bcm5301x-rng"; + reg = <0x18004000 0x14>; +@@ -467,6 +490,10 @@ + brcm,nand-has-wp; + }; + ++ usb3_dmp: syscon@18105000 { ++ reg = <0x18105000 0x1000>; ++ }; ++ + thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <0>; +--- a/arch/arm/boot/dts/bcm5301x.dtsi ++++ b/arch/arm/boot/dts/bcm5301x.dtsi +@@ -62,33 +62,6 @@ + }; + }; + +- mdio-mux@18003000 { +- compatible = "mdio-mux-mmioreg", "mdio-mux"; +- mdio-parent-bus = <&mdio>; +- #address-cells = <1>; +- #size-cells = <0>; +- reg = <0x18003000 0x4>; +- mux-mask = <0x200>; +- +- mdio@0 { +- reg = <0x0>; +- #address-cells = <1>; +- #size-cells = <0>; +- +- usb3_phy: usb3-phy@10 { +- compatible = "brcm,ns-ax-usb3-phy"; +- reg = <0x10>; +- usb3-dmp-syscon = <&usb3_dmp>; +- #phy-cells = <0>; +- status = "disabled"; +- }; +- }; +- }; +- +- usb3_dmp: syscon@18105000 { +- reg = <0x18105000 0x1000>; +- }; +- + i2c0: i2c@18009000 { + compatible = "brcm,iproc-i2c"; + reg = <0x18009000 0x50>; diff --git a/target/linux/bcm53xx/patches-5.15/038-v6.7-0005-ARM-dts-BCM5301X-Explicitly-disable-unused-switch-CP.patch b/target/linux/bcm53xx/patches-5.15/038-v6.7-0005-ARM-dts-BCM5301X-Explicitly-disable-unused-switch-CP.patch new file mode 100644 index 0000000000..72e5c6b061 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/038-v6.7-0005-ARM-dts-BCM5301X-Explicitly-disable-unused-switch-CP.patch @@ -0,0 +1,377 @@ +From 473baeab929444295b0530f8766e4becb6a08973 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 13 Oct 2023 12:33:13 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Explicitly disable unused switch CPU + ports +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When redescribing ports I assumed that missing "label" (like "cpu") +means switch port isn't used. That was incorrect and I realized my +change made Linux always use the first (5) CPU port (there are 3 of +them). + +While above should technically be possible it often isn't correct: +1. Non-default switch ports are often connected to Ethernet interfaces + not fully covered by vendor setup (they may miss MACs) +2. On some devices non-default ports require specifying fixed link + +This fixes network connectivity for some devices. It was reported & +tested for Netgear R8000. It also affects Linksys EA9200 with its +downstream DTS. + +Fixes: ba4aebce23b2 ("ARM: dts: BCM5301X: Describe switch ports in the main DTS") +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20231013103314.10306-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm4708-luxul-xap-1510.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm4708-luxul-xwc-1000.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm4708-netgear-r6250.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm4708-smartrg-sr400ac.dts | 8 ++++++++ + .../boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47081-luxul-xap-1410.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47081-luxul-xwr-1200.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-890l.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-luxul-abr-4500.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-luxul-xap-1610.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-luxul-xbr-4500.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-luxul-xwc-2000.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3100.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3150-v1.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm53015-meraki-mr26.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm53016-meraki-mr32.dts | 8 ++++++++ + arch/arm/boot/dts/broadcom/bcm953012er.dts | 8 ++++++++ + 20 files changed, 160 insertions(+) + +--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi ++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi +@@ -181,5 +181,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts ++++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts +@@ -85,5 +85,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts ++++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +@@ -88,5 +88,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts ++++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts +@@ -122,5 +122,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts ++++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +@@ -145,6 +145,14 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; + +--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts ++++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +@@ -145,5 +145,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts ++++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts +@@ -81,5 +81,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts ++++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts +@@ -148,5 +148,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts +@@ -227,6 +227,14 @@ + label = "wan"; + }; + ++ port@5 { ++ status = "disabled"; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ + port@8 { + label = "cpu"; + }; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +@@ -160,6 +160,14 @@ + nvmem-cell-names = "mac-address"; + }; + ++ port@5 { ++ status = "disabled"; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ + port@8 { + label = "cpu"; + }; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts +@@ -192,6 +192,14 @@ + label = "wan"; + }; + ++ port@5 { ++ status = "disabled"; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ + port@8 { + label = "cpu"; + phy-mode = "rgmii"; +--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts +@@ -107,5 +107,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts +@@ -120,5 +120,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts +@@ -107,5 +107,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts +@@ -75,5 +75,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts +@@ -147,5 +147,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts ++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts +@@ -158,5 +158,13 @@ + port@5 { + label = "cpu"; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; +--- a/arch/arm/boot/dts/bcm53015-meraki-mr26.dts ++++ b/arch/arm/boot/dts/bcm53015-meraki-mr26.dts +@@ -124,6 +124,14 @@ + full-duplex; + }; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; + +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts +@@ -185,6 +185,14 @@ + full-duplex; + }; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; + +--- a/arch/arm/boot/dts/bcm953012er.dts ++++ b/arch/arm/boot/dts/bcm953012er.dts +@@ -84,6 +84,14 @@ + label = "cpu"; + ethernet = <&gmac0>; + }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; ++ }; + }; + }; + diff --git a/target/linux/bcm53xx/patches-5.15/038-v6.7-0006-ARM-dts-BCM5301X-Set-fixed-link-for-extra-Netgear-R8.patch b/target/linux/bcm53xx/patches-5.15/038-v6.7-0006-ARM-dts-BCM5301X-Set-fixed-link-for-extra-Netgear-R8.patch new file mode 100644 index 0000000000..0b2b7b36a3 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/038-v6.7-0006-ARM-dts-BCM5301X-Set-fixed-link-for-extra-Netgear-R8.patch @@ -0,0 +1,47 @@ +From d313b0e9070a7100ca55e64fe3b081d176d8806d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 13 Oct 2023 12:33:14 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Set fixed-link for extra Netgear R8000 + CPU ports +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Ports 5 and 7 are disabled by default because the standard use case is +for port 8 to manage all CPU directed traffic. For experimentation +purposes however it is desirable to provide adequate properties such +that people can experiment with using different ports without having to +figure out their configuration. Some of the use cases include but are +not limited to doubling or tripling the bandwidth by leveraging the +additional ports/Ethernet MAC combinations. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20231013103314.10306-2-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts ++++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts +@@ -229,10 +229,20 @@ + + port@5 { + status = "disabled"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; + }; + + port@7 { + status = "disabled"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; + }; + + port@8 { diff --git a/target/linux/bcm53xx/patches-5.15/038-v6.7-0007-ARM-dts-BCM5301X-Set-switch-ports-for-Linksys-EA9200.patch b/target/linux/bcm53xx/patches-5.15/038-v6.7-0007-ARM-dts-BCM5301X-Set-switch-ports-for-Linksys-EA9200.patch new file mode 100644 index 0000000000..4528c95a5a --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/038-v6.7-0007-ARM-dts-BCM5301X-Set-switch-ports-for-Linksys-EA9200.patch @@ -0,0 +1,63 @@ +From 253358f373492608348136e569366d73cb969f6a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Tue, 24 Oct 2023 09:26:05 +0200 +Subject: [PATCH] ARM: dts: BCM5301X: Set switch ports for Linksys EA9200 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch was developed as OpenWrt downstream change and was recently +confirmed to work as expected. + +Tested-by: Rani Hod +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20231024072605.32517-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../dts/broadcom/bcm4709-linksys-ea9200.dts | 38 +++++++++++++++++++ + 1 file changed, 38 insertions(+) + +--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts ++++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts +@@ -47,3 +47,41 @@ + &usb3_phy { + status = "okay"; + }; ++ ++&srab { ++ status = "okay"; ++ ++ ports { ++ port@0 { ++ label = "lan1"; ++ }; ++ ++ port@1 { ++ label = "lan2"; ++ }; ++ ++ port@2 { ++ label = "lan3"; ++ }; ++ ++ port@3 { ++ label = "lan4"; ++ }; ++ ++ port@4 { ++ label = "wan"; ++ }; ++ ++ port@5 { ++ status = "disabled"; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ label = "cpu"; ++ }; ++ }; ++}; diff --git a/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch b/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch index e0832524f4..8039831a78 100644 --- a/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch +++ b/target/linux/bcm53xx/patches-5.15/304-ARM-dts-BCM5301X-Specify-switch-ports-for-remaining-.patch @@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts -@@ -92,3 +92,40 @@ +@@ -92,3 +92,41 @@ &usb3_phy { status = "okay"; }; @@ -20,40 +20,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "lan4"; + }; + + port@4 { -+ reg = <4>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts -@@ -83,3 +83,40 @@ +@@ -83,3 +83,41 @@ &usb3_phy { status = "okay"; }; @@ -63,40 +64,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "wan"; + }; + + port@1 { -+ reg = <1>; + label = "lan1"; + }; + + port@2 { -+ reg = <2>; + label = "lan2"; + }; + + port@3 { -+ reg = <3>; + label = "lan3"; + }; + + port@4 { -+ reg = <4>; + label = "lan4"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts -@@ -149,3 +149,40 @@ +@@ -149,3 +149,41 @@ &usb3_phy { status = "okay"; }; @@ -106,40 +108,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "lan4"; + }; + + port@4 { -+ reg = <4>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts +++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts -@@ -46,3 +46,40 @@ +@@ -46,3 +46,41 @@ &usb3_phy { status = "okay"; }; @@ -149,40 +152,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "lan4"; + }; + + port@4 { -+ reg = <4>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts +++ b/arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts -@@ -43,3 +43,40 @@ +@@ -43,3 +43,41 @@ &usb3_phy { status = "okay"; }; @@ -192,40 +196,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "lan4"; + }; + + port@4 { -+ reg = <4>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts -@@ -86,3 +86,40 @@ +@@ -86,3 +86,41 @@ &usb3_phy { status = "okay"; }; @@ -235,40 +240,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "lan4"; + }; + + port@4 { -+ reg = <4>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts -@@ -77,3 +77,40 @@ +@@ -77,3 +77,41 @@ &usb3_phy { status = "okay"; }; @@ -278,40 +284,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "wan"; + }; + + port@1 { -+ reg = <1>; + label = "lan1"; + }; + + port@2 { -+ reg = <2>; + label = "lan2"; + }; + + port@3 { -+ reg = <3>; + label = "lan3"; + }; + + port@4 { -+ reg = <4>; + label = "lan4"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts +++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts -@@ -66,6 +66,38 @@ +@@ -77,6 +77,40 @@ status = "okay"; }; @@ -320,29 +327,31 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "wan"; + }; + + port@1 { -+ reg = <1>; + label = "lan1"; + }; + + port@2 { -+ reg = <2>; + label = "lan2"; + }; + + port@3 { -+ reg = <3>; + label = "lan3"; + }; + ++ port@5 { ++ status = "disabled"; ++ }; ++ + port@7 { -+ reg = <7>; + label = "cpu"; -+ ethernet = <&gmac1>; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; @@ -352,7 +361,7 @@ Signed-off-by: Rafał Miłecki compatible = "fixed-partitions"; --- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts -@@ -130,3 +130,40 @@ +@@ -130,3 +130,41 @@ &usb3_phy { status = "okay"; }; @@ -362,88 +371,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "lan4"; + }; + + port@4 { -+ reg = <4>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; -+ }; -+ }; -+}; ---- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts -+++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts -@@ -47,3 +47,45 @@ - &usb3_phy { - status = "okay"; - }; -+ -+&srab { -+ status = "okay"; -+ -+ ports { -+ port@0 { -+ reg = <0>; -+ label = "lan1"; + }; + -+ port@1 { -+ reg = <1>; -+ label = "lan2"; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ label = "lan3"; -+ }; -+ -+ port@3 { -+ reg = <3>; -+ label = "lan4"; -+ }; -+ -+ port@4 { -+ reg = <4>; -+ label = "wan"; ++ port@7 { ++ status = "disabled"; + }; + + port@8 { -+ reg = <8>; -+ label = "cpu"; -+ ethernet = <&gmac2>; -+ -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm4709-netgear-r7000.dts +++ b/arch/arm/boot/dts/bcm4709-netgear-r7000.dts -@@ -104,3 +104,40 @@ +@@ -104,3 +104,41 @@ &usb3_phy { status = "okay"; }; @@ -453,40 +415,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "wan"; + }; + + port@1 { -+ reg = <1>; + label = "lan1"; + }; + + port@2 { -+ reg = <2>; + label = "lan2"; + }; + + port@3 { -+ reg = <3>; + label = "lan3"; + }; + + port@4 { -+ reg = <4>; + label = "lan4"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm47094-netgear-r8500.dts +++ b/arch/arm/boot/dts/bcm47094-netgear-r8500.dts -@@ -94,3 +94,45 @@ +@@ -94,3 +94,41 @@ &usb3_phy { status = "okay"; }; @@ -496,45 +459,41 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "wan"; + }; + + port@1 { -+ reg = <1>; + label = "lan1"; + }; + + port@2 { -+ reg = <2>; + label = "lan2"; + }; + + port@3 { -+ reg = <3>; + label = "lan3"; + }; + + port@4 { -+ reg = <4>; + label = "lan4"; + }; + -+ port@8 { -+ reg = <8>; -+ label = "cpu"; -+ ethernet = <&gmac2>; ++ port@5 { ++ status = "disabled"; ++ }; + -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ label = "cpu"; + }; + }; +}; --- a/arch/arm/boot/dts/bcm47094-phicomm-k3.dts +++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts -@@ -38,6 +38,38 @@ +@@ -38,6 +38,40 @@ status = "okay"; }; @@ -543,29 +502,31 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; @@ -575,7 +536,7 @@ Signed-off-by: Rafał Miłecki compatible = "fixed-partitions"; --- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts +++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts -@@ -91,6 +91,43 @@ +@@ -91,6 +91,44 @@ }; }; @@ -584,34 +545,35 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "wan"; + }; + + port@1 { -+ reg = <1>; + label = "lan1"; + }; + + port@2 { -+ reg = <2>; + label = "lan2"; + }; + + port@3 { -+ reg = <3>; + label = "lan3"; + }; + + port@4 { -+ reg = <4>; + label = "lan4"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; @@ -621,7 +583,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts -@@ -100,6 +100,43 @@ +@@ -100,6 +100,44 @@ vcc-gpio = <&chipcommon 12 GPIO_ACTIVE_HIGH>; }; @@ -630,34 +592,35 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "wan"; + }; + + port@1 { -+ reg = <1>; + label = "lan1"; + }; + + port@2 { -+ reg = <2>; + label = "lan2"; + }; + + port@3 { -+ reg = <3>; + label = "lan3"; + }; + + port@4 { -+ reg = <4>; + label = "lan4"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; @@ -667,7 +630,7 @@ Signed-off-by: Rafał Miłecki --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts -@@ -107,3 +107,41 @@ +@@ -107,3 +107,42 @@ &usb3_phy { status = "okay"; }; @@ -677,34 +640,35 @@ Signed-off-by: Rafał Miłecki + + ports { + port@0 { -+ reg = <0>; + label = "lan1"; + }; + + port@1 { -+ reg = <1>; + label = "lan2"; + }; + + port@2 { -+ reg = <2>; + label = "lan3"; + }; + + port@3 { -+ reg = <3>; + label = "lan4"; + }; + + port@4 { -+ reg = <4>; + label = "wan"; + }; + + port@5 { -+ reg = <5>; + label = "cpu"; -+ ethernet = <&gmac0>; ++ }; ++ ++ port@7 { ++ status = "disabled"; ++ }; ++ ++ port@8 { ++ status = "disabled"; + }; + }; +}; diff --git a/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch b/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch index e76a12fe1b..bc04cbd2d6 100644 --- a/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch +++ b/target/linux/bcm53xx/patches-5.15/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch @@ -16,7 +16,7 @@ Signed-off-by: Rafał Miłecki + bcm4709-netgear-r7900.dtb \ bcm4709-netgear-r8000.dtb \ bcm4709-tplink-archer-c9-v1.dtb \ - bcm47094-asus-rt-ac88u.dtb \ + bcm47094-asus-rt-ac3100.dtb \ --- /dev/null +++ b/arch/arm/boot/dts/bcm4709-netgear-r7900.dts @@ -0,0 +1,42 @@ diff --git a/target/linux/lantiq/xrx200/target.mk b/target/linux/lantiq/xrx200/target.mk index 6e01fc79e4..0f119edd6f 100644 --- a/target/linux/lantiq/xrx200/target.mk +++ b/target/linux/lantiq/xrx200/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=xrx200 BOARDNAME:=XRX200 -FEATURES+=atm nand ramdisk source-only +FEATURES+=atm nand ramdisk CPU_TYPE:=24kc DEFAULT_PACKAGES+=kmod-leds-gpio \ diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi index 217c1b60fe..557003a08a 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -21,14 +22,14 @@ keys { compatible = "gpio-keys"; - wps { + button-wps { label = "wps"; - gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; debounce-interval = <60>; linux,code = ; }; - reset { + button-reset { label = "reset"; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; debounce-interval = <60>; @@ -39,35 +40,44 @@ leds { compatible = "gpio-leds"; - led_power: power { + led_power: led-power { label = "green:power"; + color = ; + function = LED_FUNCTION_POWER; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; - wan_orange { - label = "orange:wan"; + led-wan-amber { + color = ; + function = LED_FUNCTION_WAN; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; - lan { - label = "green:lan"; + led-lan { + color = ; + function = LED_FUNCTION_LAN; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; - wifi5g { - label = "green:wifi5g"; + led-wifi5g { + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <5>; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; - wifi2g { - label = "green:wifi2g"; + led-wifi2g { + color = ; + function = LED_FUNCTION_WLAN; + function-enumerator = <2>; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; - wan_green { - label = "green:wan"; + led-wan-green { + color = ; + function = LED_FUNCTION_WAN; gpios = <&gpio 45 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration new file mode 100644 index 0000000000..b595ae6fd1 --- /dev/null +++ b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration @@ -0,0 +1,17 @@ +. /lib/functions.sh +. /lib/functions/migrations.sh + +board=$(board_name) + +case "$board" in +tplink,archer-a6-v3|\ +tplink,archer-c6-v3) + migrate_leds ':wifi2g$=:wlan-2' ':wifi5g$=:wlan-5' + ;; +esac + +remove_devicename_leds + +migrations_apply system + +exit 0