You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mchp/lfw: make sure we keep the EC on for long operations
Over the past six months with this patch set, I've observed one
troubling behavior: the power button would not always work when the
machine was powered completely off (EC off) and I clicked the power
button.
It turns out that the power buttons control VCI_IN[01] and that the
VBAT-powered control interface is configured to drive GPIO250 as VCI_OUT
based on the status of those inputs. Now, GPIO250 is also known as EC_ON
on hx20/30: it controls whether 3VL_EC is on.
The MEC1521 manual recommends the following example of using VCI_OUT on
a "mobile platform" (abbreviated):
1. A coin cell battery is installed, powering VBAT
2. The power button on VCI_IN0# is pushed causing VCI_OUT to be
asserted, powering the VTR rail
3. The EC reconfigured VCI so that firmware controls the VCI_OUT pin.
Now, the EC is doing this over in vci_task (hx20/hx30), which is long
after LFW has started and jumped to main firmware. The problem is,
restoring access to RO and RW images via properly configuring the SPI
flash pins' alt mode causes us to try to read from flash on startup.
Reading from flash is slightly slower, so we extend the period of time
between step 2 and 3 where 3VL_EC is only driven by VCI_IN0#. When the
user releases the power button during that window, 3CL_EC is cut and the
EC shuts down.
This patch fixes the issue by asserting firmware control of VCI_OUT as
early as is safe in lfw.
0 commit comments