1*c66ec88fSEmmanuel VadotSTMicroelectronics STi MIPHY365x PHY binding 2*c66ec88fSEmmanuel Vadot============================================ 3*c66ec88fSEmmanuel Vadot 4*c66ec88fSEmmanuel VadotThis binding describes a miphy device that is used to control PHY hardware 5*c66ec88fSEmmanuel Vadotfor SATA and PCIe. 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel VadotRequired properties (controller (parent) node): 8*c66ec88fSEmmanuel Vadot- compatible : Should be "st,miphy365x-phy" 9*c66ec88fSEmmanuel Vadot- st,syscfg : Phandle / integer array property. Phandle of sysconfig group 10*c66ec88fSEmmanuel Vadot containing the miphy registers and integer array should contain 11*c66ec88fSEmmanuel Vadot an entry for each port sub-node, specifying the control 12*c66ec88fSEmmanuel Vadot register offset inside the sysconfig group. 13*c66ec88fSEmmanuel Vadot 14*c66ec88fSEmmanuel VadotRequired nodes : A sub-node is required for each channel the controller 15*c66ec88fSEmmanuel Vadot provides. Address range information including the usual 16*c66ec88fSEmmanuel Vadot 'reg' and 'reg-names' properties are used inside these 17*c66ec88fSEmmanuel Vadot nodes to describe the controller's topology. These nodes 18*c66ec88fSEmmanuel Vadot are translated by the driver's .xlate() function. 19*c66ec88fSEmmanuel Vadot 20*c66ec88fSEmmanuel VadotRequired properties (port (child) node): 21*c66ec88fSEmmanuel Vadot- #phy-cells : Should be 1 (See second example) 22*c66ec88fSEmmanuel Vadot Cell after port phandle is device type from: 23*c66ec88fSEmmanuel Vadot - PHY_TYPE_SATA 24*c66ec88fSEmmanuel Vadot - PHY_TYPE_PCI 25*c66ec88fSEmmanuel Vadot- reg : Address and length of register sets for each device in 26*c66ec88fSEmmanuel Vadot "reg-names" 27*c66ec88fSEmmanuel Vadot- reg-names : The names of the register addresses corresponding to the 28*c66ec88fSEmmanuel Vadot registers filled in "reg": 29*c66ec88fSEmmanuel Vadot - sata: For SATA devices 30*c66ec88fSEmmanuel Vadot - pcie: For PCIe devices 31*c66ec88fSEmmanuel Vadot 32*c66ec88fSEmmanuel VadotOptional properties (port (child) node): 33*c66ec88fSEmmanuel Vadot- st,sata-gen : Generation of locally attached SATA IP. Expected values 34*c66ec88fSEmmanuel Vadot are {1,2,3). If not supplied generation 1 hardware will 35*c66ec88fSEmmanuel Vadot be expected 36*c66ec88fSEmmanuel Vadot- st,pcie-tx-pol-inv : Bool property to invert the polarity PCIe Tx (Txn/Txp) 37*c66ec88fSEmmanuel Vadot- st,sata-tx-pol-inv : Bool property to invert the polarity SATA Tx (Txn/Txp) 38*c66ec88fSEmmanuel Vadot 39*c66ec88fSEmmanuel VadotExample: 40*c66ec88fSEmmanuel Vadot 41*c66ec88fSEmmanuel Vadot miphy365x_phy: miphy365x@fe382000 { 42*c66ec88fSEmmanuel Vadot compatible = "st,miphy365x-phy"; 43*c66ec88fSEmmanuel Vadot st,syscfg = <&syscfg_rear 0x824 0x828>; 44*c66ec88fSEmmanuel Vadot #address-cells = <1>; 45*c66ec88fSEmmanuel Vadot #size-cells = <1>; 46*c66ec88fSEmmanuel Vadot ranges; 47*c66ec88fSEmmanuel Vadot 48*c66ec88fSEmmanuel Vadot phy_port0: port@fe382000 { 49*c66ec88fSEmmanuel Vadot reg = <0xfe382000 0x100>, <0xfe394000 0x100>; 50*c66ec88fSEmmanuel Vadot reg-names = "sata", "pcie"; 51*c66ec88fSEmmanuel Vadot #phy-cells = <1>; 52*c66ec88fSEmmanuel Vadot st,sata-gen = <3>; 53*c66ec88fSEmmanuel Vadot }; 54*c66ec88fSEmmanuel Vadot 55*c66ec88fSEmmanuel Vadot phy_port1: port@fe38a000 { 56*c66ec88fSEmmanuel Vadot reg = <0xfe38a000 0x100>, <0xfe804000 0x100>;; 57*c66ec88fSEmmanuel Vadot reg-names = "sata", "pcie", "syscfg"; 58*c66ec88fSEmmanuel Vadot #phy-cells = <1>; 59*c66ec88fSEmmanuel Vadot st,pcie-tx-pol-inv; 60*c66ec88fSEmmanuel Vadot }; 61*c66ec88fSEmmanuel Vadot }; 62*c66ec88fSEmmanuel Vadot 63*c66ec88fSEmmanuel VadotSpecifying phy control of devices 64*c66ec88fSEmmanuel Vadot================================= 65*c66ec88fSEmmanuel Vadot 66*c66ec88fSEmmanuel VadotDevice nodes should specify the configuration required in their "phys" 67*c66ec88fSEmmanuel Vadotproperty, containing a phandle to the phy port node and a device type. 68*c66ec88fSEmmanuel Vadot 69*c66ec88fSEmmanuel VadotExample: 70*c66ec88fSEmmanuel Vadot 71*c66ec88fSEmmanuel Vadot#include <dt-bindings/phy/phy.h> 72*c66ec88fSEmmanuel Vadot 73*c66ec88fSEmmanuel Vadot sata0: sata@fe380000 { 74*c66ec88fSEmmanuel Vadot ... 75*c66ec88fSEmmanuel Vadot phys = <&phy_port0 PHY_TYPE_SATA>; 76*c66ec88fSEmmanuel Vadot ... 77*c66ec88fSEmmanuel Vadot }; 78