1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/ingenic,mmc.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: Ingenic SoCs MMC Controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Paul Cercueil <paul@crapouillou.net> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel VadotallOf: 13c66ec88fSEmmanuel Vadot - $ref: mmc-controller.yaml# 14c66ec88fSEmmanuel Vadot 15c66ec88fSEmmanuel Vadotproperties: 16c66ec88fSEmmanuel Vadot compatible: 17c66ec88fSEmmanuel Vadot oneOf: 18c66ec88fSEmmanuel Vadot - enum: 19c66ec88fSEmmanuel Vadot - ingenic,jz4740-mmc 20c66ec88fSEmmanuel Vadot - ingenic,jz4725b-mmc 21c66ec88fSEmmanuel Vadot - ingenic,jz4760-mmc 225956d97fSEmmanuel Vadot - ingenic,jz4775-mmc 23c66ec88fSEmmanuel Vadot - ingenic,jz4780-mmc 24c66ec88fSEmmanuel Vadot - ingenic,x1000-mmc 25c66ec88fSEmmanuel Vadot - items: 26c66ec88fSEmmanuel Vadot - const: ingenic,jz4770-mmc 27c66ec88fSEmmanuel Vadot - const: ingenic,jz4760-mmc 28c66ec88fSEmmanuel Vadot 29c66ec88fSEmmanuel Vadot reg: 30c66ec88fSEmmanuel Vadot maxItems: 1 31c66ec88fSEmmanuel Vadot 32c66ec88fSEmmanuel Vadot interrupts: 33c66ec88fSEmmanuel Vadot maxItems: 1 34c66ec88fSEmmanuel Vadot 35c66ec88fSEmmanuel Vadot clocks: 36c66ec88fSEmmanuel Vadot maxItems: 1 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel Vadot clock-names: 39c66ec88fSEmmanuel Vadot const: mmc 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot dmas: 42e67e8565SEmmanuel Vadot minItems: 1 43e67e8565SEmmanuel Vadot maxItems: 2 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot dma-names: 46e67e8565SEmmanuel Vadot oneOf: 47e67e8565SEmmanuel Vadot - items: 48c66ec88fSEmmanuel Vadot - const: rx 49c66ec88fSEmmanuel Vadot - const: tx 50e67e8565SEmmanuel Vadot - const: tx-rx 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadotrequired: 53c66ec88fSEmmanuel Vadot - compatible 54c66ec88fSEmmanuel Vadot - reg 55c66ec88fSEmmanuel Vadot - interrupts 56c66ec88fSEmmanuel Vadot - clocks 57c66ec88fSEmmanuel Vadot - clock-names 58c66ec88fSEmmanuel Vadot - dmas 59c66ec88fSEmmanuel Vadot - dma-names 60c66ec88fSEmmanuel Vadot 616be33864SEmmanuel VadotunevaluatedProperties: false 626be33864SEmmanuel Vadot 63c66ec88fSEmmanuel Vadotexamples: 64c66ec88fSEmmanuel Vadot - | 658cc087a1SEmmanuel Vadot #include <dt-bindings/clock/ingenic,jz4780-cgu.h> 66c66ec88fSEmmanuel Vadot #include <dt-bindings/dma/jz4780-dma.h> 67c66ec88fSEmmanuel Vadot mmc0: mmc@13450000 { 68c66ec88fSEmmanuel Vadot compatible = "ingenic,jz4780-mmc"; 69c66ec88fSEmmanuel Vadot reg = <0x13450000 0x1000>; 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot interrupt-parent = <&intc>; 72c66ec88fSEmmanuel Vadot interrupts = <37>; 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot clocks = <&cgu JZ4780_CLK_MSC0>; 75c66ec88fSEmmanuel Vadot clock-names = "mmc"; 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot cap-sd-highspeed; 78c66ec88fSEmmanuel Vadot cap-mmc-highspeed; 79c66ec88fSEmmanuel Vadot cap-sdio-irq; 80c66ec88fSEmmanuel Vadot dmas = <&dma JZ4780_DMA_MSC0_RX 0xffffffff>, 81c66ec88fSEmmanuel Vadot <&dma JZ4780_DMA_MSC0_TX 0xffffffff>; 82c66ec88fSEmmanuel Vadot dma-names = "rx", "tx"; 83c66ec88fSEmmanuel Vadot }; 84e67e8565SEmmanuel Vadot - | 85e67e8565SEmmanuel Vadot #include <dt-bindings/clock/ingenic,jz4780-cgu.h> 86e67e8565SEmmanuel Vadot #include <dt-bindings/dma/jz4780-dma.h> 87e67e8565SEmmanuel Vadot /* 88e67e8565SEmmanuel Vadot * Alternative version of the example above, 89e67e8565SEmmanuel Vadot * but using one single DMA channel for both 90e67e8565SEmmanuel Vadot * TX and RX. 91e67e8565SEmmanuel Vadot */ 92e67e8565SEmmanuel Vadot mmc1: mmc@13460000 { 93e67e8565SEmmanuel Vadot compatible = "ingenic,jz4780-mmc"; 94e67e8565SEmmanuel Vadot reg = <0x13460000 0x1000>; 95e67e8565SEmmanuel Vadot 96e67e8565SEmmanuel Vadot interrupt-parent = <&intc>; 97e67e8565SEmmanuel Vadot interrupts = <36>; 98e67e8565SEmmanuel Vadot 99e67e8565SEmmanuel Vadot clocks = <&cgu JZ4780_CLK_MSC1>; 100e67e8565SEmmanuel Vadot clock-names = "mmc"; 101e67e8565SEmmanuel Vadot 102e67e8565SEmmanuel Vadot cap-sd-highspeed; 103e67e8565SEmmanuel Vadot cap-mmc-highspeed; 104e67e8565SEmmanuel Vadot cap-sdio-irq; 105e67e8565SEmmanuel Vadot dmas = <&dma JZ4780_DMA_MSC1_TX JZ4780_DMA_MSC1_RX 0xffffffff>; 106e67e8565SEmmanuel Vadot dma-names = "tx-rx"; 107e67e8565SEmmanuel Vadot }; 108