[PATCH 1/1] net: stmmac: rk3588: Allow multiple gmac controller
Sebastian Reichel
sebastian.reichel at collabora.com
Fri Oct 21 10:24:22 PDT 2022
From: Benjamin Gaignard <benjamin.gaignard at collabora.com>
RK3588(s) can have multiple gmac controllers.
Re-use rk3568 logic to distinguish them.
Fixes: 2f2b60a0ec28 ("net: ethernet: stmmac: dwmac-rk: Add gmac support for rk3588")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
---
This is required to access gmac1, which is the only existing controller
in the rk3588s (slim variant of rk3588).
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index f7269d79a385..6656d76b6766 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1243,6 +1243,12 @@ static const struct rk_gmac_ops rk3588_ops = {
.set_rgmii_speed = rk3588_set_gmac_speed,
.set_rmii_speed = rk3588_set_gmac_speed,
.set_clock_selection = rk3588_set_clock_selection,
+ .regs_valid = true,
+ .regs = {
+ 0xfe1b0000, /* gmac0 */
+ 0xfe1c0000, /* gmac1 */
+ 0x0, /* sentinel */
+ },
};
#define RV1108_GRF_GMAC_CON0 0X0900
--
2.35.1
More information about the Linux-rockchip
mailing list