15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/arm,pl18x.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: ARM PrimeCell MultiMedia Card Interface (MMCI) PL180 and PL181 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Linus Walleij <linus.walleij@linaro.org> 115def4c47SEmmanuel Vadot - Ulf Hansson <ulf.hansson@linaro.org> 125def4c47SEmmanuel Vadot 135def4c47SEmmanuel Vadotdescription: 145def4c47SEmmanuel Vadot The ARM PrimeCells MMCI PL180 and PL181 provides an interface for 155def4c47SEmmanuel Vadot reading and writing to MultiMedia and SD cards alike. Over the years 165def4c47SEmmanuel Vadot vendors have use the VHDL code from ARM to create derivative MMC/SD/SDIO 175def4c47SEmmanuel Vadot host controllers with very similar characteristics. 185def4c47SEmmanuel Vadot 195def4c47SEmmanuel VadotallOf: 205def4c47SEmmanuel Vadot - $ref: /schemas/arm/primecell.yaml# 215def4c47SEmmanuel Vadot - $ref: mmc-controller.yaml# 225def4c47SEmmanuel Vadot 235def4c47SEmmanuel Vadot# We need a select here so we don't match all nodes with 'arm,primecell' 245def4c47SEmmanuel Vadotselect: 255def4c47SEmmanuel Vadot properties: 265def4c47SEmmanuel Vadot compatible: 275def4c47SEmmanuel Vadot contains: 285def4c47SEmmanuel Vadot enum: 295def4c47SEmmanuel Vadot - arm,pl180 305def4c47SEmmanuel Vadot - arm,pl181 315def4c47SEmmanuel Vadot - arm,pl18x 325def4c47SEmmanuel Vadot required: 335def4c47SEmmanuel Vadot - compatible 345def4c47SEmmanuel Vadot 355def4c47SEmmanuel Vadotproperties: 365def4c47SEmmanuel Vadot compatible: 375def4c47SEmmanuel Vadot oneOf: 385def4c47SEmmanuel Vadot - description: The first version of the block, simply called 395def4c47SEmmanuel Vadot PL180 and found in the ARM Integrator IM/PD1 logic module. 405def4c47SEmmanuel Vadot items: 415def4c47SEmmanuel Vadot - const: arm,pl180 425def4c47SEmmanuel Vadot - const: arm,primecell 435def4c47SEmmanuel Vadot - description: The improved version of the block, found in the 445def4c47SEmmanuel Vadot ARM Versatile and later reference designs. Further revisions 455def4c47SEmmanuel Vadot exist but get detected at runtime by reading some magic numbers 465def4c47SEmmanuel Vadot in the PrimeCell ID registers. 475def4c47SEmmanuel Vadot items: 485def4c47SEmmanuel Vadot - const: arm,pl181 495def4c47SEmmanuel Vadot - const: arm,primecell 505def4c47SEmmanuel Vadot - description: Wildcard entry that will let the operating system 515def4c47SEmmanuel Vadot inspect the PrimeCell ID registers to determine which hardware 525def4c47SEmmanuel Vadot variant of PL180 or PL181 this is. 535def4c47SEmmanuel Vadot items: 545def4c47SEmmanuel Vadot - const: arm,pl18x 555def4c47SEmmanuel Vadot - const: arm,primecell 56f126890aSEmmanuel Vadot - description: Entries for STMicroelectronics variant of PL18x. 57e67e8565SEmmanuel Vadot items: 58f126890aSEmmanuel Vadot - enum: 59f126890aSEmmanuel Vadot - st,stm32-sdmmc2 60f126890aSEmmanuel Vadot - st,stm32mp25-sdmmc2 61e67e8565SEmmanuel Vadot - const: arm,pl18x 62e67e8565SEmmanuel Vadot - const: arm,primecell 635def4c47SEmmanuel Vadot 645def4c47SEmmanuel Vadot clocks: 655def4c47SEmmanuel Vadot description: One or two clocks, the "apb_pclk" and the "MCLK" 665def4c47SEmmanuel Vadot which is the core block clock. The names are not compulsory. 675def4c47SEmmanuel Vadot minItems: 1 685def4c47SEmmanuel Vadot maxItems: 2 695def4c47SEmmanuel Vadot 70e67e8565SEmmanuel Vadot dmas: 71e67e8565SEmmanuel Vadot maxItems: 2 72e67e8565SEmmanuel Vadot 73e67e8565SEmmanuel Vadot dma-names: 74e67e8565SEmmanuel Vadot oneOf: 75e67e8565SEmmanuel Vadot - items: 76e67e8565SEmmanuel Vadot - const: tx 77e67e8565SEmmanuel Vadot - const: rx 78e67e8565SEmmanuel Vadot - items: 79e67e8565SEmmanuel Vadot - const: rx 80e67e8565SEmmanuel Vadot - const: tx 81e67e8565SEmmanuel Vadot 82*7d0873ebSEmmanuel Vadot access-controllers: 83*7d0873ebSEmmanuel Vadot minItems: 1 84*7d0873ebSEmmanuel Vadot maxItems: 2 85*7d0873ebSEmmanuel Vadot 865def4c47SEmmanuel Vadot power-domains: true 875def4c47SEmmanuel Vadot 885def4c47SEmmanuel Vadot resets: 895def4c47SEmmanuel Vadot maxItems: 1 905def4c47SEmmanuel Vadot 915def4c47SEmmanuel Vadot reg: 925def4c47SEmmanuel Vadot description: the MMIO memory window must be exactly 4KB (0x1000) and the 935def4c47SEmmanuel Vadot layout should provide the PrimeCell ID registers so that the device can 945def4c47SEmmanuel Vadot be discovered. On ST Micro variants, a second register window may be 955def4c47SEmmanuel Vadot defined if a delay block is present and used for tuning. 965def4c47SEmmanuel Vadot 975def4c47SEmmanuel Vadot interrupts: 985def4c47SEmmanuel Vadot description: The first interrupt is the command interrupt and corresponds 995def4c47SEmmanuel Vadot to the event at the end of a command. The second interrupt is the 1005def4c47SEmmanuel Vadot PIO (polled I/O) interrupt and occurs when the FIFO needs to be 1015def4c47SEmmanuel Vadot emptied as part of a bulk read from the card. Some variants have these 1025def4c47SEmmanuel Vadot two interrupts wired into the same line (logic OR) and in that case 1038bab661aSEmmanuel Vadot only one interrupt may be provided. The interrupt-names property is 1048bab661aSEmmanuel Vadot not used due to inconsistency of existing DTs regarding its content. 1058bab661aSEmmanuel Vadot deprecated: false 1065def4c47SEmmanuel Vadot minItems: 1 1075def4c47SEmmanuel Vadot maxItems: 2 1085def4c47SEmmanuel Vadot 1095def4c47SEmmanuel Vadot st,sig-dir-dat0: 1105def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1115def4c47SEmmanuel Vadot description: ST Micro-specific property, bus signal direction pins used for 1125def4c47SEmmanuel Vadot DAT[0]. 1135def4c47SEmmanuel Vadot 1145def4c47SEmmanuel Vadot st,sig-dir-dat2: 1155def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1165def4c47SEmmanuel Vadot description: ST Micro-specific property, bus signal direction pins used for 1175def4c47SEmmanuel Vadot DAT[2]. 1185def4c47SEmmanuel Vadot 1195def4c47SEmmanuel Vadot st,sig-dir-dat31: 1205def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1215def4c47SEmmanuel Vadot description: ST Micro-specific property, bus signal direction pins used for 1225def4c47SEmmanuel Vadot DAT[3] and DAT[1]. 1235def4c47SEmmanuel Vadot 1245def4c47SEmmanuel Vadot st,sig-dir-dat74: 1255def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1265def4c47SEmmanuel Vadot description: ST Micro-specific property, bus signal direction pins used for 1275def4c47SEmmanuel Vadot DAT[7] and DAT[4]. 1285def4c47SEmmanuel Vadot 1295def4c47SEmmanuel Vadot st,sig-dir-cmd: 1305def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1315def4c47SEmmanuel Vadot description: ST Micro-specific property, CMD signal direction used for 1325def4c47SEmmanuel Vadot pin CMD. 1335def4c47SEmmanuel Vadot 1345def4c47SEmmanuel Vadot st,sig-pin-fbclk: 1355def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1365def4c47SEmmanuel Vadot description: ST Micro-specific property, feedback clock FBCLK signal pin 1375def4c47SEmmanuel Vadot in use. 1385def4c47SEmmanuel Vadot 1395def4c47SEmmanuel Vadot st,sig-dir: 1405def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1415def4c47SEmmanuel Vadot description: ST Micro-specific property, signal direction polarity used for 1425def4c47SEmmanuel Vadot pins CMD, DAT[0], DAT[1], DAT[2] and DAT[3]. 1435def4c47SEmmanuel Vadot 1445def4c47SEmmanuel Vadot st,neg-edge: 1455def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1465def4c47SEmmanuel Vadot description: ST Micro-specific property, data and command phase relation, 1475def4c47SEmmanuel Vadot generated on the sd clock falling edge. 1485def4c47SEmmanuel Vadot 1495def4c47SEmmanuel Vadot st,use-ckin: 1505def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1515def4c47SEmmanuel Vadot description: ST Micro-specific property, use CKIN pin from an external 1525def4c47SEmmanuel Vadot driver to sample the receive data (for example with a voltage switch 1535def4c47SEmmanuel Vadot transceiver). 1545def4c47SEmmanuel Vadot 1555def4c47SEmmanuel Vadot st,cmd-gpios: 1565def4c47SEmmanuel Vadot maxItems: 1 1575def4c47SEmmanuel Vadot description: 1585def4c47SEmmanuel Vadot The GPIO matching the CMD pin. 1595def4c47SEmmanuel Vadot 1605def4c47SEmmanuel Vadot st,ck-gpios: 1615def4c47SEmmanuel Vadot maxItems: 1 1625def4c47SEmmanuel Vadot description: 1635def4c47SEmmanuel Vadot The GPIO matching the CK pin. 1645def4c47SEmmanuel Vadot 1655def4c47SEmmanuel Vadot st,ckin-gpios: 1665def4c47SEmmanuel Vadot maxItems: 1 1675def4c47SEmmanuel Vadot description: 1685def4c47SEmmanuel Vadot The GPIO matching the CKIN pin. 1695def4c47SEmmanuel Vadot 1705def4c47SEmmanuel Vadotdependencies: 1715def4c47SEmmanuel Vadot st,cmd-gpios: [ "st,use-ckin" ] 1725def4c47SEmmanuel Vadot st,ck-gpios: [ "st,use-ckin" ] 1735def4c47SEmmanuel Vadot st,ckin-gpios: [ "st,use-ckin" ] 1745def4c47SEmmanuel Vadot 1755def4c47SEmmanuel VadotunevaluatedProperties: false 1765def4c47SEmmanuel Vadot 1775def4c47SEmmanuel Vadotrequired: 1785def4c47SEmmanuel Vadot - compatible 1795def4c47SEmmanuel Vadot - reg 1805def4c47SEmmanuel Vadot - interrupts 1815def4c47SEmmanuel Vadot 1825def4c47SEmmanuel Vadotexamples: 1835def4c47SEmmanuel Vadot - | 1845def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1855def4c47SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 1865def4c47SEmmanuel Vadot 1875def4c47SEmmanuel Vadot mmc@5000 { 1885def4c47SEmmanuel Vadot compatible = "arm,pl180", "arm,primecell"; 1895def4c47SEmmanuel Vadot reg = <0x5000 0x1000>; 1905def4c47SEmmanuel Vadot interrupts-extended = <&vic 22 &sic 1>; 1915def4c47SEmmanuel Vadot clocks = <&xtal24mhz>, <&pclk>; 1925def4c47SEmmanuel Vadot clock-names = "mclk", "apb_pclk"; 1935def4c47SEmmanuel Vadot }; 1945def4c47SEmmanuel Vadot 195e67e8565SEmmanuel Vadot - | 196e67e8565SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 197e67e8565SEmmanuel Vadot 1985def4c47SEmmanuel Vadot mmc@80126000 { 1995def4c47SEmmanuel Vadot compatible = "arm,pl18x", "arm,primecell"; 2005def4c47SEmmanuel Vadot reg = <0x80126000 0x1000>; 2015def4c47SEmmanuel Vadot interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>; 2025def4c47SEmmanuel Vadot dmas = <&dma 29 0 0x2>, <&dma 29 0 0x0>; 2035def4c47SEmmanuel Vadot dma-names = "rx", "tx"; 2045def4c47SEmmanuel Vadot clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>; 2055def4c47SEmmanuel Vadot clock-names = "sdi", "apb_pclk"; 2065def4c47SEmmanuel Vadot max-frequency = <100000000>; 2075def4c47SEmmanuel Vadot bus-width = <4>; 2085def4c47SEmmanuel Vadot cap-sd-highspeed; 2095def4c47SEmmanuel Vadot cap-mmc-highspeed; 2105def4c47SEmmanuel Vadot cd-gpios = <&gpio2 31 0x4>; 2115def4c47SEmmanuel Vadot st,sig-dir-dat0; 2125def4c47SEmmanuel Vadot st,sig-dir-dat2; 2135def4c47SEmmanuel Vadot st,sig-dir-cmd; 2145def4c47SEmmanuel Vadot st,sig-pin-fbclk; 2155def4c47SEmmanuel Vadot vmmc-supply = <&ab8500_ldo_aux3_reg>; 2165def4c47SEmmanuel Vadot vqmmc-supply = <&vmmci>; 2175def4c47SEmmanuel Vadot }; 2185def4c47SEmmanuel Vadot 219e67e8565SEmmanuel Vadot - | 2205def4c47SEmmanuel Vadot mmc@101f6000 { 2215def4c47SEmmanuel Vadot compatible = "arm,pl18x", "arm,primecell"; 2225def4c47SEmmanuel Vadot reg = <0x101f6000 0x1000>; 2235def4c47SEmmanuel Vadot clocks = <&sdiclk>, <&pclksdi>; 2245def4c47SEmmanuel Vadot clock-names = "mclk", "apb_pclk"; 2255def4c47SEmmanuel Vadot interrupts = <22>; 2265def4c47SEmmanuel Vadot max-frequency = <400000>; 2275def4c47SEmmanuel Vadot bus-width = <4>; 2285def4c47SEmmanuel Vadot cap-mmc-highspeed; 2295def4c47SEmmanuel Vadot cap-sd-highspeed; 2305def4c47SEmmanuel Vadot full-pwr-cycle; 2315def4c47SEmmanuel Vadot st,sig-dir-dat0; 2325def4c47SEmmanuel Vadot st,sig-dir-dat2; 2335def4c47SEmmanuel Vadot st,sig-dir-dat31; 2345def4c47SEmmanuel Vadot st,sig-dir-cmd; 2355def4c47SEmmanuel Vadot st,sig-pin-fbclk; 2365def4c47SEmmanuel Vadot vmmc-supply = <&vmmc_regulator>; 2375def4c47SEmmanuel Vadot }; 2385def4c47SEmmanuel Vadot 239e67e8565SEmmanuel Vadot - | 2405def4c47SEmmanuel Vadot mmc@52007000 { 2415def4c47SEmmanuel Vadot compatible = "arm,pl18x", "arm,primecell"; 2425def4c47SEmmanuel Vadot arm,primecell-periphid = <0x10153180>; 2435def4c47SEmmanuel Vadot reg = <0x52007000 0x1000>; 2445def4c47SEmmanuel Vadot interrupts = <49>; 2455def4c47SEmmanuel Vadot clocks = <&rcc 0>; 2465def4c47SEmmanuel Vadot clock-names = "apb_pclk"; 2475def4c47SEmmanuel Vadot resets = <&rcc 1>; 2485def4c47SEmmanuel Vadot cap-sd-highspeed; 2495def4c47SEmmanuel Vadot cap-mmc-highspeed; 2505def4c47SEmmanuel Vadot max-frequency = <120000000>; 2515def4c47SEmmanuel Vadot }; 252