18c2ecf20Sopenharmony_ciMicrosemi Ocelot SerDes muxing driver 28c2ecf20Sopenharmony_ci------------------------------------- 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciOn Microsemi Ocelot, there is a handful of registers in HSIO address 58c2ecf20Sopenharmony_cispace for setting up the SerDes to switch port muxing. 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciA SerDes X can be "muxed" to work with switch port Y or Z for example. 88c2ecf20Sopenharmony_ciOne specific SerDes can also be used as a PCIe interface. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciHence, a SerDes represents an interface, be it an Ethernet or a PCIe one. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciThere are two kinds of SerDes: SERDES1G supports 10/100Mbps in 138c2ecf20Sopenharmony_cihalf/full-duplex and 1000Mbps in full-duplex mode while SERDES6G supports 148c2ecf20Sopenharmony_ci10/100Mbps in half/full-duplex and 1000/2500Mbps in full-duplex mode. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciAlso, SERDES6G number (aka "macro") 0 is the only interface supporting 178c2ecf20Sopenharmony_ciQSGMII. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciThis is a child of the HSIO syscon ("mscc,ocelot-hsio", see 208c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/mips/mscc.txt) on the Microsemi Ocelot. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciRequired properties: 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci- compatible: should be "mscc,vsc7514-serdes" 258c2ecf20Sopenharmony_ci- #phy-cells : from the generic phy bindings, must be 2. 268c2ecf20Sopenharmony_ci The first number defines the input port to use for a given 278c2ecf20Sopenharmony_ci SerDes macro. The second defines the macro to use. They are 288c2ecf20Sopenharmony_ci defined in dt-bindings/phy/phy-ocelot-serdes.h 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciExample: 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci serdes: serdes { 338c2ecf20Sopenharmony_ci compatible = "mscc,vsc7514-serdes"; 348c2ecf20Sopenharmony_ci #phy-cells = <2>; 358c2ecf20Sopenharmony_ci }; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci ethernet { 388c2ecf20Sopenharmony_ci port1 { 398c2ecf20Sopenharmony_ci phy-handle = <&phy_foo>; 408c2ecf20Sopenharmony_ci /* Link SERDES1G_5 to port1 */ 418c2ecf20Sopenharmony_ci phys = <&serdes 1 SERDES1G_5>; 428c2ecf20Sopenharmony_ci }; 438c2ecf20Sopenharmony_ci }; 44