blob: b8bd6dcd9b071b71c53fa49b7cf04e444d711a75 [file] [log] [blame]
Varshit Pandya5e1d4dd2020-11-12 13:31:42 +05301/* SPDX-License-Identifier: GPL-2.0-only */
2
3Scope (\_SB.PCI0.IPU0)
4{
5 Name (_DSD, Package (0x02) /* _DSD: Device-Specific Data */
6 {
7 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
8 Package (0x02)
9 {
10 Package (0x02)
11 {
12 "port0",
13 "PRT0"
14 },
15 Package (0x02)
16 {
17 "port1",
18 "PRT1"
19 }
20 }
21 })
22 Name (PRT0, Package (0x04)
23 {
24 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
25 Package (0x01)
26 {
27 Package (0x02)
28 {
29 "port",
30 2
31 }
32 },
33 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
34 Package (0x01)
35 {
36 Package (0x02)
37 {
38 "endpoint0",
39 "EP00"
40 }
41 }
42 })
43 Name (PRT1, Package (0x04)
44 {
45 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
46 Package (0x01)
47 {
48 Package (0x02)
49 {
50 "port",
51 One
52 }
53 },
54 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
55 Package (0x01)
56 {
57 Package (0x02)
58 {
59 "endpoint0",
60 "EP10"
61 }
62 }
63 })
64}
65
66Scope (\_SB.PCI0.IPU0)
67{
68 Name (EP00, Package (0x02)
69 {
70 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
71 Package (0x04)
72 {
73 Package (0x02)
74 {
75 "endpoint",
76 Zero
77 },
78 Package (0x02)
79 {
80 "clock-lanes",
81 Zero
82 },
83 Package (0x02)
84 {
85 "data-lanes",
86 Package (0x02)
87 {
88 One,
89 0x02,
90 }
91 },
92 Package (0x02)
93 {
94 "remote-endpoint",
95 Package (0x03)
96 {
97 ^I2C5.CAM1,
98 Zero,
99 Zero
100 }
101 }
102 }
103 })
104 Name (EP10, Package (0x02)
105 {
106 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
107 Package (0x04)
108 {
109 Package (0x02)
110 {
111 "endpoint",
112 Zero
113 },
114 Package (0x02)
115 {
116 "clock-lanes",
117 Zero
118 },
119 Package (0x02)
120 {
121 "data-lanes",
122 Package (0x02)
123 {
124 One,
125 0x02,
126 }
127 },
128 Package (0x02)
129 {
130 "remote-endpoint",
131 Package (0x03)
132 {
133 ^I2C1.CAM0,
134 Zero,
135 Zero
136 }
137 }
138 }
139 })
140}
141
142Scope (\_SB.PCI0.I2C1)
143{
144 PowerResource (RCPR, 0x00, 0x0000)
145 {
146 Name (STA, Zero)
147 Method (_ON, 0, Serialized) /* Rear camera_ON_: Power On */
148 {
149 If ((STA == Zero))
150 {
151 /* Enable IMG_CLK */
152 MCON(0,1) /* Clock 0, 19.2MHz */
153 /* Pull PWREN high */
154 STXS(GPP_B23)
155 Sleep(2) /* reset pulse width */
156 /* Pull RST low */
157 CTXS(GPP_R5)
158 Sleep(1) /* t2 */
159 /* Pull RST high */
160 STXS(GPP_R5)
161 Sleep(1) /* t2 */
162 Store(1,STA)
163 }
164 }
165 Method (_OFF, 0, Serialized) /* Rear camera _OFF: Power Off */
166 {
167 If ((STA == One))
168 {
169 /* Disable IMG_CLK */
170 Sleep(1) /* t0+t1 */
171 MCOF(0) /* Clock 0 */
172 /* Pull RST low */
173 CTXS(GPP_R5)
174 /* Pull PWREN low */
175 CTXS(GPP_B23)
176 Store(0,STA)
177 }
178 }
179 Method (_STA, 0, NotSerialized) /* _STA: Status */
180 {
181 Return (STA)
182 }
183 }
184 Device (CAM0)
185 {
186 Name (_HID, "OVTI5675") /* _HID: Hardware ID */
187 Name (_UID, Zero) /* _UID: Unique ID */
188 Name (_DDN, "Ov 5675 Camera") /* _DDN: DOS Device Name */
189 Method (_STA, 0, NotSerialized) /* _STA: Status */
190 {
191 Return (0x0F)
192 }
193 Name (_CRS, ResourceTemplate () /* _CRS: Current Resource Settings */
194 {
195 I2cSerialBus (0x0036, ControllerInitiated, 0x00061A80,
196 AddressingMode7Bit, "\\_SB.PCI0.I2C1",
197 0x00, ResourceConsumer, ,
198 )
199 })
200 Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */
201 {
202 RCPR
203 })
204 Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */
205 {
206 RCPR
207 })
208 Name (_DSD, Package (0x04) /* _DSD: Device-Specific Data */
209 {
210 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
211 Package (0x01)
212 {
213 Package (0x02)
214 {
215 "port0",
216 "PRT0"
217 }
218 },
219 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
220 Package (0x02)
221 {
222 Package (0x02)
223 {
224 "clock-frequency",
225 0x0124F800
226 },
227 Package (0x02)
228 {
229 "lens-focus",
230 Package (0x01)
231 {
232 VCM0
233 }
234 }
235 }
236 })
237 Name (PRT0, Package (0x04)
238 {
239 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
240 Package (0x01)
241 {
242 Package (0x02)
243 {
244 "port",
245 Zero
246 }
247 },
248 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
249 Package (0x01)
250 {
251 Package (0x02)
252 {
253 "endpoint0",
254 "EP00"
255 }
256 }
257 })
258 Name (EP00, Package (0x02)
259 {
260 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
261 Package (0x05)
262 {
263 Package (0x02)
264 {
265 "endpoint",
266 Zero
267 },
268 Package (0x02)
269 {
270 "clock-lanes",
271 Zero
272 },
273 Package (0x02)
274 {
275 "data-lanes",
276 Package (0x02)
277 {
278 One,
279 0x02
280 }
281 },
282 Package (0x02)
283 {
284 "link-frequencies",
285 Package (0x01)
286 {
287 0x1AD27480
288 }
289 },
290 Package (0x02)
291 {
292 "remote-endpoint",
293 Package (0x03)
294 {
295 IPU0,
296 Zero,
297 Zero
298 }
299 }
300 }
301 })
302 }
303 Device (VCM0)
304 {
305 Name (_HID, "PRP0001") /* _HID: Hardware ID */
306 Name (_UID, 0x03) /* _UID: Unique ID */
307 Name (_DDN, "DW AF DAC") /* _DDN: DOS Device Name */
308 Method (_STA, 0, NotSerialized) /* _STA: Status */
309 {
310 Return (0x0F)
311 }
312 Name (_CRS, ResourceTemplate () /* _CRS: Current Resource Settings */
313 {
314 I2cSerialBus (0x000C, ControllerInitiated, 0x00061A80,
315 AddressingMode7Bit, "\\_SB.PCI0.I2C1",
316 0x00, ResourceConsumer, ,
317 )
318 })
319 Name (_DEP, Package (0x01) /* _DEP: Dependencies */
320 {
321 CAM0
322 })
323 Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */
324 {
325 RCPR
326 })
327 Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */
328 {
329 RCPR
330 })
331 Name (_DSD, Package (0x02) /* _DSD: Device-Specific Data */
332 {
333 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
334 Package (0x01)
335 {
336 Package (0x02)
337 {
338 "compatible",
339 "dongwoon,dw9714"
340 }
341 }
342 })
343 }
344}
345
346Scope (\_SB.PCI0.I2C5)
347{
348 PowerResource (FCPR, 0x00, 0x0000)
349 {
350 Name (STA, Zero)
351 Method (_ON, 0, Serialized) /* Front camera_ON_: Power On */
352 {
353 If ((STA == Zero))
354 {
355 /* Enable IMG_CLK */
356 MCON(1,1) /* Clock 1, 19.2MHz */
357 /* Pull PWREN high */
358 STXS(GPP_E16)
359 Sleep(2) /* reset pulse width */
360 /* Pull RST low */
361 CTXS(GPP_E15)
362 Sleep(1) /* t2 */
363 /* Pull RST high */
364 STXS(GPP_E15)
365 Sleep(1) /* t2 */
366 Store(1,STA)
367 }
368 }
369 Method (_OFF, 0, Serialized) /* Front camera_OFF_: Power Off */
370 {
371 If ((STA == One))
372 {
373 /* Disable IMG_CLK */
374 Sleep(1) /* t0+t1 */
375 MCOF(1) /* Clock 1 */
376 /* Pull RST low */
377 CTXS(GPP_E15)
378 /* Pull PWREN low */
379 CTXS(GPP_E16)
380 Store(0,STA)
381 }
382 }
383 Method (_STA, 0, NotSerialized) /* _STA: Status */
384 {
385 Return (STA)
386 }
387 }
388 Device (CAM1)
389 {
390 Name (_HID, "OVTI5675") /* _HID: Hardware ID */
391 Name (_UID, Zero) /* _UID: Unique ID */
392 Name (_DDN, "Ov 5675 Camera") /* _DDN: DOS Device Name */
393 Method (_STA, 0, NotSerialized) /* _STA: Status */
394 {
395 Return (0x0F)
396 }
397 Name (_CRS, ResourceTemplate () /* _CRS: Current Resource Settings */
398 {
399 I2cSerialBus (0x0036, ControllerInitiated, 0x00061A80,
400 AddressingMode7Bit, "\\_SB.PCI0.I2C5",
401 0x00, ResourceConsumer, ,
402 )
403 })
404 Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */
405 {
406 FCPR
407 })
408 Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */
409 {
410 FCPR
411 })
412 Name (_DSD, Package (0x04) /* _DSD: Device-Specific Data */
413 {
414 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
415 Package (0x01)
416 {
417 Package (0x02)
418 {
419 "port0",
420 "PRT0"
421 }
422 },
423 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
424 Package (0x01)
425 {
426 Package (0x02)
427 {
428 "clock-frequency",
429 0x0124F800
430 }
431 }
432 })
433 Name (PRT0, Package (0x04)
434 {
435 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
436 Package (0x01)
437 {
438 Package (0x02)
439 {
440 "port",
441 Zero
442 }
443 },
444 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
445 Package (0x01)
446 {
447 Package (0x02)
448 {
449 "endpoint0",
450 "EP00"
451 }
452 }
453 })
454 Name (EP00, Package (0x02)
455 {
456 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
457 Package (0x05)
458 {
459 Package (0x02)
460 {
461 "endpoint",
462 Zero
463 },
464 Package (0x02)
465 {
466 "clock-lanes",
467 Zero
468 },
469 Package (0x02)
470 {
471 "data-lanes",
472 Package (0x02)
473 {
474 One,
475 0x02
476 }
477 },
478 Package (0x02)
479 {
480 "link-frequencies",
481 Package (0x01)
482 {
483 0x1AD27480
484 }
485 },
486 Package (0x02)
487 {
488 "remote-endpoint",
489 Package (0x03)
490 {
491 IPU0,
492 One,
493 Zero
494 }
495 }
496 }
497 })
498 }
499}