1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/renesas,sdhi.yaml# 5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Renesas SDHI SD/MMC controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Wolfram Sang <wsa+renesas@sang-engineering.com> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotproperties: 13c66ec88fSEmmanuel Vadot compatible: 14c66ec88fSEmmanuel Vadot oneOf: 157d0873ebSEmmanuel Vadot - enum: 167d0873ebSEmmanuel Vadot - renesas,sdhi-mmc-r8a77470 # RZ/G1C 177d0873ebSEmmanuel Vadot - renesas,sdhi-r7s72100 # RZ/A1H 187d0873ebSEmmanuel Vadot - renesas,sdhi-r7s9210 # SH-Mobile AG5 197d0873ebSEmmanuel Vadot - renesas,sdhi-r8a73a4 # R-Mobile APE6 207d0873ebSEmmanuel Vadot - renesas,sdhi-r8a7740 # R-Mobile A1 21*b2d2a78aSEmmanuel Vadot - renesas,sdhi-r9a09g057 # RZ/V2H(P) 227d0873ebSEmmanuel Vadot - renesas,sdhi-sh73a0 # R-Mobile APE6 23c66ec88fSEmmanuel Vadot - items: 24c66ec88fSEmmanuel Vadot - enum: 25c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7778 # R-Car M1 26c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7779 # R-Car H1 27c66ec88fSEmmanuel Vadot - const: renesas,rcar-gen1-sdhi # R-Car Gen1 28c66ec88fSEmmanuel Vadot - items: 29c66ec88fSEmmanuel Vadot - enum: 30c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7742 # RZ/G1H 31c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7743 # RZ/G1M 32c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7744 # RZ/G1N 33c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7745 # RZ/G1E 34c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a77470 # RZ/G1C 35c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7790 # R-Car H2 36c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7791 # R-Car M2-W 37c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7792 # R-Car V2H 38c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7793 # R-Car M2-N 39c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7794 # R-Car E2 40c66ec88fSEmmanuel Vadot - const: renesas,rcar-gen2-sdhi # R-Car Gen2 and RZ/G1 41c66ec88fSEmmanuel Vadot - items: 42c66ec88fSEmmanuel Vadot - enum: 43c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a774a1 # RZ/G2M 44c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a774b1 # RZ/G2N 45c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a774c0 # RZ/G2E 466be33864SEmmanuel Vadot - renesas,sdhi-r8a774e1 # RZ/G2H 47c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7795 # R-Car H3 48c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a7796 # R-Car M3-W 49c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a77961 # R-Car M3-W+ 50c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a77965 # R-Car M3-N 51c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a77970 # R-Car V3M 52c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a77980 # R-Car V3H 53c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a77990 # R-Car E3 54c66ec88fSEmmanuel Vadot - renesas,sdhi-r8a77995 # R-Car D3 55c66ec88fSEmmanuel Vadot - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2 56b97ee269SEmmanuel Vadot - items: 57b97ee269SEmmanuel Vadot - enum: 58b97ee269SEmmanuel Vadot - renesas,sdhi-r8a779a0 # R-Car V3U 59b97ee269SEmmanuel Vadot - renesas,sdhi-r8a779f0 # R-Car S4-8 608bab661aSEmmanuel Vadot - renesas,sdhi-r8a779g0 # R-Car V4H 6101950c46SEmmanuel Vadot - renesas,sdhi-r8a779h0 # R-Car V4M 62b97ee269SEmmanuel Vadot - const: renesas,rcar-gen4-sdhi # R-Car Gen4 637d0873ebSEmmanuel Vadot - items: 647d0873ebSEmmanuel Vadot - enum: 657d0873ebSEmmanuel Vadot - renesas,sdhi-r9a07g043 # RZ/G2UL and RZ/Five 667d0873ebSEmmanuel Vadot - renesas,sdhi-r9a07g044 # RZ/G2{L,LC} 677d0873ebSEmmanuel Vadot - renesas,sdhi-r9a07g054 # RZ/V2L 687d0873ebSEmmanuel Vadot - renesas,sdhi-r9a08g045 # RZ/G3S 697d0873ebSEmmanuel Vadot - renesas,sdhi-r9a09g011 # RZ/V2M 707d0873ebSEmmanuel Vadot - const: renesas,rzg2l-sdhi 71c66ec88fSEmmanuel Vadot 72c66ec88fSEmmanuel Vadot reg: 73c66ec88fSEmmanuel Vadot maxItems: 1 74c66ec88fSEmmanuel Vadot 75c66ec88fSEmmanuel Vadot interrupts: 76c66ec88fSEmmanuel Vadot minItems: 1 77c66ec88fSEmmanuel Vadot maxItems: 3 78c66ec88fSEmmanuel Vadot 79*b2d2a78aSEmmanuel Vadot clocks: 80*b2d2a78aSEmmanuel Vadot minItems: 1 81*b2d2a78aSEmmanuel Vadot maxItems: 4 82c66ec88fSEmmanuel Vadot 83*b2d2a78aSEmmanuel Vadot clock-names: 84*b2d2a78aSEmmanuel Vadot minItems: 1 85*b2d2a78aSEmmanuel Vadot maxItems: 4 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot dmas: 88c66ec88fSEmmanuel Vadot minItems: 4 89c66ec88fSEmmanuel Vadot maxItems: 4 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel Vadot dma-names: 92c66ec88fSEmmanuel Vadot minItems: 4 93c66ec88fSEmmanuel Vadot maxItems: 4 94c66ec88fSEmmanuel Vadot items: 95c66ec88fSEmmanuel Vadot enum: 96c66ec88fSEmmanuel Vadot - tx 97c66ec88fSEmmanuel Vadot - rx 98c66ec88fSEmmanuel Vadot 997ef62cebSEmmanuel Vadot iommus: 1007ef62cebSEmmanuel Vadot maxItems: 1 1017ef62cebSEmmanuel Vadot 102c66ec88fSEmmanuel Vadot power-domains: 103c66ec88fSEmmanuel Vadot maxItems: 1 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel Vadot resets: 106c66ec88fSEmmanuel Vadot maxItems: 1 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot pinctrl-0: 109c66ec88fSEmmanuel Vadot minItems: 1 110c66ec88fSEmmanuel Vadot maxItems: 2 111c66ec88fSEmmanuel Vadot 112c66ec88fSEmmanuel Vadot pinctrl-1: 113c66ec88fSEmmanuel Vadot maxItems: 1 114c66ec88fSEmmanuel Vadot 115354d7675SEmmanuel Vadot pinctrl-names: true 116354d7675SEmmanuel Vadot 117354d7675SEmmanuel Vadot max-frequency: true 118354d7675SEmmanuel Vadot 119354d7675SEmmanuel VadotallOf: 120cb7aa33aSEmmanuel Vadot - $ref: mmc-controller.yaml 121354d7675SEmmanuel Vadot 122354d7675SEmmanuel Vadot - if: 123354d7675SEmmanuel Vadot properties: 124354d7675SEmmanuel Vadot compatible: 125354d7675SEmmanuel Vadot contains: 126*b2d2a78aSEmmanuel Vadot enum: 127*b2d2a78aSEmmanuel Vadot - renesas,sdhi-r9a09g057 128*b2d2a78aSEmmanuel Vadot - renesas,rzg2l-sdhi 129354d7675SEmmanuel Vadot then: 130354d7675SEmmanuel Vadot properties: 131354d7675SEmmanuel Vadot clocks: 132354d7675SEmmanuel Vadot items: 133354d7675SEmmanuel Vadot - description: IMCLK, SDHI channel main clock1. 134e67e8565SEmmanuel Vadot - description: CLK_HS, SDHI channel High speed clock which operates 135e67e8565SEmmanuel Vadot 4 times that of SDHI channel main clock1. 136354d7675SEmmanuel Vadot - description: IMCLK2, SDHI channel main clock2. When this clock is 137354d7675SEmmanuel Vadot turned off, external SD card detection cannot be 138354d7675SEmmanuel Vadot detected. 139354d7675SEmmanuel Vadot - description: ACLK, SDHI channel bus clock. 140354d7675SEmmanuel Vadot clock-names: 141354d7675SEmmanuel Vadot items: 142e67e8565SEmmanuel Vadot - const: core 143e67e8565SEmmanuel Vadot - const: clkh 144e67e8565SEmmanuel Vadot - const: cd 145354d7675SEmmanuel Vadot - const: aclk 146354d7675SEmmanuel Vadot required: 147354d7675SEmmanuel Vadot - clock-names 148354d7675SEmmanuel Vadot - resets 149354d7675SEmmanuel Vadot else: 150e67e8565SEmmanuel Vadot if: 151e67e8565SEmmanuel Vadot properties: 152e67e8565SEmmanuel Vadot compatible: 153e67e8565SEmmanuel Vadot contains: 154e67e8565SEmmanuel Vadot enum: 155e67e8565SEmmanuel Vadot - renesas,rcar-gen2-sdhi 156e67e8565SEmmanuel Vadot - renesas,rcar-gen3-sdhi 157b97ee269SEmmanuel Vadot - renesas,rcar-gen4-sdhi 158e67e8565SEmmanuel Vadot then: 159e67e8565SEmmanuel Vadot properties: 160e67e8565SEmmanuel Vadot clocks: 161e67e8565SEmmanuel Vadot minItems: 1 162e67e8565SEmmanuel Vadot maxItems: 3 163e67e8565SEmmanuel Vadot clock-names: 164e67e8565SEmmanuel Vadot minItems: 1 165e67e8565SEmmanuel Vadot uniqueItems: true 166e67e8565SEmmanuel Vadot items: 167e67e8565SEmmanuel Vadot - const: core 168e67e8565SEmmanuel Vadot - enum: [ clkh, cd ] 169e67e8565SEmmanuel Vadot - const: cd 170e67e8565SEmmanuel Vadot else: 171354d7675SEmmanuel Vadot properties: 172354d7675SEmmanuel Vadot clocks: 173354d7675SEmmanuel Vadot minItems: 1 174354d7675SEmmanuel Vadot maxItems: 2 175354d7675SEmmanuel Vadot clock-names: 176354d7675SEmmanuel Vadot minItems: 1 177354d7675SEmmanuel Vadot items: 178354d7675SEmmanuel Vadot - const: core 179354d7675SEmmanuel Vadot - const: cd 180354d7675SEmmanuel Vadot 181354d7675SEmmanuel Vadot - if: 182354d7675SEmmanuel Vadot properties: 183354d7675SEmmanuel Vadot compatible: 184354d7675SEmmanuel Vadot contains: 185354d7675SEmmanuel Vadot const: renesas,sdhi-mmc-r8a77470 186354d7675SEmmanuel Vadot then: 187354d7675SEmmanuel Vadot properties: 188354d7675SEmmanuel Vadot pinctrl-names: 189354d7675SEmmanuel Vadot items: 190354d7675SEmmanuel Vadot - const: state_uhs 191354d7675SEmmanuel Vadot else: 192354d7675SEmmanuel Vadot properties: 193c66ec88fSEmmanuel Vadot pinctrl-names: 194c66ec88fSEmmanuel Vadot minItems: 1 195c66ec88fSEmmanuel Vadot items: 196c66ec88fSEmmanuel Vadot - const: default 197c66ec88fSEmmanuel Vadot - const: state_uhs 198c66ec88fSEmmanuel Vadot 199354d7675SEmmanuel Vadot - if: 200c66ec88fSEmmanuel Vadot properties: 201c66ec88fSEmmanuel Vadot compatible: 2025def4c47SEmmanuel Vadot contains: 203c66ec88fSEmmanuel Vadot enum: 204c66ec88fSEmmanuel Vadot - renesas,sdhi-r7s72100 205c66ec88fSEmmanuel Vadot - renesas,sdhi-r7s9210 206c66ec88fSEmmanuel Vadot then: 207c66ec88fSEmmanuel Vadot required: 208c66ec88fSEmmanuel Vadot - clock-names 209c66ec88fSEmmanuel Vadot description: 210c66ec88fSEmmanuel Vadot The internal card detection logic that exists in these controllers is 211c66ec88fSEmmanuel Vadot sectioned off to be run by a separate second clock source to allow 212c66ec88fSEmmanuel Vadot the main core clock to be turned off to save power. 213c66ec88fSEmmanuel Vadot 214354d7675SEmmanuel Vadotrequired: 215354d7675SEmmanuel Vadot - compatible 216354d7675SEmmanuel Vadot - reg 217354d7675SEmmanuel Vadot - interrupts 218354d7675SEmmanuel Vadot - clocks 219354d7675SEmmanuel Vadot - power-domains 220354d7675SEmmanuel Vadot 221c66ec88fSEmmanuel VadotunevaluatedProperties: false 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadotexamples: 224c66ec88fSEmmanuel Vadot - | 225c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 226c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 227c66ec88fSEmmanuel Vadot #include <dt-bindings/power/r8a7790-sysc.h> 228c66ec88fSEmmanuel Vadot 229c66ec88fSEmmanuel Vadot sdhi0: mmc@ee100000 { 230c66ec88fSEmmanuel Vadot compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 231c66ec88fSEmmanuel Vadot reg = <0xee100000 0x328>; 232c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; 233c66ec88fSEmmanuel Vadot clocks = <&cpg CPG_MOD 314>; 234c66ec88fSEmmanuel Vadot dmas = <&dmac0 0xcd>, <&dmac0 0xce>, <&dmac1 0xcd>, <&dmac1 0xce>; 235c66ec88fSEmmanuel Vadot dma-names = "tx", "rx", "tx", "rx"; 236c66ec88fSEmmanuel Vadot max-frequency = <195000000>; 237c66ec88fSEmmanuel Vadot power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 238c66ec88fSEmmanuel Vadot resets = <&cpg 314>; 239c66ec88fSEmmanuel Vadot }; 240c66ec88fSEmmanuel Vadot 241c66ec88fSEmmanuel Vadot sdhi1: mmc@ee120000 { 242c66ec88fSEmmanuel Vadot compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 243c66ec88fSEmmanuel Vadot reg = <0xee120000 0x328>; 244c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; 245c66ec88fSEmmanuel Vadot clocks = <&cpg CPG_MOD 313>; 246c66ec88fSEmmanuel Vadot dmas = <&dmac0 0xc9>, <&dmac0 0xca>, <&dmac1 0xc9>, <&dmac1 0xca>; 247c66ec88fSEmmanuel Vadot dma-names = "tx", "rx", "tx", "rx"; 248c66ec88fSEmmanuel Vadot max-frequency = <195000000>; 249c66ec88fSEmmanuel Vadot power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 250c66ec88fSEmmanuel Vadot resets = <&cpg 313>; 251c66ec88fSEmmanuel Vadot }; 252c66ec88fSEmmanuel Vadot 253c66ec88fSEmmanuel Vadot sdhi2: mmc@ee140000 { 254c66ec88fSEmmanuel Vadot compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 255c66ec88fSEmmanuel Vadot reg = <0xee140000 0x100>; 256c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; 257c66ec88fSEmmanuel Vadot clocks = <&cpg CPG_MOD 312>; 258c66ec88fSEmmanuel Vadot dmas = <&dmac0 0xc1>, <&dmac0 0xc2>, <&dmac1 0xc1>, <&dmac1 0xc2>; 259c66ec88fSEmmanuel Vadot dma-names = "tx", "rx", "tx", "rx"; 260c66ec88fSEmmanuel Vadot max-frequency = <97500000>; 261c66ec88fSEmmanuel Vadot power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 262c66ec88fSEmmanuel Vadot resets = <&cpg 312>; 263c66ec88fSEmmanuel Vadot }; 264c66ec88fSEmmanuel Vadot 265c66ec88fSEmmanuel Vadot sdhi3: mmc@ee160000 { 266c66ec88fSEmmanuel Vadot compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi"; 267c66ec88fSEmmanuel Vadot reg = <0xee160000 0x100>; 268c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; 269c66ec88fSEmmanuel Vadot clocks = <&cpg CPG_MOD 311>; 270c66ec88fSEmmanuel Vadot dmas = <&dmac0 0xd3>, <&dmac0 0xd4>, <&dmac1 0xd3>, <&dmac1 0xd4>; 271c66ec88fSEmmanuel Vadot dma-names = "tx", "rx", "tx", "rx"; 272c66ec88fSEmmanuel Vadot max-frequency = <97500000>; 273c66ec88fSEmmanuel Vadot power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 274c66ec88fSEmmanuel Vadot resets = <&cpg 311>; 275c66ec88fSEmmanuel Vadot }; 276