]> 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 imx185 sensor support
[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                         module6: module6@modules {
84                                 compatible = "sensor,rear";
85                                 badge_info = "e1633_ar1335";
86
87                                 sensor {
88                                         profile = <&ar1335_1>;
89                                         platformdata = "ardbeg_ar1335_pdata";
90                                 };
91                         };
92
93                         module7: module7@modules {
94                                 compatible = "sensor,rear";
95                                 badge_info = "imx185_camera";
96
97                                 sensor {
98                                         profile = <&imx185_1>;
99                                         platformdata = "ardbeg_imx185_pdata";
100                                 };
101                         };
102
103                 };
104                 profiles {
105                         imx135_1: imx135@2_0010 {
106                                 index = <1>;
107                                 chipname = "pcl_IMX135";
108                                 type = "sensor";
109                                 guid = "s_IMX135";
110                                 position = <0>;
111                                 bustype = "i2c";
112                                 busnum = <2>;
113                                 addr = <0x10>;
114                                 datalen = <2>;
115                                 pinmuxgrp = <0xFFFF>;
116                                 gpios = <3>;
117                                 regulators = "vana", "vdig_lv", "vif";
118                                 clocks = "mclk";
119                                 drivername = "imx135";
120                                 detect = <0x0002 0x0016 0xFFFF 0x0135>;
121                                 devid = <0x0135>;
122                                 poweron = <
123                                         CAMERA_IND_CLK_SET(10000)
124                                         CAMERA_GPIO_CLR(221)
125                                         CAMERA_WAITUS(10)
126                                         CAMERA_REGULATOR_ON(2)
127                                         CAMERA_REGULATOR_ON(1)
128                                         CAMERA_REGULATOR_ON(0)
129                                         CAMERA_WAITMS(5)
130                                         CAMERA_GPIO_SET(221)
131                                         CAMERA_WAITUS(300)
132                                         CAMERA_END
133                                         >;
134                                 poweroff = <
135                                         CAMERA_IND_CLK_CLR
136                                         CAMERA_GPIO_CLR(221)
137                                         CAMERA_WAITUS(10)
138                                         CAMERA_REGULATOR_OFF(2)
139                                         CAMERA_REGULATOR_OFF(1)
140                                         CAMERA_REGULATOR_OFF(0)
141                                         CAMERA_END
142                                         >;
143                         };
144                         imx185_1: imx185@2_001A {
145                                 index = <1>;
146                                 chipname = "pcl_IMX185";
147                                 type = "sensor";
148                                 guid = "s_IMX185";
149                                 position = <0>;
150                                 bustype = "i2c";
151                                 busnum = <2>;
152                                 addr = <0x1A>;
153                                 datalen = <2>;
154                                 pinmuxgrp = <0xFFFF>;
155                                 gpios = <0>;
156                                 regulators = "vif";
157                                 clocks = "mclk";
158                                 drivername = "imx185";
159                                 detect = <0x1 0x3010 0x00FF 0x39>;
160                                 devid = <0x0185>;
161                                 poweron = <
162                                         CAMERA_IND_CLK_SET(37125)
163                                         CAMERA_GPIO_CLR(221)
164                                         CAMERA_REGULATOR_ON(0)
165                                         CAMERA_WAITUS(10)
166                                         CAMERA_WAITMS(5)
167                                         CAMERA_GPIO_SET(221)
168                                         CAMERA_WAITUS(300)
169                                         CAMERA_END
170                                         >;
171                                 poweroff = <
172                                         CAMERA_IND_CLK_CLR
173                                         CAMERA_GPIO_CLR(221)
174                                         CAMERA_REGULATOR_OFF(0)
175                                         CAMERA_WAITUS(10)
176                                         CAMERA_END
177                                         >;
178                         };
179                         dw9718_1: dw9718@2_000c {
180                                 index = <2>;
181                                 chipname = "pcl_DW9718";
182                                 type = "focuser";
183                                 guid = "f_NVCAM0";
184                                 position = <0>;
185                                 bustype = "i2c";
186                                 busnum = <2>;
187                                 addr = <0xc>;
188                                 datalen = <1>;
189                                 pinmuxgrp = <0xFFFF>;
190                                 gpios = <3>;
191                                 regulators = "vdd", "vdd_i2c";
192                                 drivername = "dw9718";
193                                 detect = <0x0002 0x0004 0xFFFF 0x0060>;
194                                 devid = <0x9718>;
195                                 poweron = <
196                                         CAMERA_REGULATOR_ON(1)
197                                         CAMERA_REGULATOR_ON(0)
198                                         CAMERA_WAITUS(10)
199                                         CAMERA_GPIO_SET(223)
200                                         CAMERA_WAITUS(10)
201                                         CAMERA_END
202                                         >;
203                                 poweroff = <
204                                         CAMERA_REGULATOR_OFF(0)
205                                         CAMERA_REGULATOR_OFF(1)
206                                         CAMERA_GPIO_CLR(223)
207                                         CAMERA_WAITUS(10)
208                                         CAMERA_END
209                                         >;
210                         };
211                         as3648_1: as3648@2_0030 {
212                                 index = <6>;
213                                 chipname = "pcl_AS3648";
214                                 type = "flash";
215                                 guid = "l_NVCAM0";
216                                 position = <0>;
217                                 bustype = "i2c";
218                                 busnum = <2>;
219                                 addr = <0x30>;
220                                 datalen = <1>;
221                                 pinmuxgrp = <0xFFFF>;
222                                 gpios = <3>;
223                                 regulators = "vi2c", "vin";
224                                 drivername = "as3648";
225                                 detect = <0x0001 0x0000 0x00F0 0x00b0>;
226                                 devid = <0x3648>;
227                                 poweron = <
228                                         CAMERA_REGULATOR_ON(1)
229                                         CAMERA_REGULATOR_ON(0)
230                                         CAMERA_WAITUS(1000)
231                                         CAMERA_END
232                                         >;
233                                 poweroff = <
234                                         CAMERA_REGULATOR_OFF(0)
235                                         CAMERA_REGULATOR_OFF(1)
236                                         CAMERA_WAITUS(10)
237                                         CAMERA_END
238                                         >;
239                         };
240                         ar0261_1: ar0261@2_0036 {
241                                 index = <3>;
242                                 chipname = "pcl_AR0261";
243                                 type = "sensor";
244                                 guid = "s_AR0261";
245                                 position = <1>;
246                                 bustype = "i2c";
247                                 busnum = <2>;
248                                 addr = <0x36>;
249                                 datalen = <2>;
250                                 pinmuxgrp = <0xFFFF>;
251                                 gpios = <3>;
252                                 regulators = "vana", "vdig", "vif";
253                                 clocks = "mclk2";
254                                 drivername = "ar0261";
255                                 detect = <0x0002 0x0003 0xFFFF 0x060A>;
256                                 devid = <0x0261>;
257                                 poweron = <
258                                         CAMERA_IND_CLK_SET(10000)
259                                         CAMERA_GPIO_CLR(219)
260                                         CAMERA_REGULATOR_ON(0)
261                                         CAMERA_REGULATOR_ON(1)
262                                         CAMERA_REGULATOR_ON(2)
263                                         CAMERA_WAITMS(40)
264                                         CAMERA_GPIO_SET(219)
265                                         CAMERA_WAITMS(20)
266                                         CAMERA_END
267                                         >;
268                                 poweroff = <
269                                         CAMERA_IND_CLK_CLR
270                                         CAMERA_GPIO_CLR(219)
271                                         CAMERA_WAITUS(10)
272                                         CAMERA_REGULATOR_OFF(2)
273                                         CAMERA_REGULATOR_OFF(1)
274                                         CAMERA_REGULATOR_OFF(0)
275                                         CAMERA_END
276                                         >;
277                         };
278                         ar0330_1: ar0330@2_0018 {
279                                 index = <4>;
280                                 chipname = "pcl_AR0330";
281                                 type = "sensor";
282                                 guid = "s_AR0330";
283                                 position = <0>;
284                                 bustype = "i2c";
285                                 busnum = <2>;
286                                 addr = <0x18>;
287                                 datalen = <2>;
288                                 pinmuxgrp = <0xFFFF>;
289                                 gpios = <3>;
290                                 regulators = "vana", "vdig", "vif";
291                                 clocks = "mclk";
292                                 drivername = "ar0330";
293                                 detect = <0x0002 0x3000 0xFFFF 0x2604>;
294                                 devid = <0x0330>;
295                                 poweron = <
296                                         CAMERA_IND_CLK_SET(10000)
297                                         CAMERA_GPIO_CLR(221)
298                                         CAMERA_GPIO_CLR(222)
299                                         CAMERA_REGULATOR_ON(0)
300                                         CAMERA_WAITMS(10)
301                                         CAMERA_REGULATOR_ON(1)
302                                         CAMERA_REGULATOR_ON(2)
303                                         CAMERA_WAITMS(40)
304                                         CAMERA_GPIO_SET(221)
305                                         CAMERA_GPIO_SET(222)
306                                         CAMERA_WAITMS(20)
307                                         CAMERA_END
308                                         >;
309                                 poweroff = <
310                                         CAMERA_IND_CLK_CLR
311                                         CAMERA_GPIO_CLR(221)
312                                         CAMERA_GPIO_CLR(222)
313                                         CAMERA_WAITUS(10)
314                                         CAMERA_REGULATOR_OFF(2)
315                                         CAMERA_REGULATOR_OFF(1)
316                                         CAMERA_REGULATOR_OFF(0)
317                                         CAMERA_END
318                                         >;
319                         };
320                         ar0330_2: ar0330@2_0010 {
321                                 index = <5>;
322                                 chipname = "pcl_AR0330";
323                                 type = "sensor";
324                                 guid = "sAR0330f";
325                                 position = <1>;
326                                 bustype = "i2c";
327                                 busnum = <2>;
328                                 addr = <0x10>;
329                                 datalen = <2>;
330                                 pinmuxgrp = <0xFFFF>;
331                                 gpios = <3>;
332                                 regulators = "vana", "vdig", "vif";
333                                 clocks = "mclk2";
334                                 drivername = "ar0330";
335                                 detect = <0x0002 0x3000 0xFFFF 0x2604>;
336                                 devid = <0x0330>;
337                                 poweron = <
338                                         CAMERA_IND_CLK_SET(10000)
339                                         CAMERA_GPIO_CLR(221)
340                                         CAMERA_GPIO_CLR(222)
341                                         CAMERA_REGULATOR_ON(0)
342                                         CAMERA_WAITMS(10)
343                                         CAMERA_REGULATOR_ON(1)
344                                         CAMERA_REGULATOR_ON(2)
345                                         CAMERA_WAITMS(40)
346                                         CAMERA_GPIO_SET(221)
347                                         CAMERA_GPIO_SET(222)
348                                         CAMERA_WAITMS(20)
349                                         CAMERA_END
350                                         >;
351                                 poweroff = <
352                                         CAMERA_IND_CLK_CLR
353                                         CAMERA_GPIO_CLR(221)
354                                         CAMERA_GPIO_CLR(222)
355                                         CAMERA_WAITUS(10)
356                                         CAMERA_REGULATOR_OFF(2)
357                                         CAMERA_REGULATOR_OFF(1)
358                                         CAMERA_REGULATOR_OFF(0)
359                                         CAMERA_END
360                                         >;
361                         };
362                         ov4689_1: ov4689@2_0036 {
363                                 index = <6>;
364                                 chipname = "pcl_OV4689";
365                                 type = "sensor";
366                                 guid = "s_OV4689";
367                                 position = <0>;
368                                 bustype = "i2c";
369                                 busnum = <2>;
370                                 addr = <0x36>;
371                                 datalen = <2>;
372                                 pinmuxgrp = <0xFFFF>;
373                                 gpios = <3>;
374                                 regulators = "vana", "vdig", "vif";
375                                 clocks = "mclk";
376                                 drivername = "ov4689";
377                                 detect = <0x0002 0x300A 0xFFFF 0x4688>;
378                                 devid = <0x4689>;
379                                 poweron = <
380                                         CAMERA_IND_CLK_SET(10000)
381                                         CAMERA_GPIO_CLR(221)
382                                         CAMERA_GPIO_CLR(219)
383                                         CAMERA_WAITMS(40)
384                                         CAMERA_REGULATOR_ON(2)
385                                         CAMERA_GPIO_SET(221)
386                                         CAMERA_GPIO_SET(219)
387                                         CAMERA_WAITMS(10)
388                                         CAMERA_END
389                                         >;
390                                 poweroff = <
391                                         CAMERA_GPIO_CLR(221)
392                                         CAMERA_IND_CLK_CLR
393                                         CAMERA_WAITUS(10)
394                                         CAMERA_END
395                                         >;
396                         };
397                         ar1335_1: ar1335@2_0036 {
398                                 index = <7>;
399                                 chipname = "pcl_AR1335";
400                                 type = "sensor";
401                                 guid = "s_AR1335";
402                                 position = <0>;
403                                 bustype = "i2c";
404                                 busnum = <2>;
405                                 addr = <0x36>;
406                                 datalen = <2>;
407                                 pinmuxgrp = <0xFFFF>;
408                                 gpios = <3>;
409                                 regulators = "vana", "vif", "vdig_csi";
410                                 clocks = "mclk";
411                                 drivername = "ar1335";
412                                 detect = <0x0002 0x3000 0xFFFF 0x0153>;
413                                 devid = <0x1335>;
414                                 poweron = <
415                                         CAMERA_IND_CLK_SET(10000)
416                                         CAMERA_GPIO_CLR(219)
417                                         CAMERA_REGULATOR_ON(0)
418                                         CAMERA_REGULATOR_ON(1)
419                                         CAMERA_REGULATOR_ON(2)
420                                         CAMERA_WAITMS(10)
421                                         CAMERA_GPIO_SET(219)
422                                         CAMERA_WAITMS(20)
423                                         CAMERA_END
424                                         >;
425                                 poweroff = <
426                                         CAMERA_IND_CLK_CLR
427                                         CAMERA_GPIO_CLR(219)
428                                         CAMERA_WAITUS(10)
429                                         CAMERA_REGULATOR_OFF(2)
430                                         CAMERA_REGULATOR_OFF(1)
431                                         CAMERA_REGULATOR_OFF(0)
432                                         CAMERA_END
433                                         >;
434                         };
435                 };
436         };
437 };