Skip to content

Commit

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

Pull MMC updates from Ulf Hansson:
 "MMC core:
   - Add support for eMMC inline encryption
   - Add a helper function to parse DT properties for clock phases
   - Some improvements and cleanups for the mmc_test module

  MMC host:
   - android-goldfish: Remove driver
   - cqhci: Add support for eMMC inline encryption
   - dw_mmc-zx: Remove driver
   - meson-gx: Extend support for scatter-gather to allow SD_IO_RW_EXTENDED
   - mmci: Add support for probing bus voltage level translator
   - mtk-sd: Address race condition for request timeouts
   - sdhci_am654: Add Support for the variant on TI's AM64 SoC
   - sdhci-esdhc-imx: Prevent kernel panic at ->remove()
   - sdhci-iproc: Add ACPI bindings for the RPi to enable SD and WiFi on RPi4
   - sdhci-msm: Add Inline Crypto Engine support
   - sdhci-msm: Use actual_clock to improve timeout calculations
   - sdhci-of-aspeed: Add Andrew Jeffery as maintainer
   - sdhci-of-aspeed: Extend clock support for the AST2600 variant
   - sdhci-pci-gli: Increase idle period for low power state for GL9763E
   - sdhci-pci-o2micro: Make tuning for SDR104 HW more robust
   - sdhci-sirf: Remove driver
   - sdhci-xenon: Add support for the AP807 variant
   - sunxi-mmc: Add support for the A100 variant
   - sunxi-mmc: Ensure host is suspended during system sleep
   - tmio: Add detection of data timeout errors
   - tmio/renesas_sdhi: Extend support for retuning
   - renesas_sdhi_internal_dmac: Add support for the ->pre|post_req() ops"

* tag 'mmc-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (86 commits)
  mmc: sdhci-esdhc-imx: fix kernel panic when remove module
  mmc: host: Retire MMC_GOLDFISH
  mmc: cb710: Use new tasklet API
  mmc: sdhci-pci-o2micro: Bug fix for SDR104 HW tuning failure
  mmc: mmc_test: use erase_arg for mmc_erase command
  mmc: wbsd: Use new tasklet API
  mmc: via-sdmmc: Use new tasklet API
  mmc: uniphier-sd: Use new tasklet API
  mmc: tifm_sd: Use new tasklet API
  mmc: s3cmci: Use new tasklet API
  mmc: omap: Use new tasklet API
  mmc: dw_mmc: Use new tasklet API
  mmc: au1xmmc: Use new tasklet API
  mmc: atmel-mci: Use new tasklet API
  mmc: cavium: Replace spin_lock_irqsave with spin_lock in hard IRQ
  mmc: queue: Remove unused define
  mmc: core: Drop redundant bouncesz from struct mmc_card
  mmc: core: Drop redundant member in struct mmc host
  mmc: core: Use host instead of card argument to mmc_spi_send_csd()
  mmc: core: Exclude unnecessary header file
  ...
  • Loading branch information
torvalds committed Feb 22, 2021
2 parents 32c080c + a56f441 commit 1947248
Show file tree
Hide file tree
Showing 83 changed files with 2,089 additions and 1,522 deletions.
12 changes: 6 additions & 6 deletions Documentation/block/inline-encryption.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ API presented to device drivers

A :c:type:``struct blk_keyslot_manager`` should be set up by device drivers in
the ``request_queue`` of the device. The device driver needs to call
``blk_ksm_init`` on the ``blk_keyslot_manager``, which specifying the number of
keyslots supported by the hardware.
``blk_ksm_init`` (or its resource-managed variant ``devm_blk_ksm_init``) on the
``blk_keyslot_manager``, while specifying the number of keyslots supported by
the hardware.

The device driver also needs to tell the KSM how to actually manipulate the
IE hardware in the device to do things like programming the crypto key into
Expand All @@ -202,10 +203,9 @@ needs each and every of its keyslots to be reprogrammed with the key it
"should have" at the point in time when the function is called. This is useful
e.g. if a device loses all its keys on runtime power down/up.

``blk_ksm_destroy`` should be called to free up all resources used by a keyslot
manager upon ``blk_ksm_init``, once the ``blk_keyslot_manager`` is no longer
needed.

