Skip to content

Commit

Permalink
Merge tag 'mmc-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/ulfh/mmc

Pull MMC updates from Ulf Hansson:
 "There are no updates for the MEMSTICK subsystem this time. But note
  that I am also carrying a patch from the pinctrl tree, which has been
  shared through an immutable branch.

  Summary:

  MMC core:
   - Convert to reasonable timeouts for all CMD6 commands (updates for
     BKOPS, CACHE_FLUSH and INAND_CMD38_ARG_EXT_CSD) for eMMC
   - Respect f_max clock rate at card initialization
   - Add gpiod_toggle_active_low() API
   - Consolidate slot-gpio code by using gpiod_toggle_active_low()

  MMC host:
   - Add pinctrl_select_default_state() API
   - Consolidate pintctrl code by using pinctrl_select_default_state()
   - mmci: Support any block sizes for SDIO for some variants
   - mmci: Enable reset control for stm32_sdmmc
   - mmc_spi: Toggle SPI_CS_HIGH polarity rather than hard-coding it
   - renesas_sdhi: Add support for the r8a77961 variant
   - renesas_sdhi: A few minor improvements
   - rockchip-dw-mshc: Add support for the rk3308 variant
   - sdhci: Enable support for external DMA controllers
   - sdhci: Fixup error path when sending CMD12
   - sdhci-brcmstb: Add support for 7216b0 variant
   - sdhci-brcmstb: Add support for command queuing (CQHCI)
   - sdhci-brcmstb: Add support for eMMC HS400ES mode
   - sdhci-msm: Add support for the sc7180 variant
   - sdhci-msm: Add support for command queuing (CQHCI)
   - sdhci-of-at91: Add support for the SAM9x60 variant
   - sdhci-of-at91: Improve support for tunings
   - sdhci-of-esdhc: A few fixups for some clock related issues
   - sdhci-omap: Add support for the am335x and the am437x variants
   - sdhci-omap: Improve support for erase operations
   - sdhci-omap: Add support for external DMA"

* tag 'mmc-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (89 commits)
  mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
  mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD
  mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC
  mmc: sdhci-cadence: remove unneeded 'inline' marker
  dt-bindings: mmc: rockchip-dw-mshc: add description for rk3308
  dt-bindings: mmc: convert rockchip dw-mshc bindings to yaml
  dt-bindings: mmc: convert synopsys dw-mshc bindings to yaml
  mmc: sdhci-msm: Add CQHCI support for sdhci-msm
  mmc: sdhci: Let a vendor driver supply and update ADMA descriptor size
  mmc: sdhci-of-esdhc: fix serious issue clock is always disabled
  mmc: sdhci-of-esdhc: fix transfer mode register reading
  mmc: sdhci-brcmstb: Fix incorrect switch to HS mode
  mmc: sdhci-brcmstb: Add support for Command Queuing (CQE)
  mmc: sdhci-brcmstb: Add shutdown callback
  mmc: sdhci-brcmstb: Fix driver to defer on clk_get defer
  mmc: sdhci-brcmstb: Add ability to use HS400ES transfer mode
  dt-bindings: mmc: brcm,sdhci-brcmstb: Add support for 7216b0
  mmc: core: limit probe clock frequency to configured f_max
  mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message
  mmc: sdhci: fix an issue of mixing different types
  ...
  • Loading branch information
torvalds committed Jan 27, 2020
2 parents b9b627a + 533a6cf commit 9e1af75
Show file tree
Hide file tree
Showing 70 changed files with 1,648 additions and 762 deletions.
41 changes: 28 additions & 13 deletions Documentation/devicetree/bindings/mmc/brcm,sdhci-brcmstb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,43 @@ Required properties:
- compatible: should be one of the following
- "brcm,bcm7425-sdhci"
- "brcm,bcm7445-sdhci"
- "brcm,bcm7216-sdhci"

Refer to clocks/clock-bindings.txt for generic clock consumer properties.

Example:

