* [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
* Re: [PATCH] dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema
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
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-08-18 16:42 UTC (permalink / raw)
To: Bhargav Joshi; +Cc: robh, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Binding Schema Violation: `additionalProperties: type: object` is an anti-pattern for allowing generic child nodes.
--
--- Patch [1]: [PATCH] dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema ---
commit 1199d265b1ac5f3fa059bb1936e3713c5ea7ac99
Author: Bhargav Joshi <j.bhargav.u@gmail.com>
dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema
This commit converts the ti,omap-ocp2scp bridge device tree bindings to
dt-schema. It updates required properties, marks ti,hwmods as deprecated,
and sets additionalProperties to type: object to represent various child
phy devices.
> 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 0000000000000..a8852185144dc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/ti,omap-ocp2scp.yaml
[ ... ]
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: ti,am437x-ocp2scp
> + then:
> + properties:
> + reg: false
> + else:
> + required:
> + - reg
> +
> +additionalProperties:
> + type: object
[Severity: Low]
Is it intentional to use type: object for additionalProperties instead of
patternProperties?
Relying on additionalProperties: type: object requires non-injected properties
to evaluate as objects rather than scalar or array values, which violates
json-schema semantics for standard properties.
Should this instead use patternProperties to explicitly match generic child
node names (e.g., "^[a-zA-Z0-9,\-_.]+(@[0-9a-fA-F]+)?$": type: object)
combined with additionalProperties: false?
> +
> +examples:
> + - |
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818-ti-ocp2scp-v1-1-9d2885011cda@gmail.com?part=1
^ permalink raw reply [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox