Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 1 | * Qualcomm SDHCI controller (sdhci-msm) |
| 2 | |
| 3 | This file documents differences between the core properties in mmc.txt |
| 4 | and the properties used by the sdhci-msm driver. |
| 5 | |
| 6 | Required properties: |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 7 | - compatible: Should contain a SoC-specific string and a IP version string: |
| 8 | version strings: |
Sayali Lokhande | e0e4eee | 2018-06-19 11:09:20 +0530 | [diff] [blame] | 9 | "qcom,sdhci-msm-v4" for sdcc versions less than 5.0 |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 10 | "qcom,sdhci-msm-v5" for sdcc version 5.0 |
Sayali Lokhande | e0e4eee | 2018-06-19 11:09:20 +0530 | [diff] [blame] | 11 | 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 Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 14 | full compatible strings with SoC and version: |
| 15 | "qcom,apq8084-sdhci", "qcom,sdhci-msm-v4" |
Luca Weiss | d9972f5 | 2021-09-12 01:26:56 +0200 | [diff] [blame] | 16 | "qcom,msm8226-sdhci", "qcom,sdhci-msm-v4" |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 17 | "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4" |
| 18 | "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4" |
| 19 | "qcom,msm8992-sdhci", "qcom,sdhci-msm-v4" |
Petr Vorel | 5733c41 | 2021-12-23 23:55:24 +0100 | [diff] [blame] | 20 | "qcom,msm8994-sdhci", "qcom,sdhci-msm-v4" |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 21 | "qcom,msm8996-sdhci", "qcom,sdhci-msm-v4" |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 22 | "qcom,qcs404-sdhci", "qcom,sdhci-msm-v5" |
Veerabhadrarao Badiganti | efcc69b | 2019-11-27 11:49:59 +0000 | [diff] [blame] | 23 | "qcom,sc7180-sdhci", "qcom,sdhci-msm-v5"; |
Shaik Sajida Bhanu | 1a769fb | 2021-06-16 14:50:07 +0530 | [diff] [blame] | 24 | "qcom,sc7280-sdhci", "qcom,sdhci-msm-v5"; |
Manivannan Sadhasivam | 9476e27 | 2021-01-07 20:01:17 +0530 | [diff] [blame] | 25 | "qcom,sdm845-sdhci", "qcom,sdhci-msm-v5" |
| 26 | "qcom,sdx55-sdhci", "qcom,sdhci-msm-v5"; |
| 27 | "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5" |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 28 | NOTE that some old device tree files may be floating around that only |
| 29 | have the string "qcom,sdhci-msm-v4" without the SoC compatible string |
| 30 | but doing that should be considered a deprecated practice. |
| 31 | |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 32 | - reg: Base address and length of the register in the following order: |
| 33 | - Host controller register map (required) |
Veerabhadrarao Badiganti | d79100c | 2020-02-24 17:27:50 +0530 | [diff] [blame] | 34 | - SD Core register map (required for controllers earlier than msm-v5) |
| 35 | - CQE register map (Optional, CQE support is present on SDHC instance meant |
| 36 | for eMMC and version v4.2 and above) |
Eric Biggers | 5cc046e | 2021-01-25 16:14:54 -0800 | [diff] [blame] | 37 | - Inline Crypto Engine register map (optional) |
Veerabhadrarao Badiganti | d79100c | 2020-02-24 17:27:50 +0530 | [diff] [blame] | 38 | - reg-names: When CQE register map is supplied, below reg-names are required |
| 39 | - "hc" for Host controller register map |
| 40 | - "core" for SD core register map |
| 41 | - "cqhci" for CQE register map |
Eric Biggers | 5cc046e | 2021-01-25 16:14:54 -0800 | [diff] [blame] | 42 | - "ice" for Inline Crypto Engine register map (optional) |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 43 | - interrupts: Should contain an interrupt-specifiers for the interrupts: |
| 44 | - Host controller interrupt (required) |
| 45 | - pinctrl-names: Should contain only one value - "default". |
| 46 | - pinctrl-0: Should specify pin control groups used for this controller. |
| 47 | - clocks: A list of phandle + clock-specifier pairs for the clocks listed in clock-names. |
| 48 | - clock-names: Should contain the following: |
| 49 | "iface" - Main peripheral bus clock (PCLK/HCLK - AHB Bus clock) (required) |
| 50 | "core" - SDC MMC clock (MCLK) (required) |
| 51 | "bus" - SDCC bus voter clock (optional) |
Ritesh Harjani | f927ea4 | 2016-11-21 12:07:15 +0530 | [diff] [blame] | 52 | "xo" - TCXO clock (optional) |
Bjorn Andersson | 4946b3a | 2017-09-15 16:35:24 -0700 | [diff] [blame] | 53 | "cal" - reference clock for RCLK delay calibration (optional) |
| 54 | "sleep" - sleep clock for RCLK delay calibration (optional) |
Eric Biggers | 5cc046e | 2021-01-25 16:14:54 -0800 | [diff] [blame] | 55 | "ice" - clock for Inline Crypto Engine (optional) |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 56 | |
Sarthak Garg | 97306b6 | 2020-05-22 15:02:24 +0530 | [diff] [blame] | 57 | - qcom,ddr-config: Certain chipsets and platforms require particular settings |
| 58 | for the DDR_CONFIG register. Use this field to specify the register |
| 59 | value as per the Hardware Programming Guide. |
| 60 | |
| 61 | - qcom,dll-config: Chipset and Platform specific value. Use this field to |
| 62 | specify the DLL_CONFIG register value as per Hardware Programming Guide. |
| 63 | |
Pradeep P V K | 557ed5f | 2020-06-09 14:07:26 +0530 | [diff] [blame] | 64 | Optional Properties: |
| 65 | * Following bus parameters are required for interconnect bandwidth scaling: |
| 66 | - interconnects: Pairs of phandles and interconnect provider specifier |
| 67 | to denote the edge source and destination ports of |
| 68 | the interconnect path. |
| 69 | |
| 70 | - interconnect-names: For sdhc, we have two main paths. |
| 71 | 1. Data path : sdhc to ddr |
| 72 | 2. Config path : cpu to sdhc |
| 73 | For Data interconnect path the name supposed to be |
| 74 | is "sdhc-ddr" and for config interconnect path it is |
| 75 | "cpu-sdhc". |
| 76 | Please refer to Documentation/devicetree/bindings/ |
| 77 | interconnect/ for more details. |
| 78 | |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 79 | Example: |
| 80 | |
| 81 | sdhc_1: sdhci@f9824900 { |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 82 | compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"; |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 83 | reg = <0xf9824900 0x11c>, <0xf9824000 0x800>; |
| 84 | interrupts = <0 123 0>; |
| 85 | bus-width = <8>; |
| 86 | non-removable; |
| 87 | |
Georgi Djakov | 602bcde | 2014-07-11 20:48:11 +0300 | [diff] [blame] | 88 | vmmc-supply = <&pm8941_l20>; |
| 89 | vqmmc-supply = <&pm8941_s3>; |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 90 | |
| 91 | pinctrl-names = "default"; |
| 92 | pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>; |
| 93 | |
| 94 | clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>; |
| 95 | clock-names = "core", "iface"; |
Pradeep P V K | 557ed5f | 2020-06-09 14:07:26 +0530 | [diff] [blame] | 96 | interconnects = <&qnoc MASTER_SDCC_ID &qnoc SLAVE_DDR_ID>, |
| 97 | <&qnoc MASTER_CPU_ID &qnoc SLAVE_SDCC_ID>; |
| 98 | interconnect-names = "sdhc-ddr","cpu-sdhc"; |
Sarthak Garg | 97306b6 | 2020-05-22 15:02:24 +0530 | [diff] [blame] | 99 | |
| 100 | qcom,dll-config = <0x000f642c>; |
| 101 | qcom,ddr-config = <0x80040868>; |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 102 | }; |
| 103 | |
| 104 | sdhc_2: sdhci@f98a4900 { |
Veerabhadrarao Badiganti | 247cb8b | 2018-11-12 12:22:16 +0530 | [diff] [blame] | 105 | compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"; |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 106 | reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>; |
| 107 | interrupts = <0 125 0>; |
| 108 | bus-width = <4>; |
| 109 | cd-gpios = <&msmgpio 62 0x1>; |
| 110 | |
Georgi Djakov | 602bcde | 2014-07-11 20:48:11 +0300 | [diff] [blame] | 111 | vmmc-supply = <&pm8941_l21>; |
| 112 | vqmmc-supply = <&pm8941_l13>; |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 113 | |
| 114 | pinctrl-names = "default"; |
| 115 | pinctrl-0 = <&sdc2_clk &sdc2_cmd &sdc2_data>; |
| 116 | |
| 117 | clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>; |
| 118 | clock-names = "core", "iface"; |
Sarthak Garg | 97306b6 | 2020-05-22 15:02:24 +0530 | [diff] [blame] | 119 | |
| 120 | qcom,dll-config = <0x0007642c>; |
| 121 | qcom,ddr-config = <0x80040868>; |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 122 | }; |