devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	 Jernej Skrabec <jernej.skrabec@gmail.com>,
	 Samuel Holland <samuel@sholland.org>,
	Conor Dooley <conor@kernel.org>,
	 Nicolas Ferre <nicolas.ferre@microchip.com>,
	 Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	 Steen Hegelund <Steen.Hegelund@microchip.com>,
	 Daniel Machon <daniel.machon@microchip.com>,
	UNGLinuxDriver@microchip.com,
	 Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	 Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>,
	Heiko Stuebner <heiko@sntech.de>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	 Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	 Geert Uytterhoeven <geert+renesas@glider.be>,
	 Magnus Damm <magnus.damm@gmail.com>,
	 Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Andy Gross <agross@kernel.org>,
	 Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	 Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	 Stephen Boyd <sboyd@kernel.org>,
	zhouyanjie@wanyeetech.com,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	 Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	 Stephan Gerhold <stephan.gerhold@linaro.org>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
	 linux-arm-msm@vger.kernel.org, imx@lists.linux.dev,
	 linux-rockchip@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	 linux-renesas-soc@vger.kernel.org, linux-mips@vger.kernel.org,
	 linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org,
	 Sudeep Holla <sudeep.holla@arm.com>
Subject: [PATCH v2 12/17] dt-bindings: arm/cpus: Add schemas for "enable-method" dependencies
Date: Thu, 10 Apr 2025 10:47:33 -0500	[thread overview]
Message-ID: <20250410-dt-cpu-schema-v2-12-63d7dc9ddd0a@kernel.org> (raw)
In-Reply-To: <20250410-dt-cpu-schema-v2-0-63d7dc9ddd0a@kernel.org>

Replace the prose for properties dependent on specific "enable-method"
values with schemas defining the same requirements.

Both "qcom,acc" and "qcom,saw" properties appear to be required for any
of the Qualcomm enable-method values, so the schema is a bit simpler
than what the text said. The properties are also needed on some Qualcomm
platforms with other enable-method values. It's limited to Cortex A53
based platforms so use that to disable the properties. The references
to arm/msm/qcom,saw2.txt and arm/msm/qcom,kpss-acc.txt are out of date,
so just drop them.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
---
v2:
 - Only disallow qcom,acc and qcom,saw on !cortex-a53
 - Fix example in qcom,saw2.yaml
---
 Documentation/devicetree/bindings/arm/cpus.yaml    | 91 ++++++++++++++--------
 .../devicetree/bindings/soc/qcom/qcom,saw2.yaml    |  3 +-
 2 files changed, 60 insertions(+), 34 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml
index 2e666b2a4dcd..351be2f77581 100644
--- a/Documentation/devicetree/bindings/arm/cpus.yaml
+++ b/Documentation/devicetree/bindings/arm/cpus.yaml
@@ -273,8 +273,6 @@ properties:
     description:
       The DT specification defines this as 64-bit always, but some 32-bit Arm
       systems have used a 32-bit value which must be supported.
-      Required for systems that have an "enable-method"
-        property value of "spin-table".
 
   cpu-idle-states:
     $ref: /schemas/types.yaml#/definitions/phandle-array
@@ -333,24 +331,13 @@ properties:
 
   qcom,saw:
     $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      Specifies the SAW* node associated with this CPU.
-
-      Required for systems that have an "enable-method" property
-      value of "qcom,kpss-acc-v1" or "qcom,kpss-acc-v2"
-
-      * arm/msm/qcom,saw2.txt
+    description:
+      Specifies the SAW node associated with this CPU.
 
   qcom,acc:
     $ref: /schemas/types.yaml#/definitions/phandle
-    description: |
-      Specifies the ACC* node associated with this CPU.
-
-      Required for systems that have an "enable-method" property
-      value of "qcom,kpss-acc-v1", "qcom,kpss-acc-v2", "qcom,msm8226-smp" or
-      "qcom,msm8916-smp".
-
-      * arm/msm/qcom,kpss-acc.txt
+    description:
+      Specifies the ACC node associated with this CPU.
 
   rockchip,pmu:
     $ref: /schemas/types.yaml#/definitions/phandle
@@ -378,22 +365,60 @@ properties:
       formed by encoding the target CPU id into the low bits of the
       physical start address it should jump to.
 
