diff mbox series

[1/4] dt-bindings: phy: qcom,snps-eusb2-repeater: Add magic tuning overrides

Message ID 20230830-topic-eusb2_override-v1-1-ab23825385a8@linaro.org
State Changes Requested
Headers show
Series EUSB2 repeater init sequence override | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Konrad Dybcio Aug. 30, 2023, 2:40 a.m. UTC
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(+)

Comments

Rob Herring (Arm) Sept. 5, 2023, 4:38 p.m. UTC | #1
On Wed, Aug 30, 2023 at 04:40:15AM +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..83fd6f936bf9 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-hsdisc-value:

Is '-value' redundant?

'-thres' or '-threshold' would be more descriptive.

> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed disconnect threshold
> +    minimum: 0
> +    maximum: 7
> +    default: 0
> +
> +  qcom,tune-iusb2-value:

-amplitude?

> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed trasmit amplitude
> +    minimum: 0
> +    maximum: 15
> +    default: 8
> +
> +  qcom,tune-usb2-preem-value:

We have 'hs', 'iusb2', and 'usb2'. Can you be consistent?

> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: TX pre-emphasis tuning
> +    minimum: 0
> +    maximum: 7
> +    default: 5
> +
>  required:
>    - compatible
>    - reg
> 
> -- 
> 2.42.0
>
Konrad Dybcio Sept. 6, 2023, 7:28 a.m. UTC | #2
On 5.09.2023 18:38, Rob Herring wrote:
> On Wed, Aug 30, 2023 at 04:40:15AM +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..83fd6f936bf9 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-hsdisc-value:
> 
> Is '-value' redundant?
> 
> '-thres' or '-threshold' would be more descriptive.
All these names are essentially qcom,register-name-value

But I do see your point, it probably makes sense to make it
more human-readable.

> 
>> +    $ref: /schemas/types.yaml#/definitions/uint8
>> +    description: High-Speed disconnect threshold
>> +    minimum: 0
>> +    maximum: 7
>> +    default: 0
>> +
>> +  qcom,tune-iusb2-value:
> 
> -amplitude?
ack

> 
>> +    $ref: /schemas/types.yaml#/definitions/uint8
>> +    description: High-Speed trasmit amplitude
transmit*

>> +    minimum: 0
>> +    maximum: 15
>> +    default: 8
>> +
>> +  qcom,tune-usb2-preem-value:
> 
> We have 'hs', 'iusb2', and 'usb2'. Can you be consistent?
Again, this is taken from register names. I can use 'usb2'
everywhere if you wish.

Konrad
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
index 029569d5fcf3..83fd6f936bf9 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-hsdisc-value:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: High-Speed disconnect threshold
+    minimum: 0
+    maximum: 7
+    default: 0
+
+  qcom,tune-iusb2-value:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: High-Speed trasmit amplitude
+    minimum: 0
+    maximum: 15
+    default: 8
+
+  qcom,tune-usb2-preem-value:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: TX pre-emphasis tuning
+    minimum: 0
+    maximum: 7
+    default: 5
+
 required:
   - compatible
   - reg