Skip to content

Commit d8cf52a

Browse files
Cyrille PitchenCodrin Ciubotariu
authored andcommitted
ARM: at91/dt: sama5d4ek: add DT for ISI + ov2640
This patch adds the at91-sama5d4ek_isi.dtb device tree to use a sama5d4ek board with a ov2640 sensor contected to the ISI. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> (cherry picked from commit 25e5dc5) Signed-off-by: Razvan Stefanescu <razvan.stefanescu@microchip.com> [codrin.ciubotariu@microchip.com: moved to 5.4, changed clk phandle, fixed i2c slave address format] Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
1 parent 33b8c14 commit d8cf52a

2 files changed

Lines changed: 116 additions & 0 deletions

File tree

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
7171
at91-sama5d4_ma5d4evk.dtb \
7272
at91-sama5d4_xplained.dtb \
7373
at91-sama5d4ek.dtb \
74+
at91-sama5d4ek_isi.dtb \
7475
at91-vinco.dtb
7576
dtb-$(CONFIG_ARCH_ATLAS6) += \
7677
atlas6-evb.dtb
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* at91-sama5d4ek_isi.dts - Device Tree file for SAMA5D4 Evaluation Kit
3+
* with ov264x sensor
4+
*
5+
* Copyright (C) 2016 Atmel,
6+
* 2016 Cyrille Pitchen <cyrille.pitchen@atmel.com>
7+
*
8+
* This file is dual-licensed: you can use it either under the terms
9+
* of the GPL or the X11 license, at your option. Note that this dual
10+
* licensing only applies to this file, and not this project as a
11+
* whole.
12+
*
13+
* a) This file is free software; you can redistribute it and/or
14+
* modify it under the terms of the GNU General Public License as
15+
* published by the Free Software Foundation; either version 2 of the
16+
* License, or (at your option) any later version.
17+
*
18+
* This file is distributed in the hope that it will be useful,
19+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+
* GNU General Public License for more details.
22+
*
23+
* Or, alternatively,
24+
*
25+
* b) Permission is hereby granted, free of charge, to any person
26+
* obtaining a copy of this software and associated documentation
27+
* files (the "Software"), to deal in the Software without
28+
* restriction, including without limitation the rights to use,
29+
* copy, modify, merge, publish, distribute, sublicense, and/or
30+
* sell copies of the Software, and to permit persons to whom the
31+
* Software is furnished to do so, subject to the following
32+
* conditions:
33+
*
34+
* The above copyright notice and this permission notice shall be
35+
* included in all copies or substantial portions of the Software.
36+
*
37+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
42+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44+
* OTHER DEALINGS IN THE SOFTWARE.
45+
*/
46+
#include "at91-sama5d4ek.dts"
47+
48+
/ {
49+
ahb {
50+
apb {
51+
pinctrl@fc06a000 {
52+
board {
53+
pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 {
54+
atmel,pins =
55+
<AT91_PIOC 4 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PC4 periph C ISI_MCK */
56+
};
57+
58+
pinctrl_sensor_power: sensor_power {
59+
atmel,pins =
60+
<AT91_PIOB 5 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* PB5 gpio */
61+
};
62+
63+
pinctrl_sensor_reset: sensor_reset {
64+
atmel,pins =
65+
<AT91_PIOB 11 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* PB11 gpio */
66+
};
67+
};
68+
};
69+
};
70+
};
71+
};
72+
73+
&usart2 {
74+
status = "disabled";
75+
};
76+
77+
&spi0 {
78+
status = "disabled";
79+
};
80+
81+
&isi {
82+
status = "okay";
83+
84+
port {
85+
isi_0: endpoint@0 {
86+
remote-endpoint = <&ov2640_0>;
87+
bus-width = <8>;
88+
vsync-active = <1>;
89+
hsync-active = <1>;
90+
};
91+
};
92+
};
93+
94+
&i2c0 {
95+
ov2640: camera@30 {
96+
compatible = "ovti,ov2640";
97+
reg = <0x30>;
98+
pinctrl-names = "default";
99+
pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
100+
resetb-gpios = <&pioB 11 GPIO_ACTIVE_LOW>;
101+
pwdn-gpios = <&pioB 5 GPIO_ACTIVE_HIGH>;
102+
/* use pck1 for the master clock of ov2640 */
103+
clocks = <&pmc PMC_TYPE_SYSTEM 9>;
104+
clock-names = "xvclk";
105+
assigned-clocks = <&pmc PMC_TYPE_SYSTEM 9>;
106+
assigned-clock-rates = <25000000>;
107+
108+
port {
109+
ov2640_0: endpoint {
110+
remote-endpoint = <&isi_0>;
111+
bus-width = <8>;
112+
};
113+
};
114+
};
115+
};

0 commit comments

Comments
 (0)