From 546822775cd988360964687c0cb430d67bd5c617 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 18:18:40 +0200 Subject: [PATCH 01/80] CI: kernel: Trigger workflow for more directories Trigger the kernel build workflow also for more directories. Signed-off-by: Hauke Mehrtens --- .github/workflows/kernel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index f7e5d542b4..bffa1f04b8 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -3,8 +3,10 @@ name: Build Kernel on: pull_request: paths: + - '.github/workflows/kernel.yml' - 'include/kernel-*' - 'package/kernel/**' + - 'target/linux/generic/**' jobs: determine_targets: name: Set targets From 7b4daf00766620faac8212b46259064ca6e2c716 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 18:21:44 +0200 Subject: [PATCH 02/80] CI: kernel: Use downloads.cdn.openwrt.org Use downloads.cdn.openwrt.org to download the toolchain. This should reduce the load on the servers. Signed-off-by: Hauke Mehrtens --- .github/workflows/kernel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index bffa1f04b8..108edf2460 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -78,7 +78,7 @@ jobs: - name: Parse toolchain file working-directory: openwrt run: | - TOOLCHAIN_FILE=$(curl "https://downloads.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums" \ + TOOLCHAIN_FILE=$(curl "https://downloads.cdn.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums" \ | sed -n -e 's/.*\(openwrt-toolchain.*\).tar.xz/\1/p') echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV" @@ -87,7 +87,7 @@ jobs: shell: su buildbot -c "sh -e {0}" working-directory: openwrt run: | - wget -O - https://downloads.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/${TOOLCHAIN_FILE}.tar.xz \ + wget -O - https://downloads.cdn.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/${TOOLCHAIN_FILE}.tar.xz \ | tar --xz -xf - - name: Configure external toolchain From 43afaf6149129a72a8f3e5d3d0d545e54ac81b3a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 18:22:52 +0200 Subject: [PATCH 03/80] CI: kernel: Show used OpenWrt configuration Show the configuration used to build OpenWrt before starting the build. This should make it easier for people to reproduce problems when it fails. Signed-off-by: Hauke Mehrtens --- .github/workflows/kernel.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index 108edf2460..37fba2f4ec 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -100,6 +100,11 @@ jobs: make defconfig + - name: Show configuration + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: ./scripts/diffconfig.sh + - name: Build tools shell: su buildbot -c "sh -e {0}" working-directory: openwrt From b120e78917099d46a25cc521998b917fdf08e388 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 8 Aug 2022 20:26:18 +0200 Subject: [PATCH 04/80] CI: kernel: Checkout feeds from github Instead of cloning the feeds from the default location at git.openwrt.org use the github action to clone them directly from github. We saw some error messages when cloning from git.openwrt.org, probably related to some rate limiting applied. Cloning from github within a github action should work more stable. The "./scripts/feeds update -a" script will use the already checked out feed repositories and not clone them again from git.openwrt.org, but it will also not change the branch name. Signed-off-by: Hauke Mehrtens --- .github/workflows/kernel.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index 37fba2f4ec..addedb91fe 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -57,6 +57,30 @@ jobs: with: path: openwrt + - name: Checkout packages feed + uses: actions/checkout@v2 + with: + repository: openwrt/packages + path: openwrt/feeds/packages + + - name: Checkout luci feed + uses: actions/checkout@v2 + with: + repository: openwrt/luci + path: openwrt/feeds/luci + + - name: Checkout routing feed + uses: actions/checkout@v2 + with: + repository: openwrt/routing + path: openwrt/feeds/routing + + - name: Checkout telephony feed + uses: actions/checkout@v2 + with: + repository: openwrt/telephony + path: openwrt/feeds/telephony + - name: Fix permission run: | chown -R buildbot:buildbot openwrt From fed325f4633cb302a5f43c42285e8ab0fd144262 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 8 Aug 2022 22:57:59 +0200 Subject: [PATCH 05/80] CI: kernel: Build all kernel modules Activate building all kernel modules. This builds all kernel modules from the core packages and the feeds. Signed-off-by: Hauke Mehrtens --- .github/workflows/kernel.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index addedb91fe..05bc6ed8ee 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -118,8 +118,11 @@ jobs: shell: su buildbot -c "sh -e {0}" working-directory: openwrt run: | + echo CONFIG_ALL_KMODS=y >> .config + ./scripts/ext-toolchain.sh \ --toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \ + --overwrite-config \ --config ${{ env.TARGET }}/${{ env.SUBTARGET }} make defconfig From 42db0ee13b86126b469c04e3d637c01899cc3a76 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 6 Aug 2022 00:03:13 +0200 Subject: [PATCH 06/80] kernel: kmod-crypto-authenc: Add authencesn.ko The kernel configuration option CONFIG_CRYPTO_AUTHENC builds authenc.ko and authencesn.ko, pack both kernel modules. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/crypto.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index ed4e51079e..72ed6ca2fd 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -69,8 +69,10 @@ define KernelPackage/crypto-authenc TITLE:=Combined mode wrapper for IPsec DEPENDS:=+kmod-crypto-manager +kmod-crypto-null KCONFIG:=CONFIG_CRYPTO_AUTHENC - FILES:=$(LINUX_DIR)/crypto/authenc.ko - AUTOLOAD:=$(call AutoLoad,09,authenc) + FILES:= \ + $(LINUX_DIR)/crypto/authenc.ko \ + $(LINUX_DIR)/crypto/authencesn.ko + AUTOLOAD:=$(call AutoLoad,09,authenc authencesn) $(call AddDepends/crypto) endef From 1e337a84de3f5a615d8bc2cdb3614df61cf179a1 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 6 Aug 2022 00:04:43 +0200 Subject: [PATCH 07/80] kernel: kmod-switch-ar8xxx: Add kmod-mdio-devres dependency The ar8xxx.ko kernel module uses the devm_mdiobus_alloc() function provided by kmod-mdio-devres, add the missing dependency. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index bb4e1ab5cd..7e21c0118c 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -434,7 +434,7 @@ $(eval $(call KernelPackage,switch-rtl8367b)) define KernelPackage/switch-ar8xxx SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Atheros AR8216/8327 switch support - DEPENDS:=+kmod-swconfig + DEPENDS:=+kmod-swconfig +kmod-mdio-devres KCONFIG:=CONFIG_AR8216_PHY FILES:=$(LINUX_DIR)/drivers/net/phy/ar8xxx.ko AUTOLOAD:=$(call AutoLoad,43,ar8xxx,1) From ba8ab391a0cb83f7d546244bdee50253420d7a0b Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 6 Aug 2022 00:13:54 +0200 Subject: [PATCH 08/80] kernel: kmod-usb-dwc2-pci: Add new package Add dwc2_pci kernel module into own kernel package. The dwc2_pci.ko kernel module was always build when kmod-usb-dwc2 was selected, but it was not packaged. Add the missing kmod-usb-phy-nop dependency to the kmod-usb-dwc2-pci package too. The CONFIG_USB_DWC2_PLATFORM option is already gone for some time. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/usb.mk | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 84097ac34a..854d9b2450 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -431,10 +431,7 @@ define KernelPackage/usb-dwc2 TITLE:=DWC2 USB controller driver DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget +kmod-usb-roles KCONFIG:= \ - CONFIG_USB_PCI=y \ CONFIG_USB_DWC2 \ - CONFIG_USB_DWC2_PCI \ - CONFIG_USB_DWC2_PLATFORM \ CONFIG_USB_DWC2_DEBUG=n \ CONFIG_USB_DWC2_VERBOSE=n \ CONFIG_USB_DWC2_TRACK_MISSED_SOFS=n \ @@ -453,6 +450,26 @@ endef $(eval $(call KernelPackage,usb-dwc2)) +define KernelPackage/usb-dwc2-pci + TITLE:=DWC2 USB controller driver (PCI) + DEPENDS:=@PCI_SUPPORT +kmod-usb-dwc2 +kmod-usb-phy-nop + KCONFIG:= \ + CONFIG_USB_PCI=y \ + CONFIG_USB_DWC2_PCI + FILES:= \ + $(LINUX_DIR)/drivers/usb/dwc2/dwc2_pci.ko + AUTOLOAD:=$(call AutoLoad,54,dwc2_pci,1) + $(call AddDepends/usb) +endef + +define KernelPackage/usb-dwc2-pci/description + The Designware USB2.0 PCI interface module for controllers + connected to a PCI bus. +endef + +$(eval $(call KernelPackage,usb-dwc2-pci)) + + define KernelPackage/usb-dwc3 TITLE:=DWC3 USB controller driver KCONFIG:= \ From d29353d30e1ed5eb0fb0667934dc285faea8d2a3 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 6 Aug 2022 00:45:04 +0200 Subject: [PATCH 09/80] kernel: kmod-nls-cp932: Add nls_euc-jp.ko too The CONFIG_NLS_CODEPAGE_932 Config option builds the nls_cp932.ko and the nls_euc-jp.ko kernel module, package both of them. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/nls.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/nls.mk b/package/kernel/linux/modules/nls.mk index 05fce27bbc..7450ed1ce5 100644 --- a/package/kernel/linux/modules/nls.mk +++ b/package/kernel/linux/modules/nls.mk @@ -135,8 +135,10 @@ define KernelPackage/nls-cp932 SUBMENU:=Native Language Support TITLE:=Codepage 932 (Japanese) KCONFIG:=CONFIG_NLS_CODEPAGE_932 - FILES:=$(LINUX_DIR)/fs/nls/nls_cp932.ko - AUTOLOAD:=$(call AutoLoad,25,nls_cp932) + FILES:= \ + $(LINUX_DIR)/fs/nls/nls_cp932.ko \ + $(LINUX_DIR)/fs/nls/nls_euc-jp.ko + AUTOLOAD:=$(call AutoLoad,25,nls_cp932 nls_euc-jp) $(call AddDepends/nls) endef From 724ef7b484453b45ad03a108033684fd6c8312e2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 6 Aug 2022 00:52:50 +0200 Subject: [PATCH 10/80] kernel: kmod-fs-fscache: Add cachefiles.ko The CONFIG_CACHEFILES configuration option makes the kernel build cachefiles.ko, also package it. Build CONFIG_CACHEFILES as module and do not try to build it into the kernel. This did not work because it depended on CONFIG_FSCACHE which was already build as module. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/fs.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 6732c7c73a..0e4c0c091a 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -260,16 +260,18 @@ define KernelPackage/fs-fscache TITLE:=General filesystem local cache manager DEPENDS:=+kmod-fs-netfs KCONFIG:=\ - CONFIG_FSCACHE=m \ + CONFIG_FSCACHE \ CONFIG_FSCACHE_STATS=y \ CONFIG_FSCACHE_HISTOGRAM=n \ CONFIG_FSCACHE_DEBUG=n \ CONFIG_FSCACHE_OBJECT_LIST=n \ - CONFIG_CACHEFILES=y \ + CONFIG_CACHEFILES \ CONFIG_CACHEFILES_DEBUG=n \ CONFIG_CACHEFILES_HISTOGRAM=n - FILES:=$(LINUX_DIR)/fs/fscache/fscache.ko - AUTOLOAD:=$(call AutoLoad,29,fscache) + FILES:= \ + $(LINUX_DIR)/fs/fscache/fscache.ko \ + $(LINUX_DIR)/fs/cachefiles/cachefiles.ko + AUTOLOAD:=$(call AutoLoad,29,fscache cachefiles) endef $(eval $(call KernelPackage,fs-fscache)) From 16caa19c8c72216f0041131e6300290463562c44 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 12:35:49 +0200 Subject: [PATCH 11/80] kernel: kmod-mdio-devres: Add kmod-of-mdio dependency for malta The malta target does not compile CONFIG_OF_MDIO into the kernel. On malta the kmod-mdio-devres package depends on kmod-of-mdio. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 7e21c0118c..50a72f8dd3 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -141,7 +141,7 @@ $(eval $(call KernelPackage,mii)) define KernelPackage/mdio-devres SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Supports MDIO device registration - DEPENDS:=+kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio + DEPENDS:=+kmod-libphy +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_malta||TARGET_tegra):kmod-of-mdio KCONFIG:=CONFIG_MDIO_DEVRES HIDDEN:=1 FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko From 0e3bafc601f9103f379ea9c3ea89f000a29b074b Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 13:41:17 +0200 Subject: [PATCH 12/80] kernel: Activate CONFIG_INPUT_MISC on all targets CONFIG_INPUT_MISC does not do any changes to the kernel image, it only shows some extra kernel configuration options. Activate it on all targets. Signed-off-by: Hauke Mehrtens --- target/linux/layerscape/armv7/config-5.10 | 1 - target/linux/malta/config-5.10 | 1 - target/linux/malta/config-5.15 | 1 - target/linux/mediatek/mt7623/config-5.15 | 1 - target/linux/rockchip/armv8/config-5.10 | 1 - target/linux/rockchip/armv8/config-5.15 | 1 - target/linux/zynq/config-5.10 | 1 - 7 files changed, 7 deletions(-) diff --git a/target/linux/layerscape/armv7/config-5.10 b/target/linux/layerscape/armv7/config-5.10 index 80d0cbfa62..28323b876c 100644 --- a/target/linux/layerscape/armv7/config-5.10 +++ b/target/linux/layerscape/armv7/config-5.10 @@ -306,7 +306,6 @@ CONFIG_IMX_SDMA=y # CONFIG_IMX_WEIM is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_INPUT=y -# CONFIG_INPUT_MISC is not set # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set diff --git a/target/linux/malta/config-5.10 b/target/linux/malta/config-5.10 index 23939155b0..e4f56229a9 100644 --- a/target/linux/malta/config-5.10 +++ b/target/linux/malta/config-5.10 @@ -109,7 +109,6 @@ CONFIG_I8253=y CONFIG_I8253_LOCK=y CONFIG_I8259=y CONFIG_INPUT=y -# CONFIG_INPUT_MISC is not set CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 diff --git a/target/linux/malta/config-5.15 b/target/linux/malta/config-5.15 index 3fe3a77426..f1ef5e8dfb 100644 --- a/target/linux/malta/config-5.15 +++ b/target/linux/malta/config-5.15 @@ -105,7 +105,6 @@ CONFIG_I8253=y CONFIG_I8253_LOCK=y CONFIG_I8259=y CONFIG_INPUT=y -# CONFIG_INPUT_MISC is not set CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 diff --git a/target/linux/mediatek/mt7623/config-5.15 b/target/linux/mediatek/mt7623/config-5.15 index 0436d41c9b..2ce4eae628 100644 --- a/target/linux/mediatek/mt7623/config-5.15 +++ b/target/linux/mediatek/mt7623/config-5.15 @@ -271,7 +271,6 @@ CONFIG_INITRAMFS_SOURCE="" CONFIG_INPUT=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_KEYBOARD=y -# CONFIG_INPUT_MISC is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_IOMMU_API=y # CONFIG_IOMMU_DEBUGFS is not set diff --git a/target/linux/rockchip/armv8/config-5.10 b/target/linux/rockchip/armv8/config-5.10 index d1e5d73850..43be53a090 100644 --- a/target/linux/rockchip/armv8/config-5.10 +++ b/target/linux/rockchip/armv8/config-5.10 @@ -282,7 +282,6 @@ CONFIG_INPUT_FF_MEMLESS=y CONFIG_INPUT_KEYBOARD=y CONFIG_INPUT_LEDS=y CONFIG_INPUT_MATRIXKMAP=y -# CONFIG_INPUT_MISC is not set # CONFIG_INPUT_RK805_PWRKEY is not set CONFIG_IOMMU_API=y # CONFIG_IOMMU_DEBUGFS is not set diff --git a/target/linux/rockchip/armv8/config-5.15 b/target/linux/rockchip/armv8/config-5.15 index a165e32af4..8d04790d41 100644 --- a/target/linux/rockchip/armv8/config-5.15 +++ b/target/linux/rockchip/armv8/config-5.15 @@ -277,7 +277,6 @@ CONFIG_INPUT_FF_MEMLESS=y CONFIG_INPUT_KEYBOARD=y CONFIG_INPUT_LEDS=y CONFIG_INPUT_MATRIXKMAP=y -# CONFIG_INPUT_MISC is not set CONFIG_IOMMU_API=y # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set diff --git a/target/linux/zynq/config-5.10 b/target/linux/zynq/config-5.10 index 82904c9de8..24e4781735 100644 --- a/target/linux/zynq/config-5.10 +++ b/target/linux/zynq/config-5.10 @@ -254,7 +254,6 @@ CONFIG_INPUT=y CONFIG_INPUT_EVDEV=y CONFIG_INPUT_FF_MEMLESS=y CONFIG_INPUT_KEYBOARD=y -# CONFIG_INPUT_MISC is not set CONFIG_INPUT_MOUSE=y CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y From ff06edd1f042312782f913725ac41642f849a109 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 13:51:02 +0200 Subject: [PATCH 13/80] kernel: Activate CONFIG_GPIOLIB in generic configuration All targets expect the malta target already activate the CONFIG_GPIOLIB option. Move it to generic kernel configuration and also activate it for malta. Signed-off-by: Hauke Mehrtens --- target/linux/apm821xx/config-5.10 | 1 - target/linux/apm821xx/config-5.15 | 1 - target/linux/apm821xx/nand/config-default | 1 - target/linux/apm821xx/sata/config-default | 1 - target/linux/archs38/config-5.10 | 1 - target/linux/armvirt/config-5.10 | 1 - target/linux/armvirt/config-5.15 | 1 - target/linux/at91/sam9x/config-default | 1 - target/linux/at91/sama5/config-default | 1 - target/linux/at91/sama7/config-default | 1 - target/linux/ath25/config-5.10 | 1 - target/linux/ath79/config-5.10 | 1 - target/linux/ath79/config-5.15 | 1 - target/linux/bcm27xx/bcm2708/config-5.15 | 1 - target/linux/bcm27xx/bcm2709/config-5.15 | 1 - target/linux/bcm27xx/bcm2710/config-5.15 | 1 - target/linux/bcm27xx/bcm2711/config-5.15 | 1 - target/linux/bcm47xx/config-5.10 | 1 - target/linux/bcm4908/config-5.10 | 1 - target/linux/bcm53xx/config-5.10 | 1 - target/linux/bcm53xx/config-5.15 | 1 - target/linux/bcm63xx/config-5.10 | 1 - target/linux/bcm63xx/config-5.15 | 1 - target/linux/bmips/config-5.15 | 1 - target/linux/gemini/config-5.10 | 1 - target/linux/gemini/config-5.15 | 1 - target/linux/generic/config-5.10 | 2 +- target/linux/generic/config-5.15 | 2 +- target/linux/imx/config-5.15 | 1 - target/linux/ipq40xx/config-5.10 | 1 - target/linux/ipq40xx/config-5.15 | 1 - target/linux/ipq806x/config-5.10 | 1 - target/linux/ipq806x/config-5.15 | 1 - target/linux/kirkwood/config-5.10 | 1 - target/linux/kirkwood/config-5.15 | 1 - target/linux/lantiq/config-5.10 | 1 - target/linux/layerscape/armv7/config-5.10 | 1 - target/linux/layerscape/armv8_64b/config-5.10 | 1 - target/linux/mediatek/mt7622/config-5.15 | 1 - target/linux/mediatek/mt7623/config-5.15 | 1 - target/linux/mediatek/mt7629/config-5.15 | 1 - target/linux/mpc85xx/config-5.10 | 1 - target/linux/mvebu/config-5.10 | 1 - target/linux/mxs/config-5.10 | 1 - target/linux/mxs/config-5.15 | 1 - target/linux/octeon/config-5.10 | 1 - target/linux/octeon/config-5.15 | 1 - target/linux/octeontx/config-5.10 | 1 - target/linux/omap/config-5.10 | 1 - target/linux/omap/config-5.15 | 1 - target/linux/oxnas/config-5.10 | 1 - target/linux/pistachio/config-5.10 | 1 - target/linux/qoriq/config-5.10 | 1 - target/linux/qoriq/config-5.15 | 1 - target/linux/ramips/mt7620/config-5.10 | 1 - target/linux/ramips/mt7621/config-5.10 | 1 - target/linux/ramips/mt7621/config-5.15 | 1 - target/linux/ramips/mt76x8/config-5.10 | 1 - target/linux/ramips/rt288x/config-5.10 | 1 - target/linux/ramips/rt305x/config-5.10 | 1 - target/linux/ramips/rt3883/config-5.10 | 1 - target/linux/realtek/rtl838x/config-5.10 | 1 - target/linux/realtek/rtl839x/config-5.10 | 1 - target/linux/realtek/rtl930x/config-5.10 | 1 - target/linux/realtek/rtl931x/config-5.10 | 1 - target/linux/rockchip/armv8/config-5.10 | 1 - target/linux/rockchip/armv8/config-5.15 | 1 - target/linux/sunxi/config-5.10 | 1 - target/linux/sunxi/config-5.15 | 1 - target/linux/tegra/config-5.10 | 1 - target/linux/x86/64/config-5.10 | 1 - target/linux/x86/64/config-5.15 | 1 - target/linux/x86/generic/config-5.10 | 1 - target/linux/x86/generic/config-5.15 | 1 - target/linux/x86/geode/config-5.10 | 1 - target/linux/x86/geode/config-5.15 | 1 - target/linux/zynq/config-5.10 | 1 - 77 files changed, 2 insertions(+), 77 deletions(-) diff --git a/target/linux/apm821xx/config-5.10 b/target/linux/apm821xx/config-5.10 index a80d78d9fd..89d72e2641 100644 --- a/target/linux/apm821xx/config-5.10 +++ b/target/linux/apm821xx/config-5.10 @@ -92,7 +92,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GEN_RTC is not set # CONFIG_GLACIER is not set -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_HAS_DMA=y diff --git a/target/linux/apm821xx/config-5.15 b/target/linux/apm821xx/config-5.15 index 31b5dd5b67..7cb81d7fdd 100644 --- a/target/linux/apm821xx/config-5.15 +++ b/target/linux/apm821xx/config-5.15 @@ -92,7 +92,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GEN_RTC is not set # CONFIG_GLACIER is not set -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y diff --git a/target/linux/apm821xx/nand/config-default b/target/linux/apm821xx/nand/config-default index 931290d1b6..a8ab4fd892 100644 --- a/target/linux/apm821xx/nand/config-default +++ b/target/linux/apm821xx/nand/config-default @@ -12,7 +12,6 @@ CONFIG_SATA_DWC=y # CONFIG_SATA_DWC_DEBUG is not set CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_LEDS_TRIGGER_DISK=y diff --git a/target/linux/apm821xx/sata/config-default b/target/linux/apm821xx/sata/config-default index 563fa60478..70a1ac760d 100644 --- a/target/linux/apm821xx/sata/config-default +++ b/target/linux/apm821xx/sata/config-default @@ -18,7 +18,6 @@ CONFIG_FW_CACHE=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_PM=y -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GPIO_74XX_MMIO=y diff --git a/target/linux/archs38/config-5.10 b/target/linux/archs38/config-5.10 index de787fe4db..1460d35535 100644 --- a/target/linux/archs38/config-5.10 +++ b/target/linux/archs38/config-5.10 @@ -117,7 +117,6 @@ CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GPIOLIB=y CONFIG_GPIO_DWAPB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_SNPS_CREG=y diff --git a/target/linux/armvirt/config-5.10 b/target/linux/armvirt/config-5.10 index c4479a6990..9af7fe18ad 100644 --- a/target/linux/armvirt/config-5.10 +++ b/target/linux/armvirt/config-5.10 @@ -67,7 +67,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_PL061=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/armvirt/config-5.15 b/target/linux/armvirt/config-5.15 index 667efdf70b..36f7d9f01e 100644 --- a/target/linux/armvirt/config-5.15 +++ b/target/linux/armvirt/config-5.15 @@ -64,7 +64,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_PL061=y diff --git a/target/linux/at91/sam9x/config-default b/target/linux/at91/sam9x/config-default index 972affe5b1..609e182905 100644 --- a/target/linux/at91/sam9x/config-default +++ b/target/linux/at91/sam9x/config-default @@ -121,7 +121,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDIRQS_SW_RESEND=y diff --git a/target/linux/at91/sama5/config-default b/target/linux/at91/sama5/config-default index 460e4ccae4..e7478cf5c7 100644 --- a/target/linux/at91/sama5/config-default +++ b/target/linux/at91/sama5/config-default @@ -188,7 +188,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y diff --git a/target/linux/at91/sama7/config-default b/target/linux/at91/sama7/config-default index c81f2e22f5..45568112e4 100644 --- a/target/linux/at91/sama7/config-default +++ b/target/linux/at91/sama7/config-default @@ -175,7 +175,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GRACE_PERIOD=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/ath25/config-5.10 b/target/linux/ath25/config-5.10 index b37e5b3073..ef764820e4 100644 --- a/target/linux/ath25/config-5.10 +++ b/target/linux/ath25/config-5.10 @@ -54,7 +54,6 @@ CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_AR2315=y CONFIG_GPIO_AR5312=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/ath79/config-5.10 b/target/linux/ath79/config-5.10 index 8c662173ef..bdc4b74508 100644 --- a/target/linux/ath79/config-5.10 +++ b/target/linux/ath79/config-5.10 @@ -70,7 +70,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_ATH79=y diff --git a/target/linux/ath79/config-5.15 b/target/linux/ath79/config-5.15 index 52e3ae4d6d..acb6b840bf 100644 --- a/target/linux/ath79/config-5.15 +++ b/target/linux/ath79/config-5.15 @@ -68,7 +68,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_ATH79=y diff --git a/target/linux/bcm27xx/bcm2708/config-5.15 b/target/linux/bcm27xx/bcm2708/config-5.15 index 092c6e48ee..9f2c6f266f 100644 --- a/target/linux/bcm27xx/bcm2708/config-5.15 +++ b/target/linux/bcm27xx/bcm2708/config-5.15 @@ -181,7 +181,6 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_GPIO_BCM_VIRT is not set CONFIG_GPIO_CDEV=y diff --git a/target/linux/bcm27xx/bcm2709/config-5.15 b/target/linux/bcm27xx/bcm2709/config-5.15 index d2fd36f2a9..7a01f594e2 100644 --- a/target/linux/bcm27xx/bcm2709/config-5.15 +++ b/target/linux/bcm27xx/bcm2709/config-5.15 @@ -228,7 +228,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_BCM_VIRT=y CONFIG_GPIO_CDEV=y diff --git a/target/linux/bcm27xx/bcm2710/config-5.15 b/target/linux/bcm27xx/bcm2710/config-5.15 index 7ab4a7e591..308a9246cc 100644 --- a/target/linux/bcm27xx/bcm2710/config-5.15 +++ b/target/linux/bcm27xx/bcm2710/config-5.15 @@ -231,7 +231,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_BCM_VIRT=y CONFIG_GPIO_CDEV=y diff --git a/target/linux/bcm27xx/bcm2711/config-5.15 b/target/linux/bcm27xx/bcm2711/config-5.15 index e144e303a2..e9e50ea26d 100644 --- a/target/linux/bcm27xx/bcm2711/config-5.15 +++ b/target/linux/bcm27xx/bcm2711/config-5.15 @@ -237,7 +237,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_BCM_VIRT=y CONFIG_GPIO_CDEV=y diff --git a/target/linux/bcm47xx/config-5.10 b/target/linux/bcm47xx/config-5.10 index 098d9cc9f0..31d6d1de39 100644 --- a/target/linux/bcm47xx/config-5.10 +++ b/target/linux/bcm47xx/config-5.10 @@ -85,7 +85,6 @@ CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_WDT=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/bcm4908/config-5.10 b/target/linux/bcm4908/config-5.10 index 5a277147dc..3246b42168 100644 --- a/target/linux/bcm4908/config-5.10 +++ b/target/linux/bcm4908/config-5.10 @@ -99,7 +99,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GRO_CELLS=y diff --git a/target/linux/bcm53xx/config-5.10 b/target/linux/bcm53xx/config-5.10 index 4c5047b81b..d8fb7b2a5d 100644 --- a/target/linux/bcm53xx/config-5.10 +++ b/target/linux/bcm53xx/config-5.10 @@ -146,7 +146,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_BCM_XGS_IPROC=y diff --git a/target/linux/bcm53xx/config-5.15 b/target/linux/bcm53xx/config-5.15 index 1bb25e3719..4941f16912 100644 --- a/target/linux/bcm53xx/config-5.15 +++ b/target/linux/bcm53xx/config-5.15 @@ -151,7 +151,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_BCM_XGS_IPROC=y diff --git a/target/linux/bcm63xx/config-5.10 b/target/linux/bcm63xx/config-5.10 index bfed055c29..c0f555a758 100644 --- a/target/linux/bcm63xx/config-5.10 +++ b/target/linux/bcm63xx/config-5.10 @@ -86,7 +86,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_BCM63XX=y CONFIG_GPIO_GENERIC=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/bcm63xx/config-5.15 b/target/linux/bcm63xx/config-5.15 index 4bbe984f5f..c946302d31 100644 --- a/target/linux/bcm63xx/config-5.15 +++ b/target/linux/bcm63xx/config-5.15 @@ -90,7 +90,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_BCM63XX=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y diff --git a/target/linux/bmips/config-5.15 b/target/linux/bmips/config-5.15 index 2a8d40402e..433915a3fc 100644 --- a/target/linux/bmips/config-5.15 +++ b/target/linux/bmips/config-5.15 @@ -111,7 +111,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y # CONFIG_GPIO_BRCMSTB is not set CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y diff --git a/target/linux/gemini/config-5.10 b/target/linux/gemini/config-5.10 index dbc2fe6168..698dc44b49 100644 --- a/target/linux/gemini/config-5.10 +++ b/target/linux/gemini/config-5.10 @@ -187,7 +187,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_FTGPIO010=y diff --git a/target/linux/gemini/config-5.15 b/target/linux/gemini/config-5.15 index 1ae4d901c9..b3b7a7dd12 100644 --- a/target/linux/gemini/config-5.15 +++ b/target/linux/gemini/config-5.15 @@ -187,7 +187,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_FTGPIO010=y diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 2223456fe0..0ddd2a50bc 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -2081,7 +2081,7 @@ CONFIG_GENERIC_VDSO_TIME_NS=y # CONFIG_GP2AP002 is not set # CONFIG_GP2AP020A00F is not set # CONFIG_GPD_POCKET_FAN is not set -# CONFIG_GPIOLIB is not set +CONFIG_GPIOLIB=y CONFIG_GPIOLIB_FASTPATH_LIMIT=512 # CONFIG_GPIO_104_DIO_48E is not set # CONFIG_GPIO_104_IDIO_16 is not set diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 5f2d274fc3..e38d9dd80f 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -2158,7 +2158,7 @@ CONFIG_GENERIC_VDSO_TIME_NS=y # CONFIG_GP2AP002 is not set # CONFIG_GP2AP020A00F is not set # CONFIG_GPD_POCKET_FAN is not set -# CONFIG_GPIOLIB is not set +CONFIG_GPIOLIB=y CONFIG_GPIOLIB_FASTPATH_LIMIT=512 # CONFIG_GPIO_104_DIO_48E is not set # CONFIG_GPIO_104_IDIO_16 is not set diff --git a/target/linux/imx/config-5.15 b/target/linux/imx/config-5.15 index 7d3ae30817..0c9b7d22b4 100644 --- a/target/linux/imx/config-5.15 +++ b/target/linux/imx/config-5.15 @@ -199,7 +199,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y # CONFIG_GIANFAR is not set CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MXC=y diff --git a/target/linux/ipq40xx/config-5.10 b/target/linux/ipq40xx/config-5.10 index fda14f0131..6d325bcaa2 100644 --- a/target/linux/ipq40xx/config-5.10 +++ b/target/linux/ipq40xx/config-5.10 @@ -178,7 +178,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_WATCHDOG=y diff --git a/target/linux/ipq40xx/config-5.15 b/target/linux/ipq40xx/config-5.15 index 0ff1272a85..82a3f9f8a3 100644 --- a/target/linux/ipq40xx/config-5.15 +++ b/target/linux/ipq40xx/config-5.15 @@ -182,7 +182,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_74X164=y CONFIG_GPIO_CDEV=y diff --git a/target/linux/ipq806x/config-5.10 b/target/linux/ipq806x/config-5.10 index 8cc83652e0..f4d7ba7560 100644 --- a/target/linux/ipq806x/config-5.10 +++ b/target/linux/ipq806x/config-5.10 @@ -167,7 +167,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/ipq806x/config-5.15 b/target/linux/ipq806x/config-5.15 index 891e94af02..967abbfb08 100644 --- a/target/linux/ipq806x/config-5.15 +++ b/target/linux/ipq806x/config-5.15 @@ -171,7 +171,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GRO_CELLS=y diff --git a/target/linux/kirkwood/config-5.10 b/target/linux/kirkwood/config-5.10 index 85933da5f2..9c9afa4b62 100644 --- a/target/linux/kirkwood/config-5.10 +++ b/target/linux/kirkwood/config-5.10 @@ -115,7 +115,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_MVEBU=y CONFIG_GRO_CELLS=y diff --git a/target/linux/kirkwood/config-5.15 b/target/linux/kirkwood/config-5.15 index ca84a00126..409010b957 100644 --- a/target/linux/kirkwood/config-5.15 +++ b/target/linux/kirkwood/config-5.15 @@ -114,7 +114,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_MVEBU=y diff --git a/target/linux/lantiq/config-5.10 b/target/linux/lantiq/config-5.10 index 651a58f5cf..c37a543e1e 100644 --- a/target/linux/lantiq/config-5.10 +++ b/target/linux/lantiq/config-5.10 @@ -72,7 +72,6 @@ CONFIG_GENERIC_PHY=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_MM_LANTIQ=y CONFIG_GPIO_STP_XWAY=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/layerscape/armv7/config-5.10 b/target/linux/layerscape/armv7/config-5.10 index 28323b876c..52bd032905 100644 --- a/target/linux/layerscape/armv7/config-5.10 +++ b/target/linux/layerscape/armv7/config-5.10 @@ -252,7 +252,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GIANFAR=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GPIO_MPC8XXX=y diff --git a/target/linux/layerscape/armv8_64b/config-5.10 b/target/linux/layerscape/armv8_64b/config-5.10 index 0f46d1cde9..6fc49fa79e 100644 --- a/target/linux/layerscape/armv8_64b/config-5.10 +++ b/target/linux/layerscape/armv8_64b/config-5.10 @@ -331,7 +331,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GIANFAR is not set CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y diff --git a/target/linux/mediatek/mt7622/config-5.15 b/target/linux/mediatek/mt7622/config-5.15 index ed3f214fab..b08b01ec40 100644 --- a/target/linux/mediatek/mt7622/config-5.15 +++ b/target/linux/mediatek/mt7622/config-5.15 @@ -195,7 +195,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/mediatek/mt7623/config-5.15 b/target/linux/mediatek/mt7623/config-5.15 index 2ce4eae628..3b64eccc05 100644 --- a/target/linux/mediatek/mt7623/config-5.15 +++ b/target/linux/mediatek/mt7623/config-5.15 @@ -240,7 +240,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/mediatek/mt7629/config-5.15 b/target/linux/mediatek/mt7629/config-5.15 index 24b7d3a154..592f28babf 100644 --- a/target/linux/mediatek/mt7629/config-5.15 +++ b/target/linux/mediatek/mt7629/config-5.15 @@ -126,7 +126,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_HANDLE_DOMAIN_IRQ=y # CONFIG_HARDENED_USERCOPY is not set diff --git a/target/linux/mpc85xx/config-5.10 b/target/linux/mpc85xx/config-5.10 index 2668a729e8..532d176c15 100644 --- a/target/linux/mpc85xx/config-5.10 +++ b/target/linux/mpc85xx/config-5.10 @@ -98,7 +98,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GEN_RTC=y # CONFIG_GE_IMP3A is not set CONFIG_GIANFAR=y -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MPC8XXX=y CONFIG_HAS_DMA=y diff --git a/target/linux/mvebu/config-5.10 b/target/linux/mvebu/config-5.10 index 75143af379..6ad5635c17 100644 --- a/target/linux/mvebu/config-5.10 +++ b/target/linux/mvebu/config-5.10 @@ -181,7 +181,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y diff --git a/target/linux/mxs/config-5.10 b/target/linux/mxs/config-5.10 index 1248b0d3a7..e440f3a630 100644 --- a/target/linux/mxs/config-5.10 +++ b/target/linux/mxs/config-5.10 @@ -101,7 +101,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y # CONFIG_GIANFAR is not set CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GPIO_MXS=y diff --git a/target/linux/mxs/config-5.15 b/target/linux/mxs/config-5.15 index 58f457d785..4d3f1d42cf 100644 --- a/target/linux/mxs/config-5.15 +++ b/target/linux/mxs/config-5.15 @@ -102,7 +102,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y # CONFIG_GIANFAR is not set CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y diff --git a/target/linux/octeon/config-5.10 b/target/linux/octeon/config-5.10 index 22c39d6e97..997d22008c 100644 --- a/target/linux/octeon/config-5.10 +++ b/target/linux/octeon/config-5.10 @@ -88,7 +88,6 @@ CONFIG_GENERIC_LIB_UCMPDI2=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_OCTEON=y CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y diff --git a/target/linux/octeon/config-5.15 b/target/linux/octeon/config-5.15 index 3f5a1bb41f..f125858636 100644 --- a/target/linux/octeon/config-5.15 +++ b/target/linux/octeon/config-5.15 @@ -93,7 +93,6 @@ CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_OCTEON=y CONFIG_GRO_CELLS=y diff --git a/target/linux/octeontx/config-5.10 b/target/linux/octeontx/config-5.10 index d1a68684da..fa6fcc3e8a 100644 --- a/target/linux/octeontx/config-5.10 +++ b/target/linux/octeontx/config-5.10 @@ -176,7 +176,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y diff --git a/target/linux/omap/config-5.10 b/target/linux/omap/config-5.10 index 1f529c71ee..4aadb401a7 100644 --- a/target/linux/omap/config-5.10 +++ b/target/linux/omap/config-5.10 @@ -239,7 +239,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_OMAP=y CONFIG_GPIO_PALMAS=y diff --git a/target/linux/omap/config-5.15 b/target/linux/omap/config-5.15 index 1627141225..c35a20acda 100644 --- a/target/linux/omap/config-5.15 +++ b/target/linux/omap/config-5.15 @@ -242,7 +242,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_OMAP=y diff --git a/target/linux/oxnas/config-5.10 b/target/linux/oxnas/config-5.10 index c2a4341028..dd1706cb13 100644 --- a/target/linux/oxnas/config-5.10 +++ b/target/linux/oxnas/config-5.10 @@ -152,7 +152,6 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y diff --git a/target/linux/pistachio/config-5.10 b/target/linux/pistachio/config-5.10 index 9e43b64b0b..9ac748c4e9 100644 --- a/target/linux/pistachio/config-5.10 +++ b/target/linux/pistachio/config-5.10 @@ -96,7 +96,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y diff --git a/target/linux/qoriq/config-5.10 b/target/linux/qoriq/config-5.10 index 3b53cb3ebc..2d49eeb9a1 100644 --- a/target/linux/qoriq/config-5.10 +++ b/target/linux/qoriq/config-5.10 @@ -159,7 +159,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GEN_RTC is not set # CONFIG_GIANFAR is not set CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MPC8XXX=y CONFIG_GRO_CELLS=y diff --git a/target/linux/qoriq/config-5.15 b/target/linux/qoriq/config-5.15 index 7d5e410ee1..e607501dbc 100644 --- a/target/linux/qoriq/config-5.15 +++ b/target/linux/qoriq/config-5.15 @@ -164,7 +164,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y # CONFIG_GEN_RTC is not set # CONFIG_GIANFAR is not set CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MPC8XXX=y diff --git a/target/linux/ramips/mt7620/config-5.10 b/target/linux/ramips/mt7620/config-5.10 index 8fae1adc37..f6b3882249 100644 --- a/target/linux/ramips/mt7620/config-5.10 +++ b/target/linux/ramips/mt7620/config-5.10 @@ -66,7 +66,6 @@ CONFIG_GENERIC_PINCONF=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y # CONFIG_GPIO_MT7621 is not set CONFIG_GPIO_RALINK=y CONFIG_GPIO_WATCHDOG=y diff --git a/target/linux/ramips/mt7621/config-5.10 b/target/linux/ramips/mt7621/config-5.10 index 182da755cf..761ed23d77 100644 --- a/target/linux/ramips/mt7621/config-5.10 +++ b/target/linux/ramips/mt7621/config-5.10 @@ -82,7 +82,6 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MT7621=y diff --git a/target/linux/ramips/mt7621/config-5.15 b/target/linux/ramips/mt7621/config-5.15 index 3072a5177e..5fbcefc3ae 100644 --- a/target/linux/ramips/mt7621/config-5.15 +++ b/target/linux/ramips/mt7621/config-5.15 @@ -85,7 +85,6 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y diff --git a/target/linux/ramips/mt76x8/config-5.10 b/target/linux/ramips/mt76x8/config-5.10 index 4f08adb660..39d04b8d10 100644 --- a/target/linux/ramips/mt76x8/config-5.10 +++ b/target/linux/ramips/mt76x8/config-5.10 @@ -65,7 +65,6 @@ CONFIG_GENERIC_PINCONF=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_MT7621=y diff --git a/target/linux/ramips/rt288x/config-5.10 b/target/linux/ramips/rt288x/config-5.10 index 942fe7523e..3071f8719f 100644 --- a/target/linux/ramips/rt288x/config-5.10 +++ b/target/linux/ramips/rt288x/config-5.10 @@ -57,7 +57,6 @@ CONFIG_GENERIC_PINCONF=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_RALINK=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y diff --git a/target/linux/ramips/rt305x/config-5.10 b/target/linux/ramips/rt305x/config-5.10 index b41ddb22ac..771f42ab3b 100644 --- a/target/linux/ramips/rt305x/config-5.10 +++ b/target/linux/ramips/rt305x/config-5.10 @@ -60,7 +60,6 @@ CONFIG_GENERIC_PINCONF=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_RALINK=y CONFIG_GPIO_WATCHDOG=y # CONFIG_GPIO_WATCHDOG_ARCH_INITCALL is not set diff --git a/target/linux/ramips/rt3883/config-5.10 b/target/linux/ramips/rt3883/config-5.10 index b59ad98b60..6e4ad04d90 100644 --- a/target/linux/ramips/rt3883/config-5.10 +++ b/target/linux/ramips/rt3883/config-5.10 @@ -60,7 +60,6 @@ CONFIG_GENERIC_PINCONF=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIO_RALINK=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y diff --git a/target/linux/realtek/rtl838x/config-5.10 b/target/linux/realtek/rtl838x/config-5.10 index 9075aa6d3c..d046c7daeb 100644 --- a/target/linux/realtek/rtl838x/config-5.10 +++ b/target/linux/realtek/rtl838x/config-5.10 @@ -67,7 +67,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_PCA953X=y diff --git a/target/linux/realtek/rtl839x/config-5.10 b/target/linux/realtek/rtl839x/config-5.10 index 1b4e1de43f..91594062db 100644 --- a/target/linux/realtek/rtl839x/config-5.10 +++ b/target/linux/realtek/rtl839x/config-5.10 @@ -67,7 +67,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_PCA953X=y diff --git a/target/linux/realtek/rtl930x/config-5.10 b/target/linux/realtek/rtl930x/config-5.10 index bd47baac80..5afe90f236 100644 --- a/target/linux/realtek/rtl930x/config-5.10 +++ b/target/linux/realtek/rtl930x/config-5.10 @@ -68,7 +68,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_PCA953X=y diff --git a/target/linux/realtek/rtl931x/config-5.10 b/target/linux/realtek/rtl931x/config-5.10 index 244ca50b74..319d766ae5 100644 --- a/target/linux/realtek/rtl931x/config-5.10 +++ b/target/linux/realtek/rtl931x/config-5.10 @@ -70,7 +70,6 @@ CONFIG_GENERIC_PINMUX_FUNCTIONS=y CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_REALTEK_OTTO=y CONFIG_GPIO_GENERIC=y diff --git a/target/linux/rockchip/armv8/config-5.10 b/target/linux/rockchip/armv8/config-5.10 index 43be53a090..79dedb2041 100644 --- a/target/linux/rockchip/armv8/config-5.10 +++ b/target/linux/rockchip/armv8/config-5.10 @@ -243,7 +243,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_DWAPB=y CONFIG_GPIO_GENERIC=y diff --git a/target/linux/rockchip/armv8/config-5.15 b/target/linux/rockchip/armv8/config-5.15 index 8d04790d41..fa005294bc 100644 --- a/target/linux/rockchip/armv8/config-5.15 +++ b/target/linux/rockchip/armv8/config-5.15 @@ -238,7 +238,6 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_DWAPB=y diff --git a/target/linux/sunxi/config-5.10 b/target/linux/sunxi/config-5.10 index fa43fa248d..caac9e1436 100644 --- a/target/linux/sunxi/config-5.10 +++ b/target/linux/sunxi/config-5.10 @@ -198,7 +198,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y diff --git a/target/linux/sunxi/config-5.15 b/target/linux/sunxi/config-5.15 index 2c09114f55..c7dbc5a9f1 100644 --- a/target/linux/sunxi/config-5.15 +++ b/target/linux/sunxi/config-5.15 @@ -199,7 +199,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_CDEV=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y diff --git a/target/linux/tegra/config-5.10 b/target/linux/tegra/config-5.10 index 7a0c24864c..8d808595d9 100644 --- a/target/linux/tegra/config-5.10 +++ b/target/linux/tegra/config-5.10 @@ -214,7 +214,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIO_TEGRA=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y diff --git a/target/linux/x86/64/config-5.10 b/target/linux/x86/64/config-5.10 index eb0b08c477..472cf07669 100644 --- a/target/linux/x86/64/config-5.10 +++ b/target/linux/x86/64/config-5.10 @@ -188,7 +188,6 @@ CONFIG_GENERIC_CPU=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_GPIOLIB=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_ICH=y CONFIG_GPIO_SCH=y diff --git a/target/linux/x86/64/config-5.15 b/target/linux/x86/64/config-5.15 index 5bba17d0b6..ec9a73c9e2 100644 --- a/target/linux/x86/64/config-5.15 +++ b/target/linux/x86/64/config-5.15 @@ -199,7 +199,6 @@ CONFIG_GENERIC_CPU=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_CDEV=y diff --git a/target/linux/x86/generic/config-5.10 b/target/linux/x86/generic/config-5.10 index 7bfe8b4004..b8580022e0 100644 --- a/target/linux/x86/generic/config-5.10 +++ b/target/linux/x86/generic/config-5.10 @@ -151,7 +151,6 @@ CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_PINCONF=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GUP_GET_PTE_LOW_HIGH=y diff --git a/target/linux/x86/generic/config-5.15 b/target/linux/x86/generic/config-5.15 index 46bcd101bc..91e6c1b4d8 100644 --- a/target/linux/x86/generic/config-5.15 +++ b/target/linux/x86/generic/config-5.15 @@ -154,7 +154,6 @@ CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_PINCONF=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_CDEV=y diff --git a/target/linux/x86/geode/config-5.10 b/target/linux/x86/geode/config-5.10 index 1cb3bad952..07c9b050d3 100644 --- a/target/linux/x86/geode/config-5.10 +++ b/target/linux/x86/geode/config-5.10 @@ -44,7 +44,6 @@ CONFIG_DMA_ACPI=y # CONFIG_EL3 is not set CONFIG_GEODE_WDT=y CONFIG_GEOS=y -CONFIG_GPIOLIB=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_CS5535=y # CONFIG_HPET is not set diff --git a/target/linux/x86/geode/config-5.15 b/target/linux/x86/geode/config-5.15 index 2ddc04cfbe..8b5bf266d7 100644 --- a/target/linux/x86/geode/config-5.15 +++ b/target/linux/x86/geode/config-5.15 @@ -47,7 +47,6 @@ CONFIG_DMA_ACPI=y # CONFIG_EL3 is not set CONFIG_GEODE_WDT=y CONFIG_GEOS=y -CONFIG_GPIOLIB=y CONFIG_GPIO_ACPI=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_CS5535=y diff --git a/target/linux/zynq/config-5.10 b/target/linux/zynq/config-5.10 index 24e4781735..228b710ec1 100644 --- a/target/linux/zynq/config-5.10 +++ b/target/linux/zynq/config-5.10 @@ -211,7 +211,6 @@ CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y -CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y From 7ebe1dca476ddb2c08f8a1cbbd0522e69c1edc82 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 13:24:59 +0200 Subject: [PATCH 14/80] kernel: kmod-net-rtl8192su: Remove package The R8712U driver depends on cfg80211. cfg80211 is provided by mac80211 backports, we can not build any in kernel drivers which depend on cfg80211 which is an out of tree module in OpenWrt. The cfg80211 dependency was added with kernel 5.9. We could add rtl8192su to backports and build it from there. Signed-off-by: Hauke Mehrtens --- package/firmware/linux-firmware/realtek.mk | 7 ------ package/kernel/linux/modules/wireless.mk | 25 ---------------------- 2 files changed, 32 deletions(-) delete mode 100644 package/kernel/linux/modules/wireless.mk diff --git a/package/firmware/linux-firmware/realtek.mk b/package/firmware/linux-firmware/realtek.mk index c883e8ba59..e06c3a6369 100644 --- a/package/firmware/linux-firmware/realtek.mk +++ b/package/firmware/linux-firmware/realtek.mk @@ -69,13 +69,6 @@ define Package/rtl8192se-firmware/install endef $(eval $(call BuildPackage,rtl8192se-firmware)) -Package/rtl8192su-firmware = $(call Package/firmware-default,RealTek RTL8192SU firmware) -define Package/rtl8192su-firmware/install - $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8712u.bin $(1)/lib/firmware/rtlwifi -endef -$(eval $(call BuildPackage,rtl8192su-firmware)) - Package/rtl8723au-firmware = $(call Package/firmware-default,RealTek RTL8723AU firmware) define Package/rtl8723au-firmware/install $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi diff --git a/package/kernel/linux/modules/wireless.mk b/package/kernel/linux/modules/wireless.mk deleted file mode 100644 index 1e9e68a0f6..0000000000 --- a/package/kernel/linux/modules/wireless.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (C) 2006-2008 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -WIRELESS_MENU:=Wireless Drivers - -define KernelPackage/net-rtl8192su - SUBMENU:=$(WIRELESS_MENU) - TITLE:=RTL8192SU support (staging) - DEPENDS:=@USB_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-usb-core +rtl8192su-firmware - KCONFIG:=\ - CONFIG_STAGING=y \ - CONFIG_R8712U - FILES:=$(LINUX_DIR)/drivers/staging/rtl8712/r8712u.ko - AUTOLOAD:=$(call AutoProbe,r8712u) -endef - -define KernelPackage/net-rtl8192su/description - Kernel modules for RealTek RTL8712 and RTL81XXSU fullmac support. -endef - -$(eval $(call KernelPackage,net-rtl8192su)) From 5808973d141f488e06efe4749dbf651565fd5510 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 13:32:31 +0200 Subject: [PATCH 15/80] kernel: kmod-w1-slave-ds2760: Remove package The w1_ds2760.ko driver was merged into the ds2760_battery.ko driver. The driver was removed and this package was never build any more. This happened with kernel 4.19. Remove this unused package. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/w1.mk | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/package/kernel/linux/modules/w1.mk b/package/kernel/linux/modules/w1.mk index e0f7eecb6e..9cba28da11 100644 --- a/package/kernel/linux/modules/w1.mk +++ b/package/kernel/linux/modules/w1.mk @@ -160,23 +160,6 @@ endef $(eval $(call KernelPackage,w1-slave-ds2433)) -define KernelPackage/w1-slave-ds2760 - TITLE:=Dallas 2760 battery monitor chip (HP iPAQ & others) - KCONFIG:= \ - CONFIG_W1_SLAVE_DS2760 \ - CONFIG_W1_SLAVE_DS2433_CRC=n - FILES:=$(W1_SLAVES_DIR)/w1_ds2760.ko - AUTOLOAD:=$(call AutoProbe,w1_ds2760) - $(call AddDepends/w1) -endef - -define KernelPackage/w1-slave-ds2760/description - Kernel module for 1-wire DS2760 battery monitor chip support -endef - -$(eval $(call KernelPackage,w1-slave-ds2760)) - - define KernelPackage/w1-slave-ds2413 TITLE:=DS2413 2 Ch. Addressable Switch KCONFIG:= \ From b75425370d8de747457c137463bc4d15f6f44d00 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 14:06:14 +0200 Subject: [PATCH 16/80] kernel: kmod-nft-nat6: Remove package The nft NAT packages for IPv4 and IPv6 were merged into the common packages with kernel 5.1. The kmod-nft-nat6 package was empty in our build, remove it. Multiple kernel configuration options were also removed, remove them from our generic kernel configuration too. Signed-off-by: Hauke Mehrtens --- include/netfilter.mk | 5 ----- package/kernel/linux/modules/netfilter.mk | 11 ----------- package/network/config/firewall4/Makefile | 2 +- target/linux/generic/config-5.10 | 3 --- target/linux/generic/config-5.15 | 3 --- 5 files changed, 1 insertion(+), 23 deletions(-) diff --git a/include/netfilter.mk b/include/netfilter.mk index 50a002be65..657b4d9d39 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -341,12 +341,7 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_BRIDGE,CONFIG_NF_CONNTRACK_BRIDGE, $(P_ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_nat),)) $(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_NAT, $(P_XT)nft_chain_nat),)) -$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_REDIR_IPV4, $(P_V4)nft_redir_ipv4),)) $(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ, $(P_XT)nft_masq),)) -$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT,CONFIG_NFT_MASQ_IPV4, $(P_V4)nft_masq_ipv4),)) - -$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_REDIR_IPV6, $(P_V6)nft_redir_ipv6),)) -$(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_MASQ_IPV6, $(P_V6)nft_masq_ipv6),)) $(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB, $(P_XT)nft_fib),)) $(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_INET, $(P_XT)nft_fib_inet),)) diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 22b7dbd285..d68a2d068a 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -1185,17 +1185,6 @@ endef $(eval $(call KernelPackage,nft-offload)) -define KernelPackage/nft-nat6 - SUBMENU:=$(NF_MENU) - TITLE:=Netfilter nf_tables IPv6-NAT support - DEPENDS:=+kmod-nft-nat +kmod-nf-nat6 - FILES:=$(foreach mod,$(NFT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko) - AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT6-m))) - KCONFIG:=$(KCONFIG_NFT_NAT6) -endef - -$(eval $(call KernelPackage,nft-nat6)) - define KernelPackage/nft-netdev SUBMENU:=$(NF_MENU) TITLE:=Netfilter nf_tables netdev support diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile index d6f363f3c8..0003fc09c3 100644 --- a/package/network/config/firewall4/Makefile +++ b/package/network/config/firewall4/Makefile @@ -23,7 +23,7 @@ define Package/firewall4 TITLE:=OpenWrt 4th gen firewall DEPENDS:= \ +kmod-nft-core +kmod-nft-fib +kmod-nft-offload \ - +kmod-nft-nat +kmod-nft-nat6 \ + +kmod-nft-nat \ +nftables-json \ +ucode +ucode-mod-fs +ucode-mod-ubus +ucode-mod-uci EXTRA_DEPENDS:=ucode (>= 2022-03-22) diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 0ddd2a50bc..3d04a17243 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -4134,10 +4134,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_NAT_AMANDA is not set # CONFIG_NF_NAT_FTP is not set # CONFIG_NF_NAT_H323 is not set -# CONFIG_NF_NAT_IPV6 is not set # CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_MASQUERADE_IPV4=y -CONFIG_NF_NAT_MASQUERADE_IPV6=y # CONFIG_NF_NAT_NEEDED is not set # CONFIG_NF_NAT_PPTP is not set # CONFIG_NF_NAT_PROTO_GRE is not set diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index e38d9dd80f..6323543991 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -4294,10 +4294,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y # CONFIG_NF_NAT_AMANDA is not set # CONFIG_NF_NAT_FTP is not set # CONFIG_NF_NAT_H323 is not set -# CONFIG_NF_NAT_IPV6 is not set # CONFIG_NF_NAT_IRC is not set -CONFIG_NF_NAT_MASQUERADE_IPV4=y -CONFIG_NF_NAT_MASQUERADE_IPV6=y # CONFIG_NF_NAT_NEEDED is not set # CONFIG_NF_NAT_PPTP is not set # CONFIG_NF_NAT_PROTO_GRE is not set From 2a0284fb0325f07e79b9b4c58a7d280ba9999a39 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 14:31:59 +0200 Subject: [PATCH 17/80] kernel: kmod-ipt-ulog: Remove package The ulog iptables target was removed with kernel 3.17, remove the kernel and also the iptables package in OpenWrt too. Signed-off-by: Hauke Mehrtens --- include/netfilter.mk | 7 ------- package/kernel/linux/modules/netfilter.mk | 17 ----------------- package/network/utils/iptables/Makefile | 14 -------------- 3 files changed, 38 deletions(-) diff --git a/include/netfilter.mk b/include/netfilter.mk index 657b4d9d39..a9c5133ae4 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -224,11 +224,6 @@ $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_IRC, $(P_XT)nf_connt $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_IRC, $(P_XT)nf_nat_irc)) -# ulog - -$(eval $(call nf_add,IPT_ULOG,CONFIG_IP_NF_TARGET_ULOG, $(P_V4)ipt_ULOG)) - - # nflog $(eval $(call nf_add,IPT_NFLOG,CONFIG_NETFILTER_XT_TARGET_NFLOG, $(P_XT)xt_NFLOG)) @@ -315,7 +310,6 @@ $(eval $(call nf_add,EBTABLES_IP4,CONFIG_BRIDGE_EBT_SNAT, $(P_EBT)ebt_snat)) # watchers $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_LOG, $(P_EBT)ebt_log)) -$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_ULOG, $(P_EBT)ebt_ulog)) $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFLOG, $(P_EBT)ebt_nflog)) $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nfqueue)) @@ -382,7 +376,6 @@ IPT_BUILTIN += $(IPT_NAT6-y) IPT_BUILTIN += $(IPT_NAT_EXTRA-y) IPT_BUILTIN += $(NF_NATHELPER-y) IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y) -IPT_BUILTIN += $(IPT_ULOG-y) IPT_BUILTIN += $(IPT_TPROXY-y) IPT_BUILTIN += $(NFNETLINK-y) IPT_BUILTIN += $(NFNETLINK_LOG-y) diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index d68a2d068a..e6e2c9b637 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -607,23 +607,6 @@ endef $(eval $(call KernelPackage,nf-nathelper-extra)) -define KernelPackage/ipt-ulog - TITLE:=Module for user-space packet logging - KCONFIG:=$(KCONFIG_IPT_ULOG) - FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko) - AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m))) - $(call AddDepends/ipt) -endef - -define KernelPackage/ipt-ulog/description - Netfilter (IPv4) module for user-space packet logging - Includes: - - ULOG -endef - -$(eval $(call KernelPackage,ipt-ulog)) - - define KernelPackage/ipt-nflog TITLE:=Module for user-space packet logging KCONFIG:=$(KCONFIG_IPT_NFLOG) diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile index fdb1aa916b..20a3fad582 100644 --- a/package/network/utils/iptables/Makefile +++ b/package/network/utils/iptables/Makefile @@ -251,19 +251,6 @@ iptables extensions for extra NAT targets. - NETMAP endef -define Package/iptables-mod-ulog -$(call Package/iptables/Module, +kmod-ipt-ulog) - TITLE:=user-space packet logging -endef - -define Package/iptables-mod-ulog/description -iptables extensions for user-space packet logging. - - Targets: - - ULOG - -endef - define Package/iptables-mod-nflog $(call Package/iptables/Module, +kmod-nfnetlink-log +kmod-ipt-nflog) TITLE:=Netfilter NFLOG target @@ -779,7 +766,6 @@ $(eval $(call BuildPlugin,iptables-mod-nat-extra,$(IPT_NAT_EXTRA-m))) $(eval $(call BuildPlugin,iptables-mod-iprange,$(IPT_IPRANGE-m))) $(eval $(call BuildPlugin,iptables-mod-cluster,$(IPT_CLUSTER-m))) $(eval $(call BuildPlugin,iptables-mod-clusterip,$(IPT_CLUSTERIP-m))) -$(eval $(call BuildPlugin,iptables-mod-ulog,$(IPT_ULOG-m))) $(eval $(call BuildPlugin,iptables-mod-hashlimit,$(IPT_HASHLIMIT-m))) $(eval $(call BuildPlugin,iptables-mod-rpfilter,$(IPT_RPFILTER-m))) $(eval $(call BuildPlugin,iptables-mod-led,$(IPT_LED-m))) From 3b5294beb72cca50f1826963794845e080f88e63 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 14:35:03 +0200 Subject: [PATCH 18/80] kernel: kmod-wwan: Add package This adds the kmod-wwan package. This provides the generic wwan driver core which is needed for some existing packages. Currently the drivers/net/wwan/wwan.ko driver is compiled into the kernel when one of the wwan module is activated, better build it as a kernel module. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 27 +++++++++++++++++----- target/linux/generic/config-5.15 | 2 ++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 50a72f8dd3..55b87ab13e 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -1361,6 +1361,23 @@ endef $(eval $(call KernelPackage,sfc-falcon)) + +define KernelPackage/wwan + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=WWAN Driver Core + DEPENDS:=@LINUX_5_15 + KCONFIG:=CONFIG_WWAN + FILES:=$(LINUX_DIR)/drivers/net/wwan/wwan.ko + AUTOLOAD:=$(call AutoProbe,wwan) +endef + +define KernelPackage/wwan/description + his driver provides a common framework for WWAN drivers. +endef + +$(eval $(call KernelPackage,wwan)) + + define KernelPackage/mhi-net SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=MHI Network Device @@ -1379,9 +1396,8 @@ $(eval $(call KernelPackage,mhi-net)) define KernelPackage/mhi-wwan-ctrl SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=MHI WWAN Control - DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus - KCONFIG:=CONFIG_MHI_WWAN_CTRL \ - CONFIG_WWAN=y + DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus +kmod-wwan + KCONFIG:=CONFIG_MHI_WWAN_CTRL FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_ctrl.ko AUTOLOAD:=$(call AutoProbe,mhi_wwan_ctrl) endef @@ -1396,9 +1412,8 @@ $(eval $(call KernelPackage,mhi-wwan-ctrl)) define KernelPackage/mhi-wwan-mbim SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=MHI MBIM - DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus - KCONFIG:=CONFIG_MHI_WWAN_MBIM \ - CONFIG_WWAN=y + DEPENDS:=@LINUX_5_15 @PCI_SUPPORT +kmod-mhi-bus +kmod-wwan + KCONFIG:=CONFIG_MHI_WWAN_MBIM FILES:=$(LINUX_DIR)/drivers/net/wwan/mhi_wwan_mbim.ko AUTOLOAD:=$(call AutoProbe,mhi_wwan_mbim) endef diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 6323543991..cb2a742632 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -2774,6 +2774,7 @@ CONFIG_INPUT_MISC=y # CONFIG_IOMMU_SUPPORT is not set # CONFIG_IONIC is not set # CONFIG_IOSCHED_BFQ is not set +# CONFIG_IOSM is not set CONFIG_IO_STRICT_DEVMEM=y # CONFIG_IO_URING is not set CONFIG_IO_WQ=y @@ -5056,6 +5057,7 @@ CONFIG_RFKILL=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPMSG_QCOM_GLINK_RPM is not set # CONFIG_RPMSG_VIRTIO is not set +# CONFIG_RPMSG_WWAN_CTRL is not set # CONFIG_RPR0521 is not set # CONFIG_RSEQ is not set # CONFIG_RT2X00 is not set From 5ccf4dcf8864c1d940b65067d8c6f7c4e5858ae2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 14:42:01 +0200 Subject: [PATCH 19/80] kenrel: kmod-rtc-pt7c4338: Remove package The rtc-pt7c4338.ko was never upstream under this name, the driver was removed from OpenWrt some years ago, remove the kmod-rtc-pt7c4338 package too. Fixes: 74d00a8c3849 ("kernel: split patches folder up into backport, pending and hack folders") Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/other.mk | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index d47c7dcaa2..6dfbbbae82 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -691,22 +691,6 @@ endef $(eval $(call KernelPackage,rtc-pcf2127)) -define KernelPackage/rtc-pt7c4338 - SUBMENU:=$(OTHER_MENU) - TITLE:=Pericom PT7C4338 RTC support - DEFAULT:=m if ALL_KMODS && RTC_SUPPORT - DEPENDS:=+kmod-i2c-core - KCONFIG:=CONFIG_RTC_DRV_PT7C4338 \ - CONFIG_RTC_CLASS=y - FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pt7c4338.ko - AUTOLOAD:=$(call AutoProbe,rtc-pt7c4338) -endef - -define KernelPackage/rtc-pt7c4338/description - Kernel module for Pericom PT7C4338 i2c RTC chip -endef - -$(eval $(call KernelPackage,rtc-pt7c4338)) define KernelPackage/rtc-rs5c372a SUBMENU:=$(OTHER_MENU) From 3986e7c1748c1d847ee4b7d3c9df73c7f0220969 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 14:59:56 +0200 Subject: [PATCH 20/80] kernel: kmod-mdio-gpio: kmod-switch-rtl8366-smi: Add kmod-of-mdio dependency for malta These two modules also need a depend to kmod-of-mdio on malta. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 55b87ab13e..ffae986d5f 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -158,7 +158,7 @@ $(eval $(call KernelPackage,mdio-devres)) define KernelPackage/mdio-gpio SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:= Supports GPIO lib-based MDIO busses - DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio + DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_malta||TARGET_tegra):kmod-of-mdio KCONFIG:= \ CONFIG_MDIO_BITBANG \ CONFIG_MDIO_GPIO @@ -354,7 +354,7 @@ $(eval $(call KernelPackage,switch-rtl8306)) define KernelPackage/switch-rtl8366-smi SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Realtek RTL8366 SMI switch interface support - DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_tegra):kmod-of-mdio + DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armvirt||TARGET_bcm27xx_bcm2708||TARGET_malta||TARGET_tegra):kmod-of-mdio KCONFIG:=CONFIG_RTL8366_SMI FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366_smi.ko AUTOLOAD:=$(call AutoLoad,42,rtl8366_smi,1) From db55dea5fc047190af188f07018e99b0c7a4bdde Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 15:13:36 +0200 Subject: [PATCH 21/80] kernel: kmod-isdn4linux: Remove package The isdn4linux drivers and subsystem was removed in kernel 5.3, remove the kernel package also from OpenWrt. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netsupport.mk | 32 ---------------------- 1 file changed, 32 deletions(-) diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 9b99aa1d21..5369be201f 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -163,38 +163,6 @@ endef $(eval $(call KernelPackage,misdn)) -define KernelPackage/isdn4linux - SUBMENU:=$(NETWORK_SUPPORT_MENU) - TITLE:=Old ISDN4Linux (deprecated) - DEPENDS:=+kmod-ppp - KCONFIG:= \ - CONFIG_ISDN=y \ - CONFIG_ISDN_I4L \ - CONFIG_ISDN_PPP=y \ - CONFIG_ISDN_PPP_VJ=y \ - CONFIG_ISDN_MPP=y \ - CONFIG_IPPP_FILTER=y \ - CONFIG_ISDN_PPP_BSDCOMP \ - CONFIG_ISDN_CAPI_MIDDLEWARE=y \ - CONFIG_ISDN_CAPI_CAPIFS_BOOL=y \ - CONFIG_ISDN_AUDIO=y \ - CONFIG_ISDN_TTY_FAX=y \ - CONFIG_ISDN_X25=y \ - CONFIG_ISDN_DIVERSION - FILES:= \ - $(LINUX_DIR)/drivers/isdn/divert/dss1_divert.ko \ - $(LINUX_DIR)/drivers/isdn/i4l/isdn.ko \ - $(LINUX_DIR)/drivers/isdn/i4l/isdn_bsdcomp.ko - AUTOLOAD:=$(call AutoLoad,40,isdn isdn_bsdcomp dss1_divert) -endef - -define KernelPackage/isdn4linux/description - This driver allows you to use an ISDN adapter for networking -endef - -$(eval $(call KernelPackage,isdn4linux)) - - define KernelPackage/ipip SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=IP-in-IP encapsulation From c281edb6ac1ce19968bd912e9291144a1c4d2183 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 15:22:42 +0200 Subject: [PATCH 22/80] kernel: kmod-iio-sps30: Add I2C driver The sps30.ko driver was split into a main sps30.ko driver and a sps30_i2c.ko driver for the I2C interface with kernel 5.14. Add the sps30_i2c.ko module to the package too. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/iio.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index 6a2e040377..a4b2ee93e9 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -431,9 +431,13 @@ define KernelPackage/iio-sps30 SUBMENU:=$(IIO_MENU) DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer +kmod-lib-crc8 TITLE:=Sensirion SPS30 particulate matter sensor - KCONFIG:=CONFIG_SPS30 - FILES:=$(LINUX_DIR)/drivers/iio/chemical/sps30.ko - AUTOLOAD:=$(call AutoProbe,sps30) + KCONFIG:= \ + CONFIG_SPS30 \ + CONFIG_SPS30_I2C + FILES:= \ + $(LINUX_DIR)/drivers/iio/chemical/sps30.ko \ + $(LINUX_DIR)/drivers/iio/chemical/sps30_i2c.ko@ge5.14 + AUTOLOAD:=$(call AutoProbe,sps30 sps30_i2c) endef define KernelPackage/iio-sps30/description From 54878fbbdd6c3a7b9354ff800ddaeecaf1b6e13a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 15:26:21 +0200 Subject: [PATCH 23/80] kernel: kmod-input-polldev: Depend on kernel 5.10 The input-polldev.ko kernel module was removed from kernel 5.11. The normal input implementation now supports polling. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/input.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk index 7f042e8535..b0ab3360cc 100644 --- a/package/kernel/linux/modules/input.mk +++ b/package/kernel/linux/modules/input.mk @@ -92,7 +92,7 @@ $(eval $(call KernelPackage,input-gpio-keys)) define KernelPackage/input-gpio-keys-polled SUBMENU:=$(INPUT_MODULES_MENU) TITLE:=Polled GPIO key support - DEPENDS:=@GPIO_SUPPORT +kmod-input-polldev + DEPENDS:=@GPIO_SUPPORT +LINUX_5_10:kmod-input-polldev KCONFIG:= \ CONFIG_KEYBOARD_GPIO_POLLED \ CONFIG_INPUT_KEYBOARD=y @@ -145,7 +145,7 @@ $(eval $(call KernelPackage,input-joydev)) define KernelPackage/input-polldev SUBMENU:=$(INPUT_MODULES_MENU) TITLE:=Polled Input device support - DEPENDS:=+kmod-input-core + DEPENDS:=+kmod-input-core @LINUX_5_10 KCONFIG:=CONFIG_INPUT_POLLDEV FILES:=$(LINUX_DIR)/drivers/input/input-polldev.ko endef From 712ff388bcd0811256c07e8e1f4b92a007adaa7f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 15:57:15 +0200 Subject: [PATCH 24/80] kernel: kmod-phy-ax88796b: Add new PHY This adds the AX88796B PHY which is needed by the kmod-usb-net-asix driver. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 17 +++++++++++++++++ package/kernel/linux/modules/usb.mk | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index ffae986d5f..5e622eb83c 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -223,6 +223,23 @@ endef $(eval $(call KernelPackage,phylib-broadcom)) +define KernelPackage/phy-ax88796b + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Asix PHY driver + KCONFIG:=CONFIG_AX88796B_PHY + DEPENDS:=+kmod-libphy + FILES:=$(LINUX_DIR)/drivers/net/phy/ax88796b.ko + AUTOLOAD:=$(call AutoProbe,ax88796b) +endef + +define KernelPackage/phy-ax88796b/description + Currently supports the Asix Electronics PHY found in the X-Surf 100 + AX88796B package. +endef + +$(eval $(call KernelPackage,phy-ax88796b)) + + define KernelPackage/phy-broadcom SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Broadcom Ethernet PHY driver diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 854d9b2450..e153baf6f8 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1155,7 +1155,7 @@ $(eval $(call KernelPackage,usb-net-aqc111)) define KernelPackage/usb-net-asix TITLE:=Kernel module for USB-to-Ethernet Asix convertors - DEPENDS:=+kmod-libphy +LINUX_5_15:kmod-net-selftests +LINUX_5_15:kmod-mdio-devres + DEPENDS:=+kmod-libphy +LINUX_5_15:kmod-net-selftests +LINUX_5_15:kmod-mdio-devres +kmod-phy-ax88796b KCONFIG:=CONFIG_USB_NET_AX8817X FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.ko AUTOLOAD:=$(call AutoProbe,asix) From 5b016a88f92f25dd7d32438bce3a469f343f4009 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 16:00:32 +0200 Subject: [PATCH 25/80] kernel: kmod-phy-smsc: Add new PHY This adds the SMSC PHY which is needed by the kmod-usb-net-smsc95xx driver. Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/netdevices.mk | 16 ++++++++++++++++ package/kernel/linux/modules/usb.mk | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 5e622eb83c..140459ab25 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -290,6 +290,22 @@ endef $(eval $(call KernelPackage,phy-realtek)) +define KernelPackage/phy-smsc + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=SMSC PHY driver + KCONFIG:=CONFIG_SMSC_PHY + DEPENDS:=+kmod-libphy + FILES:=$(LINUX_DIR)/drivers/net/phy/smsc.ko + AUTOLOAD:=$(call AutoProbe,smsc) +endef + +define KernelPackage/phy-smsc/description + Currently supports the LAN83C185, LAN8187 and LAN8700 PHYs +endef + +$(eval $(call KernelPackage,phy-smsc)) + + define KernelPackage/swconfig SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=switch configuration API diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index e153baf6f8..f3838b3981 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1283,7 +1283,7 @@ $(eval $(call KernelPackage,usb-net-smsc75xx)) define KernelPackage/usb-net-smsc95xx TITLE:=SMSC LAN95XX based USB 2.0 10/100 ethernet devices - DEPENDS:=+kmod-libphy + DEPENDS:=+kmod-libphy +kmod-phy-smsc KCONFIG:=CONFIG_USB_NET_SMSC95XX FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc95xx.ko AUTOLOAD:=$(call AutoProbe,smsc95xx) From 37c0d15a8e9eb30920091bff1bf466640bc64dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20M=C3=B6rlein?= Date: Tue, 9 Aug 2022 21:54:04 +0200 Subject: [PATCH 26/80] pkg-config: always use correct path for pkg-config.real MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, it was assumed that pkg-config.real is in the PATH. While this was fine for the normal build workflow, this led to some issues if make TOPDIR="$(pwd)" -C "$pkgdir" compile was called manually. The command failed with Makefile:15: *** No libnl-tiny development libraries found!. Stop. make[1]: Leaving directory since pkg-config of the host system was used. After the commit, the package is built sucessfully. Signed-off-by: Leonardo Mörlein --- tools/pkgconf/files/pkg-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pkgconf/files/pkg-config b/tools/pkgconf/files/pkg-config index 91d144d9b1..65e0fb09f5 100755 --- a/tools/pkgconf/files/pkg-config +++ b/tools/pkgconf/files/pkg-config @@ -1,6 +1,6 @@ #!/bin/sh -pkg-config.real \ +${STAGING_DIR_HOST}/bin/pkg-config.real \ --keep-system-cflags \ --keep-system-libs \ --define-variable=prefix="${STAGING_PREFIX}" \ From 1ea563ae13637f55ec3a1a1056ba4f3595752a37 Mon Sep 17 00:00:00 2001 From: Manas Sambhus Date: Tue, 9 Aug 2022 13:14:40 +0530 Subject: [PATCH 27/80] base-files: wifi: add random MAC support for wifi-iface Add support for randomly generating a MAC address for a wifi-iface instance by setting `macaddr` to `random` When set to `random`, a new locally administered unicast MAC address is generated and assigned to the iface everytime it is (re-)configured Signed-off-by: Manas Sambhus --- package/kernel/mac80211/Makefile | 2 +- .../kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index afc10bdb5c..d467d20c61 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.15.58-1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/ PKG_HASH:=a3c2a2b7bbaf8943c65fd72f4e7d7ad5e205aeae28b26c835f9d8afa0f9810bf diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 5d6ca7c0e3..62afd9e6a0 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -1,6 +1,7 @@ #!/bin/sh . /lib/netifd/netifd-wireless.sh . /lib/netifd/hostapd.sh +. /lib/functions/system.sh init_wireless_driver "$@" @@ -667,10 +668,12 @@ mac80211_prepare_vif() { json_select .. - [ -n "$macaddr" ] || { + if [ -z "$macaddr" ]; then macaddr="$(mac80211_generate_mac $phy)" macidx="$(($macidx + 1))" - } + elif [ "$macaddr" = 'random' ]; then + macaddr="$(macaddr_random)" + fi json_add_object data json_add_string ifname "$ifname" From 7f5e70a534a9e4d1a326c617a6e1cd02f21257bf Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 10 Aug 2022 01:23:34 +0200 Subject: [PATCH 28/80] uboot-mediatek: mt7621: use silent stage1 by default Use faster and silent MT7621 stage1 blob by default unless CONFIG_DEBUG is selected. Signed-off-by: Daniel Golle --- package/boot/uboot-mediatek/Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index a994b8be4d..314cb8b84b 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk -MT7621_LOWLEVEL_PRELOADER_URL:=https://raw.githubusercontent.com/mtk-openwrt/mt7621-lowlevel-preloader/master/ +MT7621_LOWLEVEL_PRELOADER_URL:=https://raw.githubusercontent.com/mtk-openwrt/mt7621-lowlevel-preloader/a03b07c60bf1ba4add9b671d32caa102fe948180/ define Download/mt7621-stage-sram FILE:=mt7621_stage_sram.bin @@ -17,8 +17,18 @@ define Download/mt7621-stage-sram HASH:=1dda68aa089f0ff262e01539b990dea478952e9fb68bcc0a8cd6f76f0135c62e endef +define Download/mt7621-stage-sram-noprint + FILE:=mt7621_stage_sram_noprint.bin + URL:=$(MT7621_LOWLEVEL_PRELOADER_URL) + HASH:=8ee419275144fc298e9444d413d98e965a55d283152a74ea6a1f8de79eb516b6 +endef + ifdef CONFIG_TARGET_ramips_mt7621 +ifdef CONFIG_DEBUG $(eval $(call Download,mt7621-stage-sram)) +else +$(eval $(call Download,mt7621-stage-sram-noprint)) +endif endif define U-Boot/Default @@ -195,7 +205,11 @@ endef ifdef CONFIG_TARGET_ramips_mt7621 define Build/Prepare $(call Build/Prepare/Default) +ifdef CONFIG_DEBUG $(CP) $(DL_DIR)/mt7621_stage_sram.bin $(PKG_BUILD_DIR)/ +else + $(CP) $(DL_DIR)/mt7621_stage_sram_noprint.bin $(PKG_BUILD_DIR)/mt7621_stage_sram.bin +endif endef endif From 87e09b692bd8537abbb1c691cec8c642594a9141 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 10 Aug 2022 02:07:04 +0200 Subject: [PATCH 29/80] uboot-mediatek: backport pinctrl fix to avoid error message Import a3ba6adb70 arm: dts: mt7622: remove default pinctrl of uart0 and apply also to locally added boards. Signed-off-by: Daniel Golle --- ...7622-remove-default-pinctrl-of-uart0.patch | 45 +++++++++++++++++++ ...-update-bananapi-bpi-r64-device-tree.patch | 4 +- .../patches/410-add-linksys-e8450.patch | 4 +- .../patches/412-add-ubnt-unifi-6-lr.patch | 4 +- 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 package/boot/uboot-mediatek/patches/001-mtk-0100-arm-dts-mt7622-remove-default-pinctrl-of-uart0.patch diff --git a/package/boot/uboot-mediatek/patches/001-mtk-0100-arm-dts-mt7622-remove-default-pinctrl-of-uart0.patch b/package/boot/uboot-mediatek/patches/001-mtk-0100-arm-dts-mt7622-remove-default-pinctrl-of-uart0.patch new file mode 100644 index 0000000000..63e189f56c --- /dev/null +++ b/package/boot/uboot-mediatek/patches/001-mtk-0100-arm-dts-mt7622-remove-default-pinctrl-of-uart0.patch @@ -0,0 +1,45 @@ +From a3ba6adb70c91ec3b9312c3a025faa44acd39cfa Mon Sep 17 00:00:00 2001 +From: Weijie Gao +Date: Wed, 13 Jul 2022 11:16:39 +0800 +Subject: [PATCH] arm: dts: mt7622: remove default pinctrl of uart0 + +Currently u-boot running on mt7622 will print an warning log at beginning: +> serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 + +It turns out that the pinctrl uclass can't work properly in board_f stage. + +Since the uart0 is the default UART device used by bootrom, and will be +initialized in both bootrom and tf-a bl2. It's ok not to setup pinctrl for +uart0 in u-boot. + +This patch removes the default pinctrl of uart0 to suppress the unwanted +warning. + +Signed-off-by: Weijie Gao +--- + arch/arm/dts/mt7622-bananapi-bpi-r64.dts | 2 -- + arch/arm/dts/mt7622-rfb.dts | 2 -- + 2 files changed, 4 deletions(-) + +--- a/arch/arm/dts/mt7622-bananapi-bpi-r64.dts ++++ b/arch/arm/dts/mt7622-bananapi-bpi-r64.dts +@@ -182,8 +182,6 @@ + }; + + &uart0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins>; + status = "okay"; + }; + +--- a/arch/arm/dts/mt7622-rfb.dts ++++ b/arch/arm/dts/mt7622-rfb.dts +@@ -196,8 +196,6 @@ + }; + + &uart0 { +- pinctrl-names = "default"; +- pinctrl-0 = <&uart0_pins>; + status = "okay"; + }; + diff --git a/package/boot/uboot-mediatek/patches/402-update-bananapi-bpi-r64-device-tree.patch b/package/boot/uboot-mediatek/patches/402-update-bananapi-bpi-r64-device-tree.patch index 781a685721..7aa0ca9c88 100644 --- a/package/boot/uboot-mediatek/patches/402-update-bananapi-bpi-r64-device-tree.patch +++ b/package/boot/uboot-mediatek/patches/402-update-bananapi-bpi-r64-device-tree.patch @@ -51,7 +51,7 @@ reg_1p8v: regulator-1p8v { compatible = "regulator-fixed"; regulator-name = "fixed-1.8V"; -@@ -199,7 +236,7 @@ +@@ -197,7 +234,7 @@ status = "okay"; bus-width = <8>; max-frequency = <50000000>; @@ -60,7 +60,7 @@ vmmc-supply = <®_3p3v>; vqmmc-supply = <®_3p3v>; non-removable; -@@ -210,7 +247,7 @@ +@@ -208,7 +245,7 @@ pinctrl-0 = <&mmc1_pins_default>; status = "okay"; bus-width = <4>; diff --git a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch index c4a51aa442..decb485042 100644 --- a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch +++ b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch @@ -139,7 +139,7 @@ +CONFIG_USB_STORAGE=y --- /dev/null +++ b/arch/arm/dts/mt7622-linksys-e8450-ubi.dts -@@ -0,0 +1,195 @@ +@@ -0,0 +1,193 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019 MediaTek Inc. @@ -302,8 +302,6 @@ +}; + +&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins>; + status = "okay"; +}; + diff --git a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch index efe58f3042..1e5c4e8a16 100644 --- a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch +++ b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch @@ -144,7 +144,7 @@ +CONFIG_SPI_FLASH_XMC=y --- /dev/null +++ b/arch/arm/dts/mt7622-ubnt-unifi-6-lr.dts -@@ -0,0 +1,202 @@ +@@ -0,0 +1,200 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019 MediaTek Inc. @@ -311,8 +311,6 @@ +}; + +&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins>; + status = "okay"; +}; + From fa9895ee5bae9fa91b18b7a8e06bc63374b0a2a0 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 5 Aug 2022 14:06:22 +0200 Subject: [PATCH 30/80] tools: mkimage: update to U-Boot release 2022.07 Removed patch 090-macos-arm64-builing-fix.patch as an equivalent solution was applied upstream: 3b142045e8 Support building on macOS/arm64 To not add new host dependencies (libuuid, gnuTLS) don't build the anyway unused mkeficapsule tool which would otherwise now be built by default. Signed-off-by: Daniel Golle --- tools/mkimage/Makefile | 16 +++++++++++--- .../030-allow-to-use-different-magic.patch | 16 +++++++------- .../patches/090-macos-arm64-builing-fix.patch | 21 ------------------- ...0-increase-tmpfile-name-length-limit.patch | 4 ++-- 4 files changed, 23 insertions(+), 34 deletions(-) delete mode 100644 tools/mkimage/patches/090-macos-arm64-builing-fix.patch diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index fd5dad0cd8..a7c98e755e 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -7,26 +7,36 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mkimage -PKG_VERSION:=2022.01 +PKG_VERSION:=2022.07 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ https://mirror.cyberbits.eu/u-boot \ https://ftp.denx.de/pub/u-boot \ ftp://ftp.denx.de/pub/u-boot -PKG_HASH:=81b4543227db228c03f8a1bf5ddbc813b0bb8f6555ce46064ef721a6fc680413 +PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk +define Host/Configure + $(MAKE) -C $(HOST_BUILD_DIR) \ + HOSTCFLAGS="$(HOST_CFLAGS)" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" \ + PKG_CONFIG_EXTRAARGS="--static" \ + V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \ + tools-only_config + + sed -i 's/CONFIG_TOOLS_MKEFICAPSULE=y/# CONFIG_TOOLS_MKEFICAPSULE is not set/' $(HOST_BUILD_DIR)/.config +endef + define Host/Compile $(MAKE) -C $(HOST_BUILD_DIR) \ HOSTCFLAGS="$(HOST_CFLAGS)" \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \ PKG_CONFIG_EXTRAARGS="--static" \ V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \ - tools-only_config \ tools-only endef diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch index 936113595a..017f0b9b34 100644 --- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch +++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch @@ -2,7 +2,7 @@ This patch makes it possible to set a custom image magic. --- a/tools/mkimage.c +++ b/tools/mkimage.c -@@ -24,6 +24,7 @@ static struct image_tool_params params = +@@ -25,6 +25,7 @@ static struct image_tool_params params = .arch = IH_ARCH_PPC, .type = IH_TYPE_KERNEL, .comp = IH_COMP_GZIP, @@ -10,8 +10,8 @@ This patch makes it possible to set a custom image magic. .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS, .imagename = "", .imagename2 = "", -@@ -85,11 +86,12 @@ static void usage(const char *msg) - " -l ==> list image header information\n", +@@ -88,11 +89,12 @@ static void usage(const char *msg) + " -q ==> quiet\n", params.cmdname); fprintf(stderr, - " %s [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image\n" @@ -24,16 +24,16 @@ This patch makes it possible to set a custom image magic. " -a ==> set load address to 'addr' (hex)\n" " -e ==> set entry point to 'ep' (hex)\n" " -n ==> set image name to 'name'\n" -@@ -155,7 +157,7 @@ static void process_args(int argc, char +@@ -163,7 +165,7 @@ static void process_args(int argc, char int opt; while ((opt = getopt(argc, argv, -- "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) { -+ "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:O:rR:qstT:vVx")) != -1) { +- "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:o:O:rR:qstT:vVx")) != -1) { ++ "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:o:O:rR:qstT:vVx")) != -1) { switch (opt) { case 'a': params.addr = strtoull(optarg, &ptr, 16); -@@ -245,6 +247,14 @@ static void process_args(int argc, char +@@ -254,6 +256,14 @@ static void process_args(int argc, char case 'l': params.lflag = 1; break; @@ -61,7 +61,7 @@ This patch makes it possible to set a custom image magic. image_set_load(hdr, addr); --- a/tools/imagetool.h +++ b/tools/imagetool.h -@@ -56,6 +56,7 @@ struct image_tool_params { +@@ -59,6 +59,7 @@ struct image_tool_params { int arch; int type; int comp; diff --git a/tools/mkimage/patches/090-macos-arm64-builing-fix.patch b/tools/mkimage/patches/090-macos-arm64-builing-fix.patch deleted file mode 100644 index 9f842146f7..0000000000 --- a/tools/mkimage/patches/090-macos-arm64-builing-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -This patch fixes compilation issues on MacOS arm64. -Based on discussion -https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0 - ---- a/tools/imagetool.h -+++ b/tools/imagetool.h -@@ -272,11 +272,14 @@ int rockchip_copy_image(int fd, struct i - * b) we need a API call to get the respective section symbols */ - #if defined(__MACH__) - #include -+#include - - #define INIT_SECTION(name) do { \ - unsigned long name ## _len; \ - char *__cat(pstart_, name) = getsectdata("__DATA", \ - #name, &__cat(name, _len)); \ -+ __cat(pstart_, name) += \ -+ _dyld_get_image_vmaddr_slide(0); \ - char *__cat(pstop_, name) = __cat(pstart_, name) + \ - __cat(name, _len); \ - __cat(__start_, name) = (void *)__cat(pstart_, name); \ diff --git a/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch b/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch index d375f40f61..aae8935601 100644 --- a/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch +++ b/tools/mkimage/patches/100-increase-tmpfile-name-length-limit.patch @@ -1,7 +1,7 @@ --- a/tools/mkimage.h +++ b/tools/mkimage.h -@@ -42,7 +42,7 @@ static inline ulong map_to_sysmem(void * - } +@@ -44,7 +44,7 @@ static inline ulong map_to_sysmem(void * + #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size] #define MKIMAGE_TMPFILE_SUFFIX ".tmp" -#define MKIMAGE_MAX_TMPFILE_LEN 256 From 5238a87c20bc10dd7e87b4d1564e1f5660956fbd Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 11 Aug 2022 08:19:10 -0400 Subject: [PATCH 31/80] kernel: bump 5.15 to 5.15.60 All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia --- include/kernel-5.15 | 4 ++-- ...platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 716bcddf80..962cd0a3ad 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .59 -LINUX_KERNEL_HASH-5.15.59 = e6ddc642057340db06b3b921c2b31bfed2c611359e8f144c3e5cf9c3ac33bccb +LINUX_VERSION-5.15 = .60 +LINUX_KERNEL_HASH-5.15.60 = 2d9545f7c96faffd8407522011b9533adefd1360118494dfb6c862f2f15e237a diff --git a/target/linux/x86/patches-5.15/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch b/target/linux/x86/patches-5.15/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch index 3cff37c918..1be5c62424 100644 --- a/target/linux/x86/patches-5.15/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch +++ b/target/linux/x86/patches-5.15/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch @@ -23,7 +23,7 @@ Signed-off-by: Hans de Goede --- --- a/drivers/platform/x86/pmc_atom.c +++ b/drivers/platform/x86/pmc_atom.c -@@ -376,19 +376,15 @@ +@@ -376,19 +376,15 @@ static const struct dmi_system_id critcl }, }, { From 96ef2dabce1a5f102d53a15f33383193b47fd297 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 5 Mar 2022 19:08:27 +0100 Subject: [PATCH 32/80] kernel: Backport upstream flowtable patches from 5.15 This backports some patches from kernel 5.15 to fix issues with flowtable offloading in kernel 5.10. OpenWrt backports most of the patches related to flowtable offloading from kernel 5.15 already, but we are missing some of the extra fixes. This fixes some connection tracking problems when a flow gets removed from the offload and added to the normal SW path again. The patch 614-v5.18-netfilter-flowtable-fix-TCP-flow-teardown.patch was extended manually with the nf_conntrack_tcp_established() function. All changes are already included in kernel 5.15. Fixes: #8776 Signed-off-by: Hauke Mehrtens --- ...ble-Add-FLOW_OFFLOAD_XMIT_UNSPEC-xmi.patch | 41 ++++ ...owtable-avoid-possible-false-sharing.patch | 2 +- ...wtable-move-dst_check-to-packet-path.patch | 2 +- ...table-remove-nf_ct_l4proto_find-call.patch | 47 +++++ ...ack-remove-offload_pickup-sysctl-aga.patch | 184 ++++++++++++++++++ ...lter-flowtable-fix-TCP-flow-teardown.patch | 166 ++++++++++++++++ ...-netfilter-add-xt_FLOWOFFLOAD-target.patch | 6 +- ...-netfilter_optional_tcp_window_check.patch | 4 +- ...ble-fix-excessive-hw-offload-attempt.patch | 2 +- 9 files changed, 446 insertions(+), 8 deletions(-) create mode 100644 target/linux/generic/backport-5.10/610-v5.13-58-netfilter-flowtable-Add-FLOW_OFFLOAD_XMIT_UNSPEC-xmi.patch create mode 100644 target/linux/generic/backport-5.10/613-v5.15-01-netfilter-flowtable-remove-nf_ct_l4proto_find-call.patch create mode 100644 target/linux/generic/backport-5.10/613-v5.15-02-netfilter-conntrack-remove-offload_pickup-sysctl-aga.patch create mode 100644 target/linux/generic/backport-5.10/614-v5.18-netfilter-flowtable-fix-TCP-flow-teardown.patch diff --git a/target/linux/generic/backport-5.10/610-v5.13-58-netfilter-flowtable-Add-FLOW_OFFLOAD_XMIT_UNSPEC-xmi.patch b/target/linux/generic/backport-5.10/610-v5.13-58-netfilter-flowtable-Add-FLOW_OFFLOAD_XMIT_UNSPEC-xmi.patch new file mode 100644 index 0000000000..62edb2c811 --- /dev/null +++ b/target/linux/generic/backport-5.10/610-v5.13-58-netfilter-flowtable-Add-FLOW_OFFLOAD_XMIT_UNSPEC-xmi.patch @@ -0,0 +1,41 @@ +From 78ed0a9bc6db76f8e5f5f4cb0d2b2f0d1bb21b24 Mon Sep 17 00:00:00 2001 +From: Roi Dayan +Date: Tue, 13 Apr 2021 11:06:05 +0300 +Subject: [PATCH] netfilter: flowtable: Add FLOW_OFFLOAD_XMIT_UNSPEC xmit type + +It could be xmit type was not set and would default to FLOW_OFFLOAD_XMIT_NEIGH +and in this type the gc expect to have a route info. +Fix that by adding FLOW_OFFLOAD_XMIT_UNSPEC which defaults to 0. + +Fixes: 8b9229d15877 ("netfilter: flowtable: dst_check() from garbage collector path") +Signed-off-by: Roi Dayan +Signed-off-by: Pablo Neira Ayuso +--- + include/net/netfilter/nf_flow_table.h | 3 ++- + net/netfilter/nf_flow_table_core.c | 3 +++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +--- a/include/net/netfilter/nf_flow_table.h ++++ b/include/net/netfilter/nf_flow_table.h +@@ -90,7 +90,8 @@ enum flow_offload_tuple_dir { + #define FLOW_OFFLOAD_DIR_MAX IP_CT_DIR_MAX + + enum flow_offload_xmit_type { +- FLOW_OFFLOAD_XMIT_NEIGH = 0, ++ FLOW_OFFLOAD_XMIT_UNSPEC = 0, ++ FLOW_OFFLOAD_XMIT_NEIGH, + FLOW_OFFLOAD_XMIT_XFRM, + FLOW_OFFLOAD_XMIT_DIRECT, + }; +--- a/net/netfilter/nf_flow_table_core.c ++++ b/net/netfilter/nf_flow_table_core.c +@@ -130,6 +130,9 @@ static int flow_offload_fill_route(struc + flow_tuple->dst_cache = dst; + flow_tuple->dst_cookie = flow_offload_dst_cookie(flow_tuple); + break; ++ default: ++ WARN_ON_ONCE(1); ++ break; + } + flow_tuple->xmit_type = route->tuple[dir].xmit_type; + diff --git a/target/linux/generic/backport-5.10/610-v5.15-58-netfilter-flowtable-avoid-possible-false-sharing.patch b/target/linux/generic/backport-5.10/610-v5.15-58-netfilter-flowtable-avoid-possible-false-sharing.patch index 69c06c51d8..a3d0a35923 100644 --- a/target/linux/generic/backport-5.10/610-v5.15-58-netfilter-flowtable-avoid-possible-false-sharing.patch +++ b/target/linux/generic/backport-5.10/610-v5.15-58-netfilter-flowtable-avoid-possible-false-sharing.patch @@ -12,7 +12,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -328,7 +328,11 @@ EXPORT_SYMBOL_GPL(flow_offload_add); +@@ -331,7 +331,11 @@ EXPORT_SYMBOL_GPL(flow_offload_add); void flow_offload_refresh(struct nf_flowtable *flow_table, struct flow_offload *flow) { diff --git a/target/linux/generic/backport-5.10/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch b/target/linux/generic/backport-5.10/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch index 99e40b9378..53118939a3 100644 --- a/target/linux/generic/backport-5.10/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch +++ b/target/linux/generic/backport-5.10/610-v5.18-netfilter-flowtable-move-dst_check-to-packet-path.patch @@ -20,7 +20,7 @@ Signed-off-by: Pablo Neira Ayuso --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -433,33 +433,12 @@ nf_flow_table_iterate(struct nf_flowtabl +@@ -436,33 +436,12 @@ nf_flow_table_iterate(struct nf_flowtabl return err; } diff --git a/target/linux/generic/backport-5.10/613-v5.15-01-netfilter-flowtable-remove-nf_ct_l4proto_find-call.patch b/target/linux/generic/backport-5.10/613-v5.15-01-netfilter-flowtable-remove-nf_ct_l4proto_find-call.patch new file mode 100644 index 0000000000..72accec50c --- /dev/null +++ b/target/linux/generic/backport-5.10/613-v5.15-01-netfilter-flowtable-remove-nf_ct_l4proto_find-call.patch @@ -0,0 +1,47 @@ +From 92fb15513edc6ae1eb51f717e70d4d3d538c2d09 Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +Date: Mon, 19 Jul 2021 18:04:01 +0200 +Subject: [PATCH] netfilter: flowtable: remove nf_ct_l4proto_find() call + +TCP and UDP are built-in conntrack protocol trackers and the flowtable +only supports for TCP and UDP, remove this call. + +Signed-off-by: Pablo Neira Ayuso +--- + net/netfilter/nf_flow_table_core.c | 10 ---------- + 1 file changed, 10 deletions(-) + +--- a/net/netfilter/nf_flow_table_core.c ++++ b/net/netfilter/nf_flow_table_core.c +@@ -180,15 +180,10 @@ static void flow_offload_fixup_tcp(struc + + static void flow_offload_fixup_ct_timeout(struct nf_conn *ct) + { +- const struct nf_conntrack_l4proto *l4proto; + struct net *net = nf_ct_net(ct); + int l4num = nf_ct_protonum(ct); + unsigned int timeout; + +- l4proto = nf_ct_l4proto_find(l4num); +- if (!l4proto) +- return; +- + if (l4num == IPPROTO_TCP) { + struct nf_tcp_net *tn = nf_tcp_pernet(net); + +@@ -273,15 +268,10 @@ static const struct rhashtable_params nf + + unsigned long flow_offload_get_timeout(struct flow_offload *flow) + { +- const struct nf_conntrack_l4proto *l4proto; + unsigned long timeout = NF_FLOW_TIMEOUT; + struct net *net = nf_ct_net(flow->ct); + int l4num = nf_ct_protonum(flow->ct); + +- l4proto = nf_ct_l4proto_find(l4num); +- if (!l4proto) +- return timeout; +- + if (l4num == IPPROTO_TCP) { + struct nf_tcp_net *tn = nf_tcp_pernet(net); + diff --git a/target/linux/generic/backport-5.10/613-v5.15-02-netfilter-conntrack-remove-offload_pickup-sysctl-aga.patch b/target/linux/generic/backport-5.10/613-v5.15-02-netfilter-conntrack-remove-offload_pickup-sysctl-aga.patch new file mode 100644 index 0000000000..0ed23e9614 --- /dev/null +++ b/target/linux/generic/backport-5.10/613-v5.15-02-netfilter-conntrack-remove-offload_pickup-sysctl-aga.patch @@ -0,0 +1,184 @@ +From 4592ee7f525c4683ec9e290381601fdee50ae110 Mon Sep 17 00:00:00 2001 +From: Florian Westphal +Date: Wed, 4 Aug 2021 15:02:15 +0200 +Subject: [PATCH] netfilter: conntrack: remove offload_pickup sysctl again + +These two sysctls were added because the hardcoded defaults (2 minutes, +tcp, 30 seconds, udp) turned out to be too low for some setups. + +They appeared in 5.14-rc1 so it should be fine to remove it again. + +Marcelo convinced me that there should be no difference between a flow +that was offloaded vs. a flow that was not wrt. timeout handling. +Thus the default is changed to those for TCP established and UDP stream, +5 days and 120 seconds, respectively. + +Marcelo also suggested to account for the timeout value used for the +offloading, this avoids increase beyond the value in the conntrack-sysctl +and will also instantly expire the conntrack entry with altered sysctls. + +Example: + nf_conntrack_udp_timeout_stream=60 + nf_flowtable_udp_timeout=60 + +This will remove offloaded udp flows after one minute, rather than two. + +An earlier version of this patch also cleared the ASSURED bit to +allow nf_conntrack to evict the entry via early_drop (i.e., table full). +However, it looks like we can safely assume that connection timed out +via HW is still in established state, so this isn't needed. + +Quoting Oz: + [..] the hardware sends all packets with a set FIN flags to sw. + [..] Connections that are aged in hardware are expected to be in the + established state. + +In case it turns out that back-to-sw-path transition can occur for +'dodgy' connections too (e.g., one side disappeared while software-path +would have been in RETRANS timeout), we can adjust this later. + +Cc: Oz Shlomo +Cc: Paul Blakey +Suggested-by: Marcelo Ricardo Leitner +Signed-off-by: Florian Westphal +Reviewed-by: Marcelo Ricardo Leitner +Reviewed-by: Oz Shlomo +Signed-off-by: Pablo Neira Ayuso +--- + Documentation/networking/nf_conntrack-sysctl.rst | 10 ---------- + include/net/netns/conntrack.h | 2 -- + net/netfilter/nf_conntrack_proto_tcp.c | 1 - + net/netfilter/nf_conntrack_proto_udp.c | 1 - + net/netfilter/nf_conntrack_standalone.c | 16 ---------------- + net/netfilter/nf_flow_table_core.c | 11 ++++++++--- + 6 files changed, 8 insertions(+), 33 deletions(-) + +--- a/include/net/netns/conntrack.h ++++ b/include/net/netns/conntrack.h +@@ -29,7 +29,6 @@ struct nf_tcp_net { + int tcp_max_retrans; + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + unsigned int offload_timeout; +- unsigned int offload_pickup; + #endif + }; + +@@ -43,7 +42,6 @@ struct nf_udp_net { + unsigned int timeouts[UDP_CT_MAX]; + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + unsigned int offload_timeout; +- unsigned int offload_pickup; + #endif + }; + +--- a/net/netfilter/nf_conntrack_proto_tcp.c ++++ b/net/netfilter/nf_conntrack_proto_tcp.c +@@ -1450,7 +1450,6 @@ void nf_conntrack_tcp_init_net(struct ne + + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + tn->offload_timeout = 30 * HZ; +- tn->offload_pickup = 120 * HZ; + #endif + } + +--- a/net/netfilter/nf_conntrack_proto_udp.c ++++ b/net/netfilter/nf_conntrack_proto_udp.c +@@ -276,7 +276,6 @@ void nf_conntrack_udp_init_net(struct ne + + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + un->offload_timeout = 30 * HZ; +- un->offload_pickup = 30 * HZ; + #endif + } + +--- a/net/netfilter/nf_conntrack_standalone.c ++++ b/net/netfilter/nf_conntrack_standalone.c +@@ -569,7 +569,6 @@ enum nf_ct_sysctl_index { + NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_UNACK, + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD, +- NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD_PICKUP, + #endif + NF_SYSCTL_CT_PROTO_TCP_LOOSE, + NF_SYSCTL_CT_PROTO_TCP_LIBERAL, +@@ -578,7 +577,6 @@ enum nf_ct_sysctl_index { + NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_STREAM, + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD, +- NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD_PICKUP, + #endif + NF_SYSCTL_CT_PROTO_TIMEOUT_ICMP, + NF_SYSCTL_CT_PROTO_TIMEOUT_ICMPV6, +@@ -773,12 +771,6 @@ static struct ctl_table nf_ct_sysctl_tab + .mode = 0644, + .proc_handler = proc_dointvec_jiffies, + }, +- [NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD_PICKUP] = { +- .procname = "nf_flowtable_tcp_pickup", +- .maxlen = sizeof(unsigned int), +- .mode = 0644, +- .proc_handler = proc_dointvec_jiffies, +- }, + #endif + [NF_SYSCTL_CT_PROTO_TCP_LOOSE] = { + .procname = "nf_conntrack_tcp_loose", +@@ -821,12 +813,6 @@ static struct ctl_table nf_ct_sysctl_tab + .mode = 0644, + .proc_handler = proc_dointvec_jiffies, + }, +- [NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD_PICKUP] = { +- .procname = "nf_flowtable_udp_pickup", +- .maxlen = sizeof(unsigned int), +- .mode = 0644, +- .proc_handler = proc_dointvec_jiffies, +- }, + #endif + [NF_SYSCTL_CT_PROTO_TIMEOUT_ICMP] = { + .procname = "nf_conntrack_icmp_timeout", +@@ -1006,7 +992,6 @@ static void nf_conntrack_standalone_init + + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + table[NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD].data = &tn->offload_timeout; +- table[NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD_PICKUP].data = &tn->offload_pickup; + #endif + + } +@@ -1098,7 +1083,6 @@ static int nf_conntrack_standalone_init_ + table[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_STREAM].data = &un->timeouts[UDP_CT_REPLIED]; + #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) + table[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD].data = &un->offload_timeout; +- table[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD_PICKUP].data = &un->offload_pickup; + #endif + + nf_conntrack_standalone_init_tcp_sysctl(net, table); +--- a/net/netfilter/nf_flow_table_core.c ++++ b/net/netfilter/nf_flow_table_core.c +@@ -182,20 +182,25 @@ static void flow_offload_fixup_ct_timeou + { + struct net *net = nf_ct_net(ct); + int l4num = nf_ct_protonum(ct); +- unsigned int timeout; ++ s32 timeout; + + if (l4num == IPPROTO_TCP) { + struct nf_tcp_net *tn = nf_tcp_pernet(net); + +- timeout = tn->offload_pickup; ++ timeout = tn->timeouts[TCP_CONNTRACK_ESTABLISHED]; ++ timeout -= tn->offload_timeout; + } else if (l4num == IPPROTO_UDP) { + struct nf_udp_net *tn = nf_udp_pernet(net); + +- timeout = tn->offload_pickup; ++ timeout = tn->timeouts[UDP_CT_REPLIED]; ++ timeout -= tn->offload_timeout; + } else { + return; + } + ++ if (timeout < 0) ++ timeout = 0; ++ + if (nf_flow_timeout_delta(READ_ONCE(ct->timeout)) > (__s32)timeout) + WRITE_ONCE(ct->timeout, nfct_time_stamp + timeout); + } diff --git a/target/linux/generic/backport-5.10/614-v5.18-netfilter-flowtable-fix-TCP-flow-teardown.patch b/target/linux/generic/backport-5.10/614-v5.18-netfilter-flowtable-fix-TCP-flow-teardown.patch new file mode 100644 index 0000000000..1b422ca4af --- /dev/null +++ b/target/linux/generic/backport-5.10/614-v5.18-netfilter-flowtable-fix-TCP-flow-teardown.patch @@ -0,0 +1,166 @@ +From b8835ba8c029b5c9ada5666754526c2b00f7ea80 Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +Date: Tue, 17 May 2022 10:44:14 +0200 +Subject: netfilter: flowtable: fix TCP flow teardown + +[ Upstream commit e5eaac2beb54f0a16ff851125082d9faeb475572 ] + +This patch addresses three possible problems: + +1. ct gc may race to undo the timeout adjustment of the packet path, leaving + the conntrack entry in place with the internal offload timeout (one day). + +2. ct gc removes the ct because the IPS_OFFLOAD_BIT is not set and the CLOSE + timeout is reached before the flow offload del. + +3. tcp ct is always set to ESTABLISHED with a very long timeout + in flow offload teardown/delete even though the state might be already + CLOSED. Also as a remark we cannot assume that the FIN or RST packet + is hitting flow table teardown as the packet might get bumped to the + slow path in nftables. + +This patch resets IPS_OFFLOAD_BIT from flow_offload_teardown(), so +conntrack handles the tcp rst/fin packet which triggers the CLOSE/FIN +state transition. + +Moreover, teturn the connection's ownership to conntrack upon teardown +by clearing the offload flag and fixing the established timeout value. +The flow table GC thread will asynchonrnously free the flow table and +hardware offload entries. + +Before this patch, the IPS_OFFLOAD_BIT remained set for expired flows on +which is also misleading since the flow is back to classic conntrack +path. + +If nf_ct_delete() removes the entry from the conntrack table, then it +calls nf_ct_put() which decrements the refcnt. This is not a problem +because the flowtable holds a reference to the conntrack object from +flow_offload_alloc() path which is released via flow_offload_free(). + +This patch also updates nft_flow_offload to skip packets in SYN_RECV +state. Since we might miss or bump packets to slow path, we do not know +what will happen there while we are still in SYN_RECV, this patch +postpones offload up to the next packet which also aligns to the +existing behaviour in tc-ct. + +flow_offload_teardown() does not reset the existing tcp state from +flow_offload_fixup_tcp() to ESTABLISHED anymore, packets bump to slow +path might have already update the state to CLOSE/FIN. + +Joint work with Oz and Sven. + +Fixes: 1e5b2471bcc4 ("netfilter: nf_flow_table: teardown flow timeout race") +Signed-off-by: Oz Shlomo +Signed-off-by: Sven Auhagen +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Sasha Levin +--- + net/netfilter/nf_flow_table_core.c | 33 +++++++----------------------- + net/netfilter/nft_flow_offload.c | 3 ++- + 2 files changed, 9 insertions(+), 27 deletions(-) + +--- a/net/netfilter/nf_flow_table_core.c ++++ b/net/netfilter/nf_flow_table_core.c +@@ -173,12 +173,11 @@ EXPORT_SYMBOL_GPL(flow_offload_route_ini + + static void flow_offload_fixup_tcp(struct ip_ct_tcp *tcp) + { +- tcp->state = TCP_CONNTRACK_ESTABLISHED; + tcp->seen[0].td_maxwin = 0; + tcp->seen[1].td_maxwin = 0; + } + +-static void flow_offload_fixup_ct_timeout(struct nf_conn *ct) ++static void flow_offload_fixup_ct(struct nf_conn *ct) + { + struct net *net = nf_ct_net(ct); + int l4num = nf_ct_protonum(ct); +@@ -187,7 +186,9 @@ static void flow_offload_fixup_ct_timeou + if (l4num == IPPROTO_TCP) { + struct nf_tcp_net *tn = nf_tcp_pernet(net); + +- timeout = tn->timeouts[TCP_CONNTRACK_ESTABLISHED]; ++ flow_offload_fixup_tcp(&ct->proto.tcp); ++ ++ timeout = tn->timeouts[ct->proto.tcp.state]; + timeout -= tn->offload_timeout; + } else if (l4num == IPPROTO_UDP) { + struct nf_udp_net *tn = nf_udp_pernet(net); +@@ -205,18 +206,6 @@ static void flow_offload_fixup_ct_timeou + WRITE_ONCE(ct->timeout, nfct_time_stamp + timeout); + } + +-static void flow_offload_fixup_ct_state(struct nf_conn *ct) +-{ +- if (nf_ct_protonum(ct) == IPPROTO_TCP) +- flow_offload_fixup_tcp(&ct->proto.tcp); +-} +- +-static void flow_offload_fixup_ct(struct nf_conn *ct) +-{ +- flow_offload_fixup_ct_state(ct); +- flow_offload_fixup_ct_timeout(ct); +-} +- + static void flow_offload_route_release(struct flow_offload *flow) + { + nft_flow_dst_release(flow, FLOW_OFFLOAD_DIR_ORIGINAL); +@@ -353,22 +342,14 @@ static void flow_offload_del(struct nf_f + rhashtable_remove_fast(&flow_table->rhashtable, + &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].node, + nf_flow_offload_rhash_params); +- +- clear_bit(IPS_OFFLOAD_BIT, &flow->ct->status); +- +- if (nf_flow_has_expired(flow)) +- flow_offload_fixup_ct(flow->ct); +- else +- flow_offload_fixup_ct_timeout(flow->ct); +- + flow_offload_free(flow); + } + + void flow_offload_teardown(struct flow_offload *flow) + { ++ clear_bit(IPS_OFFLOAD_BIT, &flow->ct->status); + set_bit(NF_FLOW_TEARDOWN, &flow->flags); +- +- flow_offload_fixup_ct_state(flow->ct); ++ flow_offload_fixup_ct(flow->ct); + } + EXPORT_SYMBOL_GPL(flow_offload_teardown); + +@@ -437,7 +418,7 @@ static void nf_flow_offload_gc_step(stru + + if (nf_flow_has_expired(flow) || + nf_ct_is_dying(flow->ct)) +- set_bit(NF_FLOW_TEARDOWN, &flow->flags); ++ flow_offload_teardown(flow); + + if (test_bit(NF_FLOW_TEARDOWN, &flow->flags)) { + if (test_bit(NF_FLOW_HW, &flow->flags)) { +--- a/net/netfilter/nft_flow_offload.c ++++ b/net/netfilter/nft_flow_offload.c +@@ -268,6 +268,12 @@ static bool nft_flow_offload_skip(struct + return false; + } + ++static bool nf_conntrack_tcp_established(const struct nf_conn *ct) ++{ ++ return ct->proto.tcp.state == TCP_CONNTRACK_ESTABLISHED && ++ test_bit(IPS_ASSURED_BIT, &ct->status); ++} ++ + static void nft_flow_offload_eval(const struct nft_expr *expr, + struct nft_regs *regs, + const struct nft_pktinfo *pkt) +@@ -293,7 +299,8 @@ static void nft_flow_offload_eval(const + case IPPROTO_TCP: + tcph = skb_header_pointer(pkt->skb, pkt->xt.thoff, + sizeof(_tcph), &_tcph); +- if (unlikely(!tcph || tcph->fin || tcph->rst)) ++ if (unlikely(!tcph || tcph->fin || tcph->rst || ++ !nf_conntrack_tcp_established(ct))) + goto out; + break; + case IPPROTO_UDP: diff --git a/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch index 6252f9a418..7037194eee 100644 --- a/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch +++ b/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch @@ -821,7 +821,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -401,8 +400,7 @@ flow_offload_lookup(struct nf_flowtable +@@ -380,8 +379,7 @@ flow_offload_lookup(struct nf_flowtable } EXPORT_SYMBOL_GPL(flow_offload_lookup); @@ -831,7 +831,7 @@ Signed-off-by: Felix Fietkau void (*iter)(struct flow_offload *flow, void *data), void *data) { -@@ -434,6 +432,7 @@ nf_flow_table_iterate(struct nf_flowtabl +@@ -413,6 +411,7 @@ nf_flow_table_iterate(struct nf_flowtabl return err; } @@ -861,7 +861,7 @@ Signed-off-by: Felix Fietkau +#endif /* _XT_FLOWOFFLOAD_H */ --- a/include/net/netfilter/nf_flow_table.h +++ b/include/net/netfilter/nf_flow_table.h -@@ -270,6 +270,10 @@ void nf_flow_table_free(struct nf_flowta +@@ -271,6 +271,10 @@ void nf_flow_table_free(struct nf_flowta void flow_offload_teardown(struct flow_offload *flow); diff --git a/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch index 4cf07a3e2c..458b6761bc 100644 --- a/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch +++ b/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch @@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau static bool enable_hooks __read_mostly; MODULE_PARM_DESC(enable_hooks, "Always enable conntrack hooks"); module_param(enable_hooks, bool, 0000); -@@ -660,6 +663,7 @@ enum nf_ct_sysctl_index { +@@ -658,6 +661,7 @@ enum nf_ct_sysctl_index { NF_SYSCTL_CT_PROTO_TIMEOUT_GRE_STREAM, #endif @@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau __NF_SYSCTL_CT_LAST_SYSCTL, }; -@@ -1014,6 +1018,13 @@ static struct ctl_table nf_ct_sysctl_tab +@@ -1000,6 +1004,13 @@ static struct ctl_table nf_ct_sysctl_tab .proc_handler = proc_dointvec_jiffies, }, #endif diff --git a/target/linux/generic/pending-5.10/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch b/target/linux/generic/pending-5.10/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch index c15f090f71..67a72f825a 100644 --- a/target/linux/generic/pending-5.10/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch +++ b/target/linux/generic/pending-5.10/704-00-netfilter-flowtable-fix-excessive-hw-offload-attempt.patch @@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -331,8 +331,10 @@ void flow_offload_refresh(struct nf_flow +@@ -318,8 +318,10 @@ void flow_offload_refresh(struct nf_flow u32 timeout; timeout = nf_flowtable_time_stamp + flow_offload_get_timeout(flow); From 2239ead6eb63933d80e0c26dd95ba684fdd74006 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 11 Aug 2022 08:37:14 -0400 Subject: [PATCH 33/80] kernel: bump 5.10 to 5.10.136 All patches automatically rebased. Signed-off-by: John Audia --- include/kernel-5.10 | 4 ++-- ...platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 8a4895d91b..14b00f4002 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .135 -LINUX_KERNEL_HASH-5.10.135 = e499a61be9ce670716dd27b5124bb9ef6c6bc0e8fab443abf717a77136543344 +LINUX_VERSION-5.10 = .136 +LINUX_KERNEL_HASH-5.10.136 = 1c099d0d59e7d9f671dfc947e16891b7a3a45efd7dfcc6b1e55a194961e45159 diff --git a/target/linux/x86/patches-5.10/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch b/target/linux/x86/patches-5.10/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch index 3cff37c918..1be5c62424 100644 --- a/target/linux/x86/patches-5.10/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch +++ b/target/linux/x86/patches-5.10/113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch @@ -23,7 +23,7 @@ Signed-off-by: Hans de Goede --- --- a/drivers/platform/x86/pmc_atom.c +++ b/drivers/platform/x86/pmc_atom.c -@@ -376,19 +376,15 @@ +@@ -376,19 +376,15 @@ static const struct dmi_system_id critcl }, }, { From 1291a682f855f6d8814134771f9923f4f80b524f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 12 Aug 2022 11:02:44 +0200 Subject: [PATCH 34/80] kernel: kmod-input-gpio-keys-polled depends on kmod-input-core While kmod-input-core was previously indirectly selected by kmod-input-polldev, this is now only the case on Linux 5.10. Select kmod-input-core as dependency independently of the kernel version to fix build error: Package kmod-input-gpio-keys-polled is missing dependencies for the following libraries: input-core.ko Fixes: 54878fbbdd ("kernel: kmod-input-polldev: Depend on kernel 5.10") Signed-off-by: Daniel Golle --- package/kernel/linux/modules/input.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk index b0ab3360cc..6270cdeb3b 100644 --- a/package/kernel/linux/modules/input.mk +++ b/package/kernel/linux/modules/input.mk @@ -92,7 +92,7 @@ $(eval $(call KernelPackage,input-gpio-keys)) define KernelPackage/input-gpio-keys-polled SUBMENU:=$(INPUT_MODULES_MENU) TITLE:=Polled GPIO key support - DEPENDS:=@GPIO_SUPPORT +LINUX_5_10:kmod-input-polldev + DEPENDS:=@GPIO_SUPPORT +kmod-input-core +LINUX_5_10:kmod-input-polldev KCONFIG:= \ CONFIG_KEYBOARD_GPIO_POLLED \ CONFIG_INPUT_KEYBOARD=y From 68cd4dc3ed6e50988bcc4f1eaeec9902677f109b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 12 Aug 2022 12:02:04 +0200 Subject: [PATCH 35/80] mkimage: fix validation of legacy images with custom magic All images generated by mkimage are now always validated. This change broke our downstream support for setting a custom value for IH_MAGIC (mkimage -M ...). Make sure also plain legacy kernel images with custom value set for IH_MAGIC validate correctly. Fixes: fa9895ee5b ("tools: mkimage: update to U-Boot release 2022.07") Signed-off-by: Daniel Golle --- .../patches/030-allow-to-use-different-magic.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch index 017f0b9b34..b97cd819cc 100644 --- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch +++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch @@ -50,6 +50,15 @@ This patch makes it possible to set a custom image magic. break; --- a/tools/default_image.c +++ b/tools/default_image.c +@@ -56,7 +56,7 @@ static int image_verify_header(unsigned + */ + memcpy(hdr, ptr, sizeof(image_header_t)); + +- if (be32_to_cpu(hdr->ih_magic) != IH_MAGIC) { ++ if (be32_to_cpu(hdr->ih_magic) != params->magic) { + debug("%s: Bad Magic Number: \"%s\" is no valid image\n", + params->cmdname, params->imagefile); + return -FDT_ERR_BADMAGIC; @@ -120,7 +120,7 @@ static void image_set_header(void *ptr, } From 885f04b30556edddb9378c5e9eb561334e44ac7a Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 3 Aug 2022 09:54:06 +0200 Subject: [PATCH 36/80] fstools: add uci fstab section to conffiles for package block-mount The command 'opkg search /etc/config/fstab' does not return a package name for this config file. In order to know to which package this config file belongs to, a 'conffiles' entry was made for this file to package 'block-mount'. Signed-off-by: Florian Eckert --- package/system/fstools/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index b97b79e324..8f39112191 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -75,6 +75,10 @@ define Package/snapshot-tool DEPENDS:=+libubox +fstools endef +define Package/block-mount/conffiles +/etc/config/fstab +endef + define Package/block-mount SECTION:=base CATEGORY:=Base system From c0109537d13650e3cfd4d4840c571a0d557b303a Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 12 Aug 2022 22:16:00 +0200 Subject: [PATCH 37/80] arm-trusted-firmware-mediatek: skip bad blocks on SPI-NAND (SNFI) Add patch to skip bad blocks when reading from SPI-NAND. This is needed in case erase block(s) early in the flash inside the FIP area are bad and hence need to be skipped in order to be able to boot on such damaged chips. Signed-off-by: Daniel Golle --- ...t7622-bl2_boot_snand-skip-bad-blocks.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch diff --git a/package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch b/package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch new file mode 100644 index 0000000000..31384d010e --- /dev/null +++ b/package/boot/arm-trusted-firmware-mediatek/patches/120-mt7622-bl2_boot_snand-skip-bad-blocks.patch @@ -0,0 +1,40 @@ +--- a/plat/mediatek/mt7622/bl2_boot_snand.c ++++ b/plat/mediatek/mt7622/bl2_boot_snand.c +@@ -21,6 +21,10 @@ + #define FIP_BASE 0x80000 + #define FIP_SIZE 0x200000 + ++#ifndef NMBM ++#define SNAND_MAX_BAD_BLOCK 3 ++#endif ++ + struct snfi_gpio_mux_info { + const uint32_t *pins; + uint32_t count; +@@ -45,12 +49,26 @@ static size_t snand_read_range(int lba, + size_t sizeremain = size, chunksize; + uint64_t off = lba * cinfo.pagesize; + uint8_t *ptr = (uint8_t *)buf; ++ struct mtk_snand_chip_info info; ++ unsigned int bad_blocks = 0; + int ret = 0; + + if (!snf) + return 0; + ++ ret = mtk_snand_get_chip_info(snf, &info); ++ if (ret) ++ return 0; ++ + while (sizeremain) { ++ while (mtk_snand_block_isbad(snf, off)) { ++ if (bad_blocks > SNAND_MAX_BAD_BLOCK) ++ return size - sizeremain; ++ ++ off += info.blocksize; ++ ++bad_blocks; ++ } ++ + chunksize = cinfo.pagesize; + if (chunksize > sizeremain) + chunksize = sizeremain; From d73e11b9c86e97beb149e82abe08cfb7ff748505 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 19:56:41 +0200 Subject: [PATCH 38/80] tools: e2fsprogs: Update to version 1.46.5 Update to most recent version of e2fsprogs and sync with version from package folder. Signed-off-by: Hauke Mehrtens --- tools/e2fsprogs/Makefile | 4 ++-- tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile index f8ca482224..004a04ea26 100644 --- a/tools/e2fsprogs/Makefile +++ b/tools/e2fsprogs/Makefile @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs -PKG_VERSION:=1.46.4 -PKG_HASH:=b11042533c1b1dcf17512f0da48e05b0c573dada1dd8b762864d10f4dc399713 +PKG_VERSION:=1.46.5 +PKG_HASH:=2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch b/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch index 9b9b06d540..c94c609160 100644 --- a/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch +++ b/tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch @@ -1,6 +1,6 @@ --- a/e2fsck/e2fsck.h +++ b/e2fsck/e2fsck.h -@@ -74,7 +74,7 @@ +@@ -81,7 +81,7 @@ * Exit codes used by fsck-type programs */ #define FSCK_OK 0 /* No errors */ From 3efe595df9426c2e850e6009da5fb793b776d4e6 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 19:58:19 +0200 Subject: [PATCH 39/80] tools: elfutils: Update to version 0.187 Update to most recent version of elfutils and sync with version from package folder. Signed-off-by: Hauke Mehrtens --- tools/elfutils/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile index d49bc07f27..92a916ec4d 100644 --- a/tools/elfutils/Makefile +++ b/tools/elfutils/Makefile @@ -3,12 +3,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.186 +PKG_VERSION:=0.187 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177 +PKG_HASH:=e70b0dfbe610f90c4d1fe0d71af142a4e25c3c4ef9ebab8d2d72b65159d454c8 PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3 From 67efb6a66146ac80986de928197b8116b2421779 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 19:59:42 +0200 Subject: [PATCH 40/80] tools: mtd-utils: Update to version 2.1.4 Update to most recent version of mtd-utils and sync with version from package folder. Use a https download server instead of ftp. Signed-off-by: Hauke Mehrtens --- tools/mtd-utils/Makefile | 6 +++--- tools/mtd-utils/patches/110-portability.patch | 12 ++++++------ tools/mtd-utils/patches/130-lzma_jffs2.patch | 11 ++++++++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile index 7eebcfb827..e4b951acfb 100644 --- a/tools/mtd-utils/Makefile +++ b/tools/mtd-utils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.1.2 +PKG_VERSION:=2.1.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/ -PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6 +PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/ +PKG_HASH:=2c6711d15d282c47cb3867b6857340597e26d332c238465134c602e5eef71b99 PKG_FIXUP:=autoreconf diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch index 181e40653a..73b97796a2 100644 --- a/tools/mtd-utils/patches/110-portability.patch +++ b/tools/mtd-utils/patches/110-portability.patch @@ -70,7 +70,7 @@ #include --- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c -@@ -1549,6 +1549,7 @@ static int add_inode(struct stat *st, in +@@ -1541,6 +1541,7 @@ static int add_inode(struct stat *st, in if (c->default_compr != UBIFS_COMPR_NONE) use_flags |= UBIFS_COMPR_FL; @@ -78,7 +78,7 @@ if (flags & FS_COMPR_FL) use_flags |= UBIFS_COMPR_FL; if (flags & FS_SYNC_FL) -@@ -1561,6 +1562,7 @@ static int add_inode(struct stat *st, in +@@ -1553,6 +1554,7 @@ static int add_inode(struct stat *st, in use_flags |= UBIFS_DIRSYNC_FL; if (fctx) use_flags |= UBIFS_CRYPT_FL; @@ -86,7 +86,7 @@ memset(ino, 0, UBIFS_INO_NODE_SZ); ino_key_init(&key, inum); -@@ -1646,7 +1648,9 @@ static int add_dir_inode(const char *pat +@@ -1638,7 +1640,9 @@ static int add_dir_inode(const char *pat fd = dirfd(dir); if (fd == -1) return sys_err_msg("dirfd failed"); @@ -96,7 +96,7 @@ flags = 0; } -@@ -1857,6 +1861,7 @@ static int add_file(const char *path_nam +@@ -1849,6 +1853,7 @@ static int add_file(const char *path_nam dn->ch.node_type = UBIFS_DATA_NODE; key_write(&key, &dn->key); out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ; @@ -104,7 +104,7 @@ if (c->default_compr == UBIFS_COMPR_NONE && !c->encrypted && (flags & FS_COMPR_FL)) #ifdef WITHOUT_LZO -@@ -1865,6 +1870,7 @@ static int add_file(const char *path_nam +@@ -1857,6 +1862,7 @@ static int add_file(const char *path_nam use_compr = UBIFS_COMPR_LZO; #endif else @@ -112,7 +112,7 @@ use_compr = c->default_compr; compr_type = compress_data(buf, bytes_read, &dn->data, &out_len, use_compr); -@@ -1924,7 +1930,9 @@ static int add_non_dir(const char *path_ +@@ -1916,7 +1922,9 @@ static int add_non_dir(const char *path_ if (fd == -1) return sys_err_msg("failed to open file '%s'", path_name); diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch index 9778aa6d0a..55930ddc86 100644 --- a/tools/mtd-utils/patches/130-lzma_jffs2.patch +++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch @@ -1,6 +1,6 @@ --- a/jffsX-utils/Makemodule.am +++ b/jffsX-utils/Makemodule.am -@@ -4,11 +4,19 @@ mkfs_jffs2_SOURCES = \ +@@ -4,7 +4,10 @@ mkfs_jffs2_SOURCES = \ jffsX-utils/compr_zlib.c \ jffsX-utils/compr.h \ jffsX-utils/rbtree.c \ @@ -10,7 +10,12 @@ + jffsX-utils/lzma/LzmaEnc.c \ + jffsX-utils/lzma/LzmaDec.c \ jffsX-utils/compr.c \ - jffsX-utils/compr_rtime.c + jffsX-utils/compr_rtime.c \ + jffsX-utils/compr.h \ +@@ -12,8 +15,13 @@ mkfs_jffs2_SOURCES = \ + jffsX-utils/summary.h \ + include/linux/jffs2.h \ + include/mtd/jffs2-user.h + +if !WITHOUT_LZO +mkfs_jffs2_SOURCES += jffsX-utils/compr_lzo.c @@ -20,7 +25,7 @@ -mkfs_jffs2_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) +mkfs_jffs2_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) -I./include/linux/lzma - jffs2reader_SOURCES = jffsX-utils/jffs2reader.c + jffs2reader_SOURCES = jffsX-utils/jffs2reader.c include/mtd/jffs2-user.h jffs2reader_LDADD = libmtd.a $(ZLIB_LIBS) $(LZO_LIBS) --- a/jffsX-utils/compr.c +++ b/jffsX-utils/compr.c From ead7e5b4c3a4043aa97cec6b08ae2f70f54834d3 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 30 Jul 2022 20:25:32 +0200 Subject: [PATCH 41/80] realtek: skip SFP ports in PoE setup The function `ucidef_set_poe` receives a list of ports to add to the PoE array. Since switches have many ports the varibale `lan_list` is passed instead of writing every single lan port. However, this list includes partly SFP ports which are unrelated to PoE. This commits adds the option to add a third parameter to manually exclide interfaces, usually the last two. Signed-off-by: Paul Spooren [Replace glob by regex to be more specific about matching characters] Signed-off-by: Sander Vanheule --- .../linux/realtek/base-files/etc/board.d/02_network | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 5356bcac65..87d772cf84 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -8,6 +8,9 @@ ucidef_set_poe() { json_add_string "budget" "$1" json_select_array ports for port in $2; do + if [ -n "$3" -a -n "$(expr "$3" : "\(.\+[[:space:]]\)\{0,1\}$port\([[:space:]].*\|\$\)")" ]; then + continue # skip ports passed via $3 + fi json_add_string "" "$port" done json_select .. @@ -57,13 +60,13 @@ done case $board in netgear,gs110tpp-v1) - ucidef_set_poe 130 "$lan_list" + ucidef_set_poe 130 "$lan_list" "lan9 lan10" ;; netgear,gs310tp-v1) - ucidef_set_poe 55 "$lan_list" + ucidef_set_poe 55 "$lan_list" "lan9 lan10" ;; zyxel,gs1900-10hp) - ucidef_set_poe 77 "$lan_list" + ucidef_set_poe 77 "$lan_list" "lan9 lan10" ;; zyxel,gs1900-8hp-v1|\ zyxel,gs1900-8hp-v2) @@ -71,7 +74,7 @@ zyxel,gs1900-8hp-v2) ;; zyxel,gs1900-24hp-v1|\ zyxel,gs1900-24hp-v2) - ucidef_set_poe 170 "$lan_list" + ucidef_set_poe 170 "$lan_list" "lan25 lan26" ;; esac From 225137608cf7cc5f6652bc7a0c026ee7888faf2e Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Sat, 13 Aug 2022 18:49:47 +0200 Subject: [PATCH 42/80] realtek: Netgear GS110TPP v1: add lan9 and lan10 The original commit for the GS110TP was missing ports 9 and 10. These are provided by an external RTL8214C phy, for which no support was available at the time. Now that this phy is supported, add the missing entries to enable all device ports. Signed-off-by: Sander Vanheule --- .../realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts b/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts index 1ff209cee3..b61af62ea5 100644 --- a/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts +++ b/target/linux/realtek/dts-5.10/rtl8380_netgear_gs110tpp-v1.dts @@ -43,3 +43,15 @@ &uart1 { status = "okay"; }; + +&mdio { + EXTERNAL_PHY(16) + EXTERNAL_PHY(17) +}; + +&switch0 { + ports { + SWITCH_PORT(16, 9, qsgmii) + SWITCH_PORT(17, 10, qsgmii) + }; +}; From 7bba7ccde9cb021e24ec83f1332aafd5898e23ef Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Sat, 28 May 2022 20:56:31 -0500 Subject: [PATCH 43/80] realtek: EnGenius EWS2910P: use the mtd3 partition for root overlay The root overlay is mounted on the "rootfs_data" partition. This comes at the end of the firmware image, courtesy of mtdsplit. There is very little space left (About 1MB), which can fill up rapidly. The "firmware" and "firmware2" partitions are part of the bootloader dual firmware logic. They should contain independent, valid uImages. This leaves "jffs2-cfg" (mtd3) and "jffs2-log" (mtd4) as candidates. mtd3 is about 13.7 MB and is used by the vendor firmware to store configuration settings. It is only erased by vendor firmware during a factory reset. By naming this partition "rootfs_data", it becomes the root overlay, providing significantly more room. Even with mtdsplit wanting to create a "rootfs_data" on the firmware partition, mtd3 is used as the overlay. Rename "jffs2-cfg" to "rootfs_data", and profit from the extra space. Signed-off-by: Alexandru Gagniuc --- target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts b/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts index dd57b2bf48..9b5ddb5ed4 100644 --- a/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts +++ b/target/linux/realtek/dts-5.10/rtl8380_engenius_ews2910p.dts @@ -144,7 +144,7 @@ reg = <0x90000 0x10000>; }; partition@a0000 { - label = "jffs2-cfg"; + label = "rootfs_data"; reg = <0xa0000 0xd60000>; }; partition@e00000 { From c5fbd49d3fa6cdb10c635c74db91ca61177f9b70 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Tue, 19 Jul 2022 21:53:41 -0500 Subject: [PATCH 44/80] kernel: add upstream patches for tps23861 PoE controller These patches support the tps23861 PoE controller found on a number of managed switches. The TPS23861 is an I2C-based quad IEEE 802.3at (PoE+) Power-over-Ethernet PSE controller. It's also found on some Realtek based switches, where we expect the bulk of the users to reside. Signed-off-by: Alexandru Gagniuc [Disable driver in generic/config-5.10] Signed-off-by: Sander Vanheule --- ...dd-Texas-Instruments-TPS23861-driver.patch | 711 ++++++++++++++++++ ...-tps23861-define-regmap-max-register.patch | 29 + ...mon-tps23861-set-current-shunt-value.patch | 57 ++ ...on-tps23861-correct-shunt-LSB-values.patch | 34 + ...ix-byte-order-in-current-and-voltage.patch | 66 ++ target/linux/generic/config-5.10 | 1 + 6 files changed, 898 insertions(+) create mode 100644 target/linux/generic/backport-5.10/871-v5.12-hwmon-add-Texas-Instruments-TPS23861-driver.patch create mode 100644 target/linux/generic/backport-5.10/872-v5.13-01-hwmon-tps23861-define-regmap-max-register.patch create mode 100644 target/linux/generic/backport-5.10/872-v5.13-02-hwmon-tps23861-set-current-shunt-value.patch create mode 100644 target/linux/generic/backport-5.10/872-v5.13-03-hwmon-tps23861-correct-shunt-LSB-values.patch create mode 100644 target/linux/generic/backport-5.10/873-v6.0-hwmon-tps23861-fix-byte-order-in-current-and-voltage.patch diff --git a/target/linux/generic/backport-5.10/871-v5.12-hwmon-add-Texas-Instruments-TPS23861-driver.patch b/target/linux/generic/backport-5.10/871-v5.12-hwmon-add-Texas-Instruments-TPS23861-driver.patch new file mode 100644 index 0000000000..3c3430a2f7 --- /dev/null +++ b/target/linux/generic/backport-5.10/871-v5.12-hwmon-add-Texas-Instruments-TPS23861-driver.patch @@ -0,0 +1,711 @@ +From 97c95dbbba64dbd6e98e033e396695f328033966 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Thu, 21 Jan 2021 14:44:33 +0100 +Subject: [PATCH 1/4] hwmon: add Texas Instruments TPS23861 driver + +Add basic monitoring support as well as port on/off control for Texas +Instruments TPS23861 PoE PSE IC. + +Signed-off-by: Robert Marko +Cc: Luka Perkov +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20210121134434.2782405-2-robert.marko@sartura.hr +Signed-off-by: Guenter Roeck +--- + Documentation/hwmon/index.rst | 1 + + Documentation/hwmon/tps23861.rst | 41 +++ + drivers/hwmon/Kconfig | 11 + + drivers/hwmon/Makefile | 1 + + drivers/hwmon/tps23861.c | 601 +++++++++++++++++++++++++++++++ + 5 files changed, 655 insertions(+) + create mode 100644 Documentation/hwmon/tps23861.rst + create mode 100644 drivers/hwmon/tps23861.c + +--- a/Documentation/hwmon/index.rst ++++ b/Documentation/hwmon/index.rst +@@ -172,6 +172,7 @@ Hardware Monitoring Kernel Drivers + tmp401 + tmp421 + tmp513 ++ tps23861 + tps40422 + tps53679 + twl4030-madc-hwmon +--- /dev/null ++++ b/Documentation/hwmon/tps23861.rst +@@ -0,0 +1,41 @@ ++.. SPDX-License-Identifier: GPL-2.0-only ++ ++Kernel driver tps23861 ++====================== ++ ++Supported chips: ++ * Texas Instruments TPS23861 ++ ++ Prefix: 'tps23861' ++ ++ Datasheet: https://www.ti.com/lit/gpn/tps23861 ++ ++Author: Robert Marko ++ ++Description ++----------- ++ ++This driver supports hardware monitoring for Texas Instruments TPS23861 PoE PSE. ++ ++TPS23861 is a quad port IEEE802.3at PSE controller with optional I2C control ++and monitoring capabilities. ++ ++TPS23861 offers three modes of operation: Auto, Semi-Auto and Manual. ++ ++This driver only supports the Auto mode of operation providing monitoring ++as well as enabling/disabling the four ports. ++ ++Sysfs entries ++------------- ++ ++======================= ===================================================================== ++in[0-3]_input Voltage on ports [1-4] ++in[0-3]_label "Port[1-4]" ++in4_input IC input voltage ++in4_label "Input" ++temp1_input IC die temperature ++temp1_label "Die" ++curr[1-4]_input Current on ports [1-4] ++in[1-4]_label "Port[1-4]" ++in[0-3]_enable Enable/disable ports [1-4] ++======================= ===================================================================== +--- a/drivers/hwmon/Kconfig ++++ b/drivers/hwmon/Kconfig +@@ -1102,6 +1102,17 @@ config SENSORS_TC654 + This driver can also be built as a module. If so, the module + will be called tc654. + ++config SENSORS_TPS23861 ++ tristate "Texas Instruments TPS23861 PoE PSE" ++ depends on I2C ++ select REGMAP_I2C ++ help ++ If you say yes here you get support for Texas Instruments ++ TPS23861 802.3at PoE PSE chips. ++ ++ This driver can also be built as a module. If so, the module ++ will be called tps23861. ++ + config SENSORS_MENF21BMC_HWMON + tristate "MEN 14F021P00 BMC Hardware Monitoring" + depends on MFD_MENF21BMC +--- a/drivers/hwmon/Makefile ++++ b/drivers/hwmon/Makefile +@@ -141,6 +141,7 @@ obj-$(CONFIG_SENSORS_MAX31790) += max317 + obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o + obj-$(CONFIG_SENSORS_MCP3021) += mcp3021.o + obj-$(CONFIG_SENSORS_TC654) += tc654.o ++obj-$(CONFIG_SENSORS_TPS23861) += tps23861.o + obj-$(CONFIG_SENSORS_MLXREG_FAN) += mlxreg-fan.o + obj-$(CONFIG_SENSORS_MENF21BMC_HWMON) += menf21bmc_hwmon.o + obj-$(CONFIG_SENSORS_MR75203) += mr75203.o +--- /dev/null ++++ b/drivers/hwmon/tps23861.c +@@ -0,0 +1,601 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (c) 2020 Sartura Ltd. ++ * ++ * Driver for the TI TPS23861 PoE PSE. ++ * ++ * Author: Robert Marko ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define TEMPERATURE 0x2c ++#define INPUT_VOLTAGE_LSB 0x2e ++#define INPUT_VOLTAGE_MSB 0x2f ++#define PORT_1_CURRENT_LSB 0x30 ++#define PORT_1_CURRENT_MSB 0x31 ++#define PORT_1_VOLTAGE_LSB 0x32 ++#define PORT_1_VOLTAGE_MSB 0x33 ++#define PORT_2_CURRENT_LSB 0x34 ++#define PORT_2_CURRENT_MSB 0x35 ++#define PORT_2_VOLTAGE_LSB 0x36 ++#define PORT_2_VOLTAGE_MSB 0x37 ++#define PORT_3_CURRENT_LSB 0x38 ++#define PORT_3_CURRENT_MSB 0x39 ++#define PORT_3_VOLTAGE_LSB 0x3a ++#define PORT_3_VOLTAGE_MSB 0x3b ++#define PORT_4_CURRENT_LSB 0x3c ++#define PORT_4_CURRENT_MSB 0x3d ++#define PORT_4_VOLTAGE_LSB 0x3e ++#define PORT_4_VOLTAGE_MSB 0x3f ++#define PORT_N_CURRENT_LSB_OFFSET 0x04 ++#define PORT_N_VOLTAGE_LSB_OFFSET 0x04 ++#define VOLTAGE_CURRENT_MASK GENMASK(13, 0) ++#define PORT_1_RESISTANCE_LSB 0x60 ++#define PORT_1_RESISTANCE_MSB 0x61 ++#define PORT_2_RESISTANCE_LSB 0x62 ++#define PORT_2_RESISTANCE_MSB 0x63 ++#define PORT_3_RESISTANCE_LSB 0x64 ++#define PORT_3_RESISTANCE_MSB 0x65 ++#define PORT_4_RESISTANCE_LSB 0x66 ++#define PORT_4_RESISTANCE_MSB 0x67 ++#define PORT_N_RESISTANCE_LSB_OFFSET 0x02 ++#define PORT_RESISTANCE_MASK GENMASK(13, 0) ++#define PORT_RESISTANCE_RSN_MASK GENMASK(15, 14) ++#define PORT_RESISTANCE_RSN_OTHER 0 ++#define PORT_RESISTANCE_RSN_LOW 1 ++#define PORT_RESISTANCE_RSN_OPEN 2 ++#define PORT_RESISTANCE_RSN_SHORT 3 ++#define PORT_1_STATUS 0x0c ++#define PORT_2_STATUS 0x0d ++#define PORT_3_STATUS 0x0e ++#define PORT_4_STATUS 0x0f ++#define PORT_STATUS_CLASS_MASK GENMASK(7, 4) ++#define PORT_STATUS_DETECT_MASK GENMASK(3, 0) ++#define PORT_CLASS_UNKNOWN 0 ++#define PORT_CLASS_1 1 ++#define PORT_CLASS_2 2 ++#define PORT_CLASS_3 3 ++#define PORT_CLASS_4 4 ++#define PORT_CLASS_RESERVED 5 ++#define PORT_CLASS_0 6 ++#define PORT_CLASS_OVERCURRENT 7 ++#define PORT_CLASS_MISMATCH 8 ++#define PORT_DETECT_UNKNOWN 0 ++#define PORT_DETECT_SHORT 1 ++#define PORT_DETECT_RESERVED 2 ++#define PORT_DETECT_RESISTANCE_LOW 3 ++#define PORT_DETECT_RESISTANCE_OK 4 ++#define PORT_DETECT_RESISTANCE_HIGH 5 ++#define PORT_DETECT_OPEN_CIRCUIT 6 ++#define PORT_DETECT_RESERVED_2 7 ++#define PORT_DETECT_MOSFET_FAULT 8 ++#define PORT_DETECT_LEGACY 9 ++/* Measurment beyond clamp voltage */ ++#define PORT_DETECT_CAPACITANCE_INVALID_BEYOND 10 ++/* Insufficient voltage delta */ ++#define PORT_DETECT_CAPACITANCE_INVALID_DELTA 11 ++#define PORT_DETECT_CAPACITANCE_OUT_OF_RANGE 12 ++#define POE_PLUS 0x40 ++#define OPERATING_MODE 0x12 ++#define OPERATING_MODE_OFF 0 ++#define OPERATING_MODE_MANUAL 1 ++#define OPERATING_MODE_SEMI 2 ++#define OPERATING_MODE_AUTO 3 ++#define OPERATING_MODE_PORT_1_MASK GENMASK(1, 0) ++#define OPERATING_MODE_PORT_2_MASK GENMASK(3, 2) ++#define OPERATING_MODE_PORT_3_MASK GENMASK(5, 4) ++#define OPERATING_MODE_PORT_4_MASK GENMASK(7, 6) ++ ++#define DETECT_CLASS_RESTART 0x18 ++#define POWER_ENABLE 0x19 ++#define TPS23861_NUM_PORTS 4 ++ ++#define TEMPERATURE_LSB 652 /* 0.652 degrees Celsius */ ++#define VOLTAGE_LSB 3662 /* 3.662 mV */ ++#define SHUNT_RESISTOR_DEFAULT 255000 /* 255 mOhm */ ++#define CURRENT_LSB_255 62260 /* 62.260 uA */ ++#define CURRENT_LSB_250 61039 /* 61.039 uA */ ++#define RESISTANCE_LSB 110966 /* 11.0966 Ohm*/ ++#define RESISTANCE_LSB_LOW 157216 /* 15.7216 Ohm*/ ++ ++struct tps23861_data { ++ struct regmap *regmap; ++ u32 shunt_resistor; ++ struct i2c_client *client; ++ struct dentry *debugfs_dir; ++}; ++ ++static struct regmap_config tps23861_regmap_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++}; ++ ++static int tps23861_read_temp(struct tps23861_data *data, long *val) ++{ ++ unsigned int regval; ++ int err; ++ ++ err = regmap_read(data->regmap, TEMPERATURE, ®val); ++ if (err < 0) ++ return err; ++ ++ *val = (regval * TEMPERATURE_LSB) - 20000; ++ ++ return 0; ++} ++ ++static int tps23861_read_voltage(struct tps23861_data *data, int channel, ++ long *val) ++{ ++ unsigned int regval; ++ int err; ++ ++ if (channel < TPS23861_NUM_PORTS) { ++ err = regmap_bulk_read(data->regmap, ++ PORT_1_VOLTAGE_LSB + channel * PORT_N_VOLTAGE_LSB_OFFSET, ++ ®val, 2); ++ } else { ++ err = regmap_bulk_read(data->regmap, ++ INPUT_VOLTAGE_LSB, ++ ®val, 2); ++ } ++ if (err < 0) ++ return err; ++ ++ *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, regval) * VOLTAGE_LSB) / 1000; ++ ++ return 0; ++} ++ ++static int tps23861_read_current(struct tps23861_data *data, int channel, ++ long *val) ++{ ++ unsigned int current_lsb; ++ unsigned int regval; ++ int err; ++ ++ if (data->shunt_resistor == SHUNT_RESISTOR_DEFAULT) ++ current_lsb = CURRENT_LSB_255; ++ else ++ current_lsb = CURRENT_LSB_250; ++ ++ err = regmap_bulk_read(data->regmap, ++ PORT_1_CURRENT_LSB + channel * PORT_N_CURRENT_LSB_OFFSET, ++ ®val, 2); ++ if (err < 0) ++ return err; ++ ++ *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, regval) * current_lsb) / 1000000; ++ ++ return 0; ++} ++ ++static int tps23861_port_disable(struct tps23861_data *data, int channel) ++{ ++ unsigned int regval = 0; ++ int err; ++ ++ regval |= BIT(channel + 4); ++ err = regmap_write(data->regmap, POWER_ENABLE, regval); ++ ++ return err; ++} ++ ++static int tps23861_port_enable(struct tps23861_data *data, int channel) ++{ ++ unsigned int regval = 0; ++ int err; ++ ++ regval |= BIT(channel); ++ regval |= BIT(channel + 4); ++ err = regmap_write(data->regmap, DETECT_CLASS_RESTART, regval); ++ ++ return err; ++} ++ ++static umode_t tps23861_is_visible(const void *data, enum hwmon_sensor_types type, ++ u32 attr, int channel) ++{ ++ switch (type) { ++ case hwmon_temp: ++ switch (attr) { ++ case hwmon_temp_input: ++ case hwmon_temp_label: ++ return 0444; ++ default: ++ return 0; ++ } ++ case hwmon_in: ++ switch (attr) { ++ case hwmon_in_input: ++ case hwmon_in_label: ++ return 0444; ++ case hwmon_in_enable: ++ return 0200; ++ default: ++ return 0; ++ } ++ case hwmon_curr: ++ switch (attr) { ++ case hwmon_curr_input: ++ case hwmon_curr_label: ++ return 0444; ++ default: ++ return 0; ++ } ++ default: ++ return 0; ++ } ++} ++ ++static int tps23861_write(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long val) ++{ ++ struct tps23861_data *data = dev_get_drvdata(dev); ++ int err; ++ ++ switch (type) { ++ case hwmon_in: ++ switch (attr) { ++ case hwmon_in_enable: ++ if (val == 0) ++ err = tps23861_port_disable(data, channel); ++ else if (val == 1) ++ err = tps23861_port_enable(data, channel); ++ else ++ err = -EINVAL; ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ ++ return err; ++} ++ ++static int tps23861_read(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long *val) ++{ ++ struct tps23861_data *data = dev_get_drvdata(dev); ++ int err; ++ ++ switch (type) { ++ case hwmon_temp: ++ switch (attr) { ++ case hwmon_temp_input: ++ err = tps23861_read_temp(data, val); ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ break; ++ case hwmon_in: ++ switch (attr) { ++ case hwmon_in_input: ++ err = tps23861_read_voltage(data, channel, val); ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ break; ++ case hwmon_curr: ++ switch (attr) { ++ case hwmon_curr_input: ++ err = tps23861_read_current(data, channel, val); ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ ++ return err; ++} ++ ++static const char * const tps23861_port_label[] = { ++ "Port1", ++ "Port2", ++ "Port3", ++ "Port4", ++ "Input", ++}; ++ ++static int tps23861_read_string(struct device *dev, ++ enum hwmon_sensor_types type, ++ u32 attr, int channel, const char **str) ++{ ++ switch (type) { ++ case hwmon_in: ++ case hwmon_curr: ++ *str = tps23861_port_label[channel]; ++ break; ++ case hwmon_temp: ++ *str = "Die"; ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ ++ return 0; ++} ++ ++static const struct hwmon_channel_info *tps23861_info[] = { ++ HWMON_CHANNEL_INFO(chip, ++ HWMON_C_REGISTER_TZ), ++ HWMON_CHANNEL_INFO(temp, ++ HWMON_T_INPUT | HWMON_T_LABEL), ++ HWMON_CHANNEL_INFO(in, ++ HWMON_I_INPUT | HWMON_I_ENABLE | HWMON_I_LABEL, ++ HWMON_I_INPUT | HWMON_I_ENABLE | HWMON_I_LABEL, ++ HWMON_I_INPUT | HWMON_I_ENABLE | HWMON_I_LABEL, ++ HWMON_I_INPUT | HWMON_I_ENABLE | HWMON_I_LABEL, ++ HWMON_I_INPUT | HWMON_I_LABEL), ++ HWMON_CHANNEL_INFO(curr, ++ HWMON_C_INPUT | HWMON_C_LABEL, ++ HWMON_C_INPUT | HWMON_C_LABEL, ++ HWMON_C_INPUT | HWMON_C_LABEL, ++ HWMON_C_INPUT | HWMON_C_LABEL), ++ NULL ++}; ++ ++static const struct hwmon_ops tps23861_hwmon_ops = { ++ .is_visible = tps23861_is_visible, ++ .write = tps23861_write, ++ .read = tps23861_read, ++ .read_string = tps23861_read_string, ++}; ++ ++static const struct hwmon_chip_info tps23861_chip_info = { ++ .ops = &tps23861_hwmon_ops, ++ .info = tps23861_info, ++}; ++ ++static char *tps23861_port_operating_mode(struct tps23861_data *data, int port) ++{ ++ unsigned int regval; ++ int mode; ++ ++ regmap_read(data->regmap, OPERATING_MODE, ®val); ++ ++ switch (port) { ++ case 1: ++ mode = FIELD_GET(OPERATING_MODE_PORT_1_MASK, regval); ++ break; ++ case 2: ++ mode = FIELD_GET(OPERATING_MODE_PORT_2_MASK, regval); ++ break; ++ case 3: ++ mode = FIELD_GET(OPERATING_MODE_PORT_3_MASK, regval); ++ break; ++ case 4: ++ mode = FIELD_GET(OPERATING_MODE_PORT_4_MASK, regval); ++ break; ++ default: ++ mode = -EINVAL; ++ } ++ ++ switch (mode) { ++ case OPERATING_MODE_OFF: ++ return "Off"; ++ case OPERATING_MODE_MANUAL: ++ return "Manual"; ++ case OPERATING_MODE_SEMI: ++ return "Semi-Auto"; ++ case OPERATING_MODE_AUTO: ++ return "Auto"; ++ default: ++ return "Invalid"; ++ } ++} ++ ++static char *tps23861_port_detect_status(struct tps23861_data *data, int port) ++{ ++ unsigned int regval; ++ ++ regmap_read(data->regmap, ++ PORT_1_STATUS + (port - 1), ++ ®val); ++ ++ switch (FIELD_GET(PORT_STATUS_DETECT_MASK, regval)) { ++ case PORT_DETECT_UNKNOWN: ++ return "Unknown device"; ++ case PORT_DETECT_SHORT: ++ return "Short circuit"; ++ case PORT_DETECT_RESISTANCE_LOW: ++ return "Too low resistance"; ++ case PORT_DETECT_RESISTANCE_OK: ++ return "Valid resistance"; ++ case PORT_DETECT_RESISTANCE_HIGH: ++ return "Too high resistance"; ++ case PORT_DETECT_OPEN_CIRCUIT: ++ return "Open circuit"; ++ case PORT_DETECT_MOSFET_FAULT: ++ return "MOSFET fault"; ++ case PORT_DETECT_LEGACY: ++ return "Legacy device"; ++ case PORT_DETECT_CAPACITANCE_INVALID_BEYOND: ++ return "Invalid capacitance, beyond clamp voltage"; ++ case PORT_DETECT_CAPACITANCE_INVALID_DELTA: ++ return "Invalid capacitance, insufficient voltage delta"; ++ case PORT_DETECT_CAPACITANCE_OUT_OF_RANGE: ++ return "Valid capacitance, outside of legacy range"; ++ case PORT_DETECT_RESERVED: ++ case PORT_DETECT_RESERVED_2: ++ default: ++ return "Invalid"; ++ } ++} ++ ++static char *tps23861_port_class_status(struct tps23861_data *data, int port) ++{ ++ unsigned int regval; ++ ++ regmap_read(data->regmap, ++ PORT_1_STATUS + (port - 1), ++ ®val); ++ ++ switch (FIELD_GET(PORT_STATUS_CLASS_MASK, regval)) { ++ case PORT_CLASS_UNKNOWN: ++ return "Unknown"; ++ case PORT_CLASS_RESERVED: ++ case PORT_CLASS_0: ++ return "0"; ++ case PORT_CLASS_1: ++ return "1"; ++ case PORT_CLASS_2: ++ return "2"; ++ case PORT_CLASS_3: ++ return "3"; ++ case PORT_CLASS_4: ++ return "4"; ++ case PORT_CLASS_OVERCURRENT: ++ return "Overcurrent"; ++ case PORT_CLASS_MISMATCH: ++ return "Mismatch"; ++ default: ++ return "Invalid"; ++ } ++} ++ ++static char *tps23861_port_poe_plus_status(struct tps23861_data *data, int port) ++{ ++ unsigned int regval; ++ ++ regmap_read(data->regmap, POE_PLUS, ®val); ++ ++ if (BIT(port + 3) & regval) ++ return "Yes"; ++ else ++ return "No"; ++} ++ ++static int tps23861_port_resistance(struct tps23861_data *data, int port) ++{ ++ u16 regval; ++ ++ regmap_bulk_read(data->regmap, ++ PORT_1_RESISTANCE_LSB + PORT_N_RESISTANCE_LSB_OFFSET * (port - 1), ++ ®val, ++ 2); ++ ++ switch (FIELD_GET(PORT_RESISTANCE_RSN_MASK, regval)) { ++ case PORT_RESISTANCE_RSN_OTHER: ++ return (FIELD_GET(PORT_RESISTANCE_MASK, regval) * RESISTANCE_LSB) / 10000; ++ case PORT_RESISTANCE_RSN_LOW: ++ return (FIELD_GET(PORT_RESISTANCE_MASK, regval) * RESISTANCE_LSB_LOW) / 10000; ++ case PORT_RESISTANCE_RSN_SHORT: ++ case PORT_RESISTANCE_RSN_OPEN: ++ default: ++ return 0; ++ } ++} ++ ++static int tps23861_port_status_show(struct seq_file *s, void *data) ++{ ++ struct tps23861_data *priv = s->private; ++ int i; ++ ++ for (i = 1; i < TPS23861_NUM_PORTS + 1; i++) { ++ seq_printf(s, "Port: \t\t%d\n", i); ++ seq_printf(s, "Operating mode: %s\n", tps23861_port_operating_mode(priv, i)); ++ seq_printf(s, "Detected: \t%s\n", tps23861_port_detect_status(priv, i)); ++ seq_printf(s, "Class: \t\t%s\n", tps23861_port_class_status(priv, i)); ++ seq_printf(s, "PoE Plus: \t%s\n", tps23861_port_poe_plus_status(priv, i)); ++ seq_printf(s, "Resistance: \t%d\n", tps23861_port_resistance(priv, i)); ++ seq_putc(s, '\n'); ++ } ++ ++ return 0; ++} ++ ++DEFINE_SHOW_ATTRIBUTE(tps23861_port_status); ++ ++static void tps23861_init_debugfs(struct tps23861_data *data) ++{ ++ data->debugfs_dir = debugfs_create_dir(data->client->name, NULL); ++ ++ debugfs_create_file("port_status", ++ 0400, ++ data->debugfs_dir, ++ data, ++ &tps23861_port_status_fops); ++} ++ ++static int tps23861_probe(struct i2c_client *client) ++{ ++ struct device *dev = &client->dev; ++ struct tps23861_data *data; ++ struct device *hwmon_dev; ++ u32 shunt_resistor; ++ ++ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); ++ if (!data) ++ return -ENOMEM; ++ ++ data->client = client; ++ i2c_set_clientdata(client, data); ++ ++ data->regmap = devm_regmap_init_i2c(client, &tps23861_regmap_config); ++ if (IS_ERR(data->regmap)) { ++ dev_err(dev, "failed to allocate register map\n"); ++ return PTR_ERR(data->regmap); ++ } ++ ++ if (!of_property_read_u32(dev->of_node, "shunt-resistor-micro-ohms", &shunt_resistor)) ++ data->shunt_resistor = shunt_resistor; ++ else ++ data->shunt_resistor = SHUNT_RESISTOR_DEFAULT; ++ ++ hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, ++ data, &tps23861_chip_info, ++ NULL); ++ if (IS_ERR(hwmon_dev)) ++ return PTR_ERR(hwmon_dev); ++ ++ tps23861_init_debugfs(data); ++ ++ return 0; ++} ++ ++static int tps23861_remove(struct i2c_client *client) ++{ ++ struct tps23861_data *data = i2c_get_clientdata(client); ++ ++ debugfs_remove_recursive(data->debugfs_dir); ++ ++ return 0; ++} ++ ++static const struct of_device_id __maybe_unused tps23861_of_match[] = { ++ { .compatible = "ti,tps23861", }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(of, tps23861_of_match); ++ ++static struct i2c_driver tps23861_driver = { ++ .probe_new = tps23861_probe, ++ .remove = tps23861_remove, ++ .driver = { ++ .name = "tps23861", ++ .of_match_table = of_match_ptr(tps23861_of_match), ++ }, ++}; ++module_i2c_driver(tps23861_driver); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Robert Marko "); ++MODULE_DESCRIPTION("TI TPS23861 PoE PSE"); diff --git a/target/linux/generic/backport-5.10/872-v5.13-01-hwmon-tps23861-define-regmap-max-register.patch b/target/linux/generic/backport-5.10/872-v5.13-01-hwmon-tps23861-define-regmap-max-register.patch new file mode 100644 index 0000000000..f7ed386944 --- /dev/null +++ b/target/linux/generic/backport-5.10/872-v5.13-01-hwmon-tps23861-define-regmap-max-register.patch @@ -0,0 +1,29 @@ +From 3d61a7b3a714eb3ef1777e3c576576aca2b85365 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Thu, 10 Jun 2021 00:07:26 +0200 +Subject: [PATCH 2/4] hwmon: (tps23861) define regmap max register + +Define the max register address the device supports. +This allows reading the whole register space via +regmap debugfs, without it only register 0x0 is visible. + +This was forgotten in the original driver commit. + +Fixes: fff7b8ab2255 ("hwmon: add Texas Instruments TPS23861 driver") +Signed-off-by: Robert Marko +Link: https://lore.kernel.org/r/20210609220728.499879-1-robert.marko@sartura.hr +Signed-off-by: Guenter Roeck +--- + drivers/hwmon/tps23861.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/hwmon/tps23861.c ++++ b/drivers/hwmon/tps23861.c +@@ -117,6 +117,7 @@ struct tps23861_data { + static struct regmap_config tps23861_regmap_config = { + .reg_bits = 8, + .val_bits = 8, ++ .max_register = 0x6f, + }; + + static int tps23861_read_temp(struct tps23861_data *data, long *val) diff --git a/target/linux/generic/backport-5.10/872-v5.13-02-hwmon-tps23861-set-current-shunt-value.patch b/target/linux/generic/backport-5.10/872-v5.13-02-hwmon-tps23861-set-current-shunt-value.patch new file mode 100644 index 0000000000..f1051f77d5 --- /dev/null +++ b/target/linux/generic/backport-5.10/872-v5.13-02-hwmon-tps23861-set-current-shunt-value.patch @@ -0,0 +1,57 @@ +From 9bca598d4a86e88afb29fdb516c68b2519bd0fb9 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Thu, 10 Jun 2021 00:07:27 +0200 +Subject: [PATCH 3/4] hwmon: (tps23861) set current shunt value + +TPS23861 has a configuration bit for setting of the +current shunt value used on the board. +Its bit 0 of the General Mask 1 register. + +According to the datasheet bit values are: +0 for 255 mOhm (Default) +1 for 250 mOhm + +So, configure the bit before registering the hwmon +device according to the value passed in the DTS or +default one if none is passed. + +This caused potentially reading slightly skewed values +due to max current value being 1.02A when 250mOhm shunt +is used instead of 1.0A when 255mOhm is used. + +Fixes: fff7b8ab2255 ("hwmon: add Texas Instruments TPS23861 driver") +Signed-off-by: Robert Marko +Link: https://lore.kernel.org/r/20210609220728.499879-2-robert.marko@sartura.hr +Signed-off-by: Guenter Roeck +--- + drivers/hwmon/tps23861.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/hwmon/tps23861.c ++++ b/drivers/hwmon/tps23861.c +@@ -99,6 +99,9 @@ + #define POWER_ENABLE 0x19 + #define TPS23861_NUM_PORTS 4 + ++#define TPS23861_GENERAL_MASK_1 0x17 ++#define TPS23861_CURRENT_SHUNT_MASK BIT(0) ++ + #define TEMPERATURE_LSB 652 /* 0.652 degrees Celsius */ + #define VOLTAGE_LSB 3662 /* 3.662 mV */ + #define SHUNT_RESISTOR_DEFAULT 255000 /* 255 mOhm */ +@@ -561,6 +564,15 @@ static int tps23861_probe(struct i2c_cli + else + data->shunt_resistor = SHUNT_RESISTOR_DEFAULT; + ++ if (data->shunt_resistor == SHUNT_RESISTOR_DEFAULT) ++ regmap_clear_bits(data->regmap, ++ TPS23861_GENERAL_MASK_1, ++ TPS23861_CURRENT_SHUNT_MASK); ++ else ++ regmap_set_bits(data->regmap, ++ TPS23861_GENERAL_MASK_1, ++ TPS23861_CURRENT_SHUNT_MASK); ++ + hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, + data, &tps23861_chip_info, + NULL); diff --git a/target/linux/generic/backport-5.10/872-v5.13-03-hwmon-tps23861-correct-shunt-LSB-values.patch b/target/linux/generic/backport-5.10/872-v5.13-03-hwmon-tps23861-correct-shunt-LSB-values.patch new file mode 100644 index 0000000000..2485d7a0ee --- /dev/null +++ b/target/linux/generic/backport-5.10/872-v5.13-03-hwmon-tps23861-correct-shunt-LSB-values.patch @@ -0,0 +1,34 @@ +From b447e689a26614ce08a431e8000e8a650a63dcb3 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Thu, 10 Jun 2021 00:07:28 +0200 +Subject: [PATCH 4/4] hwmon: (tps23861) correct shunt LSB values + +Current shunt LSB values got reversed during in the +original driver commit. + +So, correct the current shunt LSB values according to +the datasheet. + +This caused reading slightly skewed current values. + +Fixes: fff7b8ab2255 ("hwmon: add Texas Instruments TPS23861 driver") +Signed-off-by: Robert Marko +Link: https://lore.kernel.org/r/20210609220728.499879-3-robert.marko@sartura.hr +Signed-off-by: Guenter Roeck +--- + drivers/hwmon/tps23861.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/hwmon/tps23861.c ++++ b/drivers/hwmon/tps23861.c +@@ -105,8 +105,8 @@ + #define TEMPERATURE_LSB 652 /* 0.652 degrees Celsius */ + #define VOLTAGE_LSB 3662 /* 3.662 mV */ + #define SHUNT_RESISTOR_DEFAULT 255000 /* 255 mOhm */ +-#define CURRENT_LSB_255 62260 /* 62.260 uA */ +-#define CURRENT_LSB_250 61039 /* 61.039 uA */ ++#define CURRENT_LSB_250 62260 /* 62.260 uA */ ++#define CURRENT_LSB_255 61039 /* 61.039 uA */ + #define RESISTANCE_LSB 110966 /* 11.0966 Ohm*/ + #define RESISTANCE_LSB_LOW 157216 /* 15.7216 Ohm*/ + diff --git a/target/linux/generic/backport-5.10/873-v6.0-hwmon-tps23861-fix-byte-order-in-current-and-voltage.patch b/target/linux/generic/backport-5.10/873-v6.0-hwmon-tps23861-fix-byte-order-in-current-and-voltage.patch new file mode 100644 index 0000000000..45c2d0b4a4 --- /dev/null +++ b/target/linux/generic/backport-5.10/873-v6.0-hwmon-tps23861-fix-byte-order-in-current-and-voltage.patch @@ -0,0 +1,66 @@ +From 0eabb1396656f215a5333a9444158b17b0fd3247 Mon Sep 17 00:00:00 2001 +From: Alexandru Gagniuc +Date: Wed, 20 Jul 2022 22:22:55 -0500 +Subject: hwmon: (tps23861) fix byte order in current and voltage registers + +Trying to use this driver on a big-endian machine results in garbage +values for voltage and current. The tps23861 registers are little- +endian, and regmap_read_bulk() does not do byte order conversion. Thus +on BE machines, the most significant bytes got modified, and were +trimmed by the VOLTAGE_CURRENT_MASK. + +To resolve this use uint16_t values, and convert them to host byte +order using le16_to_cpu(). This results in correct readings on MIPS. + +Signed-off-by: Alexandru Gagniuc +Link: https://lore.kernel.org/r/20220721032255.2850647-1-mr.nuke.me@gmail.com +[groeck: Use __le16 instead of uint16_t] +Signed-off-by: Guenter Roeck +--- + drivers/hwmon/tps23861.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +--- a/drivers/hwmon/tps23861.c ++++ b/drivers/hwmon/tps23861.c +@@ -140,7 +140,8 @@ static int tps23861_read_temp(struct tps + static int tps23861_read_voltage(struct tps23861_data *data, int channel, + long *val) + { +- unsigned int regval; ++ __le16 regval; ++ long raw_val; + int err; + + if (channel < TPS23861_NUM_PORTS) { +@@ -155,7 +156,8 @@ static int tps23861_read_voltage(struct + if (err < 0) + return err; + +- *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, regval) * VOLTAGE_LSB) / 1000; ++ raw_val = le16_to_cpu(regval); ++ *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, raw_val) * VOLTAGE_LSB) / 1000; + + return 0; + } +@@ -163,8 +165,9 @@ static int tps23861_read_voltage(struct + static int tps23861_read_current(struct tps23861_data *data, int channel, + long *val) + { +- unsigned int current_lsb; +- unsigned int regval; ++ long raw_val, current_lsb; ++ __le16 regval; ++ + int err; + + if (data->shunt_resistor == SHUNT_RESISTOR_DEFAULT) +@@ -178,7 +181,8 @@ static int tps23861_read_current(struct + if (err < 0) + return err; + +- *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, regval) * current_lsb) / 1000000; ++ raw_val = le16_to_cpu(regval); ++ *val = (FIELD_GET(VOLTAGE_CURRENT_MASK, raw_val) * current_lsb) / 1000000; + + return 0; + } diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 3d04a17243..b5f29cf547 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -5304,6 +5304,7 @@ CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_SENSORS_TMP401 is not set # CONFIG_SENSORS_TMP421 is not set # CONFIG_SENSORS_TMP513 is not set +# CONFIG_SENSORS_TPS23861 is not set # CONFIG_SENSORS_TPS40422 is not set # CONFIG_SENSORS_TPS53679 is not set # CONFIG_SENSORS_TSL2550 is not set From b664646db74a7c4c541c7fa835d7689dd897dcca Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Tue, 19 Jul 2022 20:27:49 -0500 Subject: [PATCH 45/80] kernel: add kmod-hwmon-tps23861 support Package the tps23861.ko module, which supports Texas Instruments TPS23861 PoE+ controller. Signed-off-by: Alexandru Gagniuc --- package/kernel/linux/modules/hwmon.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index b75c741ba0..42df3a94f7 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -519,6 +519,20 @@ endef $(eval $(call KernelPackage,hwmon-tmp421)) +define KernelPackage/hwmon-tps23861 + TITLE:=Texas Instruments TPS23861 PoE PSE + KCONFIG:=CONFIG_SENSORS_TPS23861 + FILES:=$(LINUX_DIR)/drivers/hwmon/tps23861.ko + AUTOLOAD:=$(call AutoProbe,tps23861) + $(call AddDepends/hwmon,+kmod-i2c-core) +endef + +define KernelPackage/hwmon-tps23861/description + Kernel module for the Texas Instruments TPS23861 802.3at PoE PSE chips. +endef + +$(eval $(call KernelPackage,hwmon-tps23861)) + define KernelPackage/hwmon-vid TITLE:=VID/VRM/VRD voltage conversion module. KCONFIG:=CONFIG_HWMON_VID From 6d5873a162e9e03c93012a26b0004d46e6764a8e Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Tue, 19 Jul 2022 12:01:11 -0500 Subject: [PATCH 46/80] realtek: add support for TP-Link SG2008P Add support for the TP-Link SG2008P switch. This is an RTL8380 based switch with 802.3af one the first four ports. Specifications: --------------- * SoC: Realtek RTL8380M * Flash: 32 MiB SPI flash (Vendor varies) * RAM: 256 MiB (Vendor varies) * Ethernet: 8x 10/100/1000 Mbps with PoE on 4 ports * Buttons: 1x "Reset" button on front panel * Power: 53.5V DC barrel jack * UART: 1x serial header, unpopulated * PoE: 1x TI TPS23861 I2C PoE controller Works: ------ - (8) RJ-45 ethernet ports - Switch functions - System LED Not yet enabled: ---------------- - Power-over-Ethernet (driver works, but doesn't enable "auto" mode) - PoE, Link/Act, PoE max and System LEDs Install via web interface: ------------------------- Not supported at this time. Install via serial console/tftp: -------------------------------- The footprints R27 (0201) and R28 (0402) are not populated. To enable serial console, 50 ohm resistors should be soldered -- any value from 0 ohm to 50 ohm will work. R27 can be replaced by a solder bridge. The u-boot firmware drops to a TP-Link specific "BOOTUTIL" shell at 38400 baud. There is no known way to exit out of this shell, and no way to do anything useful. Ideally, one would trick the bootloader into flashing the sysupgrade image first. However, if the image exceeds 6MiB in size, it will not work. The sysupgrade image can also be flashed. To install OpenWRT: Prepare a tftp server with: 1. server address: 192.168.0.146 2. the image as: "uImage.img" Power on device, and stop boot by pressing any key. Once the shell is active: 1. Ground out the CLK (pin 16) of the ROM (U7) 2. Select option "3. Start" 3. Bootloader notes that "The kernel has been damaged!" 4. Release CLK as sson as bootloader thinks image is corrupted. 5. Bootloader enters automatic recovery -- details printed on console 6. Watch as the bootloader flashes and boots OpenWRT. Blind install via tftp: ----------------------- This method works when it's not feasible to install a serial header. Prepare a tftp server with: 1. server address: 192.168.0.146 2. the image as: "uImage.img" 3. Watch network traffic (tcpdump or wireshark works) 4. Power on the device. 5. Wait 1-2 seconds then ground out the CLK (pin 16) of the ROM (U7) 6. When 192.168.0.30 makes tftp requests, release pin 16 7. Wait 2-3 minutes for device to auto-flash and boot OpenWRT Signed-off-by: Alexandru Gagniuc --- package/boot/uboot-envtools/files/realtek | 5 + .../realtek/base-files/etc/board.d/02_network | 4 + .../base-files/lib/upgrade/platform.sh | 19 ++ .../dts-5.10/rtl8380_tplink_sg2008p-v1.dts | 184 ++++++++++++++++++ target/linux/realtek/image/rtl838x.mk | 11 ++ target/linux/realtek/rtl838x/config-5.10 | 1 + 6 files changed, 224 insertions(+) create mode 100644 target/linux/realtek/dts-5.10/rtl8380_tplink_sg2008p-v1.dts diff --git a/package/boot/uboot-envtools/files/realtek b/package/boot/uboot-envtools/files/realtek index 93cccfdc3e..39be783ea3 100644 --- a/package/boot/uboot-envtools/files/realtek +++ b/package/boot/uboot-envtools/files/realtek @@ -28,6 +28,11 @@ zyxel,gs1900-24hp-v2) [ -n "$idx2" ] && \ ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x1000" "0x10000" ;; +tplink,sg2008p-v1) + idx="$(find_mtd_index u-boot-env)" + [ -n "$idx" ] && \ + ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x10000" + ;; iodata,bsh-g24mb) idx="$(find_mtd_index u-boot-env)" [ -n "$idx" ] && \ diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 87d772cf84..d797960faf 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -39,6 +39,10 @@ hpe,1920-24g) lan_mac_start=$(macaddr_add $lan_mac 2) lan_mac_end=$(macaddr_add $lan_mac $((mac_count2-mac_count1))) ;; +tplink,sg2008p-v1) + label_mac=$(mtd_get_mac_binary para 0xfdff4) + lan_mac="$label_mac" + ;; *) lan_mac=$(mtd_get_mac_ascii u-boot-env2 mac_start) lan_mac_end=$(mtd_get_mac_ascii u-boot-env2 mac_end) diff --git a/target/linux/realtek/base-files/lib/upgrade/platform.sh b/target/linux/realtek/base-files/lib/upgrade/platform.sh index 927aadbe31..b39b332063 100644 --- a/target/linux/realtek/base-files/lib/upgrade/platform.sh +++ b/target/linux/realtek/base-files/lib/upgrade/platform.sh @@ -4,6 +4,21 @@ REQUIRE_IMAGE_METADATA=1 RAMFS_COPY_BIN='fw_printenv fw_setenv' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' +# The TP-Link bootloader gets its flash layout from "bootargs". +# Use this to our advantage, and: +# 1. Disable the second rootfs (usrimg2) +# 2. Extend the first rootfs (usrimg1) to include more space +# 3. Increase the baudrate to the expected 115200 +tplink_sg2xxx_fix_mtdparts() { + local args + args="bootargs mtdparts=spi_flash:896K(boot),128K(env),6144K(sys)" + args="$args,20480K(usrimg1@main),0K(usrimg2)" + args="$args,4096K(usrappfs),1024K(para)\n" + args="$args baudrate 115200" + + echo -e "$args" | fw_setenv --script - +} + platform_check_image() { return 0 } @@ -12,6 +27,10 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in + tplink,sg2008p-v1) + tplink_sg2xxx_fix_mtdparts + default_do_upgrade "$1" + ;; *) default_do_upgrade "$1" ;; diff --git a/target/linux/realtek/dts-5.10/rtl8380_tplink_sg2008p-v1.dts b/target/linux/realtek/dts-5.10/rtl8380_tplink_sg2008p-v1.dts new file mode 100644 index 0000000000..2cce03bde1 --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8380_tplink_sg2008p-v1.dts @@ -0,0 +1,184 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl838x.dtsi" + +#include +#include + +/ { + compatible = "tplink,sg2008p-v1", "realtek,rtl838x-soc"; + model = "TP-Link SG2008P v1"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-restart { + compatible = "gpio-restart"; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + }; + + leds { + compatible = "gpio-leds"; + + led_power: led-0 { + label = "green:power"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + }; + }; + + i2c1: i2c-gpio-1 { + compatible = "i2c-gpio"; + scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + + tps23861@30 { + compatible = "ti,tps23861"; + reg = <0x30>; + shunt-resistor-micro-ohms = <255000>; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + /* SGM706 specs: typical 1.6s, but minimum 1.0s. */ + hw_margin_ms = <1000>; + }; + + virtual_flash { + compatible = "mtd-concat"; + + devices = <&syspart &usrpart>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x0 0x1a00000>; + }; + }; + }; +}; + +&gpio0 { + watchdog-enable { + gpio-hog; + gpios = <14 GPIO_ACTIVE_LOW>; + output-low; + line-name = "watchdog-enable"; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0xe0000>; + read-only; + }; + partition@e0000 { + label = "u-boot-env"; + reg = <0xe0000 0x20000>; + }; + syspart: partition@100000 { + label = "sys"; + reg = <0x100000 0x600000>; + }; + usrpart: partition@700000 { + label = "usrimg1"; + reg = <0x700000 0x1400000>; + }; + partition@1b00000 { + label = "usrappfs"; + reg = <0x1b00000 0x400000>; + }; + partition@1f00000 { + label = "para"; + reg = <0x1f00000 0x100000>; + read-only; + }; + }; + }; +}; + +ðernet0 { + mdio: mdio-bus { + compatible = "realtek,rtl838x-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + INTERNAL_PHY(8) + INTERNAL_PHY(9) + INTERNAL_PHY(10) + INTERNAL_PHY(11) + INTERNAL_PHY(12) + INTERNAL_PHY(13) + INTERNAL_PHY(14) + INTERNAL_PHY(15) + }; +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + SWITCH_PORT(8, 1, internal) + SWITCH_PORT(9, 2, internal) + SWITCH_PORT(10, 3, internal) + SWITCH_PORT(11, 4, internal) + SWITCH_PORT(12, 5, internal) + SWITCH_PORT(13, 6, internal) + SWITCH_PORT(14, 7, internal) + SWITCH_PORT(15, 8, internal) + + port@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk index 9e1dd0308d..e748d414bc 100644 --- a/target/linux/realtek/image/rtl838x.mk +++ b/target/linux/realtek/image/rtl838x.mk @@ -168,6 +168,17 @@ define Device/panasonic_m8eg-pn28080k endef TARGET_DEVICES += panasonic_m8eg-pn28080k +define Device/tplink_sg2008p-v1 + SOC := rtl8380 + KERNEL_SIZE := 6m + IMAGE_SIZE := 26m + DEVICE_VENDOR := TP-Link + DEVICE_MODEL := SG2008P + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-hwmon-tps23861 +endef +TARGET_DEVICES += tplink_sg2008p-v1 + define Device/zyxel_gs1900 SOC := rtl8380 IMAGE_SIZE := 6976k diff --git a/target/linux/realtek/rtl838x/config-5.10 b/target/linux/realtek/rtl838x/config-5.10 index d046c7daeb..6b90b280c9 100644 --- a/target/linux/realtek/rtl838x/config-5.10 +++ b/target/linux/realtek/rtl838x/config-5.10 @@ -138,6 +138,7 @@ CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_H3C_VFS=y CONFIG_MTD_SPLIT_TPLINK_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y +CONFIG_MTD_VIRT_CONCAT=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_PER_CPU_KM=y CONFIG_NET_DEVLINK=y From 85b41cbd3b8e98393232b5f619dcc7378652fbd8 Mon Sep 17 00:00:00 2001 From: Mikhail Zhilkin Date: Fri, 18 Mar 2022 18:09:45 +0000 Subject: [PATCH 47/80] ramips: add support for Beeline SmartBox TURBO Beeline SmartBox TURBO is a wireless WiFi 5 router manufactured by Sercomm company. Device specification -------------------- SoC Type: MediaTek MT7621AT RAM: 256 MiB Flash: 256 MiB, Micron MT29F2G08ABAGA3W Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2 Wireless 5 GHz (MT7615E): a/n/ac, 4x4 Ethernet: 5xGbE (WAN, LAN1, LAN2, LAN3, LAN4) USB ports: 1xUSB3.0 Button: 2 buttons (Reset & WPS) LEDs: 1 RGB LED Power: 12 VDC, 1.5 A Connector type: barrel Bootloader: U-Boot Installation ----------------- 1. Login to the router web interface (admin:admin) 2. Navigate to Settings -> WAN -> Add static IP interface (e.g. 10.0.0.1/255.255.255.0) 3. Navigate to Settings -> Remote cotrol -> Add SSH, port 22, 10.0.0.0/255.255.255.0 and interface created before 4. Change IP of your client to 10.0.0.2/255.255.255.0 and connect the ethernet cable to the WAN port of the router 5. Connect to the router using SSH shell (SuperUser:SNxxxxxxxxxx, where SNxxxxxxxxxx is the serial number from the backplate label) 6. Run in SSH shell: sh 7. Make a mtd backup (optional, see related section) 8. Change bootflag to Sercomm1 and reboot: printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3 reboot 9. Login to the router web interface (admin:admin) 10. Remove dots from the OpenWrt factory image filename 11. Update firmware via web using OpenWrt factory image Revert to stock --------------- 1. Change bootflag to Sercomm1 in OpenWrt CLI and then reboot: printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3 2. Optional: Update with any stock (Beeline) firmware if you want to overwrite OpenWrt in Slot 0 completely. mtd backup ---------- 1. Set up a tftp server (e.g. tftpd64 for windows) 2. Connect to a router using SSH shell and run the following commands: cd /tmp for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \ tftp -l mtd$i -p 10.0.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done tftp -l mtd.md5 -p 10.0.0.2 MAC Addresses ------------- +-----+-----------+---------+ | use | address | example | +-----+-----------+---------+ | LAN | label | *:54 | | WAN | label + 1 | *:55 | | 2g | label + 4 | *:58 | | 5g | label + 5 | *:59 | +-----+-----------+---------+ The label MAC address was found in Factory 0x21000 Co-developed-by: Maximilian Weinmann Signed-off-by: Maximilian Weinmann Signed-off-by: Mikhail Zhilkin --- package/boot/uboot-envtools/files/ramips | 3 +- .../dts/mt7621_beeline_smartbox-turbo.dts | 247 ++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 13 + .../mt7621/base-files/etc/board.d/01_leds | 3 +- .../mt7621/base-files/etc/init.d/bootcount | 5 + .../mt7621/base-files/lib/upgrade/platform.sh | 1 + 6 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index f7f4821cef..597baef6cd 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -31,7 +31,8 @@ ampedwireless,ally-00x19k|\ ampedwireless,ally-r1900k) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4" ;; -beeline,smartbox-giga) +beeline,smartbox-giga|\ +beeline,smartbox-turbo) ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000" ;; buffalo,wsr-1166dhp|\ diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts new file mode 100644 index 0000000000..d987046a0f --- /dev/null +++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo.dts @@ -0,0 +1,247 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "beeline,smartbox-turbo", "mediatek,mt7621-soc"; + model = "Beeline SmartBox TURBO"; + + aliases { + label-mac-device = &gmac0; + + led-boot = &led_status_green; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_status_red; + }; + + leds { + compatible = "gpio-leds"; + + led-1 { + label = "blue:wan"; + color = ; + function = LED_FUNCTION_WAN; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + led_status_green: led-0 { + label = "green:status"; + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + + led_status_red: led-2 { + label = "red:status"; + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + ubi-concat { + compatible = "mtd-concat"; + devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 \ + &ubiconcat3>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ubi"; + reg = <0x0 0xca00000>; + }; + }; + }; +}; + +&nand { + status = "okay"; + + partitions { + compatible = "sercomm,sc-partitions", "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x100000>; + sercomm,scpart-id = <0>; + read-only; + }; + + partition@100000 { + label = "dynamic partition map"; + reg = <0x100000 0x100000>; + sercomm,scpart-id = <1>; + read-only; + }; + + factory: partition@200000 { + label = "Factory"; + reg = <0x200000 0x100000>; + sercomm,scpart-id = <2>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_21000: macaddr@21000 { + reg = <0x21000 0x6>; + }; + }; + + partition@300000 { + label = "Boot Flag"; + reg = <0x300000 0x100000>; + sercomm,scpart-id = <3>; + }; + + partition@400000 { + label = "kernel"; + reg = <0x400000 0x600000>; + sercomm,scpart-id = <4>; + }; + + partition@a00000 { + label = "Kernel 2"; + reg = <0xa00000 0x600000>; + sercomm,scpart-id = <5>; + read-only; + }; + + ubiconcat0: partition@1000000 { + label = "File System 1"; + reg = <0x1000000 0x2000000>; + sercomm,scpart-id = <6>; + }; + + partition@3000000 { + label = "File System 2"; + reg = <0x3000000 0x2000000>; + sercomm,scpart-id = <7>; + read-only; + }; + + ubiconcat1: partition@5000000 { + label = "Configuration/log"; + reg = <0x5000000 0x1400000>; + sercomm,scpart-id = <8>; + }; + + ubiconcat2: partition@6400000 { + label = "Debug (Ftool)"; + reg = <0x6400000 0x1a00000>; + sercomm,scpart-id = <9>; + }; + + ubiconcat3: partition@8000000 { + label = "container"; + reg = <0x8000000 0x7c00000>; + sercomm,scpart-id = <10>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(5)>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + ieee80211-freq-limit = <2400000 2500000>; + + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(4)>; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "wan"; + + nvmem-cells = <&macaddr_factory_21000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(1)>; + }; + + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "lan4"; + }; + }; +}; + +&uartlite3 { + status = "okay"; +}; + +&state_default { + gpio { + groups = "jtag", "uart2"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index cc6dbe9418..96ae2765b9 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -328,6 +328,19 @@ define Device/beeline_smartbox-giga endef TARGET_DEVICES += beeline_smartbox-giga +define Device/beeline_smartbox-turbo + $(Device/sercomm_dxx) + IMAGE_SIZE := 32768k + SERCOMM_HWID := DF3 + SERCOMM_HWVER := 10200 + SERCOMM_SWVER := 1004 + DEVICE_VENDOR := Beeline + DEVICE_MODEL := SmartBox TURBO + DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware \ + kmod-usb3 uboot-envtools +endef +TARGET_DEVICES += beeline_smartbox-turbo + define Device/buffalo_wsr-1166dhp $(Device/dsa-migration) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 9f62a29aa7..0daf15dd4d 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -24,7 +24,8 @@ asus,rt-n56u-b1) ucidef_set_led_netdev "wan" "WAN link" "blue:wan" "wan" ;; beeline,smartbox-flash|\ -beeline,smartbox-giga) +beeline,smartbox-giga|\ +beeline,smartbox-turbo) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" ;; cudy,wr2100) diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount index 4ebe50fdfe..14e32f2968 100755 --- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount +++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount @@ -8,6 +8,11 @@ boot() { [ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\ echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s - ;; + beeline,smartbox-turbo) + [[ $(hexdump -n 1 -e '/1 "%1d"' -s $((0x20001)) /dev/mtd3) == \ + $((0xff)) ]] || printf '\xff' | dd of=/dev/mtdblock3 \ + count=1 bs=1 seek=$((0x20001)) + ;; linksys,e5600|\ linksys,ea6350-v4|\ linksys,ea7300-v1|\ diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index 80490c377d..7eb86b31de 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -56,6 +56,7 @@ platform_do_upgrade() { asus,rt-ax53u|\ beeline,smartbox-flash|\ beeline,smartbox-giga|\ + beeline,smartbox-turbo|\ dlink,dir-1960-a1|\ dlink,dir-2640-a1|\ dlink,dir-2660-a1|\ From 611291383a826827f240eddebca1949c2e1e7115 Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Wed, 10 Aug 2022 01:06:24 +0200 Subject: [PATCH 48/80] ath25: fix ELF image generation Commit 21f460a5dbef ("ath25: fix duplicate LZMA compression"), when attempting to restore ELF artifact generation, copiedover the raw kernel image twice. Because of that, the .elf artifact was actually a duplicate of raw image. Fix that by copying over .elf suffixed kernel image instead. Fixes: 21f460a5dbef ("ath25: fix duplicate LZMA compression") Signed-off-by: Lech Perczak --- target/linux/ath25/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath25/image/Makefile b/target/linux/ath25/image/Makefile index 2b22d54105..d6cd53d261 100644 --- a/target/linux/ath25/image/Makefile +++ b/target/linux/ath25/image/Makefile @@ -43,7 +43,7 @@ endef define Build/copy-kernel rm -f $@ $@.elf cp $< $@ - cp $< $@.elf + cp $<.elf $@.elf endef define Build/elf-kernel From 9f5cbb6e8b9537942db405719bf7662d0e08b8c5 Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Wed, 10 Aug 2022 01:10:57 +0200 Subject: [PATCH 49/80] ath25: fix initramfs image generation Commit 21f460a5dbef ("ath25: fix duplicate LZMA compression") changed the way kernel images are generated, affecting initramfs images instead. Initramfs images were previously ELF images, and by mistake this change caused the raw kernel image to be used as a source. This caused them to be non-loadable by bootloaders. Restore the previous KERNEL_INITRAMFS recipe and adjust KERNEL_INITRAMFS_NAME to point at the correct source artifact. While at that, adjust KERNEL_INITRAMFS_SUFFIX to -kernel.elf, so it matches the suffix of non-initramfs kernel artifact. Fixes: 21f460a5dbef ("ath25: fix duplicate LZMA compression") Signed-off-by: Lech Perczak --- target/linux/ath25/image/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/ath25/image/Makefile b/target/linux/ath25/image/Makefile index d6cd53d261..9cdcdf9e95 100644 --- a/target/linux/ath25/image/Makefile +++ b/target/linux/ath25/image/Makefile @@ -54,6 +54,9 @@ endef define Device/Default PROFILES = Default $$(DEVICE_NAME) KERNEL := copy-kernel | lzma-kernel + KERNEL_INITRAMFS = kernel-bin + KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf + KERNEL_INITRAMFS_SUFFIX := -kernel.elf IMAGES := sysupgrade.bin FILESYSTEMS := squashfs endef From 2ae26f523e9bfcd3bdfa93604afe8de9addf5a90 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 26 Jul 2022 14:31:26 +0200 Subject: [PATCH 50/80] mvebu: backport DTS changes for Turris Omnia from mvebu/dt My commit backported patches from the following links: - https://lore.kernel.org/linux-arm-kernel/20220704113622.18887-1-kabel@kernel.org/ - https://lore.kernel.org/linux-arm-kernel/20220704113622.18887-2-kabel@kernel.org/ According to the links, they are applied in repository mvebu in branch dt, so it should be included in upcoming Linux version soon. Signed-off-by: Josef Schlehofer --- ...mnia-configure-LED-0-pin-function-to.patch | 38 +++++++++++++++ ...ris-omnia-enable-LED-controller-node.patch | 48 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 target/linux/mvebu/patches-5.10/100-mvebu-dt-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch create mode 100644 target/linux/mvebu/patches-5.10/101-mvebu-dt-ARM-dts-turris-omnia-enable-LED-controller-node.patch diff --git a/target/linux/mvebu/patches-5.10/100-mvebu-dt-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch b/target/linux/mvebu/patches-5.10/100-mvebu-dt-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch new file mode 100644 index 0000000000..8778a078c5 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/100-mvebu-dt-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch @@ -0,0 +1,38 @@ +From 81c0004a6433ff90fa6129418802c3c367e453c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 13:36:21 +0200 +Subject: [PATCH] ARM: dts: turris-omnia: configure LED[0] pin function to + link/activity +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The marvell PHY driver changes the LED[0] pin function to "On - 1000 +Mbps Link, Off - Else". + +Turris Omnia expects that the function is "On - Link, Blink - Activity, +Off - No link". + +Use the `marvell,reg-init` DT property to change the function. + +In the future, once netdev trigger will support HW offloading, we will +be able to have this configured via the combination of PHY driver and +leds-turris-omnia driver. + +Signed-off-by: Marek Behún +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -392,7 +392,8 @@ + status = "okay"; + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; +- marvell,reg-init = <3 18 0 0x4985>; ++ marvell,reg-init = <3 18 0 0x4985>, ++ <3 16 0xfff0 0x0001>; + + /* irq is connected to &pcawan pin 7 */ + }; diff --git a/target/linux/mvebu/patches-5.10/101-mvebu-dt-ARM-dts-turris-omnia-enable-LED-controller-node.patch b/target/linux/mvebu/patches-5.10/101-mvebu-dt-ARM-dts-turris-omnia-enable-LED-controller-node.patch new file mode 100644 index 0000000000..93111bec95 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/101-mvebu-dt-ARM-dts-turris-omnia-enable-LED-controller-node.patch @@ -0,0 +1,48 @@ +From fed7cef5e4f2df8c6a79bebf5da1fdd3783ff6f3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 13:36:22 +0200 +Subject: [PATCH] ARM: dts: turris-omnia: enable LED controller node +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The LED controller node is disabled because the leds-turris-omnia driver +does not support setting the LED blinking to be controlled by the MCU. + +The patches for that have now been sent [1], so let's enable the node. + +[1] https://lore.kernel.org/linux-leds/20220704105955.15474-1-kabel@kernel.org/T/ + +Signed-off-by: Marek Behún +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -189,15 +189,13 @@ + reg = <0x2b>; + #address-cells = <1>; + #size-cells = <0>; ++ status = "okay"; + + /* + * LEDs are controlled by MCU (STM32F0) at + * address 0x2b. + * +- * The driver does not support HW control mode +- * for the LEDs yet. Disable the LEDs for now. +- * +- * Also LED functions are not stable yet: ++ * LED functions are not stable yet: + * - there are 3 LEDs connected via MCU to PCIe + * ports. One of these ports supports mSATA. + * There is no mSATA nor PCIe function. +@@ -208,7 +206,6 @@ + * B. Again there is no such function defined. + * For now we use LED_FUNCTION_INDICATOR + */ +- status = "disabled"; + + multi-led@0 { + reg = <0x0>; From 049368b936988ce2c7f82c07367d168600fdbaa6 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 26 Jul 2022 14:32:37 +0200 Subject: [PATCH 51/80] mvebu: backport pending Turris Omnia LEDs improvements It backports this patch series, which is currently on review: https://lore.kernel.org/linux-leds/20220704105955.15474-1-kabel@kernel.org/T/#rb89a4ca5a836f17bdcc53d65549e0b1779bb6a18 It allows being able to configure LEDs in userspace. This fixes issue described in Turris Build repository https://gitlab.nic.cz/turris/os/build/-/issues/354 It happens in OpenWrt as well. - Before ``` root@turris:/# ls /sys/class/leds/ ath10k-phy0 ath9k-phy1 mmc0:: ``` -After ``` root@turris:/# ls /sys/class/leds/ ath10k-phy0 rgb:indicator-2 rgb:lan-3 rgb:wlan-1 ath9k-phy1 rgb:lan-0 rgb:lan-4 rgb:wlan-2 mmc0:: rgb:lan-1 rgb:power rgb:wlan-3 rgb:indicator-1 rgb:lan-2 rgb:wan ``` Signed-off-by: Josef Schlehofer --- ...a-support-HW-controlled-mode-via-pri.patch | 118 ++++++++++++++++++ ...a-initialize-multi-intensity-to-full.patch | 33 +++++ ...a-change-max-brightness-from-255-to-.patch | 31 +++++ ...d-the-IEI-WT61P803-PUZZLE-LED-driver.patch | 2 +- 4 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 target/linux/mvebu/patches-5.10/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch create mode 100644 target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch create mode 100644 target/linux/mvebu/patches-5.10/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch diff --git a/target/linux/mvebu/patches-5.10/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch b/target/linux/mvebu/patches-5.10/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch new file mode 100644 index 0000000000..578124f94d --- /dev/null +++ b/target/linux/mvebu/patches-5.10/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch @@ -0,0 +1,118 @@ +From 80e643510cb14f116f687e992210c0008a09d869 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 12:59:53 +0200 +Subject: [PATCH] leds: turris-omnia: support HW controlled mode via + private trigger +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add support for enabling MCU controlled mode of the Turris Omnia LEDs +via a LED private trigger called "omnia-mcu". + +When in MCU controlled mode, the user can still set LED color, but the +blinking is done by MCU, which does different things for various LEDs: +- WAN LED is blinked according to the LED[0] pin of the WAN PHY +- LAN LEDs are blinked according to the LED[0] output of corresponding + port of the LAN switch +- PCIe LEDs are blinked according to the logical OR of the MiniPCIe port + LED pins + +For a long time I wanted to actually do this differently: I wanted to +make the netdev trigger to transparently offload the blinking to the HW +if user set compatible settings for the netdev trigger. +There was some work on this, and hopefully we will be able to complete +it sometime, but since there are various complications, it will probably +not be soon. + +In the meantime let's support HW controlled mode via this private LED +trigger. If, in the future, we manage to complete the netdev trigger +offloading, we can still keep this private trigger for backwards +compatiblity, if needed. + +We also set "omnia-mcu" to cdev->default_trigger, so that the MCU keeps +control until the user first wants to take over it. If a different +default trigger is specified in device-tree via the +`linux,default-trigger` property, LED class will overwrite +cdev->default_trigger, and so the DT property will be respected. + +Signed-off-by: Marek Behún +--- + drivers/leds/Kconfig | 1 + + drivers/leds/leds-turris-omnia.c | 41 ++++++++++++++++++++++++++++++++ + 2 files changed, 42 insertions(+) + +--- a/drivers/leds/Kconfig ++++ b/drivers/leds/Kconfig +@@ -182,6 +182,7 @@ config LEDS_TURRIS_OMNIA + depends on I2C + depends on MACH_ARMADA_38X || COMPILE_TEST + depends on OF ++ select LEDS_TRIGGERS + help + This option enables basic support for the LEDs found on the front + side of CZ.NIC's Turris Omnia router. There are 12 RGB LEDs on the +--- a/drivers/leds/leds-turris-omnia.c ++++ b/drivers/leds/leds-turris-omnia.c +@@ -49,6 +49,39 @@ struct omnia_leds { + struct omnia_led leds[]; + }; + ++static struct led_hw_trigger_type omnia_hw_trigger_type; ++ ++static int omnia_hwtrig_activate(struct led_classdev *cdev) ++{ ++ struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent); ++ struct omnia_led *led = to_omnia_led(lcdev_to_mccdev(cdev)); ++ ++ /* put the LED into MCU controlled mode */ ++ return i2c_smbus_write_byte_data(leds->client, CMD_LED_MODE, ++ CMD_LED_MODE_LED(led->reg)); ++} ++ ++static void omnia_hwtrig_deactivate(struct led_classdev *cdev) ++{ ++ struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent); ++ struct omnia_led *led = to_omnia_led(lcdev_to_mccdev(cdev)); ++ int ret; ++ ++ /* put the LED into software mode */ ++ ret = i2c_smbus_write_byte_data(leds->client, CMD_LED_MODE, ++ CMD_LED_MODE_LED(led->reg) | ++ CMD_LED_MODE_USER); ++ if (ret < 0) ++ dev_err(cdev->dev, "Cannot put to software mode: %i\n", ret); ++} ++ ++static struct led_trigger omnia_hw_trigger = { ++ .name = "omnia-mcu", ++ .activate = omnia_hwtrig_activate, ++ .deactivate = omnia_hwtrig_deactivate, ++ .trigger_type = &omnia_hw_trigger_type, ++}; ++ + static int omnia_led_brightness_set_blocking(struct led_classdev *cdev, + enum led_brightness brightness) + { +@@ -120,6 +153,8 @@ static int omnia_led_register(struct i2c + cdev = &led->mc_cdev.led_cdev; + cdev->max_brightness = 255; + cdev->brightness_set_blocking = omnia_led_brightness_set_blocking; ++ cdev->trigger_type = &omnia_hw_trigger_type; ++ cdev->default_trigger = omnia_hw_trigger.name; + + /* put the LED into software mode */ + ret = i2c_smbus_write_byte_data(client, CMD_LED_MODE, +@@ -231,6 +266,12 @@ static int omnia_leds_probe(struct i2c_c + + mutex_init(&leds->lock); + ++ ret = devm_led_trigger_register(dev, &omnia_hw_trigger); ++ if (ret < 0) { ++ dev_err(dev, "Cannot register private LED trigger: %d\n", ret); ++ return ret; ++ } ++ + led = &leds->leds[0]; + for_each_available_child_of_node(np, child) { + ret = omnia_led_register(client, led, child); diff --git a/target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch b/target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch new file mode 100644 index 0000000000..6f9aaf11db --- /dev/null +++ b/target/linux/mvebu/patches-5.10/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch @@ -0,0 +1,33 @@ +From bda176cceb735b9b46c1900658b6486c34e13ae6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 12:59:54 +0200 +Subject: [PATCH] leds: turris-omnia: initialize multi-intensity to full +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The default color of each LED before driver probe (255, 255, 255). +Initialize multi_intensity to this value, so that it corresponds to the +reality. + +Signed-off-by: Marek Behún +--- + drivers/leds/leds-turris-omnia.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/leds/leds-turris-omnia.c ++++ b/drivers/leds/leds-turris-omnia.c +@@ -139,10 +139,13 @@ static int omnia_led_register(struct i2c + } + + led->subled_info[0].color_index = LED_COLOR_ID_RED; ++ led->subled_info[0].intensity = 255; + led->subled_info[0].channel = 0; + led->subled_info[1].color_index = LED_COLOR_ID_GREEN; ++ led->subled_info[1].intensity = 255; + led->subled_info[1].channel = 1; + led->subled_info[2].color_index = LED_COLOR_ID_BLUE; ++ led->subled_info[2].intensity = 255; + led->subled_info[2].channel = 2; + + led->mc_cdev.subled_info = led->subled_info; diff --git a/target/linux/mvebu/patches-5.10/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch b/target/linux/mvebu/patches-5.10/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch new file mode 100644 index 0000000000..da4ad49b23 --- /dev/null +++ b/target/linux/mvebu/patches-5.10/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch @@ -0,0 +1,31 @@ +From 349cbe949b9622cc05b148ecfa6268cbbae35b45 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 12:59:55 +0200 +Subject: [PATCH] leds: turris-omnia: change max brightness from 255 to 1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Using binary brightness makes more sense for this controller, because +internally in the MCU it works that way: the LED has a color, and a +state whether it is ON or OFF. + +The resulting brightness computation with led_mc_calc_color_components() +will now always result in either (0, 0, 0) or the multi_intensity value. + +Signed-off-by: Marek Behún +--- + drivers/leds/leds-turris-omnia.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/leds/leds-turris-omnia.c ++++ b/drivers/leds/leds-turris-omnia.c +@@ -154,7 +154,7 @@ static int omnia_led_register(struct i2c + init_data.fwnode = &np->fwnode; + + cdev = &led->mc_cdev.led_cdev; +- cdev->max_brightness = 255; ++ cdev->max_brightness = 1; + cdev->brightness_set_blocking = omnia_led_brightness_set_blocking; + cdev->trigger_type = &omnia_hw_trigger_type; + cdev->default_trigger = omnia_hw_trigger.name; diff --git a/target/linux/mvebu/patches-5.10/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch b/target/linux/mvebu/patches-5.10/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch index 37f98b6ba8..3ac2427b80 100644 --- a/target/linux/mvebu/patches-5.10/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch +++ b/target/linux/mvebu/patches-5.10/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch @@ -30,7 +30,7 @@ Cc: Robert Marko --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig -@@ -333,6 +333,14 @@ config LEDS_IPAQ_MICRO +@@ -334,6 +334,14 @@ config LEDS_IPAQ_MICRO Choose this option if you want to use the notification LED on Compaq/HP iPAQ h3100 and h3600. From 991351431998698aa3d43c9578b8a5184794d1da Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 5 Aug 2022 12:11:28 +0200 Subject: [PATCH 52/80] iproute2: update to 5.16.0 Import patch: - 0001-lib-fix-ax25.h-include-for-musl.patch Refreshed patches: - 100-configure.patch - 130-no_netem_tipc_dcb_man_vdpa.patch - 140-keep_libmnl_optional.patch - 145-keep_libelf_optional.patch - 150-keep_libcap_optional.patch - 170-ip_tiny.patch - 190-fix-nls-rpath-link.patch - 195-build_variant_ip_tc.patch - 200-drop_libbsd_dependency.patch - 300-selinux-configurable.patch Size ip-full (mips_24kc): - 176K ip-full_5.16.0-1_mips_24kc.ipk - 172K ip-full_5.15.0-2_mips_24kc.ipk Size ip-tiny (mips_24kc): - 124K ip-tiny_5.16.0-1_mips_24kc.ipk - 124K ip-tiny_5.15.0-2_mips_24kc.ipk Changes: ade99e20 v5.16.0 1225e307 testsuite: Fix tc/vlan.t test 4734fdb9 uapi: update to mptcp.h c04e45d0 lib/bpf: fix verbose flag when using libbpf 73590d95 tc: flower: Fix buffer overflow on large labels 3f77bc62 uapi: update to if_ether.h 5f8bb902 ip/ipnexthop: fix unsigned overflow in parse_nh_group_type_res() 3184de37 lib/bpf_legacy: remove always-true check 79026c12 rdma: update uapi headers fa58de9b vdpa: align uapi headers be31c264 lnstat: fix buffer overflow in header output 0e949725 tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH 9bd5ab0f mptcp: fix JSON output when dumping endpoints by id a787d9ae man: tc-u32: Fix page to match new firstfrag behavior af96c7b5 Fix some typos detected by Lintian in manpages 35c81b18 uapi: update vdpa.h 0c263d7c iplink_can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC) 0f7bb8d8 iplink_can: print brp and dbrp bittiming variables 67f3c7a5 iplink_can: use PRINT_ANY to factorize code and fix signedness fd5e958c iplink_can: code refactoring of print_ctrlmode() 8316df6e iplink_can: fix configuration ranges in print_usage() and add unit 6e15d27a ip: add AMT support 9cae1de5 Import amt.h 258e350c Update kernel headers 047e9ae5 devlink: Fix cmd_dev_param_set() to check configuration mode 9e009e78 ip, neigh: Add NTF_EXT_MANAGED support 040e5252 ip, neigh: Add missing NTF_USE support c76a3849 ip, neigh: Fix up spacing in netlink dump 76b30805 xfrm: enable to manage default policies 95cd2a62 iplink: enable to specify index when changing netns cee0cf84 configure: add the --libdir option 0ee1950b configure: add the --prefix option 4b8bca5f configure: support --param=value style 99245d17 configure: simplify options parsing c330d097 configure: fix parsing issue with more than one value per option 48c379bc configure: fix parsing issue on libbpf_dir option 1d819dcc configure: fix parsing issue on include_dir option 19ba785f rdma: Add optional-counters set/unset support 7d5cb70e rdma: Add stat "mode" support d480cb71 rdma: Update uapi headers e4ca6a49 Update kernel headers a31e7b79 mptcp: cleanup include section. 41020eb0 Update documentation 8fb522cd Add support for IOAM encap modes b840c620 ip: nexthop: keep cache netlink socket open b9017435 devlink: print maximum number of snapshots if available 6448ed37 Update kernel headers 7ca868a7 ip: nexthop: add print_cache_nexthop which prints and manages the nh cache 5d5dc549 ip: route: print and cache detailed nexthop information when requested cb3d18c2 ip: nexthop: add a helper which retrieves and prints cached nh entry 60a97030 ip: nexthop: add cache helpers 53d7c43b ip: nexthop: factor out ipnh_get_id rtnl talk into a helper a2ca4312 ip: nexthop: factor out print_nexthop's nh entry printing 945c26db ip: nexthop: parse attributes into nh entry structure before printing 7ec1cee6 ip: nexthop: add nh entry structure 60a7515b ip: nexthop: split print_nh_res_group into parse and print parts cfb0a872 ip: nexthop: add resilient group structure 371e889d ip: export print_rta_gateway version which outputs prepared gateway string f7278996 ip: print_rta_if takes ifindex as device argument instead of attribute e2cc9840 ROSE: Print decoded addresses rather than hex numbers. 26c5782f ROSE: Add rose_ntop implementation. fd4c1c81 NETROM: Print decoded addresses rather than hex numbers. c63b769a NETROM: Add netrom_ntop implementation. 399ae00a AX.25: Print decoded addresses rather than hex numbers. 3a92669b AX.25: Add ax25_ntop implementation. ebbb7017 lib: bpf_legacy: add prog name, load time, uid and btf id in prog info dump 0431e1e7 ip: Support filter links/neighs with no master 12b3d6a2 man: ip-macsec: fix gcm-aes-256 formatting issue ae895504 bridge: vlan: add support for mcast_router option 12fbe3e4 bridge: vlan: set vlan option attributes while parsing db28c944 Update kernel headers 6d676ad9 ip: rewrite routel in python 1eaebad2 ip: remove routef script adddf30c ip: remove ifcfg script 2c811088 ip: remove old rtpr script 72222cd4 bridge: vlan: add support for dumping router ports 7ad5505b bridge: vlan: add global mcast_querier option 061da2e2 bridge: vlan: add global mcast_startup_query_interval option 60dcd5c3 bridge: vlan: add global mcast_query_response_interval option 0e4cfa03 bridge: vlan: add global mcast_query_interval option ebcee09c bridge: vlan: add global mcast_querier_interval option 3ae784f5 bridge: vlan: add global mcast_membership_interval option 2b6cc38d bridge: vlan: add global mcast_last_member_interval option 7cc7dbf4 bridge: vlan: add global mcast_startup_query_count option 3399c075 bridge: vlan: add global mcast_last_member_count option a8d7212a bridge: vlan: add global mcast_mld_version option 29fada0f bridge: vlan: add global mcast_igmp_version option 1f608d59 bridge: vlan: add global mcast_snooping option dee5eb05 bridge: vlan: add support to set global vlan options ecf6d8b4 bridge: vlan: add support for vlan filtering when dumping options 720f8613 bridge: vlan: add support to show global vlan options d3a961a9 bridge: vlan: skip unknown attributes when printing options 312e22fe bridge: vlan: factor out vlan option printing d2eecb9d ip: bridge: add support for mcast_vlan_snooping ebaa603b ip/bond: add lacp active support 8d6134b2 Update kernel headers 51d8fc70 ip/tunnel: always print all known attributes 71ba9c18 ipioam6: use print_nl instead of print_null e7841194 tc/skbmod: Introduce SKBMOD_F_ECN option 78832863 IOAM man8 32f4969d New IOAM6 encap type for routes 29098125 Add, show, link, remove IOAM namespaces and schemas e53f4cd5 Import ioam6 uapi headers 236696e5 Update kernel headers cf866f0a ipneigh: add support to print brief output of neigh cache in tabular format Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 4 +-- ...0001-lib-fix-ax25.h-include-for-musl.patch | 31 +++++++++++++++++++ .../iproute2/patches/100-configure.patch | 2 +- .../130-no_netem_tipc_dcb_man_vdpa.patch | 2 +- .../patches/140-keep_libmnl_optional.patch | 2 +- .../patches/145-keep_libelf_optional.patch | 2 +- .../patches/150-keep_libcap_optional.patch | 2 +- .../utils/iproute2/patches/170-ip_tiny.patch | 10 +++--- .../patches/190-fix-nls-rpath-link.patch | 4 +-- .../patches/195-build_variant_ip_tc.patch | 4 +-- .../patches/200-drop_libbsd_dependency.patch | 2 +- .../patches/300-selinux-configurable.patch | 2 +- 12 files changed, 49 insertions(+), 18 deletions(-) create mode 100644 package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 55c00a0d6d..cd453b4c98 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.15.0 +PKG_VERSION:=5.16.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=38e3e4a5f9a7f5575c015027a10df097c149111eeb739993128e5b2b35b291ff +PKG_HASH:=c064b66f6b001c2a35aa5224b5b1ac8aa4bee104d7dce30d6f10a84cb8b01e2f PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch b/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch new file mode 100644 index 0000000000..fa6a6c9f25 --- /dev/null +++ b/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch @@ -0,0 +1,31 @@ +From 8bced38a941a181f1468fa39541e872e51b6022f Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Thu, 13 Jan 2022 08:14:13 +0000 +Subject: [PATCH 1/1] lib: fix ax25.h include for musl + +ax25.h isn't guaranteed to be avilable in netax25/*; +it's dependent on our choice of libc (it's not available +on musl at least) [0]. + +Let's use the version from linux-headers. + +[0] https://sourceware.org/glibc/wiki/Synchronizing_Headers +Bug: https://bugs.gentoo.org/831102 + +Signed-off-by: Sam James +Signed-off-by: Stephen Hemminger +--- + lib/ax25_ntop.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/ax25_ntop.c ++++ b/lib/ax25_ntop.c +@@ -2,7 +2,7 @@ + + #include + #include +-#include ++#include + + #include "utils.h" + diff --git a/package/network/utils/iproute2/patches/100-configure.patch b/package/network/utils/iproute2/patches/100-configure.patch index 0c19b2086a..2d4fb7b9b3 100644 --- a/package/network/utils/iproute2/patches/100-configure.patch +++ b/package/network/utils/iproute2/patches/100-configure.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -34,7 +34,8 @@ int main(int argc, char **argv) { +@@ -36,7 +36,8 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch index 8ddb316744..1386dd9e1f 100644 --- a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch +++ b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-s +@@ -65,7 +65,7 @@ WFLAGS += -Wmissing-declarations -Wold-s CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch index ff7e9ca4e5..576da0fd59 100644 --- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch +++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -387,7 +387,7 @@ check_selinux() +@@ -398,7 +398,7 @@ check_selinux() check_mnl() { diff --git a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch index 079ca0512e..0c5c3f59ed 100644 --- a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch +++ b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -255,7 +255,7 @@ EOF +@@ -266,7 +266,7 @@ EOF check_elf() { diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch index 68e1624166..e945d802f3 100644 --- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch +++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -445,7 +445,7 @@ EOF +@@ -456,7 +456,7 @@ EOF check_cap() { diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index cd687e7601..399dd4fc87 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -17,6 +17,13 @@ RTMONOBJ=rtmon.o +@@ -18,6 +18,13 @@ RTMONOBJ=rtmon.o include ../config.mk @@ -12,9 +12,9 @@ +STATIC_SYM_SOURCES:=$(filter-out $(STATIC_SYM_FILTER),$(wildcard *.c)) + ALLOBJ=$(IPOBJ) $(RTMONOBJ) - SCRIPTS=ifcfg rtpr routel routef + SCRIPTS=routel TARGETS=ip rtmon -@@ -46,7 +53,7 @@ else +@@ -47,7 +54,7 @@ else ip: static-syms.o static-syms.o: static-syms.h @@ -30,8 +30,8 @@ "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] -batch filename\n" +#ifndef IPROUTE2_TINY - "where OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n" - " macsec | maddress | monitor | mptcp | mroute | mrule |\n" + "where OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |\n" + " link | macsec | maddress | monitor | mptcp | mroute | mrule |\n" " neighbor | neighbour | netconf | netns | nexthop | ntable |\n" " ntbl | route | rule | sr | tap | tcpmetrics |\n" " token | tunnel | tuntap | vrf | xfrm }\n" diff --git a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch index 92d02b9a4e..c7fceb2e22 100644 --- a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch +++ b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -279,7 +279,7 @@ int main(int argc, char **argv) { +@@ -290,7 +290,7 @@ int main(int argc, char **argv) { } EOF @@ -9,7 +9,7 @@ local ret=$? rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test -@@ -297,7 +297,7 @@ int main(int argc, char **argv) { +@@ -308,7 +308,7 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch index 13418662ee..a219251573 100644 --- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch +++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch @@ -1,9 +1,9 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -26,7 +26,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI +@@ -27,7 +27,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI ALLOBJ=$(IPOBJ) $(RTMONOBJ) - SCRIPTS=ifcfg rtpr routel routef + SCRIPTS=routel -TARGETS=ip rtmon +TARGETS=$(findstring ip,$(BUILD_VARIANT)) rtmon diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch index 12a1ccfa33..bc316c7dde 100644 --- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch +++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -431,14 +431,8 @@ EOF +@@ -442,14 +442,8 @@ EOF if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then echo "no" else diff --git a/package/network/utils/iproute2/patches/300-selinux-configurable.patch b/package/network/utils/iproute2/patches/300-selinux-configurable.patch index b7e61fd3bd..817abf7d17 100644 --- a/package/network/utils/iproute2/patches/300-selinux-configurable.patch +++ b/package/network/utils/iproute2/patches/300-selinux-configurable.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -374,7 +374,7 @@ check_libbpf() +@@ -385,7 +385,7 @@ check_libbpf() check_selinux() # SELinux is a compile time option in the ss utility { From e65337ce65eb5487f10895b75e93002983aa6194 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 5 Aug 2022 12:31:06 +0200 Subject: [PATCH 53/80] iproute2: update to 5.17.0 Remove backports: - 0001-lib-fix-ax25.h-include-for-musl.patch Changes: 4c424dfd v5.17.0 7846496b link_xfrm: if_id must be non zero eed4bb1a testsuite: link xfrm delete no if_id test ac0a54b2 rdma: make RES_PID and RES_KERN_NAME alternative to each other 885e281e uapi: update vdpa.h 19c0def1 ipaddress: remove 'label' compatibility with Linux-2.0 net aliases 1808f002 lib/fs: fix memory leak in get_task_name() 62c0700c uapi: update magic.h c8d9d925 rdma: Fix the logic to print unsigned int. a42dfaa4 Revert "rdma: Fix res_print_uint() and add res_print_u64()" 9d0badec rdma: Fix res_print_uint() and add res_print_u64() 86a1452b uapi: update to xfrm.h 09c6a3d2 bridge: Remove vlan listing from `bridge link` e4fda259 bridge: Fix error string typo cc143bda lnstat: fix strdup leak in -w argument parsing 90bbf861 iplink_can: print_usage: typo fix, add missing spaces 1b5c7414 dcb: Fix error reporting when accessing "dcb app" a38d305d tc: fix duplicate fall-through f8beda6e libnetlink: fix socket leak in rtnl_open_byproto() 7f70eb2a tc_util: Fix parsing action control with space and slash 29da83f8 iprule: Allow option dsfield in 'ip rule show' 07012a1f ss: use freecon() instead of free() when appropriate 03b4de0b man: Fix a typo in the flag documentation of ip address 924f6b4a dcb: app: Add missing "dcb app show dev X default-prio" 5c9571bc uapi: update kernel headers from 5.17-rc1 d542543b tc/action: print error to stderr 52370c61 mptcp: add id check for deleting address c556f577 dcb: Rewrite array-formatting code to not cause warnings with Clang 0dc5da8e f_flower: fix checkpatch warnings ffbcb246 netem: fix checkpatch warnings 8bced38a lib: fix ax25.h include for musl e27bb8e5 uapi: add missing virtio headers 26ff0afa uapi: add missing rose and ax25 files eb4206ec q_cake: allow changing to diffserv3 db530529 iplink_can: add ctrlmode_{supported,_static} to the "--details --json" output ac2e9148 Update kernel headers bb4cc9cc rdma: Don't allocate sparse array b8767168 rdma: Limit copy data by the destination size 167e33f3 vdpa: Enable user to set mtu of the vdpa device 384938f9 vdpa: Enable user to set mac address of vdpa device a311f0c4 vdpa: Enable user to query vdpa device config layout 9d8882d5 vdpa: Update kernel headers 5cb7ec0c Update kernel headers and import virtio_net 26113360 mptcp: add support for changing the backup flag 4b301b87 tc: Add support for ce_threshold_value/mask in fq_codel 99d09ee9 bond: add arp_missed_max option 432cb06b mptcp: add support for fullmesh flag 2d777dfe Update kernel headers a21458fc vdpa: Remove duplicate vdpa UAPI header file Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 4 +-- ...0001-lib-fix-ax25.h-include-for-musl.patch | 31 ------------------- 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index cd453b4c98..6058b5e8d9 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.16.0 +PKG_VERSION:=5.17.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=c064b66f6b001c2a35aa5224b5b1ac8aa4bee104d7dce30d6f10a84cb8b01e2f +PKG_HASH:=6e384f1b42c75e1a9daac57866da37dcff909090ba86eb25a6e764da7893660e PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch b/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch deleted file mode 100644 index fa6a6c9f25..0000000000 --- a/package/network/utils/iproute2/patches/0001-lib-fix-ax25.h-include-for-musl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8bced38a941a181f1468fa39541e872e51b6022f Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Thu, 13 Jan 2022 08:14:13 +0000 -Subject: [PATCH 1/1] lib: fix ax25.h include for musl - -ax25.h isn't guaranteed to be avilable in netax25/*; -it's dependent on our choice of libc (it's not available -on musl at least) [0]. - -Let's use the version from linux-headers. - -[0] https://sourceware.org/glibc/wiki/Synchronizing_Headers -Bug: https://bugs.gentoo.org/831102 - -Signed-off-by: Sam James -Signed-off-by: Stephen Hemminger ---- - lib/ax25_ntop.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/lib/ax25_ntop.c -+++ b/lib/ax25_ntop.c -@@ -2,7 +2,7 @@ - - #include - #include --#include -+#include - - #include "utils.h" - From d3b4422f6206968d17bbf42cfb911c8ff699b160 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Fri, 5 Aug 2022 12:36:12 +0200 Subject: [PATCH 54/80] iproute2: update to 5.18.0 The ip-tiny size grows from 124k (5.17.0) to 128k (5.18.0). The update introduces a commit "configure: add check_libtirpc()" that introduces a check for libtirpc. However, if libtirpc is already in the staging directory due to an other dependency the check yields that the library is installed and should be used resulting in failures like: Package ss is missing dependencies for the following libraries: libtirpc.so.3 To fix it add a patch making libtirpc optional again and setting it "HAVE_TIRPC=n": - 155-keep_tirpc_optional.patch Fix patches: - 130-no_netem_tipc_dcb_man_vdpa.patch Refresh patches: - 140-keep_libmnl_optional.patch - 150-keep_libcap_optional.patch - 180-drop_FAILED_POLICY.patch - 200-drop_libbsd_dependency.patch Changes: 6474b7c8 v5.18.0 4429a6c9 tipc: fix keylen check 6b6979b9 iplink: remove GSO_MAX_SIZE definition 19c3e009 doc: fix 'infact' --> 'in fact' typo ed706c78 man: fix some typos 03589beb man: devlink-region: fix typo in example b84fc332 tc: em_u32: fix offset parsing b6d17086 uapi: update of virtio_ids 17bf51b7 libbpf: Remove use of bpf_map_is_offload_neutral fa305925 libbpf: Remove use of bpf_program__set_priv and bpf_program__priv 9e0057b4 libbpf: Use bpf_object__load instead of bpf_object__load_xattr e81fd551 devlink: fix "devlink health dump" command without arg 6f3b5843 man: use quote instead of acute accent 42d351fa man: 'allow to' -> 'allow one to' d8a7a0f4 uapi: upstream update to stddef.h 5b2ff061 uapi: update from 5.18-rc1 292509f9 ss: remove an implicit dependency on rpcinfo 1ee309a4 configure: add check_libtirpc() 41848100 ip/geneve: add support for IFLA_GENEVE_INNER_PROTO_INHERIT 28add137 f_flower: Implement gtp options support b25599c5 ip: GTP support in ip link e4880869 man: bridge: document per-port mcast_router settings 9e82e828 bridge: support for controlling mcast_router per port f1d18e2e Update kernel headers 8130653d vdpa: Update man page with added support to configure max vq pair 56eb8bf4 vdpa: Support reading device features 16482fd4 vdpa: Support for configuring max VQ pairs for a device bd91c764 vdpa: Allow for printing negotiated features of a device 2d1954c8 vdpa: Remove unsupported command line option 93fb6810 Makefile: move HAVE_MNL check to top-level Makefile 2dee2101 man: ip-link: whitespace fixes to odd line breaks mid sentence 609b90aa man: ip-link: mention bridge port's default mcast_flood state b1c3ad84 man: ip-link: document new bcast_flood flag on bridge ports c354a434 ip: iplink_bridge_slave: support for broadcast flooding 909f0d51 man: bridge: add missing closing " in bridge show mdb 3b681cf9 man: bridge: document new bcast_flood flag for bridge ports a6c848eb bridge: support for controlling flooding of broadcast per port 8acb5247 ip/batadv: allow to specify RA when creating link 0431d8e8 Import batman_adv.h header from last kernel sync point 239bfd45 Revert "configure: Allow command line override of toolchain" a93c90c7 tc: separate action print for filter and action dump d9977eaf bpf: Remove use of bpf_create_map_xattr ac4e0913 bpf: Export bpf syscall wrapper 873bb975 bpf_glue: Remove use of bpf_load_program from libbpf 5e17b715 ss: display advertised TCP receive window and out-of-order counter 712ec66e tc: bash-completion: Add profinet and ethercat to procotol completion list 75061b35 lib: add profinet and ethercat as link layer protocol names 0a685b98 man8/ip-link.8: add locked port feature description and cmd syntax d4fe3673 man8/bridge.8: add locked port feature description and cmd syntax 092af16b ip: iplink_bridge_slave: add locked port flag support 0e51a185 bridge: link: add command to set port in locked mode 04a0077d Update kernel headers 386ae64c configure: Allow command line override of toolchain bea92cb0 mptcp: add port support for setting flags 2dbc6c90 mptcp: add fullmesh support for setting flags 5fb6bda0 mptcp: add fullmesh check for adding address 9831202f bond: add ns_ip6_target option e8fd4d4b devlink: Remove strtouint8_t in favor of get_u8 2688abf0 devlink: Remove strtouint16_t in favor of get_u16 95c03f40 devlink: Remove strtouint32_t in favor of get_u32 7cb0e24d devlink: Remove strtouint64_t in favor of get_u64 7848f6bb Update kernel headers 4f015972 f_flower: fix indentation for enc_key_id and u32 25a9c4fa tunnel: Fix missing space after local/remote print ff14875e Update documentation 8908cb25 Add support for the IOAM insertion frequency cd24451e Update kernel headers e4ba36f7 iplink: add ip-link documentation 5d57e130 iplink: add gro_max_size attribute handling 721435dc tc: u32: add json support in `print_raw`, `print_ipv4`, `print_ipv6` c733722b tc: u32: add support for json output 5f44590d tc/f_flower: fix indentation 9948b6cb tc_util: fix breakage from clang changes f4cd4f12 tc: add skip_hw and skip_sw to control action offload ba5ac984 json_print: suppress clang format warning bf71c8f2 libbpf: fix clang warning about format non-literal 5632cf69 tunnel: fix clang warning c0248878 tipc: fix clang warning about empty format string 371c13e8 can: fix clang warning 8d27eee5 ipl2tp: fix clang warning 560d2336 tc_util: fix clang warning in print_masked_type b2450e46 flower: fix clang warnings 4e27d538 netem: fix clang warnings 9d5e29e6 utils: add format attribute 343c4f52 tc: add format attribute to tc_print_rate Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 5 +++-- .../patches/130-no_netem_tipc_dcb_man_vdpa.patch | 11 +++++++---- .../iproute2/patches/140-keep_libmnl_optional.patch | 2 +- .../iproute2/patches/150-keep_libcap_optional.patch | 2 +- .../iproute2/patches/155-keep_tirpc_optional.patch | 11 +++++++++++ .../iproute2/patches/180-drop_FAILED_POLICY.patch | 2 +- .../iproute2/patches/200-drop_libbsd_dependency.patch | 2 +- 7 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 6058b5e8d9..123b0ce238 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.17.0 +PKG_VERSION:=5.18.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=6e384f1b42c75e1a9daac57866da37dcff909090ba86eb25a6e764da7893660e +PKG_HASH:=5ba3d464d51c8c283550d507ffac3d10f7aec587b7c66b0ccb6950643646389e PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 @@ -184,6 +184,7 @@ MAKE_FLAGS += \ HAVE_ELF=$(HAVE_ELF) \ HAVE_MNL=$(HAVE_MNL) \ HAVE_CAP=$(HAVE_CAP) \ + HAVE_TIRPC=n \ IPT_LIB_DIR=/usr/lib/iptables \ XT_LIB_DIR=/usr/lib/iptables \ TC_CONFIG_XT=$(TC_CONFIG_XT) \ diff --git a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch index 1386dd9e1f..2a3f9eb90f 100644 --- a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch +++ b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch @@ -1,11 +1,14 @@ --- a/Makefile +++ b/Makefile -@@ -65,7 +65,7 @@ WFLAGS += -Wmissing-declarations -Wold-s +@@ -65,9 +65,9 @@ WFLAGS += -Wmissing-declarations -Wold-s CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) YACCFLAGS = -d -t -v --SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa -+SUBDIRS=lib ip tc bridge misc genl devlink rdma +-SUBDIRS=lib ip tc bridge misc netem genl man ++SUBDIRS=lib ip tc bridge misc genl + ifeq ($(HAVE_MNL),y) +-SUBDIRS += tipc devlink rdma dcb vdpa ++SUBDIRS += devlink rdma + endif LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a - LDLIBS += $(LIBNETLINK) diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch index 576da0fd59..a8cdd103ba 100644 --- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch +++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -398,7 +398,7 @@ check_selinux() +@@ -411,7 +411,7 @@ check_tirpc() check_mnl() { diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch index e945d802f3..4cce2c3ca6 100644 --- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch +++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -456,7 +456,7 @@ EOF +@@ -469,7 +469,7 @@ EOF check_cap() { diff --git a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch new file mode 100644 index 0000000000..28ba7e5217 --- /dev/null +++ b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -398,7 +398,7 @@ check_selinux() + + check_tirpc() + { +- if ${PKG_CONFIG} libtirpc --exists; then ++ if [ "${HAVE_TIRPC}" = "y" ] && ${PKG_CONFIG} libtirpc --exists; then + echo "HAVE_RPC:=y" >>$CONFIG + echo "yes" + diff --git a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch index 07d5230a6e..094ff393a6 100644 --- a/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch +++ b/package/network/utils/iproute2/patches/180-drop_FAILED_POLICY.patch @@ -31,7 +31,7 @@ Subject: [PATCH] add support for dropping with FAILED_POLICY if (!end || end == arg || *end || res > 255) --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h -@@ -256,6 +256,7 @@ enum { +@@ -265,6 +265,7 @@ enum { RTN_THROW, /* Not in this table */ RTN_NAT, /* Translate this address */ RTN_XRESOLVE, /* Use external resolver */ diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch index bc316c7dde..d1948860e8 100644 --- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch +++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -442,14 +442,8 @@ EOF +@@ -455,14 +455,8 @@ EOF if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then echo "no" else From e87114401357ccd34893232b35a757d4c33ea710 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 6 Aug 2022 09:41:38 +0200 Subject: [PATCH 55/80] iproute2: update to 5.19.0 Add patch: - 105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch Refreshed: - 170-ip_tiny.patch - 195-build_variant_ip_tc.patch Changes: deb48554 v5.19.0 f8decf82 bpf_glue: include errno.h 71178ae0 rdma: update uapi/ib_user_verbs.h 96594fd2 vdpa: update uapi headers from 5.19-rc7 30c7b77f Revert "uapi: add vdpa.h" c5433c4b ip neigh: Fix memory leak when doing 'get' 2cb76253 mptcp: Fix memory leak when getting limits afdbb020 mptcp: Fix memory leak when doing 'endpoint show' 6db01afd bridge: Fix memory leak when doing 'fdb get' 1d540336 ip address: Fix memory leak when specifying device 325f706b uapi: add virtio_ring.h 291898c5 uapi: add vdpa.h 6e2fb804 uapi: update bpf.h 329fda18 ip: Fix size_columns() invocation that passes a 32-bit quantity 2a00a4b1 man: tc-fq_codel: add drop_batch 6bf5abef uapi: update mptcp.h 02410392 ip: Fix size_columns() for very large values ed243312 man: tc-ct.8: fix example 2bb37e90 l2tp: fix typo in AF_INET6 checksum JSON print 855edb3d man: tc-fq_codel: Fix a typo. 4044a453 tc: declaration hides parameter a44a7918 genl: fix duplicate include guard 703f2de6 uapi: change name for zerocopy sendfile in tls 248ad98e uapi: update socket.h 11e41a63 ip: Convert non-constant initializers to macros 8d3977ef Update kernel headers 5a1ad9f8 man: ip-stats.8: Describe groups xstats, xstats_slave and afstats d9976d67 ipstats: Expose bond stats in ipstats 36e10429 ipstats: Expose bridge stats in ipstats 79f5ad95 iplink_bridge: Split bridge_print_stats_attr() 1247ed51 ipstats: Add groups "xstats", "xstats_slave" c6900b79 ipstats: Add a third level of stats hierarchy, a "suite" 2ed73b9a iplink: Add JSON support to MPLS stats formatter 5ed8fd9d ipstats: Add a group "afstats", subgroup "mpls" dff392fd iplink: Publish a function to format MPLS stats 72623b73 iplink: Fix formatting of MPLS stats ce41750f ip: ipstats: Do not assume length of response attribute payload 40b50f15 bridge: vni: add support for stats dumping c7f12a15 ip: iplink_vxlan: add support to set vnifiltering flag on vxlan device 45cd32f9 bridge: vxlan device vnifilter support 837294e4 libbpf: Remove use of bpf_map_is_offload_neutral 64e5ed77 libbpf: Remove use of bpf_program__set_priv and bpf_program__priv ba6519cb libbpf: Use bpf_object__load instead of bpf_object__load_xattr a6eb654d f_flower: add number of vlans man entry 5788732e f_flower: Check args with num_of_vlans 5ba31bcf f_flower: Add num of vlans parameter b28eb051 man: Add man pages for the "stats" functions a05a27c0 ipmonitor: Add monitoring support for stats events 0f1fd40c ipstats: Add offload subgroup "l3_stats" 179030fa ipstats: Add offload subgroup "hw_stats_info" af5e7955 ipstats: Add a group "offload", subgroup "cpu_hit" 0517a2fd ipstats: Add a group "link" df0b2c6d ipstats: Add a shell of "show" command 82f6444f ipstats: Add a "set" command 54d82b06 ip: Add a new family of commands, "stats" 5520cf16 ip: Publish functions for stats formatting a463d6b1 libnetlink: Add filtering to rtnl_statsdump_req_filter() 38ae12d3 devlink: introduce -[he]x cmdline option to allow dumping numbers in hex format bba95837 Update kernel headers f6559bea ip-link: put types on man page in alphabetic order ee53174b ip/iplink_virt_wifi: add support for virt_wifi Signed-off-by: Nick Hainke --- package/network/utils/iproute2/Makefile | 4 +-- ...IN-function-to-fix-undefined-referen.patch | 27 +++++++++++++++++++ .../utils/iproute2/patches/170-ip_tiny.patch | 6 ++--- .../patches/195-build_variant_ip_tc.patch | 2 +- 4 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 123b0ce238..5439c050c1 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=5.18.0 +PKG_VERSION:=5.19.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=5ba3d464d51c8c283550d507ffac3d10f7aec587b7c66b0ccb6950643646389e +PKG_HASH:=26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch b/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch new file mode 100644 index 0000000000..7bf55dd57b --- /dev/null +++ b/package/network/utils/iproute2/patches/105-ipstats-Define-MIN-function-to-fix-undefined-referen.patch @@ -0,0 +1,27 @@ +From c69e8e474936795a2cd7638b11ce3e99ff4d5ae7 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sat, 6 Aug 2022 10:00:20 +0200 +Subject: [PATCH] ipstats: Define MIN function to fix undefined references + +Fixes errors in the form of: + in function `ipstats_show_64': + :(.text+0x4e30): undefined reference to `MIN' + +Signed-off-by: Nick Hainke +--- + ip/ipstats.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/ip/ipstats.c ++++ b/ip/ipstats.c +@@ -6,6 +6,10 @@ + #include "utils.h" + #include "ip_common.h" + ++#ifndef MIN ++#define MIN(a, b) ((a) < (b) ? (a) : (b)) ++#endif ++ + struct ipstats_stat_dump_filters { + /* mask[0] filters outer attributes. Then individual nests have their + * filtering mask at the index of the nested attribute. diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index 399dd4fc87..1196be31f0 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -18,6 +18,13 @@ RTMONOBJ=rtmon.o +@@ -19,6 +19,13 @@ RTMONOBJ=rtmon.o include ../config.mk @@ -14,7 +14,7 @@ ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=routel TARGETS=ip rtmon -@@ -47,7 +54,7 @@ else +@@ -48,7 +55,7 @@ else ip: static-syms.o static-syms.o: static-syms.h @@ -93,8 +93,8 @@ { "ioam", do_ioam6 }, +#endif { "help", do_help }, + { "stats", do_ipstats }, { 0 } - }; --- a/lib/Makefile +++ b/lib/Makefile @@ -3,6 +3,10 @@ include ../config.mk diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch index a219251573..dc9c0b2969 100644 --- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch +++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch @@ -1,6 +1,6 @@ --- a/ip/Makefile +++ b/ip/Makefile -@@ -27,7 +27,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI +@@ -28,7 +28,7 @@ STATIC_SYM_SOURCES:=$(filter-out $(STATI ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=routel From b3a0c14824be04b40e5098f3dc5073bb4b250edf Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sat, 6 Aug 2022 23:35:12 +0200 Subject: [PATCH 56/80] iproute2: shrink ip-tiny size by disabling features With the 5.18 and 5.19 update ip-tiny grows in size. Remove some features bringing it back to the size before 5.18. Remove - Identifier-locator addressing (ila) - MACsec Device Configuration (macsec) - Multicast Routing Cache Management (mroute) - mrule - Virtual Routing and Forwarding (vrf) - Segment Routing (sr) Signed-off-by: Nick Hainke --- .../utils/iproute2/patches/170-ip_tiny.patch | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index 1196be31f0..ba2cb0637a 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -36,14 +36,14 @@ " ntbl | route | rule | sr | tap | tcpmetrics |\n" " token | tunnel | tuntap | vrf | xfrm }\n" +#else -+ "where OBJECT := { address | ila | link | macsec | maddress | monitor |\n" -+ " mroute | mrule | neighbor | neighbour | netns | route |\n" -+ " rule | sr | token | tunnel | vrf }\n" ++ "where OBJECT := { address | link | maddress | monitor |\n" ++ " neighbor | neighbour | netns | route |\n" ++ " rule | token | tunnel }\n" +#endif " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n" " -f[amily] { inet | inet6 | mpls | bridge | link } |\n" -@@ -91,37 +97,51 @@ static const struct cmd { +@@ -91,37 +97,49 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -63,9 +63,9 @@ +#ifndef IPROUTE2_TINY { "l2tp", do_ipl2tp }, { "fou", do_ipfou }, -+#endif { "ila", do_ipila }, { "macsec", do_ipmacsec }, ++#endif { "tunnel", do_iptunnel }, { "tunl", do_iptunnel }, +#ifndef IPROUTE2_TINY @@ -78,16 +78,14 @@ { "monitor", do_ipmonitor }, +#ifndef IPROUTE2_TINY { "xfrm", do_xfrm }, -+#endif { "mroute", do_multiroute }, { "mrule", do_multirule }, ++#endif { "netns", do_netns }, +#ifndef IPROUTE2_TINY { "netconf", do_ipnetconf }, -+#endif { "vrf", do_ipvrf}, { "sr", do_seg6 }, -+#ifndef IPROUTE2_TINY { "nexthop", do_ipnh }, { "mptcp", do_mptcp }, { "ioam", do_ioam6 }, From cc24c4ed5eae66c061e5787bb172fd2a91861f25 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 7 Aug 2022 23:09:41 +0200 Subject: [PATCH 57/80] binutils: update to 2.39 Changes: * The ELF linker will now generate a warning message if the stack is made executable. Similarly it will warn if the output binary contains a segment with all three of the read, write and execute permission bits set. These warnings are intended to help developers identify programs which might be vulnerable to attack via these executable memory regions. The warnings are enabled by default but can be disabled via a command line option. It is also possible to build a linker with the warnings disabled, should that be necessary. * The ELF linker now supports a --package-metadata option that allows embedding a JSON payload in accordance to the Package Metadata specification. * In linker scripts it is now possible to use TYPE= in an output section description to set the section type value. * The objdump program now supports coloured/colored syntax highlighting of its disassembler output for some architectures. (Currently: AVR, RiscV, s390, x86, x86_64). * The nm program now supports a --no-weak/-W option to make it ignore weak symbols. * The readelf and objdump programs now support a -wE option to prevent them from attempting to access debuginfod servers when following links. * The objcopy program's --weaken, --weaken-symbol, and --weaken-symbols options now works with unique symbols as well. Announcement: https://sourceware.org/pipermail/binutils/2022-August/122246.html Signed-off-by: Nick Hainke --- package/devel/binutils/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 75fdd320cd..728fb37162 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils -PKG_VERSION:=2.38 +PKG_VERSION:=2.39 PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/binutils PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_VERSION:=$(PKG_VERSION) -PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 +PKG_HASH:=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00 PKG_FIXUP:=patch-libtool PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl From 81ecce27c740604c0d9470be2270b71f22db5351 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Sun, 7 Aug 2022 23:26:05 +0200 Subject: [PATCH 58/80] toolchain: binutils: add support for version 2.39 Release notes: https://sourceware.org/pipermail/binutils/2022-August/122246.html Signed-off-by: Nick Hainke --- toolchain/binutils/Config.in | 4 ++ toolchain/binutils/Config.version | 4 ++ toolchain/binutils/Makefile | 4 ++ .../2.39/300-001_ld_makefile_patch.patch | 22 +++++++++++ .../400-mips_no_dynamic_linking_sym.patch | 18 +++++++++ ...e-default-emulation-for-mips64-linux.patch | 38 +++++++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 toolchain/binutils/patches/2.39/300-001_ld_makefile_patch.patch create mode 100644 toolchain/binutils/patches/2.39/400-mips_no_dynamic_linking_sym.patch create mode 100644 toolchain/binutils/patches/2.39/500-Change-default-emulation-for-mips64-linux.patch diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index bf63cb969e..0bc8bbd0a3 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -13,6 +13,10 @@ choice config BINUTILS_USE_VERSION_2_38 bool "Binutils 2.38" select BINUTILS_VERSION_2_38 + + config BINUTILS_USE_VERSION_2_39 + bool "Binutils 2.39" + select BINUTILS_VERSION_2_39 endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index bb651541fd..a79b72e17f 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -6,7 +6,11 @@ config BINUTILS_VERSION_2_37 config BINUTILS_VERSION_2_38 bool +config BINUTILS_VERSION_2_39 + bool + config BINUTILS_VERSION string default "2.37" if BINUTILS_VERSION_2_37 default "2.38" if BINUTILS_VERSION_2_38 + default "2.39" if BINUTILS_VERSION_2_39 diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index d1961603c4..2903f8a791 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -39,6 +39,10 @@ ifeq ($(PKG_VERSION),2.38) PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 endif +ifeq ($(PKG_VERSION),2.39) + PKG_HASH:=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00 +endif + HOST_BUILD_PARALLEL:=1 PATCH_DIR:=./patches/$(PKG_VERSION) diff --git a/toolchain/binutils/patches/2.39/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.39/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..ac80bf4259 --- /dev/null +++ b/toolchain/binutils/patches/2.39/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -569,7 +569,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.39/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.39/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 0000000000..f499dfdc02 --- /dev/null +++ b/toolchain/binutils/patches/2.39/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -8066,6 +8066,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; + bh = NULL; ++ if (0) { + if (!(_bfd_generic_link_add_one_symbol + (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, + NULL, false, get_elf_backend_data (abfd)->collect, &bh))) +@@ -8078,6 +8079,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + if (! bfd_elf_link_record_dynamic_symbol (info, h)) + return false; ++ } + + if (! mips_elf_hash_table (info)->use_rld_obj_head) + { diff --git a/toolchain/binutils/patches/2.39/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.39/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 0000000000..8a43563db0 --- /dev/null +++ b/toolchain/binutils/patches/2.39/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,38 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -928,12 +928,12 @@ case "${targ}" in + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" + ;; + mips64*el-*-linux*) +- targ_defvec=mips_elf32_ntrad_le_vec +- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" + ;; + mips64*-*-linux*) +- targ_defvec=mips_elf32_ntrad_be_vec +- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" + ;; + mips*el-*-linux*) + targ_defvec=mips_elf32_trad_le_vec +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -580,12 +580,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx + ;; + mips*-*-windiss) targ_emul=elf32mipswindiss + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip From cc2dfc5e4dc2e480203b826749186c73021795df Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Aug 2022 18:35:46 +0200 Subject: [PATCH 59/80] iwinfo: update to latest HEAD 705d3b5 iwinfo: Add missing auth_suites mappings for WPA3 Signed-off-by: Hauke Mehrtens --- package/network/utils/iwinfo/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index 25cc210acb..b23726ebb0 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2022-04-26 -PKG_SOURCE_VERSION:=dc6847eb5ec8747867bc20f1024723c6397c1df7 -PKG_MIRROR_HASH:=3f243cf75f4cec02e9e8ecc2087577146845346c0172808f64dea066f84f88d4 +PKG_SOURCE_DATE:=2022-08-13 +PKG_SOURCE_VERSION:=705d3b5cc30ed1ac3b2fed131259bcbc61177e41 +PKG_MIRROR_HASH:=091b7f20e95e9f1dfb993d71172d96590041f985e422b7248e15b11798a73644 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 From 535bc611404d2e74db1b4248444d429f15008b63 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Aug 2022 18:56:58 +0200 Subject: [PATCH 60/80] ubox: update to latest git HEAD fa6cb9a kmodloader: fix bad realloc usage 4c7b720 kmodloader: fix GCC fanalyzer warnings Signed-off-by: Hauke Mehrtens --- package/system/ubox/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index a184ef6eb2..ca177b2c49 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git -PKG_SOURCE_DATE:=2022-07-17 -PKG_SOURCE_VERSION:=46a33b8be298e1e700e56f05b5ba4f06daf83efa -PKG_MIRROR_HASH:=551560cc481dd5d12e1dc81f368af8be29027891ce091ba71fee8fe5d9afcb87 +PKG_SOURCE_DATE:=2022-08-13 +PKG_SOURCE_VERSION:=4c7b720b9c63b826fb9404e454ae54f2ef5649d5 +PKG_MIRROR_HASH:=35178148034dfef36c5fda2bc8217617920bc1a3b86f72efbe87e85048a6a2a8 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 90bedc411b1e98e9adf668dde09f8eafe4490344 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Aug 2022 19:01:15 +0200 Subject: [PATCH 61/80] umbim: bump to git HEAD 146bc77 umbim: fix invalid mbim message string encoding Signed-off-by: Hauke Mehrtens --- package/network/utils/umbim/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/utils/umbim/Makefile b/package/network/utils/umbim/Makefile index d339783f6c..3563949c67 100644 --- a/package/network/utils/umbim/Makefile +++ b/package/network/utils/umbim/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/umbim.git -PKG_SOURCE_DATE:=2021-08-18 -PKG_SOURCE_VERSION:=de5623104baee6e0c13c92f05c15bf4b4145c0b1 -PKG_MIRROR_HASH:=2d4a75d2b53c8413521a2fd138895e327bff3f4b4d29a540342b2d2e1e009852 +PKG_SOURCE_DATE:=2022-08-13 +PKG_SOURCE_VERSION:=146bc77c98ace3d1cc672986669650d2e1da71f3 +PKG_MIRROR_HASH:=3cf04858ff5c3f529904f9789b094aa9645ad41c91f553e6fc3fcd3cb341d359 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 From 24307b035143bc710268590850e595e1fad86f08 Mon Sep 17 00:00:00 2001 From: Tomas Lara Date: Sat, 6 Aug 2022 20:13:07 -0400 Subject: [PATCH 62/80] kernel: remove CONFIG_MMC_BLOCK_BOUNCE CONFIG_MMC_BLOCK_BOUNCE was removed in kernel v4.13-rc1 https://github.com/torvalds/linux/commit/c3dccb74be28a345a2ebcc224e41b774529b8b8f Signed-off-by: Tomas Lara --- package/kernel/linux/modules/other.mk | 1 - target/linux/generic/config-5.10 | 1 - target/linux/generic/config-5.15 | 1 - 3 files changed, 3 deletions(-) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 6dfbbbae82..519bd2048f 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -401,7 +401,6 @@ define KernelPackage/mmc CONFIG_MMC_BLOCK \ CONFIG_MMC_DEBUG=n \ CONFIG_MMC_UNSAFE_RESUME=n \ - CONFIG_MMC_BLOCK_BOUNCE=y \ CONFIG_MMC_TIFM_SD=n \ CONFIG_MMC_WBSD=n \ CONFIG_SDIO_UART=n diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index b5f29cf547..104fc625d9 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -3447,7 +3447,6 @@ CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y # CONFIG_MMC_ARMMMCI is not set # CONFIG_MMC_AU1X is not set # CONFIG_MMC_BLOCK is not set -CONFIG_MMC_BLOCK_BOUNCE=y CONFIG_MMC_BLOCK_MINORS=8 # CONFIG_MMC_CAVIUM_THUNDERX is not set # CONFIG_MMC_CB710 is not set diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index cb2a742632..bbf4364a4f 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -3580,7 +3580,6 @@ CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y # CONFIG_MMC_ARMMMCI is not set # CONFIG_MMC_AU1X is not set # CONFIG_MMC_BLOCK is not set -CONFIG_MMC_BLOCK_BOUNCE=y CONFIG_MMC_BLOCK_MINORS=8 # CONFIG_MMC_CAVIUM_THUNDERX is not set # CONFIG_MMC_CB710 is not set From a9e8eec221874e5840d659aed3f68850ff1d9982 Mon Sep 17 00:00:00 2001 From: Oscar Molnar Date: Sat, 6 Aug 2022 16:13:41 +0100 Subject: [PATCH 63/80] build: add support for python3.11 and higher python3.11 beta is out but fails to run the makefile currently this supports python versions from 3.6 to 3.99 with the python3 binary it also checks specifically for 3.11 as it is the latest version out Signed-off-by: Oscar Molnar --- include/prereq-build.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 7428c21e16..6c45327f01 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -169,20 +169,22 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \ $(eval $(call CleanupPython2)) $(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \ + python3.11 -V 2>&1 | grep 'Python 3', \ python3.10 -V 2>&1 | grep 'Python 3', \ python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ - python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?')) + python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?')) $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \ + python3.11 -V 2>&1 | grep 'Python 3', \ python3.10 -V 2>&1 | grep 'Python 3', \ python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ - python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?')) + python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?')) $(eval $(call TestHostCommand,python3-distutils, \ Please install the Python3 distutils module, \ From 139a5c2eec3750ebd7b3ef490ab24a5b1de1ce8a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Aug 2022 21:44:24 +0200 Subject: [PATCH 64/80] kernel: kmod-hwmon-tps23861: Add missing dependency to kmod-regmap-i2c This fixes the following build error: Package kmod-hwmon-tps23861 is missing dependencies for the following libraries: regmap-i2c.ko Fixes: b664646db74a ("kernel: add kmod-hwmon-tps23861 support") Signed-off-by: Hauke Mehrtens --- package/kernel/linux/modules/hwmon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index 42df3a94f7..e0810c97bd 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -524,7 +524,7 @@ define KernelPackage/hwmon-tps23861 KCONFIG:=CONFIG_SENSORS_TPS23861 FILES:=$(LINUX_DIR)/drivers/hwmon/tps23861.ko AUTOLOAD:=$(call AutoProbe,tps23861) - $(call AddDepends/hwmon,+kmod-i2c-core) + $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c) endef define KernelPackage/hwmon-tps23861/description From c97f918d37324db66c0ac4d12483baa93754f890 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 6 Aug 2022 23:12:56 +0200 Subject: [PATCH 65/80] toolchain: Update glibc 2.34 to recent HEAD This adds the following changes: 71326f1f2f nptl: Fix pthread_cancel cancelhandling atomic operations 3e0a91b79b scripts: Add glibcelf.py module f0c71b34f9 Default to --with-default-link=no (bug 25812) ca0faa140f misc: Fix rare fortify crash on wchar funcs. [BZ 29030] 0d477e92c4 INSTALL: Rephrase -with-default-link documentation bc56ab1f4a dlfcn: Do not use rtld_active () to determine ld.so state (bug 29078) 83cc145830 scripts/glibcelf.py: Mark as UNSUPPORTED on Python 3.5 and earlier 16245986fb x86-64: Optimize load of all bits set into ZMM register [BZ #28252] b5a44a6a47 x86: Modify ENTRY in sysdep.h so that p2align can be specified 5ec3416853 x86: Optimize memcmp-evex-movbe.S for frontend behavior and size 6d18a93dbb x86: Optimize memset-vec-unaligned-erms.S baf3ece634 x86: Replace sse2 instructions with avx in memcmp-evex-movbe.S f35ad30da4 x86-64: Improve EVEX strcmp with masked load a182bb7a39 x86-64: Remove Prefer_AVX2_STRCMP 2e64237a87 x86-64: Replace movzx with movzbl a7392db2ff x86: Optimize memmove-vec-unaligned-erms.S cecbac5212 x86: Double size of ERMS rep_movsb_threshold in dl-cacheinfo.h 7cb126e7e7 x86: Shrink memcmp-sse4.S code size 4bbd0f866a x86-64: Use notl in EVEX strcmp [BZ #28646] f3a99b2216 x86: Don't set Prefer_No_AVX512 for processors with AVX512 and AVX-VNNI c796418d00 x86: Optimize L(less_vec) case in memcmp-evex-movbe.S 9681691402 linux: Fix missing internal 64 bit time_t stat usage 55640ed3fd i386: Regenerate ulps 88a8637cb4 linux: Fix fchmodat with AT_SYMLINK_NOFOLLOW for 64 bit time_t (BZ#29097) c66c92181d posix/glob.c: update from gnulib bc6fba3c80 Add PF_MCTP, AF_MCTP from Linux 5.15 to bits/socket.h fd5dbfd1cd Update kernel version to 5.15 in tst-mman-consts.py 5146b73d72 Add ARPHRD_CAN, ARPHRD_MCTP to net/if_arp.h 6af165658d Update syscall lists for Linux 5.17 81181ba5d9 Update kernel version to 5.16 in tst-mman-consts.py 0499c3a95f Update kernel version to 5.17 in tst-mman-consts.py f858bc3093 Add SOL_MPTCP, SOL_MCTP from Linux 5.16 to bits/socket.h c108e87026 aarch64: Add HWCAP2_ECV from Linux 5.16 97cb8227b8 Add HWCAP2_AFP, HWCAP2_RPRES from Linux 5.17 to AArch64 bits/hwcap.h 31af92b9c8 manual: Clarify that abbreviations of long options are allowed 0d5b36c8cc x86: Optimize strcmp-avx2.S c41a66767d x86: Optimize strcmp-evex.S d299032743 x86-64: Fix strcmp-avx2.S 53ddafe917 x86-64: Fix strcmp-evex.S ea19c490a3 x86: Improve vec generation in memset-vec-unaligned-erms.S 190ea5f7e4 x86: Remove SSSE3 instruction for broadcast in memset.S (SSE2 Only) 5cb6329652 x86-64: Optimize bzero 70509f9b48 x86: Set .text section in memset-vec-unaligned-erms 5373c90f2e x86: Fix bug in strncmp-evex and strncmp-avx2 [BZ #28895] e123f08ad5 x86: Fix fallback for wcsncmp_avx2 in strcmp-avx2.S [BZ #28896] e4a2fb76ef manual: Document the dlinfo function 91c2e6c3db dlfcn: Implement the RTLD_DI_PHDR request type for dlinfo b72bbba236 fortify: Ensure that __glibc_fortify condition is a constant [BZ #29141] 8de6e4a199 x86: Improve L to support L(XXX_SYMBOL (YYY, ZZZ)) 6cba46c858 x86_64/multiarch: Sort sysdep_routines and put one entry per line 37f373e334 x86-64: Remove bzero weak alias in SS2 memset dd457606ca x86_64: Remove bcopy optimizations 3c55c20756 x86: Code cleanup in strchr-avx2 and comment justifying branch dd6d3a0bbc x86: Code cleanup in strchr-evex and comment justifying branch 0ae1006967 x86: Optimize strcspn and strpbrk in strcspn-c.c 0a2da01110 x86: Optimize strspn in strspn-c.c 0dafa75e3c x86: Remove strcspn-sse2.S and use the generic implementation 3811544655 x86: Remove strpbrk-sse2.S and use the generic implementation a4b1cae068 x86: Remove strspn-sse2.S and use the generic implementation 5997011826 x86: Optimize str{n}casecmp TOLOWER logic in strcmp.S 3605c74407 x86: Optimize str{n}casecmp TOLOWER logic in strcmp-sse42.S 3051cf3e74 x86: Add AVX2 optimized str{n}casecmp b13a2e68eb x86: Add EVEX optimized str{n}casecmp 80883f4354 x86: Remove AVX str{n}casecmp 4ff6ae069b x86: Small improvements for wcslen ffe75982cc x86: Remove memcmp-sse4.S df5de87260 x86: Cleanup page cross code in memcmp-avx2-movbe.S 0a11305416 x86: Optimize {str|wcs}rchr-sse2 00f09a14d2 x86: Optimize {str|wcs}rchr-avx2 596c9a32cc x86: Optimize {str|wcs}rchr-evex 1f83d40dfa elf: Remove unused NEED_DL_BASE_ADDR and _dl_base_addr b0bd6a1323 elf: Merge dl-sysdep.c into the Linux version 2139b1848e Linux: Remove HAVE_AUX_SECURE, HAVE_AUX_XID, HAVE_AUX_PAGESIZE 458733fffe Linux: Remove DL_FIND_ARG_COMPONENTS 08728256fa Linux: Assume that NEED_DL_SYSINFO_DSO is always defined 4b9cd5465d Linux: Consolidate auxiliary vector parsing 1cc4ddfeeb Revert "Linux: Consolidate auxiliary vector parsing" 28bdb03b1b Linux: Include in dl-sysdep.c only for SHARED ff900fad89 Linux: Consolidate auxiliary vector parsing (redo) be9240c84c elf: Remove __libc_init_secure 1e7b011f87 i386: Remove OPTIMIZE_FOR_GCC_5 from Linux libc-do-syscall.S 1a5b9d1a23 i386: Honor I386_USE_SYSENTER for 6-argument Linux system calls b38c9cdb58 Linux: Define MMAP_CALL_INTERNAL b2387bea84 ia64: Always define IA64_USE_NEW_STUB as a flag macro e7ca2a475c Linux: Implement a useful version of _startup_fatal 43d77ef9b8 Linux: Introduce __brk_call for invoking the brk system call ede8d94d15 csu: Implement and use _dl_early_allocate during static startup 89b638f48a S390: Enable static PIE c73c79af7d rtld: Use generic argv adjustment in ld.so [BZ #23293] b2585cae28 linux: Add a getauxval test [BZ #23293] 14770f3e04 string.h: fix __fortified_attr_access macro call [BZ #29162] 83ae8287c1 x86: Fallback {str|wcs}cmp RTM in the ncmp overflow case [BZ #29127] ff450cdbde Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose b349fe0722 misc: Use 64 bit stat for daemon (BZ# 29203) aa8a87f51d misc: Use 64 bit stat for getusershell (BZ# 29204) 9db6a597ef posix: Use 64 bit stat for posix_fallocate fallback (BZ# 29207) f9c3e57ac2 posix: Use 64 bit stat for fpathconf (_PC_ASYNC_IO) (BZ# 29208) 61fd3e0e74 socket: Use 64 bit stat for isfdtype (BZ# 29209) 34422108f4 inet: Use 64 bit stat for ruserpass (BZ# 29210) 52431199b5 catgets: Use 64 bit stat for __open_catalog (BZ# 29211) b3f935940e iconv: Use 64 bit stat for gconv_parseconfdir (BZ# 29213) 9947f2df19 socket: Fix mistyped define statement in socket/sys/socket.h (BZ #29225) 4c92a10412 powerpc: Fix VSX register number on __strncpy_power9 [BZ #29197] a7ec6363a3 nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214) 96944f0f81 hppa: Remove _dl_skip_args usage (BZ# 29165) bb4148283f nios2: Remove _dl_skip_args usage (BZ# 29187) 368c5c3e00 nss: add assert to DB_LOOKUP_FCT (BZ #28752) 94ab2088c3 nss: handle stat failure in check_reload_and_get (BZ #28752) 4b246b2bbd linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304) 7789a84923 nptl: Fix ___pthread_unregister_cancel_restore asynchronous restore 8d324019e6 x86_64: Remove end of line trailing spaces eb9aa96fac x86_64: Remove bzero optimization 8ab861d295 x86_64: Implement evex512 version of strlen, strnlen, wcslen and wcsnlen f6bc52f080 x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT 82a707aeb7 x86_64: Add strstr function with 512-bit EVEX 70be93d1c5 x86: Create header for VEC classes in x86 strings library e805606193 x86: Add COND_VZEROUPPER that can replace vzeroupper if no `ret` 4901009dad x86: Optimize memrchr-sse2.S 83a986e9fb x86: Optimize memrchr-evex.S b05bd59823 x86: Optimize memrchr-avx2.S a910d7e164 x86: Shrink code size of memchr-avx2.S 3c87383a20 x86: Shrink code size of memchr-evex.S 820504e3ed x86: ZERO_UPPER_VEC_REGISTERS_RETURN_XTEST expect no transactions fc54e1fae8 x86: Align varshift table to 32-bytes 6e008c884d x86: Fix misordered logic for setting `rep_movsb_stop_threshold` 9d50e162ee x86: Add sse42 implementation to strcmp's ifunc 94b0dc9419 x86: Add bounds `x86_non_temporal_threshold` ba1c3f23d9 x86: Cleanup bounds checking in large memcpy case c51d8d383c x86: Add BMI1/BMI2 checks for ISA_V3 check d201c59177 x86: Align entry for memrchr to 64-bytes. aadd0a1c7c x86: Put wcs{n}len-sse4.1 in the sse4.1 text section f4598f0351 x86: Add definition for __wmemset_chk AVX2 RTM in ifunc impl list 7079931c51 x86: Move and slightly improve memset_erms 35f9c72c8b x86: Move mem{p}{mov|cpy}_{chk_}erms to its own file ccc54bd61c x86: Add missing IS_IN (libc) check to strncmp-sse4_2.S b991af5063 Update syscall-names.list for Linux 5.18 b2f32e7464 malloc: Simplify implementation of __malloc_assert 875b2414cd dlfcn: Pass caller pointer to static dlopen implementation (bug 29446) 4ab59ce4e5 Update syscall lists for Linux 5.19 Signed-off-by: Hauke Mehrtens --- toolchain/glibc/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index f2634588db..106863a065 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -12,8 +12,8 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=b87b697f15d6bf7e576a2eeadc1f740172f9d013 -PKG_MIRROR_HASH:=c65c9600292bfb73118793ff268aac7561e6c3c90f6c152a8b334fd6eddc0838 +PKG_SOURCE_VERSION:=4ab59ce4e5195f98b01748127248fed2b2b77b21 +PKG_MIRROR_HASH:=4df361a37a1f76244a77ca4ffb3b2d2774276a58aac46850c83f6c77e50dd16a PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz From 8456d06aa678c649d178053a5734d0d4c40a058c Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 13 Aug 2022 14:21:00 +0200 Subject: [PATCH 66/80] fstools: update to git HEAD 8c213b0 libfstools: Rename move_mount() function to ovl_move_mount() for glibc 2.36 81785c1 block: Do not include linux/fs.h any more Signed-off-by: Hauke Mehrtens --- package/system/fstools/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index 8f39112191..304aff8de1 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=b0cf3e4dea4f86883409d8597e89aa1d022118bd7087881165fe67622da5a903 -PKG_SOURCE_DATE:=2022-07-17 -PKG_SOURCE_VERSION:=ebf7e9028f2facf1a87c56dd261bda82ab9bcc59 +PKG_MIRROR_HASH:=aecd54ca2421fee691d2fb4a77e0348d225c6949d5254dd9da0827da9728cb2d +PKG_SOURCE_DATE:=2022-08-13 +PKG_SOURCE_VERSION:=81785c1b9a9c1b797e7406a3542c01d972c61315 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From a9eb5cce7e5c4996fa6ffc081b5323bfd4735dc2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 14 Aug 2022 23:36:58 +0200 Subject: [PATCH 67/80] Revert "binutils: update to 2.39" This reverts commit cc24c4ed5eae66c061e5787bb172fd2a91861f25. binutils does not compile with glibc: Package binutils is missing dependencies for the following libraries: libgprofng.so.0 libmsgpackc.so.2 libstdc++.so.6 libbpf does not compile against binutils 2.39 any more, see: https://github.com/libbpf/bpftool/issues/30 Signed-off-by: Hauke Mehrtens --- package/devel/binutils/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 728fb37162..75fdd320cd 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils -PKG_VERSION:=2.39 +PKG_VERSION:=2.38 PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/binutils PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_VERSION:=$(PKG_VERSION) -PKG_HASH:=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00 +PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 PKG_FIXUP:=patch-libtool PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl From 05775e38a52007397e5460bd87fa1ac957feb2af Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Thu, 21 Jul 2022 18:26:56 +0200 Subject: [PATCH 68/80] kernel: extract kmod-sched-act-ipt from kmod-sched There is only one module in kmod-sched that depends on iptables. Move it to its own kmod package so we can drop the kmod-ipt-core dependency from kmod-sched. This makes it possible to disable all kmod-ipt-* packages without having to disable kmod-sched. Since we now default to firewall4 and nftables, we should avoid iptables dependencies where we can. Signed-off-by: Stijn Tintel --- package/kernel/linux/modules/netsupport.mk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 5369be201f..be0347527d 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -775,6 +775,22 @@ endef $(eval $(call KernelPackage,sched-act-sample)) +define KernelPackage/sched-act-ipt + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=IPtables targets + DEPENDS:=+kmod-ipt-core +kmod-sched-core + KCONFIG:=CONFIG_NET_ACT_IPT + FILES:=$(LINUX_DIR)/net/sched/act_ipt.ko + AUTOLOAD:=$(call AutoProbe, act_ipt) +endef + +define KernelPackage/sched-act-ipt/description + Allows to invoke iptables targets after successful classification. +endef + +$(eval $(call KernelPackage,sched-act-ipt)) + + define KernelPackage/sched-act-vlan SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Traffic VLAN manipulation @@ -948,13 +964,13 @@ endef $(eval $(call KernelPackage,bpf-test)) -SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq sch_teql sch_fq sch_pie act_ipt act_pedit act_simple act_csum em_cmp em_nbyte em_meta em_text +SCHED_MODULES_EXTRA = sch_codel sch_dsmark sch_gred sch_multiq sch_sfq sch_teql sch_fq sch_pie act_pedit act_simple act_csum em_cmp em_nbyte em_meta em_text SCHED_FILES_EXTRA = $(foreach mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko) define KernelPackage/sched SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Extra traffic schedulers - DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c +kmod-lib-textsearch + DEPENDS:=+kmod-sched-core +kmod-lib-crc32c +kmod-lib-textsearch KCONFIG:= \ CONFIG_NET_SCH_CODEL \ CONFIG_NET_SCH_DSMARK \ @@ -964,7 +980,6 @@ define KernelPackage/sched CONFIG_NET_SCH_TEQL \ CONFIG_NET_SCH_FQ \ CONFIG_NET_SCH_PIE \ - CONFIG_NET_ACT_IPT \ CONFIG_NET_ACT_PEDIT \ CONFIG_NET_ACT_SIMP \ CONFIG_NET_ACT_CSUM \ From f37a7fa4e87ca80fa98a65b8dea0f537c8d0e2b5 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Thu, 11 Aug 2022 12:46:23 +0300 Subject: [PATCH 69/80] hostapd: add mbo flag to get_clients ubus method There is no WLAN_STA_MBO flag, but according to the hostapd source code, when an STA does not support MBO, cell_capa will be 0. Use this to indicate MBO support in the get_clients ubus method. Signed-off-by: Stijn Tintel Reviewed-by: David Bauer --- package/network/services/hostapd/src/src/ap/ubus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 182aae7d05..622eab8838 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -318,6 +318,10 @@ hostapd_bss_get_clients(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_add_u8(&b, sta_flags[i].name, !!(sta->flags & sta_flags[i].flag)); +#ifdef CONFIG_MBO + blobmsg_add_u8(&b, "mbo", !!(sta->cell_capa)); +#endif + r = blobmsg_open_array(&b, "rrm"); for (i = 0; i < ARRAY_SIZE(sta->rrm_enabled_capa); i++) blobmsg_add_u32(&b, "", sta->rrm_enabled_capa[i]); From e58b76effe6b167c49812372d5334f6f57546778 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 6 Aug 2022 23:56:38 +0200 Subject: [PATCH 70/80] toolchain: glibc: Update to glibc 2.35 This updates to glibc to version 2.35. Signed-off-by: Hauke Mehrtens --- toolchain/glibc/common.mk | 6 +++--- ...vert-Disallow-use-of-DES-encryption-functions-in-n.patch | 2 +- toolchain/glibc/patches/200-add-dl-search-paths.patch | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index 106863a065..5acb13b5dc 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glibc -PKG_VERSION:=2.34 +PKG_VERSION:=2.35 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=4ab59ce4e5195f98b01748127248fed2b2b77b21 -PKG_MIRROR_HASH:=4df361a37a1f76244a77ca4ffb3b2d2774276a58aac46850c83f6c77e50dd16a +PKG_SOURCE_VERSION:=813a8d01716d4e099ec57194a93b14fa08b4beca +PKG_MIRROR_HASH:=8c8d92dde334f0e0f9a0949d25b2950db513ce8723c31ae0b0ef64730a00322f PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz diff --git a/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch b/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch index 8cb8c80fd2..7dfc8a5582 100644 --- a/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch +++ b/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch @@ -627,7 +627,7 @@ provides them. range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h -@@ -969,6 +969,12 @@ extern int getsubopt (char **__restrict +@@ -971,6 +971,12 @@ extern int getsubopt (char **__restrict #endif diff --git a/toolchain/glibc/patches/200-add-dl-search-paths.patch b/toolchain/glibc/patches/200-add-dl-search-paths.patch index 08e901d2e6..fd4af3694a 100644 --- a/toolchain/glibc/patches/200-add-dl-search-paths.patch +++ b/toolchain/glibc/patches/200-add-dl-search-paths.patch @@ -2,7 +2,7 @@ add /usr/lib to default search path for the dynamic linker --- a/Makeconfig +++ b/Makeconfig -@@ -610,6 +610,9 @@ else +@@ -618,6 +618,9 @@ else default-rpath = $(libdir) endif From a66f843971d8b0b2f8bad1cb75f3bbc1a8e06bf0 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 01:09:42 +0200 Subject: [PATCH 71/80] toolchain: glibc: Increase min kernel version to 5.10 This removes all compatibility code normally compiled into glibc for kernel < 5.10 from our build. The build glibc version will only work with Linux kernel >= 5.10. Signed-off-by: Hauke Mehrtens --- toolchain/glibc/common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index 5acb13b5dc..107245472a 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -64,7 +64,7 @@ GLIBC_CONFIGURE:= \ $(if $(CONFIG_PKG_CC_STACKPROTECTOR_REGULAR),--enable-stack-protector=yes) \ $(if $(CONFIG_PKG_CC_STACKPROTECTOR_STRONG),--enable-stack-protector=strong) \ $(if $(CONFIG_PKG_RELRO_FULL),--enable-bind-now) \ - --enable-kernel=5.4.0 + --enable-kernel=5.10.0 export libc_cv_ssp=no export libc_cv_ssp_strong=no From 05cd4a59f019c4586073417b7384d55e0fd17a4a Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 4 Apr 2022 15:47:03 +0100 Subject: [PATCH 72/80] mvebu: copy 5.10 patches to 5.15 Linux 5.15 on Marvell EBU, here we go! Signed-off-by: Rui Salvaterra --- ...s-mcbin-singleshot-add-heartbeat-LED.patch | 65 ++ ...is-omnia-enable-HW-buffer-management.patch | 74 ++ ...rris-omnia-add-comphy-handle-to-eth2.patch | 37 + ...rris-omnia-describe-switch-interrupt.patch | 61 + ...11-ARM-dts-turris-omnia-add-SFP-node.patch | 90 ++ ...turris-omnia-add-LED-controller-node.patch | 160 +++ ...te-ethernet-phy-node-and-handle-name.patch | 52 + ...omnia-fix-hardware-buffer-management.patch | 33 + ...Mangle-bootloader-s-kernel-arguments.patch | 208 ++++ ...-mvebu-armada-38x-enable-libata-leds.patch | 10 + .../patches-5.15/302-add_powertables.patch | 770 ++++++++++++ ...3-linksys_hardcode_nand_ecc_settings.patch | 17 + .../patches-5.15/304-revert_i2c_delay.patch | 15 + .../305-armada-385-rd-mtd-partitions.patch | 19 + .../306-ARM-mvebu-385-ap-Add-partitions.patch | 35 + ...-armada-xp-linksys-mamba-broken-idle.patch | 10 + .../308-armada-xp-linksys-mamba-wan.patch | 11 + .../patches-5.15/309-linksys-status-led.patch | 50 + .../310-linksys-use-eth0-as-cpu-port.patch | 25 + .../311-adjust-compatible-for-linksys.patch | 68 ++ ...da388-clearfog-emmc-on-clearfog-base.patch | 87 ++ .../313-helios4-dts-status-led-alias.patch | 28 + ...witch-PHY-operation-mode-to-2500base.patch | 34 + ...rmada-xp-linksys-mamba-resize-kernel.patch | 37 + ...316-armada-370-dts-fix-crypto-engine.patch | 29 + .../patches-5.15/400-find_active_root.patch | 60 + .../700-mvneta-tx-queue-workaround.patch | 38 + ...14-net-ethernet-marvell-mvnetaMQPrio.patch | 109 ++ ...ethernet-marvell-mvnetaMQPrioOffload.patch | 66 ++ ...xt-ethernet-marvell-mvnetaMQPrioFlag.patch | 30 + ...t-ethernet-marvell-mvnetaMQPrioQueue.patch | 97 ++ ...hernet-marvell-mvnetaMQPrioTCOffload.patch | 182 +++ ...dicate-failure-to-enter-deeper-sleep.patch | 40 + ...-pci-mvebu-time-out-reset-on-link-up.patch | 60 + ...IEI-vendor-prefix-and-IEI-WT61P803-P.patch | 218 ++++ ...a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch | 1034 +++++++++++++++++ ...d-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch | 469 ++++++++ ...d-the-IEI-WT61P803-PUZZLE-LED-driver.patch | 207 ++++ ...I-Add-iei-wt61p803-puzzle-driver-sys.patch | 82 ++ ...mon-Add-iei-wt61p803-puzzle-hwmon-dr.patch | 74 ++ ...an-entry-for-the-IEI-WT61P803-PUZZLE.patch | 41 + ...rs-leds-wt61p803-puzzle-improvements.patch | 271 +++++ 42 files changed, 5103 insertions(+) create mode 100644 target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch create mode 100644 target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch create mode 100644 target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch create mode 100644 target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch create mode 100644 target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch create mode 100644 target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch create mode 100644 target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch create mode 100644 target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch create mode 100644 target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch create mode 100644 target/linux/mvebu/patches-5.15/301-mvebu-armada-38x-enable-libata-leds.patch create mode 100644 target/linux/mvebu/patches-5.15/302-add_powertables.patch create mode 100644 target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch create mode 100644 target/linux/mvebu/patches-5.15/304-revert_i2c_delay.patch create mode 100644 target/linux/mvebu/patches-5.15/305-armada-385-rd-mtd-partitions.patch create mode 100644 target/linux/mvebu/patches-5.15/306-ARM-mvebu-385-ap-Add-partitions.patch create mode 100644 target/linux/mvebu/patches-5.15/307-armada-xp-linksys-mamba-broken-idle.patch create mode 100644 target/linux/mvebu/patches-5.15/308-armada-xp-linksys-mamba-wan.patch create mode 100644 target/linux/mvebu/patches-5.15/309-linksys-status-led.patch create mode 100644 target/linux/mvebu/patches-5.15/310-linksys-use-eth0-as-cpu-port.patch create mode 100644 target/linux/mvebu/patches-5.15/311-adjust-compatible-for-linksys.patch create mode 100644 target/linux/mvebu/patches-5.15/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch create mode 100644 target/linux/mvebu/patches-5.15/313-helios4-dts-status-led-alias.patch create mode 100644 target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch create mode 100644 target/linux/mvebu/patches-5.15/315-armada-xp-linksys-mamba-resize-kernel.patch create mode 100644 target/linux/mvebu/patches-5.15/316-armada-370-dts-fix-crypto-engine.patch create mode 100644 target/linux/mvebu/patches-5.15/400-find_active_root.patch create mode 100644 target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch create mode 100644 target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch create mode 100644 target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch create mode 100644 target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch create mode 100644 target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch create mode 100644 target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch create mode 100644 target/linux/mvebu/patches-5.15/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch create mode 100644 target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch create mode 100644 target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch create mode 100644 target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch create mode 100644 target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch create mode 100644 target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch create mode 100644 target/linux/mvebu/patches-5.15/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch create mode 100644 target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch create mode 100644 target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch create mode 100644 target/linux/mvebu/patches-5.15/910-drivers-leds-wt61p803-puzzle-improvements.patch diff --git a/target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch b/target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch new file mode 100644 index 0000000000..c3abae60a6 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch @@ -0,0 +1,65 @@ +From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001 +From: Tomasz Maciej Nowak +Date: Tue, 10 Nov 2020 16:38:31 +0100 +Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED + +With board revision 1.3, SolidRun moved the power LED to the middle of +the board. In old place of power LED a GPIO controllable heartbeat LED +was added. This commit only touches Single Shot variant, since only this +variant is all revision 1.3. + +Note: +This is slightly modified patch. Some boards could be placed in an +enclosure, so the LED18 is enabled by default, since that'll be the only +visible indicator that the board is operating. + +Reported-by: Alexandra Alth +Signed-off-by: Tomasz Maciej Nowak +Signed-off-by: Gregory CLEMENT +--- + .../marvell/armada-8040-mcbin-singleshot.dts | 22 +++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts ++++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts +@@ -5,6 +5,8 @@ + * Device Tree file for MACCHIATOBin Armada 8040 community board platform + */ + ++#include ++ + #include "armada-8040-mcbin.dtsi" + + / { +@@ -12,6 +14,20 @@ + compatible = "marvell,armada8040-mcbin-singleshot", + "marvell,armada8040-mcbin", "marvell,armada8040", + "marvell,armada-ap806-quad", "marvell,armada-ap806"; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-0 = <&cp0_led18_pins>; ++ pinctrl-names = "default"; ++ ++ led18 { ++ gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>; ++ function = LED_FUNCTION_HEARTBEAT; ++ color = ; ++ linux,default-trigger = "heartbeat"; ++ default-state = "on"; ++ }; ++ }; + }; + + &cp0_eth0 { +@@ -27,3 +43,10 @@ + managed = "in-band-status"; + sfp = <&sfp_eth1>; + }; ++ ++&cp0_pinctrl { ++ cp0_led18_pins: led18-pins { ++ marvell,pins = "mpp33"; ++ marvell,function = "gpio"; ++ }; ++}; diff --git a/target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch b/target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch new file mode 100644 index 0000000000..7a4b511998 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch @@ -0,0 +1,74 @@ +From 018b88eee1a2efda26ed2f09aab33ccdc40ef18f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Sun, 15 Nov 2020 14:59:17 +0100 +Subject: ARM: dts: turris-omnia: enable HW buffer management +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The buffer manager is available on Turris Omnia but needs to be +described in device-tree to be used. + +Signed-off-by: Marek Behún +Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") +Cc: linux-arm-kernel@lists.infradead.org +Cc: Uwe Kleine-König +Cc: Jason Cooper +Cc: Gregory CLEMENT +Cc: Andreas Färber +Cc: Andrew Lunn +Cc: Rob Herring +Cc: devicetree@vger.kernel.org +Signed-off-by: Gregory CLEMENT +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +(limited to 'arch/arm/boot/dts/armada-385-turris-omnia.dts') + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -84,12 +84,23 @@ + }; + }; + ++&bm { ++ status = "okay"; ++}; ++ ++&bm_bppi { ++ status = "okay"; ++}; ++ + /* Connected to 88E6176 switch, port 6 */ + ð0 { + pinctrl-names = "default"; + pinctrl-0 = <&ge0_rgmii_pins>; + status = "okay"; + phy-mode = "rgmii"; ++ buffer-manager = <&bm>; ++ bm,pool-long = <0>; ++ bm,pool-short = <3>; + + fixed-link { + speed = <1000>; +@@ -103,6 +114,9 @@ + pinctrl-0 = <&ge1_rgmii_pins>; + status = "okay"; + phy-mode = "rgmii"; ++ buffer-manager = <&bm>; ++ bm,pool-long = <1>; ++ bm,pool-short = <3>; + + fixed-link { + speed = <1000>; +@@ -115,6 +129,9 @@ + status = "okay"; + phy-mode = "sgmii"; + phy = <&phy1>; ++ buffer-manager = <&bm>; ++ bm,pool-long = <2>; ++ bm,pool-short = <3>; + }; + + &i2c0 { diff --git a/target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch b/target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch new file mode 100644 index 0000000000..99ed07e13b --- /dev/null +++ b/target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch @@ -0,0 +1,37 @@ +From 9ec25ef84832209a8326f9a71fe3ba14f4bcf301 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Sun, 15 Nov 2020 14:59:18 +0100 +Subject: ARM: dts: turris-omnia: add comphy handle to eth2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The eth2 controller on Turris Omnia is connected to SerDes. For SFP to +be able to switch between 1G and 2.5G modes the comphy link has to be +defined. + +Signed-off-by: Marek Behún +Fixes: f3a6a9f3704a ("ARM: dts: add description for Armada 38x ...") +Reviewed-by: Andrew Lunn +Reviewed-by: Andreas Färber +Cc: linux-arm-kernel@lists.infradead.org +Cc: Uwe Kleine-König +Cc: Jason Cooper +Cc: Gregory CLEMENT +Cc: Rob Herring +Cc: devicetree@vger.kernel.org +Signed-off-by: Gregory CLEMENT +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -129,6 +129,7 @@ + status = "okay"; + phy-mode = "sgmii"; + phy = <&phy1>; ++ phys = <&comphy5 2>; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <3>; diff --git a/target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch b/target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch new file mode 100644 index 0000000000..4bbd80aac4 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch @@ -0,0 +1,61 @@ +From d29b67c220caf5f4905e1f1576e71bcb6de4af9e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Sun, 15 Nov 2020 14:59:19 +0100 +Subject: ARM: dts: turris-omnia: describe switch interrupt +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Describe switch interrupt for Turris Omnia so that the CPU does not have +to poll the switch. We also need to to set mpp45 pin to gpio function +for this. + +Signed-off-by: Marek Behún +Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") +Cc: linux-arm-kernel@lists.infradead.org +Cc: Uwe Kleine-König +Cc: Jason Cooper +Cc: Gregory CLEMENT +Cc: Andreas Färber +Cc: Andrew Lunn +Cc: Rob Herring +Cc: devicetree@vger.kernel.org +Signed-off-by: Gregory CLEMENT +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -261,13 +261,18 @@ + + /* Switch MV88E6176 at address 0x10 */ + switch@10 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&swint_pins>; + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; +- dsa,member = <0 0>; + ++ dsa,member = <0 0>; + reg = <0x10>; + ++ interrupt-parent = <&gpio1>; ++ interrupts = <13 IRQ_TYPE_LEVEL_LOW>; ++ + ports { + #address-cells = <1>; + #size-cells = <0>; +@@ -320,6 +325,11 @@ + marvell,function = "gpio"; + }; + ++ swint_pins: swint-pins { ++ marvell,pins = "mpp45"; ++ marvell,function = "gpio"; ++ }; ++ + spi0cs0_pins: spi0cs0-pins { + marvell,pins = "mpp25"; + marvell,function = "spi0"; diff --git a/target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch b/target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch new file mode 100644 index 0000000000..2447a4e240 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch @@ -0,0 +1,90 @@ +From add2d65962977caf23ca2fa21a2457d31b636574 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 16 Nov 2020 13:24:22 +0100 +Subject: ARM: dts: turris-omnia: add SFP node +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Turris Omnia has an SFP cage that, together with WAN PHY, is connected +to eth2 SerDes via a SerDes multiplexor. When a SFP module is present, +the multiplexor switches the SerDes signal from PHY to SFP. + +Describe the SFP cage, but leave it disabled. Until phylink has support +for such configuration, we are leaving it to U-Boot to enable SFP and +disable WAN PHY at boot time depending on whether a SFP module is +present. + +Signed-off-by: Marek Behún +Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") +Reviewed-by: Andrew Lunn +Cc: Russell King - ARM Linux admin +Cc: linux-arm-kernel@lists.infradead.org +Cc: Uwe Kleine-König +Cc: Jason Cooper +Cc: Gregory CLEMENT +Cc: Andreas Färber +Cc: Rob Herring +Cc: devicetree@vger.kernel.org +Signed-off-by: Gregory CLEMENT +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 30 ++++++++++++++++++++++++++- + 1 file changed, 29 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -82,6 +82,24 @@ + }; + }; + }; ++ ++ sfp: sfp { ++ compatible = "sff,sfp"; ++ i2c-bus = <&sfp_i2c>; ++ tx-fault-gpios = <&pcawan 0 GPIO_ACTIVE_HIGH>; ++ tx-disable-gpios = <&pcawan 1 GPIO_ACTIVE_HIGH>; ++ rate-select0-gpios = <&pcawan 2 GPIO_ACTIVE_HIGH>; ++ los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>; ++ mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>; ++ maximum-power-milliwatt = <3000>; ++ ++ /* ++ * For now this has to be enabled at boot time by U-Boot when ++ * a SFP module is present. Read more in the comment in the ++ * eth2 node below. ++ */ ++ status = "disabled"; ++ }; + }; + + &bm { +@@ -126,10 +144,20 @@ + + /* WAN port */ + ð2 { ++ /* ++ * eth2 is connected via a multiplexor to both the SFP cage and to ++ * ethernet-phy@1. The multiplexor switches the signal to SFP cage when ++ * a SFP module is present, as determined by the mode-def0 GPIO. ++ * ++ * Until kernel supports this configuration properly, in case SFP module ++ * is present, U-Boot has to enable the sfp node above, remove phy ++ * handle and add managed = "in-band-status" property. ++ */ + status = "okay"; + phy-mode = "sgmii"; + phy = <&phy1>; + phys = <&comphy5 2>; ++ sfp = <&sfp>; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <3>; +@@ -195,7 +223,7 @@ + /* routed to PCIe2 connector (CN62A) */ + }; + +- i2c@4 { ++ sfp_i2c: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; diff --git a/target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch b/target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch new file mode 100644 index 0000000000..c69067dbdc --- /dev/null +++ b/target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch @@ -0,0 +1,160 @@ +From 91dd42d0e30fdbb250c61d1192af569f07e6ada4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Sun, 15 Nov 2020 14:59:21 +0100 +Subject: ARM: dts: turris-omnia: add LED controller node +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Linux now has incomplete support for the LED controller on Turris Omnia: +it can set brightness and colors for each LED. + +The controller can also put these LEDs into HW controlled mode, in which +the LEDs are controlled by HW: for example the WAN LED is connected via +MCU to the WAN PHY LED pin. + +The driver does not support these HW controlled modes yet, and on probe +puts the LEDs into SW controlled mode. + +Add node describing the LED controller, but disable it for now. + +Signed-off-by: Marek Behún +Cc: linux-arm-kernel@lists.infradead.org +Cc: Uwe Kleine-König +Cc: Jason Cooper +Cc: Gregory CLEMENT +Cc: Andreas Färber +Cc: Rob Herring +Cc: devicetree@vger.kernel.org +Signed-off-by: Gregory CLEMENT +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 111 +++++++++++++++++++++++++- + 1 file changed, 110 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -12,6 +12,7 @@ + + #include + #include ++#include + #include "armada-385.dtsi" + + / { +@@ -181,7 +182,115 @@ + reg = <0>; + + /* STM32F0 command interface at address 0x2a */ +- /* leds device (in STM32F0) at address 0x2b */ ++ ++ led-controller@2b { ++ compatible = "cznic,turris-omnia-leds"; ++ reg = <0x2b>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* ++ * LEDs are controlled by MCU (STM32F0) at ++ * address 0x2b. ++ * ++ * The driver does not support HW control mode ++ * for the LEDs yet. Disable the LEDs for now. ++ * ++ * Also LED functions are not stable yet: ++ * - there are 3 LEDs connected via MCU to PCIe ++ * ports. One of these ports supports mSATA. ++ * There is no mSATA nor PCIe function. ++ * For now we use LED_FUNCTION_WLAN, since ++ * in most cases users have wifi cards in ++ * these slots ++ * - there are 2 LEDs dedicated for user: A and ++ * B. Again there is no such function defined. ++ * For now we use LED_FUNCTION_INDICATOR ++ */ ++ status = "disabled"; ++ ++ multi-led@0 { ++ reg = <0x0>; ++ color = ; ++ function = LED_FUNCTION_INDICATOR; ++ function-enumerator = <2>; ++ }; ++ ++ multi-led@1 { ++ reg = <0x1>; ++ color = ; ++ function = LED_FUNCTION_INDICATOR; ++ function-enumerator = <1>; ++ }; ++ ++ multi-led@2 { ++ reg = <0x2>; ++ color = ; ++ function = LED_FUNCTION_WLAN; ++ function-enumerator = <3>; ++ }; ++ ++ multi-led@3 { ++ reg = <0x3>; ++ color = ; ++ function = LED_FUNCTION_WLAN; ++ function-enumerator = <2>; ++ }; ++ ++ multi-led@4 { ++ reg = <0x4>; ++ color = ; ++ function = LED_FUNCTION_WLAN; ++ function-enumerator = <1>; ++ }; ++ ++ multi-led@5 { ++ reg = <0x5>; ++ color = ; ++ function = LED_FUNCTION_WAN; ++ }; ++ ++ multi-led@6 { ++ reg = <0x6>; ++ color = ; ++ function = LED_FUNCTION_LAN; ++ function-enumerator = <4>; ++ }; ++ ++ multi-led@7 { ++ reg = <0x7>; ++ color = ; ++ function = LED_FUNCTION_LAN; ++ function-enumerator = <3>; ++ }; ++ ++ multi-led@8 { ++ reg = <0x8>; ++ color = ; ++ function = LED_FUNCTION_LAN; ++ function-enumerator = <2>; ++ }; ++ ++ multi-led@9 { ++ reg = <0x9>; ++ color = ; ++ function = LED_FUNCTION_LAN; ++ function-enumerator = <1>; ++ }; ++ ++ multi-led@a { ++ reg = <0xa>; ++ color = ; ++ function = LED_FUNCTION_LAN; ++ function-enumerator = <0>; ++ }; ++ ++ multi-led@b { ++ reg = <0xb>; ++ color = ; ++ function = LED_FUNCTION_POWER; ++ }; ++ }; + + eeprom@54 { + compatible = "atmel,24c64"; diff --git a/target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch b/target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch new file mode 100644 index 0000000000..603a29106b --- /dev/null +++ b/target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch @@ -0,0 +1,52 @@ +From 8ee4a5f4f40da60bb85e13d9dd218a3c9197e3e3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Sun, 15 Nov 2020 14:59:22 +0100 +Subject: ARM: dts: turris-omnia: update ethernet-phy node and handle name +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use property name `phy-handle` instead of the deprecated `phy` to +connect eth2 to the PHY. +Rename the node from "phy@1" to "ethernet-phy@1", since "phy@1" is +incorrect according to device-tree bindings documentation. +Also remove the "ethernet-phy-id0141.0DD1" compatible string, it is not +needed. Kernel can read the PHY identifier itself. + +Signed-off-by: Marek Behún +Reviewed-by: Andrew Lunn +Cc: linux-arm-kernel@lists.infradead.org +Cc: Uwe Kleine-König +Cc: Jason Cooper +Cc: Gregory CLEMENT +Cc: Andreas Färber +Cc: Rob Herring +Cc: devicetree@vger.kernel.org +Signed-off-by: Gregory CLEMENT +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -156,7 +156,7 @@ + */ + status = "okay"; + phy-mode = "sgmii"; +- phy = <&phy1>; ++ phy-handle = <&phy1>; + phys = <&comphy5 2>; + sfp = <&sfp>; + buffer-manager = <&bm>; +@@ -387,9 +387,9 @@ + pinctrl-0 = <&mdio_pins>; + status = "okay"; + +- phy1: phy@1 { ++ phy1: ethernet-phy@1 { + status = "okay"; +- compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22"; ++ compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + marvell,reg-init = <3 18 0 0x4985>; + diff --git a/target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch b/target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch new file mode 100644 index 0000000000..7f5322e7f3 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch @@ -0,0 +1,33 @@ +From 5b2c7e0ae762fff2b172caf16b2766cc3e1ad859 Mon Sep 17 00:00:00 2001 +From: Rui Salvaterra +Date: Wed, 17 Feb 2021 15:30:38 +0000 +Subject: ARM: dts: turris-omnia: fix hardware buffer management +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Hardware buffer management has never worked on the Turris Omnia, as the +required MBus window hadn't been reserved. Fix thusly. + +Fixes: 018b88eee1a2 ("ARM: dts: turris-omnia: enable HW buffer management") + +Signed-off-by: Rui Salvaterra +Reviewed-by: Marek Behún +Tested-by: Klaus Kudielka +Signed-off-by: Gregory CLEMENT +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -32,7 +32,8 @@ + ranges = ; ++ MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 ++ MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; + + internal-regs { + diff --git a/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch new file mode 100644 index 0000000000..36f10fcfb5 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -0,0 +1,208 @@ +From 71270226b14733a4b1f2cde58ea9265caa50b38d Mon Sep 17 00:00:00 2001 +From: Adrian Panella +Date: Thu, 9 Mar 2017 09:37:17 +0100 +Subject: [PATCH 67/69] generic: Mangle bootloader's kernel arguments + +The command-line arguments provided by the boot loader will be +appended to a new device tree property: bootloader-args. +If there is a property "append-rootblock" in DT under /chosen +and a root= option in bootloaders command line it will be parsed +and added to DT bootargs with the form: XX. +Only command line ATAG will be processed, the rest of the ATAGs +sent by bootloader will be ignored. +This is usefull in dual boot systems, to get the current root partition +without afecting the rest of the system. + +Signed-off-by: Adrian Panella + +This patch has been modified to be mvebu specific. The original patch +did not pass the bootloader cmdline on if no append-rootblock stanza +was found, resulting in blank cmdline and failure to boot. + +Signed-off-by: Michael Gray +--- + arch/arm/Kconfig | 11 ++++ + arch/arm/boot/compressed/atags_to_fdt.c | 85 ++++++++++++++++++++++++- + init/main.c | 16 +++++ + 3 files changed, 111 insertions(+), 1 deletion(-) + +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1781,6 +1781,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN + The command-line arguments provided by the boot loader will be + appended to the the device tree bootargs property. + ++config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE ++ bool "Append rootblock parsing bootloader's kernel arguments" ++ help ++ The command-line arguments provided by the boot loader will be ++ appended to a new device tree property: bootloader-args. ++ If there is a property "append-rootblock" in DT under /chosen ++ and a root= option in bootloaders command line it will be parsed ++ and added to DT bootargs with the form: XX. ++ Only command line ATAG will be processed, the rest of the ATAGs ++ sent by bootloader will be ignored. ++ + endchoice + + config CMDLINE +--- a/arch/arm/boot/compressed/atags_to_fdt.c ++++ b/arch/arm/boot/compressed/atags_to_fdt.c +@@ -5,6 +5,8 @@ + + #if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND) + #define do_extend_cmdline 1 ++#elif defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) ++#define do_extend_cmdline 1 + #else + #define do_extend_cmdline 0 + #endif +@@ -69,6 +71,72 @@ static uint32_t get_cell_size(const void + return cell_size; + } + ++#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) ++ ++static char *append_rootblock(char *dest, const char *str, int len, void *fdt) ++{ ++ char *ptr, *end; ++ char *root="root="; ++ int i, l; ++ const char *rootblock; ++ ++ //ARM doesn't have __HAVE_ARCH_STRSTR, so search manually ++ ptr = str - 1; ++ ++ do { ++ //first find an 'r' at the begining or after a space ++ do { ++ ptr++; ++ ptr = strchr(ptr, 'r'); ++ if (!ptr) ++ goto no_append; ++ ++ } while (ptr != str && *(ptr-1) != ' '); ++ ++ //then check for the rest ++ for(i = 1; i <= 4; i++) ++ if(*(ptr+i) != *(root+i)) break; ++ ++ } while (i != 5); ++ ++ end = strchr(ptr, ' '); ++ end = end ? (end - 1) : (strchr(ptr, 0) - 1); ++ ++ //find partition number (assumes format root=/dev/mtdXX | /dev/mtdblockXX | yy:XX ) ++ for( i = 0; end >= ptr && *end >= '0' && *end <= '9'; end--, i++); ++ ptr = end + 1; ++ ++ /* if append-rootblock property is set use it to append to command line */ ++ rootblock = getprop(fdt, "/chosen", "append-rootblock", &l); ++ if (rootblock == NULL) ++ goto no_append; ++ ++ if (*dest != ' ') { ++ *dest = ' '; ++ dest++; ++ len++; ++ } ++ ++ if (len + l + i <= COMMAND_LINE_SIZE) { ++ memcpy(dest, rootblock, l); ++ dest += l - 1; ++ memcpy(dest, ptr, i); ++ dest += i; ++ } ++ ++ return dest; ++ ++no_append: ++ len = strlen(str); ++ if (len + 1 < COMMAND_LINE_SIZE) { ++ memcpy(dest, str, len); ++ dest += len; ++ } ++ ++ return dest; ++} ++#endif ++ + static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline) + { + char cmdline[COMMAND_LINE_SIZE]; +@@ -88,12 +156,21 @@ static void merge_fdt_bootargs(void *fdt + + /* and append the ATAG_CMDLINE */ + if (fdt_cmdline) { ++ ++#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) ++ //save original bootloader args ++ //and append ubi.mtd with root partition number to current cmdline ++ setprop_string(fdt, "/chosen", "bootloader-args", fdt_cmdline); ++ ptr = append_rootblock(ptr, fdt_cmdline, len, fdt); ++ ++#else + len = strlen(fdt_cmdline); + if (ptr - cmdline + len + 2 < COMMAND_LINE_SIZE) { + *ptr++ = ' '; + memcpy(ptr, fdt_cmdline, len); + ptr += len; + } ++#endif + } + *ptr = '\0'; + +@@ -168,7 +245,9 @@ int atags_to_fdt(void *atag_list, void * + else + setprop_string(fdt, "/chosen", "bootargs", + atag->u.cmdline.cmdline); +- } else if (atag->hdr.tag == ATAG_MEM) { ++ } ++#ifndef CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE ++ else if (atag->hdr.tag == ATAG_MEM) { + if (memcount >= sizeof(mem_reg_property)/4) + continue; + if (!atag->u.mem.size) +@@ -212,6 +291,10 @@ int atags_to_fdt(void *atag_list, void * + setprop(fdt, "/memory", "reg", mem_reg_property, + 4 * memcount * memsize); + } ++#else ++ ++ } ++#endif + + return fdt_pack(fdt); + } +--- a/init/main.c ++++ b/init/main.c +@@ -110,6 +110,10 @@ + + #include + ++#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) ++#include ++#endif ++ + static int kernel_init(void *); + + extern void init_IRQ(void); +@@ -904,6 +908,18 @@ asmlinkage __visible void __init __no_sa + page_alloc_init(); + + pr_notice("Kernel command line: %s\n", saved_command_line); ++ ++#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) ++ //Show bootloader's original command line for reference ++ if(of_chosen) { ++ const char *prop = of_get_property(of_chosen, "bootloader-args", NULL); ++ if(prop) ++ pr_notice("Bootloader command line (ignored): %s\n", prop); ++ else ++ pr_notice("Bootloader command line not present\n"); ++ } ++#endif ++ + /* parameters may set static keys */ + jump_label_init(); + parse_early_param(); diff --git a/target/linux/mvebu/patches-5.15/301-mvebu-armada-38x-enable-libata-leds.patch b/target/linux/mvebu/patches-5.15/301-mvebu-armada-38x-enable-libata-leds.patch new file mode 100644 index 0000000000..615caac24f --- /dev/null +++ b/target/linux/mvebu/patches-5.15/301-mvebu-armada-38x-enable-libata-leds.patch @@ -0,0 +1,10 @@ +--- a/arch/arm/mach-mvebu/Kconfig ++++ b/arch/arm/mach-mvebu/Kconfig +@@ -67,6 +67,7 @@ config MACH_ARMADA_38X + select HAVE_ARM_TWD if SMP + select MACH_MVEBU_V7 + select PINCTRL_ARMADA_38X ++ select ARCH_WANT_LIBATA_LEDS + help + Say 'Y' here if you want your kernel to support boards based + on the Marvell Armada 380/385 SoC with device tree. diff --git a/target/linux/mvebu/patches-5.15/302-add_powertables.patch b/target/linux/mvebu/patches-5.15/302-add_powertables.patch new file mode 100644 index 0000000000..efbbbc7d78 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/302-add_powertables.patch @@ -0,0 +1,770 @@ +--- a/arch/arm/boot/dts/armada-385-linksys.dtsi ++++ b/arch/arm/boot/dts/armada-385-linksys.dtsi +@@ -212,11 +212,19 @@ + &pcie1 { + /* Marvell 88W8864, 5GHz-only */ + status = "okay"; ++ ++ mwlwifi { ++ marvell,2ghz = <0>; ++ }; + }; + + &pcie2 { + /* Marvell 88W8864, 2GHz-only */ + status = "okay"; ++ ++ mwlwifi { ++ marvell,5ghz = <0>; ++ }; + }; + + &pinctrl { +--- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts +@@ -142,3 +142,205 @@ + }; + }; + }; ++ ++&pcie1 { ++ mwlwifi { ++ marvell,chainmask = <2 2>; ++ marvell,powertable { ++ AU = ++ <36 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <40 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <44 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <48 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <100 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <104 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <108 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <112 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <116 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <120 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <124 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <128 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <132 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <136 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <140 0 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x15 0x17 0x17 0x17 0x14 0x17 0x17 0x17 0x14 0 0xf>, ++ <149 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x1a 0x1a 0x17 0x14 0 0xf>, ++ <153 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x1a 0x1a 0x17 0x14 0 0xf>, ++ <157 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x1a 0x1a 0x17 0x14 0 0xf>, ++ <161 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x1a 0x1a 0x17 0x14 0 0xf>, ++ <165 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x1a 0x1a 0x17 0x14 0 0xf>; ++ CA = ++ <36 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0 0xf>, ++ <40 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0 0xf>, ++ <44 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0 0xf>, ++ <48 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <100 0 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <149 0 0x1a 0x1a 0x18 0x17 0x19 0x19 0x17 0x15 0x18 0x18 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <153 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <157 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <161 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <165 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>; ++ CN = ++ <36 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <40 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <44 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <48 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <100 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <149 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x11 0x11 0x11 0x11 0 0xf>, ++ <153 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0 0xf>, ++ <157 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0 0xf>, ++ <161 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0 0xf>, ++ <165 0 0x15 0x15 0x15 0x15 0x16 0x16 0x16 0x15 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0 0xf>; ++ ETSI = ++ <36 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <40 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <44 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <48 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <100 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>, ++ <149 0 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0 0xf>; ++ FCC = ++ <36 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <40 0 0x19 0x19 0x18 0x17 0x19 0x19 0x17 0x15 0x17 0x17 0x17 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <44 0 0x19 0x19 0x18 0x17 0x19 0x19 0x17 0x15 0x17 0x17 0x17 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <48 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x17 0x17 0x17 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <100 0 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <149 0 0x1a 0x1a 0x18 0x17 0x19 0x19 0x17 0x15 0x18 0x18 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <153 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <157 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <161 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>, ++ <165 0 0x1a 0x1a 0x18 0x17 0x1a 0x1a 0x17 0x15 0x1a 0x1a 0x17 0x14 0x15 0x15 0x15 0x14 0 0xf>; ++ }; ++ }; ++}; ++ ++&pcie2 { ++ mwlwifi { ++ marvell,chainmask = <2 2>; ++ marvell,powertable { ++ AU = ++ <1 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>; ++ CA = ++ <1 0 0x19 0x14 0x14 0x14 0x13 0x13 0x13 0x13 0x10 0x10 0x10 0x10 0x00 0x00 0x00 0x00 0 0xf>, ++ <2 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <3 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <4 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <5 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <6 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <7 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <8 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <9 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <10 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x00 0x00 0x00 0x00 0 0xf>, ++ <11 0 0x19 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x13 0x13 0x13 0x13 0x00 0x00 0x00 0x00 0 0xf>; ++ CN = ++ <1 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <12 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <13 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <14 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>; ++ ETSI = ++ <1 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <12 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>, ++ <13 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0x0 0x0 0x0 0x0 0 0xf>; ++ FCC = ++ <1 0 0x19 0x14 0x14 0x14 0x13 0x13 0x13 0x13 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0x1a 0x19 0x18 0x17 0x19 0x19 0x17 0x16 0x14 0x14 0x14 0x14 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0x19 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x13 0x13 0x13 0x13 0x0 0x0 0x0 0x0 0 0xf>; ++ }; ++ }; ++}; +--- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts +@@ -142,3 +142,205 @@ + }; + }; + }; ++ ++&pcie1 { ++ mwlwifi { ++ marvell,chainmask = <4 4>; ++ marvell,powertable { ++ AU = ++ <36 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <40 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <44 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <48 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <52 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <56 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <60 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <64 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <100 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <104 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <108 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <112 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <116 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <120 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <124 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <128 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <132 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <136 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <140 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <149 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <153 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <157 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <161 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <165 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>; ++ CA = ++ <36 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <40 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <44 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <48 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <100 0 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <149 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <153 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <157 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <161 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <165 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>; ++ CN = ++ <36 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <40 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <44 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <48 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <52 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <56 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <60 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <64 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <100 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <104 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <108 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <112 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <116 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <120 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <124 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <128 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <132 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <136 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <140 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <149 0 0x14 0x14 0x14 0x14 0x13 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <153 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <157 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <161 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <165 0 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>; ++ ETSI = ++ <36 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <40 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <44 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <48 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <52 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <56 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <60 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <64 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <100 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <104 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <108 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <112 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <116 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <120 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <124 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <128 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <132 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <136 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <140 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <149 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>; ++ FCC = ++ <36 0 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0 0xf>, ++ <40 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0xf 0xf 0xf 0xf 0 0xf>, ++ <44 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0xf 0xf 0xf 0xf 0 0xf>, ++ <48 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0xf 0xf 0xf 0xf 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <100 0 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <149 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <153 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <157 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <161 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <165 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>; ++ }; ++ }; ++}; ++ ++&pcie2 { ++ mwlwifi { ++ marvell,chainmask = <4 4>; ++ marvell,powertable { ++ AU = ++ <1 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>; ++ CA = ++ <1 0 0x17 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0xe 0xe 0xe 0xe 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0x17 0x12 0x12 0x12 0x13 0x13 0x13 0x13 0xf 0xf 0xf 0xf 0x0 0x0 0x0 0x0 0 0xf>; ++ CN = ++ <1 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <12 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <13 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <14 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>; ++ ETSI = ++ <1 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <12 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <13 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>; ++ FCC = ++ <1 0 0x17 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0xe 0xe 0xe 0xe 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0x17 0x12 0x12 0x12 0x13 0x13 0x13 0x13 0xf 0xf 0xf 0xf 0x0 0x0 0x0 0x0 0 0xf>; ++ }; ++ }; ++}; +--- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts +@@ -142,3 +142,205 @@ + }; + }; + }; ++ ++&pcie1 { ++ mwlwifi { ++ marvell,chainmask = <4 4>; ++ marvell,powertable { ++ AU = ++ <36 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <40 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <44 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <48 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <52 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <56 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <60 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <64 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <100 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <104 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <108 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <112 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <116 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <120 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <124 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <128 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <132 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <136 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <140 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <149 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <153 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <157 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <161 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>, ++ <165 0 0x19 0x19 0x19 0x17 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0x19 0x19 0x16 0x15 0 0xf>; ++ CA = ++ <36 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <40 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <44 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <48 0 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <100 0 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <149 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <153 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <157 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <161 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <165 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>; ++ CN = ++ <36 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <40 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <44 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <48 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <52 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <56 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <60 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <64 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <100 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <104 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <108 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <112 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <116 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <120 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <124 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <128 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <132 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <136 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <140 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <149 0 0x14 0x14 0x14 0x14 0x13 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <153 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <157 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <161 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>, ++ <165 0 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x14 0x14 0x14 0x14 0x10 0x10 0x10 0x10 0 0xf>; ++ ETSI = ++ <36 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <40 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <44 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <48 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <52 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <56 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <60 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <64 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <100 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <104 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <108 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <112 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <116 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <120 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <124 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <128 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <132 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <136 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <140 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>, ++ <149 0 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xd 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0xe 0 0xf>; ++ FCC = ++ <36 0 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0 0xf>, ++ <40 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0xf 0xf 0xf 0xf 0 0xf>, ++ <44 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0xf 0xf 0xf 0xf 0 0xf>, ++ <48 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0xf 0xf 0xf 0xf 0 0xf>, ++ <52 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <56 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <60 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <64 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <100 0 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <104 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0 0xf>, ++ <108 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <112 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <116 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <120 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <124 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <128 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <132 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <136 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <140 0 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0 0xf>, ++ <149 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <153 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <157 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <161 0 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>, ++ <165 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0 0xf>; ++ }; ++ }; ++}; ++ ++&pcie2 { ++ mwlwifi { ++ marvell,chainmask = <4 4>; ++ marvell,powertable { ++ AU = ++ <1 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>; ++ CA = ++ <1 0 0x17 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0xe 0xe 0xe 0xe 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0x17 0x12 0x12 0x12 0x13 0x13 0x13 0x13 0xf 0xf 0xf 0xf 0x0 0x0 0x0 0x0 0 0xf>; ++ CN = ++ <1 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <12 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <13 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <14 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>; ++ ETSI = ++ <1 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <12 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>, ++ <13 0 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0xa 0x0 0x0 0x0 0x0 0 0xf>; ++ FCC = ++ <1 0 0x17 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0xe 0xe 0xe 0xe 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0x18 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x11 0x11 0x11 0x11 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0x17 0x12 0x12 0x12 0x13 0x13 0x13 0x13 0xf 0xf 0xf 0xf 0x0 0x0 0x0 0x0 0 0xf>; ++ }; ++ }; ++}; +--- a/arch/arm/boot/dts/armada-385-linksys-rango.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-rango.dts +@@ -157,6 +157,18 @@ + }; + }; + ++&pcie1 { ++ mwlwifi { ++ marvell,chainmask = <4 4>; ++ }; ++}; ++ ++&pcie2 { ++ mwlwifi { ++ marvell,chainmask = <4 4>; ++ }; ++}; ++ + &sdhci { + pinctrl-names = "default"; + pinctrl-0 = <&sdhci_pins>; +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -225,12 +225,100 @@ + pcie@2,0 { + /* Port 0, Lane 1 */ + status = "okay"; ++ ++ mwlwifi { ++ marvell,5ghz = <0>; ++ marvell,chainmask = <4 4>; ++ marvell,powertable { ++ FCC = ++ <1 0 0x17 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0xf 0xf 0xf 0xf 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0x17 0x16 0x16 0x16 0x16 0x16 0x16 0x14 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0x17 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x10 0x10 0x10 0x10 0x0 0x0 0x0 0x0 0 0xf>; ++ ++ ETSI = ++ <1 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <2 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <3 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <4 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <5 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <6 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <7 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <8 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <9 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <10 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <11 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <12 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>, ++ <13 0 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0xb 0x0 0x0 0x0 0x0 0 0xf>; ++ }; ++ }; + }; + + /* Second mini-PCIe port */ + pcie@3,0 { + /* Port 0, Lane 3 */ + status = "okay"; ++ ++ mwlwifi { ++ marvell,2ghz = <0>; ++ marvell,chainmask = <4 4>; ++ marvell,powertable { ++ FCC = ++ <36 0 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <40 0 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <44 0 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <48 0 0x8 0x8 0x8 0x8 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0x9 0 0xf>, ++ <52 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>, ++ <56 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>, ++ <60 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>, ++ <64 0 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0xf 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0 0xf>, ++ <100 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <104 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <108 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <112 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <116 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <120 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <124 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <128 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <132 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <136 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <140 0 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0x14 0 0xf>, ++ <149 0 0x16 0x16 0x16 0x16 0x14 0x14 0x14 0x14 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>, ++ <153 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>, ++ <157 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>, ++ <161 0 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>, ++ <165 0 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x16 0x15 0x15 0x15 0x15 0x14 0x14 0x14 0x14 0 0xf>; ++ ++ ETSI = ++ <36 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <40 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <44 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <48 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <52 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <56 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <60 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <64 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <100 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <104 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <108 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <112 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <116 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <120 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <124 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <128 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <132 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <136 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <140 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>, ++ <149 0 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xc 0xd 0xd 0xd 0xd 0xc 0xc 0xc 0xc 0 0xf>; ++ }; ++ }; + }; + }; + diff --git a/target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch b/target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch new file mode 100644 index 0000000000..89a5e19803 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch @@ -0,0 +1,17 @@ +Newer Linksys boards might come with a Winbond W29N02GV which can be +configured in different ways. Make sure we configure it the same way +as the older chips so everything keeps working. + +Signed-off-by: Imre Kaloz + +--- a/arch/arm/boot/dts/armada-385-linksys.dtsi ++++ b/arch/arm/boot/dts/armada-385-linksys.dtsi +@@ -148,6 +148,8 @@ + reg = <0>; + label = "pxa3xx_nand-0"; + nand-rb = <0>; ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; + marvell,nand-keep-config; + nand-on-flash-bbt; + }; diff --git a/target/linux/mvebu/patches-5.15/304-revert_i2c_delay.patch b/target/linux/mvebu/patches-5.15/304-revert_i2c_delay.patch new file mode 100644 index 0000000000..930c0f9494 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/304-revert_i2c_delay.patch @@ -0,0 +1,15 @@ +--- a/arch/arm/boot/dts/armada-xp.dtsi ++++ b/arch/arm/boot/dts/armada-xp.dtsi +@@ -237,12 +237,10 @@ + }; + + &i2c0 { +- compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; + reg = <0x11000 0x100>; + }; + + &i2c1 { +- compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; + reg = <0x11100 0x100>; + }; + diff --git a/target/linux/mvebu/patches-5.15/305-armada-385-rd-mtd-partitions.patch b/target/linux/mvebu/patches-5.15/305-armada-385-rd-mtd-partitions.patch new file mode 100644 index 0000000000..31bd53b1f3 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/305-armada-385-rd-mtd-partitions.patch @@ -0,0 +1,19 @@ +--- a/arch/arm/boot/dts/armada-388-rd.dts ++++ b/arch/arm/boot/dts/armada-388-rd.dts +@@ -103,6 +103,16 @@ + compatible = "st,m25p128", "jedec,spi-nor"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <108000000>; ++ ++ partition@0 { ++ label = "uboot"; ++ reg = <0 0x400000>; ++ }; ++ ++ partition@1 { ++ label = "firmware"; ++ reg = <0x400000 0xc00000>; ++ }; + }; + }; + diff --git a/target/linux/mvebu/patches-5.15/306-ARM-mvebu-385-ap-Add-partitions.patch b/target/linux/mvebu/patches-5.15/306-ARM-mvebu-385-ap-Add-partitions.patch new file mode 100644 index 0000000000..2057e31c7e --- /dev/null +++ b/target/linux/mvebu/patches-5.15/306-ARM-mvebu-385-ap-Add-partitions.patch @@ -0,0 +1,35 @@ +From 9861f93a59142a3131870df2521eb2deb73026d7 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Tue, 13 Jan 2015 11:14:09 +0100 +Subject: [PATCH 2/2] ARM: mvebu: 385-ap: Add partitions + +Signed-off-by: Maxime Ripard +--- + arch/arm/boot/dts/armada-385-db-ap.dts | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/arch/arm/boot/dts/armada-385-db-ap.dts ++++ b/arch/arm/boot/dts/armada-385-db-ap.dts +@@ -218,19 +218,19 @@ + #size-cells = <1>; + + partition@0 { +- label = "U-Boot"; ++ label = "u-boot"; + reg = <0x00000000 0x00800000>; + read-only; + }; + + partition@800000 { +- label = "uImage"; ++ label = "kernel"; + reg = <0x00800000 0x00400000>; + read-only; + }; + + partition@c00000 { +- label = "Root"; ++ label = "ubi"; + reg = <0x00c00000 0x3f400000>; + }; + }; diff --git a/target/linux/mvebu/patches-5.15/307-armada-xp-linksys-mamba-broken-idle.patch b/target/linux/mvebu/patches-5.15/307-armada-xp-linksys-mamba-broken-idle.patch new file mode 100644 index 0000000000..16112d53fc --- /dev/null +++ b/target/linux/mvebu/patches-5.15/307-armada-xp-linksys-mamba-broken-idle.patch @@ -0,0 +1,10 @@ +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -485,3 +485,7 @@ + }; + }; + }; ++ ++&coherencyfab { ++ broken-idle; ++}; diff --git a/target/linux/mvebu/patches-5.15/308-armada-xp-linksys-mamba-wan.patch b/target/linux/mvebu/patches-5.15/308-armada-xp-linksys-mamba-wan.patch new file mode 100644 index 0000000000..4315abc7d2 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/308-armada-xp-linksys-mamba-wan.patch @@ -0,0 +1,11 @@ +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -387,7 +387,7 @@ + + port@4 { + reg = <4>; +- label = "internet"; ++ label = "wan"; + }; + + port@5 { diff --git a/target/linux/mvebu/patches-5.15/309-linksys-status-led.patch b/target/linux/mvebu/patches-5.15/309-linksys-status-led.patch new file mode 100644 index 0000000000..e5e83572c9 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/309-linksys-status-led.patch @@ -0,0 +1,50 @@ +--- a/arch/arm/boot/dts/armada-385-linksys.dtsi ++++ b/arch/arm/boot/dts/armada-385-linksys.dtsi +@@ -14,6 +14,13 @@ + compatible = "linksys,armada385", "marvell,armada385", + "marvell,armada380"; + ++ aliases { ++ led-boot = &led_power; ++ led-failsafe = &led_power; ++ led-running = &led_power; ++ led-upgrade = &led_power; ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; +@@ -71,7 +78,7 @@ + pinctrl-0 = <&gpio_leds_pins>; + pinctrl-names = "default"; + +- power { ++ led_power: power { + gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -26,6 +26,13 @@ + compatible = "linksys,mamba", "marvell,armadaxp-mv78230", + "marvell,armadaxp", "marvell,armada-370-xp"; + ++ aliases { ++ led-boot = &led_power; ++ led-failsafe = &led_power; ++ led-running = &led_power; ++ led-upgrade = &led_power; ++ }; ++ + chosen { + bootargs = "console=ttyS0,115200"; + stdout-path = &uart0; +@@ -197,7 +204,7 @@ + pinctrl-0 = <&power_led_pin>; + pinctrl-names = "default"; + +- power { ++ led_power: power { + label = "mamba:white:power"; + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; + default-state = "on"; diff --git a/target/linux/mvebu/patches-5.15/310-linksys-use-eth0-as-cpu-port.patch b/target/linux/mvebu/patches-5.15/310-linksys-use-eth0-as-cpu-port.patch new file mode 100644 index 0000000000..84d49a004b --- /dev/null +++ b/target/linux/mvebu/patches-5.15/310-linksys-use-eth0-as-cpu-port.patch @@ -0,0 +1,25 @@ +--- a/arch/arm/boot/dts/armada-385-linksys.dtsi ++++ b/arch/arm/boot/dts/armada-385-linksys.dtsi +@@ -116,7 +116,7 @@ + }; + + ð2 { +- status = "okay"; ++ status = "disabled"; + phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; +@@ -200,10 +200,10 @@ + label = "wan"; + }; + +- port@5 { +- reg = <5>; ++ port@6 { ++ reg = <6>; + label = "cpu"; +- ethernet = <ð2>; ++ ethernet = <ð0>; + + fixed-link { + speed = <1000>; diff --git a/target/linux/mvebu/patches-5.15/311-adjust-compatible-for-linksys.patch b/target/linux/mvebu/patches-5.15/311-adjust-compatible-for-linksys.patch new file mode 100644 index 0000000000..a5d3e63810 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/311-adjust-compatible-for-linksys.patch @@ -0,0 +1,68 @@ +--- a/arch/arm/boot/dts/armada-385-linksys-rango.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-rango.dts +@@ -12,8 +12,8 @@ + + / { + model = "Linksys WRT3200ACM"; +- compatible = "linksys,rango", "linksys,armada385", "marvell,armada385", +- "marvell,armada380"; ++ compatible = "linksys,wrt3200acm", "linksys,rango", "linksys,armada385", ++ "marvell,armada385", "marvell,armada380"; + }; + + &expander0 { +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -22,9 +22,10 @@ + #include "armada-xp-mv78230.dtsi" + + / { +- model = "Linksys WRT1900AC"; +- compatible = "linksys,mamba", "marvell,armadaxp-mv78230", +- "marvell,armadaxp", "marvell,armada-370-xp"; ++ model = "Linksys WRT1900AC v1"; ++ compatible = "linksys,wrt1900ac-v1", "linksys,mamba", ++ "marvell,armadaxp-mv78230", "marvell,armadaxp", ++ "marvell,armada-370-xp"; + + aliases { + led-boot = &led_power; +--- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts +@@ -9,8 +9,9 @@ + #include "armada-385-linksys.dtsi" + + / { +- model = "Linksys WRT1900ACv2"; +- compatible = "linksys,cobra", "linksys,armada385", "marvell,armada385", ++ model = "Linksys WRT1900AC v2"; ++ compatible = "linksys,wrt1900ac-v2", "linksys,cobra", ++ "linksys,armada385", "marvell,armada385", + "marvell,armada380"; + }; + +--- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts +@@ -10,8 +10,8 @@ + + / { + model = "Linksys WRT1200AC"; +- compatible = "linksys,caiman", "linksys,armada385", "marvell,armada385", +- "marvell,armada380"; ++ compatible = "linksys,wrt1200ac", "linksys,caiman", "linksys,armada385", ++ "marvell,armada385", "marvell,armada380"; + }; + + &expander0 { +--- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts ++++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts +@@ -10,7 +10,8 @@ + + / { + model = "Linksys WRT1900ACS"; +- compatible = "linksys,shelby", "linksys,armada385", "marvell,armada385", ++ compatible = "linksys,wrt1900acs", "linksys,shelby", ++ "linksys,armada385", "marvell,armada385", + "marvell,armada380"; + }; + diff --git a/target/linux/mvebu/patches-5.15/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch b/target/linux/mvebu/patches-5.15/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch new file mode 100644 index 0000000000..dd2bef7f63 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch @@ -0,0 +1,87 @@ +From 8137da20701c776ad3481115305a5e8e410871ba Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Tue, 29 Nov 2016 10:15:45 +0000 +Subject: ARM: dts: armada388-clearfog: emmc on clearfog base + +Signed-off-by: Russell King +--- + arch/arm/boot/dts/armada-388-clearfog-base.dts | 1 + + .../dts/armada-38x-solidrun-microsom-emmc.dtsi | 62 ++++++++++++++++++++++ + 2 files changed, 63 insertions(+) + create mode 100644 arch/arm/boot/dts/armada-38x-solidrun-microsom-emmc.dtsi + +--- a/arch/arm/boot/dts/armada-388-clearfog-base.dts ++++ b/arch/arm/boot/dts/armada-388-clearfog-base.dts +@@ -7,6 +7,7 @@ + + /dts-v1/; + #include "armada-388-clearfog.dtsi" ++#include "armada-38x-solidrun-microsom-emmc.dtsi" + + / { + model = "SolidRun Clearfog Base A1"; +--- /dev/null ++++ b/arch/arm/boot/dts/armada-38x-solidrun-microsom-emmc.dtsi +@@ -0,0 +1,62 @@ ++/* ++ * Device Tree file for SolidRun Armada 38x Microsom add-on for eMMC ++ * ++ * Copyright (C) 2015 Russell King ++ * ++ * This board is in development; the contents of this file work with ++ * the A1 rev 2.0 of the board, which does not represent final ++ * production board. Things will change, don't expect this file to ++ * remain compatible info the future. ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This file is distributed in the hope that it will be useful ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * Or, alternatively ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++/ { ++ soc { ++ internal-regs { ++ sdhci@d8000 { ++ bus-width = <4>; ++ no-1-8-v; ++ non-removable; ++ pinctrl-0 = <µsom_sdhci_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ wp-inverted; ++ }; ++ }; ++ }; ++}; diff --git a/target/linux/mvebu/patches-5.15/313-helios4-dts-status-led-alias.patch b/target/linux/mvebu/patches-5.15/313-helios4-dts-status-led-alias.patch new file mode 100644 index 0000000000..607f436297 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/313-helios4-dts-status-led-alias.patch @@ -0,0 +1,28 @@ +--- a/arch/arm/boot/dts/armada-388-helios4.dts ++++ b/arch/arm/boot/dts/armada-388-helios4.dts +@@ -15,6 +15,13 @@ + model = "Helios4"; + compatible = "kobol,helios4", "marvell,armada388", + "marvell,armada385", "marvell,armada380"; ++ ++ aliases { ++ led-boot = &led_status; ++ led-failsafe = &led_status; ++ led-running = &led_status; ++ led-upgrade = &led_status; ++ }; + + memory { + device_type = "memory"; +@@ -73,10 +80,9 @@ + pinctrl-names = "default"; + pinctrl-0 = <&helios_system_led_pins>; + +- status-led { ++ led_status: status-led { + label = "helios4:green:status"; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; +- linux,default-trigger = "heartbeat"; + default-state = "on"; + }; + diff --git a/target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch b/target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch new file mode 100644 index 0000000000..2240d0b39e --- /dev/null +++ b/target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch @@ -0,0 +1,34 @@ +Certain SFP modules (most notably Nokia GPON ones) first check +connectivity on 1000base-x, and switch to 2500base-x afterwards. This +is considered a quirk so the phylink switches the interface to +2500base-x as well. + +However, after power-cycling the uDPU device, network interface/SFP module +will not work correctly until the module is re-seated. This patch +resolves this issue by forcing the interface to be brought up in +2500base-x mode by default. + +Signed-off-by: Jakov Petrina +Signed-off-by: Vladimir Vid +Cc: Luka Perkov + +--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts +@@ -162,7 +162,7 @@ + }; + + ð0 { +- phy-mode = "sgmii"; ++ phy-mode = "2500base-x"; + status = "okay"; + managed = "in-band-status"; + phys = <&comphy1 0>; +@@ -170,7 +170,7 @@ + }; + + ð1 { +- phy-mode = "sgmii"; ++ phy-mode = "2500base-x"; + status = "okay"; + managed = "in-band-status"; + phys = <&comphy0 1>; diff --git a/target/linux/mvebu/patches-5.15/315-armada-xp-linksys-mamba-resize-kernel.patch b/target/linux/mvebu/patches-5.15/315-armada-xp-linksys-mamba-resize-kernel.patch new file mode 100644 index 0000000000..f1fddceff4 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/315-armada-xp-linksys-mamba-resize-kernel.patch @@ -0,0 +1,37 @@ +From 258233f00bcd013050efee00c5d9128ef8cd62dd Mon Sep 17 00:00:00 2001 +From: Tad +Date: Fri, 5 Feb 2021 22:32:11 -0500 +Subject: [PATCH] ARM: dts: armada-xp-linksys-mamba: Increase kernel + partition to 4MB + +Signed-off-by: Tad Davanzo +--- + arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts ++++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts +@@ -456,9 +456,9 @@ + reg = <0xa00000 0x2800000>; /* 40MB */ + }; + +- partition@d00000 { ++ partition@e00000 { + label = "rootfs1"; +- reg = <0xd00000 0x2500000>; /* 37MB */ ++ reg = <0xe00000 0x2400000>; /* 36MB */ + }; + + /* kernel2 overlaps with rootfs2 by design */ +@@ -467,9 +467,9 @@ + reg = <0x3200000 0x2800000>; /* 40MB */ + }; + +- partition@3500000 { ++ partition@3600000 { + label = "rootfs2"; +- reg = <0x3500000 0x2500000>; /* 37MB */ ++ reg = <0x3600000 0x2400000>; /* 36MB */ + }; + + /* diff --git a/target/linux/mvebu/patches-5.15/316-armada-370-dts-fix-crypto-engine.patch b/target/linux/mvebu/patches-5.15/316-armada-370-dts-fix-crypto-engine.patch new file mode 100644 index 0000000000..19378870ef --- /dev/null +++ b/target/linux/mvebu/patches-5.15/316-armada-370-dts-fix-crypto-engine.patch @@ -0,0 +1,29 @@ +--- a/arch/arm/boot/dts/armada-370.dtsi ++++ b/arch/arm/boot/dts/armada-370.dtsi +@@ -234,7 +234,7 @@ + clocks = <&gateclk 23>; + clock-names = "cesa0"; + marvell,crypto-srams = <&crypto_sram>; +- marvell,crypto-sram-size = <0x7e0>; ++ marvell,crypto-sram-size = <0x800>; + }; + }; + +@@ -255,12 +255,17 @@ + * cpuidle workaround. + */ + idle-sram@0 { ++ status = "disabled"; + reg = <0x0 0x20>; + }; + }; + }; + }; + ++&coherencyfab { ++ broken-idle; ++}; ++ + /* + * Default UART pinctrl setting without RTS/CTS, can be overwritten on + * board level if a different configuration is used. diff --git a/target/linux/mvebu/patches-5.15/400-find_active_root.patch b/target/linux/mvebu/patches-5.15/400-find_active_root.patch new file mode 100644 index 0000000000..5582d20c68 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/400-find_active_root.patch @@ -0,0 +1,60 @@ +The WRT1900AC among other Linksys routers uses a dual-firmware layout. +Dynamically rename the active partition to "ubi". + +Signed-off-by: Imre Kaloz + +--- a/drivers/mtd/parsers/ofpart_core.c ++++ b/drivers/mtd/parsers/ofpart_core.c +@@ -38,6 +38,8 @@ static bool node_has_compatible(struct d + return of_get_property(pp, "compatible", NULL); + } + ++static int mangled_rootblock; ++ + static int parse_fixed_partitions(struct mtd_info *master, + const struct mtd_partition **pparts, + struct mtd_part_parser_data *data) +@@ -48,6 +50,7 @@ static int parse_fixed_partitions(struct + struct device_node *mtd_node; + struct device_node *ofpart_node; + const char *partname; ++ const char *owrtpart = "ubi"; + struct device_node *pp; + int nr_parts, i, ret = 0; + bool dedicated = true; +@@ -133,9 +136,13 @@ static int parse_fixed_partitions(struct + parts[i].size = of_read_number(reg + a_cells, s_cells); + parts[i].of_node = pp; + +- partname = of_get_property(pp, "label", &len); +- if (!partname) +- partname = of_get_property(pp, "name", &len); ++ if (mangled_rootblock && (i == mangled_rootblock)) { ++ partname = owrtpart; ++ } else { ++ partname = of_get_property(pp, "label", &len); ++ if (!partname) ++ partname = of_get_property(pp, "name", &len); ++ } + parts[i].name = partname; + + if (of_get_property(pp, "read-only", &len)) +@@ -252,6 +259,18 @@ static int __init ofpart_parser_init(voi + return 0; + } + ++static int __init active_root(char *str) ++{ ++ get_option(&str, &mangled_rootblock); ++ ++ if (!mangled_rootblock) ++ return 1; ++ ++ return 1; ++} ++ ++__setup("mangled_rootblock=", active_root); ++ + static void __exit ofpart_parser_exit(void) + { + deregister_mtd_parser(&ofpart_parser); diff --git a/target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch new file mode 100644 index 0000000000..a0f15681f5 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch @@ -0,0 +1,38 @@ +The hardware queue scheduling is apparently configured with fixed +priorities, which creates a nasty fairness issue where traffic from one +CPU can starve traffic from all other CPUs. + +Work around this issue by forcing all tx packets to go through one CPU, +until this issue is fixed properly. + +Signed-off-by: Felix Fietkau +--- +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -4903,6 +4903,16 @@ static int mvneta_ethtool_set_eee(struct + return phylink_ethtool_set_eee(pp->phylink, eee); + } + ++#ifndef CONFIG_ARM64 ++static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb, ++ struct net_device *sb_dev) ++{ ++ /* XXX: hardware queue scheduling is broken, ++ * use only one queue until it is fixed */ ++ return 0; ++} ++#endif ++ + static const struct net_device_ops mvneta_netdev_ops = { + .ndo_open = mvneta_open, + .ndo_stop = mvneta_stop, +@@ -4913,6 +4923,9 @@ static const struct net_device_ops mvnet + .ndo_fix_features = mvneta_fix_features, + .ndo_get_stats64 = mvneta_get_stats64, + .ndo_do_ioctl = mvneta_ioctl, ++#ifndef CONFIG_ARM64 ++ .ndo_select_queue = mvneta_select_queue, ++#endif + .ndo_bpf = mvneta_xdp, + .ndo_xdp_xmit = mvneta_xdp_xmit, + }; diff --git a/target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch b/target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch new file mode 100644 index 0000000000..36d4942f8b --- /dev/null +++ b/target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch @@ -0,0 +1,109 @@ +From 4906887a8ae5f1296f8079bcf4565a6092a8e402 Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier +Date: Tue, 16 Feb 2021 10:25:36 +0100 +Subject: net: mvneta: Implement mqprio support + +Implement a basic MQPrio support, inserting rules in RX that translate +the TC to prio mapping into vlan prio to queues. + +The TX logic stays the same as when we don't offload the qdisc. + +Signed-off-by: Maxime Chevallier +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/marvell/mvneta.c | 61 +++++++++++++++++++++++++++++++++++ + 1 file changed, 61 insertions(+) + +(limited to 'drivers/net/ethernet/marvell/mvneta.c') + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -102,6 +102,8 @@ + #define MVNETA_TX_NO_DATA_SWAP BIT(5) + #define MVNETA_DESC_SWAP BIT(6) + #define MVNETA_TX_BRST_SZ_MASK(burst) ((burst) << 22) ++#define MVNETA_VLAN_PRIO_TO_RXQ 0x2440 ++#define MVNETA_VLAN_PRIO_RXQ_MAP(prio, rxq) ((rxq) << ((prio) * 3)) + #define MVNETA_PORT_STATUS 0x2444 + #define MVNETA_TX_IN_PRGRS BIT(0) + #define MVNETA_TX_FIFO_EMPTY BIT(8) +@@ -490,6 +492,7 @@ struct mvneta_port { + u8 mcast_count[256]; + u16 tx_ring_size; + u16 rx_ring_size; ++ u8 prio_tc_map[8]; + + phy_interface_t phy_interface; + struct device_node *dn; +@@ -4913,6 +4916,63 @@ static u16 mvneta_select_queue(struct ne + } + #endif + ++static void mvneta_clear_rx_prio_map(struct mvneta_port *pp) ++{ ++ mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, 0); ++} ++ ++static void mvneta_setup_rx_prio_map(struct mvneta_port *pp) ++{ ++ u32 val = 0; ++ int i; ++ ++ for (i = 0; i < rxq_number; i++) ++ val |= MVNETA_VLAN_PRIO_RXQ_MAP(i, pp->prio_tc_map[i]); ++ ++ mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); ++} ++ ++static int mvneta_setup_mqprio(struct net_device *dev, ++ struct tc_mqprio_qopt *qopt) ++{ ++ struct mvneta_port *pp = netdev_priv(dev); ++ u8 num_tc; ++ int i; ++ ++ qopt->hw = TC_MQPRIO_HW_OFFLOAD_TCS; ++ num_tc = qopt->num_tc; ++ ++ if (num_tc > rxq_number) ++ return -EINVAL; ++ ++ if (!num_tc) { ++ mvneta_clear_rx_prio_map(pp); ++ netdev_reset_tc(dev); ++ return 0; ++ } ++ ++ memcpy(pp->prio_tc_map, qopt->prio_tc_map, sizeof(pp->prio_tc_map)); ++ ++ mvneta_setup_rx_prio_map(pp); ++ ++ netdev_set_num_tc(dev, qopt->num_tc); ++ for (i = 0; i < qopt->num_tc; i++) ++ netdev_set_tc_queue(dev, i, qopt->count[i], qopt->offset[i]); ++ ++ return 0; ++} ++ ++static int mvneta_setup_tc(struct net_device *dev, enum tc_setup_type type, ++ void *type_data) ++{ ++ switch (type) { ++ case TC_SETUP_QDISC_MQPRIO: ++ return mvneta_setup_mqprio(dev, type_data); ++ default: ++ return -EOPNOTSUPP; ++ } ++} ++ + static const struct net_device_ops mvneta_netdev_ops = { + .ndo_open = mvneta_open, + .ndo_stop = mvneta_stop, +@@ -4928,6 +4988,7 @@ static const struct net_device_ops mvnet + #endif + .ndo_bpf = mvneta_xdp, + .ndo_xdp_xmit = mvneta_xdp_xmit, ++ .ndo_setup_tc = mvneta_setup_tc, + }; + + static const struct ethtool_ops mvneta_eth_tool_ops = { diff --git a/target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch b/target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch new file mode 100644 index 0000000000..41f8c1fbfd --- /dev/null +++ b/target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch @@ -0,0 +1,66 @@ +From 75fa71e3acadbb4ab5eda18505277eb9a1f69b23 Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier +Date: Fri, 26 Nov 2021 12:20:53 +0100 +Subject: net: mvneta: Use struct tc_mqprio_qopt_offload for MQPrio + configuration + +The struct tc_mqprio_qopt_offload is a container for struct tc_mqprio_qopt, +that allows passing extra parameters, such as traffic shaping. This commit +converts the current mqprio code to that new struct. + +Signed-off-by: Maxime Chevallier +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/marvell/mvneta.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +(limited to 'drivers/net/ethernet/marvell/mvneta.c') + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + + /* Registers */ +@@ -4933,14 +4934,14 @@ static void mvneta_setup_rx_prio_map(str + } + + static int mvneta_setup_mqprio(struct net_device *dev, +- struct tc_mqprio_qopt *qopt) ++ struct tc_mqprio_qopt_offload *mqprio) + { + struct mvneta_port *pp = netdev_priv(dev); + u8 num_tc; + int i; + +- qopt->hw = TC_MQPRIO_HW_OFFLOAD_TCS; +- num_tc = qopt->num_tc; ++ mqprio->qopt.hw = TC_MQPRIO_HW_OFFLOAD_TCS; ++ num_tc = mqprio->qopt.num_tc; + + if (num_tc > rxq_number) + return -EINVAL; +@@ -4951,13 +4952,15 @@ static int mvneta_setup_mqprio(struct ne + return 0; + } + +- memcpy(pp->prio_tc_map, qopt->prio_tc_map, sizeof(pp->prio_tc_map)); ++ memcpy(pp->prio_tc_map, mqprio->qopt.prio_tc_map, ++ sizeof(pp->prio_tc_map)); + + mvneta_setup_rx_prio_map(pp); + +- netdev_set_num_tc(dev, qopt->num_tc); +- for (i = 0; i < qopt->num_tc; i++) +- netdev_set_tc_queue(dev, i, qopt->count[i], qopt->offset[i]); ++ netdev_set_num_tc(dev, mqprio->qopt.num_tc); ++ for (i = 0; i < mqprio->qopt.num_tc; i++) ++ netdev_set_tc_queue(dev, i, mqprio->qopt.count[i], ++ mqprio->qopt.offset[i]); + + return 0; + } diff --git a/target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch b/target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch new file mode 100644 index 0000000000..8529b6ae5e --- /dev/null +++ b/target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch @@ -0,0 +1,30 @@ +From e7ca75fe6662f78bfeb0112671c812e4c7b8e214 Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier +Date: Fri, 26 Nov 2021 12:20:54 +0100 +Subject: net: mvneta: Don't force-set the offloading flag + +The qopt->hw flag is set by the TC code according to the offloading mode +asked by user. Don't force-set it in the driver, but instead read it to +make sure we do what's asked. + +Signed-off-by: Maxime Chevallier +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/marvell/mvneta.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +(limited to 'drivers/net/ethernet/marvell/mvneta.c') + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -4940,7 +4940,9 @@ static int mvneta_setup_mqprio(struct ne + u8 num_tc; + int i; + +- mqprio->qopt.hw = TC_MQPRIO_HW_OFFLOAD_TCS; ++ if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) ++ return 0; ++ + num_tc = mqprio->qopt.num_tc; + + if (num_tc > rxq_number) diff --git a/target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch b/target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch new file mode 100644 index 0000000000..ed4f0441dd --- /dev/null +++ b/target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch @@ -0,0 +1,97 @@ +From e9f7099d0730341b24c057acbf545dd019581db6 Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier +Date: Fri, 26 Nov 2021 12:20:55 +0100 +Subject: net: mvneta: Allow having more than one queue per TC + +The current mqprio implementation assumed that we are only using one +queue per TC. Use the offset and count parameters to allow using +multiple queues per TC. In that case, the controller will use a standard +round-robin algorithm to pick queues assigned to the same TC, with the +same priority. + +This only applies to VLAN priorities in ingress traffic, each TC +corresponding to a vlan priority. + +Signed-off-by: Maxime Chevallier +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/marvell/mvneta.c | 35 ++++++++++++++++++++--------------- + 1 file changed, 20 insertions(+), 15 deletions(-) + +(limited to 'drivers/net/ethernet/marvell/mvneta.c') + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -493,7 +493,6 @@ struct mvneta_port { + u8 mcast_count[256]; + u16 tx_ring_size; + u16 rx_ring_size; +- u8 prio_tc_map[8]; + + phy_interface_t phy_interface; + struct device_node *dn; +@@ -4922,13 +4921,12 @@ static void mvneta_clear_rx_prio_map(str + mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, 0); + } + +-static void mvneta_setup_rx_prio_map(struct mvneta_port *pp) ++static void mvneta_map_vlan_prio_to_rxq(struct mvneta_port *pp, u8 pri, u8 rxq) + { +- u32 val = 0; +- int i; ++ u32 val = mvreg_read(pp, MVNETA_VLAN_PRIO_TO_RXQ); + +- for (i = 0; i < rxq_number; i++) +- val |= MVNETA_VLAN_PRIO_RXQ_MAP(i, pp->prio_tc_map[i]); ++ val &= ~MVNETA_VLAN_PRIO_RXQ_MAP(pri, 0x7); ++ val |= MVNETA_VLAN_PRIO_RXQ_MAP(pri, rxq); + + mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); + } +@@ -4937,8 +4935,8 @@ static int mvneta_setup_mqprio(struct ne + struct tc_mqprio_qopt_offload *mqprio) + { + struct mvneta_port *pp = netdev_priv(dev); ++ int rxq, tc; + u8 num_tc; +- int i; + + if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) + return 0; +@@ -4948,21 +4946,28 @@ static int mvneta_setup_mqprio(struct ne + if (num_tc > rxq_number) + return -EINVAL; + ++ mvneta_clear_rx_prio_map(pp); ++ + if (!num_tc) { +- mvneta_clear_rx_prio_map(pp); + netdev_reset_tc(dev); + return 0; + } + +- memcpy(pp->prio_tc_map, mqprio->qopt.prio_tc_map, +- sizeof(pp->prio_tc_map)); ++ netdev_set_num_tc(dev, mqprio->qopt.num_tc); + +- mvneta_setup_rx_prio_map(pp); ++ for (tc = 0; tc < mqprio->qopt.num_tc; tc++) { ++ netdev_set_tc_queue(dev, tc, mqprio->qopt.count[tc], ++ mqprio->qopt.offset[tc]); ++ ++ for (rxq = mqprio->qopt.offset[tc]; ++ rxq < mqprio->qopt.count[tc] + mqprio->qopt.offset[tc]; ++ rxq++) { ++ if (rxq >= rxq_number) ++ return -EINVAL; + +- netdev_set_num_tc(dev, mqprio->qopt.num_tc); +- for (i = 0; i < mqprio->qopt.num_tc; i++) +- netdev_set_tc_queue(dev, i, mqprio->qopt.count[i], +- mqprio->qopt.offset[i]); ++ mvneta_map_vlan_prio_to_rxq(pp, tc, rxq); ++ } ++ } + + return 0; + } diff --git a/target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch b/target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch new file mode 100644 index 0000000000..15a0ce6b58 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch @@ -0,0 +1,182 @@ +From 2551dc9e398c37a15e52122d385c29a8b06be45f Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier +Date: Fri, 26 Nov 2021 12:20:56 +0100 +Subject: net: mvneta: Add TC traffic shaping offload + +The mvneta controller is able to do some tocken-bucket per-queue traffic +shaping. This commit adds support for setting these using the TC mqprio +interface. + +The token-bucket parameters are customisable, but the current +implementation configures them to have a 10kbps resolution for the +rate limitation, since it allows to cover the whole range of max_rate +values from 10kbps to 5Gbps with 10kbps increments. + +Signed-off-by: Maxime Chevallier +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/marvell/mvneta.c | 120 +++++++++++++++++++++++++++++++++- + 1 file changed, 119 insertions(+), 1 deletion(-) + +(limited to 'drivers/net/ethernet/marvell/mvneta.c') + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -248,12 +248,39 @@ + #define MVNETA_TXQ_SENT_DESC_MASK 0x3fff0000 + #define MVNETA_PORT_TX_RESET 0x3cf0 + #define MVNETA_PORT_TX_DMA_RESET BIT(0) ++#define MVNETA_TXQ_CMD1_REG 0x3e00 ++#define MVNETA_TXQ_CMD1_BW_LIM_SEL_V1 BIT(3) ++#define MVNETA_TXQ_CMD1_BW_LIM_EN BIT(0) ++#define MVNETA_REFILL_NUM_CLK_REG 0x3e08 ++#define MVNETA_REFILL_MAX_NUM_CLK 0x0000ffff + #define MVNETA_TX_MTU 0x3e0c + #define MVNETA_TX_TOKEN_SIZE 0x3e14 + #define MVNETA_TX_TOKEN_SIZE_MAX 0xffffffff ++#define MVNETA_TXQ_BUCKET_REFILL_REG(q) (0x3e20 + ((q) << 2)) ++#define MVNETA_TXQ_BUCKET_REFILL_PERIOD_MASK 0x3ff00000 ++#define MVNETA_TXQ_BUCKET_REFILL_PERIOD_SHIFT 20 ++#define MVNETA_TXQ_BUCKET_REFILL_VALUE_MAX 0x0007ffff + #define MVNETA_TXQ_TOKEN_SIZE_REG(q) (0x3e40 + ((q) << 2)) + #define MVNETA_TXQ_TOKEN_SIZE_MAX 0x7fffffff + ++/* The values of the bucket refill base period and refill period are taken from ++ * the reference manual, and adds up to a base resolution of 10Kbps. This allows ++ * to cover all rate-limit values from 10Kbps up to 5Gbps ++ */ ++ ++/* Base period for the rate limit algorithm */ ++#define MVNETA_TXQ_BUCKET_REFILL_BASE_PERIOD_NS 100 ++ ++/* Number of Base Period to wait between each bucket refill */ ++#define MVNETA_TXQ_BUCKET_REFILL_PERIOD 1000 ++ ++/* The base resolution for rate limiting, in bps. Any max_rate value should be ++ * a multiple of that value. ++ */ ++#define MVNETA_TXQ_RATE_LIMIT_RESOLUTION (NSEC_PER_SEC / \ ++ (MVNETA_TXQ_BUCKET_REFILL_BASE_PERIOD_NS * \ ++ MVNETA_TXQ_BUCKET_REFILL_PERIOD)) ++ + #define MVNETA_LPI_CTRL_0 0x2cc0 + #define MVNETA_LPI_CTRL_1 0x2cc4 + #define MVNETA_LPI_REQUEST_ENABLE BIT(0) +@@ -4931,11 +4958,74 @@ static void mvneta_map_vlan_prio_to_rxq( + mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); + } + ++static int mvneta_enable_per_queue_rate_limit(struct mvneta_port *pp) ++{ ++ unsigned long core_clk_rate; ++ u32 refill_cycles; ++ u32 val; ++ ++ core_clk_rate = clk_get_rate(pp->clk); ++ if (!core_clk_rate) ++ return -EINVAL; ++ ++ refill_cycles = MVNETA_TXQ_BUCKET_REFILL_BASE_PERIOD_NS / ++ (NSEC_PER_SEC / core_clk_rate); ++ ++ if (refill_cycles > MVNETA_REFILL_MAX_NUM_CLK) ++ return -EINVAL; ++ ++ /* Enable bw limit algorithm version 3 */ ++ val = mvreg_read(pp, MVNETA_TXQ_CMD1_REG); ++ val &= ~(MVNETA_TXQ_CMD1_BW_LIM_SEL_V1 | MVNETA_TXQ_CMD1_BW_LIM_EN); ++ mvreg_write(pp, MVNETA_TXQ_CMD1_REG, val); ++ ++ /* Set the base refill rate */ ++ mvreg_write(pp, MVNETA_REFILL_NUM_CLK_REG, refill_cycles); ++ ++ return 0; ++} ++ ++static void mvneta_disable_per_queue_rate_limit(struct mvneta_port *pp) ++{ ++ u32 val = mvreg_read(pp, MVNETA_TXQ_CMD1_REG); ++ ++ val |= (MVNETA_TXQ_CMD1_BW_LIM_SEL_V1 | MVNETA_TXQ_CMD1_BW_LIM_EN); ++ mvreg_write(pp, MVNETA_TXQ_CMD1_REG, val); ++} ++ ++static int mvneta_setup_queue_rates(struct mvneta_port *pp, int queue, ++ u64 min_rate, u64 max_rate) ++{ ++ u32 refill_val, rem; ++ u32 val = 0; ++ ++ /* Convert to from Bps to bps */ ++ max_rate *= 8; ++ ++ if (min_rate) ++ return -EINVAL; ++ ++ refill_val = div_u64_rem(max_rate, MVNETA_TXQ_RATE_LIMIT_RESOLUTION, ++ &rem); ++ ++ if (rem || !refill_val || ++ refill_val > MVNETA_TXQ_BUCKET_REFILL_VALUE_MAX) ++ return -EINVAL; ++ ++ val = refill_val; ++ val |= (MVNETA_TXQ_BUCKET_REFILL_PERIOD << ++ MVNETA_TXQ_BUCKET_REFILL_PERIOD_SHIFT); ++ ++ mvreg_write(pp, MVNETA_TXQ_BUCKET_REFILL_REG(queue), val); ++ ++ return 0; ++} ++ + static int mvneta_setup_mqprio(struct net_device *dev, + struct tc_mqprio_qopt_offload *mqprio) + { + struct mvneta_port *pp = netdev_priv(dev); +- int rxq, tc; ++ int rxq, txq, tc, ret; + u8 num_tc; + + if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) +@@ -4949,6 +5039,7 @@ static int mvneta_setup_mqprio(struct ne + mvneta_clear_rx_prio_map(pp); + + if (!num_tc) { ++ mvneta_disable_per_queue_rate_limit(pp); + netdev_reset_tc(dev); + return 0; + } +@@ -4969,6 +5060,33 @@ static int mvneta_setup_mqprio(struct ne + } + } + ++ if (mqprio->shaper != TC_MQPRIO_SHAPER_BW_RATE) { ++ mvneta_disable_per_queue_rate_limit(pp); ++ return 0; ++ } ++ ++ if (mqprio->qopt.num_tc > txq_number) ++ return -EINVAL; ++ ++ ret = mvneta_enable_per_queue_rate_limit(pp); ++ if (ret) ++ return ret; ++ ++ for (tc = 0; tc < mqprio->qopt.num_tc; tc++) { ++ for (txq = mqprio->qopt.offset[tc]; ++ txq < mqprio->qopt.count[tc] + mqprio->qopt.offset[tc]; ++ txq++) { ++ if (txq >= txq_number) ++ return -EINVAL; ++ ++ ret = mvneta_setup_queue_rates(pp, txq, ++ mqprio->min_rate[tc], ++ mqprio->max_rate[tc]); ++ if (ret) ++ return ret; ++ } ++ } ++ + return 0; + } + diff --git a/target/linux/mvebu/patches-5.15/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch b/target/linux/mvebu/patches-5.15/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch new file mode 100644 index 0000000000..29f36be460 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch @@ -0,0 +1,40 @@ +From c28b2d367da8a471482e6a4aa8337ab6369a80c2 Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Sat, 3 Oct 2015 09:13:05 +0100 +Subject: cpuidle: mvebu: indicate failure to enter deeper sleep states + +The cpuidle ->enter method expects the return value to be the sleep +state we entered. Returning negative numbers or other codes is not +permissible since coupled CPU idle was merged. + +At least some of the mvebu_v7_cpu_suspend() implementations return the +value from cpu_suspend(), which returns zero if the CPU vectors back +into the kernel via cpu_resume() (the success case), or the non-zero +return value of the suspend actor, or one (failure cases). + +We do not want to be returning the failure case value back to CPU idle +as that indicates that we successfully entered one of the deeper idle +states. Always return zero instead, indicating that we slept for the +shortest amount of time. + +Signed-off-by: Russell King +--- + drivers/cpuidle/cpuidle-mvebu-v7.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/cpuidle/cpuidle-mvebu-v7.c ++++ b/drivers/cpuidle/cpuidle-mvebu-v7.c +@@ -39,8 +39,12 @@ static int mvebu_v7_enter_idle(struct cp + ret = mvebu_v7_cpu_suspend(deepidle); + cpu_pm_exit(); + ++ /* ++ * If we failed to enter the desired state, indicate that we ++ * slept lightly. ++ */ + if (ret) +- return ret; ++ return 0; + + return index; + } diff --git a/target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch b/target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch new file mode 100644 index 0000000000..a5e49552e9 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch @@ -0,0 +1,60 @@ +From 287b9df160b6159f8d385424904f8bac501280c1 Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Sat, 9 Jul 2016 10:58:16 +0100 +Subject: pci: mvebu: time out reset on link up + +If the port reports that the link is up while we are resetting, there's +little point in waiting for the full duration. + +Signed-off-by: Russell King +--- + drivers/pci/controller/pci-mvebu.c | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +--- a/drivers/pci/controller/pci-mvebu.c ++++ b/drivers/pci/controller/pci-mvebu.c +@@ -941,6 +941,7 @@ static int mvebu_pcie_powerup(struct mve + + if (port->reset_gpio) { + u32 reset_udelay = PCI_PM_D3COLD_WAIT * 1000; ++ unsigned int i; + + of_property_read_u32(port->dn, "reset-delay-us", + &reset_udelay); +@@ -948,7 +949,13 @@ static int mvebu_pcie_powerup(struct mve + udelay(100); + + gpiod_set_value_cansleep(port->reset_gpio, 0); +- msleep(reset_udelay / 1000); ++ for (i = 0; i < reset_udelay; i += 1000) { ++ if (mvebu_pcie_link_up(port)) ++ break; ++ msleep(1); ++ } ++ ++ printk("%s: reset completed in %dus\n", port->name, i); + } + + return 0; +@@ -1108,15 +1115,16 @@ static int mvebu_pcie_probe(struct platf + if (!child) + continue; + +- ret = mvebu_pcie_powerup(port); +- if (ret < 0) +- continue; +- + port->base = mvebu_pcie_map_registers(pdev, child, port); + if (IS_ERR(port->base)) { + dev_err(dev, "%s: cannot map registers\n", port->name); + port->base = NULL; +- mvebu_pcie_powerdown(port); ++ continue; ++ } ++ ++ ret = mvebu_pcie_powerup(port); ++ if (ret < 0) { ++ port->base = NULL; + continue; + } + diff --git a/target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch b/target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch new file mode 100644 index 0000000000..28b2b19499 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch @@ -0,0 +1,218 @@ +From aa4a0ccc41997f2da172165c92803abace43bd1c Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:32 +0000 +Subject: [PATCH 1/7] dt-bindings: Add IEI vendor prefix and IEI WT61P803 + PUZZLE driver bindings + +Add the IEI WT61P803 PUZZLE Device Tree bindings for MFD, HWMON and LED +drivers. A new vendor prefix is also added accordingly for +IEI Integration Corp. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + .../hwmon/iei,wt61p803-puzzle-hwmon.yaml | 53 ++++++++++++ + .../leds/iei,wt61p803-puzzle-leds.yaml | 39 +++++++++ + .../bindings/mfd/iei,wt61p803-puzzle.yaml | 82 +++++++++++++++++++ + .../devicetree/bindings/vendor-prefixes.yaml | 2 + + 4 files changed, 176 insertions(+) + create mode 100644 Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml + create mode 100644 Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml + create mode 100644 Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml + +--- /dev/null ++++ b/Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml +@@ -0,0 +1,53 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: IEI WT61P803 PUZZLE MCU HWMON module from IEI Integration Corp. ++ ++maintainers: ++ - Luka Kovacic ++ ++description: | ++ This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details ++ see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml. ++ ++ The HWMON module is a sub-node of the MCU node in the Device Tree. ++ ++properties: ++ compatible: ++ const: iei,wt61p803-puzzle-hwmon ++ ++ "#address-cells": ++ const: 1 ++ ++ "#size-cells": ++ const: 0 ++ ++patternProperties: ++ "^fan-group@[0-1]$": ++ type: object ++ properties: ++ reg: ++ minimum: 0 ++ maximum: 1 ++ description: ++ Fan group ID ++ ++ cooling-levels: ++ minItems: 1 ++ maxItems: 255 ++ description: ++ Cooling levels for the fans (PWM value mapping) ++ description: | ++ Properties for each fan group. ++ required: ++ - reg ++ ++required: ++ - compatible ++ - "#address-cells" ++ - "#size-cells" ++ ++additionalProperties: false +--- /dev/null ++++ b/Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml +@@ -0,0 +1,39 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/leds/iei,wt61p803-puzzle-leds.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: IEI WT61P803 PUZZLE MCU LED module from IEI Integration Corp. ++ ++maintainers: ++ - Luka Kovacic ++ ++description: | ++ This module is a part of the IEI WT61P803 PUZZLE MFD device. For more details ++ see Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml. ++ ++ The LED module is a sub-node of the MCU node in the Device Tree. ++ ++properties: ++ compatible: ++ const: iei,wt61p803-puzzle-leds ++ ++ "#address-cells": ++ const: 1 ++ ++ "#size-cells": ++ const: 0 ++ ++ led@0: ++ type: object ++ $ref: common.yaml ++ description: | ++ Properties for a single LED. ++ ++required: ++ - compatible ++ - "#address-cells" ++ - "#size-cells" ++ ++additionalProperties: false +--- /dev/null ++++ b/Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml +@@ -0,0 +1,82 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/mfd/iei,wt61p803-puzzle.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: IEI WT61P803 PUZZLE MCU from IEI Integration Corp. ++ ++maintainers: ++ - Luka Kovacic ++ ++description: | ++ IEI WT61P803 PUZZLE MCU is embedded in some IEI Puzzle series boards. ++ It's used for controlling system power states, fans, LEDs and temperature ++ sensors. ++ ++ For Device Tree bindings of other sub-modules (HWMON, LEDs) refer to the ++ binding documents under the respective subsystem directories. ++ ++properties: ++ compatible: ++ const: iei,wt61p803-puzzle ++ ++ current-speed: ++ description: ++ Serial bus speed in bps ++ maxItems: 1 ++ ++ enable-beep: true ++ ++ hwmon: ++ $ref: /schemas/hwmon/iei,wt61p803-puzzle-hwmon.yaml ++ ++ leds: ++ $ref: /schemas/leds/iei,wt61p803-puzzle-leds.yaml ++ ++required: ++ - compatible ++ - current-speed ++ ++additionalProperties: false ++ ++examples: ++ - | ++ #include ++ serial { ++ mcu { ++ compatible = "iei,wt61p803-puzzle"; ++ current-speed = <115200>; ++ enable-beep; ++ ++ leds { ++ compatible = "iei,wt61p803-puzzle-leds"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ led@0 { ++ reg = <0>; ++ function = LED_FUNCTION_POWER; ++ color = ; ++ }; ++ }; ++ ++ hwmon { ++ compatible = "iei,wt61p803-puzzle-hwmon"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ fan-group@0 { ++ #cooling-cells = <2>; ++ reg = <0x00>; ++ cooling-levels = <64 102 170 230 250>; ++ }; ++ ++ fan-group@1 { ++ #cooling-cells = <2>; ++ reg = <0x01>; ++ cooling-levels = <64 102 170 230 250>; ++ }; ++ }; ++ }; ++ }; +--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml ++++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml +@@ -475,6 +475,8 @@ patternProperties: + description: IC Plus Corp. + "^idt,.*": + description: Integrated Device Technologies, Inc. ++ "^iei,.*": ++ description: IEI Integration Corp. + "^ifi,.*": + description: Ingenieurburo Fur Ic-Technologie (I/F/I) + "^ilitek,.*": diff --git a/target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch b/target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch new file mode 100644 index 0000000000..01c2ecce0d --- /dev/null +++ b/target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch @@ -0,0 +1,1034 @@ +From 692cfa85272dd12995b427c0a7a585ced5d54f32 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:33 +0000 +Subject: [PATCH 2/7] drivers: mfd: Add a driver for IEI WT61P803 PUZZLE MCU + +Add a driver for the IEI WT61P803 PUZZLE microcontroller, used in some +IEI Puzzle series devices. The microcontroller controls system power, +temperature sensors, fans and LEDs. + +This driver implements the core functionality for device communication +over the system serial (serdev bus). It handles MCU messages and the +internal MCU properties. Some properties can be managed over sysfs. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + drivers/mfd/Kconfig | 8 + + drivers/mfd/Makefile | 1 + + drivers/mfd/iei-wt61p803-puzzle.c | 908 ++++++++++++++++++++++++ + include/linux/mfd/iei-wt61p803-puzzle.h | 66 ++ + 4 files changed, 983 insertions(+) + create mode 100644 drivers/mfd/iei-wt61p803-puzzle.c + create mode 100644 include/linux/mfd/iei-wt61p803-puzzle.h + +--- a/drivers/mfd/Kconfig ++++ b/drivers/mfd/Kconfig +@@ -2155,6 +2155,15 @@ config SGI_MFD_IOC3 + If you have an SGI Origin, Octane, or a PCI IOC3 card, + then say Y. Otherwise say N. + ++config MFD_IEI_WT61P803_PUZZLE ++ tristate "IEI WT61P803 PUZZLE MCU driver" ++ depends on SERIAL_DEV_BUS ++ select MFD_CORE ++ help ++ IEI WT61P803 PUZZLE is a system power management microcontroller ++ used for fan control, temperature sensor reading, LED control ++ and system identification. ++ + config MFD_INTEL_M10_BMC + tristate "Intel MAX 10 Board Management Controller" + depends on SPI_MASTER +--- a/drivers/mfd/Makefile ++++ b/drivers/mfd/Makefile +@@ -237,6 +237,7 @@ obj-$(CONFIG_MFD_HI655X_PMIC) += hi655 + obj-$(CONFIG_MFD_DLN2) += dln2.o + obj-$(CONFIG_MFD_RT5033) += rt5033.o + obj-$(CONFIG_MFD_SKY81452) += sky81452.o ++obj-$(CONFIG_MFD_IEI_WT61P803_PUZZLE) += iei-wt61p803-puzzle.o + + intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o + obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o +--- /dev/null ++++ b/drivers/mfd/iei-wt61p803-puzzle.c +@@ -0,0 +1,908 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* IEI WT61P803 PUZZLE MCU Driver ++ * System management microcontroller for fan control, temperature sensor reading, ++ * LED control and system identification on IEI Puzzle series ARM-based appliances. ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* start, payload and XOR checksum at end */ ++#define IEI_WT61P803_PUZZLE_MAX_COMMAND_LENGTH (1 + 20 + 1) ++#define IEI_WT61P803_PUZZLE_RESP_BUF_SIZE 512 ++ ++#define IEI_WT61P803_PUZZLE_MAC_LENGTH 17 ++#define IEI_WT61P803_PUZZLE_SN_LENGTH 36 ++#define IEI_WT61P803_PUZZLE_VERSION_LENGTH 6 ++#define IEI_WT61P803_PUZZLE_BUILD_INFO_LENGTH 16 ++#define IEI_WT61P803_PUZZLE_PROTOCOL_VERSION_LENGTH 8 ++#define IEI_WT61P803_PUZZLE_NB_MAC 8 ++ ++/* Use HZ as a timeout value throughout the driver */ ++#define IEI_WT61P803_PUZZLE_GENERAL_TIMEOUT HZ ++ ++enum iei_wt61p803_puzzle_attribute_type { ++ IEI_WT61P803_PUZZLE_VERSION, ++ IEI_WT61P803_PUZZLE_BUILD_INFO, ++ IEI_WT61P803_PUZZLE_BOOTLOADER_MODE, ++ IEI_WT61P803_PUZZLE_PROTOCOL_VERSION, ++ IEI_WT61P803_PUZZLE_SERIAL_NUMBER, ++ IEI_WT61P803_PUZZLE_MAC_ADDRESS, ++ IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS, ++ IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY, ++ IEI_WT61P803_PUZZLE_POWER_STATUS, ++}; ++ ++struct iei_wt61p803_puzzle_device_attribute { ++ struct device_attribute dev_attr; ++ enum iei_wt61p803_puzzle_attribute_type type; ++ u8 index; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_mcu_status - MCU flags state ++ * @ac_recovery_status_flag: AC Recovery Status Flag ++ * @power_loss_recovery: System recovery after power loss ++ * @power_status: System Power-on Method ++ */ ++struct iei_wt61p803_puzzle_mcu_status { ++ u8 ac_recovery_status_flag; ++ u8 power_loss_recovery; ++ u8 power_status; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_reply - MCU reply ++ * @size: Size of the MCU reply ++ * @data: Full MCU reply buffer ++ * @state: Current state of the packet ++ * @received: Was the response fullfilled ++ */ ++struct iei_wt61p803_puzzle_reply { ++ size_t size; ++ unsigned char data[IEI_WT61P803_PUZZLE_RESP_BUF_SIZE]; ++ struct completion received; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_mcu_version - MCU version status ++ * @version: Primary firmware version ++ * @build_info: Build date and time ++ * @bootloader_mode: Status of the MCU operation ++ * @protocol_version: MCU communication protocol version ++ * @serial_number: Device factory serial number ++ * @mac_address: Device factory MAC addresses ++ * ++ * Last element of arrays is reserved for '\0'. ++ */ ++struct iei_wt61p803_puzzle_mcu_version { ++ char version[IEI_WT61P803_PUZZLE_VERSION_LENGTH + 1]; ++ char build_info[IEI_WT61P803_PUZZLE_BUILD_INFO_LENGTH + 1]; ++ bool bootloader_mode; ++ char protocol_version[IEI_WT61P803_PUZZLE_PROTOCOL_VERSION_LENGTH + 1]; ++ char serial_number[IEI_WT61P803_PUZZLE_SN_LENGTH + 1]; ++ char mac_address[IEI_WT61P803_PUZZLE_NB_MAC][IEI_WT61P803_PUZZLE_MAC_LENGTH + 1]; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle - IEI WT61P803 PUZZLE MCU Driver ++ * @serdev: Pointer to underlying serdev device ++ * @dev: Pointer to underlying dev device ++ * @reply_lock: Reply mutex lock ++ * @reply: Pointer to the iei_wt61p803_puzzle_reply struct ++ * @version: MCU version related data ++ * @status: MCU status related data ++ * @response_buffer Command response buffer allocation ++ * @lock General member mutex lock ++ */ ++struct iei_wt61p803_puzzle { ++ struct serdev_device *serdev; ++ struct device *dev; ++ struct mutex reply_lock; /* lock to prevent multiple firmware calls */ ++ struct iei_wt61p803_puzzle_reply *reply; ++ struct iei_wt61p803_puzzle_mcu_version version; ++ struct iei_wt61p803_puzzle_mcu_status status; ++ unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ struct mutex lock; /* lock to protect response buffer */ ++}; ++ ++static unsigned char iei_wt61p803_puzzle_checksum(unsigned char *buf, size_t len) ++{ ++ unsigned char checksum = 0; ++ size_t i; ++ ++ for (i = 0; i < len; i++) ++ checksum ^= buf[i]; ++ return checksum; ++} ++ ++static int iei_wt61p803_puzzle_process_resp(struct iei_wt61p803_puzzle *mcu, ++ const unsigned char *raw_resp_data, size_t size) ++{ ++ unsigned char checksum; ++ ++ /* Check the incoming frame header */ ++ if (!(raw_resp_data[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START || ++ raw_resp_data[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER || ++ (raw_resp_data[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM && ++ raw_resp_data[1] == IEI_WT61P803_PUZZLE_CMD_EEPROM_READ))) { ++ if (mcu->reply->size + size >= sizeof(mcu->reply->data)) ++ return -EIO; ++ ++ /* Append the frame to existing data */ ++ memcpy(mcu->reply->data + mcu->reply->size, raw_resp_data, size); ++ mcu->reply->size += size; ++ } else { ++ if (size >= sizeof(mcu->reply->data)) ++ return -EIO; ++ ++ /* Start processing a new frame */ ++ memcpy(mcu->reply->data, raw_resp_data, size); ++ mcu->reply->size = size; ++ } ++ ++ checksum = iei_wt61p803_puzzle_checksum(mcu->reply->data, mcu->reply->size - 1); ++ if (checksum != mcu->reply->data[mcu->reply->size - 1]) { ++ /* The checksum isn't matched yet, wait for new frames */ ++ return size; ++ } ++ ++ /* Received all the data */ ++ complete(&mcu->reply->received); ++ ++ return size; ++} ++ ++static int iei_wt61p803_puzzle_recv_buf(struct serdev_device *serdev, ++ const unsigned char *data, size_t size) ++{ ++ struct iei_wt61p803_puzzle *mcu = serdev_device_get_drvdata(serdev); ++ int ret; ++ ++ ret = iei_wt61p803_puzzle_process_resp(mcu, data, size); ++ /* Return the number of processed bytes if function returns error, ++ * discard the remaining incoming data, since the frame this data ++ * belongs to is broken anyway ++ */ ++ if (ret < 0) ++ return size; ++ ++ return ret; ++} ++ ++static const struct serdev_device_ops iei_wt61p803_puzzle_serdev_device_ops = { ++ .receive_buf = iei_wt61p803_puzzle_recv_buf, ++ .write_wakeup = serdev_device_write_wakeup, ++}; ++ ++/** ++ * iei_wt61p803_puzzle_write_command_watchdog() - Watchdog of the normal cmd ++ * @mcu: Pointer to the iei_wt61p803_puzzle core MFD struct ++ * @cmd: Pointer to the char array to send (size should be content + 1 (xor)) ++ * @size: Size of the cmd char array ++ * @reply_data: Pointer to the reply/response data array (should be allocated) ++ * @reply_size: Pointer to size_t (size of reply_data) ++ * @retry_count: Number of times to retry sending the command to the MCU ++ */ ++int iei_wt61p803_puzzle_write_command_watchdog(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, ++ size_t *reply_size, int retry_count) ++{ ++ struct device *dev = &mcu->serdev->dev; ++ int ret, i; ++ ++ for (i = 0; i < retry_count; i++) { ++ ret = iei_wt61p803_puzzle_write_command(mcu, cmd, size, ++ reply_data, reply_size); ++ if (ret != -ETIMEDOUT) ++ return ret; ++ } ++ ++ dev_err(dev, "Command response timed out. Retries: %d\n", retry_count); ++ ++ return -ETIMEDOUT; ++} ++EXPORT_SYMBOL_GPL(iei_wt61p803_puzzle_write_command_watchdog); ++ ++/** ++ * iei_wt61p803_puzzle_write_command() - Send a structured command to the MCU ++ * @mcu: Pointer to the iei_wt61p803_puzzle core MFD struct ++ * @cmd: Pointer to the char array to send (size should be content + 1 (xor)) ++ * @size: Size of the cmd char array ++ * @reply_data: Pointer to the reply/response data array (should be allocated) ++ * ++ * Sends a structured command to the MCU. ++ */ ++int iei_wt61p803_puzzle_write_command(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, ++ size_t *reply_size) ++{ ++ struct device *dev = &mcu->serdev->dev; ++ int ret; ++ ++ if (size <= 1 || size > IEI_WT61P803_PUZZLE_MAX_COMMAND_LENGTH) ++ return -EINVAL; ++ ++ mutex_lock(&mcu->reply_lock); ++ ++ cmd[size - 1] = iei_wt61p803_puzzle_checksum(cmd, size - 1); ++ ++ /* Initialize reply struct */ ++ reinit_completion(&mcu->reply->received); ++ mcu->reply->size = 0; ++ usleep_range(2000, 10000); ++ serdev_device_write_flush(mcu->serdev); ++ ret = serdev_device_write_buf(mcu->serdev, cmd, size); ++ if (ret < 0) ++ goto exit; ++ ++ serdev_device_wait_until_sent(mcu->serdev, IEI_WT61P803_PUZZLE_GENERAL_TIMEOUT); ++ ret = wait_for_completion_timeout(&mcu->reply->received, ++ IEI_WT61P803_PUZZLE_GENERAL_TIMEOUT); ++ if (ret == 0) { ++ dev_err(dev, "Command reply receive timeout\n"); ++ ret = -ETIMEDOUT; ++ goto exit; ++ } ++ ++ *reply_size = mcu->reply->size; ++ /* Copy the received data, as it will not be available after a new frame is received */ ++ memcpy(reply_data, mcu->reply->data, mcu->reply->size); ++ ret = 0; ++exit: ++ mutex_unlock(&mcu->reply_lock); ++ return ret; ++} ++EXPORT_SYMBOL_GPL(iei_wt61p803_puzzle_write_command); ++ ++static int iei_wt61p803_puzzle_buzzer(struct iei_wt61p803_puzzle *mcu, bool long_beep) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char buzzer_cmd[4] = {}; ++ size_t reply_size; ++ int ret; ++ ++ buzzer_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ buzzer_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FUNCTION_SINGLE; ++ buzzer_cmd[2] = long_beep ? '3' : '2'; /* Buzzer 1.5 / 0.5 second beep */ ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, buzzer_cmd, sizeof(buzzer_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EPROTO; ++ goto exit; ++ } ++exit: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_version(struct iei_wt61p803_puzzle *mcu) ++{ ++ unsigned char version_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_VERSION, ++ }; ++ unsigned char build_info_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_BUILD, ++ }; ++ unsigned char bootloader_mode_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_BOOTLOADER_MODE, ++ }; ++ unsigned char protocol_version_cmd[3] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_OTHER_PROTOCOL_VERSION, ++ }; ++ unsigned char *rb = mcu->response_buffer; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, version_cmd, sizeof(version_cmd), ++ rb, &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 7) { ++ ret = -EIO; ++ goto err; ++ } ++ sprintf(mcu->version.version, "v%c.%.3s", rb[2], &rb[3]); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, build_info_cmd, ++ sizeof(build_info_cmd), rb, ++ &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 15) { ++ ret = -EIO; ++ goto err; ++ } ++ sprintf(mcu->version.build_info, "%c%c/%c%c/%.4s %c%c:%c%c", ++ rb[8], rb[9], rb[6], rb[7], &rb[2], rb[10], rb[11], ++ rb[12], rb[13]); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, bootloader_mode_cmd, ++ sizeof(bootloader_mode_cmd), rb, ++ &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 4) { ++ ret = -EIO; ++ goto err; ++ } ++ if (rb[2] == IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_APPS) ++ mcu->version.bootloader_mode = false; ++ else if (rb[2] == IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_BOOTLOADER) ++ mcu->version.bootloader_mode = true; ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, protocol_version_cmd, ++ sizeof(protocol_version_cmd), rb, ++ &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size < 9) { ++ ret = -EIO; ++ goto err; ++ } ++ sprintf(mcu->version.protocol_version, "v%c.%c%c%c%c%c", ++ rb[7], rb[6], rb[5], rb[4], rb[3], rb[2]); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_mcu_status(struct iei_wt61p803_puzzle *mcu) ++{ ++ unsigned char mcu_status_cmd[5] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START, ++ IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER, ++ IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS, ++ IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS, ++ }; ++ unsigned char *resp_buf = mcu->response_buffer; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, mcu_status_cmd, sizeof(mcu_status_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto exit; ++ if (reply_size < 20) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ /* Response format: ++ * (IDX RESPONSE) ++ * 0 @ ++ * 1 O ++ * 2 S ++ * 3 S ++ * ... ++ * 5 AC Recovery Status Flag ++ * ... ++ * 10 Power Loss Recovery ++ * ... ++ * 19 Power Status (system power on method) ++ * 20 XOR checksum ++ */ ++ if (resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS && ++ resp_buf[3] == IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS) { ++ mcu->status.ac_recovery_status_flag = resp_buf[5]; ++ mcu->status.power_loss_recovery = resp_buf[10]; ++ mcu->status.power_status = resp_buf[19]; ++ } ++exit: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_serial_number(struct iei_wt61p803_puzzle *mcu) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char serial_number_cmd[5] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_READ, ++ 0x00, /* EEPROM read address */ ++ 0x24, /* Data length */ ++ }; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, serial_number_cmd, ++ sizeof(serial_number_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ ++ if (reply_size < IEI_WT61P803_PUZZLE_SN_LENGTH + 4) { ++ ret = -EIO; ++ goto err; ++ } ++ ++ sprintf(mcu->version.serial_number, "%.*s", ++ IEI_WT61P803_PUZZLE_SN_LENGTH, resp_buf + 4); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_write_serial_number(struct iei_wt61p803_puzzle *mcu, ++ unsigned char serial_number[36]) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char serial_number_header[4] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_WRITE, ++ 0x00, /* EEPROM write address */ ++ 0xC, /* Data length */ ++ }; ++ unsigned char serial_number_cmd[4 + 12 + 1]; /* header, serial number, XOR checksum */ ++ int ret, sn_counter; ++ size_t reply_size; ++ ++ /* The MCU can only handle 22 byte messages, send the S/N in 12 byte chunks */ ++ mutex_lock(&mcu->lock); ++ for (sn_counter = 0; sn_counter < 3; sn_counter++) { ++ serial_number_header[2] = 0x0 + 0xC * sn_counter; ++ ++ memcpy(serial_number_cmd, serial_number_header, sizeof(serial_number_header)); ++ memcpy(serial_number_cmd + sizeof(serial_number_header), ++ serial_number + 0xC * sn_counter, 0xC); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, serial_number_cmd, ++ sizeof(serial_number_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto err; ++ } ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EPROTO; ++ goto err; ++ } ++ } ++ ++ sprintf(mcu->version.serial_number, "%.*s", ++ IEI_WT61P803_PUZZLE_SN_LENGTH, serial_number); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_get_mac_address(struct iei_wt61p803_puzzle *mcu, int index) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char mac_address_cmd[5] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_READ, ++ 0x00, /* EEPROM read address */ ++ 0x11, /* Data length */ ++ }; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu->lock); ++ mac_address_cmd[2] = 0x24 + 0x11 * index; ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu, mac_address_cmd, ++ sizeof(mac_address_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ ++ if (reply_size < 22) { ++ ret = -EIO; ++ goto err; ++ } ++ ++ sprintf(mcu->version.mac_address[index], "%.*s", ++ IEI_WT61P803_PUZZLE_MAC_LENGTH, resp_buf + 4); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int ++iei_wt61p803_puzzle_write_mac_address(struct iei_wt61p803_puzzle *mcu, ++ unsigned char mac_address[IEI_WT61P803_PUZZLE_MAC_LENGTH], ++ int mac_address_idx) ++{ ++ unsigned char mac_address_cmd[4 + IEI_WT61P803_PUZZLE_MAC_LENGTH + 1]; ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char mac_address_header[4] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM, ++ IEI_WT61P803_PUZZLE_CMD_EEPROM_WRITE, ++ 0x00, /* EEPROM write address */ ++ 0x11, /* Data length */ ++ }; ++ size_t reply_size; ++ int ret; ++ ++ if (mac_address_idx < 0 || mac_address_idx >= IEI_WT61P803_PUZZLE_NB_MAC) ++ return -EINVAL; ++ ++ mac_address_header[2] = 0x24 + 0x11 * mac_address_idx; ++ ++ /* Concat mac_address_header, mac_address to mac_address_cmd */ ++ memcpy(mac_address_cmd, mac_address_header, sizeof(mac_address_header)); ++ memcpy(mac_address_cmd + sizeof(mac_address_header), mac_address, ++ IEI_WT61P803_PUZZLE_MAC_LENGTH); ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, mac_address_cmd, ++ sizeof(mac_address_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto err; ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto err; ++ } ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EPROTO; ++ goto err; ++ } ++ ++ sprintf(mcu->version.mac_address[mac_address_idx], "%.*s", ++ IEI_WT61P803_PUZZLE_MAC_LENGTH, mac_address); ++err: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_write_power_loss_recovery(struct iei_wt61p803_puzzle *mcu, ++ int power_loss_recovery_action) ++{ ++ unsigned char *resp_buf = mcu->response_buffer; ++ unsigned char power_loss_recovery_cmd[5] = {}; ++ size_t reply_size; ++ int ret; ++ ++ if (power_loss_recovery_action < 0 || power_loss_recovery_action > 4) ++ return -EINVAL; ++ ++ power_loss_recovery_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ power_loss_recovery_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER; ++ power_loss_recovery_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_POWER_LOSS; ++ power_loss_recovery_cmd[3] = hex_asc[power_loss_recovery_action]; ++ ++ mutex_lock(&mcu->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu, power_loss_recovery_cmd, ++ sizeof(power_loss_recovery_cmd), ++ resp_buf, &reply_size); ++ if (ret) ++ goto exit; ++ mcu->status.power_loss_recovery = power_loss_recovery_action; ++exit: ++ mutex_unlock(&mcu->lock); ++ return ret; ++} ++ ++#define to_puzzle_dev_attr(_attr) \ ++ container_of(_attr, struct iei_wt61p803_puzzle_device_attribute, dev_attr) ++ ++static ssize_t show_output(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev); ++ struct iei_wt61p803_puzzle_device_attribute *pattr = to_puzzle_dev_attr(attr); ++ int ret; ++ ++ switch (pattr->type) { ++ case IEI_WT61P803_PUZZLE_VERSION: ++ return scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.version); ++ case IEI_WT61P803_PUZZLE_BUILD_INFO: ++ return scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.build_info); ++ case IEI_WT61P803_PUZZLE_BOOTLOADER_MODE: ++ return scnprintf(buf, PAGE_SIZE, "%d\n", mcu->version.bootloader_mode); ++ case IEI_WT61P803_PUZZLE_PROTOCOL_VERSION: ++ return scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.protocol_version); ++ case IEI_WT61P803_PUZZLE_SERIAL_NUMBER: ++ ret = iei_wt61p803_puzzle_get_serial_number(mcu); ++ if (!ret) ++ ret = scnprintf(buf, PAGE_SIZE, "%s\n", mcu->version.serial_number); ++ else ++ ret = 0; ++ return ret; ++ case IEI_WT61P803_PUZZLE_MAC_ADDRESS: ++ ret = iei_wt61p803_puzzle_get_mac_address(mcu, pattr->index); ++ if (!ret) ++ ret = scnprintf(buf, PAGE_SIZE, "%s\n", ++ mcu->version.mac_address[pattr->index]); ++ else ++ ret = 0; ++ return ret; ++ case IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS: ++ case IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY: ++ case IEI_WT61P803_PUZZLE_POWER_STATUS: ++ ret = iei_wt61p803_puzzle_get_mcu_status(mcu); ++ if (ret) ++ return ret; ++ ++ mutex_lock(&mcu->lock); ++ switch (pattr->type) { ++ case IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS: ++ ret = scnprintf(buf, PAGE_SIZE, "%x\n", ++ mcu->status.ac_recovery_status_flag); ++ break; ++ case IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY: ++ ret = scnprintf(buf, PAGE_SIZE, "%x\n", mcu->status.power_loss_recovery); ++ break; ++ case IEI_WT61P803_PUZZLE_POWER_STATUS: ++ ret = scnprintf(buf, PAGE_SIZE, "%x\n", mcu->status.power_status); ++ break; ++ default: ++ ret = 0; ++ break; ++ } ++ mutex_unlock(&mcu->lock); ++ return ret; ++ default: ++ return 0; ++ } ++ ++ return 0; ++} ++ ++static ssize_t store_output(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t len) ++{ ++ unsigned char serial_number[IEI_WT61P803_PUZZLE_SN_LENGTH]; ++ unsigned char mac_address[IEI_WT61P803_PUZZLE_MAC_LENGTH]; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev); ++ struct iei_wt61p803_puzzle_device_attribute *pattr = to_puzzle_dev_attr(attr); ++ int power_loss_recovery_action = 0; ++ int ret; ++ ++ switch (pattr->type) { ++ case IEI_WT61P803_PUZZLE_SERIAL_NUMBER: ++ if (len != (size_t)(IEI_WT61P803_PUZZLE_SN_LENGTH + 1)) ++ return -EINVAL; ++ memcpy(serial_number, buf, sizeof(serial_number)); ++ ret = iei_wt61p803_puzzle_write_serial_number(mcu, serial_number); ++ if (ret) ++ return ret; ++ return len; ++ case IEI_WT61P803_PUZZLE_MAC_ADDRESS: ++ if (len != (size_t)(IEI_WT61P803_PUZZLE_MAC_LENGTH + 1)) ++ return -EINVAL; ++ ++ memcpy(mac_address, buf, sizeof(mac_address)); ++ ++ if (strlen(attr->attr.name) != 13) ++ return -EIO; ++ ++ ret = iei_wt61p803_puzzle_write_mac_address(mcu, mac_address, pattr->index); ++ if (ret) ++ return ret; ++ return len; ++ case IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY: ++ ret = kstrtoint(buf, 10, &power_loss_recovery_action); ++ if (ret) ++ return ret; ++ ret = iei_wt61p803_puzzle_write_power_loss_recovery(mcu, ++ power_loss_recovery_action); ++ if (ret) ++ return ret; ++ return len; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++#define IEI_WT61P803_PUZZLE_ATTR(_name, _mode, _show, _store, _type, _index) \ ++ struct iei_wt61p803_puzzle_device_attribute dev_attr_##_name = \ ++ { .dev_attr = __ATTR(_name, _mode, _show, _store), \ ++ .type = _type, \ ++ .index = _index } ++ ++#define IEI_WT61P803_PUZZLE_ATTR_RO(_name, _type, _id) \ ++ IEI_WT61P803_PUZZLE_ATTR(_name, 0444, show_output, NULL, _type, _id) ++ ++#define IEI_WT61P803_PUZZLE_ATTR_RW(_name, _type, _id) \ ++ IEI_WT61P803_PUZZLE_ATTR(_name, 0644, show_output, store_output, _type, _id) ++ ++static IEI_WT61P803_PUZZLE_ATTR_RO(version, IEI_WT61P803_PUZZLE_VERSION, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(build_info, IEI_WT61P803_PUZZLE_BUILD_INFO, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(bootloader_mode, IEI_WT61P803_PUZZLE_BOOTLOADER_MODE, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(protocol_version, IEI_WT61P803_PUZZLE_PROTOCOL_VERSION, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(serial_number, IEI_WT61P803_PUZZLE_SERIAL_NUMBER, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_0, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_1, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 1); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_2, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 2); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_3, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 3); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_4, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 4); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_5, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 5); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_6, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 6); ++static IEI_WT61P803_PUZZLE_ATTR_RW(mac_address_7, IEI_WT61P803_PUZZLE_MAC_ADDRESS, 7); ++static IEI_WT61P803_PUZZLE_ATTR_RO(ac_recovery_status, IEI_WT61P803_PUZZLE_AC_RECOVERY_STATUS, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RW(power_loss_recovery, IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY, 0); ++static IEI_WT61P803_PUZZLE_ATTR_RO(power_status, IEI_WT61P803_PUZZLE_POWER_STATUS, 0); ++ ++static struct attribute *iei_wt61p803_puzzle_attrs[] = { ++ &dev_attr_version.dev_attr.attr, ++ &dev_attr_build_info.dev_attr.attr, ++ &dev_attr_bootloader_mode.dev_attr.attr, ++ &dev_attr_protocol_version.dev_attr.attr, ++ &dev_attr_serial_number.dev_attr.attr, ++ &dev_attr_mac_address_0.dev_attr.attr, ++ &dev_attr_mac_address_1.dev_attr.attr, ++ &dev_attr_mac_address_2.dev_attr.attr, ++ &dev_attr_mac_address_3.dev_attr.attr, ++ &dev_attr_mac_address_4.dev_attr.attr, ++ &dev_attr_mac_address_5.dev_attr.attr, ++ &dev_attr_mac_address_6.dev_attr.attr, ++ &dev_attr_mac_address_7.dev_attr.attr, ++ &dev_attr_ac_recovery_status.dev_attr.attr, ++ &dev_attr_power_loss_recovery.dev_attr.attr, ++ &dev_attr_power_status.dev_attr.attr, ++ NULL ++}; ++ATTRIBUTE_GROUPS(iei_wt61p803_puzzle); ++ ++static int iei_wt61p803_puzzle_sysfs_create(struct device *dev, ++ struct iei_wt61p803_puzzle *mcu) ++{ ++ int ret; ++ ++ ret = sysfs_create_groups(&mcu->dev->kobj, iei_wt61p803_puzzle_groups); ++ if (ret) ++ mfd_remove_devices(mcu->dev); ++ ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_sysfs_remove(struct device *dev, ++ struct iei_wt61p803_puzzle *mcu) ++{ ++ /* Remove sysfs groups */ ++ sysfs_remove_groups(&mcu->dev->kobj, iei_wt61p803_puzzle_groups); ++ mfd_remove_devices(mcu->dev); ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_probe(struct serdev_device *serdev) ++{ ++ struct device *dev = &serdev->dev; ++ struct iei_wt61p803_puzzle *mcu; ++ u32 baud; ++ int ret; ++ ++ /* Read the baud rate from 'current-speed', because the MCU supports different rates */ ++ if (device_property_read_u32(dev, "current-speed", &baud)) { ++ dev_err(dev, ++ "'current-speed' is not specified in device node\n"); ++ return -EINVAL; ++ } ++ dev_dbg(dev, "Driver baud rate: %d\n", baud); ++ ++ /* Allocate the memory */ ++ mcu = devm_kzalloc(dev, sizeof(*mcu), GFP_KERNEL); ++ if (!mcu) ++ return -ENOMEM; ++ ++ mcu->reply = devm_kzalloc(dev, sizeof(*mcu->reply), GFP_KERNEL); ++ if (!mcu->reply) ++ return -ENOMEM; ++ ++ /* Initialize device struct data */ ++ mcu->serdev = serdev; ++ mcu->dev = dev; ++ init_completion(&mcu->reply->received); ++ mutex_init(&mcu->reply_lock); ++ mutex_init(&mcu->lock); ++ ++ /* Setup UART interface */ ++ serdev_device_set_drvdata(serdev, mcu); ++ serdev_device_set_client_ops(serdev, &iei_wt61p803_puzzle_serdev_device_ops); ++ ret = devm_serdev_device_open(dev, serdev); ++ if (ret) ++ return ret; ++ serdev_device_set_baudrate(serdev, baud); ++ serdev_device_set_flow_control(serdev, false); ++ ret = serdev_device_set_parity(serdev, SERDEV_PARITY_NONE); ++ if (ret) { ++ dev_err(dev, "Failed to set parity\n"); ++ return ret; ++ } ++ ++ ret = iei_wt61p803_puzzle_get_version(mcu); ++ if (ret) ++ return ret; ++ ++ dev_dbg(dev, "MCU version: %s\n", mcu->version.version); ++ dev_dbg(dev, "MCU firmware build info: %s\n", mcu->version.build_info); ++ dev_dbg(dev, "MCU in bootloader mode: %s\n", ++ mcu->version.bootloader_mode ? "true" : "false"); ++ dev_dbg(dev, "MCU protocol version: %s\n", mcu->version.protocol_version); ++ ++ if (device_property_read_bool(dev, "enable-beep")) { ++ ret = iei_wt61p803_puzzle_buzzer(mcu, false); ++ if (ret) ++ return ret; ++ } ++ ++ ret = iei_wt61p803_puzzle_sysfs_create(dev, mcu); ++ if (ret) ++ return ret; ++ ++ return devm_of_platform_populate(dev); ++} ++ ++static void iei_wt61p803_puzzle_remove(struct serdev_device *serdev) ++{ ++ struct device *dev = &serdev->dev; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev); ++ ++ iei_wt61p803_puzzle_sysfs_remove(dev, mcu); ++} ++ ++static const struct of_device_id iei_wt61p803_puzzle_dt_ids[] = { ++ { .compatible = "iei,wt61p803-puzzle" }, ++ { } ++}; ++ ++MODULE_DEVICE_TABLE(of, iei_wt61p803_puzzle_dt_ids); ++ ++static struct serdev_device_driver iei_wt61p803_puzzle_drv = { ++ .probe = iei_wt61p803_puzzle_probe, ++ .remove = iei_wt61p803_puzzle_remove, ++ .driver = { ++ .name = "iei-wt61p803-puzzle", ++ .of_match_table = iei_wt61p803_puzzle_dt_ids, ++ }, ++}; ++ ++module_serdev_device_driver(iei_wt61p803_puzzle_drv); ++ ++MODULE_LICENSE("GPL v2"); ++MODULE_AUTHOR("Luka Kovacic "); ++MODULE_DESCRIPTION("IEI WT61P803 PUZZLE MCU Driver"); +--- /dev/null ++++ b/include/linux/mfd/iei-wt61p803-puzzle.h +@@ -0,0 +1,66 @@ ++/* SPDX-License-Identifier: GPL-2.0-only */ ++/* IEI WT61P803 PUZZLE MCU Driver ++ * System management microcontroller for fan control, temperature sensor reading, ++ * LED control and system identification on IEI Puzzle series ARM-based appliances. ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#ifndef _MFD_IEI_WT61P803_PUZZLE_H_ ++#define _MFD_IEI_WT61P803_PUZZLE_H_ ++ ++#define IEI_WT61P803_PUZZLE_BUF_SIZE 512 ++ ++/* Command magic numbers */ ++#define IEI_WT61P803_PUZZLE_CMD_HEADER_START 0x40 /* @ */ ++#define IEI_WT61P803_PUZZLE_CMD_HEADER_START_OTHER 0x25 /* % */ ++#define IEI_WT61P803_PUZZLE_CMD_HEADER_EEPROM 0xF7 ++ ++#define IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK 0x30 /* 0 */ ++#define IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK 0x70 ++ ++#define IEI_WT61P803_PUZZLE_CMD_EEPROM_READ 0xA1 ++#define IEI_WT61P803_PUZZLE_CMD_EEPROM_WRITE 0xA0 ++ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_VERSION 0x56 /* V */ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_BUILD 0x42 /* B */ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_BOOTLOADER_MODE 0x4D /* M */ ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_BOOTLOADER 0x30 ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_MODE_APPS 0x31 ++#define IEI_WT61P803_PUZZLE_CMD_OTHER_PROTOCOL_VERSION 0x50 /* P */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_SINGLE 0x43 /* C */ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER 0x4F /* O */ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_STATUS 0x53 /* S */ ++#define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_POWER_LOSS 0x41 /* A */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_LED 0x52 /* R */ ++#define IEI_WT61P803_PUZZLE_CMD_LED_POWER 0x31 /* 1 */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_TEMP 0x54 /* T */ ++#define IEI_WT61P803_PUZZLE_CMD_TEMP_ALL 0x41 /* A */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_FAN 0x46 /* F */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM_READ 0x5A /* Z */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM_WRITE 0x57 /* W */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM_BASE 0x30 ++#define IEI_WT61P803_PUZZLE_CMD_FAN_RPM_BASE 0x41 /* A */ ++ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_PWM(x) (IEI_WT61P803_PUZZLE_CMD_FAN_PWM_BASE + (x)) /* 0 - 1 */ ++#define IEI_WT61P803_PUZZLE_CMD_FAN_RPM(x) (IEI_WT61P803_PUZZLE_CMD_FAN_RPM_BASE + (x)) /* 0 - 5 */ ++ ++struct iei_wt61p803_puzzle_mcu_version; ++struct iei_wt61p803_puzzle_reply; ++struct iei_wt61p803_puzzle; ++ ++int iei_wt61p803_puzzle_write_command_watchdog(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, size_t *reply_size, ++ int retry_count); ++ ++int iei_wt61p803_puzzle_write_command(struct iei_wt61p803_puzzle *mcu, ++ unsigned char *cmd, size_t size, ++ unsigned char *reply_data, size_t *reply_size); ++ ++#endif /* _MFD_IEI_WT61P803_PUZZLE_H_ */ diff --git a/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch b/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch new file mode 100644 index 0000000000..684f09c800 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch @@ -0,0 +1,469 @@ +From e3310a638cd310bfd93dbbc6d2732ab6aea18dd2 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:34 +0000 +Subject: [PATCH 3/7] drivers: hwmon: Add the IEI WT61P803 PUZZLE HWMON driver + +Add the IEI WT61P803 PUZZLE HWMON driver, that handles the fan speed +control via PWM, reading fan speed and reading on-board temperature +sensors. + +The driver registers a HWMON device and a simple thermal cooling device to +enable in-kernel fan management. + +This driver depends on the IEI WT61P803 PUZZLE MFD driver. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Acked-by: Guenter Roeck +Cc: Luka Perkov +Cc: Robert Marko +--- + drivers/hwmon/Kconfig | 8 + + drivers/hwmon/Makefile | 1 + + drivers/hwmon/iei-wt61p803-puzzle-hwmon.c | 413 ++++++++++++++++++++++ + 3 files changed, 422 insertions(+) + create mode 100644 drivers/hwmon/iei-wt61p803-puzzle-hwmon.c + +--- a/drivers/hwmon/Kconfig ++++ b/drivers/hwmon/Kconfig +@@ -722,6 +722,14 @@ config SENSORS_IBMPOWERNV + This driver can also be built as a module. If so, the module + will be called ibmpowernv. + ++config SENSORS_IEI_WT61P803_PUZZLE_HWMON ++ tristate "IEI WT61P803 PUZZLE MFD HWMON Driver" ++ depends on MFD_IEI_WT61P803_PUZZLE ++ help ++ The IEI WT61P803 PUZZLE MFD HWMON Driver handles reading fan speed ++ and writing fan PWM values. It also supports reading on-board ++ temperature sensors. ++ + config SENSORS_IIO_HWMON + tristate "Hwmon driver that uses channels specified via iio maps" + depends on IIO +--- a/drivers/hwmon/Makefile ++++ b/drivers/hwmon/Makefile +@@ -83,6 +83,7 @@ obj-$(CONFIG_SENSORS_HIH6130) += hih6130 + obj-$(CONFIG_SENSORS_ULTRA45) += ultra45_env.o + obj-$(CONFIG_SENSORS_I5500) += i5500_temp.o + obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o ++obj-$(CONFIG_SENSORS_IEI_WT61P803_PUZZLE_HWMON) += iei-wt61p803-puzzle-hwmon.o + obj-$(CONFIG_SENSORS_IBMAEM) += ibmaem.o + obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o + obj-$(CONFIG_SENSORS_IBMPOWERNV)+= ibmpowernv.o +--- /dev/null ++++ b/drivers/hwmon/iei-wt61p803-puzzle-hwmon.c +@@ -0,0 +1,413 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* IEI WT61P803 PUZZLE MCU HWMON Driver ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define IEI_WT61P803_PUZZLE_HWMON_MAX_PWM 2 ++#define IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL 255 ++ ++/** ++ * struct iei_wt61p803_puzzle_thermal_cooling_device - Thermal cooling device instance ++ * @mcu_hwmon: Parent driver struct pointer ++ * @tcdev: Thermal cooling device pointer ++ * @name: Thermal cooling device name ++ * @pwm_channel: Controlled PWM channel (0 or 1) ++ * @cooling_levels: Thermal cooling device cooling levels (DT) ++ */ ++struct iei_wt61p803_puzzle_thermal_cooling_device { ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon; ++ struct thermal_cooling_device *tcdev; ++ char name[THERMAL_NAME_LENGTH]; ++ int pwm_channel; ++ u8 *cooling_levels; ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_hwmon - MCU HWMON Driver ++ * @mcu: MCU struct pointer ++ * @response_buffer Global MCU response buffer ++ * @thermal_cooling_dev_present: Per-channel thermal cooling device control indicator ++ * @cdev: Per-channel thermal cooling device private structure ++ */ ++struct iei_wt61p803_puzzle_hwmon { ++ struct iei_wt61p803_puzzle *mcu; ++ unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ bool thermal_cooling_dev_present[IEI_WT61P803_PUZZLE_HWMON_MAX_PWM]; ++ struct iei_wt61p803_puzzle_thermal_cooling_device ++ *cdev[IEI_WT61P803_PUZZLE_HWMON_MAX_PWM]; ++ struct mutex lock; /* mutex to protect response_buffer array */ ++}; ++ ++#define raw_temp_to_milidegree_celsius(x) (((x) - 0x80) * 1000) ++static int iei_wt61p803_puzzle_read_temp_sensor(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long *value) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char temp_sensor_ntc_cmd[4] = { ++ IEI_WT61P803_PUZZLE_CMD_HEADER_START, ++ IEI_WT61P803_PUZZLE_CMD_TEMP, ++ IEI_WT61P803_PUZZLE_CMD_TEMP_ALL, ++ }; ++ size_t reply_size; ++ int ret; ++ ++ mutex_lock(&mcu_hwmon->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, temp_sensor_ntc_cmd, ++ sizeof(temp_sensor_ntc_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 7) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ /* Check the number of NTC values */ ++ if (resp_buf[3] != '2') { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ *value = raw_temp_to_milidegree_celsius(resp_buf[4 + channel]); ++exit: ++ mutex_unlock(&mcu_hwmon->lock); ++ return ret; ++} ++ ++#define raw_fan_val_to_rpm(x, y) ((((x) << 8 | (y)) / 2) * 60) ++static int iei_wt61p803_puzzle_read_fan_speed(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long *value) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char fan_speed_cmd[4] = {}; ++ size_t reply_size; ++ int ret; ++ ++ fan_speed_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ fan_speed_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FAN; ++ fan_speed_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FAN_RPM(channel); ++ ++ mutex_lock(&mcu_hwmon->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, fan_speed_cmd, ++ sizeof(fan_speed_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 7) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ *value = raw_fan_val_to_rpm(resp_buf[3], resp_buf[4]); ++exit: ++ mutex_unlock(&mcu_hwmon->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_write_pwm_channel(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long pwm_set_val) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char pwm_set_cmd[6] = {}; ++ size_t reply_size; ++ int ret; ++ ++ pwm_set_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ pwm_set_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FAN; ++ pwm_set_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM_WRITE; ++ pwm_set_cmd[3] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM(channel); ++ pwm_set_cmd[4] = pwm_set_val; ++ ++ mutex_lock(&mcu_hwmon->lock); ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, pwm_set_cmd, ++ sizeof(pwm_set_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ goto exit; ++ ++ if (reply_size != 3) { ++ ret = -EIO; ++ goto exit; ++ } ++ ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) { ++ ret = -EIO; ++ goto exit; ++ } ++exit: ++ mutex_unlock(&mcu_hwmon->lock); ++ return ret; ++} ++ ++static int iei_wt61p803_puzzle_read_pwm_channel(struct iei_wt61p803_puzzle_hwmon *mcu_hwmon, ++ int channel, long *value) ++{ ++ unsigned char *resp_buf = mcu_hwmon->response_buffer; ++ unsigned char pwm_get_cmd[5] = {}; ++ size_t reply_size; ++ int ret; ++ ++ pwm_get_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ pwm_get_cmd[1] = IEI_WT61P803_PUZZLE_CMD_FAN; ++ pwm_get_cmd[2] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM_READ; ++ pwm_get_cmd[3] = IEI_WT61P803_PUZZLE_CMD_FAN_PWM(channel); ++ ++ ret = iei_wt61p803_puzzle_write_command(mcu_hwmon->mcu, pwm_get_cmd, ++ sizeof(pwm_get_cmd), resp_buf, ++ &reply_size); ++ if (ret) ++ return ret; ++ ++ if (reply_size != 5) ++ return -EIO; ++ ++ if (resp_buf[2] != IEI_WT61P803_PUZZLE_CMD_FAN_PWM_READ) ++ return -EIO; ++ ++ *value = resp_buf[3]; ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_read(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long *val) ++{ ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = dev_get_drvdata(dev->parent); ++ ++ switch (type) { ++ case hwmon_pwm: ++ return iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, channel, val); ++ case hwmon_fan: ++ return iei_wt61p803_puzzle_read_fan_speed(mcu_hwmon, channel, val); ++ case hwmon_temp: ++ return iei_wt61p803_puzzle_read_temp_sensor(mcu_hwmon, channel, val); ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int iei_wt61p803_puzzle_write(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long val) ++{ ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = dev_get_drvdata(dev->parent); ++ ++ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, channel, val); ++} ++ ++static umode_t iei_wt61p803_puzzle_is_visible(const void *data, enum hwmon_sensor_types type, ++ u32 attr, int channel) ++{ ++ const struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = data; ++ ++ switch (type) { ++ case hwmon_pwm: ++ if (mcu_hwmon->thermal_cooling_dev_present[channel]) ++ return 0444; ++ if (attr == hwmon_pwm_input) ++ return 0644; ++ break; ++ case hwmon_fan: ++ if (attr == hwmon_fan_input) ++ return 0444; ++ break; ++ case hwmon_temp: ++ if (attr == hwmon_temp_input) ++ return 0444; ++ break; ++ default: ++ return 0; ++ } ++ ++ return 0; ++} ++ ++static const struct hwmon_ops iei_wt61p803_puzzle_hwmon_ops = { ++ .is_visible = iei_wt61p803_puzzle_is_visible, ++ .read = iei_wt61p803_puzzle_read, ++ .write = iei_wt61p803_puzzle_write, ++}; ++ ++static const struct hwmon_channel_info *iei_wt61p803_puzzle_info[] = { ++ HWMON_CHANNEL_INFO(pwm, ++ HWMON_PWM_INPUT, ++ HWMON_PWM_INPUT), ++ HWMON_CHANNEL_INFO(fan, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT, ++ HWMON_F_INPUT), ++ HWMON_CHANNEL_INFO(temp, ++ HWMON_T_INPUT, ++ HWMON_T_INPUT), ++ NULL ++}; ++ ++static const struct hwmon_chip_info iei_wt61p803_puzzle_chip_info = { ++ .ops = &iei_wt61p803_puzzle_hwmon_ops, ++ .info = iei_wt61p803_puzzle_info, ++}; ++ ++static int iei_wt61p803_puzzle_get_max_state(struct thermal_cooling_device *tcdev, ++ unsigned long *state) ++{ ++ *state = IEI_WT61P803_PUZZLE_HWMON_MAX_PWM_VAL; ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_get_cur_state(struct thermal_cooling_device *tcdev, ++ unsigned long *state) ++{ ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; ++ long value; ++ int ret; ++ ++ ret = iei_wt61p803_puzzle_read_pwm_channel(mcu_hwmon, cdev->pwm_channel, &value); ++ if (ret) ++ return ret; ++ *state = value; ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_set_cur_state(struct thermal_cooling_device *tcdev, ++ unsigned long state) ++{ ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev = tcdev->devdata; ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon = cdev->mcu_hwmon; ++ ++ return iei_wt61p803_puzzle_write_pwm_channel(mcu_hwmon, cdev->pwm_channel, state); ++} ++ ++static const struct thermal_cooling_device_ops iei_wt61p803_puzzle_cooling_ops = { ++ .get_max_state = iei_wt61p803_puzzle_get_max_state, ++ .get_cur_state = iei_wt61p803_puzzle_get_cur_state, ++ .set_cur_state = iei_wt61p803_puzzle_set_cur_state, ++}; ++ ++static int ++iei_wt61p803_puzzle_enable_thermal_cooling_dev(struct device *dev, ++ struct fwnode_handle *child, ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon) ++{ ++ struct iei_wt61p803_puzzle_thermal_cooling_device *cdev; ++ u32 pwm_channel; ++ u8 num_levels; ++ int ret; ++ ++ ret = fwnode_property_read_u32(child, "reg", &pwm_channel); ++ if (ret) ++ return ret; ++ ++ mcu_hwmon->thermal_cooling_dev_present[pwm_channel] = true; ++ ++ num_levels = fwnode_property_count_u8(child, "cooling-levels"); ++ if (!num_levels) ++ return -EINVAL; ++ ++ cdev = devm_kzalloc(dev, sizeof(*cdev), GFP_KERNEL); ++ if (!cdev) ++ return -ENOMEM; ++ ++ cdev->cooling_levels = devm_kmalloc_array(dev, num_levels, sizeof(u8), GFP_KERNEL); ++ if (!cdev->cooling_levels) ++ return -ENOMEM; ++ ++ ret = fwnode_property_read_u8_array(child, "cooling-levels", ++ cdev->cooling_levels, ++ num_levels); ++ if (ret) { ++ dev_err(dev, "Couldn't read property 'cooling-levels'\n"); ++ return ret; ++ } ++ ++ snprintf(cdev->name, THERMAL_NAME_LENGTH, "wt61p803_puzzle_%d", pwm_channel); ++ cdev->tcdev = devm_thermal_of_cooling_device_register(dev, NULL, cdev->name, cdev, ++ &iei_wt61p803_puzzle_cooling_ops); ++ if (IS_ERR(cdev->tcdev)) ++ return PTR_ERR(cdev->tcdev); ++ ++ cdev->mcu_hwmon = mcu_hwmon; ++ cdev->pwm_channel = pwm_channel; ++ mcu_hwmon->cdev[pwm_channel] = cdev; ++ ++ return 0; ++} ++ ++static int iei_wt61p803_puzzle_hwmon_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev->parent); ++ struct iei_wt61p803_puzzle_hwmon *mcu_hwmon; ++ struct fwnode_handle *child; ++ struct device *hwmon_dev; ++ int ret; ++ ++ mcu_hwmon = devm_kzalloc(dev, sizeof(*mcu_hwmon), GFP_KERNEL); ++ if (!mcu_hwmon) ++ return -ENOMEM; ++ ++ mcu_hwmon->mcu = mcu; ++ platform_set_drvdata(pdev, mcu_hwmon); ++ mutex_init(&mcu_hwmon->lock); ++ ++ hwmon_dev = devm_hwmon_device_register_with_info(dev, "iei_wt61p803_puzzle", ++ mcu_hwmon, ++ &iei_wt61p803_puzzle_chip_info, ++ NULL); ++ if (IS_ERR(hwmon_dev)) ++ return PTR_ERR(hwmon_dev); ++ ++ /* Control fans via PWM lines via Linux Kernel */ ++ if (IS_ENABLED(CONFIG_THERMAL)) { ++ device_for_each_child_node(dev, child) { ++ ret = iei_wt61p803_puzzle_enable_thermal_cooling_dev(dev, child, mcu_hwmon); ++ if (ret) { ++ dev_err(dev, "Enabling the PWM fan failed\n"); ++ fwnode_handle_put(child); ++ return ret; ++ } ++ } ++ } ++ return 0; ++} ++ ++static const struct of_device_id iei_wt61p803_puzzle_hwmon_id_table[] = { ++ { .compatible = "iei,wt61p803-puzzle-hwmon" }, ++ {} ++}; ++MODULE_DEVICE_TABLE(of, iei_wt61p803_puzzle_hwmon_id_table); ++ ++static struct platform_driver iei_wt61p803_puzzle_hwmon_driver = { ++ .driver = { ++ .name = "iei-wt61p803-puzzle-hwmon", ++ .of_match_table = iei_wt61p803_puzzle_hwmon_id_table, ++ }, ++ .probe = iei_wt61p803_puzzle_hwmon_probe, ++}; ++ ++module_platform_driver(iei_wt61p803_puzzle_hwmon_driver); ++ ++MODULE_DESCRIPTION("IEI WT61P803 PUZZLE MCU HWMON Driver"); ++MODULE_AUTHOR("Luka Kovacic "); ++MODULE_LICENSE("GPL v2"); diff --git a/target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch b/target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch new file mode 100644 index 0000000000..37f98b6ba8 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch @@ -0,0 +1,207 @@ +From f3b44eb69cc561cf05d00506dcec0dd9be003ed8 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:35 +0000 +Subject: [PATCH 4/7] drivers: leds: Add the IEI WT61P803 PUZZLE LED driver + +Add support for the IEI WT61P803 PUZZLE LED driver. +Currently only the front panel power LED is supported, +since it is the only LED on this board wired through the +MCU. + +The LED is wired directly to the on-board MCU controller +and is toggled using an MCU command. + +Support for more LEDs is going to be added in case more +boards implement this microcontroller, as LEDs use many +different GPIOs. + +This driver depends on the IEI WT61P803 PUZZLE MFD driver. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + drivers/leds/Kconfig | 8 ++ + drivers/leds/Makefile | 1 + + drivers/leds/leds-iei-wt61p803-puzzle.c | 147 ++++++++++++++++++++++++ + 3 files changed, 156 insertions(+) + create mode 100644 drivers/leds/leds-iei-wt61p803-puzzle.c + +--- a/drivers/leds/Kconfig ++++ b/drivers/leds/Kconfig +@@ -333,6 +333,14 @@ config LEDS_IPAQ_MICRO + Choose this option if you want to use the notification LED on + Compaq/HP iPAQ h3100 and h3600. + ++config LEDS_IEI_WT61P803_PUZZLE ++ tristate "LED Support for the IEI WT61P803 PUZZLE MCU" ++ depends on LEDS_CLASS ++ depends on MFD_IEI_WT61P803_PUZZLE ++ help ++ This option enables support for LEDs controlled by the IEI WT61P803 ++ M801 MCU. ++ + config LEDS_HP6XX + tristate "LED Support for the HP Jornada 6xx" + depends on LEDS_CLASS +--- a/drivers/leds/Makefile ++++ b/drivers/leds/Makefile +@@ -35,6 +35,7 @@ obj-$(CONFIG_LEDS_HP6XX) += leds-hp6xx. + obj-$(CONFIG_LEDS_INTEL_SS4200) += leds-ss4200.o + obj-$(CONFIG_LEDS_IP30) += leds-ip30.o + obj-$(CONFIG_LEDS_IPAQ_MICRO) += leds-ipaq-micro.o ++obj-$(CONFIG_LEDS_IEI_WT61P803_PUZZLE) += leds-iei-wt61p803-puzzle.o + obj-$(CONFIG_LEDS_IS31FL319X) += leds-is31fl319x.o + obj-$(CONFIG_LEDS_IS31FL32XX) += leds-is31fl32xx.o + obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o +--- /dev/null ++++ b/drivers/leds/leds-iei-wt61p803-puzzle.c +@@ -0,0 +1,147 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* IEI WT61P803 PUZZLE MCU LED Driver ++ * ++ * Copyright (C) 2020 Sartura Ltd. ++ * Author: Luka Kovacic ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++enum iei_wt61p803_puzzle_led_state { ++ IEI_LED_OFF = 0x30, ++ IEI_LED_ON = 0x31, ++ IEI_LED_BLINK_5HZ = 0x32, ++ IEI_LED_BLINK_1HZ = 0x33, ++}; ++ ++/** ++ * struct iei_wt61p803_puzzle_led - MCU LED Driver ++ * @cdev: LED classdev ++ * @mcu: MCU struct pointer ++ * @response_buffer Global MCU response buffer ++ * @lock: General mutex lock to protect simultaneous R/W access to led_power_state ++ * @led_power_state: State of the front panel power LED ++ */ ++struct iei_wt61p803_puzzle_led { ++ struct led_classdev cdev; ++ struct iei_wt61p803_puzzle *mcu; ++ unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ struct mutex lock; /* mutex to protect led_power_state */ ++ int led_power_state; ++}; ++ ++static inline struct iei_wt61p803_puzzle_led *cdev_to_iei_wt61p803_puzzle_led ++ (struct led_classdev *led_cdev) ++{ ++ return container_of(led_cdev, struct iei_wt61p803_puzzle_led, cdev); ++} ++ ++static int iei_wt61p803_puzzle_led_brightness_set_blocking(struct led_classdev *cdev, ++ enum led_brightness brightness) ++{ ++ struct iei_wt61p803_puzzle_led *priv = cdev_to_iei_wt61p803_puzzle_led(cdev); ++ unsigned char *resp_buf = priv->response_buffer; ++ unsigned char led_power_cmd[5] = {}; ++ size_t reply_size; ++ int ret; ++ ++ led_power_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ led_power_cmd[1] = IEI_WT61P803_PUZZLE_CMD_LED; ++ led_power_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_POWER; ++ led_power_cmd[3] = brightness == LED_OFF ? IEI_LED_OFF : IEI_LED_ON; ++ ++ ret = iei_wt61p803_puzzle_write_command(priv->mcu, led_power_cmd, ++ sizeof(led_power_cmd), ++ resp_buf, ++ &reply_size); ++ if (ret) ++ return ret; ++ ++ if (reply_size != 3) ++ return -EIO; ++ ++ if (!(resp_buf[0] == IEI_WT61P803_PUZZLE_CMD_HEADER_START && ++ resp_buf[1] == IEI_WT61P803_PUZZLE_CMD_RESPONSE_OK && ++ resp_buf[2] == IEI_WT61P803_PUZZLE_CHECKSUM_RESPONSE_OK)) ++ return -EIO; ++ ++ mutex_lock(&priv->lock); ++ priv->led_power_state = brightness; ++ mutex_unlock(&priv->lock); ++ ++ return 0; ++} ++ ++static enum led_brightness iei_wt61p803_puzzle_led_brightness_get(struct led_classdev *cdev) ++{ ++ struct iei_wt61p803_puzzle_led *priv = cdev_to_iei_wt61p803_puzzle_led(cdev); ++ int led_state; ++ ++ mutex_lock(&priv->lock); ++ led_state = priv->led_power_state; ++ mutex_unlock(&priv->lock); ++ ++ return led_state; ++} ++ ++static int iei_wt61p803_puzzle_led_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev->parent); ++ struct iei_wt61p803_puzzle_led *priv; ++ struct led_init_data init_data = {}; ++ struct fwnode_handle *child; ++ int ret; ++ ++ if (device_get_child_node_count(dev) != 1) ++ return -EINVAL; ++ ++ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ priv->mcu = mcu; ++ priv->led_power_state = 1; ++ mutex_init(&priv->lock); ++ dev_set_drvdata(dev, priv); ++ ++ child = device_get_next_child_node(dev, NULL); ++ init_data.fwnode = child; ++ ++ priv->cdev.brightness_set_blocking = iei_wt61p803_puzzle_led_brightness_set_blocking; ++ priv->cdev.brightness_get = iei_wt61p803_puzzle_led_brightness_get; ++ priv->cdev.max_brightness = 1; ++ ++ ret = devm_led_classdev_register_ext(dev, &priv->cdev, &init_data); ++ if (ret) ++ dev_err(dev, "Could not register LED\n"); ++ ++ fwnode_handle_put(child); ++ return ret; ++} ++ ++static const struct of_device_id iei_wt61p803_puzzle_led_of_match[] = { ++ { .compatible = "iei,wt61p803-puzzle-leds" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, iei_wt61p803_puzzle_led_of_match); ++ ++static struct platform_driver iei_wt61p803_puzzle_led_driver = { ++ .driver = { ++ .name = "iei-wt61p803-puzzle-led", ++ .of_match_table = iei_wt61p803_puzzle_led_of_match, ++ }, ++ .probe = iei_wt61p803_puzzle_led_probe, ++}; ++module_platform_driver(iei_wt61p803_puzzle_led_driver); ++ ++MODULE_DESCRIPTION("IEI WT61P803 PUZZLE front panel LED driver"); ++MODULE_AUTHOR("Luka Kovacic "); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:leds-iei-wt61p803-puzzle"); diff --git a/target/linux/mvebu/patches-5.15/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch b/target/linux/mvebu/patches-5.15/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch new file mode 100644 index 0000000000..b1d420ef0a --- /dev/null +++ b/target/linux/mvebu/patches-5.15/905-Documentation-ABI-Add-iei-wt61p803-puzzle-driver-sys.patch @@ -0,0 +1,82 @@ +From 2fab3b4956c5b2f83c1e1abffc1df39de2933d83 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:36 +0000 +Subject: [PATCH 5/7] Documentation/ABI: Add iei-wt61p803-puzzle driver sysfs + interface documentation + +Add the iei-wt61p803-puzzle driver sysfs interface documentation to allow +monitoring and control of the microcontroller from user space. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + .../testing/sysfs-driver-iei-wt61p803-puzzle | 61 +++++++++++++++++++ + 1 file changed, 61 insertions(+) + create mode 100644 Documentation/ABI/testing/sysfs-driver-iei-wt61p803-puzzle + +--- /dev/null ++++ b/Documentation/ABI/testing/sysfs-driver-iei-wt61p803-puzzle +@@ -0,0 +1,61 @@ ++What: /sys/bus/serial/devices/.../mac_address_* ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RW) Internal factory assigned MAC address values ++ ++What: /sys/bus/serial/devices/.../serial_number ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RW) Internal factory assigned serial number ++ ++What: /sys/bus/serial/devices/.../version ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU firmware version ++ ++What: /sys/bus/serial/devices/.../protocol_version ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU communication protocol version ++ ++What: /sys/bus/serial/devices/.../power_loss_recovery ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RW) Host platform power loss recovery settings ++ Value mapping: 0 - Always-On, 1 - Always-Off, 2 - Always-AC, 3 - Always-WA ++ ++What: /sys/bus/serial/devices/.../bootloader_mode ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU bootloader mode status ++ Value mapping: ++ 0 - normal mode ++ 1 - bootloader mode ++ ++What: /sys/bus/serial/devices/.../power_status ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Power status indicates the host platform power on method. ++ Value mapping (bitwise list): ++ 0x80 - Null ++ 0x40 - Firmware flag ++ 0x20 - Power loss detection flag (powered off) ++ 0x10 - Power loss detection flag (AC mode) ++ 0x08 - Button power on ++ 0x04 - Wake-on-LAN power on ++ 0x02 - RTC alarm power on ++ 0x01 - AC recover power on ++ ++What: /sys/bus/serial/devices/.../build_info ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Internal MCU firmware build date ++ Format: yyyy/mm/dd hh:mm ++ ++What: /sys/bus/serial/devices/.../ac_recovery_status ++Date: September 2020 ++Contact: Luka Kovacic ++Description: (RO) Host platform AC recovery status value ++ Value mapping: ++ 0 - board has not been recovered from power down ++ 1 - board has been recovered from power down diff --git a/target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch b/target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch new file mode 100644 index 0000000000..345d4ca03b --- /dev/null +++ b/target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch @@ -0,0 +1,74 @@ +From 0aff3e5923fecc6842473ad07a688d6e2f2c2d55 Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:37 +0000 +Subject: [PATCH 6/7] Documentation/hwmon: Add iei-wt61p803-puzzle hwmon driver + documentation + +Add the iei-wt61p803-puzzle driver hwmon driver interface documentation. + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + .../hwmon/iei-wt61p803-puzzle-hwmon.rst | 43 +++++++++++++++++++ + Documentation/hwmon/index.rst | 1 + + 2 files changed, 44 insertions(+) + create mode 100644 Documentation/hwmon/iei-wt61p803-puzzle-hwmon.rst + +--- /dev/null ++++ b/Documentation/hwmon/iei-wt61p803-puzzle-hwmon.rst +@@ -0,0 +1,43 @@ ++.. SPDX-License-Identifier: GPL-2.0-only ++ ++Kernel driver iei-wt61p803-puzzle-hwmon ++======================================= ++ ++Supported chips: ++ * IEI WT61P803 PUZZLE for IEI Puzzle M801 ++ ++ Prefix: 'iei-wt61p803-puzzle-hwmon' ++ ++Author: Luka Kovacic ++ ++ ++Description ++----------- ++ ++This driver adds fan and temperature sensor reading for some IEI Puzzle ++series boards. ++ ++Sysfs attributes ++---------------- ++ ++The following attributes are supported: ++ ++- IEI WT61P803 PUZZLE for IEI Puzzle M801 ++ ++/sys files in hwmon subsystem ++----------------------------- ++ ++================= == ===================================================== ++fan[1-5]_input RO files for fan speed (in RPM) ++pwm[1-2] RW files for fan[1-2] target duty cycle (0..255) ++temp[1-2]_input RO files for temperature sensors, in millidegree Celsius ++================= == ===================================================== ++ ++/sys files in thermal subsystem ++------------------------------- ++ ++================= == ===================================================== ++cur_state RW file for current cooling state of the cooling device ++ (0..max_state) ++max_state RO file for maximum cooling state of the cooling device ++================= == ===================================================== +--- a/Documentation/hwmon/index.rst ++++ b/Documentation/hwmon/index.rst +@@ -71,6 +71,7 @@ Hardware Monitoring Kernel Drivers + ibmaem + ibm-cffps + ibmpowernv ++ iei-wt61p803-puzzle-hwmon + ina209 + ina2xx + ina3221 diff --git a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch new file mode 100644 index 0000000000..577a9b40de --- /dev/null +++ b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch @@ -0,0 +1,41 @@ +From 12479baad28d2a08c6cb9e83471057635fa1635c Mon Sep 17 00:00:00 2001 +From: Luka Kovacic +Date: Tue, 24 Aug 2021 12:44:38 +0000 +Subject: [PATCH 7/7] MAINTAINERS: Add an entry for the IEI WT61P803 PUZZLE + driver + +Add an entry for the IEI WT61P803 PUZZLE driver (MFD, HWMON, LED drivers). + +Signed-off-by: Luka Kovacic +Signed-off-by: Pavo Banicevic +Cc: Luka Perkov +Cc: Robert Marko +--- + MAINTAINERS | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -8538,6 +8538,22 @@ F: include/net/nl802154.h + F: net/ieee802154/ + F: net/mac802154/ + ++IEI WT61P803 M801 MFD DRIVER ++M: Luka Kovacic ++M: Luka Perkov ++M: Goran Medic ++L: linux-kernel@vger.kernel.org ++S: Maintained ++F: Documentation/ABI/stable/sysfs-driver-iei-wt61p803-puzzle ++F: Documentation/devicetree/bindings/hwmon/iei,wt61p803-puzzle-hwmon.yaml ++F: Documentation/devicetree/bindings/leds/iei,wt61p803-puzzle-leds.yaml ++F: Documentation/devicetree/bindings/mfd/iei,wt61p803-puzzle.yaml ++F: Documentation/hwmon/iei-wt61p803-puzzle-hwmon.rst ++F: drivers/hwmon/iei-wt61p803-puzzle-hwmon.c ++F: drivers/leds/leds-iei-wt61p803-puzzle.c ++F: drivers/mfd/iei-wt61p803-puzzle.c ++F: include/linux/mfd/iei-wt61p803-puzzle.h ++ + IFE PROTOCOL + M: Yotam Gigi + M: Jamal Hadi Salim diff --git a/target/linux/mvebu/patches-5.15/910-drivers-leds-wt61p803-puzzle-improvements.patch b/target/linux/mvebu/patches-5.15/910-drivers-leds-wt61p803-puzzle-improvements.patch new file mode 100644 index 0000000000..150a65498c --- /dev/null +++ b/target/linux/mvebu/patches-5.15/910-drivers-leds-wt61p803-puzzle-improvements.patch @@ -0,0 +1,271 @@ +--- a/drivers/leds/leds-iei-wt61p803-puzzle.c ++++ b/drivers/leds/leds-iei-wt61p803-puzzle.c +@@ -9,9 +9,13 @@ + #include + #include + #include ++#include + #include + #include + #include ++#include ++ ++#define IEI_LEDS_MAX 4 + + enum iei_wt61p803_puzzle_led_state { + IEI_LED_OFF = 0x30, +@@ -33,7 +37,11 @@ struct iei_wt61p803_puzzle_led { + struct iei_wt61p803_puzzle *mcu; + unsigned char response_buffer[IEI_WT61P803_PUZZLE_BUF_SIZE]; + struct mutex lock; /* mutex to protect led_power_state */ ++ struct work_struct work; + int led_power_state; ++ int id; ++ u8 blinking; ++ bool active_low; + }; + + static inline struct iei_wt61p803_puzzle_led *cdev_to_iei_wt61p803_puzzle_led +@@ -51,10 +59,18 @@ static int iei_wt61p803_puzzle_led_brigh + size_t reply_size; + int ret; + ++ if (priv->blinking) { ++ if (brightness == LED_OFF) ++ priv->blinking = 0; ++ else ++ return 0; ++ } ++ + led_power_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; + led_power_cmd[1] = IEI_WT61P803_PUZZLE_CMD_LED; +- led_power_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_POWER; +- led_power_cmd[3] = brightness == LED_OFF ? IEI_LED_OFF : IEI_LED_ON; ++ led_power_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_SET(priv->id); ++ led_power_cmd[3] = ((brightness == LED_OFF) ^ priv->active_low) ? ++ IEI_LED_OFF : priv->blinking?priv->blinking:IEI_LED_ON; + + ret = iei_wt61p803_puzzle_write_command(priv->mcu, led_power_cmd, + sizeof(led_power_cmd), +@@ -90,39 +106,166 @@ static enum led_brightness iei_wt61p803_ + return led_state; + } + ++static void iei_wt61p803_puzzle_led_apply_blink(struct work_struct *work) ++{ ++ struct iei_wt61p803_puzzle_led *priv = container_of(work, struct iei_wt61p803_puzzle_led, work); ++ unsigned char led_blink_cmd[5] = {}; ++ unsigned char resp_buf[IEI_WT61P803_PUZZLE_BUF_SIZE]; ++ size_t reply_size; ++ ++ led_blink_cmd[0] = IEI_WT61P803_PUZZLE_CMD_HEADER_START; ++ led_blink_cmd[1] = IEI_WT61P803_PUZZLE_CMD_LED; ++ led_blink_cmd[2] = IEI_WT61P803_PUZZLE_CMD_LED_SET(priv->id); ++ led_blink_cmd[3] = priv->blinking; ++ ++ iei_wt61p803_puzzle_write_command(priv->mcu, led_blink_cmd, ++ sizeof(led_blink_cmd), ++ resp_buf, ++ &reply_size); ++ ++ return; ++} ++ ++static int iei_wt61p803_puzzle_led_set_blink(struct led_classdev *cdev, ++ unsigned long *delay_on, ++ unsigned long *delay_off) ++{ ++ struct iei_wt61p803_puzzle_led *priv = cdev_to_iei_wt61p803_puzzle_led(cdev); ++ u8 blink_mode = 0; ++ int ret = 0; ++ ++ /* set defaults */ ++ if (!*delay_on && !*delay_off) { ++ *delay_on = 500; ++ *delay_off = 500; ++ } ++ ++ /* minimum delay for soft-driven blinking is 100ms to keep load low */ ++ if (*delay_on < 100) ++ *delay_on = 100; ++ ++ if (*delay_off < 100) ++ *delay_off = 100; ++ ++ /* offload blinking to hardware, if possible */ ++ if (*delay_on != *delay_off) { ++ ret = -EINVAL; ++ } else if (*delay_on == 100) { ++ blink_mode = IEI_LED_BLINK_5HZ; ++ *delay_on = 100; ++ *delay_off = 100; ++ } else if (*delay_on <= 500) { ++ blink_mode = IEI_LED_BLINK_1HZ; ++ *delay_on = 500; ++ *delay_off = 500; ++ } else { ++ ret = -EINVAL; ++ } ++ ++ mutex_lock(&priv->lock); ++ priv->blinking = blink_mode; ++ mutex_unlock(&priv->lock); ++ ++ if (blink_mode) ++ schedule_work(&priv->work); ++ ++ return ret; ++} ++ ++ ++static int iei_wt61p803_puzzle_led_set_dt_default(struct led_classdev *cdev, ++ struct device_node *np) ++{ ++ const char *state; ++ int ret = 0; ++ ++ state = of_get_property(np, "default-state", NULL); ++ if (state) { ++ if (!strcmp(state, "on")) { ++ ret = ++ iei_wt61p803_puzzle_led_brightness_set_blocking( ++ cdev, cdev->max_brightness); ++ } else { ++ ret = iei_wt61p803_puzzle_led_brightness_set_blocking( ++ cdev, LED_OFF); ++ } ++ } ++ ++ return ret; ++} ++ + static int iei_wt61p803_puzzle_led_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; ++ struct device_node *np = dev_of_node(dev); ++ struct device_node *child; + struct iei_wt61p803_puzzle *mcu = dev_get_drvdata(dev->parent); + struct iei_wt61p803_puzzle_led *priv; +- struct led_init_data init_data = {}; +- struct fwnode_handle *child; + int ret; ++ u32 reg; + +- if (device_get_child_node_count(dev) != 1) ++ if (device_get_child_node_count(dev) > IEI_LEDS_MAX) + return -EINVAL; + +- priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); +- if (!priv) +- return -ENOMEM; +- +- priv->mcu = mcu; +- priv->led_power_state = 1; +- mutex_init(&priv->lock); +- dev_set_drvdata(dev, priv); +- +- child = device_get_next_child_node(dev, NULL); +- init_data.fwnode = child; +- +- priv->cdev.brightness_set_blocking = iei_wt61p803_puzzle_led_brightness_set_blocking; +- priv->cdev.brightness_get = iei_wt61p803_puzzle_led_brightness_get; +- priv->cdev.max_brightness = 1; ++ for_each_available_child_of_node(np, child) { ++ struct led_init_data init_data = {}; + +- ret = devm_led_classdev_register_ext(dev, &priv->cdev, &init_data); +- if (ret) +- dev_err(dev, "Could not register LED\n"); ++ ret = of_property_read_u32(child, "reg", ®); ++ if (ret) { ++ dev_err(dev, "Failed to read led 'reg' property\n"); ++ goto put_child_node; ++ } ++ ++ if (reg > IEI_LEDS_MAX) { ++ dev_err(dev, "Invalid led reg %u\n", reg); ++ ret = -EINVAL; ++ goto put_child_node; ++ } ++ ++ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) { ++ ret = -ENOMEM; ++ goto put_child_node; ++ } ++ ++ mutex_init(&priv->lock); ++ ++ dev_set_drvdata(dev, priv); ++ ++ if (of_property_read_bool(child, "active-low")) ++ priv->active_low = true; ++ ++ priv->mcu = mcu; ++ priv->id = reg; ++ priv->led_power_state = 1; ++ priv->blinking = 0; ++ init_data.fwnode = of_fwnode_handle(child); ++ ++ priv->cdev.brightness_set_blocking = iei_wt61p803_puzzle_led_brightness_set_blocking; ++ priv->cdev.brightness_get = iei_wt61p803_puzzle_led_brightness_get; ++ priv->cdev.blink_set = iei_wt61p803_puzzle_led_set_blink; ++ ++ priv->cdev.max_brightness = 1; ++ ++ INIT_WORK(&priv->work, iei_wt61p803_puzzle_led_apply_blink); ++ ++ ret = iei_wt61p803_puzzle_led_set_dt_default(&priv->cdev, child); ++ if (ret) { ++ dev_err(dev, "Could apply default from DT\n"); ++ goto put_child_node; ++ } ++ ++ ret = devm_led_classdev_register_ext(dev, &priv->cdev, &init_data); ++ if (ret) { ++ dev_err(dev, "Could not register LED\n"); ++ goto put_child_node; ++ } ++ } ++ ++ return ret; + +- fwnode_handle_put(child); ++put_child_node: ++ of_node_put(child); + return ret; + } + +--- a/include/linux/mfd/iei-wt61p803-puzzle.h ++++ b/include/linux/mfd/iei-wt61p803-puzzle.h +@@ -36,7 +36,7 @@ + #define IEI_WT61P803_PUZZLE_CMD_FUNCTION_OTHER_POWER_LOSS 0x41 /* A */ + + #define IEI_WT61P803_PUZZLE_CMD_LED 0x52 /* R */ +-#define IEI_WT61P803_PUZZLE_CMD_LED_POWER 0x31 /* 1 */ ++#define IEI_WT61P803_PUZZLE_CMD_LED_SET(n) (0x30 | (n)) + + #define IEI_WT61P803_PUZZLE_CMD_TEMP 0x54 /* T */ + #define IEI_WT61P803_PUZZLE_CMD_TEMP_ALL 0x41 /* A */ +--- a/drivers/mfd/iei-wt61p803-puzzle.c ++++ b/drivers/mfd/iei-wt61p803-puzzle.c +@@ -176,6 +176,9 @@ static int iei_wt61p803_puzzle_recv_buf( + struct iei_wt61p803_puzzle *mcu = serdev_device_get_drvdata(serdev); + int ret; + ++ print_hex_dump_debug("puzzle-mcu rx: ", DUMP_PREFIX_NONE, ++ 16, 1, data, size, false); ++ + ret = iei_wt61p803_puzzle_process_resp(mcu, data, size); + /* Return the number of processed bytes if function returns error, + * discard the remaining incoming data, since the frame this data +@@ -246,6 +249,9 @@ int iei_wt61p803_puzzle_write_command(st + + cmd[size - 1] = iei_wt61p803_puzzle_checksum(cmd, size - 1); + ++ print_hex_dump_debug("puzzle-mcu tx: ", DUMP_PREFIX_NONE, ++ 16, 1, cmd, size, false); ++ + /* Initialize reply struct */ + reinit_completion(&mcu->reply->received); + mcu->reply->size = 0; From fb29b91c5b9baff24bfa5146c2649d8dd5e01af3 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 4 Apr 2022 15:49:30 +0100 Subject: [PATCH 73/80] =?UTF-8?q?mvebu:=20remove=20all=20=E2=89=A4=205.15-?= =?UTF-8?q?tagged=20patches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They're already upstream. Signed-off-by: Rui Salvaterra --- ...s-mcbin-singleshot-add-heartbeat-LED.patch | 65 ------- ...is-omnia-enable-HW-buffer-management.patch | 74 -------- ...rris-omnia-add-comphy-handle-to-eth2.patch | 37 ---- ...rris-omnia-describe-switch-interrupt.patch | 61 ------- ...11-ARM-dts-turris-omnia-add-SFP-node.patch | 90 ---------- ...turris-omnia-add-LED-controller-node.patch | 160 ------------------ ...te-ethernet-phy-node-and-handle-name.patch | 52 ------ ...omnia-fix-hardware-buffer-management.patch | 33 ---- ...14-net-ethernet-marvell-mvnetaMQPrio.patch | 109 ------------ 9 files changed, 681 deletions(-) delete mode 100644 target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch delete mode 100644 target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch delete mode 100644 target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch delete mode 100644 target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch delete mode 100644 target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch delete mode 100644 target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch delete mode 100644 target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch delete mode 100644 target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch delete mode 100644 target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch diff --git a/target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch b/target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch deleted file mode 100644 index c3abae60a6..0000000000 --- a/target/linux/mvebu/patches-5.15/001-v5.11-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch +++ /dev/null @@ -1,65 +0,0 @@ -From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001 -From: Tomasz Maciej Nowak -Date: Tue, 10 Nov 2020 16:38:31 +0100 -Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED - -With board revision 1.3, SolidRun moved the power LED to the middle of -the board. In old place of power LED a GPIO controllable heartbeat LED -was added. This commit only touches Single Shot variant, since only this -variant is all revision 1.3. - -Note: -This is slightly modified patch. Some boards could be placed in an -enclosure, so the LED18 is enabled by default, since that'll be the only -visible indicator that the board is operating. - -Reported-by: Alexandra Alth -Signed-off-by: Tomasz Maciej Nowak -Signed-off-by: Gregory CLEMENT ---- - .../marvell/armada-8040-mcbin-singleshot.dts | 22 +++++++++++++++++++ - 1 file changed, 22 insertions(+) - ---- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts -+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts -@@ -5,6 +5,8 @@ - * Device Tree file for MACCHIATOBin Armada 8040 community board platform - */ - -+#include -+ - #include "armada-8040-mcbin.dtsi" - - / { -@@ -12,6 +14,20 @@ - compatible = "marvell,armada8040-mcbin-singleshot", - "marvell,armada8040-mcbin", "marvell,armada8040", - "marvell,armada-ap806-quad", "marvell,armada-ap806"; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-0 = <&cp0_led18_pins>; -+ pinctrl-names = "default"; -+ -+ led18 { -+ gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>; -+ function = LED_FUNCTION_HEARTBEAT; -+ color = ; -+ linux,default-trigger = "heartbeat"; -+ default-state = "on"; -+ }; -+ }; - }; - - &cp0_eth0 { -@@ -27,3 +43,10 @@ - managed = "in-band-status"; - sfp = <&sfp_eth1>; - }; -+ -+&cp0_pinctrl { -+ cp0_led18_pins: led18-pins { -+ marvell,pins = "mpp33"; -+ marvell,function = "gpio"; -+ }; -+}; diff --git a/target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch b/target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch deleted file mode 100644 index 7a4b511998..0000000000 --- a/target/linux/mvebu/patches-5.15/002-v5.11-ARM-dts-turris-omnia-enable-HW-buffer-management.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 018b88eee1a2efda26ed2f09aab33ccdc40ef18f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= -Date: Sun, 15 Nov 2020 14:59:17 +0100 -Subject: ARM: dts: turris-omnia: enable HW buffer management -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The buffer manager is available on Turris Omnia but needs to be -described in device-tree to be used. - -Signed-off-by: Marek Behún -Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") -Cc: linux-arm-kernel@lists.infradead.org -Cc: Uwe Kleine-König -Cc: Jason Cooper -Cc: Gregory CLEMENT -Cc: Andreas Färber -Cc: Andrew Lunn -Cc: Rob Herring -Cc: devicetree@vger.kernel.org -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-turris-omnia.dts | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -(limited to 'arch/arm/boot/dts/armada-385-turris-omnia.dts') - ---- a/arch/arm/boot/dts/armada-385-turris-omnia.dts -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -84,12 +84,23 @@ - }; - }; - -+&bm { -+ status = "okay"; -+}; -+ -+&bm_bppi { -+ status = "okay"; -+}; -+ - /* Connected to 88E6176 switch, port 6 */ - ð0 { - pinctrl-names = "default"; - pinctrl-0 = <&ge0_rgmii_pins>; - status = "okay"; - phy-mode = "rgmii"; -+ buffer-manager = <&bm>; -+ bm,pool-long = <0>; -+ bm,pool-short = <3>; - - fixed-link { - speed = <1000>; -@@ -103,6 +114,9 @@ - pinctrl-0 = <&ge1_rgmii_pins>; - status = "okay"; - phy-mode = "rgmii"; -+ buffer-manager = <&bm>; -+ bm,pool-long = <1>; -+ bm,pool-short = <3>; - - fixed-link { - speed = <1000>; -@@ -115,6 +129,9 @@ - status = "okay"; - phy-mode = "sgmii"; - phy = <&phy1>; -+ buffer-manager = <&bm>; -+ bm,pool-long = <2>; -+ bm,pool-short = <3>; - }; - - &i2c0 { diff --git a/target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch b/target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch deleted file mode 100644 index 99ed07e13b..0000000000 --- a/target/linux/mvebu/patches-5.15/003-v5.11-ARM-dts-turris-omnia-add-comphy-handle-to-eth2.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 9ec25ef84832209a8326f9a71fe3ba14f4bcf301 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= -Date: Sun, 15 Nov 2020 14:59:18 +0100 -Subject: ARM: dts: turris-omnia: add comphy handle to eth2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The eth2 controller on Turris Omnia is connected to SerDes. For SFP to -be able to switch between 1G and 2.5G modes the comphy link has to be -defined. - -Signed-off-by: Marek Behún -Fixes: f3a6a9f3704a ("ARM: dts: add description for Armada 38x ...") -Reviewed-by: Andrew Lunn -Reviewed-by: Andreas Färber -Cc: linux-arm-kernel@lists.infradead.org -Cc: Uwe Kleine-König -Cc: Jason Cooper -Cc: Gregory CLEMENT -Cc: Rob Herring -Cc: devicetree@vger.kernel.org -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-turris-omnia.dts | 1 + - 1 file changed, 1 insertion(+) - ---- a/arch/arm/boot/dts/armada-385-turris-omnia.dts -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -129,6 +129,7 @@ - status = "okay"; - phy-mode = "sgmii"; - phy = <&phy1>; -+ phys = <&comphy5 2>; - buffer-manager = <&bm>; - bm,pool-long = <2>; - bm,pool-short = <3>; diff --git a/target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch b/target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch deleted file mode 100644 index 4bbd80aac4..0000000000 --- a/target/linux/mvebu/patches-5.15/004-v5.11-ARM-dts-turris-omnia-describe-switch-interrupt.patch +++ /dev/null @@ -1,61 +0,0 @@ -From d29b67c220caf5f4905e1f1576e71bcb6de4af9e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= -Date: Sun, 15 Nov 2020 14:59:19 +0100 -Subject: ARM: dts: turris-omnia: describe switch interrupt -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Describe switch interrupt for Turris Omnia so that the CPU does not have -to poll the switch. We also need to to set mpp45 pin to gpio function -for this. - -Signed-off-by: Marek Behún -Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") -Cc: linux-arm-kernel@lists.infradead.org -Cc: Uwe Kleine-König -Cc: Jason Cooper -Cc: Gregory CLEMENT -Cc: Andreas Färber -Cc: Andrew Lunn -Cc: Rob Herring -Cc: devicetree@vger.kernel.org -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-turris-omnia.dts | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - ---- a/arch/arm/boot/dts/armada-385-turris-omnia.dts -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -261,13 +261,18 @@ - - /* Switch MV88E6176 at address 0x10 */ - switch@10 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&swint_pins>; - compatible = "marvell,mv88e6085"; - #address-cells = <1>; - #size-cells = <0>; -- dsa,member = <0 0>; - -+ dsa,member = <0 0>; - reg = <0x10>; - -+ interrupt-parent = <&gpio1>; -+ interrupts = <13 IRQ_TYPE_LEVEL_LOW>; -+ - ports { - #address-cells = <1>; - #size-cells = <0>; -@@ -320,6 +325,11 @@ - marvell,function = "gpio"; - }; - -+ swint_pins: swint-pins { -+ marvell,pins = "mpp45"; -+ marvell,function = "gpio"; -+ }; -+ - spi0cs0_pins: spi0cs0-pins { - marvell,pins = "mpp25"; - marvell,function = "spi0"; diff --git a/target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch b/target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch deleted file mode 100644 index 2447a4e240..0000000000 --- a/target/linux/mvebu/patches-5.15/005-v5.11-ARM-dts-turris-omnia-add-SFP-node.patch +++ /dev/null @@ -1,90 +0,0 @@ -From add2d65962977caf23ca2fa21a2457d31b636574 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= -Date: Mon, 16 Nov 2020 13:24:22 +0100 -Subject: ARM: dts: turris-omnia: add SFP node -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Turris Omnia has an SFP cage that, together with WAN PHY, is connected -to eth2 SerDes via a SerDes multiplexor. When a SFP module is present, -the multiplexor switches the SerDes signal from PHY to SFP. - -Describe the SFP cage, but leave it disabled. Until phylink has support -for such configuration, we are leaving it to U-Boot to enable SFP and -disable WAN PHY at boot time depending on whether a SFP module is -present. - -Signed-off-by: Marek Behún -Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia") -Reviewed-by: Andrew Lunn -Cc: Russell King - ARM Linux admin -Cc: linux-arm-kernel@lists.infradead.org -Cc: Uwe Kleine-König -Cc: Jason Cooper -Cc: Gregory CLEMENT -Cc: Andreas Färber -Cc: Rob Herring -Cc: devicetree@vger.kernel.org -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-turris-omnia.dts | 30 ++++++++++++++++++++++++++- - 1 file changed, 29 insertions(+), 1 deletion(-) - ---- a/arch/arm/boot/dts/armada-385-turris-omnia.dts -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -82,6 +82,24 @@ - }; - }; - }; -+ -+ sfp: sfp { -+ compatible = "sff,sfp"; -+ i2c-bus = <&sfp_i2c>; -+ tx-fault-gpios = <&pcawan 0 GPIO_ACTIVE_HIGH>; -+ tx-disable-gpios = <&pcawan 1 GPIO_ACTIVE_HIGH>; -+ rate-select0-gpios = <&pcawan 2 GPIO_ACTIVE_HIGH>; -+ los-gpios = <&pcawan 3 GPIO_ACTIVE_HIGH>; -+ mod-def0-gpios = <&pcawan 4 GPIO_ACTIVE_LOW>; -+ maximum-power-milliwatt = <3000>; -+ -+ /* -+ * For now this has to be enabled at boot time by U-Boot when -+ * a SFP module is present. Read more in the comment in the -+ * eth2 node below. -+ */ -+ status = "disabled"; -+ }; - }; - - &bm { -@@ -126,10 +144,20 @@ - - /* WAN port */ - ð2 { -+ /* -+ * eth2 is connected via a multiplexor to both the SFP cage and to -+ * ethernet-phy@1. The multiplexor switches the signal to SFP cage when -+ * a SFP module is present, as determined by the mode-def0 GPIO. -+ * -+ * Until kernel supports this configuration properly, in case SFP module -+ * is present, U-Boot has to enable the sfp node above, remove phy -+ * handle and add managed = "in-band-status" property. -+ */ - status = "okay"; - phy-mode = "sgmii"; - phy = <&phy1>; - phys = <&comphy5 2>; -+ sfp = <&sfp>; - buffer-manager = <&bm>; - bm,pool-long = <2>; - bm,pool-short = <3>; -@@ -195,7 +223,7 @@ - /* routed to PCIe2 connector (CN62A) */ - }; - -- i2c@4 { -+ sfp_i2c: i2c@4 { - #address-cells = <1>; - #size-cells = <0>; - reg = <4>; diff --git a/target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch b/target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch deleted file mode 100644 index c69067dbdc..0000000000 --- a/target/linux/mvebu/patches-5.15/006-v5.11-ARM-dts-turris-omnia-add-LED-controller-node.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 91dd42d0e30fdbb250c61d1192af569f07e6ada4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= -Date: Sun, 15 Nov 2020 14:59:21 +0100 -Subject: ARM: dts: turris-omnia: add LED controller node -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Linux now has incomplete support for the LED controller on Turris Omnia: -it can set brightness and colors for each LED. - -The controller can also put these LEDs into HW controlled mode, in which -the LEDs are controlled by HW: for example the WAN LED is connected via -MCU to the WAN PHY LED pin. - -The driver does not support these HW controlled modes yet, and on probe -puts the LEDs into SW controlled mode. - -Add node describing the LED controller, but disable it for now. - -Signed-off-by: Marek Behún -Cc: linux-arm-kernel@lists.infradead.org -Cc: Uwe Kleine-König -Cc: Jason Cooper -Cc: Gregory CLEMENT -Cc: Andreas Färber -Cc: Rob Herring -Cc: devicetree@vger.kernel.org -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-turris-omnia.dts | 111 +++++++++++++++++++++++++- - 1 file changed, 110 insertions(+), 1 deletion(-) - ---- a/arch/arm/boot/dts/armada-385-turris-omnia.dts -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -12,6 +12,7 @@ - - #include - #include -+#include - #include "armada-385.dtsi" - - / { -@@ -181,7 +182,115 @@ - reg = <0>; - - /* STM32F0 command interface at address 0x2a */ -- /* leds device (in STM32F0) at address 0x2b */ -+ -+ led-controller@2b { -+ compatible = "cznic,turris-omnia-leds"; -+ reg = <0x2b>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* -+ * LEDs are controlled by MCU (STM32F0) at -+ * address 0x2b. -+ * -+ * The driver does not support HW control mode -+ * for the LEDs yet. Disable the LEDs for now. -+ * -+ * Also LED functions are not stable yet: -+ * - there are 3 LEDs connected via MCU to PCIe -+ * ports. One of these ports supports mSATA. -+ * There is no mSATA nor PCIe function. -+ * For now we use LED_FUNCTION_WLAN, since -+ * in most cases users have wifi cards in -+ * these slots -+ * - there are 2 LEDs dedicated for user: A and -+ * B. Again there is no such function defined. -+ * For now we use LED_FUNCTION_INDICATOR -+ */ -+ status = "disabled"; -+ -+ multi-led@0 { -+ reg = <0x0>; -+ color = ; -+ function = LED_FUNCTION_INDICATOR; -+ function-enumerator = <2>; -+ }; -+ -+ multi-led@1 { -+ reg = <0x1>; -+ color = ; -+ function = LED_FUNCTION_INDICATOR; -+ function-enumerator = <1>; -+ }; -+ -+ multi-led@2 { -+ reg = <0x2>; -+ color = ; -+ function = LED_FUNCTION_WLAN; -+ function-enumerator = <3>; -+ }; -+ -+ multi-led@3 { -+ reg = <0x3>; -+ color = ; -+ function = LED_FUNCTION_WLAN; -+ function-enumerator = <2>; -+ }; -+ -+ multi-led@4 { -+ reg = <0x4>; -+ color = ; -+ function = LED_FUNCTION_WLAN; -+ function-enumerator = <1>; -+ }; -+ -+ multi-led@5 { -+ reg = <0x5>; -+ color = ; -+ function = LED_FUNCTION_WAN; -+ }; -+ -+ multi-led@6 { -+ reg = <0x6>; -+ color = ; -+ function = LED_FUNCTION_LAN; -+ function-enumerator = <4>; -+ }; -+ -+ multi-led@7 { -+ reg = <0x7>; -+ color = ; -+ function = LED_FUNCTION_LAN; -+ function-enumerator = <3>; -+ }; -+ -+ multi-led@8 { -+ reg = <0x8>; -+ color = ; -+ function = LED_FUNCTION_LAN; -+ function-enumerator = <2>; -+ }; -+ -+ multi-led@9 { -+ reg = <0x9>; -+ color = ; -+ function = LED_FUNCTION_LAN; -+ function-enumerator = <1>; -+ }; -+ -+ multi-led@a { -+ reg = <0xa>; -+ color = ; -+ function = LED_FUNCTION_LAN; -+ function-enumerator = <0>; -+ }; -+ -+ multi-led@b { -+ reg = <0xb>; -+ color = ; -+ function = LED_FUNCTION_POWER; -+ }; -+ }; - - eeprom@54 { - compatible = "atmel,24c64"; diff --git a/target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch b/target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch deleted file mode 100644 index 603a29106b..0000000000 --- a/target/linux/mvebu/patches-5.15/007-v5.11-ARM-dts-turris-omnia-update-ethernet-phy-node-and-handle-name.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 8ee4a5f4f40da60bb85e13d9dd218a3c9197e3e3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Beh=C3=BAn?= -Date: Sun, 15 Nov 2020 14:59:22 +0100 -Subject: ARM: dts: turris-omnia: update ethernet-phy node and handle name -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Use property name `phy-handle` instead of the deprecated `phy` to -connect eth2 to the PHY. -Rename the node from "phy@1" to "ethernet-phy@1", since "phy@1" is -incorrect according to device-tree bindings documentation. -Also remove the "ethernet-phy-id0141.0DD1" compatible string, it is not -needed. Kernel can read the PHY identifier itself. - -Signed-off-by: Marek Behún -Reviewed-by: Andrew Lunn -Cc: linux-arm-kernel@lists.infradead.org -Cc: Uwe Kleine-König -Cc: Jason Cooper -Cc: Gregory CLEMENT -Cc: Andreas Färber -Cc: Rob Herring -Cc: devicetree@vger.kernel.org -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-turris-omnia.dts | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/arch/arm/boot/dts/armada-385-turris-omnia.dts -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -156,7 +156,7 @@ - */ - status = "okay"; - phy-mode = "sgmii"; -- phy = <&phy1>; -+ phy-handle = <&phy1>; - phys = <&comphy5 2>; - sfp = <&sfp>; - buffer-manager = <&bm>; -@@ -387,9 +387,9 @@ - pinctrl-0 = <&mdio_pins>; - status = "okay"; - -- phy1: phy@1 { -+ phy1: ethernet-phy@1 { - status = "okay"; -- compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22"; -+ compatible = "ethernet-phy-ieee802.3-c22"; - reg = <1>; - marvell,reg-init = <3 18 0 0x4985>; - diff --git a/target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch b/target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch deleted file mode 100644 index 7f5322e7f3..0000000000 --- a/target/linux/mvebu/patches-5.15/008-v5.12-ARM-dts-turris-omnia-fix-hardware-buffer-management.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5b2c7e0ae762fff2b172caf16b2766cc3e1ad859 Mon Sep 17 00:00:00 2001 -From: Rui Salvaterra -Date: Wed, 17 Feb 2021 15:30:38 +0000 -Subject: ARM: dts: turris-omnia: fix hardware buffer management -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Hardware buffer management has never worked on the Turris Omnia, as the -required MBus window hadn't been reserved. Fix thusly. - -Fixes: 018b88eee1a2 ("ARM: dts: turris-omnia: enable HW buffer management") - -Signed-off-by: Rui Salvaterra -Reviewed-by: Marek Behún -Tested-by: Klaus Kudielka -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-turris-omnia.dts | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/arch/arm/boot/dts/armada-385-turris-omnia.dts -+++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts -@@ -32,7 +32,8 @@ - ranges = ; -+ MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 -+ MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; - - internal-regs { - diff --git a/target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch b/target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch deleted file mode 100644 index 36d4942f8b..0000000000 --- a/target/linux/mvebu/patches-5.15/701-v5.14-net-ethernet-marvell-mvnetaMQPrio.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 4906887a8ae5f1296f8079bcf4565a6092a8e402 Mon Sep 17 00:00:00 2001 -From: Maxime Chevallier -Date: Tue, 16 Feb 2021 10:25:36 +0100 -Subject: net: mvneta: Implement mqprio support - -Implement a basic MQPrio support, inserting rules in RX that translate -the TC to prio mapping into vlan prio to queues. - -The TX logic stays the same as when we don't offload the qdisc. - -Signed-off-by: Maxime Chevallier -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/marvell/mvneta.c | 61 +++++++++++++++++++++++++++++++++++ - 1 file changed, 61 insertions(+) - -(limited to 'drivers/net/ethernet/marvell/mvneta.c') - ---- a/drivers/net/ethernet/marvell/mvneta.c -+++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -102,6 +102,8 @@ - #define MVNETA_TX_NO_DATA_SWAP BIT(5) - #define MVNETA_DESC_SWAP BIT(6) - #define MVNETA_TX_BRST_SZ_MASK(burst) ((burst) << 22) -+#define MVNETA_VLAN_PRIO_TO_RXQ 0x2440 -+#define MVNETA_VLAN_PRIO_RXQ_MAP(prio, rxq) ((rxq) << ((prio) * 3)) - #define MVNETA_PORT_STATUS 0x2444 - #define MVNETA_TX_IN_PRGRS BIT(0) - #define MVNETA_TX_FIFO_EMPTY BIT(8) -@@ -490,6 +492,7 @@ struct mvneta_port { - u8 mcast_count[256]; - u16 tx_ring_size; - u16 rx_ring_size; -+ u8 prio_tc_map[8]; - - phy_interface_t phy_interface; - struct device_node *dn; -@@ -4913,6 +4916,63 @@ static u16 mvneta_select_queue(struct ne - } - #endif - -+static void mvneta_clear_rx_prio_map(struct mvneta_port *pp) -+{ -+ mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, 0); -+} -+ -+static void mvneta_setup_rx_prio_map(struct mvneta_port *pp) -+{ -+ u32 val = 0; -+ int i; -+ -+ for (i = 0; i < rxq_number; i++) -+ val |= MVNETA_VLAN_PRIO_RXQ_MAP(i, pp->prio_tc_map[i]); -+ -+ mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); -+} -+ -+static int mvneta_setup_mqprio(struct net_device *dev, -+ struct tc_mqprio_qopt *qopt) -+{ -+ struct mvneta_port *pp = netdev_priv(dev); -+ u8 num_tc; -+ int i; -+ -+ qopt->hw = TC_MQPRIO_HW_OFFLOAD_TCS; -+ num_tc = qopt->num_tc; -+ -+ if (num_tc > rxq_number) -+ return -EINVAL; -+ -+ if (!num_tc) { -+ mvneta_clear_rx_prio_map(pp); -+ netdev_reset_tc(dev); -+ return 0; -+ } -+ -+ memcpy(pp->prio_tc_map, qopt->prio_tc_map, sizeof(pp->prio_tc_map)); -+ -+ mvneta_setup_rx_prio_map(pp); -+ -+ netdev_set_num_tc(dev, qopt->num_tc); -+ for (i = 0; i < qopt->num_tc; i++) -+ netdev_set_tc_queue(dev, i, qopt->count[i], qopt->offset[i]); -+ -+ return 0; -+} -+ -+static int mvneta_setup_tc(struct net_device *dev, enum tc_setup_type type, -+ void *type_data) -+{ -+ switch (type) { -+ case TC_SETUP_QDISC_MQPRIO: -+ return mvneta_setup_mqprio(dev, type_data); -+ default: -+ return -EOPNOTSUPP; -+ } -+} -+ - static const struct net_device_ops mvneta_netdev_ops = { - .ndo_open = mvneta_open, - .ndo_stop = mvneta_stop, -@@ -4928,6 +4988,7 @@ static const struct net_device_ops mvnet - #endif - .ndo_bpf = mvneta_xdp, - .ndo_xdp_xmit = mvneta_xdp_xmit, -+ .ndo_setup_tc = mvneta_setup_tc, - }; - - static const struct ethtool_ops mvneta_eth_tool_ops = { From 7d139bd5f37cda7f081174a0e5afc53988a37029 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Sun, 10 Apr 2022 12:42:32 +0100 Subject: [PATCH 74/80] mvebu: refresh 5.15 patches Deleted (upstreamed): 303-linksys_hardcode_nand_ecc_settings.patch [1] Deleted (not needed): 314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch [2] Manually rebased: 700-mvneta-tx-queue-workaround.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4daff3e5b42422cd4af758cc7768223d2b7f6e14 [2] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=7f73acade0cde61341cb77e0dc74de51ac059d4f Signed-off-by: Rui Salvaterra --- ...Mangle-bootloader-s-kernel-arguments.patch | 6 ++-- .../patches-5.15/302-add_powertables.patch | 2 +- ...3-linksys_hardcode_nand_ecc_settings.patch | 17 ---------- ...witch-PHY-operation-mode-to-2500base.patch | 34 ------------------- .../700-mvneta-tx-queue-workaround.patch | 10 +++--- ...ethernet-marvell-mvnetaMQPrioOffload.patch | 4 +-- ...xt-ethernet-marvell-mvnetaMQPrioFlag.patch | 2 +- ...t-ethernet-marvell-mvnetaMQPrioQueue.patch | 6 ++-- ...hernet-marvell-mvnetaMQPrioTCOffload.patch | 6 ++-- ...-pci-mvebu-time-out-reset-on-link-up.patch | 6 ++-- ...IEI-vendor-prefix-and-IEI-WT61P803-P.patch | 2 +- ...a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch | 6 ++-- ...d-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch | 4 +-- ...d-the-IEI-WT61P803-PUZZLE-LED-driver.patch | 6 ++-- ...mon-Add-iei-wt61p803-puzzle-hwmon-dr.patch | 2 +- ...an-entry-for-the-IEI-WT61P803-PUZZLE.patch | 2 +- 16 files changed, 32 insertions(+), 83 deletions(-) delete mode 100644 target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch delete mode 100644 target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch diff --git a/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch index 36f10fcfb5..071ea6742d 100644 --- a/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -28,7 +28,7 @@ Signed-off-by: Michael Gray --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1781,6 +1781,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN +@@ -1727,6 +1727,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN The command-line arguments provided by the boot loader will be appended to the the device tree bootargs property. @@ -176,7 +176,7 @@ Signed-off-by: Michael Gray } --- a/init/main.c +++ b/init/main.c -@@ -110,6 +110,10 @@ +@@ -113,6 +113,10 @@ #include @@ -187,7 +187,7 @@ Signed-off-by: Michael Gray static int kernel_init(void *); extern void init_IRQ(void); -@@ -904,6 +908,18 @@ asmlinkage __visible void __init __no_sa +@@ -990,6 +994,18 @@ asmlinkage __visible void __init __no_sa page_alloc_init(); pr_notice("Kernel command line: %s\n", saved_command_line); diff --git a/target/linux/mvebu/patches-5.15/302-add_powertables.patch b/target/linux/mvebu/patches-5.15/302-add_powertables.patch index efbbbc7d78..93ad5de2cc 100644 --- a/target/linux/mvebu/patches-5.15/302-add_powertables.patch +++ b/target/linux/mvebu/patches-5.15/302-add_powertables.patch @@ -1,6 +1,6 @@ --- a/arch/arm/boot/dts/armada-385-linksys.dtsi +++ b/arch/arm/boot/dts/armada-385-linksys.dtsi -@@ -212,11 +212,19 @@ +@@ -214,11 +214,19 @@ &pcie1 { /* Marvell 88W8864, 5GHz-only */ status = "okay"; diff --git a/target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch b/target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch deleted file mode 100644 index 89a5e19803..0000000000 --- a/target/linux/mvebu/patches-5.15/303-linksys_hardcode_nand_ecc_settings.patch +++ /dev/null @@ -1,17 +0,0 @@ -Newer Linksys boards might come with a Winbond W29N02GV which can be -configured in different ways. Make sure we configure it the same way -as the older chips so everything keeps working. - -Signed-off-by: Imre Kaloz - ---- a/arch/arm/boot/dts/armada-385-linksys.dtsi -+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi -@@ -148,6 +148,8 @@ - reg = <0>; - label = "pxa3xx_nand-0"; - nand-rb = <0>; -+ nand-ecc-strength = <4>; -+ nand-ecc-step-size = <512>; - marvell,nand-keep-config; - nand-on-flash-bbt; - }; diff --git a/target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch b/target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch deleted file mode 100644 index 2240d0b39e..0000000000 --- a/target/linux/mvebu/patches-5.15/314-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch +++ /dev/null @@ -1,34 +0,0 @@ -Certain SFP modules (most notably Nokia GPON ones) first check -connectivity on 1000base-x, and switch to 2500base-x afterwards. This -is considered a quirk so the phylink switches the interface to -2500base-x as well. - -However, after power-cycling the uDPU device, network interface/SFP module -will not work correctly until the module is re-seated. This patch -resolves this issue by forcing the interface to be brought up in -2500base-x mode by default. - -Signed-off-by: Jakov Petrina -Signed-off-by: Vladimir Vid -Cc: Luka Perkov - ---- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts -+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts -@@ -162,7 +162,7 @@ - }; - - ð0 { -- phy-mode = "sgmii"; -+ phy-mode = "2500base-x"; - status = "okay"; - managed = "in-band-status"; - phys = <&comphy1 0>; -@@ -170,7 +170,7 @@ - }; - - ð1 { -- phy-mode = "sgmii"; -+ phy-mode = "2500base-x"; - status = "okay"; - managed = "in-band-status"; - phys = <&comphy0 1>; diff --git a/target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch index a0f15681f5..6c07a2915b 100644 --- a/target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch +++ b/target/linux/mvebu/patches-5.15/700-mvneta-tx-queue-workaround.patch @@ -9,8 +9,8 @@ Signed-off-by: Felix Fietkau --- --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4903,6 +4903,16 @@ static int mvneta_ethtool_set_eee(struct - return phylink_ethtool_set_eee(pp->phylink, eee); +@@ -4987,6 +4987,16 @@ static int mvneta_setup_tc(struct net_de + } } +#ifndef CONFIG_ARM64 @@ -26,13 +26,13 @@ Signed-off-by: Felix Fietkau static const struct net_device_ops mvneta_netdev_ops = { .ndo_open = mvneta_open, .ndo_stop = mvneta_stop, -@@ -4913,6 +4923,9 @@ static const struct net_device_ops mvnet +@@ -4997,6 +5007,9 @@ static const struct net_device_ops mvnet .ndo_fix_features = mvneta_fix_features, .ndo_get_stats64 = mvneta_get_stats64, - .ndo_do_ioctl = mvneta_ioctl, + .ndo_eth_ioctl = mvneta_ioctl, +#ifndef CONFIG_ARM64 + .ndo_select_queue = mvneta_select_queue, +#endif .ndo_bpf = mvneta_xdp, .ndo_xdp_xmit = mvneta_xdp_xmit, - }; + .ndo_setup_tc = mvneta_setup_tc, diff --git a/target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch b/target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch index 41f8c1fbfd..96f5042e69 100644 --- a/target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch +++ b/target/linux/mvebu/patches-5.15/702-net-next-ethernet-marvell-mvnetaMQPrioOffload.patch @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller #include /* Registers */ -@@ -4933,14 +4934,14 @@ static void mvneta_setup_rx_prio_map(str +@@ -4947,14 +4948,14 @@ static void mvneta_setup_rx_prio_map(str } static int mvneta_setup_mqprio(struct net_device *dev, @@ -44,7 +44,7 @@ Signed-off-by: David S. Miller if (num_tc > rxq_number) return -EINVAL; -@@ -4951,13 +4952,15 @@ static int mvneta_setup_mqprio(struct ne +@@ -4965,13 +4966,15 @@ static int mvneta_setup_mqprio(struct ne return 0; } diff --git a/target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch b/target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch index 8529b6ae5e..997f301f39 100644 --- a/target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch +++ b/target/linux/mvebu/patches-5.15/703-net-next-ethernet-marvell-mvnetaMQPrioFlag.patch @@ -17,7 +17,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c -@@ -4940,7 +4940,9 @@ static int mvneta_setup_mqprio(struct ne +@@ -4954,7 +4954,9 @@ static int mvneta_setup_mqprio(struct ne u8 num_tc; int i; diff --git a/target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch b/target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch index ed4f0441dd..73563a57a0 100644 --- a/target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch +++ b/target/linux/mvebu/patches-5.15/704-net-next-ethernet-marvell-mvnetaMQPrioQueue.patch @@ -30,7 +30,7 @@ Signed-off-by: David S. Miller phy_interface_t phy_interface; struct device_node *dn; -@@ -4922,13 +4921,12 @@ static void mvneta_clear_rx_prio_map(str +@@ -4936,13 +4935,12 @@ static void mvneta_clear_rx_prio_map(str mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, 0); } @@ -48,7 +48,7 @@ Signed-off-by: David S. Miller mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); } -@@ -4937,8 +4935,8 @@ static int mvneta_setup_mqprio(struct ne +@@ -4951,8 +4949,8 @@ static int mvneta_setup_mqprio(struct ne struct tc_mqprio_qopt_offload *mqprio) { struct mvneta_port *pp = netdev_priv(dev); @@ -58,7 +58,7 @@ Signed-off-by: David S. Miller if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) return 0; -@@ -4948,21 +4946,28 @@ static int mvneta_setup_mqprio(struct ne +@@ -4962,21 +4960,28 @@ static int mvneta_setup_mqprio(struct ne if (num_tc > rxq_number) return -EINVAL; diff --git a/target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch b/target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch index 15a0ce6b58..7b837d0b49 100644 --- a/target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch +++ b/target/linux/mvebu/patches-5.15/705-net-next-ethernet-marvell-mvnetaMQPrioTCOffload.patch @@ -62,7 +62,7 @@ Signed-off-by: David S. Miller #define MVNETA_LPI_CTRL_0 0x2cc0 #define MVNETA_LPI_CTRL_1 0x2cc4 #define MVNETA_LPI_REQUEST_ENABLE BIT(0) -@@ -4931,11 +4958,74 @@ static void mvneta_map_vlan_prio_to_rxq( +@@ -4945,11 +4972,74 @@ static void mvneta_map_vlan_prio_to_rxq( mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val); } @@ -138,7 +138,7 @@ Signed-off-by: David S. Miller u8 num_tc; if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) -@@ -4949,6 +5039,7 @@ static int mvneta_setup_mqprio(struct ne +@@ -4963,6 +5053,7 @@ static int mvneta_setup_mqprio(struct ne mvneta_clear_rx_prio_map(pp); if (!num_tc) { @@ -146,7 +146,7 @@ Signed-off-by: David S. Miller netdev_reset_tc(dev); return 0; } -@@ -4969,6 +5060,33 @@ static int mvneta_setup_mqprio(struct ne +@@ -4983,6 +5074,33 @@ static int mvneta_setup_mqprio(struct ne } } diff --git a/target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch b/target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch index a5e49552e9..dba1253699 100644 --- a/target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch +++ b/target/linux/mvebu/patches-5.15/801-pci-mvebu-time-out-reset-on-link-up.patch @@ -13,7 +13,7 @@ Signed-off-by: Russell King --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c -@@ -941,6 +941,7 @@ static int mvebu_pcie_powerup(struct mve +@@ -1023,6 +1023,7 @@ static int mvebu_pcie_powerup(struct mve if (port->reset_gpio) { u32 reset_udelay = PCI_PM_D3COLD_WAIT * 1000; @@ -21,7 +21,7 @@ Signed-off-by: Russell King of_property_read_u32(port->dn, "reset-delay-us", &reset_udelay); -@@ -948,7 +949,13 @@ static int mvebu_pcie_powerup(struct mve +@@ -1030,7 +1031,13 @@ static int mvebu_pcie_powerup(struct mve udelay(100); gpiod_set_value_cansleep(port->reset_gpio, 0); @@ -36,7 +36,7 @@ Signed-off-by: Russell King } return 0; -@@ -1108,15 +1115,16 @@ static int mvebu_pcie_probe(struct platf +@@ -1190,15 +1197,16 @@ static int mvebu_pcie_probe(struct platf if (!child) continue; diff --git a/target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch b/target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch index 28b2b19499..3446086cad 100644 --- a/target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch +++ b/target/linux/mvebu/patches-5.15/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch @@ -207,7 +207,7 @@ Cc: Robert Marko + }; --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml -@@ -475,6 +475,8 @@ patternProperties: +@@ -519,6 +519,8 @@ patternProperties: description: IC Plus Corp. "^idt,.*": description: Integrated Device Technologies, Inc. diff --git a/target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch b/target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch index 01c2ecce0d..84d995b902 100644 --- a/target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch +++ b/target/linux/mvebu/patches-5.15/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch @@ -26,7 +26,7 @@ Cc: Robert Marko --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig -@@ -2155,6 +2155,15 @@ config SGI_MFD_IOC3 +@@ -2187,6 +2187,15 @@ config SGI_MFD_IOC3 If you have an SGI Origin, Octane, or a PCI IOC3 card, then say Y. Otherwise say N. @@ -44,8 +44,8 @@ Cc: Robert Marko depends on SPI_MASTER --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile -@@ -237,6 +237,7 @@ obj-$(CONFIG_MFD_HI655X_PMIC) += hi655 - obj-$(CONFIG_MFD_DLN2) += dln2.o +@@ -237,6 +237,7 @@ obj-$(CONFIG_MFD_DLN2) += dln2.o + obj-$(CONFIG_MFD_RT4831) += rt4831.o obj-$(CONFIG_MFD_RT5033) += rt5033.o obj-$(CONFIG_MFD_SKY81452) += sky81452.o +obj-$(CONFIG_MFD_IEI_WT61P803_PUZZLE) += iei-wt61p803-puzzle.o diff --git a/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch b/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch index 684f09c800..c22314e41c 100644 --- a/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch +++ b/target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch @@ -26,7 +26,7 @@ Cc: Robert Marko --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig -@@ -722,6 +722,14 @@ config SENSORS_IBMPOWERNV +@@ -732,6 +732,14 @@ config SENSORS_IBMPOWERNV This driver can also be built as a module. If so, the module will be called ibmpowernv. @@ -43,7 +43,7 @@ Cc: Robert Marko depends on IIO --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile -@@ -83,6 +83,7 @@ obj-$(CONFIG_SENSORS_HIH6130) += hih6130 +@@ -84,6 +84,7 @@ obj-$(CONFIG_SENSORS_HIH6130) += hih6130 obj-$(CONFIG_SENSORS_ULTRA45) += ultra45_env.o obj-$(CONFIG_SENSORS_I5500) += i5500_temp.o obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o diff --git a/target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch b/target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch index 37f98b6ba8..a3fc731c47 100644 --- a/target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch +++ b/target/linux/mvebu/patches-5.15/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch @@ -30,7 +30,7 @@ Cc: Robert Marko --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig -@@ -333,6 +333,14 @@ config LEDS_IPAQ_MICRO +@@ -306,6 +306,14 @@ config LEDS_IPAQ_MICRO Choose this option if you want to use the notification LED on Compaq/HP iPAQ h3100 and h3600. @@ -47,14 +47,14 @@ Cc: Robert Marko depends on LEDS_CLASS --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile -@@ -35,6 +35,7 @@ obj-$(CONFIG_LEDS_HP6XX) += leds-hp6xx. +@@ -33,6 +33,7 @@ obj-$(CONFIG_LEDS_HP6XX) += leds-hp6xx. obj-$(CONFIG_LEDS_INTEL_SS4200) += leds-ss4200.o obj-$(CONFIG_LEDS_IP30) += leds-ip30.o obj-$(CONFIG_LEDS_IPAQ_MICRO) += leds-ipaq-micro.o +obj-$(CONFIG_LEDS_IEI_WT61P803_PUZZLE) += leds-iei-wt61p803-puzzle.o obj-$(CONFIG_LEDS_IS31FL319X) += leds-is31fl319x.o obj-$(CONFIG_LEDS_IS31FL32XX) += leds-is31fl32xx.o - obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o + obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o --- /dev/null +++ b/drivers/leds/leds-iei-wt61p803-puzzle.c @@ -0,0 +1,147 @@ diff --git a/target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch b/target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch index 345d4ca03b..9015436f6a 100644 --- a/target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch +++ b/target/linux/mvebu/patches-5.15/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch @@ -64,7 +64,7 @@ Cc: Robert Marko +================= == ===================================================== --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst -@@ -71,6 +71,7 @@ Hardware Monitoring Kernel Drivers +@@ -74,6 +74,7 @@ Hardware Monitoring Kernel Drivers ibmaem ibm-cffps ibmpowernv diff --git a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch index 577a9b40de..f2f4748e00 100644 --- a/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch +++ b/target/linux/mvebu/patches-5.15/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch @@ -16,7 +16,7 @@ Cc: Robert Marko --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -8538,6 +8538,22 @@ F: include/net/nl802154.h +@@ -9066,6 +9066,22 @@ F: include/net/nl802154.h F: net/ieee802154/ F: net/mac802154/ From 3f4990ce0f562ea8af42074c0062ea561c6c9794 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 4 Apr 2022 15:54:26 +0100 Subject: [PATCH 75/80] mvebu: copy 5.10 kconfigs to 5.15 Will be refreshed/updated later. Signed-off-by: Rui Salvaterra --- target/linux/mvebu/config-5.15 | 426 +++++++++++++++++++++++ target/linux/mvebu/cortexa53/config-5.15 | 83 +++++ target/linux/mvebu/cortexa72/config-5.15 | 99 ++++++ target/linux/mvebu/cortexa9/config-5.15 | 2 + 4 files changed, 610 insertions(+) create mode 100644 target/linux/mvebu/config-5.15 create mode 100644 target/linux/mvebu/cortexa53/config-5.15 create mode 100644 target/linux/mvebu/cortexa72/config-5.15 create mode 100644 target/linux/mvebu/cortexa9/config-5.15 diff --git a/target/linux/mvebu/config-5.15 b/target/linux/mvebu/config-5.15 new file mode 100644 index 0000000000..0bce22daee --- /dev/null +++ b/target/linux/mvebu/config-5.15 @@ -0,0 +1,426 @@ +CONFIG_AHCI_MVEBU=y +CONFIG_ALIGNMENT_TRAP=y +CONFIG_ARCH_32BIT_OFF_T=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_KEEP_MEMBLOCK=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_V6_V7=y +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_MVEBU=y +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM=y +CONFIG_ARMADA_370_CLK=y +CONFIG_ARMADA_370_XP_IRQ=y +CONFIG_ARMADA_370_XP_TIMER=y +# CONFIG_ARMADA_37XX_WATCHDOG is not set +CONFIG_ARMADA_38X_CLK=y +CONFIG_ARMADA_THERMAL=y +CONFIG_ARMADA_XP_CLK=y +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +# CONFIG_ARM_ARMADA_37XX_CPUFREQ is not set +# CONFIG_ARM_ARMADA_8K_CPUFREQ is not set +CONFIG_ARM_ATAG_DTB_COMPAT=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_ARM_CRYPTO=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ERRATA_764369=y +CONFIG_ARM_GIC=y +CONFIG_ARM_GLOBAL_TIMER=y +CONFIG_ARM_HAS_SG_CHAIN=y +CONFIG_ARM_HEAVY_MB=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_MVEBU_V7_CPUIDLE=y +CONFIG_ARM_PATCH_IDIV=y +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_ARM_THUMB=y +CONFIG_ARM_UNWIND=y +CONFIG_ARM_VIRT_EXT=y +CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y +CONFIG_ATA=y +CONFIG_ATAGS=y +CONFIG_ATA_LEDS=y +CONFIG_AUTO_ZRELADDR=y +CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NVME=y +CONFIG_BLK_DEV_SD=y +CONFIG_BLK_MQ_PCI=y +CONFIG_BLK_SCSI_REQUEST=y +CONFIG_BOUNCE=y +# CONFIG_CACHE_FEROCEON_L2 is not set +CONFIG_CACHE_L2X0=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y +CONFIG_CLKSRC_MMIO=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_CPUFREQ_DT=y +CONFIG_CPUFREQ_DT_PLATDEV=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_PJ4B=y +CONFIG_CPU_PM=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_SPECTRE=y +CONFIG_CPU_THERMAL=y +CONFIG_CPU_THUMB_CAPABLE=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_V7=y +CONFIG_CRC16=y +CONFIG_CRYPTO_ACOMP2=y +CONFIG_CRYPTO_AES_ARM=y +CONFIG_CRYPTO_AES_ARM_BS=y +CONFIG_CRYPTO_AUTHENC=y +CONFIG_CRYPTO_CRC32=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CRYPTD=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_DEV_MARVELL=y +CONFIG_CRYPTO_DEV_MARVELL_CESA=y +CONFIG_CRYPTO_ESSIV=y +CONFIG_CRYPTO_HASH_INFO=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_LIB_DES=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA1_ARM=y +CONFIG_CRYPTO_SHA1_ARM_NEON=y +CONFIG_CRYPTO_SHA256_ARM=y +CONFIG_CRYPTO_SHA512_ARM=y +CONFIG_CRYPTO_SIMD=y +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_DEBUG_ALIGN_RODATA=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_LL_INCLUDE="debug/8250.S" +CONFIG_DEBUG_MVEBU_UART0=y +# CONFIG_DEBUG_MVEBU_UART0_ALTERNATE is not set +# CONFIG_DEBUG_MVEBU_UART1_ALTERNATE is not set +CONFIG_DEBUG_UART_8250=y +CONFIG_DEBUG_UART_8250_SHIFT=2 +CONFIG_DEBUG_UART_PHYS=0xd0012000 +CONFIG_DEBUG_UART_VIRT=0xfec12000 +CONFIG_DEBUG_UNCOMPRESS=y +CONFIG_DEBUG_USER=y +CONFIG_DMADEVICES=y +CONFIG_DMA_ENGINE=y +CONFIG_DMA_ENGINE_RAID=y +CONFIG_DMA_OF=y +CONFIG_DMA_OPS=y +CONFIG_DMA_REMAP=y +CONFIG_DTC=y +CONFIG_EARLY_PRINTK=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +CONFIG_EXT4_FS=y +CONFIG_EXTCON=y +CONFIG_F2FS_FS=y +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_FS_IOMAP=y +CONFIG_FS_MBCACHE=y +CONFIG_FW_LOADER_PAGED_BUF=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ARCH_TOPOLOGY=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y +CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_PHY=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GENERIC_VDSO_32=y +CONFIG_GLOB=y +CONFIG_GPIOLIB=y +CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_GPIO_MVEBU=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GRO_CELLS=y +CONFIG_HANDLE_DOMAIN_IRQ=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HAVE_SMP=y +CONFIG_HIGHMEM=y +CONFIG_HIGHPTE=y +CONFIG_HOTPLUG_CPU=y +CONFIG_HWBM=y +CONFIG_HWMON=y +CONFIG_HW_RANDOM=y +CONFIG_HZ_FIXED=0 +CONFIG_HZ_PERIODIC=y +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MV64XXX=y +# CONFIG_I2C_PXA is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +# CONFIG_IWMMXT is not set +CONFIG_JBD2=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PCA963X=y +CONFIG_LEDS_TLC591XX=y +CONFIG_LEDS_TRIGGER_DISK=y +CONFIG_LIBFDT=y +CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_MACH_ARMADA_370=y +# CONFIG_MACH_ARMADA_375 is not set +CONFIG_MACH_ARMADA_38X=y +# CONFIG_MACH_ARMADA_39X is not set +CONFIG_MACH_ARMADA_XP=y +# CONFIG_MACH_DOVE is not set +CONFIG_MACH_MVEBU_ANY=y +CONFIG_MACH_MVEBU_V7=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MANGLE_BOOTARGS=y +CONFIG_MARVELL_PHY=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_I2C=y +CONFIG_MEMFD_CREATE=y +CONFIG_MEMORY=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_MVSDIO=y +CONFIG_MMC_SDHCI=y +# CONFIG_MMC_SDHCI_PCI is not set +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_PXAV3=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_NAND_CORE=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_SW_HAMMING=y +CONFIG_MTD_NAND_MARVELL=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_MVEBU_CLK_COMMON=y +CONFIG_MVEBU_CLK_COREDIV=y +CONFIG_MVEBU_CLK_CPU=y +CONFIG_MVEBU_DEVBUS=y +CONFIG_MVEBU_MBUS=y +CONFIG_MVMDIO=y +CONFIG_MVNETA=y +CONFIG_MVNETA_BM=y +CONFIG_MVNETA_BM_ENABLE=y +# CONFIG_MVPP2 is not set +CONFIG_MV_XOR=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEON=y +CONFIG_NET_DEVLINK=y +CONFIG_NET_DSA=y +CONFIG_NET_DSA_MV88E6XXX=y +CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y +CONFIG_NET_DSA_TAG_DSA=y +CONFIG_NET_DSA_TAG_EDSA=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SWITCHDEV=y +CONFIG_NLS=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_NR_CPUS=4 +CONFIG_NVMEM=y +CONFIG_NVME_CORE=y +# CONFIG_NVME_HWMON is not set +# CONFIG_NVME_MULTIPATH is not set +# CONFIG_NVME_TCP is not set +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_KOBJ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_ORION_WATCHDOG=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_PADATA=y +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PAGE_POOL=y +CONFIG_PCI=y +CONFIG_PCI_BRIDGE_EMUL=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DOMAINS_GENERIC=y +CONFIG_PCI_MSI=y +CONFIG_PCI_MSI_IRQ_DOMAIN=y +CONFIG_PCI_MVEBU=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYLINK=y +# CONFIG_PHY_MVEBU_A3700_COMPHY is not set +# CONFIG_PHY_MVEBU_A3700_UTMI is not set +# CONFIG_PHY_MVEBU_A38X_COMPHY is not set +# CONFIG_PHY_MVEBU_CP110_COMPHY is not set +CONFIG_PINCTRL=y +CONFIG_PINCTRL_ARMADA_370=y +CONFIG_PINCTRL_ARMADA_38X=y +CONFIG_PINCTRL_ARMADA_XP=y +CONFIG_PINCTRL_MVEBU=y +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_PJ4B_ERRATA_4742=y +CONFIG_PL310_ERRATA_753970=y +CONFIG_PLAT_ORION=y +CONFIG_PM_OPP=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=11 +CONFIG_PWM=y +CONFIG_PWM_SYSFS=y +CONFIG_RATIONAL=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_ARMADA38X=y +# CONFIG_RTC_DRV_MV is not set +CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RTC_MC146818_LIB=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_SATA_HOST=y +CONFIG_SATA_MV=y +CONFIG_SATA_PMP=y +CONFIG_SCSI=y +CONFIG_SENSORS_PWM_FAN=y +CONFIG_SENSORS_TMP421=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_8250_DWLIB=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_MVEBU_CONSOLE=y +CONFIG_SERIAL_MVEBU_UART=y +CONFIG_SFP=y +CONFIG_SGL_ALLOC=y +CONFIG_SG_POOL=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_SOC_BUS=y +CONFIG_SPARSE_IRQ=y +CONFIG_SPI=y +# CONFIG_SPI_ARMADA_3700 is not set +CONFIG_SPI_MASTER=y +CONFIG_SPI_MEM=y +CONFIG_SPI_ORION=y +CONFIG_SRAM=y +CONFIG_SRAM_EXEC=y +CONFIG_SRCU=y +CONFIG_SWPHY=y +CONFIG_SWP_EMULATE=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 +CONFIG_THERMAL_GOV_STEP_WISE=y +CONFIG_THERMAL_HWMON=y +CONFIG_THERMAL_OF=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TREE_RCU=y +CONFIG_TREE_SRCU=y +CONFIG_UBIFS_FS=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNWINDER_ARM=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_ORION=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_LEDS_TRIGGER_USBPORT=y +CONFIG_USB_PHY=y +CONFIG_USB_STORAGE=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_MVEBU=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USE_OF=y +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_WATCHDOG_CORE=y +CONFIG_XPS=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/mvebu/cortexa53/config-5.15 b/target/linux/mvebu/cortexa53/config-5.15 new file mode 100644 index 0000000000..a47d66c669 --- /dev/null +++ b/target/linux/mvebu/cortexa53/config-5.15 @@ -0,0 +1,83 @@ +CONFIG_64BIT=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=24 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_PROC_KCORE_TEXT=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_STACKWALK=y +CONFIG_ARM64=y +CONFIG_ARM64_4K_PAGES=y +CONFIG_ARM64_PAGE_SHIFT=12 +CONFIG_ARM64_PA_BITS=48 +CONFIG_ARM64_PA_BITS_48=y +CONFIG_ARM64_PTR_AUTH=y +CONFIG_ARM64_SVE=y +CONFIG_ARM64_TAGGED_ADDR_ABI=y +CONFIG_ARM64_VA_BITS=39 +CONFIG_ARM64_VA_BITS_39=y +CONFIG_ARMADA_37XX_CLK=y +CONFIG_ARMADA_37XX_WATCHDOG=y +CONFIG_ARMADA_37XX_RWTM_MBOX=y +CONFIG_ARMADA_AP806_SYSCON=y +CONFIG_ARMADA_AP_CP_HELPER=y +CONFIG_ARMADA_CP110_SYSCON=y +CONFIG_ARM_AMBA=y +CONFIG_ARM_ARMADA_37XX_CPUFREQ=y +CONFIG_ARM_GIC_V2M=y +CONFIG_ARM_GIC_V3=y +CONFIG_ARM_GIC_V3_ITS=y +CONFIG_ARM_GIC_V3_ITS_PCI=y +# CONFIG_ARM_PL172_MPMC is not set +CONFIG_ARM_PSCI_FW=y +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y +CONFIG_DMA_DIRECT_REMAP=y +# CONFIG_FLATMEM_MANUAL is not set +CONFIG_FRAME_POINTER=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_PINCONF=y +CONFIG_HOLES_IN_ZONE=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_MAILBOX=y +# CONFIG_MAILBOX_TEST is not set +CONFIG_MFD_SYSCON=y +CONFIG_MMC_SDHCI_XENON=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_MVEBU_GICP=y +CONFIG_MVEBU_ICU=y +CONFIG_MVEBU_ODMI=y +CONFIG_MVEBU_PIC=y +CONFIG_MVEBU_SEI=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_PARTITION_PERCPU=y +CONFIG_PCI_AARDVARK=y +CONFIG_PGTABLE_LEVELS=3 +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PHY_MVEBU_A3700_COMPHY=y +CONFIG_PHY_MVEBU_A3700_UTMI=y +CONFIG_PINCTRL_ARMADA_37XX=y +CONFIG_PINCTRL_ARMADA_AP806=y +CONFIG_PINCTRL_ARMADA_CP110=y +CONFIG_POWER_SUPPLY=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_REGULATOR_GPIO=y +CONFIG_RODATA_FULL_DEFAULT_ENABLED=y +CONFIG_SPARSEMEM=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPI_ARMADA_3700=y +CONFIG_SWIOTLB=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_TURRIS_MOX_RWTM=y +CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_VMAP_STACK=y +CONFIG_ZONE_DMA32=y diff --git a/target/linux/mvebu/cortexa72/config-5.15 b/target/linux/mvebu/cortexa72/config-5.15 new file mode 100644 index 0000000000..8d1ec7a283 --- /dev/null +++ b/target/linux/mvebu/cortexa72/config-5.15 @@ -0,0 +1,99 @@ +CONFIG_64BIT=y +CONFIG_AQUANTIA_PHY=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=24 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_PROC_KCORE_TEXT=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_STACKWALK=y +CONFIG_ARM64=y +CONFIG_ARM64_4K_PAGES=y +CONFIG_ARM64_PAGE_SHIFT=12 +CONFIG_ARM64_PA_BITS=48 +CONFIG_ARM64_PA_BITS_48=y +# CONFIG_ARM64_PTR_AUTH is not set +CONFIG_ARM64_SVE=y +# CONFIG_ARM64_TAGGED_ADDR_ABI is not set +CONFIG_ARM64_VA_BITS=39 +CONFIG_ARM64_VA_BITS_39=y +CONFIG_ARMADA_37XX_CLK=y +CONFIG_ARMADA_AP806_SYSCON=y +CONFIG_ARMADA_AP_CP_HELPER=y +CONFIG_ARMADA_CP110_SYSCON=y +CONFIG_ARM_AMBA=y +CONFIG_ARM_ARMADA_8K_CPUFREQ=y +CONFIG_ARM_GIC_V2M=y +CONFIG_ARM_GIC_V3=y +CONFIG_ARM_GIC_V3_ITS=y +CONFIG_ARM_GIC_V3_ITS_PCI=y +# CONFIG_ARM_PL172_MPMC is not set +CONFIG_ARM_PSCI_FW=y +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y +CONFIG_CRYPTO_ZSTD=y +CONFIG_DMA_DIRECT_REMAP=y +# CONFIG_FLATMEM_MANUAL is not set +CONFIG_FRAME_POINTER=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_PINCONF=y +CONFIG_HOLES_IN_ZONE=y +CONFIG_HW_RANDOM_OMAP=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_LEDS_IS31FL319X=y +CONFIG_LEDS_IEI_WT61P803_PUZZLE=y +CONFIG_MARVELL_10G_PHY=y +CONFIG_MDIO_DEVRES=y +CONFIG_MFD_IEI_WT61P803_PUZZLE=y +CONFIG_MFD_SYSCON=y +CONFIG_MMC_SDHCI_XENON=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_MVEBU_GICP=y +CONFIG_MVEBU_ICU=y +CONFIG_MVEBU_ODMI=y +CONFIG_MVEBU_PIC=y +CONFIG_MVEBU_SEI=y +CONFIG_MVPP2=y +CONFIG_MV_XOR_V2=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_PARTITION_PERCPU=y +CONFIG_PCIEAER=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCIE_ARMADA_8K=y +CONFIG_PCIE_DW=y +CONFIG_PCIE_DW_HOST=y +# CONFIG_PCI_AARDVARK is not set +CONFIG_PGTABLE_LEVELS=3 +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PHY_MVEBU_CP110_COMPHY=y +CONFIG_PINCTRL_ARMADA_37XX=y +CONFIG_PINCTRL_ARMADA_AP806=y +CONFIG_PINCTRL_ARMADA_CP110=y +CONFIG_POWER_SUPPLY=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_RAS=y +# CONFIG_RAVE_SP_CORE is not set +CONFIG_REGULATOR_GPIO=y +# CONFIG_RODATA_FULL_DEFAULT_ENABLED is not set +CONFIG_SENSORS_IEI_WT61P803_PUZZLE_HWMON=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y +CONFIG_SPARSEMEM=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SWIOTLB=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_THREAD_INFO_IN_TASK=y +CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_VMAP_STACK=y +CONFIG_XXHASH=y +CONFIG_ZONE_DMA32=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/mvebu/cortexa9/config-5.15 b/target/linux/mvebu/cortexa9/config-5.15 new file mode 100644 index 0000000000..b737c44d42 --- /dev/null +++ b/target/linux/mvebu/cortexa9/config-5.15 @@ -0,0 +1,2 @@ +CONFIG_PHY_MVEBU_A38X_COMPHY=y +CONFIG_RTC_DRV_MV=y From 53c969e97e319cb60c9d7cf68449e9fc9d850df0 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 4 Apr 2022 15:58:47 +0100 Subject: [PATCH 76/80] mvebu: update the kconfigs for 5.15 And remove irrelevant stuff while at it. Signed-off-by: Rui Salvaterra --- target/linux/mvebu/config-5.15 | 29 ++++++++++++++++-------- target/linux/mvebu/cortexa53/config-5.15 | 19 ++++++++-------- target/linux/mvebu/cortexa72/config-5.15 | 18 +++++++-------- 3 files changed, 38 insertions(+), 28 deletions(-) diff --git a/target/linux/mvebu/config-5.15 b/target/linux/mvebu/config-5.15 index 0bce22daee..d2a95ce32f 100644 --- a/target/linux/mvebu/config-5.15 +++ b/target/linux/mvebu/config-5.15 @@ -1,3 +1,4 @@ +CONFIG_AF_UNIX_OOB=y CONFIG_AHCI_MVEBU=y CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_32BIT_OFF_T=y @@ -23,8 +24,6 @@ CONFIG_ARMADA_38X_CLK=y CONFIG_ARMADA_THERMAL=y CONFIG_ARMADA_XP_CLK=y CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y # CONFIG_ARM_ARMADA_37XX_CPUFREQ is not set # CONFIG_ARM_ARMADA_8K_CPUFREQ is not set CONFIG_ARM_ATAG_DTB_COMPAT=y @@ -36,6 +35,7 @@ CONFIG_ARM_ERRATA_720789=y CONFIG_ARM_ERRATA_764369=y CONFIG_ARM_GIC=y CONFIG_ARM_GLOBAL_TIMER=y +CONFIG_ARM_GT_INITIAL_PRESCALER_VAL=1 CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_ARM_HEAVY_MB=y CONFIG_ARM_L1_CACHE_SHIFT=6 @@ -51,16 +51,15 @@ CONFIG_ATA=y CONFIG_ATAGS=y CONFIG_ATA_LEDS=y CONFIG_AUTO_ZRELADDR=y +CONFIG_BINARY_PRINTF=y CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NVME=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_MQ_PCI=y -CONFIG_BLK_SCSI_REQUEST=y CONFIG_BOUNCE=y # CONFIG_CACHE_FEROCEON_L2 is not set CONFIG_CACHE_L2X0=y -CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y CONFIG_CLKSRC_MMIO=y CONFIG_CLONE_BACKWARDS=y @@ -100,7 +99,6 @@ CONFIG_CPU_THUMB_CAPABLE=y CONFIG_CPU_TLB_V7=y CONFIG_CPU_V7=y CONFIG_CRC16=y -CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_AES_ARM=y CONFIG_CRYPTO_AES_ARM_BS=y CONFIG_CRYPTO_AUTHENC=y @@ -116,7 +114,6 @@ CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_LIB_DES=y CONFIG_CRYPTO_LZO=y -CONFIG_CRYPTO_NULL=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1_ARM=y @@ -124,6 +121,7 @@ CONFIG_CRYPTO_SHA1_ARM_NEON=y CONFIG_CRYPTO_SHA256_ARM=y CONFIG_CRYPTO_SHA512_ARM=y CONFIG_CRYPTO_SIMD=y +CONFIG_CRYPTO_ZSTD=y CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DEBUG_ALIGN_RODATA=y CONFIG_DEBUG_INFO=y @@ -155,6 +153,7 @@ CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y +CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y @@ -162,6 +161,7 @@ CONFIG_GENERIC_BUG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_GENERIC_EARLY_IOREMAP=y CONFIG_GENERIC_GETTIMEOFDAY=y CONFIG_GENERIC_IDLE_POLL_SETUP=y @@ -171,6 +171,7 @@ CONFIG_GENERIC_IRQ_MIGRATION=y CONFIG_GENERIC_IRQ_MULTI_HANDLER=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y CONFIG_GENERIC_PCI_IOMAP=y @@ -184,6 +185,7 @@ CONFIG_GENERIC_VDSO_32=y CONFIG_GLOB=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y +CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y CONFIG_GPIO_GENERIC_PLATFORM=y CONFIG_GPIO_MVEBU=y @@ -218,6 +220,8 @@ CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y # CONFIG_IWMMXT is not set CONFIG_JBD2=y +CONFIG_KMAP_LOCAL=y +CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y CONFIG_LEDS_GPIO=y CONFIG_LEDS_PCA963X=y CONFIG_LEDS_TLC591XX=y @@ -225,6 +229,7 @@ CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_LTO_NONE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_MACH_ARMADA_370=y @@ -240,6 +245,7 @@ CONFIG_MANGLE_BOOTARGS=y CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y +CONFIG_MDIO_DEVRES=y CONFIG_MDIO_I2C=y CONFIG_MEMFD_CREATE=y CONFIG_MEMORY=y @@ -282,10 +288,12 @@ CONFIG_NEON=y CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y CONFIG_NET_DSA_MV88E6XXX=y -CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y CONFIG_NET_DSA_TAG_DSA=y +CONFIG_NET_DSA_TAG_DSA_COMMON=y CONFIG_NET_DSA_TAG_EDSA=y CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_SELFTESTS=y +CONFIG_NET_SOCK_MSG=y CONFIG_NET_SWITCHDEV=y CONFIG_NLS=y CONFIG_NOP_USB_XCEIV=y @@ -294,7 +302,6 @@ CONFIG_NVMEM=y CONFIG_NVME_CORE=y # CONFIG_NVME_HWMON is not set # CONFIG_NVME_MULTIPATH is not set -# CONFIG_NVME_TCP is not set CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y @@ -303,7 +310,6 @@ CONFIG_OF_GPIO=y CONFIG_OF_IRQ=y CONFIG_OF_KOBJ=y CONFIG_OF_MDIO=y -CONFIG_OF_NET=y CONFIG_OLD_SIGACTION=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_ORION_WATCHDOG=y @@ -327,6 +333,7 @@ CONFIG_PHYLINK=y # CONFIG_PHY_MVEBU_A3700_UTMI is not set # CONFIG_PHY_MVEBU_A38X_COMPHY is not set # CONFIG_PHY_MVEBU_CP110_COMPHY is not set +# CONFIG_PHY_MVEBU_CP110_UTMI is not set CONFIG_PINCTRL=y CONFIG_PINCTRL_ARMADA_370=y CONFIG_PINCTRL_ARMADA_38X=y @@ -339,7 +346,7 @@ CONFIG_PLAT_ORION=y CONFIG_PM_OPP=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO=y -CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=11 +CONFIG_PTP_1588_CLOCK_OPTIONAL=y CONFIG_PWM=y CONFIG_PWM_SYSFS=y CONFIG_RATIONAL=y @@ -361,6 +368,7 @@ CONFIG_SATA_HOST=y CONFIG_SATA_MV=y CONFIG_SATA_PMP=y CONFIG_SCSI=y +CONFIG_SCSI_COMMON=y CONFIG_SENSORS_PWM_FAN=y CONFIG_SENSORS_TMP421=y CONFIG_SERIAL_8250_DW=y @@ -374,6 +382,7 @@ CONFIG_SGL_ALLOC=y CONFIG_SG_POOL=y CONFIG_SMP=y CONFIG_SMP_ON_UP=y +CONFIG_SOCK_RX_QUEUE_MAPPING=y CONFIG_SOC_BUS=y CONFIG_SPARSE_IRQ=y CONFIG_SPI=y diff --git a/target/linux/mvebu/cortexa53/config-5.15 b/target/linux/mvebu/cortexa53/config-5.15 index a47d66c669..8401926376 100644 --- a/target/linux/mvebu/cortexa53/config-5.15 +++ b/target/linux/mvebu/cortexa53/config-5.15 @@ -1,46 +1,49 @@ CONFIG_64BIT=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y CONFIG_ARCH_MMAP_RND_BITS=18 CONFIG_ARCH_MMAP_RND_BITS_MAX=24 CONFIG_ARCH_MMAP_RND_BITS_MIN=18 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_STACKWALK=y +CONFIG_ARCH_WANTS_NO_INSTR=y CONFIG_ARM64=y CONFIG_ARM64_4K_PAGES=y +CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y CONFIG_ARM64_PAGE_SHIFT=12 CONFIG_ARM64_PA_BITS=48 CONFIG_ARM64_PA_BITS_48=y -CONFIG_ARM64_PTR_AUTH=y -CONFIG_ARM64_SVE=y +# CONFIG_ARM64_PTR_AUTH is not set +# CONFIG_ARM64_SVE is not set CONFIG_ARM64_TAGGED_ADDR_ABI=y CONFIG_ARM64_VA_BITS=39 CONFIG_ARM64_VA_BITS_39=y CONFIG_ARMADA_37XX_CLK=y -CONFIG_ARMADA_37XX_WATCHDOG=y CONFIG_ARMADA_37XX_RWTM_MBOX=y +CONFIG_ARMADA_37XX_WATCHDOG=y CONFIG_ARMADA_AP806_SYSCON=y CONFIG_ARMADA_AP_CP_HELPER=y CONFIG_ARMADA_CP110_SYSCON=y CONFIG_ARM_AMBA=y +CONFIG_ARM_ARCH_TIMER=y +# CONFIG_ARM_ARCH_TIMER_EVTSTREAM is not set CONFIG_ARM_ARMADA_37XX_CPUFREQ=y CONFIG_ARM_GIC_V2M=y CONFIG_ARM_GIC_V3=y CONFIG_ARM_GIC_V3_ITS=y CONFIG_ARM_GIC_V3_ITS_PCI=y +# CONFIG_ARM_MHU_V2 is not set # CONFIG_ARM_PL172_MPMC is not set CONFIG_ARM_PSCI_FW=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y CONFIG_DMA_DIRECT_REMAP=y -# CONFIG_FLATMEM_MANUAL is not set CONFIG_FRAME_POINTER=y CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y -CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_PINCONF=y -CONFIG_HOLES_IN_ZONE=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_MAILBOX=y # CONFIG_MAILBOX_TEST is not set @@ -69,13 +72,11 @@ CONFIG_REGULATOR_GPIO=y CONFIG_RODATA_FULL_DEFAULT_ENABLED=y CONFIG_SPARSEMEM=y CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPI_ARMADA_3700=y CONFIG_SWIOTLB=y CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_THREAD_INFO_IN_TASK=y CONFIG_TURRIS_MOX_RWTM=y CONFIG_UNMAP_KERNEL_AT_EL0=y diff --git a/target/linux/mvebu/cortexa72/config-5.15 b/target/linux/mvebu/cortexa72/config-5.15 index 8d1ec7a283..250c8962a0 100644 --- a/target/linux/mvebu/cortexa72/config-5.15 +++ b/target/linux/mvebu/cortexa72/config-5.15 @@ -1,15 +1,17 @@ CONFIG_64BIT=y CONFIG_AQUANTIA_PHY=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y CONFIG_ARCH_MMAP_RND_BITS=18 CONFIG_ARCH_MMAP_RND_BITS_MAX=24 CONFIG_ARCH_MMAP_RND_BITS_MIN=18 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_STACKWALK=y +CONFIG_ARCH_WANTS_NO_INSTR=y CONFIG_ARM64=y CONFIG_ARM64_4K_PAGES=y +CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y CONFIG_ARM64_PAGE_SHIFT=12 CONFIG_ARM64_PA_BITS=48 CONFIG_ARM64_PA_BITS_48=y @@ -20,9 +22,12 @@ CONFIG_ARM64_VA_BITS=39 CONFIG_ARM64_VA_BITS_39=y CONFIG_ARMADA_37XX_CLK=y CONFIG_ARMADA_AP806_SYSCON=y +CONFIG_ARMADA_AP_CPU_CLK=y CONFIG_ARMADA_AP_CP_HELPER=y CONFIG_ARMADA_CP110_SYSCON=y CONFIG_ARM_AMBA=y +CONFIG_ARM_ARCH_TIMER=y +# CONFIG_ARM_ARCH_TIMER_EVTSTREAM is not set CONFIG_ARM_ARMADA_8K_CPUFREQ=y CONFIG_ARM_GIC_V2M=y CONFIG_ARM_GIC_V3=y @@ -32,21 +37,18 @@ CONFIG_ARM_GIC_V3_ITS_PCI=y CONFIG_ARM_PSCI_FW=y CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y -CONFIG_CRYPTO_ZSTD=y CONFIG_DMA_DIRECT_REMAP=y -# CONFIG_FLATMEM_MANUAL is not set CONFIG_FRAME_POINTER=y CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y -CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_PINCONF=y -CONFIG_HOLES_IN_ZONE=y CONFIG_HW_RANDOM_OMAP=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -CONFIG_LEDS_IS31FL319X=y CONFIG_LEDS_IEI_WT61P803_PUZZLE=y +CONFIG_LEDS_IS31FL319X=y CONFIG_MARVELL_10G_PHY=y -CONFIG_MDIO_DEVRES=y +CONFIG_MFD_CORE=y CONFIG_MFD_IEI_WT61P803_PUZZLE=y CONFIG_MFD_SYSCON=y CONFIG_MMC_SDHCI_XENON=y @@ -84,12 +86,10 @@ CONFIG_SERIAL_DEV_BUS=y CONFIG_SERIAL_DEV_CTRL_TTYPORT=y CONFIG_SPARSEMEM=y CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SWIOTLB=y CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_THREAD_INFO_IN_TASK=y CONFIG_UNMAP_KERNEL_AT_EL0=y CONFIG_VMAP_STACK=y From 03f41b1eb2f15ab06d5800274be6a67c64e2a629 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 4 Apr 2022 16:06:16 +0100 Subject: [PATCH 77/80] mvebu: add Linux 5.15 as testing kernel Run-tested on the cortexa9 subtarget (Turris Omnia). Signed-off-by: Rui Salvaterra --- target/linux/mvebu/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile index ce43c8652d..6a1e0f63f7 100644 --- a/target/linux/mvebu/Makefile +++ b/target/linux/mvebu/Makefile @@ -10,6 +10,7 @@ FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part lega SUBTARGETS:=cortexa9 cortexa53 cortexa72 KERNEL_PATCHVER:=5.10 +KERNEL_TESTING_PATCHVER:=5.15 include $(INCLUDE_DIR)/target.mk From 910eadf49bee32c1c4265dbeed61cc0c03214406 Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Sun, 10 Apr 2022 21:29:08 +0100 Subject: [PATCH 78/80] mvebu: refresh the 5.15 kconfigs Clean them up. Signed-off-by: Rui Salvaterra --- target/linux/mvebu/config-5.15 | 8 ++++---- target/linux/mvebu/cortexa53/config-5.15 | 2 -- target/linux/mvebu/cortexa72/config-5.15 | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/target/linux/mvebu/config-5.15 b/target/linux/mvebu/config-5.15 index d2a95ce32f..0811ee6d4c 100644 --- a/target/linux/mvebu/config-5.15 +++ b/target/linux/mvebu/config-5.15 @@ -1,4 +1,3 @@ -CONFIG_AF_UNIX_OOB=y CONFIG_AHCI_MVEBU=y CONFIG_ALIGNMENT_TRAP=y CONFIG_ARCH_32BIT_OFF_T=y @@ -51,7 +50,6 @@ CONFIG_ATA=y CONFIG_ATAGS=y CONFIG_ATA_LEDS=y CONFIG_AUTO_ZRELADDR=y -CONFIG_BINARY_PRINTF=y CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NVME=y @@ -102,6 +100,7 @@ CONFIG_CRC16=y CONFIG_CRYPTO_AES_ARM=y CONFIG_CRYPTO_AES_ARM_BS=y CONFIG_CRYPTO_AUTHENC=y +CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRYPTD=y @@ -229,7 +228,6 @@ CONFIG_LEDS_TRIGGER_DISK=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_LTO_NONE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y CONFIG_MACH_ARMADA_370=y @@ -293,7 +291,6 @@ CONFIG_NET_DSA_TAG_DSA_COMMON=y CONFIG_NET_DSA_TAG_EDSA=y CONFIG_NET_FLOW_LIMIT=y CONFIG_NET_SELFTESTS=y -CONFIG_NET_SOCK_MSG=y CONFIG_NET_SWITCHDEV=y CONFIG_NLS=y CONFIG_NOP_USB_XCEIV=y @@ -427,9 +424,12 @@ CONFIG_VFP=y CONFIG_VFPv3=y CONFIG_WATCHDOG_CORE=y CONFIG_XPS=y +CONFIG_XXHASH=y CONFIG_XZ_DEC_ARM=y CONFIG_XZ_DEC_BCJ=y CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/mvebu/cortexa53/config-5.15 b/target/linux/mvebu/cortexa53/config-5.15 index 8401926376..3c195291d1 100644 --- a/target/linux/mvebu/cortexa53/config-5.15 +++ b/target/linux/mvebu/cortexa53/config-5.15 @@ -14,8 +14,6 @@ CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y CONFIG_ARM64_PAGE_SHIFT=12 CONFIG_ARM64_PA_BITS=48 CONFIG_ARM64_PA_BITS_48=y -# CONFIG_ARM64_PTR_AUTH is not set -# CONFIG_ARM64_SVE is not set CONFIG_ARM64_TAGGED_ADDR_ABI=y CONFIG_ARM64_VA_BITS=39 CONFIG_ARM64_VA_BITS_39=y diff --git a/target/linux/mvebu/cortexa72/config-5.15 b/target/linux/mvebu/cortexa72/config-5.15 index 250c8962a0..7e07c28ba6 100644 --- a/target/linux/mvebu/cortexa72/config-5.15 +++ b/target/linux/mvebu/cortexa72/config-5.15 @@ -15,7 +15,6 @@ CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y CONFIG_ARM64_PAGE_SHIFT=12 CONFIG_ARM64_PA_BITS=48 CONFIG_ARM64_PA_BITS_48=y -# CONFIG_ARM64_PTR_AUTH is not set CONFIG_ARM64_SVE=y # CONFIG_ARM64_TAGGED_ADDR_ABI is not set CONFIG_ARM64_VA_BITS=39 @@ -93,7 +92,4 @@ CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_THREAD_INFO_IN_TASK=y CONFIG_UNMAP_KERNEL_AT_EL0=y CONFIG_VMAP_STACK=y -CONFIG_XXHASH=y CONFIG_ZONE_DMA32=y -CONFIG_ZSTD_COMPRESS=y -CONFIG_ZSTD_DECOMPRESS=y From c2a396fab97867e43518b7e5afb0fba000e20f09 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 26 Jul 2022 14:31:26 +0200 Subject: [PATCH 79/80] mvebu: backport pending DTS changes for Turris Omnia Backport pending patches: - https://lore.kernel.org/linux-arm-kernel/20220704113622.18887-1-kabel@kernel.org/ - https://lore.kernel.org/linux-arm-kernel/20220704113622.18887-2-kabel@kernel.org/ Signed-off-by: Josef Schlehofer --- ...mnia-configure-LED-0-pin-function-to.patch | 38 +++++++++++++++ ...ris-omnia-enable-LED-controller-node.patch | 48 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 target/linux/mvebu/patches-5.15/100-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch create mode 100644 target/linux/mvebu/patches-5.15/101-ARM-dts-turris-omnia-enable-LED-controller-node.patch diff --git a/target/linux/mvebu/patches-5.15/100-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch b/target/linux/mvebu/patches-5.15/100-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch new file mode 100644 index 0000000000..2793737556 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/100-ARM-dts-turris-omnia-configure-LED-0-pin-function-to.patch @@ -0,0 +1,38 @@ +From 81c0004a6433ff90fa6129418802c3c367e453c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 13:36:21 +0200 +Subject: [PATCH 1/5] ARM: dts: turris-omnia: configure LED[0] pin function to + link/activity +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The marvell PHY driver changes the LED[0] pin function to "On - 1000 +Mbps Link, Off - Else". + +Turris Omnia expects that the function is "On - Link, Blink - Activity, +Off - No link". + +Use the `marvell,reg-init` DT property to change the function. + +In the future, once netdev trigger will support HW offloading, we will +be able to have this configured via the combination of PHY driver and +leds-turris-omnia driver. + +Signed-off-by: Marek Behún +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -390,7 +390,8 @@ + phy1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; +- marvell,reg-init = <3 18 0 0x4985>; ++ marvell,reg-init = <3 18 0 0x4985>, ++ <3 16 0xfff0 0x0001>; + + /* irq is connected to &pcawan pin 7 */ + }; diff --git a/target/linux/mvebu/patches-5.15/101-ARM-dts-turris-omnia-enable-LED-controller-node.patch b/target/linux/mvebu/patches-5.15/101-ARM-dts-turris-omnia-enable-LED-controller-node.patch new file mode 100644 index 0000000000..5b8ce56f5d --- /dev/null +++ b/target/linux/mvebu/patches-5.15/101-ARM-dts-turris-omnia-enable-LED-controller-node.patch @@ -0,0 +1,48 @@ +From fed7cef5e4f2df8c6a79bebf5da1fdd3783ff6f3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 13:36:22 +0200 +Subject: [PATCH] ARM: dts: turris-omnia: enable LED controller node +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The LED controller node is disabled because the leds-turris-omnia driver +does not support setting the LED blinking to be controlled by the MCU. + +The patches for that have now been sent [1], so let's enable the node. + +[1] https://lore.kernel.org/linux-leds/20220704105955.15474-1-kabel@kernel.org/T/ + +Signed-off-by: Marek Behún +--- + arch/arm/boot/dts/armada-385-turris-omnia.dts | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +--- a/arch/arm/boot/dts/armada-385-turris-omnia.dts ++++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts +@@ -188,15 +188,13 @@ + reg = <0x2b>; + #address-cells = <1>; + #size-cells = <0>; ++ status = "okay"; + + /* + * LEDs are controlled by MCU (STM32F0) at + * address 0x2b. + * +- * The driver does not support HW control mode +- * for the LEDs yet. Disable the LEDs for now. +- * +- * Also LED functions are not stable yet: ++ * LED functions are not stable yet: + * - there are 3 LEDs connected via MCU to PCIe + * ports. One of these ports supports mSATA. + * There is no mSATA nor PCIe function. +@@ -207,7 +205,6 @@ + * B. Again there is no such function defined. + * For now we use LED_FUNCTION_INDICATOR + */ +- status = "disabled"; + + multi-led@0 { + reg = <0x0>; From 163e680e059e67eca542b4b6597910b90fef564c Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 26 Jul 2022 14:32:37 +0200 Subject: [PATCH 80/80] mvebu: leds: Turris Omnia improvements It backports this patch series, which is currently on review: https://lore.kernel.org/linux-leds/20220704105955.15474-1-kabel@kernel.org/T/#rb89a4ca5a836f17bdcc53d65549e0b1779bb6a18 Signed-off-by: Josef Schlehofer --- ...a-support-HW-controlled-mode-via-pri.patch | 118 ++++++++++++++++++ ...a-initialize-multi-intensity-to-full.patch | 33 +++++ ...a-change-max-brightness-from-255-to-.patch | 31 +++++ 3 files changed, 182 insertions(+) create mode 100644 target/linux/mvebu/patches-5.15/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch create mode 100644 target/linux/mvebu/patches-5.15/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch create mode 100644 target/linux/mvebu/patches-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch diff --git a/target/linux/mvebu/patches-5.15/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch b/target/linux/mvebu/patches-5.15/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch new file mode 100644 index 0000000000..c14469460a --- /dev/null +++ b/target/linux/mvebu/patches-5.15/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch @@ -0,0 +1,118 @@ +From 80e643510cb14f116f687e992210c0008a09d869 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 12:59:53 +0200 +Subject: [PATCH] leds: turris-omnia: support HW controlled mode via + private trigger +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add support for enabling MCU controlled mode of the Turris Omnia LEDs +via a LED private trigger called "omnia-mcu". + +When in MCU controlled mode, the user can still set LED color, but the +blinking is done by MCU, which does different things for various LEDs: +- WAN LED is blinked according to the LED[0] pin of the WAN PHY +- LAN LEDs are blinked according to the LED[0] output of corresponding + port of the LAN switch +- PCIe LEDs are blinked according to the logical OR of the MiniPCIe port + LED pins + +For a long time I wanted to actually do this differently: I wanted to +make the netdev trigger to transparently offload the blinking to the HW +if user set compatible settings for the netdev trigger. +There was some work on this, and hopefully we will be able to complete +it sometime, but since there are various complications, it will probably +not be soon. + +In the meantime let's support HW controlled mode via this private LED +trigger. If, in the future, we manage to complete the netdev trigger +offloading, we can still keep this private trigger for backwards +compatiblity, if needed. + +We also set "omnia-mcu" to cdev->default_trigger, so that the MCU keeps +control until the user first wants to take over it. If a different +default trigger is specified in device-tree via the +`linux,default-trigger` property, LED class will overwrite +cdev->default_trigger, and so the DT property will be respected. + +Signed-off-by: Marek Behún +--- + drivers/leds/Kconfig | 1 + + drivers/leds/leds-turris-omnia.c | 41 ++++++++++++++++++++++++++++++++ + 2 files changed, 42 insertions(+) + +--- a/drivers/leds/Kconfig ++++ b/drivers/leds/Kconfig +@@ -163,6 +163,7 @@ config LEDS_TURRIS_OMNIA + depends on I2C + depends on MACH_ARMADA_38X || COMPILE_TEST + depends on OF ++ select LEDS_TRIGGERS + help + This option enables basic support for the LEDs found on the front + side of CZ.NIC's Turris Omnia router. There are 12 RGB LEDs on the +--- a/drivers/leds/leds-turris-omnia.c ++++ b/drivers/leds/leds-turris-omnia.c +@@ -41,6 +41,39 @@ struct omnia_leds { + struct omnia_led leds[]; + }; + ++static struct led_hw_trigger_type omnia_hw_trigger_type; ++ ++static int omnia_hwtrig_activate(struct led_classdev *cdev) ++{ ++ struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent); ++ struct omnia_led *led = to_omnia_led(lcdev_to_mccdev(cdev)); ++ ++ /* put the LED into MCU controlled mode */ ++ return i2c_smbus_write_byte_data(leds->client, CMD_LED_MODE, ++ CMD_LED_MODE_LED(led->reg)); ++} ++ ++static void omnia_hwtrig_deactivate(struct led_classdev *cdev) ++{ ++ struct omnia_leds *leds = dev_get_drvdata(cdev->dev->parent); ++ struct omnia_led *led = to_omnia_led(lcdev_to_mccdev(cdev)); ++ int ret; ++ ++ /* put the LED into software mode */ ++ ret = i2c_smbus_write_byte_data(leds->client, CMD_LED_MODE, ++ CMD_LED_MODE_LED(led->reg) | ++ CMD_LED_MODE_USER); ++ if (ret < 0) ++ dev_err(cdev->dev, "Cannot put to software mode: %i\n", ret); ++} ++ ++static struct led_trigger omnia_hw_trigger = { ++ .name = "omnia-mcu", ++ .activate = omnia_hwtrig_activate, ++ .deactivate = omnia_hwtrig_deactivate, ++ .trigger_type = &omnia_hw_trigger_type, ++}; ++ + static int omnia_led_brightness_set_blocking(struct led_classdev *cdev, + enum led_brightness brightness) + { +@@ -112,6 +145,8 @@ static int omnia_led_register(struct i2c + cdev = &led->mc_cdev.led_cdev; + cdev->max_brightness = 255; + cdev->brightness_set_blocking = omnia_led_brightness_set_blocking; ++ cdev->trigger_type = &omnia_hw_trigger_type; ++ cdev->default_trigger = omnia_hw_trigger.name; + + /* put the LED into software mode */ + ret = i2c_smbus_write_byte_data(client, CMD_LED_MODE, +@@ -228,6 +263,12 @@ static int omnia_leds_probe(struct i2c_c + + mutex_init(&leds->lock); + ++ ret = devm_led_trigger_register(dev, &omnia_hw_trigger); ++ if (ret < 0) { ++ dev_err(dev, "Cannot register private LED trigger: %d\n", ret); ++ return ret; ++ } ++ + led = &leds->leds[0]; + for_each_available_child_of_node(np, child) { + ret = omnia_led_register(client, led, child); diff --git a/target/linux/mvebu/patches-5.15/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch b/target/linux/mvebu/patches-5.15/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch new file mode 100644 index 0000000000..1fe76b8f2c --- /dev/null +++ b/target/linux/mvebu/patches-5.15/103-leds-turris-omnia-initialize-multi-intensity-to-full.patch @@ -0,0 +1,33 @@ +From bda176cceb735b9b46c1900658b6486c34e13ae6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 12:59:54 +0200 +Subject: [PATCH] leds: turris-omnia: initialize multi-intensity to full +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The default color of each LED before driver probe (255, 255, 255). +Initialize multi_intensity to this value, so that it corresponds to the +reality. + +Signed-off-by: Marek Behún +--- + drivers/leds/leds-turris-omnia.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/leds/leds-turris-omnia.c ++++ b/drivers/leds/leds-turris-omnia.c +@@ -131,10 +131,13 @@ static int omnia_led_register(struct i2c + } + + led->subled_info[0].color_index = LED_COLOR_ID_RED; ++ led->subled_info[0].intensity = 255; + led->subled_info[0].channel = 0; + led->subled_info[1].color_index = LED_COLOR_ID_GREEN; ++ led->subled_info[1].intensity = 255; + led->subled_info[1].channel = 1; + led->subled_info[2].color_index = LED_COLOR_ID_BLUE; ++ led->subled_info[2].intensity = 255; + led->subled_info[2].channel = 2; + + led->mc_cdev.subled_info = led->subled_info; diff --git a/target/linux/mvebu/patches-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch b/target/linux/mvebu/patches-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch new file mode 100644 index 0000000000..fb8864dfd1 --- /dev/null +++ b/target/linux/mvebu/patches-5.15/104-leds-turris-omnia-change-max-brightness-from-255-to-.patch @@ -0,0 +1,31 @@ +From 349cbe949b9622cc05b148ecfa6268cbbae35b45 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Mon, 4 Jul 2022 12:59:55 +0200 +Subject: [PATCH] leds: turris-omnia: change max brightness from 255 to 1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Using binary brightness makes more sense for this controller, because +internally in the MCU it works that way: the LED has a color, and a +state whether it is ON or OFF. + +The resulting brightness computation with led_mc_calc_color_components() +will now always result in either (0, 0, 0) or the multi_intensity value. + +Signed-off-by: Marek Behún +--- + drivers/leds/leds-turris-omnia.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/leds/leds-turris-omnia.c ++++ b/drivers/leds/leds-turris-omnia.c +@@ -146,7 +146,7 @@ static int omnia_led_register(struct i2c + init_data.fwnode = &np->fwnode; + + cdev = &led->mc_cdev.led_cdev; +- cdev->max_brightness = 255; ++ cdev->max_brightness = 1; + cdev->brightness_set_blocking = omnia_led_brightness_set_blocking; + cdev->trigger_type = &omnia_hw_trigger_type; + cdev->default_trigger = omnia_hw_trigger.name;