Skip to content

Commit 00d59fd

Browse files
committed
Merge tag 'mmc-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC updates from Ulf Hansson: "This time, this pull request contains changes crossing subsystems and archs/platforms, which is mainly because of a bigger modernization of moving from legacy GPIO to GPIO descriptors for MMC (by Linus Walleij). Additionally, once again, I am funneling changes to drivers/misc/cardreader/* and drivers/memstick/* through my MMC tree, mostly due to that we lack a maintainer for these. Summary: MMC core: - Cleanup BKOPS support - Introduce MMC_CAP_SYNC_RUNTIME_PM - slot-gpio: Delete legacy slot GPIO handling MMC host: - alcor: Add new mmc host driver for Alcor Micro PCI based cardreader - bcm2835: Several improvements to better recover from errors - jz4740: Rework and fixup pre|post_req support - mediatek: Add support for SDIO IRQs - meson-gx: Improve clock phase management - meson-gx: Stop descriptor on errors - mmci: Complete the sbc error path by sending a stop command - renesas_sdhi/tmio: Fixup reset/resume operations - renesas_sdhi: Add support for r8a774c0 and R7S9210 - renesas_sdhi: Whitelist R8A77990 SDHI - renesas_sdhi: Fixup eMMC HS400 compatibility issues for H3 and M3-W - rtsx_usb_sdmmc: Re-work card detection/removal support - rtsx_usb_sdmmc: Re-work runtime PM support - sdhci: Fix timeout loops for some variant drivers - sdhci: Improve support for error handling due to failing commands - sdhci-acpi/pci: Disable LED control for Intel BYT-based controllers - sdhci_am654: Add new SDHCI variant driver to support TI's AM654 SOCs - sdhci-of-esdhc: Add support for eMMC HS400 mode - sdhci-omap: Fixup reset support - sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures - sdhci-msm: Fixup sporadic write transfers issues for SDR104/HS200 - sdhci-msm: Fixup dynamical clock gating issues - various: Complete converting all hosts into using slot GPIO descriptors Other: - Move GPIO mmc platform data for mips/sh/arm to GPIO descriptors - Add new Alcor Micro cardreader PCI driver - Support runtime power management for memstick rtsx_usb_ms driver - Use USB remote wakeups for card detection for rtsx_usb misc driver" * tag 'mmc-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (99 commits) mmc: mediatek: Add MMC_CAP_SDIO_IRQ support mmc: renesas_sdhi_internal_dmac: Whitelist r8a774c0 dt-bindings: mmc: renesas_sdhi: Add r8a774c0 support mmc: core: Cleanup BKOPS support mmc: core: Drop redundant check in mmc_send_hpi_cmd() mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929) dt-bindings: sdhci-omap: Add note for cpu_thermal mmc: sdhci-acpi: Disable LED control for Intel BYT-based controllers mmc: sdhci-pci: Disable LED control for Intel BYT-based controllers mmc: sdhci: Add quirk to disable LED control mmc: mmci: add variant property to set command stop bit misc: alcor_pci: fix spelling mistake "invailid" -> "invalid" mmc: meson-gx: add signal resampling mmc: meson-gx: align default phase on soc vendor tree mmc: meson-gx: remove useless lock mmc: meson-gx: make sure the descriptor is stopped on errors mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver dt-bindings: mmc: sdhci-of-arasan: Add deprecated message for AM65 dt-bindings: mmc: sdhci-am654: Document bindings for the host controllers on TI's AM654 SOCs mmc: sdhci-msm: avoid unused function warning ...
2 parents 75f95da + 5215b2e commit 00d59fd

117 files changed

Lines changed: 4010 additions & 1097 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/mmc/arasan,sdhci.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Required Properties:
1616
- "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1": rk3399 eMMC PHY
1717
For this device it is strongly suggested to include arasan,soc-ctl-syscon.
1818
- "ti,am654-sdhci-5.1", "arasan,sdhci-5.1": TI AM654 MMC PHY
19+
Note: This binding has been deprecated and moved to [5].
20+
21+
[5] Documentation/devicetree/bindings/mmc/sdhci-am654.txt
22+
1923
- reg: From mmc bindings: Register location and length.
2024
- clocks: From clock bindings: Handles to clock inputs.
2125
- clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb"

