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

Convert TI OMAP Main Processor Unit MPU text to DT schema.

Changes from the original text binding during conversion:
- Mark ti,hwmods as deprecated, as it is longer needed.
- The pm-sram property name is kept as-is without a vendor prefix
  ti,pm-sram to maintain backward compatibility with older device trees
  and the existing pm33xx driver.

Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
 Documentation/devicetree/bindings/arm/omap/mpu.txt | 54 --------------------
 .../devicetree/bindings/arm/ti/ti,omap-mpu.yaml    | 58 ++++++++++++++++++++++
 2 files changed, 58 insertions(+), 54 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/omap/mpu.txt b/Documentation/devicetree/bindings/arm/omap/mpu.txt
deleted file mode 100644
index e41490e6979c..000000000000
--- a/Documentation/devicetree/bindings/arm/omap/mpu.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-* TI - MPU (Main Processor Unit) subsystem
-
-The MPU subsystem contain one or several ARM cores
-depending of the version.
-The MPU contain CPUs, GIC, L2 cache and a local PRCM.
-
-Required properties:
-- compatible : Should be "ti,omap3-mpu" for OMAP3
-               Should be "ti,omap4-mpu" for OMAP4
-	       Should be "ti,omap5-mpu" for OMAP5
-- ti,hwmods: "mpu"
-
-Optional properties:
-- sram:	Phandle to the ocmcram node
-
-am335x and am437x only:
-- pm-sram: Phandles to ocmcram nodes to be used for power management.
-	   First should be type 'protect-exec' for the driver to use to copy
-	   and run PM functions, second should be regular pool to be used for
-	   data region for code. See Documentation/devicetree/bindings/sram/sram.yaml
-	   for more details.
-
-Examples:
-
-- For an OMAP5 SMP system:
-
-mpu {
-    compatible = "ti,omap5-mpu";
-    ti,hwmods = "mpu"
-};
-
-- For an OMAP4 SMP system:
-
-mpu {
-    compatible = "ti,omap4-mpu";
-    ti,hwmods = "mpu";
-};
-
-
-- For an OMAP3 monocore system:
-
-mpu {
-    compatible = "ti,omap3-mpu";
-    ti,hwmods = "mpu";
-};
-
-- For an AM335x system:
-
-mpu {
-	compatible = "ti,omap3-mpu";
-	ti,hwmods = "mpu";
-	pm-sram = <&pm_sram_code
-		   &pm_sram_data>;
-};
diff --git a/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml b/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml
new file mode 100644
index 000000000000..abd8c64e8e9f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/ti/ti,omap-mpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI MPU (Main Processor Unit) subsystem
+
+maintainers:
+  - Benoit Cousson <b-cousson@ti.com>
+
+description:
+  The MPU subsystem contains one or several ARM cores depending on the version.
+  The MPU contains CPUs, GIC, L2 cache and a local PRCM.
+
+properties:
+  compatible:
+    enum:
+      - ti,omap3-mpu
+      - ti,omap4-mpu
+      - ti,omap5-mpu
+
+  ti,hwmods:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: Name of the hwmod associated with the MPU
+    const: mpu
+    deprecated: true
+
+  sram:
+    description: ocmcram node
+
+  pm-sram:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: ocmcram nodes for power management. For am335x and am437x.
+    items:
+      - items:
+          - description: ocmcram node of type protect-exec for PM functions
+      - items:
+          - description: ocmcram node of regular pool to be used for data region
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    mpu {
+        compatible = "ti,omap5-mpu";
+        ti,hwmods = "mpu";
+    };
+
+  - |
+    mpu {
+        compatible = "ti,omap3-mpu";
+        ti,hwmods = "mpu";
+        pm-sram = <&pm_sram_code &pm_sram_data>;
+    };

---
base-commit: 0f23d56f17fdfc7db69d51f64c8b91bbab947aa9
change-id: 20260818-ti-mpu-22219dfde742

Best regards,
-- 
Bhargav


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

* Re: [PATCH] dt-bindings: arm: ti,omap-mpu: Convert to DT schema
  2026-08-18 17:59 [PATCH] dt-bindings: arm: ti,omap-mpu: Convert to DT schema Bhargav Joshi
@ 2026-08-18 18:09 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-08-18 18:09 UTC (permalink / raw)
  To: Bhargav Joshi; +Cc: robh, devicetree, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `sram` property in the DT schema is missing a `maxItems: 1` constraint, allowing an unbounded number of phandles.
--

--- Patch [1]: [PATCH] dt-bindings: arm: ti,omap-mpu: Convert to DT schema ---
commit 999724263c1ab03e517bff5216bcbf149a14a6a9
Author: Bhargav Joshi <j.bhargav.u@gmail.com>
Date:   Tue Aug 18 17:59:51 2026 +0000

dt-bindings: arm: ti,omap-mpu: Convert to DT schema

Convert TI OMAP Main Processor Unit MPU text to DT schema. This conversion
marks ti,hwmods as deprecated and preserves the existing pm-sram property
name to maintain backward compatibility.

> diff --git a/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml b/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml
> new file mode 100644
> index 0000000000000..abd8c64e8e9f7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/ti/ti,omap-mpu.yaml
> @@ -0,0 +1,58 @@

[ ... ]

> +  ti,hwmods:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Name of the hwmod associated with the MPU
> +    const: mpu
> +    deprecated: true
> +
> +  sram:
> +    description: ocmcram node
> +

[Severity: Low]
Does the sram property need a maxItems: 1 constraint here?

Without it, the device tree schema validator can allow an unbounded number of
phandles to be specified. Since the original binding indicated a single phandle
for the ocmcram node, adding maxItems: 1 would ensure dtbs_check correctly
rejects invalid device trees with multiple sram phandles.

> +  pm-sram:
> +    $ref: /schemas/types.yaml#/definitions/phandle-array

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260818-ti-mpu-v1-1-5b1c71a34669@gmail.com?part=1

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 17:59 [PATCH] dt-bindings: arm: ti,omap-mpu: Convert to DT schema Bhargav Joshi
2026-08-18 18:09 ` 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.