blob: a981eed1766976f3baa668422800020e1b6c898f [file] [log] [blame]
Qualcomm Secure Digital Card Controller (SDCC)
Secure Digital Card Controller provides host interface to
SD/MMC/SDIO cards.
Required properties:
- compatible : should be "qcom,msm-sdcc"
- reg : should contain SDCC, SDCC-DML and BAM register map.
- reg-names : indicates various resources passed to driver (via reg proptery) by name.
"reg-names" examples are "core_mem", "dml_mem" and "bam_mem"
- interrupts : should contain SDCC core interrupt.
- interrupt-names : indicates interrupts passed to driver (via interrupts property) by name.
"core_irq" is mandatory, "bam_irq" is mandatory only when BAM DMA engine is used,
"status_irq" and "sdiowakeup_irq" are optional.
- qcom,sdcc-clk-rates : specifies supported SDCC clock frequencies, Units - Hz.
- qcom,sdcc-sup-voltages: specifies supported voltage ranges for card. Should always be
specified in pairs (min, max), Units - mV.
- <supply-name>-supply: phandle to the regulator device tree node
"supply-name" examples are "vdd", "vdd-io".
Optional Properties:
- cell-index - defines slot ID.
- qcom,sdcc-bus-width - defines the bus I/O width that controller supports.
- wp-gpios - specify GPIO for write protect switch detection.
- cd-gpios - specify GPIO for card detection.
- qcom,sdcc-nonremovable - specifies whether the card in slot is
hot pluggable or hard wired.
- qcom,sdcc-disable_cmd23 - disable sending CMD23 to card when controller can't support it.
- qcom,sdcc-bus-speed-mode - specifies supported bus speed modes by host.
- qcom,sdcc-current-limit - specifies max. current the host can drive.
- qcom,sdcc-xpc - specifies if the host can supply more than 150mA for SDXC cards.
- qcom,dat1-mpm-int - specifies MPM interrupt number corresponding to DAT1 line of SDCC
(used only if slot has dedicated DAT1 MSM pin (not GPIO))
In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage).
- qcom,sdcc-<supply>-always_on - specifies whether supply should be kept "on" always.
- qcom,sdcc-<supply>-lpm_sup - specifies whether supply can be kept in low power mode (lpm).
- qcom,sdcc-<supply>-voltage_level - specifies voltage levels for supply. Should be
specified in pairs (min, max), units uV.
- qcom,sdcc-<supply>-current_level - specifies load levels for supply in lpm or
high power mode (hpm). Should be specified in pairs (lpm, hpm), units uA.
- gpios - specifies gpios assigned for sdcc slot.
- qcom,sdcc-gpio-names - a list of strings that map in order to the list of gpios
A slot has either gpios or dedicated tlmm pins as represented below.
- qcom,sdcc-pad-pull-on - Active pull configuration for sdc tlmm pins
- qcom,sdcc-pad-pull-off - Suspend pull configuration for sdc tlmm pins.
- qcom,sdcc-pad-drv-on - Active drive strength configuration for sdc tlmm pins.
- qcom,sdcc-pad-drv-off - Suspend drive strength configuration for sdc tlmm pins.
Tlmm pins are specified as <clk cmd data>
- qcom,bus-bw-vectors-bps - specifies array of throughput values in Bytes/sec. The
values in the array are determined according to supported bus speed modes. For example,
if host supports SDR12 mode, value is 13631488 Bytes/sec.
- Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
below optional properties:
- qcom,msm-bus,name
- qcom,msm-bus,num-cases
- qcom,msm-bus,active-only
- qcom,msm-bus,num-paths
- qcom,msm-bus,vectors-KBps
Example:
qcom,sdcc@f9600000 {
/* SDC1 used as eMMC slot */
cell-index = <1>;
compatible = "qcom,msm-sdcc";
reg = <0xf9600000 0x800 // SDCC register interface
0xf9600800 0x1800 // DML register interface
0xf9602000 0x2000> // BAM register interface
interrupts = <123>;
qcom,sdcc-clk-rates = <400000 24000000 48000000>;
qcom,sdcc-sup-voltages = <2700 3300>;
qcom,sdcc-bus-width = <8>; //8-bit wide
qcom,sdcc-nonremovable;
qcom,msm-bus,name = "sdcc2";
qcom,msm-bus,num-cases = <7>;
qcom,msm-bus,active-only = <0>;
qcom,msm-bus,num-paths = <1>;
qcom,msm-bus,vectors-KBps = <81 512 0 0>, /* No vote */
<81 512 6656 13312>, /* 13 MB/s*/
<81 512 13312 26624>, /* 26 MB/s */
<81 512 26624 53248>, /* 52 MB/s */
<81 512 53248 106496>, /* 104 MB/s */
<81 512 106496 212992>, /* 208 MB/s */
<81 512 2147483647 4294967295>; /* Max. bandwidth */
qcom,bus-bw-vectors-bps = <0 13631488 27262976 54525952 109051904 218103808 4294967295>;
};