Skip to content

Commit be580e7

Browse files
committed
Merge tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC updates from Ulf Hansson: "MMC core: - Continue to re-factor code to prepare for eMMC CMDQ and blkmq support - Introduce queue semantics to prepare for eMMC CMDQ and blkmq support - Add helper functions to manage temporary enable/disable of eMMC CMDQ - Improve wait-busy detection for SDIO MMC host: - cavium: Add driver to support Cavium controllers - cavium: Extend Cavium driver to support Octeon and ThunderX SOCs - bcm2835: Add new driver for Broadcom BCM2835 controller - sdhci-xenon: Add driver to support Marvell Xenon SDHCI controller - sdhci-tegra: Add support for the Tegra186 variant - sdhci-of-esdhc: Support for UHS-I SD cards - sdhci-of-esdhc: Support for eMMC HS200 cards - sdhci-cadence: Add eMMC HS400 enhanced strobe support - sdhci-esdhc-imx: Reset tuning circuit when needed - sdhci-pci: Modernize and clean-up some PM related code - sdhci-pci: Avoid re-tuning at runtime PM for some Intel devices - sdhci-pci|acpi: Use aggressive PM for some Intel BYT controllers - sdhci: Re-factoring and modernizations - sdhci: Optimize delay loops - sdhci: Improve register dump print format - sdhci: Add support for the Command Queue Engine - meson-gx: Various improvements and clean-ups - meson-gx: Add support for CMD23 - meson-gx: Basic tuning support to avoid CRC errors - s3cmci: Enable probing via DT - mediatek: Improve tuning support for eMMC HS200 and HS400 mode - tmio: Improve DMA support - tmio: Use correct response for CMD12 - dw_mmc: Minor improvements and clean-ups" * tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (148 commits) mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a mmc: sdhci-of-esdhc: poll ESDHC_CLOCK_STABLE bit with udelay mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY mmc: sdhci-xenon: Fix the work flow in xenon_remove(). MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC mmc: sdhci-xenon: Remove redundant dev_err call in get_dt_pad_ctrl_data() mmc: cavium: Use module_pci_driver to simplify the code mmc: cavium: Add MMC support for Octeon SOCs. mmc: cavium: Fix detection of block or byte addressing. mmc: core: Export API to allow hosts to get the card address mmc: sdio: Fix sdio wait busy implement limitation mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card clk: apn806: fix spelling mistake: "mising" -> "missing" mmc: sdhci-of-esdhc: add delay between tuning cycles mmc: sdhci: Control the delay between tuning commands mmc: sdhci-of-esdhc: add tuning support mmc: sdhci-of-esdhc: add support for signal voltage switch mmc: sdhci-of-esdhc: add peripheral clock support mmc: sdhci-pci: Allow for 3 bytes from Intel DSM mmc: cavium: Fix a shift wrapping bug ...
2 parents 8d65b08 + a627f02 commit be580e7

79 files changed

