Skip to content

Commit dee0277

Browse files
committed
Merge tag 'mmc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC updates from Ulf Hansson: "MMC core: - Introduce host claiming by context to support blkmq - Preparations for enabling CQE (eMMC CMDQ) requests - Re-factorizations to prepare for blkmq support - Re-factorizations to prepare for CQE support - Fix signal voltage switch for SD cards without power cycle - Convert RPMB to a character device - Export eMMC revision via sysfs - Support eMMC DT binding for fixed driver type - Document mmc_regulator_get_supply() API MMC host: - omap_hsmmc: Updated regulator management for PBIAS - sdhci-omap: Add new OMAP SDHCI driver - meson-mx-sdio: New driver for the Amlogic Meson8 and Meson8b SoCs - sdhci-pci: Add support for Intel CDF - sdhci-acpi: Fix voltage switch for some Intel host controllers - sdhci-msm: Enable delay circuit calibration clocks - sdhci-msm: Manage power IRQ properly - mediatek: Add support of mt2701/mt2712 - mediatek: Updates management of clocks and tunings - mediatek: Upgrade eMMC HS400 support - rtsx_pci: Update tuning for gen3 PCI-Express - renesas_sdhi: Support R-Car Gen[123] fallback compatibility strings - Catch all errors when getting regulators - Various additional improvements and cleanups" * tag 'mmc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (91 commits) sdhci-fujitsu: add support for setting the CMD_DAT_DELAY attribute dt-bindings: sdhci-fujitsu: document cmd-dat-delay property mmc: tmio: Replace msleep() of 20ms or less with usleep_range() mmc: dw_mmc: Convert timers to use timer_setup() mmc: dw_mmc: Cleanup the DTO timer like the CTO one mmc: vub300: Use common code in __download_offload_pseudocode() mmc: tmio: Use common error handling code in tmio_mmc_host_probe() mmc: Convert timers to use timer_setup() mmc: sdhci-acpi: Fix voltage switch for some Intel host controllers mmc: sdhci-acpi: Let devices define their own private data mmc: mediatek: perfer to use rise edge latching for cmd line mmc: mediatek: improve eMMC hs400 mode read performance mmc: mediatek: add latch-ck support mmc: mediatek: add support of source_cg clock mmc: mediatek: add stop_clk fix and enhance_rx support mmc: mediatek: add busy_check support mmc: mediatek: add async fifo and data tune support mmc: mediatek: add pad_tune0 support mmc: mediatek: make hs400_tune_response only for mt8173 arm64: dts: mt8173: remove "mediatek, mt8135-mmc" from mmc nodes ...
2 parents e4a8ca3 + 06641e8 commit dee0277

66 files changed

Lines changed: 3256 additions & 581 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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
What: /sys/bus/mmc/devices/.../rev
2+
Date: October 2017
3+
Contact: Jin Qian <jinqian@android.com>
4+
Description: Extended CSD revision number
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
* Amlogic Meson6, Meson8 and Meson8b SDIO/MMC controller
2+
3+
The highspeed MMC host controller on Amlogic SoCs provides an interface
4+
for MMC, SD, SDIO and SDHC 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 2.0.
8+
9+
The hardware provides an internal "mux" which allows up to three slots
10+
to be controlled. Only one slot can be accessed at a time.
11+
12+
Required properties:
13+
- compatible : must be one of
14+
- "amlogic,meson8-sdio"
15+
- "amlogic,meson8b-sdio"
16+
along with the generic "amlogic,meson-mx-sdio"
17+
- reg : mmc controller base registers
18+
- interrupts : mmc controller interrupt
19+
- #address-cells : must be 1
20+
- size-cells : must be 0
21+
- clocks : phandle to clock providers
22+
- clock-names : must contain "core" and "clkin"
23+
24+
Required child nodes:
25+
A node for each slot provided by the MMC controller is required.
26+
NOTE: due to a driver limitation currently only one slot (= child node)
27+
is supported!
28+
29+
Required properties on each child node (= slot):
30+
- compatible : must be "mmc-slot" (see mmc.txt within this directory)
31+
- reg : the slot (or "port") ID
32+
33+
Optional properties on each child node (= slot):
34+
- bus-width : must be 1 or 4 (8-bit bus is not supported)
35+
- for cd and all other additional generic mmc parameters
36+
please refer to mmc.txt within this directory
37+
38+
Examples:
39+
mmc@c1108c20 {
40+
compatible = "amlogic,meson8-sdio", "amlogic,meson-mx-sdio";
41+
reg = <0xc1108c20 0x20>;
42+
interrupts = <0 28 1>;
43+
#address-cells = <1>;
44+
#size-cells = <0>;
45+
clocks = <&clkc CLKID_SDIO>, <&clkc CLKID_CLK81>;
46+
clock-names = "core", "clkin";
47+
48+
slot@1 {
49+
compatible = "mmc-slot";
50+
reg = <1>;
51+
52+
bus-width = <4>;
53+
};
54+
};

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Optional properties:
5353
- no-sdio: controller is limited to send sdio cmd during initialization
5454
- no-sd: controller is limited to send sd cmd during initialization
5555
- no-mmc: controller is limited to send mmc cmd during initialization
56+
- fixed-emmc-driver-type: for non-removable eMMC, enforce this driver type.
57+
The value <n> is the driver type as specified in the eMMC specification
58+
(table 206 in spec version 5.1).
5659

