mbox series

[V1,0/8] Tegra XUSB charger detect support

Message ID 1584527467-8058-1-git-send-email-nkristam@nvidia.com (mailing list archive)
Headers show
Series Tegra XUSB charger detect support | expand

Message

Nagarjuna Kristam March 18, 2020, 10:30 a.m. UTC
This patch series adds charger detect support on XUSB hardware used in
Tegra210 and Tegra186 SoCs.

This patchset is composed with :
 - dt bindings of XUSB Pad Controller
 - Tegra XUSB device mode driver to add vbus_draw support 
 - Tegra PHY driver for charger detect support

Tests done:
 - Connect USB cable from ubuntu host to micro-B port of DUT to detect
   SDP_TYPE charger
 - Connect USB cable from external powered USB hub(which inturn connects
   to ubuntu host) to micro-B port of DUT to detect CDP_TYPE charger.
 - Connect USB cable from USB charger to micro-B port of DUT to detect
   DCP_TYPE charger.
DUT: Jetson-tx1, Jetson tx2.

Nagarjuna Kristam (8):
  dt-bindings: phy: tegra-xusb: Add charger-detect property
  usb: gadget: tegra-xudc: Add vbus_draw support
  phy: tegra: xusb: Add support for UTMI pad power control
  phy: tegra: xusb: Add USB2 pad power control support for Tegra210
  phy: tegra: xusb: Add soc ops API to enable UTMI PAD protection
  phy: tegra: xusb: Add support for charger detect
  phy: tegra: xusb: Enable charger detect for Tegra186
  phy: tegra: xusb: Enable charger detect for Tegra210

 .../bindings/phy/nvidia,tegra124-xusb-padctl.txt   |   4 +
 drivers/phy/tegra/Makefile                         |   2 +-
 drivers/phy/tegra/xusb-tegra-cd.c                  | 300 +++++++++++++++++++++
 drivers/phy/tegra/xusb-tegra186.c                  |  92 +++++--
 drivers/phy/tegra/xusb-tegra210.c                  | 222 +++++++++++----
 drivers/phy/tegra/xusb.c                           |  80 ++++++
 drivers/phy/tegra/xusb.h                           |  22 ++
 drivers/usb/gadget/udc/tegra-xudc.c                |  16 ++
 8 files changed, 653 insertions(+), 85 deletions(-)
 create mode 100644 drivers/phy/tegra/xusb-tegra-cd.c

Comments

Felipe Balbi March 29, 2020, 10:40 a.m. UTC | #1
Nagarjuna Kristam <nkristam@nvidia.com> writes:

> This patch series adds charger detect support on XUSB hardware used in
> Tegra210 and Tegra186 SoCs.
>
> This patchset is composed with :
>  - dt bindings of XUSB Pad Controller
>  - Tegra XUSB device mode driver to add vbus_draw support 
>  - Tegra PHY driver for charger detect support
>
> Tests done:
>  - Connect USB cable from ubuntu host to micro-B port of DUT to detect
>    SDP_TYPE charger
>  - Connect USB cable from external powered USB hub(which inturn connects
>    to ubuntu host) to micro-B port of DUT to detect CDP_TYPE charger.
>  - Connect USB cable from USB charger to micro-B port of DUT to detect
>    DCP_TYPE charger.
> DUT: Jetson-tx1, Jetson tx2.
>
> Nagarjuna Kristam (8):
>   dt-bindings: phy: tegra-xusb: Add charger-detect property
>   usb: gadget: tegra-xudc: Add vbus_draw support
>   phy: tegra: xusb: Add support for UTMI pad power control
>   phy: tegra: xusb: Add USB2 pad power control support for Tegra210
>   phy: tegra: xusb: Add soc ops API to enable UTMI PAD protection
>   phy: tegra: xusb: Add support for charger detect
>   phy: tegra: xusb: Enable charger detect for Tegra186
>   phy: tegra: xusb: Enable charger detect for Tegra210

this doesn't apply cleanly. Could you resend after -rc1 is tagged?
Nagarjuna Kristam March 30, 2020, 8:46 a.m. UTC | #2
On 29-03-2020 16:10, Felipe Balbi wrote:
>> This patch series adds charger detect support on XUSB hardware used in
>> Tegra210 and Tegra186 SoCs.
>>
>> This patchset is composed with :
>>   - dt bindings of XUSB Pad Controller
>>   - Tegra XUSB device mode driver to add vbus_draw support
>>   - Tegra PHY driver for charger detect support
>>
>> Tests done:
>>   - Connect USB cable from ubuntu host to micro-B port of DUT to detect
>>     SDP_TYPE charger
>>   - Connect USB cable from external powered USB hub(which inturn connects
>>     to ubuntu host) to micro-B port of DUT to detect CDP_TYPE charger.
>>   - Connect USB cable from USB charger to micro-B port of DUT to detect
>>     DCP_TYPE charger.
>> DUT: Jetson-tx1, Jetson tx2.
>>
>> Nagarjuna Kristam (8):
>>    dt-bindings: phy: tegra-xusb: Add charger-detect property
>>    usb: gadget: tegra-xudc: Add vbus_draw support
>>    phy: tegra: xusb: Add support for UTMI pad power control
>>    phy: tegra: xusb: Add USB2 pad power control support for Tegra210
>>    phy: tegra: xusb: Add soc ops API to enable UTMI PAD protection
>>    phy: tegra: xusb: Add support for charger detect
>>    phy: tegra: xusb: Enable charger detect for Tegra186
>>    phy: tegra: xusb: Enable charger detect for Tegra210
> this doesn't apply cleanly. Could you resend after -rc1 is tagged?
> 
> -- balbi

Sure, will send rebased patch once rc1 is available.

Thanks,
Nagarjuna
Felipe Balbi March 30, 2020, 10:07 a.m. UTC | #3
Hi,

Nagarjuna Kristam <nkristam@nvidia.com> writes:
> On 29-03-2020 16:10, Felipe Balbi wrote:
>>> This patch series adds charger detect support on XUSB hardware used in
>>> Tegra210 and Tegra186 SoCs.
>>>
>>> This patchset is composed with :
>>>   - dt bindings of XUSB Pad Controller
>>>   - Tegra XUSB device mode driver to add vbus_draw support
>>>   - Tegra PHY driver for charger detect support
>>>
>>> Tests done:
>>>   - Connect USB cable from ubuntu host to micro-B port of DUT to detect
>>>     SDP_TYPE charger
>>>   - Connect USB cable from external powered USB hub(which inturn connects
>>>     to ubuntu host) to micro-B port of DUT to detect CDP_TYPE charger.
>>>   - Connect USB cable from USB charger to micro-B port of DUT to detect
>>>     DCP_TYPE charger.
>>> DUT: Jetson-tx1, Jetson tx2.
>>>
>>> Nagarjuna Kristam (8):
>>>    dt-bindings: phy: tegra-xusb: Add charger-detect property
>>>    usb: gadget: tegra-xudc: Add vbus_draw support
>>>    phy: tegra: xusb: Add support for UTMI pad power control
>>>    phy: tegra: xusb: Add USB2 pad power control support for Tegra210
>>>    phy: tegra: xusb: Add soc ops API to enable UTMI PAD protection
>>>    phy: tegra: xusb: Add support for charger detect
>>>    phy: tegra: xusb: Enable charger detect for Tegra186
>>>    phy: tegra: xusb: Enable charger detect for Tegra210
>> this doesn't apply cleanly. Could you resend after -rc1 is tagged?
>> 
>> -- balbi
>
> Sure, will send rebased patch once rc1 is available.

Thank you