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