| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Latency for powering off VCCIO needs to be lower than we can reliably
achieve using the regular state machine. Add a fast path via a
specialized interrupt to do the S0->S3 transition that should have lower
latency (low enough to satisfy the relevant timing requirements).
BRANCH=None
BUG=b:155672968
TEST=Verified shutdown_s0_rails() runs on S3 interrupt with low latency,
measured timing is now in spec.
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I2753d3490bbefc8f6fccba6cc90e808c969e53b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2182109
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ANX3447 TCPC DRP auto-toggle does not appear to be reliable.
Disable the DRP auto-toggle (the state machine falls back
to trying SNK/SRC alternatively).
As a separate issue, doe to a state machine error, the
low power TCPC mode also has to be disabled.
BUG=b:155253129
TEST=Unplug and plug various type-C USB devices into puff board.
BRANCH=none
Change-Id: I1fcb32ebe98caccee26aca3ed4b92e9c557557dc
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2178698
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add debug register dump for TCPC.
Also add status interrupt function for PPC.
BUG=b:155369400
TEST=Build and run on puff.
BRANCH=none
Change-Id: I652416bf1ffd5c7bc5bf85c7716fe934077b7fbe
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2173928
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AP requires near-instant response when turning on the S0 rails
coming out of suspend; using an interrupt directly helps, but latency is
still 30-60 uS and causes AP hangs when it's too slow.
To reduce the latency further, make two changes:
* Increase the interrupt priority for that GPIO bank to reduce jitter.
* Move the interrupt definition to the top of the GPIO file so the
dispatcher in npcx/gpio.c needs to scan the minimum number of entries
to find the appropriate ISR.
I haven't been able to directly measure the new latency, but it seems
much more stable. Without this I observe a resume failure rate of around
0.8%, and it appears to be less than 0.01% with this change.
BUG=b:152377365
TEST=suspend_stress_test passed 10000 cycles
BRANCH=None
Change-Id: Ia0f6122209a653b6304028806add0c2226574c2f
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2152029
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:152267803
BRANCH=none
TEST=Check fan tacho.
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I993da17dd51dee7b3ffb174635346f6b9b1a51b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2152031
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
modify fan_rpm_0
rpm_min=2400
rpm_start=2400
rpm_max=4000
BUG=b:153589525
BRANCH=none
TEST=make buildall -j
Change-Id: I69411522c7e11172e8095dcc0b4c46850334d749
Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2141374
Reviewed-by: Peter Ou <peter.ou@quanta.corp-partner.google.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Peter Ou <peter.ou@quanta.corp-partner.google.com>
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While I believe this was working correctly before, without explicitly
enabling the interrupt now it won't fire when the barrel jack is
connected when the system is powered but off (such as when a low-power
USB-C power source is attached).
BUG=b:153283569
TEST=Puff detects barrel jack connection while in "insufficient power"
state.
BRANCH=None
Change-Id: Id8c4c5707401d1ad834424542a68e10af09821fa
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2138733
Reviewed-by: Sam McNally <sammc@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Puff currently uses EFS1. This patch upgrades EFS to V2.
Signed-off-by: dnojiri <dnojiri@chromium.org>
BUG=b/147298634
BRANCH=none
TEST=Verify software sync on Puff.
Cq-Depend: chromium:2132693
Change-Id: I23de5b46c6e82577569246bd9cd8952e82a6b2f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2132870
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Tested-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The three USB device configurations describe more than just the Type-C
layer, so remove the _TYPEC part within the define. This is also in
preparation to change how the usbc build.mk includes files.
This was performed with the following commands:
$ git grep --name-only CONFIG_USB_TYPEC_DRP_ACC_TRYSRC | xargs perl -i
-ple 's/CONFIG_USB_TYPEC_DRP_ACC_TRYSRC/CONFIG_USB_DRP_ACC_TRYSRC/g'
$ git grep --name-only CONFIG_USB_TYPEC_CTVPD | xargs perl -i -ple
's/CONFIG_USB_TYPEC_CTVPD/CONFIG_USB_CTVPD/g'
$ git grep --name-only CONFIG_USB_TYPEC_VPD | xargs perl -i -ple
's/CONFIG_USB_TYPEC_VPD/CONFIG_USB_VPD/g'
BRANCH=none
BUG=none
TEST=builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I4deab784b7c3479cffd3dee7fb3ea3c8a9d6081c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121193
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EC_CMD_EFS_VERIFY causes a stack overflow. Use a 2k stack for the
hostcmd task like fizz to avoid this.
BUG=b:150742950
TEST=puff can sync RW EC and boot
BRANCH=none
Signed-off-by: Sam McNally <sammc@chromium.org>
Change-Id: I8defe34a4ae2a7c5f8276e9caa73295794ac2db7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086390
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes retimers appear as generic muxes. By allowing a
chain of muxes they can be stacked up to the new configurations
that zork requires and will continue to work as they did before
on configurations that only have a single mux.
The code used to have two different arrays, 1) muxes and 2)
retimers. On one of the zork configurations the processor
MUX stopped being the primary mux and the retimer took its
place. In a different configuration of that same platform
it left the primary and secondary alone but the mux_set
FLIP operation had to be ignored. Since the same
interfaces needed to be available for both it stopped making
sense to have two different structures and two different
methods of handling them. This consolodates the two into
one.
The platforms that do not have retimers, this change will
not make any difference. For platforms like zork, it will
remove the retimers and make them chained muxes. So
testing on trembyle makes sense to verify,
BUG=b:147593660
BRANCH=none
TEST=verify USB still works on trembyle
Change-Id: I286cf1e302f9bd3dd7e81098ec08514a2a009fe3
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2066794
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current use of the PD Config Flags are a bit confusing and
has been changed to the following:
The CONFIG_USB_POWER_DELIVERY flag is used to enable and disable
the TCPMv1 and TCPMv2 stacks. And when CONFIG_USB_POWER_DELIVERY
is enabled, one of the following must be enabled:
CONFIG_USB_PD_TCPMV1 - legacy power delivery state machine
CONFIG_USB_PD_TCPMV2 - current power delivery state machine
BUG=b:149993808
BRANCH=none
TEST=make -j buildall
Change-Id: Ie3f8615a75b15b4f1c703f57f3db9e152a471238
Signed-off-by: Sam Hurst <shurst@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2068519
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're running out of flash space, so disable the console command help
strings since they're not strictly required.
BRANCH=none
BUG=b:146447208
TEST=make buildall -j
Change-Id: I3c3ce780aafc36bc0b355150d85cc5e4d93245ac
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2065492
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The action_delay_sec field hasn't actually been referenced by
any code since 2013. Removing the corresponding struct field.
BUG=None
BRANCH=None
TEST=builds
Change-Id: Ia7334c26b85d0161ff61bb51fbdda61bb921595a
Signed-off-by: Diana Z <dzigterman@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2054945
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:147255678, b:147265554
TEST=Relevant bugs are fixed
BRANCH=None
Cq-Depend: chromium:2039504, chromium:2036592
Change-Id: I052ff0e9b6cec7359781eecdbabf8f93dedc74dd
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2035431
Reviewed-by: Sam McNally <sammc@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EFS v1 allowed Chromeboxes to verify RW without AP. EFS v2 will bring
the benefts to Chromebooks, which are:
- Reduce RO dependency and presence. Allow more code to be updated
in the fields.
- Remove jumptag and workarounds needed for late sysjump.
Major imporvements over v1 are:
- No A/B slot required.
- No signature in RW or public key in RO.
- Rollback-attack protection.
- Verifies only RW being used instead of whole RW section.
For battery-equipped devices, additional benefts are:
- Immediate boot on drained battery.
- Support recovery mode regardless of battery condition.
- Faster charge in S5/G3.
EC-Cr50 communication is based on the shared UART (go/ec-cr50-comm).
EFS2 is documented in go/ec-efs2.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=chromium:1045217,chromium:141143112
BRANCH=none
TEST=Boot Helios in NORMAL/NO_BOOT/NO_BOOT_RECOVERY/RECOVERY mode.
TEST=Wake up EC from hibernate.
TEST=Make EC assert PACKET_MODE to wake up Cr50 from deepsleep.
Change-Id: I98a4fe1ecc59d106810a75daec3c424f953ff880
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2015357
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TEST=Verified proto can turn off the relevant core rails:
* Pretend to be an EVT board: ectool cbi set 0 1
* Reboot EC
* Drop to S0ix: echo freeze > /sys/power/state
* Verify CPU_C10_GATE is asserted (powerindebug) and EN_S0_RAILS
is deasserted (gpioget EN_S0_RAILS)
* Wake system and ensure it resumes correctly
BUG=b:144719399
BRANCH=None
Change-Id: I8e4158ffac38461e8679ac49a084b4296bcef210
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2035432
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Matching the SNS_PP3300 entry, the |factor_div| field should multiply by
the voltage divider numerator rather than divide.
BRANCH=none
BUG=b:148634825
TEST=make buildall; ectool usbpdpower reports correct voltage
Change-Id: I1dd654229f027852ca818410d4883bd4daab55ae
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2032544
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EDS expects VCCST_PWRGD to remain low until VCCST and VDDQ are
stable and within specification. From a fresh EC boot, this seems
unlikely so default to low.
BRANCH=none
BUG=b:148042540
TEST=make buildall; puff cold boot succeeds consistently on a dut where
it previously failed consistently
Change-Id: I827714f5c4d563a205941ee2d3b2d5c781439cdb
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2024252
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the AP does SW sync with the EC, it can make the EC reset (sysjump)
while the AP is on. This would cause us to incorrectly forget what
charge port was active because we didn't allow any changes while the
AP was on, even if the EC didn't have a current state.
Change port selection policy to allow changes while the AP is on,
provided no port is currently selected and the request agrees with the
state of the hardware.
BUG=b:148036160
TEST=chgsup now remains unchanged after sysjump with the AP on, port
changes remain forbidden.
BRANCH=None
Change-Id: Ibf1d4de2298a9a5e631af457d8618cb0accd5e08
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2014561
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the puff EC GPIO definitions to include EVT changes.
BRANCH=none
BUG=b:147983217
TEST=Ran on puff.
Change-Id: I9fa911881dfbd705ee8e264d7f55576b45b80893
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2014003
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also ensure we set the required power to the intended value, and remove
useless charger-related items.
BUG=b:146515963
TEST=LED blinks and does not boot when given 7.5W on USB-C.
BRANCH=None
Change-Id: I34df8f1cbf6648ef2007fc34c620ae1d2021f7a8
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2009526
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
powerd logs lots of warnings if it can't see any online power supplies,
which could be the case when the EC comes up without the barrel jack
then boots with it- the host flag never gets updated.
Since we don't have a battery on puff and we don't allow switching power
sources while the system is on (we gate the inactive one), just always
say there is external power (because there is).
BUG=b:147977614
TEST=/sys/class/power_supply/AC/online is now always 1, even when
running on USB-C.
BRANCH=None
Change-Id: I87345b8a3f07a88f2dccda4b7226bf0b8ee07e2f
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2009529
Reviewed-by: Sam McNally <sammc@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They seem to be fine as-is; no further changes required.
BUG=b:146031922, b:143501304
TEST=None; no code changes
BRANCH=None
Change-Id: I4d10c57d34f1f1e53e5fbcb994c4ae1403fb8a98
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2009527
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On puff with TCPMv2 enabled, the type C mux is not being configured to
allow USB 3. Disable TCPMv2 for now to unblock testing.
BRANCH=None
BUG=b:147255678
TEST=make buildall
Change-Id: I5cd45c8d05c22b5720619942cd124c04d2cca7f2
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2002989
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of potential callers that care if there is a battery,
but for boards that don't support batteries (chromeboxes) we can let
them skip implementing this stub.
Tests default to battery present, but they can provide their own
per-test implementation if desired.
Some PD battery presence checks have been disabled when battery support
is disabled; these are irrelevant when there is no battery, and they
cause linking failures because they depend on both the charge manager
and battery presence.
BUG=b:146504182
BRANCH=none
TEST=buildall
Change-Id: Ifad6a9e356c8ac2146b09bc83b359a7c55adc1a7
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980099
Reviewed-by: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configs mostly copied from fizz.
TEST=booted on hardware, observed successful jump to RW.
BRANCH=none
BUG=b:146504182
Change-Id: Icf2925b92fea848efcd705bb5274d1afc91d2513
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1977079
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The charge manager requires that we accept such a transition, even
though it doesn't really make sense for a batteryless board. This is
okay because it only requests this change if the only available charging
port doesn't support PD, which means we definitely don't have enough
power to boot the AP.
BRANCH=none
TEST=hardware no longer resets endlessly when plugged into non-PD source
BUG=b:146515963,b:143975429
Change-Id: I45da0cd16949f9f73ede19a411694c132248b99d
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985725
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There isn't an external pull-up on the barrel jack detect switch, so we
need to use an on-chip one to ensure we detect when the barrel jack is
removed. Otherwise the input is pulled down when connected and floating
when disconnected.
BRANCH=none
TEST=chgsup reports expected values after (dis)connecting barrel jack
with USB-C connected.
BUG=b:143975429
Change-Id: I1e287ef02a8c1365ebe4208769b2dc56ee5d2e71
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985724
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the board function to enable type C power sourcing.
BUG=b:146031922
TEST=Verified on puff, plugged in phone to charge.
BRANCH=none
Change-Id: I4dbdc9d5e5103e48b2d163ccfb841ae615957d0c
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985727
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Puff uses the ANX3447 variant of the ANX7447 TCPC.
This part has no support for OCM flash, so there is no
need to have a command to erase this flash.
BRANCH=none
TEST=verified on puff h/w
BUG=b:147113023
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I1409dea863ee908c5592d576d7c6ffd7def0ad04
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985723
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some EC GPIO interrupts are enabled by common code,
and some need to be explicitly enabled by puff code.
Ensure that all EC GPIO interrupts are enabled.
BRANCH=none
TEST=Verified on puff h/w.
BUG=b:147068623
Change-Id: Iab8c705402840340d37b33f15a1323f6566b8adc
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984154
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The common x86 state machine does this, but the EC-controlled sequencing
did not. Since trying to boot the AP without enough power will cause
the system to brown out, we need to do it too.
TEST=boot prevented on hardware
BRANCH=none
BUG=b:146515963
Change-Id: I7dbe6ab962fbe47d4d866be98d4174291c757c72
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980104
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TCPC and TCPPC interrupts on the EC are not enabled.
Enable them.
BUG=b:146985348
TEST=Confirm that interrupts now occur.
BRANCH=none
Change-Id: If50a5a315289baf4ff5e5f64582432c7538cbb96
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984142
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We let the charge controller decide which port to use, watching the
presence signal to tell the charge control what is connected. We only
allow switching the input when the system is off, since switching may
cause us to brown out.
This is mostly copied from Fizz; I'm unsure if we need to do anything
with the TCPPC when switching (Fizz has a GPIO that physically connects
or disconnects the type-C port).
BUG=b:143975429
TEST=booted on hardware, verified chgsup output with barrel jack
BRANCH=None
Change-Id: I6d2f8365c03aa44f272195708dd534fdc35cd2f6
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1958387
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the PD stack never even sees that the port is connected to
begin negotiation.
BUG=b:146504182
TEST=ran on hardware, verified VBUS detected
BRANCH=none
Change-Id: I96f7f643e064501e2dcc3716fa917d92bb456d7a
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1978989
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MST has two open drain disable GPIOs, one wired to the EC
and one to the CPU.
Fix the EC GPIO so that it doesn't disable the MST by default.
BRANCH=none
BUG=b:146368608
TEST=EC buildall, ran on puff.
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Idf3673f2c01896a3e69bc0d0ab4e2bea3a1b8951
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980098
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure LED power and alert/critical states turn on the LEDs.
BRANCH=none
BUG=b:146523469
TEST=Verify on puff
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Ic20e366f60b2a32ffeef270a3a1aaee6a05ed031
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1977065
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the default debug state for host command debug
messages to off since they can get noisy.
BRANCH=none
BUG=b:143035166
TEST=Ran on puff
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Ia9491b727a81d970c2006b94e5be33cda306bce3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1975091
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Detect when the temperature sensors are not powered to avoid
getting an incorrect temperature reading (and inadvertently
enabling the fan).
BRANCH=none
BUG=b:146088059
TEST=checked on puff.
Change-Id: Iee2655bb255b86b13e0eb910e7e5b06b104ddcc6
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1973270
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not a battery-powered device, so we don't want to hibernate- it
makes the system unresponsive to the power button.
BUG=b:146357732
TEST=still builds
BRANCH=none
Change-Id: I54e6f198dc34352c8e2093b6ea870859cc043a46
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1970811
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed CONFIG_BRINGUP from EC config since now
puff can boot through to depthcarge.
BRANCH=none
BUG=b:143035166
TEST=EC buildall
Change-Id: I921fcce6f9eb3afc0f85e5ec500e91d3bcb6cef0
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1966182
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the configuration and support for the USB Type C power
delivery, at least enough for proto.
BRANCH=none
BUG=b:143256147
TEST=EC buildall, tests
Change-Id: I8b1c2f27b31ba163716d8a50b76ad967260ae2f2
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1958250
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a board specific usb_pd_policy.c file that contains a lot of
code for handling DisplayPort Alternate mode, Google Firmware Update
Alternate mode, as well as some PD policy functions such as deciding to
Accept or Reject a data role swap or a power role swap. Several boards
simply copy/paste this code from project to project as a lot of this
functionality is not actually board specific.
This commit tries to refactor this by pulling the functions that are not
mainly board specific into common code. The functions are made
overridable such that boards that truly do require a different
implementation may do so.
Additionally, this consolidation changes the policy behaviour for some
boards, but they should be for the better. Some examples include that
data swaps are always allowed if we are a UFP (no system image
requirement), power swaps are allowed to become a sink if we are no
longer dual role (e.g. - in suspend), and DisplayPort Alternate Mode is
not entered if the AP is off.
In order to facilitate this refactor, a couple CONFIG_* options were
introduced:
- CONFIG_USB_PD_DP_HPD_GPIO
/* HPD is sent to the GPU from the EC via a GPIO */
- CONFIG_USB_PD_CUSTOM_VDO
/*
* Define this if a board needs custom SNK and/or SRC PDOs.
*
* The default SRC PDO is a fixed 5V/1.5A with PDO_FIXED_FLAGS indicating
* Dual-Role power, USB Communication Capable, and Dual-Role data.
*
* The default SNK PDOs are:
* - Fixed 5V/500mA with the same PDO_FIXED_FLAGS
* - Variable (non-battery) min 4.75V, max PD_MAX_VOLTAGE_MV,
* operational current PD_MAX_CURRENT_MA,
* - Battery min 4.75V, max PD_MAX_VOLTAGE_MV, operational power
* PD_OPERATING_POWER_MW
*/
BUG=chromium:1021724,b:141458448
BRANCH=<as many as we can that are still supported>
TEST=`make -j buildall`
TEST=Flash a kohaku, verify that DP Alt Mode still works with a variety
of DP peripherals
TEST=Repeat above with a nocturne
TEST=Repeat above with an atlas
Change-Id: I18fd7e22dc77fe1dc6c21c38cd7f1bc53cae86cb
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1949052
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A first go at the power sequencing needed for Puff. This abuses the
Intel common power code a little bit because we don't actually have all
the inputs it assumes, but that seems preferable to replacing it
wholesale.
The one limitation right now is inability to detect transitions on the
rails that we only have analog monitoring on; either we need to design
a way to monitor those, or decide that detecting dropouts on those rails
is unimportant.
BUG=b:143188569
TEST=still builds
BRANCH=None
Change-Id: Ia960f5dd2ccfb1ca2c7d4107ba4e3737adc8f69f
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1925787
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EC watches current limiting on the USB and HDMI ports to keep system
load on the 5V rail within the limits of the regulator. The EC's goal is
to ensure that any single future state change (connecting or
disconnecting a port) doesn't push the 5V rail overcurrent.
Verification is done via symbolic execution with Klee; ensuring that
there exists no state where plugging something into a port with no
further changes would put us over the power budget. Sample verification
output:
> KLEE: Using Z3 solver backend
>
> KLEE: done: total instructions = 4439
> KLEE: done: completed paths = 30
> KLEE: done: generated tests = 30
v2: convert ad-hoc state space exploration for verification to symbolic
execution, allowing port control code to be reused for both.
BUG=b:143190102
TEST=make buildall
BRANCH=none
Change-Id: If06e319c8d38bd11b29a7e69499d40357176a97e
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1911261
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The schematic has changed to 9.31k / 47k resistors on this input.
BUG=b:1829597655
TEST=still builds
BRANCH=None
Change-Id: I2856df05b2611edd30d497a35bb871b8f5b173e9
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1935467
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:143188569
TEST=make buildall still succeeds
BRANCH=none
Change-Id: I9193878c65b20293fad5914af88ea4e49be369a8
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913939
Reviewed-by: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add config for INA3221 power monitor sensors.
BRANCH=none
BUG=b:144127082
TEST=EC buildall
Change-Id: I87b3da86403b0ec7314b4084bc710c59f019930d
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1915481
Tested-by: Andrew McRae <amcrae@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The latest version of puff has an extra USB-A port, so add
the overcurrent GPIO allocated to it.
BRANCH=none
BUG=b:143190102
TEST=EC buildall
Change-Id: I1a08856ec2249cc9537cd72503aff20b789fc925
Signed-off-by: Andrew McRae <amcrae@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1913220
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
|