xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Universal Flash Storage (UFS) Host Controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunUFSHC nodes are defined to describe on-chip UFS host controllers.
4*4882a593SmuzhiyunEach UFS controller instance should have its own node.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunRequired properties:
7*4882a593Smuzhiyun- compatible		: must contain "jedec,ufs-1.1" or "jedec,ufs-2.0"
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun			  For Qualcomm SoCs must contain, as below, an
10*4882a593Smuzhiyun			  SoC-specific compatible along with "qcom,ufshc" and
11*4882a593Smuzhiyun			  the appropriate jedec string:
12*4882a593Smuzhiyun			    "qcom,msm8994-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
13*4882a593Smuzhiyun			    "qcom,msm8996-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
14*4882a593Smuzhiyun			    "qcom,msm8998-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
15*4882a593Smuzhiyun			    "qcom,sdm845-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
16*4882a593Smuzhiyun			    "qcom,sm8150-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
17*4882a593Smuzhiyun- interrupts        : <interrupt mapping for UFS host controller IRQ>
18*4882a593Smuzhiyun- reg               : <registers mapping>
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunOptional properties:
21*4882a593Smuzhiyun- phys                  : phandle to UFS PHY node
22*4882a593Smuzhiyun- phy-names             : the string "ufsphy" when is found in a node, along
23*4882a593Smuzhiyun                          with "phys" attribute, provides phandle to UFS PHY node
24*4882a593Smuzhiyun- vdd-hba-supply        : phandle to UFS host controller supply regulator node
25*4882a593Smuzhiyun- vcc-supply            : phandle to VCC supply regulator node
26*4882a593Smuzhiyun- vccq-supply           : phandle to VCCQ supply regulator node
27*4882a593Smuzhiyun- vccq2-supply          : phandle to VCCQ2 supply regulator node
28*4882a593Smuzhiyun- vcc-supply-1p8        : For embedded UFS devices, valid VCC range is 1.7-1.95V
29*4882a593Smuzhiyun                          or 2.7-3.6V. This boolean property when set, specifies
30*4882a593Smuzhiyun			  to use low voltage range of 1.7-1.95V. Note for external
31*4882a593Smuzhiyun			  UFS cards this property is invalid and valid VCC range is
32*4882a593Smuzhiyun			  always 2.7-3.6V.
33*4882a593Smuzhiyun- vcc-max-microamp      : specifies max. load that can be drawn from vcc supply
34*4882a593Smuzhiyun- vccq-max-microamp     : specifies max. load that can be drawn from vccq supply
35*4882a593Smuzhiyun- vccq2-max-microamp    : specifies max. load that can be drawn from vccq2 supply
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun- clocks                : List of phandle and clock specifier pairs
38*4882a593Smuzhiyun- clock-names           : List of clock input name strings sorted in the same
39*4882a593Smuzhiyun                          order as the clocks property.
40*4882a593Smuzhiyun			  "ref_clk" indicates reference clock frequency.
41*4882a593Smuzhiyun			  UFS host supplies reference clock to UFS device and UFS device
42*4882a593Smuzhiyun			  specification allows host to provide one of the 4 frequencies (19.2 MHz,
43*4882a593Smuzhiyun			  26 MHz, 38.4 MHz, 52MHz) for reference clock. This "ref_clk" entry is
44*4882a593Smuzhiyun			  parsed and used to update the reference clock setting in device.
45*4882a593Smuzhiyun			  Defaults to 26 MHz(as per specification) if not specified by host.
46*4882a593Smuzhiyun- freq-table-hz		: Array of <min max> operating frequencies stored in the same
47*4882a593Smuzhiyun                          order as the clocks property. If this property is not
48*4882a593Smuzhiyun			  defined or a value in the array is "0" then it is assumed
49*4882a593Smuzhiyun			  that the frequency is set by the parent clock or a
50*4882a593Smuzhiyun			  fixed rate clock source.
51*4882a593Smuzhiyun-lanes-per-direction	: number of lanes available per direction - either 1 or 2.
52*4882a593Smuzhiyun			  Note that it is assume same number of lanes is used both
53*4882a593Smuzhiyun			  directions at once. If not specified, default is 2 lanes per direction.
54*4882a593Smuzhiyun- #reset-cells		: Must be <1> for Qualcomm UFS controllers that expose
55*4882a593Smuzhiyun			  PHY reset from the UFS controller.
56*4882a593Smuzhiyun- resets            : reset node register
57*4882a593Smuzhiyun- reset-names       : describe reset node register, the "rst" corresponds to reset the whole UFS IP.
58*4882a593Smuzhiyun- reset-gpios       : A phandle and gpio specifier denoting the GPIO connected
59*4882a593Smuzhiyun		      to the RESET pin of the UFS memory device.
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunNote: If above properties are not defined it can be assumed that the supply
62*4882a593Smuzhiyunregulators or clocks are always on.
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunExample:
65*4882a593Smuzhiyun	ufshc@fc598000 {
66*4882a593Smuzhiyun		compatible = "jedec,ufs-1.1";
67*4882a593Smuzhiyun		reg = <0xfc598000 0x800>;
68*4882a593Smuzhiyun		interrupts = <0 28 0>;
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun		vdd-hba-supply = <&xxx_reg0>;
71*4882a593Smuzhiyun		vcc-supply = <&xxx_reg1>;
72*4882a593Smuzhiyun		vcc-supply-1p8;
73*4882a593Smuzhiyun		vccq-supply = <&xxx_reg2>;
74*4882a593Smuzhiyun		vccq2-supply = <&xxx_reg3>;
75*4882a593Smuzhiyun		vcc-max-microamp = 500000;
76*4882a593Smuzhiyun		vccq-max-microamp = 200000;
77*4882a593Smuzhiyun		vccq2-max-microamp = 200000;
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun		clocks = <&core 0>, <&ref 0>, <&phy 0>, <&iface 0>;
80*4882a593Smuzhiyun		clock-names = "core_clk", "ref_clk", "phy_clk", "iface_clk";
81*4882a593Smuzhiyun		freq-table-hz = <100000000 200000000>, <0 0>, <0 0>, <0 0>;
82*4882a593Smuzhiyun		resets = <&reset 0 1>;
83*4882a593Smuzhiyun		reset-names = "rst";
84*4882a593Smuzhiyun		phys = <&ufsphy1>;
85*4882a593Smuzhiyun		phy-names = "ufsphy";
86*4882a593Smuzhiyun		#reset-cells = <1>;
87*4882a593Smuzhiyun	};
88