5760
*NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line
5861
polarity properties, we have to fix the meaning of the "normal" and "inverted"

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@ This file documents differences between the core properties in mmc.txt
77
and the properties used by the msdc driver.
88

99
Required properties:
10-
- compatible: Should be "mediatek,mt8173-mmc","mediatek,mt8135-mmc"
10+
- compatible: value should be either of the following.
11+
"mediatek,mt8135-mmc": for mmc host ip compatible with mt8135
12+
"mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
13+
"mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
14+
"mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
15+
- reg: physical base address of the controller and length
1116
- interrupts: Should contain MSDC interrupt number
12-
- clocks: MSDC source clock, HCLK
13-
- clock-names: "source", "hclk"
17+
- clocks: Should contain phandle for the clock feeding the MMC controller
18+
- clock-names: Should contain the following:
19+
"source" - source clock (required)
20+
"hclk" - HCLK which used for host (required)
21+
"source_cg" - independent source clock gate (required for MT2712)
1422
- pinctrl-names: should be "default", "state_uhs"
1523
- pinctrl-0: should contain default/high speed pin ctrl
1624
- pinctrl-1: should contain uhs mode pin ctrl
@@ -30,6 +38,10 @@ Optional properties:
3038
- mediatek,hs400-cmd-resp-sel-rising: HS400 command response sample selection
3139
If present,HS400 command responses are sampled on rising edges.
3240
If not present,HS400 command responses are sampled on falling edges.
41+
- mediatek,latch-ck: Some SoCs do not support enhance_rx, need set correct latch-ck to avoid data crc
42+
error caused by stop clock(fifo full)
43+
Valid range = [0:0x7]. if not present, default value is 0.
44+
applied to compatible "mediatek,mt2701-mmc".
3345