-if:
-  # If the enable-method property contains one of those values
-  properties:
-    enable-method:
-      contains:
-        enum:
-          - brcm,bcm11351-cpu-method
-          - brcm,bcm23550
-          - brcm,bcm-nsp-smp
-  # and if enable-method is present
-  required:
-    - enable-method
-
-then:
-  required:
-    - secondary-boot-reg
+allOf:
+  - if:
+      # If the enable-method property contains one of those values
+      properties:
+        enable-method:
+          contains:
+            enum:
+              - brcm,bcm11351-cpu-method
+              - brcm,bcm23550
+              - brcm,bcm-nsp-smp
+      # and if enable-method is present
+      required:
+        - enable-method
+    then:
+      required:
+        - secondary-boot-reg
+  - if:
+      properties:
+        enable-method:
+          enum:
+            - spin-table
+            - renesas,r9a06g032-smp
+      required:
+        - enable-method
+    then:
+      required:
+        - cpu-release-addr
+  - if:
+      properties:
+        enable-method:
+          enum:
+            - qcom,kpss-acc-v1
+            - qcom,kpss-acc-v2
+            - qcom,msm8226-smp
+            - qcom,msm8916-smp
+      required:
+        - enable-method
+    then:
+      required:
+        - qcom,acc
+        - qcom,saw
+  - if:
+      # 2 Qualcomm platforms bootloaders need qcom,acc and qcom,saw yet use
+      # "spin-table" or "psci" enable-methods. Disallowing the properties for
+      # all other CPUs is the best we can do as there's not any way to
+      # distinguish these Qualcomm platforms.
+      not:
+        properties:
+          compatible:
+            const: arm,cortex-a53
+    then:
+      properties:
+        qcom,acc: false
+        qcom,saw: false
 
 required:
   - device_type
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml
index ca4bce817273..c2f1f5946cfa 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,saw2.yaml
@@ -73,9 +73,10 @@ examples:
         #size-cells = <0>;
 
         cpu@0 {
-            compatible = "qcom,kryo";
+            compatible = "arm,cortex-a53";
             device_type = "cpu";
             enable-method = "qcom,kpss-acc-v2";
+            qcom,acc = <&acc0>;
             qcom,saw = <&saw0>;
             reg = <0x0>;
             operating-points-v2 = <&cpu_opp_table>;

-- 
2.47.2


  parent reply	other threads:[~2025-04-10 15:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 15:47 [PATCH v2 00/17] Arm cpu schema clean-ups Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 01/17] arm64: dts: allwinner: h5/h6: Drop spurious 'clock-latency-ns' properties Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 02/17] arm64: dts: broadcom: bcm2712: Use "l2-cache" for L2 cache node names Rob Herring (Arm)
2025-04-11 23:37   ` Florian Fainelli
2025-04-14 13:12     ` Rob Herring
2025-04-10 15:47 ` [PATCH v2 03/17] arm64: dts: microchip: sparx5: Fix CPU node "enable-method" property dependencies Rob Herring (Arm)
2025-04-11 16:21   ` Conor Dooley
2025-04-11 20:26     ` Rob Herring
2025-04-14 17:02       ` Conor Dooley
2025-04-10 15:47 ` [PATCH v2 04/17] arm64: dts: qcom: qdu1000: Fix qcom,freq-domain Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 05/17] arm64: dts: qcom: msm8939: Fix CPU node "enable-method" property dependencies Rob Herring (Arm)
2025-04-11  9:15   ` Konrad Dybcio
2025-04-10 15:47 ` [PATCH v2 06/17] arm64: dts: qcom: msm8992-lg-h815: " Rob Herring (Arm)
2025-04-11  9:16   ` Konrad Dybcio
2025-04-10 15:47 ` [PATCH v2 07/17] arm: dts: qcom: sdx55/sdx65: Fix CPU power-domain-names Rob Herring (Arm)
2025-04-11  9:16   ` Konrad Dybcio
2025-04-10 15:47 ` [PATCH v2 08/17] arm/arm64: dts: imx: Drop redundant CPU "clock-latency" Rob Herring (Arm)
2025-05-07  7:33   ` Peng Fan
2025-04-10 15:47 ` [PATCH v2 09/17] arm: dts: qcom: ipq4019: " Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 10/17] arm: dts: rockchip: " Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 11/17] arm64: dts: amlogic: " Rob Herring (Arm)
2025-05-05 18:43   ` Rob Herring
2025-05-05 18:50     ` Rob Herring
2025-04-10 15:47 ` Rob Herring (Arm) [this message]
2025-04-10 15:47 ` [PATCH v2 13/17] dt-bindings: arm/cpus: Re-wrap 'description' entries Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 14/17] dt-bindings: Reference opp-v1 schema in CPU schemas Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 15/17] dt-bindings: arm/cpus: Add missing properties Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 16/17] dt-bindings: arm/cpus: Add power-domains constraints Rob Herring (Arm)
2025-04-10 15:47 ` [PATCH v2 17/17] dt-bindings: cpufreq: Drop redundant Mediatek binding Rob Herring (Arm)
2025-04-11  8:37 ` (subset) [PATCH v2 00/17] Arm cpu schema clean-ups Neil Armstrong
2025-04-11 15:44 ` Chen-Yu Tsai
2025-04-15  2:52 ` Bjorn Andersson
2025-04-26 21:46 ` Heiko Stuebner
2025-05-07 16:38 ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250410-dt-cpu-schema-v2-12-63d7dc9ddd0a@kernel.org \
    --to=robh@kernel.org \
    --cc=Steen.Hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=daniel.machon@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=heiko@sntech.de \
    --cc=imx@lists.linux.dev \
    --cc=jbrunet@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=khilman@baylibre.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=lpieralisi@kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=nm@ti.com \
    --cc=rafael@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=stephan.gerhold@linaro.org \
    --cc=sudeep.holla@arm.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vireshk@kernel.org \
    --cc=wens@csie.org \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).