diff mbox series

[v2,1/2] dt-bindings: phy: qcom,snps-eusb2-repeater: Add more tuning overrides

Message ID 20250416120201.244133-2-mitltlatltl@gmail.com
State New
Headers show
Series phy: qualcomm: phy-qcom-eusb2-repeater: rework reg override handler | expand

Commit Message

Pengyu Luo April 16, 2025, 12:02 p.m. UTC
In downstream tree, many registers need to be overridden, it varies
from devices and platforms, not only HS trasmit amplitude(0x51),
HS disconnect threshold(0x53), Tx pre-emphasis tuning(0x57). And
some devices require different overrides for different dr_mode. So
add property entries for host mode, original entries will be used
for device mode.

Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
 .../phy/qcom,snps-eusb2-repeater.yaml         | 41 +++++++++++++++++--
 1 file changed, 38 insertions(+), 3 deletions(-)

Comments

Rob Herring April 21, 2025, 9:32 p.m. UTC | #1
On Wed, Apr 16, 2025 at 08:02:00PM +0800, Pengyu Luo wrote:
> In downstream tree, many registers need to be overridden, it varies
> from devices and platforms, not only HS trasmit amplitude(0x51),

spelling

> HS disconnect threshold(0x53), Tx pre-emphasis tuning(0x57). And
> some devices require different overrides for different dr_mode. So
> add property entries for host mode, original entries will be used
> for device mode.
> 
> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
> ---
>  .../phy/qcom,snps-eusb2-repeater.yaml         | 41 +++++++++++++++++--
>  1 file changed, 38 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> index d16a543a7..d0f5e770d 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
> @@ -36,25 +36,60 @@ properties:
>  
>    qcom,tune-usb2-disc-thres:
>      $ref: /schemas/types.yaml#/definitions/uint8
> -    description: High-Speed disconnect threshold
> +    description: High-Speed disconnect threshold for device mode
>      minimum: 0
>      maximum: 7
>      default: 0
>  
>    qcom,tune-usb2-amplitude:
>      $ref: /schemas/types.yaml#/definitions/uint8
> -    description: High-Speed transmit amplitude
> +    description: High-Speed transmit amplitude for device mode
>      minimum: 0
>      maximum: 15
>      default: 8
>  
>    qcom,tune-usb2-preem:
>      $ref: /schemas/types.yaml#/definitions/uint8
> -    description: High-Speed TX pre-emphasis tuning
> +    description: High-Speed TX pre-emphasis tuning for device mode
>      minimum: 0
>      maximum: 7
>      default: 5
>  
> +  qcom,tune-usb2-squelch:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: Squelch detection threshold tuning for device mode
> +    minimum: 0
> +    maximum: 7
> +    default: 3
> +
> +  qcom,tune-usb2-disc-thres-host:

Put this and the others after each existing property (for device mode). 
Ideally, these would all be in alphabetical order.

> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed disconnect threshold for host mode
> +    minimum: 0
> +    maximum: 7
> +    default: 0
> +
> +  qcom,tune-usb2-amplitude-host:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed transmit amplitude for host mode
> +    minimum: 0
> +    maximum: 15
> +    default: 8
> +
> +  qcom,tune-usb2-preem-host:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: High-Speed TX pre-emphasis tuning for host mode
> +    minimum: 0
> +    maximum: 7
> +    default: 5
> +
> +  qcom,tune-usb2-squelch-host:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: Squelch detection threshold tuning for host mode
> +    minimum: 0
> +    maximum: 7
> +    default: 3
> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.49.0
>
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 d16a543a7..d0f5e770d 100644
--- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml
@@ -36,25 +36,60 @@  properties:
 
   qcom,tune-usb2-disc-thres:
     $ref: /schemas/types.yaml#/definitions/uint8
-    description: High-Speed disconnect threshold
+    description: High-Speed disconnect threshold for device mode
     minimum: 0
     maximum: 7
     default: 0
 
   qcom,tune-usb2-amplitude:
     $ref: /schemas/types.yaml#/definitions/uint8
-    description: High-Speed transmit amplitude
+    description: High-Speed transmit amplitude for device mode
     minimum: 0
     maximum: 15
     default: 8
 
   qcom,tune-usb2-preem:
     $ref: /schemas/types.yaml#/definitions/uint8
-    description: High-Speed TX pre-emphasis tuning
+    description: High-Speed TX pre-emphasis tuning for device mode
     minimum: 0
     maximum: 7
     default: 5
 
+  qcom,tune-usb2-squelch:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: Squelch detection threshold tuning for device mode
+    minimum: 0
+    maximum: 7
+    default: 3
+
+  qcom,tune-usb2-disc-thres-host:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: High-Speed disconnect threshold for host mode
+    minimum: 0
+    maximum: 7
+    default: 0
+
+  qcom,tune-usb2-amplitude-host:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: High-Speed transmit amplitude for host mode
+    minimum: 0
+    maximum: 15
+    default: 8
+
+  qcom,tune-usb2-preem-host:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: High-Speed TX pre-emphasis tuning for host mode
+    minimum: 0
+    maximum: 7
+    default: 5
+
+  qcom,tune-usb2-squelch-host:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: Squelch detection threshold tuning for host mode
+    minimum: 0
+    maximum: 7
+    default: 3
+
 required:
   - compatible
   - reg