mb/google/volteer: Separate power resource for VCM
The camera privacy LED blinks during the boot and this gives a wrong impression to the users that the camera is being used during the power up. The blink happens when the camera module is probed and a series of kernel patches and coreboot patches are being submitted to resolve the issue. The kernel patches are submitted to the chromium gerrit. https://chromium-review.googlesource.com/2403386 https://chromium-review.googlesource.com/2403387 https://chromium-review.googlesource.com/2403385 https://chromium-review.googlesource.com/2403384 https://chromium-review.googlesource.com/2403383 https://chromium-review.googlesource.com/2403382 https://chromium-review.googlesource.com/2403381 https://chromium-review.googlesource.com/2403380 This is to separate the power resource for the VCM so that it can be controlled by the driver and suppress the LED turn on. BUG=b:169049942 BRANCH=none TEST=Build and boot volteer board. Monitor camera privacy LED and check if it blinks. It should not blink. Signed-off-by: Daniel Kang <daniel.h.kang@intel.com> Change-Id: Id51c98e42c5f20e231d8096c9d2d98deebc7c968 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45159 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Tomasz Figa <tfiga@google.com>
This commit is contained in:
parent
b3e9aaf62b
commit
8661fe220d
|
@ -146,12 +146,12 @@ Scope (\_SB.PCI0.IPU0)
|
||||||
|
|
||||||
Scope (\_SB.PCI0.I2C3)
|
Scope (\_SB.PCI0.I2C3)
|
||||||
{
|
{
|
||||||
|
/* Reference counter to track power control by RCAM and VCM */
|
||||||
|
Name (REFC, 0)
|
||||||
PowerResource (RCPR, 0x00, 0x0000)
|
PowerResource (RCPR, 0x00, 0x0000)
|
||||||
{
|
{
|
||||||
Name (STA, Zero)
|
Name (STA, 0)
|
||||||
Method (_ON, 0, Serialized) /* Rear camera_ON_: Power On */
|
Method (_ON, 0, Serialized) /* Rear camera_ON_: Power On */
|
||||||
{
|
|
||||||
If ((STA == Zero))
|
|
||||||
{
|
{
|
||||||
/* Enable IMG_CLK */
|
/* Enable IMG_CLK */
|
||||||
MCON(3,1) /* Clock 3, 19.2MHz */
|
MCON(3,1) /* Clock 3, 19.2MHz */
|
||||||
|
@ -166,10 +166,15 @@ Scope (\_SB.PCI0.I2C3)
|
||||||
/* Pull SNRPWR_EN high */
|
/* Pull SNRPWR_EN high */
|
||||||
STXS(GPP_H14)
|
STXS(GPP_H14)
|
||||||
|
|
||||||
|
If (REFC == 0)
|
||||||
|
{
|
||||||
/* Pull PWREN high */
|
/* Pull PWREN high */
|
||||||
STXS(GPP_H20)
|
STXS(GPP_H20)
|
||||||
|
}
|
||||||
Sleep(2) /* reset pulse width */
|
Sleep(2) /* reset pulse width */
|
||||||
|
|
||||||
|
REFC++
|
||||||
|
|
||||||
/* Pull RST high */
|
/* Pull RST high */
|
||||||
#if CONFIG(BOARD_GOOGLE_VOLTEER)
|
#if CONFIG(BOARD_GOOGLE_VOLTEER)
|
||||||
STXS(GPP_F15)
|
STXS(GPP_F15)
|
||||||
|
@ -178,12 +183,9 @@ Scope (\_SB.PCI0.I2C3)
|
||||||
#endif
|
#endif
|
||||||
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))
|
|
||||||
{
|
{
|
||||||
/* Disable IMG_CLK */
|
/* Disable IMG_CLK */
|
||||||
Sleep(1) /* t0+t1 */
|
Sleep(1) /* t0+t1 */
|
||||||
|
@ -196,14 +198,17 @@ Scope (\_SB.PCI0.I2C3)
|
||||||
CTXS(GPP_D4)
|
CTXS(GPP_D4)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
If (REFC == 1)
|
||||||
|
{
|
||||||
/* Pull PWREN low */
|
/* Pull PWREN low */
|
||||||
CTXS(GPP_H20)
|
CTXS(GPP_H20)
|
||||||
|
}
|
||||||
|
REFC--
|
||||||
|
|
||||||
/* Pull SNRPWR_EN low */
|
/* Pull SNRPWR_EN low */
|
||||||
CTXS(GPP_H14)
|
CTXS(GPP_H14)
|
||||||
|
|
||||||
Store(0,STA)
|
STA = 0
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Method (_STA, 0, NotSerialized) /* _STA: Status */
|
Method (_STA, 0, NotSerialized) /* _STA: Status */
|
||||||
{
|
{
|
||||||
|
@ -339,6 +344,35 @@ Scope (\_SB.PCI0.I2C3)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PowerResource (VCPR, 0x00, 0x0000)
|
||||||
|
{
|
||||||
|
Name (STA, 0)
|
||||||
|
Method (_ON, 0, Serialized) /* VCPR_ON_: VCM Power On */
|
||||||
|
{
|
||||||
|
If (REFC == 0)
|
||||||
|
{
|
||||||
|
/* Pull PWREN high */
|
||||||
|
STXS(GPP_H20)
|
||||||
|
}
|
||||||
|
REFC++
|
||||||
|
STA = 1
|
||||||
|
}
|
||||||
|
Method (_OFF, 0, Serialized) /* VCPR_OFF: VCM Power Off */
|
||||||
|
{
|
||||||
|
If (REFC == 1)
|
||||||
|
{
|
||||||
|
/* Pull PWREN low */
|
||||||
|
CTXS(GPP_H20)
|
||||||
|
}
|
||||||
|
REFC--
|
||||||
|
STA = 0
|
||||||
|
}
|
||||||
|
Method (_STA, 0, NotSerialized) /* _STA: Status */
|
||||||
|
{
|
||||||
|
Return (STA)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Device (VCM0)
|
Device (VCM0)
|
||||||
{
|
{
|
||||||
Name (_HID, "PRP0001") /* _HID: Hardware ID */
|
Name (_HID, "PRP0001") /* _HID: Hardware ID */
|
||||||
|
@ -361,11 +395,11 @@ Scope (\_SB.PCI0.I2C3)
|
||||||
})
|
})
|
||||||
Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */
|
Name (_PR0, Package (0x01) /* _PR0: Power Resources for D0 */
|
||||||
{
|
{
|
||||||
RCPR
|
VCPR
|
||||||
})
|
})
|
||||||
Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */
|
Name (_PR3, Package (0x01) /* _PR3: Power Resources for D3hot */
|
||||||
{
|
{
|
||||||
RCPR
|
VCPR
|
||||||
})
|
})
|
||||||
Name (_DSD, Package (0x02) /* _DSD: Device-Specific Data */
|
Name (_DSD, Package (0x02) /* _DSD: Device-Specific Data */
|
||||||
{
|
{
|
||||||
|
@ -455,12 +489,12 @@ Scope (\_SB.PCI0.I2C3)
|
||||||
|
|
||||||
Scope (\_SB.PCI0.I2C2)
|
Scope (\_SB.PCI0.I2C2)
|
||||||
{
|
{
|
||||||
|
Name (STA, Zero)
|
||||||
PowerResource (FCPR, 0x00, 0x0000)
|
PowerResource (FCPR, 0x00, 0x0000)
|
||||||
{
|
{
|
||||||
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(2,1) /* Clock 2, 19.2MHz */
|
MCON(2,1) /* Clock 2, 19.2MHz */
|
||||||
|
@ -479,12 +513,12 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
STXS(GPP_D4)
|
STXS(GPP_D4)
|
||||||
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 */
|
||||||
|
@ -499,7 +533,7 @@ Scope (\_SB.PCI0.I2C2)
|
||||||
/* Pull SNRPWR_EN low */
|
/* Pull SNRPWR_EN low */
|
||||||
CTXS(GPP_D18)
|
CTXS(GPP_D18)
|
||||||
|
|
||||||
Store(0,STA)
|
STA = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Method (_STA, 0, NotSerialized) /* _STA: Status */
|
Method (_STA, 0, NotSerialized) /* _STA: Status */
|
||||||
|
|
Loading…
Reference in New Issue