1 From 193065956ba3e285df2c67f7c3bdeb3bdaae6ee9 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 13 Feb 2020 15:42:05 +0100
4 Subject: [PATCH] dt-bindings: display: Convert VC4 bindings to schemas
6 The BCM283x SoCs have a display pipeline composed of several controllers
7 with device tree bindings that are supported by Linux.
9 Now that we have the DT validation in place, let's split into separate
10 files and convert the device tree bindings for those controllers to
13 This is just a 1:1 conversion though, and some bindings were incomplete so
14 it results in example validation warnings that are going to be addressed in
15 the following patches.
17 Cc: Rob Herring <robh+dt@kernel.org>
18 Cc: devicetree@vger.kernel.org
19 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
21 .../bindings/display/brcm,bcm-vc4.txt | 174 ------------------
22 .../bindings/display/brcm,bcm2835-dpi.yaml | 66 +++++++
23 .../bindings/display/brcm,bcm2835-dsi0.yaml | 73 ++++++++
24 .../bindings/display/brcm,bcm2835-hdmi.yaml | 75 ++++++++
25 .../bindings/display/brcm,bcm2835-hvs.yaml | 37 ++++
26 .../display/brcm,bcm2835-pixelvalve0.yaml | 40 ++++
27 .../bindings/display/brcm,bcm2835-txp.yaml | 37 ++++
28 .../bindings/display/brcm,bcm2835-v3d.yaml | 42 +++++
29 .../bindings/display/brcm,bcm2835-vc4.yaml | 34 ++++
30 .../bindings/display/brcm,bcm2835-vec.yaml | 44 +++++
32 11 files changed, 449 insertions(+), 175 deletions(-)
33 delete mode 100644 Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
34 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
35 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
36 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
37 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
38 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
39 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
40 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
41 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
42 create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
44 --- a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
47 -Broadcom VC4 (VideoCore4) GPU
49 -The VC4 device present on the Raspberry Pi includes a display system
50 -with HDMI output and the HVS (Hardware Video Scaler) for compositing
53 -Required properties for VC4:
54 -- compatible: Should be "brcm,bcm2835-vc4" or "brcm,cygnus-vc4"
56 -Required properties for Pixel Valve:
57 -- compatible: Should be one of "brcm,bcm2835-pixelvalve0",
58 - "brcm,bcm2835-pixelvalve1", or "brcm,bcm2835-pixelvalve2"
59 -- reg: Physical base address and length of the PV's registers
60 -- interrupts: The interrupt number
61 - See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
63 -Required properties for HVS:
64 -- compatible: Should be "brcm,bcm2835-hvs"
65 -- reg: Physical base address and length of the HVS's registers
66 -- interrupts: The interrupt number
67 - See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
69 -Required properties for HDMI
70 -- compatible: Should be "brcm,bcm2835-hdmi"
71 -- reg: Physical base address and length of the two register ranges
72 - ("HDMI" and "HD", in that order)
73 -- interrupts: The interrupt numbers
74 - See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
75 -- ddc: phandle of the I2C controller used for DDC EDID probing
76 -- clocks: a) hdmi: The HDMI state machine clock
77 - b) pixel: The pixel clock.
79 -Optional properties for HDMI:
80 -- hpd-gpios: The GPIO pin for HDMI hotplug detect (if it doesn't appear
81 - as an interrupt/status bit in the HDMI controller
82 - itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt
83 -- dmas: Should contain one entry pointing to the DMA channel used to
85 -- dma-names: Should contain "audio-rx"
87 -Required properties for DPI:
88 -- compatible: Should be "brcm,bcm2835-dpi"
89 -- reg: Physical base address and length of the registers
90 -- clocks: a) core: The core clock the unit runs on
91 - b) pixel: The pixel clock that feeds the pixelvalve
92 -- port: Port node with a single endpoint connecting to the panel
93 - device, as defined in [1]
95 -Required properties for VEC:
96 -- compatible: Should be "brcm,bcm2835-vec"
97 -- reg: Physical base address and length of the registers
98 -- clocks: The core clock the unit runs on
99 -- interrupts: The interrupt number
100 - See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
102 -Required properties for V3D:
103 -- compatible: Should be "brcm,bcm2835-v3d" or "brcm,cygnus-v3d"
104 -- reg: Physical base address and length of the V3D's registers
105 -- interrupts: The interrupt number
106 - See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
108 -Optional properties for V3D:
109 -- clocks: The clock the unit runs on
111 -Required properties for DSI:
112 -- compatible: Should be "brcm,bcm2835-dsi0" or "brcm,bcm2835-dsi1"
113 -- reg: Physical base address and length of the DSI block's registers
114 -- interrupts: The interrupt number
115 - See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
116 -- clocks: a) phy: The DSI PLL clock feeding the DSI analog PHY
117 - b) escape: The DSI ESC clock from CPRMAN
118 - c) pixel: The DSI pixel clock from CPRMAN
119 -- clock-output-names:
120 - The 3 clocks output from the DSI analog PHY: dsi[01]_byte,
121 - dsi[01]_ddr2, and dsi[01]_ddr
123 -Required properties for the TXP (writeback) block:
124 -- compatible: Should be "brcm,bcm2835-txp"
125 -- reg: Physical base address and length of the TXP block's registers
126 -- interrupts: The interrupt number
127 - See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
129 -[1] Documentation/devicetree/bindings/media/video-interfaces.txt
132 -pixelvalve@7e807000 {
133 - compatible = "brcm,bcm2835-pixelvalve2";
134 - reg = <0x7e807000 0x100>;
135 - interrupts = <2 10>; /* pixelvalve */
139 - compatible = "brcm,bcm2835-hvs";
140 - reg = <0x7e400000 0x6000>;
141 - interrupts = <2 1>;
144 -hdmi: hdmi@7e902000 {
145 - compatible = "brcm,bcm2835-hdmi";
146 - reg = <0x7e902000 0x600>,
147 - <0x7e808000 0x100>;
148 - interrupts = <2 8>, <2 9>;
150 - hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
151 - clocks = <&clocks BCM2835_PLLH_PIX>,
152 - <&clocks BCM2835_CLOCK_HSM>;
153 - clock-names = "pixel", "hdmi";
157 - compatible = "brcm,bcm2835-dpi";
158 - reg = <0x7e208000 0x8c>;
159 - clocks = <&clocks BCM2835_CLOCK_VPU>,
160 - <&clocks BCM2835_CLOCK_DPI>;
161 - clock-names = "core", "pixel";
162 - #address-cells = <1>;
166 - dpi_out: endpoint@0 {
167 - remote-endpoint = <&panel_in>;
172 -dsi1: dsi@7e700000 {
173 - compatible = "brcm,bcm2835-dsi1";
174 - reg = <0x7e700000 0x8c>;
175 - interrupts = <2 12>;
176 - #address-cells = <1>;
178 - #clock-cells = <1>;
180 - clocks = <&clocks BCM2835_PLLD_DSI1>,
181 - <&clocks BCM2835_CLOCK_DSI1E>,
182 - <&clocks BCM2835_CLOCK_DSI1P>;
183 - clock-names = "phy", "escape", "pixel";
185 - clock-output-names = "dsi1_byte", "dsi1_ddr2", "dsi1_ddr";
187 - pitouchscreen: panel@0 {
188 - compatible = "raspberrypi,touchscreen";
196 - compatible = "brcm,bcm2835-vec";
197 - reg = <0x7e806000 0x1000>;
198 - clocks = <&clocks BCM2835_CLOCK_VEC>;
199 - interrupts = <2 27>;
203 - compatible = "brcm,bcm2835-v3d";
204 - reg = <0x7ec00000 0x1000>;
205 - interrupts = <1 10>;
209 - compatible = "brcm,bcm2835-vc4";
213 - compatible = "ontat,yx700wv03", "simple-panel";
216 - panel_in: endpoint {
217 - remote-endpoint = <&dpi_out>;
222 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
224 +# SPDX-License-Identifier: GPL-2.0
227 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-dpi.yaml#
228 +$schema: http://devicetree.org/meta-schemas/core.yaml#
230 +title: Broadcom VC4 (VideoCore4) DPI Controller
233 + - Eric Anholt <eric@anholt.net>
237 + const: brcm,bcm2835-dpi
244 + - description: The core clock the unit runs on
245 + - description: The pixel clock that feeds the pixelvalve
250 + Port node with a single endpoint connecting to the panel, as
251 + defined in Documentation/devicetree/bindings/media/video-interfaces.txt.
259 +additionalProperties: false
263 + #include <dt-bindings/clock/bcm2835.h>
266 + compatible = "ontat,yx700wv03", "simple-panel";
269 + panel_in: endpoint {
270 + remote-endpoint = <&dpi_out>;
275 + dpi: dpi@7e208000 {
276 + compatible = "brcm,bcm2835-dpi";
277 + reg = <0x7e208000 0x8c>;
278 + clocks = <&clocks BCM2835_CLOCK_VPU>,
279 + <&clocks BCM2835_CLOCK_DPI>;
280 + clock-names = "core", "pixel";
283 + dpi_out: endpoint {
284 + remote-endpoint = <&panel_in>;
291 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
293 +# SPDX-License-Identifier: GPL-2.0
296 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-dsi0.yaml#
297 +$schema: http://devicetree.org/meta-schemas/core.yaml#
299 +title: Broadcom VC4 (VideoCore4) DSI Controller
302 + - Eric Anholt <eric@anholt.net>
307 + - brcm,bcm2835-dsi0
308 + - brcm,bcm2835-dsi1
315 + - description: The DSI PLL clock feeding the DSI analog PHY
316 + - description: The DSI ESC clock
317 + - description: The DSI pixel clock
319 + clock-output-names: true
320 + # FIXME: The meta-schemas don't seem to allow it for now
322 + # - description: The DSI byte clock for the PHY
323 + # - description: The DSI DDR2 clock
324 + # - description: The DSI DDR clock
333 + - clock-output-names
336 +unevaluatedProperties: false
340 + #include <dt-bindings/clock/bcm2835.h>
342 + dsi1: dsi@7e700000 {
343 + compatible = "brcm,bcm2835-dsi1";
344 + reg = <0x7e700000 0x8c>;
345 + interrupts = <2 12>;
346 + #address-cells = <1>;
348 + #clock-cells = <1>;
350 + clocks = <&clocks BCM2835_PLLD_DSI1>,
351 + <&clocks BCM2835_CLOCK_DSI1E>,
352 + <&clocks BCM2835_CLOCK_DSI1P>;
353 + clock-names = "phy", "escape", "pixel";
355 + clock-output-names = "dsi1_byte", "dsi1_ddr2", "dsi1_ddr";
357 + pitouchscreen: panel@0 {
358 + compatible = "raspberrypi,touchscreen";
367 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
369 +# SPDX-License-Identifier: GPL-2.0
372 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-hdmi.yaml#
373 +$schema: http://devicetree.org/meta-schemas/core.yaml#
375 +title: Broadcom VC4 (VideoCore4) HDMI Controller
378 + - Eric Anholt <eric@anholt.net>
382 + const: brcm,bcm2835-hdmi
386 + - description: HDMI register range
387 + - description: HD register range
394 + - description: The HDMI state machine clock
395 + - description: The pixel clock
399 + - $ref: /schemas/types.yaml#/definitions/phandle
401 + Phandle of the I2C controller used for DDC EDID probing
405 + The GPIO pin for the HDMI hotplug detect (if it doesn't appear
406 + as an interrupt/status bit in the HDMI controller itself)
411 + Should contain one entry pointing to the DMA channel used to
412 + transfer audio data.
424 +additionalProperties: false
428 + #include <dt-bindings/clock/bcm2835.h>
429 + #include <dt-bindings/gpio/gpio.h>
431 + hdmi: hdmi@7e902000 {
432 + compatible = "brcm,bcm2835-hdmi";
433 + reg = <0x7e902000 0x600>,
434 + <0x7e808000 0x100>;
435 + interrupts = <2 8>, <2 9>;
437 + hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
438 + clocks = <&clocks BCM2835_PLLH_PIX>,
439 + <&clocks BCM2835_CLOCK_HSM>;
440 + clock-names = "pixel", "hdmi";
445 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
447 +# SPDX-License-Identifier: GPL-2.0
450 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-hvs.yaml#
451 +$schema: http://devicetree.org/meta-schemas/core.yaml#
453 +title: Broadcom VC4 (VideoCore4) Hardware Video Scaler
456 + - Eric Anholt <eric@anholt.net>
460 + const: brcm,bcm2835-hvs
473 +additionalProperties: false
478 + compatible = "brcm,bcm2835-hvs";
479 + reg = <0x7e400000 0x6000>;
480 + interrupts = <2 1>;
485 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
487 +# SPDX-License-Identifier: GPL-2.0
490 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-pixelvalve0.yaml#
491 +$schema: http://devicetree.org/meta-schemas/core.yaml#
493 +title: Broadcom VC4 (VideoCore4) PixelValve
496 + - Eric Anholt <eric@anholt.net>
501 + - brcm,bcm2835-pixelvalve0
502 + - brcm,bcm2835-pixelvalve1
503 + - brcm,bcm2835-pixelvalve2
516 +additionalProperties: false
520 + pixelvalve@7e807000 {
521 + compatible = "brcm,bcm2835-pixelvalve2";
522 + reg = <0x7e807000 0x100>;
523 + interrupts = <2 10>; /* pixelvalve */
528 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
530 +# SPDX-License-Identifier: GPL-2.0
533 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-txp.yaml#
534 +$schema: http://devicetree.org/meta-schemas/core.yaml#
536 +title: Broadcom VC4 (VideoCore4) TXP (writeback) Controller
539 + - Eric Anholt <eric@anholt.net>
543 + const: brcm,bcm2835-txp
556 +additionalProperties: false
560 + txp: txp@7e004000 {
561 + compatible = "brcm,bcm2835-txp";
562 + reg = <0x7e004000 0x20>;
563 + interrupts = <1 11>;
568 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
570 +# SPDX-License-Identifier: GPL-2.0
573 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-v3d.yaml#
574 +$schema: http://devicetree.org/meta-schemas/core.yaml#
576 +title: Broadcom VC4 (VideoCore4) V3D GPU
579 + - Eric Anholt <eric@anholt.net>
601 +additionalProperties: false
605 + v3d: v3d@7ec00000 {
606 + compatible = "brcm,bcm2835-v3d";
607 + reg = <0x7ec00000 0x1000>;
608 + interrupts = <1 10>;
613 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
615 +# SPDX-License-Identifier: GPL-2.0
618 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-vc4.yaml#
619 +$schema: http://devicetree.org/meta-schemas/core.yaml#
621 +title: Broadcom VC4 (VideoCore4) GPU
624 + - Eric Anholt <eric@anholt.net>
627 + The VC4 device present on the Raspberry Pi includes a display system
628 + with HDMI output and the HVS (Hardware Video Scaler) for compositing
640 +additionalProperties: false
645 + compatible = "brcm,bcm2835-vc4";
650 +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
652 +# SPDX-License-Identifier: GPL-2.0
655 +$id: http://devicetree.org/schemas/display/brcm,bcm2835-vec.yaml#
656 +$schema: http://devicetree.org/meta-schemas/core.yaml#
658 +title: Broadcom VC4 (VideoCore4) VEC
661 + - Eric Anholt <eric@anholt.net>
665 + const: brcm,bcm2835-vec
682 +additionalProperties: false
686 + #include <dt-bindings/clock/bcm2835.h>
688 + vec: vec@7e806000 {
689 + compatible = "brcm,bcm2835-vec";
690 + reg = <0x7e806000 0x1000>;
691 + clocks = <&clocks BCM2835_CLOCK_VEC>;
692 + interrupts = <2 27>;
698 @@ -5574,7 +5574,7 @@ T: git git://github.com/anholt/linux
700 F: drivers/gpu/drm/vc4/
701 F: include/uapi/drm/vc4_drm.h
702 -F: Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
703 +F: Documentation/devicetree/bindings/display/brcm,bcm2835-*.yaml
704 T: git git://anongit.freedesktop.org/drm/drm-misc
706 DRM DRIVERS FOR VIVANTE GPU IP