mirror of
https://github.com/CopterExpress/clover.git
synced 2026-06-09 11:04:31 +00:00
image: build overlay for OV7251 camera on CAM0
This commit is contained in:
111
builder/assets/ov7251cam0-overlay.dts
Normal file
111
builder/assets/ov7251cam0-overlay.dts
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
// Definitions for OV7251 camera module on VC I2C bus
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
|
||||||
|
//#include <dt-bindings/gpio/gpio.h>
|
||||||
|
|
||||||
|
/{
|
||||||
|
compatible = "brcm,bcm2835";
|
||||||
|
|
||||||
|
fragment@0 {
|
||||||
|
target = <&i2c_vc>;
|
||||||
|
__overlay__ {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
ov7251: ov7251@60 {
|
||||||
|
compatible = "ovti,ov7251";
|
||||||
|
reg = <0x60>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
clocks = <&ov7251_clk>;
|
||||||
|
clock-names = "xclk";
|
||||||
|
clock-frequency = <24000000>;
|
||||||
|
|
||||||
|
vdddo-supply = <&ov7251_dovdd>;
|
||||||
|
vdda-supply = <&ov7251_avdd>;
|
||||||
|
vddd-supply = <&ov7251_dvdd>;
|
||||||
|
|
||||||
|
enable-gpios = <&gpio 41 0>;
|
||||||
|
|
||||||
|
port {
|
||||||
|
ov7251_0: endpoint {
|
||||||
|
remote-endpoint = <&csi0_ep>;
|
||||||
|
clock-lanes = <0>;
|
||||||
|
data-lanes = <1>;
|
||||||
|
clock-noncontinuous;
|
||||||
|
link-frequencies =
|
||||||
|
/bits/ 64 <456000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@1 {
|
||||||
|
target = <&csi0>;
|
||||||
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
port {
|
||||||
|
csi0_ep: endpoint {
|
||||||
|
remote-endpoint = <&ov7251_0>;
|
||||||
|
data-lanes = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@2 {
|
||||||
|
target = <&i2c0if>;
|
||||||
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@3 {
|
||||||
|
target-path="/";
|
||||||
|
__overlay__ {
|
||||||
|
ov7251_avdd: fixedregulator@0 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "ov7251_avdd";
|
||||||
|
regulator-min-microvolt = <2800000>;
|
||||||
|
regulator-max-microvolt = <2800000>;
|
||||||
|
};
|
||||||
|
ov7251_dovdd: fixedregulator@1 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "ov7251_dovdd";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
};
|
||||||
|
ov7251_dvdd: fixedregulator@2 {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "ov7251_dvdd";
|
||||||
|
regulator-min-microvolt = <1200000>;
|
||||||
|
regulator-max-microvolt = <1200000>;
|
||||||
|
};
|
||||||
|
ov7251_clk: ov7251-clk {
|
||||||
|
compatible = "fixed-clock";
|
||||||
|
#clock-cells = <0>;
|
||||||
|
clock-frequency = <24000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@4 {
|
||||||
|
target = <&i2c0mux>;
|
||||||
|
__overlay__ {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@5 {
|
||||||
|
target-path="/__overrides__";
|
||||||
|
__overlay__ {
|
||||||
|
cam0-pwdn-ctrl = <&ov7251>,"enable-gpios:0";
|
||||||
|
cam0-pwdn = <&ov7251>,"enable-gpios:4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
echo "Build overlay for OV7251 camera on CAM0"
|
||||||
|
|
||||||
|
dtc -I dts -O dtb -o /boot/overlays/ov7251cam0.dtbo /home/pi/catkin_ws/src/clover/builder/assets/ov7251cam0-overlay.dts
|
||||||
|
|||||||
Reference in New Issue
Block a user