diff mbox series

[1/2] dt-bindings: phy: nuvoton,ma35-usb2-phy: add new bindings

Message ID 20240729061509.83828-2-hpchen0nvt@gmail.com
State Superseded
Headers show
Series Add support for nuvoton ma35 usb2 phy | expand

Commit Message

Hui-Ping Chen July 29, 2024, 6:15 a.m. UTC
Add dt-bindings for USB2 PHY found on the Nuvoton MA35 SoC.

Signed-off-by: hpchen0 <hpchen0nvt@gmail.com>
---
 .../bindings/phy/nuvoton,ma35-usb2-phy.yaml   | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml

Comments

Krzysztof Kozlowski July 29, 2024, 7:29 a.m. UTC | #1
On 29/07/2024 08:15, hpchen0 wrote:
> Add dt-bindings for USB2 PHY found on the Nuvoton MA35 SoC.
> 
> Signed-off-by: hpchen0 <hpchen0nvt@gmail.com>

Please use proper name.

> ---
>  .../bindings/phy/nuvoton,ma35-usb2-phy.yaml   | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
> new file mode 100644
> index 000000000000..415ea2c45975
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/nuvoton,ma35-usb2-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nuvoton MA35 USB2 phy
> +
> +maintainers:
> +  - hpchen0 <hpchen0nvt@gmail.com>

Same here

> +
> +properties:
> +  compatible:
> +    enum:
> +      - nuvoton,ma35-usb2-phy

All other devices have name ma35d1. Is this a different SoC?

> +
> +  "#phy-cells":
> +    const: 0
> +
> +  clocks:
> +    maxItems: 1
> +    description: USB PHY clock

Drop description, it's obvious.

> +
> +  clock-names:
> +    const: usbd_gate

Drop clock-names, you do not bring any new information.

> +
> +  nuvoton,sys:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      phandle of the system-management node.

Describe what is it for.

> +
> +required:
> +  - compatible
> +  - clocks
> +  - nuvoton,sys
> +  - "#phy-cells"

Keep the same order as in properties.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>

Where do you use it?

> +    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
> +
> +    usb_phy: usb-phy {
> +        compatible = "nuvoton,ma35-usb2-phy";
> +        clocks = <&clk USBD_GATE>;
> +        clock-names = "usbd_gate";
> +        nuvoton,sys = <&sys>;
> +        #phy-cells = <0>;
> +    };

Best regards,
Krzysztof
Hui-Ping Chen July 30, 2024, 7:44 a.m. UTC | #2
Dear Krzysztof,

Thank you for your reply.



On 2024/7/29 下午 03:29, Krzysztof Kozlowski wrote:
> On 29/07/2024 08:15, hpchen0 wrote:
>> Add dt-bindings for USB2 PHY found on the Nuvoton MA35 SoC.
>>
>> Signed-off-by: hpchen0 <hpchen0nvt@gmail.com>
> Please use proper name.

Okay, I will make the correction and use the correct name.



>> ---
>>   .../bindings/phy/nuvoton,ma35-usb2-phy.yaml   | 51 +++++++++++++++++++
>>   1 file changed, 51 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
>> new file mode 100644
>> index 000000000000..415ea2c45975
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
>> @@ -0,0 +1,51 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/phy/nuvoton,ma35-usb2-phy.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Nuvoton MA35 USB2 phy
>> +
>> +maintainers:
>> +  - hpchen0 <hpchen0nvt@gmail.com>
> Same here
Okay, I will make the correction and use the correct name.



>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - nuvoton,ma35-usb2-phy
> All other devices have name ma35d1. Is this a different SoC?
The SoC is the same as ma35d1. I will modify ma35 to ma35d1.

Originally, I intended to create a series of shared drivers.



>> +
>> +  "#phy-cells":
>> +    const: 0
>> +
>> +  clocks:
>> +    maxItems: 1
>> +    description: USB PHY clock
> Drop description, it's obvious.
Okay, I will remove the description.



>> +
>> +  clock-names:
>> +    const: usbd_gate
> Drop clock-names, you do not bring any new information.

Okay, I will remove the clock-names.



>> +
>> +  nuvoton,sys:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      phandle of the system-management node.
> Describe what is it for.

Because this driver has some status bits located in the sys, it is 
necessary to reference the sys link.



>> +
>> +required:
>> +  - compatible
>> +  - clocks
>> +  - nuvoton,sys
>> +  - "#phy-cells"
> Keep the same order as in properties.

Okay, I will correct this issue.



>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> Where do you use it?

This is not used and will be removed. Thanks for the reminder.



>> +    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
>> +
>> +    usb_phy: usb-phy {
>> +        compatible = "nuvoton,ma35-usb2-phy";
>> +        clocks = <&clk USBD_GATE>;
>> +        clock-names = "usbd_gate";
>> +        nuvoton,sys = <&sys>;
>> +        #phy-cells = <0>;
>> +    };
> Best regards,
> Krzysztof


Best regards,

