1 /* SPDX-License-Identifier: GPL-2.0-only */
9 Name (_DDN, "TPS68470 PMIC") /* _DDN: DOS Device Name */
12 Method (_STA, 0, NotSerialized)
17 /* Marks the availability of all the operation regions */
24 Method (_REG, 2, NotSerialized)
28 /* Marks the availability of GeneralPurposeIO
29 * 0x08: opregion space for GeneralPurposeIO
35 /* Marks the availability of
36 * TI_PMIC_POWER_OPREGION_ID */
41 /* Marks the availability of
42 * TI_PMIC_VR_VAL_OPREGION_ID */
47 /* Marks the availability of
48 * TI_PMIC_CLK_OPREGION_ID */
53 /* Marks the availability of
54 * TI_PMIC_CLK_FREQ_OPREGION_ID */
57 If (AVGP && AVB0 && AVB1 && AVB2 && AVB3)
59 /* Marks the availability of all opregions */
68 OperationRegion (GPOP, GeneralPurposeIo, 0, 0x2)
69 Name (_CRS, ResourceTemplate ()
71 I2cSerialBus (0x004D, ControllerInitiated, 0x00061A80,
72 AddressingMode7Bit, "\\_SB.PCI0.I2C2",
73 0x00, ResourceConsumer, ,
75 /* GPIO.9 is XSHUTDOWN pin for world facing camera */
76 GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
77 IoRestrictionOutputOnly, "\\_SB.PCI0.I2C2.PMIC",
78 0x00, ResourceConsumer,,)
84 /* PMIC operation regions */
85 /* 0xB0: TI_PMIC_POWER_OPREGION_ID
86 * VSIO: Sensor IO LDO output
87 * VCMC: VCM LDO output
88 * VAX1: Auxiliary LDO1 output
89 * VAX2: Auxiliary LDO2 output
90 * VACT: Analog LDO output
91 * VDCT: Core buck output
93 OperationRegion (PWR1, 0xB0, 0, 0x0100)
94 Field (PWR1, DWordAcc, NoLock, Preserve)
104 /* 0xB1: TI_PMIC_VR_VAL_OPREGION_ID
105 * SIOV: VSIO VR voltage value
106 * IOVA: VIO VR voltage value
107 * VCMV: VCM VR voltage value
108 * AX1V: Auxiliary LDO1 VR voltage value
109 * AX2V: Auxiliary LDO2 VR voltage value
110 * ACVA: Analog LDO VR voltage
111 * DCVA: Core buck VR voltage
113 OperationRegion (PWR2, 0xB1, 0, 0x0100)
114 Field (PWR2, DWordAcc, NoLock, Preserve)
125 /* 0xB2: TI_PMIC_CLK_OPREGION_ID
126 * PCTL: PLL control register
127 * PCT2: PLL control 2 register
128 * CFG1: Clock configuration 1 register
129 * CFG2: Clock configuration 2 register
131 OperationRegion (CLKC, 0xB2, 0, 0x0100)
132 Field (CLKC, DWordAcc, NoLock, Preserve)
140 /* 0xB3: TI_PMIC_CLK_FREQ_OPREGION_ID
141 * PDV2: PLL output divider for HCLK_B
142 * BODI: PLL output divider for boost clock
143 * BUDI: PLL output divider for buck clock
144 * PSWR: PLL reference clock setting
145 * XTDV: Reference crystal divider
146 * PLDV: PLL feedback divider
147 * PODV: PLL output divider for HCLK_A
149 OperationRegion (CLKF, 0xB3, 0, 0x0100)
150 Field (CLKF, DWordAcc, NoLock, Preserve)
162 Method (CLKE, 0, Serialized) {
163 /* save Acquire result so we can check for
165 Local0 = Acquire (MUTC, 1000)
166 /* check for Mutex acquired */
168 /* Set boost clock divider */
170 /* Set buck clock divider */
172 /* Set the PLL_REF_CLK cyles */
174 /* Set the reference crystal divider */
176 /* Set PLL feedback divider */
178 /* Set PLL output divider for HCLK_A */
180 /* Enable HCLK_A clock.
181 * CFG1: output selection for HCLK_A.
182 * CFG2: set drive strength for HCLK_A.
186 /* Enable PLL output, crystal oscillator
187 * input capacitance control and set
188 * Xtal oscillator as clock source.
196 Method (CLKD, 0, Serialized) {
197 /* save Acquire result so we can check for
199 Local0 = Acquire (MUTC, 1000)
200 /* check for Mutex acquired */
208 /* Disable HCLK_A clock */
216 /* Reference count for VSIO */
219 Method (DOVD, 1, Serialized) {
220 /* Save Acquire result so we can check for
222 Local0 = Acquire (MUTV, 1000)
223 /* Check for Mutex acquired */
227 /* Decrement only if VSIC > 0 */
234 } ElseIf (Arg0 == 1) {
235 /* Increment only if VSIC < 2 */
249 /* Power resource methods for CAM0 */
250 PowerResource (OVTH, 0, 0) {
252 Method (_ON, 0, Serialized) {
255 /* Enable VSIO regulator +
273 /* Set ANA at 2.8152V */
278 \_SB.PCI0.I2C2.PMIC.CLKE()
282 /* Set CORE at 1.2V */
286 \_SB.PCI0.I2C2.CAM0.CRST(1)
294 Method (_OFF, 0, Serialized) {
298 \_SB.PCI0.I2C2.PMIC.CLKD()
300 \_SB.PCI0.I2C2.CAM0.CRST(0)
312 Method (_STA, 0, NotSerialized) {
317 /* Power resource methods for VCM */
318 PowerResource (VCMP, 0, 0) {
320 Method (_ON, 0, Serialized) {
323 /* Enable VSIO regulator +
338 /* Enable VCM regulator */
352 Method (_OFF, 0, Serialized) {
355 VCMC = 0 /* Disable regulator */
357 DOVD(0) /* Disable regulator */
364 Method (_STA, 0, NotSerialized) {
372 Name (_HID, "OVTID858")
374 Name (_DDN, "OV 13858 Camera") /* _DDN: DOS Device Name */
377 Method (_STA, 0, NotSerialized)
382 Name (_DEP, Package() {\_SB.PCI0.I2C2.PMIC})
383 Name (_CRS, ResourceTemplate ()
385 I2cSerialBus (0x0010, ControllerInitiated, 0x00061A80,
386 AddressingMode7Bit, "\\_SB.PCI0.I2C2",
387 0x00, ResourceConsumer, ,
391 Field (\_SB.PCI0.I2C2.PMIC.GPOP, ByteAcc, NoLock, Preserve)
395 GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
396 IoRestrictionOutputOnly,
397 "\\_SB.PCI0.I2C2.PMIC", 0x00,
406 /* Set or clear GRST GPIO */
407 Method (CRST, 1, Serialized)
412 Name (_PR0, Package () { ^^I2C2.PMIC.OVTH })
413 Name (_PR3, Package () { ^^I2C2.PMIC.OVTH })
415 /* Port0 of CAM0 is connected to port0 of CIO2 device */
416 Name (_DSD, Package () {
417 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
419 Package () { "port0", "PRT0" },
421 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
423 Package () { "clock-frequency", 19200000 },
427 Name (PRT0, Package() {
428 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
430 Package () { "port", 0 },
432 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
434 Package () { "endpoint0", "EP00" },
438 Name (EP00, Package() {
439 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
441 Package () { "endpoint", 0 },
442 Package () { "clock-lanes", 0 },
443 Package () { "data-lanes",
444 Package () { 1, 2, 3, 4 }
446 Package () { "link-frequencies",
447 Package() { 1190400000, 640000000 }
449 Package () { "remote-endpoint",
450 Package() { \_SB.PCI0.CIO2, 0, 0 }
455 Method (SSDB, 0, Serialized)
457 Return (Buffer (0x5E)
459 /* 0000 */ 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,0x00, 0x00,
460 /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
461 /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
462 /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
463 /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
464 /* 0028 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
465 /* 0030 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
466 /* 0038 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
467 /* 0040 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
468 /* 0048 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03,
469 /* 0050 */ 0x09, 0x00, 0x02, 0x01, 0x00, 0x01, 0x00, 0x36,
470 /* 0058 */ 0x6E, 0x01, 0x00, 0x00, 0x00, 0x00
477 Name (_HID, "DWDWD000")
479 Name (_DDN, "Dongwoon AF DAC") /* _DDN: DOS Device Name */
482 Method (_STA, 0, NotSerialized)
487 Name (_DEP, Package() {\_SB.PCI0.I2C2.PMIC})
488 Name (_CRS, ResourceTemplate ()
490 I2cSerialBus (0x000C, ControllerInitiated, 0x00061A80,
491 AddressingMode7Bit, "\\_SB.PCI0.I2C2",
492 0x00, ResourceConsumer, ,
496 Name (_PR0, Package () { ^PMIC.VCMP })
497 Name (_PR3, Package () { ^PMIC.VCMP })
501 Scope (\_SB.PCI0.I2C3)
505 Name (_HID, "INT3473")
507 Name (_DDN, "TPS68470 PMIC 2") /* _DDN: DOS Device Name */
510 Method (_STA, 0, NotSerialized)
515 /* Marks the availability of all the operation regions */
522 Method (_REG, 2, NotSerialized)
526 /* Marks the availability of GeneralPurposeIO
527 * 0x08: opregion space for GeneralPurposeIO
533 /* Marks the availability of
534 * TI_PMIC_POWER_OPREGION_ID */
539 /* Marks the availability of
540 * TI_PMIC_VR_VAL_OPREGION_ID */
545 /* Marks the availability of
546 * TI_PMIC_CLK_OPREGION_ID */
551 /* Marks the availability of
552 * TI_PMIC_CLK_FREQ_OPREGION_ID */
555 If (AVGP && AVB0 && AVB1 && AVB2 && AVB3)
557 /* Marks the availability of all opregions */
566 OperationRegion (GPOP, GeneralPurposeIo, 0, 0x2)
567 Name (_CRS, ResourceTemplate ()
569 I2cSerialBus (0x0049, ControllerInitiated, 0x00061A80,
570 AddressingMode7Bit, "\\_SB.PCI0.I2C3",
571 0x00, ResourceConsumer, ,
573 /* GPIO.4 is AVDD pin for user facing camera */
574 GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
575 IoRestrictionOutputOnly, "\\_SB.PCI0.I2C3.PMIC",
576 0x00, ResourceConsumer,,)
580 /* GPIO.5 is XSHUTDOWN pin for user facing camera */
581 GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
582 IoRestrictionOutputOnly, "\\_SB.PCI0.I2C3.PMIC",
583 0x00, ResourceConsumer,,)
589 /* PMIC operation regions */
590 /* 0xB0: TI_PMIC_POWER_OPREGION_ID
591 * VSIO: Sensor IO LDO output
592 * VCMC: VCM LDO output
593 * VAX1: Auxiliary LDO1 output
594 * VAX2: Auxiliary LDO2 output
595 * VACT: Analog LDO output
596 * VDCT: Core buck output
598 OperationRegion (PWR1, 0xB0, 0, 0x0100)
599 Field (PWR1, DWordAcc, NoLock, Preserve)
609 /* 0xB1: TI_PMIC_VR_VAL_OPREGION_ID
610 * SIOV: VSIO VR voltage value
611 * IOVA: VIO VR voltage value
612 * VCMV: VCM VR voltage value
613 * AX1V: Auxiliary LDO1 VR voltage value
614 * AX2V: Auxiliary LDO2 VR voltage value
615 * ACVA: Analog LDO VR voltage
616 * DCVA: Core buck VR voltage
618 OperationRegion (PWR2, 0xB1, 0, 0x0100)
619 Field (PWR2, DWordAcc, NoLock, Preserve)
630 /* 0xB2: TI_PMIC_CLK_OPREGION_ID
631 * PCTL: PLL control register
632 * PCT2: PLL control 2 register
633 * CFG1: Clock configuration 1 register
634 * CFG2: Clock configuration 2 register
636 OperationRegion (CLKC, 0xB2, 0, 0x0100)
637 Field (CLKC, DWordAcc, NoLock, Preserve)
645 /* 0xB3: TI_PMIC_CLK_FREQ_OPREGION_ID
646 * PDV2: PLL output divider for HCLK_B
647 * BODI: PLL output divider for boost clock
648 * BUDI: PLL output divider for buck clock
649 * PSWR: PLL reference clock setting
650 * XTDV: Reference crystal divider
651 * PLDV: PLL feedback divider
652 * PODV: PLL output divider for HCLK_A
654 OperationRegion (CLKF, 0xB3, 0, 0x0100)
655 Field (CLKF, DWordAcc, NoLock, Preserve)
667 Method (CLKE, 0, Serialized) {
668 /* save Acquire result so we can check for
670 Local0 = Acquire (MUTC, 1000)
671 /* check for Mutex acquired */
673 /* Set boost clock divider */
675 /* Set buck clock divider */
677 /* Set the PLL_REF_CLK cyles */
679 /* Set the reference crystal divider */
681 /* Set PLL feedback divider */
683 /* Set PLL output divider for HCLK_A */
685 /* Enable HCLK_A clock.
686 * CFG1: output selection for HCLK_A.
687 * CFG2: set drive strength for HCLK_A.
691 /* Enable PLL output, crystal oscillator
692 * input capacitance control and set
693 * Xtal oscillator as clock source.
701 Method (CLKD, 0, Serialized) {
702 /* save Acquire result so we can check for
704 Local0 = Acquire (MUTC, 1000)
705 /* check for Mutex acquired */
713 /* Disable HCLK_A clock */
721 /* Reference count for VSIO */
724 Method (DOVD, 1, Serialized) {
725 /* Save Acquire result so we can check for
727 Local0 = Acquire (MUTV, 1000)
728 /* Check for Mutex acquired */
733 } ElseIf (Arg0 == 1) {
740 /* Power resource methods for CAM1 */
741 PowerResource (OVFI, 0, 0) {
743 Method (_ON, 0, Serialized) {
746 /* Enable VSIO regulator +
750 VAX2 = 1 /* Enable VAUX2 */
759 \_SB.PCI0.I2C3.PMIC.CLKE()
761 VAX1 = 1 /* Enable VAUX1 */
763 /* Set VAUX1 as 1.2132V */
768 \_SB.PCI0.I2C3.CAM1.CGP4(1)
771 \_SB.PCI0.I2C3.CAM1.CGP5(1)
778 Method (_OFF, 0, Serialized) {
782 \_SB.PCI0.I2C3.PMIC.CLKD()
784 \_SB.PCI0.I2C3.CAM1.CGP5(0)
788 \_SB.PCI0.I2C3.CAM1.CGP4(0)
800 Method (_STA, 0, NotSerialized) {
808 Name (_HID, "INT3479")
810 Name (_DDN, "OV 5670 Camera") /* _DDN: DOS Device Name */
813 Method (_STA, 0, NotSerialized)
818 Name (_DEP, Package() {\_SB.PCI0.I2C3.PMIC})
819 Name (_CRS, ResourceTemplate ()
821 I2cSerialBus (0x0010, ControllerInitiated, 0x00061A80,
822 AddressingMode7Bit, "\\_SB.PCI0.I2C3",
823 0x00, ResourceConsumer, ,
827 Field (\_SB.PCI0.I2C3.PMIC.GPOP, ByteAcc, NoLock, Preserve)
831 GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
832 IoRestrictionOutputOnly,
833 "\\_SB.PCI0.I2C3.PMIC", 0x00,
842 GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
843 IoRestrictionOutputOnly,
844 "\\_SB.PCI0.I2C3.PMIC", 0x00,
853 /* Set or clear GPO4 GPIO */
854 Method (CGP4, 1, Serialized)
859 /* Set or clear GPO5 GPIO */
860 Method (CGP5, 1, Serialized)
865 Name (_PR0, Package () { ^^I2C3.PMIC.OVFI })
866 Name (_PR3, Package () { ^^I2C3.PMIC.OVFI })
868 /* Port0 of CAM1 is connected to port1 of CIO2 device */
869 Name (_DSD, Package () {
870 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
872 Package () { "port0", "PRT0" },
874 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
876 Package () { "clock-frequency", 19200000 },
880 Name (PRT0, Package() {
881 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
883 Package () { "port", 0 },
885 ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
887 Package () { "endpoint0", "EP00" },
891 Name (EP00, Package() {
892 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
894 Package () { "endpoint", 0 },
895 Package () { "clock-lanes", 0 },
896 Package () { "data-lanes",
899 Package () { "link-frequencies",
900 Package() { 844800000 }
902 Package () { "remote-endpoint",
903 Package() { \_SB.PCI0.CIO2, 1, 0 }
908 Method (SSDB, 0, Serialized)
910 Return (Buffer (0x5E)
912 /* 0000 */ 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
913 /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
914 /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
915 /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
916 /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
917 /* 0028 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
918 /* 0030 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
919 /* 0038 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
920 /* 0040 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
921 /* 0048 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x03,
922 /* 0050 */ 0x09, 0x00, 0x02, 0x01, 0x00, 0x01, 0x00, 0x36,
923 /* 0058 */ 0x6E, 0x01, 0x00, 0x00, 0x00, 0x00