Skip to contentSkip to conversation

dt-bindings: phy: st: convert phy-stih407-usb to DT schema

PATCH Superseded Raphael Gallais-Pou 2 participants 2 messages Aug 1, 2023 – Aug 11, 2023

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: phy: st: convert phy-stih407-usb to DT schema

From: Raphaël Gallais-Pou <[email protected]>

Convert the st,stih407-usb2-phy binding to DT schema format.

---
 .../bindings/phy/phy-stih407-usb.txt          | 24 -------
 .../bindings/phy/st,stih407-usb2-phy.yaml     | 63 +++++++++++++++++++
 2 files changed, 63 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/phy/phy-stih407-usb.txt
 create mode 100644 Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml
Documentation/devicetree/bindings/phy/phy-stih407-usb.txt deleted +0 -24
deleted file mode 100644
index 35f03df00130..000000000000
@@ -1,24 +0,0 @@
-ST STiH407 USB PHY controller
-
-This file documents the dt bindings for the usb picoPHY driver which is the PHY for both USB2 and USB3
-host controllers (when controlling usb2/1.1 devices) available on STiH407 SoC family from STMicroelectronics.
-
-Required properties:
-- compatible		: should be "st,stih407-usb2-phy"
-- st,syscfg		: phandle of sysconfig bank plus integer array containing phyparam and phyctrl register offsets
-- resets		: list of phandle and reset specifier pairs. There should be two entries, one
-			  for the whole phy and one for the port
-- reset-names		: list of reset signal names. Should be "global" and "port"
-See: Documentation/devicetree/bindings/reset/st,stih407-powerdown.yaml
-See: Documentation/devicetree/bindings/reset/reset.txt
-
-Example:
-
-usb2_picophy0: usbpicophy@f8 {
-	compatible	= "st,stih407-usb2-phy";
-	#phy-cells	= <0>;
-	st,syscfg	= <&syscfg_core 0x100 0xf4>;
-	resets		= <&softreset STIH407_PICOPHY_SOFTRESET>,
-			  <&picophyreset STIH407_PICOPHY0_RESET>;
-	reset-names	= "global", "port";
-};
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +63 -0

63 lines not on this page · raw message

Signature · 1 line
2.41.0
maintainer
#1 lore raw
Quoted 61 lines · Raphael Gallais-Pou

From: Raphaël Gallais-Pou <[email protected]>

Convert the st,stih407-usb2-phy binding to DT schema format.

---
 .../bindings/phy/phy-stih407-usb.txt          | 24 -------
 .../bindings/phy/st,stih407-usb2-phy.yaml     | 63 +++++++++++++++++++
 2 files changed, 63 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/phy/phy-stih407-usb.txt
 create mode 100644 Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml
Documentation/devicetree/bindings/phy/phy-stih407-usb.txt deleted +0 -24
deleted file mode 100644
index 35f03df00130..000000000000
@@ -1,24 +0,0 @@
-ST STiH407 USB PHY controller
-
-This file documents the dt bindings for the usb picoPHY driver which is the PHY for both USB2 and USB3
-host controllers (when controlling usb2/1.1 devices) available on STiH407 SoC family from STMicroelectronics.
-
-Required properties:
-- compatible		: should be "st,stih407-usb2-phy"
-- st,syscfg		: phandle of sysconfig bank plus integer array containing phyparam and phyctrl register offsets
-- resets		: list of phandle and reset specifier pairs. There should be two entries, one
-			  for the whole phy and one for the port
-- reset-names		: list of reset signal names. Should be "global" and "port"
-See: Documentation/devicetree/bindings/reset/st,stih407-powerdown.yaml
-See: Documentation/devicetree/bindings/reset/reset.txt
-
-Example:
-
-usb2_picophy0: usbpicophy@f8 {
-	compatible	= "st,stih407-usb2-phy";
-	#phy-cells	= <0>;
-	st,syscfg	= <&syscfg_core 0x100 0xf4>;
-	resets		= <&softreset STIH407_PICOPHY_SOFTRESET>,
-			  <&picophyreset STIH407_PICOPHY0_RESET>;
-	reset-names	= "global", "port";
-};
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +13 -0
new file mode 100644
index 000000000000..1f66ceddbf81
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/st,stih407-usb2-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STiH407 USB PHY controller
+
+maintainers:
+  - Patrice Chotard <[email protected]>
+
+description:
+  The USB picoPHY driver is the PHY for both USB2 and USB3 host controllers

Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml line 23

Quoted 10 lines
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +10 -0
+  (when controlling usb2/1.1 devices) available on STiH407 SoC family from
+  STMicroelectronics.
+
+properties:
+  compatible:
+    const: st,stih407-usb2-phy
+
+  st,syscfg:
+    description: Phandle to the syscfg bank
+    $ref: "/schemas/types.yaml#/definitions/uint32-array"

Drop quotes

The correct type is 'phandle-array' which is really a matrix, so you need:

items:
- items:
- description: ...
- description: ...
- description: ...

Quoted 5 lines
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +5 -0
+    items:
+      - description: phandle to syscfg
+      - description: phyparam register offset
+      - description: phyctrl register offset
+

Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml line 38

Quoted 10 lines
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +10 -0
+  resets:
+    items:
+      - description: Phandle and reset specifier pair for the whole phy.
+      - description: Phandle and reset specifier pair for the port.
+
+  reset-names:
+    description: List of reset signal names.
+    items:
+      - const: "global"
+      - const: "port"

Drop quotes

Quoted 13 lines
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +13 -0
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - st,syscfg
+  - resets
+  - reset-names
+  - "#phy-cells"
+
+additionalProperties: false
+

Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml line 61

Quoted 10 lines
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +10 -0
+examples:
+  - |
+    #include <dt-bindings/reset/stih407-resets.h>
+    usb2_picophy0: usbpicophy {
+    	compatible	= "st,stih407-usb2-phy";
+    	#phy-cells	= <0>;
+    	st,syscfg	= <&syscfg_core 0x100 0xf4>;
+    	resets		= <&softreset STIH407_PICOPHY_SOFTRESET>,
+    			  <&picophyreset STIH407_PICOPHY0_RESET>;
+    	reset-names	= "global", "port";

Mixed spaces and tabs.

Quoted 5 lines
Documentation/devicetree/bindings/phy/st,stih407-usb2-phy.yaml new file +2 -0
+    };
+...
Signature · 1 line
2.41.0