-
Notifications
You must be signed in to change notification settings - Fork 0
/
all-h3-cc-opi-ov5640.dts
101 lines (89 loc) · 2.34 KB
/
all-h3-cc-opi-ov5640.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
//
// Copyright (C) 2018 Chen-Yu Tsai <[email protected]>
//
// Orangepi camera module with sensor swapped out for OV5640
#ifdef __DTO_TEST__
#include <arm/sun8i-h3-libretech-all-h3-cc.dts>
#else
/dts-v1/;
/plugin/;
#endif
#include <dt-bindings/clock/sun8i-h3-ccu.h>
#include <dt-bindings/gpio/gpio.h>
&{/} {
reg_cam_avdd: cam-avdd {
compatible = "regulator-fixed";
regulator-name = "csi-avdd";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
startup-delay-us = <200>; /* 50 us + board delays */
enable-active-high;
gpio = <&r_pio 0 0 GPIO_ACTIVE_HIGH>; /* PL0 */
};
reg_cam_dovdd: cam-dovdd {
compatible = "regulator-fixed";
regulator-name = "csi-dovdd";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
startup-delay-us = <200>; /* 50 us + board delays */
enable-active-high;
gpio = <&r_pio 0 0 GPIO_ACTIVE_HIGH>; /* PL0 */
};
reg_cam_dvdd: cam-dvdd {
compatible = "regulator-fixed";
regulator-name = "csi-dvdd";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
startup-delay-us = <200>; /* 50 us + board delays */
enable-active-high;
gpio = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
};
};
&csi {
status = "okay";
port {
/* Parallel bus endpoint */
csi_from_ov5640: endpoint {
remote-endpoint = <&ov5640_to_csi>;
bus-width = <8>;
hsync-active = <1>; /* Active high */
vsync-active = <0>; /* Active low */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};
&i2c2 {
status = "okay";
ov5640: camera@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
pinctrl-names = "default";
pinctrl-0 = <&csi_mclk_pin>;
clocks = <&ccu CLK_CSI_MCLK>;
clock-names = "xclk";
powerdown-gpios = <&pio 4 14 GPIO_ACTIVE_HIGH>; /* PE14 */
reset-gpios = <&pio 4 15 GPIO_ACTIVE_LOW>; /* PE15 */
AVDD-supply = <®_cam_avdd>;
DOVDD-supply = <®_cam_dovdd>;
DVDD-supply = <®_cam_dvdd>;
port {
ov5640_to_csi: endpoint {
remote-endpoint = <&csi_from_ov5640>;
bus-width = <8>;
data-shift = <2>;
hsync-active = <1>; /* Active high */
vsync-active = <0>; /* Active low */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};
};
&pio {
csi_mclk_pin: csi-mclk {
pins = "PE1";
function = "csi";
};
};