Re: [PATCH v4 00/18] Add Qualcomm PMIC TPCM support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bryan,

On Sat Mar 18, 2023 at 1:18 PM CET, Bryan O'Donoghue wrote:
> Bryan O'Donoghue (17):
>   dt-bindings: regulator: qcom,usb-vbus-regulator: Mark reg as required
>   dt-bindings: regulator: qcom,usb-vbus-regulator: Mark
>     regulator-*-microamp required
>   dt-bindings: phy: qcom,sc7180-qmp-usb3-dp-phy: Add orientation-switch
>     as optional
>   dt-bindings: phy: qcom,sc7180-qmp-usb3-dp-phy: Add port as an optional
>   dt-bindings: usb: Add qcom,pmic-typec dt-binding header
>   dt-bindings: usb: Add Qualcomm PMIC Type-C controller YAML schema
>   dt-bindings: usb: Add qcom,pmic-pdphy dt-binding header
>   dt-bindings: usb: Add Qualcomm PMIC PDPHY controller YAML schema
>   dt-bindings: usb: Add Qualcomm PMIC TCPM YAML schema
>   dt-bindings: mfd: qcom,spmi-pmic: Add pdphy to SPMI device types
>   dt-bindings: mfd: qcom,spmi-pmic: Add typec to SPMI device types
>   usb: typec: qcom: Add Qualcomm PMIC TCPM support
>   arm64: dts: qcom: pm8150b: Add a TCPM description
>   arm64: dts: qcom: qrb5165-rb5: Switch on Type-C VBUS boost
>   arm64: dts: qcom: qrb5165-rb5: Switch on basic TCPM
>   arm64: dts: qcom: qrb5165-rb5: Switch on TCPM usb-role-switching for
>     usb_1
>   arm64: dts: qcom: qrb5165-rb5: Switch on TCPM orientation-switch for
>     usb_1_qmpphy
>
> Dmitry Baryshkov (1):
>   phy: qcom-qmp: Register as a typec switch for orientation detection

I've just given this a spin on sm7225-fairphone-fp4 with pm7250b as the
PMIC (instead of pm8150b).

Overall it seems to work, which is awesome! I think I sent you emails in
the past where I had troubles getting earlier revisions to work.

Still there's some rough edges:

As Jianhua Lu has already reported, I'm also hitting the vbus vsafe5v
message quite often. Returning 0 in that function on error seems to work
around it and everything appears to be fine regardless.

  [  243.939593] qcom,pmic-typec c440000.spmi:pmic@2:typec@1500: vbus vsafe5v fail
  [  243.939600] qcom,pmic-tcpm pm7250b-tcpm: set_vbus set: 1 result -110

If you want to take a peek at the schematics for this device, they're
available here:
https://www.fairphone.com/wp-content/uploads/2022/09/FP4_Information-for-repairers-and-recyclers.pdf
USB things you can find on page 57, the pm7250b is on page 49.

When plugging in the device with TCPM on into my PC (peripheral mode)
then the USB device registers and unregisters every couple of seconds,
never stays stable on. No messages in dmesg when this happens. This only
happens with the USB-C plug in one direction, in the other it
works reliable.

Also I've had it that at some point the usb connection seemed to be kind
of stuck on host mode, plugging the device into my PC didn't appear to
do anything.

For host mode I tried using both a USB stick and a USB-C to headphone
jack dongle, both work fine in both directions.

In any case, I look very much forward to this landing, it will be
awesome to have this feature working OOTB! And let me know if you need
anything tested on this hardware.

Regards
Luca

>
>  .../bindings/mfd/qcom,spmi-pmic.yaml          |   8 +
>  .../phy/qcom,sc7180-qmp-usb3-dp-phy.yaml      |  10 +
>  .../regulator/qcom,usb-vbus-regulator.yaml    |  10 +-
>  .../bindings/usb/qcom,pmic-pdphy.yaml         |  89 +++
>  .../bindings/usb/qcom,pmic-typec.yaml         |  88 +++
>  .../bindings/usb/qcom,pmic-virt-tcpm.yaml     |  88 +++
>  MAINTAINERS                                   |  10 +
>  arch/arm64/boot/dts/qcom/pm8150b.dtsi         |  70 ++
>  arch/arm64/boot/dts/qcom/qrb5165-rb5.dts      |  63 +-
>  drivers/phy/qualcomm/Kconfig                  |   8 +
>  drivers/phy/qualcomm/phy-qcom-qmp-combo.c     |  80 ++-
>  drivers/usb/typec/Kconfig                     |  13 -
>  drivers/usb/typec/Makefile                    |   1 -
>  drivers/usb/typec/qcom-pmic-typec.c           | 261 -------
>  drivers/usb/typec/tcpm/Kconfig                |  11 +
>  drivers/usb/typec/tcpm/Makefile               |   1 +
>  drivers/usb/typec/tcpm/qcom/Makefile          |   6 +
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_pdphy.c | 605 +++++++++++++++++
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_pdphy.h |  85 +++
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 637 ++++++++++++++++++
>  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h | 163 +++++
>  .../usb/typec/tcpm/qcom/qcom_pmic_virt_tcpm.c | 326 +++++++++
>  .../dt-bindings/usb/typec/qcom,pmic-pdphy.h   |  18 +
>  .../dt-bindings/usb/typec/qcom,pmic-typec.h   |  18 +
>  24 files changed, 2388 insertions(+), 281 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-pdphy.yaml
>  create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml
>  create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-virt-tcpm.yaml
>  delete mode 100644 drivers/usb/typec/qcom-pmic-typec.c
>  create mode 100644 drivers/usb/typec/tcpm/qcom/Makefile
>  create mode 100644 drivers/usb/typec/tcpm/qcom/qcom_pmic_pdphy.c
>  create mode 100644 drivers/usb/typec/tcpm/qcom/qcom_pmic_pdphy.h
>  create mode 100644 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
>  create mode 100644 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h
>  create mode 100644 drivers/usb/typec/tcpm/qcom/qcom_pmic_virt_tcpm.c
>  create mode 100644 include/dt-bindings/usb/typec/qcom,pmic-pdphy.h
>  create mode 100644 include/dt-bindings/usb/typec/qcom,pmic-typec.h
>
> -- 
> 2.39.2





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux