From 5242bf7cf7eca73899f89bc48416e9a3d90f4aea Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 21 Nov 2020 10:23:54 +0100 Subject: [PATCH 01/39] netifd: update to the latest version 351d690f1a09 wireless: fix passing bridge name for vlan hotplug pass-through c1c2728946b5 config: initialize bridge and bridge vlans before other devices 5e18d5b9ccb1 interface: do not force link-ext hotplug interfaces to present by default 4544f026bb09 bridge-vlan: add support for defining aliases for vlan ids Signed-off-by: Felix Fietkau --- package/network/config/netifd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 266d0a022d..7d88337f30 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-20 +PKG_SOURCE_VERSION:=4544f026bb0996adb6d95224031f0ba35cb8c046 +PKG_MIRROR_HASH:=2f7a6ddce165603a79aedb1a99d06ecac23a7e0ea5497929517d16f569143834 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From a233e3a9afaf523955b6fcd31c9e922242ac1bc0 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 21 Nov 2020 14:16:05 +0200 Subject: [PATCH 02/39] tools/expat: update to 2.2.10 Update expat to 2.2.10 Signed-off-by: Hannu Nyman --- tools/expat/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 7d03e90390c7a156f882a60f7551a177c38288a8 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 21 Nov 2020 13:39:01 +0200 Subject: [PATCH 03/39] tools/cmake: update to 3.18.5 Update cmake to 3.18.5 Signed-off-by: Hannu Nyman --- tools/cmake/Makefile | 4 ++-- tools/cmake/patches/130-bootstrap_parallel_make_flag.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 From 9d5eceae91a93d48f008cd6411b9f9baa1556421 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 21 Nov 2020 13:30:34 +0200 Subject: [PATCH 04/39] tools/bison: update to 3.7.4 Update bison to 3.7.4 Release notes: http://git.savannah.gnu.org/cgit/bison.git/tree/NEWS?id=7a11a9308cb Signed-off-by: Hannu Nyman --- tools/bison/Makefile | 4 ++-- tools/bison/patches/100-fix-gets-removal.patch | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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 From c977bd033e1abb4fd065d6af55fed8bf57cb9743 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 21 Nov 2020 13:36:15 +0200 Subject: [PATCH 05/39] tools/gmp: update to 6.2.1 Update gmp to 6.2.1 Release notes: https://gmplib.org/gmp6.2 Signed-off-by: Hannu Nyman --- tools/gmp/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 39fa0c0959c7fa56ad2baff7e1017eec30985251 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 21 Nov 2020 13:33:32 +0200 Subject: [PATCH 06/39] tools/mpc: update to 1.2.1 Update mpc to 1.2.1 http://www.multiprecision.org/mpc/ Bug fixes: Fix an incompatibility problem with GMP 6.0 and before. Fix an intermediate overflow in asin. Signed-off-by: Hannu Nyman --- tools/mpc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 8262c99fc366e7e9481ba52a9f5f41ba3c6b7bc4 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 22 Nov 2020 03:21:51 +0000 Subject: [PATCH 07/39] procd: update to git HEAD 04a2edd uxc: make force-delete kill container process be6da62 seccomp: silence 'unknown syscall' warnings b22e625 jail: cgroup hack: rewrite cgroup -> cgroup2 df7fa7b uxc: fix incomplete commit Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 6c9e0d3de3..3802a87e00 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-22 +PKG_SOURCE_VERSION:=df7fa7bae605e865c5ab2b80461a4ccbbbfc1fab +PKG_MIRROR_HASH:=7c9355558d941968a939a52c83749806d9768bb2ca283398fbe351e25de02778 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 6e9b707ee2bd06c180e9acc5224a671f2177b57e Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 22 Nov 2020 15:20:35 +0000 Subject: [PATCH 08/39] Revert "refpolicy: add variant that builds modular policy" This reverts commit 9eb9943f82e0b2d5e32ffe1c63f5a82caca5094d. Building the 'modular' variant requires 'semodule_package' from 'selinux-python' to be installed on the buildhost. Apart from that, this change also broke the monolithic refpolicy 'targeted' build. Signed-off-by: Daniel Golle --- config/Config-build.in | 6 ------ package/system/refpolicy/Makefile | 35 ++----------------------------- 2 files changed, 2 insertions(+), 39 deletions(-) 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/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)) From 2b3a0cabea33763775dbc4b8aab5f54a377bd71e Mon Sep 17 00:00:00 2001 From: Thomas Richard Date: Thu, 8 Oct 2020 14:35:24 +0200 Subject: [PATCH 09/39] uqmi: wait forever registration if timeout set to 0 Give possibility to wait forever the registration by setting timeout option to 0. No timeout can be useful if the interface starts whereas no network is available, because at the end of timeout the interface will be stopped and never restarted. Signed-off-by: Thomas Richard --- package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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..31c2656142 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -82,7 +82,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 @@ -195,7 +195,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 From 9ebbb5511392571c008f92f37bf477d04c2f4d88 Mon Sep 17 00:00:00 2001 From: Filip Moc Date: Wed, 18 Nov 2020 20:36:12 +0100 Subject: [PATCH 10/39] uqmi: add support for IPv4 autoconf from QMI There already was an option for autoconfiguring IPv4 from QMI but this was removed by commit 3b9b963e6e08 ("uqmi: always use DHCP for IPv4"). DHCP does not work on MR400 LTE module (in TL-MR6400 v4) so let's readd support for IPv4 autoconf from QMI but this time allow to configure this for IPv4 and IPv6 independently and keep DHCP default on IPv4. Signed-off-by: Filip Moc --- package/network/utils/uqmi/Makefile | 2 +- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 49 ++++++++++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index dee4bd051e..4a15a15c19 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uqmi -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git 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 31c2656142..a77523cd40 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" @@ -353,15 +354,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 } } From ce293cd3ac3a594d536dc4243e85434fa503265b Mon Sep 17 00:00:00 2001 From: Filip Moc Date: Wed, 18 Nov 2020 20:37:17 +0100 Subject: [PATCH 11/39] uqmi: set device-operating-mode to online This is required for LTE module MR400 (in TL-MR6400 v4). Otherwise LTE module won't register to GSM network. Signed-off-by: Filip Moc --- package/network/utils/uqmi/Makefile | 2 +- package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index 4a15a15c19..428d697fdf 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uqmi -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git 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 a77523cd40..13a4fc9611 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -174,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 From e065c9184cd1518f7d4b1c55b69b9c9bc77f2023 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 22 Nov 2020 21:54:53 +0000 Subject: [PATCH 12/39] uqmi: update to git HEAD 65796a6 nas: add --get-plmn 0a19b5b uqmi: add timeout parameter Signed-off-by: Daniel Golle --- package/network/utils/uqmi/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index 428d697fdf..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:=9 +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 From 2eb0d711a45503591f673e28f13674a86c45fde8 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 23 Nov 2020 00:32:48 +0000 Subject: [PATCH 13/39] procd: update to git HEAD d4d78db uxc: also delete procd runtime state on 'delete' e935c0c jail: add 'debug' extern variable to preload_seccomp Signed-off-by: Daniel Golle --- package/system/procd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 3802a87e00..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-22 -PKG_SOURCE_VERSION:=df7fa7bae605e865c5ab2b80461a4ccbbbfc1fab -PKG_MIRROR_HASH:=7c9355558d941968a939a52c83749806d9768bb2ca283398fbe351e25de02778 +PKG_SOURCE_DATE:=2020-11-23 +PKG_SOURCE_VERSION:=e935c0c043b12415fa36aca01cfc757cadb9fac4 +PKG_MIRROR_HASH:=6bb79a7b5c87afbfc7227758cffbebcc5c9752e791bb5a39280a9aebd159250b CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From 1e69106e348e45c9783e91474fc336af8311deeb Mon Sep 17 00:00:00 2001 From: Filip Moc Date: Fri, 20 Nov 2020 09:20:53 +0100 Subject: [PATCH 14/39] generic: add DTR quirk patch for MR400 LTE This is required for LTE module MR400 in TL-MR6400 v4. Signed-off-by: Filip Moc --- ...usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 target/linux/generic/backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch 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..91c95573f6 --- /dev/null +++ b/target/linux/generic/backport-5.4/789-net-usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch @@ -0,0 +1,34 @@ +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(-) + +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c +index 581ed51abb532..fc378ff56775b 100644 +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -1070,7 +1070,7 @@ static const struct usb_device_id products[] = { + {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)}, +-- +cgit 1.2.3-1.el7 + From 0d65177658dfec9fe99bbad4e37cf44f0642d831 Mon Sep 17 00:00:00 2001 From: Filip Moc Date: Wed, 18 Nov 2020 20:38:21 +0100 Subject: [PATCH 15/39] ramips: add support for TP-Link MR6400 v4 You can flash via tftp recovery: - serve tftp-recovery image as /tp_recovery.bin on 192.168.0.225/24 - connect to any ethernet port - power on the device while holding the reset button - wait at least 8 seconds before releasing reset button Flashing via OEM web interface does not work. LTE module does not support DHCP so it must be configured via QMI. Hardware Specification (v4.0 EU): - SoC: MT7628NN - Flash: Winbond W25Q64JVS (8MiB) - RAM: ESMT M14D5121632A (64MiB) - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna) - Ethernet: 1NIC (4x100M) - WWAN: TP-LINK LTE MODULE (2x external detachable antenna) - Power: DC 9V 0.85A Signed-off-by: Filip Moc --- .../dts/mt7628an_tplink_tl-mr6400-v4.dts | 97 +++++++++++++++++++ target/linux/ramips/image/mt76x8.mk | 16 +++ .../mt76x8/base-files/etc/board.d/01_leds | 4 + .../mt76x8/base-files/etc/board.d/02_network | 4 + 4 files changed, 121 insertions(+) create mode 100644 target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts 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" From 97ac290090a5c2120d4cd1e88823f9003a6f8484 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 23 Nov 2020 02:05:32 +0000 Subject: [PATCH 16/39] uhttpd: update to git HEAD f53a639 ubus: fix uhttpd crash Signed-off-by: Daniel Golle --- package/network/services/uhttpd/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From dd4e6a70f2f4eefab8a7dd663b881ba4f29bd5ba Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 2 Nov 2020 10:35:20 +0000 Subject: [PATCH 17/39] hostapd: enable the epoll-based event loop Hostapd supports epoll() since 2014. Let's enable it for better performance. Signed-off-by: Rui Salvaterra --- package/network/services/hostapd/Makefile | 2 +- package/network/services/hostapd/files/hostapd-basic.config | 2 +- package/network/services/hostapd/files/hostapd-full.config | 2 +- package/network/services/hostapd/files/hostapd-mini.config | 2 +- .../network/services/hostapd/files/wpa_supplicant-basic.config | 2 +- .../network/services/hostapd/files/wpa_supplicant-full.config | 2 +- .../network/services/hostapd/files/wpa_supplicant-mini.config | 2 +- .../network/services/hostapd/files/wpa_supplicant-p2p.config | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) 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 From b19a684f461977f1ff8218b28d5b191ec747c3d5 Mon Sep 17 00:00:00 2001 From: Paulo Machado Date: Sun, 22 Nov 2020 14:23:27 +0000 Subject: [PATCH 18/39] imagebuilder: fix main entry makefile Remove a syntax error from ImageBuider Makefile Acked-by: Paul Spooren Signed-off-by: Paulo Machado --- target/imagebuilder/files/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 4799810745393742d4c58f398bb1a6cd2ee80d34 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 23 Nov 2020 12:51:58 +0100 Subject: [PATCH 19/39] netifd: update to the latest version 213748a9bcd9 system-linux: implement full device present state management for force-external devices 3abe1fc87151 system-linux: add retry for adding member devices to a bridge Signed-off-by: Felix Fietkau --- package/network/config/netifd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 7d88337f30..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-20 -PKG_SOURCE_VERSION:=4544f026bb0996adb6d95224031f0ba35cb8c046 -PKG_MIRROR_HASH:=2f7a6ddce165603a79aedb1a99d06ecac23a7e0ea5497929517d16f569143834 +PKG_SOURCE_DATE:=2020-11-23 +PKG_SOURCE_VERSION:=3abe1fc87151fae570fc1232053c73d1a5505664 +PKG_MIRROR_HASH:=323221cbcc7ee57e6a38e979bdebfbf13cdfddf82ea51bbc30004c07b658bb8a PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 From eb087ae4f46a8cf6158c1a6ec0fb5558f1abdaae Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Mon, 23 Nov 2020 00:28:34 +0000 Subject: [PATCH 20/39] ath79: move the squashfs feature to the parent target All subtargets define it. Move it to the parent target and remove it from all subtargets. Signed-off-by: Rui Salvaterra --- target/linux/ath79/Makefile | 2 +- target/linux/ath79/generic/target.mk | 1 - target/linux/ath79/mikrotik/target.mk | 2 +- target/linux/ath79/nand/target.mk | 2 +- target/linux/ath79/tiny/target.mk | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) 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/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/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/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 From 8231994d3f027725224651532210af36ae5c59ab Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 22 Nov 2020 20:09:27 +0100 Subject: [PATCH 21/39] ipq40xx: DTS style updates for OpenMesh devices The OpenMesh related files were not updated since a while and the new coding style requirements weren't integrated. This can cause problems for new devices when an author uses these files as starting point. * use SPDX-License-Identifiers instead of full license texts * drop linux,default-trigger with value default-off for LEDs * led nodes with label "abc:xyz" should have name "xyz_abc" * led DT labels for "xyz_abc" should be "led_xyz_abc" * "m25p80@0" flash node should be renamed to "flash@0" * drop unnecessary empty lines Signed-off-by: Sven Eckelmann [minor commit title and message adjustments] Signed-off-by: Adrian Schmutzler --- .../arch/arm/boot/dts/qcom-ipq4018-a42.dts | 32 ++++++------------- .../arch/arm/boot/dts/qcom-ipq4019-a62.dts | 32 ++++++------------- target/linux/ipq40xx/image/Makefile | 1 - 3 files changed, 18 insertions(+), 47 deletions(-) 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/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 142896bde8..d4188f5282 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -647,7 +647,6 @@ define Device/openmesh_a62 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata DEVICE_PACKAGES := ath10k-firmware-qca9888-ct uboot-envtools endef - TARGET_DEVICES += openmesh_a62 define Device/qcom_ap-dk01.1-c1 From 223eec7e81f8506592fc89cf79a2f14360f5c57b Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sun, 22 Nov 2020 01:17:35 +0100 Subject: [PATCH 22/39] kernel: 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. Fixes: d6a9a92e3217 ("kernel: bump 5.4 to 5.4.69") Signed-off-by: Sven Eckelmann --- ...ne-Fix-parsing-of-part-names-with-co.patch | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch 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..33b7ee3cfe --- /dev/null +++ b/target/linux/generic/pending-5.4/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch @@ -0,0 +1,63 @@ +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 + +diff --git a/drivers/mtd/parsers/cmdlinepart.c b/drivers/mtd/parsers/cmdlinepart.c +index 0625b25620ca766318ea4646a6e3761ff4d3a4cc..22881ea4c132ea5a5ba7aebd025d91bf1cd023af 100644 +--- 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 = ';'; From 991e6f8cccbff4d1f1a2ffb4504d2a8b5bf45388 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 21 Nov 2020 08:53:06 -0500 Subject: [PATCH 23/39] linux-firmware: update to 20201118 git log --pretty=oneline --abbrev-commit 20201022..20201118 2ea8667 (tag: 20201118) rtlwifi: v88.2 firmware files for RTL8192CU e850cf3 Merge https://github.com/rjliao-qca/qca-btfw into main 65370db rtw88: RTL8822C: Update firmware to v9.9.4 e371b7c Revert "rtw88: RTL8822C: Update firmware to v9.9.4" 51d2c81 vpdma: Move firmware to ti directory d7a24c9 Merge branch 'master' of https://github.com/shahasit/video-linux-firmware into main 9ee1543 Merge branch 'master' of https://github.com/shahasit/bt-linux-firmware into main 3bcc4c1 amdgpu: update picasso VCN firmware b6b4542 amdgpu: update raven2 VCN firmware 79aa335 amdgpu: update raven VCN firmware c93834e rtw88: RTL8822C: Update firmware to v9.9.4 3ef6c93 rtl_bt: Update RTL8822C BT(USB I/F) FW to 0x099A_281A b503c96 Merge branch 'ath10k-20201023' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/linux-firmware into main 463fdea QCA: Update Bluetooth firmware for QCA6390 8a46c32 qcom : updated venus firmware files for v5.4 d7793e5 QCA : Fixed BT SSR due to command timeout / IO fatal error d842d8c ath11k: QCA6390 hw2.0: add to WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 8fb1a6e ath11k: QCA6390 hw2.0: add board-2.bin 34cb5fc ath11k: IPQ8074 hw2.0: add to WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 c0a8efd ath11k: IPQ8074 hw2.0: add board-2.bin ac7f5e9 ath11k: IPQ6018 hw1.0: add to WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 2594e51 ath11k: IPQ6018 hw1.0: add board-2.bin d8f10d4 ath10k: QCA6174 hw3.0: add firmware-sdio-6.bin version WLAN.RMH.4.4.1-00077 6652297 ath10k: QCA9984 hw1.0: update firmware-5.bin to 10.4-3.9.0.2-00131 36059aa ath10k: QCA9888 hw2.0: update firmware-5.bin to 10.4-3.9.0.2-00131 1e5629d ath10k: QCA6174 hw3.0: update board-2.bin e315d1a ath10k: QCA6174 hw3.0: update firmware-6.bin to WLAN.RM.4.4.1-00157-QCARMSWPZ-1 Signed-off-by: John Audia --- package/firmware/linux-firmware/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 6e1a4496f58c0eb69280dca7e0ba692bef41fbda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= Date: Fri, 13 Nov 2020 16:45:54 +0100 Subject: [PATCH 24/39] ramips: phy: at803x: Select SFP interface mode that both sides supports. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently sfp_select_interface() return the fastest interface that the sfp modules supports even if the phy don't support that mode. For example an GPON module that support both 2500basex and 1000basex. Currently sfp_select_interface() picks 2500basex instead of 1000basex. So limit the interfaces which both sides supports before calling sfp_select_interface() or return an error if we don't have match. Reviewed-by: John Thomson Tested-by: Braihan Cantera [MikroTik RB760iGS + Nokia G-010S-A 3FE46541AA SFP] Tested-by: John Thomson [Mikrotik rb760igs + SFP SM/LC, SFP base1000T, SFP+ passive DAC] Signed-off-by: René van Dorst --- .../linux/ramips/patches-5.4/991-at803x.patch | 51 +++++++++++++------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/target/linux/ramips/patches-5.4/991-at803x.patch b/target/linux/ramips/patches-5.4/991-at803x.patch index dd1d2755ed..64bc48fe7a 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,23 @@ 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(+) +diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c +index 31cd7d8a5a1b5..134c894ccf800 100644 --- 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 +44,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_device *phydev) return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0); } @@ -59,23 +62,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 +117,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_device *phydev) { int ss, err, old_link = phydev->link; @@ -109,7 +128,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_device *phydev) return 0; } @@ -129,7 +148,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 */ From 65f8d7360c041ed90724bcc97673b30ce704cc33 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Mon, 26 Oct 2020 10:41:36 +0100 Subject: [PATCH 25/39] layerscape: make initramfs kernel fit packed This will make developing process easier, because dtb will be included into image. Not need to enable initramfs image by default. Signed-off-by: Pawel Dembicki --- package/boot/uboot-layerscape/Makefile | 2 +- package/boot/uboot-layerscape/files/fsl_ls1012a-rdb-uEnv.txt | 3 +-- package/boot/uboot-layerscape/files/fsl_ls1021a-twr-uEnv.txt | 3 +-- package/boot/uboot-layerscape/files/fsl_ls1043a-rdb-uEnv.txt | 3 +-- package/boot/uboot-layerscape/files/fsl_ls1046a-rdb-uEnv.txt | 3 +-- target/linux/layerscape/image/armv7.mk | 1 + target/linux/layerscape/image/armv8_64b.mk | 1 + 7 files changed, 7 insertions(+), 9 deletions(-) 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/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..bedf272f79 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)) From a1158b3170b9bfcc346972242a62efeda8cf80b0 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Tue, 27 Oct 2020 09:48:04 +0100 Subject: [PATCH 26/39] kernel: iio: add fxas21002c driver support This patch adds kernel modules for Freescale FXAS21002C 3-axis gyro driver. Signed-off-by: Pawel Dembicki --- package/kernel/linux/modules/iio.mk | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) 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 From 4dc27a026b7e308477adecbdf8e6da58e1d57716 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Tue, 27 Oct 2020 09:52:31 +0100 Subject: [PATCH 27/39] layerscape: add i2c peripherials on LS1012A-RDB 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 enables i2c peripherials installed on LS1012A-RDB. Signed-off-by: Pawel Dembicki --- target/linux/layerscape/armv8_64b/config-5.4 | 3 + target/linux/layerscape/image/armv8_64b.mk | 3 + ...ayerscape_fix_support_of_LS1012A-RDB.patch | 107 ++++++++++++++++++ .../901-fix_irq_type_of_pca953x.patch | 28 +++++ 4 files changed, 141 insertions(+) create mode 100644 target/linux/layerscape/patches-5.4/900-layerscape_fix_support_of_LS1012A-RDB.patch create mode 100644 target/linux/layerscape/patches-5.4/901-fix_irq_type_of_pca953x.patch diff --git a/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4 index 6da7ff01a5..8c398f4a2b 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 diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index bedf272f79..264f7dfd84 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -63,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/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) { From cdff729b27592b1761059886c40f0204507000d1 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Wed, 4 Nov 2020 10:16:31 +0100 Subject: [PATCH 28/39] layerscape: enable spi-uart in LS1012A-FRDM This patch add missing support of SC16IS740 serial controller, installed on LS1012A-FRDM board. It was required to change RCW bits, because SPI was disabled by default. Signed-off-by: Pawel Dembicki --- package/firmware/layerscape/ls-rcw/Makefile | 2 +- .../0002-fix_rcw_for_ls1012a-frdm.patch | 13 +++++ target/linux/layerscape/armv8_64b/config-5.4 | 4 ++ ...cape_improve_support_of_LS1012A-FRDM.patch | 58 +++++++++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 package/firmware/layerscape/ls-rcw/patches/0002-fix_rcw_for_ls1012a-frdm.patch create mode 100644 target/linux/layerscape/patches-5.4/902-layerscape_improve_support_of_LS1012A-FRDM.patch 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/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4 index 8c398f4a2b..026cf15673 100644 --- a/target/linux/layerscape/armv8_64b/config-5.4 +++ b/target/linux/layerscape/armv8_64b/config-5.4 @@ -842,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/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"; From 651f0c09999f2b10b412bdd3f60d4711034e5a90 Mon Sep 17 00:00:00 2001 From: "Leon M. George" Date: Thu, 8 Oct 2020 10:47:16 +0200 Subject: [PATCH 29/39] hostapd: fix patch offset Fixes the offset of the patch added in 93bbd998aa696a ("hostapd: enter DFS state if no available channel is found"). Signed-off-by: Leon M. George --- ...0-dfs-enter-DFS-state-if-no-available-channel-is-found.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From c0af4a0ca259022d9d2dedcfb31e11ab46e443c2 Mon Sep 17 00:00:00 2001 From: Vladimir Vid Date: Mon, 1 Jun 2020 17:51:37 +0200 Subject: [PATCH 30/39] mvebu: add initial support for Globalscale ESPRESSObin-Ultra This patch adds support for Globalscale ESPRESSObin-Ultra. Device uses the same Armada-3720 SoC with extended hardware support. - SoC: Armada-3720 - RAM: 1 GB DDR4 - Flash: 4MB SPI NOR (mx25u3235f) + 8 GB eMMC - Ethernet: Topaz 6341 88e6341 (4x GB LAN + 1x WAN with 30W PoE) - WiFI: 2x2 802.11ac Wi-Fi marvell (88w8997 PCIe+USB) - 1x USB 2.0 port - 1x USB 3.0 port - 1x microSD slot - 1x mini-PCIe slot (USB [with nano-sim slot]) - 1x mini-USB debug UART - 1x RTC Clock and battery - 1x reset button - 1x power button - 4x LED (RGBY) - Optional 1x M.2 2280 slot ** Installation ** Copy dtb from build_dir to bin/ and run tftpserver there: $ cp ./build_dir/target-aarch64_cortex-a53_musl/linux-mvebu_cortexa53/ linux-5.4.65/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dtb bin/targets/mvebu/cortexa53/ $ in.tftpd -L -s bin/targets/mvebu/cortexa53/ Connect to the device UART via microUSB port on the back side and power on the device. Power on the device and hit any key to stop the autoboot. Set serverip (host IP) and ipaddr (any free IP address on the same subnet), e.g: $ setenv serverip 192.168.1.10 # Host $ setenv ipaddr 192.168.1.15 # Device Ping server to confirm network is working: $ ping $serverip Using neta@30000 device host 192.168.1.15 is alive Tftpboot the firmware: $ tftpboot $kernel_addr_r openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-initramfs-kernel.bin $ tftpboot $fdt_addr_r armada-3720-espressobin-ultra.dtb Set the console and boot the image: $ setenv bootargs $console $ booti $kernel_addr_r - $fdt_addr_r Once the initramfs is booted, transfer openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img.gz to /tmp dir on the device. Gunzip and dd the image: $ gunzip /tmp/openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img.gz $ dd if=/tmp/openwrt-mvebu-cortexa53-globalscale_espressobin-ultra-squashfs-sdcard.img of=/dev/mmcblk0 && sync Reboot the device. Signed-off-by: Vladimir Vid --- package/boot/uboot-envtools/Makefile | 2 +- package/boot/uboot-envtools/files/mvebu | 1 + .../base-files/etc/board.d/02_network | 3 + .../base-files/lib/upgrade/platform.sh | 3 + .../marvell/armada-3720-espressobin-ultra.dts | 241 ++++++++++++++++++ target/linux/mvebu/image/cortexa53.mk | 11 + 6 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts 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/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 From 8dd2a1715b0a59407cf90c0708fc2bc199e110b5 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Sun, 19 Jul 2020 20:01:48 +0200 Subject: [PATCH 31/39] ath79: ensure QCA956x gmac0 mux selects sgmii Some bootloaders do not set up gmac0 properly, leaving it disconnected from the sgmii interface. If the user specificies phy-mode sgmii, then use the gmac-config/device node to ensure the mux is configured correctly. Signed-off-by: Sander Vanheule --- .../net/ethernet/atheros/ag71xx/ag71xx_main.c | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) 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..7b292cc005 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 @@ -665,6 +665,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; @@ -1566,6 +1597,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) From 87627b2d760cd2ac341dd3181ce6f987d69777c2 Mon Sep 17 00:00:00 2001 From: Julien Dusser Date: Wed, 1 Jul 2020 23:56:01 +0200 Subject: [PATCH 32/39] ath79: add QCA956x SERDES init workaround This commit add a workaround for non working SGMII link observed on some QCA956x SoCs. The workaround originates part from the U-Boot source code from QCA, part from the implementation from TP-Link found in the GPL tarball for the EAP245v1. Extends commit 0d416a8d3b990e3b78628f0e7546527709c877f7 for QCA956x. Note that reset is the same on QCA955x and QCA956x, same register offset and values. Auto calibration is done on u-boot, but always fall back to default value 0x7. Add a DTS entry serdes-cal in case a device require another value. Signed-off-by: Julien Dusser [Sander Vanheule: Minor code style fixes, Remove hunk adding qca956x-serdes-fixup to a missing DTS, Remove variable err that was only assigned, Rename function to sgmii_serdes_init, Lower priority of serdes call message to pr_debug] Signed-off-by: Sander Vanheule --- .../net/ethernet/atheros/ag71xx/ag71xx_main.c | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) 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 7b292cc005..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; @@ -1454,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; From 7a875d155ed90ef8dc44efd898e4f5d55659ee1a Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Thu, 16 Jul 2020 21:27:06 +0200 Subject: [PATCH 33/39] ath79: prepare for 1-port TP-Link EAP2x5 devices TP-Link has developed a number of access points based on the AP152 reference board. In the EAP-series of 802.11ac access points, this includes the following devices with one ethernet port: * EAP225 v1/v2 * EAP225 v3 * EAP225-Outdoor v1 * EAP245 v1 Since the only differences between these devices are the ath10k wireless radios and LEDs, a common base is provided for the overlapping support requirements. Hardware commonalities: * SoC: QCA9563-AL3A MIPS 74kc v5.0 @ 775MHz, AHB @ 258MHz * RAM: 128MiB DDR2 @ 650MHz * Flash: 16MiB SPI NOR * Wi-Fi 2.4GHz: provided by SoC * Wi-Fi 5Ghz: ath10k chip on PCIe * Ethernet: AR8033-AL1A, one 1GbE port (802.3at PoE) Signed-off-by: Sander Vanheule --- .../dts/qca9563_tplink_eap2x5-1port.dtsi | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi 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>; +}; From b11ad48764404d6eefc01b5acf9e54c9f6f00973 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Fri, 17 Jul 2020 12:06:03 +0200 Subject: [PATCH 34/39] ath79: support for TP-Link EAP245 v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TP-Link EAP245 v1 is an AC1750 (802.11ac Wave-1) ceiling mount access point. Device specifications: * SoC: QCA9563 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n, 3x3 * Wireless 5Ghz (QCA9880): a/n/ac, 3x3 * Ethernet (AR8033): 1× 1GbE, 802.3at PoE Flashing instructions: * Upgrade the device to firmware v1.4.0 if necessary * Exploit the user management page in the web interface to start telnetd by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`. * Immediately change the malformed username back to something valid (e.g. 'admin') to make ssh work again. * Use the root shell via telnet to make /tmp world writeable (chmod 777) * Extract /usr/bin/uclited from the device via ssh and apply the binary patch listed below. The patch is required to prevent `uclited -u` in the last step from crashing. * Copy the patched uclited programme back to the device at /tmp/uclited (via ssh) * Upload the factory image to /tmp/upgrade.bin (via ssh) * Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt. --- xxd uclited +++ xxd uclited-patched @@ -53796,7 +53796,7 @@ 000d2240: 8c44 0000 0320 f809 0000 0000 8fbc 0010 .D... .......... 000d2250: 8fa6 0a4c 02c0 2821 8f82 87b8 0000 0000 ...L..(!........ -000d2260: 8c44 0000 0c13 45e0 27a7 0018 8fbc 0010 .D....E.'....... +000d2260: 8c44 0000 2402 0000 0000 0000 8fbc 0010 .D..$........... 000d2270: 1040 001d 0000 1821 8f99 8374 3c04 0058 .@.....!...t<..X 000d2280: 3c05 0056 2484 a898 24a5 9a30 0320 f809 <..V$...$..0. .. Debricking: * Serial port can be soldered on PCB J3 (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors R225 (TXD) and R237 (RXD). Do NOT bridge R230. * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via the LuCI web interface setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr Tested on the EAP245 v1 running the latest firmware (v1.4.0). The binary patch might not apply to uclited from other firmware versions. EAP245 v1 device support was originally developed and maintained by Julien Dusser out-of-tree. This patch and "ath79: prepare for 1-port TP-Link EAP2x5 devices" are based on that work. Signed-off-by: Sander Vanheule --- .../ath79/dts/qca9563_tplink_eap245-v1.dts | 44 +++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 11 ++--- target/linux/ath79/image/generic-tp-link.mk | 11 +++++ tools/firmware-utils/src/tplink-safeloader.c | 26 +++++++++++ 5 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts 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/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index d03399a054..c29c4006c8 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,7 @@ ath79_setup_interfaces() tplink,cpe510-v3|\ tplink,cpe610-v1|\ tplink,cpe610-v2|\ + 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 83ffc8f862..5229ad17f4 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) diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 7979dda786..c704d99c98 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -382,6 +382,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/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 22427a67e5..2657b2c928 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -1327,6 +1327,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", From 4f86edf477edbc0f20b5a49a69f658fa82158284 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Tue, 7 Jul 2020 18:04:37 +0200 Subject: [PATCH 35/39] ath79: support for TP-Link EAP225-Outdoor v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TP-Link EAP225-Outdoor v1 is an AC1200 (802.11ac Wave-2) pole or wall mount access point. Debricking requires access to the serial port, which is non-trivial. Device specifications: * SoC: QCA9563 @ 775MHz * Memory: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n 2x2 * Wireless 5GHz (QCA9886): a/n/ac 2x2 MU-MIMO * Ethernet (AR8033): 1× 1GbE, PoE Flashing instructions: * ssh into target device with recent (>= v1.6.0) firmware * run `cliclientd stopcs` on target device * upload factory image via web interface Debricking: To recover the device, you need access to the serial port. This requires fine soldering to test points, or the use of probe pins. * Open the case and solder wires to the test points: RXD, TXD and TPGND4 * Use a 3.3V UART, 115200 baud, 8n1 * Interrupt bootloader by holding ctrl+B during boot * upload initramfs via built-in tftp client and perform sysupgrade setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr MAC addresses: MAC address (as on device label) is stored in device info partition at an offset of 8 bytes. ath9k device has same address as ethernet, ath10k uses address incremented by 1. From stock ifconfig: ath0 Link encap:Ethernet HWaddr D8:...:2E ath10 Link encap:Ethernet HWaddr D8:...:2F br0 Link encap:Ethernet HWaddr D8:...:2E eth0 Link encap:Ethernet HWaddr D8:...:2E Tested by forum user PolynomialDivision on firmware v1.7.0. UART access tested by forum user arinc9. Signed-off-by: Sander Vanheule --- .../dts/qca9563_tplink_eap225-outdoor-v1.dts | 30 +++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + target/linux/ath79/image/generic-tp-link.mk | 11 +++++++ tools/firmware-utils/src/tplink-safeloader.c | 29 ++++++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts 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/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index c29c4006c8..928b6c8903 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,7 @@ ath79_setup_interfaces() tplink,cpe510-v3|\ tplink,cpe610-v1|\ tplink,cpe610-v2|\ + tplink,eap225-outdoor-v1|\ tplink,eap245-v1|\ tplink,re350k-v1|\ tplink,re355-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 5229ad17f4..5be1c72ab0 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 @@ -208,6 +208,7 @@ 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-wall-v2|\ tplink,tl-wpa8630p-v2-int|\ tplink,tl-wpa8630p-v2.0-eu|\ diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index c704d99c98..343ea963c3 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -371,6 +371,17 @@ 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-wall-v2 $(Device/tplink-eap2x5) SOC := qca9561 diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 2657b2c928..4389cf0346 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -1298,6 +1298,35 @@ 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-Wall v2 */ { .id = "EAP225-WALL-V2", From b0ecae504b58bf65627138fe14eb605ad77224c9 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Fri, 10 Jul 2020 13:41:21 +0200 Subject: [PATCH 36/39] ath79: support for TP-Link EAP225 v3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TP-Link EAP225 v3 is an AC1350 (802.11ac Wave-2) ceiling mount access point. Serial port access for debricking requires fine soldering. Device specifications: * SoC: QCA9563 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n, 3x3 * Wireless 5Ghz (QCA9886): a/n/ac, 2x2 MU-MINO * Ethernet (AR8033): 1× 1GbE, 802.3at PoE Flashing instructions: * ssh into target device and run `cliclientd stopcs` * Upgrade with factory image via web interface Debricking: * Serial port can be soldered on PCB J3 (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors R225 (TXD) and R237 (RXD). Do NOT bridge R230. * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via LuCI web interface setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr MAC addresses: MAC address (as on device label) is stored in device info partition at an offset of 8 bytes. ath9k device has same address as ethernet, ath10k uses address incremented by 1. From OEM boot log: Using interface ath0 with hwaddr b0:...:3e and ssid "..." Using interface ath10 with hwaddr b0:...:3f and ssid "..." Tested by forum user blinkstar88 Signed-off-by: Sander Vanheule --- .../ath79/dts/qca9563_tplink_eap225-v3.dts | 30 +++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + target/linux/ath79/image/generic-tp-link.mk | 11 +++++++ tools/firmware-utils/src/tplink-safeloader.c | 29 ++++++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts 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/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 928b6c8903..5fbf4e2561 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 @@ -49,6 +49,7 @@ ath79_setup_interfaces() tplink,cpe610-v1|\ tplink,cpe610-v2|\ tplink,eap225-outdoor-v1|\ + tplink,eap225-v3|\ tplink,eap245-v1|\ tplink,re350k-v1|\ tplink,re355-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 5be1c72ab0..ff15414ead 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 @@ -209,6 +209,7 @@ case "$FIRMWARE" in /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/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 343ea963c3..5088510af0 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -382,6 +382,17 @@ define Device/tplink_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 diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 4389cf0346..cb3cf69948 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -1327,6 +1327,35 @@ static struct device_info boards[] = { .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", From cba79b1de2d2155ae5be8c565ef83829b02598e6 Mon Sep 17 00:00:00 2001 From: Yanase Yuki Date: Tue, 24 Nov 2020 12:45:09 +0900 Subject: [PATCH 37/39] ath79: move device specific nodes to DTS files for Devolo 1xxx qca9558_devolo_dvl1xxx.dtsi contains device specific nodes which are inherited for some DTS files and overwritten for others. This is considered confusing, so move the relevant nodes/properties to the devices and only keep the shared stuff in the DTSI. Signed-off-by: Yanase Yuki [clarify commit title/message, move &gmac_config in DTS] Signed-off-by: Adrian Schmutzler --- .../ath79/dts/qca9558_devolo_dvl1200e.dts | 25 +++++++++++++++++++ .../ath79/dts/qca9558_devolo_dvl1200i.dts | 1 - .../ath79/dts/qca9558_devolo_dvl1750c.dts | 1 + .../ath79/dts/qca9558_devolo_dvl1750e.dts | 25 +++++++++++++++++++ .../ath79/dts/qca9558_devolo_dvl1750i.dts | 1 - .../ath79/dts/qca9558_devolo_dvl1750x.dts | 1 - .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 23 ----------------- 7 files changed, 51 insertions(+), 26 deletions(-) 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"; From 9100566267755ea642f08c203d03a9b8f13478c9 Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 19 Nov 2020 10:30:16 -0500 Subject: [PATCH 38/39] kernel: bump 5.4 to 5.4.79 Manually rebased patches: ath79/patches-5.4/910-unaligned_access_hacks.patch bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch bcm27xx/patches-5.4/950-0414-SQUASH-Fix-spi-driver-compiler-warnings.patch ipq806x/patches-5.4/093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch Removed since could be reverse-applied by quilt and found to be included upstream: ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch All modifications made by update_kernel.sh Build system: x86_64 Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia [refresh altered targets after rebase] Signed-off-by: Adrian Schmutzler --- include/kernel-version.mk | 4 +- .../910-unaligned_access_hacks.patch | 2 +- ...0134-spi-spi-bcm2835-Re-enable-HW-CS.patch | 2 +- ...i-bcm2835-Disable-forced-software-CS.patch | 4 +- ...2835-enable-shared-interrupt-support.patch | 2 +- ...ASH-Fix-spi-driver-compiler-warnings.patch | 3 +- ...s-Follow-DMA-parent-for-dma-coherent.patch | 2 +- ...de-dma_direct_map_resource-from-the-.patch | 2 +- ...usb-qmi_wwan-Set-DTR-quirk-for-MR400.patch | 7 +-- ...ne-Fix-parsing-of-part-names-with-co.patch | 2 - ...rt-adjusting-OPP-voltages-at-runtime.patch | 2 +- ...e-voltage-tolerance-when-adjusting-t.patch | 4 +- ...Use-bulk-clk-api-and-assert-on-error.patch | 10 ++-- ...6x-PCI-qcom-Add-ipq8064-rev2-variant.patch | 4 +- ...om-Support-pci-speed-set-for-ipq806x.patch | 4 +- ...06x-net-mdio-add-ipq8064-mdio-driver.patch | 2 +- ...re-PCIe-is-reset-before-init-for-rev.patch | 46 ------------------- ...acket-drops-at-low-traffic-rate-due-.patch | 2 +- ...y-Inphi-IN112525_s03-retimer-support.patch | 4 +- ...x-offload-Prepare-for-CAN-FD-support.patch | 10 ++-- ...devm_platform_ioremap_resource-to-si.patch | 4 +- ...can_irq_state-only-read-timestamp-if.patch | 4 +- ...me-macro-FLEXCAN_IFLAG_MB-FLEXCAN_IF.patch | 8 ++-- ...can_irq-rename-variable-reg_iflag-re.patch | 2 +- ...me-struct-flexcan_priv-reg_imask-1-2.patch | 8 ++-- ...ve-TX-mailbox-bit-from-struct-flexca.patch | 8 ++-- ...ert-struct-flexcan_priv-rx_mask-1-2-.patch | 8 ++-- ...oduce-struct-flexcan_priv-tx_mask-an.patch | 10 ++-- ...can_read_reg_iflag_rx-optimize-readi.patch | 4 +- ...can_irq-add-support-for-TX-mailbox-i.patch | 6 +-- ...can_mailbox_read-make-use-of-flexcan.patch | 2 +- ...struct-canfd_frame-for-CAN-classic-f.patch | 10 ++-- ...-can-flexcan-add-CAN-FD-mode-support.patch | 24 +++++----- ...0-can-flexcan-add-CAN-FD-BRS-support.patch | 4 +- ...excan-add-ISO-CAN-FD-feature-support.patch | 6 +-- ...Transceiver-Delay-Compensation-suopp.patch | 6 +-- ...-0023-can-flexcan-add-imx8qm-support.patch | 2 +- ...24-can-flexcan-add-lx2160ar1-support.patch | 4 +- ...can-add-LPSR-mode-support-for-i.MX7D.patch | 4 +- ...-fix-deadlock-when-using-self-wakeup.patch | 2 +- ...an-add-CAN-wakeup-function-for-i.MX8.patch | 12 ++--- ...dd-S32V234-support-to-FlexCAN-driver.patch | 6 +-- ...low-specifying-s2-prot-bits-when-map.patch | 2 +- ...rop-qman-mmio-cacheable-mapping-hack.patch | 4 +- ...5-usb-dwc3-add-otg-properties-update.patch | 2 +- .../linux/ramips/patches-5.4/991-at803x.patch | 10 ++-- 46 files changed, 112 insertions(+), 168 deletions(-) delete mode 100644 target/linux/ipq806x/patches-5.4/096-PCI-qcom-Make-sure-PCIe-is-reset-before-init-for-rev.patch 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/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/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 index 91c95573f6..e3581c5a0d 100644 --- 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 @@ -16,11 +16,9 @@ Signed-off-by: Jakub Kicinski drivers/net/usb/qmi_wwan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c -index 581ed51abb532..fc378ff56775b 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c -@@ -1070,7 +1070,7 @@ static const struct usb_device_id products[] = { +@@ -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)}, @@ -29,6 +27,3 @@ index 581ed51abb532..fc378ff56775b 100644 {QMI_FIXED_INTF(0x05c6, 0x9026, 3)}, {QMI_FIXED_INTF(0x05c6, 0x902e, 5)}, {QMI_FIXED_INTF(0x05c6, 0x9031, 5)}, --- -cgit 1.2.3-1.el7 - 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 index 33b7ee3cfe..8724c1b7d3 100644 --- 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 @@ -23,8 +23,6 @@ Forwarded: https://patchwork.ozlabs.org/project/linux-mtd/patch/20201122001533.9 Fixes: eb13fa022741 ("mtd: parser: cmdline: Support MTD names containing one or more colons") Signed-off-by: Sven Eckelmann -diff --git a/drivers/mtd/parsers/cmdlinepart.c b/drivers/mtd/parsers/cmdlinepart.c -index 0625b25620ca766318ea4646a6e3761ff4d3a4cc..22881ea4c132ea5a5ba7aebd025d91bf1cd023af 100644 --- a/drivers/mtd/parsers/cmdlinepart.c +++ b/drivers/mtd/parsers/cmdlinepart.c @@ -218,7 +218,7 @@ static int mtdpart_setup_real(char *s) 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/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/ramips/patches-5.4/991-at803x.patch b/target/linux/ramips/patches-5.4/991-at803x.patch index 64bc48fe7a..af0132f8f7 100644 --- a/target/linux/ramips/patches-5.4/991-at803x.patch +++ b/target/linux/ramips/patches-5.4/991-at803x.patch @@ -12,8 +12,6 @@ Signed-off-by: René van Dorst drivers/net/phy/at803x.c | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) -diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c -index 31cd7d8a5a1b5..134c894ccf800 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -14,6 +14,8 @@ @@ -44,7 +42,7 @@ index 31cd7d8a5a1b5..134c894ccf800 100644 #define AT803X_DEBUG_REG_0 0x00 #define AT803X_DEBUG_RX_CLK_DLY_EN BIT(15) -@@ -243,10 +254,72 @@ static int at803x_resume(struct phy_device *phydev) +@@ -243,10 +254,72 @@ static int at803x_resume(struct phy_devi return phy_modify(phydev, MII_BMCR, BMCR_PDOWN | BMCR_ISOLATE, 0); } @@ -117,7 +115,7 @@ index 31cd7d8a5a1b5..134c894ccf800 100644 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) -@@ -394,6 +467,10 @@ static int at803x_read_status(struct phy_device *phydev) +@@ -394,6 +467,10 @@ static int at803x_read_status(struct phy { int ss, err, old_link = phydev->link; @@ -128,7 +126,7 @@ index 31cd7d8a5a1b5..134c894ccf800 100644 /* Update the link, but return if there was an error */ err = genphy_update_link(phydev); if (err) -@@ -448,6 +525,19 @@ static int at803x_read_status(struct phy_device *phydev) +@@ -448,6 +525,19 @@ static int at803x_read_status(struct phy return 0; } @@ -148,7 +146,7 @@ index 31cd7d8a5a1b5..134c894ccf800 100644 static struct phy_driver at803x_driver[] = { { /* ATHEROS 8035 */ -@@ -491,6 +581,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 */ From bc64b9c32e00bf398f29f360fd2286d26ef3b7d5 Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Fri, 20 Nov 2020 19:46:35 +0100 Subject: [PATCH 39/39] treewide: update email address of Tomasz Maciej Nowak Replace my o2.pl email address. I'm still available at the old address. Signed-off-by: Tomasz Maciej Nowak [rephrase commit title/message] Signed-off-by: Adrian Schmutzler --- package/boot/uboot-tegra/Makefile | 4 ++-- target/linux/tegra/Makefile | 2 +- target/linux/tegra/image/Makefile | 2 +- tools/cbootimage-configs/Makefile | 2 +- tools/cbootimage/Makefile | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) 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/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/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.