Skip to content

Commit c8145eb

Browse files
committed
dtoverlays: Add overlay for the Sony IMX283 Camera
This supports the OneInchEye with a 24MHz crystal INCK. Use the option 'cam0' to connect this to the CAM/DISP 0 port on Raspberry Pi 5. Use the clock-frequency=<value> option if you have a camera module with a different inclk frequency: For example: dtoverlay=imx283,cam0,clock-frequency=12000000 Signed-off-by: Kieran Bingham <[email protected]>
1 parent 1ec873f commit c8145eb

File tree

4 files changed

+142
-0
lines changed

4 files changed

+142
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
134134
ilitek251x.dtbo \
135135
imx219.dtbo \
136136
imx258.dtbo \
137+
imx283.dtbo \
137138
imx290.dtbo \
138139
imx296.dtbo \
139140
imx327.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,6 +2778,29 @@ Params: rotation Mounting rotation of the camera sensor (0 or
27782778
Module (1, 3, 4, or 5) or Pi 5.
27792779

27802780

2781+
Name: imx283
2782+
Info: Sony IMX283 camera module.
2783+
Uses Unicam 1, which is the standard camera connector on most Pi
2784+
variants. This sensor only supports 4 lane operation and therefore
2785+
requires a Compute Module (1, 3, 4, or 5) or Pi 5.
2786+
Load: dtoverlay=imx283,<param>=<val>
2787+
Params: rotation Mounting rotation of the camera sensor (0 or
2788+
180, default 180)
2789+
orientation Sensor orientation (0 = front, 1 = rear,
2790+
2 = external, default external)
2791+
clock-frequency Sets the clock frequency to match that used on
2792+
the board.
2793+
Known tested values include 24MHz (the default)
2794+
and 12MHz.
2795+
link-frequency Allowable link frequency values to use in Hz:
2796+
720000000 (default), 360000000.
2797+
media-controller Configure use of Media Controller API for
2798+
configuring the sensor (default on)
2799+
cam0 Adopt the default configuration for CAM0 on a
2800+
Compute Module or Pi5 (CSI0, i2c_vc, and
2801+
cam0_reg).
2802+
2803+
27812804
Name: imx290
27822805
Info: Sony IMX290 camera module.
27832806
Uses Unicam 1, which is the standard camera connector on most Pi
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
// Definitions for IMX283 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 = <200000>;
37+
off-on-delay-us = <30000>;
38+
regulator-min-microvolt = <2900000>;
39+
regulator-max-microvolt = <2900000>;
40+
};
41+
};
42+
43+
i2c_frag: fragment@100 {
44+
target = <&i2c_csi_dsi>;
45+
__overlay__ {
46+
#address-cells = <1>;
47+
#size-cells = <0>;
48+
status = "okay";
49+
50+
#include "imx283.dtsi"
51+
};
52+
};
53+
54+
csi_frag: fragment@101 {
55+
target = <&csi1>;
56+
csi: __overlay__ {
57+
status = "okay";
58+
brcm,media-controller;
59+
60+
port {
61+
csi_ep: endpoint {
62+
remote-endpoint = <&cam_endpoint>;
63+
clock-lanes = <0>;
64+
data-lanes = <1 2 3 4>;
65+
clock-noncontinuous;
66+
};
67+
};
68+
};
69+
};
70+
71+
__overrides__ {
72+
clock-frequency = <&cam_clk>,"clock-frequency:0";
73+
rotation = <&cam_node>,"rotation:0";
74+
orientation = <&cam_node>,"orientation:0";
75+
media-controller = <&csi>,"brcm,media-controller?";
76+
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
77+
<&csi_frag>, "target:0=",<&csi0>,
78+
<&clk_frag>, "target:0=",<&cam0_clk>,
79+
<&reg_frag>, "target:0=",<&cam0_reg>,
80+
<&cam_node>, "clocks:0=",<&cam0_clk>,
81+
<&cam_node>, "vadd-supply:0=",<&cam0_reg>;
82+
link-frequency = <&cam_endpoint>,"link-frequencies#0";
83+
};
84+
};
85+
86+
&cam_node {
87+
status = "okay";
88+
};
89+
90+
&cam_endpoint {
91+
remote-endpoint = <&csi_ep>;
92+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Fragment that configures a Sony IMX283
2+
3+
cam_node: imx283@1a {
4+
compatible = "sony,imx283";
5+
reg = <0x1a>;
6+
status = "disabled";
7+
8+
clocks = <&cam1_clk>;
9+
clock-names = "xclk";
10+
11+
vadd-supply = <&cam1_reg>; /* Analog power supply (2.9v) */
12+
vdd1-supply = <&cam_dummy_reg>; /* Interface power supply (1.8V) */
13+
vdd2-supply = <&cam_dummy_reg>; /* Digital power supply (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 3 4>;
22+
clock-noncontinuous;
23+
link-frequencies = /bits/ 64 <720000000>;
24+
};
25+
};
26+
};

0 commit comments

Comments
 (0)