https://github.com/torvalds/linux
Revision 12701ce524bc9b7c6345a2425208501fd2c62aad authored by Badhri Jagan Sridharan on 10 May 2021, 21:17:56 UTC, committed by Greg Kroah-Hartman on 13 May 2021, 13:01:04 UTC
This is a regression introduced by 1373fefc6243 ("usb: typec: tcpm:
Allow slow charging loops to comply to pSnkStby")

When Source advertises Rp-default, tcpm would request 500mA when in
SINK_DISCOVERY, Type-C spec advises the sink to follow BC1.2 current
limits when Rp-default is advertised.
[12750.503381] Requesting mux state 1, usb-role 2, orientation 1
[12750.503837] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS]
[12751.003891] state change SNK_STARTUP -> SNK_DISCOVERY
[12751.003900] Setting voltage/current limit 5000 mV 500 mA

This patch restores the behavior where the tcpm would request 0mA when
Rp-default is advertised by the source.
[   73.174252] Requesting mux state 1, usb-role 2, orientation 1
[   73.174749] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS]
[   73.674800] state change SNK_STARTUP -> SNK_DISCOVERY
[   73.674808] Setting voltage/current limit 5000 mV 0 mA

During SNK_DISCOVERY, Cap the current limit to PD_P_SNK_STDBY_MW / 5 only
for slow_charger_loop case.

Fixes: 1373fefc6243 ("usb: typec: tcpm: Allow slow charging loops to comply to pSnkStby")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20210510211756.3346954-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3c12878
History
Tip revision: 12701ce524bc9b7c6345a2425208501fd2c62aad authored by Badhri Jagan Sridharan on 10 May 2021, 21:17:56 UTC
usb: typec: tcpm: Fix SINK_DISCOVERY current limit for Rp-default
Tip revision: 12701ce
File Mode Size
booting.rst -rw-r--r-- 5.5 KB
bootwrapper.rst -rw-r--r-- 6.6 KB
cpu_families.rst -rw-r--r-- 6.2 KB
cpu_features.rst -rw-r--r-- 2.7 KB
cxl.rst -rw-r--r-- 15.8 KB
cxlflash.rst -rw-r--r-- 21.6 KB
dawr-power9.rst -rw-r--r-- 3.4 KB
dscr.rst -rw-r--r-- 3.4 KB
eeh-pci-error-recovery.rst -rw-r--r-- 14.9 KB
elfnote.rst -rw-r--r-- 1.3 KB
features.rst -rw-r--r-- 94 bytes
firmware-assisted-dump.rst -rw-r--r-- 16.8 KB
hvcs.rst -rw-r--r-- 22.5 KB
imc.rst -rw-r--r-- 6.3 KB
index.rst -rw-r--r-- 602 bytes
isa-versions.rst -rw-r--r-- 2.1 KB
kaslr-booke32.rst -rw-r--r-- 1.7 KB
mpc52xx.rst -rw-r--r-- 1.2 KB
papr_hcalls.rst -rw-r--r-- 14.4 KB
pci_iov_resource_on_powernv.rst -rw-r--r-- 14.6 KB
pmu-ebb.rst -rw-r--r-- 5.3 KB
ptrace.rst -rw-r--r-- 6.1 KB
qe_firmware.rst -rw-r--r-- 12.9 KB
syscall64-abi.rst -rw-r--r-- 6.0 KB
transactional_memory.rst -rw-r--r-- 11.1 KB
ultravisor.rst -rw-r--r-- 33.8 KB
vas-api.rst -rw-r--r-- 10.7 KB
vcpudispatch_stats.rst -rw-r--r-- 3.0 KB

back to top