SRDS_PRTCL_S1 is latched at POR and read-only, so the RCW fixes the
SerDes 1 protocol. These patches let U-Boot re-bundle SD1's
8 lanes at runtime, before the MC latches the converter setup,
without changing the protocol number the RCW advertises:

  lx2160_sd1 100g4x25g   1x 100G + 4x 25G split (patch 1), both PLLF
  lx2160_sd1 2x40g       2x 100G -> 2x 40G, no split (patch 2), both PLLS
  lx2160_sd1 40g4x10g    40G port + 4x 10G split (patch 3), both PLLS
  lx2160_sd1 100g4x10g   1x 100G + 4x 10G split (patch 4), mixed PLLF + PLLS
  lx2160_serdes status   read-only view of any SerDes (patch 1)

Each mode is also reachable from hwconfig=serdes1:<mode> for the
boot path.

Based on next: the 100g4x25g split itself is already there as
035d68fc36b5 ("lx2160: add lx2160_serdes split and management"),
this series only builds on it.

Changes in v3:
- Incremental on top of next, where v1 is merged as 035d68fc36b5:
  v2 mistakenly re-sent the whole file as its patch 1 (reported by
  Vladimir Oltean). Patch 1 is now only the delta: the lx2160_sd1 /
  lx2160_serdes command split and the 100g4x25g naming.
- Patches 2-5 unchanged, rebased onto next

Changes in v2:
- The mode-changing command is lx2160_sd1, lx2160_serdes only reads
  (v1 had both behind one lx2160_serdes command)
- New patches 2-4: the runtime SD1 conversions for many cases of
  split (2x 100GE -> 2x 40GE, second 40GE port -> 4x 10G,
  1x 100GE + 4x 10G)
- New patch 5: hwconfig and README.soc documentation
- Mode names say what they produce: 100g4x25g (v1: split), 2x40g
  (was 40g), 40g4x10g (was 4x10g); 100g4x10g unchanged; same for the
  hwconfig serdes1: keys
- Rebased onto main

Vincent Jardin (5):
  board: lx2160a: lx2160_serdes to lx2160_sd1 and lx2160_serdes
  board: lx2160a: convert SD1 2x100GE to 2x40GE at runtime
  board: lx2160a: split SD1's second 40GE port into 4x 10G
  lx2160a: add SerDes 1 mode: 1x100GE + 4x10G (mix)
  doc: lx2160a: SerDes 1 runtime lane grouping

 .../cpu/armv8/fsl-layerscape/doc/README.soc   |  10 +
 board/nxp/lx2160a/eth_lx2160aqds.c            |   2 +-
 board/nxp/lx2160a/serdes_split.c              | 716 ++++++++++++++++--
 board/nxp/lx2160a/serdes_split.h              |  40 +-
 doc/README.fsl-hwconfig                       |  25 +
 5 files changed, 731 insertions(+), 62 deletions(-)

---
base-commit: 826ac8d2dc500fcc780647357032fea493e1f9bb
branch: for-upstream/lx2160a-serdes-split-v3

-- 
2.43.0

Reply via email to