1a1c76734SYoshihiro Shimoda# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2a1c76734SYoshihiro Shimoda%YAML 1.2 3a1c76734SYoshihiro Shimoda--- 41e52a7e6SKrzysztof Kozlowski$id: http://devicetree.org/schemas/mmc/renesas,sdhi.yaml# 51e52a7e6SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml# 6a1c76734SYoshihiro Shimoda 7a1c76734SYoshihiro Shimodatitle: Renesas SDHI SD/MMC controller 8a1c76734SYoshihiro Shimoda 9a1c76734SYoshihiro Shimodamaintainers: 10a1c76734SYoshihiro Shimoda - Wolfram Sang <wsa+renesas@sang-engineering.com> 11a1c76734SYoshihiro Shimoda 12a1c76734SYoshihiro Shimodaproperties: 13a1c76734SYoshihiro Shimoda compatible: 14a1c76734SYoshihiro Shimoda oneOf: 15493d2b29SLad Prabhakar - enum: 16493d2b29SLad Prabhakar - renesas,sdhi-mmc-r8a77470 # RZ/G1C 17493d2b29SLad Prabhakar - renesas,sdhi-r7s72100 # RZ/A1H 18493d2b29SLad Prabhakar - renesas,sdhi-r7s9210 # SH-Mobile AG5 19493d2b29SLad Prabhakar - renesas,sdhi-r8a73a4 # R-Mobile APE6 20493d2b29SLad Prabhakar - renesas,sdhi-r8a7740 # R-Mobile A1 2124a9ea1cSLad Prabhakar - renesas,sdhi-r9a09g057 # RZ/V2H(P) 22493d2b29SLad Prabhakar - renesas,sdhi-sh73a0 # R-Mobile APE6 23a1c76734SYoshihiro Shimoda - items: 24a1c76734SYoshihiro Shimoda - enum: 25a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7778 # R-Car M1 26a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7779 # R-Car H1 27a1c76734SYoshihiro Shimoda - const: renesas,rcar-gen1-sdhi # R-Car Gen1 28a1c76734SYoshihiro Shimoda - items: 29a1c76734SYoshihiro Shimoda - enum: 30a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7742 # RZ/G1H 31a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7743 # RZ/G1M 32a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7744 # RZ/G1N 33a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7745 # RZ/G1E 34a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a77470 # RZ/G1C 35a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7790 # R-Car H2 36a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7791 # R-Car M2-W 37a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7792 # R-Car V2H 38a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7793 # R-Car M2-N 39a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7794 # R-Car E2 40a1c76734SYoshihiro Shimoda - const: renesas,rcar-gen2-sdhi # R-Car Gen2 and RZ/G1 41a1c76734SYoshihiro Shimoda - items: 42a1c76734SYoshihiro Shimoda - enum: 43a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a774a1 # RZ/G2M 44a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a774b1 # RZ/G2N 45a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a774c0 # RZ/G2E 469e1adca2SLad Prabhakar - renesas,sdhi-r8a774e1 # RZ/G2H 47a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7795 # R-Car H3 48a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a7796 # R-Car M3-W 49a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a77961 # R-Car M3-W+ 50a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a77965 # R-Car M3-N 51a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a77970 # R-Car V3M 52a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a77980 # R-Car V3H 53a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a77990 # R-Car E3 54a1c76734SYoshihiro Shimoda - renesas,sdhi-r8a77995 # R-Car D3 55a1c76734SYoshihiro Shimoda - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2 563576c0b2SWolfram Sang - items: 573576c0b2SWolfram Sang - enum: 58cae45c2dSWolfram Sang - renesas,sdhi-r8a779a0 # R-Car V3U 593576c0b2SWolfram Sang - renesas,sdhi-r8a779f0 # R-Car S4-8 60c2a21306SGeert Uytterhoeven - renesas,sdhi-r8a779g0 # R-Car V4H 614aee1452SGeert Uytterhoeven - renesas,sdhi-r8a779h0 # R-Car V4M 623576c0b2SWolfram Sang - const: renesas,rcar-gen4-sdhi # R-Car Gen4 63d640af49SLad Prabhakar - items: 64d640af49SLad Prabhakar - enum: 65d640af49SLad Prabhakar - renesas,sdhi-r9a07g043 # RZ/G2UL and RZ/Five 66d640af49SLad Prabhakar - renesas,sdhi-r9a07g044 # RZ/G2{L,LC} 67d640af49SLad Prabhakar - renesas,sdhi-r9a07g054 # RZ/V2L 68d640af49SLad Prabhakar - renesas,sdhi-r9a08g045 # RZ/G3S 69d640af49SLad Prabhakar - renesas,sdhi-r9a09g011 # RZ/V2M 70d640af49SLad Prabhakar - const: renesas,rzg2l-sdhi 71a1c76734SYoshihiro Shimoda 72a1c76734SYoshihiro Shimoda reg: 73a1c76734SYoshihiro Shimoda maxItems: 1 74a1c76734SYoshihiro Shimoda 75a1c76734SYoshihiro Shimoda interrupts: 76a1c76734SYoshihiro Shimoda minItems: 1 77a1c76734SYoshihiro Shimoda maxItems: 3 78a1c76734SYoshihiro Shimoda 79*1645e815SKrzysztof Kozlowski clocks: 80*1645e815SKrzysztof Kozlowski minItems: 1 81*1645e815SKrzysztof Kozlowski maxItems: 4 82a1c76734SYoshihiro Shimoda 83*1645e815SKrzysztof Kozlowski clock-names: 84*1645e815SKrzysztof Kozlowski minItems: 1 85*1645e815SKrzysztof Kozlowski maxItems: 4 86a1c76734SYoshihiro Shimoda 87a1c76734SYoshihiro Shimoda dmas: 88a1c76734SYoshihiro Shimoda minItems: 4 89a1c76734SYoshihiro Shimoda maxItems: 4 90a1c76734SYoshihiro Shimoda 91a1c76734SYoshihiro Shimoda dma-names: 92a1c76734SYoshihiro Shimoda minItems: 4 93a1c76734SYoshihiro Shimoda maxItems: 4 94a1c76734SYoshihiro Shimoda items: 95a1c76734SYoshihiro Shimoda enum: 96a1c76734SYoshihiro Shimoda - tx 97a1c76734SYoshihiro Shimoda - rx 98a1c76734SYoshihiro Shimoda 991de73072SLad Prabhakar iommus: 1001de73072SLad Prabhakar maxItems: 1 1011de73072SLad Prabhakar 102a1c76734SYoshihiro Shimoda power-domains: 103a1c76734SYoshihiro Shimoda maxItems: 1 104a1c76734SYoshihiro Shimoda 105a1c76734SYoshihiro Shimoda resets: 106a1c76734SYoshihiro Shimoda maxItems: 1 107a1c76734SYoshihiro Shimoda 108a1c76734SYoshihiro Shimoda pinctrl-0: 109a1c76734SYoshihiro Shimoda minItems: 1 110a1c76734SYoshihiro Shimoda maxItems: 2 111a1c76734SYoshihiro Shimoda 112a1c76734SYoshihiro Shimoda pinctrl-1: 113a1c76734SYoshihiro Shimoda maxItems: 1 114a1c76734SYoshihiro Shimoda 1154aba5dc7SBiju Das pinctrl-names: true 1164aba5dc7SBiju Das 1174aba5dc7SBiju Das max-frequency: true 1184aba5dc7SBiju Das 1194aba5dc7SBiju DasallOf: 1201e52a7e6SKrzysztof Kozlowski - $ref: mmc-controller.yaml 1214aba5dc7SBiju Das 1224aba5dc7SBiju Das - if: 1234aba5dc7SBiju Das properties: 1244aba5dc7SBiju Das compatible: 1254aba5dc7SBiju Das contains: 126fcd56ecaSLad Prabhakar enum: 127fcd56ecaSLad Prabhakar - renesas,sdhi-r9a09g057 128fcd56ecaSLad Prabhakar - renesas,rzg2l-sdhi 129bfadee45SBiju Das then: 130bfadee45SBiju Das properties: 131bfadee45SBiju Das clocks: 132bfadee45SBiju Das items: 133bfadee45SBiju Das - description: IMCLK, SDHI channel main clock1. 134217c7d18SBiju Das - description: CLK_HS, SDHI channel High speed clock which operates 135217c7d18SBiju Das 4 times that of SDHI channel main clock1. 136bfadee45SBiju Das - description: IMCLK2, SDHI channel main clock2. When this clock is 137bfadee45SBiju Das turned off, external SD card detection cannot be 138bfadee45SBiju Das detected. 139bfadee45SBiju Das - description: ACLK, SDHI channel bus clock. 140bfadee45SBiju Das clock-names: 141bfadee45SBiju Das items: 142217c7d18SBiju Das - const: core 143217c7d18SBiju Das - const: clkh 144217c7d18SBiju Das - const: cd 145bfadee45SBiju Das - const: aclk 146bfadee45SBiju Das required: 147bfadee45SBiju Das - clock-names 148bfadee45SBiju Das - resets 149bfadee45SBiju Das else: 150e051025eSWolfram Sang if: 151e051025eSWolfram Sang properties: 152e051025eSWolfram Sang compatible: 153e051025eSWolfram Sang contains: 154e051025eSWolfram Sang enum: 155e051025eSWolfram Sang - renesas,rcar-gen2-sdhi 156e051025eSWolfram Sang - renesas,rcar-gen3-sdhi 1570f6fe934SWolfram Sang - renesas,rcar-gen4-sdhi 158e051025eSWolfram Sang then: 159e051025eSWolfram Sang properties: 160e051025eSWolfram Sang clocks: 161e051025eSWolfram Sang minItems: 1 162e051025eSWolfram Sang maxItems: 3 163e051025eSWolfram Sang clock-names: 164e051025eSWolfram Sang minItems: 1 165e051025eSWolfram Sang uniqueItems: true 166e051025eSWolfram Sang items: 167e051025eSWolfram Sang - const: core 168e051025eSWolfram Sang - enum: [ clkh, cd ] 169e051025eSWolfram Sang - const: cd 170e051025eSWolfram Sang else: 171bfadee45SBiju Das properties: 172bfadee45SBiju Das clocks: 173bfadee45SBiju Das minItems: 1 174bfadee45SBiju Das maxItems: 2 175bfadee45SBiju Das clock-names: 176bfadee45SBiju Das minItems: 1 177bfadee45SBiju Das items: 178bfadee45SBiju Das - const: core 179bfadee45SBiju Das - const: cd 180bfadee45SBiju Das 181bfadee45SBiju Das - if: 182bfadee45SBiju Das properties: 183bfadee45SBiju Das compatible: 184bfadee45SBiju Das contains: 1854aba5dc7SBiju Das const: renesas,sdhi-mmc-r8a77470 1864aba5dc7SBiju Das then: 1874aba5dc7SBiju Das properties: 1884aba5dc7SBiju Das pinctrl-names: 1894aba5dc7SBiju Das items: 1904aba5dc7SBiju Das - const: state_uhs 1914aba5dc7SBiju Das else: 1924aba5dc7SBiju Das properties: 193a1c76734SYoshihiro Shimoda pinctrl-names: 194a1c76734SYoshihiro Shimoda minItems: 1 195a1c76734SYoshihiro Shimoda items: 196a1c76734SYoshihiro Shimoda - const: default 197a1c76734SYoshihiro Shimoda - const: state_uhs 198a1c76734SYoshihiro Shimoda 1994aba5dc7SBiju Das - if: 200a1c76734SYoshihiro Shimoda properties: 201a1c76734SYoshihiro Shimoda compatible: 2029183908eSRob Herring contains: 203a1c76734SYoshihiro Shimoda enum: 204a1c76734SYoshihiro Shimoda - renesas,sdhi-r7s72100 205a1c76734SYoshihiro Shimoda - renesas,sdhi-r7s9210 206a1c76734SYoshihiro Shimoda then: 207a1c76734SYoshihiro Shimoda required: 208a1c76734SYoshihiro Shimoda - clock-names 209a1c76734SYoshihiro Shimoda description: 210a1c76734SYoshihiro Shimoda The internal card detection logic that exists in these controllers is 211a1c76734SYoshihiro Shimoda sectioned off to be run by a separate second clock source to allow 212a1c76734SYoshihiro Shimoda the main core clock to be turned off to save power. 213a1c76734SYoshihiro Shimoda 2144aba5dc7SBiju Dasrequired: 2154aba5dc7SBiju Das - compatible 2164aba5dc7SBiju Das - reg 2174aba5dc7SBiju Das - interrupts 2184aba5dc7SBiju Das - clocks 2194aba5dc7SBiju Das - power-domains 2204aba5dc7SBiju Das 221a1c76734SYoshihiro ShimodaunevaluatedProperties: false 222a1c76734SYoshihiro Shimoda 223a1c76734SYoshihiro Shimodaexamples: 224a1c76734SYoshihiro Shimoda - | 225a1c76734SYoshihiro Shimoda #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 226a1c76734SYoshihiro Shimoda #include <dt-bindings/interrupt-controller/arm-gic.h> 227a1c76734SYoshihiro Shimoda #include <dt-bindings/power/r8a7790-sysc.h> 228a1c76734SYoshihiro Shimoda 229a1c76734SYoshihiro Shimoda sdhi0: mmc@ee100000 { 230a1c76734SYoshihiro Shimoda compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 231a1c76734SYoshihiro Shimoda reg = <0xee100000 0x328>; 232a1c76734SYoshihiro Shimoda interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; 233a1c76734SYoshihiro Shimoda clocks = <&cpg CPG_MOD 314>; 234a1c76734SYoshihiro Shimoda dmas = <&dmac0 0xcd>, <&dmac0 0xce>, <&dmac1 0xcd>, <&dmac1 0xce>; 235a1c76734SYoshihiro Shimoda dma-names = "tx", "rx", "tx", "rx"; 236a1c76734SYoshihiro Shimoda max-frequency = <195000000>; 237a1c76734SYoshihiro Shimoda power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 238a1c76734SYoshihiro Shimoda resets = <&cpg 314>; 239a1c76734SYoshihiro Shimoda }; 240a1c76734SYoshihiro Shimoda 241a1c76734SYoshihiro Shimoda sdhi1: mmc@ee120000 { 242a1c76734SYoshihiro Shimoda compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 243a1c76734SYoshihiro Shimoda reg = <0xee120000 0x328>; 244a1c76734SYoshihiro Shimoda interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; 245a1c76734SYoshihiro Shimoda clocks = <&cpg CPG_MOD 313>; 246a1c76734SYoshihiro Shimoda dmas = <&dmac0 0xc9>, <&dmac0 0xca>, <&dmac1 0xc9>, <&dmac1 0xca>; 247a1c76734SYoshihiro Shimoda dma-names = "tx", "rx", "tx", "rx"; 248a1c76734SYoshihiro Shimoda max-frequency = <195000000>; 249a1c76734SYoshihiro Shimoda power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 250a1c76734SYoshihiro Shimoda resets = <&cpg 313>; 251a1c76734SYoshihiro Shimoda }; 252a1c76734SYoshihiro Shimoda 253a1c76734SYoshihiro Shimoda sdhi2: mmc@ee140000 { 254a1c76734SYoshihiro Shimoda compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 255a1c76734SYoshihiro Shimoda reg = <0xee140000 0x100>; 256a1c76734SYoshihiro Shimoda interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; 257a1c76734SYoshihiro Shimoda clocks = <&cpg CPG_MOD 312>; 258a1c76734SYoshihiro Shimoda dmas = <&dmac0 0xc1>, <&dmac0 0xc2>, <&dmac1 0xc1>, <&dmac1 0xc2>; 259a1c76734SYoshihiro Shimoda dma-names = "tx", "rx", "tx", "rx"; 260a1c76734SYoshihiro Shimoda max-frequency = <97500000>; 261a1c76734SYoshihiro Shimoda power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 262a1c76734SYoshihiro Shimoda resets = <&cpg 312>; 263a1c76734SYoshihiro Shimoda }; 264a1c76734SYoshihiro Shimoda 265a1c76734SYoshihiro Shimoda sdhi3: mmc@ee160000 { 266a1c76734SYoshihiro Shimoda compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 267a1c76734SYoshihiro Shimoda reg = <0xee160000 0x100>; 268a1c76734SYoshihiro Shimoda interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; 269a1c76734SYoshihiro Shimoda clocks = <&cpg CPG_MOD 311>; 270a1c76734SYoshihiro Shimoda dmas = <&dmac0 0xd3>, <&dmac0 0xd4>, <&dmac1 0xd3>, <&dmac1 0xd4>; 271a1c76734SYoshihiro Shimoda dma-names = "tx", "rx", "tx", "rx"; 272a1c76734SYoshihiro Shimoda max-frequency = <97500000>; 273a1c76734SYoshihiro Shimoda power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 274a1c76734SYoshihiro Shimoda resets = <&cpg 311>; 275a1c76734SYoshihiro Shimoda }; 276