If the driver used ``blk_ksm_init`` instead of ``devm_blk_ksm_init``, then
``blk_ksm_destroy`` should be called to free up all resources used by a
``blk_keyslot_manager`` once it is no longer needed.

Layered Devices
===============
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ properties:
- const: allwinner,sun9i-a80-mmc
- const: allwinner,sun50i-a64-emmc
- const: allwinner,sun50i-a64-mmc
- const: allwinner,sun50i-a100-emmc
- const: allwinner,sun50i-a100-mmc
- items:
- const: allwinner,sun8i-a83t-mmc
- const: allwinner,sun7i-a20-mmc
Expand All @@ -47,6 +49,12 @@ properties:
- items:
- const: allwinner,sun50i-h6-mmc
- const: allwinner,sun50i-a64-mmc
- items:
- const: allwinner,sun50i-h616-emmc
- const: allwinner,sun50i-a100-emmc
- items:
- const: allwinner,sun50i-h616-mmc
- const: allwinner,sun50i-a100-mmc

reg:
maxItems: 1
Expand Down
223 changes: 223 additions & 0 deletions Documentation/devicetree/bindings/mmc/arm,pl18x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mmc/arm,pl18x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ARM PrimeCell MultiMedia Card Interface (MMCI) PL180 and PL181

maintainers:
- Linus Walleij <[email protected]>
- Ulf Hansson <[email protected]>

description:
The ARM PrimeCells MMCI PL180 and PL181 provides an interface for
reading and writing to MultiMedia and SD cards alike. Over the years
vendors have use the VHDL code from ARM to create derivative MMC/SD/SDIO
host controllers with very similar characteristics.

allOf:
- $ref: /schemas/arm/primecell.yaml#
- $ref: mmc-controller.yaml#

# We need a select here so we don't match all nodes with 'arm,primecell'
select:
properties:
compatible:
contains:
enum:
- arm,pl180
- arm,pl181
- arm,pl18x
required:
- compatible

properties:
compatible:
oneOf:
- description: The first version of the block, simply called
PL180 and found in the ARM Integrator IM/PD1 logic module.
items:
- const: arm,pl180
- const: arm,primecell
- description: The improved version of the block, found in the
ARM Versatile and later reference designs. Further revisions
exist but get detected at runtime by reading some magic numbers
in the PrimeCell ID registers.
items:
- const: arm,pl181
- const: arm,primecell
- description: Wildcard entry that will let the operating system
inspect the PrimeCell ID registers to determine which hardware
variant of PL180 or PL181 this is.
items:
- const: arm,pl18x
- const: arm,primecell

clocks:
description: One or two clocks, the "apb_pclk" and the "MCLK"
which is the core block clock. The names are not compulsory.
minItems: 1
maxItems: 2

power-domains: true

resets:
maxItems: 1

reg:
description: the MMIO memory window must be exactly 4KB (0x1000) and the
layout should provide the PrimeCell ID registers so that the device can
be discovered. On ST Micro variants, a second register window may be
defined if a delay block is present and used for tuning.

interrupts:
description: The first interrupt is the command interrupt and corresponds
to the event at the end of a command. The second interrupt is the
PIO (polled I/O) interrupt and occurs when the FIFO needs to be
emptied as part of a bulk read from the card. Some variants have these
two interrupts wired into the same line (logic OR) and in that case
only one interrupt may be provided.
minItems: 1
maxItems: 2

st,sig-dir-dat0:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, bus signal direction pins used for
DAT[0].

st,sig-dir-dat2:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, bus signal direction pins used for
DAT[2].

st,sig-dir-dat31:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, bus signal direction pins used for
DAT[3] and DAT[1].

st,sig-dir-dat74:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, bus signal direction pins used for
DAT[7] and DAT[4].

st,sig-dir-cmd:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, CMD signal direction used for
pin CMD.

st,sig-pin-fbclk:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, feedback clock FBCLK signal pin
in use.

st,sig-dir:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, signal direction polarity used for
pins CMD, DAT[0], DAT[1], DAT[2] and DAT[3].

st,neg-edge:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, data and command phase relation,
generated on the sd clock falling edge.

st,use-ckin:
$ref: /schemas/types.yaml#/definitions/flag
description: ST Micro-specific property, use CKIN pin from an external
driver to sample the receive data (for example with a voltage switch
transceiver).

st,cmd-gpios:
maxItems: 1
description:
The GPIO matching the CMD pin.

