xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mmc/sdhci-msm.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Qualcomm SDHCI controller (sdhci-msm)
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThis file documents differences between the core properties in mmc.txt
4*4882a593Smuzhiyunand the properties used by the sdhci-msm driver.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunRequired properties:
7*4882a593Smuzhiyun- compatible: Should contain a SoC-specific string and a IP version string:
8*4882a593Smuzhiyun	version strings:
9*4882a593Smuzhiyun		"qcom,sdhci-msm-v4" for sdcc versions less than 5.0
10*4882a593Smuzhiyun		"qcom,sdhci-msm-v5" for sdcc version 5.0
11*4882a593Smuzhiyun		For SDCC version 5.0.0, MCI registers are removed from SDCC
12*4882a593Smuzhiyun		interface and some registers are moved to HC. New compatible
13*4882a593Smuzhiyun		string is added to support this change - "qcom,sdhci-msm-v5".
14*4882a593Smuzhiyun	full compatible strings with SoC and version:
15*4882a593Smuzhiyun		"qcom,apq8084-sdhci", "qcom,sdhci-msm-v4"
16*4882a593Smuzhiyun		"qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"
17*4882a593Smuzhiyun		"qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"
18*4882a593Smuzhiyun		"qcom,msm8992-sdhci", "qcom,sdhci-msm-v4"
19*4882a593Smuzhiyun		"qcom,msm8996-sdhci", "qcom,sdhci-msm-v4"
20*4882a593Smuzhiyun		"qcom,sm8250-sdhci", "qcom,sdhci-msm-v5"
21*4882a593Smuzhiyun		"qcom,sdm845-sdhci", "qcom,sdhci-msm-v5"
22*4882a593Smuzhiyun		"qcom,qcs404-sdhci", "qcom,sdhci-msm-v5"
23*4882a593Smuzhiyun		"qcom,sc7180-sdhci", "qcom,sdhci-msm-v5";
24*4882a593Smuzhiyun	NOTE that some old device tree files may be floating around that only
25*4882a593Smuzhiyun	have the string "qcom,sdhci-msm-v4" without the SoC compatible string
26*4882a593Smuzhiyun	but doing that should be considered a deprecated practice.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun- reg: Base address and length of the register in the following order:
29*4882a593Smuzhiyun	- Host controller register map (required)
30*4882a593Smuzhiyun	- SD Core register map (required for controllers earlier than msm-v5)
31*4882a593Smuzhiyun	- CQE register map (Optional, CQE support is present on SDHC instance meant
32*4882a593Smuzhiyun	                    for eMMC and version v4.2 and above)
33*4882a593Smuzhiyun	- Inline Crypto Engine register map (optional)
34*4882a593Smuzhiyun- reg-names: When CQE register map is supplied, below reg-names are required
35*4882a593Smuzhiyun	- "hc" for Host controller register map
36*4882a593Smuzhiyun	- "core" for SD core register map
37*4882a593Smuzhiyun	- "cqhci" for CQE register map
38*4882a593Smuzhiyun	- "ice" for Inline Crypto Engine register map (optional)
39*4882a593Smuzhiyun- interrupts: Should contain an interrupt-specifiers for the interrupts:
40*4882a593Smuzhiyun	- Host controller interrupt (required)
41*4882a593Smuzhiyun- pinctrl-names: Should contain only one value - "default".
42*4882a593Smuzhiyun- pinctrl-0: Should specify pin control groups used for this controller.
43*4882a593Smuzhiyun- clocks: A list of phandle + clock-specifier pairs for the clocks listed in clock-names.
44*4882a593Smuzhiyun- clock-names: Should contain the following:
45*4882a593Smuzhiyun	"iface" - Main peripheral bus clock (PCLK/HCLK - AHB Bus clock) (required)
46*4882a593Smuzhiyun	"core"	- SDC MMC clock (MCLK) (required)
47*4882a593Smuzhiyun	"bus"	- SDCC bus voter clock (optional)
48*4882a593Smuzhiyun	"xo"	- TCXO clock (optional)
49*4882a593Smuzhiyun	"cal"	- reference clock for RCLK delay calibration (optional)
50*4882a593Smuzhiyun	"sleep"	- sleep clock for RCLK delay calibration (optional)
51*4882a593Smuzhiyun	"ice" - clock for Inline Crypto Engine (optional)
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun- qcom,ddr-config: Certain chipsets and platforms require particular settings
54*4882a593Smuzhiyun	for the DDR_CONFIG register. Use this field to specify the register
55*4882a593Smuzhiyun	value as per the Hardware Programming Guide.
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun- qcom,dll-config: Chipset and Platform specific value. Use this field to
58*4882a593Smuzhiyun	specify the DLL_CONFIG register value as per Hardware Programming Guide.
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunOptional Properties:
61*4882a593Smuzhiyun* Following bus parameters are required for interconnect bandwidth scaling:
62*4882a593Smuzhiyun- interconnects: Pairs of phandles and interconnect provider specifier
63*4882a593Smuzhiyun		 to denote the edge source and destination ports of
64*4882a593Smuzhiyun		 the interconnect path.
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun- interconnect-names: For sdhc, we have two main paths.
67*4882a593Smuzhiyun		1. Data path : sdhc to ddr
68*4882a593Smuzhiyun		2. Config path : cpu to sdhc
69*4882a593Smuzhiyun		For Data interconnect path the name supposed to be
70*4882a593Smuzhiyun		is "sdhc-ddr" and for config interconnect path it is
71*4882a593Smuzhiyun		"cpu-sdhc".
72*4882a593Smuzhiyun		Please refer to Documentation/devicetree/bindings/
73*4882a593Smuzhiyun		interconnect/ for more details.
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunExample:
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun	sdhc_1: sdhci@f9824900 {
78*4882a593Smuzhiyun		compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
79*4882a593Smuzhiyun		reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
80*4882a593Smuzhiyun		interrupts = <0 123 0>;
81*4882a593Smuzhiyun		bus-width = <8>;
82*4882a593Smuzhiyun		non-removable;
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun		vmmc-supply = <&pm8941_l20>;
85*4882a593Smuzhiyun		vqmmc-supply = <&pm8941_s3>;
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun		pinctrl-names = "default";
88*4882a593Smuzhiyun		pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>;
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun		clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
91*4882a593Smuzhiyun		clock-names = "core", "iface";
92*4882a593Smuzhiyun		interconnects = <&qnoc MASTER_SDCC_ID &qnoc SLAVE_DDR_ID>,
93*4882a593Smuzhiyun				<&qnoc MASTER_CPU_ID &qnoc SLAVE_SDCC_ID>;
94*4882a593Smuzhiyun		interconnect-names = "sdhc-ddr","cpu-sdhc";
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun		qcom,dll-config = <0x000f642c>;
97*4882a593Smuzhiyun		qcom,ddr-config = <0x80040868>;
98*4882a593Smuzhiyun	};
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun	sdhc_2: sdhci@f98a4900 {
101*4882a593Smuzhiyun		compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
102*4882a593Smuzhiyun		reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
103*4882a593Smuzhiyun		interrupts = <0 125 0>;
104*4882a593Smuzhiyun		bus-width = <4>;
105*4882a593Smuzhiyun		cd-gpios = <&msmgpio 62 0x1>;
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun		vmmc-supply = <&pm8941_l21>;
108*4882a593Smuzhiyun		vqmmc-supply = <&pm8941_l13>;
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun		pinctrl-names = "default";
111*4882a593Smuzhiyun		pinctrl-0 = <&sdc2_clk &sdc2_cmd &sdc2_data>;
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun		clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
114*4882a593Smuzhiyun		clock-names = "core", "iface";
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun		qcom,dll-config = <0x0007642c>;
117*4882a593Smuzhiyun		qcom,ddr-config = <0x80040868>;
118*4882a593Smuzhiyun	};
119