1*4882a593SmuzhiyunSTMicroelectronics STi MIPHY28LP PHY binding 2*4882a593Smuzhiyun============================================ 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunThis binding describes a miphy device that is used to control PHY hardware 5*4882a593Smuzhiyunfor SATA, PCIe or USB3. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunRequired properties (controller (parent) node): 8*4882a593Smuzhiyun- compatible : Should be "st,miphy28lp-phy". 9*4882a593Smuzhiyun- st,syscfg : Should be a phandle of the system configuration register group 10*4882a593Smuzhiyun which contain the SATA, PCIe or USB3 mode setting bits. 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunRequired nodes : A sub-node is required for each channel the controller 13*4882a593Smuzhiyun provides. Address range information including the usual 14*4882a593Smuzhiyun 'reg' and 'reg-names' properties are used inside these 15*4882a593Smuzhiyun nodes to describe the controller's topology. These nodes 16*4882a593Smuzhiyun are translated by the driver's .xlate() function. 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunRequired properties (port (child) node): 19*4882a593Smuzhiyun- #phy-cells : Should be 1 (See second example) 20*4882a593Smuzhiyun Cell after port phandle is device type from: 21*4882a593Smuzhiyun - PHY_TYPE_SATA 22*4882a593Smuzhiyun - PHY_TYPE_PCI 23*4882a593Smuzhiyun - PHY_TYPE_USB3 24*4882a593Smuzhiyun- reg : Address and length of the register set for the device. 25*4882a593Smuzhiyun- reg-names : The names of the register addresses corresponding to the registers 26*4882a593Smuzhiyun filled in "reg". It can also contain the offset of the system configuration 27*4882a593Smuzhiyun registers used as glue-logic to setup the device for SATA/PCIe or USB3 28*4882a593Smuzhiyun devices. 29*4882a593Smuzhiyun- st,syscfg : Offset of the parent configuration register. 30*4882a593Smuzhiyun- resets : phandle to the parent reset controller. 31*4882a593Smuzhiyun- reset-names : Associated name must be "miphy-sw-rst". 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunOptional properties (port (child) node): 34*4882a593Smuzhiyun- st,osc-rdy : to check the MIPHY0_OSC_RDY status in the glue-logic. This 35*4882a593Smuzhiyun is not available in all the MiPHY. For example, for STiH407, only the 36*4882a593Smuzhiyun MiPHY0 has this bit. 37*4882a593Smuzhiyun- st,osc-force-ext : to select the external oscillator. This can change from 38*4882a593Smuzhiyun different MiPHY inside the same SoC. 39*4882a593Smuzhiyun- st,sata_gen : to select which SATA_SPDMODE has to be set in the SATA system config 40*4882a593Smuzhiyun register. 41*4882a593Smuzhiyun- st,px_rx_pol_inv : to invert polarity of RXn/RXp (respectively negative line and positive 42*4882a593Smuzhiyun line). 43*4882a593Smuzhiyun- st,scc-on : enable ssc to reduce effects of EMI (only for sata or PCIe). 44*4882a593Smuzhiyun- st,tx-impedance-comp : to compensate tx impedance avoiding out of range values. 45*4882a593Smuzhiyun 46*4882a593Smuzhiyunexample: 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun miphy28lp_phy: miphy28lp@9b22000 { 49*4882a593Smuzhiyun compatible = "st,miphy28lp-phy"; 50*4882a593Smuzhiyun st,syscfg = <&syscfg_core>; 51*4882a593Smuzhiyun #address-cells = <1>; 52*4882a593Smuzhiyun #size-cells = <1>; 53*4882a593Smuzhiyun ranges; 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun phy_port0: port@9b22000 { 56*4882a593Smuzhiyun reg = <0x9b22000 0xff>, 57*4882a593Smuzhiyun <0x9b09000 0xff>, 58*4882a593Smuzhiyun <0x9b04000 0xff>; 59*4882a593Smuzhiyun reg-names = "sata-up", 60*4882a593Smuzhiyun "pcie-up", 61*4882a593Smuzhiyun "pipew"; 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun st,syscfg = <0x114 0x818 0xe0 0xec>; 64*4882a593Smuzhiyun #phy-cells = <1>; 65*4882a593Smuzhiyun st,osc-rdy; 66*4882a593Smuzhiyun reset-names = "miphy-sw-rst"; 67*4882a593Smuzhiyun resets = <&softreset STIH407_MIPHY0_SOFTRESET>; 68*4882a593Smuzhiyun }; 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun phy_port1: port@9b2a000 { 71*4882a593Smuzhiyun reg = <0x9b2a000 0xff>, 72*4882a593Smuzhiyun <0x9b19000 0xff>, 73*4882a593Smuzhiyun <0x9b14000 0xff>; 74*4882a593Smuzhiyun reg-names = "sata-up", 75*4882a593Smuzhiyun "pcie-up", 76*4882a593Smuzhiyun "pipew"; 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun st,syscfg = <0x118 0x81c 0xe4 0xf0>; 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun #phy-cells = <1>; 81*4882a593Smuzhiyun st,osc-force-ext; 82*4882a593Smuzhiyun reset-names = "miphy-sw-rst"; 83*4882a593Smuzhiyun resets = <&softreset STIH407_MIPHY1_SOFTRESET>; 84*4882a593Smuzhiyun }; 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun phy_port2: port@8f95000 { 87*4882a593Smuzhiyun reg = <0x8f95000 0xff>, 88*4882a593Smuzhiyun <0x8f90000 0xff>; 89*4882a593Smuzhiyun reg-names = "pipew", 90*4882a593Smuzhiyun "usb3-up"; 91*4882a593Smuzhiyun 92*4882a593Smuzhiyun st,syscfg = <0x11c 0x820>; 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun #phy-cells = <1>; 95*4882a593Smuzhiyun reset-names = "miphy-sw-rst"; 96*4882a593Smuzhiyun resets = <&softreset STIH407_MIPHY2_SOFTRESET>; 97*4882a593Smuzhiyun }; 98*4882a593Smuzhiyun }; 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun 101*4882a593SmuzhiyunSpecifying phy control of devices 102*4882a593Smuzhiyun================================= 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunDevice nodes should specify the configuration required in their "phys" 105*4882a593Smuzhiyunproperty, containing a phandle to the miphy device node and an index 106*4882a593Smuzhiyunspecifying which configuration to use, as described in phy-bindings.txt. 107*4882a593Smuzhiyun 108*4882a593Smuzhiyunexample: 109*4882a593Smuzhiyun sata0: sata@9b20000 { 110*4882a593Smuzhiyun ... 111*4882a593Smuzhiyun phys = <&phy_port0 PHY_TYPE_SATA>; 112*4882a593Smuzhiyun ... 113*4882a593Smuzhiyun }; 114*4882a593Smuzhiyun 115*4882a593SmuzhiyunMacro definitions for the supported miphy configuration can be found in: 116*4882a593Smuzhiyun 117*4882a593Smuzhiyuninclude/dt-bindings/phy/phy.h 118