Commit ef60eb0e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MMC and MEMSTICK updates from Ulf Hansson:
 "MMC core:
   - Add support for Cache Ctrl for SD cards
   - Add support for Power Off Notification for SD cards
   - Add support for read/write of the SD function extension registers
   - Allow broken eMMC HS400 mode to be disabled via DT
   - Allow UHS-I voltage switch for SDSC cards if supported
   - Disable command queueing in the ioctl path
   - Enable eMMC sleep commands to use HW busy polling to minimize delay
   - Extend re-use of the common polling loop to standardize behaviour
   - Take into account MMC_CAP_NEED_RSP_BUSY for eMMC HPI commands

  MMC host:
   - jz4740: Add support for the JZ4775 variant
   - sdhci-acpi: Disable write protect detection on Toshiba Encore 2 WT8-B
   - sdhci-esdhc-imx: Advertise HS400 support through MMC caps
   - sdhci-esdhc-imx: Enable support for system wakeup for SDIO
   - sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211
   - vub3000: Fix control-request direction

  MEMSTICK:
   - A couple of fixes/cleanups"

* tag 'mmc-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (54 commits)
  mmc: sdhci-iproc: Add support for the legacy sdhci controller on the BCM7211
  dt-bindings: mmc: sdhci-iproc: Add brcm,bcm7211a0-sdhci
  mmc: JZ4740: Add support for JZ4775
  dt-bindings: mmc: JZ4740: Add bindings for JZ4775
  mmc: sdhci-esdhc-imx: Enable support for system wakeup for SDIO
  mmc: Improve function name when aborting a tuning cmd
  mmc: sdhci-of-aspeed: Turn down a phase correction warning
  mmc: debugfs: add description for module parameter
  mmc: via-sdmmc: add a check against NULL pointer dereference
  mmc: sdhci-sprd: use sdhci_sprd_writew
  mmc: sdhci-esdhc-imx: remove unused is_imx6q_usdhc
  mmc: core: Allow UHS-I voltage switch for SDSC cards if supported
  mmc: mmc_spi: Imply container_of() to be no-op
  mmc: mmc_spi: Drop duplicate 'mmc_spi' in the debug messages
  mmc: dw_mmc-pltfm: Remove unused <linux/clk.h>
  mmc: sdhci-of-aspeed: Configure the SDHCIs as specified by the devicetree.
  mmc: core: Add a missing SPDX license header
  mmc: vub3000: fix control-request direction
  mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding
  mmc: sdhci_am654: Use pm_runtime_resume_and_get() to replace open coding
  ...
parents 43bd8a67 98b5ce4c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ properties:
      - brcm,bcm2711-emmc2
      - brcm,sdhci-iproc-cygnus
      - brcm,sdhci-iproc
      - brcm,bcm7211a0-sdhci

  reg:
    minItems: 1
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ properties:
          - ingenic,jz4740-mmc
          - ingenic,jz4725b-mmc
          - ingenic,jz4760-mmc
          - ingenic,jz4775-mmc
          - ingenic,jz4780-mmc
          - ingenic,x1000-mmc
      - items:
+7 −18
Original line number Diff line number Diff line
@@ -220,6 +220,11 @@ properties:
    description:
      eMMC HS400 enhanced strobe mode is supported

  no-mmc-hs400:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      All eMMC HS400 modes are not supported.

  dsr:
    description:
      Value the card Driver Stage Register (DSR) should be programmed
@@ -357,22 +362,6 @@ dependencies:
additionalProperties: true

