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