sdhci@f03e0100 {
compatible = "brcm,bcm7425-sdhci";
reg = <0xf03e0000 0x100>;
interrupts = <0x0 0x26 0x0>;
sdhci,auto-cmd12;
clocks = <&sw_sdio>;
sdhci@84b0000 {
sd-uhs-sdr50;
sd-uhs-ddr50;
sd-uhs-sdr104;
sdhci,auto-cmd12;
compatible = "brcm,bcm7216-sdhci",
"brcm,bcm7445-sdhci",
"brcm,sdhci-brcmstb";
reg = <0x84b0000 0x260 0x84b0300 0x200>;
reg-names = "host", "cfg";
interrupts = <0x0 0x26 0x4>;
interrupt-names = "sdio0_0";
clocks = <&scmi_clk 245>;
clock-names = "sw_sdio";
};

sdhci@f03e0300 {
sdhci@84b1000 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
supports-cqe;
non-removable;
bus-width = <0x8>;
compatible = "brcm,bcm7425-sdhci";
reg = <0xf03e0200 0x100>;
interrupts = <0x0 0x27 0x0>;
sdhci,auto-cmd12;
clocks = <sw_sdio>;
mmc-hs200-1_8v;
compatible = "brcm,bcm7216-sdhci",
"brcm,bcm7445-sdhci",
"brcm,sdhci-brcmstb";
reg = <0x84b1000 0x260 0x84b1300 0x200>;
reg-names = "host", "cfg";
interrupts = <0x0 0x27 0x4>;
interrupt-names = "sdio1_0";
clocks = <&scmi_clk 245>;
clock-names = "sw_sdio";
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Required properties:
"fsl,imx8mq-usdhc"
"fsl,imx8mm-usdhc"
"fsl,imx8mn-usdhc"
"fsl,imx8mp-usdhc"
"fsl,imx8qxp-usdhc"

Optional properties:
Expand Down
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/mmc/renesas,sdhi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Required properties:
"renesas,sdhi-r8a7793" - SDHI IP on R8A7793 SoC
"renesas,sdhi-r8a7794" - SDHI IP on R8A7794 SoC
"renesas,sdhi-r8a7795" - SDHI IP on R8A7795 SoC
"renesas,sdhi-r8a7796" - SDHI IP on R8A7796 SoC
"renesas,sdhi-r8a7796" - SDHI IP on R8A77960 SoC
"renesas,sdhi-r8a77961" - SDHI IP on R8A77961 SoC
"renesas,sdhi-r8a77965" - SDHI IP on R8A77965 SoC
"renesas,sdhi-r8a77970" - SDHI IP on R8A77970 SoC
"renesas,sdhi-r8a77980" - SDHI IP on R8A77980 SoC
Expand Down
49 changes: 0 additions & 49 deletions Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt

This file was deleted.

125 changes: 125 additions & 0 deletions Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Rockchip designware mobile storage host controller device tree bindings

description:
Rockchip uses the Synopsys designware mobile storage host controller
to interface a SoC with storage medium such as eMMC or SD/MMC cards.
This file documents the combined properties for the core Synopsys dw mshc
controller that are not already included in the synopsys-dw-mshc-common.yaml
file and the Rockchip specific extensions.

allOf:
- $ref: "synopsys-dw-mshc-common.yaml#"

maintainers:
- Heiko Stuebner <[email protected]>

# Everything else is described in the common file
properties:
compatible:
oneOf:
# for Rockchip RK2928 and before RK3288
- const: rockchip,rk2928-dw-mshc
# for Rockchip RK3288
- const: rockchip,rk3288-dw-mshc
- items:
- enum:
# for Rockchip PX30
- rockchip,px30-dw-mshc
# for Rockchip RK3036
- rockchip,rk3036-dw-mshc
# for Rockchip RK322x
- rockchip,rk3228-dw-mshc
# for Rockchip RK3308
- rockchip,rk3308-dw-mshc
# for Rockchip RK3328
- rockchip,rk3328-dw-mshc
# for Rockchip RK3368
- rockchip,rk3368-dw-mshc
# for Rockchip RK3399
- rockchip,rk3399-dw-mshc
# for Rockchip RV1108
- rockchip,rv1108-dw-mshc
- const: rockchip,rk3288-dw-mshc

reg:
maxItems: 1

interrupts:
maxItems: 1

clocks:
minItems: 2
maxItems: 4
description:
Handle to "biu" and "ciu" clocks for the bus interface unit clock and
the card interface unit clock. If "ciu-drive" and "ciu-sample" are
specified in clock-names, it should also contain
handles to these clocks.

clock-names:
minItems: 2
items:
- const: biu
- const: ciu
- const: ciu-drive
- const: ciu-sample
description:
Apart from the clock-names "biu" and "ciu" two more clocks
"ciu-drive" and "ciu-sample" are supported. They are used
to control the clock phases, "ciu-sample" is required for tuning
high speed modes.

rockchip,default-sample-phase:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 360
default: 0
description:
The default phase to set "ciu-sample" at probing,
low speeds or in case where all phases work at tuning time.
If not specified 0 deg will be used.

rockchip,desired-num-phases:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 360
default: 360
description:
The desired number of times that the host execute tuning when needed.
If not specified, the host will do tuning for 360 times,
namely tuning for each degree.

required:
- compatible
- reg
- interrupts
- clocks
- clock-names

examples:
- |
#include <dt-bindings/clock/rk3288-cru.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
sdmmc: mmc@ff0c0000 {
compatible = "rockchip,rk3288-dw-mshc";
reg = <0x0 0xff0c0000 0x0 0x4000>;
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
<&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
resets = <&cru SRST_MMC0>;
reset-names = "reset";
fifo-depth = <0x100>;
max-frequency = <150000000>;
};
...
13 changes: 10 additions & 3 deletions Documentation/devicetree/bindings/mmc/sdhci-atmel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@ Documentation/devicetree/bindings/mmc/mmc.txt and the properties used by the
sdhci-of-at91 driver.

Required properties:
- compatible: Must be "atmel,sama5d2-sdhci".
- compatible: Must be "atmel,sama5d2-sdhci" or "microchip,sam9x60-sdhci".
- clocks: Phandlers to the clocks.
- clock-names: Must be "hclock", "multclk", "baseclk";
- clock-names: Must be "hclock", "multclk", "baseclk" for
"atmel,sama5d2-sdhci".
Must be "hclock", "multclk" for "microchip,sam9x60-sdhci".

Optional properties:
- assigned-clocks: The same with "multclk".
- assigned-clock-rates The rate of "multclk" in order to not rely on the
gck configuration set by previous components.
- microchip,sdcal-inverted: when present, polarity on the SDCAL SoC pin is
inverted. The default polarity for this signal is described in the datasheet.
For instance on SAMA5D2, the pin is usually tied to the GND with a resistor
and a capacitor (see "SDMMC I/O Calibration" chapter).

Example:

sdmmc0: sdio-host@a0000000 {
mmc0: sdio-host@a0000000 {
compatible = "atmel,sama5d2-sdhci";
reg = <0xa0000000 0x300>;
interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&sdmmc0_hclk>, <&sdmmc0_gclk>, <&main>;
clock-names = "hclock", "multclk", "baseclk";
assigned-clocks = <&sdmmc0_gclk>;
assigned-clock-rates = <480000000>;
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/mmc/sdhci-msm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Required properties:
"qcom,msm8996-sdhci", "qcom,sdhci-msm-v4"
"qcom,sdm845-sdhci", "qcom,sdhci-msm-v5"
"qcom,qcs404-sdhci", "qcom,sdhci-msm-v5"
"qcom,sc7180-sdhci", "qcom,sdhci-msm-v5";
NOTE that some old device tree files may be floating around that only
have the string "qcom,sdhci-msm-v4" without the SoC compatible string
but doing that should be considered a deprecated practice.
Expand Down
11 changes: 11 additions & 0 deletions Documentation/devicetree/bindings/mmc/sdhci-omap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ For UHS devices which require tuning, the device tree should have a "cpu_thermal
Required properties:
- compatible: Should be "ti,dra7-sdhci" for DRA7 and DRA72 controllers
Should be "ti,k2g-sdhci" for K2G
Should be "ti,am335-sdhci" for am335x controllers
Should be "ti,am437-sdhci" for am437x controllers
- ti,hwmods: Must be "mmc<n>", <n> is controller instance starting 1
(Not required for K2G).
- pinctrl-names: Should be subset of "default", "hs", "sdr12", "sdr25", "sdr50",
Expand All @@ -15,11 +17,20 @@ Required properties:
"hs200_1_8v",
- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt

Optional properties:
- dmas: List of DMA specifiers with the controller specific format as described
in the generic DMA client binding. A tx and rx specifier is required.
- dma-names: List of DMA request names. These strings correspond 1:1 with the
DMA specifiers listed in dmas. The string naming is to be "tx"
and "rx" for TX and RX DMA requests, respectively.

Example:
mmc1: mmc@4809c000 {
compatible = "ti,dra7-sdhci";
reg = <0x4809c000 0x400>;
ti,hwmods = "mmc1";
bus-width = <4>;
vmmc-supply = <&vmmc>; /* phandle to regulator node */
dmas = <&sdma 61 &sdma 62>;
dma-names = "tx", "rx";
};
68 changes: 68 additions & 0 deletions Documentation/devicetree/bindings/mmc/synopsys-dw-mshc-common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/mmc/synopsys-dw-mshc-common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Synopsys Designware Mobile Storage Host Controller Common Properties

allOf:
- $ref: "mmc-controller.yaml#"

maintainers:
- Ulf Hansson <[email protected]>

# Everything else is described in the common file
properties:
resets:
maxItems: 1

reset-names:
const: reset

clock-frequency:
description:
Should be the frequency (in Hz) of the ciu clock. If this
is specified and the ciu clock is specified then we'll try to set the ciu
clock to this at probe time.

fifo-depth:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
description:
The maximum size of the tx/rx fifo's. If this property is not
specified, the default value of the fifo size is determined from the
controller registers.

card-detect-delay:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
- default: 0
description:
Delay in milli-seconds before detecting card after card
insert event. The default value is 0.

data-addr:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
description:
Override fifo address with value provided by DT. The default FIFO reg
offset is assumed as 0x100 (version < 0x240A) and 0x200(version >= 0x240A)
by driver. If the controller does not follow this rule, please use
this property to set fifo address in device tree.

fifo-watermark-aligned:
allOf:
- $ref: /schemas/types.yaml#/definitions/flag
description:
Data done irq is expected if data length is less than
watermark in PIO mode. But fifo watermark is requested to be aligned
with data length in some SoC so that TX/RX irq can be generated with
data done irq. Add this watermark quirk to mark this requirement and
force fifo watermark setting accordingly.

dmas:
maxItems: 1

dma-names:
const: rx-tx
Loading

0 comments on commit 9e1af75

Please sign in to comment.