]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: rk3588: Allow multiple gmac controller
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Fri, 21 Oct 2022 17:24:22 +0000 (19:24 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Oct 2022 09:02:37 +0000 (11:02 +0200)
RK3588(s) can have multiple gmac controllers.
Re-use rk3568 logic to distinguish them.

Fixes: 581ce35de125 ("net: ethernet: stmmac: dwmac-rk: Add gmac support for rk3588")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20221021172422.88534-1-sebastian.reichel@collabora.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c

index f7269d79a3851d41779d96c510f23c2b1dba75c6..6656d76b6766b2049ec93cf83145d7ed0121ee8c 100644 (file)
@@ -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