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