diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index cf7c0154ad6d20..d5111c7d236776 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -346,6 +346,10 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ vc4-kms-v3d-pi4.dtbo \ vc4-kms-v3d-pi5.dtbo \ vc4-kms-vga666.dtbo \ + vd55g1.dtbo \ + vd56g3.dtbo \ + vd65g4.dtbo \ + vd66gy.dtbo \ vec-gpio-pi5.dtbo \ vga666.dtbo \ vl805.dtbo \ diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 8936cbe7b519bd..3551054a802e68 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -5866,6 +5866,66 @@ Params: ddc Enables GPIOs 0&1 as the I2C to read the EDID GPIOs, therefore level shifters are required. +Name: vd55g1 +Info: ST VD55G1 camera module. + Uses Unicam 1, which is the standard camera connector on most Pi + variants. +Load: dtoverlay=vd55g1,= +Params: rotation Mounting rotation of the camera sensor (0 or + 180, default 0) + orientation Sensor orientation (0 = front, 1 = rear, + 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) + cam0 Adopt the default configuration for CAM0 on a + Compute Module (CSI0, i2c_vc, and cam0_reg). + + +Name: vd56g3 +Info: ST VD56G3 camera module. + Uses Unicam 1, which is the standard camera connector on most Pi + variants. +Load: dtoverlay=vd56g3,= +Params: rotation Mounting rotation of the camera sensor (0 or + 180, default 0) + orientation Sensor orientation (0 = front, 1 = rear, + 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) + cam0 Adopt the default configuration for CAM0 on a + Compute Module (CSI0, i2c_vc, and cam0_reg). + + +Name: vd65g4 +Info: ST VD65G4 camera module. + Uses Unicam 1, which is the standard camera connector on most Pi + variants. +Load: dtoverlay=vd65g4,= +Params: rotation Mounting rotation of the camera sensor (0 or + 180, default 0) + orientation Sensor orientation (0 = front, 1 = rear, + 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) + cam0 Adopt the default configuration for CAM0 on a + Compute Module (CSI0, i2c_vc, and cam0_reg). + + +Name: vd66gy +Info: ST VD66GY camera module. + Uses Unicam 1, which is the standard camera connector on most Pi + variants. +Load: dtoverlay=vd66gy,= +Params: rotation Mounting rotation of the camera sensor (0 or + 180, default 0) + orientation Sensor orientation (0 = front, 1 = rear, + 2 = external, default external) + media-controller Configure use of Media Controller API for + configuring the sensor (default on) + cam0 Adopt the default configuration for CAM0 on a + Compute Module (CSI0, i2c_vc, and cam0_reg). + + 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 diff --git a/arch/arm/boot/dts/overlays/vd55g1-overlay.dts b/arch/arm/boot/dts/overlays/vd55g1-overlay.dts new file mode 100644 index 00000000000000..2496bd6822ca39 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vd55g1-overlay.dts @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Definitions for VD55G1 camera module on VC I2C bus + +/dts-v1/; +/plugin/; + +#include +#include "vd55g1_vd65g4-overlay.dtsi" + +/{ + compatible = "brcm,bcm2835"; + + // Fragment numbers deliberately high to avoid conflicts with the + // included vd55g1_vd65g4 overlay file. + + fragment@101 { + target = <&cam_node>; + __overlay__ { + compatible = "st,vd55g1"; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/vd55g1_vd65g4-overlay.dtsi b/arch/arm/boot/dts/overlays/vd55g1_vd65g4-overlay.dtsi new file mode 100644 index 00000000000000..6b8a8f2d1807b8 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vd55g1_vd65g4-overlay.dtsi @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0-only +/dts-v1/; +/plugin/; + +/{ + compatible = "brcm,bcm2835"; + + fragment@0 { + target = <&i2c0if>; + __overlay__ { + status = "okay"; + }; + }; + + clk_frag: fragment@1 { + target = <&cam1_clk>; + __overlay__ { + status = "okay"; + clock-frequency = <12000000>; + }; + }; + + fragment@2 { + target = <&i2c0mux>; + __overlay__ { + status = "okay"; + }; + }; + + i2c_frag: fragment@3 { + target = <&i2c_csi_dsi>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + cam_node: cam@10 { + reg = <0x10>; + status = "disabled"; + + clocks = <&cam1_clk>; + clock-names = "xclk"; + + vana-supply = <&cam1_reg>; /* 2.8v */ + vddio-supply = <&cam_dummy_reg>; /* 1.8v */ + vcore-supply = <&cam_dummy_reg>; /* 1.2v */ + + rotation = <0>; + orientation = <2>; + + st,leds = <2>; + + port { + cam_endpoint: endpoint { + clock-lanes = <0>; + data-lanes = <1>; + clock-noncontinuous; + link-frequencies = + /bits/ 64 <600000000>; + lane-polarities = <1 1>; + }; + }; + }; + }; + }; + + csi_frag: fragment@4 { + target = <&csi1>; + csi: __overlay__ { + status = "okay"; + + port { + csi_ep: endpoint { + remote-endpoint = <&cam_endpoint>; + clock-lanes = <0>; + data-lanes = <1>; + clock-noncontinuous; + }; + }; + }; + }; + + fragment@5 { + target = <&csi1>; + __dormant__ { + compatible = "brcm,bcm2835-unicam-legacy"; + }; + }; + + __overrides__ { + rotation = <&cam_node>,"rotation:0"; + orientation = <&cam_node>,"orientation:0"; + media-controller = <0>,"!5"; + cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, + <&csi_frag>, "target:0=",<&csi0>, + <&clk_frag>, "target:0=",<&cam0_clk>, + <&cam_node>, "clocks:0=",<&cam0_clk>, + <&cam_node>, "vana-supply:0=",<&cam0_reg>; + }; +}; + +&cam_node { + status = "okay"; +}; + +&cam_endpoint { + remote-endpoint = <&csi_ep>; +}; diff --git a/arch/arm/boot/dts/overlays/vd56g3-overlay.dts b/arch/arm/boot/dts/overlays/vd56g3-overlay.dts new file mode 100644 index 00000000000000..a6b244747d1faa --- /dev/null +++ b/arch/arm/boot/dts/overlays/vd56g3-overlay.dts @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Definitions for VD56G3 camera module on VC I2C bus + +/dts-v1/; +/plugin/; + +#include +#include "vd56g3_vd66gy-overlay.dtsi" + +/{ + compatible = "brcm,bcm2835"; + + // Fragment numbers deliberately high to avoid conflicts with the + // included vd56g3_vd66gy overlay file. + + fragment@101 { + target = <&cam_node>; + __overlay__ { + compatible = "st,vd56g3"; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/vd56g3_vd66gy-overlay.dtsi b/arch/arm/boot/dts/overlays/vd56g3_vd66gy-overlay.dtsi new file mode 100644 index 00000000000000..5063e75db5ec61 --- /dev/null +++ b/arch/arm/boot/dts/overlays/vd56g3_vd66gy-overlay.dtsi @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: GPL-2.0-only +/dts-v1/; +/plugin/; + +/{ + compatible = "brcm,bcm2835"; + + fragment@0 { + target = <&i2c0if>; + __overlay__ { + status = "okay"; + }; + }; + + clk_frag: fragment@1 { + target = <&cam1_clk>; + __overlay__ { + status = "okay"; + clock-frequency = <12000000>; + }; + }; + + fragment@2 { + target = <&i2c0mux>; + __overlay__ { + status = "okay"; + }; + }; + + i2c_frag: fragment@3 { + target = <&i2c_csi_dsi>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + cam_node: cam@10 { + reg = <0x10>; + status = "disabled"; + + clocks = <&cam1_clk>; + clock-names = "xclk"; + + vana-supply = <&cam1_reg>; /* 2.8v */ + vddio-supply = <&cam_dummy_reg>; /* 1.8v */ + vcore-supply = <&cam_dummy_reg>; /* 1.2v */ + + rotation = <0>; + orientation = <2>; + + port { + cam_endpoint: endpoint { + clock-lanes = <0>; + data-lanes = <1 2>; + clock-noncontinuous; + link-frequencies = + /bits/ 64 <402000000>; + lane-polarities = <1 1 1>; + }; + }; + }; + }; + }; + + csi_frag: fragment@4 { + target = <&csi1>; + csi: __overlay__ { + status = "okay"; + + port { + csi_ep: endpoint { + remote-endpoint = <&cam_endpoint>; + clock-lanes = <0>; + data-lanes = <1 2>; + clock-noncontinuous; + }; + }; + }; + }; + + fragment@5 { + target = <&csi1>; + __dormant__ { + compatible = "brcm,bcm2835-unicam-legacy"; + }; + }; + + __overrides__ { + rotation = <&cam_node>,"rotation:0"; + orientation = <&cam_node>,"orientation:0"; + media-controller = <0>,"!5"; + cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, + <&csi_frag>, "target:0=",<&csi0>, + <&clk_frag>, "target:0=",<&cam0_clk>, + <&cam_node>, "clocks:0=",<&cam0_clk>, + <&cam_node>, "vana-supply:0=",<&cam0_reg>; + }; +}; + +&cam_node { + status = "okay"; +}; + +&cam_endpoint { + remote-endpoint = <&csi_ep>; +}; diff --git a/arch/arm/boot/dts/overlays/vd65g4-overlay.dts b/arch/arm/boot/dts/overlays/vd65g4-overlay.dts new file mode 100644 index 00000000000000..b9bf0dd5a063ec --- /dev/null +++ b/arch/arm/boot/dts/overlays/vd65g4-overlay.dts @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Definitions for VD65G4 camera module on VC I2C bus + +/dts-v1/; +/plugin/; + +#include +#include "vd55g1_vd65g4-overlay.dtsi" + +/{ + compatible = "brcm,bcm2835"; + + // Fragment numbers deliberately high to avoid conflicts with the + // included vd55g1_vd65g4 overlay file. + + fragment@101 { + target = <&cam_node>; + __overlay__ { + compatible = "st,vd65g4"; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/vd66gy-overlay.dts b/arch/arm/boot/dts/overlays/vd66gy-overlay.dts new file mode 100644 index 00000000000000..b4fa1252daea7d --- /dev/null +++ b/arch/arm/boot/dts/overlays/vd66gy-overlay.dts @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Definitions for VD66GY camera module on VC I2C bus + +/dts-v1/; +/plugin/; + +#include +#include "vd56g3_vd66gy-overlay.dtsi" + +/{ + compatible = "brcm,bcm2835"; + + // Fragment numbers deliberately high to avoid conflicts with the + // included vd56g3_vd66gy overlay file. + + fragment@101 { + target = <&cam_node>; + __overlay__ { + compatible = "st,vd66gy"; + }; + }; +}; diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig index 4e57c820487968..949154f49e0fcb 100644 --- a/arch/arm/configs/bcm2709_defconfig +++ b/arch/arm/configs/bcm2709_defconfig @@ -953,6 +953,8 @@ CONFIG_VIDEO_OV64A40=m CONFIG_VIDEO_OV7251=m CONFIG_VIDEO_OV7640=m CONFIG_VIDEO_OV9282=m +CONFIG_VIDEO_VD55G1=m +CONFIG_VIDEO_VD56G3=m CONFIG_VIDEO_AD5398=m CONFIG_VIDEO_AK7375=m CONFIG_VIDEO_BU64754=m diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig index d0b6c1a30aed36..e991a4b4a64c92 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -946,6 +946,8 @@ CONFIG_VIDEO_OV64A40=m CONFIG_VIDEO_OV7251=m CONFIG_VIDEO_OV7640=m CONFIG_VIDEO_OV9282=m +CONFIG_VIDEO_VD55G1=m +CONFIG_VIDEO_VD56G3=m CONFIG_VIDEO_AD5398=m CONFIG_VIDEO_AK7375=m CONFIG_VIDEO_BU64754=m diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig index f64edbdbeca458..703855f517aa30 100644 --- a/arch/arm64/configs/bcm2711_defconfig +++ b/arch/arm64/configs/bcm2711_defconfig @@ -1047,6 +1047,8 @@ CONFIG_VIDEO_OV64A40=m CONFIG_VIDEO_OV7251=m CONFIG_VIDEO_OV7640=m CONFIG_VIDEO_OV9282=m +CONFIG_VIDEO_VD55G1=m +CONFIG_VIDEO_VD56G3=m CONFIG_VIDEO_AD5398=m CONFIG_VIDEO_AK7375=m CONFIG_VIDEO_BU64754=m diff --git a/arch/arm64/configs/bcm2711_rt_defconfig b/arch/arm64/configs/bcm2711_rt_defconfig index 45da1c32eed06e..8e0c1835ee3422 100644 --- a/arch/arm64/configs/bcm2711_rt_defconfig +++ b/arch/arm64/configs/bcm2711_rt_defconfig @@ -1046,6 +1046,8 @@ CONFIG_VIDEO_OV64A40=m CONFIG_VIDEO_OV7251=m CONFIG_VIDEO_OV7640=m CONFIG_VIDEO_OV9282=m +CONFIG_VIDEO_VD55G1=m +CONFIG_VIDEO_VD56G3=m CONFIG_VIDEO_AD5398=m CONFIG_VIDEO_AK7375=m CONFIG_VIDEO_BU64754=m diff --git a/arch/arm64/configs/bcm2712_defconfig b/arch/arm64/configs/bcm2712_defconfig index f7cc92bc896a26..83f19523b6cb40 100644 --- a/arch/arm64/configs/bcm2712_defconfig +++ b/arch/arm64/configs/bcm2712_defconfig @@ -1049,6 +1049,8 @@ CONFIG_VIDEO_OV64A40=m CONFIG_VIDEO_OV7251=m CONFIG_VIDEO_OV7640=m CONFIG_VIDEO_OV9282=m +CONFIG_VIDEO_VD55G1=m +CONFIG_VIDEO_VD56G3=m CONFIG_VIDEO_AD5398=m CONFIG_VIDEO_AK7375=m CONFIG_VIDEO_BU64754=m