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/ ====================
Unified · Split
| @@ -5,6 +5,7 @@ Required properties: · 4 unmodified lines | ||
| 5 | 5 | "marvell,armada-370-neta" |
| 6 | 6 | "marvell,armada-xp-neta" |
| 7 | 7 | "marvell,armada-3700-neta" |
| 8 | + "marvell,armada-ac5-neta" | |
| 8 | 9 | - reg: address and length of the register set for the device. |
| 9 | 10 | - interrupts: interrupt for the device |
| 10 | 11 | - phy: See ethernet.txt file in the same directory. |
| @@ -76,6 +76,8 @@ · 75 unmodified lines | ||
| 76 | 76 | #define MVNETA_WIN_SIZE(w) (0x2204 + ((w) << 3)) |
| 77 | 77 | #define MVNETA_WIN_REMAP(w) (0x2280 + ((w) << 2)) |
| 78 | 78 | #define MVNETA_BASE_ADDR_ENABLE 0x2290 |
| 79 | +#define MVNETA_AC5_CNM_DDR_TARGET 0x2 | |
| 80 | +#define MVNETA_AC5_CNM_DDR_ATTR 0xb | |
| 79 | 81 | #define MVNETA_ACCESS_PROTECT_ENABLE 0x2294 |
| 80 | 82 | #define MVNETA_PORT_CONFIG 0x2400 |
| 81 | 83 | #define MVNETA_UNI_PROMISC_MODE BIT(0) |
| @@ -544,6 +546,7 @@ struct mvneta_port { · 462 unmodified lines | ||
| 544 | 546 | |
| 545 | 547 | /* Flags for special SoC configurations */ |
| 546 | 548 | bool neta_armada3700; |
| 549 | + bool neta_ac5; | |
| 547 | 550 | u16 rx_offset_correction; |
| 548 | 551 | const struct mbus_dram_target_info *dram_target_info; |
| 549 | 552 | }; |
| @@ -5324,6 +5327,10 @@ static void mvneta_conf_mbus_windows(struct mvneta_port *pp, · 4774 unmodified lines | ||
| 5324 | 5327 | win_protect |= 3 << (2 * i); |
| 5325 | 5328 | } |
| 5326 | 5329 | } 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); | |
| 5327 | 5334 | /* For Armada3700 open default 4GB Mbus window, leaving |
| 5328 | 5335 | * arbitration of target/attribute to a different layer |
| 5329 | 5336 | * of configuration. |
| @@ -5409,6 +5416,10 @@ static int mvneta_probe(struct platform_device *pdev) · 79 unmodified lines | ||
| 5409 | 5416 | /* Get special SoC configurations */ |
| 5410 | 5417 | if (of_device_is_compatible(dn, "marvell,armada-3700-neta")) |
| 5411 | 5418 | 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 | + } | |
| 5412 | 5423 | |
| 5413 | 5424 | dev->irq = irq_of_parse_and_map(dn, 0); |
| 5414 | 5425 | if (dev->irq == 0) |
| @@ -5769,6 +5780,7 @@ static const struct of_device_id mvneta_match[] = { · 354 unmodified lines | ||
| 5769 | 5780 | { .compatible = "marvell,armada-370-neta" }, |
| 5770 | 5781 | { .compatible = "marvell,armada-xp-neta" }, |
| 5771 | 5782 | { .compatible = "marvell,armada-3700-neta" }, |
| 5783 | + { .compatible = "marvell,armada-ac5-neta" }, | |
| 5772 | 5784 | { } |
| 5773 | 5785 | }; |
| 5774 | 5786 | MODULE_DEVICE_TABLE(of, mvneta_match); |