| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we have definitions for HPD IRQ and level in the mux flags, extend
this to the HPD update function in the usb_mux structure as well.
BRANCH=None
BUG=b:172222942
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I19c3a65fc821a341338d73fabd7876339b37fe7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3095437
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some muxes may need to be re-set after they've power cycled, and many
muxes are tied to the S5 power rails. Introduce a flag which can be
used to indicate a mux needs to re-run init and is no longer in LPM
after the G3 state has been hit.
BRANCH=None
BUG=b:195045790
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I8bd4184dbea629edf106dbee32f811620ebda0dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3093086
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, only the virtual mux driver uses the mux ACK feature, but the
actual wait for the host command ACK is a part of the usb_mux general
code. Generalize this mux ACK wait so it's available if needed in the
future for more muxes.
Additionally, moving this wait out of the mux set will allow us to lock
the muxes intelligently between tasks, without keeping the muxes locked
during the inactive ACK wait.
BRANCH=None
BUG=b:172222942,b:186777984
TEST=tast typec.Mode*.manual on voxel
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I61a043425a482cc6f3170548c888d91ec20c2a82
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078411
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With dark resume enabled, disconnect latch flag is obsolete
BUG=None
BRANCH=None
TEST=Swapping Type C devices in s0ix works
Signed-off-by: Ayushee Shah <ayushee.shah@intel.com>
Change-Id: Ica1b55f820f5b3fff5b7dabf88ca57ac0993f246
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2846417
Reviewed-by: Madhusudanarao Amara <madhusudanarao.amara@intel.corp-partner.google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds the driver for the PS8822 usb demux. Currently, the
driver only supports the expected usb mux driver methods. It is
expected that any EQ setting functions would be board specific, though
more register definitions would need to be added to the .h file.
BUG=b:175660576
BRANCH=None
TEST=Connect on host port and then read back mode register to confirm
that it's been set as expected.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: Ic425ffe41f4653cee7f5500b081d7b5f6ad1a3df
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2247361
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added one field to struct usb_mux_driver, which returns true if
retimer update is supported.
Moved query function from usb_retimer_fw_update.c to usb_mux.c.
BUG=b:162528867
BRANCH=none
TEST=Tested on Voxel, together with related coreboot and kernel changes.
EC returns correct port information to kernel.
Signed-off-by: li feng <li1.feng@intel.com>
Change-Id: I5cab34a14adbf0470cffe6a13234ad53b6f6a90c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2651866
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FP6 USB mux driver is similar to the FP5 USB mux driver, but uses two
addresses instead of an index to select the different USB ports. Also a
low power bit has been added to the control register.
Datasheet can be found in the bug.
BUG=b:177057723
TEST=Build
BRANCH=None
Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I94a3db5f7d643a17dfdf89d721dd7f14cb75e402
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2654387
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the Type-C devices are connected in S0 and when DUT enters S3/S0ix,
if the type-C devices are disconnected and re-connected, Kernel won't
receive the disconnected state from EC once DUT boots to S0 as EC moves
on and updates the new connected state to Kernel Mux driver.
This leads to failure of Type-C device detection on resuming to S0
from S3/S0iX. To overcome this scenario, adding an explicit condition
to send previous disconnect state to Kernel Mux driver once initial mux
request is received upon resuming from S3/S0iX.
Missing Disconnect mode Patch Details:
Set disconnect latch flag for the init and disconnect requests
For AP to EC PD command: EC_CMD_USB_PD_CONTROL
-Check disconnect latch flag if it is true set pd.enabled = 0
For AP to EC mux command: EC_CMD_USB_PD_MUX_INFO
-Check the disconnect latch flag if it is true then send disconnect mode
-Reset the disconnect latch flag
-Send host event EC_HOST_EVENT_USB_MUX for configuring the virtual mux
with the latest Mux configuration
BUG=b:176604380
BRANCH=None
TEST=Type C devices in s0ix disconnect/connect or
swapping across the ports scenarios tested
Change-Id: Ic38d3632cb0fadb29393405e13ed3606a740c81e
Signed-off-by: Madhusudanarao Amara <madhusudanarao.amara@intel.corp-partner.google.com>
Signed-off-by: Ayushee Shah <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2632551
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TUSB1064 driver code is modified to implement a real usb_mux driver.
This part is a UFP side (RX Equalizer) USB-C switch contrary to most
other usb_mux part we have (used in the DFP).
It is used in the servo_v4p1.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=b:168621142
BRANCH=servo
TEST=use the sink mode enabled by 'cc pdsnk', connect to a USB-C Chromebook
try both video output on USB-C->mini-DP and USB 3.0.
Change-Id: Ie15d246ba7b6601db0d387e8ffda54f0ec36ba99
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2416764
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This header file is used from quite a few files, relying on the EC
build system to find includes in the driver/tcpm directory. For Zephyr
we don't want to add that as an include.
It makes more sense for header files to be in an include directory, so
move it and fix up the users.
BUG=b:175434113
BRANCH=none
TEST=build Zephyr and ECOS on volteer
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I5851914b1a7d3fdc1ba911c0fbe9046afbaf6f5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597985
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:158960403
BRANCH=none
TEST=USB3 works after AP reboot
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Ia6ec65ad38933106e183747e78827d564be5aefd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2314033
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split ps874x.[ch] into ps8740.[ch] and ps8743.[ch]
since we need to support both at runtime for Dalboz.
I left PS8742 in ps8740.[ch] since it is not very different.
BUG=b:153454399
BRANCH=none
TEST=make -j buildall
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I92b02e08f377d1781c130a0bbe1482a936ad7a4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2151647
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in driver
Added software IN_HPD control
Added compile time optional debug
in board specific tune function in usb_retimer
Added gain control
Added DP lane control
BUG=b:146394157
BRANCH=none
TEST=verify USB-C1 DP and USB connections
Change-Id: Ida0cc243413b8fa469d3edb706040535e4a3f0e0
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2031645
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:145796172
BRANCH=none
TEST=make buildall -j
Change-Id: Ie4ffaf208745764262931501f0dff77b525a4e59
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2017569
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
combine the optional control variables into a union of
structures to reduce the amount of space needed for a
particular board type.
BUG=b:147593165
BRANCH=none
TEST=make buildall -j
Change-Id: If02c4c8065f4570aba210c3e34b30bc0d5c7a852
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2001134
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modified the USB MUX common driver to correctly configure the
retimer data based on the current USB MUX info.
BUG=b:145943811
BRANCH=none
TEST=DP works on Volteer
Change-Id: I5f37bcc0647f07b94fd9ee33913610cf6ae70c80
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1992842
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Pericom PI3USB30532 usb mux driver will actually also work for the
PI3USB31532. This commit renames the driver to reflect this while also
adding the PI3USB31532 to the list of supported USB muxes.
BUG=b:146654043
BRANCH=None
TEST=`make -j buildall`
Change-Id: Ic8e2852a3e038b05eb18d1d9db210b7fdce957d7
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1990362
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support both OPT1 DB with PS8818 retimer, and OPT3 DB with
PS8802 retimer, try both, and remember the first one that succeeds.
BUG=b:138682132, b:143147353
BRANCH=none
TEST=USB3 device enumerates as 5G on Trembyle OPT1 and OPT3 USB-C1
Change-Id: I9a78801dc35c19f97fc015b739b105541c41e1d5
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980392
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to Analogix ANX7440 USB Type-C USB mux with
integrated Re-timers for USB3.1/DisplayPort
BRANCH=none
BUG=b:146683781
TEST=make buildall -j
verify the mux functionality with reference platform
Change-Id: I7847e67025385ca6ea044ee72da143c8e52e65cf
Signed-off-by: Divagar Mohandass <divagar.mohandass@intel.com>
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980089
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thunderbolt is a hardware interface that allows connection of external
peripherals to a computer. This code enables thunderbolt 3 over Type-C
interface. Thunderbolt provides concurrent support for PCIe transactions
and DisplayPort and the thunderbolt controller provides isochronous
communication on a single network style interface, allowing a Host
computer to communicate at high bandwidth with multiple data/display
devices through a single physical connection.
The USB Type-C specification allows for Alternate Modes to be supported
on the connector and cables. This CL adds a Discovery flow to determine
if an Thunderbolt Alternate Mode is supported and a mechanism for
switching in thunderbolt mode.
TBT USB PD flow:
-------------------Explicit contact---------------------
Discover Identity(SOP) ---- Modal operation supported?
|
---------- ACK -----|---- NACK --- Disable TBT
|
Discover Identity(SOP') --- Check and store response
(CL:1707851 and CL:1553898)
|
Is cable super speed?
-------- Yes -------|----- No ---- Disable TBT
|
Discover SVID (SOP) -------- SVID == 0x8087?
|
------------- Yes -----|------ No ---- Disable TBT
|
Discover SVID (SOP') -------- SVID == 0x8087?
|
----------- yes------- | - No - Limit TBT to passive Gen 2
|
Discover Mode (SOP) ------ Store device response
---------------|
|
Discover Mode (SOP') ----- Store cable response
|
Enter Safe mode
|
Active cable?
--------- Yes -----|-------- No ---------
| |
Enter TBT mode (SOP' SOP" SOP) Enter TBT mode SOP
(Note: This is not implemented in this CL)
BUG=b:140643923
BRANCH=none
TEST=Tested on Tglrvp-u able to enter into Thunderbolt-compatible mode &
Non Thunderbolt-compatible devices are detected as per their spec.
Change-Id: I65ed86e9f32d36fe8e30c3285f516b9871f3e119
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1926379
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:145560203
BRANCH=none
TEST=BB retimer can communicate via I2C
Change-Id: Ibc9b61d909ff1d07794e13927796e26aa1e53e03
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1947427
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplified the usb_mux_get() function and made the MUX info
prints same as in ectool.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: Iefb16e1dbd323afbe248b06fe9c53abc63be9a67
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1931284
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed the driver interface for BB virtual mux retimer to
stop using global functions and use the usb_retimers array
instead.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I56befaca1720eb2f4e0599a983629b4df45dc76b
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928121
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:139428185
BRANCH=none
TEST=verify mode is set correctly when switching devices
Change-Id: I3e40e0321cb1026180b7edc0bfe99439c13acafb
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1922062
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:139428185
BRANCH=none
TEST=verify mode is set correctly when switching devices
Change-Id: Ic9d460a94bb8007f17168ac5237a4dcbc24cfb2b
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1900123
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:138600585
BRANCH=none
TEST=build
Change-Id: I547309c7000e7d3ca8549a7e626a63789665305d
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868921
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before entering into alternate mode, state of the USB-C MUX needs to be
in safe mode so that the USB-C pins cab be re-purposed without getting
damaged or do not damage their Port Partner. Hence, sending the DP
safe mode info to virtual MUX from EC.
BUG=b:139140865
BRANCH=none
TEST=Manually tested on Intel RVP, MUX is able to configure to safe mode
before entering alternate mode.
Change-Id: I3715b5118112b7744407ac5e652f63f6d7cd0a1b
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1745540
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The extentions were added to make the compiler perform most
of the verification that the conversion was being done correctly
to remove 8bit addressing as the standard I2C/SPI address type.
Now that the compiler has verified the code, the extra
extentions are being removed
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
TEST=verify sensor functionality on arcada_ish
Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Opt for 7bit slave addresses in EC code. If 8bit is
expected by a driver, make it local and show this in
the naming.
Use __7b, __7bf and __8b as name extensions for i2c/spi
addresses used in the EC codebase. __7b indicates a
7bit address by itself. __7bf indicates a 7bit address
with optional flags attached. __8b indicates a 8bit
address by itself.
Allow space for 10bit addresses, even though this is
not currently being used by any of our attached
devices.
These extensions are for verification purposes only and
will be removed in the last pass of this ticket. I want
to make sure the variable names reflect the type to help
eliminate future 7/8/7-flags confusion.
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
Change-Id: I2fc3d1b52ce76184492b2aaff3060f486ca45f45
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699893
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ran the following command:
git grep -l 'Copyright (c)' | \
xargs sed -i 's/Copyright (c)/Copyright/g'
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Requested for linux integration, use BIT instead of 1 <<
First step replace bit operation with operand containing only digits.
Fix an error in motion_lid try to set bit 31 of a signed integer.
BUG=None
BRANCH=None
TEST=compile
Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1518659
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do not need to set the port_addr variable most places because the
SS-MUX is also the TCPC and the tcpc_config_t information is used
instead.
Remove unused variable setting to avoid confusion.
BRANCH=none
BUG=none
TEST=buildall. phaser USB-C communication (and muxs) still work which is
a nominal case for all of these changes.
Change-Id: I72ee5da251956eb133091974e8dce5ac7f8787c6
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1200064
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This converts the compile time option of
CONFIG_USB_PD_TCPM_TCPCI_MUX_ONLY into a runtime option to better
support draggon egg designs and reduce CONFIG complexity in general.
Introduce new mux_read/write to read from tcpc_config_t or mux driver
depending on new flag setting.
Audited all mux drivers for any use of tcpc_read/write and updated to
mux_read/write.
BRANCH=none
BUG=b:110937880
TEST=On Bip with CL stack:
Verified by connecting DP monitor at boot;
Verified plug / unplug of DP cable works;
Change-Id: I968893b886ff0ccc4074beae5ec42973814ae77c
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1200062
Commit-Ready: Gaggery Tsai <gaggery.tsai@intel.corp-partner.google.com>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After implementing this new method twice, I realized that the
enter_low_power_mode method did not need to be configured at the board
level so it can move to the more common mux driver.
BRANCH=none
BUG=none
TEST=bip low power mux operation still works
Change-Id: I33d7191ae22da089972929eb60b3bae568a2c447
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1169904
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is useful when the PS8751 is used solely as a SS MUX and not a
TCPC. It will not get the normal low power mode commands from the PD
state machine. We need to issue separate low power command and
re-initialization for it. This CL is setting up the machinery for the
child CL that uses it for bip.
BRANCH=none
BUG=b:111664205,b:111876407
TEST=verify that lower power mode is issued for bip with CL stack along
with the reinitialization when exiting low power mode.
Change-Id: Ida09568acf1f353298520f75505f726d95309c57
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1153834
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is a combination of flags and also represents typec_mux enum.
BRANCH=none
BUG=none
TEST=none
Change-Id: Ib44f41af6c99f62d76fe29230c82b64537ff0665
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1037423
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to use the PS8751 as the USB mux without configuring
it as the TCPC. Add mode that allows passing in i2c port
and address instead using tcpc_config_t values.
BRANCH=none
BUG=b:78341944
TEST=build using bip
Change-Id: I45b420ef890dfa8c5e5052864b7a2bb66d8734d6
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1024486
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support the ITE IT5205 Type-C USB alternate mode mux.
BRANCH=none
BUG=none
TEST=1. Successfully verify chip ID.
2. Verify set_mux() and get_mux() functions set and return
consistent values.
3. The mux control register setting as expected after set_mux().
Change-Id: I9ff066dc9e74683df1371b70290e2aeaa86cb96b
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/741211
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge PS8743 & PS8740 as PS874X as both the drivers are almost same.
BUG=b:64598680
BRANCH=glkrvp
TEST=make buildall -j
On GLKRVP, verify mux setting is correct with
Apple dongle (VGA + USB) and Pluggable adapter.
Change-Id: Ic6d31979936ee213b07c4c71859809102ee91452
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/612209
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initial patch for supporting PS8743 USB Type-C
Redriving Switch for USB Host / DisplayPort.
BUG=b:64598680
BRANCH=glkrvp
TEST=On GLKRVP, verify mux setting is correct with
Apple dongle (VGA + USB) and Pluggable adapter.
Change-Id: Ib45e328fc9ef6ccc410cef4550086be95ef17e8a
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/506810
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PS8751 does not restore all register contents when resuming
from low power mode. This change makes tcpm call board_init
when it stops auto-toggling so that register contents can be
restored.
BUG=b:35585399
BRACH=none
TEST=On Snappy, the board_init funciton is called every time a device
is plugged in and register contents are restored.
Change-Id: I50c51334f43c02e3c4d8453e1e966bf6eb3ce769
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/454139
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an HPD IRQ event is seen, make note of it and keep the status set
until informing the host.
BUG=chrome-os-partner:55925
BRANCH=None
TEST=Manual on kevin, trigger HPD event, verify that event bit is set in
reply to first host command and not subsequent host commands.
Change-Id: I0900a683dcb344d5d4d03a1fa6e3d8de913597b2
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/366990
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For designs where the host SOC is responsible for setting the USB-C SS
mux, the EC must track the desired mux state and inform the host when
the desired state changes. Then, the host must ask the EC for the new
desired state and set the mux accordingly.
BUG=chrome-os-partner:52639
BRANCH=None
TEST=Manual on gru with subsequent commit.
Attach USB dongle in port 1 and DP dongle in port 0, then verify `ectool
usbpdmuxinfo` output:
Port 0: DP
Port 1: USB
Flip DP dongle and verify output changes:
Port 0: DP INV
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I6a99ce93a76c3197f9195cfaa25c5217d09aeb75
Reviewed-on: https://chromium-review.googlesource.com/355281
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=On Amenia TR1.2, tested with HDMI to Type-C dongle. Both Analogix
and Parade ports have HDMI on extended display.
Change-Id: Ifb95c289019063a8a24d135e3b3a09cb4d446210
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Signed-off-by: li feng <li1.feng@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/348881
Commit-Ready: Li1 Feng <li1.feng@intel.com>
Tested-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TCPCI specification defines ane optional register
18h 'CONFIG_STANDARD_OUTPUT' providing a standardized way
of steering the high-speed muxes.
Implement the feature as a usb_mux_driver, under the conditional flag
CONFIG_USB_PD_TCPM_MUX.
The USB PD port index should be set in the port_addr field of the
'usb_mux' structure.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:49605
TEST=run pdeval-stm32f072 connected to a Parade PS8751 board and test USB/DP
muxing.
Change-Id: I7e5f0b8ec70b1910b2cff9d106514baca8c899e5
Reviewed-on: https://chromium-review.googlesource.com/322956
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a callback for board specific initialization that is called
after the driver init function. This will allow a board to apply
port-specific tuning (such as USB EQ settings) to the mux chip.
BUG=chrome-os-partner:47074
BRANCH=none
TEST=build and boot on chell
Change-Id: Ib162f9a2c5239678c46b80e5517823b336f6b66c
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/313746
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move function to set D+/D- switches from board directory to
usb_charger module.
BUG=none
BRANCH=strago
TEST=make -j buildall
Change-Id: I5c5997c799cecea90448444863167af860a8f3e1
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/290421
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initial support for Parade PS8740 Type-C redriving switch.
BUG=chrome-os-partner:41696
TEST=Manual on Glados in subsequent commit. Verify set() and get()
functions set and return consistent values. Verify that USB SS device
functions when muxes are set to dock or USB.
BRANCH=None
Change-Id: Iedbe53cc76f30ecd969c2ca99a7377ed3b193729
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/282280
Reviewed-by: Alec Berg <alecaberg@chromium.org>
|
|
In preparation for adding support for additional USB-C mux chips, add a
new high-level USB-C mux interface usb_mux.c. usb_mux functions are now
called from pd code instead of board-level functions. usb_mux calls down
into a mux chip-specific driver (currently pi3usb30532) or
board-specific drivers which toggle GPIOs (for legacy boards).
BUG=chrome-os-partner:41696
TEST=Manual on Glados in subsequent commit. Verify set() and get()
functions set and return consistent values. Verify that USB SS device
functions when muxes are set to dock or USB. Also, verify that DP
dongle and USB SS device are functional on both PD ports on samus_pd.
BRANCH=None
Change-Id: Ib6477f489310f3be1430585ea09fea26f57e3752
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/281435
Reviewed-by: Alec Berg <alecaberg@chromium.org>
|