Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-10-12 12:29:11 +08:00
commit b70615664a
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
226 changed files with 16678 additions and 3384 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .146
LINUX_KERNEL_HASH-5.10.146 = 7bbd97f3278eadb73c19a1ca8c1a655c60afcee9f487b910063cdd15e9ee6dc1
LINUX_VERSION-5.10 = .147
LINUX_KERNEL_HASH-5.10.147 = 85253abf097eb5013b988a400eb022eed0e0626e7e0a7daa3ab4b6bcabbced9a

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .71
LINUX_KERNEL_HASH-5.15.71 = 5f5408138e016c0e029e015d98ceab86f4e6366c65cd611259dac808ab1d1e53
LINUX_VERSION-5.15 = .72
LINUX_KERNEL_HASH-5.15.72 = 6090323b5b471ae9d3bbc0058966113609f5bbd22fa19a76df32a8abc52f07ab

View File

@ -58,7 +58,7 @@
+CONFIG_CMD_LINK_LOCAL=y
+# CONFIG_CMD_MBR is not set
+CONFIG_CMD_MTD=y
+CONFIG_CMD_MTDPART=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_PING=y

View File

@ -64,7 +64,7 @@
+CONFIG_CMD_LINK_LOCAL=y
+# CONFIG_CMD_MBR is not set
+CONFIG_CMD_MTD=y
+CONFIG_CMD_MTDPART=y
+CONFIG_CMD_MTDPARTS=y
+# CONFIG_CMD_PCI is not set
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_PING=y

View File

@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git
PKG_SOURCE_DATE:=2022-05-17
PKG_SOURCE_VERSION:=b5b2ba09c4f1c8b3c21580aea7223edc2f5e92be
PKG_MIRROR_HASH:=b957d56aa8c2e7b55184111be69eb8dea734f1feba19e670a91f302459a48a78
PKG_SOURCE_DATE:=2022-05-23
PKG_SOURCE_VERSION:=28c44ca97cd546ef8168e7476472a0da022b3421
PKG_MIRROR_HASH:=66151ac44d70510d9320b6c0e002a3c43c787c2d756d1eaaa3b84b12edd34af5
CMAKE_INSTALL:=1
PKG_LICENSE:=LGPL-2.1

View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
PKG_RELEASE:=18
PKG_RELEASE:=19
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git

View File

