Skip to content

Commit 47323ae

Browse files
philippe baetenspelwell
authored andcommitted
dtoverlays: Add overlay for ams Mira220 image sensor
Adds an overlay for the Mira220 1600x1400 global shutter image sensor Signed-off-by: philippe baetens <philippe.baetens@ams-osram.com>
1 parent 6a53eb8 commit 47323ae

File tree

4 files changed

+130
-0
lines changed

4 files changed

+130
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
187187
minipitft13.dtbo \
188188
miniuart-bt.dtbo \
189189
mipi-dbi-spi.dtbo \
190+
mira220.dtbo \
190191
mlx90640.dtbo \
191192
mmc.dtbo \
192193
mz61581.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,6 +3552,21 @@ Params:
35523552
(default 16).
35533553

35543554

3555+
Name: mira220
3556+
Info: ams mira220 camera module.
3557+
Uses Unicam 1, which is the standard camera connector on most Pi
3558+
variants.
3559+
Load: dtoverlay=mira220,<param>=<val>
3560+
Params: rotation Mounting rotation of the camera sensor (0 or
3561+
180, default 0)
3562+
orientation Sensor orientation (0 = front, 1 = rear,
3563+
2 = external, default external)
3564+
media-controller Configure use of Media Controller API for
3565+
configuring the sensor (default on)
3566+
cam0 Adopt the default configuration for CAM0 on a
3567+
Compute Module (CSI0, i2c_vc, and cam0_reg).
3568+
3569+
35553570
Name: mlx90640
35563571
Info: Overlay for i2c connected mlx90640 thermal camera
35573572
Load: dtoverlay=mlx90640
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
// Definitions for MIRA220 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 = <38400000>;
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 "mira220.dtsi"
41+
42+
};
43+
};
44+
45+
csi_frag: fragment@101 {
46+
target = <&csi1>;
47+
csi: __overlay__ {
48+
status = "okay";
49+
50+
port {
51+
csi_ep: endpoint {
52+
remote-endpoint = <&cam_endpoint>;
53+
clock-lanes = <0>;
54+
data-lanes = <1 2>;
55+
// clock-noncontinuous; // mira220 use cont clk
56+
};
57+
};
58+
};
59+
};
60+
61+
fragment@102 {
62+
target = <&csi1>;
63+
__dormant__ {
64+
compatible = "brcm,bcm2835-unicam-legacy";
65+
};
66+
};
67+
68+
69+
__overrides__ {
70+
rotation = <&cam_node>,"rotation:0";
71+
orientation = <&cam_node>,"orientation:0";
72+
media-controller = <0>,"!102";
73+
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
74+
<&csi_frag>, "target:0=",<&csi0>,
75+
<&clk_frag>, "target:0=",<&cam0_clk>,
76+
<&cam_node>, "clocks:0=",<&cam0_clk>,
77+
<&cam_node>, "vana-supply:0=",<&cam0_reg>;
78+
};
79+
};
80+
81+
&cam_node {
82+
status = "okay";
83+
};
84+
85+
&cam_endpoint {
86+
remote-endpoint = <&csi_ep>;
87+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Fragment that configures an mira220
2+
3+
cam_node: mira220@10 {
4+
compatible = "ams,mira220";
5+
reg = <0x54>;
6+
status = "disabled";
7+
8+
clocks = <&cam1_clk>;
9+
clock-names = "xclk";
10+
11+
vana-supply = <&cam1_reg>; /* 2.8v */
12+
vdig-supply = <&cam_dummy_reg>; /* 1.8v */
13+
vddl-supply = <&cam_dummy_reg>; /* 1.2v */
14+
15+
rotation = <0>;
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 <750000000>;
25+
};
26+
};
27+
};

0 commit comments

Comments
 (0)