Skip to content

Commit 8655ff2

Browse files
Johan Jonkerstorulf
authored andcommitted
dt-bindings: mmc: convert synopsys dw-mshc bindings to yaml
Current dts files with 'dwmmc' nodes are manually verified. In order to automate this process synopsys-dw-mshc.txt has to be converted to yaml. In the new setup synopsys-dw-mshc.yaml will inherit properties from mmc-controller.yaml and synopsys-dw-mshc-common.yaml. 'dwmmc' will no longer be a valid name for a node and should be changed to 'mmc'. Signed-off-by: Johan Jonker <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 87a8df0 commit 8655ff2

File tree

3 files changed

+138
-141
lines changed

3 files changed

+138
-141
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mmc/synopsys-dw-mshc-common.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Synopsys Designware Mobile Storage Host Controller Common Properties
8+
9+
allOf:
10+
- $ref: "mmc-controller.yaml#"
11+
12+
maintainers:
13+
- Ulf Hansson <[email protected]>
14+
15+
# Everything else is described in the common file
16+
properties:
17+
resets:
18+
maxItems: 1
19+
20+
reset-names:
21+
const: reset
22+
23+
clock-frequency:
24+
description:
25+
Should be the frequency (in Hz) of the ciu clock. If this
26+
is specified and the ciu clock is specified then we'll try to set the ciu
27+
clock to this at probe time.
28+
29+
fifo-depth:
30+
allOf:
31+
- $ref: /schemas/types.yaml#/definitions/uint32
32+
description:
33+
The maximum size of the tx/rx fifo's. If this property is not
34+
specified, the default value of the fifo size is determined from the
35+
controller registers.
36+
37+
card-detect-delay:
38+
allOf:
39+
- $ref: /schemas/types.yaml#/definitions/uint32
40+
- default: 0
41+
description:
42+
Delay in milli-seconds before detecting card after card
43+
insert event. The default value is 0.
44+
45+
data-addr:
46+
allOf:
47+
- $ref: /schemas/types.yaml#/definitions/uint32
48+
description:
49+
Override fifo address with value provided by DT. The default FIFO reg
50+
offset is assumed as 0x100 (version < 0x240A) and 0x200(version >= 0x240A)
51+
by driver. If the controller does not follow this rule, please use
52+
this property to set fifo address in device tree.
53+
54+
fifo-watermark-aligned:
55+
allOf:
56+
- $ref: /schemas/types.yaml#/definitions/flag
57+
description:
58+
Data done irq is expected if data length is less than
59+
watermark in PIO mode. But fifo watermark is requested to be aligned
60+
with data length in some SoC so that TX/RX irq can be generated with
61+
data done irq. Add this watermark quirk to mark this requirement and
62+
force fifo watermark setting accordingly.
63+
64+
dmas:
65+
maxItems: 1
66+
67+
dma-names:
68+
const: rx-tx

Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt

Lines changed: 0 additions & 141 deletions
This file was deleted.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mmc/synopsys-dw-mshc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Synopsys Designware Mobile Storage Host Controller Binding
8+
9+
allOf:
10+
- $ref: "synopsys-dw-mshc-common.yaml#"
11+
12+
maintainers:
13+
- Ulf Hansson <[email protected]>
14+
15+
# Everything else is described in the common file
16+
properties:
17+
compatible:
18+
const: snps,dw-mshc
19+
20+
reg:
21+
maxItems: 1
22+
23+
interrupts:
24+
maxItems: 1
25+
26+
clocks:
27+
minItems: 2
28+
maxItems: 2
29+
description:
30+
Handle to "biu" and "ciu" clocks for the
31+
bus interface unit clock and the card interface unit clock.
32+
33+
clock-names:
34+
items:
35+
- const: biu
36+
- const: ciu
37+
38+
required:
39+
- compatible
40+
- reg
41+
- interrupts
42+
- clocks
43+
- clock-names
44+
45+
examples:
46+
- |
47+
mmc@12200000 {
48+
compatible = "snps,dw-mshc";
49+
reg = <0x12200000 0x1000>;
50+
interrupts = <0 75 0>;
51+
clocks = <&clock 351>, <&clock 132>;
52+
clock-names = "biu", "ciu";
53+
dmas = <&pdma 12>;
54+
dma-names = "rx-tx";
55+
resets = <&rst 20>;
56+
reset-names = "reset";
57+
vmmc-supply = <&buck8>;
58+
#address-cells = <1>;
59+
#size-cells = <0>;
60+
broken-cd;
61+
bus-width = <8>;
62+
cap-mmc-highspeed;
63+
cap-sd-highspeed;
64+
card-detect-delay = <200>;
65+
clock-freq-min-max = <400000 200000000>;
66+
clock-frequency = <400000000>;
67+
data-addr = <0x200>;
68+
fifo-depth = <0x80>;
69+
fifo-watermark-aligned;
70+
};

0 commit comments

Comments
 (0)