• Vladimir Oltean's avatar
    net: dsa: sja1105: add support for the SJA1110 switch family · 3e77e59b
    Vladimir Oltean authored
    The SJA1110 is basically an SJA1105 with more ports, some integrated
    PHYs (100base-T1 and 100base-TX) and an embedded microcontroller which
    can be disabled, and the switch core can be controlled by a host running
    Linux, over SPI.
    
    This patch contains:
    - the static and dynamic config packing functions, for the tables that
      are common with SJA1105
    - one more static config tables which is "unique" to the SJA1110
      (actually it is a rehash of stuff that was placed somewhere else in
      SJA1105): the PCP Remapping Table
    - a reset and clock configuration procedure for the SJA1110 switch.
      This resets just the switch subsystem, and gates off the clock which
      powers on the embedded microcontroller.
    - an RGMII delay configuration procedure for SJA1110, which is very
      similar to SJA1105, but different enough for us to be unable to reuse
      it (this is a pattern that repeats itself)
    - some adaptations to dynamic config table entries which are no longer
      programmed in the same way. For example, to delete a VLAN, you used to
      write an entry through the dynamic reconfiguration interface with the
      desired VLAN ID, and with the VALIDENT bit set to false. Now, the VLAN
      table entries contain a TYPE_ENTRY field, which must be set to zero
      (in a backwards-incompatible way) in order for the entry to be deleted,
      or to some other entry for the VLAN to match "inner tagged" or "outer
      tagged" packets.
    - a similar thing for the static config: the xMII Mode Parameters Table
      encoding for SGMII and MII (the latter just when attached to a
      100base-TX PHY) just isn't what it used to be in SJA1105. They are
      identical, except there is an extra "special" bit which needs to be
      set. Set it.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3e77e59b
sja1105_clocking.c 24.3 KB