Skip to content

Commit 861bfb8

Browse files
committed
dtoverlays: Add overlay for IMX662
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 6b195ad commit 861bfb8

File tree

4 files changed

+164
-0
lines changed

4 files changed

+164
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
149149
imx500.dtbo \
150150
imx500-pi5.dtbo \
151151
imx519.dtbo \
152+
imx662.dtbo \
152153
imx708.dtbo \
153154
interludeaudio-analog.dtbo \
154155
interludeaudio-digital.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,6 +3097,27 @@ Params: rotation Mounting rotation of the camera sensor (0 or
30973097
but vcm=off will disable.
30983098

30993099

3100+
Name: imx290
3101+
Info: Sony IMX662 camera module.
3102+
Uses Unicam 1, which is the standard camera connector on most Pi
3103+
variants.
3104+
Load: dtoverlay=imx662,<param>
3105+
Params: 4lane Enable 4 CSI2 lanes. This requires a Compute
3106+
Module (1, 3, 4, or 5) or Pi 5.
3107+
clock-frequency Sets the clock frequency to match that used on
3108+
the board. Default 24MHz
3109+
mono Denote that the module is a mono sensor.
3110+
orientation Sensor orientation (0 = front, 1 = rear,
3111+
2 = external, default external)
3112+
rotation Mounting rotation of the camera sensor (0 or
3113+
180, default 0)
3114+
media-controller Configure use of Media Controller API for
3115+
configuring the sensor (default on)
3116+
cam0 Adopt the default configuration for CAM0 on a
3117+
Compute Module (CSI0, i2c_vc, and cam0_reg).
3118+
vcm Enable a VCM focus drive on the sensor.
3119+
3120+
31003121
Name: imx708
31013122
Info: Sony IMX708 camera module.
31023123
Uses Unicam 1, which is the standard camera connector on most Pi
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
// Definitions for IMX662 camera module on VC I2C bus
3+
/dts-v1/;
4+
/plugin/;
5+
6+
#include <dt-bindings/gpio/gpio.h>
7+
8+
/{
9+
compatible = "brcm,bcm2835";
10+
11+
fragment@0 {
12+
target = <&i2c0if>;
13+
__overlay__ {
14+
status = "okay";
15+
};
16+
};
17+
18+
clk_frag: fragment@1 {
19+
target = <&cam1_clk>;
20+
__overlay__ {
21+
status = "okay";
22+
clock-frequency = <24000000>;
23+
};
24+
};
25+
26+
fragment@2 {
27+
target = <&i2c0mux>;
28+
__overlay__ {
29+
status = "okay";
30+
};
31+
};
32+
33+
i2c_frag: fragment@100 {
34+
target = <&i2c_csi_dsi>;
35+
__overlay__ {
36+
#address-cells = <1>;
37+
#size-cells = <0>;
38+
status = "okay";
39+
40+
#include "imx662.dtsi"
41+
42+
vcm: ad5398@c {
43+
compatible = "adi,ad5398";
44+
reg = <0x0c>;
45+
status = "disabled";
46+
VANA-supply = <&cam1_reg>;
47+
};
48+
};
49+
};
50+
51+
csi_frag: fragment@101 {
52+
target = <&csi1>;
53+
csi: __overlay__ {
54+
status = "okay";
55+
56+
port {
57+
csi_ep: endpoint {
58+
remote-endpoint = <&cam_endpoint>;
59+
clock-lanes = <0>;
60+
data-lanes = <1 2>;
61+
clock-noncontinuous;
62+
};
63+
};
64+
};
65+
};
66+
67+
fragment@102 {
68+
target = <&csi1>;
69+
__dormant__ {
70+
compatible = "brcm,bcm2835-unicam-legacy";
71+
};
72+
};
73+
74+
fragment@201 {
75+
target = <&csi_ep>;
76+
__dormant__ {
77+
data-lanes = <1 2 3 4>;
78+
};
79+
};
80+
81+
fragment@202 {
82+
target = <&cam_endpoint>;
83+
__dormant__ {
84+
data-lanes = <1 2 3 4>;
85+
link-frequencies =
86+
/bits/ 64 <297000000>;
87+
};
88+
};
89+
90+
__overrides__ {
91+
rotation = <&cam_node>,"rotation:0";
92+
orientation = <&cam_node>,"orientation:0";
93+
media-controller = <0>,"!102";
94+
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
95+
<&csi_frag>, "target:0=",<&csi0>,
96+
<&clk_frag>, "target:0=",<&cam0_clk>,
97+
<&cam_node>, "clocks:0=",<&cam0_clk>,
98+
<&cam_node>, "VANA-supply:0=",<&cam0_reg>,
99+
<&vcm>, "VANA-supply:0=", <&cam0_reg>;
100+
vcm = <&vcm>, "status=okay",
101+
<&cam_node>,"lens-focus:0=", <&vcm>;
102+
4lane = <0>, "+201+202";
103+
clock-frequency = <&clk_frag>,"clock-frequency:0",
104+
<&cam_node>,"clock-frequency:0";
105+
};
106+
};
107+
108+
&cam_node {
109+
status = "okay";
110+
};
111+
112+
&cam_endpoint {
113+
remote-endpoint = <&csi_ep>;
114+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Fragment that configures an imx662
2+
3+
cam_node: imx662@10 {
4+
compatible = "sony,imx662aaqr";
5+
reg = <0x1a>;
6+
status = "disabled";
7+
8+
clocks = <&cam1_clk>;
9+
clock-names = "xclk";
10+
clock-frequency = <24000000>;
11+
12+
vdda-supply = <&cam1_reg>; /* 2.8v */
13+
vddd-supply = <&cam_dummy_reg>; /* 1.8v */
14+
vdddo-supply = <&cam_dummy_reg>;/* 1.2v */
15+
16+
rotation = <180>;
17+
orientation = <2>;
18+
19+
port {
20+
cam_endpoint: endpoint {
21+
clock-lanes = <0>;
22+
data-lanes = <1 2>;
23+
clock-noncontinuous;
24+
link-frequencies =
25+
/bits/ 64 <594000000>;
26+
};
27+
};
28+
};

0 commit comments

Comments
 (0)