Skip to content

Commit 9cdec2e

Browse files
author
philippe baetens
committed
dtoverlays: Add overlay for ams Mira220 image sensor
Adds an overlay for the Mira220 1600x1400 global shutter image sensor Signed-off-by: philippe baetens <[email protected]>
1 parent 79686bb commit 9cdec2e

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
@@ -186,6 +186,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
186186
minipitft13.dtbo \
187187
miniuart-bt.dtbo \
188188
mipi-dbi-spi.dtbo \
189+
mira220.dtbo \
189190
mlx90640.dtbo \
190191
mmc.dtbo \
191192
mz61581.dtbo \

arch/arm/boot/dts/overlays/README

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

35133513

3514+
Name: mira220
3515+
Info: ams mira220 camera module.
3516+
Uses Unicam 1, which is the standard camera connector on most Pi
3517+
variants.
3518+
Load: dtoverlay=mira220,<param>=<val>
3519+
Params: rotation Mounting rotation of the camera sensor (0 or
3520+
180, default 0)
3521+
orientation Sensor orientation (0 = front, 1 = rear,
3522+
2 = external, default external)
3523+
media-controller Configure use of Media Controller API for
3524+
configuring the sensor (default on)
3525+
cam0 Adopt the default configuration for CAM0 on a
3526+
Compute Module (CSI0, i2c_vc, and cam0_reg).
3527+
3528+
35143529
Name: mlx90640
35153530
Info: Overlay for i2c connected mlx90640 thermal camera
35163531
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)