1*4882a593SmuzhiyunTI AM654 SERDES 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun - compatible: Should be "ti,phy-am654-serdes" 5*4882a593Smuzhiyun - reg : Address and length of the register set for the device. 6*4882a593Smuzhiyun - #phy-cells: determine the number of cells that should be given in the 7*4882a593Smuzhiyun phandle while referencing this phy. Should be "2". The 1st cell 8*4882a593Smuzhiyun corresponds to the phy type (should be one of the types specified in 9*4882a593Smuzhiyun include/dt-bindings/phy/phy.h) and the 2nd cell should be the serdes 10*4882a593Smuzhiyun lane function. 11*4882a593Smuzhiyun If SERDES0 is referenced 2nd cell should be: 12*4882a593Smuzhiyun 0 - USB3 13*4882a593Smuzhiyun 1 - PCIe0 Lane0 14*4882a593Smuzhiyun 2 - ICSS2 SGMII Lane0 15*4882a593Smuzhiyun If SERDES1 is referenced 2nd cell should be: 16*4882a593Smuzhiyun 0 - PCIe1 Lane0 17*4882a593Smuzhiyun 1 - PCIe0 Lane1 18*4882a593Smuzhiyun 2 - ICSS2 SGMII Lane1 19*4882a593Smuzhiyun - power-domains: As documented by the generic PM domain bindings in 20*4882a593Smuzhiyun Documentation/devicetree/bindings/power/power_domain.txt. 21*4882a593Smuzhiyun - clocks: List of clock-specifiers representing the input to the SERDES. 22*4882a593Smuzhiyun Should have 3 items representing the left input clock, external 23*4882a593Smuzhiyun reference clock and right input clock in that order. 24*4882a593Smuzhiyun - clock-output-names: List of clock names for each of the clock outputs of 25*4882a593Smuzhiyun SERDES. Should have 3 items for CMU reference clock, 26*4882a593Smuzhiyun left output clock and right output clock in that order. 27*4882a593Smuzhiyun - assigned-clocks: As defined in 28*4882a593Smuzhiyun Documentation/devicetree/bindings/clock/clock-bindings.txt 29*4882a593Smuzhiyun - assigned-clock-parents: As defined in 30*4882a593Smuzhiyun Documentation/devicetree/bindings/clock/clock-bindings.txt 31*4882a593Smuzhiyun - #clock-cells: Should be <1> to choose between the 3 output clocks. 32*4882a593Smuzhiyun Defined in Documentation/devicetree/bindings/clock/clock-bindings.txt 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun The following macros are defined in dt-bindings/phy/phy-am654-serdes.h 35*4882a593Smuzhiyun for selecting the correct reference clock. This can be used while 36*4882a593Smuzhiyun specifying the clocks created by SERDES. 37*4882a593Smuzhiyun => AM654_SERDES_CMU_REFCLK 38*4882a593Smuzhiyun => AM654_SERDES_LO_REFCLK 39*4882a593Smuzhiyun => AM654_SERDES_RO_REFCLK 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun - mux-controls: Phandle to the multiplexer that is used to select the lane 42*4882a593Smuzhiyun function. See #phy-cells above to see the multiplex values. 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunExample: 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunExample for SERDES0 is given below. It has 3 clock inputs; 47*4882a593Smuzhiyunleft input reference clock as indicated by <&k3_clks 153 4>, external 48*4882a593Smuzhiyunreference clock as indicated by <&k3_clks 153 1> and right input 49*4882a593Smuzhiyunreference clock as indicated by <&serdes1 AM654_SERDES_LO_REFCLK>. (The 50*4882a593Smuzhiyunright input of SERDES0 is connected to the left output of SERDES1). 51*4882a593Smuzhiyun 52*4882a593SmuzhiyunSERDES0 registers 3 clock outputs as indicated in clock-output-names. The 53*4882a593Smuzhiyunfirst refers to the CMU reference clock, second refers to the left output 54*4882a593Smuzhiyunreference clock and the third refers to the right output reference clock. 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunThe assigned-clocks and assigned-clock-parents is used here to set the 57*4882a593Smuzhiyunparent of left input reference clock to MAINHSDIV_CLKOUT4 and parent of 58*4882a593SmuzhiyunCMU reference clock to left input reference clock. 59*4882a593Smuzhiyun 60*4882a593Smuzhiyunserdes0: serdes@900000 { 61*4882a593Smuzhiyun compatible = "ti,phy-am654-serdes"; 62*4882a593Smuzhiyun reg = <0x0 0x900000 0x0 0x2000>; 63*4882a593Smuzhiyun reg-names = "serdes"; 64*4882a593Smuzhiyun #phy-cells = <2>; 65*4882a593Smuzhiyun power-domains = <&k3_pds 153>; 66*4882a593Smuzhiyun clocks = <&k3_clks 153 4>, <&k3_clks 153 1>, 67*4882a593Smuzhiyun <&serdes1 AM654_SERDES_LO_REFCLK>; 68*4882a593Smuzhiyun clock-output-names = "serdes0_cmu_refclk", "serdes0_lo_refclk", 69*4882a593Smuzhiyun "serdes0_ro_refclk"; 70*4882a593Smuzhiyun assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>; 71*4882a593Smuzhiyun assigned-clock-parents = <&k3_clks 153 8>, <&k3_clks 153 4>; 72*4882a593Smuzhiyun ti,serdes-clk = <&serdes0_clk>; 73*4882a593Smuzhiyun mux-controls = <&serdes_mux 0>; 74*4882a593Smuzhiyun #clock-cells = <1>; 75*4882a593Smuzhiyun}; 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunExample for PCIe consumer node using the SERDES PHY specifier is given below. 78*4882a593Smuzhiyun&pcie0_rc { 79*4882a593Smuzhiyun num-lanes = <2>; 80*4882a593Smuzhiyun phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>; 81*4882a593Smuzhiyun phy-names = "pcie-phy0", "pcie-phy1"; 82*4882a593Smuzhiyun}; 83