Skip to content

Commit 1eece23

Browse files
Johan Jonkerstorulf
authored andcommitted
dt-bindings: mmc: convert rockchip dw-mshc bindings to yaml
Current dts files with 'dwmmc' nodes are manually verified. In order to automate this process rockchip-dw-mshc.txt has to be converted to yaml. In the new setup rockchip-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 8655ff2 commit 1eece23

File tree

3 files changed

+124
-49
lines changed

3 files changed

+124
-49
lines changed

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

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip designware mobile storage host controller device tree bindings
8+
9+
description:
10+
Rockchip uses the Synopsys designware mobile storage host controller
11+
to interface a SoC with storage medium such as eMMC or SD/MMC cards.
12+
This file documents the combined properties for the core Synopsys dw mshc
13+
controller that are not already included in the synopsys-dw-mshc-common.yaml
14+
file and the Rockchip specific extensions.
15+
16+
allOf:
17+
- $ref: "synopsys-dw-mshc-common.yaml#"
18+
19+
maintainers:
20+
- Heiko Stuebner <[email protected]>
21+
22+
# Everything else is described in the common file
23+
properties:
24+
compatible:
25+
oneOf:
26+
# for Rockchip RK2928 and before RK3288
27+
- const: rockchip,rk2928-dw-mshc
28+
# for Rockchip RK3288
29+
- const: rockchip,rk3288-dw-mshc
30+
- items:
31+
- enum:
32+
# for Rockchip PX30
33+
- rockchip,px30-dw-mshc
34+
# for Rockchip RK3036
35+
- rockchip,rk3036-dw-mshc
36+
# for Rockchip RK322x
37+
- rockchip,rk3228-dw-mshc
38+
# for Rockchip RK3328
39+
- rockchip,rk3328-dw-mshc
40+
# for Rockchip RK3368
41+
- rockchip,rk3368-dw-mshc
42+
# for Rockchip RK3399
43+
- rockchip,rk3399-dw-mshc
44+
# for Rockchip RV1108
45+
- rockchip,rv1108-dw-mshc
46+
- const: rockchip,rk3288-dw-mshc
47+
48+
reg:
49+
maxItems: 1
50+
51+
interrupts:
52+
maxItems: 1
53+
54+
clocks:
55+
minItems: 2
56+
maxItems: 4
57+
description:
58+
Handle to "biu" and "ciu" clocks for the bus interface unit clock and
59+
the card interface unit clock. If "ciu-drive" and "ciu-sample" are
60+
specified in clock-names, it should also contain
61+
handles to these clocks.
62+
63+
clock-names:
64+
minItems: 2
65+
items:
66+
- const: biu
67+
- const: ciu
68+
- const: ciu-drive
69+
- const: ciu-sample
70+
description:
71+
Apart from the clock-names "biu" and "ciu" two more clocks
72+
"ciu-drive" and "ciu-sample" are supported. They are used
73+
to control the clock phases, "ciu-sample" is required for tuning
74+
high speed modes.
75+
76+
rockchip,default-sample-phase:
77+
allOf:
78+
- $ref: /schemas/types.yaml#/definitions/uint32
79+
minimum: 0
80+
maximum: 360
81+
default: 0
82+
description:
83+
The default phase to set "ciu-sample" at probing,
84+
low speeds or in case where all phases work at tuning time.
85+
If not specified 0 deg will be used.
86+
87+
rockchip,desired-num-phases:
88+
allOf:
89+
- $ref: /schemas/types.yaml#/definitions/uint32
90+
minimum: 0
91+
maximum: 360
92+
default: 360
93+
description:
94+
The desired number of times that the host execute tuning when needed.
95+
If not specified, the host will do tuning for 360 times,
96+
namely tuning for each degree.
97+
98+
required:
99+
- compatible
100+
- reg
101+
- interrupts
102+
- clocks
103+
- clock-names
104+
105+
examples:
106+
- |
107+
#include <dt-bindings/clock/rk3288-cru.h>
108+
#include <dt-bindings/interrupt-controller/arm-gic.h>
109+
#include <dt-bindings/interrupt-controller/irq.h>
110+
sdmmc: mmc@ff0c0000 {
111+
compatible = "rockchip,rk3288-dw-mshc";
112+
reg = <0x0 0xff0c0000 0x0 0x4000>;
113+
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
114+
clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
115+
<&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
116+
clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
117+
resets = <&cru SRST_MMC0>;
118+
reset-names = "reset";
119+
fifo-depth = <0x100>;
120+
max-frequency = <150000000>;
121+
};
122+
123+
...

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,7 @@ L: [email protected]
22402240
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
22412241
S: Maintained
22422242
F: Documentation/devicetree/bindings/i2c/i2c-rk3x.txt
2243+
F: Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml
22432244
F: arch/arm/boot/dts/rk3*
22442245
F: arch/arm/boot/dts/rv1108*
22452246
F: arch/arm/mach-rockchip/

0 commit comments

Comments
 (0)