[PATCH] dt-bindings: bus: ti,omap-ocp2scp: Convert to DT schema
Bhargav Joshi <[email protected]>
| Newsgroups | org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- .../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 <[email protected]> + +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