c41e063fde959286837d101b42a6bbdfb1a0f15e
[openwrt/staging/dangole.git] /
1 From 965351ba5a271c0a4a7776193b7af78871370f7a Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 13 Feb 2020 16:45:24 +0100
4 Subject: [PATCH] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI
5 controllers bindings
6
7 The HDMI controllers found in the BCM2711 SoC need some adjustments to the
8 bindings, especially since the registers have been shuffled around in more
9 register ranges.
10
11 Cc: Rob Herring <robh+dt@kernel.org>
12 Cc: devicetree@vger.kernel.org
13 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
14 ---
15 .../bindings/display/brcm,bcm2835-hdmi.yaml | 118 ++++++++++++++++--
16 1 file changed, 109 insertions(+), 9 deletions(-)
17
18 --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
19 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
20 @@ -11,24 +11,58 @@ maintainers:
21
22 properties:
23 compatible:
24 - const: brcm,bcm2835-hdmi
25 + enum:
26 + - brcm,bcm2835-hdmi
27 + - brcm,bcm2711-hdmi0
28 + - brcm,bcm2711-hdmi1
29
30 reg:
31 + oneOf:
32 + - items:
33 + - description: HDMI register range
34 + - description: HD register range
35 +
36 + - items:
37 + - description: HDMI controller register range
38 + - description: DVP register range
39 + - description: HDMI PHY register range
40 + - description: Rate Manager register range
41 + - description: Packet RAM register range
42 + - description: Metadata RAM register range
43 + - description: CSC register range
44 + - description: CEC register range
45 + - description: HD register range
46 +
47 + reg-names:
48 items:
49 - - description: HDMI register range
50 - - description: HD register range
51 + - const: hdmi
52 + - const: dvp
53 + - const: phy
54 + - const: rm
55 + - const: packet
56 + - const: metadata
57 + - const: csc
58 + - const: cec
59 + - const: hd
60
61 interrupts:
62 minItems: 2
63
64 clocks:
65 - items:
66 - - description: The pixel clock
67 - - description: The HDMI state machine clock
68 + oneOf:
69 + - items:
70 + - description: The pixel clock
71 + - description: The HDMI state machine clock
72 +
73 + - items:
74 + - description: The HDMI state machine clock
75
76 clock-names:
77 - items:
78 - - const: pixel
79 + oneOf:
80 + - items:
81 + - const: pixel
82 + - const: hdmi
83 +
84 - const: hdmi
85
86 ddc:
87 @@ -51,15 +85,54 @@ properties:
88 dma-names:
89 const: audio-rx
90
91 + resets:
92 + maxItems: 1
93 +
94 required:
95 - compatible
96 - reg
97 - - interrupts
98 - clocks
99 - ddc
100
101 additionalProperties: false
102
103 +if:
104 + properties:
105 + compatible:
106 + contains:
107 + enum:
108 + - brcm,bcm2711-hdmi0
109 + - brcm,bcm2711-hdmi1
110 +
111 +then:
112 + properties:
113 + reg:
114 + minItems: 9
115 +
116 + clocks:
117 + maxItems: 1
118 +
119 + clock-names:
120 + maxItems: 1
121 +
122 + required:
123 + - reg-names
124 + - resets
125 +
126 +else:
127 + properties:
128 + reg:
129 + maxItems: 2
130 +
131 + clocks:
132 + minItems: 2
133 +
134 + clock-names:
135 + minItems: 2
136 +
137 + required:
138 + - interrupts
139 +
140 examples:
141 - |
142 #include <dt-bindings/clock/bcm2835.h>
143 @@ -77,4 +150,31 @@ examples:
144 clock-names = "pixel", "hdmi";
145 };
146
147 + - |
148 + hdmi0: hdmi@7ef00700 {
149 + compatible = "brcm,bcm2711-hdmi0";
150 + reg = <0x7ef00700 0x300>,
151 + <0x7ef00300 0x200>,
152 + <0x7ef00f00 0x80>,
153 + <0x7ef00f80 0x80>,
154 + <0x7ef01b00 0x200>,
155 + <0x7ef01f00 0x400>,
156 + <0x7ef00200 0x80>,
157 + <0x7ef04300 0x100>,
158 + <0x7ef20000 0x100>;
159 + reg-names = "hdmi",
160 + "dvp",
161 + "phy",
162 + "rm",
163 + "packet",
164 + "metadata",
165 + "csc",
166 + "cec",
167 + "hd";
168 + clocks = <&firmware_clocks 13>;
169 + clock-names = "hdmi";
170 + resets = <&dvp 0>;
171 + ddc = <&ddc0>;
172 + };
173 +
174 ...