blob: 365c3fc122ea9d37f08f36e68ba4621ff9b920ec [file] [log] [blame]
Georgi Djakovd2529502014-03-10 17:37:11 +02001* Qualcomm SDHCI controller (sdhci-msm)
2
3This file documents differences between the core properties in mmc.txt
4and the properties used by the sdhci-msm driver.
5
6Required properties:
Veerabhadrarao Badiganti247cb8b2018-11-12 12:22:16 +05307- compatible: Should contain a SoC-specific string and a IP version string:
8 version strings:
Sayali Lokhandee0e4eee2018-06-19 11:09:20 +05309 "qcom,sdhci-msm-v4" for sdcc versions less than 5.0
Veerabhadrarao Badiganti247cb8b2018-11-12 12:22:16 +053010 "qcom,sdhci-msm-v5" for sdcc version 5.0
Sayali Lokhandee0e4eee2018-06-19 11:09:20 +053011 For SDCC version 5.0.0, MCI registers are removed from SDCC
12 interface and some registers are moved to HC. New compatible
13 string is added to support this change - "qcom,sdhci-msm-v5".
Veerabhadrarao Badiganti247cb8b2018-11-12 12:22:16 +053014 full compatible strings with SoC and version:
15 "qcom,apq8084-sdhci", "qcom,sdhci-msm-v4"
16 "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"
17 "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"
18 "qcom,msm8992-sdhci", "qcom,sdhci-msm-v4"
19 "qcom,msm8996-sdhci", "qcom,sdhci-msm-v4"
Veerabhadrarao Badiganti247cb8b2018-11-12 12:22:16 +053020 "qcom,qcs404-sdhci", "qcom,sdhci-msm-v5"
Veerabhadrarao Badigantiefcc69b2019-11-27 11:49:59 +000021 "qcom,sc7180-sdhci", "qcom,sdhci-msm-v5";
Shaik Sajida Bhanu1a769fb2021-06-16 14:50:07 +053022 "qcom,sc7280-sdhci", "qcom,sdhci-msm-v5";
Manivannan Sadhasivam9476e272021-01-07 20:01:17 +053023 "qcom,sdm845-sdhci", "qcom,sdhci-msm-v5"
24 "qcom,sdx55-sdhci", "qcom,sdhci-msm-v5";
25 "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5"
Veerabhadrarao Badiganti247cb8b2018-11-12 12:22:16 +053026 NOTE that some old device tree files may be floating around that only
27 have the string "qcom,sdhci-msm-v4" without the SoC compatible string
28 but doing that should be considered a deprecated practice.
29
Georgi Djakovd2529502014-03-10 17:37:11 +020030- reg: Base address and length of the register in the following order:
31 - Host controller register map (required)
Veerabhadrarao Badigantid79100c2020-02-24 17:27:50 +053032 - SD Core register map (required for controllers earlier than msm-v5)
33 - CQE register map (Optional, CQE support is present on SDHC instance meant
34 for eMMC and version v4.2 and above)
Eric Biggers5cc046e2021-01-25 16:14:54 -080035 - Inline Crypto Engine register map (optional)
Veerabhadrarao Badigantid79100c2020-02-24 17:27:50 +053036- reg-names: When CQE register map is supplied, below reg-names are required
37 - "hc" for Host controller register map
38 - "core" for SD core register map
39 - "cqhci" for CQE register map
Eric Biggers5cc046e2021-01-25 16:14:54 -080040 - "ice" for Inline Crypto Engine register map (optional)
Georgi Djakovd2529502014-03-10 17:37:11 +020041- interrupts: Should contain an interrupt-specifiers for the interrupts:
42 - Host controller interrupt (required)
43- pinctrl-names: Should contain only one value - "default".
44- pinctrl-0: Should specify pin control groups used for this controller.
45- clocks: A list of phandle + clock-specifier pairs for the clocks listed in clock-names.
46- clock-names: Should contain the following:
47 "iface" - Main peripheral bus clock (PCLK/HCLK - AHB Bus clock) (required)
48 "core" - SDC MMC clock (MCLK) (required)
49 "bus" - SDCC bus voter clock (optional)
Ritesh Harjanif927ea42016-11-21 12:07:15 +053050 "xo" - TCXO clock (optional)
Bjorn Andersson4946b3a2017-09-15 16:35:24 -070051 "cal" - reference clock for RCLK delay calibration (optional)
52 "sleep" - sleep clock for RCLK delay calibration (optional)
Eric Biggers5cc046e2021-01-25 16:14:54 -080053 "ice" - clock for Inline Crypto Engine (optional)
Georgi Djakovd2529502014-03-10 17:37:11 +020054
Sarthak Garg97306b62020-05-22 15:02:24 +053055- qcom,ddr-config: Certain chipsets and platforms require particular settings
56 for the DDR_CONFIG register. Use this field to specify the register
57 value as per the Hardware Programming Guide.
58
59- qcom,dll-config: Chipset and Platform specific value. Use this field to
60 specify the DLL_CONFIG register value as per Hardware Programming Guide.
61
Pradeep P V K557ed5f2020-06-09 14:07:26 +053062Optional Properties:
63* Following bus parameters are required for interconnect bandwidth scaling:
64- interconnects: Pairs of phandles and interconnect provider specifier
65 to denote the edge source and destination ports of
66 the interconnect path.
67
68- interconnect-names: For sdhc, we have two main paths.
69 1. Data path : sdhc to ddr
70 2. Config path : cpu to sdhc
71 For Data interconnect path the name supposed to be
72 is "sdhc-ddr" and for config interconnect path it is
73 "cpu-sdhc".
74 Please refer to Documentation/devicetree/bindings/
75 interconnect/ for more details.
76
Georgi Djakovd2529502014-03-10 17:37:11 +020077Example:
78
79 sdhc_1: sdhci@f9824900 {
Veerabhadrarao Badiganti247cb8b2018-11-12 12:22:16 +053080 compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
Georgi Djakovd2529502014-03-10 17:37:11 +020081 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
82 interrupts = <0 123 0>;
83 bus-width = <8>;
84 non-removable;
85
Georgi Djakov602bcde2014-07-11 20:48:11 +030086 vmmc-supply = <&pm8941_l20>;
87 vqmmc-supply = <&pm8941_s3>;
Georgi Djakovd2529502014-03-10 17:37:11 +020088
89 pinctrl-names = "default";
90 pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>;
91
92 clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>;
93 clock-names = "core", "iface";
Pradeep P V K557ed5f2020-06-09 14:07:26 +053094 interconnects = <&qnoc MASTER_SDCC_ID &qnoc SLAVE_DDR_ID>,
95 <&qnoc MASTER_CPU_ID &qnoc SLAVE_SDCC_ID>;
96 interconnect-names = "sdhc-ddr","cpu-sdhc";
Sarthak Garg97306b62020-05-22 15:02:24 +053097
98 qcom,dll-config = <0x000f642c>;
99 qcom,ddr-config = <0x80040868>;
Georgi Djakovd2529502014-03-10 17:37:11 +0200100 };
101
102 sdhc_2: sdhci@f98a4900 {
Veerabhadrarao Badiganti247cb8b2018-11-12 12:22:16 +0530103 compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
Georgi Djakovd2529502014-03-10 17:37:11 +0200104 reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
105 interrupts = <0 125 0>;
106 bus-width = <4>;
107 cd-gpios = <&msmgpio 62 0x1>;
108
Georgi Djakov602bcde2014-07-11 20:48:11 +0300109 vmmc-supply = <&pm8941_l21>;
110 vqmmc-supply = <&pm8941_l13>;
Georgi Djakovd2529502014-03-10 17:37:11 +0200111
112 pinctrl-names = "default";
113 pinctrl-0 = <&sdc2_clk &sdc2_cmd &sdc2_data>;
114
115 clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>;
116 clock-names = "core", "iface";
Sarthak Garg97306b62020-05-22 15:02:24 +0530117
118 qcom,dll-config = <0x0007642c>;
119 qcom,ddr-config = <0x80040868>;
Georgi Djakovd2529502014-03-10 17:37:11 +0200120 };