net: dsa: b53: Add support for BCM585xx/586xx/88312 integrated switch
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 8 Jul 2016 18:39:13 +0000 (11:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jul 2016 19:52:03 +0000 (12:52 -0700)
Update the SRAB, core driver and binding document to support the
BCM585xx/586xx/88312 integrated switch (Northstar Plus SoCs family).

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/dsa/b53.txt
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/b53/b53_priv.h
drivers/net/dsa/b53/b53_srab.c

index ca752db14dffd4de9e82d3f3c8f1990bc98f99f4..d6c6e41648d4f17814ea43775e8591a40a4c0786 100644 (file)
@@ -20,6 +20,15 @@ Required properties:
       "brcm,bcm53018-srab"
       "brcm,bcm53019-srab" and the mandatory "brcm,bcm5301x-srab" string
 
+  For the BCM585xx/586XX/88312 SoCs with an integrated switch, must be one of:
+      "brcm,bcm58522-srab"
+      "brcm,bcm58523-srab"
+      "brcm,bcm58525-srab"
+      "brcm,bcm58622-srab"
+      "brcm,bcm58623-srab"
+      "brcm,bcm58625-srab"
+      "brcm,bcm88312-srab" and the mandatory "brcm,nsp-srab string
+
   For the BCM63xx/33xx SoCs with an integrated switch, must be one of:
       "brcm,bcm3384-switch"
       "brcm,bcm6328-switch"
index 444de66667b918946040de3fa14d4fc0aec44cd0..bda37d336736ef3ee845ade74cef63bcccf459fc 100644 (file)
@@ -1581,6 +1581,18 @@ static const struct b53_chip_data b53_switch_chips[] = {
                .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
                .jumbo_size_reg = B53_JUMBO_MAX_SIZE,
        },
+       {
+               .chip_id = BCM58XX_DEVICE_ID,
+               .dev_name = "BCM585xx/586xx/88312",
+               .vlans  = 4096,
+               .enabled_ports = 0x1ff,
+               .arl_entries = 4,
+               .cpu_port = B53_CPU_PORT_25,
+               .vta_regs = B53_VTA_REGS,
+               .duplex_reg = B53_DUPLEX_STAT_GE,
+               .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
+               .jumbo_size_reg = B53_JUMBO_MAX_SIZE,
+       },
 };
 
 static int b53_switch_init(struct b53_device *dev)
index 5d8c602fb877b4e62ff84f54983ccfbee6878388..835a744f206e8b35745e4f465c2b08c43bfaddf4 100644 (file)
@@ -59,6 +59,7 @@ enum {
        BCM53012_DEVICE_ID = 0x53012,
        BCM53018_DEVICE_ID = 0x53018,
        BCM53019_DEVICE_ID = 0x53019,
+       BCM58XX_DEVICE_ID = 0x5800,
 };
 
 #define B53_N_PORTS    9
index de2b9e710041288aa1b8fc34439dae9ef705f0de..2b304eaeb8e88572a47d37087b710970fb7d6aa9 100644 (file)
@@ -364,6 +364,14 @@ static const struct of_device_id b53_srab_of_match[] = {
        { .compatible = "brcm,bcm53018-srab" },
        { .compatible = "brcm,bcm53019-srab" },
        { .compatible = "brcm,bcm5301x-srab" },
+       { .compatible = "brcm,bcm58522-srab", .data = (void *)BCM58XX_DEVICE_ID },
+       { .compatible = "brcm,bcm58525-srab", .data = (void *)BCM58XX_DEVICE_ID },
+       { .compatible = "brcm,bcm58535-srab", .data = (void *)BCM58XX_DEVICE_ID },
+       { .compatible = "brcm,bcm58622-srab", .data = (void *)BCM58XX_DEVICE_ID },
+       { .compatible = "brcm,bcm58623-srab", .data = (void *)BCM58XX_DEVICE_ID },
+       { .compatible = "brcm,bcm58625-srab", .data = (void *)BCM58XX_DEVICE_ID },
+       { .compatible = "brcm,bcm88312-srab", .data = (void *)BCM58XX_DEVICE_ID },
+       { .compatible = "brcm,nsp-srab", .data = (void *)BCM58XX_DEVICE_ID },
        { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, b53_srab_of_match);