Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: devicetree@vger.kernel.org
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	hauke@hauke-m.de, zajec5@gmail.com, tsbogend@alpha.franken.de,
	linux-mips@vger.kernel.org, arinc.unal@arinc9.com
Subject: [PATCH v3 3/3] dt-bindings: mips: brcm: convert CPU bindings for BMIPS architecture
Date: Thu, 29 Sep 2022 09:20:04 +0200	[thread overview]
Message-ID: <20220929072004.874795-4-sergio.paracuellos@gmail.com> (raw)
In-Reply-To: <20220929072004.874795-1-sergio.paracuellos@gmail.com>

Convert the yaml binding for available CPUs in BMIPS architecture.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../bindings/mips/brcm/brcm,bmips-cpus.yaml   | 102 ++++++++++++++++++
 .../bindings/mips/brcm/brcm,bmips.txt         |   8 --
 2 files changed, 102 insertions(+), 8 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mips/brcm/brcm,bmips-cpus.yaml
 delete mode 100644 Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt

diff --git a/Documentation/devicetree/bindings/mips/brcm/brcm,bmips-cpus.yaml b/Documentation/devicetree/bindings/mips/brcm/brcm,bmips-cpus.yaml
new file mode 100644
index 000000000000..60aa7df9a543
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/brcm/brcm,bmips-cpus.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mips/brcm/brcm,bmips-cpus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MIPS CPUs bindings
+
+maintainers:
+  - Hauke Mehrtens <hauke@hauke-m.de>
+  - Rafał Miłecki <zajec5@gmail.com>
+
+description: |
+  The device tree allows to describe the layout of BMIPS CPUs.
+
+patternProperties:
+  "^/":
+    type: object
+    $ref: "/schemas/mips/brcm/soc.yaml#"
+
+properties:
+  cpus:
+    type: object
+    additionalProperties: true
+    properties:
+      '#address-cells':
+        const: 1
+
+      '#size-cells':
+        const: 0
+
+      mips-hpt-frequency:
+        description: This is common to all CPUs in the system so it lives
+          under the "cpus" node.
+        $ref: /schemas/types.yaml#/definitions/uint32
+
+    patternProperties:
+      "^cpu@[0-9]$":
+        type: object
+        $ref: "/schemas/mips/cpus.yaml#"
+
+    required:
+      - '#address-cells'
+      - '#size-cells'
+
+    allOf:
+      - if:
+          properties:
+            compatible:
+              contains:
+                enum:
+                  - "brcm,bcm3368"
+                  - "brcm,bcm3384"
+                  - "brcm,bcm33843"
+                  - "brcm,bcm3384-viper"
+                  - "brcm,bcm33843-viper"
+                  - "brcm,bcm6328"
+                  - "brcm,bcm6358"
+                  - "brcm,bcm6362"
+                  - "brcm,bcm6368"
+                  - "brcm,bcm63168"
+                  - "brcm,bcm63268"
+                  - "brcm,bcm7125"
+                  - "brcm,bcm7346"
+                  - "brcm,bcm7358"
+                  - "brcm,bcm7360"
+                  - "brcm,bcm7362"
+                  - "brcm,bcm7420"
+                  - "brcm,bcm7425"
+        then:
+          required:
+            - mips-hpt-frequency
+
+additionalProperties: true
+
+examples:
+  - |
+     / {
+         compatible = "brcm,bcm3368";
+         #address-cells = <1>;
+         #size-cells = <1>;
+         model = "Broadcom 3368";
+
+         cpus {
+           #address-cells = <1>;
+           #size-cells = <0>;
+
+           mips-hpt-frequency = <150000000>;
+
+           cpu@0 {
+             compatible = "brcm,bmips4350";
+             device_type = "cpu";
+             reg = <0>;
+           };
+
+           cpu@1 {
+             compatible = "brcm,bmips4350";
+             device_type = "cpu";
+             reg = <1>;
+           };
+         };
+       };
diff --git a/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt b/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
deleted file mode 100644
index 8ef71b4085ca..000000000000
--- a/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-* Broadcom MIPS (BMIPS) CPUs
-
-Required properties:
-- compatible: "brcm,bmips3300", "brcm,bmips4350", "brcm,bmips4380",
-  "brcm,bmips5000"
-
-- mips-hpt-frequency: This is common to all CPUs in the system so it lives
-  under the "cpus" node.
-- 
2.25.1


  parent reply	other threads:[~2022-09-29  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29  7:20 [PATCH v3 0/3] dt-bindings: mips: add CPU bindings for MIPS architecture Sergio Paracuellos
2022-09-29  7:20 ` [PATCH v3 1/3] " Sergio Paracuellos
2022-09-30 17:16   ` Rob Herring
2022-10-01  3:39     ` Sergio Paracuellos
2022-09-29  7:20 ` [PATCH v3 2/3] dt-bindings: mips: brcm: convert Broadcom SoCs to schema Sergio Paracuellos
2022-09-29  7:20 ` Sergio Paracuellos [this message]
2022-09-30 17:43   ` [PATCH v3 3/3] dt-bindings: mips: brcm: convert CPU bindings for BMIPS architecture Rob Herring
2022-10-01  3:44     ` Sergio Paracuellos

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=20220929072004.874795-4-sergio.paracuellos@gmail.com \
    --to=sergio.paracuellos@gmail.com \
    --cc=arinc.unal@arinc9.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=zajec5@gmail.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