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