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>
This commit is contained in:
parent
f19ee0d737
commit
01ea8f1fcc
|
@ -86,6 +86,20 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
AddressingMode7Bit, "\\_SB.PCI0.I2C2",
|
AddressingMode7Bit, "\\_SB.PCI0.I2C2",
|
||||||
0x00, ResourceConsumer, ,
|
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 */
|
/* GPIO.4 is AVDD pin for user facing camera */
|
||||||
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
|
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
|
||||||
IoRestrictionOutputOnly, "\\_SB.PCI0.I2C2.PMIC",
|
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 */
|
/* Power resource methods for CAM0 */
|
||||||
PowerResource (OVTH, 0, 0) {
|
PowerResource (OVTH, 0, 0) {
|
||||||
Name (STA, 0)
|
Name (STA, 0)
|
||||||
Method (_ON, 0, Serialized) {
|
Method (_ON, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (LEqual (AVBL, 1)) {
|
||||||
If (LEqual (STA, 0)) {
|
If (LEqual (STA, 0)) {
|
||||||
|
If (LEqual (C0GP, 0)) {
|
||||||
|
\_SB.PCI0.I2C2.CAM0.CGP1()
|
||||||
|
\_SB.PCI0.I2C2.CAM0.CGP2()
|
||||||
|
C0GP = 1
|
||||||
|
}
|
||||||
|
|
||||||
/* Enable VSIO regulator +
|
/* Enable VSIO regulator +
|
||||||
daisy chain */
|
daisy chain */
|
||||||
DOVD(1)
|
DOVD(1)
|
||||||
|
@ -505,6 +529,26 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
|
|
||||||
Field (\_SB.PCI0.I2C2.PMIC.GPOP, ByteAcc, NoLock, Preserve)
|
Field (\_SB.PCI0.I2C2.PMIC.GPOP, ByteAcc, NoLock, Preserve)
|
||||||
{
|
{
|
||||||
|
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
|
Connection
|
||||||
(
|
(
|
||||||
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
|
GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
|
||||||
|
@ -524,6 +568,18 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
GRST = Arg0
|
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 (_PR0, Package () { ^^I2C2.PMIC.OVTH })
|
||||||
Name (_PR3, Package () { ^^I2C2.PMIC.OVTH })
|
Name (_PR3, Package () { ^^I2C2.PMIC.OVTH })
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue