History

Merge branch 'net-mvneta-armada-98dx2530-soc'

Chris Packham says: ==================== net: mvneta: Armada 98DX2530 SoC This is split off from [1] to let it go in via net-next rather than waiting for the rest of the series to land. [1] - https://lore.kernel.org/lkml/20220314213143.2404162-1-chris.packham@alliedtelesis.co.nz/ ====================

Paolo Abeni committed 4 years ago

Commit 82192c42 parents 05fc65f 2d2a5142 files · +13 −0Browse files

Unified · Split

2 files
  1. Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt +1 −0
  2. drivers/net/ethernet/marvell/mvneta.c +12 −0
Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt+1−0
@@ -5,6 +5,7 @@ Required properties: · 4 unmodified lines
55 "marvell,armada-370-neta"
66 "marvell,armada-xp-neta"
77 "marvell,armada-3700-neta"
8+ "marvell,armada-ac5-neta"
89 - reg: address and length of the register set for the device.
910 - interrupts: interrupt for the device
1011 - phy: See ethernet.txt file in the same directory.
drivers/net/ethernet/marvell/mvneta.c+12−0
@@ -76,6 +76,8 @@ · 75 unmodified lines
7676 #define MVNETA_WIN_SIZE(w) (0x2204 + ((w) << 3))
7777 #define MVNETA_WIN_REMAP(w) (0x2280 + ((w) << 2))
7878 #define MVNETA_BASE_ADDR_ENABLE 0x2290
79+#define MVNETA_AC5_CNM_DDR_TARGET 0x2
80+#define MVNETA_AC5_CNM_DDR_ATTR 0xb
7981 #define MVNETA_ACCESS_PROTECT_ENABLE 0x2294
8082 #define MVNETA_PORT_CONFIG 0x2400
8183 #define MVNETA_UNI_PROMISC_MODE BIT(0)
@@ -544,6 +546,7 @@ struct mvneta_port { · 462 unmodified lines
544546
545547 /* Flags for special SoC configurations */
546548 bool neta_armada3700;
549+ bool neta_ac5;
547550 u16 rx_offset_correction;
548551 const struct mbus_dram_target_info *dram_target_info;
549552 };
@@ -5324,6 +5327,10 @@ static void mvneta_conf_mbus_windows(struct mvneta_port *pp, · 4774 unmodified lines
53245327 win_protect |= 3 << (2 * i);
53255328 }
53265329 } else {
5330+ if (pp->neta_ac5)
5331+ mvreg_write(pp, MVNETA_WIN_BASE(0),
5332+ (MVNETA_AC5_CNM_DDR_ATTR << 8) |
5333+ MVNETA_AC5_CNM_DDR_TARGET);
53275334 /* For Armada3700 open default 4GB Mbus window, leaving
53285335 * arbitration of target/attribute to a different layer
53295336 * of configuration.
@@ -5409,6 +5416,10 @@ static int mvneta_probe(struct platform_device *pdev) · 79 unmodified lines
54095416 /* Get special SoC configurations */
54105417 if (of_device_is_compatible(dn, "marvell,armada-3700-neta"))
54115418 pp->neta_armada3700 = true;
5419+ if (of_device_is_compatible(dn, "marvell,armada-ac5-neta")) {
5420+ pp->neta_armada3700 = true;
5421+ pp->neta_ac5 = true;
5422+ }
54125423
54135424 dev->irq = irq_of_parse_and_map(dn, 0);
54145425 if (dev->irq == 0)
@@ -5769,6 +5780,7 @@ static const struct of_device_id mvneta_match[] = { · 354 unmodified lines
57695780 { .compatible = "marvell,armada-370-neta" },
57705781 { .compatible = "marvell,armada-xp-neta" },
57715782 { .compatible = "marvell,armada-3700-neta" },
5783+ { .compatible = "marvell,armada-ac5-neta" },
57725784 { }
57735785 };
57745786 MODULE_DEVICE_TABLE(of, mvneta_match);