]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blob - arch/arm/boot/dts/tegra124-platforms/tegra124-pm359-camera-a00.dtsi
Kernel: add ov4689 kernel driver
[sojka/nv-tegra/linux-3.10.git] / arch / arm / boot / dts / tegra124-platforms / tegra124-pm359-camera-a00.dtsi
1 /*
2  * arch/arm/boot/dts/tegra124-platforms/tegra124-pm359-camera-a00.dtsi
3  *
4  * Copyright (c) 2014-2015, NVIDIA CORPORATION.  All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  */
20
21 #include <dt-bindings/media/camera.h>
22
23 / {
24         camera-pcl {
25                 compatible = "nvidia,tegra124-camera", "simple-bus";
26                 configuration = <0xAA55AA55>;
27
28                 modules {
29                         module1: module1@modules {
30                                 /* Camera Module NVD9A951 */
31                                 compatible = "sensor,front";
32                                 badge_info = "pm359_erss_front_D9A951";
33
34                                 sensor {
35                                         profile = <&imx135_1>;
36                                         platformdata = "ardbeg_imx135_pdata";
37                                 };
38                                 focuser {
39                                         profile = <&dw9718_1>;
40                                         platformdata = "ardbeg_dw9718_pdata";
41                                 };
42                                 flash {
43                                         profile = <&as3648_1>;
44                                         platformdata = "ardbeg_as3648_pdata";
45                                 };
46                         };
47                         module2: module2@modules {
48                                 compatible = "sensor,front";
49                                 badge_info = "e1823_front_camera";
50
51                                 sensor {
52                                         profile = <&ar0261_1>;
53                                         platformdata = "ardbeg_ar0261_pdata";
54                                 };
55                         };
56                         module3: module3@modules {
57                                 compatible = "sensor,rear";
58                                 badge_info = "e1633_rear_camera";
59
60                                 sensor {
61                                         profile = <&ar0330_1>;
62                                         platformdata = "ardbeg_ar0330_pdata";
63                                 };
64                         };
65                         module4: module4@modules {
66                                 compatible = "sensor,front";
67                                 badge_info = "e1633_front_camera";
68
69                                 sensor {
70                                         profile = <&ar0330_2>;
71                                         platformdata = "ardbeg_ar0330_front_pdata";
72                                 };
73                         };
74                         module5: module5@modules {
75                                 compatible = "sensor,rear";
76                                 badge_info = "e1633_ov4689";
77
78                                 sensor {
79                                         profile = <&ov4689_1>;
80                                         platformdata = "ardbeg_ov4689_pdata";
81                                 };
82                         };
83                 };
84                 profiles {
85                         imx135_1: imx135@2_0010 {
86                                 index = <1>;
87                                 chipname = "pcl_IMX135";
88                                 type = "sensor";
89                                 guid = "s_IMX135";
90                                 position = <0>;
91                                 bustype = "i2c";
92                                 busnum = <2>;
93                                 addr = <0x10>;
94                                 datalen = <2>;
95                                 pinmuxgrp = <0xFFFF>;
96                                 gpios = <3>;
97                                 regulators = "vana", "vdig_lv", "vif";
98                                 clocks = "mclk";
99                                 drivername = "imx135";
100                                 detect = <0x0002 0x0016 0xFFFF 0x0135>;
101                                 devid = <0x0135>;
102                                 poweron = <
103                                         CAMERA_IND_CLK_SET(10000)
104                                         CAMERA_GPIO_CLR(221)
105                                         CAMERA_WAITUS(10)
106                                         CAMERA_REGULATOR_ON(2)
107                                         CAMERA_REGULATOR_ON(1)
108                                         CAMERA_REGULATOR_ON(0)
109                                         CAMERA_WAITMS(5)
110                                         CAMERA_GPIO_SET(221)
111                                         CAMERA_WAITUS(300)
112                                         CAMERA_END
113                                         >;
114                                 poweroff = <
115                                         CAMERA_IND_CLK_CLR
116                                         CAMERA_GPIO_CLR(221)
117                                         CAMERA_WAITUS(10)
118                                         CAMERA_REGULATOR_OFF(2)
119                                         CAMERA_REGULATOR_OFF(1)
120                                         CAMERA_REGULATOR_OFF(0)
121                                         CAMERA_END
122                                         >;
123                         };
124                         dw9718_1: dw9718@2_000c {
125                                 index = <2>;
126                                 chipname = "pcl_DW9718";
127                                 type = "focuser";
128                                 guid = "f_NVCAM0";
129                                 position = <0>;
130                                 bustype = "i2c";
131                                 busnum = <2>;
132                                 addr = <0xc>;
133                                 datalen = <1>;
134                                 pinmuxgrp = <0xFFFF>;
135                                 gpios = <3>;
136                                 regulators = "vdd", "vdd_i2c";
137                                 drivername = "dw9718";
138                                 detect = <0x0002 0x0004 0xFFFF 0x0060>;
139                                 devid = <0x9718>;
140                                 poweron = <
141                                         CAMERA_REGULATOR_ON(1)
142                                         CAMERA_REGULATOR_ON(0)
143                                         CAMERA_WAITUS(10)
144                                         CAMERA_GPIO_SET(223)
145                                         CAMERA_WAITUS(10)
146                                         CAMERA_END
147                                         >;
148                                 poweroff = <
149                                         CAMERA_REGULATOR_OFF(0)
150                                         CAMERA_REGULATOR_OFF(1)
151                                         CAMERA_GPIO_CLR(223)
152                                         CAMERA_WAITUS(10)
153                                         CAMERA_END
154                                         >;
155                         };
156                         as3648_1: as3648@2_0030 {
157                                 index = <6>;
158                                 chipname = "pcl_AS3648";
159                                 type = "flash";
160                                 guid = "l_NVCAM0";
161                                 position = <0>;
162                                 bustype = "i2c";
163                                 busnum = <2>;
164                                 addr = <0x30>;
165                                 datalen = <1>;
166                                 pinmuxgrp = <0xFFFF>;
167                                 gpios = <3>;
168                                 regulators = "vi2c", "vin";
169                                 drivername = "as3648";
170                                 detect = <0x0001 0x0000 0x00F0 0x00b0>;
171                                 devid = <0x3648>;
172                                 poweron = <
173                                         CAMERA_REGULATOR_ON(1)
174                                         CAMERA_REGULATOR_ON(0)
175                                         CAMERA_WAITUS(1000)
176                                         CAMERA_END
177                                         >;
178                                 poweroff = <
179                                         CAMERA_REGULATOR_OFF(0)
180                                         CAMERA_REGULATOR_OFF(1)
181                                         CAMERA_WAITUS(10)
182                                         CAMERA_END
183                                         >;
184                         };
185                         ar0261_1: ar0261@2_0036 {
186                                 index = <3>;
187                                 chipname = "pcl_AR0261";
188                                 type = "sensor";
189                                 guid = "s_AR0261";
190                                 position = <1>;
191                                 bustype = "i2c";
192                                 busnum = <2>;
193                                 addr = <0x36>;
194                                 datalen = <2>;
195                                 pinmuxgrp = <0xFFFF>;
196                                 gpios = <3>;
197                                 regulators = "vana", "vdig", "vif";
198                                 clocks = "mclk2";
199                                 drivername = "ar0261";
200                                 detect = <0x0002 0x0003 0xFFFF 0x060A>;
201                                 devid = <0x0261>;
202                                 poweron = <
203                                         CAMERA_IND_CLK_SET(10000)
204                                         CAMERA_GPIO_CLR(219)
205                                         CAMERA_REGULATOR_ON(0)
206                                         CAMERA_REGULATOR_ON(1)
207                                         CAMERA_REGULATOR_ON(2)
208                                         CAMERA_WAITMS(40)
209                                         CAMERA_GPIO_SET(219)
210                                         CAMERA_WAITMS(20)
211                                         CAMERA_END
212                                         >;
213                                 poweroff = <
214                                         CAMERA_IND_CLK_CLR
215                                         CAMERA_GPIO_CLR(219)
216                                         CAMERA_WAITUS(10)
217                                         CAMERA_REGULATOR_OFF(2)
218                                         CAMERA_REGULATOR_OFF(1)
219                                         CAMERA_REGULATOR_OFF(0)
220                                         CAMERA_END
221                                         >;
222                         };
223                         ar0330_1: ar0330@2_0018 {
224                                 index = <4>;
225                                 chipname = "pcl_AR0330";
226                                 type = "sensor";
227                                 guid = "s_AR0330";
228                                 position = <0>;
229                                 bustype = "i2c";
230                                 busnum = <2>;
231                                 addr = <0x18>;
232                                 datalen = <2>;
233                                 pinmuxgrp = <0xFFFF>;
234                                 gpios = <3>;
235                                 regulators = "vana", "vdig", "vif";
236                                 clocks = "mclk";
237                                 drivername = "ar0330";
238                                 detect = <0x0002 0x3000 0xFFFF 0x2604>;
239                                 devid = <0x0330>;
240                                 poweron = <
241                                         CAMERA_IND_CLK_SET(10000)
242                                         CAMERA_GPIO_CLR(221)
243                                         CAMERA_GPIO_CLR(222)
244                                         CAMERA_REGULATOR_ON(0)
245                                         CAMERA_WAITMS(10)
246                                         CAMERA_REGULATOR_ON(1)
247                                         CAMERA_REGULATOR_ON(2)
248                                         CAMERA_WAITMS(40)
249                                         CAMERA_GPIO_SET(221)
250                                         CAMERA_GPIO_SET(222)
251                                         CAMERA_WAITMS(20)
252                                         CAMERA_END
253                                         >;
254                                 poweroff = <
255                                         CAMERA_IND_CLK_CLR
256                                         CAMERA_GPIO_CLR(221)
257                                         CAMERA_GPIO_CLR(222)
258                                         CAMERA_WAITUS(10)
259                                         CAMERA_REGULATOR_OFF(2)
260                                         CAMERA_REGULATOR_OFF(1)
261                                         CAMERA_REGULATOR_OFF(0)
262                                         CAMERA_END
263                                         >;
264                         };
265                         ar0330_2: ar0330@2_0010 {
266                                 index = <5>;
267                                 chipname = "pcl_AR0330";
268                                 type = "sensor";
269                                 guid = "sAR0330f";
270                                 position = <1>;
271                                 bustype = "i2c";
272                                 busnum = <2>;
273                                 addr = <0x10>;
274                                 datalen = <2>;
275                                 pinmuxgrp = <0xFFFF>;
276                                 gpios = <3>;
277                                 regulators = "vana", "vdig", "vif";
278                                 clocks = "mclk2";
279                                 drivername = "ar0330";
280                                 detect = <0x0002 0x3000 0xFFFF 0x2604>;
281                                 devid = <0x0330>;
282                                 poweron = <
283                                         CAMERA_IND_CLK_SET(10000)
284                                         CAMERA_GPIO_CLR(221)
285                                         CAMERA_GPIO_CLR(222)
286                                         CAMERA_REGULATOR_ON(0)
287                                         CAMERA_WAITMS(10)
288                                         CAMERA_REGULATOR_ON(1)
289                                         CAMERA_REGULATOR_ON(2)
290                                         CAMERA_WAITMS(40)
291                                         CAMERA_GPIO_SET(221)
292                                         CAMERA_GPIO_SET(222)
293                                         CAMERA_WAITMS(20)
294                                         CAMERA_END
295                                         >;
296                                 poweroff = <
297                                         CAMERA_IND_CLK_CLR
298                                         CAMERA_GPIO_CLR(221)
299                                         CAMERA_GPIO_CLR(222)
300                                         CAMERA_WAITUS(10)
301                                         CAMERA_REGULATOR_OFF(2)
302                                         CAMERA_REGULATOR_OFF(1)
303                                         CAMERA_REGULATOR_OFF(0)
304                                         CAMERA_END
305                                         >;
306                         };
307                         ov4689_1: ov4689@2_0036 {
308                                 index = <6>;
309                                 chipname = "pcl_OV4689";
310                                 type = "sensor";
311                                 guid = "s_OV4689";
312                                 position = <0>;
313                                 bustype = "i2c";
314                                 busnum = <2>;
315                                 addr = <0x36>;
316                                 datalen = <2>;
317                                 pinmuxgrp = <0xFFFF>;
318                                 gpios = <3>;
319                                 regulators = "vana", "vdig", "vif";
320                                 clocks = "mclk";
321                                 drivername = "ov4689";
322                                 detect = <0x0002 0x300A 0xFFFF 0x4688>;
323                                 devid = <0x4689>;
324                                 poweron = <
325                                         CAMERA_IND_CLK_SET(10000)
326                                         CAMERA_GPIO_CLR(221)
327                                         CAMERA_GPIO_CLR(219)
328                                         CAMERA_WAITMS(40)
329                                         CAMERA_REGULATOR_ON(2)
330                                         CAMERA_GPIO_SET(221)
331                                         CAMERA_GPIO_SET(219)
332                                         CAMERA_WAITMS(10)
333                                         CAMERA_END
334                                         >;
335                                 poweroff = <
336                                         CAMERA_GPIO_CLR(221)
337                                         CAMERA_IND_CLK_CLR
338                                         CAMERA_WAITUS(10)
339                                         CAMERA_END
340                                         >;
341                         };
342                 };
343         };
344 };