From 4527f59428954ca07bebbfd339de504e5babf8e5 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 11 Sep 2020 18:26:38 +0200 Subject: [PATCH 1/9] ramips: move ravpower-wd009-factory recipe to mt76x8.mk The recipe is only used for a single device, so put it in the subtarget file. Signed-off-by: Adrian Schmutzler --- target/linux/ramips/image/Makefile | 6 ------ target/linux/ramips/image/mt76x8.mk | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index bcd46d88a8..309ccbdf90 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -122,12 +122,6 @@ define Build/poray-header mv $@.new $@ endef -define Build/ravpower-wd009-factory - mkimage -A mips -T standalone -C none -a 0x80010000 -e 0x80010000 -n "OpenWrt Bootloader" -d $(UBOOT_PATH) $@.new - cat $@ >> $@.new - @mv $@.new $@ -endef - define Build/relocate-kernel rm -rf $@.relocate $(CP) ../../generic/image/relocate $@.relocate diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 4e30100c63..326dcd82bb 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -6,6 +6,14 @@ include ./common-tp-link.mk DEFAULT_SOC := mt7628an +define Build/ravpower-wd009-factory + mkimage -A mips -T standalone -C none -a 0x80010000 -e 0x80010000 \ + -n "OpenWrt Bootloader" -d $(UBOOT_PATH) $@.new + cat $@ >> $@.new + @mv $@.new $@ +endef + + define Device/alfa-network_awusfree1 IMAGE_SIZE := 7872k DEVICE_VENDOR := ALFA Network From 14024f6e0fe883ae413b87391121bb6e221c9312 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 11 Sep 2020 18:38:57 +0200 Subject: [PATCH 2/9] kernel: use proper upstream inclusion version for patch The patch is only included in kernel 5.5. Signed-off-by: Adrian Schmutzler --- ...716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch} | 0 ...716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename target/linux/generic/backport-4.19/{716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch => 716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch} (100%) rename target/linux/generic/backport-5.4/{716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch => 716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch} (100%) diff --git a/target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch b/target/linux/generic/backport-4.19/716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch similarity index 100% rename from target/linux/generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch rename to target/linux/generic/backport-4.19/716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch diff --git a/target/linux/generic/backport-5.4/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch b/target/linux/generic/backport-5.4/716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch similarity index 100% rename from target/linux/generic/backport-5.4/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch rename to target/linux/generic/backport-5.4/716-v5.5-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch From a4e5b8897a922802acf3587d401627fd6f2c0c27 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 11 Sep 2020 17:09:44 +0200 Subject: [PATCH 3/9] ramips: use proper name for RAVPower RP-WD03 The proper model name is RP-WD03 (i.e. with the RP- prefix). Adjust all names to that. Signed-off-by: Adrian Schmutzler --- ...0n_ravpower_wd03.dts => mt7620n_ravpower_rp-wd03.dts} | 8 ++++---- target/linux/ramips/image/mt7620.mk | 9 +++++---- .../ramips/mt7620/base-files/etc/board.d/02_network | 2 +- .../mt7620/base-files/etc/uci-defaults/04_led_migration | 3 +++ 4 files changed, 13 insertions(+), 9 deletions(-) rename target/linux/ramips/dts/{mt7620n_ravpower_wd03.dts => mt7620n_ravpower_rp-wd03.dts} (90%) diff --git a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts similarity index 90% rename from target/linux/ramips/dts/mt7620n_ravpower_wd03.dts rename to target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts index f67f186be1..31ecd4dd85 100644 --- a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts +++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts @@ -6,8 +6,8 @@ #include / { - compatible = "ravpower,wd03", "ralink,mt7620n-soc"; - model = "Ravpower WD03"; + compatible = "ravpower,rp-wd03", "ralink,mt7620n-soc"; + model = "RAVPower RP-WD03"; chosen { bootargs = "console=ttyS0,115200"; @@ -17,12 +17,12 @@ compatible = "gpio-leds"; green-wifi { - label = "wd03:green:wifi"; + label = "rp-wd03:green:wifi"; gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; }; blue-wifi { - label = "wd03:blue:wifi"; + label = "rp-wd03:blue:wifi"; gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 5b9dd16bce..a3a468324b 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -924,15 +924,16 @@ define Device/ralink_mt7620a-v22sg-evb endef TARGET_DEVICES += ralink_mt7620a-v22sg-evb -define Device/ravpower_wd03 +define Device/ravpower_rp-wd03 SOC := mt7620n IMAGE_SIZE := 7872k - DEVICE_VENDOR := Ravpower - DEVICE_MODEL := WD03 + DEVICE_VENDOR := RAVPower + DEVICE_MODEL := RP-WD03 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci + SUPPORTED_DEVICES += ravpower,wd03 DEFAULT := n endef -TARGET_DEVICES += ravpower_wd03 +TARGET_DEVICES += ravpower_rp-wd03 define Device/sanlinking_d240 SOC := mt7620a 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 3c77e6ad30..3fdd42bbff 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 @@ -60,7 +60,7 @@ ramips_setup_interfaces() planex,cs-qr10|\ planex,mzk-ex300np|\ planex,mzk-ex750np|\ - ravpower,wd03|\ + ravpower,rp-wd03|\ sercomm,na930|\ tplink,re200-v1|\ tplink,re210-v1|\ diff --git a/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration index 16ccd5cfef..0f2e08cf7f 100644 --- a/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration @@ -13,6 +13,9 @@ lenovo,newifi-y1s) netgear,wn3000rp-v3) migrate_leds "^wn3000rpv3:=wn3000rp-v3:" ;; +ravpower,rp-wd03) + migrate_leds "^wd03:=rp-wd03:" + ;; tplink,archer-c2-v1) migrate_leds "^c2-v1:=archer-c2-v1:" ;; From 07aa858a73e6e855fc62a37ae275518fa4db5e50 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 11 Sep 2020 17:40:46 +0200 Subject: [PATCH 4/9] ramips: fix partitions and boot for RAVPower RP-WD03 The RAVPower RP-WD03 is a battery powered router, with an Ethernet and USB port. Due due a limitation in the vendor supplied U-Boot bootloader, we cannot exceed a 1.5 MB kernel size, as is the case with recent builds (i.e. post v19.07). This breaks both factory and sysupgrade images. To address this, use the lzma loader (loader-okli) to work around this limitation. The improvements here also address the "misplaced" U-Boot environment partition, which is located between the kernel and rootfs in the stock image / implementation. This is addressed by making use of mtd-concat, maximizing space available in the booted image. This will make sysupgrade from earlier versions impossible. Changes are based on the recently supported HooToo HT-TM05, as the hardware is almost identical (except for RAM size) and is from the same vendor (SunValley). While at it, also change the SPI frequency accordingly. Installation: - Download the needed OpenWrt install files, place them in the root of a clean TFTP server running on your computer. Rename the files as, - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-kernel.bin => kernel - openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-rootfs.bin => rootfs - Plug the router into your computer via Ethernet - Set your computer to use 10.10.10.254 as its IP address - With your router shut down, hold down the power button until the first white LED lights up. - Push and hold the reset button and release the power button. Continue holding the reset button for 30 seconds or until it begins searching for files on your TFTP server, whichever comes first. - The router (10.10.10.128) will look for your computer at 10.10.10.254 and install the two files. Once it has finished installation, it will automatically reboot and start up OpenWrt. - Set your computer to use DHCP for its IP address Notes: - U-Boot environment can be modified, u-boot-env is preserved on initial install or sysupgrade - mtd-concat functionality is included, to leave a "hole" for u-boot-env, combining the OEM kernel and rootfs partitions Most of the changes in this commit are the work of Russell Morris (as credited below), I only wrapped them up and added compat-version. Thanks to @mpratt14 and @xabolcs for their help getting the lzma loader to work! Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris Signed-off-by: Adrian Schmutzler --- package/boot/uboot-envtools/Makefile | 2 +- package/boot/uboot-envtools/files/ramips | 3 +- .../ramips/dts/mt7620n_ravpower_rp-wd03.dts | 49 +++++++++++++++++-- target/linux/ramips/image/mt7620.mk | 18 ++++--- .../etc/uci-defaults/05_fix-compat-version | 10 ++++ 5 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 target/linux/ramips/mt7620/base-files/etc/uci-defaults/05_fix-compat-version diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 7a27a29596..7d464f8d08 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot PKG_VERSION:=2020.04 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index 6be2f6dcae..6ff04b26e8 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -33,7 +33,8 @@ xiaomi,miwifi-nano|\ zbtlink,zbt-wg2626) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ;; -hootoo,ht-tm05) +hootoo,ht-tm05|\ +ravpower,rp-wd03) idx="$(find_mtd_index u-boot-env)" [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000" diff --git a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts index 31ecd4dd85..407697a5e3 100644 --- a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts +++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts @@ -36,6 +36,24 @@ linux,code = ; }; }; + + virtual_flash { + compatible = "mtd-concat"; + + devices = <&firmware1 &firmware2 &firmware3>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "openwrt,okli"; + label = "firmware"; + reg = <0x0 0x0>; + }; + }; + }; }; &gpio2 { @@ -56,7 +74,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <50000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; @@ -70,7 +89,7 @@ }; partition@30000 { - label = "u-boot-env"; + label = "config"; reg = <0x30000 0x10000>; read-only; }; @@ -82,9 +101,29 @@ }; partition@50000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x50000 0x7b0000>; + label = "loader"; + reg = <0x50000 0x10000>; + read-only; + }; + + firmware2: partition@60000 { + label = "firmware2"; + reg = <0x60000 0x170000>; + }; + + partition@1d0000 { + label = "u-boot-env"; + reg = <0x1d0000 0x10000>; + }; + + firmware3: partition@1e0000 { + label = "firmware3"; + reg = <0x1e0000 0x20000>; + }; + + firmware1: partition@200000 { + label = "firmware1"; + reg = <0x200000 0x600000>; }; }; }; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index a3a468324b..d9725c9e69 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -488,11 +488,9 @@ define Device/hnet_c108 endef TARGET_DEVICES += hnet_c108 -define Device/hootoo_ht-tm05 +define Device/sunvalley_filehub_common SOC := mt7620n IMAGE_SIZE := 6144k - DEVICE_VENDOR := HooToo - DEVICE_MODEL := HT-TM05 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-i2c-ralink LOADER_TYPE := bin LOADER_FLASH_OFFS := 0x200000 @@ -505,6 +503,12 @@ define Device/hootoo_ht-tm05 IMAGE/kernel.bin := append-loader-okli $(1) | check-size 64k IMAGE/rootfs.bin := $$(sysupgrade_bin) | check-size endef + +define Device/hootoo_ht-tm05 + $(Device/sunvalley_filehub_common) + DEVICE_VENDOR := HooToo + DEVICE_MODEL := HT-TM05 +endef TARGET_DEVICES += hootoo_ht-tm05 define Device/iodata_wn-ac1167gr @@ -925,13 +929,13 @@ endef TARGET_DEVICES += ralink_mt7620a-v22sg-evb define Device/ravpower_rp-wd03 - SOC := mt7620n - IMAGE_SIZE := 7872k + $(Device/sunvalley_filehub_common) DEVICE_VENDOR := RAVPower DEVICE_MODEL := RP-WD03 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci SUPPORTED_DEVICES += ravpower,wd03 - DEFAULT := n + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (up to 19.07) due to kernel size restrictions. \ + Upgrade via sysupgrade mechanism is not possible, so new installation via TFTP is required. endef TARGET_DEVICES += ravpower_rp-wd03 diff --git a/target/linux/ramips/mt7620/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/ramips/mt7620/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..9f981dfb83 --- /dev/null +++ b/target/linux/ramips/mt7620/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,10 @@ +. /lib/functions.sh + +case "$(board_name)" in + ravpower,rp-wd03) + uci set system.@system[0].compat_version="2.0" + uci commit system + ;; +esac + +exit 0 From 77825f3cfe6f1f1088416ddddfd068af085e9888 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 11 Sep 2020 17:52:02 +0200 Subject: [PATCH 5/9] ramips: fix MAC address assignment for RAVPower RP-WD03 MAC assignment based on vendor firmware: 2.4 GHz *:b4 (factory 0x04) LAN/label *:b4 (factory 0x28) WAN *:b5 (factory 0x2e) The previously used location 0x4000 for ethernet is actually empty. Therefore, fix the ethernet MAC address and set it as label-mac-address. Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts index 407697a5e3..82b8a6b83f 100644 --- a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts +++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts @@ -9,6 +9,10 @@ compatible = "ravpower,rp-wd03", "ralink,mt7620n-soc"; model = "RAVPower RP-WD03"; + aliases { + label-mac-device = ðernet; + }; + chosen { bootargs = "console=ttyS0,115200"; }; @@ -138,7 +142,7 @@ }; ðernet { - mtd-mac-address = <&factory 0x4000>; + mtd-mac-address = <&factory 0x28>; }; &wmac { From 3fc78609615fc88133bc8fb9eff2c6f7b02f7684 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 11 Sep 2020 18:01:19 +0200 Subject: [PATCH 6/9] ramips: assign LEDs for RAVPower RP-WD03 According to the User Manual, there is a "Wi-Fi LED" with blue and green colors, doing the following by default: Flashing Blue: System loading Solid Blue: System loaded Flashing Green: Connecting to the Internet Solid Green: Connected to the Internet According to this vendor behavior, we keep refer to the LED as "wifi" but implement the according default behavior as in OEM firmware. Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts | 8 ++++++-- target/linux/ramips/mt7620/base-files/etc/board.d/01_leds | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts index 82b8a6b83f..0078103da3 100644 --- a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts +++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts @@ -11,6 +11,10 @@ aliases { label-mac-device = ðernet; + led-boot = &led_wifi_blue; + led-failsafe = &led_wifi_blue; + led-running = &led_wifi_blue; + led-upgrade = &led_wifi_blue; }; chosen { @@ -20,12 +24,12 @@ leds { compatible = "gpio-leds"; - green-wifi { + wifi_green { label = "rp-wd03:green:wifi"; gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; }; - blue-wifi { + led_wifi_blue: wifi_blue { label = "rp-wd03:blue:wifi"; gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 90d1596783..ec86ed4b3f 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -179,6 +179,9 @@ planex,mzk-ex750np|\ zbtlink,zbt-we826-e) set_wifi_led "$boardname:red:wifi" ;; +ravpower,rp-wd03) + ucidef_set_led_netdev "internet" "internet" "$boardname:green:wifi" "eth0" + ;; tplink,archer-c2-v1) ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch1" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch1" "0x01" From b56b499948c2189892f8063ccd515cd301629ca5 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 12 Sep 2020 01:20:47 +0200 Subject: [PATCH 7/9] ramips: fix baud rate for RAVPower RP-WD03 The baud rate for the RAVPower RP-WD03 is 57600, not 115200. Since this is the default from mt7620n.dtsi, the chosen node can simply be removed from the device DTS. Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03") Suggested-by: Russell Morris Signed-off-by: Adrian Schmutzler --- target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts index 0078103da3..a5469b655e 100644 --- a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts +++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts @@ -17,10 +17,6 @@ led-upgrade = &led_wifi_blue; }; - chosen { - bootargs = "console=ttyS0,115200"; - }; - leds { compatible = "gpio-leds"; From c4110a524e9a026cf570b6dadf325c037b7527d0 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 11 Sep 2020 18:09:33 +0200 Subject: [PATCH 8/9] ramips: create common DTSI for Sunvalley Filehub devices HooToo HT-TM05 and RAVPower RP-WD03 have almost identical hardware (except for RAM size) and are from the same vendor (SunValley). Create a common DTSI file for them. Suggested-by: Russell Morris Signed-off-by: Adrian Schmutzler --- .../ramips/dts/mt7620n_hootoo_ht-tm05.dts | 130 +---------------- .../ramips/dts/mt7620n_ravpower_rp-wd03.dts | 130 +---------------- .../ramips/dts/mt7620n_sunvalley_filehub.dtsi | 136 ++++++++++++++++++ 3 files changed, 138 insertions(+), 258 deletions(-) create mode 100644 target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi diff --git a/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts index d91986a68f..ce19ef79c2 100644 --- a/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts +++ b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts @@ -1,10 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "mt7620n.dtsi" - -#include -#include +#include "mt7620n_sunvalley_filehub.dtsi" / { compatible = "hootoo,ht-tm05", "ralink,mt7620n-soc"; @@ -15,7 +12,6 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; - label-mac-device = ðernet; }; leds { @@ -33,128 +29,4 @@ linux,default-trigger = "phy0tpt"; }; }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - virtual_flash { - compatible = "mtd-concat"; - - devices = <&firmware1 &firmware2 &firmware3>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - compatible = "openwrt,okli"; - label = "firmware"; - reg = <0x0 0x0>; - }; - }; - }; -}; - -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - -&i2c { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - m25p,fast-read; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "config"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "loader"; - reg = <0x50000 0x10000>; - read-only; - }; - - firmware2: partition@60000 { - label = "firmware2"; - reg = <0x60000 0x170000>; - }; - - partition@1d0000 { - label = "u-boot-env"; - reg = <0x1d0000 0x10000>; - }; - - firmware3: partition@1e0000 { - label = "firmware3"; - reg = <0x1e0000 0x20000>; - }; - - firmware1: partition@200000 { - label = "firmware1"; - reg = <0x200000 0x600000>; - }; - }; - }; -}; - -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -ðernet { - mtd-mac-address = <&factory 0x28>; -}; - -&wmac { - ralink,mtd-eeprom = <&factory 0x0>; -}; - -&state_default { - gpio { - groups = "wled", "ephy"; - function = "gpio"; - }; }; diff --git a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts index a5469b655e..305ac0bf20 100644 --- a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts +++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts @@ -1,16 +1,12 @@ /dts-v1/; -#include "mt7620n.dtsi" - -#include -#include +#include "mt7620n_sunvalley_filehub.dtsi" / { compatible = "ravpower,rp-wd03", "ralink,mt7620n-soc"; model = "RAVPower RP-WD03"; aliases { - label-mac-device = ðernet; led-boot = &led_wifi_blue; led-failsafe = &led_wifi_blue; led-running = &led_wifi_blue; @@ -30,128 +26,4 @@ gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; }; }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - virtual_flash { - compatible = "mtd-concat"; - - devices = <&firmware1 &firmware2 &firmware3>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - compatible = "openwrt,okli"; - label = "firmware"; - reg = <0x0 0x0>; - }; - }; - }; -}; - -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - -&i2c { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - m25p,fast-read; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "config"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - label = "loader"; - reg = <0x50000 0x10000>; - read-only; - }; - - firmware2: partition@60000 { - label = "firmware2"; - reg = <0x60000 0x170000>; - }; - - partition@1d0000 { - label = "u-boot-env"; - reg = <0x1d0000 0x10000>; - }; - - firmware3: partition@1e0000 { - label = "firmware3"; - reg = <0x1e0000 0x20000>; - }; - - firmware1: partition@200000 { - label = "firmware1"; - reg = <0x200000 0x600000>; - }; - }; - }; -}; - -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -ðernet { - mtd-mac-address = <&factory 0x28>; -}; - -&wmac { - ralink,mtd-eeprom = <&factory 0x0>; -}; - -&state_default { - gpio { - groups = "wled", "ephy"; - function = "gpio"; - }; }; diff --git a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi new file mode 100644 index 0000000000..d94379a41f --- /dev/null +++ b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi @@ -0,0 +1,136 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620n.dtsi" + +#include +#include + +/ { + aliases { + label-mac-device = ðernet; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + virtual_flash { + compatible = "mtd-concat"; + + devices = <&firmware1 &firmware2 &firmware3>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "openwrt,okli"; + label = "firmware"; + reg = <0x0 0x0>; + }; + }; + }; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&i2c { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "loader"; + reg = <0x50000 0x10000>; + read-only; + }; + + firmware2: partition@60000 { + label = "firmware2"; + reg = <0x60000 0x170000>; + }; + + partition@1d0000 { + label = "u-boot-env"; + reg = <0x1d0000 0x10000>; + }; + + firmware3: partition@1e0000 { + label = "firmware3"; + reg = <0x1e0000 0x20000>; + }; + + firmware1: partition@200000 { + label = "firmware1"; + reg = <0x200000 0x600000>; + }; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0x0>; +}; + +&state_default { + gpio { + groups = "wled", "ephy"; + function = "gpio"; + }; +}; From bee76f1bfa13a1dad8706090a5b6a1dd36f3d9c1 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 10 Sep 2020 15:17:13 -0400 Subject: [PATCH 9/9] kernel: bump 5.4 to 5.4.64 Remove upstreamed patches: generic-backport 701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch Manually merged: mediatek/patches-5.4 0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch All other modifications made by update_kernel.sh Build-tested: ipq806x, lantiq/xrx200, mvebu, x86/64 Run-tested: ipq806x (R7800), mvebu (mamba, rango), lantiq/xrx200 (Easybox 904 xDSL), x86/64 No dmesg regressions, everything functional Signed-off-by: John Audia [add community build/run tests to commit message] Signed-off-by: Adrian Schmutzler --- include/kernel-version.mk | 4 +- ...ce-quirks-for-Freeway-Airmouse-T3-an.patch | 4 +- .../bcm47xx/patches-5.4/159-cpu_fixes.patch | 6 +-- ...tified-Rx-for-GRO_NORMAL-in-napi_gro.patch | 51 ------------------- .../pending-5.4/630-packet_socket_type.patch | 8 +-- ...w_table-add-hardware-offload-support.patch | 6 +-- ...ta-Assign-OF-node-to-the-SCSI-device.patch | 4 +- .../pending-5.4/834-ledtrig-libata.patch | 10 ++-- ...dts-add-wmac-support-for-mt7622-rfb1.patch | 2 +- ...agate-resolved-link-config-via-mac_l.patch | 10 ++-- ...se-resolved-link-config-in-mac_link_.patch | 6 +-- ...xtend-device-data-ready-for-adding-a.patch | 2 +- ...ek-Split-PCIe-node-for-MT2712-MT7622.patch | 4 +- ..._eth_soc-add-support-for-coherent-DM.patch | 2 +- ...ediatek-add-support-for-coherent-DMA.patch | 10 ++-- .../oxnas/patches-5.4/999-libata-hacks.patch | 8 +-- ...ethernet-mediatek-support-net-labels.patch | 4 +- 17 files changed, 45 insertions(+), 96 deletions(-) delete mode 100644 target/linux/generic/backport-5.4/701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 434119a871..02f7dc9812 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.19 = .138 -LINUX_VERSION-5.4 = .63 +LINUX_VERSION-5.4 = .64 LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02 -LINUX_KERNEL_HASH-5.4.63 = e0260dae0da01163b1a3289ad9c5cc6ee4226720e199e8a1d982e24efda7ffc0 +LINUX_KERNEL_HASH-5.4.64 = b9d3c2938466f388a70fd190fd6691baa8b757393b267e9f7b06c4730d85d5ef remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index 6a288e06a8..799666ec9a 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1238,6 +1241,9 @@ +@@ -1241,6 +1244,9 @@ #define USB_VENDOR_ID_XAT 0x2505 #define USB_DEVICE_ID_XAT_CSR 0x0220 @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL }, -@@ -179,6 +180,7 @@ static const struct hid_device_id hid_qu +@@ -182,6 +183,7 @@ static const struct hid_device_id hid_qu { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT }, diff --git a/target/linux/bcm47xx/patches-5.4/159-cpu_fixes.patch b/target/linux/bcm47xx/patches-5.4/159-cpu_fixes.patch index 1c98d6b4e4..59d7834de3 100644 --- a/target/linux/bcm47xx/patches-5.4/159-cpu_fixes.patch +++ b/target/linux/bcm47xx/patches-5.4/159-cpu_fixes.patch @@ -388,7 +388,7 @@ if (dc_lsize == 0) r4k_blast_dcache = (void *)cache_noop; else if (dc_lsize == 16) -@@ -1775,6 +1787,17 @@ static void coherency_setup(void) +@@ -1779,6 +1791,17 @@ static void coherency_setup(void) * silly idea of putting something else there ... */ switch (current_cpu_type()) { @@ -406,7 +406,7 @@ case CPU_R4000PC: case CPU_R4000SC: case CPU_R4000MC: -@@ -1821,6 +1844,15 @@ void r4k_cache_init(void) +@@ -1825,6 +1848,15 @@ void r4k_cache_init(void) extern void build_copy_page(void); struct cpuinfo_mips *c = ¤t_cpu_data; @@ -422,7 +422,7 @@ probe_pcache(); probe_vcache(); setup_scache(); -@@ -1897,7 +1929,15 @@ void r4k_cache_init(void) +@@ -1901,7 +1933,15 @@ void r4k_cache_init(void) */ local_r4k___flush_cache_all(NULL); diff --git a/target/linux/generic/backport-5.4/701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch b/target/linux/generic/backport-5.4/701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch deleted file mode 100644 index 7be25f5338..0000000000 --- a/target/linux/generic/backport-5.4/701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Alexander Lobakin -Date: Mon, 14 Oct 2019 11:00:33 +0300 -Subject: [PATCH] net: core: use listified Rx for GRO_NORMAL in - napi_gro_receive() - -Commit 323ebb61e32b4 ("net: use listified RX for handling GRO_NORMAL -skbs") made use of listified skb processing for the users of -napi_gro_frags(). -The same technique can be used in a way more common napi_gro_receive() -to speed up non-merged (GRO_NORMAL) skbs for a wide range of drivers -including gro_cells and mac80211 users. -This slightly changes the return value in cases where skb is being -dropped by the core stack, but it seems to have no impact on related -drivers' functionality. -gro_normal_batch is left untouched as it's very individual for every -single system configuration and might be tuned in manual order to -achieve an optimal performance. - -Signed-off-by: Alexander Lobakin -Acked-by: Edward Cree -Signed-off-by: David S. Miller ---- - ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -5601,12 +5601,13 @@ static void napi_skb_free_stolen_head(st - kmem_cache_free(skbuff_head_cache, skb); - } - --static gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb) -+static gro_result_t napi_skb_finish(struct napi_struct *napi, -+ struct sk_buff *skb, -+ gro_result_t ret) - { - switch (ret) { - case GRO_NORMAL: -- if (netif_receive_skb_internal(skb)) -- ret = GRO_DROP; -+ gro_normal_one(napi, skb); - break; - - case GRO_DROP: -@@ -5638,7 +5639,7 @@ gro_result_t napi_gro_receive(struct nap - - skb_gro_reset_offset(skb); - -- ret = napi_skb_finish(dev_gro_receive(napi, skb), skb); -+ ret = napi_skb_finish(napi, skb, dev_gro_receive(napi, skb)); - trace_napi_gro_receive_exit(ret); - - return ret; diff --git a/target/linux/generic/pending-5.4/630-packet_socket_type.patch b/target/linux/generic/pending-5.4/630-packet_socket_type.patch index f082aa1454..a137fb5a6d 100644 --- a/target/linux/generic/pending-5.4/630-packet_socket_type.patch +++ b/target/linux/generic/pending-5.4/630-packet_socket_type.patch @@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2184,12 +2186,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2185,12 +2187,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3284,6 +3286,7 @@ static int packet_create(struct net *net +@@ -3289,6 +3291,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3917,6 +3920,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3922,6 +3925,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3973,6 +3986,13 @@ static int packet_getsockopt(struct sock +@@ -3978,6 +3991,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; diff --git a/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch b/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch index a005b25c7a..3260e645f3 100644 --- a/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch +++ b/target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch @@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso +MODULE_ALIAS("nf-flow-table-hw"); --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -5745,6 +5745,13 @@ static int nf_tables_flowtable_parse_hoo +@@ -5741,6 +5741,13 @@ static int nf_tables_flowtable_parse_hoo if (err < 0) return err; @@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL); if (!ops) return -ENOMEM; -@@ -5875,10 +5882,19 @@ static int nf_tables_newflowtable(struct +@@ -5871,10 +5878,19 @@ static int nf_tables_newflowtable(struct } flowtable->data.type = type; @@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK], flowtable); if (err < 0) -@@ -6004,7 +6020,8 @@ static int nf_tables_fill_flowtable_info +@@ -6000,7 +6016,8 @@ static int nf_tables_fill_flowtable_info nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) || nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) || nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle), diff --git a/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch b/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch index 9e72313ec9..bec9363fa1 100644 --- a/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch +++ b/target/linux/generic/pending-5.4/820-libata-Assign-OF-node-to-the-SCSI-device.patch @@ -41,7 +41,7 @@ ChangeLog v1->v2: #include "libata.h" #include "libata-transport.h" -@@ -4573,6 +4574,34 @@ int ata_scsi_add_hosts(struct ata_host * +@@ -4579,6 +4580,34 @@ int ata_scsi_add_hosts(struct ata_host * return rc; } @@ -76,7 +76,7 @@ ChangeLog v1->v2: void ata_scsi_scan_host(struct ata_port *ap, int sync) { int tries = 5; -@@ -4598,6 +4627,7 @@ void ata_scsi_scan_host(struct ata_port +@@ -4604,6 +4633,7 @@ void ata_scsi_scan_host(struct ata_port NULL); if (!IS_ERR(sdev)) { dev->sdev = sdev; diff --git a/target/linux/generic/pending-5.4/834-ledtrig-libata.patch b/target/linux/generic/pending-5.4/834-ledtrig-libata.patch index 783f8ea847..e9fe405142 100644 --- a/target/linux/generic/pending-5.4/834-ledtrig-libata.patch +++ b/target/linux/generic/pending-5.4/834-ledtrig-libata.patch @@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle /** * ata_build_rw_tf - Build ATA taskfile for given read/write request * @tf: Target ATA taskfile -@@ -5115,6 +5128,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5114,6 +5127,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (tag < 0) return NULL; } @@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle qc = __ata_qc_from_tag(ap, tag); qc->tag = qc->hw_tag = tag; -@@ -6049,6 +6065,9 @@ struct ata_port *ata_port_alloc(struct a +@@ -6048,6 +6064,9 @@ struct ata_port *ata_port_alloc(struct a ap->stats.unhandled_irq = 1; ap->stats.idle_irq = 1; #endif @@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle ata_sff_port_init(ap); return ap; -@@ -6084,6 +6103,12 @@ static void ata_host_release(struct kref +@@ -6083,6 +6102,12 @@ static void ata_host_release(struct kref kfree(ap->pmp_link); kfree(ap->slave_link); @@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle kfree(ap); host->ports[i] = NULL; } -@@ -6547,7 +6572,23 @@ int ata_host_register(struct ata_host *h +@@ -6546,7 +6571,23 @@ int ata_host_register(struct ata_host *h host->ports[i]->print_id = atomic_inc_return(&ata_print_id); host->ports[i]->local_port_no = i + 1; } @@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle /* * Define if arch has non-standard setup. This is a _PCI_ standard -@@ -879,6 +882,12 @@ struct ata_port { +@@ -880,6 +883,12 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif diff --git a/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch b/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch index b545ea809d..bf16062cb7 100644 --- a/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch +++ b/target/linux/mediatek/patches-5.4/0310-dts-add-wmac-support-for-mt7622-rfb1.patch @@ -1,6 +1,6 @@ --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -712,6 +712,17 @@ +@@ -714,6 +714,17 @@ status = "disabled"; }; diff --git a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch index 34a15334d6..a9b2b603bb 100644 --- a/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch +++ b/target/linux/mediatek/patches-5.4/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch @@ -199,10 +199,7 @@ Signed-off-by: David S. Miller + * @duplex: link duplex + * @tx_pause: link transmit pause enablement status + * @rx_pause: link receive pause enablement status - * -- * If @mode is not an in-band negotiation mode (as defined by -- * phylink_autoneg_inband()), allow the link to come up. If @phy -- * is non-%NULL, configure Energy Efficient Ethernet by calling ++ * + * Configure the MAC for an established link. + * + * @speed, @duplex, @tx_pause and @rx_pause indicate the finalised link @@ -214,7 +211,10 @@ Signed-off-by: David S. Miller + * Note that when 802.3z in-band negotiation is in use, it is possible + * that the user wishes to override the pause settings, and this should + * be allowed when considering the implementation of this method. -+ * + * +- * If @mode is not an in-band negotiation mode (as defined by +- * phylink_autoneg_inband()), allow the link to come up. If @phy +- * is non-%NULL, configure Energy Efficient Ethernet by calling + * If in-band negotiation mode is disabled, allow the link to come up. If + * @phy is non-%NULL, configure Energy Efficient Ethernet by calling * phy_init_eee() and perform appropriate MAC configuration for EEE. diff --git a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch index 30ce641486..ae153847dc 100644 --- a/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch +++ b/target/linux/mediatek/patches-5.4/0602-net-dsa-mt7530-use-resolved-link-config-in-mac_link_.patch @@ -102,8 +102,7 @@ Signed-off-by: David S. Miller { struct mt7530_priv *priv = ds->priv; + u32 mcr; - -- mt7530_port_set_status(priv, port, 1); ++ + mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; + + switch (speed) { @@ -125,7 +124,8 @@ Signed-off-by: David S. Miller + if (rx_pause) + mcr |= PMCR_RX_FC_EN; + } -+ + +- mt7530_port_set_status(priv, port, 1); + mt7530_set(priv, MT7530_PMCR_P(port), mcr); } diff --git a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch index 5ae3376290..b86c5b8283 100644 --- a/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch +++ b/target/linux/mediatek/patches-5.4/0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch @@ -257,7 +257,7 @@ Signed-off-by: Sean Wang phylink_set(mask, 100baseT_Full); - - if (state->interface != PHY_INTERFACE_MODE_MII) { -- phylink_set(mask, 1000baseT_Half); +- /* This switch only supports 1G full-duplex. */ - phylink_set(mask, 1000baseT_Full); - if (port == 5) - phylink_set(mask, 1000baseX_Full); diff --git a/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch b/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch index bc0f7b1a6c..3283746e30 100644 --- a/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch +++ b/target/linux/mediatek/patches-5.4/0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch @@ -281,7 +281,7 @@ Signed-off-by: chuanjia.liu &pio { --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -790,45 +790,41 @@ +@@ -792,45 +792,41 @@ #reset-cells = <1>; }; @@ -344,7 +344,7 @@ Signed-off-by: chuanjia.liu interrupt-map-mask = <0 0 0 7>; interrupt-map = <0 0 0 1 &pcie_intc0 0>, <0 0 0 2 &pcie_intc0 1>, -@@ -840,15 +836,39 @@ +@@ -842,15 +838,39 @@ #interrupt-cells = <1>; }; }; diff --git a/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch b/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch index 50b5e59697..cc104927d8 100644 --- a/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch +++ b/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau interface-type = "ace"; reg = <0x5000 0x1000>; }; -@@ -965,6 +965,8 @@ +@@ -967,6 +967,8 @@ power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>; mediatek,ethsys = <ðsys>; mediatek,sgmiisys = <&sgmiisys>; diff --git a/target/linux/mediatek/patches-5.4/1012-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-5.4/1012-pci-pcie-mediatek-add-support-for-coherent-DMA.patch index 5f55fe0c03..c24126284b 100644 --- a/target/linux/mediatek/patches-5.4/1012-pci-pcie-mediatek-add-support-for-coherent-DMA.patch +++ b/target/linux/mediatek/patches-5.4/1012-pci-pcie-mediatek-add-support-for-coherent-DMA.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi -@@ -801,6 +801,8 @@ +@@ -803,6 +803,8 @@ reg = <0 0x1a143000 0 0x1000>; reg-names = "port0"; mediatek,pcie-cfg = <&pciecfg>; @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau #address-cells = <3>; #size-cells = <2>; interrupts = ; -@@ -818,6 +820,7 @@ +@@ -820,6 +822,7 @@ bus-range = <0x00 0xff>; ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>; status = "disabled"; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau slot0: pcie@0,0 { reg = <0x0000 0 0 0 0>; -@@ -844,6 +847,8 @@ +@@ -846,6 +849,8 @@ reg = <0 0x1a145000 0 0x1000>; reg-names = "port1"; mediatek,pcie-cfg = <&pciecfg>; @@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau #address-cells = <3>; #size-cells = <2>; interrupts = ; -@@ -862,6 +867,7 @@ +@@ -864,6 +869,7 @@ bus-range = <0x00 0xff>; ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>; status = "disabled"; @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau slot1: pcie@1,0 { reg = <0x0800 0 0 0 0>; -@@ -921,6 +927,11 @@ +@@ -923,6 +929,11 @@ }; }; diff --git a/target/linux/oxnas/patches-5.4/999-libata-hacks.patch b/target/linux/oxnas/patches-5.4/999-libata-hacks.patch index f846c3fee3..28d6f8b570 100644 --- a/target/linux/oxnas/patches-5.4/999-libata-hacks.patch +++ b/target/linux/oxnas/patches-5.4/999-libata-hacks.patch @@ -15,7 +15,7 @@ /* initialize internal qc */ qc = __ata_qc_from_tag(ap, ATA_TAG_INTERNAL); -@@ -5122,6 +5130,9 @@ struct ata_queued_cmd *ata_qc_new_init(s +@@ -5121,6 +5129,9 @@ struct ata_queued_cmd *ata_qc_new_init(s if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) return NULL; @@ -25,7 +25,7 @@ /* libsas case */ if (ap->flags & ATA_FLAG_SAS_HOST) { tag = ata_sas_allocate_tag(ap); -@@ -5167,6 +5178,8 @@ void ata_qc_free(struct ata_queued_cmd * +@@ -5166,6 +5177,8 @@ void ata_qc_free(struct ata_queued_cmd * qc->tag = ATA_TAG_POISON; if (ap->flags & ATA_FLAG_SAS_HOST) ata_sas_free_tag(tag, ap); @@ -36,7 +36,7 @@ --- a/include/linux/libata.h +++ b/include/linux/libata.h -@@ -908,6 +908,8 @@ struct ata_port_operations { +@@ -909,6 +909,8 @@ struct ata_port_operations { void (*qc_prep)(struct ata_queued_cmd *qc); unsigned int (*qc_issue)(struct ata_queued_cmd *qc); bool (*qc_fill_rtf)(struct ata_queued_cmd *qc); @@ -45,7 +45,7 @@ /* * Configuration and exception handling -@@ -998,6 +1000,9 @@ struct ata_port_operations { +@@ -999,6 +1001,9 @@ struct ata_port_operations { void (*phy_reset)(struct ata_port *ap); void (*eng_timeout)(struct ata_port *ap); diff --git a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch index d7c0df6046..00e48fe662 100644 --- a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch +++ b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: RenĂ© van Dorst --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2860,6 +2860,7 @@ static const struct net_device_ops mtk_n +@@ -2863,6 +2863,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,7 +22,7 @@ Signed-off-by: RenĂ© van Dorst const __be32 *_id = of_get_property(np, "reg", NULL); struct phylink *phylink; int phy_mode, id, err; -@@ -2952,6 +2953,9 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -2955,6 +2956,9 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;