Skip to content

Commit 2128203

Browse files
6by9popcornmix
authored andcommitted
dtoverlays: Add overlay for Sony IMX415 image sensor
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 1ceaf0e commit 2128203

File tree

4 files changed

+175
-0
lines changed

4 files changed

+175
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
137137
imx296.dtbo \
138138
imx327.dtbo \
139139
imx378.dtbo \
140+
imx415.dtbo \
140141
imx462.dtbo \
141142
imx477.dtbo \
142143
imx500.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2897,6 +2897,37 @@ Params: rotation Mounting rotation of the camera sensor (0 or
28972897
450000000 (default), 453000000, 456000000.
28982898

28992899

2900+
Name: imx415
2901+
Info: Sony IMX415 camera module.
2902+
Uses Unicam 1, which is the standard camera connector on most Pi
2903+
variants. By default this uses 4 CSI2 data lanes, so requires a
2904+
Compute Module or Pi5.
2905+
Load: dtoverlay=imx415,<param>
2906+
Params: addr Set I2C address of sensor. Valid values are
2907+
0x10, 0x1a, 0x36 and 0x37. Default is 0x37.
2908+
4lane Enable 4 CSI2 data lanes.
2909+
clock-frequency Sets the clock frequency to match that used on
2910+
the board.
2911+
Valid values are 24, 27, 37.125, 72, or
2912+
74.25MHz.
2913+
The default is 24MHz.
2914+
Note that the link frequencies permitted vary
2915+
based on the oscillator used.
2916+
link-frequency Confgures the link frequency to be used. Note
2917+
that the permitted values vary based on
2918+
clock-frequency and number of lanes.
2919+
The default is 360MHz for 720Mbit/s.
2920+
orientation Sensor orientation (0 = front, 1 = rear,
2921+
2 = external, default external)
2922+
rotation Mounting rotation of the camera sensor (0 or
2923+
180, default 0)
2924+
media-controller Configure use of Media Controller API for
2925+
configuring the sensor (default on)
2926+
cam0 Adopt the default configuration for CAM0 on a
2927+
Compute Module (CSI0, i2c_vc, and cam0_reg).
2928+
vcm Enable ad5398 VCM associated with the sensor.
2929+
2930+
29002931
Name: imx462
29012932
Info: Sony IMX462 camera module.
29022933
Uses Unicam 1, which is the standard camera connector on most Pi
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
// Definitions for IMX415 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+
cam_clk: __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+
reg_frag: fragment@3 {
34+
target = <&cam1_reg>;
35+
cam_reg: __overlay__ {
36+
startup-delay-us = <100000>;
37+
};
38+
};
39+
40+
i2c_frag: fragment@100 {
41+
target = <&i2c_csi_dsi>;
42+
__overlay__ {
43+
#address-cells = <1>;
44+
#size-cells = <0>;
45+
status = "okay";
46+
47+
#include "imx415.dtsi"
48+
49+
vcm: ad5398@c {
50+
compatible = "adi,ad5398";
51+
reg = <0x0c>;
52+
status = "disabled";
53+
VANA-supply = <&cam1_reg>;
54+
};
55+
};
56+
};
57+
58+
csi_frag: fragment@101 {
59+
target = <&csi1>;
60+
csi: __overlay__ {
61+
status = "okay";
62+
brcm,media-controller;
63+
64+
port {
65+
csi_ep: endpoint {
66+
remote-endpoint = <&cam_endpoint>;
67+
clock-lanes = <0>;
68+
data-lanes = <1 2>;
69+
clock-noncontinuous;
70+
};
71+
};
72+
};
73+
};
74+
75+
fragment@201 {
76+
target = <&cam_endpoint>;
77+
__dormant__ {
78+
data-lanes = <1 2 3 4>;
79+
};
80+
};
81+
82+
fragment@202 {
83+
target = <&csi_ep>;
84+
__dormant__ {
85+
data-lanes = <1 2 3 4>;
86+
};
87+
};
88+
89+
90+
__overrides__ {
91+
addr = <&cam_node>, "reg:0";
92+
rotation = <&cam_node>,"rotation:0";
93+
orientation = <&cam_node>,"orientation:0";
94+
media-controller = <&csi>,"brcm,media-controller?";
95+
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
96+
<&csi_frag>, "target:0=",<&csi0>,
97+
<&reg_frag>, "target:0=",<&cam0_reg>,
98+
<&clk_frag>, "target:0=",<&cam0_clk>,
99+
<&cam_node>, "clocks:0=",<&cam0_clk>,
100+
<&cam_node>, "avdd-supply:0=",<&cam0_reg>,
101+
<&vcm>, "VANA-supply:0=", <&cam0_reg>;
102+
vcm = <&vcm>, "status=okay",
103+
<&cam_node>,"lens-focus:0=", <&vcm>;
104+
clock-frequency = <&cam_clk>, "clock-frequency:0";
105+
link-frequency = <&cam_endpoint>,"link-frequencies#0";
106+
4lane = <0>, "+201+202";
107+
};
108+
};
109+
110+
&cam_node {
111+
status = "okay";
112+
};
113+
114+
&cam_endpoint {
115+
remote-endpoint = <&csi_ep>;
116+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Fragment that configures an imx415
2+
3+
cam_node: imx415@37 {
4+
compatible = "sony,imx415";
5+
reg = <0x37>;
6+
status = "disabled";
7+
8+
clocks = <&cam1_clk>;
9+
clock-names = "inck";
10+
11+
avdd-supply = <&cam1_reg>; /* 2.8v */
12+
dvdd-supply = <&cam_dummy_reg>; /* 1.8v */
13+
ovdd-supply = <&cam_dummy_reg>; /* 1.2v */
14+
15+
rotation = <180>;
16+
orientation = <2>;
17+
18+
port {
19+
cam_endpoint: endpoint {
20+
clock-lanes = <0>;
21+
data-lanes = <1 2>;
22+
//clock-noncontinuous;
23+
link-frequencies =
24+
/bits/ 64 <360000000>;
25+
};
26+
};
27+
};

0 commit comments

Comments
 (0)