Skip to content

Commit 61e2341

Browse files
topdjgodjamess-huang
authored andcommitted
Support camera switch for imx219 and ov5647 by dts overlay
Change-Id: I08a0a7bcd3e01274ba29eec45ea1d33e51a5875a Reviewed-on: https://tp-biosrd-v02/gerrit/82420 Reviewed-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com> Tested-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com>
1 parent 30a8401 commit 61e2341

3 files changed

Lines changed: 67 additions & 3 deletions

File tree

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
2121
lirc-toshiba.dtbo \
2222
mcp2515-can0.dtbo \
2323
googlevoicehat-soundcard.dtbo \
24+
camera-ov5647.dtbo
2425

2526

2627
targets += dtbs dtbs_install
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Definitions for ds1307
2+
/dts-v1/;
3+
/plugin/;
4+
5+
/ {
6+
compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
7+
8+
fragment@0 {
9+
target = <&i2c2>;
10+
__overlay__ {
11+
12+
camera0: ov5647@36 {
13+
compatible = "ovti,ov5647";
14+
reg = <0x36>;
15+
clocks = <&ext_cam_clk>;
16+
status = "okay";
17+
18+
port {
19+
ov5647_out: endpoint {
20+
remote-endpoint = <&mipi_dphy_in>;
21+
data-lanes = <1 2>;
22+
};
23+
};
24+
};
25+
26+
camera1: imx219@10 {
27+
compatible = "sony,imx219";
28+
reg = <0x10>;
29+
clocks = <&ext_cam_clk>;
30+
status = "disabled";
31+
port {
32+
imx219_out: endpoint {
33+
remote-endpoint;
34+
data-lanes = <1 2>;
35+
};
36+
};
37+
};
38+
39+
};
40+
};
41+
42+
fragment@1 {
43+
target = <&mipi_phy_rx0>;
44+
__overlay__ {
45+
ports {
46+
#address-cells = <1>;
47+
#size-cells = <0>;
48+
49+
port@0 {
50+
reg = <0>;
51+
52+
mipi_dphy_in: endpoint {
53+
remote-endpoint = <&ov5647_out>;
54+
data-lanes = <1 2>;
55+
};
56+
};
57+
};
58+
};
59+
};
60+
};

arch/arm/boot/dts/rk3288-miniarm.dts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,17 +532,20 @@
532532
reg = <0x36>;
533533
clocks = <&ext_cam_clk>;
534534
status = "disabled";
535+
port {
536+
ov5647_out: endpoint {
537+
};
538+
};
535539
};
536540

537541
camera1: imx219@10 {
538542
compatible = "sony,imx219";
539543
reg = <0x10>;
540544
clocks = <&ext_cam_clk>;
541545
status = "okay";
542-
543546
port {
544547
imx219_out: endpoint {
545-
remote-endpoint = <&imx219_in>;
548+
remote-endpoint = <&mipi_dphy_in>;
546549
data-lanes = <1 2>;
547550
};
548551
};
@@ -597,7 +600,7 @@
597600
port@0 {
598601
reg = <0>;
599602

600-
imx219_in: endpoint {
603+
mipi_dphy_in: endpoint {
601604
remote-endpoint = <&imx219_out>;
602605
data-lanes = <1 2>;
603606
};

0 commit comments

Comments
 (0)