@ -105,6 +105,7 @@ proto_dhcpv6_setup() {
[ -n "$iface_464xlat" ] && proto_export "IFACE_464XLAT=$iface_464xlat"
[ "$delegate" = "0" ] && proto_export "IFACE_DSLITE_DELEGATE=0"
[ "$delegate" = "0" ] && proto_export "IFACE_MAP_DELEGATE=0"
[ "$delegate" = "0" ] && proto_export "IFACE_464XLAT_DELEGATE=0"
[ -n "$zone_dslite" ] && proto_export "ZONE_DSLITE=$zone_dslite"
[ -n "$zone_map" ] && proto_export "ZONE_MAP=$zone_map"
[ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat"

View File

@ -34,7 +34,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
mtd->type = MTD_NORFLASH;
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -849,6 +849,17 @@ out_error:
@@ -851,6 +851,17 @@ out_error:
*/
static void mtd_set_dev_defaults(struct mtd_info *mtd)
{

View File

@ -34,7 +34,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
mtd->type = MTD_NORFLASH;
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -849,6 +849,17 @@ out_error:
@@ -851,6 +851,17 @@ out_error:
*/
static void mtd_set_dev_defaults(struct mtd_info *mtd)
{

View File

@ -58,7 +58,7 @@ Submitted-by: Christopher Hill <ch6574@gmail.com>
+ Routerboard RB4xx series.
+
config SGI_MFD_IOC3
bool "SGI IOC3 core driver"
bool "SGI IOC3 core driver"
depends on PCI && MIPS && 64BIT
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile

View File

@ -44,8 +44,8 @@ Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
tristate "Xylon LogiCVC GPIO support"
depends on MFD_SYSCON && OF
@@ -529,6 +536,10 @@ config GPIO_ROCKCHIP
help
Say yes here to support GPIO on Rockchip SoCs.
help
Say yes here to support GPIO on Rockchip SoCs.
+config GPIO_RB91X_KEY
+ tristate "MikroTik RB91x board series reset key support"

View File

@ -40,7 +40,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
for_each_subsys(ss, ssid) {
if (ss->early_init) {
struct cgroup_subsys_state *css =
@@ -6497,6 +6506,10 @@ static int __init cgroup_disable(char *s
@@ -6503,6 +6512,10 @@ static int __init cgroup_disable(char *s
strcmp(token, ss->legacy_name))
continue;
@ -51,7 +51,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
static_branch_disable(cgroup_subsys_enabled_key[i]);
pr_info("Disabling %s control group subsystem\n",
ss->name);
@@ -6515,6 +6528,31 @@ static int __init cgroup_disable(char *s
@@ -6521,6 +6534,31 @@ static int __init cgroup_disable(char *s
}
__setup("cgroup_disable=", cgroup_disable);

View File

@ -1,72 +0,0 @@
From 1b24a132eba7a1c19475ba2510ec1c00af3ff914 Mon Sep 17 00:00:00 2001
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 5 Sep 2022 09:15:03 -0700
Subject: [PATCH] clk: iproc: Do not rely on node name for correct PLL setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
After commit 31fd9b79dc58 ("ARM: dts: BCM5301X: update CRU block
description") a warning from clk-iproc-pll.c was generated due to a
duplicate PLL name as well as the console stopped working. Upon closer
inspection it became clear that iproc_pll_clk_setup() used the Device
Tree node unit name as an unique identifier as well as a parent name to
parent all clocks under the PLL.
BCM5301X was the first platform on which that got noticed because of the
DT node unit name renaming but the same assumptions hold true for any
user of the iproc_pll_clk_setup() function.
The first 'clock-output-names' property is always guaranteed to be
unique as well as providing the actual desired PLL clock name, so we
utilize that to register the PLL and as a parent name of all children
clock.
Fixes: 5fe225c105fd ("clk: iproc: add initial common clock support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20220905161504.1526-1-f.fainelli@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
drivers/clk/bcm/clk-iproc-pll.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- a/drivers/clk/bcm/clk-iproc-pll.c
+++ b/drivers/clk/bcm/clk-iproc-pll.c
@@ -736,6 +736,7 @@ void iproc_pll_clk_setup(struct device_n
const char *parent_name;
struct iproc_clk *iclk_array;
struct clk_hw_onecell_data *clk_data;
+ const char *clk_name;
if (WARN_ON(!pll_ctrl) || WARN_ON(!clk_ctrl))
return;
@@ -783,7 +784,12 @@ void iproc_pll_clk_setup(struct device_n
iclk = &iclk_array[0];
iclk->pll = pll;
- init.name = node->name;
+ ret = of_property_read_string_index(node, "clock-output-names",
+ 0, &clk_name);
+ if (WARN_ON(ret))
+ goto err_pll_register;
+
+ init.name = clk_name;
init.ops = &iproc_pll_ops;
init.flags = 0;
parent_name = of_clk_get_parent_name(node, 0);
@@ -803,13 +809,11 @@ void iproc_pll_clk_setup(struct device_n
goto err_pll_register;
clk_data->hws[0] = &iclk->hw;
+ parent_name = clk_name;
/* now initialize and register all leaf clocks */
for (i = 1; i < num_clks; i++) {
- const char *clk_name;
-
memset(&init, 0, sizeof(init));
- parent_name = node->name;
ret = of_property_read_string_index(node, "clock-output-names",
i, &clk_name);

View File

@ -1,72 +0,0 @@
From 1b24a132eba7a1c19475ba2510ec1c00af3ff914 Mon Sep 17 00:00:00 2001
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 5 Sep 2022 09:15:03 -0700
Subject: [PATCH] clk: iproc: Do not rely on node name for correct PLL setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
After commit 31fd9b79dc58 ("ARM: dts: BCM5301X: update CRU block
description") a warning from clk-iproc-pll.c was generated due to a
duplicate PLL name as well as the console stopped working. Upon closer
inspection it became clear that iproc_pll_clk_setup() used the Device
Tree node unit name as an unique identifier as well as a parent name to
parent all clocks under the PLL.
BCM5301X was the first platform on which that got noticed because of the
DT node unit name renaming but the same assumptions hold true for any
user of the iproc_pll_clk_setup() function.
The first 'clock-output-names' property is always guaranteed to be
unique as well as providing the actual desired PLL clock name, so we
utilize that to register the PLL and as a parent name of all children
clock.
Fixes: 5fe225c105fd ("clk: iproc: add initial common clock support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20220905161504.1526-1-f.fainelli@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
drivers/clk/bcm/clk-iproc-pll.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- a/drivers/clk/bcm/clk-iproc-pll.c
+++ b/drivers/clk/bcm/clk-iproc-pll.c
@@ -736,6 +736,7 @@ void iproc_pll_clk_setup(struct device_n
const char *parent_name;
struct iproc_clk *iclk_array;
struct clk_hw_onecell_data *clk_data;
+ const char *clk_name;
if (WARN_ON(!pll_ctrl) || WARN_ON(!clk_ctrl))
return;
@@ -783,7 +784,12 @@ void iproc_pll_clk_setup(struct device_n
iclk = &iclk_array[0];
iclk->pll = pll;
- init.name = node->name;
+ ret = of_property_read_string_index(node, "clock-output-names",
+ 0, &clk_name);
+ if (WARN_ON(ret))
+ goto err_pll_register;
+
+ init.name = clk_name;
init.ops = &iproc_pll_ops;
init.flags = 0;
parent_name = of_clk_get_parent_name(node, 0);
@@ -803,13 +809,11 @@ void iproc_pll_clk_setup(struct device_n
goto err_pll_register;
clk_data->hws[0] = &iclk->hw;
+ parent_name = clk_name;
/* now initialize and register all leaf clocks */
for (i = 1; i < num_clks; i++) {
- const char *clk_name;
-
memset(&init, 0, sizeof(init));
- parent_name = node->name;
ret = of_property_read_string_index(node, "clock-output-names",
i, &clk_name);

View File

@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
#include <net/dsa.h>
#include "mt7530.h"
@@ -1534,6 +1535,109 @@ mtk_get_tag_protocol(struct dsa_switch *
@@ -1537,6 +1538,109 @@ mtk_get_tag_protocol(struct dsa_switch *
}
}
@ -137,7 +137,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int
mt7530_setup(struct dsa_switch *ds)
{
@@ -1676,6 +1780,12 @@ mt7530_setup(struct dsa_switch *ds)
@@ -1679,6 +1783,12 @@ mt7530_setup(struct dsa_switch *ds)
}
}

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2366,6 +2366,17 @@ static void mt753x_phylink_mac_link_up(s
@@ -2371,6 +2371,17 @@ static void mt753x_phylink_mac_link_up(s
mcr |= PMCR_RX_FC_EN;
}
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mt7530_set(priv, MT7530_PMCR_P(port), mcr);
}
@@ -2596,6 +2607,36 @@ mt753x_phy_write(struct dsa_switch *ds,
@@ -2599,6 +2610,36 @@ mt753x_phy_write(struct dsa_switch *ds,
return priv->info->phy_write(ds, port, regnum, val);
}
@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct dsa_switch_ops mt7530_switch_ops = {
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
@@ -2624,6 +2665,8 @@ static const struct dsa_switch_ops mt753
@@ -2627,6 +2668,8 @@ static const struct dsa_switch_ops mt753
.phylink_mac_an_restart = mt753x_phylink_mac_an_restart,
.phylink_mac_link_down = mt753x_phylink_mac_link_down,
.phylink_mac_link_up = mt753x_phylink_mac_link_up,

View File

@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int irq;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -4987,7 +4987,7 @@ int stmmac_dvr_probe(struct device *devi
@@ -5000,7 +5000,7 @@ int stmmac_dvr_probe(struct device *devi
priv->wol_irq = res->wol_irq;
priv->lpi_irq = res->lpi_irq;

View File

@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1015,6 +1015,53 @@ mt7530_port_disable(struct dsa_switch *d
@@ -1018,6 +1018,53 @@ mt7530_port_disable(struct dsa_switch *d
mutex_unlock(&priv->reg_mutex);
}
@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void
mt7530_stp_state_set(struct dsa_switch *ds, int port, u8 state)
{
@@ -2647,6 +2694,8 @@ static const struct dsa_switch_ops mt753
@@ -2650,6 +2697,8 @@ static const struct dsa_switch_ops mt753
.get_sset_count = mt7530_get_sset_count,
.port_enable = mt7530_port_enable,
.port_disable = mt7530_port_disable,

View File

@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1703,6 +1703,7 @@ mt7530_setup(struct dsa_switch *ds)
@@ -1706,6 +1706,7 @@ mt7530_setup(struct dsa_switch *ds)
*/
dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
ds->configure_vlan_while_not_filtering = true;
@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (priv->id == ID_MT7530) {
regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
@@ -1948,6 +1949,7 @@ mt7531_setup(struct dsa_switch *ds)
@@ -1953,6 +1954,7 @@ mt7531_setup(struct dsa_switch *ds)
}
ds->configure_vlan_while_not_filtering = true;

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -870,6 +870,46 @@ mt7530_get_sset_count(struct dsa_switch
@@ -873,6 +873,46 @@ mt7530_get_sset_count(struct dsa_switch
return ARRAY_SIZE(mt7530_mib);
}
@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface)
{
struct mt7530_priv *priv = ds->priv;
@@ -2694,6 +2734,7 @@ static const struct dsa_switch_ops mt753
@@ -2697,6 +2737,7 @@ static const struct dsa_switch_ops mt753
.phy_write = mt753x_phy_write,
.get_ethtool_stats = mt7530_get_ethtool_stats,
.get_sset_count = mt7530_get_sset_count,

View File

@ -14,7 +14,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -998,9 +998,6 @@ mt753x_cpu_port_enable(struct dsa_switch
@@ -1001,9 +1001,6 @@ mt753x_cpu_port_enable(struct dsa_switch
mt7530_write(priv, MT7530_PVC_P(port),
PORT_SPEC_TAG);
@ -24,7 +24,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
/* Set CPU port number */
if (priv->id == ID_MT7621)
mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port));
@@ -1131,6 +1128,20 @@ mt7530_stp_state_set(struct dsa_switch *
@@ -1134,6 +1131,20 @@ mt7530_stp_state_set(struct dsa_switch *
}
static int
@ -45,7 +45,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
mt7530_port_bridge_join(struct dsa_switch *ds, int port,
struct net_device *bridge)
{
@@ -1331,6 +1342,63 @@ err:
@@ -1334,6 +1345,63 @@ err:
}
static int
@ -109,7 +109,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
mt7530_vlan_cmd(struct mt7530_priv *priv, enum mt7530_vlan_cmd cmd, u16 vid)
{
struct mt7530_dummy_poll p;
@@ -2740,11 +2808,15 @@ static const struct dsa_switch_ops mt753
@@ -2743,11 +2811,15 @@ static const struct dsa_switch_ops mt753
.port_change_mtu = mt7530_port_change_mtu,
.port_max_mtu = mt7530_port_max_mtu,
.port_stp_state_set = mt7530_stp_state_set,

View File

@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
#include <linux/of_platform.h>
@@ -600,18 +601,14 @@ mt7530_mib_reset(struct dsa_switch *ds)
@@ -603,18 +604,14 @@ mt7530_mib_reset(struct dsa_switch *ds)
mt7530_write(priv, MT7530_MIB_CCR, CCR_MIB_ACTIVATE);
}
@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return mdiobus_write_nested(priv->bus, port, regnum, val);
}
@@ -789,9 +786,8 @@ out:
@@ -792,9 +789,8 @@ out:
}
static int
@ -59,7 +59,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int devad;
int ret;
@@ -807,10 +803,9 @@ mt7531_ind_phy_read(struct dsa_switch *d
@@ -810,10 +806,9 @@ mt7531_ind_phy_read(struct dsa_switch *d
}
static int
@ -71,7 +71,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int devad;
int ret;
@@ -826,6 +821,22 @@ mt7531_ind_phy_write(struct dsa_switch *
@@ -829,6 +824,22 @@ mt7531_ind_phy_write(struct dsa_switch *
return ret;
}
@ -94,7 +94,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void
mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset,
uint8_t *data)
@@ -1793,6 +1804,210 @@ mt7530_setup_gpio(struct mt7530_priv *pr
@@ -1796,6 +1807,210 @@ mt7530_setup_gpio(struct mt7530_priv *pr
return devm_gpiochip_add_data(dev, gc, priv);
}
@ -305,7 +305,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int
mt7530_setup(struct dsa_switch *ds)
{
@@ -2744,24 +2959,20 @@ static int
@@ -2747,24 +2962,20 @@ static int
mt753x_setup(struct dsa_switch *ds)
{
struct mt7530_priv *priv = ds->priv;
@ -340,7 +340,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static int mt753x_get_mac_eee(struct dsa_switch *ds, int port,
@@ -2798,8 +3009,6 @@ static const struct dsa_switch_ops mt753
@@ -2801,8 +3012,6 @@ static const struct dsa_switch_ops mt753
.get_tag_protocol = mtk_get_tag_protocol,
.setup = mt753x_setup,
.get_strings = mt7530_get_strings,
@ -349,7 +349,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.get_ethtool_stats = mt7530_get_ethtool_stats,
.get_sset_count = mt7530_get_sset_count,
.set_ageing_time = mt7530_set_ageing_time,
@@ -2982,6 +3191,9 @@ mt7530_remove(struct mdio_device *mdiode
@@ -2985,6 +3194,9 @@ mt7530_remove(struct mdio_device *mdiode
dev_err(priv->dev, "Failed to disable io pwr: %d\n",
ret);

View File

@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1188,27 +1188,31 @@ static int
@@ -1191,27 +1191,31 @@ static int
mt7530_port_bridge_join(struct dsa_switch *ds, int port,
struct net_device *bridge)
{
@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
/* Add the all other ports to this port matrix. */
@@ -1301,24 +1305,28 @@ static void
@@ -1304,24 +1308,28 @@ static void
mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
struct net_device *bridge)
{

View File

@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2385,6 +2385,32 @@ mt7531_setup(struct dsa_switch *ds)
@@ -2390,6 +2390,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)
@@ -2421,6 +2447,37 @@ static bool mt7531_is_rgmii_port(struct
@@ -2426,6 +2452,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)
@@ -2899,6 +2956,18 @@ mt7531_cpu_port_config(struct dsa_switch
@@ -2902,6 +2959,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)
@@ -3134,6 +3203,7 @@ static const struct dsa_switch_ops mt753
@@ -3137,6 +3206,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,
@@ -3151,6 +3221,7 @@ static const struct mt753x_info mt753x_t
@@ -3154,6 +3224,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,
@@ -3162,6 +3233,7 @@ static const struct mt753x_info mt753x_t
@@ -3165,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,
@ -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,
@@ -3174,6 +3246,7 @@ static const struct mt753x_info mt753x_t
@@ -3177,6 +3249,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,
@@ -3236,6 +3309,7 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3239,6 +3312,7 @@ mt7530_probe(struct mdio_device *mdiodev
*/
if (!priv->info->sw_setup || !priv->info->pad_setup ||
!priv->info->phy_read || !priv->info->phy_write ||

View File

@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2411,37 +2411,6 @@ static void mt7530_mac_port_get_caps(str
@@ -2416,37 +2416,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);
@@ -2478,44 +2447,6 @@ static void mt7531_mac_port_get_caps(str
@@ -2483,44 +2452,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)
{
@@ -2770,9 +2701,6 @@ mt753x_phylink_mac_config(struct dsa_swi
@@ -2775,9 +2706,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)
@@ -2990,12 +2918,6 @@ mt753x_phylink_validate(struct dsa_switc
@@ -2993,12 +2921,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 &&
@@ -3222,7 +3144,6 @@ static const struct mt753x_info mt753x_t
@@ -3225,7 +3147,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,
@@ -3234,7 +3155,6 @@ static const struct mt753x_info mt753x_t
@@ -3237,7 +3158,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,
@@ -3247,7 +3167,6 @@ static const struct mt753x_info mt753x_t
@@ -3250,7 +3170,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,
@@ -3310,7 +3229,6 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3313,7 +3232,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 ||

View File

@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2942,11 +2942,6 @@ mt753x_phylink_validate(struct dsa_switc
@@ -2945,11 +2945,6 @@ mt753x_phylink_validate(struct dsa_switc
linkmode_and(supported, supported, mask);
linkmode_and(state->advertising, state->advertising, mask);

View File

@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2518,12 +2518,13 @@ static int mt7531_rgmii_setup(struct mt7
@@ -2523,12 +2523,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);
}
@@ -2898,16 +2899,18 @@ static void mt753x_phylink_get_caps(stru
@@ -2901,16 +2902,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
@@ -2930,12 +2933,13 @@ mt753x_phylink_validate(struct dsa_switc
@@ -2933,12 +2936,13 @@ mt753x_phylink_validate(struct dsa_switc
}
/* This switch only supports 1G full-duplex. */

View File

@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2517,19 +2517,6 @@ static int mt7531_rgmii_setup(struct mt7
@@ -2522,19 +2522,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,
@@ -2898,51 +2885,21 @@ static void mt753x_phylink_get_caps(stru
@@ -2901,51 +2888,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);
@@ -3143,7 +3100,6 @@ static const struct mt753x_info mt753x_t
@@ -3146,7 +3103,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,
},
@@ -3154,7 +3110,6 @@ static const struct mt753x_info mt753x_t
@@ -3157,7 +3113,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,
},
@@ -3166,7 +3121,6 @@ static const struct mt753x_info mt753x_t
@@ -3169,7 +3124,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,
@@ -3228,7 +3182,6 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3231,7 +3185,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 ||

View File

@ -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"),
@@ -2517,12 +2522,11 @@ static int mt7531_rgmii_setup(struct mt7
@@ -2522,12 +2527,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. */
@@ -2548,6 +2552,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
@@ -2553,6 +2557,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)
@@ -2623,9 +2630,10 @@ static int mt7531_sgmii_setup_mode_an(st
@@ -2628,9 +2635,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 */
@@ -2682,6 +2690,24 @@ mt753x_mac_config(struct dsa_switch *ds,
@@ -2687,6 +2695,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)
@@ -2743,17 +2769,6 @@ unsupported:
@@ -2748,17 +2774,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)
@@ -2763,16 +2778,13 @@ static void mt753x_phylink_mac_link_down
@@ -2768,16 +2783,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,
@@ -2785,8 +2797,6 @@ static void mt753x_phylink_mac_link_up(s
@@ -2790,8 +2802,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
@@ -2866,6 +2876,8 @@ mt7531_cpu_port_config(struct dsa_switch
@@ -2869,6 +2879,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);
@@ -2905,16 +2917,13 @@ mt753x_phylink_validate(struct dsa_switc
@@ -2908,16 +2920,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);
@@ -2941,8 +2950,6 @@ mt7530_phylink_mac_link_state(struct dsa
@@ -2944,8 +2953,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
@@ -2984,32 +2991,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
@@ -2987,32 +2994,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;
@@ -3022,6 +3046,13 @@ mt753x_setup(struct dsa_switch *ds)
@@ -3025,6 +3049,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;
}
@@ -3083,9 +3114,8 @@ static const struct dsa_switch_ops mt753
@@ -3086,9 +3117,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,
@@ -3095,36 +3125,34 @@ static const struct dsa_switch_ops mt753
@@ -3098,36 +3128,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>
},
};
@@ -3182,7 +3210,7 @@ mt7530_probe(struct mdio_device *mdiodev
@@ -3185,7 +3213,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 ||

View File

@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2896,25 +2896,16 @@ static void mt753x_phylink_get_caps(stru
@@ -2899,25 +2899,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,
@@ -3016,12 +3007,14 @@ static void mt7530_pcs_an_restart(struct
@@ -3019,12 +3010,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,
@@ -3113,7 +3106,6 @@ static const struct dsa_switch_ops mt753
@@ -3116,7 +3109,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,

View File

@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2893,6 +2893,12 @@ static void mt753x_phylink_get_caps(stru
@@ -2896,6 +2896,12 @@ static void mt753x_phylink_get_caps(stru
config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
MAC_10 | MAC_100 | MAC_1000FD;

View File

@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -3031,9 +3031,16 @@ static int
@@ -3034,9 +3034,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;
@@ -3045,13 +3052,6 @@ mt753x_setup(struct dsa_switch *ds)
@@ -3048,13 +3055,6 @@ mt753x_setup(struct dsa_switch *ds)
if (ret && priv->irq)
mt7530_free_irq_common(priv);

View File

@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1522,11 +1522,11 @@ static void
@@ -1525,11 +1525,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.
@@ -1537,22 +1537,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
@@ -1540,22 +1540,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
@@ -1571,11 +1569,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
@@ -1574,11 +1572,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
return;
}

View File

@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2087,11 +2087,12 @@ static int
@@ -2090,11 +2090,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;
@@ -2099,7 +2100,19 @@ mt7530_setup(struct dsa_switch *ds)
@@ -2102,7 +2103,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;
@@ -2261,6 +2274,7 @@ mt7531_setup(struct dsa_switch *ds)
@@ -2264,6 +2277,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;
@@ -2333,8 +2347,11 @@ mt7531_setup(struct dsa_switch *ds)
@@ -2338,8 +2352,11 @@ mt7531_setup(struct dsa_switch *ds)
CORE_PLL_GROUP4, val);
/* BPDU to CPU port */

View File

@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1038,6 +1038,7 @@ static int
@@ -1041,6 +1041,7 @@ static int
mt7530_port_enable(struct dsa_switch *ds, int port,
struct phy_device *phy)
{
@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
@@ -1046,7 +1047,11 @@ mt7530_port_enable(struct dsa_switch *ds
@@ -1049,7 +1050,11 @@ mt7530_port_enable(struct dsa_switch *ds
* restore the port matrix if the port is the member of a certain
* bridge.
*/
@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
priv->ports[port].enable = true;
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
priv->ports[port].pm);
@@ -1194,7 +1199,8 @@ mt7530_port_bridge_join(struct dsa_switc
@@ -1197,7 +1202,8 @@ mt7530_port_bridge_join(struct dsa_switc
struct net_device *bridge)
{
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct mt7530_priv *priv = ds->priv;
mutex_lock(&priv->reg_mutex);
@@ -1271,9 +1277,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
@@ -1274,9 +1280,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
* the CPU port get out of VLAN filtering mode.
*/
if (all_user_ports_removed) {
@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
}
}
@@ -1311,6 +1320,7 @@ mt7530_port_bridge_leave(struct dsa_swit
@@ -1314,6 +1323,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);
@@ -1339,8 +1349,8 @@ mt7530_port_bridge_leave(struct dsa_swit
@@ -1342,8 +1352,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
@@ -1503,6 +1513,9 @@ static int
@@ -1506,6 +1516,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
@@ -1510,7 +1523,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
@@ -1513,7 +1526,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
* for becoming a VLAN-aware port.
*/
mt7530_port_set_vlan_aware(ds, port);

View File

@ -62,8 +62,8 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
stmmac_start_tx_dma(priv, chan);
@@ -3757,6 +3748,8 @@ static int stmmac_open(struct net_device
goto init_error;
@@ -3766,6 +3757,8 @@ static int stmmac_open(struct net_device
}
}
+ stmmac_reset_queues_param(priv);
@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ret = stmmac_hw_setup(dev, true);
if (ret < 0) {
netdev_err(priv->dev, "%s: Hw setup failed\n", __func__);
@@ -6396,6 +6389,7 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6409,6 +6402,7 @@ void stmmac_enable_rx_queue(struct stmma
return;
}
@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_clear_rx_descriptors(priv, queue);
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
@@ -6457,6 +6451,7 @@ void stmmac_enable_tx_queue(struct stmma
@@ -6470,6 +6464,7 @@ void stmmac_enable_tx_queue(struct stmma
return;
}
@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_clear_tx_descriptors(priv, queue);
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
@@ -7384,6 +7379,25 @@ int stmmac_suspend(struct device *dev)
@@ -7387,6 +7382,25 @@ int stmmac_suspend(struct device *dev)
}
EXPORT_SYMBOL_GPL(stmmac_suspend);
@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/**
* stmmac_reset_queues_param - reset queue parameters
* @priv: device pointer
@@ -7394,22 +7408,11 @@ static void stmmac_reset_queues_param(st
@@ -7397,22 +7411,11 @@ static void stmmac_reset_queues_param(st
u32 tx_cnt = priv->plat->tx_queues_to_use;
u32 queue;

View File

@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3809,8 +3809,6 @@ static int stmmac_release(struct net_dev
@@ -3818,8 +3818,6 @@ static int stmmac_release(struct net_dev
struct stmmac_priv *priv = netdev_priv(dev);
u32 chan;
@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (device_may_wakeup(priv->device))
phylink_speed_down(priv->phylink, false);
/* Stop and disconnect the PHY */
@@ -3822,6 +3820,8 @@ static int stmmac_release(struct net_dev
@@ -3831,6 +3829,8 @@ static int stmmac_release(struct net_dev
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
hrtimer_cancel(&priv->tx_queue[chan].txtimer);

View File

@ -766,7 +766,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int tbs_en = priv->plat->tx_queues_cfg[chan].tbs_en;
/* Setup per-TXQ tbs flag before TX descriptor alloc */
@@ -3776,7 +3776,7 @@ irq_error:
@@ -3785,7 +3785,7 @@ irq_error:
phylink_stop(priv->phylink);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@ -775,7 +775,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_hw_teardown(dev);
init_error:
@@ -3818,7 +3818,7 @@ static int stmmac_release(struct net_dev
@@ -3827,7 +3827,7 @@ static int stmmac_release(struct net_dev
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@ -784,7 +784,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
netif_tx_disable(dev);
@@ -3878,7 +3878,7 @@ static bool stmmac_vlan_insert(struct st
@@ -3891,7 +3891,7 @@ static bool stmmac_vlan_insert(struct st
return false;
stmmac_set_tx_owner(priv, p);
@ -793,7 +793,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
return true;
}
@@ -3896,7 +3896,7 @@ static bool stmmac_vlan_insert(struct st
@@ -3909,7 +3909,7 @@ static bool stmmac_vlan_insert(struct st
static void stmmac_tso_allocator(struct stmmac_priv *priv, dma_addr_t des,
int total_len, bool last_segment, u32 queue)
{
@ -802,7 +802,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct dma_desc *desc;
u32 buff_size;
int tmp_len;
@@ -3907,7 +3907,7 @@ static void stmmac_tso_allocator(struct
@@ -3920,7 +3920,7 @@ static void stmmac_tso_allocator(struct
dma_addr_t curr_addr;
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
@ -811,7 +811,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
if (tx_q->tbs & STMMAC_TBS_AVAIL)
@@ -3935,7 +3935,7 @@ static void stmmac_tso_allocator(struct
@@ -3948,7 +3948,7 @@ static void stmmac_tso_allocator(struct
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue)
{
@ -820,7 +820,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int desc_size;
if (likely(priv->extend_desc))
@@ -3997,7 +3997,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4010,7 +4010,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
dma_addr_t des;
int i;
@ -829,7 +829,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
first_tx = tx_q->cur_tx;
/* Compute header lengths */
@@ -4037,7 +4037,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4050,7 +4050,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
stmmac_set_mss(priv, mss_desc, mss);
tx_q->mss = mss;
tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx,
@ -838,7 +838,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
}
@@ -4149,7 +4149,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
@@ -4162,7 +4162,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
@ -847,7 +847,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) {
netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n",
@@ -4237,7 +4237,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4250,7 +4250,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int entry, first_tx;
dma_addr_t des;
@ -856,7 +856,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
first_tx = tx_q->cur_tx;
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
@@ -4300,7 +4300,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4313,7 +4313,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int len = skb_frag_size(frag);
bool last_segment = (i == (nfrags - 1));
@ -865,7 +865,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
WARN_ON(tx_q->tx_skbuff[entry]);
if (likely(priv->extend_desc))
@@ -4371,7 +4371,7 @@ static netdev_tx_t stmmac_xmit(struct sk
@@ -4384,7 +4384,7 @@ static netdev_tx_t stmmac_xmit(struct sk
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
@ -874,7 +874,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tx_q->cur_tx = entry;
if (netif_msg_pktdata(priv)) {
@@ -4486,7 +4486,7 @@ static void stmmac_rx_vlan(struct net_de
@@ -4499,7 +4499,7 @@ static void stmmac_rx_vlan(struct net_de
*/
static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
{
@ -883,7 +883,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int entry = rx_q->dirty_rx;
@@ -4536,7 +4536,7 @@ static inline void stmmac_rx_refill(stru
@@ -4549,7 +4549,7 @@ static inline void stmmac_rx_refill(stru
dma_wmb();
stmmac_set_rx_owner(priv, p, use_rx_wd);
@ -892,7 +892,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
rx_q->dirty_rx = entry;
rx_q->rx_tail_addr = rx_q->dma_rx_phy +
@@ -4564,12 +4564,12 @@ static unsigned int stmmac_rx_buf1_len(s
@@ -4577,12 +4577,12 @@ static unsigned int stmmac_rx_buf1_len(s
/* First descriptor, not last descriptor and not split header */
if (status & rx_not_ls)
@ -907,7 +907,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
@@ -4585,7 +4585,7 @@ static unsigned int stmmac_rx_buf2_len(s
@@ -4598,7 +4598,7 @@ static unsigned int stmmac_rx_buf2_len(s
/* Not last descriptor */
if (status & rx_not_ls)
@ -916,7 +916,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
plen = stmmac_get_rx_frame_len(priv, p, coe);
@@ -4596,7 +4596,7 @@ static unsigned int stmmac_rx_buf2_len(s
@@ -4609,7 +4609,7 @@ static unsigned int stmmac_rx_buf2_len(s
static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
struct xdp_frame *xdpf, bool dma_map)
{
@ -925,7 +925,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int entry = tx_q->cur_tx;
struct dma_desc *tx_desc;
dma_addr_t dma_addr;
@@ -4659,7 +4659,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
@@ -4672,7 +4672,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
stmmac_enable_dma_transmission(priv, priv->ioaddr);
@ -934,7 +934,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tx_q->cur_tx = entry;
return STMMAC_XDP_TX;
@@ -4833,7 +4833,7 @@ static void stmmac_dispatch_skb_zc(struc
@@ -4846,7 +4846,7 @@ static void stmmac_dispatch_skb_zc(struc
static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
{
@ -943,7 +943,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int entry = rx_q->dirty_rx;
struct dma_desc *rx_desc = NULL;
bool ret = true;
@@ -4876,7 +4876,7 @@ static bool stmmac_rx_refill_zc(struct s
@@ -4889,7 +4889,7 @@ static bool stmmac_rx_refill_zc(struct s
dma_wmb();
stmmac_set_rx_owner(priv, rx_desc, use_rx_wd);
@ -952,7 +952,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
if (rx_desc) {
@@ -4891,7 +4891,7 @@ static bool stmmac_rx_refill_zc(struct s
@@ -4904,7 +4904,7 @@ static bool stmmac_rx_refill_zc(struct s
static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
{
@ -961,7 +961,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
unsigned int count = 0, error = 0, len = 0;
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int next_entry = rx_q->cur_rx;
@@ -4913,7 +4913,7 @@ static int stmmac_rx_zc(struct stmmac_pr
@@ -4926,7 +4926,7 @@ static int stmmac_rx_zc(struct stmmac_pr
desc_size = sizeof(struct dma_desc);
}
@ -970,7 +970,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
@@ -4960,7 +4960,7 @@ read_again:
@@ -4973,7 +4973,7 @@ read_again:
/* Prefetch the next RX descriptor */
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
@ -979,7 +979,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
@@ -5081,7 +5081,7 @@ read_again:
@@ -5094,7 +5094,7 @@ read_again:
*/
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
{
@ -988,7 +988,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned int count = 0, error = 0, len = 0;
int status = 0, coe = priv->hw->rx_csum;
@@ -5094,7 +5094,7 @@ static int stmmac_rx(struct stmmac_priv
@@ -5107,7 +5107,7 @@ static int stmmac_rx(struct stmmac_priv
int buf_sz;
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
@ -997,7 +997,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (netif_msg_rx_status(priv)) {
void *rx_head;
@@ -5108,7 +5108,7 @@ static int stmmac_rx(struct stmmac_priv
@@ -5121,7 +5121,7 @@ static int stmmac_rx(struct stmmac_priv
desc_size = sizeof(struct dma_desc);
}
@ -1006,7 +1006,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
@@ -5152,7 +5152,7 @@ read_again:
@@ -5165,7 +5165,7 @@ read_again:
break;
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
@ -1015,7 +1015,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
@@ -5286,7 +5286,7 @@ read_again:
@@ -5299,7 +5299,7 @@ read_again:
buf1_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->page, buf->page_offset, buf1_len,
@ -1024,7 +1024,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->page);
@@ -5298,7 +5298,7 @@ read_again:
@@ -5311,7 +5311,7 @@ read_again:
buf2_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->sec_page, 0, buf2_len,
@ -1033,7 +1033,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->sec_page);
@@ -5740,11 +5740,13 @@ static irqreturn_t stmmac_safety_interru
@@ -5753,11 +5753,13 @@ static irqreturn_t stmmac_safety_interru
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
{
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
@ -1048,7 +1048,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(!data)) {
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
@@ -5784,10 +5786,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
@@ -5797,10 +5799,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
{
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
@ -1062,7 +1062,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (unlikely(!data)) {
netdev_err(priv->dev, "%s: invalid dev pointer\n", __func__);
@@ -5818,10 +5822,10 @@ static void stmmac_poll_controller(struc
@@ -5831,10 +5835,10 @@ static void stmmac_poll_controller(struc
if (priv->plat->multi_msi_en) {
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
@ -1075,7 +1075,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
} else {
disable_irq(dev->irq);
stmmac_interrupt(dev->irq, dev);
@@ -6002,34 +6006,34 @@ static int stmmac_rings_status_show(stru
@@ -6015,34 +6019,34 @@ static int stmmac_rings_status_show(stru
return 0;
for (queue = 0; queue < rx_count; queue++) {
@ -1116,7 +1116,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
}
@@ -6370,7 +6374,7 @@ void stmmac_disable_rx_queue(struct stmm
@@ -6383,7 +6387,7 @@ void stmmac_disable_rx_queue(struct stmm
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
{
@ -1125,7 +1125,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
u32 buf_size;
@@ -6407,7 +6411,7 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6420,7 +6424,7 @@ void stmmac_enable_rx_queue(struct stmma
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
@ -1134,7 +1134,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->queue_index);
}
@@ -6433,7 +6437,7 @@ void stmmac_disable_tx_queue(struct stmm
@@ -6446,7 +6450,7 @@ void stmmac_disable_tx_queue(struct stmm
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
{
@ -1143,7 +1143,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
int ret;
@@ -6480,7 +6484,7 @@ void stmmac_xdp_release(struct net_devic
@@ -6493,7 +6497,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@ -1152,7 +1152,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Free the IRQ lines */
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
@@ -6539,7 +6543,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6552,7 +6556,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_cnt; chan++) {
@ -1161,7 +1161,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, chan);
@@ -6557,7 +6561,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6570,7 +6574,7 @@ int stmmac_xdp_open(struct net_device *d
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
@ -1170,7 +1170,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->queue_index);
}
@@ -6566,7 +6570,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6579,7 +6583,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA TX Channel Configuration */
for (chan = 0; chan < tx_cnt; chan++) {
@ -1179,7 +1179,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
@@ -6599,7 +6603,7 @@ int stmmac_xdp_open(struct net_device *d
@@ -6612,7 +6616,7 @@ int stmmac_xdp_open(struct net_device *d
irq_error:
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@ -1188,7 +1188,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_hw_teardown(dev);
init_error:
@@ -6626,8 +6630,8 @@ int stmmac_xsk_wakeup(struct net_device
@@ -6639,8 +6643,8 @@ int stmmac_xsk_wakeup(struct net_device
queue >= priv->plat->tx_queues_to_use)
return -EINVAL;
@ -1199,7 +1199,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
ch = &priv->channel[queue];
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
@@ -6883,8 +6887,8 @@ int stmmac_reinit_ringparam(struct net_d
@@ -6896,8 +6900,8 @@ int stmmac_reinit_ringparam(struct net_d
if (netif_running(dev))
stmmac_release(dev);
@ -1210,7 +1210,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (netif_running(dev))
ret = stmmac_open(dev);
@@ -7330,7 +7334,7 @@ int stmmac_suspend(struct device *dev)
@@ -7333,7 +7337,7 @@ int stmmac_suspend(struct device *dev)
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
@ -1219,7 +1219,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (priv->eee_enabled) {
priv->tx_path_in_lpi_mode = false;
@@ -7381,7 +7385,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
@@ -7384,7 +7388,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
{
@ -1228,7 +1228,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
rx_q->cur_rx = 0;
rx_q->dirty_rx = 0;
@@ -7389,7 +7393,7 @@ static void stmmac_reset_rx_queue(struct
@@ -7392,7 +7396,7 @@ static void stmmac_reset_rx_queue(struct
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
{

View File

@ -1003,9 +1003,9 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+ buf_sz = dma_conf->dma_buf_sz;
+ memcpy(&priv->dma_conf, dma_conf, sizeof(*dma_conf));
stmmac_reset_queues_param(priv);
@@ -3780,14 +3882,28 @@ irq_error:
if (priv->plat->serdes_powerup) {
ret = priv->plat->serdes_powerup(dev, priv->plat->bsp_priv);
@@ -3789,14 +3891,28 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
@ -1036,7 +1036,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static void stmmac_fpe_stop_wq(struct stmmac_priv *priv)
{
set_bit(__FPE_REMOVING, &priv->fpe_task_state);
@@ -3834,7 +3950,7 @@ static int stmmac_release(struct net_dev
@@ -3843,7 +3959,7 @@ static int stmmac_release(struct net_dev
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
@ -1045,7 +1045,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
@@ -6369,7 +6485,7 @@ void stmmac_disable_rx_queue(struct stmm
@@ -6382,7 +6498,7 @@ void stmmac_disable_rx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_rx_dma(priv, queue);
@ -1054,7 +1054,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
@@ -6380,21 +6496,21 @@ void stmmac_enable_rx_queue(struct stmma
@@ -6393,21 +6509,21 @@ void stmmac_enable_rx_queue(struct stmma
u32 buf_size;
int ret;
@ -1080,7 +1080,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, rx_q->queue_index);
@@ -6432,7 +6548,7 @@ void stmmac_disable_tx_queue(struct stmm
@@ -6445,7 +6561,7 @@ void stmmac_disable_tx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_tx_dma(priv, queue);
@ -1089,7 +1089,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
@@ -6442,21 +6558,21 @@ void stmmac_enable_tx_queue(struct stmma
@@ -6455,21 +6571,21 @@ void stmmac_enable_tx_queue(struct stmma
unsigned long flags;
int ret;
@ -1115,7 +1115,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, tx_q->queue_index);
@@ -6493,7 +6609,7 @@ void stmmac_xdp_release(struct net_devic
@@ -6506,7 +6622,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
@ -1124,7 +1124,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
@@ -6518,14 +6634,14 @@ int stmmac_xdp_open(struct net_device *d
@@ -6531,14 +6647,14 @@ int stmmac_xdp_open(struct net_device *d
u32 chan;
int ret;
@ -1141,7 +1141,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (ret < 0) {
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
__func__);
@@ -6607,7 +6723,7 @@ irq_error:
@@ -6620,7 +6736,7 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
@ -1150,7 +1150,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
dma_desc_error:
return ret;
}
@@ -7476,7 +7592,7 @@ int stmmac_resume(struct device *dev)
@@ -7479,7 +7595,7 @@ int stmmac_resume(struct device *dev)
stmmac_reset_queues_param(priv);
stmmac_free_tx_skbufs(priv);

View File

@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5598,18 +5598,15 @@ static int stmmac_change_mtu(struct net_
@@ -5611,18 +5611,15 @@ static int stmmac_change_mtu(struct net_
{
struct stmmac_priv *priv = netdev_priv(dev);
int txfifosz = priv->plat->tx_fifo_size;
@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
if (stmmac_xdp_is_enabled(priv) && new_mtu > ETH_DATA_LEN) {
netdev_dbg(priv->dev, "Jumbo frames not supported for XDP\n");
return -EINVAL;
@@ -5621,8 +5618,29 @@ static int stmmac_change_mtu(struct net_
@@ -5634,8 +5631,29 @@ static int stmmac_change_mtu(struct net_
if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB))
return -EINVAL;

View File

@ -31,3 +31,4 @@ Submitted-by: Rosen Penev <rosenp@gmail.com>
+ tristate "OID"
help
Enable fast lookup object identifier registry.

View File

@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7059,7 +7059,7 @@ static void __ref alloc_node_mem_map(str
@@ -7104,7 +7104,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)

View File

@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
@@ -4551,6 +4564,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
@@ -4555,6 +4568,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (tag < 0)
return NULL;
}
@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
qc = __ata_qc_from_tag(ap, tag);
qc->tag = qc->hw_tag = tag;
@@ -5329,6 +5345,9 @@ struct ata_port *ata_port_alloc(struct a
@@ -5333,6 +5349,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
ata_sff_port_init(ap);
return ap;
@@ -5364,6 +5383,12 @@ static void ata_host_release(struct kref
@@ -5368,6 +5387,12 @@ static void ata_host_release(struct kref
kfree(ap->pmp_link);
kfree(ap->slave_link);
@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
kfree(ap);
host->ports[i] = NULL;
}
@@ -5770,7 +5795,23 @@ int ata_host_register(struct ata_host *h
@@ -5774,7 +5799,23 @@ int ata_host_register(struct ata_host *h
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
host->ports[i]->local_port_no = i + 1;
}

View File

@ -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
@@ -7411,6 +7411,7 @@ static void __meminit pgdat_init_interna
@@ -7456,6 +7456,7 @@ static void __meminit pgdat_init_interna
pgdat_page_ext_init(pgdat);
lruvec_init(&pgdat->__lruvec);

View File

@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7557,7 +7557,7 @@ static void __init alloc_node_mem_map(st
@@ -7602,7 +7602,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)

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1744,6 +1744,9 @@ void phy_detach(struct phy_device *phyde
@@ -1746,6 +1746,9 @@ void phy_detach(struct phy_device *phyde
struct module *ndev_owner = NULL;
struct mii_bus *bus;

View File

@ -1,67 +0,0 @@
From 9fec662b54fc956b776df15c704e996c61292850 Mon Sep 17 00:00:00 2001
From: Alexander Couzens <lynxis@fe80.eu>
Date: Sat, 13 Aug 2022 13:05:09 +0200
Subject: [PATCH 02/10] net: mt7531: only do PLL once after the reset
Move the PLL init of the switch out of the pad configuration of the port
6 (usally cpu port).
Fix a unidirectional 100 mbit limitation on 1 gbit or 2.5 gbit links for
outbound traffic on port 5 or port 6.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
---
drivers/net/dsa/mt7530.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -506,14 +506,19 @@ static bool mt7531_dual_sgmii_supported(
static int
mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
{
- struct mt7530_priv *priv = ds->priv;
+ return 0;
+}
+
+static void
+mt7531_pll_setup(struct mt7530_priv *priv)
+{
u32 top_sig;
u32 hwstrap;
u32 xtal;
u32 val;
if (mt7531_dual_sgmii_supported(priv))
- return 0;
+ return;
val = mt7530_read(priv, MT7531_CREV);
top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
@@ -592,8 +597,6 @@ mt7531_pad_setup(struct dsa_switch *ds,
val |= EN_COREPLL;
mt7530_write(priv, MT7531_PLLGP_EN, val);
usleep_range(25, 35);
-
- return 0;
}
static void
@@ -2326,6 +2329,8 @@ mt7531_setup(struct dsa_switch *ds)
SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
SYS_CTRL_REG_RST);
+ mt7531_pll_setup(priv);
+
if (mt7531_dual_sgmii_supported(priv)) {
priv->p5_intf_sel = P5_INTF_SEL_GMAC5_SGMII;
@@ -2882,8 +2887,6 @@ mt7531_cpu_port_config(struct dsa_switch
case 6:
interface = PHY_INTERFACE_MODE_2500BASEX;
- mt7531_pad_setup(ds, interface);
-
priv->p6_interface = interface;
break;
default:

View File

@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/**
* ata_build_rw_tf - Build ATA taskfile for given read/write request
* @tf: Target ATA taskfile
@@ -4576,6 +4589,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
@@ -4580,6 +4593,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
if (tag < 0)
return NULL;
}
@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
qc = __ata_qc_from_tag(ap, tag);
qc->tag = qc->hw_tag = tag;
@@ -5354,6 +5370,9 @@ struct ata_port *ata_port_alloc(struct a
@@ -5358,6 +5374,9 @@ struct ata_port *ata_port_alloc(struct a
ap->stats.unhandled_irq = 1;
ap->stats.idle_irq = 1;
#endif
@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
ata_sff_port_init(ap);
return ap;
@@ -5389,6 +5408,12 @@ static void ata_host_release(struct kref
@@ -5393,6 +5412,12 @@ static void ata_host_release(struct kref
kfree(ap->pmp_link);
kfree(ap->slave_link);
@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
kfree(ap);
host->ports[i] = NULL;
}
@@ -5795,7 +5820,23 @@ int ata_host_register(struct ata_host *h
@@ -5799,7 +5824,23 @@ int ata_host_register(struct ata_host *h
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
host->ports[i]->local_port_no = i + 1;
}

View File

@ -95,8 +95,8 @@ qxwlan,e2600ac-c2)
ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
;;
sony,ncp-hg100-cellular)
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
ucidef_set_led_netdev "lan" "LAN" "green:lan" "lan"
ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
ucidef_set_led_netdev "wwan" "WWAN" "green:wan-4" "wwan0"
;;
zyxel,nbg6617 |\

View File

@ -33,7 +33,9 @@ ipq40xx_setup_interfaces()
glinet,gl-b2200|\
luma,wrtq-329acn|\
mikrotik,cap-ac|\
netgear,wac510)
netgear,wac510|\
sony,ncp-hg100-cellular|\
zte,mf289f)
ucidef_set_interfaces_lan_wan "lan" "wan"
;;
aruba,ap-303|\
@ -59,11 +61,6 @@ ipq40xx_setup_interfaces()
zte,mf286d)
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan"
;;
zte,mf289f)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
"0u@eth0" "0u@eth1" "2:lan:1" "5:lan:2"
;;
*)
echo "Unsupported hardware. Network interfaces not initialized"
;;

View File

@ -43,7 +43,7 @@
label = "blue:power";
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
};
led-1 {
@ -71,10 +71,6 @@
};
soc {
ess-psgmii@98000 {
status = "okay";
};
tcsr@1949000 {
compatible = "qcom,tcsr";
reg = <0x1949000 0x100>;
@ -100,14 +96,6 @@
reg = <0x1957000 0x100>;
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
ess-switch@c000000 {
status = "okay";
};
edma@c080000 {
status = "okay";
};
};
};
@ -319,17 +307,31 @@
status = "okay";
};
&gmac0 {
&gmac {
status = "okay";
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_mac_0>;
};
&gmac1 {
&switch {
status = "okay";
};
&swport2 {
status = "okay";
label = "wan";
nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_mac_0>;
mac-address-increment = <1>;
};
&swport5 {
status = "okay";
label = "lan";
};
&qpic_bam {
status = "okay";

View File

@ -16,7 +16,7 @@
led-failsafe = &led_cloud_red;
led-running = &led_cloud_green;
led-upgrade = &led_cloud_green;
label-mac-device = &gmac0;
label-mac-device = &gmac;
};
chosen {
@ -57,23 +57,9 @@
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
};
ess-psgmii@98000 {
status = "okay";
};
dma@7984000 {
status = "okay";
};
ess-switch@c000000 {
status = "okay";
switch_mac_mode = <0x0>; /* mac mode for RGMII RMII */
switch_initvlas = <0x0007c 0x54>; /* PORT0_STATUS */
};
edma@c080000 {
status = "okay";
};
};
keys-repeat {
@ -616,6 +602,24 @@
status = "okay";
};
&gmac {
status = "okay";
};
&switch {
status = "okay";
};
&swport4 {
status = "okay";
label = "lan";
};
&swport5 {
status = "okay";
label = "wan";
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";

View File

@ -1048,8 +1048,7 @@ define Device/sony_ncp-hg100-cellular
DEVICE_PACKAGES := e2fsprogs ipq-wifi-sony_ncp-hg100-cellular \
kmod-fs-ext4 uqmi
endef
# Missing DSA Setup
#TARGET_DEVICES += sony_ncp-hg100-cellular
TARGET_DEVICES += sony_ncp-hg100-cellular
define Device/teltonika_rutx10
$(call Device/FitImage)
@ -1119,8 +1118,7 @@ define Device/zte_mf289f
DEVICE_MODEL := MF289F
DEVICE_PACKAGES += ipq-wifi-zte_mf289f ath10k-firmware-qca9984-ct
endef
# Missing DSA Setup
#TARGET_DEVICES += zte_mf289f
TARGET_DEVICES += zte_mf289f
define Device/zyxel_nbg6617
$(call Device/FitImageLzma)

View File

@ -31,7 +31,7 @@ Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -528,6 +528,9 @@ struct skb_shared_info {
@@ -563,6 +563,9 @@ struct skb_shared_info {
unsigned int gso_type;
u32 tskey;

View File

@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
- rev-mii
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -293,6 +293,7 @@ static int phylink_parse_mode(struct phy
@@ -629,6 +629,7 @@ static int phylink_parse_mode(struct phy
switch (pl->link_config.interface) {
case PHY_INTERFACE_MODE_SGMII:
@ -50,7 +50,7 @@ Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
PHY_INTERFACE_MODE_QSGMII,
PHY_INTERFACE_MODE_TRGMII,
PHY_INTERFACE_MODE_100BASEX,
@@ -209,6 +210,8 @@ static inline const char *phy_modes(phy_
@@ -243,6 +244,8 @@ static inline const char *phy_modes(phy_
return "xlgmii";
case PHY_INTERFACE_MODE_MOCA:
return "moca";

View File

@ -10,8 +10,7 @@ CPU_TYPE:=cortex-a15
CPU_SUBTYPE:=neon-vfpv4
SUBTARGETS:=generic
KERNEL_PATCHVER:=5.10
KERNEL_TESTING_PATCHVER:=5.15
KERNEL_PATCHVER:=5.15
KERNELNAME:=zImage Image dtbs

View File

@ -121,12 +121,14 @@ CONFIG_CRYPTO_ZSTD=y
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_DEBUG_GPIO=y
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
# CONFIG_DEVFREQ_GOV_PASSIVE is not set
CONFIG_DEVFREQ_GOV_PASSIVE=y
# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
# CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is not set
# CONFIG_DEVFREQ_GOV_USERSPACE is not set
# CONFIG_DEVFREQ_THERMAL is not set
CONFIG_ARM_KRAIT_CACHE_DEVFREQ=y
CONFIG_ARM_IPQ806X_FAB_DEVFREQ=y
CONFIG_DMADEVICES=y
CONFIG_DMA_ENGINE=y
CONFIG_DMA_OF=y

View File

@ -0,0 +1,510 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq8062-smb208.dtsi"
#include <dt-bindings/input/input.h>
/ {
model = "NEC Platforms Aterm WG2600HP3";
compatible = "nec,wg2600hp3", "qcom,ipq8062", "qcom,ipq8064";
memory {
device_type = "memory";
reg = <0x42000000 0x1e000000>;
};
aliases {
label-mac-device = &gmac2;
led-boot = &led_power_green;
led-failsafe = &led_power_red;
led-running = &led_power_green;
led-upgrade = &led_power_red;
};
keys {
compatible = "gpio-keys";
pinctrl-0 = <&buttons_pins>;
pinctrl-names = "default";
reset {
label = "reset";
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
wakeup-source;
};
wps {
label = "wps";
gpios = <&qcom_pinmux 22 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
wakeup-source;
};
mode0 {
label = "mode0";
gpios = <&qcom_pinmux 40 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
debounce-interval = <60>;
wakeup-source;
};
mode1 {
label = "mode1";
gpios = <&qcom_pinmux 41 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
linux,input-type = <EV_SW>;
debounce-interval = <60>;
wakeup-source;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&leds_pins>;
pinctrl-names = "default";
led_power_green: power_green {
label = "green:power";
gpios = <&qcom_pinmux 14 GPIO_ACTIVE_HIGH>;
};
led_power_red: power_red {
label = "red:power";
gpios = <&qcom_pinmux 35 GPIO_ACTIVE_HIGH>;
};
active_green {
label = "green:active";
gpios = <&qcom_pinmux 42 GPIO_ACTIVE_HIGH>;
};
active_red {
label = "red:active";
gpios = <&qcom_pinmux 38 GPIO_ACTIVE_HIGH>;
};
wlan2g_green {
label = "green:wlan2g";
gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy1tpt";
};
wlan2g_red {
label = "red:wlan2g";
gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
};
wlan5g_green {
label = "green:wlan5g";
gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
wlan5g_red {
label = "red:wlan5g";
gpios = <&qcom_pinmux 58 GPIO_ACTIVE_HIGH>;
};
tv_green {
label = "green:tv";
gpios = <&qcom_pinmux 46 GPIO_ACTIVE_HIGH>;
};
tv_red {
label = "red:tv";
gpios = <&qcom_pinmux 36 GPIO_ACTIVE_HIGH>;
};
converter_green {
label = "green:converter";
gpios = <&qcom_pinmux 43 GPIO_ACTIVE_HIGH>;
};
converter_red {
label = "red:converter";
gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
};
};
};
/* nand_pins are used for leds_pins, empty the node
* from ipq8064.dtsi
*/
&nand_pins {
/delete-property/ disable;
/delete-property/ pullups;
/delete-property/ hold;
};
&qcom_pinmux {
pinctrl-0 = <&akro_pins>;
pinctrl-names = "default";
spi_pins: spi_pins {
mux {
pins = "gpio18", "gpio19", "gpio21";
function = "gsbi5";
bias-pull-down;
};
data {
pins = "gpio18", "gpio19";
drive-strength = <10>;
};
cs {
pins = "gpio20";
drive-strength = <10>;
};
clk {
pins = "gpio21";
drive-strength = <12>;
};
};
buttons_pins: buttons_pins {
mux {
pins = "gpio22", "gpio24", "gpio40",
"gpio41";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
leds_pins: leds_pins {
mux {
pins = "gpio14", "gpio15", "gpio35",
"gpio36", "gpio38", "gpio42",
"gpio43", "gpio46", "gpio55",
"gpio56", "gpio57", "gpio58";
function = "gpio";
bias-pull-down;
};
akro2 {
pins = "gpio15", "gpio35", "gpio38",
"gpio42", "gpio43", "gpio46",
"gpio55", "gpio56", "gpio57",
"gpio58";
drive-strength = <2>;
};
akro4 {
pins = "gpio14", "gpio36";
drive-strength = <4>;
};
};
/*
* Stock firmware has the following settings, so let's do the same.
* I don't sure why these are required.
*/
akro_pins: akro_pinmux {
akro {
pins = "gpio17", "gpio26", "gpio47";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};
reset {
pins = "gpio45";
function = "gpio";
drive-strength = <2>;
bias-disable;
output-low;
};
gmac0_rgmii {
pins = "gpio25";
function = "gpio";
drive-strength = <8>;
bias-disable;
};
};
};
&gsbi5 {
status = "okay";
qcom,mode = <GSBI_PROT_SPI>;
spi@1a280000 {
status = "okay";
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "SBL1";
reg = <0x0000000 0x0020000>;
read-only;
};
partition@20000 {
label = "MIBIB";
reg = <0x0020000 0x0020000>;
read-only;
};
partition@40000 {
label = "SBL2";
reg = <0x0040000 0x0040000>;
read-only;
};
partition@80000 {
label = "SBL3";
reg = <0x0080000 0x0080000>;
read-only;
};
partition@100000 {
label = "DDRCONFIG";
reg = <0x0100000 0x0010000>;
read-only;
};
partition@110000 {
label = "SSD";
reg = <0x0110000 0x0010000>;
read-only;
};
partition@120000 {
label = "TZ";
reg = <0x0120000 0x0080000>;
read-only;
};
partition@1a0000 {
label = "RPM";
reg = <0x01a0000 0x0080000>;
read-only;
};
partition@220000 {
label = "APPSBL";
reg = <0x0220000 0x0080000>;
read-only;
};
partition@2a0000 {
label = "APPSBLENV";
reg = <0x02a0000 0x0010000>;
read-only;
};
factory: partition@2b0000 {
label = "PRODUCTDATA";
reg = <0x02b0000 0x0030000>;
read-only;
};
partition@2e0000 {
label = "ART";
reg = <0x02e0000 0x0040000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
precal_ART_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};
precal_ART_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};
partition@320000 {
label = "TP";
reg = <0x0320000 0x0040000>;
read-only;
};
partition@360000 {
label = "TINY";
reg = <0x0360000 0x0500000>;
read-only;
};
partition@860000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x0860000 0x17a0000>;
};
};
};
};
};
&adm_dma {
status = "okay";
};
&pcie0 {
status = "okay";
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi@1,0 {
compatible = "qcom,ath10k";
reg = <0x00010000 0 0 0 0>;
qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
&pcie1 {
status = "okay";
force_gen1 = <1>;
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi@1,0 {
compatible = "qcom,ath10k";
reg = <0x00010000 0 0 0 0>;
ieee80211-freq-limit = <2400000 2483000>;
qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
&mdio0 {
status = "okay";
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x04 0x80080080 /* PAD0_MODE */
0x0c 0x06000000 /* PAD6_MODE */
0x10 0x002613a0 /* PWS_REG */
0x50 0xcc36cc36 /* LED_CTRL0 */
0x54 0xca36ca36 /* LED_CTRL1 */
0x58 0xc936c936 /* LED_CTRL2 */
0x5c 0x03ffff00 /* LED_CTRL3 */
0x7c 0x0000004e /* PORT0_STATUS */
0x94 0x0000004e /* PORT6_STATUS */
0xe0 0xc74164de /* SGMII_CTRL */
0xe4 0x0006a545 /* MAC_PWR_SEL */
>;
};
};
&gmac1 {
status = "okay";
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
phy-mode = "rgmii";
qcom,id = <1>;
mdiobus = <&mdio0>;
nvmem-cells = <&macaddr_factory_0>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <2>;
mdiobus = <&mdio0>;
nvmem-cells = <&macaddr_factory_6>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;
};
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_0: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_factory_6: macaddr@6 {
reg = <0x6 0x6>;
};
macaddr_PRODUCTDATA_c: macaddr@c {
reg = <0xc 0x6>;
};
macaddr_PRODUCTDATA_12: macaddr@12 {
reg = <0x12 0x6>;
};
};
&hs_phy_0 {
status = "okay";
};
&ss_phy_0 {
status = "okay";
};
&usb3_0 {
status = "okay";
};
&hs_phy_1 {
status = "okay";
};
&ss_phy_1 {
status = "okay";
};
&usb3_1 {
status = "okay";
};

View File

@ -0,0 +1,391 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq8064-v2.0-smb208.dtsi"
#include <dt-bindings/input/input.h>
/ {
memory@0 {
reg = <0x42000000 0x1e000000>;
device_type = "memory";
};
aliases {
mdio-gpio0 = &mdio0;
label-mac-device = &gmac2;
};
};
&qcom_pinmux {
spi_pins: spi_pins {
mux {
pins = "gpio18", "gpio19", "gpio21";
function = "gsbi5";
bias-pull-down;
};
data {
pins = "gpio18", "gpio19";
drive-strength = <10>;
};
cs {
pins = "gpio20";
function = "gpio";
drive-strength = <10>;
bias-pull-up;
};
clk {
pins = "gpio21";
drive-strength = <12>;
};
};
usb0_pwr_en_pin: usb0_pwr_en_pin {
mux {
pins = "gpio25";
function = "gpio";
drive-strength = <10>;
bias-pull-up;
output-high;
};
};
usb1_pwr_en_pin: usb1_pwr_en_pin {
mux {
pins = "gpio23";
function = "gpio";
drive-strength = <10>;
bias-pull-up;
output-high;
};
};
};
&gsbi5 {
qcom,mode = <GSBI_PROT_SPI>;
status = "okay";
spi@1a280000 {
status = "okay";
pinctrl-0 = <&spi_pins>;
pinctrl-names = "default";
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
flash@0 {
compatible = "jedec,spi-nor";
#address-cells = <1>;
#size-cells = <1>;
spi-max-frequency = <50000000>;
reg = <0>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "SBL1";
reg = <0x0 0x20000>;
read-only;
};
partition@20000 {
label = "MIBIB";
reg = <0x20000 0x20000>;
read-only;
};
partition@40000 {
label = "SBL2";
reg = <0x40000 0x20000>;
read-only;
};
partition@60000 {
label = "SBL3";
reg = <0x60000 0x30000>;
read-only;
};
partition@90000 {
label = "DDRCONFIG";
reg = <0x90000 0x10000>;
read-only;
};
partition@a0000 {
label = "SSD";
reg = <0xa0000 0x10000>;
read-only;
};
partition@b0000 {
label = "TZ";
reg = <0xb0000 0x30000>;
read-only;
};
partition@e0000 {
label = "RPM";
reg = <0xe0000 0x20000>;
read-only;
};
partition@100000 {
label = "fs-uboot";
reg = <0x100000 0x70000>;
read-only;
};
partition@170000 {
label = "uboot-env";
reg = <0x170000 0x40000>;
read-only;
};
partition@1b0000 {
label = "radio";
reg = <0x1b0000 0x40000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
precal_radio_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};
precal_radio_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};
partition@1f0000 {
label = "os-image";
reg = <0x1f0000 0x400000>;
};
partition@5f0000 {
label = "rootfs";
reg = <0x5f0000 0x1900000>;
};
defaultmac: partition@1ef0000 {
label = "default-mac";
reg = <0x1ef0000 0x00200>;
read-only;
};
partition@1ef0200 {
label = "pin";
reg = <0x1ef0200 0x00200>;
read-only;
};
partition@1ef0400 {
label = "product-info";
reg = <0x1ef0400 0x0fc00>;
read-only;
};
partition@1f00000 {
label = "partition-table";
reg = <0x1f00000 0x10000>;
read-only;
};
partition@1f10000 {
label = "soft-version";
reg = <0x1f10000 0x10000>;
read-only;
};
partition@1f20000 {
label = "support-list";
reg = <0x1f20000 0x10000>;
read-only;
};
partition@1f30000 {
label = "profile";
reg = <0x1f30000 0x10000>;
read-only;
};
partition@1f40000 {
label = "default-config";
reg = <0x1f40000 0x10000>;
read-only;
};
partition@1f50000 {
label = "user-config";
reg = <0x1f50000 0x40000>;
read-only;
};
partition@1f90000 {
label = "qos-db";
reg = <0x1f90000 0x40000>;
read-only;
};
partition@1fd0000 {
label = "usb-config";
reg = <0x1fd0000 0x10000>;
read-only;
};
partition@1fe0000 {
label = "log";
reg = <0x1fe0000 0x20000>;
read-only;
};
};
};
};
};
&hs_phy_0 {
status = "okay";
};
&ss_phy_0 {
status = "okay";
};
&usb3_0 {
status = "okay";
pinctrl-0 = <&usb0_pwr_en_pin>;
pinctrl-names = "default";
};
&hs_phy_1 {
status = "okay";
};
&ss_phy_1 {
status = "okay";
};
&usb3_1 {
status = "okay";
pinctrl-0 = <&usb1_pwr_en_pin>;
pinctrl-names = "default";
};
&pcie0 {
status = "okay";
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi@1,0 {
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;
nvmem-cells = <&macaddr_defaultmac_8>, <&precal_radio_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(-1)>;
};
};
};
&pcie1 {
status = "okay";
max-link-speed = <1>;
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi@1,0 {
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;
nvmem-cells = <&macaddr_defaultmac_8>, <&precal_radio_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
};
};
};
&mdio0 {
status = "okay";
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x000e4 0x6a545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
};
phy4: ethernet-phy@4 {
reg = <4>;
};
};
&gmac1 {
status = "okay";
phy-mode = "rgmii";
qcom,id = <1>;
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
nvmem-cells = <&macaddr_defaultmac_8>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <2>;
nvmem-cells = <&macaddr_defaultmac_8>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;
};
};
&adm_dma {
status = "okay";
};
&defaultmac {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_defaultmac_8: macaddr@8 {
reg = <0x8 0x6>;
};
};

View File

@ -0,0 +1,135 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq8064-ad7200-c2600.dtsi"
/ {
model = "TP-Link Talon AD7200";
compatible = "tplink,ad7200", "qcom,ipq8064";
aliases {
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};
keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
wifi {
label = "wifi";
gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
debounce-interval = <60>;
wakeup-source;
};
reset {
label = "reset";
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
wakeup-source;
};
wps {
label = "wps";
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
wakeup-source;
};
led_enable {
label = "led-enable";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
linux,code = <KEY_LIGHTS_TOGGLE>;
debounce-interval = <60>;
wakeup-source;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
lan {
label = "blue:lan";
gpios = <&qcom_pinmux 2 GPIO_ACTIVE_HIGH>;
};
usb1 {
label = "blue:usb1";
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
};
wlan5g {
label = "blue:wlan5g";
gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
};
usb3 {
label = "blue:usb3";
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
};
wlan2g {
label = "blue:wlan2g";
gpios = <&qcom_pinmux 17 GPIO_ACTIVE_HIGH>;
};
wan_orange {
label = "orange:wan";
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
};
wan_blue {
label = "blue:wan";
gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
};
wps {
label = "blue:wps";
gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
};
wlan60g {
label = "blue:wlan60g";
gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
};
led_status: status {
label = "blue:status";
gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
};
};
};
&qcom_pinmux {
button_pins: button_pins {
mux {
pins = "gpio53", "gpio54", "gpio67";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
led_pins: led_pins {
mux {
pins = "gpio2", "gpio8", "gpio15", "gpio16", "gpio17", "gpio26",
"gpio33", "gpio55", "gpio56", "gpio66";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
};
&pcie2 {
status = "okay";
max-link-speed = <1>;
};

View File

@ -0,0 +1,134 @@
#include "qcom-ipq8064-v1.0.dtsi"
/ {
model = "Qualcomm Technologies, Inc. IPQ8064/AP-148";
compatible = "qcom,ipq8064-ap148", "qcom,ipq8064";
memory@0 {
reg = <0x42000000 0x1e000000>;
device_type = "memory";
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
rsvd@41200000 {
reg = <0x41200000 0x300000>;
no-map;
};
};
aliases {
mdio-gpio0 = &mdio0;
};
};
&adm_dma {
status = "okay";
};
&flash {
partitions {
compatible = "qcom,smem-part";
};
};
&hs_phy_0 {
status = "okay";
};
&ss_phy_0 {
status = "okay";
};
&usb3_0 {
status = "okay";
};
&hs_phy_1 {
status = "okay";
};
&ss_phy_1 {
status = "okay";
};
&usb3_1 {
status = "okay";
};
&pcie0 {
status = "okay";
};
&pcie1 {
status = "okay";
max-link-speed = <1>;
};
&nand {
status = "okay";
nand@0 {
reg = <0>;
compatible = "qcom,nandcs";
nand-ecc-strength = <4>;
nand-bus-width = <8>;
nand-ecc-step-size = <512>;
partitions {
compatible = "qcom,smem-part";
};
};
};
&mdio0 {
status = "okay";
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x000e4 0x6a545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
};
phy4: ethernet-phy@4 {
reg = <4>;
};
};
&gmac1 {
status = "okay";
phy-mode = "rgmii";
qcom,id = <1>;
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <2>;
fixed-link {
speed = <1000>;
full-duplex;
};
};

View File

@ -0,0 +1,172 @@
#include "qcom-ipq8064-v1.0.dtsi"
/ {
model = "Qualcomm IPQ8064/AP161";
compatible = "qcom,ipq8064-ap161", "qcom,ipq8064";
memory@0 {
reg = <0x42000000 0x1e000000>;
device_type = "memory";
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
rsvd@41200000 {
reg = <0x41200000 0x300000>;
no-map;
};
};
aliases {
mdio-gpio0 = &mdio0;
};
};
&qcom_pinmux {
rgmii2_pins: rgmii2-pins {
mux {
pins = "gpio27", "gpio28", "gpio29",
"gpio30", "gpio31", "gpio32",
"gpio51", "gpio52", "gpio59",
"gpio60", "gpio61", "gpio62",
"gpio2", "gpio66";
};
};
};
&flash {
partitions {
compatible = "qcom,smem-part";
};
};
&hs_phy_0 {
status = "okay";
};
&ss_phy_0 {
status = "okay";
};
&usb3_0 {
status = "okay";
};
&hs_phy_1 {
status = "okay";
};
&ss_phy_1 {
status = "okay";
};
&usb3_1 {
status = "okay";
};
&pcie0 {
status = "okay";
};
&pcie1 {
status = "okay";
max-link-speed = <1>;
};
&pcie2 {
status = "okay";
};
&nand {
status = "okay";
nand@0 {
reg = <0>;
compatible = "qcom,nandcs";
nand-ecc-strength = <4>;
nand-bus-width = <8>;
nand-ecc-step-size = <512>;
partitions {
compatible = "qcom,smem-part";
};
};
};
&mdio0 {
status = "okay";
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x20080 /* PAD6_MODE */
0x000e4 0x6a545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
};
phy4: ethernet-phy@4 {
reg = <4>;
qca,phy-rgmii-en;
qca,txclk-delay-en;
qca,rxclk-delay-en;
};
phy3: ethernet-phy@3 {
device_type = "ethernet-phy";
reg = <3>;
};
};
&gmac0 {
status = "okay";
phy-mode = "rgmii";
qcom,id = <0>;
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
mdiobus = <&mdio0>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac1 {
status = "okay";
phy-mode = "rgmii";
qcom,id = <1>;
mdiobus = <&mdio0>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <2>;
mdiobus = <&mdio0>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&adm_dma {
status = "okay";
};

View File

@ -0,0 +1,119 @@
#include "qcom-ipq8064-ad7200-c2600.dtsi"
/ {
model = "TP-Link Archer C2600";
compatible = "tplink,c2600", "qcom,ipq8064";
aliases {
led-boot = &power;
led-failsafe = &general;
led-running = &power;
led-upgrade = &general;
};
keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
wifi {
label = "wifi";
gpios = <&qcom_pinmux 49 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
debounce-interval = <60>;
wakeup-source;
};
reset {
label = "reset";
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
wakeup-source;
};
wps {
label = "wps";
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
wakeup-source;
};
ledswitch {
label = "ledswitch";
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_LIGHTS_TOGGLE>;
debounce-interval = <60>;
wakeup-source;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
lan {
label = "white:lan";
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
};
usb4 {
label = "white:usb_4";
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
};
usb2 {
label = "white:usb_2";
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
};
wps {
label = "white:wps";
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
};
wan_amber {
label = "amber:wan";
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
};
wan_white {
label = "white:wan";
gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
};
power: power {
label = "white:power";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
general: general {
label = "white:general";
gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
};
};
};
&qcom_pinmux {
button_pins: button_pins {
mux {
pins = "gpio16", "gpio54", "gpio65";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
led_pins: led_pins {
mux {
pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio26", "gpio33",
"gpio53", "gpio66";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
};

View File

@ -0,0 +1,394 @@
#include "qcom-ipq8064-v2.0-smb208.dtsi"
#include <dt-bindings/input/input.h>
/ {
model = "Netgear Nighthawk X4 D7800";
compatible = "netgear,d7800", "qcom,ipq8064";
memory@0 {
reg = <0x42000000 0x1e000000>;
device_type = "memory";
};
reserved-memory {
rsvd@5fe00000 {
reg = <0x5fe00000 0x200000>;
reusable;
};
};
aliases {
mdio-gpio0 = &mdio0;
led-boot = &power_white;
led-failsafe = &power_amber;
led-running = &power_white;
led-upgrade = &power_amber;
};
chosen {
bootargs = "rootfstype=squashfs noinitrd";
};
keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
wifi {
label = "wifi";
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
debounce-interval = <60>;
wakeup-source;
};
reset {
label = "reset";
gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
wakeup-source;
};
wps {
label = "wps";
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
wakeup-source;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
usb1 {
label = "white:usb1";
gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
};
usb2 {
label = "white:usb2";
gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
};
power_amber: power_amber {
label = "amber:power";
gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
};
wan_white {
label = "white:wan";
gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
};
wan_amber {
label = "amber:wan";
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
};
wps {
label = "white:wps";
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
};
esata {
label = "white:esata";
gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
};
power_white: power_white {
label = "white:power";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};
wifi {
label = "white:wifi";
gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
};
};
};
&qcom_pinmux {
button_pins: button_pins {
mux {
pins = "gpio6", "gpio54", "gpio65";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
led_pins: led_pins {
mux {
pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
"gpio24","gpio26", "gpio53", "gpio64";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
usb0_pwr_en_pins: usb0_pwr_en_pins {
mux {
pins = "gpio15";
function = "gpio";
drive-strength = <12>;
bias-pull-down;
output-high;
};
};
usb1_pwr_en_pins: usb1_pwr_en_pins {
mux {
pins = "gpio16", "gpio68";
function = "gpio";
drive-strength = <12>;
bias-pull-down;
output-high;
};
};
};
&sata_phy {
status = "okay";
};
&sata {
status = "okay";
};
&hs_phy_0 {
status = "okay";
};
&ss_phy_0 {
status = "okay";
};
&usb3_0 {
status = "okay";
pinctrl-0 = <&usb0_pwr_en_pins>;
pinctrl-names = "default";
};
&hs_phy_1 {
status = "okay";
};
&ss_phy_1 {
status = "okay";
};
&usb3_1 {
status = "okay";
pinctrl-0 = <&usb1_pwr_en_pins>;
pinctrl-names = "default";
};
&pcie0 {
status = "okay";
reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&pcie0_pins>;
pinctrl-names = "default";
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi@1,0 {
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;
nvmem-cells = <&macaddr_art_6>, <&precal_art_1000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(1)>;
};
};
};
&pcie1 {
status = "okay";
reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&pcie1_pins>;
pinctrl-names = "default";
max-link-speed = <1>;
bridge@0,0 {
reg = <0x00000000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi@1,0 {
compatible = "pci168c,0040";
reg = <0x00010000 0 0 0 0>;
nvmem-cells = <&macaddr_art_6>, <&precal_art_5000>;
nvmem-cell-names = "mac-address", "pre-calibration";
mac-address-increment = <(2)>;
};
};
};
&pcie2 {
status = "okay";
reset-gpio = <&qcom_pinmux 63 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&pcie2_pins>;
pinctrl-names = "default";
};
&nand {
status = "okay";
nand@0 {
reg = <0>;
compatible = "qcom,nandcs";
nand-ecc-strength = <4>;
nand-bus-width = <8>;
nand-ecc-step-size = <512>;
nand-is-boot-medium;
qcom,boot-partitions = <0x0 0x1180000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
qcadata@0 {
label = "qcadata";
reg = <0x0000000 0x0c80000>;
read-only;
};
APPSBL@c80000 {
label = "APPSBL";
reg = <0x0c80000 0x0500000>;
read-only;
};
APPSBLENV@1180000 {
label = "APPSBLENV";
reg = <0x1180000 0x0080000>;
read-only;
};
art@1200000 {
label = "art";
reg = <0x1200000 0x0140000>;
read-only;
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
precal_art_1000: precal@1000 {
reg = <0x1000 0x2f20>;
};
precal_art_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};
artbak: art@1340000 {
label = "artbak";
reg = <0x1340000 0x0140000>;
read-only;
};
kernel@1480000 {
label = "kernel";
reg = <0x1480000 0x0400000>;
};
ubi@1880000 {
label = "ubi";
reg = <0x1880000 0x6080000>;
};
reserve@7900000 {
label = "reserve";
reg = <0x7900000 0x0700000>;
read-only;
};
};
};
};
&mdio0 {
status = "okay";
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x000e4 0x6a545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
};
phy4: ethernet-phy@4 {
reg = <4>;
};
};
&gmac1 {
status = "okay";
phy-mode = "rgmii";
qcom,id = <1>;
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <2>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;
};
};
&adm_dma {
status = "okay";
};

View File

@ -0,0 +1,179 @@
#include "qcom-ipq8064-v1.0.dtsi"
/ {
model = "Qualcomm IPQ8064/DB149";
compatible = "qcom,ipq8064-db149", "qcom,ipq8064";
aliases {
serial0 = &gsbi2_serial;
};
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
rsvd@41200000 {
reg = <0x41200000 0x300000>;
no-map;
};
};
};
&qcom_pinmux {
rgmii0_pins: rgmii0_pins {
mux {
pins = "gpio2", "gpio66";
drive-strength = <8>;
bias-disable;
};
};
};
&gsbi2 {
qcom,mode = <GSBI_PROT_I2C_UART>;
status = "okay";
gsbi2_serial: serial@12490000 {
status = "okay";
};
};
&gsbi4 {
status = "disabled";
};
&gsbi4_serial {
status = "disabled";
};
&flash {
m25p,fast-read;
partition@0 {
label = "lowlevel_init";
reg = <0x0 0x1b0000>;
};
partition@1 {
label = "u-boot";
reg = <0x1b0000 0x80000>;
};
partition@2 {
label = "u-boot-env";
reg = <0x230000 0x40000>;
};
partition@3 {
label = "caldata";
reg = <0x270000 0x40000>;
};
partition@4 {
label = "firmware";
reg = <0x2b0000 0x1d50000>;
};
};
&hs_phy_0 {
status = "okay";
};
&ss_phy_0 {
status = "okay";
};
&usb3_0 {
status = "okay";
};
&hs_phy_1 {
status = "okay";
};
&ss_phy_1 {
status = "okay";
};
&usb3_1 {
status = "okay";
};
&pcie0 {
status = "okay";
};
&pcie1 {
status = "okay";
};
&pcie2 {
status = "okay";
};
&mdio0 {
status = "okay";
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x000e4 0x6a545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
};
phy4: ethernet-phy@4 {
reg = <4>;
};
phy6: ethernet-phy@6 {
reg = <6>;
};
phy7: ethernet-phy@7 {
reg = <7>;
};
};
&gmac0 {
status = "okay";
phy-mode = "rgmii";
qcom,id = <0>;
phy-handle = <&phy4>;
pinctrl-0 = <&rgmii0_pins>;
pinctrl-names = "default";
};
&gmac1 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <1>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <2>;
phy-handle = <&phy6>;
};
&gmac3 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <3>;
phy-handle = <&phy7>;
};

View File

@ -0,0 +1,91 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq8064-eax500.dtsi"
/ {
model = "Linksys EA7500 V1 WiFi Router";
compatible = "linksys,ea7500-v1", "qcom,ipq8064";
memory@0 {
reg = <0x42000000 0xe000000>;
device_type = "memory";
};
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
/* look for root deviceblock nbr in this bootarg */
find-rootblock = "ubi.mtd=";
};
keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
reset {
label = "reset";
gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
wakeup-source;
};
wps {
label = "wps";
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
wakeup-source;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
led_power: power {
label = "white:power";
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
};
};
&qcom_pinmux {
button_pins: button_pins {
mux {
pins = "gpio65", "gpio68";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
led_pins: led_pins {
mux {
pins = "gpio6";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
};
&partitions {
partition@5f80000 {
label = "sysdiag";
reg = <0x5f80000 0x100000>;
};
partition@6080000 {
label = "syscfg";
reg = <0x6080000 0x1f80000>;
};
};

View File

@ -0,0 +1,128 @@
#include "qcom-ipq8064-eax500.dtsi"
/ {
model = "Linksys EA8500 WiFi Router";
compatible = "linksys,ea8500", "qcom,ipq8064";
memory@0 {
reg = <0x42000000 0x1e000000>;
device_type = "memory";
};
aliases {
mdio-gpio0 = &mdio0;
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
wifi {
label = "wifi";
gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
debounce-interval = <60>;
wakeup-source;
};
reset {
label = "reset";
gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
wakeup-source;
};
wps {
label = "wps";
gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
wakeup-source;
};
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
wps {
label = "green:wps";
gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
};
led_power: power {
label = "white:power";
gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wifi {
label = "green:wifi";
gpios = <&qcom_pinmux 54 GPIO_ACTIVE_HIGH>;
};
};
};
&qcom_pinmux {
button_pins: button_pins {
mux {
pins = "gpio65", "gpio67", "gpio68";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
led_pins: led_pins {
mux {
pins = "gpio6", "gpio53", "gpio54";
function = "gpio";
drive-strength = <2>;
bias-pull-up;
};
};
};
&sata_phy {
status = "okay";
};
&sata {
status = "okay";
};
&partitions {
partition@5f80000 {
label = "syscfg";
reg = <0x5f80000 0x2080000>;
};
};
&mdio0 {
phy4: ethernet-phy@4 {
reg = <4>;
};
};
&gmac1 {
qcom,phy_mdio_addr = <4>;
qcom,poll_required = <1>;
qcom,rgmii_delay = <0>;
qcom,emulation = <0>;
};
/* LAN */
&gmac2 {
qcom,phy_mdio_addr = <0>; /* none */
qcom,poll_required = <0>; /* no polling */
qcom,rgmii_delay = <0>;
qcom,emulation = <0>;
};

View File

@ -0,0 +1,220 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "qcom-ipq8064-v2.0-smb208.dtsi"
#include <dt-bindings/input/input.h>
/ {
chosen {
bootargs = "console=ttyMSM0,115200n8";
/* append to bootargs adding the root deviceblock nbr from bootloader */
append-rootblock = "ubi.mtd=";
};
};
&hs_phy_0 {
status = "okay";
};
&ss_phy_0 {
status = "okay";
};
&usb3_0 {
status = "okay";
};
&hs_phy_1 {
status = "okay";
};
&ss_phy_1 {
status = "okay";
};
&usb3_1 {
status = "okay";
};
&pcie0 {
status = "okay";
max-link-speed = <1>;
};
&pcie1 {
status = "okay";
};
&pcie2 {
status = "okay";
};
&nand {
status = "okay";
nand@0 {
reg = <0>;
compatible = "qcom,nandcs";
nand-ecc-strength = <4>;
nand-bus-width = <8>;
nand-ecc-step-size = <512>;
nand-is-boot-medium;
qcom,boot-partitions = <0x0 0x0c80000>;
partitions: partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "SBL1";
reg = <0x0000000 0x0040000>;
read-only;
};
partition@40000 {
label = "MIBIB";
reg = <0x0040000 0x0140000>;
read-only;
};
partition@180000 {
label = "SBL2";
reg = <0x0180000 0x0140000>;
read-only;
};
partition@2c0000 {
label = "SBL3";
reg = <0x02c0000 0x0280000>;
read-only;
};
partition@540000 {
label = "DDRCONFIG";
reg = <0x0540000 0x0120000>;
read-only;
};
partition@660000 {
label = "SSD";
reg = <0x0660000 0x0120000>;
read-only;
};
partition@780000 {
label = "TZ";
reg = <0x0780000 0x0280000>;
read-only;
};
partition@a00000 {
label = "RPM";
reg = <0x0a00000 0x0280000>;
read-only;
};
art: partition@c80000 {
label = "art";
reg = <0x0c80000 0x0140000>;
read-only;
};
partition@dc0000 {
label = "APPSBL";
reg = <0x0dc0000 0x0100000>;
read-only;
};
partition@ec0000 {
label = "u_env";
reg = <0x0ec0000 0x0040000>;
};
partition@f00000 {
label = "s_env";
reg = <0x0f00000 0x0040000>;
};
partition@f40000 {
label = "devinfo";
reg = <0x0f40000 0x0040000>;
};
partition@f80000 {
label = "kernel1";
reg = <0x0f80000 0x2800000>; /* 4 MB, spill to rootfs */
};
partition@1380000 {
label = "rootfs1";
reg = <0x1380000 0x2400000>;
};
partition@3780000 {
label = "kernel2";
reg = <0x3780000 0x2800000>;
};
partition@3b80000 {
label = "rootfs2";
reg = <0x3b80000 0x2400000>;
};
};
};
};
&mdio0 {
status = "okay";
pinctrl-0 = <&mdio0_pins>;
pinctrl-names = "default";
phy0: ethernet-phy@0 {
reg = <0>;
qca,ar8327-initvals = <
0x00004 0x7600000 /* PAD0_MODE */
0x00008 0x1000000 /* PAD5_MODE */
0x0000c 0x80 /* PAD6_MODE */
0x00010 0x2613a0 /* PWS_REG */
0x000e4 0x6a545 /* MAC_POWER_SEL */
0x000e0 0xc74164de /* SGMII_CTRL */
0x0007c 0x4e /* PORT0_STATUS */
0x00094 0x4e /* PORT6_STATUS */
>;
};
};
&gmac1 {
status = "okay";
phy-mode = "rgmii";
qcom,id = <1>;
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
phy-mode = "sgmii";
qcom,id = <2>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&adm_dma {
status = "okay";
};

Some files were not shown because too many files have changed in this diff Show More