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