9e90c2b009609b1c3603d3113c8cc3c9dd446efa
[platform/kernel/linux-starfive.git] / Documentation / devicetree / bindings / display / allwinner,sun6i-a31-mipi-dsi.yaml
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/display/allwinner,sun6i-a31-mipi-dsi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Allwinner A31 MIPI-DSI Controller Device Tree Bindings
8
9 maintainers:
10   - Chen-Yu Tsai <wens@csie.org>
11   - Maxime Ripard <mripard@kernel.org>
12
13 properties:
14   "#address-cells": true
15   "#size-cells": true
16
17   compatible:
18     enum:
19       - allwinner,sun6i-a31-mipi-dsi
20       - allwinner,sun50i-a64-mipi-dsi
21
22   reg:
23     maxItems: 1
24
25   interrupts:
26     maxItems: 1
27
28   clocks:
29     minItems: 1
30     maxItems: 2
31     items:
32       - description: Bus Clock
33       - description: Module Clock
34
35   clock-names:
36     items:
37       - const: bus
38       - const: mod
39
40   resets:
41     maxItems: 1
42
43   vcc-dsi-supply:
44     description: VCC-DSI power supply of the DSI encoder
45
46   phys:
47     maxItems: 1
48
49   phy-names:
50     const: dphy
51
52   port:
53     type: object
54     description:
55       A port node with endpoint definitions as defined in
56       Documentation/devicetree/bindings/media/video-interfaces.txt. That
57       port should be the input endpoint, usually coming from the
58       associated TCON.
59
60 patternProperties:
61   "^panel@[0-9]+$": true
62
63 required:
64   - "#address-cells"
65   - "#size-cells"
66   - compatible
67   - reg
68   - interrupts
69   - clocks
70   - phys
71   - phy-names
72   - resets
73   - vcc-dsi-supply
74   - port
75
76 allOf:
77   - if:
78       properties:
79          compatible:
80            contains:
81              const: allwinner,sun6i-a31-mipi-dsi
82
83     then:
84         properties:
85           clocks:
86             minItems: 2
87
88         required:
89           - clock-names
90
91   - if:
92       properties:
93          compatible:
94            contains:
95              const: allwinner,sun50i-a64-mipi-dsi
96
97     then:
98         properties:
99           clocks:
100             minItems: 1
101
102 additionalProperties: false
103
104 examples:
105   - |
106     dsi0: dsi@1ca0000 {
107         compatible = "allwinner,sun6i-a31-mipi-dsi";
108         reg = <0x01ca0000 0x1000>;
109         interrupts = <0 89 4>;
110         clocks = <&ccu 23>, <&ccu 96>;
111         clock-names = "bus", "mod";
112         resets = <&ccu 4>;
113         phys = <&dphy0>;
114         phy-names = "dphy";
115         vcc-dsi-supply = <&reg_dcdc1>;
116         #address-cells = <1>;
117         #size-cells = <0>;
118
119         panel@0 {
120                 compatible = "bananapi,lhr050h41", "ilitek,ili9881c";
121                 reg = <0>;
122                 power-gpios = <&pio 1 7 0>; /* PB07 */
123                 reset-gpios = <&r_pio 0 5 1>; /* PL05 */
124                 backlight = <&pwm_bl>;
125         };
126
127         port {
128             dsi0_in_tcon0: endpoint {
129                 remote-endpoint = <&tcon0_out_dsi0>;
130             };
131         };
132     };
133
134 ...