Skip to content

Commit 7d7f27b

Browse files
GateworksShawn Guo
authored and
Shawn Guo
committed
arm64: dts: imx8mp: add imx8mp-venice-gw74xx-imx219 overlay for rpi v2 camera
Add support for the RaspberryPi Camera v2 which is an IMX219 8MP module: - https://datasheets.raspberrypi.com/camera/camera-v2-schematics.pdf - has its own on-board 24MHz osc so no clock required from baseboard - pin 11 enables 1.8V and 2.8V LDO which is connected to GW74xx MIPI_GPIO4 (IMX8MP GPIO1_IO4) so we use this as a gpio Support is added via a device-tree overlay. The IMX219 supports RAW8/RAW10 image formats. Example configuration: media-ctl -l "'imx219 3-0010':0->'csis-32e40000.csi':0[1]" media-ctl -v -V "'imx219 3-0010':0 [fmt:SRGGB8/640x480 field:none]" media-ctl -v -V "'crossbar':0 [fmt:SRGGB8/640x480 field:none]" media-ctl -v -V "'mxc_isi.0':0 [fmt:SRGGB8/640x480 field:none]" v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=RGGB v4l2-ctl --stream-mmap --stream-to=frame.raw --stream-count=1 convert -size 640x480 -depth 8 gray:frame.raw frame.png gst-launch-1.0 v4l2src ! \ video/x-bayer,format=rggb,width=640,height=480,framerate=10/1 ! \ bayer2rgb ! fbdevsink Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent 5943de4 commit 7d7f27b

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

arch/arm64/boot/dts/freescale/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ imx8mm-venice-gw73xx-0x-rpidsi-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice
158158
imx8mm-venice-gw73xx-0x-rs232-rts-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-rs232-rts.dtbo
159159
imx8mm-venice-gw73xx-0x-rs422-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-rs422.dtbo
160160
imx8mm-venice-gw73xx-0x-rs485-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-rs485.dtbo
161+
imx8mp-venice-gw74xx-imx219-dtbs := imx8mp-venice-gw74xx.dtb imx8mp-venice-gw74xx-imx219.dtbo
161162
imx8mp-venice-gw74xx-rpidsi-dtbs := imx8mp-venice-gw74xx.dtb imx8mp-venice-gw74xx-rpidsi.dtbo
162163

163164
dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-imx219.dtb
@@ -170,6 +171,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rpidsi.dtb
170171
dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs232-rts.dtb
171172
dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs422.dtb
172173
dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs485.dtb
174+
dtb-$(CONFIG_ARCH_MXC) += imx8mp-venice-gw74xx-imx219.dtb
173175
dtb-$(CONFIG_ARCH_MXC) += imx8mp-venice-gw74xx-rpidsi.dtb
174176

175177
dtb-$(CONFIG_ARCH_S32) += s32g274a-evb.dtb
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright 2023 Gateworks Corporation
4+
*/
5+
6+
#include <dt-bindings/gpio/gpio.h>
7+
8+
#include "imx8mp-pinfunc.h"
9+
10+
/dts-v1/;
11+
/plugin/;
12+
13+
&{/} {
14+
compatible = "gw,imx8mp-gw74xx", "fsl,imx8mp";
15+
16+
reg_cam: regulator-cam {
17+
pinctrl-names = "default";
18+
pinctrl-0 = <&pinctrl_reg_cam>;
19+
compatible = "regulator-fixed";
20+
regulator-name = "reg_cam";
21+
gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
22+
enable-active-high;
23+
regulator-min-microvolt = <1800000>;
24+
regulator-max-microvolt = <1800000>;
25+
};
26+
27+
cam24m: cam24m {
28+
compatible = "fixed-clock";
29+
#clock-cells = <0>;
30+
clock-frequency = <24000000>;
31+
clock-output-names = "cam24m";
32+
};
33+
};
34+
35+
&i2c4 {
36+
#address-cells = <1>;
37+
#size-cells = <0>;
38+
39+
imx219: sensor@10 {
40+
compatible = "sony,imx219";
41+
reg = <0x10>;
42+
clocks = <&cam24m>;
43+
VDIG-supply = <&reg_cam>;
44+
45+
port {
46+
/* MIPI CSI-2 bus endpoint */
47+
imx219_to_mipi_csi2: endpoint {
48+
remote-endpoint = <&mipi_csi_0_in>;
49+
clock-lanes = <0>;
50+
data-lanes = <1 2>;
51+
link-frequencies = /bits/ 64 <456000000>;
52+
};
53+
};
54+
};
55+
};
56+
57+
&isi_0 {
58+
status = "okay";
59+
};
60+
61+
&mipi_csi_0 {
62+
status = "okay";
63+
64+
ports {
65+
port@0 {
66+
mipi_csi_0_in: endpoint {
67+
remote-endpoint = <&imx219_to_mipi_csi2>;
68+
data-lanes = <1 2>;
69+
};
70+
};
71+
};
72+
};
73+
74+
&iomuxc {
75+
pinctrl_reg_cam: regcamgrp {
76+
fsl,pins = <
77+
MX8MP_IOMUXC_GPIO1_IO04__GPIO1_IO04 0x41
78+
>;
79+
};
80+
};

0 commit comments

Comments
 (0)