diff mbox series

[1/2] dt-bindings: phy: Add Spreadtrum usb20 hsphy yaml

Message ID 20231101054432.27509-2-pu.li@unisoc.com
State Changes Requested
Headers show
Series phy: sprd: Add Spreadtrum USB20 HSPHY Driver | 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

Pu Li Nov. 1, 2023, 5:44 a.m. UTC
Add device tree binding Documentation details for Spreadtrum
usb20 hsphy driver.

Signed-off-by: Pu Li <pu.li@unisoc.com>
---
 .../bindings/phy/phy-sprd-usb20-hs.yaml       | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml

Comments

Krzysztof Kozlowski Nov. 1, 2023, 7:11 a.m. UTC | #1
On 01/11/2023 06:44, Pu Li wrote:
> Add device tree binding Documentation details for Spreadtrum
> usb20 hsphy driver.
> 
> Signed-off-by: Pu Li <pu.li@unisoc.com>
> ---
>  .../bindings/phy/phy-sprd-usb20-hs.yaml       | 70 +++++++++++++++++++
>  1 file changed, 70 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml

Filename matching compatible syntax.

> 
> diff --git a/Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml b/Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml
> new file mode 100644
> index 000000000000..102b49d3482e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright 2020-2023 Unisoc Inc.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/phy-sprd-usb20-hs.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Spreadtrum USB20 High Speed PHY
> +
> +maintainers:
> +  - Pu Li <lip308226@gmail.com>
> +
> +properties:
> +  compatible:
> +    oneOf:

No need for oneOf.

> +      - items:

No need of ritems,

> +          - enum:
> +              - sprd,pike2-phy
> +              - sprd,sharkle-phy
> +              - sprd,sharkl3-phy
> +              - sprd,sharkl5-phy
> +              - sprd,sharkl5pro-phy
> +              - sprd,qogirl6-phy
> +              - sprd,qogirn6lite-phy
> +              - sprd,uis8520-phy

What are these? pike2 is the SoC and the binding covers all phys? All?

> +
> +  reg:
> +    maxItems: 1
> +
> +  reg-names:
> +    const: phy_glb_regs

Drop, not needed for one entry.
> +
> +  sprd,syscon-enable:
> +    description:
> +      Phandle to aon apb syscon register region.

You called it syscon-enable but write aon-apb-syscon. Decide which one.
Also, you need to describe the purpose.

> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  sprd,syscon-ana:
> +    description:
> +      Phandle to analog syscon register region.

Two syscons? Nope, do not use syscons instead of regular abstractions.

> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  sprd,vdd-voltage:
> +    description:
> +      It represents the value of one analog power supply of phy,
> +      the unit is uV.

Then you must use -microvolt unit suffix.

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  "#phy-cells":
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - "#phy-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    hsphy@64570000 {

phy@

> +      compatible = "sprd,qogirl6-phy";


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml b/Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml
new file mode 100644
index 000000000000..102b49d3482e
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/phy-sprd-usb20-hs.yaml
@@ -0,0 +1,70 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2020-2023 Unisoc Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/phy-sprd-usb20-hs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Spreadtrum USB20 High Speed PHY
+
+maintainers:
+  - Pu Li <lip308226@gmail.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - sprd,pike2-phy
+              - sprd,sharkle-phy
+              - sprd,sharkl3-phy
+              - sprd,sharkl5-phy
+              - sprd,sharkl5pro-phy
+              - sprd,qogirl6-phy
+              - sprd,qogirn6lite-phy
+              - sprd,uis8520-phy
+
+  reg:
+    maxItems: 1
+
+  reg-names:
+    const: phy_glb_regs
+
+  sprd,syscon-enable:
+    description:
+      Phandle to aon apb syscon register region.
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  sprd,syscon-ana:
+    description:
+      Phandle to analog syscon register region.
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+  sprd,vdd-voltage:
+    description:
+      It represents the value of one analog power supply of phy,
+      the unit is uV.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    hsphy@64570000 {
+      compatible = "sprd,qogirl6-phy";
+      reg = <0x64570000 0x3030>;
+      reg-names = "phy_glb_regs";
+      sprd,syscon-enable = <&aon_apb_regs>;
+      sprd,syscon-ana = <&anlg_phy_g2_regs>;
+      sprd,vdd-voltage = <3300000>;
+      #phy-cells = <0>;
+    };