st,ck-gpios:
maxItems: 1
description:
The GPIO matching the CK pin.

st,ckin-gpios:
maxItems: 1
description:
The GPIO matching the CKIN pin.

dependencies:
st,cmd-gpios: [ "st,use-ckin" ]
st,ck-gpios: [ "st,use-ckin" ]
st,ckin-gpios: [ "st,use-ckin" ]

unevaluatedProperties: false

required:
- compatible
- reg
- interrupts

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
mmc@5000 {
compatible = "arm,pl180", "arm,primecell";
reg = <0x5000 0x1000>;
interrupts-extended = <&vic 22 &sic 1>;
clocks = <&xtal24mhz>, <&pclk>;
clock-names = "mclk", "apb_pclk";
};
mmc@80126000 {
compatible = "arm,pl18x", "arm,primecell";
reg = <0x80126000 0x1000>;
interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&dma 29 0 0x2>, <&dma 29 0 0x0>;
dma-names = "rx", "tx";
clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>;
clock-names = "sdi", "apb_pclk";
max-frequency = <100000000>;
bus-width = <4>;
cap-sd-highspeed;
cap-mmc-highspeed;
cd-gpios = <&gpio2 31 0x4>;
st,sig-dir-dat0;
st,sig-dir-dat2;
st,sig-dir-cmd;
st,sig-pin-fbclk;
vmmc-supply = <&ab8500_ldo_aux3_reg>;
vqmmc-supply = <&vmmci>;
};
mmc@101f6000 {
compatible = "arm,pl18x", "arm,primecell";
reg = <0x101f6000 0x1000>;
clocks = <&sdiclk>, <&pclksdi>;
clock-names = "mclk", "apb_pclk";
interrupt-parent = <&vica>;
interrupts = <22>;
max-frequency = <400000>;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
full-pwr-cycle;
st,sig-dir-dat0;
st,sig-dir-dat2;
st,sig-dir-dat31;
st,sig-dir-cmd;
st,sig-pin-fbclk;
vmmc-supply = <&vmmc_regulator>;
};
mmc@52007000 {
compatible = "arm,pl18x", "arm,primecell";
arm,primecell-periphid = <0x10153180>;
reg = <0x52007000 0x1000>;
interrupts = <49>;
interrupt-names = "cmd_irq";
clocks = <&rcc 0>;
clock-names = "apb_pclk";
resets = <&rcc 1>;
cap-sd-highspeed;
cap-mmc-highspeed;
max-frequency = <120000000>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Required Properties:
- "marvell,armada-3700-sdhci": For controllers on Armada-3700 SoC.
Must provide a second register area and marvell,pad-type.
- "marvell,armada-ap806-sdhci": For controllers on Armada AP806.
- "marvell,armada-ap807-sdhci": For controllers on Armada AP807.
- "marvell,armada-cp110-sdhci": For controllers on Armada CP110.

- clocks:
Expand Down
74 changes: 0 additions & 74 deletions Documentation/devicetree/bindings/mmc/mmci.txt

This file was deleted.

1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ properties:
- renesas,sdhi-r8a77980 # R-Car V3H
- renesas,sdhi-r8a77990 # R-Car E3
- renesas,sdhi-r8a77995 # R-Car D3
- renesas,sdhi-r8a779a0 # R-Car V3U
- const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2

reg:
Expand Down
19 changes: 13 additions & 6 deletions Documentation/devicetree/bindings/mmc/sdhci-am654.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@ allOf:

properties:
compatible:
enum:
- ti,am654-sdhci-5.1
- ti,j721e-sdhci-8bit
- ti,j721e-sdhci-4bit
- ti,j7200-sdhci-8bit
- ti,j721e-sdhci-4bit
oneOf:
- const: ti,am654-sdhci-5.1
- const: ti,j721e-sdhci-8bit
- const: ti,j721e-sdhci-4bit
- const: ti,j721e-sdhci-4bit
- const: ti,am64-sdhci-8bit
- const: ti,am64-sdhci-4bit
- items:
- const: ti,j7200-sdhci-8bit
- const: ti,j721e-sdhci-8bit
- items:
- const: ti,j7200-sdhci-4bit
- const: ti,j721e-sdhci-4bit

reg:
maxItems: 2
Expand Down
Loading

0 comments on commit 1947248

Please sign in to comment.