| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DPS can behave badly (and is likely to do so) if the configuration doesn't
match actual system characteristics. Existing platforms using DPS seems to
all use the same configuration (possibly because they use the same
charger), but the need for correct configuration could be made clearer.
This rewords the kconfig help for DPS enablement to better describe what
it will do, and what is necessary for a platform to make it work well.
BUG=b:259859051
TEST=zmake build -a
BRANCH=none
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I481be89d8a00b90e15d01a5c7c8eedbbf057589e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4044793
Reviewed-by: Edward Hill <ecgh@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a type-c state machine framework for the Device Policy
Manager (dpm) layer of USB-PD. This CL is focused just on adding the
state machine policy and minimizing any changes in the existing DPM
support functions.
Because the DPM is no longer being called directly from the PE layer,
an interlock mechanism is used to control when the DPM state machine
will take any actions.
This CL also renames include/usb_pd_dpm.h to include/usb_pd_dpm_sm.h
to be consistent with include file naming for the other TCPMv2 layer
state machine include files.
BUG=b:194504052
BRANCH=none
TEST=Verified that mode entry/exit is successful for DP, TBT, and
USB4 on Voxel.
ectool typeccontrol <port> 0 -> exit mode
ectool typeccontrol <port> 2 0 -> DP
ectool typeccontrol <port> 2 1 -> TBT
ectool typeccontrol <port> 2 2 -> USB4
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I196d342b031b96874d354610182be79eac613d00
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3922467
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define Kconfig entries for CONFIG_USB_PD_FLAGS and
CONFIG_USB_PD_RUNTIME_FLAGS. Add corresponding translations to the shim
layer.
BUG=b:255413715
TEST=zmake build herobrine
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Iea89f9feb8d2154db2da30d9cc504a6673d46659
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3975943
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CONFIG will be used to gate behavior for the tidal flow feature
where we allow the AP to drive our VDMs. For now, the CONFIG does
nothing.
BRANCH=None
BUG=b:208884535
TEST=CQ+1
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I11b4b34ebc9e77129569e4ade0de9243ded3dfeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3953478
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent PD specifications require that devices with multiple DFPs respond
to Discover Identity commands, even if they don't support any modes as
responder. This implements a default handler for those commands
appropriate for such devices that reports DFP-only operation, enabled by
config and default-on for devices that aren't DRDs nor need extra SVDM
support (such as for USB4 or TBT).
This is implemented only for Zephyr (no equivalent implementation for
legacy EC-OS) because it is expected that new devices which might
benefit from it will all be using Zephyr.
BUG=b:242671457
TEST=nereid now responds to Discover Identity, new test passes
BRANCH=none
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I2d11ced6928ae65ca00d20a1646509281080243b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3868882
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_USB_PD_TBT_COMPAT_MODE is default-disabled for EC-OS builds, so
do the same for Zephyr. This makes it much easier to discover which
devices support TBT mode by requiring positive confirmation of support,
rather than relying on projects to disable it if not supported which may
be less likely for developers to notice.
Projects that appear to support TBT mode but don't explicitly enable it
are changed to enable it to avoid any undesired configuration change.
BUG=none
TEST=zmake testall
BRANCH=none
Change-Id: Iedc40f5529e6e7f1f9d4605b5364fd76b957934b
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3915747
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_USB_PD_USB4 is default-disabled for EC-OS builds, so do the same
for Zephyr. This makes it much easier to discover which devices support
USB4 by requiring positive confirmation of support, rather than relying
on projects to disable it if not supported which may be less likely for
developers to notice.
Projects that do support USB4 (or may support it but it's difficult to
tell either way) now have it enabled explicitly.
BUG=none
TEST=zmake testall
BRANCH=none
Change-Id: Ib281f15cbb2cfbbaf0c5c3dbb2658405bbfbd423
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3915746
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EC-OS config.h disables CONFIG_USB_PD_USB32_DRD by default, so update
the Zephyr kconfig to match. Most devices are DFP-only, but the USB3.2
DRD option is currently only used on devices that support USB4 and only
affects reported capabilities in Enter_USB messages so this
misconfiguration will usually not be noticed.
Existing projects that support USB4 and either don't disable DRD support
explicitly or enable it in EC-OS builds are changed to explicitly enable
this option, to avoid unexpected configuration changes for those projects.
BUG=none
TEST=zmake testall
BRANCH=none
Change-Id: Ib2191b960aed77ab2801c27a60c48cb4339cf558
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3915745
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally we don't do this, but enough changes have accumulated that
we're doing a tree-wide one-off update of the name & style.
BRANCH=none
BUG=chromium:1098010
TEST=`repo upload` works
Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently a USB PD power button can only be used wake a device which is
shutdown. To account for devices which use a USB PD power button and
cannot enable a HID interface, this CL adds USB PD power button support
to Suspend and On power states. When a device is either suspended or on,
a short USB PD power button press will simulate a 500ms power button
press and a long USB PD power button press will shutdown the device.
BUG=b:236022894
TEST=make try_build_boards, make runhosttests and zmake test
test-drivers. Also working interactively with a dock that supports
sending alerts on button presses.
BRANCH=None
Signed-off-by: Jameson Thies <jthies@google.com>
Change-Id: I3a8adaa01dbf07a03b0e1451d3a5af5d5f39c442
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3794615
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow setting an initial (default) debug level without
disabling the higher debug levels or other debug info
such as state names etc.
BUG=b:240541974
TEST=zmake build nivviks; flash & run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I4a9fc49c4a6bab0115ce7a54cda0d20d7a351dd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791284
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced in USB PD 3.1, Alert messages can now carry information about
power button presses and releases. This CL updates the EC to receive
button press alert messages from the partner and use them to trigger
startup when the device is off.
BUG=b:236022894
TEST=make try_build_boards, make runhosttests and zmake test
test-drivers. Also working interactively with a dock that supports
sending alerts on button presses.
BRANCH=None
Signed-off-by: Jameson Thies <jthies@google.com>
Change-Id: I425babb537e1fa47962791c0debb7b622fe3c5bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3703163
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Status message defined in the USB PD Rev 3.0 specification has 2
fields related to a devices operating temperature. (1) internal
temperature and (2) temperature status. This CL updates the
dpm_get_status_msg function in usb_pd_dpm.c to fill those fields based
on a Chromebook's temperature sensors. The PD_TEMP_SENSOR config defines
which temperature sensor is used.
BUG=b:227236917
TEST=triggered Alert->Get_Status->Status sequence and observed
temperature field matches temperature readings from "ectool temps all"
Also, "make runhosttests" and "make try_build_boards"
BRANCH=None
Signed-off-by: Jameson Thies <jthies@google.com>
Change-Id: Ic190a1357d951adf740a4ac2f1ff957a04e36478
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3587979
Reviewed-by: Diana Z <dzigterman@chromium.org>
Tested-by: Jameson Thies <jthies@google.com>
Commit-Queue: Jameson Thies <jthies@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PLATFORM_EC_USB_PD_PORT_MAX_COUNT config can be get based on dts.
PLATFORM_EC_USB_PD_PORT_MAX_COUNT equals a number of instances with
"named-usbc-port" compatible.
BUG=b:176237074
TEST=zmake testall && make buildall
BRANCH=main
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: If66ef429f4b9070e95b9631247423392c811f916
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3539940
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Port config dynamic PDO selection to zephyr.
BUG=b:206709593
TEST=enable DPS on herobrine and build
BRANCH=none
Change-Id: I2ee111c086625fe3b4972b490b64b68f122aefb4
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522248
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Eric Yilun Lin <yllin@google.com>
Auto-Submit: Eric Yilun Lin <yllin@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:220704808
TEST=zmake config -b herobrine
BRANCH=main
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: Ide3e0aebfcbe4234b13315f69fcf9015133b86bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3499542
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
Split PD Kconfig options from Kconfig.usbc and place
in a separate file named Kconfig.pd.
BUG=b:194432779
TEST=Verified Kconfig options with menuconfig
BRANCH=main
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: Ied3c0f157caf208460161a1c6937a58aac0930c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3445498
Reviewed-by: Keith Short <keithshort@chromium.org>
|