Hui-Ping Chen
Hui-Ping Chen July 30, 2024, 8:03 a.m. UTC | #3
Dear Krzysztof,

Thank you for your reply.



On 2024/7/29 下午 03:29, Krzysztof Kozlowski wrote:
> On 29/07/2024 08:15, hpchen0 wrote:
>> Add dt-bindings for USB2 PHY found on the Nuvoton MA35 SoC.
>>
>> Signed-off-by: hpchen0 <hpchen0nvt@gmail.com>
> Please use proper name.

Okay, I will make the correction and use the correct name.



>> ---
>>   .../bindings/phy/nuvoton,ma35-usb2-phy.yaml   | 51 +++++++++++++++++++
>>   1 file changed, 51 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
>> new file mode 100644
>> index 000000000000..415ea2c45975
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
>> @@ -0,0 +1,51 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/phy/nuvoton,ma35-usb2-phy.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Nuvoton MA35 USB2 phy
>> +
>> +maintainers:
>> +  - hpchen0 <hpchen0nvt@gmail.com>
> Same here

Okay, I will make the correction and use the correct name.



>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - nuvoton,ma35-usb2-phy
> All other devices have name ma35d1. Is this a different SoC?

The SoC is the same as ma35d1. I will modify ma35 to ma35d1.

Originally, I intended to create a series of shared drivers.



>> +
>> +  "#phy-cells":
>> +    const: 0
>> +
>> +  clocks:
>> +    maxItems: 1
>> +    description: USB PHY clock
> Drop description, it's obvious.

Okay, I will remove the description.



>> +
>> +  clock-names:
>> +    const: usbd_gate
> Drop clock-names, you do not bring any new information.

Okay, I will remove the clock-names.



>> +
>> +  nuvoton,sys:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description:
>> +      phandle of the system-management node.
> Describe what is it for.

Because this driver has some status bits located in the sys, it is 
necessary to reference the sys link.



>> +
>> +required:
>> +  - compatible
>> +  - clocks
>> +  - nuvoton,sys
>> +  - "#phy-cells"
> Keep the same order as in properties.

Okay, I will correct this issue.



>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> Where do you use it?

This is not used and will be removed. Thanks for the reminder.



>> +    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
>> +
>> +    usb_phy: usb-phy {
>> +        compatible = "nuvoton,ma35-usb2-phy";
>> +        clocks = <&clk USBD_GATE>;
>> +        clock-names = "usbd_gate";
>> +        nuvoton,sys = <&sys>;
>> +        #phy-cells = <0>;
>> +    };
> Best regards,
> Krzysztof


Best regards,

Hui-Ping Chen
Krzysztof Kozlowski July 30, 2024, 8:10 a.m. UTC | #4
On 30/07/2024 09:44, Hui-Ping Chen wrote:
> 
>>> +
>>> +  nuvoton,sys:
>>> +    $ref: /schemas/types.yaml#/definitions/phandle
>>> +    description:
>>> +      phandle of the system-management node.
>> Describe what is it for.
> 
> Because this driver has some status bits located in the sys, it is 
> necessary to reference the sys link.

Describe it in the binding - what usb2 phy needs to do in sysmgmt node.



Best regards,
Krzysztof
Hui-Ping Chen July 30, 2024, 8:25 a.m. UTC | #5
Dear Krzysztof,

Thank you for your reply.



On 2024/7/30 下午 04:10, Krzysztof Kozlowski wrote:
> On 30/07/2024 09:44, Hui-Ping Chen wrote:
>>>> +
>>>> +  nuvoton,sys:
>>>> +    $ref: /schemas/types.yaml#/definitions/phandle
>>>> +    description:
>>>> +      phandle of the system-management node.
>>> Describe what is it for.
>> Because this driver has some status bits located in the sys, it is
>> necessary to reference the sys link.
> Describe it in the binding - what usb2 phy needs to do in sysmgmt node.
>
Okay. I will add this description to the binding.


>
> Best regards,
> Krzysztof


Best regards,

Hui-Ping Chen
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
new file mode 100644
index 000000000000..415ea2c45975
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/nuvoton,ma35-usb2-phy.yaml
@@ -0,0 +1,51 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/nuvoton,ma35-usb2-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton MA35 USB2 phy
+
+maintainers:
+  - hpchen0 <hpchen0nvt@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,ma35-usb2-phy
+
+  "#phy-cells":
+    const: 0
+
+  clocks:
+    maxItems: 1
+    description: USB PHY clock
+
+  clock-names:
+    const: usbd_gate
+
+  nuvoton,sys:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle of the system-management node.
+
+required:
+  - compatible
+  - clocks
+  - nuvoton,sys
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
+
+    usb_phy: usb-phy {
+        compatible = "nuvoton,ma35-usb2-phy";
+        clocks = <&clk USBD_GATE>;
+        clock-names = "usbd_gate";
+        nuvoton,sys = <&sys>;
+        #phy-cells = <0>;
+    };