xref: /openbmc/linux/Documentation/devicetree/bindings/phy/phy-miphy28lp.txt (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
15de985deSGabriel FERNANDEZSTMicroelectronics STi MIPHY28LP PHY binding
25de985deSGabriel FERNANDEZ============================================
35de985deSGabriel FERNANDEZ
45de985deSGabriel FERNANDEZThis binding describes a miphy device that is used to control PHY hardware
55de985deSGabriel FERNANDEZfor SATA, PCIe or USB3.
65de985deSGabriel FERNANDEZ
75de985deSGabriel FERNANDEZRequired properties (controller (parent) node):
85de985deSGabriel FERNANDEZ- compatible	: Should be "st,miphy28lp-phy".
95de985deSGabriel FERNANDEZ- st,syscfg	: Should be a phandle of the system configuration register group
105de985deSGabriel FERNANDEZ		  which contain the SATA, PCIe or USB3 mode setting bits.
115de985deSGabriel FERNANDEZ
125de985deSGabriel FERNANDEZRequired nodes	:  A sub-node is required for each channel the controller
135de985deSGabriel FERNANDEZ		   provides. Address range information including the usual
145de985deSGabriel FERNANDEZ		   'reg' and 'reg-names' properties are used inside these
155de985deSGabriel FERNANDEZ		   nodes to describe the controller's topology. These nodes
165de985deSGabriel FERNANDEZ		   are translated by the driver's .xlate() function.
175de985deSGabriel FERNANDEZ
185de985deSGabriel FERNANDEZRequired properties (port (child) node):
195de985deSGabriel FERNANDEZ- #phy-cells	: Should be 1 (See second example)
205de985deSGabriel FERNANDEZ		  Cell after port phandle is device type from:
215de985deSGabriel FERNANDEZ			- PHY_TYPE_SATA
225de985deSGabriel FERNANDEZ			- PHY_TYPE_PCI
235de985deSGabriel FERNANDEZ			- PHY_TYPE_USB3
245de985deSGabriel FERNANDEZ- reg		: Address and length of the register set for the device.
255de985deSGabriel FERNANDEZ- reg-names	: The names of the register addresses corresponding to the registers
265de985deSGabriel FERNANDEZ		  filled in "reg". It can also contain the offset of the system configuration
275de985deSGabriel FERNANDEZ		  registers used as glue-logic to setup the device for SATA/PCIe or USB3
285de985deSGabriel FERNANDEZ		  devices.
29*de6e0f84SGabriel FERNANDEZ- st,syscfg	: Offset of the parent configuration register.
305de985deSGabriel FERNANDEZ- resets	: phandle to the parent reset controller.
315de985deSGabriel FERNANDEZ- reset-names	: Associated name must be "miphy-sw-rst".
325de985deSGabriel FERNANDEZ
335de985deSGabriel FERNANDEZOptional properties (port (child) node):
345de985deSGabriel FERNANDEZ- st,osc-rdy		: to check the MIPHY0_OSC_RDY status in the glue-logic. This
355de985deSGabriel FERNANDEZ			  is not available in all the MiPHY. For example, for STiH407, only the
365de985deSGabriel FERNANDEZ			  MiPHY0 has this bit.
375de985deSGabriel FERNANDEZ- st,osc-force-ext	: to select the external oscillator. This can change from
385de985deSGabriel FERNANDEZ			  different MiPHY inside the same SoC.
395de985deSGabriel FERNANDEZ- st,sata_gen		: to select which SATA_SPDMODE has to be set in the SATA system config
405de985deSGabriel FERNANDEZ			  register.
415de985deSGabriel FERNANDEZ- st,px_rx_pol_inv	: to invert polarity of RXn/RXp (respectively negative line and positive
425de985deSGabriel FERNANDEZ			  line).
432b041b27SGabriel FERNANDEZ- st,scc-on		: enable ssc to reduce effects of EMI (only for sata or PCIe).
4428ba384dSGabriel FERNANDEZ- st,tx-impedance-comp	: to compensate tx impedance avoiding out of range values.
455de985deSGabriel FERNANDEZ
465de985deSGabriel FERNANDEZexample:
475de985deSGabriel FERNANDEZ
485de985deSGabriel FERNANDEZ		miphy28lp_phy: miphy28lp@9b22000 {
495de985deSGabriel FERNANDEZ			compatible = "st,miphy28lp-phy";
505de985deSGabriel FERNANDEZ			st,syscfg = <&syscfg_core>;
515de985deSGabriel FERNANDEZ			#address-cells	= <1>;
525de985deSGabriel FERNANDEZ			#size-cells	= <1>;
535de985deSGabriel FERNANDEZ			ranges;
545de985deSGabriel FERNANDEZ
555de985deSGabriel FERNANDEZ			phy_port0: port@9b22000 {
565de985deSGabriel FERNANDEZ				reg = <0x9b22000 0xff>,
575de985deSGabriel FERNANDEZ				      <0x9b09000 0xff>,
58*de6e0f84SGabriel FERNANDEZ				      <0x9b04000 0xff>;
595de985deSGabriel FERNANDEZ				reg-names = "sata-up",
605de985deSGabriel FERNANDEZ					    "pcie-up",
61*de6e0f84SGabriel FERNANDEZ					    "pipew";
62*de6e0f84SGabriel FERNANDEZ
63*de6e0f84SGabriel FERNANDEZ				st,syscfg = <0x114 0x818 0xe0 0xec>;
645de985deSGabriel FERNANDEZ				#phy-cells = <1>;
655de985deSGabriel FERNANDEZ				st,osc-rdy;
665de985deSGabriel FERNANDEZ				reset-names = "miphy-sw-rst";
675de985deSGabriel FERNANDEZ				resets = <&softreset STIH407_MIPHY0_SOFTRESET>;
685de985deSGabriel FERNANDEZ			};
695de985deSGabriel FERNANDEZ
705de985deSGabriel FERNANDEZ			phy_port1: port@9b2a000 {
715de985deSGabriel FERNANDEZ				reg = <0x9b2a000 0xff>,
725de985deSGabriel FERNANDEZ				      <0x9b19000 0xff>,
73*de6e0f84SGabriel FERNANDEZ				      <0x9b14000 0xff>;
745de985deSGabriel FERNANDEZ				reg-names = "sata-up",
755de985deSGabriel FERNANDEZ					    "pcie-up",
76*de6e0f84SGabriel FERNANDEZ					    "pipew";
77*de6e0f84SGabriel FERNANDEZ
78*de6e0f84SGabriel FERNANDEZ				st,syscfg = <0x118 0x81c 0xe4 0xf0>;
79*de6e0f84SGabriel FERNANDEZ
805de985deSGabriel FERNANDEZ				#phy-cells = <1>;
815de985deSGabriel FERNANDEZ				st,osc-force-ext;
825de985deSGabriel FERNANDEZ				reset-names = "miphy-sw-rst";
835de985deSGabriel FERNANDEZ				resets = <&softreset STIH407_MIPHY1_SOFTRESET>;
845de985deSGabriel FERNANDEZ			};
855de985deSGabriel FERNANDEZ
865de985deSGabriel FERNANDEZ			phy_port2: port@8f95000 {
875de985deSGabriel FERNANDEZ				reg = <0x8f95000 0xff>,
88*de6e0f84SGabriel FERNANDEZ				      <0x8f90000 0xff>;
895de985deSGabriel FERNANDEZ				reg-names = "pipew",
90*de6e0f84SGabriel FERNANDEZ					    "usb3-up";
91*de6e0f84SGabriel FERNANDEZ
92*de6e0f84SGabriel FERNANDEZ				st,syscfg = <0x11c 0x820>;
93*de6e0f84SGabriel FERNANDEZ
945de985deSGabriel FERNANDEZ				#phy-cells = <1>;
955de985deSGabriel FERNANDEZ				reset-names = "miphy-sw-rst";
965de985deSGabriel FERNANDEZ				resets = <&softreset STIH407_MIPHY2_SOFTRESET>;
975de985deSGabriel FERNANDEZ			};
985de985deSGabriel FERNANDEZ		};
995de985deSGabriel FERNANDEZ
1005de985deSGabriel FERNANDEZ
1015de985deSGabriel FERNANDEZSpecifying phy control of devices
1025de985deSGabriel FERNANDEZ=================================
1035de985deSGabriel FERNANDEZ
1045de985deSGabriel FERNANDEZDevice nodes should specify the configuration required in their "phys"
1055de985deSGabriel FERNANDEZproperty, containing a phandle to the miphy device node and an index
1065de985deSGabriel FERNANDEZspecifying which configuration to use, as described in phy-bindings.txt.
1075de985deSGabriel FERNANDEZ
1085de985deSGabriel FERNANDEZexample:
1095de985deSGabriel FERNANDEZ		sata0: sata@9b20000  {
1105de985deSGabriel FERNANDEZ			...
1115de985deSGabriel FERNANDEZ			phys		= <&phy_port0 PHY_TYPE_SATA>;
1125de985deSGabriel FERNANDEZ			...
1135de985deSGabriel FERNANDEZ		};
1145de985deSGabriel FERNANDEZ
1155de985deSGabriel FERNANDEZMacro definitions for the supported miphy configuration can be found in:
1165de985deSGabriel FERNANDEZ
117*de6e0f84SGabriel FERNANDEZinclude/dt-bindings/phy/phy.h
118