3446
Examples:
3547
mmc0: mmc@11230000 {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Required properties:
1515
Optional properties:
1616
- vqmmc-supply: phandle to the regulator device tree node, mentioned
1717
as the VCCQ/VDD_IO supply in the eMMC/SD specs.
18+
- fujitsu,cmd-dat-delay-select: boolean property indicating that this host
19+
requires the CMD_DAT_DELAY control to be enabled.
1820

1921
Example:
2022

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Required properties:
1818
"core" - SDC MMC clock (MCLK) (required)
1919
"bus" - SDCC bus voter clock (optional)
2020
"xo" - TCXO clock (optional)
21+
"cal" - reference clock for RCLK delay calibration (optional)
22+
"sleep" - sleep clock for RCLK delay calibration (optional)
2123

2224
Example:
2325

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* TI OMAP SDHCI Controller
2+
3+
Refer to mmc.txt for standard MMC bindings.
4+
5+
Required properties:
6+
- compatible: Should be "ti,dra7-sdhci" for DRA7 and DRA72 controllers
7+
- ti,hwmods: Must be "mmc<n>", <n> is controller instance starting 1
8+
9+
Example:
10+
mmc1: mmc@4809c000 {
11+
compatible = "ti,dra7-sdhci";
12+
reg = <0x4809c000 0x400>;
13+
ti,hwmods = "mmc1";
14+
bus-width = <4>;
15+
vmmc-supply = <&vmmc>; /* phandle to regulator node */
16+
};

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

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ described in mmc.txt, can be used. Additionally the following tmio_mmc-specific
1010
optional bindings can be used.
1111

1212
Required properties:
13-
- compatible: "renesas,sdhi-shmobile" - a generic sh-mobile SDHI unit
13+
- 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
1616
"renesas,sdhi-r8a73a4" - SDHI IP on R8A73A4 SoC
@@ -26,6 +26,16 @@ Required properties:
2626
"renesas,sdhi-r8a7794" - SDHI IP on R8A7794 SoC
2727
"renesas,sdhi-r8a7795" - SDHI IP on R8A7795 SoC
2828
"renesas,sdhi-r8a7796" - SDHI IP on R8A7796 SoC
29+
"renesas,sdhi-shmobile" - a generic sh-mobile SDHI controller
30+
"renesas,rcar-gen1-sdhi" - a generic R-Car Gen1 SDHI controller
31+
"renesas,rcar-gen2-sdhi" - a generic R-Car Gen2 or RZ/G1
32+
SDHI controller
33+
"renesas,rcar-gen3-sdhi" - a generic R-Car Gen3 SDHI controller
34+
35+
36+
When compatible with the generic version, nodes must list
37+
the SoC-specific version corresponding to the platform
38+
first followed by the generic version.
2939

3040
- clocks: Most controllers only have 1 clock source per channel. However, on
3141
some variations of this controller, the internal card detection
@@ -43,3 +53,61 @@ Optional properties:
4353
- pinctrl-names: should be "default", "state_uhs"
4454
- pinctrl-0: should contain default/high speed pin ctrl
4555
- pinctrl-1: should contain uhs mode pin ctrl
56+
57+
Example: R8A7790 (R-Car H2) SDHI controller nodes
58+
59+
sdhi0: sd@ee100000 {
60+
compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
61+
reg = <0 0xee100000 0 0x328>;
62+
interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
63+
clocks = <&cpg CPG_MOD 314>;
64+
dmas = <&dmac0 0xcd>, <&dmac0 0xce>,
65+
<&dmac1 0xcd>, <&dmac1 0xce>;
66+
dma-names = "tx", "rx", "tx", "rx";
67+
max-frequency = <195000000>;
68+
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
69+
resets = <&cpg 314>;
70+
status = "disabled";
71+
};
72+
73+
sdhi1: sd@ee120000 {
74+
compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
75+
reg = <0 0xee120000 0 0x328>;
76+
interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
77+
clocks = <&cpg CPG_MOD 313>;
78+
dmas = <&dmac0 0xc9>, <&dmac0 0xca>,
79+
<&dmac1 0xc9>, <&dmac1 0xca>;
80+
dma-names = "tx", "rx", "tx", "rx";
81+
max-frequency = <195000000>;
82+
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
83+
resets = <&cpg 313>;
84+
status = "disabled";
85+
};
86+
87+
sdhi2: sd@ee140000 {
88+
compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
89+
reg = <0 0xee140000 0 0x100>;
90+
interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
91+
clocks = <&cpg CPG_MOD 312>;
92+
dmas = <&dmac0 0xc1>, <&dmac0 0xc2>,
93+
<&dmac1 0xc1>, <&dmac1 0xc2>;
94+
dma-names = "tx", "rx", "tx", "rx";
95+
max-frequency = <97500000>;
96+
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
97+
resets = <&cpg 312>;
98+
status = "disabled";
99+
};
100+
101+
sdhi3: sd@ee160000 {
102+
compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
103+
reg = <0 0xee160000 0 0x100>;
104+
interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
105+
clocks = <&cpg CPG_MOD 311>;
106+
dmas = <&dmac0 0xd3>, <&dmac0 0xd4>,
107+
<&dmac1 0xd3>, <&dmac1 0xd4>;
108+
dma-names = "tx", "rx", "tx", "rx";
109+
max-frequency = <97500000>;
110+
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
111+
resets = <&cpg 311>;
112+
status = "disabled";
113+
};

‎MAINTAINERS‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12067,6 +12067,12 @@ L: linux-mmc@vger.kernel.org
1206712067
S: Maintained
1206812068
F: drivers/mmc/host/sdhci-spear.c
1206912069

12070+
SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) TI OMAP DRIVER
12071+
M: Kishon Vijay Abraham I <kishon@ti.com>
12072+
L: linux-mmc@vger.kernel.org
12073+
S: Maintained
12074+
F: drivers/mmc/host/sdhci-omap.c
12075+
1207012076
SECURE ENCRYPTING DEVICE (SED) OPAL DRIVER
1207112077
M: Scott Bauer <scott.bauer@intel.com>
1207212078
M: Jonathan Derrick <jonathan.derrick@intel.com>

‎arch/arm64/boot/dts/mediatek/mt8173.dtsi‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,7 @@
682682
};
683683

684684
mmc0: mmc@11230000 {
685-
compatible = "mediatek,mt8173-mmc",
686-
"mediatek,mt8135-mmc";
685+
compatible = "mediatek,mt8173-mmc";
687686
reg = <0 0x11230000 0 0x1000>;
688687
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>;
689688
clocks = <&pericfg CLK_PERI_MSDC30_0>,
@@ -693,8 +692,7 @@
693692
};
694693

695694
mmc1: mmc@11240000 {
696-
compatible = "mediatek,mt8173-mmc",
697-
"mediatek,mt8135-mmc";
695+
compatible = "mediatek,mt8173-mmc";
698696
reg = <0 0x11240000 0 0x1000>;
699697
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
700698
clocks = <&pericfg CLK_PERI_MSDC30_1>,
@@ -704,8 +702,7 @@
704702
};
705703

706704
mmc2: mmc@11250000 {
707-
compatible = "mediatek,mt8173-mmc",
708-
"mediatek,mt8135-mmc";
705+
compatible = "mediatek,mt8173-mmc";
709706
reg = <0 0x11250000 0 0x1000>;
710707
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_LOW>;
711708
clocks = <&pericfg CLK_PERI_MSDC30_2>,
@@ -715,8 +712,7 @@
715712
};
716713

717714
mmc3: mmc@11260000 {
718-
compatible = "mediatek,mt8173-mmc",
719-
"mediatek,mt8135-mmc";
715+
compatible = "mediatek,mt8173-mmc";
720716
reg = <0 0x11260000 0 0x1000>;
721717
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_LOW>;
722718
clocks = <&pericfg CLK_PERI_MSDC30_3>,

0 commit comments

Comments
 (0)