From bd8c3314fb23fe54e17e3ac9ac1535f1508d30c4 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 19 Oct 2020 21:37:38 +0100 Subject: [PATCH 01/44] ubox: run logd non-root as user logd Signed-off-by: Daniel Golle --- package/system/ubox/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index e1269ca6ce..f32e93ca80 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ubox -PKG_RELEASE:=4 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git -PKG_SOURCE_DATE:=2019-12-31 -PKG_SOURCE_VERSION:=0e34af143373126fc62b43612233a158694ec643 -PKG_MIRROR_HASH:=8ad36b252419a88d1018addec84900f9601ef5aece39bd0171c918d0817688c9 +PKG_SOURCE_DATE:=2020-10-25 +PKG_SOURCE_VERSION:=9ef886819dd48303d8ced4cdbc9afbf32682535c +PKG_MIRROR_HASH:=e2d93b798b91de98cb003f7b3be97d3d8a2413c8612b527d096c86ac5365cbdd CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -44,6 +44,7 @@ define Package/logd CATEGORY:=Base system DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt TITLE:=OpenWrt system log implementation + USERID:=logd=514:logd=514 endef define Package/getrandom/install From ccb283c71cce2248eea3afd42624f626cdc3a4f2 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 23 Oct 2020 03:07:09 +0100 Subject: [PATCH 02/44] procd: ujail fixes ec461ff jail: mount more stuff read-only 33b799b ujail: elf: work around GCC bug on MIPS64 Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index d6def205c5..75da0b071b 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-10-21 -PKG_SOURCE_VERSION:=6c5233a16a4831c69e3dcf09bf557156bc144b80 -PKG_MIRROR_HASH:=026138c6b9a337f87bb1c8928aa6e0f2b0814b6ab04b1f2d044c284facbde0f5 +PKG_SOURCE_DATE:=2020-10-25 +PKG_SOURCE_VERSION:=33b799b94c38fd2d3961b465a8114e384573a6d6 +PKG_MIRROR_HASH:=d890570c35567a03976e591879383c6d8e974cf14e64a1507c6e498ae12007c4 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 2d34355e16b442fcf51e93786401716dae3c4ea2 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 19 Oct 2020 21:22:30 +0100 Subject: [PATCH 03/44] busybox: allow ntpd to run as non-root ntpd user Signed-off-by: Daniel Golle --- package/utils/busybox/Makefile | 5 ++++- package/utils/busybox/files/ntpd.capabilities | 22 +++++++++++++++++++ package/utils/busybox/files/sysntpd | 7 ++++++ .../patches/600-allow-ntpd-non-root.patch | 12 ++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 package/utils/busybox/files/ntpd.capabilities create mode 100644 package/utils/busybox/patches/600-allow-ntpd-non-root.patch diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index b2de0a852b..6d9a0088e5 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.31.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -50,6 +50,7 @@ define Package/busybox/Default TITLE:=Core utilities for embedded Linux URL:=http://busybox.net/ DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter + USERID:=ntpd=123:ntpd=123 endef define Package/busybox @@ -144,6 +145,8 @@ endif ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_NTPD),) $(INSTALL_BIN) ./files/sysntpd $(1)/etc/init.d/sysntpd $(INSTALL_BIN) ./files/ntpd-hotplug $(1)/usr/sbin/ntpd-hotplug + $(INSTALL_DIR) $(1)/etc/capabilities/ + $(INSTALL_DATA) ./files/ntpd.capabilities $(1)/etc/capabilities/ntpd.json endif -rm -rf $(1)/lib64 endef diff --git a/package/utils/busybox/files/ntpd.capabilities b/package/utils/busybox/files/ntpd.capabilities new file mode 100644 index 0000000000..8a05dba4bc --- /dev/null +++ b/package/utils/busybox/files/ntpd.capabilities @@ -0,0 +1,22 @@ +{ + "bounding": [ + "CAP_NET_BIND_SERVICE", + "CAP_SYS_TIME" + ], + "effective": [ + "CAP_NET_BIND_SERVICE", + "CAP_SYS_TIME" + ], + "ambient": [ + "CAP_NET_BIND_SERVICE", + "CAP_SYS_TIME" + ], + "permitted": [ + "CAP_NET_BIND_SERVICE", + "CAP_SYS_TIME" + ], + "inheritable": [ + "CAP_NET_BIND_SERVICE", + "CAP_SYS_TIME" + ] +} diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd index 52866ba32a..cbc760a48e 100755 --- a/package/utils/busybox/files/sysntpd +++ b/package/utils/busybox/files/sysntpd @@ -55,6 +55,13 @@ start_ntpd_instance() { procd_append_param command -p $peer done procd_set_param respawn + [ -x /sbin/ujail ] && { + procd_add_jail ntpd + procd_set_param capabilities /etc/capabilities/ntpd.json + procd_set_param user ntpd + procd_set_param group ntpd + procd_set_param no_new_privs 1 + } procd_close_instance } diff --git a/package/utils/busybox/patches/600-allow-ntpd-non-root.patch b/package/utils/busybox/patches/600-allow-ntpd-non-root.patch new file mode 100644 index 0000000000..b5d4c2a07d --- /dev/null +++ b/package/utils/busybox/patches/600-allow-ntpd-non-root.patch @@ -0,0 +1,12 @@ +--- a/networking/ntpd.c ++++ b/networking/ntpd.c +@@ -2414,9 +2414,6 @@ static NOINLINE void ntp_init(char **arg + + srand(getpid()); + +- if (getuid()) +- bb_error_msg_and_die(bb_msg_you_must_be_root); +- + /* Set some globals */ + G.discipline_jitter = G_precision_sec; + G.stratum = MAXSTRAT; From 70c17268a8b740448791bb6840f3eb79a64939c0 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 25 Oct 2020 12:44:50 +0000 Subject: [PATCH 04/44] dnsmasq: adapt to non-root ntpd Signed-off-by: Daniel Golle --- package/network/services/dnsmasq/Makefile | 3 ++- .../services/dnsmasq/files/dnsmasqsec_hotplug_acl.json | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index fe68378f48..57f6f0cef9 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_UPSTREAM_VERSION:=2.82 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq @@ -180,6 +180,7 @@ define Package/dnsmasq/install $(INSTALL_BIN) ./files/dhcp-script.sh $(1)/usr/lib/dnsmasq/dhcp-script.sh $(INSTALL_DIR) $(1)/usr/share/acl.d $(INSTALL_DATA) ./files/dnsmasq_acl.json $(1)/usr/share/acl.d/ + $(INSTALL_DATA) ./files/dnsmasqsec_hotplug_acl.json $(1)/usr/share/acl.d/ $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/50-dnsmasq-migrate-resolv-conf-auto.sh $(1)/etc/uci-defaults endef diff --git a/package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json b/package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json new file mode 100644 index 0000000000..a5eac3943d --- /dev/null +++ b/package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json @@ -0,0 +1,8 @@ +{ + "user": "ntpd", + "access": { + "service": { + "methods": [ "signal" ] + } + } +} From 23be410b3d1267c752bf9f6e5c8f5a514dc562c4 Mon Sep 17 00:00:00 2001 From: Chuanhong Guo Date: Wed, 21 Oct 2020 13:11:35 +0800 Subject: [PATCH 05/44] ramips: add support for TOTOLINK X5000R Specifications: - SoC: MT7621AT - RAM: 256MB - Flash: 16MB (EN25QH128A) - Ethernet: 5xGbE - WiFi: MT7915 2x2 2.4G 573.5Mbps + 2x2 5G 1201Mbps Known issue: MT7915 DBDC variant isn't supported yet. Flash instruction: Upload the sysupgrade firmware to the firmware upgrade page in vendor fw. Other info: MT7915 seems to have two PCIEs connected to MT7621. Card detected on PCIE0 has an ID of 14c3:7916 and the other one on PCIE1 has 14c3:7915. Signed-off-by: Chuanhong Guo --- .../ramips/dts/mt7621_totolink_x5000r.dts | 139 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 10 ++ 2 files changed, 149 insertions(+) create mode 100644 target/linux/ramips/dts/mt7621_totolink_x5000r.dts diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts new file mode 100644 index 0000000000..b05d83978d --- /dev/null +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "totolink,x5000r", "mediatek,mt7621-soc"; + model = "TOTOLINK X5000R"; + + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + label-mac-device = &gmac0; + serial0 = &uartlite; + }; + + chosen { + stdout-path = "serial0:115200n8"; + bootargs = "console=ttyS0,115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "blue:sys"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0xe000>; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + + port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0xe006>; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "wdt"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 274d9f7158..7a97f8aa73 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1015,6 +1015,16 @@ define Device/totolink_a7000r endef TARGET_DEVICES += totolink_a7000r +define Device/totolink_x5000r + $(Device/dsa-migration) + IMAGE_SIZE := 16064k + UIMAGE_NAME := C8343R-9999 + DEVICE_VENDOR := TOTOLINK + DEVICE_MODEL := X5000R + DEVICE_PACKAGES := kmod-mt7915e +endef +TARGET_DEVICES += totolink_x5000r + define Device/tplink_re350-v1 $(Device/dsa-migration) $(Device/tplink-safeloader) From 63ab77d0eb9c2ffc057772609a6e1eabcbd0095e Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 23 Oct 2020 09:42:03 +0800 Subject: [PATCH 06/44] ramips: mt7621: use lzma-loader for U7621-06 The U7621-06 fails to boot if the kernel is large. Enabling lzma-loader resolves the issue. Signed-off-by: Jianhui Zhao --- target/linux/ramips/image/mt7621.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 7a97f8aa73..8919d764b0 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1098,6 +1098,7 @@ TARGET_DEVICES += ubnt_unifi-nanohd define Device/unielec_u7621-06-16m $(Device/dsa-migration) + $(Device/uimage-lzma-loader) IMAGE_SIZE := 16064k DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 @@ -1109,6 +1110,7 @@ TARGET_DEVICES += unielec_u7621-06-16m define Device/unielec_u7621-06-64m $(Device/dsa-migration) + $(Device/uimage-lzma-loader) IMAGE_SIZE := 65216k DEVICE_VENDOR := UniElec DEVICE_MODEL := U7621-06 From a181dbc2e3caa044b74566a5884bc58e986ae458 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 25 Oct 2020 14:34:40 +0100 Subject: [PATCH 07/44] ath79: fix nanostation ac loco ethernet interface In 4.14 the delays were not cleared, so setting "rgmii" as phy-mode did not affect delays set by the bootloader. With 5.4 kernel the situation changed and the ethernet interface stopped working. Just taking the ethernetpart from the litebeam ac gen2 will fix the issue. Explained-by: David Bauer Signed-off-by: Nick Hainke --- target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts index 8357632db2..5c16f69d25 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts @@ -12,7 +12,6 @@ phy-mask = <4>; phy4: ethernet-phy@4 { - phy-mode = "rgmii"; reg = <4>; }; }; @@ -21,11 +20,11 @@ status = "okay"; /* default for ar934x, except for 1000M and 10M */ - pll-data = <0x06000000 0x00000101 0x00001313>; + pll-data = <0x02000000 0x00000101 0x00001313>; mtd-mac-address = <&art 0x0>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <&phy4>; gmac-config { From cf5a1abe46fc04402bc950a6b168ec7f5b64aced Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 25 Oct 2020 14:41:31 +0100 Subject: [PATCH 08/44] ath79: define 2.4GHz radio for nanostation ac loco The nanostation ac loco has a 2.4GHz management radio. Signed-off-by: Nick Hainke --- target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts index 5c16f69d25..7f689e0fe3 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts @@ -33,3 +33,9 @@ rxdv-delay = <3>; }; }; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; From 09804da80a99cbff1ff4332083883f58b99a9442 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 25 Oct 2020 12:58:30 +0100 Subject: [PATCH 09/44] ath79: define 2.4GHz radio for litebeam ac gen2 The litebeam ac gen2 has a 2.4GHz management radio. Signed-off-by: Nick Hainke --- target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts index 2e2cdec782..1affbb2994 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts @@ -33,3 +33,9 @@ rxdv-delay = <3>; }; }; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; From 2e746b4d29cb4aa98b680a2797da3db66487a5ce Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 25 Oct 2020 17:24:03 +0000 Subject: [PATCH 10/44] busybox: make username consistent ntpd in packages feed had already a user 'ntp' with UID 123 declared. Rename the username of busybox-ntpd to be 'ntp' instead of 'ntpd' so it doesn't clash. Reported-by: Etienne Champetier Signed-off-by: Daniel Golle --- .../services/dnsmasq/files/dnsmasqsec_hotplug_acl.json | 2 +- package/utils/busybox/Makefile | 2 +- package/utils/busybox/files/sysntpd | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json b/package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json index a5eac3943d..861ecbe034 100644 --- a/package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json +++ b/package/network/services/dnsmasq/files/dnsmasqsec_hotplug_acl.json @@ -1,5 +1,5 @@ { - "user": "ntpd", + "user": "ntp", "access": { "service": { "methods": [ "signal" ] diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 6d9a0088e5..25db4ff387 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -50,7 +50,7 @@ define Package/busybox/Default TITLE:=Core utilities for embedded Linux URL:=http://busybox.net/ DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter - USERID:=ntpd=123:ntpd=123 + USERID:=ntp=123:ntp=123 endef define Package/busybox diff --git a/package/utils/busybox/files/sysntpd b/package/utils/busybox/files/sysntpd index cbc760a48e..db5fc6c034 100755 --- a/package/utils/busybox/files/sysntpd +++ b/package/utils/busybox/files/sysntpd @@ -58,8 +58,8 @@ start_ntpd_instance() { [ -x /sbin/ujail ] && { procd_add_jail ntpd procd_set_param capabilities /etc/capabilities/ntpd.json - procd_set_param user ntpd - procd_set_param group ntpd + procd_set_param user ntp + procd_set_param group ntp procd_set_param no_new_privs 1 } procd_close_instance From 2a0d08d8270f0a299c3ea341019272faa157d427 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 25 Oct 2020 18:07:19 +0000 Subject: [PATCH 11/44] ubus: bump to git HEAD ad0cd11 ubusd_acl: add support for wildcard in methods Signed-off-by: Daniel Golle --- package/system/ubus/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index a1c35a7c0f..fd2ccace6b 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2020-10-21 -PKG_SOURCE_VERSION:=13a4438b4ebdf85d301999e0a615640ac4c9b0a8 -PKG_MIRROR_HASH:=e9e88bb78993a31a33a1c9579f1facca2949c1a4397b842a9f1b469b170be5da +PKG_SOURCE_DATE:=2020-10-25 +PKG_SOURCE_VERSION:=ad0cd117db74934385d81605514e041b1a9cdda9 +PKG_MIRROR_HASH:=8f6908bd826a342ed8e925dfec4744dbf24616f20d20d1af342a18419a3b14de CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 From 6180005debe3f2502e5c2e1839f05682338990b4 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Thu, 20 Aug 2020 09:28:01 +0200 Subject: [PATCH 12/44] layerscape: fix sd-card sysupgrade So far, kernel has not been written correctly to SD card during sysupgrade, as both target path and offset were wrong. This patch fixes it, and adds some descriptive output on the way. Fixes: 0841b68c91d3 ("layerscape: support sysupgrade for SD card ext4 rootfs") Reviewed-by: Yangbo Lu Signed-off-by: Pawel Dembicki [alter/extend commit message] Signed-off-by: Adrian Schmutzler --- target/linux/layerscape/base-files/lib/upgrade/platform.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index 8a136d9439..fa0f21a6c5 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -60,7 +60,8 @@ platform_do_upgrade_sdboot() { if [ -n "$diff" ]; then dd if="$1" of="/dev/$diskdev" bs=1024 count=4 > /dev/null 2>&1 - dd if="$1" of="$diskdev" bs=1024 skip=4 seek=16384 > /dev/null 2>&1 + echo "Writing image to /dev/$diskdev..." + dd if="$1" of="/dev/$diskdev" bs=1024 skip=16384 seek=16384 > /dev/null 2>&1 sync # Separate removal and addtion is necessary; otherwise, partition 1 @@ -72,7 +73,8 @@ platform_do_upgrade_sdboot() { fi # write kernel image - dd if="$1" of="$diskdev" bs=1024 skip=4 seek=16384 count=16384 > /dev/null 2>&1 + echo "Writing kernel to /dev/$diskdev..." + dd if="$1" of="/dev/$diskdev" bs=1024 skip=16384 seek=16384 count=16384 > /dev/null 2>&1 sync # iterate over each partition from the image and write it to the boot disk From 3605eff88190af9cc2905ba750252c1643a1bc7d Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Wed, 19 Aug 2020 12:13:26 +0200 Subject: [PATCH 13/44] layerscape: add dtb to sysupgrade At this moment sysupgrade replaces only kernel and rootfs. This patch add dtb part to sysupgrade images to avoid situation when old dtb make system broken. Is possible to sysupgrade older images for NOR devices: 1. Firmware partition in bootargs need to be updated to: "49m@0xf00000(firmware)". Env should be saved after changes. 2. After step one, "sysupgrade -F" will work. Run tested: LS1046A-RDB Reviewed-by: Yangbo Lu Signed-off-by: Pawel Dembicki [bump PKG_RELEASE for uboot-layerscape] Signed-off-by: Adrian Schmutzler --- package/boot/uboot-layerscape/Makefile | 2 +- .../files/fsl_ls1012a-rdb-uEnv.txt | 2 +- .../files/fsl_ls1021a-twr-uEnv.txt | 2 +- .../files/fsl_ls1043a-rdb-uEnv.txt | 2 +- .../files/fsl_ls1046a-rdb-uEnv.txt | 2 +- .../files/fsl_ls1088a-rdb-uEnv.txt | 2 +- .../files/fsl_ls2088a-rdb-uEnv.txt | 2 +- .../etc/uci-defaults/05_fix-compat-version | 19 ++++++++++++++++++ .../base-files/lib/upgrade/platform.sh | 5 ++++- target/linux/layerscape/image/Makefile | 11 ++++++++-- target/linux/layerscape/image/armv7.mk | 15 +++++++++++--- target/linux/layerscape/image/armv8_64b.mk | 20 ++++++++++++++----- 12 files changed, 66 insertions(+), 18 deletions(-) create mode 100644 target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index 39dcf82be7..66946f48ce 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-layerscape PKG_VERSION:=LSDK-20.04 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot diff --git a/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt index f109a98b85..906feec9ee 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt @@ -3,6 +3,6 @@ loadaddr=0x81000000 fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt index d6c5f56fd9..c0792c51e3 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt @@ -3,6 +3,6 @@ loadaddr=0x81000000 fdt_high=0xffffffff initrd_high=0xffffffff nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) cma=64M@0x0-0xb0000000 +bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) cma=64M@0x0-0xb0000000 bootcmd=echo starting openwrt ...;run nor_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt index 1214bf40c2..3a958ce90c 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt @@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run nor_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt index 975b1c1e7f..a9b91e5ac7 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt @@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run qspi_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt index 7ab5550405..6ac6216d64 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-uEnv.txt @@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto mc_init=sf probe 0:0;sf read 80000000 a00000 300000;sf read 80300000 e00000 100000;fsl_mc start mc 80000000 80300000;sf read 80400000 d00000 100000;fsl_mc apply dpl 80400000 qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock10 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock10 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run mc_init;run qspi_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt index fe2febd2ce..eb10a88d77 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls2088a-rdb-uEnv.txt @@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto mc_init=fsl_mc start mc 580a00000 580e00000;fsl_mc apply dpl 580d00000 nor_boot=cp.b 580f00000 $fdtaddr 100000;cp.b 581000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),48m@0x1000000(firmware) +bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;run mc_init;run nor_boot bootdelay=3 diff --git a/target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..923f4ac273 --- /dev/null +++ b/target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,19 @@ +# +# Copyright (C) 2020 OpenWrt.org +# + +. /lib/functions.sh + +case "$(board_name)" in + fsl,ls1012a-rdb | \ + fsl,ls1021a-twr | \ + fsl,ls1043a-rdb | \ + fsl,ls1046a-rdb | \ + fsl,ls1088a-rdb | \ + fsl,ls2088a-rdb) + uci set system.@system[0].compat_version="2.0" + uci commit system + ;; +esac + +exit 0 diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index fa0f21a6c5..633cbaf953 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -61,7 +61,7 @@ platform_do_upgrade_sdboot() { if [ -n "$diff" ]; then dd if="$1" of="/dev/$diskdev" bs=1024 count=4 > /dev/null 2>&1 echo "Writing image to /dev/$diskdev..." - dd if="$1" of="/dev/$diskdev" bs=1024 skip=16384 seek=16384 > /dev/null 2>&1 + dd if="$1" of="/dev/$diskdev" bs=1024 skip=15360 seek=15360 > /dev/null 2>&1 sync # Separate removal and addtion is necessary; otherwise, partition 1 @@ -72,6 +72,9 @@ platform_do_upgrade_sdboot() { return 0 fi + # write dtb + echo "Writing dtb to /dev/$diskdev..." + dd if="$1" of="/dev/$diskdev" bs=1024 skip=15360 seek=15360 count=1024 > /dev/null 2>&1 # write kernel image echo "Writing kernel to /dev/$diskdev..." dd if="$1" of="/dev/$diskdev" bs=1024 skip=16384 seek=16384 count=16384 > /dev/null 2>&1 diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 8a38a25041..08864b1316 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -11,8 +11,8 @@ LS_SD_ROOTFSPART_OFFSET = 64 LS_SD_IMAGE_SIZE = $(shell echo $$((($(LS_SD_ROOTFSPART_OFFSET) + \ $(CONFIG_TARGET_ROOTFS_PARTSIZE)) * 1024 * 1024))) -# The limitation of flash sysupgrade.bin is 16MB kernel + 32MB rootfs -LS_SYSUPGRADE_IMAGE_SIZE = 48m +# The limitation of flash sysupgrade.bin is 1MB dtb + 16MB kernel + 32MB rootfs +LS_SYSUPGRADE_IMAGE_SIZE = 49m define Build/ls-clean rm -f $@ @@ -46,6 +46,13 @@ define Build/traverse-fit @mv -f $@.new $@ endef +define Device/fix-sysupgrade + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := DTB was added to sysupgrade. Image format is different. \ + To use sysupgrade You need to change firmware partition in bootargs to "49m@0xf00000(firmware)" and saveenv. \ + After that, You can use "sysupgrade -F". +endef + include $(SUBTARGET).mk $(eval $(call BuildImage)) diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 8a86997399..23bd3e8d82 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/target/linux/layerscape/image/armv7.mk @@ -16,12 +16,14 @@ define Device/Default DEVICE_DTS = $(lastword $(subst _, ,$(1))) SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) IMAGE_SIZE := 64m - IMAGE/sysupgrade.bin := append-kernel | pad-to 16M | \ + IMAGE/sysupgrade.bin = ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ + append-kernel | pad-to 17M | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata endef define Device/fsl_ls1021a-twr + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := TWR-LS1021A DEVICE_VARIANT := Default @@ -54,7 +56,8 @@ define Device/fsl_ls1021a-twr-sdboot append-rootfs | check-size $(LS_SD_IMAGE_SIZE) IMAGE/sysupgrade.bin := \ ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ + ls-append-sdhead $(1) | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata endef @@ -67,7 +70,7 @@ define Device/fsl_ls1021a-iot-sdboot DEVICE_DTS := ls1021a-iot FILESYSTEMS := ext4 SUPPORTED_DEVICES := - IMAGES := sdcard.img + IMAGES := sdcard.img sysupgrade.bin IMAGE/sdcard.img := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ @@ -76,5 +79,11 @@ define Device/fsl_ls1021a-iot-sdboot ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | check-size $(LS_SD_IMAGE_SIZE) + IMAGE/sysupgrade.bin := \ + ls-clean | \ + ls-append-sdhead $(1) | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ + append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata endef TARGET_DEVICES += fsl_ls1021a-iot-sdboot diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 6ed3e7c155..35bab47124 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -15,7 +15,8 @@ define Device/Default DEVICE_DTS = freescale/$(subst _,-,$(1)) SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) IMAGE_SIZE := 64m - IMAGE/sysupgrade.bin := append-kernel | pad-to 16M | \ + IMAGE/sysupgrade.bin = ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ + append-kernel | pad-to 17M | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata endef @@ -46,6 +47,7 @@ endef TARGET_DEVICES += fsl_ls1012a-frdm define Device/fsl_ls1012a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1012A-RDB DEVICE_PACKAGES += \ @@ -89,13 +91,15 @@ define Device/fsl_ls1012a-frwy-sdboot append-rootfs | check-size $(LS_SD_IMAGE_SIZE) IMAGE/sysupgrade.bin := \ ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ + ls-append-sdhead $(1) | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata endef TARGET_DEVICES += fsl_ls1012a-frwy-sdboot define Device/fsl_ls1043a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1043A-RDB DEVICE_VARIANT := Default @@ -145,13 +149,15 @@ define Device/fsl_ls1043a-rdb-sdboot append-rootfs | check-size $(LS_SD_IMAGE_SIZE) IMAGE/sysupgrade.bin := \ ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ + ls-append-sdhead $(1) | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata endef TARGET_DEVICES += fsl_ls1043a-rdb-sdboot define Device/fsl_ls1046a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1046A-RDB DEVICE_VARIANT := Default @@ -201,13 +207,15 @@ define Device/fsl_ls1046a-rdb-sdboot append-rootfs | check-size $(LS_SD_IMAGE_SIZE) IMAGE/sysupgrade.bin := \ ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ + ls-append-sdhead $(1) | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata endef TARGET_DEVICES += fsl_ls1046a-rdb-sdboot define Device/fsl_ls1088a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1088A-RDB DEVICE_VARIANT := Default @@ -262,13 +270,15 @@ define Device/fsl_ls1088a-rdb-sdboot append-rootfs | check-size $(LS_SD_IMAGE_SIZE) IMAGE/sysupgrade.bin := \ ls-clean | \ - ls-append-sdhead $(1) | pad-to 16M | \ + ls-append-sdhead $(1) | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata endef TARGET_DEVICES += fsl_ls1088a-rdb-sdboot define Device/fsl_ls2088a-rdb + $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP DEVICE_MODEL := LS2088ARDB DEVICE_PACKAGES += \ From c51f8030b623e03567a73fbcedc4ee69a8896688 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Mon, 24 Aug 2020 12:21:19 +0200 Subject: [PATCH 14/44] layerscape: fix platform_copy_config function At this moment platform_copy_config function is used for every device and function "export_partdevice" without "export_bootdevice" causes multiple errors like that: "sh: 1: unknown operand" This patch fix usage of export_partdevice and split platform_copy_config for sd-card images. Fixes: 0841b68c91d3 ("layerscape: support sysupgrade for SD card ext4 rootfs") Reviewed-by: Yangbo Lu Signed-off-by: Pawel Dembicki --- .../base-files/lib/upgrade/platform.sh | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index 633cbaf953..de01ac46de 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -109,15 +109,33 @@ platform_do_upgrade_traverse_nandubi() { nand_do_upgrade "$1" || (echo "Upgrade failed, setting bootsys ${bootsys}" && fw_setenv bootsys $bootsys) } -platform_copy_config() { - local partdev parttype=ext4 +platform_copy_config_sdboot() { + local diskdev partdev parttype=ext4 + + export_bootdevice && export_partdevice diskdev 0 || { + echo "Unable to determine upgrade device" + return 1 + } if export_partdevice partdev 1; then - mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt + mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt 2>&1 cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" umount /mnt fi } +platform_copy_config() { + local board=$(board_name) + + case "$board" in + fsl,ls1012a-frwy-sdboot | \ + fsl,ls1021a-twr-sdboot | \ + fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-rdb-sdboot | \ + fsl,ls1088a-rdb-sdboot) + platform_copy_config_sdboot + ;; + esac +} platform_check_image() { local board=$(board_name) From a254279a6c3048feb83909649c41ee4a7d37ec93 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Mon, 24 Aug 2020 14:29:32 +0200 Subject: [PATCH 15/44] layerscape: Change to combined rootfs on sd images At this moment layerscape images are ext4 only. It causes problem with save changes durring sysupgrade and make "firstboot" and failsafe mode useless. This patch changes sd-card images to squashfs + f2fs combined images. To make place, for saving config, kernel space ar now ext4 partition with fit kernel. This method of image generation is similar to rest of OpenWrt sd-card targets. Reviewed-by: Yangbo Lu Signed-off-by: Pawel Dembicki [reword README, reword DEVICE_COMPAT_MESSAGE, keep original indent] Signed-off-by: Adrian Schmutzler --- .../files/fsl_ls1012a-frwy-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1021a-iot-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1021a-twr-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1043a-rdb-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1046a-rdb-sdboot-uEnv.txt | 6 +- .../files/fsl_ls1088a-rdb-sdboot-uEnv.txt | 4 +- target/linux/layerscape/Makefile | 4 +- target/linux/layerscape/README | 9 +- target/linux/layerscape/armv7/config-5.4 | 3 + target/linux/layerscape/armv8_64b/config-5.4 | 3 + .../etc/uci-defaults/05_fix-compat-version | 6 + .../base-files/lib/preinit/79_move_config | 26 +++++ .../base-files/lib/upgrade/platform.sh | 107 ++++-------------- target/linux/layerscape/image/Makefile | 28 ++++- target/linux/layerscape/image/armv7.mk | 42 +++---- target/linux/layerscape/image/armv8_64b.mk | 84 ++++++-------- .../layerscape/image/gen_sdcard_head_img.sh | 14 ++- 17 files changed, 168 insertions(+), 192 deletions(-) create mode 100644 target/linux/layerscape/base-files/lib/preinit/79_move_config diff --git a/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt index 31178df690..1fcd769dc9 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1012a-frwy-sdboot-uEnv.txt @@ -1,8 +1,8 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff +fdt_high=0x8fffffff initrd_high=0xffffffffffffffff -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;pfe stop;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt index 7772daa100..ed8661bc6e 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1021a-iot-sdboot-uEnv.txt @@ -1,8 +1,8 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffff +fdt_high=0x8fffffff initrd_high=0xffffffff -sd_boot=mmc read ${fdtaddr} 7800 800;mmc read ${loadaddr} 8000 8000;bootm ${loadaddr} - ${fdtaddr} -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt index da286a24ae..ed8661bc6e 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-sdboot-uEnv.txt @@ -1,8 +1,8 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffff +fdt_high=0x8fffffff initrd_high=0xffffffff -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 cma=64M@0x0-0xb0000000 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt index c1596b506a..6034033876 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-sdboot-uEnv.txt @@ -1,9 +1,9 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff +fdt_high=0x8fffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt index c1596b506a..6034033876 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-sdboot-uEnv.txt @@ -1,9 +1,9 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff +fdt_high=0x8fffffff initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run sd_boot bootdelay=3 diff --git a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt index 2d27f7eb05..b25e9c8ee7 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1088a-rdb-sdboot-uEnv.txt @@ -4,7 +4,7 @@ fdt_high=0xa0000000 initrd_high=0xffffffffffffffff hwconfig=fsl_ddr:bank_intlv=auto mc_init=mmc read 80000000 5000 1800;mmc read 80300000 7000 800;fsl_mc start mc 80000000 80300000;mmc read 80400000 6800 800;fsl_mc apply dpl 80400000 -sd_boot=mmc read $fdtaddr 7800 800;mmc read $loadaddr 8000 8000;bootm $loadaddr - $fdtaddr -bootargs=root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 +sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr +bootargs=root=/dev/mmcblk0p2 rw rootwait rootfstype=squashfs,f2fs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 bootcmd=echo starting openwrt ...;run mc_init;run sd_boot bootdelay=3 diff --git a/target/linux/layerscape/Makefile b/target/linux/layerscape/Makefile index c5b27ad0c7..9030747823 100644 --- a/target/linux/layerscape/Makefile +++ b/target/linux/layerscape/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk BOARD:=layerscape BOARDNAME:=NXP Layerscape KERNEL_PATCHVER:=5.4 -FEATURES:=squashfs nand usb pcie gpio fpu ubifs ext4 +FEATURES:=squashfs nand usb pcie gpio fpu ubifs ext4 rootfs-part boot-part SUBTARGETS:=armv8_64b armv7 define Target/Description @@ -19,6 +19,6 @@ endef include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += kmod-usb3 kmod-usb-dwc3 kmod-usb-storage \ - partx-utils + mkf2fs e2fsprogs partx-utils $(eval $(call BuildTarget)) diff --git a/target/linux/layerscape/README b/target/linux/layerscape/README index 8cbf05bd15..4bade4a9c0 100644 --- a/target/linux/layerscape/README +++ b/target/linux/layerscape/README @@ -39,13 +39,14 @@ $ ./scripts/feeds install -a * Final firmware/image Path: bin/targets/layerscape// Firmware for flash: openwrt-layerscape----firmware.bin - Image for SD card: openwrt-layerscape----sdcard.img + Image for SD card: openwrt-layerscape----sdcard.img.gz + Sysupgrade images: openwrt-layerscape----sysupgrade.bin 3. Program NOR/QSPI flash or SD card ------------------------------------ -The firmware.bin or sdcard.img is an all-in-one image including all things for -OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.) +The firmware.bin or sdcard.img (after extract from gz) is an all-in-one image including all +things for OpenWrt staring up. (except LS1012AFRWY. Refer to 3.3.) If you want to install all things into flash, please use firmware.bin. If you want to install all things into SD card, please use sdcard.img. @@ -53,7 +54,7 @@ If you want to install all things into SD card, please use sdcard.img. --------------------------------- sdcard.img could be programmed to SD card in either u-boot environment or linux environment. After programming, configure the board to boot -from SD card. +from SD card. (sdcard.img images are gz-iped to save space. Please extract them first.) * u-boot environment diff --git a/target/linux/layerscape/armv7/config-5.4 b/target/linux/layerscape/armv7/config-5.4 index 56a6dfd913..1b969afd85 100644 --- a/target/linux/layerscape/armv7/config-5.4 +++ b/target/linux/layerscape/armv7/config-5.4 @@ -242,6 +242,9 @@ CONFIG_EVENT_TRACING=y CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y +CONFIG_F2FS_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_STAT_FS=y CONFIG_FAILOVER=y CONFIG_FAT_FS=y # CONFIG_FEC is not set diff --git a/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4 index 311f2eee84..6da7ff01a5 100644 --- a/target/linux/layerscape/armv8_64b/config-5.4 +++ b/target/linux/layerscape/armv8_64b/config-5.4 @@ -266,6 +266,9 @@ CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y CONFIG_EXTCON=y CONFIG_EXTCON_USB_GPIO=y +CONFIG_F2FS_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_STAT_FS=y CONFIG_FAILOVER=y CONFIG_FANOTIFY=y CONFIG_FAT_FS=y diff --git a/target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version index 923f4ac273..6cd137af9a 100644 --- a/target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version +++ b/target/linux/layerscape/base-files/etc/uci-defaults/05_fix-compat-version @@ -5,11 +5,17 @@ . /lib/functions.sh case "$(board_name)" in + fsl,ls1012a-frwy-sdboot | \ fsl,ls1012a-rdb | \ + fsl,ls1021a-iot-sdboot | \ fsl,ls1021a-twr | \ + fsl,ls1021a-twr-sdboot | \ fsl,ls1043a-rdb | \ + fsl,ls1043a-rdb-sdboot | \ fsl,ls1046a-rdb | \ + fsl,ls1046a-rdb-sdboot | \ fsl,ls1088a-rdb | \ + fsl,ls1088a-rdb-sdboot | \ fsl,ls2088a-rdb) uci set system.@system[0].compat_version="2.0" uci commit system diff --git a/target/linux/layerscape/base-files/lib/preinit/79_move_config b/target/linux/layerscape/base-files/lib/preinit/79_move_config new file mode 100644 index 0000000000..d691fa99f1 --- /dev/null +++ b/target/linux/layerscape/base-files/lib/preinit/79_move_config @@ -0,0 +1,26 @@ +. /lib/functions.sh +. /lib/upgrade/common.sh + +BOOTPART=/dev/mmcblk0p1 + +move_config() { + local board=$(board_name) + + case "$board" in + fsl,ls1012a-frwy-sdboot | \ + fsl,ls1021a-iot-sdboot | \ + fsl,ls1021a-twr-sdboot | \ + fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-rdb-sdboot | \ + fsl,ls1088a-rdb-sdboot) + if [ -b $BOOTPART ]; then + mkdir -p /boot + mount -t ext4 -o rw,noatime $BOOTPART /boot 2>&1 + [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / + umount /boot + fi + ;; + esac +} + +boot_hook_add preinit_mount_root move_config diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index de01ac46de..a8d83de7ea 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -8,88 +8,28 @@ RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock" REQUIRE_IMAGE_METADATA=1 -platform_check_image_sdboot() { - local diskdev partdev diff - - export_bootdevice && export_partdevice diskdev 0 || { - echo "Unable to determine upgrade device" - return 1 - } - - # get partitions table from boot device - get_partitions "/dev/$diskdev" bootdisk - - # get partitions table from sysupgrade.bin - dd if="$1" of=/tmp/image.bs bs=512b count=1 > /dev/null 2>&1 - sync - get_partitions /tmp/image.bs image - - # compare tables - diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)" - - rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image - - if [ -n "$diff" ]; then - echo "Partition layout has changed. Full image will be written." - ask_bool 0 "Abort" && exit 1 - return 0 - fi -} platform_do_upgrade_sdboot() { - local diskdev partdev diff + local diskdev partdev parttype=ext4 + local tar_file="$1" + local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$') + board_dir=${board_dir%/} export_bootdevice && export_partdevice diskdev 0 || { echo "Unable to determine upgrade device" return 1 } - if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then - # get partitions table from boot device - get_partitions "/dev/$diskdev" bootdisk - - # get partitions table from sysupgrade.bin - dd if="$1" of=/tmp/image.bs bs=512b count=1 > /dev/null 2>&1 - sync - get_partitions /tmp/image.bs image - - # compare tables - diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)" - else - diff=1 + if export_partdevice partdev 1; then + mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt 2>&1 + echo "Writing kernel..." + tar xf $tar_file ${board_dir}/kernel -O > /mnt/fitImage + umount /mnt fi - if [ -n "$diff" ]; then - dd if="$1" of="/dev/$diskdev" bs=1024 count=4 > /dev/null 2>&1 - echo "Writing image to /dev/$diskdev..." - dd if="$1" of="/dev/$diskdev" bs=1024 skip=15360 seek=15360 > /dev/null 2>&1 - sync - - # Separate removal and addtion is necessary; otherwise, partition 1 - # will be missing if it overlaps with the old partition 2 - partx -d - "/dev/$diskdev" - partx -a - "/dev/$diskdev" - - return 0 - fi - - # write dtb - echo "Writing dtb to /dev/$diskdev..." - dd if="$1" of="/dev/$diskdev" bs=1024 skip=15360 seek=15360 count=1024 > /dev/null 2>&1 - # write kernel image - echo "Writing kernel to /dev/$diskdev..." - dd if="$1" of="/dev/$diskdev" bs=1024 skip=16384 seek=16384 count=16384 > /dev/null 2>&1 - sync - - # iterate over each partition from the image and write it to the boot disk - while read part start size; do - if export_partdevice partdev $part; then - echo "Writing image to /dev/$partdev..." - dd if="$1" of="/dev/$partdev" bs=512 skip="$start" count="$size" > /dev/null 2>&1 - sync - else - echo "Unable to find partition $part device, skipped." - fi - done < /tmp/partmap.image + echo "Erasing rootfs..." + dd if=/dev/zero of=/dev/mmcblk0p2 bs=1M > /dev/null 2>&1 + echo "Writing rootfs..." + tar xf $tar_file ${board_dir}/root -O | dd of=/dev/mmcblk0p2 bs=512k > /dev/null 2>&1 } platform_do_upgrade_traverse_nandubi() { @@ -119,6 +59,7 @@ platform_copy_config_sdboot() { if export_partdevice partdev 1; then mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt 2>&1 + echo "Saving config backup..." cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" umount /mnt fi @@ -128,6 +69,7 @@ platform_copy_config() { case "$board" in fsl,ls1012a-frwy-sdboot | \ + fsl,ls1021a-iot-sdboot | \ fsl,ls1021a-twr-sdboot | \ fsl,ls1043a-rdb-sdboot | \ fsl,ls1046a-rdb-sdboot | \ @@ -146,20 +88,18 @@ platform_check_image() { return $? ;; fsl,ls1012a-frdm | \ - fsl,ls1012a-rdb | \ - fsl,ls1021a-twr | \ - fsl,ls1043a-rdb | \ - fsl,ls1046a-rdb | \ - fsl,ls1088a-rdb | \ - fsl,ls2088a-rdb) - return 0 - ;; fsl,ls1012a-frwy-sdboot | \ + fsl,ls1012a-rdb | \ + fsl,ls1021a-iot-sdboot | \ + fsl,ls1021a-twr | \ fsl,ls1021a-twr-sdboot | \ + fsl,ls1043a-rdb | \ fsl,ls1043a-rdb-sdboot | \ + fsl,ls1046a-rdb | \ fsl,ls1046a-rdb-sdboot | \ - fsl,ls1088a-rdb-sdboot) - platform_check_image_sdboot "$1" + fsl,ls1088a-rdb | \ + fsl,ls1088a-rdb-sdboot | \ + fsl,ls2088a-rdb) return 0 ;; *) @@ -192,6 +132,7 @@ platform_do_upgrade() { default_do_upgrade "$1" ;; fsl,ls1012a-frwy-sdboot | \ + fsl,ls1021a-iot-sdboot | \ fsl,ls1021a-twr-sdboot | \ fsl,ls1043a-rdb-sdboot | \ fsl,ls1046a-rdb-sdboot | \ diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 08864b1316..bfc4af4ca4 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -7,13 +7,22 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +LS_SD_KERNELPART_SIZE = 40 +LS_SD_KERNELPART_OFFSET = 16 LS_SD_ROOTFSPART_OFFSET = 64 LS_SD_IMAGE_SIZE = $(shell echo $$((($(LS_SD_ROOTFSPART_OFFSET) + \ - $(CONFIG_TARGET_ROOTFS_PARTSIZE)) * 1024 * 1024))) + $(CONFIG_TARGET_ROOTFS_PARTSIZE))))) # The limitation of flash sysupgrade.bin is 1MB dtb + 16MB kernel + 32MB rootfs LS_SYSUPGRADE_IMAGE_SIZE = 49m +define Image/Prepare + # Build .dtb for all boards we may run on + $(foreach dts,$(DEVICE_DTS_LIST), + $(call Image/BuildDTB,$(DTS_DIR)/$(dts).dts,$(DTS_DIR)/$(dts).dtb) + ) +endef + define Build/ls-clean rm -f $@ endef @@ -23,12 +32,21 @@ define Build/ls-append endef define Build/ls-append-dtb - $(call Image/BuildDTB,$(DTS_DIR)/$(1).dts,$(DTS_DIR)/$(1).dtb) dd if=$(DTS_DIR)/$(1).dtb >> $@ endef +define Build/ls-append-kernel + mkdir -p $@.tmp && \ + cp $(IMAGE_KERNEL) $@.tmp/fitImage && \ + make_ext4fs -J -L kernel -l "$(LS_SD_KERNELPART_SIZE)M" "$@.kernel.part" "$@.tmp" && \ + dd if=$@.kernel.part >> $@ && \ + rm -rf $@.tmp && \ + rm -f $@.kernel.part +endef + define Build/ls-append-sdhead ./gen_sdcard_head_img.sh $(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img \ + $(LS_SD_KERNELPART_OFFSET) $(LS_SD_KERNELPART_SIZE) \ $(LS_SD_ROOTFSPART_OFFSET) $(CONFIG_TARGET_ROOTFS_PARTSIZE) dd if=$(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img >> $@ endef @@ -53,6 +71,12 @@ define Device/fix-sysupgrade After that, You can use "sysupgrade -F". endef +define Device/rework-sdcard-images + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := SD-card images were changed to squashfs + ext4 overlay combined images. \ + It is required to flash the entire sd-card again and manually copy config. +endef + include $(SUBTARGET).mk $(eval $(call BuildImage)) diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 23bd3e8d82..46e5cf9395 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/target/linux/layerscape/image/armv7.mk @@ -40,50 +40,40 @@ endef TARGET_DEVICES += fsl_ls1021a-twr define Device/fsl_ls1021a-twr-sdboot + $(Device/rework-sdcard-images) DEVICE_VENDOR := NXP DEVICE_MODEL := TWR-LS1021A DEVICE_VARIANT := SD Card Boot DEVICE_DTS := ls1021a-twr - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-uboot.bin | pad-to 3M | \ - ls-append $(1)-uboot-env.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append $(1)-uboot-env.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1021a-twr-sdboot define Device/fsl_ls1021a-iot-sdboot + $(Device/rework-sdcard-images) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1021A-IoT DEVICE_VARIANT := SD Card Boot DEVICE_DTS := ls1021a-iot - FILESYSTEMS := ext4 SUPPORTED_DEVICES := - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-uboot.bin | pad-to 1M | \ - ls-append $(1)-uboot-env.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append $(1)-uboot-env.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1021a-iot-sdboot diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 35bab47124..ff480c287b 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -67,6 +67,7 @@ endef TARGET_DEVICES += fsl_ls1012a-rdb define Device/fsl_ls1012a-frwy-sdboot + $(Device/rework-sdcard-images) DEVICE_VENDOR := NXP DEVICE_MODEL := FRWY-LS1012A DEVICE_PACKAGES += \ @@ -74,8 +75,8 @@ define Device/fsl_ls1012a-frwy-sdboot tfa-ls1012a-frwy-sdboot \ kmod-ppfe DEVICE_DTS := freescale/fsl-ls1012a-frwy - FILESYSTEMS := ext4 - IMAGES := firmware.bin sdcard.img sysupgrade.bin + KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := firmware.bin sdcard.img.gz sysupgrade.bin IMAGE/firmware.bin := \ ls-clean | \ ls-append $(1)-bl2.pbl | pad-to 128K | \ @@ -83,18 +84,12 @@ define Device/fsl_ls1012a-frwy-sdboot ls-append $(1)-fip.bin | pad-to 1856K | \ ls-append $(1)-uboot-env.bin | pad-to 2048K | \ check-size 2097153 - IMAGE/sdcard.img := \ + IMAGE/sdcard.img.gz := \ ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append-sdhead $(1) | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1012a-frwy-sdboot @@ -124,6 +119,7 @@ endef TARGET_DEVICES += fsl_ls1043a-rdb define Device/fsl_ls1043a-rdb-sdboot + $(Device/rework-sdcard-images) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1043A-RDB DEVICE_VARIANT := SD Card Boot @@ -135,24 +131,18 @@ define Device/fsl_ls1043a-rdb-sdboot kmod-hwmon-ina2xx \ kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ ls-append $(1)-fip.bin | pad-to 5M | \ ls-append $(1)-uboot-env.bin | pad-to 9M | \ - ls-append fsl_ls1043a-rdb-fman.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append fsl_ls1043a-rdb-fman.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1043a-rdb-sdboot @@ -182,6 +172,7 @@ endef TARGET_DEVICES += fsl_ls1046a-rdb define Device/fsl_ls1046a-rdb-sdboot + $(Device/rework-sdcard-images) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1046A-RDB DEVICE_VARIANT := SD Card Boot @@ -193,24 +184,18 @@ define Device/fsl_ls1046a-rdb-sdboot kmod-hwmon-ina2xx \ kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ ls-append $(1)-fip.bin | pad-to 5M | \ ls-append $(1)-uboot-env.bin | pad-to 9M | \ - ls-append fsl_ls1046a-rdb-fman.bin | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append fsl_ls1046a-rdb-fman.bin | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1046a-rdb-sdboot @@ -242,6 +227,7 @@ endef TARGET_DEVICES += fsl_ls1088a-rdb define Device/fsl_ls1088a-rdb-sdboot + $(Device/rework-sdcard-images) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1088A-RDB DEVICE_VARIANT := SD Card Boot @@ -254,9 +240,9 @@ define Device/fsl_ls1088a-rdb-sdboot kmod-hwmon-ina2xx \ kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1088a-rdb - FILESYSTEMS := ext4 - IMAGES := sdcard.img sysupgrade.bin - IMAGE/sdcard.img := \ + KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ @@ -264,16 +250,10 @@ define Device/fsl_ls1088a-rdb-sdboot ls-append $(1)-uboot-env.bin | pad-to 10M | \ ls-append fsl_ls1088a-rdb-mc.itb | pad-to 13M | \ ls-append fsl_ls1088a-rdb-dpl.dtb | pad-to 14M | \ - ls-append fsl_ls1088a-rdb-dpc.dtb | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) - IMAGE/sysupgrade.bin := \ - ls-clean | \ - ls-append-sdhead $(1) | pad-to 15M | \ - ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ - append-rootfs | check-size $(LS_SD_IMAGE_SIZE) | append-metadata + ls-append fsl_ls1088a-rdb-dpc.dtb | pad-to 16M | \ + ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ + append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1088a-rdb-sdboot diff --git a/target/linux/layerscape/image/gen_sdcard_head_img.sh b/target/linux/layerscape/image/gen_sdcard_head_img.sh index 08ab4497d5..d3a8fd2d12 100755 --- a/target/linux/layerscape/image/gen_sdcard_head_img.sh +++ b/target/linux/layerscape/image/gen_sdcard_head_img.sh @@ -7,16 +7,18 @@ # set -x -[ $# -eq 3 ] || { - echo "SYNTAX: $0 " +[ $# -eq 5 ] || { + echo "SYNTAX: $0 " exit 1 } OUTPUT="$1" -ROOTFSOFFSET="$(($2 * 1024))" -ROOTFSSIZE="$3" +KERNELOFFSET="$(($2 * 1024))" +KERNELSIZE="$3" +ROOTFSOFFSET="$(($4 * 1024))" +ROOTFSSIZE="$5" head=4 -sect=16 +sect=63 -set $(ptgen -o $OUTPUT -h $head -s $sect -l $ROOTFSOFFSET -t 83 -p ${ROOTFSSIZE}M) +set $(ptgen -o $OUTPUT -h $head -s $sect -t 83 -p ${KERNELSIZE}M@${KERNELOFFSET} -p ${ROOTFSSIZE}M@${ROOTFSOFFSET}) From 48a634a41f9d055e30e639f71e323ba1e0f8dd89 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 25 Oct 2020 17:53:53 +0100 Subject: [PATCH 16/44] layerscape: create shared definitions for sdboot devices This moves a few shared variables for SD-Boot devices into common definitions in order to reduce duplicate code. Signed-off-by: Adrian Schmutzler --- target/linux/layerscape/image/armv7.mk | 17 ++++++------- target/linux/layerscape/image/armv8_64b.mk | 28 ++++++++++------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 46e5cf9395..33bf145332 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/target/linux/layerscape/image/armv7.mk @@ -22,6 +22,13 @@ define Device/Default check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata endef +define Device/fsl-sdboot + $(Device/rework-sdcard-images) + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef + define Device/fsl_ls1021a-twr $(Device/fix-sysupgrade) DEVICE_VENDOR := NXP @@ -40,13 +47,11 @@ endef TARGET_DEVICES += fsl_ls1021a-twr define Device/fsl_ls1021a-twr-sdboot - $(Device/rework-sdcard-images) + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := TWR-LS1021A DEVICE_VARIANT := SD Card Boot DEVICE_DTS := ls1021a-twr - KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES := sdcard.img.gz sysupgrade.bin IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ @@ -54,19 +59,16 @@ define Device/fsl_ls1021a-twr-sdboot ls-append $(1)-uboot-env.bin | pad-to 16M | \ ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1021a-twr-sdboot define Device/fsl_ls1021a-iot-sdboot - $(Device/rework-sdcard-images) + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1021A-IoT DEVICE_VARIANT := SD Card Boot DEVICE_DTS := ls1021a-iot SUPPORTED_DEVICES := - KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES := sdcard.img.gz sysupgrade.bin IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ @@ -74,6 +76,5 @@ define Device/fsl_ls1021a-iot-sdboot ls-append $(1)-uboot-env.bin | pad-to 16M | \ ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1021a-iot-sdboot diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index ff480c287b..e9304c5101 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -21,6 +21,13 @@ define Device/Default check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata endef +define Device/fsl-sdboot + $(Device/rework-sdcard-images) + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + IMAGES := sdcard.img.gz sysupgrade.bin + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef + define Device/fsl_ls1012a-frdm DEVICE_VENDOR := NXP DEVICE_MODEL := FRDM-LS1012A @@ -67,7 +74,7 @@ endef TARGET_DEVICES += fsl_ls1012a-rdb define Device/fsl_ls1012a-frwy-sdboot - $(Device/rework-sdcard-images) + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := FRWY-LS1012A DEVICE_PACKAGES += \ @@ -75,8 +82,7 @@ define Device/fsl_ls1012a-frwy-sdboot tfa-ls1012a-frwy-sdboot \ kmod-ppfe DEVICE_DTS := freescale/fsl-ls1012a-frwy - KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES := firmware.bin sdcard.img.gz sysupgrade.bin + IMAGES += firmware.bin IMAGE/firmware.bin := \ ls-clean | \ ls-append $(1)-bl2.pbl | pad-to 128K | \ @@ -89,7 +95,6 @@ define Device/fsl_ls1012a-frwy-sdboot ls-append-sdhead $(1) | pad-to 16M | \ ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1012a-frwy-sdboot @@ -119,7 +124,7 @@ endef TARGET_DEVICES += fsl_ls1043a-rdb define Device/fsl_ls1043a-rdb-sdboot - $(Device/rework-sdcard-images) + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1043A-RDB DEVICE_VARIANT := SD Card Boot @@ -131,8 +136,6 @@ define Device/fsl_ls1043a-rdb-sdboot kmod-hwmon-ina2xx \ kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk - KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES := sdcard.img.gz sysupgrade.bin IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ @@ -142,7 +145,6 @@ define Device/fsl_ls1043a-rdb-sdboot ls-append fsl_ls1043a-rdb-fman.bin | pad-to 16M | \ ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1043a-rdb-sdboot @@ -172,7 +174,7 @@ endef TARGET_DEVICES += fsl_ls1046a-rdb define Device/fsl_ls1046a-rdb-sdboot - $(Device/rework-sdcard-images) + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1046A-RDB DEVICE_VARIANT := SD Card Boot @@ -184,8 +186,6 @@ define Device/fsl_ls1046a-rdb-sdboot kmod-hwmon-ina2xx \ kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk - KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES := sdcard.img.gz sysupgrade.bin IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ @@ -195,7 +195,6 @@ define Device/fsl_ls1046a-rdb-sdboot ls-append fsl_ls1046a-rdb-fman.bin | pad-to 16M | \ ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1046a-rdb-sdboot @@ -227,7 +226,7 @@ endef TARGET_DEVICES += fsl_ls1088a-rdb define Device/fsl_ls1088a-rdb-sdboot - $(Device/rework-sdcard-images) + $(Device/fsl-sdboot) DEVICE_VENDOR := NXP DEVICE_MODEL := LS1088A-RDB DEVICE_VARIANT := SD Card Boot @@ -240,8 +239,6 @@ define Device/fsl_ls1088a-rdb-sdboot kmod-hwmon-ina2xx \ kmod-hwmon-lm90 DEVICE_DTS := freescale/fsl-ls1088a-rdb - KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES := sdcard.img.gz sysupgrade.bin IMAGE/sdcard.img.gz := \ ls-clean | \ ls-append-sdhead $(1) | pad-to 4K | \ @@ -253,7 +250,6 @@ define Device/fsl_ls1088a-rdb-sdboot ls-append fsl_ls1088a-rdb-dpc.dtb | pad-to 16M | \ ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \ append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += fsl_ls1088a-rdb-sdboot From 46fd198338bec45915dc8a882d0b1826490f6842 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 25 Oct 2020 17:58:49 +0100 Subject: [PATCH 17/44] layerscape: harmonize wrapping for IMAGE/* definitions Always keep the first line empty for multi-line IMAGE/* definitions. Signed-off-by: Adrian Schmutzler --- target/linux/layerscape/image/armv7.mk | 3 ++- target/linux/layerscape/image/armv8_64b.mk | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 33bf145332..776a6e5ac2 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/target/linux/layerscape/image/armv7.mk @@ -16,7 +16,8 @@ define Device/Default DEVICE_DTS = $(lastword $(subst _, ,$(1))) SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) IMAGE_SIZE := 64m - IMAGE/sysupgrade.bin = ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ + IMAGE/sysupgrade.bin = \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ append-kernel | pad-to 17M | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index e9304c5101..23af3e26a0 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -15,7 +15,8 @@ define Device/Default DEVICE_DTS = freescale/$(subst _,-,$(1)) SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) IMAGE_SIZE := 64m - IMAGE/sysupgrade.bin = ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ + IMAGE/sysupgrade.bin = \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \ append-kernel | pad-to 17M | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata @@ -45,7 +46,8 @@ define Device/fsl_ls1012a-frdm ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size - IMAGE/sysupgrade.bin := append-kernel | pad-to $$(BLOCKSIZE) | \ + IMAGE/sysupgrade.bin := \ + append-kernel | pad-to $$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | \ check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb From 3b94a39c14a254e81181c1ab2a6d7b6f9aed4ba4 Mon Sep 17 00:00:00 2001 From: Biwen Li Date: Thu, 6 Aug 2020 06:49:00 +0000 Subject: [PATCH 18/44] layerscape: update kernel to LSDK-20.04-V5.4-update-290520 Update kernel from LSDK-20.04-V5.4 to LSDK-20.04-V5.4-update-290520. Only two patches added for Layerscape. LSDK kernel link https://source.codeaurora.org/external/qoriq/qoriq-components/linux/ Signed-off-by: Biwen Li Signed-off-by: Yangbo Lu --- ...x2160a-add-more-thermal-zone-support.patch | 189 ++++++++++++++++++ ...-qoriq-Update-the-settings-for-TMUv2.patch | 85 ++++++++ 2 files changed, 274 insertions(+) create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch create mode 100644 target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch diff --git a/target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch b/target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch new file mode 100644 index 0000000000..7a3d8be94b --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0119-arm64-dts-lx2160a-add-more-thermal-zone-support.patch @@ -0,0 +1,189 @@ +From eba73069e7f6ac3bcb3669d980994ec42ddd810a Mon Sep 17 00:00:00 2001 +From: Yuantian Tang +Date: Thu, 16 Apr 2020 17:40:06 +0800 +Subject: [PATCH] arm64: dts: lx2160a: add more thermal zone support + +There are 7 thermal zones in lx2160a soc. Add the +rest thermal zone node to enable them. +Also correct one of the values for tmu-calibration property. + +Signed-off-by: Yuantian Tang +--- + .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 130 +++++++++++++++++- + 1 file changed, 125 insertions(+), 5 deletions(-) + +diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +index cab7468c3..fe9b8bf4d 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +@@ -440,19 +440,19 @@ + }; + + thermal-zones { +- core_thermal1: core-thermal1 { ++ cluster6-7 { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&tmu 0>; + + trips { +- core_cluster_alert: core-cluster-alert { ++ cluster6_7_alert: cluster6-7-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + +- core_cluster_crit: core-cluster-crit { ++ cluster6_7_crit: cluster6-7-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; +@@ -461,7 +461,7 @@ + + cooling-maps { + map0 { +- trip = <&core_cluster_alert>; ++ trip = <&cluster6_7_alert>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, +@@ -482,6 +482,126 @@ + }; + }; + }; ++ ++ ddr-cluster5 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 1>; ++ ++ trips { ++ ddr-cluster5-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ ddr-cluster5-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ wriop { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 2>; ++ ++ trips { ++ wriop-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ wriop-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ dce-qbman-hsio2 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 3>; ++ ++ trips { ++ dce-qbman-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ dce-qbman-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ ccn-dpaa-tbu { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 4>; ++ ++ trips { ++ ccn-dpaa-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ ccn-dpaa-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ cluster4-hsio3 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 5>; ++ ++ trips { ++ clust4-hsio3-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ clust4-hsio3-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; ++ ++ cluster2-3 { ++ polling-delay-passive = <1000>; ++ polling-delay = <5000>; ++ thermal-sensors = <&tmu 6>; ++ ++ trips { ++ cluster2-3-alert { ++ temperature = <85000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ ++ cluster2-3-crit { ++ temperature = <95000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ }; + }; + + soc { +@@ -760,7 +880,7 @@ + /* Calibration data group 1 */ + <0x00000000 0x00000035 + /* Calibration data group 2 */ +- 0x00010001 0x00000154>; ++ 0x00000001 0x00000154>; + little-endian; + #thermal-sensor-cells = <1>; + }; +-- +2.17.1 + diff --git a/target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch b/target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch new file mode 100644 index 0000000000..9534bdc3dd --- /dev/null +++ b/target/linux/layerscape/patches-5.4/818-thermal-0004-thermal-qoriq-Update-the-settings-for-TMUv2.patch @@ -0,0 +1,85 @@ +From da5a7765a20d34508036ba8ed1db87e546abcf4b Mon Sep 17 00:00:00 2001 +From: Yuantian Tang +Date: Mon, 25 May 2020 17:33:22 +0800 +Subject: [PATCH] thermal: qoriq: Update the settings for TMUv2 + +For TMU v2, TMSAR registers need to be set properly to get the +accurate temperature values. +Also the temperature read needs to be converted to degree Celsius +since it is in degrees Kelvin. + +Signed-off-by: Yuantian Tang +--- + drivers/thermal/qoriq_thermal.c | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c +index ba7d6105a..8b371fd3d 100644 +--- a/drivers/thermal/qoriq_thermal.c ++++ b/drivers/thermal/qoriq_thermal.c +@@ -23,6 +23,7 @@ + #define TMTMIR_DEFAULT 0x0000000f + #define TIER_DISABLE 0x0 + #define TEUMR0_V2 0x51009c00 ++#define TMSARA_V2 0xe + #define TMU_VER1 0x1 + #define TMU_VER2 0x2 + +@@ -35,6 +36,13 @@ struct qoriq_tmu_site_regs { + u8 res0[0x8]; + }; + ++struct qoriq_tmu_tmsar { ++ u32 res0; ++ u32 tmsar; ++ u32 res1; ++ u32 res2; ++}; ++ + struct qoriq_tmu_regs_v1 { + u32 tmr; /* Mode Register */ + u32 tsr; /* Status Register */ +@@ -95,7 +103,9 @@ struct qoriq_tmu_regs_v2 { + u32 tscfgr; /* Sensor Configuration Register */ + u8 res6[0x78]; + struct qoriq_tmu_site_regs site[SITES_MAX]; +- u8 res7[0x9f8]; ++ u8 res10[0x100]; ++ struct qoriq_tmu_tmsar tmsar[16]; ++ u8 res7[0x7f8]; + u32 ipbrr0; /* IP Block Revision Register 0 */ + u32 ipbrr1; /* IP Block Revision Register 1 */ + u8 res8[0x300]; +@@ -158,7 +168,10 @@ static int tmu_get_temp(void *p, int *temp) + u32 val; + + val = tmu_read(qdata, &qdata->regs->site[qsensor->id].tritsr); +- *temp = (val & 0xff) * 1000; ++ if (qdata->ver == TMU_VER1) ++ *temp = (val & 0xff) * 1000; ++ else ++ *temp = (val & 0x1ff) * 1000 - 273150; + + return 0; + } +@@ -319,6 +332,8 @@ static int qoriq_tmu_calibration(struct platform_device *pdev) + + static void qoriq_tmu_init_device(struct qoriq_tmu_data *data) + { ++ int i; ++ + /* Disable interrupt, using polling instead */ + tmu_write(data, TIER_DISABLE, &data->regs->tier); + +@@ -328,6 +343,8 @@ static void qoriq_tmu_init_device(struct qoriq_tmu_data *data) + } else { + tmu_write(data, TMTMIR_DEFAULT, &data->regs_v2->tmtmir); + tmu_write(data, TEUMR0_V2, &data->regs_v2->teumr0); ++ for (i = 0; i < 7; i++) ++ tmu_write(data, TMSARA_V2, &data->regs_v2->tmsar[i].tmsar); + } + + /* Disable monitoring */ +-- +2.17.1 + From 348602186a0455cb1eb1a7e5d94e95719138356e Mon Sep 17 00:00:00 2001 From: Biwen Li Date: Thu, 6 Aug 2020 07:14:15 +0000 Subject: [PATCH 19/44] layerscape: update ls-rcw to LSDK-20.04-update-290520 Update ls-rcw to LSDK-20.04-update-290520. Signed-off-by: Biwen Li Signed-off-by: Yangbo Lu [rebase, fix PKG_RELEASE change] Signed-off-by: Adrian Schmutzler --- package/firmware/layerscape/ls-rcw/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index dca0f0ff2b..3853c9c3fb 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-rcw -PKG_VERSION:=LSDK-20.04 -PKG_RELEASE:=2 +PKG_VERSION:=LSDK-20.04-update-290520 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/rcw -PKG_SOURCE_VERSION:=5689bf9c9f087f50aaa0d91b43d8a791fedbedd3 -PKG_MIRROR_HASH:=45709aa92f84fea8100b472a29762bfe69a333e6aca7a4fc4edc8cc3e10bf44e +PKG_SOURCE_VERSION:=e0fab6d9b61003caef577f7474c2fac61e6ba2ff +PKG_MIRROR_HASH:=b6bc66e27b7c6db31101fdc2e6be7255181861bd38d8f25eb5eb80c468983eb2 include $(INCLUDE_DIR)/package.mk From bd15d498388807fd59db80ab0aeb0d9185c1d98b Mon Sep 17 00:00:00 2001 From: Biwen Li Date: Thu, 6 Aug 2020 07:37:05 +0000 Subject: [PATCH 20/44] layerscape: update u-boot to LSDK-20.04-update-290520 Update u-boot to LSDK-20.04-update-290520. Signed-off-by: Biwen Li Signed-off-by: Yangbo Lu [fix PKG_RELEASE bump] Signed-off-by: Adrian Schmutzler --- package/boot/uboot-layerscape/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index 66946f48ce..5d6a956aeb 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-layerscape -PKG_VERSION:=LSDK-20.04 -PKG_RELEASE:=4 +PKG_VERSION:=LSDK-20.04-update-290520 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot -PKG_SOURCE_VERSION:=b0833bd0e26c059277f0673c9887b967f1ea5837 -PKG_MIRROR_HASH:=3cc01d4853ba56d9bcfe5366eddb5f664ae110741146d04f03434d38b4b5b0a0 +PKG_SOURCE_VERSION:=1e55b2f9e7f56b76569089b9e950f49c1579580e +PKG_MIRROR_HASH:=46aace27e1367f40b424a64215d524a99c3bd62f49057550039e72d5a1ab7edb include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk From 3a47dc1df212c52194fcf97a84d80c8b4da9de6c Mon Sep 17 00:00:00 2001 From: Biwen Li Date: Thu, 6 Aug 2020 07:41:39 +0000 Subject: [PATCH 21/44] layerscape: update tfa to LSDK-20.04-update-290520 Update tfa to LSDK-20.04-update-290520. Signed-off-by: Biwen Li Signed-off-by: Yangbo Lu [fix PKG_RELEASE bump] Signed-off-by: Adrian Schmutzler --- package/boot/tfa-layerscape/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index b3e947f3b2..b4295c6310 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tfa-layerscape -PKG_VERSION:=LSDK-20.04 -PKG_RELEASE:=2 +PKG_VERSION:=LSDK-20.04-update-290520 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/atf -PKG_SOURCE_VERSION:=4a82c939a0211196e2b80a495f966383803753bb -PKG_MIRROR_HASH:=31c264551ce800b646d7dcc5baa62cfbb4c8fa3299a93931c7ef71dc3e88380d +PKG_SOURCE_VERSION:=7d748e6f0ec652ba7c43733dc67a3d0b0217390a +PKG_MIRROR_HASH:=d209c9ad18aac9f18375450b98b8dab00f0382ccb485df14623bf9b72ea1dd9b PKG_BUILD_DEPENDS:=tfa-layerscape/host include $(INCLUDE_DIR)/host-build.mk From c1130c7a6bd6cde9a9984da10de0edf47161df33 Mon Sep 17 00:00:00 2001 From: Yangbo Lu Date: Thu, 15 Oct 2020 16:56:10 +0800 Subject: [PATCH 22/44] layerscape: several kernel fix-ups from NXP linux factory NXP linux factory unifies one linux kernel for i.MX, Layerscape and S32 platforms. It provides a common code base for their SDKs. Add several kernel patches for bug fix from linux factory last release. Git: https://source.codeaurora.org/external/qoriq/qoriq-components/linux Tag: LTS-5.4.47-20200828 Signed-off-by: Biwen Li Signed-off-by: Yangbo Lu --- ...46a-fix-ippdexpcr-offset-not-correct.patch | 30 +++++++ ...a-update-USB-nodes-status-to-match-b.patch | 87 +++++++++++++++++++ ...1043a-remove-thermal-zone-5-from-dts.patch | 29 +++++++ 3 files changed, 146 insertions(+) create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch create mode 100644 target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch diff --git a/target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch b/target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch new file mode 100644 index 0000000000..4cda7e48e8 --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0120-arm64-dts-ls1046a-fix-ippdexpcr-offset-not-correct.patch @@ -0,0 +1,30 @@ +From d589ed7b9aa91de94eb558ae83ccebd59b881d61 Mon Sep 17 00:00:00 2001 +From: Ran Wang +Date: Tue, 10 Mar 2020 21:06:29 +0800 +Subject: [PATCH] arm64: dts: ls1046a: fix ippdexpcr offset not correct + +The wrong offset of ippdexpcr in dtsi causes RCPM driver did not +program ippdexpcr properly, which lead to LPM20 cannot exit by wakeup +source. + +Signed-off-by: Ran Wang +--- + arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +index 718af5e..1ef5743 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +@@ -796,7 +796,7 @@ + + rcpm: rcpm@1ee208c { + compatible = "fsl,ls1046a-rcpm", "fsl,qoriq-rcpm-2.1+"; +- reg = <0x0 0x1ee208c 0x0 0x4>; ++ reg = <0x0 0x1ee2140 0x0 0x4>; + #fsl,rcpm-wakeup-cells = <1>; + }; + +-- +2.7.4 + diff --git a/target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch b/target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch new file mode 100644 index 0000000000..a51004b986 --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0121-arm64-dts-ls1043a-update-USB-nodes-status-to-match-b.patch @@ -0,0 +1,87 @@ +From 2dfd145470894296d70873942ae056340e3fd78d Mon Sep 17 00:00:00 2001 +From: Ran Wang +Date: Tue, 7 Jul 2020 15:40:31 +0800 +Subject: [PATCH] arm64: dts: ls1043a: update USB nodes status to match board + config +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ls1043a-rdb and ls1043a-qds board’s default HW config (such as +pin mux selection) would not enable some USB controllers’ +data path, which causing over-current detected on those +controllers. This will hit the case of ‘xhci driver prevent bus suspend +if a root hub port detected over-current condition’, causing system +failed to be suspended. So disable them in device tree to resolve this +issue. + +Signed-off-by: Ran Wang +Signed-off-by: Shawn Guo +--- + arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 4 ++++ + arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 8 ++++++++ + arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 3 +++ + 3 files changed, 15 insertions(+) + +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +index 219a98780..fe4c4e1fa 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +@@ -167,6 +167,10 @@ + }; + }; + ++&usb0 { ++ status = "okay"; ++}; ++ + #include "fsl-ls1043-post.dtsi" + + &fman0 { +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +index ace1d6061..aa2f88f8e 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts +@@ -213,3 +213,11 @@ + }; + }; + }; ++ ++&usb0 { ++ status = "okay"; ++}; ++ ++&usb1 { ++ status = "okay"; ++}; +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +index e19e05dda..f879ac8f0 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +@@ -706,6 +706,7 @@ + snps,host-vbus-glitches; + configure-gfladj; + dma-coherent; ++ status = "disabled"; + }; + + usb1: usb3@3000000 { +@@ -721,6 +722,7 @@ + snps,host-vbus-glitches; + configure-gfladj; + dma-coherent; ++ status = "disabled"; + }; + + usb2: usb3@3100000 { +@@ -736,6 +738,7 @@ + snps,host-vbus-glitches; + configure-gfladj; + dma-coherent; ++ status = "disabled"; + }; + + sata: sata@3200000 { +-- +2.17.1 + diff --git a/target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch b/target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch new file mode 100644 index 0000000000..0cde3615df --- /dev/null +++ b/target/linux/layerscape/patches-5.4/302-dts-0122-arm64-dts-ls1043a-remove-thermal-zone-5-from-dts.patch @@ -0,0 +1,29 @@ +From aa5e9dc53636e5ae40fc1460c7d3897c2d8588fe Mon Sep 17 00:00:00 2001 +From: Yuantian Tang +Date: Mon, 9 Mar 2020 10:44:54 +0800 +Subject: [PATCH] arm64: dts: ls1043a: remove thermal zone 5 from dts + +Thermal monitor zone 5 does not exist. So remove it +from dts. + +Signed-off-by: Yuantian +--- + arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +index e19e05ddae08..fd898d51f53a 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi +@@ -915,8 +915,4 @@ + thermal-zone4 { + status = "okay"; + }; +- +- thermal-zone5 { +- status = "okay"; +- }; + }; +-- +2.17.1 + From c9e9b8c342d918cedfc4d2e1c2f7fd1fcaf0b56b Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 25 Oct 2020 00:52:47 +0200 Subject: [PATCH 23/44] ath79: fix block protection clearing The block protection bits of macronix do not match the implementation. The chip has 3 BP bits. Bit 5 is actually the third BP but here the 5th bit is SR_TB. Therefore the patch adds SR_TB to the mask. In the 4.19er kernel the whole register was simply set to 0. The wrong implementation did not remove the block protection. This led to jffs2 errors in the form of: "jffs2: Newly-erased block contained word 0x19852003 at offset 0x..." This caused inconsistent memory and other errors. Suggested-by: David Bauer Signed-off-by: Nick Hainke --- .../450-fix-block-protection-clearing.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch diff --git a/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch b/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch new file mode 100644 index 0000000000..a7ed62302d --- /dev/null +++ b/target/linux/ath79/patches-5.4/450-fix-block-protection-clearing.patch @@ -0,0 +1,28 @@ +From: Nick Hainke +Date: Sun, 25 Oct 2020 00:52:47 +0200 +Subject: [PATCH] ath79: fix block protection clearing + +The block protection bits of macronix do not match the implementation. +The chip has 3 BP bits. Bit 5 is actually the third BP but here the +5th bit is SR_TB. Therefore the patch adds SR_TB to the mask. In the +4.19er kernel the whole register was simply set to 0. + +The wrong implementation did not remove the block protection. This led +to jffs2 errors in the form of: +"jffs2: Newly-erased block contained word 0x19852003 at offset 0x..." +This caused inconsistent memory and other errors. + +Suggested-by: David Bauer +Signed-off-by: Nick Hainke + +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -1981,7 +1981,7 @@ static int sr2_bit7_quad_enable(struct s + static int spi_nor_clear_sr_bp(struct spi_nor *nor) + { + int ret; +- u8 mask = SR_BP2 | SR_BP1 | SR_BP0; ++ u8 mask = SR_TB | SR_BP2 | SR_BP1 | SR_BP0; + + ret = read_sr(nor); + if (ret < 0) { From a4c1c169c391ac0b11e4c3e895b282f07585347c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 19 Oct 2020 11:28:29 +0200 Subject: [PATCH 24/44] sdk: keep the linux package in the same subdir as in the main build system Fixes: 953435795d17 ("build: always build package/kernel/linux") Signed-off-by: Felix Fietkau --- target/sdk/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/sdk/Makefile b/target/sdk/Makefile index 022a791ebf..4a9dc8be41 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -129,11 +129,14 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean ./files/include/prepare.mk \ ./files/README.SDK \ $(SDK_BUILD_DIR)/ + mkdir -p $(SDK_BUILD_DIR)/package/kernel $(CP) \ $(TOPDIR)/package/Makefile \ $(TOPDIR)/package/libs/toolchain \ - $(TOPDIR)/package/kernel/linux \ $(SDK_BUILD_DIR)/package/ + $(CP) \ + $(TOPDIR)/package/kernel/linux \ + $(SDK_BUILD_DIR)/package/kernel/ -rm -rf $(SDK_BUILD_DIR)/$(STAGING_SUBDIR_HOST)/.prereq-build From d7db32440fd5d5eee015896ec19e583513bb9bae Mon Sep 17 00:00:00 2001 From: Joel Johnson Date: Fri, 21 Aug 2020 08:32:00 -0600 Subject: [PATCH 25/44] dnsmasq: include IPv6 local nameserver entry For IPv6 native connections when using IPv6 DNS lookups, there is no valid default resolver if ignoring WAN DHCP provided nameservers. This uses a runtime check to determine if IPv6 is supported on the host. Signed-off-by: Joel Johnson --- package/network/services/dnsmasq/files/dnsmasq.init | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 0fa3074f92..7ecc542b44 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -1066,6 +1066,7 @@ dnsmasq_start() echo "search $DOMAIN" >> /tmp/resolv.conf } DNS_SERVERS="$DNS_SERVERS 127.0.0.1" + [ -e /proc/sys/net/ipv6 ] && DNS_SERVERS="$DNS_SERVERS ::1" for DNS_SERVER in $DNS_SERVERS ; do echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf done From 733700c652d37ca4c26f623d2a71337147af395d Mon Sep 17 00:00:00 2001 From: Roman Kuzmitskii Date: Thu, 22 Oct 2020 18:31:07 +0000 Subject: [PATCH 26/44] octeon: use dedicated function to move config backup All octeon devices use the same or a very similar way to backup and restore configuration. We expect to have more devices added and in order to stop repeating ourselves move the logic to a separate function. While at it, add a few checks. Signed-off-by: Roman Kuzmitskii [commit message facelift] Signed-off-by: Adrian Schmutzler --- .../base-files/lib/preinit/79_move_config | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config index fd780a9461..086f7c62e2 100644 --- a/target/linux/octeon/base-files/lib/preinit/79_move_config +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config @@ -1,21 +1,27 @@ # Copyright (C) 2014 OpenWrt.org move_config() { - . /lib/functions.sh . /lib/upgrade/common.sh + local device="$1" + [ -n "$device" ] && [ -b "$device" ] && { + mount -t vfat "$device" /mnt + [ -f "/mnt/$BACKUP_FILE" ] && mv -f "/mnt/$BACKUP_FILE" / + umount /mnt + } +} + +octeon_move_config() { + . /lib/functions.sh + case "$(board_name)" in erlite) - mount -t vfat /dev/sda1 /mnt - [ -f "/mnt/$BACKUP_FILE" ] && mv -f "/mnt/$BACKUP_FILE" / - umount /mnt + move_config "/dev/sda1" ;; itus,shield-router) - mount -t vfat /dev/mmcblk1p1 /mnt - [ -f "/mnt/$BACKUP_FILE" ] && mv -f "/mnt/$BACKUP_FILE" / - umount /mnt + move_config "/dev/mmcblk1p1" ;; esac } -boot_hook_add preinit_mount_root move_config +boot_hook_add preinit_mount_root octeon_move_config From 8087499ac50bc2358d5f9d872293a9a01fd64b5d Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 17 Oct 2020 14:00:54 +0200 Subject: [PATCH 27/44] ath79: enable upgrade from ar71xx for Qxwlan devices This supports upgrade from ar71xx for the recently added Qxwlan devices E1700AC v2, E558 v2, E750A v4 and E750G v8. Signed-off-by: Adrian Schmutzler --- .../base-files/etc/uci-defaults/04_led_migration | 10 ++++++++++ target/linux/ath79/image/generic.mk | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration index f439e9ccc7..0efc2bf9d7 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration @@ -20,6 +20,16 @@ glinet,gl-mifi) pcs,cap324) migrate_leds "lan:amber=amber:lan" "lan:green=green:lan" ;; +qxwlan,e558-v2-16m|\ +qxwlan,e558-v2-8m) + migrate_leds ":qss=:sig2" + ;; +qxwlan,e750a-v4-16m|\ +qxwlan,e750a-v4-8m|\ +qxwlan,e750g-v8-16m|\ +qxwlan,e750g-v8-8m) + migrate_leds ":ds10=:sig1" ":ds20=:sig2" + ;; mercury,mw4530r-v1|\ tplink,archer-c7-v2|\ tplink,tl-wdr3600-v1|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 8b0c247876..b6ec366eb0 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1480,6 +1480,7 @@ define Device/qxwlan_e1700ac-v2 DEVICE_VENDOR := Qxwlan DEVICE_MODEL := E1700AC DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct + SUPPORTED_DEVICES += e1700ac-v2 endef define Device/qxwlan_e1700ac-v2-16m @@ -1501,6 +1502,7 @@ define Device/qxwlan_e558-v2 DEVICE_VENDOR := Qxwlan DEVICE_MODEL := E558 DEVICE_PACKAGES := kmod-usb2 + SUPPORTED_DEVICES += e558-v2 endef define Device/qxwlan_e558-v2-16m @@ -1522,6 +1524,7 @@ define Device/qxwlan_e750a-v4 DEVICE_VENDOR := Qxwlan DEVICE_MODEL := E750A DEVICE_PACKAGES := kmod-usb2 + SUPPORTED_DEVICES += e750a-v4 endef define Device/qxwlan_e750a-v4-16m @@ -1543,6 +1546,7 @@ define Device/qxwlan_e750g-v8 DEVICE_VENDOR := Qxwlan DEVICE_MODEL := E750G DEVICE_PACKAGES := kmod-usb2 + SUPPORTED_DEVICES += e750g-v8 endef define Device/qxwlan_e750g-v8-16m From c4ab1b7dd9d0194ef8e90847f0fb3e2bf23bfc67 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 4 Oct 2020 18:00:28 +0200 Subject: [PATCH 28/44] bcm63xx: reorganize board patches into fewer files At the moment, bcm63xx creates one patch for each board to add to board_bcm963xx.c. While this is not really helpful to get an overview in the first place, it is particularly painful if you want to change something for an early file and have to refresh all the later patches accordingly. Since it does not look like these board patches are upstreamed either, this commit consolidates all board additions into one patch per "board". By this, both adding and editing boards should become much simpler, and we drop about 1300 lines of "code" from patches as well. Signed-off-by: Adrian Schmutzler --- .../501-board_bcm6318-brcm-bcm96318ref.patch | 74 -- ...28-extend-96328avng-reference-board.patch} | 11 +- ...h => 502-board-bcm6358-DWV-S0_fixes.patch} | 2 +- ...-board_bcm6318-brcm-bcm96318ref-p300.patch | 67 -- ...503-board_bcm6318-d-link-dsl-275xb-d.patch | 91 --- .../504-board_bcm6318-sagem-fast-2704n.patch | 68 -- .../505-board_bcm6318-comtrend-ar-5315u.patch | 84 -- .../patches-5.4/511-board_bcm6318.patch | 292 +++++++ .../patches-5.4/512-board_bcm6328.patch | 521 +++++++++++++ ...sl-2640u.patch => 513-board-bcm6338.patch} | 21 +- ...-rta770w.patch => 514-board_bcm6345.patch} | 2 +- .../patches-5.4/515-board-bcm6348.patch | 328 ++++++++ .../patches-5.4/516-board-bcm6358.patch | 384 +++++++++ .../patches-5.4/517-board_bcm6362.patch | 144 ++++ .../patches-5.4/518-board_bcm6368.patch | 732 ++++++++++++++++++ .../patches-5.4/519-board_bcm63268.patch | 307 ++++++++ ...CM63XX-add-963281TAN-reference-board.patch | 67 -- ...523-board_bcm6328-d-link-dsl-274xb-f.patch | 79 -- .../524-board_bcm6328-adb-a4001n1.patch | 68 -- ...525-board_bcm6328-comtrend-ar-5387un.patch | 97 --- .../526-board_bcm6328-comtrend-ar-5381u.patch | 79 -- ...527-board_bcm6328-sagem-fast-2704-v2.patch | 73 -- .../528-board_bcm6328-adb-a4001n.patch | 68 -- .../529-board_bcm6328-nucom-r5010un-v2.patch | 69 -- .../530-board_bcm6328-sercomm-ad1018.patch | 91 --- ...-bcm6328-adb-pdg-a4001n-a-000-1a1-ax.patch | 68 -- ...1-board_bcm6348-bt-voyager-2500v-bb.patch} | 46 +- ...CM63XX-add-inventel-Livebox-support.patch} | 0 .../542-board_bcm6338-dynalink-rta1320.patch | 38 - .../patches-5.4/561-board-bcm6348-D4PW.patch | 40 - ...board_bcm6348-t-com-speedport-w-500v.patch | 55 -- ...63-board_bcm6348-tecom-gw6000-gw6200.patch | 67 -- .../564-board-bcm6348-telsey-magic.patch | 49 -- .../566-board_bcm6348-bt-voyager-2110.patch | 41 - ..._bcm6348-comtrend-ct-536plus-ct-5621.patch | 50 -- .../569-board_bcm6348-comtrend-ct-5365.patch | 48 -- ...570-board_bcm6348-telsey-cpva502plus.patch | 53 -- .../571-board_bcm6348-netgear-dg834g-v4.patch | 42 - .../572-board_bcm6348-sagem-fast-2604.patch | 41 - .../573-board_bcm6348-asmax-ar-1004g.patch | 48 -- .../602-board-bcm6358-sfr-neufbox-4.patch | 77 -- .../603-board-bcm6358-telsey-cpva642.patch | 42 - ...604-board_bcm6358-d-link-dsl-274xb-c.patch | 41 - ...-board_bcm6358-huawei-echolife-hg553.patch | 50 -- ...board_bcm6358-t-com-speedport-w-303v.patch | 39 - .../607-board_bcm6358-comtrend-ct-6373.patch | 49 -- ...-board_bcm6358-d-link-dva-g3810bn-tl.patch | 50 -- ...-board_bcm6358-huawei-echolife-hg556.patch | 125 --- ...board_bcm6359-huawei-echolife-hg520v.patch | 55 -- .../611-board_bcm6358-bt-home-hub-2-a.patch | 50 -- .../631-board_bcm6361-sfr-neufbox-6.patch | 52 -- .../632-board_bcm6362-sagem-fast-2504n.patch | 62 -- ...33-board-bcm6362-netgear-dgnd3700-v2.patch | 49 -- .../634-board-bcm6362-huawei-hg253s-v2.patch | 56 -- ...63xx-add-support-for-96368MVWG-board.patch | 111 --- ...3xx-add-support-for-96368MVNgr-board.patch | 69 -- ...653-board_bcm6369-comtrend-wap-5813n.patch | 75 -- .../654-board_bcm6368-comtrend-vr-3025u.patch | 78 -- ...655-board_bcm6368-comtrend-vr-3025un.patch | 78 -- ...56-board_bcm6368-zyxel-p870hw-51a-v2.patch | 67 -- ...57-board_bcm6368-netgear-dgnd3700-v1.patch | 49 -- ...board_bcm6368-huawei-echolife-hg655b.patch | 71 -- .../659-board_bcm6368-comtrend-vr-3026e.patch | 78 -- ...-board_bcm6368-huawei-echolife-hg622.patch | 71 -- .../661-board_bcm6369-netgear-evg2000.patch | 62 -- .../662-board_bcm6368-adb-av4202n.patch | 68 -- .../663-board_bcm6368-observa-vh4032n.patch | 125 --- .../664-board_bcm6368-actiontec-r1000h.patch | 48 -- ...681-board_bcm63269-brcm-bcm963269bhr.patch | 67 -- .../682-board_bcm63268-inteno-vg50.patch | 67 -- ...board_bcm63268-brcm-bcm963268bu-p300.patch | 84 -- .../684-board_bcm63168-sky-sr102.patch | 61 -- ...685-board-bcm63168-comtrend-vr-3032u.patch | 60 -- .../686-board-bcm63169-comtrend-vg-8050.patch | 50 -- .../687-board-bcm63167-sercomm-h500-s.patch | 56 -- 75 files changed, 2730 insertions(+), 4067 deletions(-) delete mode 100644 target/linux/bcm63xx/patches-5.4/501-board_bcm6318-brcm-bcm96318ref.patch rename target/linux/bcm63xx/patches-5.4/{521-MIPS-BCM63XX-add-96328avng-reference-board.patch => 501-board_bcm6328-extend-96328avng-reference-board.patch} (57%) rename target/linux/bcm63xx/patches-5.4/{601-board-bcm6358-DWV-S0_fixes.patch => 502-board-bcm6358-DWV-S0_fixes.patch} (74%) delete mode 100644 target/linux/bcm63xx/patches-5.4/502-board_bcm6318-brcm-bcm96318ref-p300.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/503-board_bcm6318-d-link-dsl-275xb-d.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/504-board_bcm6318-sagem-fast-2704n.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/505-board_bcm6318-comtrend-ar-5315u.patch create mode 100644 target/linux/bcm63xx/patches-5.4/511-board_bcm6318.patch create mode 100644 target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch rename target/linux/bcm63xx/patches-5.4/{541-board-bcm6338-d-link-dsl-2640u.patch => 513-board-bcm6338.patch} (64%) rename target/linux/bcm63xx/patches-5.4/{551-board_bcm6345-dynalink-rta770bw-rta770w.patch => 514-board_bcm6345.patch} (94%) create mode 100644 target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch create mode 100644 target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch create mode 100644 target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch create mode 100644 target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch create mode 100644 target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/522-MIPS-BCM63XX-add-963281TAN-reference-board.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/523-board_bcm6328-d-link-dsl-274xb-f.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/524-board_bcm6328-adb-a4001n1.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/525-board_bcm6328-comtrend-ar-5387un.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/526-board_bcm6328-comtrend-ar-5381u.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/527-board_bcm6328-sagem-fast-2704-v2.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/528-board_bcm6328-adb-a4001n.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/529-board_bcm6328-nucom-r5010un-v2.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/530-board_bcm6328-sercomm-ad1018.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/531-board-bcm6328-adb-pdg-a4001n-a-000-1a1-ax.patch rename target/linux/bcm63xx/patches-5.4/{565-board_bcm6348-bt-voyager-2500v-bb.patch => 531-board_bcm6348-bt-voyager-2500v-bb.patch} (54%) rename target/linux/bcm63xx/patches-5.4/{567-MIPS-BCM63XX-add-inventel-Livebox-support.patch => 532-MIPS-BCM63XX-add-inventel-Livebox-support.patch} (100%) delete mode 100644 target/linux/bcm63xx/patches-5.4/542-board_bcm6338-dynalink-rta1320.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/561-board-bcm6348-D4PW.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/562-board_bcm6348-t-com-speedport-w-500v.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/563-board_bcm6348-tecom-gw6000-gw6200.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/564-board-bcm6348-telsey-magic.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/566-board_bcm6348-bt-voyager-2110.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/568-board_bcm6348-comtrend-ct-536plus-ct-5621.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/569-board_bcm6348-comtrend-ct-5365.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/570-board_bcm6348-telsey-cpva502plus.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/571-board_bcm6348-netgear-dg834g-v4.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/572-board_bcm6348-sagem-fast-2604.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/573-board_bcm6348-asmax-ar-1004g.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/602-board-bcm6358-sfr-neufbox-4.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/603-board-bcm6358-telsey-cpva642.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/604-board_bcm6358-d-link-dsl-274xb-c.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/605-board_bcm6358-huawei-echolife-hg553.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/606-board_bcm6358-t-com-speedport-w-303v.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/607-board_bcm6358-comtrend-ct-6373.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/608-board_bcm6358-d-link-dva-g3810bn-tl.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/609-board_bcm6358-huawei-echolife-hg556.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/610-board_bcm6359-huawei-echolife-hg520v.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/611-board_bcm6358-bt-home-hub-2-a.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/631-board_bcm6361-sfr-neufbox-6.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/632-board_bcm6362-sagem-fast-2504n.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/633-board-bcm6362-netgear-dgnd3700-v2.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/634-board-bcm6362-huawei-hg253s-v2.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/651-bcm63xx-add-support-for-96368MVWG-board.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/652-bcm63xx-add-support-for-96368MVNgr-board.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/653-board_bcm6369-comtrend-wap-5813n.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/654-board_bcm6368-comtrend-vr-3025u.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/655-board_bcm6368-comtrend-vr-3025un.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/656-board_bcm6368-zyxel-p870hw-51a-v2.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/657-board_bcm6368-netgear-dgnd3700-v1.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/658-board_bcm6368-huawei-echolife-hg655b.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/659-board_bcm6368-comtrend-vr-3026e.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/660-board_bcm6368-huawei-echolife-hg622.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/661-board_bcm6369-netgear-evg2000.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/662-board_bcm6368-adb-av4202n.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/663-board_bcm6368-observa-vh4032n.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/664-board_bcm6368-actiontec-r1000h.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/681-board_bcm63269-brcm-bcm963269bhr.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/682-board_bcm63268-inteno-vg50.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/683-board_bcm63268-brcm-bcm963268bu-p300.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/684-board_bcm63168-sky-sr102.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/685-board-bcm63168-comtrend-vr-3032u.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/686-board-bcm63169-comtrend-vg-8050.patch delete mode 100644 target/linux/bcm63xx/patches-5.4/687-board-bcm63167-sercomm-h500-s.patch diff --git a/target/linux/bcm63xx/patches-5.4/501-board_bcm6318-brcm-bcm96318ref.patch b/target/linux/bcm63xx/patches-5.4/501-board_bcm6318-brcm-bcm96318ref.patch deleted file mode 100644 index 0313285eaa..0000000000 --- a/target/linux/bcm63xx/patches-5.4/501-board_bcm6318-brcm-bcm96318ref.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -49,6 +49,53 @@ static struct board_info __initdata boar - #endif /* CONFIG_BCM63XX_CPU_3368 */ - - /* -+ * known 6318 boards -+ */ -+#ifdef CONFIG_BCM63XX_CPU_6318 -+static struct board_info __initdata board_96318ref = { -+ .name = "96318REF", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_6318 */ -+ -+/* - * known 6328 boards - */ - #ifdef CONFIG_BCM63XX_CPU_6328 -@@ -410,6 +457,9 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_3368 - &board_cvg834g, - #endif /* CONFIG_BCM63XX_CPU_3368 */ -+#ifdef CONFIG_BCM63XX_CPU_6318 -+ &board_96318ref, -+#endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, - #endif /* CONFIG_BCM63XX_CPU_6328 */ -@@ -444,6 +494,7 @@ static struct of_device_id const bcm963x - { .compatible = "netgear,cvg834g", .data = &board_cvg834g, }, - #endif /* CONFIG_BCM63XX_CPU_3368 */ - #ifdef CONFIG_BCM63XX_CPU_6318 -+ { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, diff --git a/target/linux/bcm63xx/patches-5.4/521-MIPS-BCM63XX-add-96328avng-reference-board.patch b/target/linux/bcm63xx/patches-5.4/501-board_bcm6328-extend-96328avng-reference-board.patch similarity index 57% rename from target/linux/bcm63xx/patches-5.4/521-MIPS-BCM63XX-add-96328avng-reference-board.patch rename to target/linux/bcm63xx/patches-5.4/501-board_bcm6328-extend-96328avng-reference-board.patch index 43ad569e1e..d65b9413ec 100644 --- a/target/linux/bcm63xx/patches-5.4/521-MIPS-BCM63XX-add-96328avng-reference-board.patch +++ b/target/linux/bcm63xx/patches-5.4/501-board_bcm6328-extend-96328avng-reference-board.patch @@ -1,15 +1,6 @@ -From c93c2bbf0cc96da5a47d77f01daf6c983cfe4216 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 May 2012 10:52:25 +0200 -Subject: [PATCH] MIPS: BCM63XX: add 96328avng reference board - ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 77 +++++++++++++++++++++++++++++ - 1 files changed, 77 insertions(+), 0 deletions(-) - --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -321,6 +321,32 @@ static struct board_info __initdata boar +@@ -64,6 +64,32 @@ static struct board_info __initdata boar .use_fullspeed = 0, .port_no = 0, }, diff --git a/target/linux/bcm63xx/patches-5.4/601-board-bcm6358-DWV-S0_fixes.patch b/target/linux/bcm63xx/patches-5.4/502-board-bcm6358-DWV-S0_fixes.patch similarity index 74% rename from target/linux/bcm63xx/patches-5.4/601-board-bcm6358-DWV-S0_fixes.patch rename to target/linux/bcm63xx/patches-5.4/502-board-bcm6358-DWV-S0_fixes.patch index fa35102aa0..8019136861 100644 --- a/target/linux/bcm63xx/patches-5.4/601-board-bcm6358-DWV-S0_fixes.patch +++ b/target/linux/bcm63xx/patches-5.4/502-board-bcm6358-DWV-S0_fixes.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1468,6 +1468,7 @@ static struct board_info __initdata boar +@@ -426,6 +426,7 @@ static struct board_info __initdata boar }, .has_ohci0 = 1, diff --git a/target/linux/bcm63xx/patches-5.4/502-board_bcm6318-brcm-bcm96318ref-p300.patch b/target/linux/bcm63xx/patches-5.4/502-board_bcm6318-brcm-bcm96318ref-p300.patch deleted file mode 100644 index 1796d066a5..0000000000 --- a/target/linux/bcm63xx/patches-5.4/502-board_bcm6318-brcm-bcm96318ref-p300.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -93,6 +93,48 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_96318ref_p300 = { -+ .name = "96318REF_P300", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6318 */ - - /* -@@ -459,6 +501,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_3368 */ - #ifdef CONFIG_BCM63XX_CPU_6318 - &board_96318ref, -+ &board_96318ref_p300, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -@@ -495,6 +538,7 @@ static struct of_device_id const bcm963x - #endif /* CONFIG_BCM63XX_CPU_3368 */ - #ifdef CONFIG_BCM63XX_CPU_6318 - { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, }, -+ { .compatible = "brcm,bcm96318ref-p300", .data = &board_96318ref_p300, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, diff --git a/target/linux/bcm63xx/patches-5.4/503-board_bcm6318-d-link-dsl-275xb-d.patch b/target/linux/bcm63xx/patches-5.4/503-board_bcm6318-d-link-dsl-275xb-d.patch deleted file mode 100644 index 05022aa277..0000000000 --- a/target/linux/bcm63xx/patches-5.4/503-board_bcm6318-d-link-dsl-275xb-d.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -135,6 +135,72 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = { -+ { .offset = 96, .value = 0x2046 }, -+ { .offset = 97, .value = 0xfe9d }, -+ { .offset = 98, .value = 0x1854 }, -+ { .offset = 99, .value = 0xfa59 }, -+ { .offset = 112, .value = 0x2046 }, -+ { .offset = 113, .value = 0xfe79 }, -+ { .offset = 114, .value = 0x17f5 }, -+ { .offset = 115, .value = 0xfa47 }, -+ { .offset = 161, .value = 0x2222 }, -+ { .offset = 162, .value = 0x2222 }, -+ { .offset = 169, .value = 0x2222 }, -+ { .offset = 170, .value = 0x2222 }, -+ { .offset = 171, .value = 0x5555 }, -+ { .offset = 172, .value = 0x5555 }, -+ { .offset = 173, .value = 0x4444 }, -+ { .offset = 174, .value = 0x4444 }, -+ { .offset = 175, .value = 0x5555 }, -+ { .offset = 176, .value = 0x5555 }, -+}; -+ -+static struct board_info __initdata board_dsl_2751b_d1 = { -+ .name = "AW5200B", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = dsl2751b_e1_fixups, -+ .num_board_fixups = ARRAY_SIZE(dsl2751b_e1_fixups), -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6318 */ - - /* -@@ -502,6 +568,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6318 - &board_96318ref, - &board_96318ref_p300, -+ &board_dsl_2751b_d1, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -@@ -539,6 +606,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6318 - { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, }, - { .compatible = "brcm,bcm96318ref-p300", .data = &board_96318ref_p300, }, -+ { .compatible = "d-link,dsl-275xb-d1", .data = &board_dsl_2751b_d1, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, diff --git a/target/linux/bcm63xx/patches-5.4/504-board_bcm6318-sagem-fast-2704n.patch b/target/linux/bcm63xx/patches-5.4/504-board_bcm6318-sagem-fast-2704n.patch deleted file mode 100644 index 2bb1f60241..0000000000 --- a/target/linux/bcm63xx/patches-5.4/504-board_bcm6318-sagem-fast-2704n.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -201,6 +201,49 @@ static struct board_info __initdata boar - .num_board_fixups = ARRAY_SIZE(dsl2751b_e1_fixups), - }, - }; -+ -+static struct board_info __initdata board_FAST2704N = { -+ .name = "F@ST2704N", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6318 */ - - /* -@@ -569,6 +612,7 @@ static const struct board_info __initcon - &board_96318ref, - &board_96318ref_p300, - &board_dsl_2751b_d1, -+ &board_FAST2704N, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -@@ -607,6 +651,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, }, - { .compatible = "brcm,bcm96318ref-p300", .data = &board_96318ref_p300, }, - { .compatible = "d-link,dsl-275xb-d1", .data = &board_dsl_2751b_d1, }, -+ { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, diff --git a/target/linux/bcm63xx/patches-5.4/505-board_bcm6318-comtrend-ar-5315u.patch b/target/linux/bcm63xx/patches-5.4/505-board_bcm6318-comtrend-ar-5315u.patch deleted file mode 100644 index dc480f239d..0000000000 --- a/target/linux/bcm63xx/patches-5.4/505-board_bcm6318-comtrend-ar-5315u.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -136,6 +136,65 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata ar5315u_fixups[] = { -+ { .offset = 6, .value = 0x1c00 }, -+ { .offset = 65, .value = 0x1255 }, -+ { .offset = 97, .value = 0xfe55 }, -+ { .offset = 98, .value = 0x171d }, -+ { .offset = 99, .value = 0xfa42 }, -+ { .offset = 113, .value = 0xfeb7 }, -+ { .offset = 114, .value = 0x18cd }, -+ { .offset = 115, .value = 0xfa4f }, -+ { .offset = 162, .value = 0x6444 }, -+ { .offset = 170, .value = 0x6444 }, -+ { .offset = 172, .value = 0x6444 }, -+}; -+ -+static struct board_info __initdata board_AR5315u = { -+ .name = "96318A-1441N1", -+ .expected_cpu_id = 0x6318, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN4", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ar5315u_fixups, -+ .num_board_fixups = ARRAY_SIZE(ar5315u_fixups), -+ }, -+}; -+ - static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = { - { .offset = 96, .value = 0x2046 }, - { .offset = 97, .value = 0xfe9d }, -@@ -611,6 +670,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6318 - &board_96318ref, - &board_96318ref_p300, -+ &board_AR5315u, - &board_dsl_2751b_d1, - &board_FAST2704N, - #endif /* CONFIG_BCM63XX_CPU_6318 */ -@@ -650,6 +710,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6318 - { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, }, - { .compatible = "brcm,bcm96318ref-p300", .data = &board_96318ref_p300, }, -+ { .compatible = "comtrend,ar-5315u", .data = &board_AR5315u, }, - { .compatible = "d-link,dsl-275xb-d1", .data = &board_dsl_2751b_d1, }, - { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ diff --git a/target/linux/bcm63xx/patches-5.4/511-board_bcm6318.patch b/target/linux/bcm63xx/patches-5.4/511-board_bcm6318.patch new file mode 100644 index 0000000000..ef5989ba43 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/511-board_bcm6318.patch @@ -0,0 +1,292 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -49,6 +49,263 @@ static struct board_info __initdata boar + #endif /* CONFIG_BCM63XX_CPU_3368 */ + + /* ++ * known 6318 boards ++ */ ++#ifdef CONFIG_BCM63XX_CPU_6318 ++static struct board_info __initdata board_96318ref = { ++ .name = "96318REF", ++ .expected_cpu_id = 0x6318, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_usbd = 1, ++ .usbd = { ++ .use_fullspeed = 0, ++ .port_no = 0, ++ }, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_96318ref_p300 = { ++ .name = "96318REF_P300", ++ .expected_cpu_id = 0x6318, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_usbd = 1, ++ .usbd = { ++ .use_fullspeed = 0, ++ .port_no = 0, ++ }, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++}; ++ ++static struct sprom_fixup __initdata ar5315u_fixups[] = { ++ { .offset = 6, .value = 0x1c00 }, ++ { .offset = 65, .value = 0x1255 }, ++ { .offset = 97, .value = 0xfe55 }, ++ { .offset = 98, .value = 0x171d }, ++ { .offset = 99, .value = 0xfa42 }, ++ { .offset = 113, .value = 0xfeb7 }, ++ { .offset = 114, .value = 0x18cd }, ++ { .offset = 115, .value = 0xfa4f }, ++ { .offset = 162, .value = 0x6444 }, ++ { .offset = 170, .value = 0x6444 }, ++ { .offset = 172, .value = 0x6444 }, ++}; ++ ++static struct board_info __initdata board_AR5315u = { ++ .name = "96318A-1441N1", ++ .expected_cpu_id = 0x6318, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "LAN4", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "LAN3", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "LAN2", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "LAN1", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43217, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ .board_fixups = ar5315u_fixups, ++ .num_board_fixups = ARRAY_SIZE(ar5315u_fixups), ++ }, ++}; ++ ++static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = { ++ { .offset = 96, .value = 0x2046 }, ++ { .offset = 97, .value = 0xfe9d }, ++ { .offset = 98, .value = 0x1854 }, ++ { .offset = 99, .value = 0xfa59 }, ++ { .offset = 112, .value = 0x2046 }, ++ { .offset = 113, .value = 0xfe79 }, ++ { .offset = 114, .value = 0x17f5 }, ++ { .offset = 115, .value = 0xfa47 }, ++ { .offset = 161, .value = 0x2222 }, ++ { .offset = 162, .value = 0x2222 }, ++ { .offset = 169, .value = 0x2222 }, ++ { .offset = 170, .value = 0x2222 }, ++ { .offset = 171, .value = 0x5555 }, ++ { .offset = 172, .value = 0x5555 }, ++ { .offset = 173, .value = 0x4444 }, ++ { .offset = 174, .value = 0x4444 }, ++ { .offset = 175, .value = 0x5555 }, ++ { .offset = 176, .value = 0x5555 }, ++}; ++ ++static struct board_info __initdata board_dsl_2751b_d1 = { ++ .name = "AW5200B", ++ .expected_cpu_id = 0x6318, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43217, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ .board_fixups = dsl2751b_e1_fixups, ++ .num_board_fixups = ARRAY_SIZE(dsl2751b_e1_fixups), ++ }, ++}; ++ ++static struct board_info __initdata board_FAST2704N = { ++ .name = "F@ST2704N", ++ .expected_cpu_id = 0x6318, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43217, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ }, ++}; ++#endif /* CONFIG_BCM63XX_CPU_6318 */ ++ ++/* + * known 6328 boards + */ + #ifdef CONFIG_BCM63XX_CPU_6328 +@@ -437,6 +694,13 @@ static const struct board_info __initcon + #ifdef CONFIG_BCM63XX_CPU_3368 + &board_cvg834g, + #endif /* CONFIG_BCM63XX_CPU_3368 */ ++#ifdef CONFIG_BCM63XX_CPU_6318 ++ &board_96318ref, ++ &board_96318ref_p300, ++ &board_AR5315u, ++ &board_dsl_2751b_d1, ++ &board_FAST2704N, ++#endif /* CONFIG_BCM63XX_CPU_6318 */ + #ifdef CONFIG_BCM63XX_CPU_6328 + &board_96328avng, + #endif /* CONFIG_BCM63XX_CPU_6328 */ +@@ -471,6 +735,11 @@ static struct of_device_id const bcm963x + { .compatible = "netgear,cvg834g", .data = &board_cvg834g, }, + #endif /* CONFIG_BCM63XX_CPU_3368 */ + #ifdef CONFIG_BCM63XX_CPU_6318 ++ { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, }, ++ { .compatible = "brcm,bcm96318ref-p300", .data = &board_96318ref_p300, }, ++ { .compatible = "comtrend,ar-5315u", .data = &board_AR5315u, }, ++ { .compatible = "d-link,dsl-275xb-d1", .data = &board_dsl_2751b_d1, }, ++ { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, + #endif /* CONFIG_BCM63XX_CPU_6318 */ + #ifdef CONFIG_BCM63XX_CPU_6328 + { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, diff --git a/target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch b/target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch new file mode 100644 index 0000000000..abab912092 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch @@ -0,0 +1,521 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -348,6 +348,482 @@ static struct board_info __initdata boar + }, + }, + }; ++ ++static struct board_info __initdata board_963281TAN = { ++ .name = "963281TAN", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_A4001N = { ++ .name = "96328dg2x2", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43225, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ }, ++}; ++ ++static struct board_info __initdata board_A4001N1 = { ++ .name = "963281T_TEF", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43225, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ }, ++}; ++ ++static struct sprom_fixup __initdata ad1018_fixups[] = { ++ { .offset = 6, .value = 0x1c00 }, ++ { .offset = 65, .value = 0x1256 }, ++ { .offset = 96, .value = 0x2046 }, ++ { .offset = 97, .value = 0xfe69 }, ++ { .offset = 98, .value = 0x1726 }, ++ { .offset = 99, .value = 0xfa5c }, ++ { .offset = 112, .value = 0x2046 }, ++ { .offset = 113, .value = 0xfea8 }, ++ { .offset = 114, .value = 0x1978 }, ++ { .offset = 115, .value = 0xfa26 }, ++ { .offset = 161, .value = 0x2222 }, ++ { .offset = 169, .value = 0x2222 }, ++ { .offset = 171, .value = 0x2222 }, ++ { .offset = 173, .value = 0x2222 }, ++ { .offset = 174, .value = 0x4444 }, ++ { .offset = 175, .value = 0x2222 }, ++ { .offset = 176, .value = 0x4444 }, ++}; ++ ++static struct board_info __initdata board_AD1018 = { ++ .name = "96328avngr", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "FIBRE", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "LAN3", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "LAN2", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "LAN1", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43217, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ .board_fixups = ad1018_fixups, ++ .num_board_fixups = ARRAY_SIZE(ad1018_fixups), ++ }, ++}; ++ ++static struct sprom_fixup __initdata ar5381u_fixups[] = { ++ { .offset = 97, .value = 0xfee5 }, ++ { .offset = 98, .value = 0x157c }, ++ { .offset = 99, .value = 0xfae7 }, ++ { .offset = 113, .value = 0xfefa }, ++ { .offset = 114, .value = 0x15d6 }, ++ { .offset = 115, .value = 0xfaf8 }, ++}; ++ ++static struct board_info __initdata board_AR5381u = { ++ .name = "96328A-1241N", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43225, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ .board_fixups = ar5381u_fixups, ++ .num_board_fixups = ARRAY_SIZE(ar5381u_fixups), ++ }, ++}; ++ ++static struct sprom_fixup __initdata ar5387un_fixups[] = { ++ { .offset = 2, .value = 0x05bb }, ++ { .offset = 65, .value = 0x1204 }, ++ { .offset = 78, .value = 0x0303 }, ++ { .offset = 79, .value = 0x0202 }, ++ { .offset = 80, .value = 0xff02 }, ++ { .offset = 87, .value = 0x0315 }, ++ { .offset = 88, .value = 0x0315 }, ++ { .offset = 96, .value = 0x2048 }, ++ { .offset = 97, .value = 0xff11 }, ++ { .offset = 98, .value = 0x1567 }, ++ { .offset = 99, .value = 0xfb24 }, ++ { .offset = 100, .value = 0x3e3c }, ++ { .offset = 101, .value = 0x4038 }, ++ { .offset = 102, .value = 0xfe7f }, ++ { .offset = 103, .value = 0x1279 }, ++ { .offset = 112, .value = 0x2048 }, ++ { .offset = 113, .value = 0xff03 }, ++ { .offset = 114, .value = 0x154c }, ++ { .offset = 115, .value = 0xfb27 }, ++ { .offset = 116, .value = 0x3e3c }, ++ { .offset = 117, .value = 0x4038 }, ++ { .offset = 118, .value = 0xfe87 }, ++ { .offset = 119, .value = 0x1233 }, ++ { .offset = 203, .value = 0x2226 }, ++}; ++ ++static struct board_info __initdata board_AR5387un = { ++ .name = "96328A-1441N1", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43225, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ .board_fixups = ar5387un_fixups, ++ .num_board_fixups = ARRAY_SIZE(ar5387un_fixups), ++ }, ++}; ++ ++static struct board_info __initdata board_dsl_274xb_f1 = { ++ .name = "AW4339U", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ ++ .has_caldata = 1, ++ .caldata = { ++ { ++ .vendor = PCI_VENDOR_ID_ATHEROS, ++ .caldata_offset = 0x7d1000, ++ .slot = 0, ++ .led_pin = -1, ++ .led_active_high = 1, ++ }, ++ }, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 4", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 3", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 2", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 1", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_FAST2704V2 = { ++ .name = "F@ST2704V2", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .has_usbd = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_PDG_A4001N_A_000_1A1_AX = { ++ .name = "96328avng", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43225, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ }, ++}; ++ ++static struct board_info __initdata board_R5010UNV2 = { ++ .name = "96328ang", ++ .expected_cpu_id = 0x6328, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43217, ++ .pci_bus = 1, ++ .pci_dev = 0, ++ }, ++}; + #endif /* CONFIG_BCM63XX_CPU_6328 */ + + /* +@@ -703,6 +1179,16 @@ static const struct board_info __initcon + #endif /* CONFIG_BCM63XX_CPU_6318 */ + #ifdef CONFIG_BCM63XX_CPU_6328 + &board_96328avng, ++ &board_963281TAN, ++ &board_A4001N, ++ &board_A4001N1, ++ &board_AD1018, ++ &board_AR5381u, ++ &board_AR5387un, ++ &board_dsl_274xb_f1, ++ &board_FAST2704V2, ++ &board_PDG_A4001N_A_000_1A1_AX, ++ &board_R5010UNV2, + #endif /* CONFIG_BCM63XX_CPU_6328 */ + #ifdef CONFIG_BCM63XX_CPU_6338 + &board_96338gw, +@@ -742,7 +1228,18 @@ static struct of_device_id const bcm963x + { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, + #endif /* CONFIG_BCM63XX_CPU_6318 */ + #ifdef CONFIG_BCM63XX_CPU_6328 ++ { .compatible = "adb,a4001n", .data = &board_A4001N, }, ++ { .compatible = "adb,a4001n1", .data = &board_A4001N1, }, ++ { .compatible = "adb,pdg-a4001n-a-000-1a1-ax", .data = &board_PDG_A4001N_A_000_1A1_AX, }, + { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, ++ { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, ++ { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, }, ++ { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, }, ++ { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, ++ { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, }, ++ { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, }, ++ { .compatible = "sercomm,ad1018", .data = &board_AD1018, }, ++ { .compatible = "sercomm,ad1018-nor", .data = &board_AD1018, }, + #endif /* CONFIG_BCM63XX_CPU_6328 */ + #ifdef CONFIG_BCM63XX_CPU_6338 + { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, diff --git a/target/linux/bcm63xx/patches-5.4/541-board-bcm6338-d-link-dsl-2640u.patch b/target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch similarity index 64% rename from target/linux/bcm63xx/patches-5.4/541-board-bcm6338-d-link-dsl-2640u.patch rename to target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch index 2c6a4950bb..85c8e6c390 100644 --- a/target/linux/bcm63xx/patches-5.4/541-board-bcm6338-d-link-dsl-2640u.patch +++ b/target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -858,6 +858,19 @@ static struct board_info __initdata boar +@@ -857,6 +857,32 @@ static struct board_info __initdata boar .force_duplex_full = 1, }, }; @@ -16,23 +16,38 @@ + .force_speed_100 = 1, + .force_duplex_full = 1, + }, ++}; ++ ++static struct board_info __initdata board_rta1320_16m = { ++ .name = "RTA1320_16M", ++ .expected_cpu_id = 0x6338, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, +}; #endif /* CONFIG_BCM63XX_CPU_6338 */ /* -@@ -1193,6 +1206,7 @@ static const struct board_info __initcon +@@ -1193,6 +1219,8 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6338 &board_96338gw, &board_96338w, + &board_96338w2_e7t, ++ &board_rta1320_16m, #endif /* CONFIG_BCM63XX_CPU_6338 */ #ifdef CONFIG_BCM63XX_CPU_6345 &board_96345gw2, -@@ -1244,6 +1258,7 @@ static struct of_device_id const bcm963x +@@ -1244,6 +1272,8 @@ static struct of_device_id const bcm963x #ifdef CONFIG_BCM63XX_CPU_6338 { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, { .compatible = "brcm,bcm96338w", .data = &board_96338w, }, + { .compatible = "d-link,dsl-2640u", .data = &board_96338w2_e7t, }, ++ { .compatible = "dynalink,rta1320", .data = &board_rta1320_16m, }, #endif /* CONFIG_BCM63XX_CPU_6338 */ #ifdef CONFIG_BCM63XX_CPU_6345 { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, }, diff --git a/target/linux/bcm63xx/patches-5.4/551-board_bcm6345-dynalink-rta770bw-rta770w.patch b/target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch similarity index 94% rename from target/linux/bcm63xx/patches-5.4/551-board_bcm6345-dynalink-rta770bw-rta770w.patch rename to target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch index 225c754924..d881555853 100644 --- a/target/linux/bcm63xx/patches-5.4/551-board_bcm6345-dynalink-rta770bw-rta770w.patch +++ b/target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -894,6 +894,19 @@ static struct board_info __initdata boar +@@ -893,6 +893,19 @@ static struct board_info __initdata boar .name = "96345GW2", .expected_cpu_id = 0x6345, }; diff --git a/target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch b/target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch new file mode 100644 index 0000000000..1e93c5e443 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch @@ -0,0 +1,328 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -1092,6 +1092,275 @@ static struct board_info __initdata boar + + .has_ohci0 = 1, + }; ++ ++static struct board_info __initdata board_96348A_122 = { ++ .name = "96348A-122", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_96348_D4PW = { ++ .name = "D-4P-W", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_96348gw_10_AR1004G = { ++ .name = "AR1004G", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_96348sv = { ++ .name = "MAGIC", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pccard = 1, ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ /* it has BP_ENET_EXTERNAL_PHY */ ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++/* NetGear DG834G v4 */ ++static struct board_info __initdata board_96348W3 = { ++ .name = "96348W3", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_CPVA502plus = { ++ .name = "CPVA502+", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ .ephy_reset_gpio = 4, ++ .ephy_reset_gpio_flags = GPIO_ACTIVE_LOW, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_ct536_ct5621 = { ++ .name = "CT536_CT5621", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pccard = 1, ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_FAST2604 = { ++ .name = "F@ST2604", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_gw6000 = { ++ .name = "GW6000", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_gw6200 = { ++ .name = "GW6200", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct sprom_fixup __initdata spw500v_fixups[] = { ++ { .offset = 46, .value = 0x3046 }, ++ { .offset = 47, .value = 0x15a7 }, ++ { .offset = 48, .value = 0xfa89 }, ++ { .offset = 49, .value = 0xfe79 }, ++ { .offset = 57, .value = 0x6a49 }, ++}; ++ ++static struct board_info __initdata board_spw500v = { ++ .name = "SPW500V", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ .board_fixups = spw500v_fixups, ++ .num_board_fixups = ARRAY_SIZE(spw500v_fixups), ++ }, ++}; ++ ++/* BT Voyager 2110 */ ++static struct board_info __initdata board_V2110 = { ++ .name = "V2110", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_V2500V_BB = { ++ .name = "V2500V_BB", ++ .expected_cpu_id = 0x6348, ++ ++ .has_pci = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; + #endif /* CONFIG_BCM63XX_CPU_6348 */ + + /* +@@ -1248,6 +1517,19 @@ static const struct board_info __initcon + &board_DV201AMR, + &board_96348gw_a, + &board_rta1025w_16, ++ &board_96348A_122, ++ &board_96348_D4PW, ++ &board_96348gw_10_AR1004G, ++ &board_96348sv, ++ &board_96348W3, ++ &board_CPVA502plus, ++ &board_ct536_ct5621, ++ &board_FAST2604, ++ &board_gw6000, ++ &board_gw6200, ++ &board_spw500v, ++ &board_V2110, ++ &board_V2500V_BB, + #endif /* CONFIG_BCM63XX_CPU_6348 */ + #ifdef CONFIG_BCM63XX_CPU_6358 + &board_96358vw, +@@ -1295,15 +1577,29 @@ static struct of_device_id const bcm963x + { .compatible = "dynalink,rta770w", .data = &board_rta770w, }, + #endif /* CONFIG_BCM63XX_CPU_6345 */ + #ifdef CONFIG_BCM63XX_CPU_6348 ++ { .compatible = "asmax,ar-1004g", .data = &board_96348gw_10_AR1004G, }, + { .compatible = "belkin,f5d7633", .data = &board_96348gw_10, }, + { .compatible = "brcm,bcm96348r", .data = &board_96348r, }, + { .compatible = "brcm,bcm96348gw-10", .data = &board_96348gw_10, }, + { .compatible = "brcm,bcm96348gw-11", .data = &board_96348gw_11, }, + { .compatible = "brcm,bcm96348gw-a", .data = &board_96348gw_a, }, ++ { .compatible = "bt,voyager-2110", .data = &board_V2110, }, ++ { .compatible = "bt,voyager-2500v-bb", .data = &board_V2500V_BB, }, ++ { .compatible = "comtrend,ct-5365", .data = &board_96348A_122, }, ++ { .compatible = "comtrend,ct-536plus", .data = &board_ct536_ct5621, }, ++ { .compatible = "comtrend,ct-5621", .data = &board_ct536_ct5621, }, ++ { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, }, + { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, + { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, + { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, ++ { .compatible = "netgear,dg834g-v4", .data = &board_96348W3, }, + { .compatible = "sagem,fast-2404", .data = &board_FAST2404, }, ++ { .compatible = "sagem,fast-2604", .data = &board_FAST2604, }, ++ { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, ++ { .compatible = "tecom,gw6000", .data = &board_gw6000, }, ++ { .compatible = "tecom,gw6200", .data = &board_gw6200, }, ++ { .compatible = "telsey,cpva502plus", .data = &board_CPVA502plus, }, ++ { .compatible = "telsey,magic", .data = &board_96348sv, }, + { .compatible = "tp-link,td-w8900gb", .data = &board_96348gw_11, }, + { .compatible = "usrobotics,usr9108", .data = &board_96348gw_a, }, + #endif /* CONFIG_BCM63XX_CPU_6348 */ diff --git a/target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch b/target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch new file mode 100644 index 0000000000..18f813b9b8 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch @@ -0,0 +1,384 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1445,6 +1446,88 @@ static struct board_info __initdata boar + .has_ehci0 = 1, + }; + ++static struct board_info __initdata board_CPVA642 = { ++ .name = "CPVA642", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_ct6373_1 = { ++ .name = "CT6373-1", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++/* D-Link DSL-274xB revison C2/C3 */ ++static struct board_info __initdata board_dsl_274xb_rev_c = { ++ .name = "AW4139", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++/* D-Link DVA-G3810BN/TL */ ++static struct board_info __initdata board_DVAG3810BN = { ++ .name = "DVAG3810BN", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pccard = 1, ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ + static struct board_info __initdata board_DWVS0 = { + .name = "DWV-S0", + .expected_cpu_id = 0x6358, +@@ -1469,6 +1552,238 @@ static struct board_info __initdata boar + .has_ohci0 = 1, + .has_ehci0 = 1, + }; ++ ++static struct board_info __initdata board_homehub2a = { ++ .name = "HOMEHUB2A", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4322, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_HW520 = { ++ .name = "HW6358GW_B", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_HW553 = { ++ .name = "HW553", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_HW556_A = { ++ .name = "HW556_A", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_caldata = 1, ++ .caldata = { ++ { ++ .vendor = PCI_VENDOR_ID_ATHEROS, ++ .caldata_offset = 0xf7e000, ++ .slot = 1, ++ .endian_check = 1, ++ .led_pin = 2, ++ .led_active_high = 1, ++ }, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_HW556_B = { ++ .name = "HW556_B", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_caldata = 1, ++ .caldata = { ++ { ++ .vendor = PCI_VENDOR_ID_ATHEROS, ++ .caldata_offset = 0xefe000, ++ .slot = 1, ++ .endian_check = 1, ++ .led_pin = 2, ++ .led_active_high = 1, ++ }, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_HW556_C = { ++ .name = "HW556_C", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_caldata = 1, ++ .caldata = { ++ { ++ .vendor = PCI_VENDOR_ID_RALINK, ++ .caldata_offset = 0xeffe00, ++ .slot = 1, ++ .eeprom = "rt2x00.eeprom", ++ }, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_nb4_ser_r0 = { ++ .name = "NB4-SER-r0", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pccard = 1, ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_nb4_fxc_r1 = { ++ .name = "NB4-FXC-r1", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pccard = 1, ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++ ++ .has_enet1 = 1, ++ .enet1 = { ++ .has_phy = 1, ++ .phy_id = 0, ++ .force_speed_100 = 1, ++ .force_duplex_full = 1, ++ }, ++}; ++ ++ /* T-Home Speedport W 303V Typ B */ ++static struct board_info __initdata board_spw303v = { ++ .name = "96358-502V", ++ .expected_cpu_id = 0x6358, ++ ++ .has_pci = 1, ++ ++ .has_enet0 = 1, ++ .enet0 = { ++ .has_phy = 1, ++ .use_internal_phy = 1, ++ }, ++}; + #endif /* CONFIG_BCM63XX_CPU_6358 */ + + /* +@@ -1535,7 +1850,20 @@ static const struct board_info __initcon + &board_96358vw, + &board_96358vw2, + &board_AGPFS0, ++ &board_CPVA642, ++ &board_ct6373_1, ++ &board_dsl_274xb_rev_c, ++ &board_DVAG3810BN, + &board_DWVS0, ++ &board_homehub2a, ++ &board_HW520, ++ &board_HW553, ++ &board_HW556_A, ++ &board_HW556_B, ++ &board_HW556_C, ++ &board_nb4_ser_r0, ++ &board_nb4_fxc_r1, ++ &board_spw303v, + #endif /* CONFIG_BCM63XX_CPU_6358 */ + }; + +@@ -1607,11 +1935,24 @@ static struct of_device_id const bcm963x + { .compatible = "alcatel,rg100a", .data = &board_96358vw2, }, + { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, }, + { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, }, ++ { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, ++ { .compatible = "comtrend,ct-6373", .data = &board_ct6373_1, }, + { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, ++ { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, }, ++ { .compatible = "d-link,dva-g3810bn-tl", .data = &board_DVAG3810BN, }, ++ { .compatible = "huawei,echolife-hg520v", .data = &board_HW520, }, ++ { .compatible = "huawei,echolife-hg553", .data = &board_HW553, }, ++ { .compatible = "huawei,echolife-hg556a-a", .data = &board_HW556_A, }, ++ { .compatible = "huawei,echolife-hg556a-b", .data = &board_HW556_B, }, ++ { .compatible = "huawei,echolife-hg556a-c", .data = &board_HW556_C, }, + { .compatible = "pirelli,a226g", .data = &board_DWVS0, }, + { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, + { .compatible = "pirelli,a226m-fwb", .data = &board_DWVS0, }, + { .compatible = "pirelli,agpf-s0", .data = &board_AGPFS0, }, ++ { .compatible = "sfr,neufbox-4-sercomm-r0", .data = &board_nb4_ser_r0, }, ++ { .compatible = "sfr,neufbox-4-foxconn-r1", .data = &board_nb4_fxc_r1, }, ++ { .compatible = "t-com,speedport-w-303v", .data = &board_spw303v, }, ++ { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, + #endif /* CONFIG_BCM63XX_CPU_6358 */ + #ifdef CONFIG_BCM63XX_CPU_6362 + #endif /* CONFIG_BCM63XX_CPU_6362 */ diff --git a/target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch b/target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch new file mode 100644 index 0000000000..8e87c0cc55 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch @@ -0,0 +1,144 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -1786,6 +1786,117 @@ static struct board_info __initdata boar + }; + #endif /* CONFIG_BCM63XX_CPU_6358 */ + ++#ifdef CONFIG_BCM63XX_CPU_6362 ++static struct board_info __initdata board_dgnd3700v2 = { ++ .name = "96362ADVN2xh", ++ .expected_cpu_id = 0x6362, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [4] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_fast2504n = { ++ .name = "F@ST2504n", ++ .expected_cpu_id = 0x6362, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_hg253s_v2 = { ++ .name = "hg253s", ++ .expected_cpu_id = 0x6362, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [4] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .timing_sel = 1, ++ .name = "RGMII", ++ }, ++ ++ [5] = { ++ .used = 1, ++ .phy_id = 24, ++ .timing_sel = 1, ++ .name = "WAN", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_nb6 = { ++ .name = "NB6", ++ .expected_cpu_id = 0x6362, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [4] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++#endif /* CONFIG_BCM63XX_CPU_6362 */ ++ + /* + * all boards + */ +@@ -1865,6 +1976,12 @@ static const struct board_info __initcon + &board_nb4_fxc_r1, + &board_spw303v, + #endif /* CONFIG_BCM63XX_CPU_6358 */ ++#ifdef CONFIG_BCM63XX_CPU_6362 ++ &board_dgnd3700v2, ++ &board_fast2504n, ++ &board_hg253s_v2, ++ &board_nb6, ++#endif /* CONFIG_BCM63XX_CPU_6362 */ + }; + + static struct of_device_id const bcm963xx_boards_dt[] = { +@@ -1955,6 +2072,10 @@ static struct of_device_id const bcm963x + { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, + #endif /* CONFIG_BCM63XX_CPU_6358 */ + #ifdef CONFIG_BCM63XX_CPU_6362 ++ { .compatible = "huawei,hg253s-v2", .data = &board_hg253s_v2, }, ++ { .compatible = "netgear,dgnd3700-v2", .data = &board_dgnd3700v2, }, ++ { .compatible = "sagem,fast-2504n", .data = &board_fast2504n, }, ++ { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, + #endif /* CONFIG_BCM63XX_CPU_6362 */ + #ifdef CONFIG_BCM63XX_CPU_6368 + #endif /* CONFIG_BCM63XX_CPU_6368 */ diff --git a/target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch b/target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch new file mode 100644 index 0000000000..e745bf0848 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch @@ -0,0 +1,732 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -13,6 +13,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -1898,6 +1900,648 @@ static struct board_info __initdata boar + #endif /* CONFIG_BCM63XX_CPU_6362 */ + + /* ++ * known 6368 boards ++ */ ++#ifdef CONFIG_BCM63XX_CPU_6368 ++static struct board_info __initdata board_96368mvngr = { ++ .name = "96368MVNgr", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_96368mvwg = { ++ .name = "96368MVWG", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_usbd = 1, ++ .usbd = { ++ .use_fullspeed = 0, ++ .port_no = 0, ++ }, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port1", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port2", ++ }, ++ [4] = { ++ .used = 1, ++ .phy_id = 0x12, ++ .name = "port0", ++ }, ++ [5] = { ++ .used = 1, ++ .phy_id = 0x11, ++ .name = "port3", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_AV4202N = { ++ .name = "96368_Swiss_S1", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4322, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_DGND3700v1_3800B = { ++ .name = "DGND3700v1_3800B", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [5] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++ ++static struct sprom_fixup __initdata EVG2000_fixups[] = { ++ { .offset = 219, .value = 0xec08 }, ++}; ++ ++static struct board_info __initdata board_EVG2000 = { ++ .name = "96369PVG", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [5] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4322, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ .board_fixups = EVG2000_fixups, ++ .num_board_fixups = ARRAY_SIZE(EVG2000_fixups), ++ }, ++}; ++ ++static struct board_info __initdata board_HG622 = { ++ .name = "96368MVWG_hg622", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_caldata = 1, ++ .caldata = { ++ { ++ .vendor = PCI_VENDOR_ID_RALINK, ++ .caldata_offset = 0xfa0000, ++ .slot = 1, ++ .eeprom = "rt2x00.eeprom", ++ }, ++ }, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_HG655b = { ++ .name = "HW65x", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_caldata = 1, ++ .caldata = { ++ { ++ .vendor = PCI_VENDOR_ID_RALINK, ++ .caldata_offset = 0x7c0000, ++ .slot = 1, ++ .eeprom = "rt2x00.eeprom", ++ }, ++ }, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_P870HW51A_V2 = { ++ .name = "P870HW-51a_v2", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM4318, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ }, ++}; ++ ++static struct board_info __initdata board_R1000H = { ++ .name = "R1000H", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [5] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++ ++static struct sprom_fixup __initdata vh4032n_fixups[] = { ++ { .offset = 2, .value = 0x04d2 }, ++ { .offset = 4, .value = 0x4350 }, ++ { .offset = 65, .value = 0x1300 }, ++ { .offset = 68, .value = 0x0402 }, ++ { .offset = 70, .value = 0x0090 }, ++ { .offset = 71, .value = 0x4c19 }, ++ { .offset = 72, .value = 0x2345 }, ++ { .offset = 87, .value = 0x0315 }, ++ { .offset = 88, .value = 0x0315 }, ++ { .offset = 96, .value = 0x2048 }, ++ { .offset = 97, .value = 0xfed7 }, ++ { .offset = 98, .value = 0x15a6 }, ++ { .offset = 99, .value = 0xfaee }, ++ { .offset = 100, .value = 0x3e3a }, ++ { .offset = 101, .value = 0x3a36 }, ++ { .offset = 102, .value = 0xff7f }, ++ { .offset = 103, .value = 0x11b9 }, ++ { .offset = 104, .value = 0xfc53 }, ++ { .offset = 105, .value = 0xffe6 }, ++ { .offset = 106, .value = 0xfdd2 }, ++ { .offset = 107, .value = 0xfe49 }, ++ { .offset = 108, .value = 0xff6a }, ++ { .offset = 109, .value = 0x136e }, ++ { .offset = 110, .value = 0xfbed }, ++ { .offset = 111, .value = 0x0000 }, ++ { .offset = 112, .value = 0x2048 }, ++ { .offset = 113, .value = 0xfee2 }, ++ { .offset = 114, .value = 0x15e5 }, ++ { .offset = 115, .value = 0xfaed }, ++ { .offset = 116, .value = 0x3e3a }, ++ { .offset = 117, .value = 0x3a36 }, ++ { .offset = 118, .value = 0xffc8 }, ++ { .offset = 119, .value = 0x12b8 }, ++ { .offset = 120, .value = 0xfca1 }, ++ { .offset = 121, .value = 0xff9b }, ++ { .offset = 122, .value = 0x122a }, ++ { .offset = 123, .value = 0xfcc8 }, ++ { .offset = 124, .value = 0xff95 }, ++ { .offset = 125, .value = 0x146b }, ++ { .offset = 126, .value = 0xfbba }, ++ { .offset = 127, .value = 0x0000 }, ++ { .offset = 161, .value = 0x0000 }, ++ { .offset = 162, .value = 0x0000 }, ++ { .offset = 169, .value = 0x0000 }, ++ { .offset = 170, .value = 0x0000 }, ++ { .offset = 171, .value = 0x0000 }, ++ { .offset = 172, .value = 0x0000 }, ++ { .offset = 173, .value = 0x0000 }, ++ { .offset = 174, .value = 0x0000 }, ++ { .offset = 175, .value = 0x0000 }, ++ { .offset = 176, .value = 0x0000 }, ++ { .offset = 219, .value = 0x1108 }, ++}; ++ ++static struct board_info __initdata board_VH4032N = { ++ .name = "VH4032N", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "LAN4", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "LAN3", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "LAN2", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "LAN1", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43222, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ .board_fixups = vh4032n_fixups, ++ .num_board_fixups = ARRAY_SIZE(vh4032n_fixups), ++ }, ++}; ++ ++static struct sprom_fixup __initdata vr3025u_fixups[] = { ++ { .offset = 97, .value = 0xfeb3 }, ++ { .offset = 98, .value = 0x1618 }, ++ { .offset = 99, .value = 0xfab0 }, ++ { .offset = 113, .value = 0xfed1 }, ++ { .offset = 114, .value = 0x1609 }, ++ { .offset = 115, .value = 0xfad9 }, ++}; ++ ++static struct board_info __initdata board_VR3025u = { ++ .name = "96368M-1541N", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43222, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ .board_fixups = vr3025u_fixups, ++ .num_board_fixups = ARRAY_SIZE(vr3025u_fixups), ++ }, ++}; ++ ++static struct sprom_fixup __initdata vr3025un_fixups[] = { ++ { .offset = 97, .value = 0xfeb3 }, ++ { .offset = 98, .value = 0x1618 }, ++ { .offset = 99, .value = 0xfab0 }, ++ { .offset = 113, .value = 0xfed1 }, ++ { .offset = 114, .value = 0x1609 }, ++ { .offset = 115, .value = 0xfad9 }, ++}; ++ ++static struct board_info __initdata board_VR3025un = { ++ .name = "96368M-1341N", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43222, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ .board_fixups = vr3025un_fixups, ++ .num_board_fixups = ARRAY_SIZE(vr3025un_fixups), ++ }, ++}; ++ ++static struct sprom_fixup __initdata vr3026e_fixups[] = { ++ { .offset = 97, .value = 0xfeb3 }, ++ { .offset = 98, .value = 0x1618 }, ++ { .offset = 99, .value = 0xfab0 }, ++ { .offset = 113, .value = 0xfed1 }, ++ { .offset = 114, .value = 0x1609 }, ++ { .offset = 115, .value = 0xfad9 }, ++}; ++ ++static struct board_info __initdata board_VR3026e = { ++ .name = "96368MT-1341N1", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43222, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ .board_fixups = vr3026e_fixups, ++ .num_board_fixups = ARRAY_SIZE(vr3026e_fixups), ++ }, ++}; ++ ++static struct sprom_fixup __initdata wap5813n_fixups[] = { ++ { .offset = 97, .value = 0xfeed }, ++ { .offset = 98, .value = 0x15d1 }, ++ { .offset = 99, .value = 0xfb0d }, ++ { .offset = 113, .value = 0xfef7 }, ++ { .offset = 114, .value = 0x15f7 }, ++ { .offset = 115, .value = 0xfb1a }, ++}; ++ ++static struct board_info __initdata board_WAP5813n = { ++ .name = "96369R-1231N", ++ .expected_cpu_id = 0x6368, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [4] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++ ++ .use_fallback_sprom = 1, ++ .fallback_sprom = { ++ .type = SPROM_BCM43222, ++ .pci_bus = 0, ++ .pci_dev = 1, ++ .board_fixups = wap5813n_fixups, ++ .num_board_fixups = ARRAY_SIZE(wap5813n_fixups), ++ }, ++}; ++#endif /* CONFIG_BCM63XX_CPU_6368 */ ++ ++/* + * all boards + */ + static const struct board_info __initconst *bcm963xx_boards[] = { +@@ -1982,6 +2626,22 @@ static const struct board_info __initcon + &board_hg253s_v2, + &board_nb6, + #endif /* CONFIG_BCM63XX_CPU_6362 */ ++#ifdef CONFIG_BCM63XX_CPU_6368 ++ &board_96368mvngr, ++ &board_96368mvwg, ++ &board_AV4202N, ++ &board_DGND3700v1_3800B, ++ &board_EVG2000, ++ &board_HG622, ++ &board_HG655b, ++ &board_P870HW51A_V2, ++ &board_R1000H, ++ &board_VH4032N, ++ &board_VR3025u, ++ &board_VR3025un, ++ &board_VR3026e, ++ &board_WAP5813n, ++#endif /* CONFIG_BCM63XX_CPU_6368 */ + }; + + static struct of_device_id const bcm963xx_boards_dt[] = { +@@ -2078,6 +2738,20 @@ static struct of_device_id const bcm963x + { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, + #endif /* CONFIG_BCM63XX_CPU_6362 */ + #ifdef CONFIG_BCM63XX_CPU_6368 ++ { .compatible = "actiontec,r1000h", .data = &board_R1000H, }, ++ { .compatible = "adb,av4202n", .data = &board_AV4202N, }, ++ { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, ++ { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, ++ { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, ++ { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, ++ { .compatible = "comtrend,vr-3026e", .data = &board_VR3026e, }, ++ { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, ++ { .compatible = "huawei,echolife-hg622", .data = &board_HG622, }, ++ { .compatible = "huawei,echolife-hg655b", .data = &board_HG655b, }, ++ { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, ++ { .compatible = "netgear,evg2000", .data = &board_EVG2000, }, ++ { .compatible = "observa,vh4032n", .data = &board_VH4032N, }, ++ { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, + #endif /* CONFIG_BCM63XX_CPU_6368 */ + #ifdef CONFIG_BCM63XX_CPU_63268 + #endif /* CONFIG_BCM63XX_CPU_63268 */ +--- a/arch/mips/bcm63xx/boards/board_common.c ++++ b/arch/mips/bcm63xx/boards/board_common.c +@@ -81,12 +81,25 @@ void __init board_early_setup(const stru + bcm63xx_pci_enabled = 1; + if (BCMCPU_IS_6348()) + val |= GPIO_MODE_6348_G2_PCI; ++ ++ if (BCMCPU_IS_6368()) ++ val |= GPIO_MODE_6368_PCI_REQ1 | ++ GPIO_MODE_6368_PCI_GNT1 | ++ GPIO_MODE_6368_PCI_INTB | ++ GPIO_MODE_6368_PCI_REQ0 | ++ GPIO_MODE_6368_PCI_GNT0; + } + #endif + + if (board.has_pccard) { + if (BCMCPU_IS_6348()) + val |= GPIO_MODE_6348_G1_MII_PCCARD; ++ ++ if (BCMCPU_IS_6368()) ++ val |= GPIO_MODE_6368_PCMCIA_CD1 | ++ GPIO_MODE_6368_PCMCIA_CD2 | ++ GPIO_MODE_6368_PCMCIA_VS1 | ++ GPIO_MODE_6368_PCMCIA_VS2; + } + + if (board.has_enet0 && !board.enet0.use_internal_phy) { diff --git a/target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch b/target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch new file mode 100644 index 0000000000..2718bbdd36 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch @@ -0,0 +1,307 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -2542,6 +2542,273 @@ static struct board_info __initdata boar + #endif /* CONFIG_BCM63XX_CPU_6368 */ + + /* ++ * known 63268/63269 boards ++ */ ++#ifdef CONFIG_BCM63XX_CPU_63268 ++static struct board_info __initdata board_963268bu_p300 = { ++ .name = "963268BU_P300", ++ .expected_cpu_id = 0x63268, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_usbd = 1, ++ .usbd = { ++ .use_fullspeed = 0, ++ .port_no = 0, ++ }, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 17, ++ .name = "FE1", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "GbE2", ++ }, ++ [4] = { ++ .used = 1, ++ .phy_id = 0, ++ .name = "GbE3", ++ .mii_override = 1, ++ .timing_sel = 1, ++ }, ++ [5] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "GbE1", ++ .mii_override = 1, ++ .timing_sel = 1, ++ }, ++ [6] = { ++ .used = 1, ++ .phy_id = 24, ++ .name = "GbE4", ++ .mii_override = 1, ++ .timing_sel = 1, ++ }, ++ [7] = { ++ .used = 1, ++ .phy_id = 25, ++ .name = "GbE5", ++ .mii_override = 1, ++ .timing_sel = 1, ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_963269bhr = { ++ .name = "963269BHR", ++ .expected_cpu_id = 0x63268, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "port1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "port2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "port3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "port4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_BSKYB_63168 = { ++ .name = "BSKYB_63168", ++ .expected_cpu_id = 0x63268, ++ ++ .has_pci = 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_H500s = { ++ .name = "BXK00C-1.6", ++ .expected_cpu_id = 0x63268, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [3] = { ++ .used = 1, ++ .phy_id = 12, ++ .name = "WAN", ++ }, ++ [4] = { ++ .used = 1, ++ .phy_id = 0, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .mii_override = 1, ++ .timing_sel = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_VG8050 = { ++ .name = "963169P-1861N5", ++ .expected_cpu_id = 0x63268, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [6] = { ++ .used = 1, ++ .phy_id = 0xff, ++ .bypass_link = 1, ++ .force_speed = 1000, ++ .force_duplex_full = 1, ++ .mii_override = 1, ++ .timing_sel = 1, ++ .name = "RGMII", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_VR3032u = { ++ .name = "963168M-1841N1", ++ .expected_cpu_id = 0x63268, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "LAN2", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "LAN3", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "LAN4", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "LAN1", ++ }, ++ }, ++ }, ++}; ++ ++static struct board_info __initdata board_vw6339gu = { ++ .name = "VW6339GU", ++ .expected_cpu_id = 0x63268, ++ ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ .num_usbh_ports = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "LAN2", ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "LAN3", ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "LAN4", ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "LAN1", ++ }, ++ [4] = { ++ .used = 1, ++ .phy_id = 7, ++ .name = "WAN", ++ .mii_override = 1, ++ .timing_sel = 1, ++ }, ++ }, ++ }, ++}; ++#endif /* CONFIG_BCM63XX_CPU_63268 */ ++ ++/* + * all boards + */ + static const struct board_info __initconst *bcm963xx_boards[] = { +@@ -2642,6 +2909,15 @@ static const struct board_info __initcon + &board_VR3026e, + &board_WAP5813n, + #endif /* CONFIG_BCM63XX_CPU_6368 */ ++#ifdef CONFIG_BCM63XX_CPU_63268 ++ &board_963268bu_p300, ++ &board_963269bhr, ++ &board_BSKYB_63168, ++ &board_H500s, ++ &board_VG8050, ++ &board_VR3032u, ++ &board_vw6339gu, ++#endif /* CONFIG_BCM63XX_CPU_63268 */ + }; + + static struct of_device_id const bcm963xx_boards_dt[] = { +@@ -2754,6 +3030,14 @@ static struct of_device_id const bcm963x + { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, + #endif /* CONFIG_BCM63XX_CPU_6368 */ + #ifdef CONFIG_BCM63XX_CPU_63268 ++ { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, ++ { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, ++ { .compatible = "comtrend,vg-8050", .data = &board_VG8050, }, ++ { .compatible = "comtrend,vr-3032u", .data = &board_VR3032u, }, ++ { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, ++ { .compatible = "sercomm,h500-s-lowi", .data = &board_H500s, }, ++ { .compatible = "sercomm,h500-s-vfes", .data = &board_H500s, }, ++ { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, + #endif /* CONFIG_BCM63XX_CPU_63268 */ + #endif /* CONFIG_OF */ + { }, diff --git a/target/linux/bcm63xx/patches-5.4/522-MIPS-BCM63XX-add-963281TAN-reference-board.patch b/target/linux/bcm63xx/patches-5.4/522-MIPS-BCM63XX-add-963281TAN-reference-board.patch deleted file mode 100644 index a6f4a84336..0000000000 --- a/target/linux/bcm63xx/patches-5.4/522-MIPS-BCM63XX-add-963281TAN-reference-board.patch +++ /dev/null @@ -1,67 +0,0 @@ -From f0649f7b7c672cf452a1796a1422bf615e1973f8 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Tue, 29 May 2012 11:01:12 +0200 -Subject: [PATCH] MIPS: BCM63XX: add 963281TAN reference board - ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 71 +++++++++++++++++++++++++++++ - 1 files changed, 71 insertions(+), 0 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -348,6 +348,39 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_963281TAN = { -+ .name = "963281TAN", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6328 */ - - /* -@@ -702,6 +735,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -+ &board_963281TAN, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - &board_96338gw, -@@ -741,6 +775,7 @@ static struct of_device_id const bcm963x - { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 -+ { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 diff --git a/target/linux/bcm63xx/patches-5.4/523-board_bcm6328-d-link-dsl-274xb-f.patch b/target/linux/bcm63xx/patches-5.4/523-board_bcm6328-d-link-dsl-274xb-f.patch deleted file mode 100644 index 97f71e115a..0000000000 --- a/target/linux/bcm63xx/patches-5.4/523-board_bcm6328-d-link-dsl-274xb-f.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 66808f706b3dcd83a9f5157997ff478a880a2906 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Mon, 30 Apr 2012 09:10:51 +0200 -Subject: [PATCH 70/79] MIPS: BCM63XX: Add board definition for D-Link - DSL-274xB rev F1 - ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 104 +++++++++++++++++++++++++++++ - 1 files changed, 104 insertions(+), 0 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -381,6 +381,50 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_dsl_274xb_f1 = { -+ .name = "AW4339U", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_ATHEROS, -+ .caldata_offset = 0x7d1000, -+ .slot = 0, -+ .led_pin = -1, -+ .led_active_high = 1, -+ }, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 4", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 1", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6328 */ - - /* -@@ -736,6 +780,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, - &board_963281TAN, -+ &board_dsl_274xb_f1, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - &board_96338gw, -@@ -777,6 +822,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6328 - { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, -+ { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, diff --git a/target/linux/bcm63xx/patches-5.4/524-board_bcm6328-adb-a4001n1.patch b/target/linux/bcm63xx/patches-5.4/524-board_bcm6328-adb-a4001n1.patch deleted file mode 100644 index 065f2df164..0000000000 --- a/target/linux/bcm63xx/patches-5.4/524-board_bcm6328-adb-a4001n1.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -382,6 +382,49 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_A4001N1 = { -+ .name = "963281T_TEF", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ - static struct board_info __initdata board_dsl_274xb_f1 = { - .name = "AW4339U", - .expected_cpu_id = 0x6328, -@@ -780,6 +823,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, - &board_963281TAN, -+ &board_A4001N1, - &board_dsl_274xb_f1, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 -@@ -820,6 +864,7 @@ static struct of_device_id const bcm963x - { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 -+ { .compatible = "adb,a4001n1", .data = &board_A4001N1, }, - { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, - { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, diff --git a/target/linux/bcm63xx/patches-5.4/525-board_bcm6328-comtrend-ar-5387un.patch b/target/linux/bcm63xx/patches-5.4/525-board_bcm6328-comtrend-ar-5387un.patch deleted file mode 100644 index 99a026f9d5..0000000000 --- a/target/linux/bcm63xx/patches-5.4/525-board_bcm6328-comtrend-ar-5387un.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -349,6 +349,78 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata ar5387un_fixups[] = { -+ { .offset = 2, .value = 0x05bb }, -+ { .offset = 65, .value = 0x1204 }, -+ { .offset = 78, .value = 0x0303 }, -+ { .offset = 79, .value = 0x0202 }, -+ { .offset = 80, .value = 0xff02 }, -+ { .offset = 87, .value = 0x0315 }, -+ { .offset = 88, .value = 0x0315 }, -+ { .offset = 96, .value = 0x2048 }, -+ { .offset = 97, .value = 0xff11 }, -+ { .offset = 98, .value = 0x1567 }, -+ { .offset = 99, .value = 0xfb24 }, -+ { .offset = 100, .value = 0x3e3c }, -+ { .offset = 101, .value = 0x4038 }, -+ { .offset = 102, .value = 0xfe7f }, -+ { .offset = 103, .value = 0x1279 }, -+ { .offset = 112, .value = 0x2048 }, -+ { .offset = 113, .value = 0xff03 }, -+ { .offset = 114, .value = 0x154c }, -+ { .offset = 115, .value = 0xfb27 }, -+ { .offset = 116, .value = 0x3e3c }, -+ { .offset = 117, .value = 0x4038 }, -+ { .offset = 118, .value = 0xfe87 }, -+ { .offset = 119, .value = 0x1233 }, -+ { .offset = 203, .value = 0x2226 }, -+}; -+ -+static struct board_info __initdata board_AR5387un = { -+ .name = "96328A-1441N1", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ar5387un_fixups, -+ .num_board_fixups = ARRAY_SIZE(ar5387un_fixups), -+ }, -+}; -+ - static struct board_info __initdata board_963281TAN = { - .name = "963281TAN", - .expected_cpu_id = 0x6328, -@@ -822,6 +894,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -+ &board_AR5387un, - &board_963281TAN, - &board_A4001N1, - &board_dsl_274xb_f1, -@@ -867,6 +940,7 @@ static struct of_device_id const bcm963x - { .compatible = "adb,a4001n1", .data = &board_A4001N1, }, - { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, -+ { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, }, - { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 diff --git a/target/linux/bcm63xx/patches-5.4/526-board_bcm6328-comtrend-ar-5381u.patch b/target/linux/bcm63xx/patches-5.4/526-board_bcm6328-comtrend-ar-5381u.patch deleted file mode 100644 index 8ed555490b..0000000000 --- a/target/linux/bcm63xx/patches-5.4/526-board_bcm6328-comtrend-ar-5381u.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -349,6 +349,60 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata ar5381u_fixups[] = { -+ { .offset = 97, .value = 0xfee5 }, -+ { .offset = 98, .value = 0x157c }, -+ { .offset = 99, .value = 0xfae7 }, -+ { .offset = 113, .value = 0xfefa }, -+ { .offset = 114, .value = 0x15d6 }, -+ { .offset = 115, .value = 0xfaf8 }, -+}; -+ -+static struct board_info __initdata board_AR5381u = { -+ .name = "96328A-1241N", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ar5381u_fixups, -+ .num_board_fixups = ARRAY_SIZE(ar5381u_fixups), -+ }, -+}; -+ - static struct sprom_fixup __initdata ar5387un_fixups[] = { - { .offset = 2, .value = 0x05bb }, - { .offset = 65, .value = 0x1204 }, -@@ -894,6 +948,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -+ &board_AR5381u, - &board_AR5387un, - &board_963281TAN, - &board_A4001N1, -@@ -940,6 +995,7 @@ static struct of_device_id const bcm963x - { .compatible = "adb,a4001n1", .data = &board_A4001N1, }, - { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, -+ { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, }, - { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, }, - { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ diff --git a/target/linux/bcm63xx/patches-5.4/527-board_bcm6328-sagem-fast-2704-v2.patch b/target/linux/bcm63xx/patches-5.4/527-board_bcm6328-sagem-fast-2704-v2.patch deleted file mode 100644 index 4828c8e50c..0000000000 --- a/target/linux/bcm63xx/patches-5.4/527-board_bcm6328-sagem-fast-2704-v2.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Marcin Jurkowski -Date: Thu, 31 Oct 2013 22:33:10 +0000 -Subject: [PATCH] bcm63xx: Add kernel support for Sagemcom F@ST2704V2 ADSL - router - -This adds kernel support support for Sagemcom F@st 2704 wireless ADSL -router. -It's a BCM6328-based 802.11n wireless router with USB port and ADSL2+ -modem equipped with 64 MiB RAM and 8 MiB flash. - -Signed-off-by: Marcin Jurkowski ---- ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -594,6 +594,42 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_FAST2704V2 = { -+ .name = "F@ST2704V2", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .has_usbd = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6328 */ - - /* -@@ -953,6 +989,7 @@ static const struct board_info __initcon - &board_963281TAN, - &board_A4001N1, - &board_dsl_274xb_f1, -+ &board_FAST2704V2, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - &board_96338gw, -@@ -998,6 +1035,7 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, }, - { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, }, - { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, -+ { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, diff --git a/target/linux/bcm63xx/patches-5.4/528-board_bcm6328-adb-a4001n.patch b/target/linux/bcm63xx/patches-5.4/528-board_bcm6328-adb-a4001n.patch deleted file mode 100644 index da2200652e..0000000000 --- a/target/linux/bcm63xx/patches-5.4/528-board_bcm6328-adb-a4001n.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -508,6 +508,49 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_A4001N = { -+ .name = "96328dg2x2", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ - static struct board_info __initdata board_A4001N1 = { - .name = "963281T_TEF", - .expected_cpu_id = 0x6328, -@@ -987,6 +1030,7 @@ static const struct board_info __initcon - &board_AR5381u, - &board_AR5387un, - &board_963281TAN, -+ &board_A4001N, - &board_A4001N1, - &board_dsl_274xb_f1, - &board_FAST2704V2, -@@ -1029,6 +1073,7 @@ static struct of_device_id const bcm963x - { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 -+ { .compatible = "adb,a4001n", .data = &board_A4001N, }, - { .compatible = "adb,a4001n1", .data = &board_A4001N1, }, - { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, diff --git a/target/linux/bcm63xx/patches-5.4/529-board_bcm6328-nucom-r5010un-v2.patch b/target/linux/bcm63xx/patches-5.4/529-board_bcm6328-nucom-r5010un-v2.patch deleted file mode 100644 index 4f63f23cda..0000000000 --- a/target/linux/bcm63xx/patches-5.4/529-board_bcm6328-nucom-r5010un-v2.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -673,6 +673,50 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_R5010UNV2 = { -+ .name = "96328ang", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ - #endif /* CONFIG_BCM63XX_CPU_6328 */ - - /* -@@ -1034,6 +1078,7 @@ static const struct board_info __initcon - &board_A4001N1, - &board_dsl_274xb_f1, - &board_FAST2704V2, -+ &board_R5010UNV2, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - &board_96338gw, -@@ -1080,6 +1125,7 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, }, - { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, }, - { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, -+ { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, }, - { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 diff --git a/target/linux/bcm63xx/patches-5.4/530-board_bcm6328-sercomm-ad1018.patch b/target/linux/bcm63xx/patches-5.4/530-board_bcm6328-sercomm-ad1018.patch deleted file mode 100644 index 409f3d8e26..0000000000 --- a/target/linux/bcm63xx/patches-5.4/530-board_bcm6328-sercomm-ad1018.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -349,6 +349,71 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata ad1018_fixups[] = { -+ { .offset = 6, .value = 0x1c00 }, -+ { .offset = 65, .value = 0x1256 }, -+ { .offset = 96, .value = 0x2046 }, -+ { .offset = 97, .value = 0xfe69 }, -+ { .offset = 98, .value = 0x1726 }, -+ { .offset = 99, .value = 0xfa5c }, -+ { .offset = 112, .value = 0x2046 }, -+ { .offset = 113, .value = 0xfea8 }, -+ { .offset = 114, .value = 0x1978 }, -+ { .offset = 115, .value = 0xfa26 }, -+ { .offset = 161, .value = 0x2222 }, -+ { .offset = 169, .value = 0x2222 }, -+ { .offset = 171, .value = 0x2222 }, -+ { .offset = 173, .value = 0x2222 }, -+ { .offset = 174, .value = 0x4444 }, -+ { .offset = 175, .value = 0x2222 }, -+ { .offset = 176, .value = 0x4444 }, -+}; -+ -+static struct board_info __initdata board_AD1018 = { -+ .name = "96328avngr", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "FIBRE", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43217, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ .board_fixups = ad1018_fixups, -+ .num_board_fixups = ARRAY_SIZE(ad1018_fixups), -+ }, -+}; -+ - static struct sprom_fixup __initdata ar5381u_fixups[] = { - { .offset = 97, .value = 0xfee5 }, - { .offset = 98, .value = 0x157c }, -@@ -1071,6 +1136,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6318 */ - #ifdef CONFIG_BCM63XX_CPU_6328 - &board_96328avng, -+ &board_AD1018, - &board_AR5381u, - &board_AR5387un, - &board_963281TAN, -@@ -1127,6 +1193,8 @@ static struct of_device_id const bcm963x - { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, - { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, }, - { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, }, -+ { .compatible = "sercomm,ad1018", .data = &board_AD1018, }, -+ { .compatible = "sercomm,ad1018-nor", .data = &board_AD1018, }, - #endif /* CONFIG_BCM63XX_CPU_6328 */ - #ifdef CONFIG_BCM63XX_CPU_6338 - { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, diff --git a/target/linux/bcm63xx/patches-5.4/531-board-bcm6328-adb-pdg-a4001n-a-000-1a1-ax.patch b/target/linux/bcm63xx/patches-5.4/531-board-bcm6328-adb-pdg-a4001n-a-000-1a1-ax.patch deleted file mode 100644 index 3b08649bbc..0000000000 --- a/target/linux/bcm63xx/patches-5.4/531-board-bcm6328-adb-pdg-a4001n-a-000-1a1-ax.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -616,6 +616,49 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_PDG_A4001N_A_000_1A1_AX = { -+ .name = "96328avng", -+ .expected_cpu_id = 0x6328, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43225, -+ .pci_bus = 1, -+ .pci_dev = 0, -+ }, -+}; -+ - static struct board_info __initdata board_A4001N1 = { - .name = "963281T_TEF", - .expected_cpu_id = 0x6328, -@@ -1141,6 +1184,7 @@ static const struct board_info __initcon - &board_AR5387un, - &board_963281TAN, - &board_A4001N, -+ &board_PDG_A4001N_A_000_1A1_AX, - &board_A4001N1, - &board_dsl_274xb_f1, - &board_FAST2704V2, -@@ -1186,6 +1230,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6328 - { .compatible = "adb,a4001n", .data = &board_A4001N, }, - { .compatible = "adb,a4001n1", .data = &board_A4001N1, }, -+ { .compatible = "adb,pdg-a4001n-a-000-1a1-ax", .data = &board_PDG_A4001N_A_000_1A1_AX, }, - { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, }, - { .compatible = "brcm,bcm96328avng", .data = &board_96328avng, }, - { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, }, diff --git a/target/linux/bcm63xx/patches-5.4/565-board_bcm6348-bt-voyager-2500v-bb.patch b/target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch similarity index 54% rename from target/linux/bcm63xx/patches-5.4/565-board_bcm6348-bt-voyager-2500v-bb.patch rename to target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch index 6536e17798..750deb6da0 100644 --- a/target/linux/bcm63xx/patches-5.4/565-board_bcm6348-bt-voyager-2500v-bb.patch +++ b/target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch @@ -1,50 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1202,6 +1202,27 @@ static struct board_info __initdata boar - .force_duplex_full = 1, - }, - }; -+ -+static struct board_info __initdata board_V2500V_BB = { -+ .name = "V2500V_BB", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6348 */ - - /* -@@ -1362,6 +1383,7 @@ static const struct board_info __initcon - &board_96348_D4PW, - &board_spw500v, - &board_96348sv, -+ &board_V2500V_BB, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1414,6 +1436,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96348gw-10", .data = &board_96348gw_10, }, - { .compatible = "brcm,bcm96348gw-11", .data = &board_96348gw_11, }, - { .compatible = "brcm,bcm96348gw-a", .data = &board_96348gw_a, }, -+ { .compatible = "bt,voyager-2500v-bb", .data = &board_V2500V_BB, }, - { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, }, - { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, - { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, -@@ -1469,6 +1492,22 @@ void __init board_bcm963xx_init(void) +@@ -3066,6 +3066,22 @@ void __init board_bcm963xx_init(void) val &= MPI_CSBASE_BASE_MASK; } boot_addr = (u8 *)KSEG1ADDR(val); diff --git a/target/linux/bcm63xx/patches-5.4/567-MIPS-BCM63XX-add-inventel-Livebox-support.patch b/target/linux/bcm63xx/patches-5.4/532-MIPS-BCM63XX-add-inventel-Livebox-support.patch similarity index 100% rename from target/linux/bcm63xx/patches-5.4/567-MIPS-BCM63XX-add-inventel-Livebox-support.patch rename to target/linux/bcm63xx/patches-5.4/532-MIPS-BCM63XX-add-inventel-Livebox-support.patch diff --git a/target/linux/bcm63xx/patches-5.4/542-board_bcm6338-dynalink-rta1320.patch b/target/linux/bcm63xx/patches-5.4/542-board_bcm6338-dynalink-rta1320.patch deleted file mode 100644 index d3b048a6ac..0000000000 --- a/target/linux/bcm63xx/patches-5.4/542-board_bcm6338-dynalink-rta1320.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -871,6 +871,19 @@ static struct board_info __initdata boar - .force_duplex_full = 1, - }, - }; -+ -+static struct board_info __initdata board_rta1320_16m = { -+ .name = "RTA1320_16M", -+ .expected_cpu_id = 0x6338, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6338 */ - - /* -@@ -1207,6 +1220,7 @@ static const struct board_info __initcon - &board_96338gw, - &board_96338w, - &board_96338w2_e7t, -+ &board_rta1320_16m, - #endif /* CONFIG_BCM63XX_CPU_6338 */ - #ifdef CONFIG_BCM63XX_CPU_6345 - &board_96345gw2, -@@ -1258,6 +1272,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6338 - { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, - { .compatible = "brcm,bcm96338w", .data = &board_96338w, }, -+ { .compatible = "dynalink,rta1320", .data = &board_rta1320_16m, }, - { .compatible = "d-link,dsl-2640u", .data = &board_96338w2_e7t, }, - #endif /* CONFIG_BCM63XX_CPU_6338 */ - #ifdef CONFIG_BCM63XX_CPU_6345 diff --git a/target/linux/bcm63xx/patches-5.4/561-board-bcm6348-D4PW.patch b/target/linux/bcm63xx/patches-5.4/561-board-bcm6348-D4PW.patch deleted file mode 100644 index 62e8f381c1..0000000000 --- a/target/linux/bcm63xx/patches-5.4/561-board-bcm6348-D4PW.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1093,6 +1093,21 @@ static struct board_info __initdata boar - - .has_ohci0 = 1, - }; -+ -+static struct board_info __initdata board_96348_D4PW = { -+ .name = "D-4P-W", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6348 */ - - /* -@@ -1248,6 +1263,7 @@ static const struct board_info __initcon - &board_DV201AMR, - &board_96348gw_a, - &board_rta1025w_16, -+ &board_96348_D4PW, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1300,6 +1316,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96348gw-10", .data = &board_96348gw_10, }, - { .compatible = "brcm,bcm96348gw-11", .data = &board_96348gw_11, }, - { .compatible = "brcm,bcm96348gw-a", .data = &board_96348gw_a, }, -+ { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, }, - { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, - { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, - { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, diff --git a/target/linux/bcm63xx/patches-5.4/562-board_bcm6348-t-com-speedport-w-500v.patch b/target/linux/bcm63xx/patches-5.4/562-board_bcm6348-t-com-speedport-w-500v.patch deleted file mode 100644 index a20047d3d3..0000000000 --- a/target/linux/bcm63xx/patches-5.4/562-board_bcm6348-t-com-speedport-w-500v.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1108,6 +1108,36 @@ static struct board_info __initdata boar - .force_duplex_full = 1, - }, - }; -+ -+static struct sprom_fixup __initdata spw500v_fixups[] = { -+ { .offset = 46, .value = 0x3046 }, -+ { .offset = 47, .value = 0x15a7 }, -+ { .offset = 48, .value = 0xfa89 }, -+ { .offset = 49, .value = 0xfe79 }, -+ { .offset = 57, .value = 0x6a49 }, -+}; -+ -+static struct board_info __initdata board_spw500v = { -+ .name = "SPW500V", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = spw500v_fixups, -+ .num_board_fixups = ARRAY_SIZE(spw500v_fixups), -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6348 */ - - /* -@@ -1264,6 +1294,7 @@ static const struct board_info __initcon - &board_96348gw_a, - &board_rta1025w_16, - &board_96348_D4PW, -+ &board_spw500v, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1321,6 +1352,7 @@ static struct of_device_id const bcm963x - { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, - { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, - { .compatible = "sagem,fast-2404", .data = &board_FAST2404, }, -+ { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, - { .compatible = "tp-link,td-w8900gb", .data = &board_96348gw_11, }, - { .compatible = "usrobotics,usr9108", .data = &board_96348gw_a, }, - #endif /* CONFIG_BCM63XX_CPU_6348 */ diff --git a/target/linux/bcm63xx/patches-5.4/563-board_bcm6348-tecom-gw6000-gw6200.patch b/target/linux/bcm63xx/patches-5.4/563-board_bcm6348-tecom-gw6000-gw6200.patch deleted file mode 100644 index 3d9c000803..0000000000 --- a/target/linux/bcm63xx/patches-5.4/563-board_bcm6348-tecom-gw6000-gw6200.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1002,6 +1002,46 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - }; - -+static struct board_info __initdata board_gw6200 = { -+ .name = "GW6200", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_gw6000 = { -+ .name = "GW6000", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - static struct board_info __initdata board_FAST2404 = { - .name = "F@ST2404", - .expected_cpu_id = 0x6348, -@@ -1287,6 +1327,8 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6348 - &board_96348r, - &board_96348gw, -+ &board_gw6000, -+ &board_gw6200, - &board_96348gw_10, - &board_96348gw_11, - &board_FAST2404, -@@ -1353,6 +1395,8 @@ static struct of_device_id const bcm963x - { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, - { .compatible = "sagem,fast-2404", .data = &board_FAST2404, }, - { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, -+ { .compatible = "tecom,gw6000", .data = &board_gw6000, }, -+ { .compatible = "tecom,gw6200", .data = &board_gw6200, }, - { .compatible = "tp-link,td-w8900gb", .data = &board_96348gw_11, }, - { .compatible = "usrobotics,usr9108", .data = &board_96348gw_a, }, - #endif /* CONFIG_BCM63XX_CPU_6348 */ diff --git a/target/linux/bcm63xx/patches-5.4/564-board-bcm6348-telsey-magic.patch b/target/linux/bcm63xx/patches-5.4/564-board-bcm6348-telsey-magic.patch deleted file mode 100644 index ba9ee0b4d4..0000000000 --- a/target/linux/bcm63xx/patches-5.4/564-board-bcm6348-telsey-magic.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1178,6 +1178,30 @@ static struct board_info __initdata boar - .num_board_fixups = ARRAY_SIZE(spw500v_fixups), - }, - }; -+ -+static struct board_info __initdata board_96348sv = { -+ .name = "MAGIC", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ /* it has BP_ENET_EXTERNAL_PHY */ -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6348 */ - - /* -@@ -1337,6 +1361,7 @@ static const struct board_info __initcon - &board_rta1025w_16, - &board_96348_D4PW, - &board_spw500v, -+ &board_96348sv, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1397,6 +1422,7 @@ static struct of_device_id const bcm963x - { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, - { .compatible = "tecom,gw6000", .data = &board_gw6000, }, - { .compatible = "tecom,gw6200", .data = &board_gw6200, }, -+ { .compatible = "telsey,magic", .data = &board_96348sv, }, - { .compatible = "tp-link,td-w8900gb", .data = &board_96348gw_11, }, - { .compatible = "usrobotics,usr9108", .data = &board_96348gw_a, }, - #endif /* CONFIG_BCM63XX_CPU_6348 */ diff --git a/target/linux/bcm63xx/patches-5.4/566-board_bcm6348-bt-voyager-2110.patch b/target/linux/bcm63xx/patches-5.4/566-board_bcm6348-bt-voyager-2110.patch deleted file mode 100644 index c51b28854b..0000000000 --- a/target/linux/bcm63xx/patches-5.4/566-board_bcm6348-bt-voyager-2110.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -979,6 +979,22 @@ static struct board_info __initdata boar - .has_ehci0 = 1, - }; - -+/* BT Voyager 2110 */ -+static struct board_info __initdata board_V2110 = { -+ .name = "V2110", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - static struct board_info __initdata board_96348gw = { - .name = "96348GW", - .expected_cpu_id = 0x6348, -@@ -1384,6 +1400,7 @@ static const struct board_info __initcon - &board_spw500v, - &board_96348sv, - &board_V2500V_BB, -+ &board_V2110, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1436,6 +1453,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96348gw-10", .data = &board_96348gw_10, }, - { .compatible = "brcm,bcm96348gw-11", .data = &board_96348gw_11, }, - { .compatible = "brcm,bcm96348gw-a", .data = &board_96348gw_a, }, -+ { .compatible = "bt,voyager-2110", .data = &board_V2110, }, - { .compatible = "bt,voyager-2500v-bb", .data = &board_V2500V_BB, }, - { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, }, - { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, diff --git a/target/linux/bcm63xx/patches-5.4/568-board_bcm6348-comtrend-ct-536plus-ct-5621.patch b/target/linux/bcm63xx/patches-5.4/568-board_bcm6348-comtrend-ct-536plus-ct-5621.patch deleted file mode 100644 index c815e66f1d..0000000000 --- a/target/linux/bcm63xx/patches-5.4/568-board_bcm6348-comtrend-ct-536plus-ct-5621.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -995,6 +995,30 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_ct536_ct5621 = { -+ .name = "CT536_CT5621", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_96348gw = { - .name = "96348GW", - .expected_cpu_id = 0x6348, -@@ -1401,6 +1425,7 @@ static const struct board_info __initcon - &board_96348sv, - &board_V2500V_BB, - &board_V2110, -+ &board_ct536_ct5621, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1455,6 +1480,8 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96348gw-a", .data = &board_96348gw_a, }, - { .compatible = "bt,voyager-2110", .data = &board_V2110, }, - { .compatible = "bt,voyager-2500v-bb", .data = &board_V2500V_BB, }, -+ { .compatible = "comtrend,ct-536plus", .data = &board_ct536_ct5621, }, -+ { .compatible = "comtrend,ct-5621", .data = &board_ct536_ct5621, }, - { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, }, - { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, - { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, diff --git a/target/linux/bcm63xx/patches-5.4/569-board_bcm6348-comtrend-ct-5365.patch b/target/linux/bcm63xx/patches-5.4/569-board_bcm6348-comtrend-ct-5365.patch deleted file mode 100644 index 7dbfb825fa..0000000000 --- a/target/linux/bcm63xx/patches-5.4/569-board_bcm6348-comtrend-ct-5365.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1019,6 +1019,29 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_96348A_122 = { -+ .name = "96348A-122", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_96348gw = { - .name = "96348GW", - .expected_cpu_id = 0x6348, -@@ -1426,6 +1449,7 @@ static const struct board_info __initcon - &board_V2500V_BB, - &board_V2110, - &board_ct536_ct5621, -+ &board_96348A_122, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1481,6 +1505,7 @@ static struct of_device_id const bcm963x - { .compatible = "bt,voyager-2110", .data = &board_V2110, }, - { .compatible = "bt,voyager-2500v-bb", .data = &board_V2500V_BB, }, - { .compatible = "comtrend,ct-536plus", .data = &board_ct536_ct5621, }, -+ { .compatible = "comtrend,ct-5365", .data = &board_96348A_122, }, - { .compatible = "comtrend,ct-5621", .data = &board_ct536_ct5621, }, - { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, }, - { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, diff --git a/target/linux/bcm63xx/patches-5.4/570-board_bcm6348-telsey-cpva502plus.patch b/target/linux/bcm63xx/patches-5.4/570-board_bcm6348-telsey-cpva502plus.patch deleted file mode 100644 index dc028609be..0000000000 --- a/target/linux/bcm63xx/patches-5.4/570-board_bcm6348-telsey-cpva502plus.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -995,6 +995,34 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_CPVA502plus = { -+ .name = "CPVA502+", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .ephy_reset_gpio = 4, -+ .ephy_reset_gpio_flags = GPIO_ACTIVE_LOW, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_ct536_ct5621 = { - .name = "CT536_CT5621", - .expected_cpu_id = 0x6348, -@@ -1450,6 +1478,7 @@ static const struct board_info __initcon - &board_V2110, - &board_ct536_ct5621, - &board_96348A_122, -+ &board_CPVA502plus, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1515,6 +1544,7 @@ static struct of_device_id const bcm963x - { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, - { .compatible = "tecom,gw6000", .data = &board_gw6000, }, - { .compatible = "tecom,gw6200", .data = &board_gw6200, }, -+ { .compatible = "telsey,cpva502plus", .data = &board_CPVA502plus, }, - { .compatible = "telsey,magic", .data = &board_96348sv, }, - { .compatible = "tp-link,td-w8900gb", .data = &board_96348gw_11, }, - { .compatible = "usrobotics,usr9108", .data = &board_96348gw_a, }, diff --git a/target/linux/bcm63xx/patches-5.4/571-board_bcm6348-netgear-dg834g-v4.patch b/target/linux/bcm63xx/patches-5.4/571-board_bcm6348-netgear-dg834g-v4.patch deleted file mode 100644 index d68f690578..0000000000 --- a/target/linux/bcm63xx/patches-5.4/571-board_bcm6348-netgear-dg834g-v4.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1225,6 +1225,23 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - }; - -+/* NetGear DG834G v4 */ -+static struct board_info __initdata board_96348W3 = { -+ .name = "96348W3", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - static struct board_info __initdata board_96348_D4PW = { - .name = "D-4P-W", - .expected_cpu_id = 0x6348, -@@ -1479,6 +1496,7 @@ static const struct board_info __initcon - &board_ct536_ct5621, - &board_96348A_122, - &board_CPVA502plus, -+ &board_96348W3, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1540,6 +1558,7 @@ static struct of_device_id const bcm963x - { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, }, - { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, }, - { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, -+ { .compatible = "netgear,dg834g-v4", .data = &board_96348W3, }, - { .compatible = "sagem,fast-2404", .data = &board_FAST2404, }, - { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, - { .compatible = "tecom,gw6000", .data = &board_gw6000, }, diff --git a/target/linux/bcm63xx/patches-5.4/572-board_bcm6348-sagem-fast-2604.patch b/target/linux/bcm63xx/patches-5.4/572-board_bcm6348-sagem-fast-2604.patch deleted file mode 100644 index 21b10da89f..0000000000 --- a/target/linux/bcm63xx/patches-5.4/572-board_bcm6348-sagem-fast-2604.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1159,6 +1159,22 @@ static struct board_info __initdata boar - .has_ehci0 = 1, - }; - -+static struct board_info __initdata board_FAST2604 = { -+ .name = "F@ST2604", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - static struct board_info __initdata board_rta1025w_16 = { - .name = "RTA1025W_16", - .expected_cpu_id = 0x6348, -@@ -1485,6 +1501,7 @@ static const struct board_info __initcon - &board_96348gw_10, - &board_96348gw_11, - &board_FAST2404, -+ &board_FAST2604, - &board_DV201AMR, - &board_96348gw_a, - &board_rta1025w_16, -@@ -1560,6 +1577,7 @@ static struct of_device_id const bcm963x - { .compatible = "netgear,dg834gt-pn", .data = &board_96348gw_10, }, - { .compatible = "netgear,dg834g-v4", .data = &board_96348W3, }, - { .compatible = "sagem,fast-2404", .data = &board_FAST2404, }, -+ { .compatible = "sagem,fast-2604", .data = &board_FAST2604, }, - { .compatible = "t-com,speedport-w-500v", .data = &board_spw500v, }, - { .compatible = "tecom,gw6000", .data = &board_gw6000, }, - { .compatible = "tecom,gw6200", .data = &board_gw6200, }, diff --git a/target/linux/bcm63xx/patches-5.4/573-board_bcm6348-asmax-ar-1004g.patch b/target/linux/bcm63xx/patches-5.4/573-board_bcm6348-asmax-ar-1004g.patch deleted file mode 100644 index a1eeee3b22..0000000000 --- a/target/linux/bcm63xx/patches-5.4/573-board_bcm6348-asmax-ar-1004g.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: "mexit@o2.pl" -Date: Sun, 24 Nov 2013 21:33:38 +0000 -Subject: [PATCH 4/5] bcm63xx: add support for Asmax AR 1004g router - -Support for Asmax AR 1004g router - -Signed-off-by: Adrian Feliks ---- ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -979,6 +979,21 @@ static struct board_info __initdata boar - .has_ehci0 = 1, - }; - -+static struct board_info __initdata board_96348gw_10_AR1004G = { -+ .name = "AR1004G", -+ .expected_cpu_id = 0x6348, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - /* BT Voyager 2110 */ - static struct board_info __initdata board_V2110 = { - .name = "V2110", -@@ -1514,6 +1529,7 @@ static const struct board_info __initcon - &board_96348A_122, - &board_CPVA502plus, - &board_96348W3, -+ &board_96348gw_10_AR1004G, - #endif /* CONFIG_BCM63XX_CPU_6348 */ - #ifdef CONFIG_BCM63XX_CPU_6358 - &board_96358vw, -@@ -1561,6 +1577,7 @@ static struct of_device_id const bcm963x - { .compatible = "dynalink,rta770w", .data = &board_rta770w, }, - #endif /* CONFIG_BCM63XX_CPU_6345 */ - #ifdef CONFIG_BCM63XX_CPU_6348 -+ { .compatible = "asmax,ar-1004g", .data = &board_96348gw_10_AR1004G, }, - { .compatible = "belkin,f5d7633", .data = &board_96348gw_10, }, - { .compatible = "brcm,bcm96348r", .data = &board_96348r, }, - { .compatible = "brcm,bcm96348gw-10", .data = &board_96348gw_10, }, diff --git a/target/linux/bcm63xx/patches-5.4/602-board-bcm6358-sfr-neufbox-4.patch b/target/linux/bcm63xx/patches-5.4/602-board-bcm6358-sfr-neufbox-4.patch deleted file mode 100644 index bb5ce6f840..0000000000 --- a/target/linux/bcm63xx/patches-5.4/602-board-bcm6358-sfr-neufbox-4.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1470,6 +1470,56 @@ static struct board_info __initdata boar - .has_ohci0 = 1, - .has_ehci0 = 1, - }; -+ -+static struct board_info __initdata board_nb4_ser_r0 = { -+ .name = "NB4-SER-r0", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_nb4_fxc_r1 = { -+ .name = "NB4-FXC-r1", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6358 */ - - /* -@@ -1537,6 +1587,8 @@ static const struct board_info __initcon - &board_96358vw2, - &board_AGPFS0, - &board_DWVS0, -+ &board_nb4_ser_r0, -+ &board_nb4_fxc_r1, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - }; - -@@ -1613,6 +1665,8 @@ static struct of_device_id const bcm963x - { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m-fwb", .data = &board_DWVS0, }, - { .compatible = "pirelli,agpf-s0", .data = &board_AGPFS0, }, -+ { .compatible = "sfr,neufbox-4-sercomm-r0", .data = &board_nb4_ser_r0, }, -+ { .compatible = "sfr,neufbox-4-foxconn-r1", .data = &board_nb4_fxc_r1, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 - #endif /* CONFIG_BCM63XX_CPU_6362 */ diff --git a/target/linux/bcm63xx/patches-5.4/603-board-bcm6358-telsey-cpva642.patch b/target/linux/bcm63xx/patches-5.4/603-board-bcm6358-telsey-cpva642.patch deleted file mode 100644 index be860fa722..0000000000 --- a/target/linux/bcm63xx/patches-5.4/603-board-bcm6358-telsey-cpva642.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1422,6 +1422,23 @@ static struct board_info __initdata boar - .num_usbh_ports = 2, - }; - -+static struct board_info __initdata board_CPVA642 = { -+ .name = "CPVA642", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - static struct board_info __initdata board_AGPFS0 = { - .name = "AGPF-S0", - .expected_cpu_id = 0x6358, -@@ -1586,6 +1603,7 @@ static const struct board_info __initcon - &board_96358vw, - &board_96358vw2, - &board_AGPFS0, -+ &board_CPVA642, - &board_DWVS0, - &board_nb4_ser_r0, - &board_nb4_fxc_r1, -@@ -1667,6 +1685,7 @@ static struct of_device_id const bcm963x - { .compatible = "pirelli,agpf-s0", .data = &board_AGPFS0, }, - { .compatible = "sfr,neufbox-4-sercomm-r0", .data = &board_nb4_ser_r0, }, - { .compatible = "sfr,neufbox-4-foxconn-r1", .data = &board_nb4_fxc_r1, }, -+ { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 - #endif /* CONFIG_BCM63XX_CPU_6362 */ diff --git a/target/linux/bcm63xx/patches-5.4/604-board_bcm6358-d-link-dsl-274xb-c.patch b/target/linux/bcm63xx/patches-5.4/604-board_bcm6358-d-link-dsl-274xb-c.patch deleted file mode 100644 index 3fb9940e78..0000000000 --- a/target/linux/bcm63xx/patches-5.4/604-board_bcm6358-d-link-dsl-274xb-c.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1488,6 +1488,22 @@ static struct board_info __initdata boar - .has_ehci0 = 1, - }; - -+/* D-Link DSL-274xB revison C2/C3 */ -+static struct board_info __initdata board_dsl_274xb_rev_c = { -+ .name = "AW4139", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - static struct board_info __initdata board_nb4_ser_r0 = { - .name = "NB4-SER-r0", - .expected_cpu_id = 0x6358, -@@ -1605,6 +1621,7 @@ static const struct board_info __initcon - &board_AGPFS0, - &board_CPVA642, - &board_DWVS0, -+ &board_dsl_274xb_rev_c, - &board_nb4_ser_r0, - &board_nb4_fxc_r1, - #endif /* CONFIG_BCM63XX_CPU_6358 */ -@@ -1678,6 +1695,7 @@ static struct of_device_id const bcm963x - { .compatible = "alcatel,rg100a", .data = &board_96358vw2, }, - { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, }, - { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, }, -+ { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, }, - { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, - { .compatible = "pirelli,a226g", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, diff --git a/target/linux/bcm63xx/patches-5.4/605-board_bcm6358-huawei-echolife-hg553.patch b/target/linux/bcm63xx/patches-5.4/605-board_bcm6358-huawei-echolife-hg553.patch deleted file mode 100644 index e5eb2ff8e2..0000000000 --- a/target/linux/bcm63xx/patches-5.4/605-board_bcm6358-huawei-echolife-hg553.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1553,6 +1553,31 @@ static struct board_info __initdata boar - .force_duplex_full = 1, - }, - }; -+ -+static struct board_info __initdata board_HW553 = { -+ .name = "HW553", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6358 */ - - /* -@@ -1624,6 +1649,7 @@ static const struct board_info __initcon - &board_dsl_274xb_rev_c, - &board_nb4_ser_r0, - &board_nb4_fxc_r1, -+ &board_HW553, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - }; - -@@ -1697,6 +1723,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, }, - { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, }, - { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, -+ { .compatible = "huawei,echolife-hg553", .data = &board_HW553, }, - { .compatible = "pirelli,a226g", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m-fwb", .data = &board_DWVS0, }, diff --git a/target/linux/bcm63xx/patches-5.4/606-board_bcm6358-t-com-speedport-w-303v.patch b/target/linux/bcm63xx/patches-5.4/606-board_bcm6358-t-com-speedport-w-303v.patch deleted file mode 100644 index 114e55a14d..0000000000 --- a/target/linux/bcm63xx/patches-5.4/606-board_bcm6358-t-com-speedport-w-303v.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1578,6 +1578,20 @@ static struct board_info __initdata boar - .pci_dev = 1, - }, - }; -+ -+ /* T-Home Speedport W 303V Typ B */ -+static struct board_info __initdata board_spw303v = { -+ .name = "96358-502V", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6358 */ - - /* -@@ -1650,6 +1664,7 @@ static const struct board_info __initcon - &board_nb4_ser_r0, - &board_nb4_fxc_r1, - &board_HW553, -+ &board_spw303v, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - }; - -@@ -1730,6 +1745,7 @@ static struct of_device_id const bcm963x - { .compatible = "pirelli,agpf-s0", .data = &board_AGPFS0, }, - { .compatible = "sfr,neufbox-4-sercomm-r0", .data = &board_nb4_ser_r0, }, - { .compatible = "sfr,neufbox-4-foxconn-r1", .data = &board_nb4_fxc_r1, }, -+ { .compatible = "t-com,speedport-w-303v", .data = &board_spw303v, }, - { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 diff --git a/target/linux/bcm63xx/patches-5.4/607-board_bcm6358-comtrend-ct-6373.patch b/target/linux/bcm63xx/patches-5.4/607-board_bcm6358-comtrend-ct-6373.patch deleted file mode 100644 index 4c0ff79067..0000000000 --- a/target/linux/bcm63xx/patches-5.4/607-board_bcm6358-comtrend-ct-6373.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1554,6 +1554,30 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_ct6373_1 = { -+ .name = "CT6373-1", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_HW553 = { - .name = "HW553", - .expected_cpu_id = 0x6358, -@@ -1663,6 +1687,7 @@ static const struct board_info __initcon - &board_dsl_274xb_rev_c, - &board_nb4_ser_r0, - &board_nb4_fxc_r1, -+ &board_ct6373_1, - &board_HW553, - &board_spw303v, - #endif /* CONFIG_BCM63XX_CPU_6358 */ -@@ -1736,6 +1761,7 @@ static struct of_device_id const bcm963x - { .compatible = "alcatel,rg100a", .data = &board_96358vw2, }, - { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, }, - { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, }, -+ { .compatible = "comtrend,ct-6373", .data = &board_ct6373_1, }, - { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, }, - { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, - { .compatible = "huawei,echolife-hg553", .data = &board_HW553, }, diff --git a/target/linux/bcm63xx/patches-5.4/608-board_bcm6358-d-link-dva-g3810bn-tl.patch b/target/linux/bcm63xx/patches-5.4/608-board_bcm6358-d-link-dva-g3810bn-tl.patch deleted file mode 100644 index a106ab8447..0000000000 --- a/target/linux/bcm63xx/patches-5.4/608-board_bcm6358-d-link-dva-g3810bn-tl.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1616,6 +1616,31 @@ static struct board_info __initdata boar - .use_internal_phy = 1, - }, - }; -+ -+/* D-Link DVA-G3810BN/TL */ -+static struct board_info __initdata board_DVAG3810BN = { -+ .name = "DVAG3810BN", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pccard = 1, -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6358 */ - - /* -@@ -1690,6 +1715,7 @@ static const struct board_info __initcon - &board_ct6373_1, - &board_HW553, - &board_spw303v, -+ &board_DVAG3810BN, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - }; - -@@ -1764,6 +1790,7 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,ct-6373", .data = &board_ct6373_1, }, - { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, }, - { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, -+ { .compatible = "d-link,dva-g3810bn-tl", .data = &board_DVAG3810BN, }, - { .compatible = "huawei,echolife-hg553", .data = &board_HW553, }, - { .compatible = "pirelli,a226g", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, diff --git a/target/linux/bcm63xx/patches-5.4/609-board_bcm6358-huawei-echolife-hg556.patch b/target/linux/bcm63xx/patches-5.4/609-board_bcm6358-huawei-echolife-hg556.patch deleted file mode 100644 index d05e6ca985..0000000000 --- a/target/linux/bcm63xx/patches-5.4/609-board_bcm6358-huawei-echolife-hg556.patch +++ /dev/null @@ -1,125 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1603,6 +1604,94 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_HW556_A = { -+ .name = "HW556_A", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_ATHEROS, -+ .caldata_offset = 0xf7e000, -+ .slot = 1, -+ .endian_check = 1, -+ .led_pin = 2, -+ .led_active_high = 1, -+ }, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_HW556_B = { -+ .name = "HW556_B", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_ATHEROS, -+ .caldata_offset = 0xefe000, -+ .slot = 1, -+ .endian_check = 1, -+ .led_pin = 2, -+ .led_active_high = 1, -+ }, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ -+static struct board_info __initdata board_HW556_C = { -+ .name = "HW556_C", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_RALINK, -+ .caldata_offset = 0xeffe00, -+ .slot = 1, -+ .eeprom = "rt2x00.eeprom", -+ }, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+}; -+ - /* T-Home Speedport W 303V Typ B */ - static struct board_info __initdata board_spw303v = { - .name = "96358-502V", -@@ -1714,6 +1803,9 @@ static const struct board_info __initcon - &board_nb4_fxc_r1, - &board_ct6373_1, - &board_HW553, -+ &board_HW556_A, -+ &board_HW556_B, -+ &board_HW556_C, - &board_spw303v, - &board_DVAG3810BN, - #endif /* CONFIG_BCM63XX_CPU_6358 */ -@@ -1792,6 +1884,9 @@ static struct of_device_id const bcm963x - { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, - { .compatible = "d-link,dva-g3810bn-tl", .data = &board_DVAG3810BN, }, - { .compatible = "huawei,echolife-hg553", .data = &board_HW553, }, -+ { .compatible = "huawei,echolife-hg556a-a", .data = &board_HW556_A, }, -+ { .compatible = "huawei,echolife-hg556a-b", .data = &board_HW556_B, }, -+ { .compatible = "huawei,echolife-hg556a-c", .data = &board_HW556_C, }, - { .compatible = "pirelli,a226g", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m", .data = &board_DWVS0, }, - { .compatible = "pirelli,a226m-fwb", .data = &board_DWVS0, }, diff --git a/target/linux/bcm63xx/patches-5.4/610-board_bcm6359-huawei-echolife-hg520v.patch b/target/linux/bcm63xx/patches-5.4/610-board_bcm6359-huawei-echolife-hg520v.patch deleted file mode 100644 index ff31e2973a..0000000000 --- a/target/linux/bcm63xx/patches-5.4/610-board_bcm6359-huawei-echolife-hg520v.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1579,6 +1579,36 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_HW520 = { -+ .name = "HW6358GW_B", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enet0 = 1, -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_HW553 = { - .name = "HW553", - .expected_cpu_id = 0x6358, -@@ -1802,6 +1832,7 @@ static const struct board_info __initcon - &board_nb4_ser_r0, - &board_nb4_fxc_r1, - &board_ct6373_1, -+ &board_HW520, - &board_HW553, - &board_HW556_A, - &board_HW556_B, -@@ -1883,6 +1914,7 @@ static struct of_device_id const bcm963x - { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, }, - { .compatible = "d-link,dsl-2650u", .data = &board_96358vw2, }, - { .compatible = "d-link,dva-g3810bn-tl", .data = &board_DVAG3810BN, }, -+ { .compatible = "huawei,echolife-hg520v", .data = &board_HW520, }, - { .compatible = "huawei,echolife-hg553", .data = &board_HW553, }, - { .compatible = "huawei,echolife-hg556a-a", .data = &board_HW556_A, }, - { .compatible = "huawei,echolife-hg556a-b", .data = &board_HW556_B, }, diff --git a/target/linux/bcm63xx/patches-5.4/611-board_bcm6358-bt-home-hub-2-a.patch b/target/linux/bcm63xx/patches-5.4/611-board_bcm6358-bt-home-hub-2-a.patch deleted file mode 100644 index b7caeb417b..0000000000 --- a/target/linux/bcm63xx/patches-5.4/611-board_bcm6358-bt-home-hub-2-a.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1579,6 +1579,31 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_homehub2a = { -+ .name = "HOMEHUB2A", -+ .expected_cpu_id = 0x6358, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enet1 = 1, -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4322, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_HW520 = { - .name = "HW6358GW_B", - .expected_cpu_id = 0x6358, -@@ -1832,6 +1857,7 @@ static const struct board_info __initcon - &board_nb4_ser_r0, - &board_nb4_fxc_r1, - &board_ct6373_1, -+ &board_homehub2a, - &board_HW520, - &board_HW553, - &board_HW556_A, -@@ -1927,6 +1953,7 @@ static struct of_device_id const bcm963x - { .compatible = "sfr,neufbox-4-foxconn-r1", .data = &board_nb4_fxc_r1, }, - { .compatible = "t-com,speedport-w-303v", .data = &board_spw303v, }, - { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, -+ { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 - #endif /* CONFIG_BCM63XX_CPU_6362 */ diff --git a/target/linux/bcm63xx/patches-5.4/631-board_bcm6361-sfr-neufbox-6.patch b/target/linux/bcm63xx/patches-5.4/631-board_bcm6361-sfr-neufbox-6.patch deleted file mode 100644 index 79e9efb2b4..0000000000 --- a/target/linux/bcm63xx/patches-5.4/631-board_bcm6361-sfr-neufbox-6.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1787,6 +1787,31 @@ static struct board_info __initdata boar - }; - #endif /* CONFIG_BCM63XX_CPU_6358 */ - -+#ifdef CONFIG_BCM63XX_CPU_6362 -+static struct board_info __initdata board_nb6 = { -+ .name = "NB6", -+ .expected_cpu_id = 0x6362, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_6362 */ -+ - /* - * all boards - */ -@@ -1866,6 +1891,9 @@ static const struct board_info __initcon - &board_spw303v, - &board_DVAG3810BN, - #endif /* CONFIG_BCM63XX_CPU_6358 */ -+#ifdef CONFIG_BCM63XX_CPU_6362 -+ &board_nb6, -+#endif /* CONFIG_BCM63XX_CPU_6362 */ - }; - - static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -1956,6 +1984,7 @@ static struct of_device_id const bcm963x - { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 -+ { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 - #endif /* CONFIG_BCM63XX_CPU_6368 */ diff --git a/target/linux/bcm63xx/patches-5.4/632-board_bcm6362-sagem-fast-2504n.patch b/target/linux/bcm63xx/patches-5.4/632-board_bcm6362-sagem-fast-2504n.patch deleted file mode 100644 index 3bb3ad4238..0000000000 --- a/target/linux/bcm63xx/patches-5.4/632-board_bcm6362-sagem-fast-2504n.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Max Staudt -Date: Wed, 15 Jan 2014 18:51:13 +0000 -Subject: [PATCH] bcm63xx: F@ST2504n board support (Linux-3.10.26) - -Signed-off-by: Max Staudt ---- ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1810,6 +1810,37 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_fast2504n = { -+ .name = "F@ST2504n", -+ .expected_cpu_id = 0x6362, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6362 */ - - /* -@@ -1893,6 +1924,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 - &board_nb6, -+ &board_fast2504n, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - }; - -@@ -1984,6 +2016,7 @@ static struct of_device_id const bcm963x - { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 -+ { .compatible = "sagem,fast-2504n", .data = &board_fast2504n, }, - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 diff --git a/target/linux/bcm63xx/patches-5.4/633-board-bcm6362-netgear-dgnd3700-v2.patch b/target/linux/bcm63xx/patches-5.4/633-board-bcm6362-netgear-dgnd3700-v2.patch deleted file mode 100644 index 17beb14154..0000000000 --- a/target/linux/bcm63xx/patches-5.4/633-board-bcm6362-netgear-dgnd3700-v2.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1811,6 +1811,30 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_dgnd3700v2 = { -+ .name = "96362ADVN2xh", -+ .expected_cpu_id = 0x6362, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ - static struct board_info __initdata board_fast2504n = { - .name = "F@ST2504n", - .expected_cpu_id = 0x6362, -@@ -1924,6 +1948,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 - &board_nb6, -+ &board_dgnd3700v2, - &board_fast2504n, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - }; -@@ -2016,6 +2041,7 @@ static struct of_device_id const bcm963x - { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 -+ { .compatible = "netgear,dgnd3700-v2", .data = &board_dgnd3700v2, }, - { .compatible = "sagem,fast-2504n", .data = &board_fast2504n, }, - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ diff --git a/target/linux/bcm63xx/patches-5.4/634-board-bcm6362-huawei-hg253s-v2.patch b/target/linux/bcm63xx/patches-5.4/634-board-bcm6362-huawei-hg253s-v2.patch deleted file mode 100644 index db36cf2ff4..0000000000 --- a/target/linux/bcm63xx/patches-5.4/634-board-bcm6362-huawei-hg253s-v2.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1865,6 +1865,37 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_hg253s_v2 = { -+ .name = "hg253s", -+ .expected_cpu_id = 0x6362, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .timing_sel = 1, -+ .name = "RGMII", -+ }, -+ -+ [5] = { -+ .used = 1, -+ .phy_id = 24, -+ .timing_sel = 1, -+ .name = "WAN", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6362 */ - - /* -@@ -1950,6 +1981,7 @@ static const struct board_info __initcon - &board_nb6, - &board_dgnd3700v2, - &board_fast2504n, -+ &board_hg253s_v2, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - }; - -@@ -2041,6 +2073,7 @@ static struct of_device_id const bcm963x - { .compatible = "bt,home-hub-2-a", .data = &board_homehub2a, }, - #endif /* CONFIG_BCM63XX_CPU_6358 */ - #ifdef CONFIG_BCM63XX_CPU_6362 -+ { .compatible = "huawei,hg253s-v2", .data = &board_hg253s_v2, }, - { .compatible = "netgear,dgnd3700-v2", .data = &board_dgnd3700v2, }, - { .compatible = "sagem,fast-2504n", .data = &board_fast2504n, }, - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, diff --git a/target/linux/bcm63xx/patches-5.4/651-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/bcm63xx/patches-5.4/651-bcm63xx-add-support-for-96368MVWG-board.patch deleted file mode 100644 index 948d473f53..0000000000 --- a/target/linux/bcm63xx/patches-5.4/651-bcm63xx-add-support-for-96368MVWG-board.patch +++ /dev/null @@ -1,111 +0,0 @@ -From eeacc2529942051504bc957726aa178671344421 Mon Sep 17 00:00:00 2001 -From: Maxime Bizon -Date: Wed, 20 Jan 2010 16:21:30 +0100 -Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board. - ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 95 ++++++++++++++++++++ - .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 + - 2 files changed, 97 insertions(+), 0 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1899,6 +1899,52 @@ static struct board_info __initdata boar - #endif /* CONFIG_BCM63XX_CPU_6362 */ - - /* -+ * known 6368 boards -+ */ -+#ifdef CONFIG_BCM63XX_CPU_6368 -+static struct board_info __initdata board_96368mvwg = { -+ .name = "96368MVWG", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port1", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port2", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 0x12, -+ .name = "port0", -+ }, -+ [5] = { -+ .used = 1, -+ .phy_id = 0x11, -+ .name = "port3", -+ }, -+ }, -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_6368 */ -+ -+/* - * all boards - */ - static const struct board_info __initconst *bcm963xx_boards[] = { -@@ -1983,6 +2029,9 @@ static const struct board_info __initcon - &board_fast2504n, - &board_hg253s_v2, - #endif /* CONFIG_BCM63XX_CPU_6362 */ -+#ifdef CONFIG_BCM63XX_CPU_6368 -+ &board_96368mvwg, -+#endif /* CONFIG_BCM63XX_CPU_6368 */ - }; - - static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -2079,6 +2128,7 @@ static struct of_device_id const bcm963x - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 -+ { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 - #endif /* CONFIG_BCM63XX_CPU_63268 */ ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -81,12 +81,25 @@ void __init board_early_setup(const stru - bcm63xx_pci_enabled = 1; - if (BCMCPU_IS_6348()) - val |= GPIO_MODE_6348_G2_PCI; -+ -+ if (BCMCPU_IS_6368()) -+ val |= GPIO_MODE_6368_PCI_REQ1 | -+ GPIO_MODE_6368_PCI_GNT1 | -+ GPIO_MODE_6368_PCI_INTB | -+ GPIO_MODE_6368_PCI_REQ0 | -+ GPIO_MODE_6368_PCI_GNT0; - } - #endif - - if (board.has_pccard) { - if (BCMCPU_IS_6348()) - val |= GPIO_MODE_6348_G1_MII_PCCARD; -+ -+ if (BCMCPU_IS_6368()) -+ val |= GPIO_MODE_6368_PCMCIA_CD1 | -+ GPIO_MODE_6368_PCMCIA_CD2 | -+ GPIO_MODE_6368_PCMCIA_VS1 | -+ GPIO_MODE_6368_PCMCIA_VS2; - } - - if (board.has_enet0 && !board.enet0.use_internal_phy) { diff --git a/target/linux/bcm63xx/patches-5.4/652-bcm63xx-add-support-for-96368MVNgr-board.patch b/target/linux/bcm63xx/patches-5.4/652-bcm63xx-add-support-for-96368MVNgr-board.patch deleted file mode 100644 index 663304d08f..0000000000 --- a/target/linux/bcm63xx/patches-5.4/652-bcm63xx-add-support-for-96368MVNgr-board.patch +++ /dev/null @@ -1,69 +0,0 @@ -From f457fc2eb9bb915b5a4d251c7c68d4694cf07b01 Mon Sep 17 00:00:00 2001 -From: Maxime Bizon -Date: Fri, 4 Nov 2011 12:33:48 +0100 -Subject: [PATCH 33/63] bcm63xx: add support for 96368MVNgr board. - ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 67 +++++++++++++++++++++++++++++ - 1 files changed, 67 insertions(+), 0 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1942,6 +1942,41 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_96368mvngr = { -+ .name = "96368MVNgr", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6368 */ - - /* -@@ -2031,6 +2066,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 - &board_96368mvwg, -+ &board_96368mvngr, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - }; - -@@ -2128,6 +2164,7 @@ static struct of_device_id const bcm963x - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 -+ { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, - { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 diff --git a/target/linux/bcm63xx/patches-5.4/653-board_bcm6369-comtrend-wap-5813n.patch b/target/linux/bcm63xx/patches-5.4/653-board_bcm6369-comtrend-wap-5813n.patch deleted file mode 100644 index 0386dc8308..0000000000 --- a/target/linux/bcm63xx/patches-5.4/653-board_bcm6369-comtrend-wap-5813n.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -13,6 +13,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -1977,6 +1979,47 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct sprom_fixup __initdata wap5813n_fixups[] = { -+ { .offset = 97, .value = 0xfeed }, -+ { .offset = 98, .value = 0x15d1 }, -+ { .offset = 99, .value = 0xfb0d }, -+ { .offset = 113, .value = 0xfef7 }, -+ { .offset = 114, .value = 0x15f7 }, -+ { .offset = 115, .value = 0xfb1a }, -+}; -+ -+static struct board_info __initdata board_WAP5813n = { -+ .name = "96369R-1231N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [4] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = wap5813n_fixups, -+ .num_board_fixups = ARRAY_SIZE(wap5813n_fixups), -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_6368 */ - - /* -@@ -2067,6 +2110,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6368 - &board_96368mvwg, - &board_96368mvngr, -+ &board_WAP5813n, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - }; - -@@ -2166,6 +2210,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6368 - { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, - { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, -+ { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 - #endif /* CONFIG_BCM63XX_CPU_63268 */ diff --git a/target/linux/bcm63xx/patches-5.4/654-board_bcm6368-comtrend-vr-3025u.patch b/target/linux/bcm63xx/patches-5.4/654-board_bcm6368-comtrend-vr-3025u.patch deleted file mode 100644 index 7772594394..0000000000 --- a/target/linux/bcm63xx/patches-5.4/654-board_bcm6368-comtrend-vr-3025u.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1980,6 +1980,59 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata vr3025u_fixups[] = { -+ { .offset = 97, .value = 0xfeb3 }, -+ { .offset = 98, .value = 0x1618 }, -+ { .offset = 99, .value = 0xfab0 }, -+ { .offset = 113, .value = 0xfed1 }, -+ { .offset = 114, .value = 0x1609 }, -+ { .offset = 115, .value = 0xfad9 }, -+}; -+ -+static struct board_info __initdata board_VR3025u = { -+ .name = "96368M-1541N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vr3025u_fixups, -+ .num_board_fixups = ARRAY_SIZE(vr3025u_fixups), -+ }, -+}; -+ - static struct sprom_fixup __initdata wap5813n_fixups[] = { - { .offset = 97, .value = 0xfeed }, - { .offset = 98, .value = 0x15d1 }, -@@ -2110,6 +2163,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6368 - &board_96368mvwg, - &board_96368mvngr, -+ &board_VR3025u, - &board_WAP5813n, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - }; -@@ -2210,6 +2264,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_6368 - { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, - { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, -+ { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, - { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 diff --git a/target/linux/bcm63xx/patches-5.4/655-board_bcm6368-comtrend-vr-3025un.patch b/target/linux/bcm63xx/patches-5.4/655-board_bcm6368-comtrend-vr-3025un.patch deleted file mode 100644 index 82c0887840..0000000000 --- a/target/linux/bcm63xx/patches-5.4/655-board_bcm6368-comtrend-vr-3025un.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2033,6 +2033,59 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata vr3025un_fixups[] = { -+ { .offset = 97, .value = 0xfeb3 }, -+ { .offset = 98, .value = 0x1618 }, -+ { .offset = 99, .value = 0xfab0 }, -+ { .offset = 113, .value = 0xfed1 }, -+ { .offset = 114, .value = 0x1609 }, -+ { .offset = 115, .value = 0xfad9 }, -+}; -+ -+static struct board_info __initdata board_VR3025un = { -+ .name = "96368M-1341N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vr3025un_fixups, -+ .num_board_fixups = ARRAY_SIZE(vr3025un_fixups), -+ }, -+}; -+ - static struct sprom_fixup __initdata wap5813n_fixups[] = { - { .offset = 97, .value = 0xfeed }, - { .offset = 98, .value = 0x15d1 }, -@@ -2164,6 +2217,7 @@ static const struct board_info __initcon - &board_96368mvwg, - &board_96368mvngr, - &board_VR3025u, -+ &board_VR3025un, - &board_WAP5813n, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - }; -@@ -2265,6 +2319,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, - { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, - { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, -+ { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, - { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 diff --git a/target/linux/bcm63xx/patches-5.4/656-board_bcm6368-zyxel-p870hw-51a-v2.patch b/target/linux/bcm63xx/patches-5.4/656-board_bcm6368-zyxel-p870hw-51a-v2.patch deleted file mode 100644 index 0c2c2b9c8d..0000000000 --- a/target/linux/bcm63xx/patches-5.4/656-board_bcm6368-zyxel-p870hw-51a-v2.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1989,6 +1989,48 @@ static struct sprom_fixup __initdata vr3 - { .offset = 115, .value = 0xfad9 }, - }; - -+static struct board_info __initdata board_P870HW51A_V2 = { -+ .name = "P870HW-51a_v2", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4318, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_VR3025u = { - .name = "96368M-1541N", - .expected_cpu_id = 0x6368, -@@ -2216,6 +2258,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6368 - &board_96368mvwg, - &board_96368mvngr, -+ &board_P870HW51A_V2, - &board_VR3025u, - &board_VR3025un, - &board_WAP5813n, -@@ -2321,6 +2364,7 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, - { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, - { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, -+ { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 - #endif /* CONFIG_BCM63XX_CPU_63268 */ diff --git a/target/linux/bcm63xx/patches-5.4/657-board_bcm6368-netgear-dgnd3700-v1.patch b/target/linux/bcm63xx/patches-5.4/657-board_bcm6368-netgear-dgnd3700-v1.patch deleted file mode 100644 index 47a19afbfa..0000000000 --- a/target/linux/bcm63xx/patches-5.4/657-board_bcm6368-netgear-dgnd3700-v1.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1980,6 +1980,30 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_DGND3700v1_3800B = { -+ .name = "DGND3700v1_3800B", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [5] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ - static struct sprom_fixup __initdata vr3025u_fixups[] = { - { .offset = 97, .value = 0xfeb3 }, - { .offset = 98, .value = 0x1618 }, -@@ -2258,6 +2282,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_6368 - &board_96368mvwg, - &board_96368mvngr, -+ &board_DGND3700v1_3800B, - &board_P870HW51A_V2, - &board_VR3025u, - &board_VR3025un, -@@ -2364,6 +2389,7 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, - { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, - { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, -+ { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 diff --git a/target/linux/bcm63xx/patches-5.4/658-board_bcm6368-huawei-echolife-hg655b.patch b/target/linux/bcm63xx/patches-5.4/658-board_bcm6368-huawei-echolife-hg655b.patch deleted file mode 100644 index c1ad040cba..0000000000 --- a/target/linux/bcm63xx/patches-5.4/658-board_bcm6368-huawei-echolife-hg655b.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2004,6 +2004,52 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_HG655b = { -+ .name = "HW65x", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_RALINK, -+ .caldata_offset = 0x7c0000, -+ .slot = 1, -+ .eeprom = "rt2x00.eeprom", -+ }, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; -+ - static struct sprom_fixup __initdata vr3025u_fixups[] = { - { .offset = 97, .value = 0xfeb3 }, - { .offset = 98, .value = 0x1618 }, -@@ -2283,6 +2329,7 @@ static const struct board_info __initcon - &board_96368mvwg, - &board_96368mvngr, - &board_DGND3700v1_3800B, -+ &board_HG655b, - &board_P870HW51A_V2, - &board_VR3025u, - &board_VR3025un, -@@ -2389,6 +2436,7 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, - { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, - { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, -+ { .compatible = "huawei,echolife-hg655b", .data = &board_HG655b, }, - { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ diff --git a/target/linux/bcm63xx/patches-5.4/659-board_bcm6368-comtrend-vr-3026e.patch b/target/linux/bcm63xx/patches-5.4/659-board_bcm6368-comtrend-vr-3026e.patch deleted file mode 100644 index 4be53d10ab..0000000000 --- a/target/linux/bcm63xx/patches-5.4/659-board_bcm6368-comtrend-vr-3026e.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2198,6 +2198,59 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata vr3026e_fixups[] = { -+ { .offset = 97, .value = 0xfeb3 }, -+ { .offset = 98, .value = 0x1618 }, -+ { .offset = 99, .value = 0xfab0 }, -+ { .offset = 113, .value = 0xfed1 }, -+ { .offset = 114, .value = 0x1609 }, -+ { .offset = 115, .value = 0xfad9 }, -+}; -+ -+static struct board_info __initdata board_VR3026e = { -+ .name = "96368MT-1341N1", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vr3026e_fixups, -+ .num_board_fixups = ARRAY_SIZE(vr3026e_fixups), -+ }, -+}; -+ - static struct sprom_fixup __initdata wap5813n_fixups[] = { - { .offset = 97, .value = 0xfeed }, - { .offset = 98, .value = 0x15d1 }, -@@ -2333,6 +2386,7 @@ static const struct board_info __initcon - &board_P870HW51A_V2, - &board_VR3025u, - &board_VR3025un, -+ &board_VR3026e, - &board_WAP5813n, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - }; -@@ -2435,6 +2489,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, - { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, - { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, -+ { .compatible = "comtrend,vr-3026e", .data = &board_VR3026e, }, - { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, - { .compatible = "huawei,echolife-hg655b", .data = &board_HG655b, }, - { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, diff --git a/target/linux/bcm63xx/patches-5.4/660-board_bcm6368-huawei-echolife-hg622.patch b/target/linux/bcm63xx/patches-5.4/660-board_bcm6368-huawei-echolife-hg622.patch deleted file mode 100644 index c025a45eeb..0000000000 --- a/target/linux/bcm63xx/patches-5.4/660-board_bcm6368-huawei-echolife-hg622.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2050,6 +2050,52 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_HG622 = { -+ .name = "96368MVWG_hg622", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_caldata = 1, -+ .caldata = { -+ { -+ .vendor = PCI_VENDOR_ID_RALINK, -+ .caldata_offset = 0xfa0000, -+ .slot = 1, -+ .eeprom = "rt2x00.eeprom", -+ }, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; -+ - static struct sprom_fixup __initdata vr3025u_fixups[] = { - { .offset = 97, .value = 0xfeb3 }, - { .offset = 98, .value = 0x1618 }, -@@ -2382,6 +2428,7 @@ static const struct board_info __initcon - &board_96368mvwg, - &board_96368mvngr, - &board_DGND3700v1_3800B, -+ &board_HG622, - &board_HG655b, - &board_P870HW51A_V2, - &board_VR3025u, -@@ -2491,6 +2538,7 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, }, - { .compatible = "comtrend,vr-3026e", .data = &board_VR3026e, }, - { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, }, -+ { .compatible = "huawei,echolife-hg622", .data = &board_HG622, }, - { .compatible = "huawei,echolife-hg655b", .data = &board_HG655b, }, - { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, diff --git a/target/linux/bcm63xx/patches-5.4/661-board_bcm6369-netgear-evg2000.patch b/target/linux/bcm63xx/patches-5.4/661-board_bcm6369-netgear-evg2000.patch deleted file mode 100644 index b33cb3a1ce..0000000000 --- a/target/linux/bcm63xx/patches-5.4/661-board_bcm6369-netgear-evg2000.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2004,6 +2004,43 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata EVG2000_fixups[] = { -+ { .offset = 219, .value = 0xec08 }, -+}; -+ -+static struct board_info __initdata board_EVG2000 = { -+ .name = "96369PVG", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [5] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4322, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = EVG2000_fixups, -+ .num_board_fixups = ARRAY_SIZE(EVG2000_fixups), -+ }, -+}; -+ - static struct board_info __initdata board_HG655b = { - .name = "HW65x", - .expected_cpu_id = 0x6368, -@@ -2428,6 +2465,7 @@ static const struct board_info __initcon - &board_96368mvwg, - &board_96368mvngr, - &board_DGND3700v1_3800B, -+ &board_EVG2000, - &board_HG622, - &board_HG655b, - &board_P870HW51A_V2, -@@ -2541,6 +2579,7 @@ static struct of_device_id const bcm963x - { .compatible = "huawei,echolife-hg622", .data = &board_HG622, }, - { .compatible = "huawei,echolife-hg655b", .data = &board_HG655b, }, - { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, -+ { .compatible = "netgear,evg2000", .data = &board_EVG2000, }, - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 diff --git a/target/linux/bcm63xx/patches-5.4/662-board_bcm6368-adb-av4202n.patch b/target/linux/bcm63xx/patches-5.4/662-board_bcm6368-adb-av4202n.patch deleted file mode 100644 index 5f224e5bd4..0000000000 --- a/target/linux/bcm63xx/patches-5.4/662-board_bcm6368-adb-av4202n.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1904,6 +1904,49 @@ static struct board_info __initdata boar - * known 6368 boards - */ - #ifdef CONFIG_BCM63XX_CPU_6368 -+static struct board_info __initdata board_AV4202N = { -+ .name = "96368_Swiss_S1", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM4322, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ }, -+}; -+ - static struct board_info __initdata board_96368mvwg = { - .name = "96368MVWG", - .expected_cpu_id = 0x6368, -@@ -2462,6 +2505,7 @@ static const struct board_info __initcon - &board_hg253s_v2, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 -+ &board_AV4202N, - &board_96368mvwg, - &board_96368mvngr, - &board_DGND3700v1_3800B, -@@ -2570,6 +2614,7 @@ static struct of_device_id const bcm963x - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 -+ { .compatible = "adb,av4202n", .data = &board_AV4202N, }, - { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, - { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, - { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, }, diff --git a/target/linux/bcm63xx/patches-5.4/663-board_bcm6368-observa-vh4032n.patch b/target/linux/bcm63xx/patches-5.4/663-board_bcm6368-observa-vh4032n.patch deleted file mode 100644 index d2b0a44c29..0000000000 --- a/target/linux/bcm63xx/patches-5.4/663-board_bcm6368-observa-vh4032n.patch +++ /dev/null @@ -1,125 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2377,6 +2377,106 @@ static struct board_info __initdata boar - }, - }; - -+static struct sprom_fixup __initdata vh4032n_fixups[] = { -+ { .offset = 2, .value = 0x04d2 }, -+ { .offset = 4, .value = 0x4350 }, -+ { .offset = 65, .value = 0x1300 }, -+ { .offset = 68, .value = 0x0402 }, -+ { .offset = 70, .value = 0x0090 }, -+ { .offset = 71, .value = 0x4c19 }, -+ { .offset = 72, .value = 0x2345 }, -+ { .offset = 87, .value = 0x0315 }, -+ { .offset = 88, .value = 0x0315 }, -+ { .offset = 96, .value = 0x2048 }, -+ { .offset = 97, .value = 0xfed7 }, -+ { .offset = 98, .value = 0x15a6 }, -+ { .offset = 99, .value = 0xfaee }, -+ { .offset = 100, .value = 0x3e3a }, -+ { .offset = 101, .value = 0x3a36 }, -+ { .offset = 102, .value = 0xff7f }, -+ { .offset = 103, .value = 0x11b9 }, -+ { .offset = 104, .value = 0xfc53 }, -+ { .offset = 105, .value = 0xffe6 }, -+ { .offset = 106, .value = 0xfdd2 }, -+ { .offset = 107, .value = 0xfe49 }, -+ { .offset = 108, .value = 0xff6a }, -+ { .offset = 109, .value = 0x136e }, -+ { .offset = 110, .value = 0xfbed }, -+ { .offset = 111, .value = 0x0000 }, -+ { .offset = 112, .value = 0x2048 }, -+ { .offset = 113, .value = 0xfee2 }, -+ { .offset = 114, .value = 0x15e5 }, -+ { .offset = 115, .value = 0xfaed }, -+ { .offset = 116, .value = 0x3e3a }, -+ { .offset = 117, .value = 0x3a36 }, -+ { .offset = 118, .value = 0xffc8 }, -+ { .offset = 119, .value = 0x12b8 }, -+ { .offset = 120, .value = 0xfca1 }, -+ { .offset = 121, .value = 0xff9b }, -+ { .offset = 122, .value = 0x122a }, -+ { .offset = 123, .value = 0xfcc8 }, -+ { .offset = 124, .value = 0xff95 }, -+ { .offset = 125, .value = 0x146b }, -+ { .offset = 126, .value = 0xfbba }, -+ { .offset = 127, .value = 0x0000 }, -+ { .offset = 161, .value = 0x0000 }, -+ { .offset = 162, .value = 0x0000 }, -+ { .offset = 169, .value = 0x0000 }, -+ { .offset = 170, .value = 0x0000 }, -+ { .offset = 171, .value = 0x0000 }, -+ { .offset = 172, .value = 0x0000 }, -+ { .offset = 173, .value = 0x0000 }, -+ { .offset = 174, .value = 0x0000 }, -+ { .offset = 175, .value = 0x0000 }, -+ { .offset = 176, .value = 0x0000 }, -+ { .offset = 219, .value = 0x1108 }, -+}; -+ -+static struct board_info __initdata board_VH4032N = { -+ .name = "VH4032N", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN4", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN2", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+ -+ .use_fallback_sprom = 1, -+ .fallback_sprom = { -+ .type = SPROM_BCM43222, -+ .pci_bus = 0, -+ .pci_dev = 1, -+ .board_fixups = vh4032n_fixups, -+ .num_board_fixups = ARRAY_SIZE(vh4032n_fixups), -+ }, -+}; -+ - static struct sprom_fixup __initdata wap5813n_fixups[] = { - { .offset = 97, .value = 0xfeed }, - { .offset = 98, .value = 0x15d1 }, -@@ -2513,6 +2613,7 @@ static const struct board_info __initcon - &board_HG622, - &board_HG655b, - &board_P870HW51A_V2, -+ &board_VH4032N, - &board_VR3025u, - &board_VR3025un, - &board_VR3026e, -@@ -2625,6 +2726,7 @@ static struct of_device_id const bcm963x - { .compatible = "huawei,echolife-hg655b", .data = &board_HG655b, }, - { .compatible = "netgear,dgnd3700-v1", .data = &board_DGND3700v1_3800B, }, - { .compatible = "netgear,evg2000", .data = &board_EVG2000, }, -+ { .compatible = "observa,vh4032n", .data = &board_VH4032N, }, - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 diff --git a/target/linux/bcm63xx/patches-5.4/664-board_bcm6368-actiontec-r1000h.patch b/target/linux/bcm63xx/patches-5.4/664-board_bcm6368-actiontec-r1000h.patch deleted file mode 100644 index 716a6e030f..0000000000 --- a/target/linux/bcm63xx/patches-5.4/664-board_bcm6368-actiontec-r1000h.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2227,6 +2227,29 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_R1000H = { -+ .name = "R1000H", -+ .expected_cpu_id = 0x6368, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [5] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ - static struct board_info __initdata board_VR3025u = { - .name = "96368M-1541N", - .expected_cpu_id = 0x6368, -@@ -2613,6 +2636,7 @@ static const struct board_info __initcon - &board_HG622, - &board_HG655b, - &board_P870HW51A_V2, -+ &board_R1000H, - &board_VH4032N, - &board_VR3025u, - &board_VR3025un, -@@ -2715,6 +2739,7 @@ static struct of_device_id const bcm963x - { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, - #endif /* CONFIG_BCM63XX_CPU_6362 */ - #ifdef CONFIG_BCM63XX_CPU_6368 -+ { .compatible = "actiontec,r1000h", .data = &board_R1000H, }, - { .compatible = "adb,av4202n", .data = &board_AV4202N, }, - { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, }, - { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, }, diff --git a/target/linux/bcm63xx/patches-5.4/681-board_bcm63269-brcm-bcm963269bhr.patch b/target/linux/bcm63xx/patches-5.4/681-board_bcm63269-brcm-bcm963269bhr.patch deleted file mode 100644 index a064234114..0000000000 --- a/target/linux/bcm63xx/patches-5.4/681-board_bcm63269-brcm-bcm963269bhr.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2543,6 +2543,46 @@ static struct board_info __initdata boar - #endif /* CONFIG_BCM63XX_CPU_6368 */ - - /* -+ * known 63268/63269 boards -+ */ -+#ifdef CONFIG_BCM63XX_CPU_63268 -+static struct board_info __initdata board_963269bhr = { -+ .name = "963269BHR", -+ .expected_cpu_id = 0x63268, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "port1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "port2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "port3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "port4", -+ }, -+ }, -+ }, -+}; -+#endif /* CONFIG_BCM63XX_CPU_63268 */ -+ -+/* - * all boards - */ - static const struct board_info __initconst *bcm963xx_boards[] = { -@@ -2643,6 +2683,9 @@ static const struct board_info __initcon - &board_VR3026e, - &board_WAP5813n, - #endif /* CONFIG_BCM63XX_CPU_6368 */ -+#ifdef CONFIG_BCM63XX_CPU_63268 -+ &board_963269bhr, -+#endif /* CONFIG_BCM63XX_CPU_63268 */ - }; - - static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -2755,6 +2798,7 @@ static struct of_device_id const bcm963x - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 -+ { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - #endif /* CONFIG_OF */ - { }, diff --git a/target/linux/bcm63xx/patches-5.4/682-board_bcm63268-inteno-vg50.patch b/target/linux/bcm63xx/patches-5.4/682-board_bcm63268-inteno-vg50.patch deleted file mode 100644 index 1275af5c22..0000000000 --- a/target/linux/bcm63xx/patches-5.4/682-board_bcm63268-inteno-vg50.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2580,6 +2580,48 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_vw6339gu = { -+ .name = "VW6339GU", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN2", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN4", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 7, -+ .name = "WAN", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_63268 */ - - /* -@@ -2685,6 +2727,7 @@ static const struct board_info __initcon - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 - &board_963269bhr, -+ &board_vw6339gu, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - }; - -@@ -2799,6 +2842,7 @@ static struct of_device_id const bcm963x - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 - { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, -+ { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - #endif /* CONFIG_OF */ - { }, diff --git a/target/linux/bcm63xx/patches-5.4/683-board_bcm63268-brcm-bcm963268bu-p300.patch b/target/linux/bcm63xx/patches-5.4/683-board_bcm63268-brcm-bcm963268bu-p300.patch deleted file mode 100644 index c75d7a477e..0000000000 --- a/target/linux/bcm63xx/patches-5.4/683-board_bcm63268-brcm-bcm963268bu-p300.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2546,6 +2546,65 @@ static struct board_info __initdata boar - * known 63268/63269 boards - */ - #ifdef CONFIG_BCM63XX_CPU_63268 -+static struct board_info __initdata board_963268bu_p300 = { -+ .name = "963268BU_P300", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_usbd = 1, -+ .usbd = { -+ .use_fullspeed = 0, -+ .port_no = 0, -+ }, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 17, -+ .name = "FE1", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "GbE2", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 0, -+ .name = "GbE3", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ [5] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "GbE1", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ [6] = { -+ .used = 1, -+ .phy_id = 24, -+ .name = "GbE4", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ [7] = { -+ .used = 1, -+ .phy_id = 25, -+ .name = "GbE5", -+ .mii_override = 1, -+ .timing_sel = 1, -+ }, -+ }, -+ }, -+}; -+ - static struct board_info __initdata board_963269bhr = { - .name = "963269BHR", - .expected_cpu_id = 0x63268, -@@ -2726,6 +2785,7 @@ static const struct board_info __initcon - &board_WAP5813n, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 -+ &board_963268bu_p300, - &board_963269bhr, - &board_vw6339gu, - #endif /* CONFIG_BCM63XX_CPU_63268 */ -@@ -2841,6 +2901,7 @@ static struct of_device_id const bcm963x - { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, - #endif /* CONFIG_BCM63XX_CPU_6368 */ - #ifdef CONFIG_BCM63XX_CPU_63268 -+ { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, - { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, - { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, - #endif /* CONFIG_BCM63XX_CPU_63268 */ diff --git a/target/linux/bcm63xx/patches-5.4/684-board_bcm63168-sky-sr102.patch b/target/linux/bcm63xx/patches-5.4/684-board_bcm63168-sky-sr102.patch deleted file mode 100644 index 7f1fb58a32..0000000000 --- a/target/linux/bcm63xx/patches-5.4/684-board_bcm63168-sky-sr102.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2681,6 +2681,42 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_BSKYB_63168 = { -+ .name = "BSKYB_63168", -+ .expected_cpu_id = 0x63268, -+ -+ .has_pci = 1, -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "Port 1", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "Port 2", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "Port 3", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "Port 4", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_63268 */ - - /* -@@ -2788,6 +2824,7 @@ static const struct board_info __initcon - &board_963268bu_p300, - &board_963269bhr, - &board_vw6339gu, -+ &board_BSKYB_63168, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - }; - -@@ -2904,6 +2941,7 @@ static struct of_device_id const bcm963x - { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, - { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, - { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, -+ { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - #endif /* CONFIG_OF */ - { }, diff --git a/target/linux/bcm63xx/patches-5.4/685-board-bcm63168-comtrend-vr-3032u.patch b/target/linux/bcm63xx/patches-5.4/685-board-bcm63168-comtrend-vr-3032u.patch deleted file mode 100644 index af4c5388cc..0000000000 --- a/target/linux/bcm63xx/patches-5.4/685-board-bcm63168-comtrend-vr-3032u.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2640,6 +2640,41 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_VR3032u = { -+ .name = "963168M-1841N1", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [0] = { -+ .used = 1, -+ .phy_id = 1, -+ .name = "LAN2", -+ }, -+ [1] = { -+ .used = 1, -+ .phy_id = 2, -+ .name = "LAN3", -+ }, -+ [2] = { -+ .used = 1, -+ .phy_id = 3, -+ .name = "LAN4", -+ }, -+ [3] = { -+ .used = 1, -+ .phy_id = 4, -+ .name = "LAN1", -+ }, -+ }, -+ }, -+}; -+ - static struct board_info __initdata board_vw6339gu = { - .name = "VW6339GU", - .expected_cpu_id = 0x63268, -@@ -2823,6 +2858,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_63268 - &board_963268bu_p300, - &board_963269bhr, -+ &board_VR3032u, - &board_vw6339gu, - &board_BSKYB_63168, - #endif /* CONFIG_BCM63XX_CPU_63268 */ -@@ -2940,6 +2976,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_63268 - { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, - { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, -+ { .compatible = "comtrend,vr-3032u", .data = &board_VR3032u, }, - { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, - { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, - #endif /* CONFIG_BCM63XX_CPU_63268 */ diff --git a/target/linux/bcm63xx/patches-5.4/686-board-bcm63169-comtrend-vg-8050.patch b/target/linux/bcm63xx/patches-5.4/686-board-bcm63169-comtrend-vg-8050.patch deleted file mode 100644 index b55b4d3701..0000000000 --- a/target/linux/bcm63xx/patches-5.4/686-board-bcm63169-comtrend-vg-8050.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2640,6 +2640,31 @@ static struct board_info __initdata boar - }, - }; - -+static struct board_info __initdata board_VG8050 = { -+ .name = "963169P-1861N5", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [6] = { -+ .used = 1, -+ .phy_id = 0xff, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .mii_override = 1, -+ .timing_sel = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; -+ - static struct board_info __initdata board_VR3032u = { - .name = "963168M-1841N1", - .expected_cpu_id = 0x63268, -@@ -2858,6 +2883,7 @@ static const struct board_info __initcon - #ifdef CONFIG_BCM63XX_CPU_63268 - &board_963268bu_p300, - &board_963269bhr, -+ &board_VG8050, - &board_VR3032u, - &board_vw6339gu, - &board_BSKYB_63168, -@@ -2976,6 +3002,7 @@ static struct of_device_id const bcm963x - #ifdef CONFIG_BCM63XX_CPU_63268 - { .compatible = "brcm,bcm963268bu-p300", .data = &board_963268bu_p300, }, - { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, -+ { .compatible = "comtrend,vg-8050", .data = &board_VG8050, }, - { .compatible = "comtrend,vr-3032u", .data = &board_VR3032u, }, - { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, - { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, diff --git a/target/linux/bcm63xx/patches-5.4/687-board-bcm63167-sercomm-h500-s.patch b/target/linux/bcm63xx/patches-5.4/687-board-bcm63167-sercomm-h500-s.patch deleted file mode 100644 index 5bcb50672d..0000000000 --- a/target/linux/bcm63xx/patches-5.4/687-board-bcm63167-sercomm-h500-s.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -2777,6 +2777,36 @@ static struct board_info __initdata boar - }, - }, - }; -+ -+static struct board_info __initdata board_H500s = { -+ .name = "BXK00C-1.6", -+ .expected_cpu_id = 0x63268, -+ -+ .has_ohci0 = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 1, -+ -+ .has_enetsw = 1, -+ .enetsw = { -+ .used_ports = { -+ [3] = { -+ .used = 1, -+ .phy_id = 12, -+ .name = "WAN", -+ }, -+ [4] = { -+ .used = 1, -+ .phy_id = 0, -+ .bypass_link = 1, -+ .force_speed = 1000, -+ .force_duplex_full = 1, -+ .mii_override = 1, -+ .timing_sel = 1, -+ .name = "RGMII", -+ }, -+ }, -+ }, -+}; - #endif /* CONFIG_BCM63XX_CPU_63268 */ - - /* -@@ -2887,6 +2917,7 @@ static const struct board_info __initcon - &board_VR3032u, - &board_vw6339gu, - &board_BSKYB_63168, -+ &board_H500s, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - }; - -@@ -3005,6 +3036,8 @@ static struct of_device_id const bcm963x - { .compatible = "comtrend,vg-8050", .data = &board_VG8050, }, - { .compatible = "comtrend,vr-3032u", .data = &board_VR3032u, }, - { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, -+ { .compatible = "sercomm,h500-s-lowi", .data = &board_H500s, }, -+ { .compatible = "sercomm,h500-s-vfes", .data = &board_H500s, }, - { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, - #endif /* CONFIG_BCM63XX_CPU_63268 */ - #endif /* CONFIG_OF */ From c19c15f3302a54740bb719542f57a6c5d04f722f Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 27 Oct 2020 13:33:21 +0100 Subject: [PATCH 29/44] lantiq: fix indent in vr9_avm_fritz7412.dts Indent should be tabs. Signed-off-by: Adrian Schmutzler --- .../files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts index eed30c2f0f..2ee0cfd13c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts @@ -178,7 +178,7 @@ }; &gphy0 { - lantiq,gphy-mode = ; + lantiq,gphy-mode = ; }; ð0 { From 6c85a449a988876fdfd4ce84d6aa5ffe4a2820c1 Mon Sep 17 00:00:00 2001 From: Leon Maurice Adam Date: Sun, 3 May 2020 12:44:24 +0200 Subject: [PATCH 30/44] lantiq: add support for AVM FRITZ!Box 7430 Hardware: - SoC: Lantiq VRX 220 - CPU: 2x MIPS 34Kc 500 MHz - RAM: 128 MiB 250 MHz - Flash: 128 MiB NAND - Ethernet: Built-in Fast Ethernet switch, 4 ports used - Wifi: Atheros AR9381-AL1A b/g/n with 2 pcb/internal and 1 external antennas - USB: 1x USB 2.0 - DSL: Built-in A/VDSL2 modem - DECT: Dialog SC14441 - LEDs: 1 two-color, 4 one-color - Buttons: 1x DECT, 1x WIFI - Telephone connectors: 1 FXS port via TAE or RJ11 connector With the exception of FXS/DECT everything works (there are no drivers for AVM's FXS or DECT implementation), DSL is yet untested. Installation: Boot up the device and wait a few seconds. Run the eva_ramboot.py script in scripts/flashing/ to load the initramfs image on the device: $ ./scripts/flashing/eva_ramboot.py 192.168.178.1 If the script fails to reach the device, maybe try 169.254.120.1. Wait until booting is complete. You should now be able to reach your device under the default ip address 192.168.1.1. Before flashing, check if linux_fs_start is not set to 1 in the tffs partition: $ fritz_tffs_nand -d /dev/mtd1 -n linux_fs_start If linux_fs_start is 1, you will need to reset it to 0, either by FTP, upgrading FritzOS or doing a recovery. Now you should be able to flash the device using sysupgrade. Signed-off-by: Leon Maurice Adam Acked-by: Aleksander Jan Bajkowski [drop BOARD_NAME, use wpad-basic-wolfssl, drop 4.19, drop dts-v1, remove model prefix from LED names] Signed-off-by: Adrian Schmutzler --- .../boot/dts/lantiq/vr9_avm_fritz7430.dts | 273 ++++++++++++++++++ target/linux/lantiq/image/vr9.mk | 10 + .../xrx200/base-files/etc/board.d/02_network | 10 +- .../etc/hotplug.d/firmware/12-ath9k-eeprom | 3 +- .../xrx200/base-files/lib/upgrade/platform.sh | 1 + 5 files changed, 294 insertions(+), 3 deletions(-) create mode 100644 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts new file mode 100644 index 0000000000..3894fecb43 --- /dev/null +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7430.dts @@ -0,0 +1,273 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "vr9.dtsi" + +#include +#include + +/ { + compatible = "avm,fritz7430", "lantiq,xway", "lantiq,vr9"; + model = "AVM FRITZ!Box 7430"; + + chosen { + bootargs = "console=ttyLTQ0,115200"; + }; + + aliases { + led-boot = &led_power; + led-failsafe = &led_info_red; + led-running = &led_power; + led-upgrade = &led_info_green; + + led-dsl = &led_info_green; + led-wifi = &led_wifi; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + dect { + label = "dect"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio 31 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + led_info_green: info_green { + label = "green:info"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + led_info_red: info_red { + label = "red:info"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_wifi: wifi { + label = "green:wifi"; + gpios = <&gpio 34 GPIO_ACTIVE_LOW>; + }; + + dect { + label = "green:dect"; + gpios = <&gpio 35 GPIO_ACTIVE_LOW>; + }; + + fon { + label = "green:fon"; + gpios = <&gpio 36 GPIO_ACTIVE_LOW>; + }; + }; + + usb0_vbus: regulator-usb0-vbus { + compatible = "regulator-fixed"; + + regulator-name = "USB0_VBUS"; + + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + + gpio = <&gpio 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&localbus { + flash@0 { + compatible = "lantiq,nand-xway"; + bank-width = <2>; + reg = <0 0x0 0x8000000>; + lantiq,cs = <1>; + + pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>; + pinctrl-names = "default"; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "urlader"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "nand-tffs"; + reg = <0x40000 0x400000>; + read-only; + }; + + partition@440000 { + label = "kernel"; + reg = <0x440000 0x400000>; + }; + + partition@840000 { + label = "ubi"; + reg = <0x840000 0x3000000>; + }; + + partition@3840000 { + label = "reserved-kernel"; + reg = <0x3840000 0x400000>; + read-only; + }; + + partition@3c40000 { + label = "reserved-filesystem"; + reg = <0x3c40000 0x3000000>; + read-only; + }; + + partition@6c40000 { + label = "config"; + reg = <0x6c40000 0x200000>; + read-only; + }; + + partition@6e40000 { + label = "nand-filesystem"; + reg = <0x6e40000 0x11c0000>; + read-only; + }; + }; + }; +}; + +&pcie0 { + status = "okay"; + + gpio-reset = <&gpio 11 GPIO_ACTIVE_LOW>; + + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + + wifi@168c,abcd { + compatible = "pci168c,abcd"; + reg = <0 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */ + }; + }; +}; + +&gphy0 { + lantiq,gphy-mode = ; +}; + +&gphy1 { + lantiq,gphy-mode = ; +}; + +ð0 { + interface@0 { + compatible = "lantiq,xrx200-pdi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + lantiq,switch; + + ethernet@2 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <2>; + phy-mode = "mii"; + phy-handle = <&phy11>; + }; + + ethernet@3 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <3>; + phy-mode = "mii"; + phy-handle = <&phy12>; + }; + + ethernet@4 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <4>; + phy-mode = "mii"; + phy-handle = <&phy13>; + }; + + ethernet@5 { + compatible = "lantiq,xrx200-pdi-port"; + reg = <5>; + phy-mode = "mii"; + phy-handle = <&phy14>; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "lantiq,xrx200-mdio"; + + phy11: ethernet-phy@11 { + reg = <0x11>; + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22"; + }; + + phy12: ethernet-phy@12 { + reg = <0x12>; + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22"; + }; + + phy13: ethernet-phy@13 { + reg = <0x13>; + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22"; + }; + + phy14: ethernet-phy@14 { + reg = <0x14>; + compatible = "lantiq,phy22f", "ethernet-phy-ieee802.3-c22"; + }; + }; +}; + +&gpio { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinmux { + pcie-rst { + lantiq,pins = "io11"; + lantiq,open-drain = <1>; + lantiq,output = <1>; + }; + }; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; + + vbus-supply = <&usb0_vbus>; +}; diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index e5ebbd3b65..d3420bb2b9 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -157,6 +157,16 @@ define Device/avm_fritz7412 endef TARGET_DEVICES += avm_fritz7412 +define Device/avm_fritz7430 + $(Device/AVM) + $(Device/NAND) + DEVICE_MODEL := FRITZ!Box 7430 + KERNEL_SIZE := 4096k + IMAGE_SIZE := 49152k + DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic-wolfssl fritz-tffs-nand fritz-caldata +endef +TARGET_DEVICES += avm_fritz7430 + define Device/bt_homehub-v5a $(Device/NAND) DEVICE_VENDOR := British Telecom diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network index 07bcdf9f84..f7af17995f 100755 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -44,6 +44,10 @@ lantiq_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0" ;; + avm,fritz7430) + ucidef_add_switch "switch0" \ + "2:lan:3" "3:lan:4" "4:lan:1" "5:lan:2" "6t@eth0" + ;; bt,homehub-v5a) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0" @@ -85,7 +89,8 @@ lantiq_setup_dsl() avm,fritz3370-rev2-micron|\ avm,fritz7360sl|\ avm,fritz7362sl|\ - avm,fritz7412) + avm,fritz7412|\ + avm,fritz7430) annex="b" ;; esac @@ -135,7 +140,8 @@ lantiq_setup_macs() lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) wan_mac=$(fritz_tffs -n macdsl -i $(find_mtd_part "tffs (1)")) ;; - avm,fritz7412) + avm,fritz7412|\ + avm,fritz7430) tffsdev=$(find_mtd_chardev "nand-tffs") lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca -o) wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl -o) diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 75cc50a207..ee8cc3879a 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -20,7 +20,8 @@ case "$FIRMWARE" in avm,fritz7360-v2) caldata_extract "urlader" 0x985 0x1000 ;; - avm,fritz7412) + avm,fritz7412|\ + avm,fritz7430) /usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 4096 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") ;; bt,homehub-v5a) diff --git a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh index dcd797c30d..0770052488 100755 --- a/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/xrx200/base-files/lib/upgrade/platform.sh @@ -13,6 +13,7 @@ platform_do_upgrade() { avm,fritz3370-rev2-micron|\ avm,fritz7362sl|\ avm,fritz7412|\ + avm,fritz7430|\ bt,homehub-v5a|\ zyxel,p-2812hnu-f1|\ zyxel,p-2812hnu-f3) From 29804086ee7b740224d01012656162a9518deb97 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Sun, 16 Aug 2020 13:07:30 -0700 Subject: [PATCH 31/44] malta: relocate CPU_TYPE setting to subtarget makefiles Move CPU_TYPE:=24kc (32-bit) from the top-level target makefile to the be/le subtarget makefiles, which is consistent with the 64-bit subtargets. Signed-off-by: Tony Ambardar --- target/linux/malta/Makefile | 1 - target/linux/malta/be/target.mk | 1 + target/linux/malta/le/target.mk | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile index 3f2c92c766..4beeb64b8b 100644 --- a/target/linux/malta/Makefile +++ b/target/linux/malta/Makefile @@ -8,7 +8,6 @@ include $(TOPDIR)/rules.mk BOARD:=malta BOARDNAME:=MIPS Malta CoreLV board (qemu) -CPU_TYPE:=24kc SUBTARGETS:=le be le64 be64 INITRAMFS_EXTRA_FILES:= FEATURES:=cpiogz ext4 ramdisk squashfs targz diff --git a/target/linux/malta/be/target.mk b/target/linux/malta/be/target.mk index 45949f50c8..8d306c8a15 100644 --- a/target/linux/malta/be/target.mk +++ b/target/linux/malta/be/target.mk @@ -1,4 +1,5 @@ ARCH:=mips +CPU_TYPE:=24kc SUBTARGET:=be BOARDNAME:=Big Endian diff --git a/target/linux/malta/le/target.mk b/target/linux/malta/le/target.mk index e642510621..feb0f1d04c 100644 --- a/target/linux/malta/le/target.mk +++ b/target/linux/malta/le/target.mk @@ -1,4 +1,5 @@ ARCH:=mipsel +CPU_TYPE:=24kc SUBTARGET:=le FEATURES+=source-only BOARDNAME:=Little Endian From 2a860bf4f4d5e76bd61235eeade834b6f8e2c9fa Mon Sep 17 00:00:00 2001 From: Nuno Goncalves Date: Thu, 13 Aug 2020 23:26:13 +0100 Subject: [PATCH 32/44] ramips: add support for Wavlink WL-WN530HG4 Same hardware as Phicomm K2G but different flash layout. Specification: - SoC: MediaTek MT7620A - Flash: 8 MB - RAM: 64 MB - Ethernet: 4 FE ports and 1 GE port (RTL8211F on port 5) - Wireless radio: MT7620 for 2.4G and MT7612E for 5G, both equipped with external PA. - UART: 1 x UART on PCB - 57600 8N1 Flash instruction: To avoid requiring UART for TFTP a dual flash procedure is suggested to install the squashfs image: 1. Rename openwrt-ramips-mt7620-wavlink_wl-wn530hg4-initramfs-kernel.bin to WN530HG4-WAVLINK. 2. Flash this file with the factory web interface. 3. With OpenWRT now running use standard sysupgrade to install the squashfs image. Signed-off-by: Nuno Goncalves [remove dts-v1, remove model from LED labels, wrap commit message] Signed-off-by: Adrian Schmutzler --- .../dts/mt7620a_wavlink_wl-wn530hg4.dts | 138 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 9 ++ .../mt7620/base-files/etc/board.d/02_network | 6 +- 3 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts new file mode 100644 index 0000000000..d8ce40c8d1 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "wavlink,wl-wn530hg4", "ralink,mt7620a-soc"; + model = "Wavlink WL-WN530HG4"; + + aliases { + led-boot = &led_status_blue; + led-failsafe = &led_status_blue; + led-running = &led_status_blue; + led-upgrade = &led_status_blue; + serial0 = &uartlite; + }; + + leds { + compatible = "gpio-leds"; + + led_status_blue: status_blue { + label = "blue:status"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + status_yellow { + label = "yellow:status"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + status_red { + label = "red:status"; + gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "i2c", "uartf"; + function = "gpio"; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii2_pins &mdio_pins>; + + mtd-mac-address = <&factory 0x28>; + + mediatek,portmap = "llllw"; + + port@5 { + status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&wmac { + pinctrl-names = "default"; + pinctrl-0 = <&pa_pins>; + + ralink,mtd-eeprom = <&factory 0x0>; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index d9725c9e69..dfdb5f28d3 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -1078,6 +1078,15 @@ define Device/vonets_var11n-300 endef TARGET_DEVICES += vonets_var11n-300 +define Device/wavlink_wl-wn530hg4 + SOC := mt7620a + IMAGE_SIZE := 7872k + DEVICE_VENDOR := Wavlink + DEVICE_MODEL := WL-WN530HG4 + DEVICE_PACKAGES := kmod-mt76x2 +endef +TARGET_DEVICES += wavlink_wl-wn530hg4 + define Device/wrtnode_wrtnode SOC := mt7620n IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 3fdd42bbff..e884390c31 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -193,7 +193,8 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "4:lan" "0:wan" "6@eth0" ;; - phicomm,k2g) + phicomm,k2g|\ + wavlink,wl-wn530hg4) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5:wan" "6@eth0" ;; @@ -334,7 +335,8 @@ ramips_setup_macs() lenovo,newifi-y1|\ lenovo,newifi-y1s|\ ohyeah,oy-0001|\ - phicomm,k2g) + phicomm,k2g|\ + wavlink,wl-wn530hg4) wan_mac=$(mtd_get_mac_binary factory 0x2e) ;; linksys,e1700) From 095cc2b7454addeaf25b05aff194f287783219ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 6 Oct 2020 09:34:24 +0200 Subject: [PATCH 33/44] uci: update to version 2020-10-06 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 52bbc99f69ea Replace malloc() + memset() with calloc() 3fbd6c923434 ucimap: Check return of malloc() eae126f66663 file: Check buffer size after strtok() 7f574273180a file: use size_t for position and pointer 19770b6949b9 file: use dynamic memory allocation for tempfile name aa46546794ac file: uci_file_commit: fix memory leak 671c7554bfde uci: silence UBSAN error by using offsetof macro from compiler ea5bbd57d0e1 tests: cram: add uci import testing on fuzzer corpus 31f78bfbf75f cmake: add uci-san cli built with clang sanitizers a3e650911f5e file: uci_parse_package: fix heap use after free 9bd361ca3236 tests: add libFuzzer based fuzzing Signed-off-by: Petr Štetiar --- package/system/uci/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 8c11f4c576..9e632ac8da 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -13,8 +13,8 @@ PKG_RELEASE:=3 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE=2020-04-24 -PKG_SOURCE_VERSION:=ec8d3233948603485e1b97384113fac9f1bab5d6 +PKG_SOURCE_DATE=2020-10-06 +PKG_SOURCE_VERSION:=52bbc99f69ea6f67b6fe264f424dac91bde5016c PKG_MIRROR_HASH:=b3cdc66a8ec4f05a102ce5520a3f8ff69ca4a49930c5bb01065467ef68f0808b PKG_LICENSE:=LGPL-2.1 From f9005d4f80dee3dcc257d4613cbc46668faad094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 26 Oct 2020 08:35:01 +0100 Subject: [PATCH 34/44] umdns: update to version 2020-10-26 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 59e4fc98162d cache: cache_answer: fix off by one 4cece9cc7db4 cache: cache_record_find: fix buffer overflow be687257ee0b cmake: tests: provide umdns-san binary bf01f2dd0089 tests: add dns_handle_packet_file tool 134afc728846 tests: add libFuzzer based fuzzing de08a2c71ca8 cmake: create static library cdc18fbb3ea8 interface: fix possible null pointer dereference 1fa034c65cb6 interface: fix value stored to 'fd' is never read 3a67ebe3fc66 Add initial GitLab CI support 50caea125517 cmake: fix include dirs and libs lookup Signed-off-by: Petr Štetiar --- package/network/services/umdns/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile index 05d0f61cf8..f02177dca2 100644 --- a/package/network/services/umdns/Makefile +++ b/package/network/services/umdns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-07-20 -PKG_SOURCE_VERSION:=eadfa26a5cf31e27f551c37c1362983e9db37c4d -PKG_MIRROR_HASH:=a7ea35b9078543050399cda08da49199f49e2535cb8dd957e0dc5a7ff86c32a4 +PKG_SOURCE_DATE:=2020-10-26 +PKG_SOURCE_VERSION:=59e4fc98162d253b4e5ecd110f7bc5ea3962e221 +PKG_MIRROR_HASH:=35fefc76d84c963ccb0aa72ac738065649f361d2946d3bc45fbd205d1dfc3d9f PKG_MAINTAINER:=John Crispin PKG_LICENSE:=LGPL-2.1 From 43fe0bd18dcce00e73259d20fd8e07fd0add5bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 27 Oct 2020 22:56:35 +0100 Subject: [PATCH 35/44] uci: fix package mirror hash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've forget to update PKG_MIRROR_HASH in my previous package version bump. Fixes: 095cc2b7454a ("uci: update to version 2020-10-06") Signed-off-by: Petr Štetiar --- package/system/uci/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 9e632ac8da..4f77cf2219 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -15,7 +15,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE=2020-10-06 PKG_SOURCE_VERSION:=52bbc99f69ea6f67b6fe264f424dac91bde5016c -PKG_MIRROR_HASH:=b3cdc66a8ec4f05a102ce5520a3f8ff69ca4a49930c5bb01065467ef68f0808b +PKG_MIRROR_HASH:=39f2225d1b8f62d7133f708fc73f1f841b6113ae4634485fc0dfdf226041c3c4 PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:= From e66bd0eb0469d6b53da72acf28043d9a552470fe Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 18 Oct 2020 22:35:31 +0200 Subject: [PATCH 36/44] hostapd: make rrm report independent of ieee80211k setting Allow to configure both RRM beacon as well as neighbor reports independently and only enable them by default in case the ieee80211k config option is set. Signed-off-by: David Bauer --- package/network/services/hostapd/files/hostapd.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 3290358ed2..832a056339 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -625,17 +625,16 @@ hostapd_set_bss_options() { append bss_conf "bss_transition=$bss_transition" "$N" fi - json_get_vars ieee80211k + json_get_vars ieee80211k rrm_neighbor_report rrm_beacon_report set_default ieee80211k 0 if [ "$ieee80211k" -eq "1" ]; then - json_get_vars rrm_neighbor_report rrm_beacon_report - set_default rrm_neighbor_report 1 set_default rrm_beacon_report 1 - append bss_conf "rrm_neighbor_report=$rrm_neighbor_report" "$N" - append bss_conf "rrm_beacon_report=$rrm_beacon_report" "$N" fi + [ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N" + [ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N" + if [ "$wpa" -ge "1" ]; then json_get_vars ieee80211r set_default ieee80211r 0 From b518f07d4b8ae144453c606c9ec4ecef7d39f968 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 19 Oct 2020 01:21:23 +0200 Subject: [PATCH 37/44] hostapd: remove ieee80211v option Remove the ieee80211v option. It previously was required to be enabled in order to use time_advertisement, time_zone, wnm_sleep_mode and bss_transition, however it didn't enable any of these options by default. Remove it, as configuring these options independently is enough. This change does not influence the behavior of any already configured setting. Signed-off-by: David Bauer --- .../network/services/hostapd/files/hostapd.sh | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 832a056339..8e05ae211f 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -239,7 +239,7 @@ hostapd_common_add_bss_config() { config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin config_add_string multi_ap_backhaul_ssid multi_ap_backhaul_key - config_add_boolean ieee80211v wnm_sleep_mode bss_transition + config_add_boolean wnm_sleep_mode bss_transition config_add_int time_advertisement config_add_string time_zone @@ -610,20 +610,12 @@ hostapd_set_bss_options() { append bss_conf "iapp_interface=$ifname" "$N" } - json_get_vars ieee80211v - set_default ieee80211v 0 - if [ "$ieee80211v" -eq "1" ]; then - json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition + json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition - set_default time_advertisement 0 - set_default wnm_sleep_mode 0 - set_default bss_transition 0 - - append bss_conf "time_advertisement=$time_advertisement" "$N" - [ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N" - append bss_conf "wnm_sleep_mode=$wnm_sleep_mode" "$N" - append bss_conf "bss_transition=$bss_transition" "$N" - fi + [ -n "$time_advertisement" ] && append bss_conf "time_advertisement=$time_advertisement" "$N" + [ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N" + [ "$wnm_sleep_mode" -eq "1" ] && append bss_conf "wnm_sleep_mode=1" "$N" + [ "$bss_transition" -eq "1" ] && append bss_conf "bss_transition=1" "$N" json_get_vars ieee80211k rrm_neighbor_report rrm_beacon_report set_default ieee80211k 0 From daeda8a87e87030d4fd92504f8bffb5ca0dcf333 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 19 Oct 2020 19:36:56 +0200 Subject: [PATCH 38/44] mac80211: pass phy name to hostapd_set_bss_options hostapd_set_bss_options expects the PHY as second and the VIF as third argument. However, only the VIF was passed as second argument without a third argument at all. This was never a problem, as both PHY and VIF were never accessed. However, with FTM support the PHY is needed to determine the HW support when configuring the BSS. Signed-off-by: David Bauer --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 42144375b4..11ea700b98 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -372,7 +372,7 @@ mac80211_hostapd_setup_bss() { hostapd_cfg= append hostapd_cfg "$type=$ifname" "$N" - hostapd_set_bss_options hostapd_cfg "$vif" || return 1 + hostapd_set_bss_options hostapd_cfg "$phy" "$vif" || return 1 json_get_vars wds wds_bridge dtim_period max_listen_int start_disabled set_default wds 0 From cc80cf53c50d3f32b83dc2986d82e299b81857ff Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 18 Oct 2020 23:09:09 +0200 Subject: [PATCH 39/44] hostapd: add FTM responder support This adds support for enabling the FTM responder flag for the APs extended capabilities. On supported hardware, enabling the ftm_responder config key for a given AP will enable the FTM responder bit. FTM support itself is unconditionally implemented in the devices firmware (ath10k 2nd generation with 3.2.1.1 firmware). There's currently no softmac implementation. Also allow to configure LCI and civic location information which can be transmitted to a FTM initiator. Signed-off-by: David Bauer --- package/network/services/hostapd/files/hostapd.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 8e05ae211f..6267fa9045 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -245,6 +245,9 @@ hostapd_common_add_bss_config() { config_add_boolean ieee80211k rrm_neighbor_report rrm_beacon_report + config_add_boolean ftm_responder stationary_ap + config_add_string lci civic + config_add_boolean ieee80211r pmk_r1_push ft_psk_generate_local ft_over_ds config_add_int r0_key_lifetime reassociation_deadline config_add_string mobility_domain r1_key_holder @@ -627,6 +630,16 @@ hostapd_set_bss_options() { [ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N" [ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N" + json_get_vars ftm_responder stationary_ap lci civic + if [ "$ftm_responder" -eq "1" ]; then + iw phy "$phy" info | grep -q "ENABLE_FTM_RESPONDER" && { + append bss_conf "ftm_responder=1" "$N" + [ "$stationary_ap" -eq "1" ] && append bss_conf "stationary_ap=1" "$N" + [ -n "$lci" ] && append bss_conf "lci=$lci" "$N" + [ -n "$civic" ] && append bss_conf "lci=$civic" "$N" + } + fi + if [ "$wpa" -ge "1" ]; then json_get_vars ieee80211r set_default ieee80211r 0 From 838b412cb527b432069b848b49390bb3aafe755d Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 19 Oct 2020 02:29:47 +0200 Subject: [PATCH 40/44] hostapd: add interworking support This adds configuration options to enable interworking for hostapd. All options require iw_enabled to be set to 1 for a given VAP. All IEEE802.11u related settings are supported with exception of the venue information which will be added as separate UCI sections at a later point. The options use the same name as the ones from the hostapd.conf file with a "iw_" prefix added. All UCI configuration options are passed without further modifications to hostapd with exceptions of the following options, whose elements can be provided using UCI lis elements: - iw_roaming_consortium - iw_anqp_elem - iw_nai_realm - iw_domain_name - iw_anqp_3gpp_cell_net Signed-off-by: David Bauer --- .../hostapd/files/hostapd-full.config | 2 +- .../network/services/hostapd/files/hostapd.sh | 78 +++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config index ab9d13aae7..fee4479dfa 100644 --- a/package/network/services/hostapd/files/hostapd-full.config +++ b/package/network/services/hostapd/files/hostapd-full.config @@ -313,7 +313,7 @@ CONFIG_INTERNAL_LIBTOMMATH=y # Interworking (IEEE 802.11u) # This can be used to enable functionality to improve interworking with # external networks. -#CONFIG_INTERWORKING=y +CONFIG_INTERWORKING=y # Hotspot 2.0 #CONFIG_HS20=y diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 6267fa9045..cb7e1d7053 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -269,6 +269,13 @@ hostapd_common_add_bss_config() { config_add_string 'owe_transition_bssid:macaddr' 'owe_transition_ssid:string' + config_add_boolean iw_enabled iw_internet iw_asra iw_esr iw_uesa + config_add_int iw_access_network_type iw_venue_group iw_venue_type + config_add_int iw_ipaddr_type_availability iw_gas_address3 + config_add_string iw_hessid iw_network_auth_type iw_qos_map_set + config_add_array iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm + config_add_array iw_anqp_elem + config_add_boolean hs20 disable_dgaf osen config_add_int anqp_domain_id config_add_int hs20_deauth_req_timeout @@ -314,6 +321,34 @@ hostapd_set_psk() { for_each_station hostapd_set_psk_file ${ifname} } +append_iw_roaming_consortium() { + [ -n "$1" ] && append bss_conf "roaming_consortium=$1" "$N" +} + +append_iw_domain_name() { + if [ -z "$iw_domain_name_conf" ]; then + iw_domain_name_conf="$1" + else + iw_domain_name_conf="$iw_domain_name_conf,$1" + fi +} + +append_iw_anqp_3gpp_cell_net() { + if [ -z "$iw_anqp_3gpp_cell_net_conf" ]; then + iw_anqp_3gpp_cell_net_conf="$1" + else + iw_anqp_3gpp_cell_net_conf="$iw_anqp_3gpp_cell_net_conf:$1" + fi +} + +append_iw_anqp_elem() { + [ -n "$1" ] && append bss_conf "anqp_elem=$1" "$N" +} + +append_iw_nai_realm() { + [ -n "$1" ] && append bss_conf "nai_realm=$1" "$N" +} + append_hs20_oper_friendly_name() { append bss_conf "hs20_oper_friendly_name=$1" "$N" } @@ -774,6 +809,49 @@ hostapd_set_bss_options() { } } + json_get_vars iw_enabled iw_internet iw_asra iw_esr iw_uesa iw_access_network_type + json_get_vars iw_hessid iw_venue_group iw_venue_type iw_network_auth_type + json_get_vars iw_roaming_consortium iw_domain_name iw_anqp_3gpp_cell_net iw_nai_realm + json_get_vars iw_anqp_elem iw_qos_map_set iw_ipaddr_type_availability iw_gas_address3 + + set_default iw_enabled 0 + if [ "$iw_enabled" = "1" ]; then + append bss_conf "interworking=1" "$N" + set_default iw_internet 1 + set_default iw_asra 0 + set_default iw_esr 0 + set_default iw_uesa 0 + + append bss_conf "internet=$iw_internet" "$N" + append bss_conf "asra=$iw_asra" "$N" + append bss_conf "esr=$iw_esr" "$N" + append bss_conf "uesa=$iw_uesa" "$N" + + [ -n "$iw_access_network_type" ] && \ + append bss_conf "access_network_type=$iw_access_network_type" "$N" + [ -n "$iw_hessid" ] && append bss_conf "hessid=$iw_hessid" "$N" + [ -n "$iw_venue_group" ] && \ + append bss_conf "venue_group=$iw_venue_group" "$N" + [ -n "$iw_venue_type" ] && append bss_conf "venue_type=$iw_venue_type" "$N" + [ -n "$iw_network_auth_type" ] && \ + append bss_conf "network_auth_type=$iw_network_auth_type" "$N" + [ -n "$iw_gas_address3" ] && append bss_conf "gas_address3=$iw_gas_address3" "$N" + [ -n "$iw_qos_map_set" ] && append bss_conf "qos_map_set=$iw_qos_map_set" "$N" + + json_for_each_item append_iw_roaming_consortium iw_roaming_consortium + json_for_each_item append_iw_anqp_elem iw_anqp_elem + json_for_each_item append_iw_nai_realm iw_nai_realm + + json_for_each_item append_iw_domain_name iw_domain_name + [ -n "$iw_domain_name_conf" ] && \ + append bss_conf "domain_name=$iw_domain_name_conf" "$N" + + json_for_each_item append_iw_anqp_3gpp_cell_net iw_anqp_3gpp_cell_net + [ -n "$iw_anqp_3gpp_cell_net_conf" ] && \ + append bss_conf "anqp_3gpp_cell_net=$iw_anqp_3gpp_cell_net_conf" "$N" + fi + + local hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \ osu_ssid hs20_wan_metrics hs20_operating_class hs20_t_c_filename hs20_t_c_timestamp json_get_vars hs20 disable_dgaf osen anqp_domain_id hs20_deauth_req_timeout \ From 83d40aef13e811c2744c2f7d2c3175a5bbb6af43 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 28 Oct 2020 00:09:34 +0100 Subject: [PATCH 41/44] hostapd: bump PKG_RELEASE Signed-off-by: David Bauer --- package/network/services/hostapd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 9ae72e7c28..4498fbde5c 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=12 +PKG_RELEASE:=13 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git From 7ca9b82c389a643e81709b58e4e785a5de91330a Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Thu, 22 Oct 2020 10:52:08 +0200 Subject: [PATCH 42/44] mac80211: Fix wpa_supplicant config removal ubus call If mac80211_setup_supplicant() is called with enabled=0 then it should just destroy the interface and remove the configuration from wpa_supplicant. But the ubus method call always returned Command failed: Method not found because the actual name of the method is "config_remove". Fixes: b5516603dd90 ("mac80211: more wifi reconf related fixes") Signed-off-by: Sven Eckelmann [bump PKG_RELEASE] Signed-off-by: David Bauer --- package/kernel/mac80211/Makefile | 2 +- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index bf88484b78..8448350acf 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 PKG_VERSION:=5.8-1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8/ PKG_HASH:=19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 11ea700b98..6ca12084cf 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -627,7 +627,7 @@ mac80211_setup_supplicant() { local spobj="$(ubus -S list | grep wpa_supplicant.${ifname})" [ "$enable" = 0 ] && { - ubus call wpa_supplicant.${phy} config_del "{\"iface\":\"$ifname\"}" + ubus call wpa_supplicant.${phy} config_remove "{\"iface\":\"$ifname\"}" ip link set dev "$ifname" down iw dev "$ifname" del return 0 From 256fa157a998b1f201742ccb3e2d4fb4eec97b82 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 28 Oct 2020 01:56:16 +0000 Subject: [PATCH 43/44] dnsmasq: install /etc/hotplug.d/ntp/25-dnsmasqsec world-readable /etc/hotplug.d/ntp/25-dnsmasqsec is being sourced by /sbin/hotplug-call running as ntpd user. For that to work the file needs to be readable by that user. Signed-off-by: Daniel Golle --- package/network/services/dnsmasq/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 57f6f0cef9..cbbbad7b87 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_UPSTREAM_VERSION:=2.82 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION))) -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq @@ -172,7 +172,7 @@ define Package/dnsmasq/install $(INSTALL_DIR) $(1)/etc/hotplug.d/neigh $(INSTALL_DIR) $(1)/etc/hotplug.d/ntp $(INSTALL_DIR) $(1)/etc/hotplug.d/tftp - $(INSTALL_CONF) ./files/dnsmasqsec.hotplug $(1)/etc/hotplug.d/ntp/25-dnsmasqsec + $(INSTALL_DATA) ./files/dnsmasqsec.hotplug $(1)/etc/hotplug.d/ntp/25-dnsmasqsec $(INSTALL_DIR) $(1)/usr/share/dnsmasq $(INSTALL_CONF) ./files/dhcpbogushostname.conf $(1)/usr/share/dnsmasq/ $(INSTALL_CONF) ./files/rfc6761.conf $(1)/usr/share/dnsmasq/ From 9f1927173ac658b081d8f9c7a27df143c60d4cac Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 28 Oct 2020 03:17:11 +0100 Subject: [PATCH 44/44] hostapd: wpas: add missing config symbols This adds missing config symbols for interworking as well as Hotspot 2.0 to the wpa_supplicant-full configuration. These symbols were added to the hostapd-full configuration prior to this commit. Without adding them to the wpa_supplicant configuration, building of wpad-full fails. Thanks to Rene for reaching out on IRC. Fixes: commit be9694aaa297 ("hostapd: add UCI support for Hotspot 2.0") Fixes: commit 838b412cb527 ("hostapd: add interworking support") Signed-off-by: David Bauer --- package/network/services/hostapd/Makefile | 2 +- .../network/services/hostapd/files/wpa_supplicant-full.config | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 4498fbde5c..bb20b7bcd9 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=13 +PKG_RELEASE:=14 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config b/package/network/services/hostapd/files/wpa_supplicant-full.config index 982f4d5534..4dd3e550a6 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-full.config +++ b/package/network/services/hostapd/files/wpa_supplicant-full.config @@ -490,10 +490,10 @@ CONFIG_WNM=y # This can be used to enable functionality to improve interworking with # external networks (GAS/ANQP to learn more about the networks and network # selection based on available credentials). -#CONFIG_INTERWORKING=y +CONFIG_INTERWORKING=y # Hotspot 2.0 -#CONFIG_HS20=y +CONFIG_HS20=y # Enable interface matching in wpa_supplicant #CONFIG_MATCH_IFACE=y