1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*833e5d42SEmmanuel Vadot%YAML 1.2 3*833e5d42SEmmanuel Vadot--- 4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/loongson,ls2k0500-mmc.yaml# 5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*833e5d42SEmmanuel Vadot 7*833e5d42SEmmanuel Vadottitle: The SD/SDIO/eMMC host controller for Loongson-2K family SoCs 8*833e5d42SEmmanuel Vadot 9*833e5d42SEmmanuel Vadotdescription: 10*833e5d42SEmmanuel Vadot The MMC host controller on the Loongson-2K0500/2K1000 (using an externally 11*833e5d42SEmmanuel Vadot shared apbdma controller) provides the SD and SDIO device interfaces. 12*833e5d42SEmmanuel Vadot The two MMC host controllers on the Loongson-2K2000 are similar, 13*833e5d42SEmmanuel Vadot except that they use internal exclusive DMA. one controller provides 14*833e5d42SEmmanuel Vadot the eMMC interface and the other provides the SD/SDIO interface. 15*833e5d42SEmmanuel Vadot 16*833e5d42SEmmanuel Vadotmaintainers: 17*833e5d42SEmmanuel Vadot - Binbin Zhou <zhoubinbin@loongson.cn> 18*833e5d42SEmmanuel Vadot 19*833e5d42SEmmanuel VadotallOf: 20*833e5d42SEmmanuel Vadot - $ref: mmc-controller.yaml# 21*833e5d42SEmmanuel Vadot 22*833e5d42SEmmanuel Vadotproperties: 23*833e5d42SEmmanuel Vadot compatible: 24*833e5d42SEmmanuel Vadot enum: 25*833e5d42SEmmanuel Vadot - loongson,ls2k0500-mmc 26*833e5d42SEmmanuel Vadot - loongson,ls2k1000-mmc 27*833e5d42SEmmanuel Vadot - loongson,ls2k2000-mmc 28*833e5d42SEmmanuel Vadot 29*833e5d42SEmmanuel Vadot reg: 30*833e5d42SEmmanuel Vadot minItems: 1 31*833e5d42SEmmanuel Vadot items: 32*833e5d42SEmmanuel Vadot - description: Loongson-2K MMC controller registers. 33*833e5d42SEmmanuel Vadot - description: APB DMA config register for Loongson-2K MMC controller. 34*833e5d42SEmmanuel Vadot 35*833e5d42SEmmanuel Vadot interrupts: 36*833e5d42SEmmanuel Vadot maxItems: 1 37*833e5d42SEmmanuel Vadot 38*833e5d42SEmmanuel Vadot clocks: 39*833e5d42SEmmanuel Vadot maxItems: 1 40*833e5d42SEmmanuel Vadot 41*833e5d42SEmmanuel Vadot dmas: 42*833e5d42SEmmanuel Vadot maxItems: 1 43*833e5d42SEmmanuel Vadot 44*833e5d42SEmmanuel Vadot dma-names: 45*833e5d42SEmmanuel Vadot const: rx-tx 46*833e5d42SEmmanuel Vadot 47*833e5d42SEmmanuel Vadotrequired: 48*833e5d42SEmmanuel Vadot - compatible 49*833e5d42SEmmanuel Vadot - reg 50*833e5d42SEmmanuel Vadot - interrupts 51*833e5d42SEmmanuel Vadot - clocks 52*833e5d42SEmmanuel Vadot 53*833e5d42SEmmanuel VadotunevaluatedProperties: false 54*833e5d42SEmmanuel Vadot 55*833e5d42SEmmanuel Vadotif: 56*833e5d42SEmmanuel Vadot properties: 57*833e5d42SEmmanuel Vadot compatible: 58*833e5d42SEmmanuel Vadot contains: 59*833e5d42SEmmanuel Vadot enum: 60*833e5d42SEmmanuel Vadot - loongson,ls2k0500-mmc 61*833e5d42SEmmanuel Vadot - loongson,ls2k1000-mmc 62*833e5d42SEmmanuel Vadot 63*833e5d42SEmmanuel Vadotthen: 64*833e5d42SEmmanuel Vadot properties: 65*833e5d42SEmmanuel Vadot reg: 66*833e5d42SEmmanuel Vadot minItems: 2 67*833e5d42SEmmanuel Vadot 68*833e5d42SEmmanuel Vadot required: 69*833e5d42SEmmanuel Vadot - dmas 70*833e5d42SEmmanuel Vadot - dma-names 71*833e5d42SEmmanuel Vadot 72*833e5d42SEmmanuel Vadotelse: 73*833e5d42SEmmanuel Vadot properties: 74*833e5d42SEmmanuel Vadot reg: 75*833e5d42SEmmanuel Vadot maxItems: 1 76*833e5d42SEmmanuel Vadot 77*833e5d42SEmmanuel Vadotexamples: 78*833e5d42SEmmanuel Vadot - | 79*833e5d42SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 80*833e5d42SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 81*833e5d42SEmmanuel Vadot #include <dt-bindings/clock/loongson,ls2k-clk.h> 82*833e5d42SEmmanuel Vadot 83*833e5d42SEmmanuel Vadot mmc@1fe2c000 { 84*833e5d42SEmmanuel Vadot compatible = "loongson,ls2k1000-mmc"; 85*833e5d42SEmmanuel Vadot reg = <0x1fe2c000 0x68>, 86*833e5d42SEmmanuel Vadot <0x1fe00438 0x8>; 87*833e5d42SEmmanuel Vadot interrupt-parent = <&liointc0>; 88*833e5d42SEmmanuel Vadot interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; 89*833e5d42SEmmanuel Vadot clocks = <&clk LOONGSON2_APB_CLK>; 90*833e5d42SEmmanuel Vadot dmas = <&apbdma1 0>; 91*833e5d42SEmmanuel Vadot dma-names = "rx-tx"; 92*833e5d42SEmmanuel Vadot bus-width = <4>; 93*833e5d42SEmmanuel Vadot cd-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; 94*833e5d42SEmmanuel Vadot }; 95*833e5d42SEmmanuel Vadot 96*833e5d42SEmmanuel Vadot - | 97*833e5d42SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 98*833e5d42SEmmanuel Vadot #include <dt-bindings/clock/loongson,ls2k-clk.h> 99*833e5d42SEmmanuel Vadot 100*833e5d42SEmmanuel Vadot mmc@79990000 { 101*833e5d42SEmmanuel Vadot compatible = "loongson,ls2k2000-mmc"; 102*833e5d42SEmmanuel Vadot reg = <0x79990000 0x1000>; 103*833e5d42SEmmanuel Vadot interrupt-parent = <&pic>; 104*833e5d42SEmmanuel Vadot interrupts = <51 IRQ_TYPE_LEVEL_HIGH>; 105*833e5d42SEmmanuel Vadot clocks = <&clk LOONGSON2_EMMC_CLK>; 106*833e5d42SEmmanuel Vadot bus-width = <8>; 107*833e5d42SEmmanuel Vadot non-removable; 108*833e5d42SEmmanuel Vadot cap-mmc-highspeed; 109*833e5d42SEmmanuel Vadot mmc-hs200-1_8v; 110*833e5d42SEmmanuel Vadot no-sd; 111*833e5d42SEmmanuel Vadot no-sdio; 112*833e5d42SEmmanuel Vadot }; 113