aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-06-04 15:12:14 +0200
committerDavid Bauer <mail@david-bauer.net>2021-06-08 00:38:28 +0200
commit15167671b0d7cf0c95568dd6f9620db082df5d96 (patch)
tree2f282fa98f8329b63d8a63395a5ce18d8038d8b3 /target/linux/layerscape/patches-5.4
parent1412424fc51209480fa4efed9f3f0badc6dcab09 (diff)
downloadupstream-15167671b0d7cf0c95568dd6f9620db082df5d96.tar.gz
upstream-15167671b0d7cf0c95568dd6f9620db082df5d96.tar.bz2
upstream-15167671b0d7cf0c95568dd6f9620db082df5d96.zip
generic: backport at803x fixes
As patches for the AR8031/AR8033 copper page selection were merged upstream, we can backport these patches. This also fixes a PHY capabilities detection issue on the Ubiquiti ER-X-SFP. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/layerscape/patches-5.4')
-rw-r--r--target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch9
-rw-r--r--target/linux/layerscape/patches-5.4/701-net-0330-net-phy-at803x-add-vddio-1v8-and-eee-disable-support.patch26
2 files changed, 16 insertions, 19 deletions
diff --git a/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch b/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch
index 303d122459..f8dda3a22d 100644
--- a/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch
+++ b/target/linux/layerscape/patches-5.4/701-net-0327-at803x-Address-packet-drops-at-low-traffic-rate-due-.patch
@@ -41,7 +41,7 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
depends on BCM63XX || COMPILE_TEST
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
-@@ -63,6 +63,8 @@
+@@ -62,6 +62,8 @@
#define AT803X_DEBUG_REG_5 0x05
#define AT803X_DEBUG_TX_CLK_DLY_EN BIT(8)
@@ -50,8 +50,8 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
#define ATH8030_PHY_ID 0x004dd076
#define ATH8031_PHY_ID 0x004dd074
#define ATH8032_PHY_ID 0x004dd023
-@@ -257,6 +259,19 @@ static int at803x_probe(struct phy_devic
- return 0;
+@@ -299,10 +301,30 @@ static int at803x_probe(struct phy_devic
+ return ret;
}
+static void at803x_enable_smart_eee(struct phy_device *phydev, int on)
@@ -70,9 +70,6 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
static int at803x_config_init(struct phy_device *phydev)
{
int ret;
-@@ -282,6 +297,13 @@ static int at803x_config_init(struct phy
- return ret;
- }
+
+#ifdef CONFIG_AT803X_PHY_SMART_EEE
diff --git a/target/linux/layerscape/patches-5.4/701-net-0330-net-phy-at803x-add-vddio-1v8-and-eee-disable-support.patch b/target/linux/layerscape/patches-5.4/701-net-0330-net-phy-at803x-add-vddio-1v8-and-eee-disable-support.patch
index 32339191e4..7ae1ba3333 100644
--- a/target/linux/layerscape/patches-5.4/701-net-0330-net-phy-at803x-add-vddio-1v8-and-eee-disable-support.patch
+++ b/target/linux/layerscape/patches-5.4/701-net-0330-net-phy-at803x-add-vddio-1v8-and-eee-disable-support.patch
@@ -28,10 +28,10 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
#define AT803X_REG_CHIP_CONFIG 0x1f
#define AT803X_BT_BX_REG_SEL 0x8000
+#define AT803X_SMARTEEE_DISABLED_VAL 0x1000
- #define AT803X_SGMII_ANEG_EN 0x1000
#define AT803X_DEBUG_ADDR 0x1D
-@@ -65,6 +70,9 @@
+ #define AT803X_DEBUG_DATA 0x1E
+@@ -64,6 +69,9 @@
#define AT803X_LPI_EN BIT(8)
@@ -41,9 +41,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
#define ATH8030_PHY_ID 0x004dd076
#define ATH8031_PHY_ID 0x004dd074
#define ATH8032_PHY_ID 0x004dd023
-@@ -72,12 +80,16 @@
- #define AT803X_PHY_ID_MASK 0xffffffef
- #define AT8032_PHY_ID_MASK 0xffffffff
+@@ -74,12 +82,16 @@
+ #define AT803X_PAGE_FIBER 0
+ #define AT803X_PAGE_COPPER 1
+#define AT803X_EEE_FEATURE_DISABLE (1 << 1)
+#define AT803X_VDDIO_1P8V (1 << 2)
@@ -58,7 +58,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
};
struct at803x_context {
-@@ -141,6 +153,39 @@ static int at803x_disable_tx_delay(struc
+@@ -172,6 +184,39 @@ static int at803x_disable_tx_delay(struc
AT803X_DEBUG_TX_CLK_DLY_EN, 0);
}
@@ -98,7 +98,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
/* save relevant PHY registers to private copy */
static void at803x_context_save(struct phy_device *phydev,
struct at803x_context *context)
-@@ -254,6 +299,12 @@ static int at803x_probe(struct phy_devic
+@@ -286,6 +331,12 @@ static int at803x_probe(struct phy_devic
if (!priv)
return -ENOMEM;
@@ -110,16 +110,16 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
+
phydev->priv = priv;
- return 0;
-@@ -275,6 +326,7 @@ static void at803x_enable_smart_eee(stru
+ /* Some bootloaders leave the fiber page selected.
+@@ -316,6 +367,7 @@ static void at803x_enable_smart_eee(stru
+
static int at803x_config_init(struct phy_device *phydev)
{
- int ret;
+ struct at803x_priv *priv = phydev->priv;
- u32 v;
+ int ret;
+
- if (phydev->drv->phy_id == ATH8031_PHY_ID &&
-@@ -323,6 +375,18 @@ static int at803x_config_init(struct phy
+@@ -344,6 +396,18 @@ static int at803x_config_init(struct phy
else
ret = at803x_disable_tx_delay(phydev);