mbox series

[v6,0/2] TCPM non-PD mode

Message ID 20210804081917.3390341-1-kyletso@google.com
Headers show
Series TCPM non-PD mode | expand

Message

Kyle Tso Aug. 4, 2021, 8:19 a.m. UTC
(changed the property name only)

The reason for this patch is to let the device/system policy decide
whether PD is going to be supported using devicetree properties.

A new dt property "pd-disable" is introduced and TCPM uses this
property as a flag to decide whether PD is supported. If the flag is
false (the dt property is not present), the RX functionality of the
low-level driver will not be enabled. The power negotiation related
states will be skipped as well. If the flag is true, everything is a
what it was before.

If "pd-disable" is present, and the port is SRC or DRP, another
existing dt property "typec-power-opmode" needs to be specified to
indicate which Rp value should be used when the port is SRC.

changes since v5:
dt-bindings: connector: Add pd-disable property
- Changed the property name to "pd-disable"

usb: typec: tcpm: Support non-PD mode
- Changed the property name to "pd-disable"
- Added Acked-by tag

Kyle Tso (2):
  dt-bindings: connector: Add pd-disable property
  usb: typec: tcpm: Support non-PD mode

 .../bindings/connector/usb-connector.yaml     |  4 +
 drivers/usb/typec/tcpm/tcpm.c                 | 87 +++++++++++++++----
 2 files changed, 72 insertions(+), 19 deletions(-)

Comments

Rob Herring (Arm) Aug. 11, 2021, 6:52 p.m. UTC | #1
On Wed, 04 Aug 2021 16:19:16 +0800, Kyle Tso wrote:
> Set "pd-disable" property if the Type-C connector has no power
> delivery support.
> 
> Signed-off-by: Kyle Tso <kyletso@google.com>
> ---
> Changes since v5:
> - Changed the property name to "pd-disable"
> 
>  .../devicetree/bindings/connector/usb-connector.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>