mb/intel: Convert to ASL 2.0 syntax

Generated buils/dsdt.dsl for intel/kblrvp11 are same.

Change-Id: I41195be171b48f41fe2955e4639d8b770853d483
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46081
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
This commit is contained in:
Elyes HAOUAS
2020-10-06 13:36:45 +02:00
committed by Patrick Georgi
parent e96941d952
commit f2042099cc
2 changed files with 77 additions and 79 deletions

View File

@ -23,46 +23,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, AVP1) AVP1 = 1
} }
Else Else
{ {
Store (0, AVP1) AVP1 = 0
} }
} }
@ -163,9 +162,9 @@ Scope (\_SB.PCI0.I2C2)
Method (CLKE, 0, Serialized) { Method (CLKE, 0, Serialized) {
/* save Acquire result so we can check for /* save Acquire result so we can check for
Mutex acquired */ Mutex acquired */
Store (Acquire (MUTC, 1000), Local0) Local0 = Acquire (MUTC, 1000)
/* check for Mutex acquired */ /* check for Mutex acquired */
If (LEqual (Local0, Zero)) { If (Local0 == 0) {
/* Set boost clock divider */ /* Set boost clock divider */
BODI = 3 BODI = 3
/* Set buck clock divider */ /* Set buck clock divider */
@ -197,9 +196,9 @@ Scope (\_SB.PCI0.I2C2)
Method (CLKD, 0, Serialized) { Method (CLKD, 0, Serialized) {
/* save Acquire result so we can check for /* save Acquire result so we can check for
Mutex acquired */ Mutex acquired */
Store (Acquire (MUTC, 1000), Local0) Local0 = Acquire (MUTC, 1000)
/* check for Mutex acquired */ /* check for Mutex acquired */
If (LEqual (Local0, Zero)) { If (Local0 == 0) {
BODI = 0 BODI = 0
BUDI = 0 BUDI = 0
PSWR = 0 PSWR = 0
@ -220,26 +219,26 @@ Scope (\_SB.PCI0.I2C2)
Method (DOVD, 1, Serialized) { Method (DOVD, 1, Serialized) {
/* Save Acquire result so we can check for /* Save Acquire result so we can check for
Mutex acquired */ Mutex acquired */
Store (Acquire (MUTV, 1000), Local0) Local0 = Acquire (MUTV, 1000)
/* Check for Mutex acquired */ /* Check for Mutex acquired */
If (LEqual (Local0, Zero)) { If (Local0 == 0) {
/* 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
} }
} }
} ElseIf (LEqual (Arg0, 1)) { } ElseIf (Arg0 == 1) {
/* Increment only if VSIC < 2 */ /* Increment only if VSIC < 2 */
If (LLess (VSIC, 2)) { If (VSIC < 2) {
/* Turn on VSIO */ /* Turn on VSIO */
If (LEqual (VSIC, Zero)) { If (VSIC == 0) {
VSIO = 3 VSIO = 3
} }
Increment (VSIC) VSIC++
} }
} }
@ -251,18 +250,18 @@ Scope (\_SB.PCI0.I2C2)
PowerResource (OVTH, 0, 0) { PowerResource (OVTH, 0, 0) {
Name (STA, 0) Name (STA, 0)
Method (_ON, 0, Serialized) { Method (_ON, 0, Serialized) {
If (LEqual (AVP1, 1)) { If (AVP1 == 1) {
If (LEqual (STA, 0)) { If (STA == 0) {
/* Enable VSIO regulator + /* Enable VSIO regulator +
daisy chain */ daisy chain */
DOVD(1) DOVD(1)
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
@ -270,7 +269,7 @@ Scope (\_SB.PCI0.I2C2)
Sleep(3) Sleep(3)
VACT = 1 VACT = 1
if (LNotEqual (ACVA, 109)) { if (ACVA != 109) {
/* Set ANA at 2.8152V */ /* Set ANA at 2.8152V */
ACVA = 109 ACVA = 109
} }
@ -279,7 +278,7 @@ Scope (\_SB.PCI0.I2C2)
\_SB.PCI0.I2C2.PMIC.CLKE() \_SB.PCI0.I2C2.PMIC.CLKE()
VDCT = 1 VDCT = 1
if (LNotEqual (DCVA, 12)) { if (DCVA != 12) {
/* Set CORE at 1.2V */ /* Set CORE at 1.2V */
DCVA = 12 DCVA = 12
} }
@ -293,8 +292,8 @@ Scope (\_SB.PCI0.I2C2)
} }
Method (_OFF, 0, Serialized) { Method (_OFF, 0, Serialized) {
If (LEqual (AVP1, 1)) { If (AVP1 == 1) {
If (LEqual (STA, 1)) { If (STA == 1) {
Sleep(2) Sleep(2)
\_SB.PCI0.I2C2.PMIC.CLKD() \_SB.PCI0.I2C2.PMIC.CLKD()
Sleep(2) Sleep(2)
@ -319,17 +318,17 @@ 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 (AVP1, 1)) { If (AVP1 == 1) {
If (LEqual (STA, 0)) { If (STA == 0) {
/* Enable VSIO regulator + /* Enable VSIO regulator +
daisy chain */ daisy chain */
DOVD(1) DOVD(1)
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
@ -338,7 +337,7 @@ Scope (\_SB.PCI0.I2C2)
/* Enable VCM regulator */ /* Enable VCM regulator */
VCMC = 1 VCMC = 1
if (LNotEqual (VCMV, 109)) { if (VCMV != 109) {
/* Set VCM value at /* Set VCM value at
2.8152 V */ 2.8152 V */
VCMV = 109 VCMV = 109
@ -351,8 +350,8 @@ Scope (\_SB.PCI0.I2C2)
} }
Method (_OFF, 0, Serialized) { Method (_OFF, 0, Serialized) {
If (LEqual (AVP1, 1)) { If (AVP1 == 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 */
@ -522,46 +521,45 @@ Scope (\_SB.PCI0.I2C3)
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, AVP2) AVP2 = 1
} }
Else Else
{ {
Store (0, AVP2) AVP2 = 0
} }
} }
@ -669,9 +667,9 @@ Scope (\_SB.PCI0.I2C3)
Method (CLKE, 0, Serialized) { Method (CLKE, 0, Serialized) {
/* save Acquire result so we can check for /* save Acquire result so we can check for
Mutex acquired */ Mutex acquired */
Store (Acquire (MUTC, 1000), Local0) Local0 = Acquire (MUTC, 1000)
/* check for Mutex acquired */ /* check for Mutex acquired */
If (LEqual (Local0, Zero)) { If (Local0 == 0) {
/* Set boost clock divider */ /* Set boost clock divider */
BODI = 3 BODI = 3
/* Set buck clock divider */ /* Set buck clock divider */
@ -703,9 +701,9 @@ Scope (\_SB.PCI0.I2C3)
Method (CLKD, 0, Serialized) { Method (CLKD, 0, Serialized) {
/* save Acquire result so we can check for /* save Acquire result so we can check for
Mutex acquired */ Mutex acquired */
Store (Acquire (MUTC, 1000), Local0) Local0 = Acquire (MUTC, 1000)
/* check for Mutex acquired */ /* check for Mutex acquired */
If (LEqual (Local0, Zero)) { If (Local0 == 0) {
BODI = 0 BODI = 0
BUDI = 0 BUDI = 0
PSWR = 0 PSWR = 0
@ -726,13 +724,13 @@ Scope (\_SB.PCI0.I2C3)
Method (DOVD, 1, Serialized) { Method (DOVD, 1, Serialized) {
/* Save Acquire result so we can check for /* Save Acquire result so we can check for
Mutex acquired */ Mutex acquired */
Store (Acquire (MUTV, 1000), Local0) Local0 = Acquire (MUTV, 1000)
/* Check for Mutex acquired */ /* Check for Mutex acquired */
If (LEqual (Local0, Zero)) { If (Local0 == 0) {
/* Turn off VSIO */ /* Turn off VSIO */
If (LEqual (Arg0, Zero)) { If (Arg0 == 0) {
VSIO = 0 VSIO = 0
} ElseIf (LEqual (Arg0, 1)) { } ElseIf (Arg0 == 1) {
VSIO = 3 VSIO = 3
} }
Release (MUTV) Release (MUTV)
@ -743,15 +741,15 @@ Scope (\_SB.PCI0.I2C3)
PowerResource (OVFI, 0, 0) { PowerResource (OVFI, 0, 0) {
Name (STA, 0) Name (STA, 0)
Method (_ON, 0, Serialized) { Method (_ON, 0, Serialized) {
If (LEqual (AVP2, 1)) { If (AVP2 == 1) {
If (LEqual (STA, 0)) { If (STA == 0) {
/* Enable VSIO regulator + /* Enable VSIO regulator +
daisy chain */ daisy chain */
DOVD(1) DOVD(1)
VAX2 = 1 /* Enable VAUX2 */ VAX2 = 1 /* Enable VAUX2 */
if (LNotEqual (AX2V, 52)) { if (AX2V != 52) {
/* Set VAUX2 as /* Set VAUX2 as
1.8006 V */ 1.8006 V */
AX2V = 52 AX2V = 52
@ -761,7 +759,7 @@ Scope (\_SB.PCI0.I2C3)
\_SB.PCI0.I2C3.PMIC.CLKE() \_SB.PCI0.I2C3.PMIC.CLKE()
VAX1 = 1 /* Enable VAUX1 */ VAX1 = 1 /* Enable VAUX1 */
if (LNotEqual (AX1V, 19)) { if (AX1V != 19) {
/* Set VAUX1 as 1.2132V */ /* Set VAUX1 as 1.2132V */
AX1V = 19 AX1V = 19
} }
@ -778,8 +776,8 @@ Scope (\_SB.PCI0.I2C3)
} }
Method (_OFF, 0, Serialized) { Method (_OFF, 0, Serialized) {
If (LEqual (AVP2, 1)) { If (AVP2 == 1) {
If (LEqual (STA, 1)) { If (STA == 1) {
Sleep(2) Sleep(2)
\_SB.PCI0.I2C3.PMIC.CLKD() \_SB.PCI0.I2C3.PMIC.CLKD()
Sleep(2) Sleep(2)

View File

@ -154,7 +154,7 @@ Scope (\_SB.PCI0.I2C3)
Name (STA, Zero) Name (STA, Zero)
Method (_ON, 0, Serialized) /* Rear camera_ON_: Power On */ Method (_ON, 0, Serialized) /* Rear camera_ON_: Power On */
{ {
If ((STA == Zero)) If (STA == 0)
{ {
/* Enable IMG_CLK */ /* Enable IMG_CLK */
MCON(0,1) /* Clock 0, 19.2MHz */ MCON(0,1) /* Clock 0, 19.2MHz */
@ -170,12 +170,12 @@ Scope (\_SB.PCI0.I2C3)
STXS(GPP_C15) STXS(GPP_C15)
Sleep(1) /* t2 */ Sleep(1) /* t2 */
Store(1,STA) STA = 1
} }
} }
Method (_OFF, 0, Serialized) /* Rear camera _OFF: Power Off */ Method (_OFF, 0, Serialized) /* Rear camera _OFF: Power Off */
{ {
If ((STA == One)) If (STA == 1)
{ {
/* Disable IMG_CLK */ /* Disable IMG_CLK */
Sleep(1) /* t0+t1 */ Sleep(1) /* t0+t1 */
@ -187,7 +187,7 @@ Scope (\_SB.PCI0.I2C3)
/* Pull PWREN low */ /* Pull PWREN low */
CTXS(GPP_B23) CTXS(GPP_B23)
Store(0,STA) STA = 0
} }
} }
Method (_STA, 0, NotSerialized) /* _STA: Status */ Method (_STA, 0, NotSerialized) /* _STA: Status */
@ -369,7 +369,7 @@ Scope (\_SB.PCI0.I2C5)
Name (STA, Zero) Name (STA, Zero)
Method (_ON, 0, Serialized) /* Front camera_ON_: Power On */ Method (_ON, 0, Serialized) /* Front camera_ON_: Power On */
{ {
If ((STA == Zero)) If (STA == 0)
{ {
/* Enable IMG_CLK */ /* Enable IMG_CLK */
MCON(1,1) /* Clock 1, 19.2MHz */ MCON(1,1) /* Clock 1, 19.2MHz */
@ -389,12 +389,12 @@ Scope (\_SB.PCI0.I2C5)
STXS(GPP_H12) STXS(GPP_H12)
Sleep(1) /* t2 */ Sleep(1) /* t2 */
Store(1,STA) STA = 1
} }
} }
Method (_OFF, 0, Serialized) /* Front camera_OFF_: Power Off */ Method (_OFF, 0, Serialized) /* Front camera_OFF_: Power Off */
{ {
If ((STA == One)) If (STA == 1)
{ {
/* Disable IMG_CLK */ /* Disable IMG_CLK */
Sleep(1) /* t0+t1 */ Sleep(1) /* t0+t1 */
@ -410,7 +410,7 @@ Scope (\_SB.PCI0.I2C5)
CTXS(GPP_R6) CTXS(GPP_R6)
#endif #endif
Store(0,STA) STA = 0
} }
} }
Method (_STA, 0, NotSerialized) /* _STA: Status */ Method (_STA, 0, NotSerialized) /* _STA: Status */