usb: pd: Adapt to new charger detection flow
In sink mode charger will start PD right away, so BC1.2 detected
type will not be known yet. To determine when to start USB peripheral
stack we can do this several ways:
- In case of PD capable source, bit 26 in the first PDO of the
Source Capabilities indicates USB Communications Capable. Start
peripheral stack in case this is set
- Similarly for source mode, the Request RDO has an equivalent bit.
This can be used to determine whether to enable USB data in
DR Swap and even turn off host stack in source mode.
- In case of non-PD capable source which is determined after 3
failed hard reset attempts, the REAL_TYPE property will be
set following policy engine setting PD_ACTIVE to 0. If this
type is SDP/CDP/FLOAT, start the peripheral stack.
- In case of non-PD legacy cable, power_supply property PE_START
will be 0 but REAL_TYPE will be populated. Same as above.
Change-Id: I9ef65b37da9063635afc95f0faf19054bc7d389f
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment