summaryrefslogtreecommitdiff
path: root/src/mainboard/google/poppy
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/poppy')
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl87
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl106
2 files changed, 79 insertions, 114 deletions
diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
index 27f127576c..ec4430d791 100644
--- a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
@@ -15,32 +15,15 @@
Scope (\_SB.PCI0.I2C3)
{
- Device (CAM0)
+ PowerResource (FCPR, 0, 0)
{
- Name (_HID, "SONY319A") /* _HID: Hardware ID */
- Name (_UID, Zero) /* _UID: Unique ID */
- Name (_DDN, "Sony IMX319 Camera") /* _DDN: DOS Device Name */
-
- Method (_STA, 0, NotSerialized) /* _STA: Status */
- {
- Return (0x0F)
- }
-
- Name (_CRS, ResourceTemplate ()
- {
- I2cSerialBus (0x0010, ControllerInitiated, 0x00061A80,
- AddressingMode7Bit, "\\_SB.PCI0.I2C3",
- 0x00, ResourceConsumer, ,
- )
- })
-
Name (STA, 0)
- Method (PMON, 0, Serialized) {
- If (STA == 0) {
+ Method (_ON, 0, Serialized) {
+ If (LEqual(STA, 0)) {
CTXS (GPIO_FCAM_RST_L)
STXS (GPIO_FCAM_PWR_EN)
STXS (GPIO_PCH_FCAM_CLK_EN)
- Sleep(3)
+ Sleep (3)
STXS (GPIO_FCAM_RST_L)
/*
@@ -51,44 +34,45 @@ Scope (\_SB.PCI0.I2C3)
* for streaming, as soon as the power on
* sequence completes
*/
- Sleep(11);
+ Sleep (11)
+ Store (1, STA)
}
- STA++
}
-
- Method (PMOF, 0, Serialized) {
- If (STA == 0) {
- Return
- }
- STA--
- If (STA == 0) {
+ Method (_OFF, 0, Serialized) {
+ If (LEqual(STA, 1)) {
CTXS (GPIO_PCH_FCAM_CLK_EN)
CTXS (GPIO_FCAM_RST_L)
CTXS (GPIO_FCAM_PWR_EN)
+ Store (0, STA)
}
}
+ Method (_STA, 0, NotSerialized) {
+ Return (STA)
+ }
+ }
- Name (_PR0, Package (0x01) { FCPR })
- Name (_PR3, Package (0x01) { FCPR })
+ Device (CAM0)
+ {
+ Name (_HID, "SONY319A") /* _HID: Hardware ID */
+ Name (_UID, Zero) /* _UID: Unique ID */
+ Name (_DDN, "Sony IMX319 Camera") /* _DDN: DOS Device Name */
- /* Power resource methods for Rear Camera */
- PowerResource (FCPR, 0, 0) {
- Method (_ON, 0, Serialized) {
- PMON ()
- }
- Method (_OFF, 0, Serialized) {
- PMOF ()
- }
- Method (_STA, 0, Serialized) {
- If (LGreater(STA,0)) {
- Return (0x1)
- }
- Else {
- Return (0x0)
- }
- }
+ Method (_STA, 0, NotSerialized) /* _STA: Status */
+ {
+ Return (0x0F)
}
+ Name (_CRS, ResourceTemplate ()
+ {
+ I2cSerialBus (0x0010, ControllerInitiated, 0x00061A80,
+ AddressingMode7Bit, "\\_SB.PCI0.I2C3",
+ 0x00, ResourceConsumer, ,
+ )
+ })
+
+ Name (_PR0, Package () { FCPR })
+ Name (_PR3, Package () { FCPR })
+
/* Port0 of CAM0 is connected to port0 of CIO2 device */
Name (_DSD, Package () {
ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
@@ -147,11 +131,10 @@ Scope (\_SB.PCI0.I2C3)
AddressingMode7Bit, "\\_SB.PCI0.I2C3",
0x00, ResourceConsumer, ,)
})
+ Name (_DEP, Package () { CAM0 })
- Name (_DEP, Package() { ^^I2C3.CAM0 })
-
- Name (_PR0, Package (0x01) { ^^I2C3.CAM0.FCPR })
- Name (_PR3, Package (0x01) { ^^I2C3.CAM0.FCPR })
+ Name (_PR0, Package () { FCPR })
+ Name (_PR3, Package () { FCPR })
Name (_DSD, Package ()
{
diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl
index ca2fee4e45..19146dcfd0 100644
--- a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl
+++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl
@@ -15,6 +15,40 @@
Scope (\_SB.PCI0.I2C5)
{
+ PowerResource (RCPR, 0, 0)
+ {
+ Name (STA, 0)
+ Method (_ON, 0, Serialized) {
+ If (LEqual(STA, 0)) {
+ CTXS (GPIO_RCAM_RST_L)
+ STXS (GPIO_RCAM_PWR_EN)
+ STXS (GPIO_PCH_RCAM_CLK_EN)
+ Sleep (3)
+ STXS (GPIO_RCAM_RST_L)
+
+ /*
+ * A delay of T7 (minimum of 10 ms) + T8
+ * (max 1.4 ms + delay of coarse integration
+ * time value) is needed to have the sensor
+ * ready for streaming, as soon as the power
+ * on sequence completes
+ */
+ Sleep (12)
+ Store (1, STA)
+ }
+ }
+ Method (_OFF, 0, Serialized) {
+ If (LEqual(STA, 1)) {
+ CTXS (GPIO_PCH_RCAM_CLK_EN)
+ CTXS (GPIO_RCAM_RST_L)
+ CTXS (GPIO_RCAM_PWR_EN)
+ Store (0, STA)
+ }
+ }
+ Method (_STA, 0, NotSerialized) {
+ Return (STA)
+ }
+ }
Device (CAM1)
{
@@ -35,59 +69,8 @@ Scope (\_SB.PCI0.I2C5)
)
})
- Name (STA, 0)
- Method (PMON, 0, Serialized) {
- If (STA == 0) {
- CTXS(GPIO_RCAM_RST_L)
- STXS(GPIO_RCAM_PWR_EN)
- STXS(GPIO_PCH_RCAM_CLK_EN)
- Sleep(3)
- STXS(GPIO_RCAM_RST_L)
-
- /*
- * A delay of T7 (minimum of 10 ms) + T8
- * (max 1.4 ms + delay of coarse integration
- * time value) is needed to have the sensor
- * ready for streaming, as soon as the power
- * on sequence completes
- */
- Sleep(12)
- }
- STA++
- }
-
- Method (PMOF, 0, Serialized) {
- If (STA == 0) {
- Return
- }
- STA--
- If (STA == 0) {
- CTXS(GPIO_PCH_RCAM_CLK_EN)
- CTXS(GPIO_RCAM_RST_L)
- CTXS(GPIO_RCAM_PWR_EN)
- }
- }
-
- Name (_PR0, Package (0x01) { RCPR })
- Name (_PR3, Package (0x01) { RCPR })
-
- /* Power resource methods for Rear Camera */
- PowerResource (RCPR, 0, 0) {
- Method (_ON, 0, Serialized) {
- PMON ()
- }
- Method (_OFF, 0, Serialized) {
- PMOF ()
- }
- Method (_STA, 0, Serialized) {
- If (LGreater(STA,0)) {
- Return (0x1)
- }
- Else {
- Return (0x0)
- }
- }
- }
+ Name (_PR0, Package () { RCPR })
+ Name (_PR3, Package () { RCPR })
/* Port0 of CAM1 is connected to port1 of CIO2 device */
Name (_DSD, Package () {
@@ -136,7 +119,7 @@ Scope (\_SB.PCI0.I2C5)
Device (VCM1)
{
Name (_HID, "PRP0001") /* _HID: Hardware ID */
- Name (_UID, Zero) /* _UID: Unique ID */
+ Name (_UID, 3) /* _UID: Unique ID */
Name (_DDN, "AKM AF DAC") /* _DDN: DOS Device Name */
Method (_STA, 0, NotSerialized) /* _STA: Status */
@@ -152,10 +135,10 @@ Scope (\_SB.PCI0.I2C5)
)
})
- Name (_DEP, Package() { ^^I2C5.CAM1 })
+ Name (_DEP, Package() { CAM1 })
- Name (_PR0, Package (0x01) { ^^I2C5.CAM1.RCPR })
- Name (_PR3, Package (0x01) { ^^I2C5.CAM1.RCPR })
+ Name (_PR0, Package () { RCPR })
+ Name (_PR3, Package () { RCPR })
Name (_DSD, Package () {
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
@@ -168,7 +151,7 @@ Scope (\_SB.PCI0.I2C5)
Device (NVM1)
{
Name (_HID, "INT3499") /* _HID: Hardware ID */
- Name (_UID, Zero) /* _UID: Unique ID */
+ Name (_UID, 1) /* _UID: Unique ID */
Name (_DDN, "M24C64S") /* _DDN: DOS Device Name */
Method (_STA, 0, NotSerialized) /* _STA: Status */
@@ -182,11 +165,10 @@ Scope (\_SB.PCI0.I2C5)
AddressingMode7Bit, "\\_SB.PCI0.I2C5",
0x00, ResourceConsumer, ,)
})
+ Name (_DEP, Package () { CAM1 })
- Name (_DEP, Package () { ^^I2C5.CAM1 })
-
- Name (_PR0, Package (0x01) { ^^I2C5.CAM1.RCPR })
- Name (_PR3, Package (0x01) { ^^I2C5.CAM1.RCPR })
+ Name (_PR0, Package () { RCPR })
+ Name (_PR3, Package () { RCPR })
Name (_DSD, Package ()
{