Skip to content

Commit ae5c058

Browse files
lkundrakstorulf
authored andcommitted
dt-bindings: mmc: Convert sdhci-pxa to json-schema
Convert the sdhci-pxa binding to DT schema format using json-schema. At the same time, fix a couple of issues with the examples discovered by the validation tool -- a semicolon instead of a comma and wrong node names. Signed-off-by: Lubomir Rintel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 9253d71 commit ae5c058

File tree

2 files changed

+102
-50
lines changed

2 files changed

+102
-50
lines changed

Documentation/devicetree/bindings/mmc/sdhci-pxa.txt

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mmc/sdhci-pxa.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell PXA SDHCI v2/v3 bindings
8+
9+
maintainers:
10+
- Ulf Hansson <[email protected]>
11+
12+
allOf:
13+
- $ref: mmc-controller.yaml#
14+
- if:
15+
properties:
16+
compatible:
17+
contains:
18+
const: marvell,armada-380-sdhci
19+
then:
20+
properties:
21+
regs:
22+
minItems: 3
23+
reg-names:
24+
minItems: 3
25+
required:
26+
- reg-names
27+
else:
28+
properties:
29+
regs:
30+
maxItems: 1
31+
reg-names:
32+
maxItems: 1
33+
34+
properties:
35+
compatible:
36+
enum:
37+
- mrvl,pxav2-mmc
38+
- mrvl,pxav3-mmc
39+
- marvell,armada-380-sdhci
40+
41+
reg:
42+
minItems: 1
43+
maxItems: 3
44+
45+
reg-names:
46+
items:
47+
- const: sdhci
48+
- const: mbus
49+
- const: conf-sdio3
50+
51+
interrupts:
52+
maxItems: 1
53+
54+
clocks:
55+
minItems: 1
56+
maxItems: 2
57+
58+
clock-names:
59+
minItems: 1
60+
maxItems: 2
61+
items:
62+
- const: io
63+
- const: core
64+
65+
mrvl,clk-delay-cycles:
66+
description: Specify a number of cycles to delay for tuning.
67+
$ref: /schemas/types.yaml#/definitions/uint32
68+
69+
required:
70+
- compatible
71+
- reg
72+
- interrupts
73+
- clocks
74+
- clock-names
75+
76+
examples:
77+
- |
78+
#include <dt-bindings/clock/berlin2.h>
79+
mmc@d4280800 {
80+
compatible = "mrvl,pxav3-mmc";
81+
reg = <0xd4280800 0x800>;
82+
bus-width = <8>;
83+
interrupts = <27>;
84+
clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>;
85+
clock-names = "io", "core";
86+
non-removable;
87+
mrvl,clk-delay-cycles = <31>;
88+
};
89+
- |
90+
mmc@d8000 {
91+
compatible = "marvell,armada-380-sdhci";
92+
reg-names = "sdhci", "mbus", "conf-sdio3";
93+
reg = <0xd8000 0x1000>,
94+
<0xdc000 0x100>,
95+
<0x18454 0x4>;
96+
interrupts = <0 25 0x4>;
97+
clocks = <&gateclk 17>;
98+
clock-names = "io";
99+
mrvl,clk-delay-cycles = <0x1F>;
100+
};
101+
102+
...

0 commit comments

Comments
 (0)