xref: /linux/Documentation/devicetree/bindings/mmc/arm,pl18x.yaml (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
11a970593SLinus Walleij# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
21a970593SLinus Walleij%YAML 1.2
31a970593SLinus Walleij---
41a970593SLinus Walleij$id: http://devicetree.org/schemas/mmc/arm,pl18x.yaml#
51a970593SLinus Walleij$schema: http://devicetree.org/meta-schemas/core.yaml#
61a970593SLinus Walleij
71a970593SLinus Walleijtitle: ARM PrimeCell MultiMedia Card Interface (MMCI) PL180 and PL181
81a970593SLinus Walleij
91a970593SLinus Walleijmaintainers:
101a970593SLinus Walleij  - Linus Walleij <linus.walleij@linaro.org>
111a970593SLinus Walleij  - Ulf Hansson <ulf.hansson@linaro.org>
121a970593SLinus Walleij
131a970593SLinus Walleijdescription:
141a970593SLinus Walleij  The ARM PrimeCells MMCI PL180 and PL181 provides an interface for
151a970593SLinus Walleij  reading and writing to MultiMedia and SD cards alike. Over the years
161a970593SLinus Walleij  vendors have use the VHDL code from ARM to create derivative MMC/SD/SDIO
171a970593SLinus Walleij  host controllers with very similar characteristics.
181a970593SLinus Walleij
191a970593SLinus WalleijallOf:
201a970593SLinus Walleij  - $ref: /schemas/arm/primecell.yaml#
211a970593SLinus Walleij  - $ref: mmc-controller.yaml#
221a970593SLinus Walleij
231a970593SLinus Walleij# We need a select here so we don't match all nodes with 'arm,primecell'
241a970593SLinus Walleijselect:
251a970593SLinus Walleij  properties:
261a970593SLinus Walleij    compatible:
271a970593SLinus Walleij      contains:
281a970593SLinus Walleij        enum:
291a970593SLinus Walleij          - arm,pl180
301a970593SLinus Walleij          - arm,pl181
311a970593SLinus Walleij          - arm,pl18x
321a970593SLinus Walleij  required:
331a970593SLinus Walleij    - compatible
341a970593SLinus Walleij
351a970593SLinus Walleijproperties:
361a970593SLinus Walleij  compatible:
371a970593SLinus Walleij    oneOf:
381a970593SLinus Walleij      - description: The first version of the block, simply called
391a970593SLinus Walleij          PL180 and found in the ARM Integrator IM/PD1 logic module.
401a970593SLinus Walleij        items:
411a970593SLinus Walleij          - const: arm,pl180
421a970593SLinus Walleij          - const: arm,primecell
431a970593SLinus Walleij      - description: The improved version of the block, found in the
441a970593SLinus Walleij          ARM Versatile and later reference designs. Further revisions
451a970593SLinus Walleij          exist but get detected at runtime by reading some magic numbers
461a970593SLinus Walleij          in the PrimeCell ID registers.
471a970593SLinus Walleij        items:
481a970593SLinus Walleij          - const: arm,pl181
491a970593SLinus Walleij          - const: arm,primecell
501a970593SLinus Walleij      - description: Wildcard entry that will let the operating system
511a970593SLinus Walleij          inspect the PrimeCell ID registers to determine which hardware
521a970593SLinus Walleij          variant of PL180 or PL181 this is.
531a970593SLinus Walleij        items:
541a970593SLinus Walleij          - const: arm,pl18x
551a970593SLinus Walleij          - const: arm,primecell
561f9f2cf3SYann Gautier      - description: Entries for STMicroelectronics variant of PL18x.
57552bc464SYann Gautier        items:
581f9f2cf3SYann Gautier          - enum:
591f9f2cf3SYann Gautier              - st,stm32-sdmmc2
601f9f2cf3SYann Gautier              - st,stm32mp25-sdmmc2
61552bc464SYann Gautier          - const: arm,pl18x
62552bc464SYann Gautier          - const: arm,primecell
631a970593SLinus Walleij
641a970593SLinus Walleij  clocks:
651a970593SLinus Walleij    description: One or two clocks, the "apb_pclk" and the "MCLK"
661a970593SLinus Walleij      which is the core block clock. The names are not compulsory.
671a970593SLinus Walleij    minItems: 1
681a970593SLinus Walleij    maxItems: 2
691a970593SLinus Walleij
704df297aaSRob Herring  dmas:
714df297aaSRob Herring    maxItems: 2
724df297aaSRob Herring
734df297aaSRob Herring  dma-names:
7433a48bd8SDavid Heidelberg    oneOf:
7533a48bd8SDavid Heidelberg      - items:
7633a48bd8SDavid Heidelberg          - const: tx
7733a48bd8SDavid Heidelberg          - const: rx
7833a48bd8SDavid Heidelberg      - items:
794df297aaSRob Herring          - const: rx
804df297aaSRob Herring          - const: tx
814df297aaSRob Herring
82*02ec75edSGatien Chevallier  access-controllers:
83*02ec75edSGatien Chevallier    minItems: 1
84*02ec75edSGatien Chevallier    maxItems: 2
85*02ec75edSGatien Chevallier
861a970593SLinus Walleij  power-domains: true
871a970593SLinus Walleij
881a970593SLinus Walleij  resets:
891a970593SLinus Walleij    maxItems: 1
901a970593SLinus Walleij
911a970593SLinus Walleij  reg:
921a970593SLinus Walleij    description: the MMIO memory window must be exactly 4KB (0x1000) and the
931a970593SLinus Walleij      layout should provide the PrimeCell ID registers so that the device can
941a970593SLinus Walleij      be discovered. On ST Micro variants, a second register window may be
951a970593SLinus Walleij      defined if a delay block is present and used for tuning.
961a970593SLinus Walleij
971a970593SLinus Walleij  interrupts:
981a970593SLinus Walleij    description: The first interrupt is the command interrupt and corresponds
991a970593SLinus Walleij      to the event at the end of a command. The second interrupt is the
1001a970593SLinus Walleij      PIO (polled I/O) interrupt and occurs when the FIFO needs to be
1011a970593SLinus Walleij      emptied as part of a bulk read from the card. Some variants have these
1021a970593SLinus Walleij      two interrupts wired into the same line (logic OR) and in that case
1032ab441f9SMarek Vasut      only one interrupt may be provided. The interrupt-names property is
1042ab441f9SMarek Vasut      not used due to inconsistency of existing DTs regarding its content.
1052ab441f9SMarek Vasut    deprecated: false
1061a970593SLinus Walleij    minItems: 1
1071a970593SLinus Walleij    maxItems: 2
1081a970593SLinus Walleij
1091a970593SLinus Walleij  st,sig-dir-dat0:
1101a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1111a970593SLinus Walleij    description: ST Micro-specific property, bus signal direction pins used for
1121a970593SLinus Walleij      DAT[0].
1131a970593SLinus Walleij
1141a970593SLinus Walleij  st,sig-dir-dat2:
1151a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1161a970593SLinus Walleij    description: ST Micro-specific property, bus signal direction pins used for
1171a970593SLinus Walleij      DAT[2].
1181a970593SLinus Walleij
1191a970593SLinus Walleij  st,sig-dir-dat31:
1201a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1211a970593SLinus Walleij    description: ST Micro-specific property, bus signal direction pins used for
1221a970593SLinus Walleij      DAT[3] and DAT[1].
1231a970593SLinus Walleij
1241a970593SLinus Walleij  st,sig-dir-dat74:
1251a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1261a970593SLinus Walleij    description: ST Micro-specific property, bus signal direction pins used for
1271a970593SLinus Walleij      DAT[7] and DAT[4].
1281a970593SLinus Walleij
1291a970593SLinus Walleij  st,sig-dir-cmd:
1301a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1311a970593SLinus Walleij    description: ST Micro-specific property, CMD signal direction used for
1321a970593SLinus Walleij      pin CMD.
1331a970593SLinus Walleij
1341a970593SLinus Walleij  st,sig-pin-fbclk:
1351a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1361a970593SLinus Walleij    description: ST Micro-specific property, feedback clock FBCLK signal pin
1371a970593SLinus Walleij      in use.
1381a970593SLinus Walleij
1391a970593SLinus Walleij  st,sig-dir:
1401a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1411a970593SLinus Walleij    description: ST Micro-specific property, signal direction polarity used for
1421a970593SLinus Walleij      pins CMD, DAT[0], DAT[1], DAT[2] and DAT[3].
1431a970593SLinus Walleij
1441a970593SLinus Walleij  st,neg-edge:
1451a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1461a970593SLinus Walleij    description: ST Micro-specific property, data and command phase relation,
1471a970593SLinus Walleij      generated on the sd clock falling edge.
1481a970593SLinus Walleij
1491a970593SLinus Walleij  st,use-ckin:
1501a970593SLinus Walleij    $ref: /schemas/types.yaml#/definitions/flag
1511a970593SLinus Walleij    description: ST Micro-specific property, use CKIN pin from an external
1521a970593SLinus Walleij      driver to sample the receive data (for example with a voltage switch
1531a970593SLinus Walleij      transceiver).
1541a970593SLinus Walleij
155bbaa298fSMarek Vasut  st,cmd-gpios:
156bbaa298fSMarek Vasut    maxItems: 1
157bbaa298fSMarek Vasut    description:
158bbaa298fSMarek Vasut      The GPIO matching the CMD pin.
159bbaa298fSMarek Vasut
160bbaa298fSMarek Vasut  st,ck-gpios:
161bbaa298fSMarek Vasut    maxItems: 1
162bbaa298fSMarek Vasut    description:
163bbaa298fSMarek Vasut      The GPIO matching the CK pin.
164bbaa298fSMarek Vasut
165bbaa298fSMarek Vasut  st,ckin-gpios:
166bbaa298fSMarek Vasut    maxItems: 1
167bbaa298fSMarek Vasut    description:
168bbaa298fSMarek Vasut      The GPIO matching the CKIN pin.
169bbaa298fSMarek Vasut
170bbaa298fSMarek Vasutdependencies:
171bbaa298fSMarek Vasut  st,cmd-gpios: [ "st,use-ckin" ]
172bbaa298fSMarek Vasut  st,ck-gpios: [ "st,use-ckin" ]
173bbaa298fSMarek Vasut  st,ckin-gpios: [ "st,use-ckin" ]
174bbaa298fSMarek Vasut
1751a970593SLinus WalleijunevaluatedProperties: false
1761a970593SLinus Walleij
1771a970593SLinus Walleijrequired:
1781a970593SLinus Walleij  - compatible
1791a970593SLinus Walleij  - reg
1801a970593SLinus Walleij  - interrupts
1811a970593SLinus Walleij
1821a970593SLinus Walleijexamples:
1831a970593SLinus Walleij  - |
1841a970593SLinus Walleij    #include <dt-bindings/interrupt-controller/irq.h>
1851a970593SLinus Walleij    #include <dt-bindings/gpio/gpio.h>
1861a970593SLinus Walleij
1871a970593SLinus Walleij    mmc@5000 {
1881a970593SLinus Walleij      compatible = "arm,pl180", "arm,primecell";
1891a970593SLinus Walleij      reg = <0x5000 0x1000>;
1901a970593SLinus Walleij      interrupts-extended = <&vic 22 &sic 1>;
1911a970593SLinus Walleij      clocks = <&xtal24mhz>, <&pclk>;
1921a970593SLinus Walleij      clock-names = "mclk", "apb_pclk";
1931a970593SLinus Walleij    };
1941a970593SLinus Walleij
19559449e5dSRob Herring  - |
19659449e5dSRob Herring    #include <dt-bindings/interrupt-controller/irq.h>
19759449e5dSRob Herring
1981a970593SLinus Walleij    mmc@80126000 {
1991a970593SLinus Walleij      compatible = "arm,pl18x", "arm,primecell";
2001a970593SLinus Walleij      reg = <0x80126000 0x1000>;
2011a970593SLinus Walleij      interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>;
2021a970593SLinus Walleij      dmas = <&dma 29 0 0x2>, <&dma 29 0 0x0>;
2031a970593SLinus Walleij      dma-names = "rx", "tx";
2041a970593SLinus Walleij      clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>;
2051a970593SLinus Walleij      clock-names = "sdi", "apb_pclk";
2061a970593SLinus Walleij      max-frequency = <100000000>;
2071a970593SLinus Walleij      bus-width = <4>;
2081a970593SLinus Walleij      cap-sd-highspeed;
2091a970593SLinus Walleij      cap-mmc-highspeed;
2101a970593SLinus Walleij      cd-gpios = <&gpio2 31 0x4>;
2111a970593SLinus Walleij      st,sig-dir-dat0;
2121a970593SLinus Walleij      st,sig-dir-dat2;
2131a970593SLinus Walleij      st,sig-dir-cmd;
2141a970593SLinus Walleij      st,sig-pin-fbclk;
2151a970593SLinus Walleij      vmmc-supply = <&ab8500_ldo_aux3_reg>;
2161a970593SLinus Walleij      vqmmc-supply = <&vmmci>;
2171a970593SLinus Walleij    };
2181a970593SLinus Walleij
21959449e5dSRob Herring  - |
2201a970593SLinus Walleij    mmc@101f6000 {
2211a970593SLinus Walleij      compatible = "arm,pl18x", "arm,primecell";
2221a970593SLinus Walleij      reg = <0x101f6000 0x1000>;
2231a970593SLinus Walleij      clocks = <&sdiclk>, <&pclksdi>;
2241a970593SLinus Walleij      clock-names = "mclk", "apb_pclk";
2251a970593SLinus Walleij      interrupts = <22>;
2261a970593SLinus Walleij      max-frequency = <400000>;
2271a970593SLinus Walleij      bus-width = <4>;
2281a970593SLinus Walleij      cap-mmc-highspeed;
2291a970593SLinus Walleij      cap-sd-highspeed;
2301a970593SLinus Walleij      full-pwr-cycle;
2311a970593SLinus Walleij      st,sig-dir-dat0;
2321a970593SLinus Walleij      st,sig-dir-dat2;
2331a970593SLinus Walleij      st,sig-dir-dat31;
2341a970593SLinus Walleij      st,sig-dir-cmd;
2351a970593SLinus Walleij      st,sig-pin-fbclk;
2361a970593SLinus Walleij      vmmc-supply = <&vmmc_regulator>;
2371a970593SLinus Walleij    };
2381a970593SLinus Walleij
23959449e5dSRob Herring  - |
2401a970593SLinus Walleij    mmc@52007000 {
2411a970593SLinus Walleij      compatible = "arm,pl18x", "arm,primecell";
2421a970593SLinus Walleij      arm,primecell-periphid = <0x10153180>;
2431a970593SLinus Walleij      reg = <0x52007000 0x1000>;
2441a970593SLinus Walleij      interrupts = <49>;
2451a970593SLinus Walleij      clocks = <&rcc 0>;
2461a970593SLinus Walleij      clock-names = "apb_pclk";
2471a970593SLinus Walleij      resets = <&rcc 1>;
2481a970593SLinus Walleij      cap-sd-highspeed;
2491a970593SLinus Walleij      cap-mmc-highspeed;
2501a970593SLinus Walleij      max-frequency = <120000000>;
2511a970593SLinus Walleij    };
252