Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
d55d951084
@ -106,7 +106,7 @@ endef
|
||||
define Build/append-squashfs-fakeroot-be
|
||||
rm -rf $@.fakefs $@.fakesquashfs
|
||||
mkdir $@.fakefs
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs3-lzma \
|
||||
$@.fakefs $@.fakesquashfs \
|
||||
-noappend -root-owned -be -nopad -b 65536 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.10 = .167
|
||||
LINUX_KERNEL_HASH-5.10.167 = d807f97812e566410cd13b3170009e0d7552748d4f22d608ffd4dbd7f85bf9c6
|
||||
LINUX_VERSION-5.10 = .168
|
||||
LINUX_KERNEL_HASH-5.10.168 = b67d2596ba8d30510f743f31899c94c43eaf006a254ff44d7fc6ea26e7ab359c
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .93
|
||||
LINUX_KERNEL_HASH-5.15.93 = e7ed24f2690bf0e11158ccfa8ddc5c0e8a4816d83c4055d205218853da9c5dad
|
||||
LINUX_VERSION-5.15 = .94
|
||||
LINUX_KERNEL_HASH-5.15.94 = da9270dbe64ddf1db13c70470957ff6796eb996d867bb4aed7d14a70e1c65a72
|
||||
|
||||
@ -73,7 +73,6 @@ $(eval $(call nf_add,IPT_CONNTRACK,CONFIG_NETFILTER_XT_MATCH_CONNTRACK, $(P_XT)x
|
||||
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_CONNBYTES, $(P_XT)xt_connbytes))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_CONNLIMIT, $(P_XT)xt_connlimit))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_CONNCOUNT, $(P_XT)nf_conncount))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_CONNMARK, $(P_XT)xt_connmark))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_HELPER, $(P_XT)xt_helper))
|
||||
$(eval $(call nf_add,IPT_CONNTRACK_EXTRA,CONFIG_NETFILTER_XT_MATCH_RECENT, $(P_XT)xt_recent))
|
||||
@ -278,6 +277,10 @@ $(eval $(call nf_add,NFNETLINK_LOG,CONFIG_NETFILTER_NETLINK_LOG, $(P_XT)nfnetlin
|
||||
|
||||
$(eval $(call nf_add,NFNETLINK_QUEUE,CONFIG_NETFILTER_NETLINK_QUEUE, $(P_XT)nfnetlink_queue))
|
||||
|
||||
# conncount
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNCOUNT,CONFIG_NETFILTER_CONNCOUNT, $(P_XT)nf_conncount),))
|
||||
|
||||
#
|
||||
# ebtables
|
||||
#
|
||||
@ -352,6 +355,8 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_COMPAT,CONFIG_NFT_COMPAT, $(P_XT)nft_co
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_XFRM,CONFIG_NFT_XFRM, $(P_XT)nft_xfrm),))
|
||||
|
||||
$(eval $(if $(NF_KMOD),$(call nf_add,NFT_CONNLIMIT,CONFIG_NFT_CONNLIMIT, $(P_XT)nft_connlimit),))
|
||||
|
||||
# userland only
|
||||
IPT_BUILTIN += $(NF_IPT-y) $(NF_IPT-m)
|
||||
IPT_BUILTIN += $(IPT_CORE-y) $(IPT_CORE-m)
|
||||
|
||||
@ -89,6 +89,19 @@ define ImageConfigOptions
|
||||
echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
|
||||
echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
|
||||
echo 'pi_preinit_no_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' >>$(1)/lib/preinit/00_preinit.conf
|
||||
ifeq ($(CONFIG_TARGET_DEFAULT_LAN_IP_FROM_PREINIT),y)
|
||||
mkdir -p $(1)/etc/board.d
|
||||
echo '. /lib/functions/uci-defaults.sh' >$(1)/etc/board.d/99-lan-ip
|
||||
echo 'logger -t 99-lan-ip "setting custom default LAN IP"' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'board_config_update' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'json_select network' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'json_select lan' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'json_add_string ipaddr $(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'json_add_string netmask $(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'json_select ..' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'json_select ..' >>$(1)/etc/board.d/99-lan-ip
|
||||
echo 'board_config_flush' >>$(1)/etc/board.d/99-lan-ip
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
|
||||
@ -5,6 +5,13 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
config TARGET_DEFAULT_LAN_IP_FROM_PREINIT
|
||||
bool "Use preinit IP configuration as default LAN IP" if IMAGEOPT
|
||||
default n
|
||||
help
|
||||
Enabling this will set the default LAN IP address and netmask
|
||||
to the preinit values set in the image config.
|
||||
|
||||
menuconfig PREINITOPT
|
||||
bool "Preinit configuration options" if IMAGEOPT
|
||||
default n
|
||||
|
||||
@ -17,6 +17,7 @@ alfa-network,awusfree1|\
|
||||
alfa-network,quad-e4g|\
|
||||
alfa-network,r36m-e4g|\
|
||||
alfa-network,tube-e4g|\
|
||||
engenius,epg600|\
|
||||
engenius,esr600h|\
|
||||
sitecom,wlr-4100-v1-002)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wireless-regdb
|
||||
PKG_VERSION:=2022.08.12
|
||||
PKG_VERSION:=2023.02.13
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
|
||||
PKG_HASH:=59c8f7d17966db71b27f90e735ee8f5b42ca3527694a8c5e6e9b56bd379c3b84
|
||||
PKG_HASH:=fe81e8a8694dc4753a45087a1c4c7e1b48dee5a59f5f796ce374ea550f0b2e73
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
|
||||
@ -152,7 +152,7 @@ define KernelPackage/can-mcp251x
|
||||
CONFIG_SPI=y \
|
||||
CONFIG_CAN_MCP251X
|
||||
FILES:=$(LINUX_DIR)/drivers/net/can/spi/mcp251x.ko
|
||||
AUTOLOAD:=$(call AutoProbe,can-mcp251x)
|
||||
AUTOLOAD:=$(call AutoProbe,mcp251x)
|
||||
$(call AddDepends/can)
|
||||
endef
|
||||
|
||||
|
||||
@ -39,6 +39,17 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,nf-reject6))
|
||||
|
||||
define KernelPackage/nf-conncount
|
||||
SUBMENU:=$(NF_MENU)
|
||||
TITLE:=Netfilter conncount support
|
||||
KCONFIG:=$(KCONFIG_NF_CONNCOUNT)
|
||||
HIDDEN:=1
|
||||
DEPENDS:=+kmod-nf-conntrack
|
||||
FILES:=$(foreach mod,$(NF_CONNCOUNT-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||
AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNCOUNT-m)))
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nf-conncount))
|
||||
|
||||
define KernelPackage/nf-ipt
|
||||
SUBMENU:=$(NF_MENU)
|
||||
@ -234,6 +245,7 @@ $(eval $(call KernelPackage,ipt-conntrack))
|
||||
|
||||
define KernelPackage/ipt-conntrack-extra
|
||||
TITLE:=Extra connection tracking modules
|
||||
DEPENDS:=+kmod-nf-conncount
|
||||
KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
|
||||
FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||
AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK_EXTRA-m)))
|
||||
@ -1253,3 +1265,14 @@ define KernelPackage/nft-xfrm
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nft-xfrm))
|
||||
|
||||
define KernelPackage/nft-connlimit
|
||||
SUBMENU:=$(NF_MENU)
|
||||
TITLE:=Netfilter nf_tables connlimit support
|
||||
DEPENDS:=+kmod-nft-core +kmod-nf-conncount
|
||||
FILES:=$(foreach mod,$(NFT_CONNLIMIT-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CONNLIMIT-m)))
|
||||
KCONFIG:=$(KCONFIG_NFT_CONNLIMIT)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,nft-connlimit))
|
||||
|
||||
@ -834,7 +834,8 @@ define KernelPackage/ramoops
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Ramoops (pstore-ram)
|
||||
DEFAULT:=m if ALL_KMODS
|
||||
KCONFIG:=CONFIG_PSTORE_RAM
|
||||
KCONFIG:=CONFIG_PSTORE_RAM \
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
DEPENDS:=+kmod-pstore +kmod-reed-solomon
|
||||
FILES:= $(LINUX_DIR)/fs/pstore/ramoops.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,ramoops,1)
|
||||
|
||||
@ -81,7 +81,15 @@ HOST_CONFIGURE_VARS += \
|
||||
CONFIGURE_VARS += \
|
||||
ac_cv_search__obstack_free=yes
|
||||
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral -Wno-error=use-after-free
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE \
|
||||
-Wno-unused-result \
|
||||
-Wno-format-nonliteral
|
||||
|
||||
ifneq ($(CONFIG_GCC_USE_VERSION_11),y)
|
||||
TARGET_CFLAGS += \
|
||||
-Wno-error=use-after-free
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
PKG_SOURCE_DATE:=2022-10-31
|
||||
PKG_SOURCE_VERSION:=a92c0a73d018cd6453dcf253d9617f97311becab
|
||||
PKG_MIRROR_HASH:=0752d500b4aa65290c46be89ac5c30a0d536f6695c04ee79201cbada0880ed9c
|
||||
PKG_SOURCE_DATE:=2023-02-17
|
||||
PKG_SOURCE_VERSION:=edc5e1738682e764e64bcbffde1e0a1cc9feac21
|
||||
PKG_MIRROR_HASH:=4d8f630770bcf4594c8fc0a2ee34bc40ce8618cc46e76ae5c3629da2fea9e90b
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
# See /LICENSE for more information.
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=wireguard-tools
|
||||
|
||||
@ -24,7 +23,6 @@ PKG_LICENSE_FILES:=COPYING
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/package-defaults.mk
|
||||
|
||||
MAKE_PATH:=src
|
||||
MAKE_VARS += PLATFORM=linux
|
||||
|
||||
@ -12,7 +12,7 @@ define Build/netgear-squashfs
|
||||
rm -rf $@.fs $@.squashfs
|
||||
mkdir -p $@.fs/image
|
||||
cp $@ $@.fs/image/uImage
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
|
||||
$(STAGING_DIR_HOST)/bin/mksquashfs3-lzma \
|
||||
$@.fs $@.squashfs -be \
|
||||
-noappend -root-owned -b 65536 \
|
||||
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
||||
|
||||
@ -162,7 +162,7 @@ SVN-Revision: 35130
|
||||
|
||||
--- a/include/uapi/linux/ip.h
|
||||
+++ b/include/uapi/linux/ip.h
|
||||
@@ -105,7 +105,7 @@ struct iphdr {
|
||||
@@ -106,7 +106,7 @@ struct iphdr {
|
||||
__be32 daddr;
|
||||
);
|
||||
/*The options start here. */
|
||||
@ -173,7 +173,7 @@ SVN-Revision: 35130
|
||||
struct ip_auth_hdr {
|
||||
--- a/include/uapi/linux/ipv6.h
|
||||
+++ b/include/uapi/linux/ipv6.h
|
||||
@@ -134,7 +134,7 @@ struct ipv6hdr {
|
||||
@@ -135,7 +135,7 @@ struct ipv6hdr {
|
||||
struct in6_addr saddr;
|
||||
struct in6_addr daddr;
|
||||
);
|
||||
|
||||
@ -162,7 +162,7 @@ SVN-Revision: 35130
|
||||
|
||||
--- a/include/uapi/linux/ip.h
|
||||
+++ b/include/uapi/linux/ip.h
|
||||
@@ -105,7 +105,7 @@ struct iphdr {
|
||||
@@ -106,7 +106,7 @@ struct iphdr {
|
||||
__be32 daddr;
|
||||
);
|
||||
/*The options start here. */
|
||||
@ -173,7 +173,7 @@ SVN-Revision: 35130
|
||||
struct ip_auth_hdr {
|
||||
--- a/include/uapi/linux/ipv6.h
|
||||
+++ b/include/uapi/linux/ipv6.h
|
||||
@@ -134,7 +134,7 @@ struct ipv6hdr {
|
||||
@@ -135,7 +135,7 @@ struct ipv6hdr {
|
||||
struct in6_addr saddr;
|
||||
struct in6_addr daddr;
|
||||
);
|
||||
|
||||
@ -203,7 +203,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
static int nvmem_add_cells_from_of(struct nvmem_device *nvmem)
|
||||
{
|
||||
struct device_node *parent, *child;
|
||||
@@ -655,6 +792,8 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -656,6 +793,8 @@ struct nvmem_device *nvmem_register(cons
|
||||
nvmem->type = config->type;
|
||||
nvmem->reg_read = config->reg_read;
|
||||
nvmem->reg_write = config->reg_write;
|
||||
@ -212,7 +212,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
if (!config->no_of_node)
|
||||
nvmem->dev.of_node = config->dev->of_node;
|
||||
|
||||
@@ -679,6 +818,12 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -680,6 +819,12 @@ struct nvmem_device *nvmem_register(cons
|
||||
nvmem->dev.groups = nvmem_dev_groups;
|
||||
#endif
|
||||
|
||||
@ -256,7 +256,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
* @type: Type of the nvmem storage
|
||||
* @read_only: Device is read-only.
|
||||
* @root_only: Device is accessibly to root only.
|
||||
@@ -66,6 +81,8 @@ struct nvmem_config {
|
||||
@@ -67,6 +82,8 @@ struct nvmem_config {
|
||||
struct gpio_desc *wp_gpio;
|
||||
const struct nvmem_cell_info *cells;
|
||||
int ncells;
|
||||
|
||||
@ -49,7 +49,7 @@ Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-2-michael@walle.cc
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -794,7 +794,9 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -795,7 +795,9 @@ struct nvmem_device *nvmem_register(cons
|
||||
nvmem->reg_write = config->reg_write;
|
||||
nvmem->keepout = config->keepout;
|
||||
nvmem->nkeepout = config->nkeepout;
|
||||
@ -70,11 +70,11 @@ Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-2-michael@walle.cc
|
||||
* @no_of_node: Device should not use the parent's of_node even if it's !NULL.
|
||||
* @reg_read: Callback to read data.
|
||||
* @reg_write: Callback to write data.
|
||||
@@ -86,6 +87,7 @@ struct nvmem_config {
|
||||
@@ -87,6 +88,7 @@ struct nvmem_config {
|
||||
enum nvmem_type type;
|
||||
bool read_only;
|
||||
bool root_only;
|
||||
+ struct device_node *of_node;
|
||||
bool ignore_wp;
|
||||
bool no_of_node;
|
||||
nvmem_reg_read_t reg_read;
|
||||
nvmem_reg_write_t reg_write;
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -826,8 +826,11 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -827,8 +827,11 @@ struct nvmem_device *nvmem_register(cons
|
||||
|
||||
if (nvmem->nkeepout) {
|
||||
rval = nvmem_validate_keepouts(nvmem);
|
||||
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
struct gpio_desc *wp_gpio;
|
||||
void *priv;
|
||||
};
|
||||
@@ -798,6 +799,7 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -799,6 +800,7 @@ struct nvmem_device *nvmem_register(cons
|
||||
nvmem->type = config->type;
|
||||
nvmem->reg_read = config->reg_read;
|
||||
nvmem->reg_write = config->reg_write;
|
||||
@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
* @size: Device size.
|
||||
* @word_size: Minimum read/write access granularity.
|
||||
* @stride: Minimum read/write access stride.
|
||||
@@ -92,6 +96,7 @@ struct nvmem_config {
|
||||
@@ -94,6 +98,7 @@ struct nvmem_config {
|
||||
bool no_of_node;
|
||||
nvmem_reg_read_t reg_read;
|
||||
nvmem_reg_write_t reg_write;
|
||||
|
||||
@ -1,68 +0,0 @@
|
||||
From f6c052afe6f802d87c74153b7a57c43b2e9faf07 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Kerello <christophe.kerello@foss.st.com>
|
||||
Date: Sun, 20 Feb 2022 15:14:31 +0000
|
||||
Subject: [PATCH] nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios
|
||||
property
|
||||
|
||||
Wp-gpios property can be used on NVMEM nodes and the same property can
|
||||
be also used on MTD NAND nodes. In case of the wp-gpios property is
|
||||
defined at NAND level node, the GPIO management is done at NAND driver
|
||||
level. Write protect is disabled when the driver is probed or resumed
|
||||
and is enabled when the driver is released or suspended.
|
||||
|
||||
When no partitions are defined in the NAND DT node, then the NAND DT node
|
||||
will be passed to NVMEM framework. If wp-gpios property is defined in
|
||||
this node, the GPIO resource is taken twice and the NAND controller
|
||||
driver fails to probe.
|
||||
|
||||
It would be possible to set config->wp_gpio at MTD level before calling
|
||||
nvmem_register function but NVMEM framework will toggle this GPIO on
|
||||
each write when this GPIO should only be controlled at NAND level driver
|
||||
to ensure that the Write Protect has not been enabled.
|
||||
|
||||
A way to fix this conflict is to add a new boolean flag in nvmem_config
|
||||
named ignore_wp. In case ignore_wp is set, the GPIO resource will
|
||||
be managed by the provider.
|
||||
|
||||
Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
|
||||
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20220220151432.16605-2-srinivas.kandagatla@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/nvmem/core.c | 2 +-
|
||||
include/linux/nvmem-provider.h | 4 +++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -771,7 +771,7 @@ struct nvmem_device *nvmem_register(cons
|
||||
|
||||
if (config->wp_gpio)
|
||||
nvmem->wp_gpio = config->wp_gpio;
|
||||
- else
|
||||
+ else if (!config->ignore_wp)
|
||||
nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
|
||||
GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(nvmem->wp_gpio)) {
|
||||
--- a/include/linux/nvmem-provider.h
|
||||
+++ b/include/linux/nvmem-provider.h
|
||||
@@ -70,7 +70,8 @@ struct nvmem_keepout {
|
||||
* @word_size: Minimum read/write access granularity.
|
||||
* @stride: Minimum read/write access stride.
|
||||
* @priv: User context passed to read/write callbacks.
|
||||
- * @wp-gpio: Write protect pin
|
||||
+ * @wp-gpio: Write protect pin
|
||||
+ * @ignore_wp: Write Protect pin is managed by the provider.
|
||||
*
|
||||
* Note: A default "nvmem<id>" name will be assigned to the device if
|
||||
* no name is specified in its configuration. In such case "<id>" is
|
||||
@@ -92,6 +93,7 @@ struct nvmem_config {
|
||||
enum nvmem_type type;
|
||||
bool read_only;
|
||||
bool root_only;
|
||||
+ bool ignore_wp;
|
||||
struct device_node *of_node;
|
||||
bool no_of_node;
|
||||
nvmem_reg_read_t reg_read;
|
||||
@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -829,21 +829,18 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -830,21 +830,18 @@ struct nvmem_device *nvmem_register(cons
|
||||
nvmem->dev.groups = nvmem_dev_groups;
|
||||
#endif
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/nvmem/core.c
|
||||
+++ b/drivers/nvmem/core.c
|
||||
@@ -810,18 +810,24 @@ struct nvmem_device *nvmem_register(cons
|
||||
@@ -811,18 +811,24 @@ struct nvmem_device *nvmem_register(cons
|
||||
|
||||
switch (config->id) {
|
||||
case NVMEM_DEVID_NONE:
|
||||
|
||||
@ -652,7 +652,7 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7
|
||||
"Section %d Node %d Zone %d Lastcpupid %d Kasantag %d\n",
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -7456,6 +7456,7 @@ static void __meminit pgdat_init_interna
|
||||
@@ -7459,6 +7459,7 @@ static void __meminit pgdat_init_interna
|
||||
|
||||
pgdat_page_ext_init(pgdat);
|
||||
lruvec_init(&pgdat->__lruvec);
|
||||
|
||||
@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
/* Add the all other ports to this port matrix. */
|
||||
@@ -1304,24 +1308,28 @@ static void
|
||||
@@ -1316,24 +1320,28 @@ static void
|
||||
mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
|
||||
struct net_device *bridge)
|
||||
{
|
||||
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2390,6 +2390,32 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
@@ -2402,6 +2402,32 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static bool
|
||||
mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
|
||||
const struct phylink_link_state *state)
|
||||
@@ -2426,6 +2452,37 @@ static bool mt7531_is_rgmii_port(struct
|
||||
@@ -2438,6 +2464,37 @@ static bool mt7531_is_rgmii_port(struct
|
||||
return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static bool
|
||||
mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
|
||||
const struct phylink_link_state *state)
|
||||
@@ -2902,6 +2959,18 @@ mt7531_cpu_port_config(struct dsa_switch
|
||||
@@ -2914,6 +2971,18 @@ mt7531_cpu_port_config(struct dsa_switch
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static void
|
||||
mt7530_mac_port_validate(struct dsa_switch *ds, int port,
|
||||
unsigned long *supported)
|
||||
@@ -3137,6 +3206,7 @@ static const struct dsa_switch_ops mt753
|
||||
@@ -3149,6 +3218,7 @@ static const struct dsa_switch_ops mt753
|
||||
.port_vlan_del = mt7530_port_vlan_del,
|
||||
.port_mirror_add = mt753x_port_mirror_add,
|
||||
.port_mirror_del = mt753x_port_mirror_del,
|
||||
@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.phylink_validate = mt753x_phylink_validate,
|
||||
.phylink_mac_link_state = mt753x_phylink_mac_link_state,
|
||||
.phylink_mac_config = mt753x_phylink_mac_config,
|
||||
@@ -3154,6 +3224,7 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3166,6 +3236,7 @@ static const struct mt753x_info mt753x_t
|
||||
.phy_read = mt7530_phy_read,
|
||||
.phy_write = mt7530_phy_write,
|
||||
.pad_setup = mt7530_pad_clk_setup,
|
||||
@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.phy_mode_supported = mt7530_phy_mode_supported,
|
||||
.mac_port_validate = mt7530_mac_port_validate,
|
||||
.mac_port_get_state = mt7530_phylink_mac_link_state,
|
||||
@@ -3165,6 +3236,7 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3177,6 +3248,7 @@ static const struct mt753x_info mt753x_t
|
||||
.phy_read = mt7530_phy_read,
|
||||
.phy_write = mt7530_phy_write,
|
||||
.pad_setup = mt7530_pad_clk_setup,
|
||||
@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.phy_mode_supported = mt7530_phy_mode_supported,
|
||||
.mac_port_validate = mt7530_mac_port_validate,
|
||||
.mac_port_get_state = mt7530_phylink_mac_link_state,
|
||||
@@ -3177,6 +3249,7 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3189,6 +3261,7 @@ static const struct mt753x_info mt753x_t
|
||||
.phy_write = mt7531_ind_phy_write,
|
||||
.pad_setup = mt7531_pad_setup,
|
||||
.cpu_port_config = mt7531_cpu_port_config,
|
||||
@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.phy_mode_supported = mt7531_phy_mode_supported,
|
||||
.mac_port_validate = mt7531_mac_port_validate,
|
||||
.mac_port_get_state = mt7531_phylink_mac_link_state,
|
||||
@@ -3239,6 +3312,7 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
@@ -3251,6 +3324,7 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
*/
|
||||
if (!priv->info->sw_setup || !priv->info->pad_setup ||
|
||||
!priv->info->phy_read || !priv->info->phy_write ||
|
||||
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2416,37 +2416,6 @@ static void mt7530_mac_port_get_caps(str
|
||||
@@ -2428,37 +2428,6 @@ static void mt7530_mac_port_get_caps(str
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
|
||||
{
|
||||
return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
|
||||
@@ -2483,44 +2452,6 @@ static void mt7531_mac_port_get_caps(str
|
||||
@@ -2495,44 +2464,6 @@ static void mt7531_mac_port_get_caps(str
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static int
|
||||
mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
|
||||
{
|
||||
@@ -2775,9 +2706,6 @@ mt753x_phylink_mac_config(struct dsa_swi
|
||||
@@ -2787,9 +2718,6 @@ mt753x_phylink_mac_config(struct dsa_swi
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
u32 mcr_cur, mcr_new;
|
||||
|
||||
@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
switch (port) {
|
||||
case 0 ... 4: /* Internal phy */
|
||||
if (state->interface != PHY_INTERFACE_MODE_GMII)
|
||||
@@ -2993,12 +2921,6 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
@@ -3005,12 +2933,6 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
|
||||
@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
phylink_set_port_modes(mask);
|
||||
|
||||
if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
|
||||
@@ -3225,7 +3147,6 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3237,7 +3159,6 @@ static const struct mt753x_info mt753x_t
|
||||
.phy_write = mt7530_phy_write,
|
||||
.pad_setup = mt7530_pad_clk_setup,
|
||||
.mac_port_get_caps = mt7530_mac_port_get_caps,
|
||||
@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.mac_port_validate = mt7530_mac_port_validate,
|
||||
.mac_port_get_state = mt7530_phylink_mac_link_state,
|
||||
.mac_port_config = mt7530_mac_config,
|
||||
@@ -3237,7 +3158,6 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3249,7 +3170,6 @@ static const struct mt753x_info mt753x_t
|
||||
.phy_write = mt7530_phy_write,
|
||||
.pad_setup = mt7530_pad_clk_setup,
|
||||
.mac_port_get_caps = mt7530_mac_port_get_caps,
|
||||
@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.mac_port_validate = mt7530_mac_port_validate,
|
||||
.mac_port_get_state = mt7530_phylink_mac_link_state,
|
||||
.mac_port_config = mt7530_mac_config,
|
||||
@@ -3250,7 +3170,6 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3262,7 +3182,6 @@ static const struct mt753x_info mt753x_t
|
||||
.pad_setup = mt7531_pad_setup,
|
||||
.cpu_port_config = mt7531_cpu_port_config,
|
||||
.mac_port_get_caps = mt7531_mac_port_get_caps,
|
||||
@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.mac_port_validate = mt7531_mac_port_validate,
|
||||
.mac_port_get_state = mt7531_phylink_mac_link_state,
|
||||
.mac_port_config = mt7531_mac_config,
|
||||
@@ -3313,7 +3232,6 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
@@ -3325,7 +3244,6 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
if (!priv->info->sw_setup || !priv->info->pad_setup ||
|
||||
!priv->info->phy_read || !priv->info->phy_write ||
|
||||
!priv->info->mac_port_get_caps ||
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2945,11 +2945,6 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
@@ -2957,11 +2957,6 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
|
||||
linkmode_and(supported, supported, mask);
|
||||
linkmode_and(state->advertising, state->advertising, mask);
|
||||
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2523,12 +2523,13 @@ static int mt7531_rgmii_setup(struct mt7
|
||||
@@ -2535,12 +2535,13 @@ static int mt7531_rgmii_setup(struct mt7
|
||||
}
|
||||
|
||||
static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port,
|
||||
@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
phylink_set(supported, 2500baseX_Full);
|
||||
phylink_set(supported, 2500baseT_Full);
|
||||
}
|
||||
@@ -2901,16 +2902,18 @@ static void mt753x_phylink_get_caps(stru
|
||||
@@ -2913,16 +2914,18 @@ static void mt753x_phylink_get_caps(stru
|
||||
|
||||
static void
|
||||
mt7530_mac_port_validate(struct dsa_switch *ds, int port,
|
||||
@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2933,12 +2936,13 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
@@ -2945,12 +2948,13 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
}
|
||||
|
||||
/* This switch only supports 1G full-duplex. */
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2522,19 +2522,6 @@ static int mt7531_rgmii_setup(struct mt7
|
||||
@@ -2534,19 +2534,6 @@ static int mt7531_rgmii_setup(struct mt7
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static void
|
||||
mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port,
|
||||
unsigned int mode, phy_interface_t interface,
|
||||
@@ -2901,51 +2888,21 @@ static void mt753x_phylink_get_caps(stru
|
||||
@@ -2913,51 +2900,21 @@ static void mt753x_phylink_get_caps(stru
|
||||
}
|
||||
|
||||
static void
|
||||
@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
linkmode_and(supported, supported, mask);
|
||||
linkmode_and(state->advertising, state->advertising, mask);
|
||||
@@ -3146,7 +3103,6 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3158,7 +3115,6 @@ static const struct mt753x_info mt753x_t
|
||||
.phy_write = mt7530_phy_write,
|
||||
.pad_setup = mt7530_pad_clk_setup,
|
||||
.mac_port_get_caps = mt7530_mac_port_get_caps,
|
||||
@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.mac_port_get_state = mt7530_phylink_mac_link_state,
|
||||
.mac_port_config = mt7530_mac_config,
|
||||
},
|
||||
@@ -3157,7 +3113,6 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3169,7 +3125,6 @@ static const struct mt753x_info mt753x_t
|
||||
.phy_write = mt7530_phy_write,
|
||||
.pad_setup = mt7530_pad_clk_setup,
|
||||
.mac_port_get_caps = mt7530_mac_port_get_caps,
|
||||
@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.mac_port_get_state = mt7530_phylink_mac_link_state,
|
||||
.mac_port_config = mt7530_mac_config,
|
||||
},
|
||||
@@ -3169,7 +3124,6 @@ static const struct mt753x_info mt753x_t
|
||||
@@ -3181,7 +3136,6 @@ static const struct mt753x_info mt753x_t
|
||||
.pad_setup = mt7531_pad_setup,
|
||||
.cpu_port_config = mt7531_cpu_port_config,
|
||||
.mac_port_get_caps = mt7531_mac_port_get_caps,
|
||||
@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.mac_port_get_state = mt7531_phylink_mac_link_state,
|
||||
.mac_port_config = mt7531_mac_config,
|
||||
.mac_pcs_an_restart = mt7531_sgmii_restart_an,
|
||||
@@ -3231,7 +3185,6 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
@@ -3243,7 +3197,6 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
if (!priv->info->sw_setup || !priv->info->pad_setup ||
|
||||
!priv->info->phy_read || !priv->info->phy_write ||
|
||||
!priv->info->mac_port_get_caps ||
|
||||
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
/* String, offset, and register size in bytes if different from 4 bytes */
|
||||
static const struct mt7530_mib_desc mt7530_mib[] = {
|
||||
MIB_DESC(1, 0x00, "TxDrop"),
|
||||
@@ -2522,12 +2527,11 @@ static int mt7531_rgmii_setup(struct mt7
|
||||
@@ -2534,12 +2539,11 @@ static int mt7531_rgmii_setup(struct mt7
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
unsigned int val;
|
||||
|
||||
/* For adjusting speed and duplex of SGMII force mode. */
|
||||
@@ -2553,6 +2557,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
|
||||
@@ -2565,6 +2569,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
|
||||
|
||||
/* MT7531 SGMII 1G force mode can only work in full duplex mode,
|
||||
* no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not.
|
||||
@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
*/
|
||||
if ((speed == SPEED_10 || speed == SPEED_100) &&
|
||||
duplex != DUPLEX_FULL)
|
||||
@@ -2628,9 +2635,10 @@ static int mt7531_sgmii_setup_mode_an(st
|
||||
@@ -2640,9 +2647,10 @@ static int mt7531_sgmii_setup_mode_an(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
u32 val;
|
||||
|
||||
/* Only restart AN when AN is enabled */
|
||||
@@ -2687,6 +2695,24 @@ mt753x_mac_config(struct dsa_switch *ds,
|
||||
@@ -2699,6 +2707,24 @@ mt753x_mac_config(struct dsa_switch *ds,
|
||||
return priv->info->mac_port_config(ds, port, mode, state->interface);
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static void
|
||||
mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
|
||||
const struct phylink_link_state *state)
|
||||
@@ -2748,17 +2774,6 @@ unsupported:
|
||||
@@ -2760,17 +2786,6 @@ unsupported:
|
||||
mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
|
||||
unsigned int mode,
|
||||
phy_interface_t interface)
|
||||
@@ -2768,16 +2783,13 @@ static void mt753x_phylink_mac_link_down
|
||||
@@ -2780,16 +2795,13 @@ static void mt753x_phylink_mac_link_down
|
||||
mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
}
|
||||
|
||||
static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
|
||||
@@ -2790,8 +2802,6 @@ static void mt753x_phylink_mac_link_up(s
|
||||
@@ -2802,8 +2814,6 @@ static void mt753x_phylink_mac_link_up(s
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
u32 mcr;
|
||||
|
||||
@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
|
||||
|
||||
/* MT753x MAC works in 1G full duplex mode for all up-clocked
|
||||
@@ -2869,6 +2879,8 @@ mt7531_cpu_port_config(struct dsa_switch
|
||||
@@ -2881,6 +2891,8 @@ mt7531_cpu_port_config(struct dsa_switch
|
||||
return ret;
|
||||
mt7530_write(priv, MT7530_PMCR_P(port),
|
||||
PMCR_CPU_PORT_SETTING(priv->id));
|
||||
@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
|
||||
speed, DUPLEX_FULL, true, true);
|
||||
|
||||
@@ -2908,16 +2920,13 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
@@ -2920,16 +2932,13 @@ mt753x_phylink_validate(struct dsa_switc
|
||||
linkmode_and(state->advertising, state->advertising, mask);
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
pmsr = mt7530_read(priv, MT7530_PMSR_P(port));
|
||||
|
||||
state->link = (pmsr & PMSR_LINK);
|
||||
@@ -2944,8 +2953,6 @@ mt7530_phylink_mac_link_state(struct dsa
|
||||
@@ -2956,8 +2965,6 @@ mt7530_phylink_mac_link_state(struct dsa
|
||||
state->pause |= MLO_PAUSE_RX;
|
||||
if (pmsr & PMSR_TX_FC)
|
||||
state->pause |= MLO_PAUSE_TX;
|
||||
@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -2987,32 +2994,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
|
||||
@@ -2999,32 +3006,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -3025,6 +3049,13 @@ mt753x_setup(struct dsa_switch *ds)
|
||||
@@ -3037,6 +3061,13 @@ mt753x_setup(struct dsa_switch *ds)
|
||||
if (ret && priv->irq)
|
||||
mt7530_free_irq_common(priv);
|
||||
|
||||
@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3086,9 +3117,8 @@ static const struct dsa_switch_ops mt753
|
||||
@@ -3098,9 +3129,8 @@ static const struct dsa_switch_ops mt753
|
||||
.port_mirror_del = mt753x_port_mirror_del,
|
||||
.phylink_get_caps = mt753x_phylink_get_caps,
|
||||
.phylink_validate = mt753x_phylink_validate,
|
||||
@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.phylink_mac_link_down = mt753x_phylink_mac_link_down,
|
||||
.phylink_mac_link_up = mt753x_phylink_mac_link_up,
|
||||
.get_mac_eee = mt753x_get_mac_eee,
|
||||
@@ -3098,36 +3128,34 @@ static const struct dsa_switch_ops mt753
|
||||
@@ -3110,36 +3140,34 @@ static const struct dsa_switch_ops mt753
|
||||
static const struct mt753x_info mt753x_table[] = {
|
||||
[ID_MT7621] = {
|
||||
.id = ID_MT7621,
|
||||
@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3185,7 +3213,7 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
@@ -3197,7 +3225,7 @@ mt7530_probe(struct mdio_device *mdiodev
|
||||
if (!priv->info->sw_setup || !priv->info->pad_setup ||
|
||||
!priv->info->phy_read || !priv->info->phy_write ||
|
||||
!priv->info->mac_port_get_caps ||
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2899,25 +2899,16 @@ static void mt753x_phylink_get_caps(stru
|
||||
@@ -2911,25 +2911,16 @@ static void mt753x_phylink_get_caps(stru
|
||||
priv->info->mac_port_get_caps(ds, port, config);
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
}
|
||||
|
||||
static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
|
||||
@@ -3019,12 +3010,14 @@ static void mt7530_pcs_an_restart(struct
|
||||
@@ -3031,12 +3022,14 @@ static void mt7530_pcs_an_restart(struct
|
||||
}
|
||||
|
||||
static const struct phylink_pcs_ops mt7530_pcs_ops = {
|
||||
@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
.pcs_get_state = mt7531_pcs_get_state,
|
||||
.pcs_config = mt753x_pcs_config,
|
||||
.pcs_an_restart = mt7531_pcs_an_restart,
|
||||
@@ -3116,7 +3109,6 @@ static const struct dsa_switch_ops mt753
|
||||
@@ -3128,7 +3121,6 @@ static const struct dsa_switch_ops mt753
|
||||
.port_mirror_add = mt753x_port_mirror_add,
|
||||
.port_mirror_del = mt753x_port_mirror_del,
|
||||
.phylink_get_caps = mt753x_phylink_get_caps,
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2896,6 +2896,12 @@ static void mt753x_phylink_get_caps(stru
|
||||
@@ -2908,6 +2908,12 @@ static void mt753x_phylink_get_caps(stru
|
||||
config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
|
||||
MAC_10 | MAC_100 | MAC_1000FD;
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -3034,9 +3034,16 @@ static int
|
||||
@@ -3046,9 +3046,16 @@ static int
|
||||
mt753x_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -3048,13 +3055,6 @@ mt753x_setup(struct dsa_switch *ds)
|
||||
@@ -3060,13 +3067,6 @@ mt753x_setup(struct dsa_switch *ds)
|
||||
if (ret && priv->irq)
|
||||
mt7530_free_irq_common(priv);
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1525,11 +1525,11 @@ static void
|
||||
@@ -1537,11 +1537,11 @@ static void
|
||||
mt7530_hw_vlan_add(struct mt7530_priv *priv,
|
||||
struct mt7530_hw_vlan_entry *entry)
|
||||
{
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* Validate the entry with independent learning, create egress tag per
|
||||
* VLAN and joining the port as one of the port members.
|
||||
@@ -1540,22 +1540,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
|
||||
@@ -1552,22 +1552,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
|
||||
|
||||
/* Decide whether adding tag or not for those outgoing packets from the
|
||||
* port inside the VLAN.
|
||||
@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1574,11 +1572,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
|
||||
@@ -1586,11 +1584,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2090,11 +2090,12 @@ static int
|
||||
@@ -2102,11 +2102,12 @@ static int
|
||||
mt7530_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
u32 id, val;
|
||||
int ret, i;
|
||||
|
||||
@@ -2102,7 +2103,19 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
@@ -2114,7 +2115,19 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
* controller also is the container for two GMACs nodes representing
|
||||
* as two netdev instances.
|
||||
*/
|
||||
@ -51,7 +51,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
ds->assisted_learning_on_cpu_port = true;
|
||||
ds->mtu_enforcement_ingress = true;
|
||||
|
||||
@@ -2264,6 +2277,7 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
@@ -2276,6 +2289,7 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
struct mt7530_dummy_poll p;
|
||||
@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
u32 val, id;
|
||||
int ret, i;
|
||||
|
||||
@@ -2338,8 +2352,11 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
@@ -2350,8 +2364,11 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
CORE_PLL_GROUP4, val);
|
||||
|
||||
/* BPDU to CPU port */
|
||||
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
| PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
|
||||
}
|
||||
}
|
||||
@@ -1314,6 +1323,7 @@ mt7530_port_bridge_leave(struct dsa_swit
|
||||
@@ -1326,6 +1335,7 @@ mt7530_port_bridge_leave(struct dsa_swit
|
||||
struct net_device *bridge)
|
||||
{
|
||||
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
struct mt7530_priv *priv = ds->priv;
|
||||
|
||||
mutex_lock(&priv->reg_mutex);
|
||||
@@ -1342,8 +1352,8 @@ mt7530_port_bridge_leave(struct dsa_swit
|
||||
@@ -1354,8 +1364,8 @@ mt7530_port_bridge_leave(struct dsa_swit
|
||||
*/
|
||||
if (priv->ports[port].enable)
|
||||
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
|
||||
@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
/* When a port is removed from the bridge, the port would be set up
|
||||
* back to the default as is at initial boot which is a VLAN-unaware
|
||||
@@ -1506,6 +1516,9 @@ static int
|
||||
@@ -1518,6 +1528,9 @@ static int
|
||||
mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
if (vlan_filtering) {
|
||||
/* The port is being kept as VLAN-unaware port when bridge is
|
||||
* set up with vlan_filtering not being set, Otherwise, the
|
||||
@@ -1513,7 +1526,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
|
||||
@@ -1525,7 +1538,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
|
||||
* for becoming a VLAN-aware port.
|
||||
*/
|
||||
mt7530_port_set_vlan_aware(ds, port);
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2699,9 +2699,6 @@ mt7531_mac_config(struct dsa_switch *ds,
|
||||
@@ -2711,9 +2711,6 @@ mt7531_mac_config(struct dsa_switch *ds,
|
||||
case PHY_INTERFACE_MODE_NA:
|
||||
case PHY_INTERFACE_MODE_1000BASEX:
|
||||
case PHY_INTERFACE_MODE_2500BASEX:
|
||||
@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
return mt7531_sgmii_setup_mode_force(priv, port, interface);
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -2777,13 +2774,6 @@ unsupported:
|
||||
@@ -2789,13 +2786,6 @@ unsupported:
|
||||
return;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
|
||||
mcr_new = mcr_cur;
|
||||
mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
|
||||
@@ -2920,6 +2910,9 @@ static void mt753x_phylink_get_caps(stru
|
||||
@@ -2932,6 +2922,9 @@ static void mt753x_phylink_get_caps(stru
|
||||
config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
|
||||
MAC_10 | MAC_100 | MAC_1000FD;
|
||||
|
||||
@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/* This driver does not make use of the speed, duplex, pause or the
|
||||
* advertisement in its mac_config, so it is safe to mark this driver
|
||||
* as non-legacy.
|
||||
@@ -2985,6 +2978,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
|
||||
@@ -2997,6 +2990,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
|
||||
|
||||
status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
|
||||
state->link = !!(status & MT7531_SGMII_LINK_STATUS);
|
||||
@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
if (state->interface == PHY_INTERFACE_MODE_SGMII &&
|
||||
(status & MT7531_SGMII_AN_ENABLE)) {
|
||||
val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port));
|
||||
@@ -3015,16 +3009,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
|
||||
@@ -3027,16 +3021,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
}
|
||||
|
||||
static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
|
||||
@@ -3065,6 +3087,8 @@ mt753x_setup(struct dsa_switch *ds)
|
||||
@@ -3077,6 +3099,8 @@ mt753x_setup(struct dsa_switch *ds)
|
||||
priv->pcs[i].pcs.ops = priv->info->pcs_ops;
|
||||
priv->pcs[i].priv = priv;
|
||||
priv->pcs[i].port = i;
|
||||
|
||||
@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
|
||||
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -7104,7 +7104,7 @@ static void __ref alloc_node_mem_map(str
|
||||
@@ -7107,7 +7107,7 @@ static void __ref alloc_node_mem_map(str
|
||||
if (pgdat == NODE_DATA(0)) {
|
||||
mem_map = NODE_DATA(0)->node_mem_map;
|
||||
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
||||
|
||||
@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
|
||||
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -7602,7 +7602,7 @@ static void __init alloc_node_mem_map(st
|
||||
@@ -7605,7 +7605,7 @@ static void __init alloc_node_mem_map(st
|
||||
if (pgdat == NODE_DATA(0)) {
|
||||
mem_map = NODE_DATA(0)->node_mem_map;
|
||||
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2324,6 +2324,10 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
@@ -2336,6 +2336,10 @@ mt7531_setup(struct dsa_switch *ds)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_sgmii.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
|
||||
@@ -143,10 +143,28 @@ static void mtk_pcs_link_up(struct phyli
|
||||
@@ -139,10 +139,28 @@ static void mtk_pcs_link_up(struct phyli
|
||||
regmap_write(mpcs->regmap, SGMSYS_SGMII_MODE, val);
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
||||
regmap_write(mpcs->regmap, mpcs->ana_rgc3, val);
|
||||
|
||||
/* Setup the link timer and QPHY power up inside SGMIISYS */
|
||||
@@ -98,7 +100,7 @@ static int mtk_pcs_config(struct phylink
|
||||
@@ -94,7 +96,7 @@ static int mtk_pcs_config(struct phylink
|
||||
if (interface != PHY_INTERFACE_MODE_SGMII)
|
||||
err = mtk_pcs_setup_mode_force(mpcs, interface);
|
||||
else if (phylink_autoneg_inband(mode))
|
||||
|
||||
@ -90,7 +90,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -1012,6 +1012,7 @@ struct mtk_soc_data {
|
||||
@@ -1007,6 +1007,7 @@ struct mtk_soc_data {
|
||||
u8 hash_offset;
|
||||
u16 foe_entry_size;
|
||||
netdev_features_t hw_features;
|
||||
|
||||
@ -628,7 +628,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
/* PDMA on MT7628 */
|
||||
#define TX_DMA_DONE BIT(31)
|
||||
@@ -957,6 +976,7 @@ struct mtk_reg_map {
|
||||
@@ -952,6 +971,7 @@ struct mtk_reg_map {
|
||||
} pdma;
|
||||
struct {
|
||||
u32 qtx_cfg; /* tx queue configuration */
|
||||
@ -636,7 +636,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
u32 rx_ptr; /* rx base pointer */
|
||||
u32 rx_cnt_cfg; /* rx max count configuration */
|
||||
u32 qcrx_ptr; /* rx cpu pointer */
|
||||
@@ -974,6 +994,7 @@ struct mtk_reg_map {
|
||||
@@ -969,6 +989,7 @@ struct mtk_reg_map {
|
||||
u32 fq_tail; /* fq tail pointer */
|
||||
u32 fq_count; /* fq free page count */
|
||||
u32 fq_blen; /* fq free page buffer length */
|
||||
@ -644,7 +644,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
} qdma;
|
||||
u32 gdm1_cnt;
|
||||
u32 gdma_to_ppe0;
|
||||
@@ -1180,6 +1201,7 @@ struct mtk_mac {
|
||||
@@ -1175,6 +1196,7 @@ struct mtk_mac {
|
||||
__be32 hwlro_ip[MTK_MAX_LRO_IP_CNT];
|
||||
int hwlro_ip_cnt;
|
||||
unsigned int syscfg0;
|
||||
|
||||
@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -921,7 +921,13 @@ enum mkt_eth_capabilities {
|
||||
@@ -916,7 +916,13 @@ enum mkt_eth_capabilities {
|
||||
#define MTK_MUX_GMAC12_TO_GEPHY_SGMII \
|
||||
(MTK_ETH_MUX_GMAC12_TO_GEPHY_SGMII | MTK_MUX)
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/* CDMP Ingress Control Register */
|
||||
#define MTK_CDMP_IG_CTRL 0x400
|
||||
#define MTK_CDMP_STAG_EN BIT(0)
|
||||
@@ -1173,6 +1179,8 @@ struct mtk_eth {
|
||||
@@ -1168,6 +1174,8 @@ struct mtk_eth {
|
||||
|
||||
int ip_align;
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -504,6 +504,10 @@
|
||||
@@ -529,6 +529,10 @@
|
||||
#define SGMII_SEND_AN_ERROR_EN BIT(11)
|
||||
#define SGMII_IF_MODE_MASK GENMASK(5, 1)
|
||||
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
#define RG_PHY_SPEED_MASK (BIT(2) | BIT(3))
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_sgmii.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
|
||||
@@ -86,6 +86,10 @@ static int mtk_pcs_config(struct phylink
|
||||
@@ -90,6 +90,10 @@ static int mtk_pcs_config(struct phylink
|
||||
regmap_update_bits(mpcs->regmap, SGMSYS_QPHY_PWR_STATE_CTRL,
|
||||
SGMII_PHYA_PWD, SGMII_PHYA_PWD);
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -523,7 +523,7 @@ static int mtk_mac_finish(struct phylink
|
||||
@@ -528,7 +528,7 @@ static int mtk_mac_finish(struct phylink
|
||||
/* Setup gmac */
|
||||
mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
|
||||
mcr_new = mcr_cur;
|
||||
@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
/* Only update control register when needed! */
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -367,6 +367,7 @@
|
||||
@@ -392,6 +392,7 @@
|
||||
#define MAC_MCR_FORCE_MODE BIT(15)
|
||||
#define MAC_MCR_TX_EN BIT(14)
|
||||
#define MAC_MCR_RX_EN BIT(13)
|
||||
|
||||
@ -30,7 +30,11 @@ define Device/google_wifi
|
||||
KERNEL_NAME := zImage
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := cros-gpt | append-kernel-part | append-rootfs
|
||||
# Note: Chromium/Depthcharge-based bootloaders insert a reserved-memory
|
||||
# ramoops node into the Device Tree automatically, so we can use
|
||||
# kmod-ramoops.
|
||||
DEVICE_PACKAGES := partx-utils mkf2fs e2fsprogs \
|
||||
kmod-fs-ext4 kmod-fs-f2fs kmod-google-firmware
|
||||
kmod-fs-ext4 kmod-fs-f2fs kmod-google-firmware \
|
||||
kmod-ramoops
|
||||
endef
|
||||
TARGET_DEVICES += google_wifi
|
||||
|
||||
@ -12,6 +12,18 @@
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
/* eax500 routers reuse the pcie2 reset pin for switch reset pin */
|
||||
switch_reset: switch_reset_pins {
|
||||
mux {
|
||||
pins = "gpio63";
|
||||
function = "gpio";
|
||||
drive-strength = <12>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb3_0 {
|
||||
status = "okay";
|
||||
};
|
||||
@ -30,10 +42,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
@ -160,6 +168,10 @@
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
/* Switch from documentation require at least 10ms for reset */
|
||||
reset-gpios = <&qcom_pinmux 63 GPIO_ACTIVE_HIGH>;
|
||||
reset-post-delay-us = <12000>;
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
qca,ar8327-initvals = <
|
||||
|
||||
@ -12,6 +12,18 @@
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
/* eax500 routers reuse the pcie2 reset pin for switch reset pin */
|
||||
switch_reset: switch_reset_pins {
|
||||
mux {
|
||||
pins = "gpio63";
|
||||
function = "gpio";
|
||||
drive-strength = <12>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hs_phy_0 {
|
||||
status = "okay";
|
||||
};
|
||||
@ -46,10 +58,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
@ -173,6 +181,10 @@
|
||||
pinctrl-0 = <&mdio0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
/* Switch from documentation require at least 10ms for reset */
|
||||
reset-gpios = <&qcom_pinmux 63 GPIO_ACTIVE_HIGH>;
|
||||
reset-post-delay-us = <12000>;
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
qca,ar8327-initvals = <
|
||||
|
||||
@ -35,10 +35,14 @@ define Device/OnhubImage
|
||||
IMAGES := factory.bin sysupgrade.bin
|
||||
IMAGE/factory.bin := cros-gpt | append-kernel-part | append-rootfs
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
# Note: Chromium/Depthcharge-based bootloaders insert a reserved-memory
|
||||
# ramoops node into the Device Tree automatically, so we can use
|
||||
# kmod-ramoops.
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct e2fsprogs kmod-fs-ext4 losetup \
|
||||
partx-utils mkf2fs kmod-fs-f2fs \
|
||||
ucode kmod-google-firmware kmod-tpm-i2c-infineon \
|
||||
kmod-sound-soc-ipq8064-storm kmod-usb-storage
|
||||
kmod-sound-soc-ipq8064-storm kmod-usb-storage \
|
||||
kmod-ramoops
|
||||
endef
|
||||
|
||||
define Device/asus_onhub
|
||||
|
||||
@ -163,7 +163,6 @@ define Device/linksys_ea7500-v1
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi | pad-to $$$$(PAGESIZE)
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea7500-v1
|
||||
|
||||
@ -185,7 +184,6 @@ define Device/linksys_ea8500
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea8500
|
||||
|
||||
|
||||
@ -35,15 +35,7 @@
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
@@ -155,6 +156,7 @@
|
||||
function = "pcie3_rst";
|
||||
drive-strength = <12>;
|
||||
bias-disable;
|
||||
+ output-low;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -190,6 +192,7 @@
|
||||
@@ -190,6 +191,7 @@
|
||||
intc: interrupt-controller@2000000 {
|
||||
compatible = "qcom,msm-qgic2";
|
||||
interrupt-controller;
|
||||
@ -51,7 +43,7 @@
|
||||
#interrupt-cells = <3>;
|
||||
reg = <0x02000000 0x1000>,
|
||||
<0x02002000 0x1000>;
|
||||
@@ -219,21 +222,23 @@
|
||||
@@ -219,21 +221,23 @@
|
||||
acc0: clock-controller@2088000 {
|
||||
compatible = "qcom,kpss-acc-v1";
|
||||
reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
|
||||
@ -77,7 +69,7 @@
|
||||
reg = <0x02099000 0x1000>, <0x02009000 0x1000>;
|
||||
regulator;
|
||||
};
|
||||
@@ -251,7 +256,7 @@
|
||||
@@ -251,7 +255,7 @@
|
||||
|
||||
syscon-tcsr = <&tcsr>;
|
||||
|
||||
@ -86,7 +78,7 @@
|
||||
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
|
||||
reg = <0x12490000 0x1000>,
|
||||
<0x12480000 0x1000>;
|
||||
@@ -261,7 +266,7 @@
|
||||
@@ -261,7 +265,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -95,7 +87,7 @@
|
||||
compatible = "qcom,i2c-qup-v1.1.1";
|
||||
reg = <0x124a0000 0x1000>;
|
||||
interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>;
|
||||
@@ -326,7 +331,7 @@
|
||||
@@ -326,7 +330,7 @@
|
||||
|
||||
syscon-tcsr = <&tcsr>;
|
||||
|
||||
@ -104,7 +96,7 @@
|
||||
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
|
||||
reg = <0x1a240000 0x1000>,
|
||||
<0x1a200000 0x1000>;
|
||||
@@ -397,7 +402,7 @@
|
||||
@@ -397,7 +401,7 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -113,7 +105,7 @@
|
||||
compatible = "qcom,ipq806x-ahci", "generic-ahci";
|
||||
reg = <0x29000000 0x180>;
|
||||
|
||||
@@ -430,13 +435,35 @@
|
||||
@@ -430,13 +434,35 @@
|
||||
reg = <0x00700000 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@ -150,7 +142,7 @@
|
||||
};
|
||||
|
||||
tcsr: syscon@1a400000 {
|
||||
@@ -622,7 +649,7 @@
|
||||
@@ -622,7 +648,7 @@
|
||||
|
||||
gmac0: ethernet@37000000 {
|
||||
device_type = "network";
|
||||
@ -159,7 +151,7 @@
|
||||
reg = <0x37000000 0x200000>;
|
||||
interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
@@ -645,7 +672,7 @@
|
||||
@@ -645,7 +671,7 @@
|
||||
|
||||
gmac1: ethernet@37200000 {
|
||||
device_type = "network";
|
||||
@ -168,7 +160,7 @@
|
||||
reg = <0x37200000 0x200000>;
|
||||
interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
@@ -668,7 +695,7 @@
|
||||
@@ -668,7 +694,7 @@
|
||||
|
||||
gmac2: ethernet@37400000 {
|
||||
device_type = "network";
|
||||
@ -177,7 +169,7 @@
|
||||
reg = <0x37400000 0x200000>;
|
||||
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
@@ -691,7 +718,7 @@
|
||||
@@ -691,7 +717,7 @@
|
||||
|
||||
gmac3: ethernet@37600000 {
|
||||
device_type = "network";
|
||||
@ -186,7 +178,7 @@
|
||||
reg = <0x37600000 0x200000>;
|
||||
interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq";
|
||||
@@ -740,13 +767,13 @@
|
||||
@@ -740,13 +766,13 @@
|
||||
qcom,ee = <0>;
|
||||
};
|
||||
|
||||
@ -203,7 +195,7 @@
|
||||
status = "disabled";
|
||||
compatible = "arm,pl18x", "arm,primecell";
|
||||
arm,primecell-periphid = <0x00051180>;
|
||||
@@ -760,13 +787,12 @@
|
||||
@@ -760,13 +786,12 @@
|
||||
non-removable;
|
||||
cap-sd-highspeed;
|
||||
cap-mmc-highspeed;
|
||||
|
||||
@ -475,7 +475,7 @@
|
||||
qcom_pinmux: pinmux@800000 {
|
||||
compatible = "qcom,ipq8064-pinctrl";
|
||||
reg = <0x800000 0x4000>;
|
||||
@@ -160,6 +589,15 @@
|
||||
@@ -159,6 +588,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -491,7 +491,7 @@
|
||||
spi_pins: spi_pins {
|
||||
mux {
|
||||
pins = "gpio18", "gpio19", "gpio21";
|
||||
@@ -169,6 +607,53 @@
|
||||
@@ -168,6 +606,53 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -545,7 +545,7 @@
|
||||
leds_pins: leds_pins {
|
||||
mux {
|
||||
pins = "gpio7", "gpio8", "gpio9",
|
||||
@@ -231,6 +716,17 @@
|
||||
@@ -230,6 +715,17 @@
|
||||
clock-output-names = "acpu1_aux";
|
||||
};
|
||||
|
||||
@ -563,7 +563,7 @@
|
||||
saw0: regulator@2089000 {
|
||||
compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon";
|
||||
reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
|
||||
@@ -243,6 +739,52 @@
|
||||
@@ -242,6 +738,52 @@
|
||||
regulator;
|
||||
};
|
||||
|
||||
@ -616,7 +616,7 @@
|
||||
gsbi2: gsbi@12480000 {
|
||||
compatible = "qcom,gsbi-v1.0.0";
|
||||
cell-index = <2>;
|
||||
@@ -368,6 +910,33 @@
|
||||
@@ -367,6 +909,33 @@
|
||||
};
|
||||
};
|
||||
|
||||
@ -650,7 +650,7 @@
|
||||
gsbi7: gsbi@16600000 {
|
||||
status = "disabled";
|
||||
compatible = "qcom,gsbi-v1.0.0";
|
||||
@@ -389,6 +958,19 @@
|
||||
@@ -388,6 +957,19 @@
|
||||
clock-names = "core", "iface";
|
||||
status = "disabled";
|
||||
};
|
||||
@ -670,7 +670,7 @@
|
||||
};
|
||||
|
||||
sata_phy: sata-phy@1b400000 {
|
||||
@@ -478,6 +1060,95 @@
|
||||
@@ -477,6 +1059,95 @@
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
@ -766,7 +766,7 @@
|
||||
pcie0: pci@1b500000 {
|
||||
compatible = "qcom,pcie-ipq8064";
|
||||
reg = <0x1b500000 0x1000
|
||||
@@ -739,6 +1410,59 @@
|
||||
@@ -738,6 +1409,59 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -826,7 +826,7 @@
|
||||
vsdcc_fixed: vsdcc-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "SDCC Power";
|
||||
@@ -814,4 +1538,17 @@
|
||||
@@ -813,4 +1537,17 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -1163,7 +1163,7 @@
|
||||
@@ -1162,7 +1162,7 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */
|
||||
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
@@ -1214,7 +1214,7 @@
|
||||
@@ -1213,7 +1213,7 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
@ -35,7 +35,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */
|
||||
|
||||
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
||||
@@ -1265,7 +1265,7 @@
|
||||
@@ -1264,7 +1264,7 @@
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
|
||||
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
|
||||
@@ -1335,8 +1335,9 @@
|
||||
@@ -1334,8 +1334,9 @@
|
||||
clocks = <&gcc GMAC_CORE1_CLK>;
|
||||
clock-names = "stmmaceth";
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -1358,8 +1359,9 @@
|
||||
@@ -1357,8 +1358,9 @@
|
||||
clocks = <&gcc GMAC_CORE2_CLK>;
|
||||
clock-names = "stmmaceth";
|
||||
|
||||
@ -38,7 +38,7 @@ Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -1381,8 +1383,9 @@
|
||||
@@ -1380,8 +1382,9 @@
|
||||
clocks = <&gcc GMAC_CORE3_CLK>;
|
||||
clock-names = "stmmaceth";
|
||||
|
||||
@ -50,7 +50,7 @@ Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -1404,8 +1407,9 @@
|
||||
@@ -1403,8 +1406,9 @@
|
||||
clocks = <&gcc GMAC_CORE4_CLK>;
|
||||
clock-names = "stmmaceth";
|
||||
|
||||
|
||||
@ -171,6 +171,7 @@ define Device/zyxel_nbg7815
|
||||
IMAGES += factory.bin sysupgrade.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci e2fsprogs kmod-fs-ext4 losetup kmod-hwmon-tmp103
|
||||
DEVICE_PACKAGES := ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci e2fsprogs kmod-fs-ext4 losetup \
|
||||
kmod-hwmon-tmp103 kmod-bluetooth
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_nbg7815
|
||||
|
||||
559
target/linux/mediatek/dts/mt7622-netgear-wax206.dts
Normal file
559
target/linux/mediatek/dts/mt7622-netgear-wax206.dts
Normal file
@ -0,0 +1,559 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/* Copyright (c) 2022, Marcel Ziswiler <marcel@ziswiler.com> */
|
||||
|
||||
/dts-v1/;
|
||||
#include "mt7622.dtsi"
|
||||
#include "mt6380.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Netgear WAX206";
|
||||
compatible = "netgear,wax206", "mediatek,mt7622";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac0;
|
||||
led-boot = &led_power_r;
|
||||
led-failsafe = &led_power_r;
|
||||
led-running = &led_power_g;
|
||||
led-upgrade = &led_power_g;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512";
|
||||
};
|
||||
|
||||
cpus {
|
||||
cpu@0 {
|
||||
proc-supply = <&mt6380_vcpu_reg>;
|
||||
sram-supply = <&mt6380_vm_reg>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
proc-supply = <&mt6380_vcpu_reg>;
|
||||
sram-supply = <&mt6380_vm_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
gpios = <&pio 102 GPIO_ACTIVE_LOW>;
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power_r: power_red {
|
||||
default-state = "on";
|
||||
gpios = <&pio 3 GPIO_ACTIVE_LOW>;
|
||||
label = "power:red";
|
||||
};
|
||||
|
||||
led_power_g: power_green {
|
||||
default-state = "off";
|
||||
gpios = <&pio 4 GPIO_ACTIVE_LOW>;
|
||||
label = "power:green";
|
||||
};
|
||||
|
||||
inet_green {
|
||||
default-state = "off";
|
||||
gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
|
||||
label = "inet:green";
|
||||
};
|
||||
|
||||
inet_blue {
|
||||
default-state = "off";
|
||||
gpios = <&pio 17 GPIO_ACTIVE_LOW>;
|
||||
label = "inet:blue";
|
||||
};
|
||||
|
||||
wifin_green {
|
||||
default-state = "off";
|
||||
gpios = <&pio 85 GPIO_ACTIVE_LOW>;
|
||||
label = "wifin:green";
|
||||
};
|
||||
|
||||
wifin_blue {
|
||||
default-state = "off";
|
||||
gpios = <&pio 86 GPIO_ACTIVE_LOW>;
|
||||
label = "wifin:blue";
|
||||
};
|
||||
|
||||
wifia_green {
|
||||
default-state = "off";
|
||||
gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
|
||||
label = "wifia:green";
|
||||
};
|
||||
|
||||
wifia_blue {
|
||||
default-state = "off";
|
||||
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||
label = "wifia:blue";
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0 0x40000000 0 0x40000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&bch {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&btif {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cir {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&irrx_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <ð_pins>;
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
nvmem-cells = <&macaddr_factory_7fff4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
phy-mode = "2500base-x";
|
||||
reg = <0>;
|
||||
|
||||
fixed-link {
|
||||
full-duplex;
|
||||
pause;
|
||||
speed = <2500>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
switch@0 {
|
||||
compatible = "mediatek,mt7531";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0>;
|
||||
reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@1 {
|
||||
label = "lan1";
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
port@2 {
|
||||
label = "lan2";
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
port@3 {
|
||||
label = "lan3";
|
||||
reg = <3>;
|
||||
};
|
||||
|
||||
port@4 {
|
||||
label = "lan4";
|
||||
reg = <4>;
|
||||
};
|
||||
|
||||
wan: port@5 {
|
||||
label = "wan";
|
||||
nvmem-cells = <&macaddr_factory_7fffa>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
phy-handle = <&rtl8221b_phy>;
|
||||
phy-mode = "sgmii";
|
||||
reg = <5>;
|
||||
};
|
||||
|
||||
port@6 {
|
||||
ethernet = <&gmac0>;
|
||||
label = "cpu";
|
||||
phy-mode = "2500base-x";
|
||||
reg = <6>;
|
||||
|
||||
fixed-link {
|
||||
full-duplex;
|
||||
pause;
|
||||
speed = <2500>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rtl8221b_phy: ethernet-phy@7 {
|
||||
compatible = "ethernet-phy-id001c.c849";
|
||||
reg = <7>;
|
||||
reset-gpios = <&pio 101 GPIO_ACTIVE_LOW>;
|
||||
interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reset-assert-us = <100000>;
|
||||
reset-deassert-us = <100000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
eth_pins: eth-pins {
|
||||
mux {
|
||||
function = "eth";
|
||||
groups = "mdc_mdio", "rgmii_via_gmac2";
|
||||
};
|
||||
};
|
||||
|
||||
irrx_pins: irrx-pins {
|
||||
mux {
|
||||
function = "ir";
|
||||
groups = "ir_1_rx";
|
||||
};
|
||||
};
|
||||
|
||||
irtx_pins: irtx-pins {
|
||||
mux {
|
||||
function = "ir";
|
||||
groups = "ir_1_tx";
|
||||
};
|
||||
};
|
||||
|
||||
pcie0_pins: pcie0-pins {
|
||||
mux {
|
||||
function = "pcie";
|
||||
groups = "pcie0_pad_perst",
|
||||
"pcie0_1_waken",
|
||||
"pcie0_1_clkreq";
|
||||
};
|
||||
};
|
||||
|
||||
pcie1_pins: pcie1-pins {
|
||||
mux {
|
||||
function = "pcie";
|
||||
groups = "pcie1_pad_perst",
|
||||
"pcie1_0_waken",
|
||||
"pcie1_0_clkreq";
|
||||
};
|
||||
};
|
||||
|
||||
pmic_bus_pins: pmic-bus-pins {
|
||||
mux {
|
||||
function = "pmic";
|
||||
groups = "pmic_bus";
|
||||
};
|
||||
};
|
||||
|
||||
pwm7_pins: pwm1-2-pins {
|
||||
mux {
|
||||
function = "pwm";
|
||||
groups = "pwm_ch7_2";
|
||||
};
|
||||
};
|
||||
|
||||
wled_pins: wled-pins {
|
||||
mux {
|
||||
function = "led";
|
||||
groups = "wled";
|
||||
};
|
||||
};
|
||||
|
||||
/* Serial NAND is shared pin with SPI-NOR */
|
||||
serial_nand_pins: serial-nand-pins {
|
||||
mux {
|
||||
function = "flash";
|
||||
groups = "snfi";
|
||||
};
|
||||
};
|
||||
|
||||
spic0_pins: spic0-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spic0_0";
|
||||
};
|
||||
};
|
||||
|
||||
spic1_pins: spic1-pins {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spic1_0";
|
||||
};
|
||||
};
|
||||
|
||||
uart0_pins: uart0-pins {
|
||||
mux {
|
||||
function = "uart";
|
||||
groups = "uart0_0_tx_rx";
|
||||
};
|
||||
};
|
||||
|
||||
uart2_pins: uart2-pins {
|
||||
mux {
|
||||
function = "uart";
|
||||
groups = "uart2_1_tx_rx";
|
||||
};
|
||||
};
|
||||
|
||||
watchdog_pins: watchdog-pins {
|
||||
mux {
|
||||
function = "watchdog";
|
||||
groups = "watchdog";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm7_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwrap {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_bus_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rtc {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&sata {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&sata_phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&slot0 {
|
||||
wmac1: mt7915@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&snfi {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&serial_nand_pins>;
|
||||
status = "okay";
|
||||
|
||||
snand: flash@0 {
|
||||
compatible = "spi-nand";
|
||||
mediatek,bmt-table-size = <0x1000>;
|
||||
mediatek,bmt-v2;
|
||||
nand-ecc-engine = <&snfi>;
|
||||
reg = <0>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-tx-bus-width = <4>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "Preloader";
|
||||
reg = <0x00000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "ATF";
|
||||
reg = <0x80000 0x0040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@c0000 {
|
||||
label = "Bootloader";
|
||||
reg = <0xc0000 0x0080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@140000 {
|
||||
label = "Config";
|
||||
reg = <0x140000 0x0080000>;
|
||||
};
|
||||
|
||||
factory: partition@1c0000 {
|
||||
compatible = "nvmem-cells";
|
||||
label = "Factory";
|
||||
reg = <0x1c0000 0x0100000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
read-only;
|
||||
|
||||
macaddr_factory_7fff4: macaddr@7fff4 {
|
||||
reg = <0x7fff4 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_7fffa: macaddr@7fffa {
|
||||
reg = <0x7fffa 0x6>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@2c0000 {
|
||||
label = "firmware";
|
||||
reg = <0x2c0000 0x2600000>;
|
||||
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "kernel";
|
||||
reg = <0x0 0x600000>;
|
||||
};
|
||||
|
||||
partition@600000 {
|
||||
label = "ubi";
|
||||
reg = <0x600000 0x2000000>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@28c0000 {
|
||||
label = "firmware_backup";
|
||||
reg = <0x28c0000 0x2600000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@4ec0000 {
|
||||
label = "CFG";
|
||||
reg = <0x4ec0000 0x800000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@56c0000 {
|
||||
label = "RAE";
|
||||
reg = <0x56c0000 0x400000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@5ac0000 {
|
||||
label = "POT";
|
||||
reg = <0x5ac0000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@5bc0000 {
|
||||
label = "Language";
|
||||
reg = <0x5bc0000 0x400000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@5fc0000 {
|
||||
label = "Traffic";
|
||||
reg = <0x5fc0000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@61c0000 {
|
||||
label = "Cert";
|
||||
reg = <0x61c0000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@62c0000 {
|
||||
label = "NTGRcryptK";
|
||||
reg = <0x62c0000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@63c0000 {
|
||||
label = "NTGRcryptD";
|
||||
reg = <0x63c0000 0x500000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@68c0000 {
|
||||
label = "LOG";
|
||||
reg = <0x68c0000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@69c0000 {
|
||||
label = "User_data";
|
||||
reg = <0x69c0000 0x640000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spic0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spic1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ssusb {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&u3phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&watchdog_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
mediatek,mtd-eeprom = <&factory 0x0000>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac1 {
|
||||
mediatek,mtd-eeprom = <&factory 0x05000>;
|
||||
};
|
||||
@ -228,6 +228,33 @@ define Device/mediatek_mt7622-rfb1-ubi
|
||||
endef
|
||||
TARGET_DEVICES += mediatek_mt7622-rfb1-ubi
|
||||
|
||||
define Device/netgear_wax206
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := WAX206
|
||||
DEVICE_DTS := mt7622-netgear-wax206
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
NETGEAR_ENC_MODEL := WAX206
|
||||
NETGEAR_ENC_REGION := US
|
||||
DEVICE_PACKAGES := kmod-mt7915-firmware
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 6144k
|
||||
IMAGE_SIZE := 32768k
|
||||
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \
|
||||
append-squashfs4-fakeroot
|
||||
# recovery can also be used with stock firmware web-ui, hence the padding...
|
||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 128k
|
||||
KERNEL_INITRAMFS_SUFFIX := -recovery.itb
|
||||
IMAGES += factory.img
|
||||
IMAGE/factory.img := append-kernel | pad-to $$(KERNEL_SIZE) | \
|
||||
append-ubi | check-size | netgear-encrypted-factory
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += netgear_wax206
|
||||
|
||||
define Device/ruijie_rg-ew3200gx-pro
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := RG-EW3200GX PRO
|
||||
|
||||
@ -7,7 +7,8 @@ board_config_update
|
||||
|
||||
case $board in
|
||||
linksys,e8450|\
|
||||
linksys,e8450-ubi)
|
||||
linksys,e8450-ubi|\
|
||||
netgear,wax206)
|
||||
ucidef_set_led_netdev "wan" "WAN" "inet:blue" "wan"
|
||||
;;
|
||||
xiaomi,redmi-router-ax6s)
|
||||
|
||||
@ -14,6 +14,7 @@ mediatek_setup_interfaces()
|
||||
linksys,e8450-ubi|\
|
||||
mediatek,mt7622-rfb1|\
|
||||
mediatek,mt7622-rfb1-ubi|\
|
||||
netgear,wax206|\
|
||||
reyee,ax3200-e5|\
|
||||
ruijie,rg-ew3200gx-pro)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
|
||||
|
||||
@ -35,6 +35,7 @@ platform_do_upgrade() {
|
||||
;;
|
||||
elecom,wrc-x3200gst3|\
|
||||
mediatek,mt7622-rfb1-ubi|\
|
||||
netgear,wax206|\
|
||||
totolink,a8000ru|\
|
||||
xiaomi,redmi-router-ax6s)
|
||||
nand_do_upgrade "$1"
|
||||
@ -71,6 +72,7 @@ platform_check_image() {
|
||||
;;
|
||||
elecom,wrc-x3200gst3|\
|
||||
mediatek,mt7622-rfb1-ubi|\
|
||||
netgear,wax206|\
|
||||
totolink,a8000ru|\
|
||||
xiaomi,redmi-router-ax6s)
|
||||
nand_do_platform_check "$board" "$1"
|
||||
|
||||
@ -10,8 +10,7 @@ BOARDNAME:=MediaTek Ralink MIPS
|
||||
SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883
|
||||
FEATURES:=squashfs gpio
|
||||
|
||||
KERNEL_PATCHVER:=5.10
|
||||
KERNEL_TESTING_PATCHVER:=5.15
|
||||
KERNEL_PATCHVER:=5.15
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for Ralink RT288x/RT3xxx based boards.
|
||||
|
||||
228
target/linux/ramips/dts/mt7620a_engenius_epg600.dts
Normal file
228
target/linux/ramips/dts/mt7620a_engenius_epg600.dts
Normal file
@ -0,0 +1,228 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7620a.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "engenius,epg600", "ralink,mt7620a-soc";
|
||||
model = "EnGenius EPG600";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
reg {
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
label = "amber:power";
|
||||
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "blue:wlan2g";
|
||||
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
wlan5g {
|
||||
label = "blue:wlan5g";
|
||||
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wps2g {
|
||||
label = "blue:wps2g";
|
||||
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wps5g {
|
||||
label = "amber:wps5g";
|
||||
gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
line {
|
||||
label = "blue:line";
|
||||
gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <30000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
};
|
||||
|
||||
factory: partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
rf: partition@50000 {
|
||||
label = "rf";
|
||||
reg = <0x50000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
label = "firmware";
|
||||
reg = <0x60000 0xf40000>;
|
||||
compatible = "denx,uimage";
|
||||
};
|
||||
|
||||
partition@fa0000 {
|
||||
label = "backup";
|
||||
reg = <0xfa0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@fb0000 {
|
||||
label = "storage";
|
||||
reg = <0xfb0000 0x50000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mdio_pins &rgmii1_pins &rgmii2_pins>;
|
||||
|
||||
nvmem-cells = <&macaddr_rf_4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
port@5 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "rgmii-txid";
|
||||
|
||||
mediatek,fixed-link = <1000 1 1 1>;
|
||||
};
|
||||
|
||||
mdio-bus {
|
||||
status = "okay";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
phy-mode = "rgmii";
|
||||
|
||||
qca,ar8327-initvals = <
|
||||
0x04 0x07600000 /* PORT0 PAD MODE CTRL */
|
||||
0x08 0x01000000 /* PORT5 PAD MODE CTRL */
|
||||
0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
|
||||
0x10 0x40000000 /* POWER-ON STRAPPING */
|
||||
0x7c 0x0000007e /* PORT0_STATUS */
|
||||
0x94 0x0000007e /* PORT6_STATUS */
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gsw {
|
||||
mediatek,ephy-disable;
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,1,0 {
|
||||
compatible = "pci1814,3091";
|
||||
reg = <0x0 1 0 0 0>;
|
||||
ralink,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
ralink,mtd-eeprom = <&rf 0x0>;
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&state_default {
|
||||
default {
|
||||
groups = "ephy", "wled", "spi refclk", "i2c", "uartf", "nd_sd";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&rf {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_rf_4: macaddr@4 {
|
||||
reg = <0x4 0x6>;
|
||||
};
|
||||
};
|
||||
@ -158,7 +158,7 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
|
||||
185
target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
Normal file
185
target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
Normal file
@ -0,0 +1,185 @@
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "huasifei,ws1208v2", "mediatek,mt7621-soc";
|
||||
model = "Huasifei WS1208V2";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status;
|
||||
led-failsafe = &led_status;
|
||||
led-running = &led_status;
|
||||
led-upgrade = &led_status;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-reset {
|
||||
label = "Reset";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status: led-status {
|
||||
label = "green:status";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-cellular {
|
||||
label = "green:cellular";
|
||||
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-wlan5g {
|
||||
label = "green:wlan5g";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
led-wlan2g {
|
||||
label = "green:wlan2g";
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
led-usb {
|
||||
label = "green:usb";
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||
trigger-sources = <&xhci_ehci_port1>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <10000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_e000: macaddr@e000 {
|
||||
reg = <0xe000 0x6>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
reg = <0x50000 0xfb0000>;
|
||||
label = "firmware";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "pci14c3,7603";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0000>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "pci14c3,7662";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
|
||||
led {
|
||||
led-sources = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy4>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "okay";
|
||||
label = "lan4";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -61,26 +61,20 @@ static irqreturn_t gsw_interrupt_mt7620(int irq, void *_priv)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void mt7620_hw_init(struct mt7620_gsw *gsw)
|
||||
static void mt7620_ephy_init(struct mt7620_gsw *gsw)
|
||||
{
|
||||
u32 i;
|
||||
u32 val;
|
||||
u32 is_BGA = (rt_sysc_r32(SYSC_REG_CHIP_REV_ID) >> 16) & 1;
|
||||
|
||||
/* Internal ethernet requires PCIe RC mode */
|
||||
rt_sysc_w32(rt_sysc_r32(SYSC_REG_CFG1) | PCIE_RC_MODE, SYSC_REG_CFG1);
|
||||
|
||||
mtk_switch_w32(gsw, mtk_switch_r32(gsw, GSW_REG_CKGCR) & ~(0x3 << 4), GSW_REG_CKGCR);
|
||||
|
||||
/* Enable MIB stats */
|
||||
mtk_switch_w32(gsw, mtk_switch_r32(gsw, GSW_REG_MIB_CNT_EN) | (1 << 1), GSW_REG_MIB_CNT_EN);
|
||||
|
||||
if (gsw->ephy_disable) {
|
||||
mtk_switch_w32(gsw, mtk_switch_r32(gsw, GSW_REG_GPC1) |
|
||||
(gsw->ephy_base << 16) | (0x1f << 24),
|
||||
GSW_REG_GPC1);
|
||||
|
||||
pr_info("gsw: internal ephy disabled\n");
|
||||
|
||||
return;
|
||||
} else if (gsw->ephy_base) {
|
||||
mtk_switch_w32(gsw, mtk_switch_r32(gsw, GSW_REG_GPC1) |
|
||||
(gsw->ephy_base << 16),
|
||||
@ -158,12 +152,6 @@ static void mt7620_hw_init(struct mt7620_gsw *gsw)
|
||||
_mt7620_mii_write(gsw, gsw->ephy_base + 2, 16, 0x1515);
|
||||
_mt7620_mii_write(gsw, gsw->ephy_base + 3, 16, 0x0f0f);
|
||||
|
||||
/* CPU Port6 Force Link 1G, FC ON */
|
||||
mtk_switch_w32(gsw, 0x5e33b, GSW_REG_PORT_PMCR(6));
|
||||
|
||||
/* Set Port 6 as CPU Port */
|
||||
mtk_switch_w32(gsw, 0x7f7f7fe0, 0x0010);
|
||||
|
||||
/* setup port 4 */
|
||||
if (gsw->port4_ephy) {
|
||||
val = rt_sysc_r32(SYSC_REG_CFG1);
|
||||
@ -177,6 +165,24 @@ static void mt7620_hw_init(struct mt7620_gsw *gsw)
|
||||
}
|
||||
}
|
||||
|
||||
static void mt7620_mac_init(struct mt7620_gsw *gsw)
|
||||
{
|
||||
/* Internal ethernet requires PCIe RC mode */
|
||||
rt_sysc_w32(rt_sysc_r32(SYSC_REG_CFG1) | PCIE_RC_MODE, SYSC_REG_CFG1);
|
||||
|
||||
/* Keep Global Clocks on Idle traffic */
|
||||
mtk_switch_w32(gsw, mtk_switch_r32(gsw, GSW_REG_CKGCR) & ~(0x3 << 4), GSW_REG_CKGCR);
|
||||
|
||||
/* Set Port 6 to Force Link 1G, Flow Control ON */
|
||||
mtk_switch_w32(gsw, 0x5e33b, GSW_REG_PORT_PMCR(6));
|
||||
|
||||
/* Set Port 6 as CPU Port */
|
||||
mtk_switch_w32(gsw, 0x7f7f7fe0, 0x0010);
|
||||
|
||||
/* Enable MIB stats */
|
||||
mtk_switch_w32(gsw, mtk_switch_r32(gsw, GSW_REG_MIB_CNT_EN) | (1 << 1), GSW_REG_MIB_CNT_EN);
|
||||
}
|
||||
|
||||
static const struct of_device_id mediatek_gsw_match[] = {
|
||||
{ .compatible = "mediatek,mt7620-gsw" },
|
||||
{},
|
||||
@ -222,7 +228,9 @@ int mtk_gsw_init(struct fe_priv *priv)
|
||||
else
|
||||
gsw->ephy_base = 0;
|
||||
|
||||
mt7620_hw_init(gsw);
|
||||
mt7620_mac_init(gsw);
|
||||
|
||||
mt7620_ephy_init(gsw);
|
||||
|
||||
if (gsw->irq) {
|
||||
request_irq(gsw->irq, gsw_interrupt_mt7620, 0,
|
||||
|
||||
@ -446,6 +446,21 @@ define Device/elecom_wrh-300cr
|
||||
endef
|
||||
TARGET_DEVICES += elecom_wrh-300cr
|
||||
|
||||
define Device/engenius_epg600
|
||||
$(Device/uimage-lzma-loader)
|
||||
SOC := mt7620a
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := 15616k
|
||||
IMAGES += factory.dlf
|
||||
IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size | \
|
||||
senao-header -r 0x101 -p 0x6a -t 2
|
||||
DEVICE_VENDOR := EnGenius
|
||||
DEVICE_MODEL := EPG600
|
||||
DEVICE_PACKAGES += kmod-rt2800-pci kmod-usb-storage \
|
||||
kmod-usb-ohci kmod-usb2 uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += engenius_epg600
|
||||
|
||||
define Device/engenius_esr600
|
||||
SOC := mt7620a
|
||||
BLOCKSIZE := 64k
|
||||
|
||||
@ -343,13 +343,11 @@ define Device/asus_rt-ax54
|
||||
DEVICE_VENDOR := ASUS
|
||||
DEVICE_MODEL := RT-AX54
|
||||
DEVICE_ALT0_VENDOR := ASUS
|
||||
DEVICE_ALT0_MODEL := RT-AX54
|
||||
DEVICE_ALT0_MODEL := RT-AX54HP
|
||||
DEVICE_ALT1_VENDOR := ASUS
|
||||
DEVICE_ALT1_MODEL := RT-AX54HP
|
||||
DEVICE_ALT1_MODEL := RT-AX1800HP
|
||||
DEVICE_ALT2_VENDOR := ASUS
|
||||
DEVICE_ALT2_MODEL := RT-AX1800HP
|
||||
DEVICE_ALT3_VENDOR := ASUS
|
||||
DEVICE_ALT3_MODEL := RT-AX1800S
|
||||
DEVICE_ALT2_MODEL := RT-AX1800S
|
||||
IMAGE_SIZE := 51200k
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
@ -1072,6 +1070,18 @@ define Device/humax_e10
|
||||
endef
|
||||
TARGET_DEVICES += humax_e10
|
||||
|
||||
define Device/huasifei_ws1208v2
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_VENDOR := Huasifei
|
||||
DEVICE_MODEL := WS1208V2
|
||||
DEVICE_PACKAGES := kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
|
||||
kmod-usb3 kmod-usb-net-cdc-mbim kmod-usb-net-qmi-wwan \
|
||||
kmod-usb-serial-option
|
||||
endef
|
||||
TARGET_DEVICES += huasifei_ws1208v2
|
||||
|
||||
define Device/iodata_wn-ax1167gr
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
|
||||
@ -149,6 +149,7 @@ ramips_setup_interfaces()
|
||||
ucidef_add_switch "switch1" \
|
||||
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
|
||||
;;
|
||||
engenius,epg600|\
|
||||
engenius,esr600|\
|
||||
lava,lr-25g001|\
|
||||
sitecom,wlr-4100-v1-002)
|
||||
@ -332,9 +333,11 @@ ramips_setup_macs()
|
||||
edimax,br-6478ac-v2)
|
||||
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 2)
|
||||
;;
|
||||
engenius,epg600|\
|
||||
engenius,esr600)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
glinet,gl-mt300a|\
|
||||
glinet,gl-mt300n|\
|
||||
|
||||
@ -93,6 +93,9 @@ dlink,dir-882-r1)
|
||||
gnubee,gb-pc2)
|
||||
ucidef_set_led_netdev "ethyellow" "ethyellow" "orange:ethyellow" "ethyellow" "link tx rx"
|
||||
;;
|
||||
huasifei,ws1208v2)
|
||||
ucidef_set_led_netdev "wwan0" "wwan0" "green:cellular" "wwan0" "link tx rx"
|
||||
;;
|
||||
keenetic,kn-3010)
|
||||
ucidef_set_led_netdev "internet" "internet" "green:internet" "wan"
|
||||
;;
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
From 0cb2a8f3456ff1cc51d571e287a48e8fddc98ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
|
||||
Date: Sat, 31 Dec 2022 08:40:41 +0100
|
||||
Subject: PCI: mt7621: Delay phy ports initialization
|
||||
|
||||
Some devices like ZBT WE1326 and ZBT WF3526-P and some Netgear models need
|
||||
to delay phy port initialization after calling the mt7621_pcie_init_port()
|
||||
driver function to get into reliable boots for both warm and hard resets.
|
||||
|
||||
The delay required to detect the ports seems to be in the range [75-100]
|
||||
milliseconds.
|
||||
|
||||
If the ports are not detected the controller is not functional.
|
||||
|
||||
There is no datasheet or something similar to really understand why this
|
||||
extra delay is needed only for these devices and it is not for most of
|
||||
the boards that are built on mt7621 SoC.
|
||||
|
||||
This issue has been reported by openWRT community and the complete
|
||||
discussion is in [0]. The 100 milliseconds delay has been tested in all
|
||||
devices to validate it.
|
||||
|
||||
Add the extra 100 milliseconds delay to fix the issue.
|
||||
|
||||
[0]: https://github.com/openwrt/openwrt/pull/11220
|
||||
|
||||
Link: https://lore.kernel.org/r/20221231074041.264738-1-sergio.paracuellos@gmail.com
|
||||
Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
|
||||
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
|
||||
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
|
||||
---
|
||||
drivers/staging/mt7621-pci/pci-mt7621.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
|
||||
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
|
||||
@@ -86,6 +86,7 @@
|
||||
#define MEMORY_BASE 0x0
|
||||
#define PERST_MODE_MASK GENMASK(11, 10)
|
||||
#define PERST_MODE_GPIO BIT(10)
|
||||
+#define INIT_PORTS_DELAY_MS 100
|
||||
#define PERST_DELAY_MS 100
|
||||
|
||||
/**
|
||||
@@ -521,6 +522,7 @@ static void mt7621_pcie_init_ports(struc
|
||||
}
|
||||
}
|
||||
|
||||
+ msleep(INIT_PORTS_DELAY_MS);
|
||||
mt7621_pcie_reset_ep_deassert(pcie);
|
||||
|
||||
tmp = NULL;
|
||||
@ -0,0 +1,52 @@
|
||||
From 0cb2a8f3456ff1cc51d571e287a48e8fddc98ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
|
||||
Date: Sat, 31 Dec 2022 08:40:41 +0100
|
||||
Subject: PCI: mt7621: Delay phy ports initialization
|
||||
|
||||
Some devices like ZBT WE1326 and ZBT WF3526-P and some Netgear models need
|
||||
to delay phy port initialization after calling the mt7621_pcie_init_port()
|
||||
driver function to get into reliable boots for both warm and hard resets.
|
||||
|
||||
The delay required to detect the ports seems to be in the range [75-100]
|
||||
milliseconds.
|
||||
|
||||
If the ports are not detected the controller is not functional.
|
||||
|
||||
There is no datasheet or something similar to really understand why this
|
||||
extra delay is needed only for these devices and it is not for most of
|
||||
the boards that are built on mt7621 SoC.
|
||||
|
||||
This issue has been reported by openWRT community and the complete
|
||||
discussion is in [0]. The 100 milliseconds delay has been tested in all
|
||||
devices to validate it.
|
||||
|
||||
Add the extra 100 milliseconds delay to fix the issue.
|
||||
|
||||
[0]: https://github.com/openwrt/openwrt/pull/11220
|
||||
|
||||
Link: https://lore.kernel.org/r/20221231074041.264738-1-sergio.paracuellos@gmail.com
|
||||
Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
|
||||
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
|
||||
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
|
||||
---
|
||||
drivers/pci/controller/pcie-mt7621.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/pci/controller/pcie-mt7621.c
|
||||
+++ b/drivers/pci/controller/pcie-mt7621.c
|
||||
@@ -58,6 +58,7 @@
|
||||
#define PCIE_PORT_LINKUP BIT(0)
|
||||
#define PCIE_PORT_CNT 3
|
||||
|
||||
+#define INIT_PORTS_DELAY_MS 100
|
||||
#define PERST_DELAY_MS 100
|
||||
|
||||
/**
|
||||
@@ -374,6 +375,7 @@ static int mt7621_pcie_init_ports(struct
|
||||
}
|
||||
}
|
||||
|
||||
+ msleep(INIT_PORTS_DELAY_MS);
|
||||
mt7621_pcie_reset_ep_deassert(pcie);
|
||||
|
||||
tmp = NULL;
|
||||
@ -21,7 +21,7 @@ Submitted-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/drivers/net/phy/phylink.c
|
||||
+++ b/drivers/net/phy/phylink.c
|
||||
@@ -1944,6 +1944,11 @@ int phylink_ethtool_ksettings_set(struct
|
||||
@@ -1943,6 +1943,11 @@ int phylink_ethtool_ksettings_set(struct
|
||||
* the presence of a PHY, this should not be changed as that
|
||||
* should be determined from the media side advertisement.
|
||||
*/
|
||||
@ -33,7 +33,7 @@ Submitted-by: John Crispin <john@phrozen.org>
|
||||
return phy_ethtool_ksettings_set(pl->phydev, kset);
|
||||
}
|
||||
|
||||
@@ -2247,8 +2252,11 @@ int phylink_ethtool_get_eee(struct phyli
|
||||
@@ -2246,8 +2251,11 @@ int phylink_ethtool_get_eee(struct phyli
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
@ -46,7 +46,7 @@ Submitted-by: John Crispin <john@phrozen.org>
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2265,8 +2273,11 @@ int phylink_ethtool_set_eee(struct phyli
|
||||
@@ -2264,8 +2272,11 @@ int phylink_ethtool_set_eee(struct phyli
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_LZO_TOOLS),y) += lzop
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_TOOLCHAIN),y) += gmp mpc mpfr
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_EFI_IMAGES),y) += gptfdisk popt
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini),y) += genext2fs
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_ath79),y) += lzma-old squashfs
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_ath79),y) += lzma-old squashfs3-lzma
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_mxs),y) += elftosb sdimage
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_realtek),y) += 7z
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_tegra),y) += cbootimage cbootimage-configs
|
||||
@ -118,7 +118,7 @@ $(curdir)/patchelf/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/pkgconf/compile := $(curdir)/meson/compile
|
||||
$(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile
|
||||
$(curdir)/sdcc/compile := $(curdir)/bison/compile
|
||||
$(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
|
||||
$(curdir)/squashfs3-lzma/compile := $(curdir)/lzma-old/compile
|
||||
$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
|
||||
$(curdir)/zstd/compile := $(curdir)/meson/compile
|
||||
|
||||
|
||||
@ -6,16 +6,21 @@
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=squashfs
|
||||
PKG_NAME:=squashfs3-lzma
|
||||
PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
|
||||
PKG_VERSION:=3.0
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/squashfs
|
||||
PKG_HASH:=39dbda43cf118536deb746c7730b468702d514a19f4cfab73b710e32908ddf20
|
||||
PKG_CAT:=zcat
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
|
||||
# Tar directory is squashfs3.0 that conflict with any pattern
|
||||
# currently using for host tools. (PKG_NAME-PKG_VERSION)
|
||||
# Also this got renamed to a more correct name
|
||||
# from squashfs to squashfs3-lzma.
|
||||
# Use tar transform to rename the root directory to this new
|
||||
# name.
|
||||
TAR_OPTIONS+=--transform=s/^squashfs/$(PKG_NAME)-/
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
@ -29,13 +34,13 @@ define Host/Compile
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR_HOST)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs-lzma $(STAGING_DIR_HOST)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR_HOST)/bin/mksquashfs3-lzma
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs-lzma $(STAGING_DIR_HOST)/bin/unsquashfs3-lzma
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/mksquashfs-lzma
|
||||
rm -f $(STAGING_DIR_HOST)/bin/unsquashfs-lzma
|
||||
rm -f $(STAGING_DIR_HOST)/bin/mksquashfs3-lzma
|
||||
rm -f $(STAGING_DIR_HOST)/bin/unsquashfs3-lzma
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
@ -1,11 +1,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zstd
|
||||
PKG_VERSION:=1.5.2
|
||||
PKG_VERSION:=1.5.4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/facebook/zstd/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0
|
||||
PKG_HASH:=0f470992aedad543126d06efab344dc5f3e171893810455787d38347343a4424
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@ -22,7 +22,7 @@ MESON_HOST_ARGS += \
|
||||
-Ddefault_library=static \
|
||||
-Dlegacy_level=7 \
|
||||
-Ddebug_level=0 \
|
||||
-Dbacktrace=false \
|
||||
-Dbacktrace=disabled \
|
||||
-Dstatic_runtime=false \
|
||||
-Dbin_programs=true \
|
||||
-Dbin_tests=false \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user