mbox series

[v2,0/4] EUSB2 repeater init sequence override

Message ID 20230830-topic-eusb2_override-v2-0-7d8c893d93f6@linaro.org
Headers show
Series EUSB2 repeater init sequence override | expand

Message

Konrad Dybcio Sept. 13, 2023, 9:53 a.m. UTC
The EUSB2 repeater goes through a tuning sequence as part of its
initialization. This series ensures the tuning is "clean" and can be
overridden for devices that need it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Changes in v2:
- Change register names to something more human readable in bindings (RobH)
- Make "Zero out untouched tuning regs" actually do what it says
- Link to v1: https://lore.kernel.org/r/20230830-topic-eusb2_override-v1-0-ab23825385a8@linaro.org

---
Konrad Dybcio (4):
      dt-bindings: phy: qcom,snps-eusb2-repeater: Add magic tuning overrides
      phy: qualcomm: phy-qcom-eusb2-repeater: Use regmap_fields
      phy: qualcomm: phy-qcom-eusb2-repeater: Zero out untouched tuning regs
      phy: qualcomm: phy-qcom-eusb2-repeater: Add tuning overrides

 .../bindings/phy/qcom,snps-eusb2-repeater.yaml     |  21 +++
 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c     | 146 ++++++++++++++++-----
 2 files changed, 132 insertions(+), 35 deletions(-)
---
base-commit: 3c13c772fc233a10342c8e1605ff0855dfdf0c89
change-id: 20230830-topic-eusb2_override-aa66df9ca641

Best regards,

Comments

Rob Herring Sept. 14, 2023, 2:48 p.m. UTC | #1
On Wed, Sep 13, 2023 at 11:53:23AM +0200, Konrad Dybcio wrote:
> The EUSB2 repeater requires some alterations to its init sequence,
> depending on board design.
> 
> Add support for making the necessary changes to that sequence to make USB
> functional on SM8550-based Xperia 1 V.
> 
> They all have lackluster description due to lack of information.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  .../bindings/phy/qcom,snps-eusb2-repeater.yaml      | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> index 029569d5fcf3..24c733c10e0e 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> @@ -32,6 +32,27 @@ properties:
>  
>    vdd3-supply: true
>  
> +  qcom,tune-usb2-disc-thres:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed disconnect threshold
> +    minimum: 0
> +    maximum: 7
> +    default: 0
> +
> +  qcom,tune-usb2-amplitude:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed trasmit amplitude
> +    minimum: 0
> +    maximum: 15
> +    default: 8
> +
> +  qcom,tune-usb2-preem:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed TX pre-emphasis tuning
> +    minimum: 0
> +    maximum: 7
> +    default: 5

For what it is worth, the mediatek,tphy.yaml binding has the same 
properties...

Acked-by: Rob Herring <robh@kernel.org>
Vinod Koul Sept. 21, 2023, 2:29 p.m. UTC | #2
On Wed, 13 Sep 2023 11:53:22 +0200, Konrad Dybcio wrote:
> The EUSB2 repeater goes through a tuning sequence as part of its
> initialization. This series ensures the tuning is "clean" and can be
> overridden for devices that need it.
> 
> 

Applied, thanks!

[1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Add magic tuning overrides
      commit: 2da73b4e0cf1d9847483fe474ce27af987bfb614
[2/4] phy: qualcomm: phy-qcom-eusb2-repeater: Use regmap_fields
      commit: dcc8a942852f00845e75c49ca8a7a6865d6b669d
[3/4] phy: qualcomm: phy-qcom-eusb2-repeater: Zero out untouched tuning regs
      commit: af1c6ec341c3a1cc396784b2ce4619aec7be3e34
[4/4] phy: qualcomm: phy-qcom-eusb2-repeater: Add tuning overrides
      commit: 05733bd60f7aa4f260a2837574555bbd3b847cca

Best regards,