1 From 99f2ab0dad947049e0fa62e88c1e4c1feb7ab379 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 4 Feb 2021 14:41:10 +0000
4 Subject: [PATCH] dtoverlays: Add an overlay for the VGA666 when used
7 Includes optional use of GPIOs 0&1 / BSC0 for DDC to read the EDID
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 arch/arm/boot/dts/overlays/Makefile | 1 +
13 arch/arm/boot/dts/overlays/README | 10 ++
14 .../dts/overlays/vc4-kms-vga666-overlay.dts | 100 ++++++++++++++++++
15 3 files changed, 111 insertions(+)
16 create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-vga666-overlay.dts
18 --- a/arch/arm/boot/dts/overlays/Makefile
19 +++ b/arch/arm/boot/dts/overlays/Makefile
20 @@ -211,6 +211,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
21 vc4-kms-kippah-7inch.dtbo \
23 vc4-kms-v3d-pi4.dtbo \
24 + vc4-kms-vga666.dtbo \
28 --- a/arch/arm/boot/dts/overlays/README
29 +++ b/arch/arm/boot/dts/overlays/README
30 @@ -3120,10 +3120,20 @@ Params: cma-512 CMA is 5
35 +Info: Enable the VGA666 (resistor ladder ADC) for the vc4-kms-v3d driver.
36 + Requires vc4-kms-v3d to be loaded.
37 +Load: dtoverlay=vc4-kms-vga666,<param>
38 +Params: ddc Enables GPIOs 0&1 as the I2C to read the EDID
39 + from the display. NB These are NOT 5V tolerant
40 + GPIOs, therefore level shifters are required.
44 Info: Overlay for the Fen Logic VGA666 board
45 This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds
46 after the kernel has started.
47 + NOT for use with vc4-kms-v3d.
48 Load: dtoverlay=vga666
52 +++ b/arch/arm/boot/dts/overlays/vc4-kms-vga666-overlay.dts
55 + * vc4-kms-vga666-overlay.dts
56 + * Configures a FenLogic or similar VGA666 DPI adapter when using the
57 + * vc4-kms-v3d driver.
58 + * If a suitable I2C level shifter is connected to GPIOs 0&1 and the VGA
59 + * ID1/SDA (pin 12) and ID3/SCL (pin 15) lines, then there is the option to
60 + * enable reading the EDID from the display.
66 +#include <dt-bindings/pinctrl/bcm2835.h>
69 + compatible = "brcm,bcm2835";
74 + vga_connector: vga_connector {
75 + compatible = "vga-connector";
79 + vga_con_in: endpoint {
80 + remote-endpoint = <&vga666_out>;
86 + compatible = "dumb-vga-dac";
89 + #address-cells = <1>;
95 + vga666_in: endpoint {
96 + remote-endpoint = <&dpi_out>;
103 + vga666_out: endpoint {
104 + remote-endpoint = <&vga_con_in>;
118 + pinctrl-names = "default";
119 + pinctrl-0 = <&dpi_18bit_gpio2>;
122 + dpi_out: endpoint@0 {
123 + remote-endpoint = <&vga666_in>;
130 + target = <&vga_connector>;
132 + ddc-i2c-bus = <&i2c_vc>;
137 + target = <&i2c0if>;
144 + target = <&i2c0mux>;
151 + ddc = <0>,"=2", <0>,"=3", <0>,"=4";