Skip to content

Commit 1e2aa1b

Browse files
Leo-PLnxpfrankli
authored andcommitted
ARM: dts: imx7d-pico-pi: add OV5645 camera support
Add OV5645 camera device node and enable relevant components in the video capture data path, so output stream can be captured, and the camera itself can be controlled over I2C bus. This is roughly based on descriptions found in downstream kernel tree [1], adapted to match upstream bindings. Link: https://github.com/technexion-android/kernel_imx/blob/ce8fd74abf518dac0a09e8dcb37f3496f6375124/arch/arm/boot/dts/imx7d-pico.dtsi#L874 [1] Signed-off-by: Lech Perczak <lech.perczak@gmail.com> Signed-off-by: Frank Li <Frank.Li@nxp.com>
1 parent e653226 commit 1e2aa1b

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

arch/arm/boot/dts/nxp/imx/imx7d-pico-pi.dts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
};
2020
};
2121

22+
reg_1p5v: regulator-1p5v {
23+
compatible = "regulator-fixed";
24+
regulator-name = "1P5V";
25+
regulator-min-microvolt = <1500000>;
26+
regulator-max-microvolt = <1500000>;
27+
};
28+
2229
sound {
2330
compatible = "simple-audio-card";
2431
simple-audio-card,name = "imx7-sgtl5000";
@@ -59,6 +66,33 @@
5966
touchscreen-size-x = <800>;
6067
touchscreen-size-y = <480>;
6168
};
69+
70+
camera@3c {
71+
compatible = "ovti,ov5645";
72+
reg = <0x3c>;
73+
74+
pinctrl-names = "default";
75+
pinctrl-0 = <&pinctrl_camera>;
76+
77+
clocks = <&clks IMX7D_CLKO1_ROOT_DIV>;
78+
assigned-clocks = <&clks IMX7D_CLKO1_ROOT_DIV>;
79+
assigned-clock-rates = <24000000>;
80+
81+
enable-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
82+
reset-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
83+
84+
vdda-supply = <&reg_2p5v>;
85+
vdddo-supply = <&reg_vref_1v8>;
86+
vddd-supply = <&reg_1p5v>;
87+
88+
port {
89+
ov5645_to_mipi_csi2: endpoint {
90+
remote-endpoint = <&mipi_csi2_in>;
91+
clock-lanes = <0>;
92+
data-lanes = <1 2>;
93+
};
94+
};
95+
};
6296
};
6397

6498
&usdhc1 {
@@ -93,5 +127,37 @@
93127
MX7D_PAD_EPDC_DATA13__GPIO2_IO13 0x14
94128
>;
95129
};
130+
};
131+
132+
&iomuxc_lpsr {
133+
pinctrl_camera: cameragrp {
134+
fsl,pins = <
135+
MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4 0x15
136+
MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x15
137+
MX7D_PAD_LPSR_GPIO1_IO02__CCM_CLKO1 0x7d
138+
>;
139+
};
140+
};
141+
142+
&csi {
143+
status = "okay";
144+
};
145+
146+
&mipi_csi {
147+
status = "okay";
148+
149+
ports {
150+
port@0 {
151+
reg = <0>;
152+
153+
mipi_csi2_in: endpoint {
154+
remote-endpoint = <&ov5645_to_mipi_csi2>;
155+
data-lanes = <1 2>;
156+
};
157+
};
158+
};
159+
};
96160

161+
&video_mux {
162+
status = "okay";
97163
};

0 commit comments

Comments
 (0)