• Rafał Miłecki's avatar
    net: dsa: bcm_sf2: setup BCM4908 internal crossbar · a9349f08
    Rafał Miłecki authored
    On some SoCs (e.g. BCM4908, BCM631[345]8) SF2 has an integrated
    crossbar. It allows connecting its selected external ports to internal
    ports. It's used by vendors to handle custom Ethernet setups.
    
    BCM4908 has following 3x2 crossbar. On Asus GT-AC5300 rgmii is used for
    connecting external BCM53134S switch. GPHY4 is usually used for WAN
    port. More fancy devices use SerDes for 2.5 Gbps Ethernet.
    
                  ┌──────────┐
    SerDes ─── 0 ─┤          │
                  │   3x2    ├─ 0 ─── switch port 7
     GPHY4 ─── 1 ─┤          │
                  │ crossbar ├─ 1 ─── runner (accelerator)
     rgmii ─── 2 ─┤          │
                  └──────────┘
    
    Use setup data based on DT info to configure BCM4908's switch port 7.
    Right now only GPHY and rgmii variants are supported. Handling SerDes
    can be implemented later.
    Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
    Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a9349f08
bcm_sf2_regs.h 12.5 KB