diff --git a/config/Config-build.in b/config/Config-build.in index 178afbdb94..8e12199cbd 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -362,12 +362,6 @@ menu "Global build settings" help SELinux Reference Policy (refpolicy) - config SELINUXTYPE_targeted-modular - bool "targeted-modular" - select PACKAGE_refpolicy-modular - help - Modular SELinux Reference Policy (refpolicy-modular) - config SELINUXTYPE_dssp bool "dssp" select PACKAGE_selinux-policy diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 96daf1b105..dfffb5c0ce 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .77 +LINUX_VERSION-5.4 = .79 -LINUX_KERNEL_HASH-5.4.77 = a3e03e6970240dddc8174bf9f49b56d774c40125eabe1582d2ebe85b01addbf7 +LINUX_KERNEL_HASH-5.4.79 = a59091fb08ff66a344a7842b7c891f36cef609eed1d2944edf475cca8d91ce25 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 73cd083d0a..4a86376f7c 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot PKG_VERSION:=2020.04 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index 85101cf35b..afa058a39f 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -26,6 +26,7 @@ glinet,gl-mv1000) ;; globalscale,espressobin|\ globalscale,espressobin-emmc|\ +globalscale,espressobin-ultra|\ globalscale,espressobin-v7|\ globalscale,espressobin-v7-emmc) idx="$(find_mtd_index u-boot-env)" diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index 5d6a956aeb..ec1b45d70f 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-layerscape PKG_VERSION:=LSDK-20.04-update-290520 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot diff --git a/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt index 906feec9ee..1d108a1b03 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt @@ -1,7 +1,6 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff -initrd_high=0xffffffffffffffff +bootm_size=0x10000000 qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot diff --git a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt index c0792c51e3..6e39e05525 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt @@ -1,7 +1,6 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffff -initrd_high=0xffffffff +bootm_size=0x10000000 nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) cma=64M@0x0-0xb0000000 bootcmd=echo starting openwrt ...;run nor_boot diff --git a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt index 3a958ce90c..b381bde18f 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt @@ -1,7 +1,6 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff -initrd_high=0xffffffffffffffff +bootm_size=0x10000000 hwconfig=fsl_ddr:bank_intlv=auto nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) diff --git a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt index a9b91e5ac7..d24f9ec201 100644 --- a/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt +++ b/package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt @@ -1,7 +1,6 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 -fdt_high=0xffffffffffffffff -initrd_high=0xffffffffffffffff +bootm_size=0x10000000 hwconfig=fsl_ddr:bank_intlv=auto qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) diff --git a/package/boot/uboot-tegra/Makefile b/package/boot/uboot-tegra/Makefile index 4b9f7876f8..778019257d 100644 --- a/package/boot/uboot-tegra/Makefile +++ b/package/boot/uboot-tegra/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2019 Tomasz Maciej Nowak +# Copyright (C) 2017-2019 Tomasz Maciej Nowak # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -11,7 +11,7 @@ PKG_RELEASE := 1 PKG_HASH := 76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef -PKG_MAINTAINER := Tomasz Maciej Nowak +PKG_MAINTAINER := Tomasz Maciej Nowak include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index 3853c9c3fb..6245e89633 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-rcw PKG_VERSION:=LSDK-20.04-update-290520 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/rcw diff --git a/package/firmware/layerscape/ls-rcw/patches/0002-fix_rcw_for_ls1012a-frdm.patch b/package/firmware/layerscape/ls-rcw/patches/0002-fix_rcw_for_ls1012a-frdm.patch new file mode 100644 index 0000000000..66b4df9faa --- /dev/null +++ b/package/firmware/layerscape/ls-rcw/patches/0002-fix_rcw_for_ls1012a-frdm.patch @@ -0,0 +1,13 @@ +--- a/ls1012afrdm/N_SSNP_3305/rcw_800.rcw ++++ b/ls1012afrdm/N_SSNP_3305/rcw_800.rcw +@@ -41,8 +41,8 @@ EC1_EXT_SAI2_RX=1 + EC1_BASE=0 + UART1_BASE=1 + SDHC1_BASE=1 +-SDHC2_BASE_DAT321=1 +-SDHC2_BASE_BASE=1 ++SDHC2_BASE_DAT321=3 ++SDHC2_BASE_BASE=3 + UART2_BASE_DATA=1 + EMI1_BASE=1 + CLK_OUT_BASE=1 diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 9acf5b5dcc..799ee60a8f 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware -PKG_VERSION:=20201022 +PKG_VERSION:=20201118 PKG_RELEASE:=1 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=bf586e0beb4c65f22bf0a79811f259aa0a5a7cc9f70eebecb260525b6914cef7 +PKG_HASH:=863d5a31da725b856a917280d1e3014929b3bc3d4e6e5faecf530c13afb7e2b9 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index 8edb099edd..7bfbd38079 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -446,6 +446,56 @@ endef $(eval $(call KernelPackage,iio-tsl4531)) +define KernelPackage/iio-fxas21002c + SUBMENU:=$(IIO_MENU) + TITLE:=Freescale FXAS21002C 3-axis gyro driver + DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer + KCONFIG:= CONFIG_FXAS21002C + FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_core.ko + AUTOLOAD:=$(call AutoLoad,56,fxas21002c) +endef + +define KernelPackage/iio-fxas21002c/description + Support for Freescale FXAS21002C 3-axis gyro. +endef + +$(eval $(call KernelPackage,iio-fxas21002c)) + + +define KernelPackage/iio-fxas21002c-i2c + SUBMENU:=$(IIO_MENU) + TITLE:=Freescale FXAS21002C 3-axis gyro driver (I2C) + DEPENDS:=+kmod-iio-fxas21002c +kmod-i2c-core +kmod-regmap-i2c + KCONFIG:= CONFIG_FXAS21002C_I2C + FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_i2c.ko + AUTOLOAD:=$(call AutoLoad,56,fxas21002c_i2c) +endef + +define KernelPackage/iio-fxas21002c-i2c/description + Support for Freescale FXAS21002C 3-axis gyro + connected via I2C. +endef + + +$(eval $(call KernelPackage,iio-fxas21002c-i2c)) + +define KernelPackage/iio-fxas21002c-spi + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-iio-fxas21002c +kmod-regmap-spi + TITLE:=Freescale FXAS21002C 3-axis gyro driver (SPI) + KCONFIG:= CONFIG_FXAS21002C_SPI + FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_spi.ko + AUTOLOAD:=$(call AutoLoad,56,fxas21002c_spi) +endef + +define KernelPackage/iio-fxas21002c-spi/description + Support for Freescale FXAS21002C 3-axis gyro + connected via SPI. +endef + +$(eval $(call KernelPackage,iio-fxas21002c-spi)) + + define KernelPackage/iio-fxos8700 SUBMENU:=$(IIO_MENU) TITLE:=Freescale FXOS8700 3-axis accelerometer driver diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 266d0a022d..c66f43b050 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2020-11-13 -PKG_SOURCE_VERSION:=4a41135750d97e06d1f6d808a9d24bb4b472aca4 -PKG_MIRROR_HASH:=2f58910f79c73209c20969ffa59ac5ccd4606f736993b207dccef6d42dab7880 +PKG_SOURCE_DATE:=2020-11-23 +PKG_SOURCE_VERSION:=3abe1fc87151fae570fc1232053c73d1a5505664 +PKG_MIRROR_HASH:=323221cbcc7ee57e6a38e979bdebfbf13cdfddf82ea51bbc30004c07b658bb8a PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index e25cd20a2a..1e20b56200 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=16 +PKG_RELEASE:=17 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/files/hostapd-basic.config b/package/network/services/hostapd/files/hostapd-basic.config index 19ea850f6b..947e2fa200 100644 --- a/package/network/services/hostapd/files/hostapd-basic.config +++ b/package/network/services/hostapd/files/hostapd-basic.config @@ -268,7 +268,7 @@ CONFIG_GETRANDOM=y #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Should we use kqueue instead of select? Select is used by default. #CONFIG_ELOOP_KQUEUE=y diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config index fee4479dfa..df272e443a 100644 --- a/package/network/services/hostapd/files/hostapd-full.config +++ b/package/network/services/hostapd/files/hostapd-full.config @@ -268,7 +268,7 @@ CONFIG_GETRANDOM=y #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Should we use kqueue instead of select? Select is used by default. #CONFIG_ELOOP_KQUEUE=y diff --git a/package/network/services/hostapd/files/hostapd-mini.config b/package/network/services/hostapd/files/hostapd-mini.config index d9511441e6..b3050f7bbc 100644 --- a/package/network/services/hostapd/files/hostapd-mini.config +++ b/package/network/services/hostapd/files/hostapd-mini.config @@ -268,7 +268,7 @@ CONFIG_GETRANDOM=y #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Should we use kqueue instead of select? Select is used by default. #CONFIG_ELOOP_KQUEUE=y diff --git a/package/network/services/hostapd/files/wpa_supplicant-basic.config b/package/network/services/hostapd/files/wpa_supplicant-basic.config index db3f7c7a11..c550b37b21 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-basic.config +++ b/package/network/services/hostapd/files/wpa_supplicant-basic.config @@ -290,7 +290,7 @@ CONFIG_NO_CONFIG_WRITE=y #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Should we use kqueue instead of select? Select is used by default. #CONFIG_ELOOP_KQUEUE=y diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config b/package/network/services/hostapd/files/wpa_supplicant-full.config index 4dd3e550a6..b3e85d073d 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-full.config +++ b/package/network/services/hostapd/files/wpa_supplicant-full.config @@ -290,7 +290,7 @@ CONFIG_BACKEND=file #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Should we use kqueue instead of select? Select is used by default. #CONFIG_ELOOP_KQUEUE=y diff --git a/package/network/services/hostapd/files/wpa_supplicant-mini.config b/package/network/services/hostapd/files/wpa_supplicant-mini.config index c1e0141edd..9eb1111e52 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-mini.config +++ b/package/network/services/hostapd/files/wpa_supplicant-mini.config @@ -290,7 +290,7 @@ CONFIG_NO_CONFIG_WRITE=y #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Should we use kqueue instead of select? Select is used by default. #CONFIG_ELOOP_KQUEUE=y diff --git a/package/network/services/hostapd/files/wpa_supplicant-p2p.config b/package/network/services/hostapd/files/wpa_supplicant-p2p.config index 5156048284..b00847a256 100644 --- a/package/network/services/hostapd/files/wpa_supplicant-p2p.config +++ b/package/network/services/hostapd/files/wpa_supplicant-p2p.config @@ -290,7 +290,7 @@ CONFIG_BACKEND=file #CONFIG_ELOOP_POLL=y # Should we use epoll instead of select? Select is used by default. -#CONFIG_ELOOP_EPOLL=y +CONFIG_ELOOP_EPOLL=y # Should we use kqueue instead of select? Select is used by default. #CONFIG_ELOOP_KQUEUE=y diff --git a/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch b/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch index e2db99eeed..3e4638d7ff 100644 --- a/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch +++ b/package/network/services/hostapd/patches/800-dfs-enter-DFS-state-if-no-available-channel-is-found.patch @@ -17,7 +17,7 @@ Signed-off-by: David Bauer --- a/src/ap/dfs.c +++ b/src/ap/dfs.c -@@ -1066,8 +1066,15 @@ static int hostapd_dfs_start_channel_swi +@@ -1086,8 +1086,15 @@ static int hostapd_dfs_start_channel_swi &oper_centr_freq_seg0_idx, &oper_centr_freq_seg1_idx, &skip_radar); diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 83073122e6..796eb61298 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2020-10-04 -PKG_SOURCE_VERSION:=14a3cb42047bd0c0f8d5713332b9b4516a505607 -PKG_MIRROR_HASH:=10db75dcc3f42543028ccda1a32454cf8684108a5117befa466b6775fc71948c +PKG_SOURCE_DATE:=2020-11-23 +PKG_SOURCE_VERSION:=f53a63999784bcb7dc513e221f3f25dd3de2f35e +PKG_MIRROR_HASH:=b2b71f91a3affd1518b2887d2786be30ae0ac5204bbf65c9a84595603847995c PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index dee4bd051e..c892c3f8e8 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uqmi -PKG_RELEASE:=7 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git -PKG_SOURCE_DATE:=2019-06-27 -PKG_SOURCE_VERSION:=1965c713937495a5cb029165c16acdb6572c3f87 -PKG_MIRROR_HASH:=3c39b1c1f20b7d523b0891d08b3d10233331ada8e11d0b55cfd4882816308951 +PKG_SOURCE_DATE:=2020-11-22 +PKG_SOURCE_VERSION:=0a19b5b77140465c29e2afa7d611fe93abc9672f +PKG_MIRROR_HASH:=0a6641f8e167efd21d464b0b2aeb1fec5f974dddcdb8822fbd5d7190d0b741b4 PKG_MAINTAINER:=Matti Laakso PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 8cbe9e97e7..13a4fc9611 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -19,6 +19,7 @@ proto_qmi_init_config() { proto_config_add_string modes proto_config_add_string pdptype proto_config_add_int profile + proto_config_add_boolean dhcp proto_config_add_boolean dhcpv6 proto_config_add_boolean autoconnect proto_config_add_int plmn @@ -31,13 +32,13 @@ proto_qmi_setup() { local interface="$1" local dataformat connstat local device apn auth username password pincode delay modes pdptype - local profile dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS + local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS local ip4table ip6table local cid_4 pdh_4 cid_6 pdh_6 local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6 json_get_vars device apn auth username password pincode delay modes - json_get_vars pdptype profile dhcpv6 autoconnect plmn ip4table + json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS [ "$timeout" = "" ] && timeout="10" @@ -82,7 +83,7 @@ proto_qmi_setup() { local uninitialized_timeout=0 while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do [ -e "$device" ] || return 1 - if [ "$uninitialized_timeout" -lt "$timeout" ]; then + if [ "$uninitialized_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then let uninitialized_timeout++ sleep 1; else @@ -173,6 +174,9 @@ proto_qmi_setup() { # Cleanup current state if any uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect > /dev/null 2>&1 + # Go online + uqmi -s -d "$device" --set-device-operating-mode online > /dev/null 2>&1 + # Set IP format uqmi -s -d "$device" --set-data-format 802.3 > /dev/null 2>&1 uqmi -s -d "$device" --wda-set-data-format 802.3 > /dev/null 2>&1 @@ -195,7 +199,7 @@ proto_qmi_setup() { local registration_timeout=0 while uqmi -s -d "$device" --get-serving-system | grep '"searching"' > /dev/null; do [ -e "$device" ] || return 1 - if [ "$registration_timeout" -lt "$timeout" ]; then + if [ "$registration_timeout" -lt "$timeout" -o "$timeout" = "0" ]; then let registration_timeout++ sleep 1; else @@ -353,15 +357,41 @@ proto_qmi_setup() { } [ -n "$pdh_4" ] && { - json_init - json_add_string name "${interface}_4" - json_add_string ifname "@$interface" - json_add_string proto "dhcp" - [ -n "$ip4table" ] && json_add_string ip4table "$ip4table" - proto_add_dynamic_defaults - [ -n "$zone" ] && json_add_string zone "$zone" - json_close_object - ubus call network add_dynamic "$(json_dump)" + if [ "$dhcp" = 0 ]; then + json_load "$(uqmi -s -d $device --set-client-id wds,$cid_4 --get-current-settings)" + json_select ipv4 + json_get_var ip_4 ip + json_get_var gateway_4 gateway + json_get_var dns1_4 dns1 + json_get_var dns2_4 dns2 + json_get_var subnet_4 subnet + + proto_init_update "$ifname" 1 + proto_set_keep 1 + proto_add_ipv4_address "$ip_4" "$subnet_4" + proto_add_ipv4_route "$gateway_4" "128" + [ "$defaultroute" = 0 ] || proto_add_ipv4_route "0.0.0.0" 0 "$gateway_4" + [ "$peerdns" = 0 ] || { + proto_add_dns_server "$dns1_4" + proto_add_dns_server "$dns2_4" + } + [ -n "$zone" ] && { + proto_add_data + json_add_string zone "$zone" + proto_close_data + } + proto_send_update "$interface" + else + json_init + json_add_string name "${interface}_4" + json_add_string ifname "@$interface" + json_add_string proto "dhcp" + [ -n "$ip4table" ] && json_add_string ip4table "$ip4table" + proto_add_dynamic_defaults + [ -n "$zone" ] && json_add_string zone "$zone" + json_close_object + ubus call network add_dynamic "$(json_dump)" + fi } } diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 6c9e0d3de3..ae7c018ea8 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_SOURCE_DATE:=2020-11-17 -PKG_SOURCE_VERSION:=c110405181056f14956ccd097b8e4ffe97b2f3ec -PKG_MIRROR_HASH:=a3c5cd58d58aebd5976ccadd754ac2f601fed888f48f78d364dfc86e3a34a1e4 +PKG_SOURCE_DATE:=2020-11-23 +PKG_SOURCE_VERSION:=e935c0c043b12415fa36aca01cfc757cadb9fac4 +PKG_MIRROR_HASH:=6bb79a7b5c87afbfc7227758cffbebcc5c9752e791bb5a39280a9aebd159250b CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/system/refpolicy/Makefile b/package/system/refpolicy/Makefile index d9c8c90208..a431770955 100644 --- a/package/system/refpolicy/Makefile +++ b/package/system/refpolicy/Makefile @@ -24,7 +24,7 @@ TAR_OPTIONS:=--transform='s%^refpolicy%$(PKG_NAME)-$(PKG_VERSION)%' -xf - include $(INCLUDE_DIR)/package.mk -define Package/refpolicy/Default +define Package/refpolicy SECTION:=system CATEGORY:=Base system TITLE:=SELinux reference policy @@ -32,19 +32,6 @@ define Package/refpolicy/Default PKGARCH:=all endef -define Package/refpolicy - $(call Package/refpolicy/Default) - CONFLICTS:=refpolicy-modular - VARIANT:=default -endef - -define Package/refpolicy-modular - $(call Package/refpolicy/Default) - TITLE += (modular) - VARIANT:=modular - PROVIDES:=refpolicy -endef - define Package/refpolicy/description The SELinux Reference Policy project (refpolicy) is a complete SELinux policy that can be used as the system @@ -69,43 +56,25 @@ endef # builds is a small host tool that gets run as part of the build # process. MAKE_FLAGS += \ - DESTDIR="$(PKG_INSTALL_DIR)" SETFILES="$(STAGING_DIR_HOST)/bin/setfiles" \ CHECKPOLICY="$(STAGING_DIR_HOSTPKG)/bin/checkpolicy" \ CC="$(HOSTCC)" \ CFLAGS="$(HOST_CFLAGS)" define Build/Configure - $(SED) "/NAME/c\NAME = targeted" $(PKG_BUILD_DIR)/build.conf -ifneq ($(BUILD_VARIANT),modular) $(SED) "/MONOLITHIC/c\MONOLITHIC = y" $(PKG_BUILD_DIR)/build.conf -endif + $(SED) "/NAME/c\NAME = targeted" $(PKG_BUILD_DIR)/build.conf $(call Build/Compile/Default,conf) endef -ifeq ($(BUILD_VARIANT),modular) -define Build/Install - $(call Build/Compile/Default,install install-headers) -endef -endif - define Package/refpolicy/conffiles /etc/selinux/config endef -Package/refpolicy-modular/conffiles = $(Package/refpolicy/conffiles) - define Package/refpolicy/install $(INSTALL_DIR) $(1)/etc/selinux $(CP) $(PKG_INSTALL_DIR)/etc/selinux/* $(1)/etc/selinux/ $(CP) ./files/selinux-config $(1)/etc/selinux/config -ifeq ($(BUILD_VARIANT),modular) - $(INSTALL_DIR) $(1)/usr/share/selinux - $(CP) $(PKG_INSTALL_DIR)/usr/share/selinux/* $(1)/usr/share/selinux/ -endif endef -Package/refpolicy-modular/install = $(Package/refpolicy/install) - $(eval $(call BuildPackage,refpolicy)) -$(eval $(call BuildPackage,refpolicy-modular)) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 65cba92b32..2d1e040286 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -138,7 +138,7 @@ package_index: FORCE (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \ gzip -9nc Packages > Packages.gz; \ $(if $(CONFIG_SIGNATURE_CHECK), \ - $(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY)); \ + $(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY)) \ ) >/dev/null 2>/dev/null $(OPKG) update >&2 || true diff --git a/target/linux/ath79/Makefile b/target/linux/ath79/Makefile index e074cde8ce..2a9857bfb1 100644 --- a/target/linux/ath79/Makefile +++ b/target/linux/ath79/Makefile @@ -6,7 +6,7 @@ BOARDNAME:=Atheros ATH79 CPU_TYPE:=24kc SUBTARGETS:=generic mikrotik nand tiny -FEATURES:=ramdisk usbgadget +FEATURES:=ramdisk squashfs usbgadget KERNEL_PATCHVER:=5.4 KERNEL_TESTING_PATCHVER:=5.4 diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts index 6efdfcab3c..9e38a9f392 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -34,10 +34,35 @@ }; }; +ð0 { + pll-data = <0xae000000 0x80000101 0x80001313>; + phy-mode = "rgmii-rxid"; +}; + +&gmac_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <0>; + txd-delay = <0>; +}; + &mdio1 { status = "okay"; + + phy1: ethernet-phy@1 { + reg = <1>; + at803x-override-sgmii-link-check; + }; }; ð1 { status = "okay"; + + mtd-mac-address = <&art 0x00>; + mtd-mac-address-increment = <1>; + + phy-handle = <&phy1>; + pll-data = <0x03000101 0x00000101 0x00001313>; + + qca955x-sgmii-fixup; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts index 4ef43be4ba..97687f1ce3 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts @@ -44,5 +44,4 @@ rxd-delay = <3>; txen-delay = <3>; txd-delay = <3>; - rgmii-enabled = <1>; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts index 1cf5c09d72..ee6d35685e 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts @@ -35,6 +35,7 @@ }; ð0 { + pll-data = <0xae000000 0x80000101 0x80001313>; phy-mode = "rgmii-id"; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts index 6a6228327f..0a1c9cb6dd 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts @@ -69,10 +69,35 @@ status = "okay"; }; +ð0 { + pll-data = <0xae000000 0x80000101 0x80001313>; + phy-mode = "rgmii-rxid"; +}; + +&gmac_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <0>; + txd-delay = <0>; +}; + &mdio1 { status = "okay"; + + phy1: ethernet-phy@1 { + reg = <1>; + at803x-override-sgmii-link-check; + }; }; ð1 { status = "okay"; + + mtd-mac-address = <&art 0x00>; + mtd-mac-address-increment = <1>; + + phy-handle = <&phy1>; + pll-data = <0x03000101 0x00000101 0x00001313>; + + qca955x-sgmii-fixup; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts index 59a9f4c523..2b808ce921 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts @@ -44,5 +44,4 @@ rxd-delay = <3>; txen-delay = <3>; txd-delay = <3>; - rgmii-enabled = <1>; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts index 8352b37f4a..747a1a46d3 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts @@ -45,5 +45,4 @@ rxd-delay = <3>; txen-delay = <3>; txd-delay = <3>; - rgmii-enabled = <1>; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi index 0ec955bd11..f41d8985a2 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -107,37 +107,14 @@ mtd-mac-address = <&art 0x00>; phy-handle = <&phy4>; - phy-mode = "rgmii-rxid"; - pll-data = <0xae000000 0x80000101 0x80001313>; gmac_config: gmac-config { device = <&gmac>; - rxdv-delay = <3>; - rxd-delay = <3>; - txen-delay = <0>; - txd-delay = <0>; rgmii-enabled = <1>; }; }; -&mdio1 { - phy1: ethernet-phy@1 { - reg = <1>; - at803x-override-sgmii-link-check; - }; -}; - -ð1 { - mtd-mac-address = <&art 0x00>; - mtd-mac-address-increment = <1>; - - phy-handle = <&phy1>; - pll-data = <0x03000101 0x00000101 0x00001313>; - - qca955x-sgmii-fixup; -}; - &wmac { status = "okay"; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts new file mode 100644 index 0000000000..fc6d3365a0 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9563_tplink_eap2x5-1port.dtsi" + +/ { + compatible = "tplink,eap225-outdoor-v1", "qca,qca9563"; + model = "TP-Link EAP225-Outdoor v1"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_amber; + led-running = &led_status_green; + led-upgrade = &led_status_amber; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led_status_amber: status_amber { + label = "amber:status"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts new file mode 100644 index 0000000000..3d4950eaf0 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9563_tplink_eap2x5-1port.dtsi" + +/ { + compatible = "tplink,eap225-v3", "qca,qca9563"; + model = "TP-Link EAP225 v3"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_amber; + led-running = &led_status_green; + led-upgrade = &led_status_amber; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led_status_amber: status_amber { + label = "amber:status"; + gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts b/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts new file mode 100644 index 0000000000..3da450192c --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9563_tplink_eap2x5-1port.dtsi" + +/ { + compatible = "tplink,eap245-v1", "qca,qca9563"; + model = "TP-Link EAP245 v1"; + + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_amber; + led-running = &led_status_green; + led-upgrade = &led_status_amber; + }; + + leds { + compatible = "gpio-leds"; + + led_status_green: status_green { + label = "green:status"; + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + led_status_amber: status_amber { + label = "amber:status"; + gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; + }; + + led_status_red: status_red { + label = "red:status"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + led_enable { + gpio-export,name = "leds:enable"; + gpio-export,output = <1>; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + }; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi new file mode 100644 index 0000000000..4c550fff6e --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca956x.dtsi" + +#include +#include + +/ { + aliases { + label-mac-device = ð0; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "partition-table"; + reg = <0x020000 0x010000>; + read-only; + }; + + info: partition@30000 { + label = "info"; + reg = <0x030000 0x010000>; + read-only; + }; + + partition@40000 { + compatible = "openwrt,elf"; + label = "firmware"; + reg = <0x040000 0xd80000>; + }; + + partition@dc0000 { + label = "config"; + reg = <0xdc0000 0x030000>; + read-only; + }; + + /* df0000-f30000 undefined in vendor firmware */ + + partition@f30000 { + label = "log"; + reg = <0xf30000 0x0c0000>; + read-only; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&pinmux { + mdio_pins: mdio_pins { + /* GPIO 10 as MDIO(0x20), GPIO 8 as MDC(0x21) */ + pinctrl-single,bits = <0x8 0x00200021 0x00ff00ff>; + }; +}; + +&mdio0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>; + + phy-mask = <0x10>; + + phy4: ethernet-phy@4 { + reg = <4>; + reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&phy4>; + phy-mode = "sgmii"; + + mtd-mac-address = <&info 0x8>; + + qca956x-serdes-fixup; + + gmac-config { + device = <&gmac>; + }; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&info 0x8>; +}; diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index d611007a86..07d9992ca7 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -577,6 +577,77 @@ static void ag71xx_bit_clear(void __iomem *reg, u32 bit) __raw_readl(reg); } +static void ag71xx_sgmii_serdes_init_qca956x(struct device_node *np) +{ + struct device_node *np_dev; + void __iomem *gmac_base; + u32 serdes_cal; + u32 t; + + np = of_get_child_by_name(np, "gmac-config"); + if (!np) + return; + + if (of_property_read_u32(np, "serdes-cal", &serdes_cal)) + /* By default, use middle value for resistor calibration */ + serdes_cal = 0x7; + + np_dev = of_parse_phandle(np, "device", 0); + if (!np_dev) + goto out; + + gmac_base = of_iomap(np_dev, 0); + if (!gmac_base) { + pr_err("%pOF: can't map GMAC registers\n", np_dev); + goto err_iomap; + } + + pr_debug("%pOF: fixup SERDES calibration to value %i\n", + np_dev, serdes_cal); + t = __raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_SERDES); + t &= ~(QCA956X_SGMII_SERDES_RES_CALIBRATION_MASK + << QCA956X_SGMII_SERDES_RES_CALIBRATION_SHIFT); + t |= (serdes_cal & QCA956X_SGMII_SERDES_RES_CALIBRATION_MASK) + << QCA956X_SGMII_SERDES_RES_CALIBRATION_SHIFT; + __raw_writel(t, gmac_base + QCA956X_GMAC_REG_SGMII_SERDES); + + ath79_pll_wr(QCA956X_PLL_ETH_SGMII_SERDES_REG, + QCA956X_PLL_ETH_SGMII_SERDES_LOCK_DETECT + | QCA956X_PLL_ETH_SGMII_SERDES_EN_PLL); + + t = __raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_SERDES); + + /* missing in QCA u-boot code, clear before setting */ + t &= ~(QCA956X_SGMII_SERDES_CDR_BW_MASK + << QCA956X_SGMII_SERDES_CDR_BW_SHIFT | + QCA956X_SGMII_SERDES_TX_DR_CTRL_MASK + << QCA956X_SGMII_SERDES_TX_DR_CTRL_SHIFT | + QCA956X_SGMII_SERDES_VCO_REG_MASK + << QCA956X_SGMII_SERDES_VCO_REG_SHIFT); + + t |= (3 << QCA956X_SGMII_SERDES_CDR_BW_SHIFT) | + (1 << QCA956X_SGMII_SERDES_TX_DR_CTRL_SHIFT) | + QCA956X_SGMII_SERDES_PLL_BW | + QCA956X_SGMII_SERDES_EN_SIGNAL_DETECT | + QCA956X_SGMII_SERDES_FIBER_SDO | + (3 << QCA956X_SGMII_SERDES_VCO_REG_SHIFT); + + __raw_writel(t, gmac_base + QCA956X_GMAC_REG_SGMII_SERDES); + + ath79_device_reset_clear(QCA956X_RESET_SGMII_ANALOG); + ath79_device_reset_clear(QCA956X_RESET_SGMII); + + while (!(__raw_readl(gmac_base + QCA956X_GMAC_REG_SGMII_SERDES) + & QCA956X_SGMII_SERDES_LOCK_DETECT_STATUS)) + ; + + iounmap(gmac_base); +err_iomap: + of_node_put(np_dev); +out: + of_node_put(np); +} + static void ag71xx_sgmii_init_qca955x(struct device_node *np) { struct device_node *np_dev; @@ -665,6 +736,37 @@ out: of_node_put(np); } +static void ag71xx_mux_select_sgmii_qca956x(struct device_node *np) +{ + struct device_node *np_dev; + void __iomem *gmac_base; + u32 t; + + np = of_get_child_by_name(np, "gmac-config"); + if (!np) + return; + + np_dev = of_parse_phandle(np, "device", 0); + if (!np_dev) + goto out; + + gmac_base = of_iomap(np_dev, 0); + if (!gmac_base) { + pr_err("%pOF: can't map GMAC registers\n", np_dev); + goto err_iomap; + } + + t = __raw_readl(gmac_base + QCA956X_GMAC_REG_ETH_CFG); + t |= QCA956X_ETH_CFG_GE0_SGMII; + __raw_writel(t, gmac_base + QCA956X_GMAC_REG_ETH_CFG); + + iounmap(gmac_base); +err_iomap: + of_node_put(np_dev); +out: + of_node_put(np); +} + static void ath79_mii_ctrl_set_if(struct ag71xx *ag, unsigned int mii_if) { u32 t; @@ -1423,6 +1525,11 @@ static int ag71xx_probe(struct platform_device *pdev) if (!res) return -EINVAL; + if (of_property_read_bool(np, "qca956x-serdes-fixup")) { + ag71xx_sgmii_serdes_init_qca956x(np); + ag71xx_sgmii_init_qca955x(np); + } + err = ag71xx_setup_gmac(np); if (err) return err; @@ -1566,6 +1673,10 @@ static int ag71xx_probe(struct platform_device *pdev) return ag->phy_if_mode; } + if (of_device_is_compatible(np, "qca,qca9560-eth") && + ag->phy_if_mode == PHY_INTERFACE_MODE_SGMII) + ag71xx_mux_select_sgmii_qca956x(np); + if (of_property_read_u32(np, "qca,mac-idx", &ag->mac_idx)) ag->mac_idx = -1; if (ag->mii_base) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 9fae4b147d..1da37c311c 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -48,6 +48,9 @@ ath79_setup_interfaces() tplink,cpe510-v3|\ tplink,cpe610-v1|\ tplink,cpe610-v2|\ + tplink,eap225-outdoor-v1|\ + tplink,eap225-v3|\ + tplink,eap245-v1|\ tplink,re350k-v1|\ tplink,re355-v1|\ tplink,re450-v1|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index f8f776992e..94a66c1ced 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -122,6 +122,12 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary romfs 0xf100) +2) ;; + tplink,eap245-v1|\ + tplink,re450-v2|\ + tplink,re450-v3) + caldata_extract "art" 0x5000 0x844 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1) + ;; tplink,re350k-v1) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +2) @@ -131,11 +137,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2) ;; - tplink,re450-v2|\ - tplink,re450-v3) - caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1) - ;; tplink,tl-wpa8630-v1) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x0fc00) +1) @@ -207,6 +208,8 @@ case "$FIRMWARE" in ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; + tplink,eap225-outdoor-v1|\ + tplink,eap225-v3|\ tplink,eap225-wall-v2|\ tplink,tl-wpa8630p-v2-int|\ tplink,tl-wpa8630p-v2.0-eu|\ diff --git a/target/linux/ath79/generic/target.mk b/target/linux/ath79/generic/target.mk index 0624f79572..4e53c89260 100644 --- a/target/linux/ath79/generic/target.mk +++ b/target/linux/ath79/generic/target.mk @@ -1,5 +1,4 @@ BOARDNAME:=Generic -FEATURES += squashfs DEFAULT_PACKAGES += wpad-basic-wolfssl diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 7979dda786..5088510af0 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -371,6 +371,28 @@ define Device/tplink-eap2x5 pad-extra 128 endef +define Device/tplink_eap225-outdoor-v1 + $(Device/tplink-eap2x5) + SOC := qca9563 + IMAGE_SIZE := 13824k + DEVICE_MODEL := EAP225-Outdoor + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct + TPLINK_BOARD_ID := EAP225-OUTDOOR-V1 +endef +TARGET_DEVICES += tplink_eap225-outdoor-v1 + +define Device/tplink_eap225-v3 + $(Device/tplink-eap2x5) + SOC := qca9563 + IMAGE_SIZE := 13824k + DEVICE_MODEL := EAP225 + DEVICE_VARIANT := v3 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct + TPLINK_BOARD_ID := EAP225-V3 +endef +TARGET_DEVICES += tplink_eap225-v3 + define Device/tplink_eap225-wall-v2 $(Device/tplink-eap2x5) SOC := qca9561 @@ -382,6 +404,17 @@ define Device/tplink_eap225-wall-v2 endef TARGET_DEVICES += tplink_eap225-wall-v2 +define Device/tplink_eap245-v1 + $(Device/tplink-eap2x5) + SOC := qca9563 + IMAGE_SIZE := 13824k + DEVICE_MODEL := EAP245 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + TPLINK_BOARD_ID := EAP245-V1 +endef +TARGET_DEVICES += tplink_eap245-v1 + define Device/tplink_eap245-v3 $(Device/tplink-eap2x5) SOC := qca9563 diff --git a/target/linux/ath79/mikrotik/target.mk b/target/linux/ath79/mikrotik/target.mk index fb5171fea7..f5df904487 100644 --- a/target/linux/ath79/mikrotik/target.mk +++ b/target/linux/ath79/mikrotik/target.mk @@ -1,5 +1,5 @@ BOARDNAME := MikroTik devices -FEATURES += minor nand squashfs +FEATURES += minor nand KERNELNAME := vmlinux vmlinuz IMAGES_DIR := ../../.. diff --git a/target/linux/ath79/nand/target.mk b/target/linux/ath79/nand/target.mk index a4069d7610..7ea9b57f45 100644 --- a/target/linux/ath79/nand/target.mk +++ b/target/linux/ath79/nand/target.mk @@ -1,6 +1,6 @@ BOARDNAME := Generic devices with NAND flash -FEATURES += squashfs nand +FEATURES += nand DEFAULT_PACKAGES += wpad-basic-wolfssl diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch index e77289dc56..e5aa9dccc6 100644 --- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch +++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch @@ -864,6 +864,6 @@ ipv6_hdr(skb)->hop_limit != hop_limit || - flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) { + flowlabel != net_hdr_word(ipv6_hdr(skb)))) { - err = ip6_route_me_harder(state->net, skb); + err = ip6_route_me_harder(state->net, state->sk, skb); if (err < 0) ret = NF_DROP_ERR(err); diff --git a/target/linux/ath79/tiny/target.mk b/target/linux/ath79/tiny/target.mk index 2ee71ea921..91f135b56e 100644 --- a/target/linux/ath79/tiny/target.mk +++ b/target/linux/ath79/tiny/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=Devices with small flash -FEATURES += squashfs small_flash +FEATURES += small_flash DEFAULT_PACKAGES += wpad-basic-wolfssl diff --git a/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Re-enable-HW-CS.patch b/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Re-enable-HW-CS.patch index 06928cb19e..13dd356f93 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Re-enable-HW-CS.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0134-spi-spi-bcm2835-Re-enable-HW-CS.patch @@ -70,7 +70,7 @@ Signed-off-by: Phil Elwell } static int bcm2835_spi_setup(struct spi_device *spi) -@@ -1277,6 +1325,7 @@ static int bcm2835_spi_probe(struct plat +@@ -1276,6 +1324,7 @@ static int bcm2835_spi_probe(struct plat ctlr->bits_per_word_mask = SPI_BPW_MASK(8); ctlr->num_chipselect = BCM2835_SPI_NUM_CS; ctlr->setup = bcm2835_spi_setup; diff --git a/target/linux/bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch b/target/linux/bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch index ce44eed0c8..752464087f 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c -@@ -1279,31 +1279,6 @@ static int bcm2835_spi_setup(struct spi_ +@@ -1278,31 +1278,6 @@ static int bcm2835_spi_setup(struct spi_ return -EINVAL; } @@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell - - spi->cs_gpiod = gpiochip_request_own_desc(chip, 8 - spi->chip_select, - DRV_NAME, -- lflags, +- GPIO_LOOKUP_FLAGS_DEFAULT, - GPIOD_OUT_LOW); - if (IS_ERR(spi->cs_gpiod)) - return PTR_ERR(spi->cs_gpiod); diff --git a/target/linux/bcm27xx/patches-5.4/950-0215-spi-bcm2835-enable-shared-interrupt-support.patch b/target/linux/bcm27xx/patches-5.4/950-0215-spi-bcm2835-enable-shared-interrupt-support.patch index 5e2a367750..fb0a0699cd 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0215-spi-bcm2835-enable-shared-interrupt-support.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0215-spi-bcm2835-enable-shared-interrupt-support.patch @@ -23,7 +23,7 @@ Signed-off-by: Martin Sperl /* Read as many bytes as possible from FIFO */ bcm2835_rd_fifo(bs); /* Write as many bytes as possible to FIFO */ -@@ -1335,7 +1339,8 @@ static int bcm2835_spi_probe(struct plat +@@ -1334,7 +1338,8 @@ static int bcm2835_spi_probe(struct plat bcm2835_wr(bs, BCM2835_SPI_CS, BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX); diff --git a/target/linux/bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch index bccf74b410..f233c4aedc 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch @@ -12,12 +12,11 @@ Signed-off-by: Phil Elwell --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c -@@ -1230,8 +1230,6 @@ static int bcm2835_spi_setup(struct spi_ +@@ -1230,7 +1230,6 @@ static int bcm2835_spi_setup(struct spi_ { struct spi_controller *ctlr = spi->controller; struct bcm2835_spi *bs = spi_controller_get_devdata(ctlr); - struct gpio_chip *chip; -- enum gpio_lookup_flags lflags; u32 cs; /* diff --git a/target/linux/bcm27xx/patches-5.4/950-0436-of-address-Follow-DMA-parent-for-dma-coherent.patch b/target/linux/bcm27xx/patches-5.4/950-0436-of-address-Follow-DMA-parent-for-dma-coherent.patch index dbfb1025cd..76af58a126 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0436-of-address-Follow-DMA-parent-for-dma-coherent.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0436-of-address-Follow-DMA-parent-for-dma-coherent.patch @@ -19,7 +19,7 @@ Signed-off-by: Rob Herring --- a/drivers/of/address.c +++ b/drivers/of/address.c -@@ -1023,7 +1023,7 @@ bool of_dma_is_coherent(struct device_no +@@ -1025,7 +1025,7 @@ bool of_dma_is_coherent(struct device_no of_node_put(node); return true; } diff --git a/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-exclude-dma_direct_map_resource-from-the-.patch b/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-exclude-dma_direct_map_resource-from-the-.patch index bb6b405517..2534b71b73 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-exclude-dma_direct_map_resource-from-the-.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0450-dma-direct-exclude-dma_direct_map_resource-from-the-.patch @@ -104,7 +104,7 @@ Tested-by: Marek Szyprowski } --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c -@@ -678,7 +678,7 @@ bool swiotlb_map(struct device *dev, phy +@@ -682,7 +682,7 @@ bool swiotlb_map(struct device *dev, phy /* Ensure that the address returned is DMA'ble */ *dma_addr = __phys_to_dma(dev, *phys); diff --git a/target/linux/generic/backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch b/target/linux/generic/backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch new file mode 100644 index 0000000000..e3581c5a0d --- /dev/null +++ b/target/linux/generic/backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch @@ -0,0 +1,29 @@ +From df8d85d8c69d6837817e54dcb73c84a8b5a13877 Mon Sep 17 00:00:00 2001 +From: Filip Moc +Date: Tue, 17 Nov 2020 18:36:31 +0100 +Subject: net: usb: qmi_wwan: Set DTR quirk for MR400 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +LTE module MR400 embedded in TL-MR6400 v4 requires DTR to be set. + +Signed-off-by: Filip Moc +Acked-by: Bjørn Mork +Link: https://lore.kernel.org/r/20201117173631.GA550981@moc6.cz +Signed-off-by: Jakub Kicinski +--- + drivers/net/usb/qmi_wwan.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -1092,7 +1092,7 @@ static const struct usb_device_id produc + {QMI_FIXED_INTF(0x05c6, 0x9011, 4)}, + {QMI_FIXED_INTF(0x05c6, 0x9021, 1)}, + {QMI_FIXED_INTF(0x05c6, 0x9022, 2)}, +- {QMI_FIXED_INTF(0x05c6, 0x9025, 4)}, /* Alcatel-sbell ASB TL131 TDD LTE (China Mobile) */ ++ {QMI_QUIRK_SET_DTR(0x05c6, 0x9025, 4)}, /* Alcatel-sbell ASB TL131 TDD LTE (China Mobile) */ + {QMI_FIXED_INTF(0x05c6, 0x9026, 3)}, + {QMI_FIXED_INTF(0x05c6, 0x902e, 5)}, + {QMI_FIXED_INTF(0x05c6, 0x9031, 5)}, diff --git a/target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch b/target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch new file mode 100644 index 0000000000..8724c1b7d3 --- /dev/null +++ b/target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch @@ -0,0 +1,61 @@ +From: Sven Eckelmann +Date: Sun, 22 Nov 2020 00:48:33 +0100 +Subject: [PATCH RFC] mtd: parser: cmdline: Fix parsing of part-names with colons + +Some devices (especially QCA ones) are already using hardcoded partition +names with colons in it. The OpenMesh A62 for example provides following +mtd relevant information via cmdline: + + root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait + +The change to split only on the last colon between mtd-id and partitions +will cause newpart to see following string for the first partition: + + KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) + +Such a partition list cannot be parsed and thus the device fails to boot. + +Avoid this behavior by making sure that the start of the first part-name +("(") will also be the last byte the mtd-id split algorithm is using for +its colon search. + +Forwarded: https://patchwork.ozlabs.org/project/linux-mtd/patch/20201122001533.985641-1-sven@narfation.org/ +Fixes: eb13fa022741 ("mtd: parser: cmdline: Support MTD names containing one or more colons") +Signed-off-by: Sven Eckelmann + +--- a/drivers/mtd/parsers/cmdlinepart.c ++++ b/drivers/mtd/parsers/cmdlinepart.c +@@ -218,7 +218,7 @@ static int mtdpart_setup_real(char *s) + struct cmdline_mtd_partition *this_mtd; + struct mtd_partition *parts; + int mtd_id_len, num_parts; +- char *p, *mtd_id, *semicol; ++ char *p, *mtd_id, *semicol, *open_parenth; + + /* + * Replace the first ';' by a NULL char so strrchr can work +@@ -228,6 +228,13 @@ static int mtdpart_setup_real(char *s) + if (semicol) + *semicol = '\0'; + ++ /* make sure that part-names with ":" will not be handled as ++ * part of the mtd-id with an ":" ++ */ ++ open_parenth = strchr(s, '('); ++ if (open_parenth) ++ *open_parenth = '\0'; ++ + mtd_id = s; + + /* +@@ -237,6 +244,10 @@ static int mtdpart_setup_real(char *s) + */ + p = strrchr(s, ':'); + ++ /* Restore the '(' now. */ ++ if (open_parenth) ++ *open_parenth = '('; ++ + /* Restore the ';' now. */ + if (semicol) + *semicol = ';'; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts index d866f8dd1a..f571da510e 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: ISC /* Copyright (c) 2015, The Linux Foundation. All rights reserved. * Copyright (c) 2017, Sven Eckelmann - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * */ #include "qcom-ipq4019.dtsi" @@ -95,30 +83,28 @@ }; aliases { - led-boot = &power; - led-failsafe = &power; - led-running = &power; - led-upgrade = &power; + led-boot = &led_status_green; + led-failsafe = &led_status_green; + led-running = &led_status_green; + led-upgrade = &led_status_green; }; leds { compatible = "gpio-leds"; - red { + status_red { label = "red:status"; gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-off"; }; - power: green { + led_status_green: status_green { label = "green:status"; gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; }; - blue { + status_blue { label = "blue:status"; gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-off"; }; }; @@ -168,7 +154,7 @@ status = "okay"; cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; - m25p80@0 { + flash@0 { #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts index 4c14f41b34..279050fa15 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: ISC /* Copyright (c) 2015, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018, Sven Eckelmann - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * */ #include "qcom-ipq4019.dtsi" @@ -98,30 +86,28 @@ }; aliases { - led-boot = &power; - led-failsafe = &power; - led-running = &power; - led-upgrade = &power; + led-boot = &led_status_green; + led-failsafe = &led_status_green; + led-running = &led_status_green; + led-upgrade = &led_status_green; }; leds { compatible = "gpio-leds"; - red { + status_red { label = "red:status"; gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-off"; }; - power: green { + led_status_green: status_green { label = "green:status"; gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>; }; - blue { + status_blue { label = "blue:status"; gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "default-off"; }; }; @@ -178,7 +164,7 @@ status = "okay"; cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; - m25p80@0 { + flash@0 { #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; diff --git a/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch b/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch index 204d6e62d9..9efbd583b4 100644 --- a/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch +++ b/target/linux/ipq806x/patches-5.4/0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch @@ -39,7 +39,7 @@ Signed-off-by: Sylwester Nawrocki --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -2101,6 +2101,75 @@ put_table: +@@ -2102,6 +2102,75 @@ put_table: } /** diff --git a/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch b/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch index 122511e463..8498a0b6df 100644 --- a/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch +++ b/target/linux/ipq806x/patches-5.4/0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch @@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov --- a/drivers/opp/core.c +++ b/drivers/opp/core.c -@@ -2141,6 +2141,7 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -2142,6 +2142,7 @@ int dev_pm_opp_adjust_voltage(struct dev struct opp_table *opp_table; struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV); int r = 0; @@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov /* Find the opp_table */ opp_table = _find_opp_table(dev); -@@ -2170,8 +2171,17 @@ int dev_pm_opp_adjust_voltage(struct dev +@@ -2171,8 +2172,17 @@ int dev_pm_opp_adjust_voltage(struct dev goto adjust_unlock; opp->supplies->u_volt = u_volt; diff --git a/target/linux/ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch b/target/linux/ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch index 32fc297fe0..95531508b6 100644 --- a/target/linux/ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch +++ b/target/linux/ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch @@ -89,10 +89,10 @@ Acked-by: Stanimir Varbanov - clk_disable_unprepare(res->core_clk); - clk_disable_unprepare(res->aux_clk); - clk_disable_unprepare(res->ref_clk); - regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies); - } -@@ -321,47 +310,45 @@ static int qcom_pcie_init_2_1_0(struct q + writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL); + +@@ -334,47 +323,45 @@ static int qcom_pcie_init_2_1_0(struct q return ret; } @@ -161,7 +161,7 @@ Acked-by: Stanimir Varbanov /* enable PCIe clocks and resets */ val = readl(pcie->parf + PCIE20_PARF_PHY_CTRL); -@@ -393,36 +380,6 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -406,36 +393,6 @@ static int qcom_pcie_init_2_1_0(struct q val |= PHY_REFCLK_SSP_EN; writel(val, pcie->parf + PCIE20_PARF_PHY_REFCLK); @@ -198,7 +198,7 @@ Acked-by: Stanimir Varbanov /* wait for clock acquisition */ usleep_range(1000, 1500); -@@ -435,15 +392,19 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -448,15 +405,19 @@ static int qcom_pcie_init_2_1_0(struct q return 0; diff --git a/target/linux/ipq806x/patches-5.4/093-7-v5.8-ipq806x-PCI-qcom-Add-ipq8064-rev2-variant.patch b/target/linux/ipq806x/patches-5.4/093-7-v5.8-ipq806x-PCI-qcom-Add-ipq8064-rev2-variant.patch index 4e8fa41f35..c3d61f164c 100644 --- a/target/linux/ipq806x/patches-5.4/093-7-v5.8-ipq806x-PCI-qcom-Add-ipq8064-rev2-variant.patch +++ b/target/linux/ipq806x/patches-5.4/093-7-v5.8-ipq806x-PCI-qcom-Add-ipq8064-rev2-variant.patch @@ -16,7 +16,7 @@ Acked-by: Stanimir Varbanov --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -355,7 +355,8 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -368,7 +368,8 @@ static int qcom_pcie_init_2_1_0(struct q val &= ~BIT(0); writel(val, pcie->parf + PCIE20_PARF_PHY_CTRL); @@ -26,7 +26,7 @@ Acked-by: Stanimir Varbanov writel(PCS_DEEMPH_TX_DEEMPH_GEN1(24) | PCS_DEEMPH_TX_DEEMPH_GEN2_3_5DB(24) | PCS_DEEMPH_TX_DEEMPH_GEN2_6DB(34), -@@ -1315,6 +1316,7 @@ err_pm_runtime_put: +@@ -1328,6 +1329,7 @@ err_pm_runtime_put: static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-apq8084", .data = &ops_1_0_0 }, { .compatible = "qcom,pcie-ipq8064", .data = &ops_2_1_0 }, diff --git a/target/linux/ipq806x/patches-5.4/093-8-v5.8-ipq806x-PCI-qcom-Support-pci-speed-set-for-ipq806x.patch b/target/linux/ipq806x/patches-5.4/093-8-v5.8-ipq806x-PCI-qcom-Support-pci-speed-set-for-ipq806x.patch index 9f60f14619..02ac7460e8 100644 --- a/target/linux/ipq806x/patches-5.4/093-8-v5.8-ipq806x-PCI-qcom-Support-pci-speed-set-for-ipq806x.patch +++ b/target/linux/ipq806x/patches-5.4/093-8-v5.8-ipq806x-PCI-qcom-Support-pci-speed-set-for-ipq806x.patch @@ -49,7 +49,7 @@ Backported with light changes: }; #define to_qcom_pcie(x) dev_get_drvdata((x)->dev) -@@ -384,6 +388,11 @@ static int qcom_pcie_init_2_1_0(struct q +@@ -397,6 +401,11 @@ static int qcom_pcie_init_2_1_0(struct q /* wait for clock acquisition */ usleep_range(1000, 1500); @@ -61,7 +61,7 @@ Backported with light changes: /* Set the Max TLP size to 2K, instead of using default of 4K */ writel(CFG_REMOTE_RD_REQ_BRIDGE_SIZE_2K, -@@ -1248,6 +1257,10 @@ static int qcom_pcie_probe(struct platfo +@@ -1261,6 +1270,10 @@ static int qcom_pcie_probe(struct platfo goto err_pm_runtime_put; } diff --git a/target/linux/ipq806x/patches-5.4/094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch b/target/linux/ipq806x/patches-5.4/094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch index fb8c827d65..328942dad9 100644 --- a/target/linux/ipq806x/patches-5.4/094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch +++ b/target/linux/ipq806x/patches-5.4/094-v5.7-ipq806x-net-mdio-add-ipq8064-mdio-driver.patch @@ -37,7 +37,7 @@ Signed-off-by: David S. Miller depends on ARCH_MOXART || COMPILE_TEST --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -51,6 +51,7 @@ obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium +@@ -50,6 +50,7 @@ obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o obj-$(CONFIG_MDIO_I2C) += mdio-i2c.o diff --git a/target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch b/target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch deleted file mode 100644 index 2ca336b05b..0000000000 --- a/target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1960d75e3251659be8276529e4d01cf6993d9f4a Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Tue, 1 Sep 2020 14:21:44 +0200 -Subject: [PATCH] PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0 - -Qsdk U-Boot can incorrectly leave the PCIe interface in an undefined -state if bootm command is used instead of bootipq. This is caused by the -not deinit of PCIe when bootm is called. Reset the PCIe before init -anyway to fix this U-Boot bug. - -Signed-off-by: Ansuel Smith -Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") -Cc: stable@vger.kernel.org # v4.19+ ---- - drivers/pci/controller/dwc/pcie-qcom.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - ---- a/drivers/pci/controller/dwc/pcie-qcom.c -+++ b/drivers/pci/controller/dwc/pcie-qcom.c -@@ -296,6 +296,9 @@ static void qcom_pcie_deinit_2_1_0(struc - reset_control_assert(res->por_reset); - reset_control_assert(res->ext_reset); - reset_control_assert(res->phy_reset); -+ -+ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL); -+ - regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies); - } - -@@ -308,6 +311,16 @@ static int qcom_pcie_init_2_1_0(struct q - u32 val; - int ret; - -+ /* reset the PCIe interface as uboot can leave it undefined state */ -+ reset_control_assert(res->pci_reset); -+ reset_control_assert(res->axi_reset); -+ reset_control_assert(res->ahb_reset); -+ reset_control_assert(res->por_reset); -+ reset_control_assert(res->ext_reset); -+ reset_control_assert(res->phy_reset); -+ -+ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL); -+ - ret = regulator_bulk_enable(ARRAY_SIZE(res->supplies), res->supplies); - if (ret < 0) { - dev_err(dev, "cannot enable regulators\n"); diff --git a/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4 index 6da7ff01a5..026cf15673 100644 --- a/target/linux/layerscape/armv8_64b/config-5.4 +++ b/target/linux/layerscape/armv8_64b/config-5.4 @@ -419,9 +419,12 @@ 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 CONFIG_GPIO_MPC8XXX=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y @@ -839,6 +842,10 @@ CONFIG_SERIAL_FSL_LPUART=y CONFIG_SERIAL_FSL_LPUART_CONSOLE=y CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_SC16IS7XX=y +CONFIG_SERIAL_SC16IS7XX_CORE=y +# CONFIG_SERIAL_SC16IS7XX_I2C is not set +CONFIG_SERIAL_SC16IS7XX_SPI=y CONFIG_SERIAL_XILINX_PS_UART=y CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y CONFIG_SERIO=y diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 776a6e5ac2..08ef6cb9a1 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/target/linux/layerscape/image/armv7.mk @@ -10,6 +10,7 @@ define Device/Default FILESYSTEMS := squashfs IMAGES := firmware.bin sysupgrade.bin KERNEL := kernel-bin | uImage none + KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb KERNEL_NAME := zImage KERNEL_LOADADDR := 0x80008000 KERNEL_ENTRY_POINT := 0x80008000 diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 23af3e26a0..264f7dfd84 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -10,6 +10,7 @@ define Device/Default IMAGES := firmware.bin sysupgrade.bin FILESYSTEMS := squashfs KERNEL := kernel-bin | gzip | uImage gzip + KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb KERNEL_LOADADDR := 0x80080000 KERNEL_ENTRY_POINT := 0x80080000 DEVICE_DTS = freescale/$(subst _,-,$(1)) @@ -62,6 +63,9 @@ define Device/fsl_ls1012a-rdb DEVICE_PACKAGES += \ layerscape-ppfe \ tfa-ls1012a-rdb \ + kmod-hwmon-ina2xx \ + kmod-iio-fxas21002c-i2c \ + kmod-iio-fxos8700-i2c \ kmod-ppfe IMAGE/firmware.bin := \ ls-clean | \ diff --git a/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch b/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch index 36c393f2d0..303d122459 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch @@ -22,7 +22,7 @@ Signed-off-by: Vladimir Oltean --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -371,6 +371,16 @@ config AT803X_PHY +@@ -367,6 +367,16 @@ config AT803X_PHY ---help--- Currently supports the AT8030 and AT8035 model diff --git a/target/linux/layerscape/patches-5.4/701-net-0328-net-phy-Inphi-IN112525_s03-retimer-support.patch b/target/linux/layerscape/patches-5.4/701-net-0328-net-phy-Inphi-IN112525_s03-retimer-support.patch index a074c719d6..68a0bc4eaa 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0328-net-phy-Inphi-IN112525_s03-retimer-support.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0328-net-phy-Inphi-IN112525_s03-retimer-support.patch @@ -15,7 +15,7 @@ Signed-off-by: Florin Chiculita --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -479,6 +479,11 @@ config ICPLUS_PHY +@@ -475,6 +475,11 @@ config ICPLUS_PHY ---help--- Currently supports the IP175C and IP1001 PHYs. @@ -29,7 +29,7 @@ Signed-off-by: Florin Chiculita ---help--- --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -88,6 +88,7 @@ obj-$(CONFIG_DP83848_PHY) += dp83848.o +@@ -87,6 +87,7 @@ obj-$(CONFIG_DP83848_PHY) += dp83848.o obj-$(CONFIG_DP83867_PHY) += dp83867.o obj-$(CONFIG_FIXED_PHY) += fixed_phy.o obj-$(CONFIG_ICPLUS_PHY) += icplus.o diff --git a/target/linux/layerscape/patches-5.4/802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch b/target/linux/layerscape/patches-5.4/802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch index 30b9e4b10c..890c9a9991 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch @@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -784,16 +784,23 @@ static inline struct flexcan_priv *rx_of +@@ -783,16 +783,23 @@ static inline struct flexcan_priv *rx_of return container_of(offload, struct flexcan_priv, offload); } @@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde mb = flexcan_get_mb(priv, n); if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { -@@ -807,7 +814,7 @@ static unsigned int flexcan_mailbox_read +@@ -806,7 +813,7 @@ static unsigned int flexcan_mailbox_read code = reg_ctrl & FLEXCAN_MB_CODE_MASK; if ((code != FLEXCAN_MB_CODE_RX_FULL) && (code != FLEXCAN_MB_CODE_RX_OVERRUN)) @@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde if (code == FLEXCAN_MB_CODE_RX_OVERRUN) { /* This MB was overrun, we lost data */ -@@ -817,11 +824,17 @@ static unsigned int flexcan_mailbox_read +@@ -816,11 +823,17 @@ static unsigned int flexcan_mailbox_read } else { reg_iflag1 = priv->read(®s->iflag1); if (!(reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_AVAILABLE)) @@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde /* increase timstamp to full 32 bit */ *timestamp = reg_ctrl << 16; -@@ -840,7 +853,7 @@ static unsigned int flexcan_mailbox_read +@@ -839,7 +852,7 @@ static unsigned int flexcan_mailbox_read *(__be32 *)(cf->data + i) = data; } @@ -89,7 +89,7 @@ Signed-off-by: Marc Kleine-Budde if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { /* Clear IRQ */ if (n < 32) -@@ -857,7 +870,7 @@ static unsigned int flexcan_mailbox_read +@@ -856,7 +869,7 @@ static unsigned int flexcan_mailbox_read */ priv->read(®s->timer); diff --git a/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch b/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch index b576cec2f4..a080c6f6c4 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0007-can-flexcan-use-devm_platform_ioremap_resource-to-si.patch @@ -17,7 +17,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -1570,7 +1570,6 @@ static int flexcan_probe(struct platform +@@ -1569,7 +1569,6 @@ static int flexcan_probe(struct platform struct net_device *dev; struct flexcan_priv *priv; struct regulator *reg_xceiver; @@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde struct clk *clk_ipg = NULL, *clk_per = NULL; struct flexcan_regs __iomem *regs; int err, irq; -@@ -1605,12 +1604,11 @@ static int flexcan_probe(struct platform +@@ -1604,12 +1603,11 @@ static int flexcan_probe(struct platform clock_freq = clk_get_rate(clk_per); } diff --git a/target/linux/layerscape/patches-5.4/802-can-0008-can-flexcan-flexcan_irq_state-only-read-timestamp-if.patch b/target/linux/layerscape/patches-5.4/802-can-0008-can-flexcan-flexcan_irq_state-only-read-timestamp-if.patch index bc84f5f907..9c2dde99a9 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0008-can-flexcan-flexcan_irq_state-only-read-timestamp-if.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0008-can-flexcan-flexcan_irq_state-only-read-timestamp-if.patch @@ -18,7 +18,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -744,8 +744,6 @@ static void flexcan_irq_state(struct net +@@ -743,8 +743,6 @@ static void flexcan_irq_state(struct net u32 timestamp; int err; @@ -27,7 +27,7 @@ Signed-off-by: Marc Kleine-Budde flt = reg_esr & FLEXCAN_ESR_FLT_CONF_MASK; if (likely(flt == FLEXCAN_ESR_FLT_CONF_ACTIVE)) { tx_state = unlikely(reg_esr & FLEXCAN_ESR_TX_WRN) ? -@@ -765,6 +763,8 @@ static void flexcan_irq_state(struct net +@@ -764,6 +762,8 @@ static void flexcan_irq_state(struct net if (likely(new_state == priv->can.state)) return; diff --git a/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch b/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch index c6960bace1..6926a57f4a 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0009-can-flexcan-rename-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch @@ -23,7 +23,7 @@ Signed-off-by: Marc Kleine-Budde #define FLEXCAN_IFLAG_RX_FIFO_OVERFLOW BIT(7) #define FLEXCAN_IFLAG_RX_FIFO_WARN BIT(6) #define FLEXCAN_IFLAG_RX_FIFO_AVAILABLE BIT(5) -@@ -880,7 +880,7 @@ static inline u64 flexcan_read_reg_iflag +@@ -879,7 +879,7 @@ static inline u64 flexcan_read_reg_iflag u32 iflag1, iflag2; iflag2 = priv->read(®s->iflag2) & priv->reg_imask2_default & @@ -32,7 +32,7 @@ Signed-off-by: Marc Kleine-Budde iflag1 = priv->read(®s->iflag1) & priv->reg_imask1_default; return (u64)iflag2 << 32 | iflag1; -@@ -930,7 +930,7 @@ static irqreturn_t flexcan_irq(int irq, +@@ -929,7 +929,7 @@ static irqreturn_t flexcan_irq(int irq, reg_iflag2 = priv->read(®s->iflag2); /* transmission complete interrupt */ @@ -41,7 +41,7 @@ Signed-off-by: Marc Kleine-Budde u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl); handled = IRQ_HANDLED; -@@ -942,7 +942,7 @@ static irqreturn_t flexcan_irq(int irq, +@@ -941,7 +941,7 @@ static irqreturn_t flexcan_irq(int irq, /* after sending a RTR frame MB is in RX mode */ priv->write(FLEXCAN_MB_CODE_TX_INACTIVE, &priv->tx_mb->can_ctrl); @@ -50,7 +50,7 @@ Signed-off-by: Marc Kleine-Budde netif_wake_queue(dev); } -@@ -1321,7 +1321,7 @@ static int flexcan_open(struct net_devic +@@ -1320,7 +1320,7 @@ static int flexcan_open(struct net_devic priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); priv->reg_imask1_default = 0; diff --git a/target/linux/layerscape/patches-5.4/802-can-0010-can-flexcan-flexcan_irq-rename-variable-reg_iflag-re.patch b/target/linux/layerscape/patches-5.4/802-can-0010-can-flexcan-flexcan_irq-rename-variable-reg_iflag-re.patch index e2086b74b3..8f24e12ef9 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0010-can-flexcan-flexcan_irq-rename-variable-reg_iflag-re.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0010-can-flexcan-flexcan_irq-rename-variable-reg_iflag-re.patch @@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -898,13 +898,13 @@ static irqreturn_t flexcan_irq(int irq, +@@ -897,13 +897,13 @@ static irqreturn_t flexcan_irq(int irq, /* reception interrupt */ if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch b/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch index f8ea725512..e032c850ba 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0011-can-flexcan-rename-struct-flexcan_priv-reg_imask-1-2.patch @@ -49,7 +49,7 @@ Signed-off-by: Marc Kleine-Budde struct clk *clk_ipg; struct clk *clk_per; -@@ -879,9 +879,9 @@ static inline u64 flexcan_read_reg_iflag +@@ -878,9 +878,9 @@ static inline u64 flexcan_read_reg_iflag struct flexcan_regs __iomem *regs = priv->regs; u32 iflag1, iflag2; @@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde return (u64)iflag2 << 32 | iflag1; } -@@ -1228,8 +1228,8 @@ static int flexcan_chip_start(struct net +@@ -1227,8 +1227,8 @@ static int flexcan_chip_start(struct net /* enable interrupts atomically */ disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); @@ -72,7 +72,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1320,8 +1320,8 @@ static int flexcan_open(struct net_devic +@@ -1319,8 +1319,8 @@ static int flexcan_open(struct net_devic priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); @@ -83,7 +83,7 @@ Signed-off-by: Marc Kleine-Budde priv->offload.mailbox_read = flexcan_mailbox_read; -@@ -1333,12 +1333,12 @@ static int flexcan_open(struct net_devic +@@ -1332,12 +1332,12 @@ static int flexcan_open(struct net_devic imask = GENMASK_ULL(priv->offload.mb_last, priv->offload.mb_first); diff --git a/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch b/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch index ef8fd9d837..d253c9ff3d 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0012-can-flexcan-remove-TX-mailbox-bit-from-struct-flexca.patch @@ -24,7 +24,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -879,8 +879,7 @@ static inline u64 flexcan_read_reg_iflag +@@ -878,8 +878,7 @@ static inline u64 flexcan_read_reg_iflag struct flexcan_regs __iomem *regs = priv->regs; u32 iflag1, iflag2; @@ -34,7 +34,7 @@ Signed-off-by: Marc Kleine-Budde iflag1 = priv->read(®s->iflag1) & priv->rx_mask1; return (u64)iflag2 << 32 | iflag1; -@@ -1229,7 +1228,7 @@ static int flexcan_chip_start(struct net +@@ -1228,7 +1227,7 @@ static int flexcan_chip_start(struct net disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); priv->write(priv->rx_mask1, ®s->imask1); @@ -43,7 +43,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1320,9 +1319,6 @@ static int flexcan_open(struct net_devic +@@ -1319,9 +1318,6 @@ static int flexcan_open(struct net_devic priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); @@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde priv->offload.mailbox_read = flexcan_mailbox_read; if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { -@@ -1333,12 +1329,12 @@ static int flexcan_open(struct net_devic +@@ -1332,12 +1328,12 @@ static int flexcan_open(struct net_devic imask = GENMASK_ULL(priv->offload.mb_last, priv->offload.mb_first); diff --git a/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch b/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch index c52da3a143..e98cc4ca7a 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0013-can-flexcan-convert-struct-flexcan_priv-rx_mask-1-2-.patch @@ -41,7 +41,7 @@ Signed-off-by: Marc Kleine-Budde struct clk *clk_ipg; struct clk *clk_per; -@@ -873,16 +873,15 @@ static struct sk_buff *flexcan_mailbox_r +@@ -872,16 +872,15 @@ static struct sk_buff *flexcan_mailbox_r return skb; } @@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde } static irqreturn_t flexcan_irq(int irq, void *dev_id) -@@ -1053,6 +1052,7 @@ static int flexcan_chip_start(struct net +@@ -1052,6 +1051,7 @@ static int flexcan_chip_start(struct net struct flexcan_priv *priv = netdev_priv(dev); struct flexcan_regs __iomem *regs = priv->regs; u32 reg_mcr, reg_ctrl, reg_ctrl2, reg_mecr; @@ -70,7 +70,7 @@ Signed-off-by: Marc Kleine-Budde int err, i; struct flexcan_mb __iomem *mb; -@@ -1227,8 +1227,9 @@ static int flexcan_chip_start(struct net +@@ -1226,8 +1226,9 @@ static int flexcan_chip_start(struct net /* enable interrupts atomically */ disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); @@ -82,7 +82,7 @@ Signed-off-by: Marc Kleine-Budde enable_irq(dev->irq); /* print chip status */ -@@ -1322,19 +1323,14 @@ static int flexcan_open(struct net_devic +@@ -1321,19 +1322,14 @@ static int flexcan_open(struct net_devic priv->offload.mailbox_read = flexcan_mailbox_read; if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch b/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch index b724dc435c..f20557fbfc 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0014-can-flexcan-introduce-struct-flexcan_priv-tx_mask-an.patch @@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde u32 reg_ctrl_default; struct clk *clk_ipg; -@@ -891,7 +891,8 @@ static irqreturn_t flexcan_irq(int irq, +@@ -890,7 +890,8 @@ static irqreturn_t flexcan_irq(int irq, struct flexcan_priv *priv = netdev_priv(dev); struct flexcan_regs __iomem *regs = priv->regs; irqreturn_t handled = IRQ_NONE; @@ -49,7 +49,7 @@ Signed-off-by: Marc Kleine-Budde enum can_state last_state = priv->can.state; /* reception interrupt */ -@@ -925,10 +926,10 @@ static irqreturn_t flexcan_irq(int irq, +@@ -924,10 +925,10 @@ static irqreturn_t flexcan_irq(int irq, } } @@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl); handled = IRQ_HANDLED; -@@ -940,7 +941,7 @@ static irqreturn_t flexcan_irq(int irq, +@@ -939,7 +940,7 @@ static irqreturn_t flexcan_irq(int irq, /* after sending a RTR frame MB is in RX mode */ priv->write(FLEXCAN_MB_CODE_TX_INACTIVE, &priv->tx_mb->can_ctrl); @@ -71,7 +71,7 @@ Signed-off-by: Marc Kleine-Budde netif_wake_queue(dev); } -@@ -1227,7 +1228,7 @@ static int flexcan_chip_start(struct net +@@ -1226,7 +1227,7 @@ static int flexcan_chip_start(struct net /* enable interrupts atomically */ disable_irq(dev->irq); priv->write(priv->reg_ctrl_default, ®s->ctrl); @@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde priv->write(upper_32_bits(reg_imask), ®s->imask2); priv->write(lower_32_bits(reg_imask), ®s->imask1); enable_irq(dev->irq); -@@ -1319,6 +1320,7 @@ static int flexcan_open(struct net_devic +@@ -1318,6 +1319,7 @@ static int flexcan_open(struct net_devic flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO); priv->tx_mb_idx = priv->mb_count - 1; priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx); diff --git a/target/linux/layerscape/patches-5.4/802-can-0015-can-flexcan-flexcan_read_reg_iflag_rx-optimize-readi.patch b/target/linux/layerscape/patches-5.4/802-can-0015-can-flexcan-flexcan_read_reg_iflag_rx-optimize-readi.patch index cf7a6fdcbe..466c70ecbd 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0015-can-flexcan-flexcan_read_reg_iflag_rx-optimize-readi.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0015-can-flexcan-flexcan_read_reg_iflag_rx-optimize-readi.patch @@ -24,7 +24,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -779,6 +779,23 @@ static void flexcan_irq_state(struct net +@@ -778,6 +778,23 @@ static void flexcan_irq_state(struct net dev->stats.rx_fifo_errors++; } @@ -48,7 +48,7 @@ Signed-off-by: Marc Kleine-Budde static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload) { return container_of(offload, struct flexcan_priv, offload); -@@ -873,17 +890,6 @@ static struct sk_buff *flexcan_mailbox_r +@@ -872,17 +889,6 @@ static struct sk_buff *flexcan_mailbox_r return skb; } diff --git a/target/linux/layerscape/patches-5.4/802-can-0016-can-flexcan-flexcan_irq-add-support-for-TX-mailbox-i.patch b/target/linux/layerscape/patches-5.4/802-can-0016-can-flexcan-flexcan_irq-add-support-for-TX-mailbox-i.patch index 5fb96f4512..5286e4b11b 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0016-can-flexcan-flexcan_irq-add-support-for-TX-mailbox-i.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0016-can-flexcan-flexcan_irq-add-support-for-TX-mailbox-i.patch @@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -791,11 +791,24 @@ static inline u64 flexcan_read64_mask(st +@@ -790,11 +790,24 @@ static inline u64 flexcan_read64_mask(st return reg & mask; } @@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload) { return container_of(offload, struct flexcan_priv, offload); -@@ -932,7 +945,7 @@ static irqreturn_t flexcan_irq(int irq, +@@ -931,7 +944,7 @@ static irqreturn_t flexcan_irq(int irq, } } @@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde /* transmission complete interrupt */ if (reg_iflag_tx & priv->tx_mask) { -@@ -947,7 +960,7 @@ static irqreturn_t flexcan_irq(int irq, +@@ -946,7 +959,7 @@ static irqreturn_t flexcan_irq(int irq, /* after sending a RTR frame MB is in RX mode */ priv->write(FLEXCAN_MB_CODE_TX_INACTIVE, &priv->tx_mb->can_ctrl); diff --git a/target/linux/layerscape/patches-5.4/802-can-0017-can-flexcan-flexcan_mailbox_read-make-use-of-flexcan.patch b/target/linux/layerscape/patches-5.4/802-can-0017-can-flexcan-flexcan_mailbox_read-make-use-of-flexcan.patch index 37c2ed3cf9..29ad52f226 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0017-can-flexcan-flexcan_mailbox_read-make-use-of-flexcan.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0017-can-flexcan-flexcan_mailbox_read-make-use-of-flexcan.patch @@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -884,15 +884,10 @@ static struct sk_buff *flexcan_mailbox_r +@@ -883,15 +883,10 @@ static struct sk_buff *flexcan_mailbox_r } mark_as_read: diff --git a/target/linux/layerscape/patches-5.4/802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch b/target/linux/layerscape/patches-5.4/802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch index 968bc11d51..0e229ee5d1 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch @@ -15,7 +15,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -628,10 +628,10 @@ static int flexcan_get_berr_counter(cons +@@ -627,10 +627,10 @@ static int flexcan_get_berr_counter(cons static netdev_tx_t flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev) { const struct flexcan_priv *priv = netdev_priv(dev); @@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde int i; if (can_dropped_invalid_skb(dev, skb)) -@@ -639,18 +639,18 @@ static netdev_tx_t flexcan_start_xmit(st +@@ -638,18 +638,18 @@ static netdev_tx_t flexcan_start_xmit(st netif_stop_queue(dev); @@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]); } -@@ -822,7 +822,7 @@ static struct sk_buff *flexcan_mailbox_r +@@ -821,7 +821,7 @@ static struct sk_buff *flexcan_mailbox_r struct flexcan_regs __iomem *regs = priv->regs; struct flexcan_mb __iomem *mb; struct sk_buff *skb; @@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde u32 reg_ctrl, reg_id, reg_iflag1; int i; -@@ -859,8 +859,8 @@ static struct sk_buff *flexcan_mailbox_r +@@ -858,8 +858,8 @@ static struct sk_buff *flexcan_mailbox_r reg_ctrl = priv->read(&mb->can_ctrl); } @@ -73,7 +73,7 @@ Signed-off-by: Marc Kleine-Budde skb = ERR_PTR(-ENOMEM); goto mark_as_read; } -@@ -870,17 +870,17 @@ static struct sk_buff *flexcan_mailbox_r +@@ -869,17 +869,17 @@ static struct sk_buff *flexcan_mailbox_r reg_id = priv->read(&mb->can_id); if (reg_ctrl & FLEXCAN_MB_CNT_IDE) diff --git a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch index e9c8740e6b..b6f8a3a3cf 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0019-can-flexcan-add-CAN-FD-mode-support.patch @@ -93,7 +93,7 @@ Signed-off-by: Marc Kleine-Budde }; struct flexcan_devtype_data { -@@ -337,6 +367,30 @@ static const struct can_bittiming_const +@@ -336,6 +366,30 @@ static const struct can_bittiming_const .brp_inc = 1, }; @@ -124,7 +124,7 @@ Signed-off-by: Marc Kleine-Budde /* FlexCAN module is essentially modelled as a little-endian IP in most * SoCs, i.e the registers as well as the message buffer areas are * implemented in a little-endian fashion. -@@ -631,7 +685,7 @@ static netdev_tx_t flexcan_start_xmit(st +@@ -630,7 +684,7 @@ static netdev_tx_t flexcan_start_xmit(st struct canfd_frame *cfd = (struct canfd_frame *)skb->data; u32 can_id; u32 data; @@ -133,7 +133,7 @@ Signed-off-by: Marc Kleine-Budde int i; if (can_dropped_invalid_skb(dev, skb)) -@@ -649,6 +703,9 @@ static netdev_tx_t flexcan_start_xmit(st +@@ -648,6 +702,9 @@ static netdev_tx_t flexcan_start_xmit(st if (cfd->can_id & CAN_RTR_FLAG) ctrl |= FLEXCAN_MB_CNT_RTR; @@ -143,7 +143,7 @@ Signed-off-by: Marc Kleine-Budde for (i = 0; i < cfd->len; i += sizeof(u32)) { data = be32_to_cpup((__be32 *)&cfd->data[i]); priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]); -@@ -859,7 +916,10 @@ static struct sk_buff *flexcan_mailbox_r +@@ -858,7 +915,10 @@ static struct sk_buff *flexcan_mailbox_r reg_ctrl = priv->read(&mb->can_ctrl); } @@ -155,7 +155,7 @@ Signed-off-by: Marc Kleine-Budde if (unlikely(!skb)) { skb = ERR_PTR(-ENOMEM); goto mark_as_read; -@@ -874,9 +934,17 @@ static struct sk_buff *flexcan_mailbox_r +@@ -873,9 +933,17 @@ static struct sk_buff *flexcan_mailbox_r else cfd->can_id = (reg_id >> 18) & CAN_SFF_MASK; @@ -176,7 +176,7 @@ Signed-off-by: Marc Kleine-Budde for (i = 0; i < cfd->len; i += sizeof(u32)) { __be32 data = cpu_to_be32(priv->read(&mb->data[i / sizeof(u32)])); -@@ -1021,27 +1089,14 @@ static irqreturn_t flexcan_irq(int irq, +@@ -1020,27 +1088,14 @@ static irqreturn_t flexcan_irq(int irq, static void flexcan_set_bittiming(struct net_device *dev) { @@ -209,7 +209,7 @@ Signed-off-by: Marc Kleine-Budde if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK) reg |= FLEXCAN_CTRL_LPB; if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) -@@ -1052,9 +1107,102 @@ static void flexcan_set_bittiming(struct +@@ -1051,9 +1106,102 @@ static void flexcan_set_bittiming(struct netdev_dbg(dev, "writing ctrl=0x%08x\n", reg); priv->write(reg, ®s->ctrl); @@ -315,7 +315,7 @@ Signed-off-by: Marc Kleine-Budde } /* flexcan_chip_start -@@ -1066,7 +1214,7 @@ static int flexcan_chip_start(struct net +@@ -1065,7 +1213,7 @@ static int flexcan_chip_start(struct net { struct flexcan_priv *priv = netdev_priv(dev); struct flexcan_regs __iomem *regs = priv->regs; @@ -324,7 +324,7 @@ Signed-off-by: Marc Kleine-Budde u64 reg_imask; int err, i; struct flexcan_mb __iomem *mb; -@@ -1163,6 +1311,26 @@ static int flexcan_chip_start(struct net +@@ -1162,6 +1310,26 @@ static int flexcan_chip_start(struct net netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl); priv->write(reg_ctrl, ®s->ctrl); @@ -351,7 +351,7 @@ Signed-off-by: Marc Kleine-Budde if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) { reg_ctrl2 = priv->read(®s->ctrl2); reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS; -@@ -1310,6 +1478,12 @@ static int flexcan_open(struct net_devic +@@ -1309,6 +1477,12 @@ static int flexcan_open(struct net_devic struct flexcan_priv *priv = netdev_priv(dev); int err; @@ -364,7 +364,7 @@ Signed-off-by: Marc Kleine-Budde err = pm_runtime_get_sync(priv->dev); if (err < 0) return err; -@@ -1322,7 +1496,10 @@ static int flexcan_open(struct net_devic +@@ -1321,7 +1495,10 @@ static int flexcan_open(struct net_devic if (err) goto out_close; @@ -376,7 +376,7 @@ Signed-off-by: Marc Kleine-Budde priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) + (sizeof(priv->regs->mb[1]) / priv->mb_size); -@@ -1667,6 +1844,18 @@ static int flexcan_probe(struct platform +@@ -1666,6 +1843,18 @@ static int flexcan_probe(struct platform priv->devtype_data = devtype_data; priv->reg_xceiver = reg_xceiver; diff --git a/target/linux/layerscape/patches-5.4/802-can-0020-can-flexcan-add-CAN-FD-BRS-support.patch b/target/linux/layerscape/patches-5.4/802-can-0020-can-flexcan-add-CAN-FD-BRS-support.patch index d569c7fbb7..9ddc6b029c 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0020-can-flexcan-add-CAN-FD-BRS-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0020-can-flexcan-add-CAN-FD-BRS-support.patch @@ -13,7 +13,7 @@ Signed-off-by: Marc Kleine-Budde --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c -@@ -703,9 +703,13 @@ static netdev_tx_t flexcan_start_xmit(st +@@ -702,9 +702,13 @@ static netdev_tx_t flexcan_start_xmit(st if (cfd->can_id & CAN_RTR_FLAG) ctrl |= FLEXCAN_MB_CNT_RTR; @@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde for (i = 0; i < cfd->len; i += sizeof(u32)) { data = be32_to_cpup((__be32 *)&cfd->data[i]); priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]); -@@ -936,6 +940,9 @@ static struct sk_buff *flexcan_mailbox_r +@@ -935,6 +939,9 @@ static struct sk_buff *flexcan_mailbox_r if (reg_ctrl & FLEXCAN_MB_CNT_EDL) { cfd->len = can_dlc2len(get_canfd_dlc((reg_ctrl >> 16) & 0xf)); diff --git a/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch b/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch index 2c3452b0d1..0b987bb5e3 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0021-can-flexcan-add-ISO-CAN-FD-feature-support.patch @@ -31,7 +31,7 @@ Signed-off-by: Marc Kleine-Budde /* FLEXCAN memory error control register (MECR) bits */ #define FLEXCAN_MECR_ECRWRDIS BIT(31) -@@ -1323,6 +1324,7 @@ static int flexcan_chip_start(struct net +@@ -1322,6 +1323,7 @@ static int flexcan_chip_start(struct net reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE; reg_fdctrl &= ~(FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3)); reg_mcr = priv->read(®s->mcr) & ~FLEXCAN_MCR_FDEN; @@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde /* support BRS when set CAN FD mode * 64 bytes payload per MB and 7 MBs per RAM block by default -@@ -1332,10 +1334,14 @@ static int flexcan_chip_start(struct net +@@ -1331,10 +1333,14 @@ static int flexcan_chip_start(struct net reg_fdctrl |= FLEXCAN_FDCTRL_FDRATE; reg_fdctrl |= FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3); reg_mcr |= FLEXCAN_MCR_FDEN; @@ -54,7 +54,7 @@ Signed-off-by: Marc Kleine-Budde } if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) { -@@ -1853,7 +1859,7 @@ static int flexcan_probe(struct platform +@@ -1852,7 +1858,7 @@ static int flexcan_probe(struct platform if (priv->devtype_data->quirks & FLEXCAN_QUIRK_TIMESTAMP_SUPPORT_FD) { if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch b/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch index ee00ddb5ac..dcdc1647aa 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0022-can-flexcan-add-Transceiver-Delay-Compensation-suopp.patch @@ -31,7 +31,7 @@ Signed-off-by: Marc Kleine-Budde /* FLEXCAN FD Bit Timing register (FDCBT) bits */ #define FLEXCAN_FDCBT_FPRESDIV(x) (((x) & 0x3ff) << 20) -@@ -1101,7 +1104,7 @@ static void flexcan_set_bittiming(struct +@@ -1100,7 +1103,7 @@ static void flexcan_set_bittiming(struct struct can_bittiming *bt = &priv->can.bittiming; struct can_bittiming *dbt = &priv->can.data_bittiming; struct flexcan_regs __iomem *regs = priv->regs; @@ -40,7 +40,7 @@ Signed-off-by: Marc Kleine-Budde reg = priv->read(®s->ctrl); reg &= ~(FLEXCAN_CTRL_LPB | FLEXCAN_CTRL_SMP | FLEXCAN_CTRL_LOM); -@@ -1173,6 +1176,19 @@ static void flexcan_set_bittiming(struct +@@ -1172,6 +1175,19 @@ static void flexcan_set_bittiming(struct FLEXCAN_FDCBT_FPROPSEG(dbt->prop_seg); priv->write(reg_fdcbt, ®s->fdcbt); @@ -60,7 +60,7 @@ Signed-off-by: Marc Kleine-Budde if (bt->brp != dbt->brp) netdev_warn(dev, "Warning!! data brp = %d and brp = %d don't match.\n" "flexcan may not work. consider using different bitrate or data bitrate\n", -@@ -1322,6 +1338,7 @@ static int flexcan_chip_start(struct net +@@ -1321,6 +1337,7 @@ static int flexcan_chip_start(struct net /* FDCTRL */ if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD) { reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE; diff --git a/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch b/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch index 3c86456922..333cbf5563 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0023-can-flexcan-add-imx8qm-support.patch @@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde static const struct flexcan_devtype_data fsl_vf610_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | -@@ -1760,6 +1767,7 @@ out_put_node: +@@ -1759,6 +1766,7 @@ out_put_node: } static const struct of_device_id flexcan_of_match[] = { diff --git a/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch b/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch index 0c9dc7d142..1758cc68d3 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0024-can-flexcan-add-lx2160ar1-support.patch @@ -34,8 +34,8 @@ Signed-off-by: Marc Kleine-Budde + static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | - FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE | -@@ -1776,6 +1783,7 @@ static const struct of_device_id flexcan + FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, +@@ -1775,6 +1782,7 @@ static const struct of_device_id flexcan { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, }, { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, }, diff --git a/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch b/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch index 806a020303..6a6e068dee 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch @@ -28,7 +28,7 @@ Signed-off-by: Joakim Zhang #include #define DRV_NAME "flexcan" -@@ -1954,9 +1955,7 @@ static int __maybe_unused flexcan_suspen +@@ -1955,9 +1956,7 @@ static int __maybe_unused flexcan_suspen if (err) return err; } else { @@ -39,7 +39,7 @@ Signed-off-by: Joakim Zhang } netif_stop_queue(dev); netif_device_detach(dev); -@@ -1982,7 +1981,9 @@ static int __maybe_unused flexcan_resume +@@ -1983,7 +1982,9 @@ static int __maybe_unused flexcan_resume if (err) return err; } else { diff --git a/target/linux/layerscape/patches-5.4/802-can-0026-can-flexcan-fix-deadlock-when-using-self-wakeup.patch b/target/linux/layerscape/patches-5.4/802-can-0026-can-flexcan-fix-deadlock-when-using-self-wakeup.patch index a771395701..da8a406301 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0026-can-flexcan-fix-deadlock-when-using-self-wakeup.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0026-can-flexcan-fix-deadlock-when-using-self-wakeup.patch @@ -47,7 +47,7 @@ Signed-off-by: Joakim Zhang /* FLEXCAN Bit Timing register (CBT) bits */ #define FLEXCAN_CBT_BTF BIT(31) -@@ -1055,6 +1054,12 @@ static irqreturn_t flexcan_irq(int irq, +@@ -1054,6 +1053,12 @@ static irqreturn_t flexcan_irq(int irq, reg_esr = priv->read(®s->esr); diff --git a/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch b/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch index 06fd55aaa8..d7e40d5463 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0027-can-flexcan-add-CAN-wakeup-function-for-i.MX8.patch @@ -63,7 +63,7 @@ Signed-off-by: Joakim Zhang }; static const struct flexcan_devtype_data fsl_vf610_devtype_data = { -@@ -504,6 +516,32 @@ static void flexcan_enable_wakeup_irq(st +@@ -503,6 +515,32 @@ static void flexcan_enable_wakeup_irq(st priv->write(reg_mcr, ®s->mcr); } @@ -96,7 +96,7 @@ Signed-off-by: Joakim Zhang static inline int flexcan_enter_stop_mode(struct flexcan_priv *priv) { struct flexcan_regs __iomem *regs = priv->regs; -@@ -513,9 +551,12 @@ static inline int flexcan_enter_stop_mod +@@ -512,9 +550,12 @@ static inline int flexcan_enter_stop_mod reg_mcr |= FLEXCAN_MCR_SLF_WAK; priv->write(reg_mcr, ®s->mcr); @@ -112,7 +112,7 @@ Signed-off-by: Joakim Zhang return flexcan_low_power_enter_ack(priv); } -@@ -526,8 +567,11 @@ static inline int flexcan_exit_stop_mode +@@ -525,8 +566,11 @@ static inline int flexcan_exit_stop_mode u32 reg_mcr; /* remove stop request */ @@ -126,7 +126,7 @@ Signed-off-by: Joakim Zhang reg_mcr = priv->read(®s->mcr); -@@ -1767,11 +1811,6 @@ static int flexcan_setup_stop_mode(struc +@@ -1766,11 +1810,6 @@ static int flexcan_setup_stop_mode(struc gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit, priv->stm.ack_gpr, priv->stm.ack_bit); @@ -138,7 +138,7 @@ Signed-off-by: Joakim Zhang return 0; out_put_node: -@@ -1779,6 +1818,30 @@ out_put_node: +@@ -1778,6 +1817,30 @@ out_put_node: return ret; } @@ -169,7 +169,7 @@ Signed-off-by: Joakim Zhang static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, }, { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, }, -@@ -1921,9 +1984,19 @@ static int flexcan_probe(struct platform +@@ -1920,9 +1983,19 @@ static int flexcan_probe(struct platform devm_can_led_init(dev); if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) { diff --git a/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch b/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch index 0c631356f7..6bfeec9ee3 100644 --- a/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch +++ b/target/linux/layerscape/patches-5.4/802-can-0028-can-flexcan-Add-S32V234-support-to-FlexCAN-driver.patch @@ -25,8 +25,8 @@ Reviewed-by: Leonard Crestez // // Based on code originally by Andrey Volkov -@@ -385,6 +386,10 @@ static const struct flexcan_devtype_data - FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, +@@ -384,6 +385,10 @@ static const struct flexcan_devtype_data + FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, }; +static struct flexcan_devtype_data fsl_s32v234_devtype_data = { @@ -36,7 +36,7 @@ Reviewed-by: Leonard Crestez static const struct can_bittiming_const flexcan_bittiming_const = { .name = DRV_NAME, .tseg1_min = 4, -@@ -1853,6 +1858,8 @@ static const struct of_device_id flexcan +@@ -1852,6 +1857,8 @@ static const struct of_device_id flexcan { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, }, { .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, }, diff --git a/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch b/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch index bdc8725399..0a2ca6465a 100644 --- a/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch +++ b/target/linux/layerscape/patches-5.4/811-kvm-0002-arm-arm64-KVM-allow-specifying-s2-prot-bits-when-map.patch @@ -64,7 +64,7 @@ Signed-off-by: Laurentiu Tudor if (writable) pte = kvm_s2pte_mkwrite(pte); -@@ -2361,7 +2363,7 @@ int kvm_arch_prepare_memory_region(struc +@@ -2362,7 +2364,7 @@ int kvm_arch_prepare_memory_region(struc ret = kvm_phys_addr_ioremap(kvm, gpa, pa, vm_end - vm_start, diff --git a/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch b/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch index 1b36b61e62..91f48a78bc 100644 --- a/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch +++ b/target/linux/layerscape/patches-5.4/811-kvm-0003-arm-arm64-KVM-drop-qman-mmio-cacheable-mapping-hack.patch @@ -105,7 +105,7 @@ Signed-off-by: Diana Craciun if (kvm_is_device_pfn(pfn)) { mem_type = PAGE_S2_DEVICE; flags |= KVM_S2PTE_FLAG_IS_IOMAP; -@@ -2351,6 +2395,9 @@ int kvm_arch_prepare_memory_region(struc +@@ -2352,6 +2396,9 @@ int kvm_arch_prepare_memory_region(struc gpa_t gpa = mem->guest_phys_addr + (vm_start - mem->userspace_addr); phys_addr_t pa; @@ -115,7 +115,7 @@ Signed-off-by: Diana Craciun pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; pa += vm_start - vma->vm_start; -@@ -2361,9 +2408,13 @@ int kvm_arch_prepare_memory_region(struc +@@ -2362,9 +2409,13 @@ int kvm_arch_prepare_memory_region(struc goto out; } diff --git a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch index 8a8486b36f..95f8af1eea 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0005-usb-dwc3-add-otg-properties-update.patch @@ -54,7 +54,7 @@ Signed-off-by: Peter Chen * All 3.1 IP version constants are greater than the 3.0 IP --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c -@@ -3525,6 +3525,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) +@@ -3543,6 +3543,10 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; dwc->gadget.lpm_capable = true; diff --git a/target/linux/layerscape/patches-5.4/900-layerscape_fix_support_of_LS1012A-RDB.patch b/target/linux/layerscape/patches-5.4/900-layerscape_fix_support_of_LS1012A-RDB.patch new file mode 100644 index 0000000000..bcad654e5c --- /dev/null +++ b/target/linux/layerscape/patches-5.4/900-layerscape_fix_support_of_LS1012A-RDB.patch @@ -0,0 +1,107 @@ +From 650480191492845c8eb7e0c2e5b1e37cabc59eff Mon Sep 17 00:00:00 2001 +From: Pawel Dembicki +Date: Fri, 13 Nov 2020 07:17:39 +0100 +Subject: [PATCH 1/2] arm64: dts: fsl-ls1012a-rdb: add i2c devices + +LS1012A-RDB equipped in some i2c devices: + - 3x GPIO Expander: PCAL9555A (NXP) + - Gyro: FXAS21002 (NXP) + - Accelerometer: FXOS8700 (NXP) + - Current & Power Monitor: INA220 (TI) + +This patch add listed devices to dts. + +Signed-off-by: Pawel Dembicki +--- + .../boot/dts/freescale/fsl-ls1012a-rdb.dts | 66 +++++++++++++++++++ + 1 file changed, 66 insertions(+) + +--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts +@@ -7,6 +7,7 @@ + */ + /dts-v1/; + ++#include + #include "fsl-ls1012a.dtsi" + + / { +@@ -16,6 +17,25 @@ + aliases { + ethernet0 = &pfe_mac0; + ethernet1 = &pfe_mac1; ++ serial0 = &duart0; ++ }; ++ ++ dummy3v3: dummy_reg { ++ compatible = "regulator-fixed"; ++ regulator-name = "dummy_regulator_3v3"; ++ ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-always-on; ++ }; ++ ++ dummy1v8: dummy_reg { ++ compatible = "regulator-fixed"; ++ regulator-name = "dummy_regulator_1v8"; ++ ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; + }; + }; + +@@ -42,6 +62,52 @@ + + &i2c0 { + status = "okay"; ++ ++ accelerometer@1e { ++ compatible = "nxp,fxos8700"; ++ reg = <0x1e>; ++ interrupt-parent = <&gpio26>; ++ interrupts = <13 IRQ_TYPE_EDGE_RISING>; ++ interrupt-names = "INT1"; ++ }; ++ ++ gyroscope@20 { ++ compatible = "nxp,fxas21002c"; ++ reg = <0x20>; ++ vdd-supply = <&dummy3v3>; ++ vddio-supply = <&dummy1v8>; ++ }; ++ ++ gpio@24 { ++ compatible = "nxp,pcal9555a"; ++ reg = <0x24>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ }; ++ ++ gpio25: gpio@25 { ++ compatible = "nxp,pcal9555a"; ++ reg = <0x25>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ }; ++ ++ gpio26: gpio@26 { ++ compatible = "nxp,pcal9555a"; ++ reg = <0x26>; ++ interrupt-parent = <&gpio0>; ++ interrupts = <13 IRQ_TYPE_EDGE_FALLING>; ++ interrupt-controller; ++ #interrupt-cells = <2>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ }; ++ ++ current-sensor@40 { ++ compatible = "ti,ina220"; ++ reg = <0x40>; ++ shunt-resistor = <2000>; ++ }; + }; + + &sata { diff --git a/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch new file mode 100644 index 0000000000..a00a240135 --- /dev/null +++ b/target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch @@ -0,0 +1,28 @@ +From 12de4b5e7cbcd193d5abb753ca511fe8f2236846 Mon Sep 17 00:00:00 2001 +From: Pawel Dembicki +Date: Fri, 13 Nov 2020 07:30:03 +0100 +Subject: [PATCH 1/1] gpio-pca953x: hack: Allow to use falling trigger + +Gpio-mpc8xxx driver of Layerscape gpio support only edge interrupts. +Gpio-pca953x allow only low state trigger. This hack fix the problem. + +Signed-off-by: Pawel Dembicki +--- + +--- a/drivers/gpio/gpio-pca953x.c ++++ b/drivers/gpio/gpio-pca953x.c +@@ -879,10 +879,12 @@ static int pca953x_irq_setup(struct pca9 + for (i = 0; i < NBANK(chip); i++) + chip->irq_stat[i] &= reg_direction[i]; + mutex_init(&chip->irq_lock); +- ++ /* gpio-mpc8xxx driver of Layerscape gpio support only edge interrupts. ++ * This hack fix the problem. ++ */ + ret = devm_request_threaded_irq(&client->dev, client->irq, + NULL, pca953x_irq_handler, +- IRQF_TRIGGER_LOW | IRQF_ONESHOT | ++ IRQF_TRIGGER_FALLING | IRQF_ONESHOT | + IRQF_SHARED, + dev_name(&client->dev), chip); + if (ret) { diff --git a/target/linux/layerscape/patches-5.4/902-layerscape_improve_support_of_LS1012A-FRDM.patch b/target/linux/layerscape/patches-5.4/902-layerscape_improve_support_of_LS1012A-FRDM.patch new file mode 100644 index 0000000000..62edf43a35 --- /dev/null +++ b/target/linux/layerscape/patches-5.4/902-layerscape_improve_support_of_LS1012A-FRDM.patch @@ -0,0 +1,58 @@ +From 12de4b5e7cbcd193d5abb753ca511fe8f2236846 Mon Sep 17 00:00:00 2001 +From: Pawel Dembicki +Date: Fri, 13 Nov 2020 07:30:03 +0100 +Subject: [PATCH 2/2] arm64: dts: fsl-ls1012a-frdm: add spi-uart device + +This patch adds spi-uart controller to LS1012A-FRDM board dts. +Device is equipped in SC16IS740 from NXP. + +Signed-off-by: Pawel Dembicki +--- + .../boot/dts/freescale/fsl-ls1012a-frdm.dts | 21 +++++++++++++++++++ + 1 file changed, 21 insertions(+) + +--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts +@@ -7,6 +7,7 @@ + */ + /dts-v1/; + ++#include + #include "fsl-ls1012a.dtsi" + + / { +@@ -16,6 +17,7 @@ + aliases { + ethernet0 = &pfe_mac0; + ethernet1 = &pfe_mac1; ++ serial0 = &duart0; + }; + + sys_mclk: clock-mclk { +@@ -61,6 +63,26 @@ + }; + }; + }; ++ ++&dspi { ++ status = "okay"; ++ bus-num = <0>; ++ ++ serial@0 { ++ reg = <0>; ++ compatible = "nxp,sc16is740"; ++ spi-max-frequency = <4000000>; ++ clocks = <&sc16is7xx_clk>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <13 IRQ_TYPE_EDGE_FALLING>; ++ ++ sc16is7xx_clk: sc16is7xx_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <24000000>; ++ }; ++ }; ++}; + + &duart0 { + status = "okay"; diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network index 0a2a2b144c..c945251e4e 100755 --- a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network @@ -18,6 +18,9 @@ globalscale,espressobin-v7|\ globalscale,espressobin-v7-emmc) ucidef_set_interfaces_lan_wan "lan0 lan1" "wan" ;; +globalscale,espressobin-ultra) + ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan" + ;; marvell,armada-3720-db|\ methode,udpu) ucidef_set_interfaces_lan_wan "eth1" "eth0" diff --git a/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh index cdf5933272..1153fd8f38 100755 --- a/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/platform.sh @@ -11,6 +11,7 @@ platform_check_image() { case "$(board_name)" in globalscale,espressobin|\ globalscale,espressobin-emmc|\ + globalscale,espressobin-ultra|\ globalscale,espressobin-v7|\ globalscale,espressobin-v7-emmc) platform_check_image_sdcard "$1" @@ -25,6 +26,7 @@ platform_do_upgrade() { case "$(board_name)" in globalscale,espressobin|\ globalscale,espressobin-emmc|\ + globalscale,espressobin-ultra|\ globalscale,espressobin-v7|\ globalscale,espressobin-v7-emmc) platform_do_upgrade_sdcard "$1" @@ -41,6 +43,7 @@ platform_copy_config() { case "$(board_name)" in globalscale,espressobin|\ globalscale,espressobin-emmc|\ + globalscale,espressobin-ultra|\ globalscale,espressobin-v7|\ globalscale,espressobin-v7-emmc) platform_copy_config_sdcard diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts new file mode 100644 index 0000000000..669b67e5a9 --- /dev/null +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for ESPRESSObin-Ultra + * Copyright (C) 2019 Globalscale technologies, Inc. + * + * Jason Hung + */ + +/dts-v1/; + +#include +#include "armada-372x.dtsi" + +/ { + model = "Globalscale Marvell ESPRESSOBin Ultra Board"; + compatible = "globalscale,espressobin-ultra", "marvell,armada3720", + "marvell,armada3710"; + + aliases { + /* for dsa slave device */ + ethernet1 = &switch0port1; + ethernet2 = &switch0port2; + ethernet3 = &switch0port3; + ethernet4 = &switch0port4; + ethernet5 = &switch0port5; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x00000000 0x00000000 0x00000000 0x20000000>; + }; + + reg_usb3_vbus: usb3-vbus { + compatible = "regulator-fixed"; + regulator-name = "usb3-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpionb 19 GPIO_ACTIVE_HIGH>; + }; + + usb3_phy: usb3-phy { + compatible = "usb-nop-xceiv"; + vcc-supply = <®_usb3_vbus>; + }; + + leds { + pinctrl-names = "default"; + compatible = "gpio-leds"; + /* No assigned functions to the LEDs by default */ + led1 { + label = "ebin-ultra:blue:led1"; + gpios = <&gpionb 11 GPIO_ACTIVE_LOW>; + }; + led2 { + label = "ebin-ultra:green:led2"; + gpios = <&gpionb 12 GPIO_ACTIVE_LOW>; + }; + led3 { + label = "ebin-ultra:red:led3"; + gpios = <&gpionb 13 GPIO_ACTIVE_LOW>; + }; + led4 { + label = "ebin-ultra:yellow:led4"; + gpios = <&gpionb 14 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&sata { + status = "okay"; +}; + +&sdhci0 { + status = "okay"; + non-removable; + bus-width = <8>; + mmc-ddr-1_8v; + mmc-hs400-1_8v; + marvell,pad-type = "fixed-1-8v"; +}; + +&spi0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spi_quad_pins>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <108000000>; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <4>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "firmware"; + reg = <0x0 0x3e0000>; + }; + partition@3e0000 { + label = "hw-info"; + reg = <0x3e0000 0x10000>; + read-only; + }; + partition@3f0000 { + label = "u-boot-env"; + reg = <0x3f0000 0x10000>; + }; + }; + }; +}; + +&uart0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; +}; + +&i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + clock-frequency = <100000>; + + rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; +}; + +&usb3 { + status = "okay"; + usb-phy = <&usb3_phy>; +}; + +&usb2 { + status = "okay"; +}; + +ð0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&mdio { + status = "okay"; + + extphy: ethernet-phy@0 { + reg = <1>; + }; + + switch0: switch0@1 { + compatible = "marvell,mv88e6085"; + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + + dsa,member = <0 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + switch0port0: port@0 { + reg = <0>; + label = "cpu"; + ethernet = <ð0>; + }; + + switch0port1: port@1 { + reg = <1>; + label = "lan0"; + phy-handle = <&switch0phy1>; + }; + + switch0port2: port@2 { + reg = <2>; + label = "lan1"; + phy-handle = <&switch0phy2>; + }; + + switch0port3: port@3 { + reg = <3>; + label = "lan2"; + phy-handle = <&switch0phy3>; + }; + + switch0port4: port@4 { + reg = <4>; + label = "lan3"; + phy-handle = <&switch0phy4>; + }; + + switch0port5: port@5 { + reg = <5>; + label = "wan"; + phy-handle = <&extphy>; + phy-mode = "sgmii"; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch0phy1: switch0phy1@11 { + reg = <0x11>; + }; + switch0phy2: switch0phy2@12 { + reg = <0x12>; + }; + switch0phy3: switch0phy3@13 { + reg = <0x13>; + }; + switch0phy4: switch0phy4@14 { + reg = <0x14>; + }; + }; + }; +}; diff --git a/target/linux/mvebu/image/cortexa53.mk b/target/linux/mvebu/image/cortexa53.mk index b65f25472c..6a3a568655 100644 --- a/target/linux/mvebu/image/cortexa53.mk +++ b/target/linux/mvebu/image/cortexa53.mk @@ -32,6 +32,17 @@ define Device/globalscale_espressobin-emmc endef TARGET_DEVICES += globalscale_espressobin-emmc +define Device/globalscale_espressobin-ultra + $(call Device/Default-arm64) + DEVICE_VENDOR := Marvell + DEVICE_MODEL := ESPRESSObin + DEVICE_VARIANT := Ultra + DEVICE_PACKAGES += kmod-i2c-pxa kmod-rtc-pcf8563 + SOC := armada-3720 + BOOT_SCRIPT := espressobin +endef +TARGET_DEVICES += globalscale_espressobin-ultra + define Device/globalscale_espressobin-v7 $(call Device/Default-arm64) DEVICE_VENDOR := Marvell diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts new file mode 100644 index 0000000000..f0b87b5312 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts @@ -0,0 +1,97 @@ +#include "mt7628an_tplink_8m.dtsi" + +/ { + compatible = "tplink,tl-mr6400-v4", "mediatek,mt7628an-soc"; + model = "TP-Link TL-MR6400 v4"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + rfkill { + label = "rfkill"; + gpios = <&gpio 46 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "white:power"; + gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "white:wan"; + gpios = <&gpio 39 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "white:wlan"; + gpios = <&gpio 40 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "white:lan"; + gpios = <&gpio 41 GPIO_ACTIVE_LOW>; + }; + + signal1 { + label = "white:signal1"; + gpios = <&gpio 42 GPIO_ACTIVE_LOW>; + }; + + signal2 { + label = "white:signal2"; + gpios = <&gpio 43 GPIO_ACTIVE_LOW>; + }; + + signal3 { + label = "white:signal3"; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&state_default { + gpio { + groups = "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "refclk", "uart1", "wdt", "wled_an"; + function = "gpio"; + }; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,portdisable = <0x21>; +}; + +&wmac { + mtd-mac-address = <&factory 0x1f100>; +}; + +ðernet { + mtd-mac-address = <&factory 0x1f100>; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 5459288341..30c41420aa 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -482,6 +482,22 @@ define Device/tplink_tl-mr3420-v5 endef TARGET_DEVICES += tplink_tl-mr3420-v5 +define Device/tplink_tl-mr6400-v4 + $(Device/tplink-v2) + IMAGE_SIZE := 7808k + DEVICE_MODEL := TL-MR6400 + DEVICE_VARIANT := v4 + TPLINK_FLASHLAYOUT := 8Mmtk + TPLINK_HWID := 0x64000004 + TPLINK_HWREV := 0x4 + TPLINK_HWREVADD := 0x4 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ + kmod-usb-serial kmod-usb-serial-option kmod-usb-net-qmi-wwan uqmi + IMAGES := sysupgrade.bin tftp-recovery.bin + IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin) +endef +TARGET_DEVICES += tplink_tl-mr6400-v4 + define Device/tplink_tl-wa801nd-v5 $(Device/tplink-v2) IMAGE_SIZE := 7808k diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index e1c3454237..4ed38bf5f2 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -75,6 +75,10 @@ tplink,tl-wr842n-v5) ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01" ;; +tplink,tl-mr6400-v4) + ucidef_set_led_switch "lan" "lan" "white:lan" "switch0" "0x0e" + ucidef_set_led_switch "wan" "wan" "white:wan" "switch0" "0x10" + ;; tplink,tl-wr841n-v13) ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt" ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x2" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index a6272e5a55..a7e978a2e2 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -112,6 +112,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" ;; + tplink,tl-mr6400-v4) + ucidef_add_switch "switch0" \ + "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" + ;; tplink,tl-wr902ac-v3) ucidef_add_switch "switch0" \ "4:lan" "6@eth0" diff --git a/target/linux/ramips/patches-5.4/991-at803x.patch b/target/linux/ramips/patches-5.4/991-at803x.patch index dd1d2755ed..af0132f8f7 100644 --- a/target/linux/ramips/patches-5.4/991-at803x.patch +++ b/target/linux/ramips/patches-5.4/991-at803x.patch @@ -1,6 +1,6 @@ -From 60ae82b0ea56c279be384b99cd2a42ae5ba7c5c7 Mon Sep 17 00:00:00 2001 +From 924453aa9d2324e5611f8e2b71df746d8f0c79f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= -Date: Mon, 4 Nov 2019 22:22:17 +0100 +Date: Fri, 13 Nov 2020 16:11:32 +0100 Subject: [PATCH] net: phy: at803x: add support for SFP module in RGMII-to-x-base mode MIME-Version: 1.0 @@ -9,20 +9,21 @@ Content-Transfer-Encoding: 8bit Signed-off-by: René van Dorst --- - drivers/net/phy/at803x.c | 74 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 74 insertions(+) + drivers/net/phy/at803x.c | 91 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 91 insertions(+) --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c -@@ -14,6 +14,7 @@ +@@ -14,6 +14,8 @@ #include #include #include +#include ++#include #define AT803X_SPECIFIC_STATUS 0x11 #define AT803X_SS_SPEED_MASK (3 << 14) -@@ -53,9 +54,18 @@ +@@ -53,9 +55,18 @@ #define AT803X_MODE_CFG_MASK 0x0F #define AT803X_MODE_CFG_SGMII 0x01 @@ -41,7 +42,7 @@ Signed-off-by: René van Dorst #define AT803X_DEBUG_REG_0 0x00 #define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15) -@@ -243,10 +253,56 @@ static int at803x_resume(struct phy_devi +@@ -243,10 +254,72 @@ static int at803x_resume(struct phy_devi return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0); } @@ -59,23 +60,39 @@ Signed-off-by: René van Dorst + +static int at803x_sfp_insert(void *upstream, const struct sfp_eeprom_id *id) +{ -+ struct phy_device *phydev = upstream; ++ __ETHTOOL_DECLARE_LINK_MODE_MASK(at803x_support) = { 0, }; + __ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, }; ++ struct phy_device *phydev = upstream; + phy_interface_t iface; + ++ phylink_set(at803x_support, 1000baseX_Full); ++ /* AT803x only support 1000baseX but SGMII works fine when module runs ++ * at 1Gbit. ++ */ ++ phylink_set(at803x_support, 1000baseT_Full); ++ + sfp_parse_support(phydev->sfp_bus, id, support); ++ ++ // Limit to interfaces that both sides support ++ linkmode_and(support, support, at803x_support); ++ ++ if (linkmode_empty(support)) ++ goto unsupported_mode; ++ + iface = sfp_select_interface(phydev->sfp_bus, support); + + if (iface != PHY_INTERFACE_MODE_SGMII && -+ iface != PHY_INTERFACE_MODE_1000BASEX) { -+ dev_info(&phydev->mdio.dev, "incompatible SFP module inserted;" -+ "Only SGMII/1000BASEX are supported!\n"); -+ return -EINVAL; -+ } ++ iface != PHY_INTERFACE_MODE_1000BASEX) ++ goto unsupported_mode; + + dev_info(&phydev->mdio.dev, "SFP interface %s", phy_modes(iface)); + + return 0; ++ ++unsupported_mode: ++ dev_info(&phydev->mdio.dev, "incompatible SFP module inserted;" ++ "Only SGMII at 1Gbit/1000BASEX are supported!\n"); ++ return -EINVAL; +} + +static const struct sfp_upstream_ops at803x_sfp_ops = { @@ -98,7 +115,7 @@ Signed-off-by: René van Dorst priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) -@@ -394,6 +450,10 @@ static int at803x_read_status(struct phy +@@ -394,6 +467,10 @@ static int at803x_read_status(struct phy { int ss, err, old_link = phydev->link; @@ -109,7 +126,7 @@ Signed-off-by: René van Dorst /* Update the link, but return if there was an error */ err = genphy_update_link(phydev); if (err) -@@ -448,6 +508,19 @@ static int at803x_read_status(struct phy +@@ -448,6 +525,19 @@ static int at803x_read_status(struct phy return 0; } @@ -129,7 +146,7 @@ Signed-off-by: René van Dorst static struct phy_driver at803x_driver[] = { { /* ATHEROS 8035 */ -@@ -491,6 +564,7 @@ static struct phy_driver at803x_driver[] +@@ -491,6 +581,7 @@ static struct phy_driver at803x_driver[] .suspend = at803x_suspend, .resume = at803x_resume, /* PHY_GBIT_FEATURES */ diff --git a/target/linux/tegra/Makefile b/target/linux/tegra/Makefile index 5dd4d43984..cf929fb0f1 100644 --- a/target/linux/tegra/Makefile +++ b/target/linux/tegra/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2019 Tomasz Maciej Nowak +# Copyright (C) 2017-2019 Tomasz Maciej Nowak # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile index 33e7b508d9..aa0083f9ae 100644 --- a/target/linux/tegra/image/Makefile +++ b/target/linux/tegra/image/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2017-2019 Tomasz Maciej Nowak +# Copyright (C) 2017-2019 Tomasz Maciej Nowak # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. diff --git a/tools/bison/Makefile b/tools/bison/Makefile index fde812f334..8f3043fcb8 100644 --- a/tools/bison/Makefile +++ b/tools/bison/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bison -PKG_VERSION:=3.7.1 +PKG_VERSION:=3.7.4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=55c215521a13982a9bee68cd42eed51a65713f96c530a739a57de4438ac1bb69 +PKG_HASH:=a3b5813f48a11e540ef26f46e4d288c0c25c7907d9879ae50e430ec49f63c010 HOST_BUILD_PARALLEL:=1 diff --git a/tools/bison/patches/100-fix-gets-removal.patch b/tools/bison/patches/100-fix-gets-removal.patch index f97e8a3985..534713f180 100644 --- a/tools/bison/patches/100-fix-gets-removal.patch +++ b/tools/bison/patches/100-fix-gets-removal.patch @@ -1,6 +1,6 @@ --- a/lib/stdio.in.h +++ b/lib/stdio.in.h -@@ -816,14 +816,6 @@ _GL_WARN_ON_USE (getline, "getline is un +@@ -835,14 +835,6 @@ _GL_WARN_ON_USE (getline, "getline is un # endif #endif @@ -12,6 +12,6 @@ -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - - #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ - struct obstack; - /* Grow an obstack with formatted output. Return the number of + #if defined _WIN32 && !defined __CYGWIN__ + # undef getw + # define getw _getw diff --git a/tools/cbootimage-configs/Makefile b/tools/cbootimage-configs/Makefile index 5a1fc568cb..cafd4e5a20 100644 --- a/tools/cbootimage-configs/Makefile +++ b/tools/cbootimage-configs/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2017-2019 Tomasz Maciej Nowak +# Copyright (c) 2017-2019 Tomasz Maciej Nowak # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. diff --git a/tools/cbootimage/Makefile b/tools/cbootimage/Makefile index 42640eab36..71fdb5768c 100644 --- a/tools/cbootimage/Makefile +++ b/tools/cbootimage/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2017-2019 Tomasz Maciej Nowak +# Copyright (c) 2017-2019 Tomasz Maciej Nowak # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 7839d7b00a..05615fe740 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.18.2 +PKG_VERSION:=3.18.5 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:kitware:cmake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \ https://cmake.org/files/v3.18/ -PKG_HASH:=5d4e40fc775d3d828c72e5c45906b4d9b59003c9433ff1b36a1cb552bbd51d7e +PKG_HASH:=080bf24b0f73f4bf3ec368d2be1aa59369b9bb1cd693deeb6f18fe553ca74ab4 HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 diff --git a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch index 4d5ed266c4..c05ca4554e 100644 --- a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch +++ b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch @@ -1,6 +1,6 @@ --- a/bootstrap +++ b/bootstrap -@@ -1296,7 +1296,10 @@ int main(){ printf("1%c", (char)0x0a); r +@@ -1297,7 +1297,10 @@ int main(){ printf("1%c", (char)0x0a); r ' > "test.c" cmake_original_make_flags="${cmake_make_flags}" if test "x${cmake_parallel_make}" != "x"; then diff --git a/tools/expat/Makefile b/tools/expat/Makefile index f29264ea68..cfc70b2a49 100644 --- a/tools/expat/Makefile +++ b/tools/expat/Makefile @@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=expat PKG_CPE_ID:=cpe:/a:libexpat:expat -PKG_VERSION:=2.2.9 +PKG_VERSION:=2.2.10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=f1063084dc4302a427dabcca499c8312b3a32a29b7d2506653ecc8f950a9a237 +PKG_HASH:=b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5 PKG_SOURCE_URL:=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(PKG_VERSION)) HOST_BUILD_PARALLEL:=1 diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 22427a67e5..cb3cf69948 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -1298,6 +1298,64 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system" }, + /** Firmware layout for the EAP225-Outdoor v1 */ + { + .id = "EAP225-OUTDOOR-V1", + .support_list = + "SupportList:\r\n" + "EAP225-Outdoor(TP-Link|UN|AC1200-D):1.0\r\n", + .support_trail = '\xff', + .soft_ver = NULL, + .soft_ver_compat_level = 1, + + .partitions = { + {"fs-uboot", 0x00000, 0x20000}, + {"partition-table", 0x20000, 0x02000}, + {"default-mac", 0x30000, 0x01000}, + {"support-list", 0x31000, 0x00100}, + {"product-info", 0x31100, 0x00400}, + {"soft-version", 0x32000, 0x00100}, + {"firmware", 0x40000, 0xd80000}, + {"user-config", 0xdc0000, 0x30000}, + {"mutil-log", 0xf30000, 0x80000}, + {"oops", 0xfb0000, 0x40000}, + {"radio", 0xff0000, 0x10000}, + {NULL, 0, 0} + }, + + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system" + }, + + /** Firmware layout for the EAP225 v3 */ + { + .id = "EAP225-V3", + .support_list = + "SupportList:\r\n" + "EAP225(TP-Link|UN|AC1350-D):3.0\r\n", + .support_trail = '\xff', + .soft_ver = NULL, + .soft_ver_compat_level = 1, + + .partitions = { + {"fs-uboot", 0x00000, 0x20000}, + {"partition-table", 0x20000, 0x02000}, + {"default-mac", 0x30000, 0x01000}, + {"support-list", 0x31000, 0x00100}, + {"product-info", 0x31100, 0x00400}, + {"soft-version", 0x32000, 0x00100}, + {"firmware", 0x40000, 0xd80000}, + {"user-config", 0xdc0000, 0x30000}, + {"mutil-log", 0xf30000, 0x80000}, + {"oops", 0xfb0000, 0x40000}, + {"radio", 0xff0000, 0x10000}, + {NULL, 0, 0} + }, + + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system" + }, + /** Firmware layout for the EAP225-Wall v2 */ { .id = "EAP225-WALL-V2", @@ -1327,6 +1385,32 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "file-system" }, + /** Firmware layout for the EAP245 v1 */ + { + .id = "EAP245-V1", + .support_list = + "SupportList:\r\n" + "EAP245(TP-LINK|UN|AC1750-D):1.0\r\n", + .support_trail = '\xff', + .soft_ver = NULL, + + .partitions = { + {"fs-uboot", 0x00000, 0x20000}, + {"partition-table", 0x20000, 0x02000}, + {"default-mac", 0x30000, 0x01000}, + {"support-list", 0x31000, 0x00100}, + {"product-info", 0x31100, 0x00400}, + {"soft-version", 0x32000, 0x00100}, + {"firmware", 0x40000, 0xd80000}, + {"user-config", 0xdc0000, 0x30000}, + {"radio", 0xff0000, 0x10000}, + {NULL, 0, 0} + }, + + .first_sysupgrade_partition = "os-image", + .last_sysupgrade_partition = "file-system" + }, + /** Firmware layout for the EAP245 v3 */ { .id = "EAP245-V3", diff --git a/tools/gmp/Makefile b/tools/gmp/Makefile index 36d51eb711..967cf6817b 100644 --- a/tools/gmp/Makefile +++ b/tools/gmp/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gmp -PKG_VERSION:=6.2.0 +PKG_VERSION:=6.2.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gmp/ -PKG_HASH:=258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526 +PKG_HASH:=fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 HOST_FIXUP:=autoreconf diff --git a/tools/mpc/Makefile b/tools/mpc/Makefile index 27e9a01c4b..733c14173b 100644 --- a/tools/mpc/Makefile +++ b/tools/mpc/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mpc -PKG_VERSION:=1.2.0 +PKG_VERSION:=1.2.1 PKG_SOURCE_URL:=@GNU/mpc/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=e90f2d99553a9c19911abdb4305bf8217106a957e3994436428572c8dfe8fda6 +PKG_HASH:=17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 HOST_BUILD_PARALLEL:=1