summaryrefslogtreecommitdiff
path: root/src/mainboard/google/poppy/acpi
diff options
context:
space:
mode:
authorV Sowmya <v.sowmya@intel.com>2017-07-20 16:15:56 +0530
committerMartin Roth <martinroth@google.com>2017-07-27 00:32:26 +0000
commit01ea8f1fcc6e9e144de97e18afac3fb69676ba1c (patch)
tree261aa890cb911b07ae978a0bfaf5b6197bcbe43e /src/mainboard/google/poppy/acpi
parentf19ee0d73745d4301ed562aefb671c03401ac619 (diff)
mainboard/google/poppy: Configure GPIO.1 and GPIO.2 for daisy chain mode
Configure GPIO.1 and GPIO.2 as sensor SDA and SCL respectively for TPS68470 PMIC in daisy chain mode. * GPIO.1: Sensor SDA in daisy chain mode. * GPIO.2: Sensor SCL in daisy chain mode. BUG=b:38326541 BRANCH=none TEST=Build and boot soraka. Dump and verify that the generated DSDT table has the required entries. Verified that sensor probe is successful. Change-Id: I7f9686427772a33c06e4cdaafee9b0349d700639 Signed-off-by: V Sowmya <v.sowmya@intel.com> Reviewed-on: https://review.coreboot.org/20665 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Rajmohan Mani <rajmohan.mani@intel.com> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard/google/poppy/acpi')
-rw-r--r--src/mainboard/google/poppy/acpi/mipi_camera.asl56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/mainboard/google/poppy/acpi/mipi_camera.asl b/src/mainboard/google/poppy/acpi/mipi_camera.asl
index d32e7a3e08..0c3ceec146 100644
--- a/src/mainboard/google/poppy/acpi/mipi_camera.asl
+++ b/src/mainboard/google/poppy/acpi/mipi_camera.asl
@@ -86,6 +86,20 @@ Scope (\_SB.PCI0.I2C2)
AddressingMode7Bit, "\\_SB.PCI0.I2C2",
0x00, ResourceConsumer, ,
)
+ /* GPIO.1 is sensor SDA in daisy chain mode */
+ GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
+ IoRestrictionInputOnly, "\\_SB.PCI0.I2C2.PMIC",
+ 0x00, ResourceConsumer,,)
+ {
+ 1
+ }
+ /* GPIO.2 is sensor SCL in daisy chain mode */
+ GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
+ IoRestrictionInputOnly, "\\_SB.PCI0.I2C2.PMIC",
+ 0x00, ResourceConsumer,,)
+ {
+ 2
+ }
/* GPIO.4 is AVDD pin for user facing camera */
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
IoRestrictionOutputOnly, "\\_SB.PCI0.I2C2.PMIC",
@@ -292,12 +306,22 @@ Scope (\_SB.PCI0.I2C2)
}
}
+ /* C0GP is used to indicate if CAM0
+ * GPIOs are configured as input.
+ */
+ Name (C0GP, 0)
/* Power resource methods for CAM0 */
PowerResource (OVTH, 0, 0) {
Name (STA, 0)
Method (_ON, 0, Serialized) {
If (LEqual (AVBL, 1)) {
If (LEqual (STA, 0)) {
+ If (LEqual (C0GP, 0)) {
+ \_SB.PCI0.I2C2.CAM0.CGP1()
+ \_SB.PCI0.I2C2.CAM0.CGP2()
+ C0GP = 1
+ }
+
/* Enable VSIO regulator +
daisy chain */
DOVD(1)
@@ -508,6 +532,26 @@ Scope (\_SB.PCI0.I2C2)
Connection
(
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
+ IoRestrictionInputOnly, "\\_SB.PCI0.I2C2.PMIC",
+ 0x00, ResourceConsumer,,)
+ {
+ 1
+ }
+ ),
+ GPO1, 1,
+ Connection
+ (
+ GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
+ IoRestrictionInputOnly, "\\_SB.PCI0.I2C2.PMIC",
+ 0x00, ResourceConsumer,,)
+ {
+ 2
+ }
+ ),
+ GPO2, 1,
+ Connection
+ (
+ GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
IoRestrictionOutputOnly,
"\\_SB.PCI0.I2C2.PMIC", 0x00,
ResourceConsumer,,)
@@ -524,6 +568,18 @@ Scope (\_SB.PCI0.I2C2)
GRST = Arg0
}
+ /* Read GPO1 GPIO, to configure as input */
+ Method (CGP1, 0, Serialized)
+ {
+ Return (GPO1)
+ }
+
+ /* Read GPO2 GPIO, to configure as input */
+ Method (CGP2, 0, Serialized)
+ {
+ Return (GPO2)
+ }
+
Name (_PR0, Package () { ^^I2C2.PMIC.OVTH })
Name (_PR3, Package () { ^^I2C2.PMIC.OVTH })