‎Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Required properties:
1616
"fsl,imx6sl-usdhc"
1717
"fsl,imx6sx-usdhc"
1818
"fsl,imx7d-usdhc"
19+
"fsl,imx8qxp-usdhc"
1920

2021
Optional properties:
2122
- fsl,wp-controller : Indicate to use controller internal write protection
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Device Tree Bindings for the SDHCI Controllers present on TI's AM654 SOCs
2+
3+
The bindings follow the mmc[1], clock[2] and interrupt[3] bindings.
4+
Only deviations are documented here.
5+
6+
[1] Documentation/devicetree/bindings/mmc/mmc.txt
7+
[2] Documentation/devicetree/bindings/clock/clock-bindings.txt
8+
[3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
9+
10+
Required Properties:
11+
- compatible: should be "ti,am654-sdhci-5.1"
12+
- reg: Must be two entries.
13+
- The first should be the sdhci register space
14+
- The second should the subsystem/phy register space
15+
- clocks: Handles to the clock inputs.
16+
- clock-names: Tuple including "clk_xin" and "clk_ahb"
17+
- interrupts: Interrupt specifiers
18+
- ti,otap-del-sel: Output Tap Delay select
19+
- ti,trm-icp: DLL trim select
20+
- ti,driver-strength-ohm: driver strength in ohms.
21+
Valid values are 33, 40, 50, 66 and 100 ohms.
22+
23+
Example:
24+
25+
sdhci0: sdhci@4f80000 {
26+
compatible = "ti,am654-sdhci-5.1";
27+
reg = <0x0 0x4f80000 0x0 0x260>, <0x0 0x4f90000 0x0 0x134>;
28+
power-domains = <&k3_pds 47>;
29+
clocks = <&k3_clks 47 0>, <&k3_clks 47 1>;
30+
clock-names = "clk_ahb", "clk_xin";
31+
interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
32+
sdhci-caps-mask = <0x80000007 0x0>;
33+
mmc-ddr-1_8v;
34+
ti,otap-del-sel = <0x2>;
35+
ti,trm-icp = <0x8>;
36+
};

‎Documentation/devicetree/bindings/mmc/sdhci-msm.txt‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,28 @@ This file documents differences between the core properties in mmc.txt
44
and the properties used by the sdhci-msm driver.
55

66
Required properties:
7-
- compatible: Should contain:
7+
- compatible: Should contain a SoC-specific string and a IP version string:
8+
version strings:
89
"qcom,sdhci-msm-v4" for sdcc versions less than 5.0
9-
"qcom,sdhci-msm-v5" for sdcc versions >= 5.0
10+
"qcom,sdhci-msm-v5" for sdcc version 5.0
1011
For SDCC version 5.0.0, MCI registers are removed from SDCC
1112
interface and some registers are moved to HC. New compatible
1213
string is added to support this change - "qcom,sdhci-msm-v5".
14+
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"
20+
"qcom,sdm845-sdhci", "qcom,sdhci-msm-v5"
21+
"qcom,qcs404-sdhci", "qcom,sdhci-msm-v5"
22+
NOTE that some old device tree files may be floating around that only
23+
have the string "qcom,sdhci-msm-v4" without the SoC compatible string
24+
but doing that should be considered a deprecated practice.
25+
1326
- reg: Base address and length of the register in the following order:
1427
- Host controller register map (required)
15-
- SD Core register map (required)
28+
- SD Core register map (required for msm-v4 and below)
1629
- interrupts: Should contain an interrupt-specifiers for the interrupts:
1730
- Host controller interrupt (required)
1831
- pinctrl-names: Should contain only one value - "default".
@@ -29,7 +42,7 @@ Required properties:
2942
Example:
3043

3144
sdhc_1: sdhci@f9824900 {
32-
compatible = "qcom,sdhci-msm-v4";
45+
compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
3346
reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
3447
interrupts = <0 123 0>;
3548
bus-width = <8>;
@@ -46,7 +59,7 @@ Example:
4659
};
4760

4861
sdhc_2: sdhci@f98a4900 {
49-
compatible = "qcom,sdhci-msm-v4";
62+
compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4";
5063
reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>;
5164
interrupts = <0 125 0>;
5265
bus-width = <4>;

‎Documentation/devicetree/bindings/mmc/sdhci-omap.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Refer to mmc.txt for standard MMC bindings.
44

5+
For UHS devices which require tuning, the device tree should have a "cpu_thermal" node which maps to the appropriate thermal zone. This is used to get the temperature of the zone during tuning.
6+
57
Required properties:
68
- compatible: Should be "ti,dra7-sdhci" for DRA7 and DRA72 controllers
79
Should be "ti,k2g-sdhci" for K2G

‎Documentation/devicetree/bindings/mmc/tmio_mmc.txt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ Required properties:
1313
- compatible: should contain one or more of the following:
1414
"renesas,sdhi-sh73a0" - SDHI IP on SH73A0 SoC
1515
"renesas,sdhi-r7s72100" - SDHI IP on R7S72100 SoC
16+
"renesas,sdhi-r7s9210" - SDHI IP on R7S9210 SoC
1617
"renesas,sdhi-r8a73a4" - SDHI IP on R8A73A4 SoC
1718
"renesas,sdhi-r8a7740" - SDHI IP on R8A7740 SoC
1819
"renesas,sdhi-r8a7743" - SDHI IP on R8A7743 SoC
1920
"renesas,sdhi-r8a7744" - SDHI IP on R8A7744 SoC
2021
"renesas,sdhi-r8a7745" - SDHI IP on R8A7745 SoC
2122
"renesas,sdhi-r8a774a1" - SDHI IP on R8A774A1 SoC
23+
"renesas,sdhi-r8a774c0" - SDHI IP on R8A774C0 SoC
2224
"renesas,sdhi-r8a77470" - SDHI IP on R8A77470 SoC
2325
"renesas,sdhi-mmc-r8a77470" - SDHI/MMC IP on R8A77470 SoC
2426
"renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
@@ -56,7 +58,7 @@ Required properties:
5658
"core" and "cd". If the controller only has 1 clock, naming is not
5759
required.
5860
Devices which have more than 1 clock are listed below:
59-
2: R7S72100
61+
2: R7S72100, R7S9210
6062

6163
Optional properties:
6264
- pinctrl-names: should be "default", "state_uhs"

‎arch/arm/mach-ep93xx/simone.c‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/platform_data/video-ep93xx.h>
2626
#include <linux/platform_data/spi-ep93xx.h>
2727
#include <linux/gpio.h>
28+
#include <linux/gpio/machine.h>
2829

2930
#include <mach/hardware.h>
3031
#include <mach/gpio-ep93xx.h>
@@ -45,9 +46,15 @@ static struct ep93xxfb_mach_info __initdata simone_fb_info = {
4546
static struct mmc_spi_platform_data simone_mmc_spi_data = {
4647
.detect_delay = 500,
4748
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
48-
.flags = MMC_SPI_USE_CD_GPIO,
49-
.cd_gpio = EP93XX_GPIO_LINE_EGPIO0,
50-
.cd_debounce = 1,
49+
};
50+
51+
static struct gpiod_lookup_table simone_mmc_spi_gpio_table = {
52+
.dev_id = "mmc_spi.0", /* "mmc_spi" @ CS0 */
53+
.table = {
54+
/* Card detect */
55+
GPIO_LOOKUP_IDX("A", 0, NULL, 0, GPIO_ACTIVE_LOW),
56+
{ },
57+
},
5158
};
5259

5360
static struct spi_board_info simone_spi_devices[] __initdata = {
@@ -105,6 +112,7 @@ static void __init simone_init_machine(void)
105112
ep93xx_register_fb(&simone_fb_info);
106113
ep93xx_register_i2c(simone_i2c_board_info,
107114
ARRAY_SIZE(simone_i2c_board_info));
115+
gpiod_add_lookup_table(&simone_mmc_spi_gpio_table);
108116
ep93xx_register_spi(&simone_spi_info, simone_spi_devices,
109117
ARRAY_SIZE(simone_spi_devices));
110118
simone_register_audio();

‎arch/arm/mach-ep93xx/vision_ep9307.c‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/platform_device.h>
1919
#include <linux/irq.h>
2020
#include <linux/gpio.h>
21+
#include <linux/gpio/machine.h>
2122
#include <linux/fb.h>
2223
#include <linux/io.h>
2324
#include <linux/mtd/partitions.h>
@@ -202,13 +203,20 @@ static struct mmc_spi_platform_data vision_spi_mmc_data = {
202203
.detect_delay = 100,
203204
.powerup_msecs = 100,
204205
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
205-
.flags = MMC_SPI_USE_CD_GPIO | MMC_SPI_USE_RO_GPIO,
206-
.cd_gpio = EP93XX_GPIO_LINE_EGPIO15,
207-
.cd_debounce = 1,
208-
.ro_gpio = EP93XX_GPIO_LINE_F(0),
209206
.caps2 = MMC_CAP2_RO_ACTIVE_HIGH,
210207
};
211208

209+
static struct gpiod_lookup_table vision_spi_mmc_gpio_table = {
210+
.dev_id = "mmc_spi.2", /* "mmc_spi @ CS2 */
211+
.table = {
212+
/* Card detect */
213+
GPIO_LOOKUP_IDX("B", 7, NULL, 0, GPIO_ACTIVE_LOW),
214+
/* Write protect */
215+
GPIO_LOOKUP_IDX("F", 0, NULL, 1, GPIO_ACTIVE_HIGH),
216+
{ },
217+
},
218+
};
219+
212220
/*************************************************************************
213221
* SPI Bus
214222
*************************************************************************/
@@ -286,6 +294,7 @@ static void __init vision_init_machine(void)
286294

287295
ep93xx_register_i2c(vision_i2c_info,
288296
ARRAY_SIZE(vision_i2c_info));
297+
gpiod_add_lookup_table(&vision_spi_mmc_gpio_table);
289298
ep93xx_register_spi(&vision_spi_master, vision_spi_board_info,
290299
ARRAY_SIZE(vision_spi_board_info));
291300
vision_register_i2s();

‎arch/arm/mach-imx/mach-pcm043.c‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/mtd/plat-ram.h>
2121
#include <linux/memory.h>
2222
#include <linux/gpio.h>
23+
#include <linux/gpio/machine.h>
2324
#include <linux/smc911x.h>
2425
#include <linux/interrupt.h>
2526
#include <linux/delay.h>
@@ -214,8 +215,6 @@ static const iomux_v3_cfg_t pcm043_pads[] __initconst = {
214215
#define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31)
215216
#define AC97_GPIO_TXD IMX_GPIO_NR(2, 28)
216217
#define AC97_GPIO_RESET IMX_GPIO_NR(2, 0)
217-
#define SD1_GPIO_WP IMX_GPIO_NR(2, 23)
218-
#define SD1_GPIO_CD IMX_GPIO_NR(2, 24)
219218

220219
static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97)
221220
{
@@ -341,12 +340,21 @@ static int __init pcm043_otg_mode(char *options)
341340
__setup("otg_mode=", pcm043_otg_mode);
342341

343342
static struct esdhc_platform_data sd1_pdata = {
344-
.wp_gpio = SD1_GPIO_WP,
345-
.cd_gpio = SD1_GPIO_CD,
346343
.wp_type = ESDHC_WP_GPIO,
347344
.cd_type = ESDHC_CD_GPIO,
348345
};
349346

347+
static struct gpiod_lookup_table sd1_gpio_table = {
348+
.dev_id = "sdhci-esdhc-imx35.0",
349+
.table = {
350+
/* Card detect: bank 2 offset 24 */
351+
GPIO_LOOKUP("imx35-gpio.2", 24, "cd", GPIO_ACTIVE_LOW),
352+
/* Write protect: bank 2 offset 23 */
353+
GPIO_LOOKUP("imx35-gpio.2", 23, "wp", GPIO_ACTIVE_LOW),
354+
{ },
355+
},
356+
};
357+
350358
/*
351359
* Board specific initialization.
352360
*/
@@ -391,6 +399,7 @@ static void __init pcm043_late_init(void)
391399
{
392400
imx35_add_imx_ssi(0, &pcm043_ssi_pdata);
393401

402+
gpiod_add_lookup_table(&sd1_gpio_table);
394403
imx35_add_sdhci_esdhc_imx(0, &sd1_pdata);
395404
}
396405

‎arch/arm/mach-pxa/balloon3.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,6 @@ static unsigned long balloon3_mmc_pin_config[] __initdata = {
290290

291291
static struct pxamci_platform_data balloon3_mci_platform_data = {
292292
.ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
293-
.gpio_card_detect = -1,
294-
.gpio_card_ro = -1,
295-
.gpio_power = -1,
296293
.detect_delay_ms = 200,
297294
};
298295

0 commit comments

Comments
 (0)