examples:
  - |
    mmc@ab000000 {
        compatible = "sdhci";
        reg = <0xab000000 0x200>;
        interrupts = <23>;
        bus-width = <4>;
        cd-gpios = <&gpio 69 0>;
        cd-inverted;
        wp-gpios = <&gpio 70 0>;
        max-frequency = <50000000>;
        keep-power-in-suspend;
        wakeup-source;
        mmc-pwrseq = <&sdhci0_pwrseq>;
        clk-phase-sd-hs = <63>, <72>;
    };

  - |
    mmc3: mmc@1c12000 {
        #address-cells = <1>;
@@ -385,9 +374,9 @@ examples:
        non-removable;
        mmc-pwrseq = <&sdhci0_pwrseq>;

        brcmf: bcrmf@1 {
        brcmf: wifi@1 {
            reg = <1>;
            compatible = "brcm,bcm43xx-fmac";
            compatible = "brcm,bcm4329-fmac";
            interrupt-parent = <&pio>;
            interrupts = <10 8>;
            interrupt-names = "host-wake";
+0 −53
Original line number Diff line number Diff line
* Renesas Multi Media Card Interface (MMCIF) Controller

This file documents differences between the core properties in mmc.txt
and the properties used by the MMCIF device.


Required properties:

- compatible: should be "renesas,mmcif-<soctype>", "renesas,sh-mmcif" as a
  fallback. Examples with <soctype> are:
	- "renesas,mmcif-r7s72100" for the MMCIF found in r7s72100 SoCs
	- "renesas,mmcif-r8a73a4" for the MMCIF found in r8a73a4 SoCs
	- "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
	- "renesas,mmcif-r8a7742" for the MMCIF found in r8a7742 SoCs
	- "renesas,mmcif-r8a7743" for the MMCIF found in r8a7743 SoCs
	- "renesas,mmcif-r8a7744" for the MMCIF found in r8a7744 SoCs
	- "renesas,mmcif-r8a7745" for the MMCIF found in r8a7745 SoCs
	- "renesas,mmcif-r8a7778" for the MMCIF found in r8a7778 SoCs
	- "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
	- "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
	- "renesas,mmcif-r8a7793" for the MMCIF found in r8a7793 SoCs
	- "renesas,mmcif-r8a7794" for the MMCIF found in r8a7794 SoCs
	- "renesas,mmcif-sh73a0" for the MMCIF found in sh73a0 SoCs

- interrupts: Some SoCs have only 1 shared interrupt, while others have either
  2 or 3 individual interrupts (error, int, card detect). Below is the number
  of interrupts for each SoC:
    1: r8a73a4, r8a7742, r8a7743, r8a7744, r8a7745, r8a7778, r8a7790, r8a7791,
       r8a7793, r8a7794
    2: r8a7740, sh73a0
    3: r7s72100

- clocks: reference to the functional clock

- dmas: reference to the DMA channels, one per channel name listed in the
  dma-names property.
- dma-names: must contain "tx" for the transmit DMA channel and "rx" for the
  receive DMA channel.
- max-frequency: Maximum operating clock frequency, driver uses default clock
  frequency if it is not set.


Example: R8A7790 (R-Car H2) MMCIF0

	mmcif0: mmc@ee200000 {
		compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
		reg = <0 0xee200000 0 0x80>;
		interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
		dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
		dma-names = "tx", "rx";
		max-frequency = <97500000>;
	};
+135 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mmc/renesas,mmcif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas Multi Media Card Interface (MMCIF) Controller

maintainers:
  - Wolfram Sang <wsa+renesas@sang-engineering.com>

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

properties:
  compatible:
    items:
      - enum:
          - renesas,mmcif-r7s72100 # RZ/A1H
          - renesas,mmcif-r8a73a4  # R-Mobile APE6
          - renesas,mmcif-r8a7740  # R-Mobile A1
          - renesas,mmcif-r8a7742  # RZ/G1H
          - renesas,mmcif-r8a7743  # RZ/G1M
          - renesas,mmcif-r8a7744  # RZ/G1N
          - renesas,mmcif-r8a7745  # RZ/G1E
          - renesas,mmcif-r8a7778  # R-Car M1A
          - renesas,mmcif-r8a7790  # R-Car H2
          - renesas,mmcif-r8a7791  # R-Car M2-W
          - renesas,mmcif-r8a7793  # R-Car M2-N
          - renesas,mmcif-r8a7794  # R-Car E2
          - renesas,mmcif-sh73a0   # SH-Mobile AG5
      - const: renesas,sh-mmcif

  reg:
    maxItems: 1

  interrupts: true

  clocks:
    maxItems: 1

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  dmas:
    minItems: 2
    maxItems: 4
    description:
      Must contain a list of pairs of references to DMA specifiers, one for
      transmission, and one for reception.

  dma-names:
    minItems: 2
    maxItems: 4
    items:
      enum:
        - tx
        - rx

  max-frequency: true

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - power-domains

if:
  properties:
    compatible:
      contains:
        const: renesas,mmcif-r7s72100
then:
  properties:
    interrupts:
      items:
        - description: Error interrupt
        - description: Normal operation interrupt
        - description: Card detection interrupt
else:
  if:
    properties:
      compatible:
        contains:
          enum:
            - renesas,mmcif-r8a7740
            - renesas,mmcif-sh73a0
  then:
    properties:
      interrupts:
        items:
          - description: Error interrupt
          - description: Normal operation interrupt
  else:
    if:
      properties:
        compatible:
          contains:
            enum:
              - renesas,mmcif-r8a73a4
              - renesas,mmcif-r8a7778
    then:
      properties:
        interrupts:
          maxItems: 1
    else:
      properties:
        interrupts:
          maxItems: 1
      required:
        - resets

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a7790-sysc.h>

    mmcif0: mmc@ee200000 {
            compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
            reg = <0xee200000 0x80>;
            interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&cpg CPG_MOD 315>;
            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
            resets = <&cpg 315>;
            dmas = <&dmac0 0xd1>, <&dmac0 0xd2>, <&dmac1 0xd1>, <&dmac1 0xd2>;
            dma-names = "tx", "rx", "tx", "rx";
            max-frequency = <97500000>;
    };
Loading