1
0
Fork 0
alistair23-linux/include
Badhri Jagan Sridharan 47ab020f32 usb: typec: tcpm: During PR_SWAP, source caps should be sent only after tSwapSourceStart
[ Upstream commit 6bbe2a90a0 ]

The patch addresses the compliance test failures while running
TD.PD.CP.E3, TD.PD.CP.E4, TD.PD.CP.E5 of the "Deterministic PD
Compliance MOI" test plan published in https://www.usb.org/usbc.
For a product to be Type-C compliant, it's expected that these tests
are run on usb.org certified Type-C compliance tester as mentioned in
https://www.usb.org/usbc.

The purpose of the tests TD.PD.CP.E3, TD.PD.CP.E4, TD.PD.CP.E5 is to
verify the PR_SWAP response of the device. While doing so, the test
asserts that Source Capabilities message is NOT received from the test
device within tSwapSourceStart min (20 ms) from the time the last bit
of GoodCRC corresponding to the RS_RDY message sent by the UUT was
sent. If it does then the test fails.

This is in line with the requirements from the USB Power Delivery
Specification Revision 3.0, Version 1.2:
"6.6.8.1 SwapSourceStartTimer
The SwapSourceStartTimer Shall be used by the new Source, after a
Power Role Swap or Fast Role Swap, to ensure that it does not send
Source_Capabilities Message before the new Sink is ready to receive
the
Source_Capabilities Message. The new Source Shall Not send the
Source_Capabilities Message earlier than tSwapSourceStart after the
last bit of the EOP of GoodCRC Message sent in response to the PS_RDY
Message sent by the new Source indicating that its power supply is
ready."

The patch makes sure that TCPM does not send the Source_Capabilities
Message within tSwapSourceStart(20ms) by transitioning into
SRC_STARTUP only after  tSwapSourceStart(20ms).

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200817183828.1895015-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-05 11:43:15 +01:00
..
acpi x86: ACPI: fix CPU hotplug deadlock 2020-04-23 10:36:38 +02:00
asm-generic bpf: Prevent .BTF section elimination 2020-10-14 10:32:58 +02:00
clocksource clocksource/drivers/hyperv: Enable TSC page clocksource on 32bit 2019-08-23 16:59:54 +02:00
crypto crypto: algif_aead - Only wake up when ctx->more is zero 2020-08-21 13:05:30 +02:00
drm drm/drm_fb_helper: fix fbdev with sparc64 2020-08-11 15:33:37 +02:00
dt-bindings clk: imx8mn: Fix incorrect clock defines 2020-03-18 07:17:55 +01:00
keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
kvm KVM: arm/arm64: vgic: Use a single IO device per redistributor 2019-08-25 11:02:52 +01:00
linux usb: typec: tcpm: During PR_SWAP, source caps should be sent only after tSwapSourceStart 2020-11-05 11:43:15 +01:00
math-emu nds32: Mark expected switch fall-throughs 2019-08-29 11:06:56 -05:00
media media: rc: add keymap for Videostrong KII Pro 2020-04-17 10:49:59 +02:00
misc
net netfilter: nftables_offload: KASAN slab-out-of-bounds Read in nft_flow_rule_create 2020-11-01 12:01:01 +01:00
pcmcia
ras
rdma RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz() 2020-10-29 09:57:47 +01:00
scsi scsi: target: core: Add CONTROL field for trace events 2020-10-29 09:58:04 +01:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:47:47 +02:00
sound ALSA: hda: fix jack detection with Realtek codecs when in D3 2020-10-29 09:57:25 +01:00
target scsi: target: fix hang when multiple threads try to destroy the same iscsi session 2020-04-21 09:05:04 +02:00
trace scsi: target: core: Add CONTROL field for trace events 2020-10-29 09:58:04 +01:00
uapi media: videodev2.h: RGB BT2020 and HSV are always full range 2020-11-05 11:43:15 +01:00
vdso
video fbdev: da8xx: remove panel_power_ctrl() callback from platform data 2019-08-26 17:53:58 +05:30
xen xen/events: add a new "late EOI" evtchn framework 2020-11-05 11:43:10 +01:00