diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
index 77f3ecb1e2e7..f8c13f656bb5 100644
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -345,6 +345,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
vc4-kms-v3d-pi4.dtbo \
vc4-kms-v3d-pi5.dtbo \
vc4-kms-vga666.dtbo \
+ vec-gpio-pi5.dtbo \
vga666.dtbo \
vl805.dtbo \
w1-gpio.dtbo \
diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
index d1b78ab4fbfb..4ea6fc36b34e 100644
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -5838,7 +5838,7 @@ Info: See vc4-kms-v3d-pi4 (this is the Pi 5 version)
Name: vc4-kms-vga666
-Info: Enable the VGA666 (resistor ladder ADC) for the vc4-kms-v3d driver.
+Info: Enable the VGA666 (resistor ladder DAC) for the vc4-kms-v3d driver.
Requires vc4-kms-v3d to be loaded.
Load: dtoverlay=vc4-kms-vga666,
Params: ddc Enables GPIOs 0&1 as the I2C to read the EDID
@@ -5846,6 +5846,15 @@ Params: ddc Enables GPIOs 0&1 as the I2C to read the EDID
GPIOs, therefore level shifters are required.
+Name: vec-gpio-pi5
+Info: Overlay to output composite video as an 8-bit digital code over GPIO
+ pins 4-11, for Raspberry Pi 5 series only. Requires composite video
+ to be enabled; incompatible with any use of DPI or VGA666.
+Load: dtoverlay=vec-gpio-pi5,
+Params: clk Enable GPIO 0 (clock, 108 MHz)
+ gpio27 Enable GPIO 27 (duplicate MSB)
+
+
Name: vga666
Info: Overlay for the Fen Logic VGA666 board
This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds
diff --git a/arch/arm/boot/dts/overlays/overlay_map.dts b/arch/arm/boot/dts/overlays/overlay_map.dts
index f28f4b83b7ad..6d0e12773ca9 100644
--- a/arch/arm/boot/dts/overlays/overlay_map.dts
+++ b/arch/arm/boot/dts/overlays/overlay_map.dts
@@ -518,6 +518,14 @@
bcm2712;
};
+ vec-gpio {
+ bcm2712 = "vec-gpio-pi5";
+ };
+
+ vec-gpio-pi5 {
+ bcm2712;
+ };
+
vl805 {
bcm2711;
};
diff --git a/arch/arm/boot/dts/overlays/vec-gpio-pi5-overlay.dts b/arch/arm/boot/dts/overlays/vec-gpio-pi5-overlay.dts
new file mode 100644
index 000000000000..1d2656e51f9c
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/vec-gpio-pi5-overlay.dts
@@ -0,0 +1,48 @@
+/*
+ * vec-gpio-pi5-overlay.dts
+ */
+
+/dts-v1/;
+/plugin/;
+
+/{
+ compatible = "brcm,bcm2712";
+
+ fragment@0 {
+ target = <&rp1_vec>;
+ rp1vec_overlay: __overlay__ {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rp1vec_ch0pins>, <&rp1vec_ch0pins>;
+ };
+ };
+
+ fragment@1 {
+ target = <&gpio>;
+ __overlay__ {
+ rp1vec_ch0pins: rp1vec_ch0pins {
+ function = "dpi";
+ pins = "gpio4", "gpio5", "gpio6", "gpio7",
+ "gpio8", "gpio9", "gpio10", "gpio11";
+ bias-disable;
+ drive-strength = <12>;
+ };
+ rp1vec_pin27: rp1vec_pin27 {
+ function = "dpi";
+ pins = "gpio27";
+ bias-disable;
+ drive-strength = <12>;
+ };
+ rp1vec_clkpin: rp1vec_clkpin {
+ function = "dpi";
+ pins = "gpio0";
+ bias-disable;
+ drive-strength = <12>;
+ };
+ };
+ };
+
+ __overrides__ {
+ gpio27 = <&rp1vec_overlay>, "pinctrl-0:4=", <&rp1vec_pin27>;
+ clk = <&rp1vec_overlay>, "pinctrl-0:8=", <&rp1vec_clkpin>;
+ };
+};