airoha: update PCS driver with new upstream version

Manually update the PCS driver with new proposed upstream version. This
can't be normally cherry-picked from main branch as main branch now use
standalone PCS feature that is problematic to port for very old kernel
(6.6)

Link: https://github.com/openwrt/openwrt/pull/24263
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 443ec4032a78cbeb52c5761b7702033904fa6a11)
This commit is contained in:
Christian Marangi 2026-07-17 08:42:18 +02:00 committed by ahmed sassi
parent 9a7af8c489
commit ea18ff5339
4 changed files with 5777 additions and 3965 deletions

View File

@ -18,7 +18,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/drivers/net/pcs/airoha/pcs-airoha-common.c --- a/drivers/net/pcs/airoha/pcs-airoha-common.c
+++ b/drivers/net/pcs/airoha/pcs-airoha-common.c +++ b/drivers/net/pcs/airoha/pcs-airoha-common.c
@@ -82,6 +82,10 @@ static int airoha_pcs_setup_scu(struct a @@ -144,6 +144,10 @@ static int airoha_pcs_setup_scu(struct a
const struct airoha_pcs_match_data *data = priv->data; const struct airoha_pcs_match_data *data = priv->data;
int ret; int ret;
@ -29,7 +29,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
switch (data->port_type) { switch (data->port_type) {
case AIROHA_PCS_ETH: case AIROHA_PCS_ETH:
airoha_pcs_setup_scu_eth(priv, interface); airoha_pcs_setup_scu_eth(priv, interface);
@@ -91,6 +95,10 @@ static int airoha_pcs_setup_scu(struct a @@ -161,6 +165,10 @@ static int airoha_pcs_setup_scu(struct a
break; break;
} }
@ -40,7 +40,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
/* TODO better handle reset from MAC */ /* TODO better handle reset from MAC */
ret = reset_control_bulk_assert(ARRAY_SIZE(priv->rsts), ret = reset_control_bulk_assert(ARRAY_SIZE(priv->rsts),
priv->rsts); priv->rsts);
@@ -1003,6 +1011,10 @@ static int airoha_pcs_probe(struct platf @@ -1298,6 +1306,10 @@ static int airoha_pcs_probe(struct platf
if (ret) if (ret)
return dev_err_probe(dev, ret, "failed to get bulk reset lines\n"); return dev_err_probe(dev, ret, "failed to get bulk reset lines\n");
@ -53,11 +53,11 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* any SoC revision before E2. * any SoC revision before E2.
--- a/drivers/net/pcs/airoha/pcs-airoha.h --- a/drivers/net/pcs/airoha/pcs-airoha.h
+++ b/drivers/net/pcs/airoha/pcs-airoha.h +++ b/drivers/net/pcs/airoha/pcs-airoha.h
@@ -1184,6 +1184,7 @@ struct airoha_pcs_priv { @@ -1654,6 +1654,7 @@ struct airoha_pcs_priv {
struct regmap *xfi_pma; struct regmap *pcs_ana;
struct regmap *xfi_ana; struct regmap_field **pcs_ana_fields[2];
+ struct reset_control *xfi_rst; + struct reset_control *xfi_rst;
struct reset_control_bulk_data rsts[AIROHA_PCS_MAX_NUM_RSTS]; struct reset_control_bulk_data rsts[AIROHA_PCS_MAX_NUM_RSTS];
bool manual_rx_calib; struct phy *phy;