aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl')
-rw-r--r--src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl60
1 files changed, 60 insertions, 0 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 1d72a863d4..27f127576c 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
@@ -34,6 +34,61 @@ Scope (\_SB.PCI0.I2C3)
)
})
+ Name (STA, 0)
+ Method (PMON, 0, Serialized) {
+ If (STA == 0) {
+ CTXS (GPIO_FCAM_RST_L)
+ STXS (GPIO_FCAM_PWR_EN)
+ STXS (GPIO_PCH_FCAM_CLK_EN)
+ Sleep(3)
+ STXS (GPIO_FCAM_RST_L)
+
+ /*
+ * A delay of T7 (minimum of 5 ms) + T8
+ * (max 5 ms + delay of coarse integration
+ * time value + 14 H, time for 14 horizontal
+ * lines) is needed to have the sensor ready
+ * for streaming, as soon as the power on
+ * sequence completes
+ */
+ Sleep(11);
+ }
+ STA++
+ }
+
+ Method (PMOF, 0, Serialized) {
+ If (STA == 0) {
+ Return
+ }
+ STA--
+ If (STA == 0) {
+ CTXS (GPIO_PCH_FCAM_CLK_EN)
+ CTXS (GPIO_FCAM_RST_L)
+ CTXS (GPIO_FCAM_PWR_EN)
+ }
+ }
+
+ Name (_PR0, Package (0x01) { FCPR })
+ Name (_PR3, Package (0x01) { FCPR })
+
+ /* 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)
+ }
+ }
+ }
+
/* Port0 of CAM0 is connected to port0 of CIO2 device */
Name (_DSD, Package () {
ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
@@ -93,6 +148,11 @@ Scope (\_SB.PCI0.I2C3)
0x00, ResourceConsumer, ,)
})
+ Name (_DEP, Package() { ^^I2C3.CAM0 })
+
+ Name (_PR0, Package (0x01) { ^^I2C3.CAM0.FCPR })
+ Name (_PR3, Package (0x01) { ^^I2C3.CAM0.FCPR })
+
Name (_DSD, Package ()
{
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),