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 56*1f9f2cf3SYann Gautier - description: Entries for STMicroelectronics variant of PL18x. 57552bc464SYann Gautier items: 58*1f9f2cf3SYann Gautier - enum: 59*1f9f2cf3SYann Gautier - st,stm32-sdmmc2 60*1f9f2cf3SYann 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 821a970593SLinus Walleij power-domains: true 831a970593SLinus Walleij 841a970593SLinus Walleij resets: 851a970593SLinus Walleij maxItems: 1 861a970593SLinus Walleij 871a970593SLinus Walleij reg: 881a970593SLinus Walleij description: the MMIO memory window must be exactly 4KB (0x1000) and the 891a970593SLinus Walleij layout should provide the PrimeCell ID registers so that the device can 901a970593SLinus Walleij be discovered. On ST Micro variants, a second register window may be 911a970593SLinus Walleij defined if a delay block is present and used for tuning. 921a970593SLinus Walleij 931a970593SLinus Walleij interrupts: 941a970593SLinus Walleij description: The first interrupt is the command interrupt and corresponds 951a970593SLinus Walleij to the event at the end of a command. The second interrupt is the 961a970593SLinus Walleij PIO (polled I/O) interrupt and occurs when the FIFO needs to be 971a970593SLinus Walleij emptied as part of a bulk read from the card. Some variants have these 981a970593SLinus Walleij two interrupts wired into the same line (logic OR) and in that case 992ab441f9SMarek Vasut only one interrupt may be provided. The interrupt-names property is 1002ab441f9SMarek Vasut not used due to inconsistency of existing DTs regarding its content. 1012ab441f9SMarek Vasut deprecated: false 1021a970593SLinus Walleij minItems: 1 1031a970593SLinus Walleij maxItems: 2 1041a970593SLinus Walleij 1051a970593SLinus Walleij st,sig-dir-dat0: 1061a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1071a970593SLinus Walleij description: ST Micro-specific property, bus signal direction pins used for 1081a970593SLinus Walleij DAT[0]. 1091a970593SLinus Walleij 1101a970593SLinus Walleij st,sig-dir-dat2: 1111a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1121a970593SLinus Walleij description: ST Micro-specific property, bus signal direction pins used for 1131a970593SLinus Walleij DAT[2]. 1141a970593SLinus Walleij 1151a970593SLinus Walleij st,sig-dir-dat31: 1161a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1171a970593SLinus Walleij description: ST Micro-specific property, bus signal direction pins used for 1181a970593SLinus Walleij DAT[3] and DAT[1]. 1191a970593SLinus Walleij 1201a970593SLinus Walleij st,sig-dir-dat74: 1211a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1221a970593SLinus Walleij description: ST Micro-specific property, bus signal direction pins used for 1231a970593SLinus Walleij DAT[7] and DAT[4]. 1241a970593SLinus Walleij 1251a970593SLinus Walleij st,sig-dir-cmd: 1261a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1271a970593SLinus Walleij description: ST Micro-specific property, CMD signal direction used for 1281a970593SLinus Walleij pin CMD. 1291a970593SLinus Walleij 1301a970593SLinus Walleij st,sig-pin-fbclk: 1311a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1321a970593SLinus Walleij description: ST Micro-specific property, feedback clock FBCLK signal pin 1331a970593SLinus Walleij in use. 1341a970593SLinus Walleij 1351a970593SLinus Walleij st,sig-dir: 1361a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1371a970593SLinus Walleij description: ST Micro-specific property, signal direction polarity used for 1381a970593SLinus Walleij pins CMD, DAT[0], DAT[1], DAT[2] and DAT[3]. 1391a970593SLinus Walleij 1401a970593SLinus Walleij st,neg-edge: 1411a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1421a970593SLinus Walleij description: ST Micro-specific property, data and command phase relation, 1431a970593SLinus Walleij generated on the sd clock falling edge. 1441a970593SLinus Walleij 1451a970593SLinus Walleij st,use-ckin: 1461a970593SLinus Walleij $ref: /schemas/types.yaml#/definitions/flag 1471a970593SLinus Walleij description: ST Micro-specific property, use CKIN pin from an external 1481a970593SLinus Walleij driver to sample the receive data (for example with a voltage switch 1491a970593SLinus Walleij transceiver). 1501a970593SLinus Walleij 151bbaa298fSMarek Vasut st,cmd-gpios: 152bbaa298fSMarek Vasut maxItems: 1 153bbaa298fSMarek Vasut description: 154bbaa298fSMarek Vasut The GPIO matching the CMD pin. 155bbaa298fSMarek Vasut 156bbaa298fSMarek Vasut st,ck-gpios: 157bbaa298fSMarek Vasut maxItems: 1 158bbaa298fSMarek Vasut description: 159bbaa298fSMarek Vasut The GPIO matching the CK pin. 160bbaa298fSMarek Vasut 161bbaa298fSMarek Vasut st,ckin-gpios: 162bbaa298fSMarek Vasut maxItems: 1 163bbaa298fSMarek Vasut description: 164bbaa298fSMarek Vasut The GPIO matching the CKIN pin. 165bbaa298fSMarek Vasut 166bbaa298fSMarek Vasutdependencies: 167bbaa298fSMarek Vasut st,cmd-gpios: [ "st,use-ckin" ] 168bbaa298fSMarek Vasut st,ck-gpios: [ "st,use-ckin" ] 169bbaa298fSMarek Vasut st,ckin-gpios: [ "st,use-ckin" ] 170bbaa298fSMarek Vasut 1711a970593SLinus WalleijunevaluatedProperties: false 1721a970593SLinus Walleij 1731a970593SLinus Walleijrequired: 1741a970593SLinus Walleij - compatible 1751a970593SLinus Walleij - reg 1761a970593SLinus Walleij - interrupts 1771a970593SLinus Walleij 1781a970593SLinus Walleijexamples: 1791a970593SLinus Walleij - | 1801a970593SLinus Walleij #include <dt-bindings/interrupt-controller/irq.h> 1811a970593SLinus Walleij #include <dt-bindings/gpio/gpio.h> 1821a970593SLinus Walleij 1831a970593SLinus Walleij mmc@5000 { 1841a970593SLinus Walleij compatible = "arm,pl180", "arm,primecell"; 1851a970593SLinus Walleij reg = <0x5000 0x1000>; 1861a970593SLinus Walleij interrupts-extended = <&vic 22 &sic 1>; 1871a970593SLinus Walleij clocks = <&xtal24mhz>, <&pclk>; 1881a970593SLinus Walleij clock-names = "mclk", "apb_pclk"; 1891a970593SLinus Walleij }; 1901a970593SLinus Walleij 19159449e5dSRob Herring - | 19259449e5dSRob Herring #include <dt-bindings/interrupt-controller/irq.h> 19359449e5dSRob Herring 1941a970593SLinus Walleij mmc@80126000 { 1951a970593SLinus Walleij compatible = "arm,pl18x", "arm,primecell"; 1961a970593SLinus Walleij reg = <0x80126000 0x1000>; 1971a970593SLinus Walleij interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>; 1981a970593SLinus Walleij dmas = <&dma 29 0 0x2>, <&dma 29 0 0x0>; 1991a970593SLinus Walleij dma-names = "rx", "tx"; 2001a970593SLinus Walleij clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>; 2011a970593SLinus Walleij clock-names = "sdi", "apb_pclk"; 2021a970593SLinus Walleij max-frequency = <100000000>; 2031a970593SLinus Walleij bus-width = <4>; 2041a970593SLinus Walleij cap-sd-highspeed; 2051a970593SLinus Walleij cap-mmc-highspeed; 2061a970593SLinus Walleij cd-gpios = <&gpio2 31 0x4>; 2071a970593SLinus Walleij st,sig-dir-dat0; 2081a970593SLinus Walleij st,sig-dir-dat2; 2091a970593SLinus Walleij st,sig-dir-cmd; 2101a970593SLinus Walleij st,sig-pin-fbclk; 2111a970593SLinus Walleij vmmc-supply = <&ab8500_ldo_aux3_reg>; 2121a970593SLinus Walleij vqmmc-supply = <&vmmci>; 2131a970593SLinus Walleij }; 2141a970593SLinus Walleij 21559449e5dSRob Herring - | 2161a970593SLinus Walleij mmc@101f6000 { 2171a970593SLinus Walleij compatible = "arm,pl18x", "arm,primecell"; 2181a970593SLinus Walleij reg = <0x101f6000 0x1000>; 2191a970593SLinus Walleij clocks = <&sdiclk>, <&pclksdi>; 2201a970593SLinus Walleij clock-names = "mclk", "apb_pclk"; 2211a970593SLinus Walleij interrupts = <22>; 2221a970593SLinus Walleij max-frequency = <400000>; 2231a970593SLinus Walleij bus-width = <4>; 2241a970593SLinus Walleij cap-mmc-highspeed; 2251a970593SLinus Walleij cap-sd-highspeed; 2261a970593SLinus Walleij full-pwr-cycle; 2271a970593SLinus Walleij st,sig-dir-dat0; 2281a970593SLinus Walleij st,sig-dir-dat2; 2291a970593SLinus Walleij st,sig-dir-dat31; 2301a970593SLinus Walleij st,sig-dir-cmd; 2311a970593SLinus Walleij st,sig-pin-fbclk; 2321a970593SLinus Walleij vmmc-supply = <&vmmc_regulator>; 2331a970593SLinus Walleij }; 2341a970593SLinus Walleij 23559449e5dSRob Herring - | 2361a970593SLinus Walleij mmc@52007000 { 2371a970593SLinus Walleij compatible = "arm,pl18x", "arm,primecell"; 2381a970593SLinus Walleij arm,primecell-periphid = <0x10153180>; 2391a970593SLinus Walleij reg = <0x52007000 0x1000>; 2401a970593SLinus Walleij interrupts = <49>; 2411a970593SLinus Walleij clocks = <&rcc 0>; 2421a970593SLinus Walleij clock-names = "apb_pclk"; 2431a970593SLinus Walleij resets = <&rcc 1>; 2441a970593SLinus Walleij cap-sd-highspeed; 2451a970593SLinus Walleij cap-mmc-highspeed; 2461a970593SLinus Walleij max-frequency = <120000000>; 2471a970593SLinus Walleij }; 248