All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema
@ 2026-08-18 16:29 Bhargav Joshi
  2026-08-18 16:42 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Bhargav Joshi @ 2026-08-18 16:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Kishon Vijay Abraham I
  Cc: devicetree, linux-kernel, goledhruva, m-chawdhry, daniel.baluta,
	simona.toaca, j.bhargav.u

Convert the TI OCP2SCP bridge device tree bindings to DT schema.
Changes during conversion:
- Add list #address-cells and #size-cells as required properties.
- Drop ranges from the required properties as it is omitted in some
  existing DTS.
- Mark reg is not required for compatible ti,am437x-ocp2scp, driver skips
  fetching memory resources for this, existing DTS also omit it.
- Mark the ti,hwmods property as deprecated.
- Set additionalProperties to type: object rather than using
  patternProperties`. Since OCP2SCP acts as a generic bridge/bus, its
  child nodes represent various PHY devices.

Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
 .../devicetree/bindings/bus/omap-ocp2scp.txt       | 29 ---------
 .../devicetree/bindings/bus/ti,omap-ocp2scp.yaml   | 74 ++++++++++++++++++++++
 2 files changed, 74 insertions(+), 29 deletions(-)

diff --git a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt b/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
deleted file mode 100644
index 18729f6fe1e5..000000000000
--- a/Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-* OMAP OCP2SCP - ocp interface to scp interface
-
-properties:
-- compatible : Should be "ti,am437x-ocp2scp" for AM437x processor
-	       Should be "ti,omap-ocp2scp" for all others
-- reg : Address and length of the register set for the device
-- #address-cells, #size-cells : Must be present if the device has sub-nodes
-- ranges : the child address space are mapped 1:1 onto the parent address space
-- ti,hwmods : must be "ocp2scp_usb_phy"
-
-Sub-nodes:
-All the devices connected to ocp2scp are described using sub-node to ocp2scp
-
-ocp2scp@4a0ad000 {
-	compatible = "ti,omap-ocp2scp";
-	reg = <0x4a0ad000 0x1f>;
-	#address-cells = <1>;
-	#size-cells = <1>;
-	ranges;
-	ti,hwmods = "ocp2scp_usb_phy";
-
-	subnode1 {
-	...
-	};
-
-	subnode2 {
-	...
-	};
-};
diff --git a/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml b/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
new file mode 100644
index 000000000000..a8852185144d
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/ti,omap-ocp2scp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI OMAP OCP to SCP bus bridge
+
+maintainers:
+  - Kishon Vijay Abraham I <kishon@ti.com>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: ti,am437x-ocp2scp
+          - const: ti,omap-ocp2scp
+      - const: ti,omap-ocp2scp
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  ranges: true
+
+  ti,hwmods:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Name of the hwmod associated with the device.
+    deprecated: true
+
+required:
+  - compatible
+  - "#address-cells"
+  - "#size-cells"
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: ti,am437x-ocp2scp
+    then:
+      properties:
+        reg: false
+    else:
+      required:
+        - reg
+
+additionalProperties:
+  type: object
+
+examples:
+  - |
+    ocp2scp@4a0ad000 {
+        compatible = "ti,omap-ocp2scp";
+        reg = <0x4a0ad000 0x1f>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges;
+
+        phy@80 {
+            compatible = "ti,omap-usb2";
+            reg = <0x80 0x58>;
+            ctrl-module = <&omap_control_usb2phy>;
+            clocks = <&usb_phy_cm_clk32k>;
+            clock-names = "wkupclk";
+            #phy-cells = <0>;
+        };
+    };

---
base-commit: 0f23d56f17fdfc7db69d51f64c8b91bbab947aa9
change-id: 20260818-ti-ocp2scp-91c97757b432

Best regards,
-- 
Bhargav


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-18 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 16:29 [PATCH] dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema Bhargav Joshi
2026-08-18 16:42 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.