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