Lines changed: 7948 additions & 1619 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Broadcom BCM2835 SDHOST controller
2+
3+
This file documents differences between the core properties described
4+
by mmc.txt and the properties that represent the BCM2835 controller.
5+
6+
Required properties:
7+
- compatible: Should be "brcm,bcm2835-sdhost".
8+
- clocks: The clock feeding the SDHOST controller.
9+
10+
Optional properties:
11+
- dmas: DMA channel for read and write.
12+
See Documentation/devicetree/bindings/dma/dma.txt for details
13+
14+
Example:
15+
16+
sdhost: mmc@7e202000 {
17+
compatible = "brcm,bcm2835-sdhost";
18+
reg = <0x7e202000 0x100>;
19+
interrupts = <2 24>;
20+
clocks = <&clocks BCM2835_CLOCK_VPU>;
21+
dmas = <&dma 13>;
22+
dma-names = "rx-tx";
23+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
* Cavium Octeon & ThunderX MMC controller
2+
3+
The highspeed MMC host controller on Caviums SoCs provides an interface
4+
for MMC and SD types of memory cards.
5+
6+
Supported maximum speeds are the ones of the eMMC standard 4.41 as well
7+
as the speed of SD standard 4.0. Only 3.3 Volt is supported.
8+
9+
Required properties:
10+
- compatible : should be one of:
11+
cavium,octeon-6130-mmc
12+
cavium,octeon-7890-mmc
13+
cavium,thunder-8190-mmc
14+
cavium,thunder-8390-mmc
15+
mmc-slot
16+
- reg : mmc controller base registers
17+
- clocks : phandle
18+
19+
Optional properties:
20+
- for cd, bus-width and additional generic mmc parameters
21+
please refer to mmc.txt within this directory
22+
- cavium,cmd-clk-skew : number of coprocessor clocks before sampling command
23+
- cavium,dat-clk-skew : number of coprocessor clocks before sampling data
24+
25+
Deprecated properties:
26+
- spi-max-frequency : use max-frequency instead
27+
- cavium,bus-max-width : use bus-width instead
28+
- power-gpios : use vmmc-supply instead
29+
- cavium,octeon-6130-mmc-slot : use mmc-slot instead
30+
31+
Examples:
32+
mmc_1_4: mmc@1,4 {
33+
compatible = "cavium,thunder-8390-mmc";
34+
reg = <0x0c00 0 0 0 0>; /* DEVFN = 0x0c (1:4) */
35+
#address-cells = <1>;
36+
#size-cells = <0>;
37+
clocks = <&sclk>;
38+
39+
mmc-slot@0 {
40+
compatible = "mmc-slot";
41+
reg = <0>;
42+
vmmc-supply = <&mmc_supply_3v3>;
43+
max-frequency = <42000000>;
44+
bus-width = <4>;
45+
cap-sd-highspeed;
46+
};
47+
48+
mmc-slot@1 {
49+
compatible = "mmc-slot";
50+
reg = <1>;
51+
vmmc-supply = <&mmc_supply_3v3>;
52+
max-frequency = <42000000>;
53+
bus-width = <8>;
54+
cap-mmc-highspeed;
55+
non-removable;
56+
};
57+
};
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
Marvell Xenon SDHCI Controller device tree bindings
2+
This file documents differences between the core mmc properties
3+
described by mmc.txt and the properties used by the Xenon implementation.
4+
5+
Multiple SDHCs might be put into a single Xenon IP, to save size and cost.
6+
Each SDHC is independent and owns independent resources, such as register sets,
7+
clock and PHY.
8+
Each SDHC should have an independent device tree node.
9+
10+
Required Properties:
11+
- compatible: should be one of the following
12+
- "marvell,armada-3700-sdhci": For controllers on Armada-3700 SoC.
13+
Must provide a second register area and marvell,pad-type.
14+
- "marvell,armada-ap806-sdhci": For controllers on Armada AP806.
15+
- "marvell,armada-cp110-sdhci": For controllers on Armada CP110.
16+
17+
- clocks:
18+
Array of clocks required for SDHC.
19+
Require at least input clock for Xenon IP core.
20+
21+
- clock-names:
22+
Array of names corresponding to clocks property.
23+
The input clock for Xenon IP core should be named as "core".
24+
25+
- reg:
26+
* For "marvell,armada-3700-sdhci", two register areas.
27+
The first one for Xenon IP register. The second one for the Armada 3700 SoC
28+
PHY PAD Voltage Control register.
29+
Please follow the examples with compatible "marvell,armada-3700-sdhci"
30+
in below.
31+
Please also check property marvell,pad-type in below.
32+
33+
* For other compatible strings, one register area for Xenon IP.
34+
35+
Optional Properties:
36+
- marvell,xenon-sdhc-id:
37+
Indicate the corresponding bit index of current SDHC in
38+
SDHC System Operation Control Register Bit[7:0].
39+
Set/clear the corresponding bit to enable/disable current SDHC.
40+
If Xenon IP contains only one SDHC, this property is optional.
41+
42+
- marvell,xenon-phy-type:
43+
Xenon support multiple types of PHYs.
44+
To select eMMC 5.1 PHY, set:
45+
marvell,xenon-phy-type = "emmc 5.1 phy"
46+
eMMC 5.1 PHY is the default choice if this property is not provided.
47+
To select eMMC 5.0 PHY, set:
48+
marvell,xenon-phy-type = "emmc 5.0 phy"
49+
50+
All those types of PHYs can support eMMC, SD and SDIO.
51+
Please note that this property only presents the type of PHY.
52+
It doesn't stand for the entire SDHC type or property.
53+
For example, "emmc 5.1 phy" doesn't mean that this Xenon SDHC only
54+
supports eMMC 5.1.
55+
56+
- marvell,xenon-phy-znr:
57+
Set PHY ZNR value.
58+
Only available for eMMC PHY.
59+
Valid range = [0:0x1F].
60+
ZNR is set as 0xF by default if this property is not provided.
61+
62+
- marvell,xenon-phy-zpr:
63+
Set PHY ZPR value.
64+
Only available for eMMC PHY.
65+
Valid range = [0:0x1F].
66+
ZPR is set as 0xF by default if this property is not provided.
67+
68+
- marvell,xenon-phy-nr-success-tun:
69+
Set the number of required consecutive successful sampling points
70+
used to identify a valid sampling window, in tuning process.
71+
Valid range = [1:7].
72+
Set as 0x4 by default if this property is not provided.
73+
74+
- marvell,xenon-phy-tun-step-divider:
75+
Set the divider for calculating TUN_STEP.
76+
Set as 64 by default if this property is not provided.
77+
78+
- marvell,xenon-phy-slow-mode:
79+
If this property is selected, transfers will bypass PHY.
80+
Only available when bus frequency lower than 55MHz in SDR mode.
81+
Disabled by default. Please only try this property if timing issues
82+
always occur with PHY enabled in eMMC HS SDR, SD SDR12, SD SDR25,
83+
SD Default Speed and HS mode and eMMC legacy speed mode.
84+
85+
- marvell,xenon-tun-count:
86+
Xenon SDHC SoC usually doesn't provide re-tuning counter in
87+
Capabilities Register 3 Bit[11:8].
88+
This property provides the re-tuning counter.
89+
If this property is not set, default re-tuning counter will
90+
be set as 0x9 in driver.
91+
92+
- marvell,pad-type:
93+
Type of Armada 3700 SoC PHY PAD Voltage Controller register.
94+
Only valid when "marvell,armada-3700-sdhci" is selected.
95+
Two types: "sd" and "fixed-1-8v".
96+
If "sd" is selected, SoC PHY PAD is set as 3.3V at the beginning and is
97+
switched to 1.8V when later in higher speed mode.
98+
If "fixed-1-8v" is selected, SoC PHY PAD is fixed 1.8V, such as for eMMC.
99+
Please follow the examples with compatible "marvell,armada-3700-sdhci"
100+
in below.
101+
102+
Example:
103+
- For eMMC:
104+
105+
sdhci@aa0000 {
106+
compatible = "marvell,armada-ap806-sdhci";
107+
reg = <0xaa0000 0x1000>;
108+
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>
109+
clocks = <&emmc_clk>;
110+
clock-names = "core";
111+
bus-width = <4>;
112+
marvell,xenon-phy-slow-mode;
113+
marvell,xenon-tun-count = <11>;
114+
non-removable;
115+
no-sd;
116+
no-sdio;
117+
118+
/* Vmmc and Vqmmc are both fixed */
119+
};
120+
121+
- For SD/SDIO:
122+
123+
sdhci@ab0000 {
124+
compatible = "marvell,armada-cp110-sdhci";
125+
reg = <0xab0000 0x1000>;
126+
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>
127+
vqmmc-supply = <&sd_vqmmc_regulator>;
128+
vmmc-supply = <&sd_vmmc_regulator>;
129+
clocks = <&sdclk>;
130+
clock-names = "core";
131+
bus-width = <4>;
132+
marvell,xenon-tun-count = <9>;
133+
};
134+
135+
- For eMMC with compatible "marvell,armada-3700-sdhci":
136+
137+
sdhci@aa0000 {
138+
compatible = "marvell,armada-3700-sdhci";
139+
reg = <0xaa0000 0x1000>,
140+
<phy_addr 0x4>;
141+
interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>
142+
clocks = <&emmcclk>;
143+
clock-names = "core";
144+
bus-width = <8>;
145+
mmc-ddr-1_8v;
146+
mmc-hs400-1_8v;
147+
non-removable;
148+
no-sd;
149+
no-sdio;
150+
151+
/* Vmmc and Vqmmc are both fixed */
152+
153+
marvell,pad-type = "fixed-1-8v";
154+
};
155+
156+
- For SD/SDIO with compatible "marvell,armada-3700-sdhci":
157+
158+
sdhci@ab0000 {
159+
compatible = "marvell,armada-3700-sdhci";
160+
reg = <0xab0000 0x1000>,
161+
<phy_addr 0x4>;
162+
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>
163+
vqmmc-supply = <&sd_regulator>;
164+
/* Vmmc is fixed */
165+
clocks = <&sdclk>;
166+
clock-names = "core";
167+
bus-width = <4>;
168+
169+
marvell,pad-type = "sd";
170+
};

‎Documentation/devicetree/bindings/mmc/mtk-sd.txt‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ Optional properties:
2121
- assigned-clocks: PLL of the source clock
2222
- assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock
2323
- hs400-ds-delay: HS400 DS delay setting
24+
- mediatek,hs200-cmd-int-delay: HS200 command internal delay setting.
25+
This field has total 32 stages.
26+
The value is an integer from 0 to 31.
27+
- mediatek,hs400-cmd-int-delay: HS400 command internal delay setting
28+
This field has total 32 stages.
29+
The value is an integer from 0 to 31.
30+
- mediatek,hs400-cmd-resp-sel-rising: HS400 command response sample selection
31+
If present,HS400 command responses are sampled on rising edges.
32+
If not present,HS400 command responses are sampled on falling edges.
2433

2534
Examples:
2635
mmc0: mmc@11230000 {
@@ -38,4 +47,7 @@ mmc0: mmc@11230000 {
3847
assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
3948
assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
4049
hs400-ds-delay = <0x14015>;
50+
mediatek,hs200-cmd-int-delay = <26>;
51+
mediatek,hs400-cmd-int-delay = <14>;
52+
mediatek,hs400-cmd-resp-sel-rising;
4153
};

‎Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ This file documents differences between the core properties described
77
by mmc.txt and the properties used by the sdhci-tegra driver.
88

99
Required properties:
10-
- compatible : For Tegra20, must contain "nvidia,tegra20-sdhci".
11-
For Tegra30, must contain "nvidia,tegra30-sdhci". For Tegra114,
12-
must contain "nvidia,tegra114-sdhci". For Tegra124, must contain
13-
"nvidia,tegra124-sdhci". Otherwise, must contain "nvidia,<chip>-sdhci",
14-
plus one of the above, where <chip> is tegra132 or tegra210.
10+
- compatible : should be one of:
11+
- "nvidia,tegra20-sdhci": for Tegra20
12+
- "nvidia,tegra30-sdhci": for Tegra30
13+
- "nvidia,tegra114-sdhci": for Tegra114
14+
- "nvidia,tegra124-sdhci": for Tegra124 and Tegra132
15+
- "nvidia,tegra210-sdhci": for Tegra210
16+
- "nvidia,tegra186-sdhci": for Tegra186
1517
- clocks : Must contain one entry, for the module clock.
1618
See ../clocks/clock-bindings.txt for details.
1719
- resets : Must contain an entry for each entry in reset-names.

‎Documentation/devicetree/bindings/mmc/renesas,mmcif.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Required properties:
88

99
- compatible: should be "renesas,mmcif-<soctype>", "renesas,sh-mmcif" as a
1010
fallback. Examples with <soctype> are:
11+
- "renesas,mmcif-r7s72100" for the MMCIF found in r7s72100 SoCs
1112
- "renesas,mmcif-r8a73a4" for the MMCIF found in r8a73a4 SoCs
1213
- "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
1314
- "renesas,mmcif-r8a7778" for the MMCIF found in r8a7778 SoCs
@@ -17,6 +18,13 @@ Required properties:
1718
- "renesas,mmcif-r8a7794" for the MMCIF found in r8a7794 SoCs
1819
- "renesas,mmcif-sh73a0" for the MMCIF found in sh73a0 SoCs
1920

21+
- interrupts: Some SoCs have only 1 shared interrupt, while others have either
22+
2 or 3 individual interrupts (error, int, card detect). Below is the number
23+
of interrupts for each SoC:
24+
1: r8a73a4, r8a7778, r8a7790, r8a7791, r8a7793, r8a7794
25+
2: r8a7740, sh73a0
26+
3: r7s72100
27+
2028
- clocks: reference to the functional clock
2129

2230
- dmas: reference to the DMA channels, one per channel name listed in the
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
* Samsung's S3C24XX MMC/SD/SDIO controller device tree bindings
2+
3+
Samsung's S3C24XX MMC/SD/SDIO controller is used as a connectivity interface
4+
with external MMC, SD and SDIO storage mediums.
5+
6+
This file documents differences between the core mmc properties described by
7+
mmc.txt and the properties used by the Samsung S3C24XX MMC/SD/SDIO controller
8+
implementation.
9+
10+
Required SoC Specific Properties:
11+
- compatible: should be one of the following
12+
- "samsung,s3c2410-sdi": for controllers compatible with s3c2410
13+
- "samsung,s3c2412-sdi": for controllers compatible with s3c2412
14+
- "samsung,s3c2440-sdi": for controllers compatible with s3c2440
15+
- reg: register location and length
16+
- interrupts: mmc controller interrupt
17+
- clocks: Should reference the controller clock
18+
- clock-names: Should contain "sdi"
19+
20+
Required Board Specific Properties:
21+
- pinctrl-0: Should specify pin control groups used for this controller.
22+
- pinctrl-names: Should contain only one value - "default".
23+
24+
Optional Properties:
25+
- bus-width: number of data lines (see mmc.txt)
26+
- cd-gpios: gpio for card detection (see mmc.txt)
27+
- wp-gpios: gpio for write protection (see mmc.txt)
28+
29+
Example:
30+
31+
mmc0: mmc@5a000000 {
32+
compatible = "samsung,s3c2440-sdi";
33+
pinctrl-names = "default";
34+
pinctrl-0 = <&sdi_pins>;
35+
reg = <0x5a000000 0x100000>;
36+
interrupts = <0 0 21 3>;
37+
clocks = <&clocks PCLK_SDI>;
38+
clock-names = "sdi";
39+
bus-width = <4>;
40+
cd-gpios = <&gpg 8 GPIO_ACTIVE_LOW>;
41+
wp-gpios = <&gph 8 GPIO_ACTIVE_LOW>;
42+
};

0 commit comments

Comments
 (0)