-
Notifications
You must be signed in to change notification settings - Fork 0
/
bpi-m1p-bpi-camera-v1.dts
86 lines (76 loc) · 2 KB
/
bpi-m1p-bpi-camera-v1.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
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
//
// Copyright (C) 2018 Chen-Yu Tsai <[email protected]>
//
// Bananapi camera v1 module based on OV5640
#ifdef __DTO_TEST__
#include <arm/sun7i-a20-bananapi-m1-plus.dts>
#else
/dts-v1/;
/plugin/;
#endif
#include <dt-bindings/clock/sun4i-a10-ccu.h>
#include <dt-bindings/gpio/gpio.h>
&{/} {
reg_vcc_csi: vcc-csi {
compatible = "regulator-fixed";
regulator-name = "vcc-csi";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
startup-delay-us = <200>; /* 50 us + board delays */
enable-active-high;
gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
};
reg_vdd_csi: vdd-csi {
compatible = "regulator-fixed";
regulator-name = "vdd-csi";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <200>; /* 50 us + board delays */
enable-active-high;
gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
};
};
&csi0 {
pinctrl-names = "default";
pinctrl-0 = <&csi0_8bits_pins>;
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 = <1>; /* Active high */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};
&i2c1 {
status = "okay";
ov5640: camera@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
pinctrl-names = "default";
pinctrl-0 = <&csi0_clk_pin>;
clocks = <&ccu CLK_CSI0>;
clock-names = "xclk";
reset-gpios = <&pio 7 14 GPIO_ACTIVE_LOW>; /* PH14 */
powerdown-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
AVDD-supply = <®_vcc_csi>;
DOVDD-supply = <®_vcc_csi>;
DVDD-supply = <®_vdd_csi>;
port {
ov5640_to_csi: endpoint {
remote-endpoint = <&csi_from_ov5640>;
bus-width = <8>;
data-shift = <2>;
hsync-active = <1>; /* Active high */
vsync-active = <1>; /* Active high */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};
};