linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>,
	Robin Murphy <robin.murphy@arm.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/11] dt-bindings: arm: convert vexpress-sysregs to DT schema
Date: Wed, 27 Apr 2022 12:25:23 +0100	[thread overview]
Message-ID: <20220427112528.4097815-7-andre.przywara@arm.com> (raw)
In-Reply-To: <20220427112528.4097815-1-andre.przywara@arm.com>

The Arm Versatile Express system control register block provides GPIO
functionality to some devices and is also used for board identification.

Extract the first half of the informal vexpress-sysreg.txt binding and
make it proper DT schema compliant.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 .../bindings/arm/vexpress-sysreg.yaml         | 89 +++++++++++++++++++
 1 file changed, 89 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml

diff --git a/Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml b/Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml
new file mode 100644
index 0000000000000..b5c03ebba6a6e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/vexpress-sysreg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM Versatile Express system registers bindings
+
+maintainers:
+  - Andre Przywara <andre.przywara@arm.com>
+
+description: |+
+  This is a system control registers block, providing multiple low level
+  platform functions like board detection and identification, software
+  interrupt generation, MMC and NOR Flash control etc.
+
+properties:
+  compatible:
+    const: arm,vexpress-sysreg
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  ranges: true
+
+additionalProperties: false
+
+patternProperties:
+  '^gpio@[0-9a-fA-F]+$':
+    type: object
+    description:
+      GPIO children
+
+    properties:
+      compatible:
+        enum:
+          - arm,vexpress-sysreg,sys_led
+          - arm,vexpress-sysreg,sys_mci
+          - arm,vexpress-sysreg,sys_flash
+
+      gpio-controller: true
+
+      "#gpio-cells":
+        const: 2
+        description: |
+          The first cell is the function number:
+          for sys_led : 0..7 = LED 0..7
+          for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT
+          for sys_flash : 0 = NOR FLASH WPn
+          The second cell can take standard GPIO flags.
+
+      reg:
+        maxItems: 1
+
+    required:
+      - compatible
+      - reg
+      - gpio-controller
+      - "#gpio-cells"
+
+required:
+  - compatible
+  - "#address-cells"
+  - "#size-cells"
+
+examples:
+  - |
+    sysreg@0 {
+            compatible = "arm,vexpress-sysreg";
+            reg = <0x00000 0x1000>;
+            #address-cells = <1>;
+            #size-cells = <1>;
+            ranges = <0 0 0x1000>;
+
+            v2m_led_gpios: gpio@8 {
+                    compatible = "arm,vexpress-sysreg,sys_led";
+                    reg = <0x008 4>;
+                    gpio-controller;
+                    #gpio-cells = <2>;
+            };
+    };
+
+...
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-04-27 11:27 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 11:25 [PATCH 00/11] dt-bindings: convert various Arm Ltd. IP to DT schema Andre Przywara
2022-04-27 11:25 ` [PATCH 01/11] dt-bindings: iommu: arm,smmu-v3: make PRI IRQ optional Andre Przywara
2022-04-27 12:04   ` Robin Murphy
2022-04-28  6:56   ` Krzysztof Kozlowski
2022-04-28  9:23     ` Robin Murphy
2022-04-28  9:25       ` Krzysztof Kozlowski
2022-05-06 15:19     ` Andre Przywara
2022-04-27 11:25 ` [PATCH 02/11] dt-bindings: arm: spe-pmu: convert to DT schema Andre Przywara
2022-04-28  6:57   ` Krzysztof Kozlowski
2022-04-27 11:25 ` [PATCH 03/11] dt-bindings: arm: sp810: " Andre Przywara
2022-04-28  7:01   ` Krzysztof Kozlowski
2022-04-27 11:25 ` [PATCH 04/11] dt-bindings: sound: add Arm PL041 AACI " Andre Przywara
2022-04-27 11:41   ` Mark Brown
2022-04-27 13:33     ` Andre Przywara
2022-04-27 13:39       ` Mark Brown
2022-04-27 13:32   ` Mark Brown
2022-04-27 13:52     ` Andre Przywara
2022-04-27 14:11       ` Mark Brown
2022-04-28  7:06   ` Krzysztof Kozlowski
2022-04-27 11:25 ` [PATCH 05/11] dt-bindings: serio: add Arm PL050 " Andre Przywara
2022-04-28  7:07   ` Krzysztof Kozlowski
2022-04-28 17:27     ` Andre Przywara
2022-04-29  6:29       ` Krzysztof Kozlowski
2022-04-29  6:35         ` Krzysztof Kozlowski
2022-04-29 10:06           ` Andre Przywara
2022-04-27 11:25 ` Andre Przywara [this message]
2022-04-27 19:33   ` [PATCH 06/11] dt-bindings: arm: convert vexpress-sysregs to " Rob Herring
2022-04-27 11:25 ` [PATCH 07/11] dt-bindings: arm: convert vexpress-config " Andre Przywara
2022-04-27 19:37   ` Rob Herring
2022-04-27 11:25 ` [PATCH 08/11] dt-bindings: display: convert PL110/PL111 " Andre Przywara
2022-04-27 11:25 ` [PATCH 09/11] dt-bindings: display: convert Arm HDLCD " Andre Przywara
2022-04-27 19:39   ` Rob Herring
2022-04-27 11:25 ` [PATCH 10/11] dt-bindings: display: convert Arm Mali-DP " Andre Przywara
2022-04-27 19:39   ` Rob Herring
2022-04-27 11:25 ` [PATCH 11/11] dt-bindings: display: convert Arm Komeda " Andre Przywara
2022-04-27 19:29 ` [PATCH 00/11] dt-bindings: convert various Arm Ltd. IP " Rob Herring

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=20220427112528.4097815-7-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=liviu.dudau@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.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).