mb/google/poppy/var/baseboard: Convert to ASL 2.0
Change-Id: Ic3d0ea9893c3c25305e2da94681cb5ac466782fc Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50321 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
fc29afbdd4
commit
9edeb31d4a
|
@ -25,7 +25,7 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
|
|
||||||
Method (PMOF, 0, Serialized) {
|
Method (PMOF, 0, Serialized) {
|
||||||
/* Make Sure all PMIC outputs are off. */
|
/* Make Sure all PMIC outputs are off. */
|
||||||
If (LEqual (VSIC, Zero)) {
|
If (VSIC == 0) {
|
||||||
CTXS(EN_PP3300_DX_CAM)
|
CTXS(EN_PP3300_DX_CAM)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
Method (_ON, 0, Serialized) {
|
Method (_ON, 0, Serialized) {
|
||||||
PMON()
|
PMON()
|
||||||
/* Do not reset PMIC across S3 and S0ix cycle */
|
/* Do not reset PMIC across S3 and S0ix cycle */
|
||||||
if (Lequal (RSTO, 1)) {
|
if (RSTO == 1) {
|
||||||
CTXS(EN_CAM_PMIC_RST_L)
|
CTXS(EN_CAM_PMIC_RST_L)
|
||||||
Sleep(1)
|
Sleep(1)
|
||||||
STXS(EN_CAM_PMIC_RST_L)
|
STXS(EN_CAM_PMIC_RST_L)
|
||||||
|
@ -64,46 +64,45 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
Name (AVB3, Zero)
|
Name (AVB3, Zero)
|
||||||
Method (_REG, 2, NotSerialized)
|
Method (_REG, 2, NotSerialized)
|
||||||
{
|
{
|
||||||
If (LEqual (Arg0, 0x08))
|
If (Arg0 == 0x08)
|
||||||
{
|
{
|
||||||
/* Marks the availability of GeneralPurposeIO
|
/* Marks the availability of GeneralPurposeIO
|
||||||
* 0x08: opregion space for GeneralPurposeIO
|
* 0x08: opregion space for GeneralPurposeIO
|
||||||
*/
|
*/
|
||||||
Store (Arg1, AVGP)
|
AVGP = Arg1
|
||||||
}
|
}
|
||||||
If (LEqual (Arg0, 0xB0))
|
If (Arg0 == 0xb0)
|
||||||
{
|
{
|
||||||
/* Marks the availability of
|
/* Marks the availability of
|
||||||
* TI_PMIC_POWER_OPREGION_ID */
|
* TI_PMIC_POWER_OPREGION_ID */
|
||||||
Store (Arg1, AVB0)
|
AVB0 = Arg1
|
||||||
}
|
}
|
||||||
If (LEqual (Arg0, 0xB1))
|
If (Arg0 == 0xb1)
|
||||||
{
|
{
|
||||||
/* Marks the availability of
|
/* Marks the availability of
|
||||||
* TI_PMIC_VR_VAL_OPREGION_ID */
|
* TI_PMIC_VR_VAL_OPREGION_ID */
|
||||||
Store (Arg1, AVB1)
|
AVB1 = Arg1
|
||||||
}
|
}
|
||||||
If (LEqual (Arg0, 0xB2))
|
If (Arg0 == 0xb2)
|
||||||
{
|
{
|
||||||
/* Marks the availability of
|
/* Marks the availability of
|
||||||
* TI_PMIC_CLK_OPREGION_ID */
|
* TI_PMIC_CLK_OPREGION_ID */
|
||||||
Store (Arg1, AVB2)
|
AVB2 = Arg1
|
||||||
}
|
}
|
||||||
If (LEqual (Arg0, 0xB3))
|
If (Arg0 == 0xb3)
|
||||||
{
|
{
|
||||||
/* Marks the availability of
|
/* Marks the availability of
|
||||||
* TI_PMIC_CLK_FREQ_OPREGION_ID */
|
* TI_PMIC_CLK_FREQ_OPREGION_ID */
|
||||||
Store (Arg1, AVB3)
|
AVB3 = Arg1
|
||||||
}
|
}
|
||||||
If (LAnd (AVGP, LAnd (LAnd (AVB0, AVB1),
|
If (AVGP && AVB0 && AVB1 && AVB2 && AVB3)
|
||||||
LAnd(AVB2, AVB3))))
|
|
||||||
{
|
{
|
||||||
/* Marks the availability of all opregions */
|
/* Marks the availability of all opregions */
|
||||||
Store (1, AVBL)
|
AVBL = 1
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Store (0, AVBL)
|
AVBL = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +313,7 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (CLK, 1, Serialized) {
|
Method (CLK, 1, Serialized) {
|
||||||
If (LEqual (Arg0, Zero)) {
|
If (Arg0 == 0) {
|
||||||
BODI = 0
|
BODI = 0
|
||||||
BUDI = 0
|
BUDI = 0
|
||||||
PSWR = 0
|
PSWR = 0
|
||||||
|
@ -328,7 +327,7 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
CFG1 = 0
|
CFG1 = 0
|
||||||
PCTL = 0
|
PCTL = 0
|
||||||
Sleep(1)
|
Sleep(1)
|
||||||
} ElseIf (LEqual (Arg0, 1)) {
|
} ElseIf (Arg0 == 1) {
|
||||||
/* Set boost clock divider */
|
/* Set boost clock divider */
|
||||||
BODI = 3
|
BODI = 3
|
||||||
/* Set buck clock divider */
|
/* Set buck clock divider */
|
||||||
|
@ -364,37 +363,37 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
Name (VSIC, 0)
|
Name (VSIC, 0)
|
||||||
Method (DOVD, 1, Serialized) {
|
Method (DOVD, 1, Serialized) {
|
||||||
/* Turn off VSIO */
|
/* Turn off VSIO */
|
||||||
If (LEqual (Arg0, Zero)) {
|
If (Arg0 == 0) {
|
||||||
/* Decrement only if VSIC > 0 */
|
/* Decrement only if VSIC > 0 */
|
||||||
if (LGreater (VSIC, 0)) {
|
if (VSIC > 0) {
|
||||||
Decrement (VSIC)
|
VSIC--
|
||||||
If (LEqual (VSIC, Zero)) {
|
If (VSIC == 0) {
|
||||||
VSIO = 0
|
VSIO = 0
|
||||||
Sleep(1)
|
Sleep(1)
|
||||||
PMOF()
|
PMOF()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ElseIf (LEqual (Arg0, 1)) {
|
} ElseIf (Arg0 == 1) {
|
||||||
/* Increment only if VSIC < 4 */
|
/* Increment only if VSIC < 4 */
|
||||||
If (LLess (VSIC, 4)) {
|
If (VSIC < 4) {
|
||||||
/* Turn on VSIO */
|
/* Turn on VSIO */
|
||||||
If (LEqual (VSIC, Zero)) {
|
If (VSIC == 0) {
|
||||||
PMON()
|
PMON()
|
||||||
VSIO = 3
|
VSIO = 3
|
||||||
|
|
||||||
if (LNotEqual (IOVA, 52)) {
|
if (IOVA != 52) {
|
||||||
/* Set VSIO value as
|
/* Set VSIO value as
|
||||||
1.8006 V */
|
1.8006 V */
|
||||||
IOVA = 52
|
IOVA = 52
|
||||||
}
|
}
|
||||||
if (LNotEqual (SIOV, 52)) {
|
if (SIOV != 52) {
|
||||||
/* Set VSIO value as
|
/* Set VSIO value as
|
||||||
1.8006 V */
|
1.8006 V */
|
||||||
SIOV = 52
|
SIOV = 52
|
||||||
}
|
}
|
||||||
Sleep(3)
|
Sleep(3)
|
||||||
}
|
}
|
||||||
Increment (VSIC)
|
VSIC++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,8 +402,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
PowerResource (OVCM, 0, 0) {
|
PowerResource (OVCM, 0, 0) {
|
||||||
Name (STA, 0)
|
Name (STA, 0)
|
||||||
Method (_ON, 0, Serialized) {
|
Method (_ON, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 0)) {
|
If (STA == 0) {
|
||||||
/* Enable VSIO regulator +
|
/* Enable VSIO regulator +
|
||||||
daisy chain */
|
daisy chain */
|
||||||
DOVD(1)
|
DOVD(1)
|
||||||
|
@ -415,8 +414,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Method (_OFF, 0, Serialized) {
|
Method (_OFF, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 1)) {
|
If (STA == 1) {
|
||||||
CLK(0)
|
CLK(0)
|
||||||
Sleep(2)
|
Sleep(2)
|
||||||
DOVD(0)
|
DOVD(0)
|
||||||
|
@ -434,8 +433,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
Name (STA, 0)
|
Name (STA, 0)
|
||||||
Method (_ON, 0, Serialized) {
|
Method (_ON, 0, Serialized) {
|
||||||
/* TODO: Read Voltage and Sleep values from Sensor Obj */
|
/* TODO: Read Voltage and Sleep values from Sensor Obj */
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 0)) {
|
If (STA == 0) {
|
||||||
\_SB.PCI0.I2C2.PMIC.CGP1()
|
\_SB.PCI0.I2C2.PMIC.CGP1()
|
||||||
\_SB.PCI0.I2C2.PMIC.CGP2()
|
\_SB.PCI0.I2C2.PMIC.CGP2()
|
||||||
|
|
||||||
|
@ -467,8 +466,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_OFF, 0, Serialized) {
|
Method (_OFF, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 1)) {
|
If (STA == 1) {
|
||||||
Sleep(2)
|
Sleep(2)
|
||||||
\_SB.PCI0.I2C2.PMIC.CRST(0)
|
\_SB.PCI0.I2C2.PMIC.CRST(0)
|
||||||
Sleep(3)
|
Sleep(3)
|
||||||
|
@ -490,8 +489,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
Name (STA, 0)
|
Name (STA, 0)
|
||||||
Method (_ON, 0, Serialized) {
|
Method (_ON, 0, Serialized) {
|
||||||
/* TODO: Read Voltage and Sleep values from Sensor Obj */
|
/* TODO: Read Voltage and Sleep values from Sensor Obj */
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 0)) {
|
If (STA == 0) {
|
||||||
/* Set VAUX2 as 1.8006 V */
|
/* Set VAUX2 as 1.8006 V */
|
||||||
AX2V = 52
|
AX2V = 52
|
||||||
VAX2 = 1 /* Enable VAUX2 */
|
VAX2 = 1 /* Enable VAUX2 */
|
||||||
|
@ -523,8 +522,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_OFF, 0, Serialized) {
|
Method (_OFF, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 1)) {
|
If (STA == 1) {
|
||||||
Sleep(2)
|
Sleep(2)
|
||||||
\_SB.PCI0.I2C2.PMIC.CGP5(0)
|
\_SB.PCI0.I2C2.PMIC.CGP5(0)
|
||||||
Sleep(3)
|
Sleep(3)
|
||||||
|
@ -548,8 +547,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
PowerResource (VCMP, 0, 0) {
|
PowerResource (VCMP, 0, 0) {
|
||||||
Name (STA, 0)
|
Name (STA, 0)
|
||||||
Method (_ON, 0, Serialized) {
|
Method (_ON, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 0)) {
|
If (STA == 0) {
|
||||||
/* Enable VSIO regulator +
|
/* Enable VSIO regulator +
|
||||||
daisy chain */
|
daisy chain */
|
||||||
DOVD(1)
|
DOVD(1)
|
||||||
|
@ -566,8 +565,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_OFF, 0, Serialized) {
|
Method (_OFF, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 1)) {
|
If (STA == 1) {
|
||||||
VCMC = 0 /* Disable regulator */
|
VCMC = 0 /* Disable regulator */
|
||||||
Sleep(1)
|
Sleep(1)
|
||||||
DOVD(0) /* Disable regulator */
|
DOVD(0) /* Disable regulator */
|
||||||
|
@ -585,8 +584,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
PowerResource (NVMP, 0, 0) {
|
PowerResource (NVMP, 0, 0) {
|
||||||
Name (STA, 0)
|
Name (STA, 0)
|
||||||
Method (_ON, 0, Serialized) {
|
Method (_ON, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 0)) {
|
If (STA == 0) {
|
||||||
/* Enable VSIO regulator +
|
/* Enable VSIO regulator +
|
||||||
daisy chain */
|
daisy chain */
|
||||||
DOVD(1)
|
DOVD(1)
|
||||||
|
@ -596,8 +595,8 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_OFF, 0, Serialized) {
|
Method (_OFF, 0, Serialized) {
|
||||||
If (LEqual (AVBL, 1)) {
|
If (AVBL == 1) {
|
||||||
If (LEqual (STA, 1)) {
|
If (STA == 1) {
|
||||||
DOVD(0) /* Disable regulator */
|
DOVD(0) /* Disable regulator */
|
||||||
STA = 0
|
STA = 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue