* [PATCH] dt-bindings: Add syscon YAML description
@ 2019-11-01 14:10 Maxime Ripard
2019-11-04 7:15 ` Lee Jones
2019-11-06 4:30 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Maxime Ripard @ 2019-11-01 14:10 UTC (permalink / raw)
To: Mark Rutland, Rob Herring, Frank Rowand
Cc: devicetree, Maxime Ripard, Chen-Yu Tsai, Maxime Ripard,
lee.jones, linux-arm-kernel
The syscon binding is a pretty loose one, with everyone having a bunch of
vendor specific compatibles.
In order to start the effort to describe them using YAML, let's create a
binding that tolerates additional, not listed, compatibles.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
.../devicetree/bindings/mfd/syscon.txt | 32 --------
.../bindings/misc/allwinner,syscon.txt | 20 -----
.../devicetree/bindings/misc/syscon.yaml | 74 +++++++++++++++++++
3 files changed, 74 insertions(+), 52 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/mfd/syscon.txt
delete mode 100644 Documentation/devicetree/bindings/misc/allwinner,syscon.txt
create mode 100644 Documentation/devicetree/bindings/misc/syscon.yaml
diff --git a/Documentation/devicetree/bindings/mfd/syscon.txt b/Documentation/devicetree/bindings/mfd/syscon.txt
deleted file mode 100644
index 25d9e9c2fd53..000000000000
--- a/Documentation/devicetree/bindings/mfd/syscon.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-* System Controller Registers R/W driver
-
-System controller node represents a register region containing a set
-of miscellaneous registers. The registers are not cohesive enough to
-represent as any specific type of device. The typical use-case is for
-some other node's driver, or platform-specific code, to acquire a
-reference to the syscon node (e.g. by phandle, node path, or search
-using a specific compatible value), interrogate the node (or associated
-OS driver) to determine the location of the registers, and access the
-registers directly.
-
-Required properties:
-- compatible: Should contain "syscon".
-- reg: the register region can be accessed from syscon
-
-Optional property:
-- reg-io-width: the size (in bytes) of the IO accesses that should be
- performed on the device.
-- hwlocks: reference to a phandle of a hardware spinlock provider node.
-
-Examples:
-gpr: iomuxc-gpr@20e0000 {
- compatible = "fsl,imx6q-iomuxc-gpr", "syscon";
- reg = <0x020e0000 0x38>;
- hwlocks = <&hwlock1 1>;
-};
-
-hwlock1: hwspinlock@40500000 {
- ...
- reg = <0x40500000 0x1000>;
- #hwlock-cells = <1>;
-};
diff --git a/Documentation/devicetree/bindings/misc/allwinner,syscon.txt b/Documentation/devicetree/bindings/misc/allwinner,syscon.txt
deleted file mode 100644
index 31494a24fe69..000000000000
--- a/Documentation/devicetree/bindings/misc/allwinner,syscon.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-* Allwinner sun8i system controller
-
-This file describes the bindings for the system controller present in
-Allwinner SoC H3, A83T and A64.
-The principal function of this syscon is to control EMAC PHY choice and
-config.
-
-Required properties for the system controller:
-- reg: address and length of the register for the device.
-- compatible: should be "syscon" and one of the following string:
- "allwinner,sun8i-h3-system-controller"
- "allwinner,sun8i-v3s-system-controller"
- "allwinner,sun50i-a64-system-controller"
- "allwinner,sun8i-a83t-system-controller"
-
-Example:
-syscon: syscon@1c00000 {
- compatible = "allwinner,sun8i-h3-system-controller", "syscon";
- reg = <0x01c00000 0x1000>;
-};
diff --git a/Documentation/devicetree/bindings/misc/syscon.yaml b/Documentation/devicetree/bindings/misc/syscon.yaml
new file mode 100644
index 000000000000..f2d81bed612f
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/syscon.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: System Controller Registers R/W Device Tree Bindings
+
+description: |
+ System controller node represents a register region containing a set
+ of miscellaneous registers. The registers are not cohesive enough to
+ represent as any specific type of device. The typical use-case is
+ for some other node's driver, or platform-specific code, to acquire
+ a reference to the syscon node (e.g. by phandle, node path, or
+ search using a specific compatible value), interrogate the node (or
+ associated OS driver) to determine the location of the registers,
+ and access the registers directly.
+
+maintainers:
+ - Lee Jones <lee.jones@linaro.org>
+
+properties:
+ compatible:
+ anyOf:
+ - items:
+ - enum:
+ - allwinner,sun8i-a83t-system-controller
+ - allwinner,sun8i-h3-system-controller
+ - allwinner,sun8i-v3s-system-controller
+ - allwinner,sun50i-a64-system-controller
+
+ - const: syscon
+
+ - contains:
+ const: syscon
+ additionalItems: true
+
+ reg:
+ maxItems: 1
+
+ reg-io-width:
+ description: |
+ The size (in bytes) of the IO accesses that should be performed
+ on the device.
+ allOf:
+ - $ref: /schemas/types.yaml#/definitions/uint32
+ - enum: [ 1, 2, 4, 8 ]
+
+ hwlocks:
+ maxItems: 1
+ description:
+ Reference to a phandle of a hardware spinlock provider node.
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ syscon: syscon@1c00000 {
+ compatible = "allwinner,sun8i-h3-system-controller", "syscon";
+ reg = <0x01c00000 0x1000>;
+ };
+
+ - |
+ gpr: iomuxc-gpr@20e0000 {
+ compatible = "fsl,imx6q-iomuxc-gpr", "syscon";
+ reg = <0x020e0000 0x38>;
+ hwlocks = <&hwlock1 1>;
+ };
+
+...
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: Add syscon YAML description
2019-11-01 14:10 [PATCH] dt-bindings: Add syscon YAML description Maxime Ripard
@ 2019-11-04 7:15 ` Lee Jones
2019-11-07 21:31 ` Lee Jones
2019-11-06 4:30 ` Rob Herring
1 sibling, 1 reply; 4+ messages in thread
From: Lee Jones @ 2019-11-04 7:15 UTC (permalink / raw)
To: Maxime Ripard
Cc: Mark Rutland, devicetree, Maxime Ripard, Chen-Yu Tsai,
Rob Herring, Frank Rowand, linux-arm-kernel
On Fri, 01 Nov 2019, Maxime Ripard wrote:
> The syscon binding is a pretty loose one, with everyone having a bunch of
> vendor specific compatibles.
>
> In order to start the effort to describe them using YAML, let's create a
> binding that tolerates additional, not listed, compatibles.
>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> .../devicetree/bindings/mfd/syscon.txt | 32 --------
> .../bindings/misc/allwinner,syscon.txt | 20 -----
> .../devicetree/bindings/misc/syscon.yaml | 74 +++++++++++++++++++
Why are you moving this to drivers/misc?
> 3 files changed, 74 insertions(+), 52 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/mfd/syscon.txt
> delete mode 100644 Documentation/devicetree/bindings/misc/allwinner,syscon.txt
> create mode 100644 Documentation/devicetree/bindings/misc/syscon.yaml
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: Add syscon YAML description
2019-11-01 14:10 [PATCH] dt-bindings: Add syscon YAML description Maxime Ripard
2019-11-04 7:15 ` Lee Jones
@ 2019-11-06 4:30 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-11-06 4:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: Mark Rutland, devicetree, Frank Rowand, Maxime Ripard,
Chen-Yu Tsai, lee.jones, linux-arm-kernel
On Fri, Nov 01, 2019 at 03:10:34PM +0100, Maxime Ripard wrote:
> The syscon binding is a pretty loose one, with everyone having a bunch of
> vendor specific compatibles.
>
> In order to start the effort to describe them using YAML, let's create a
> binding that tolerates additional, not listed, compatibles.
>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> .../devicetree/bindings/mfd/syscon.txt | 32 --------
> .../bindings/misc/allwinner,syscon.txt | 20 -----
> .../devicetree/bindings/misc/syscon.yaml | 74 +++++++++++++++++++
> 3 files changed, 74 insertions(+), 52 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/mfd/syscon.txt
> delete mode 100644 Documentation/devicetree/bindings/misc/allwinner,syscon.txt
> create mode 100644 Documentation/devicetree/bindings/misc/syscon.yaml
>
> diff --git a/Documentation/devicetree/bindings/mfd/syscon.txt b/Documentation/devicetree/bindings/mfd/syscon.txt
> deleted file mode 100644
> index 25d9e9c2fd53..000000000000
> --- a/Documentation/devicetree/bindings/mfd/syscon.txt
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -* System Controller Registers R/W driver
> -
> -System controller node represents a register region containing a set
> -of miscellaneous registers. The registers are not cohesive enough to
> -represent as any specific type of device. The typical use-case is for
> -some other node's driver, or platform-specific code, to acquire a
> -reference to the syscon node (e.g. by phandle, node path, or search
> -using a specific compatible value), interrogate the node (or associated
> -OS driver) to determine the location of the registers, and access the
> -registers directly.
> -
> -Required properties:
> -- compatible: Should contain "syscon".
> -- reg: the register region can be accessed from syscon
> -
> -Optional property:
> -- reg-io-width: the size (in bytes) of the IO accesses that should be
> - performed on the device.
> -- hwlocks: reference to a phandle of a hardware spinlock provider node.
> -
> -Examples:
> -gpr: iomuxc-gpr@20e0000 {
> - compatible = "fsl,imx6q-iomuxc-gpr", "syscon";
> - reg = <0x020e0000 0x38>;
> - hwlocks = <&hwlock1 1>;
> -};
> -
> -hwlock1: hwspinlock@40500000 {
> - ...
> - reg = <0x40500000 0x1000>;
> - #hwlock-cells = <1>;
> -};
> diff --git a/Documentation/devicetree/bindings/misc/allwinner,syscon.txt b/Documentation/devicetree/bindings/misc/allwinner,syscon.txt
> deleted file mode 100644
> index 31494a24fe69..000000000000
> --- a/Documentation/devicetree/bindings/misc/allwinner,syscon.txt
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -* Allwinner sun8i system controller
> -
> -This file describes the bindings for the system controller present in
> -Allwinner SoC H3, A83T and A64.
> -The principal function of this syscon is to control EMAC PHY choice and
> -config.
> -
> -Required properties for the system controller:
> -- reg: address and length of the register for the device.
> -- compatible: should be "syscon" and one of the following string:
> - "allwinner,sun8i-h3-system-controller"
> - "allwinner,sun8i-v3s-system-controller"
> - "allwinner,sun50i-a64-system-controller"
> - "allwinner,sun8i-a83t-system-controller"
> -
> -Example:
> -syscon: syscon@1c00000 {
> - compatible = "allwinner,sun8i-h3-system-controller", "syscon";
> - reg = <0x01c00000 0x1000>;
> -};
> diff --git a/Documentation/devicetree/bindings/misc/syscon.yaml b/Documentation/devicetree/bindings/misc/syscon.yaml
> new file mode 100644
> index 000000000000..f2d81bed612f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/syscon.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/syscon.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: System Controller Registers R/W Device Tree Bindings
> +
> +description: |
> + System controller node represents a register region containing a set
> + of miscellaneous registers. The registers are not cohesive enough to
> + represent as any specific type of device. The typical use-case is
> + for some other node's driver, or platform-specific code, to acquire
> + a reference to the syscon node (e.g. by phandle, node path, or
> + search using a specific compatible value), interrogate the node (or
> + associated OS driver) to determine the location of the registers,
> + and access the registers directly.
> +
> +maintainers:
> + - Lee Jones <lee.jones@linaro.org>
> +
> +properties:
> + compatible:
> + anyOf:
> + - items:
> + - enum:
> + - allwinner,sun8i-a83t-system-controller
> + - allwinner,sun8i-h3-system-controller
> + - allwinner,sun8i-v3s-system-controller
> + - allwinner,sun50i-a64-system-controller
> +
> + - const: syscon
> +
> + - contains:
> + const: syscon
> + additionalItems: true
If you want to match on all syscon nodes, you'll need a 'select' because
'syscon' is now filtered out of the generated select.
> +
> + reg:
> + maxItems: 1
> +
> + reg-io-width:
> + description: |
> + The size (in bytes) of the IO accesses that should be performed
> + on the device.
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [ 1, 2, 4, 8 ]
> +
> + hwlocks:
> + maxItems: 1
> + description:
> + Reference to a phandle of a hardware spinlock provider node.
> +
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + syscon: syscon@1c00000 {
> + compatible = "allwinner,sun8i-h3-system-controller", "syscon";
> + reg = <0x01c00000 0x1000>;
> + };
> +
> + - |
> + gpr: iomuxc-gpr@20e0000 {
> + compatible = "fsl,imx6q-iomuxc-gpr", "syscon";
> + reg = <0x020e0000 0x38>;
> + hwlocks = <&hwlock1 1>;
> + };
> +
> +...
> --
> 2.23.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: Add syscon YAML description
2019-11-04 7:15 ` Lee Jones
@ 2019-11-07 21:31 ` Lee Jones
0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2019-11-07 21:31 UTC (permalink / raw)
To: Maxime Ripard
Cc: Mark Rutland, devicetree, Maxime Ripard, Chen-Yu Tsai,
Rob Herring, Frank Rowand, linux-arm-kernel
On Mon, 04 Nov 2019, Lee Jones wrote:
> On Fri, 01 Nov 2019, Maxime Ripard wrote:
>
> > The syscon binding is a pretty loose one, with everyone having a bunch of
> > vendor specific compatibles.
> >
> > In order to start the effort to describe them using YAML, let's create a
> > binding that tolerates additional, not listed, compatibles.
> >
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > ---
> > .../devicetree/bindings/mfd/syscon.txt | 32 --------
> > .../bindings/misc/allwinner,syscon.txt | 20 -----
> > .../devicetree/bindings/misc/syscon.yaml | 74 +++++++++++++++++++
>
> Why are you moving this to drivers/misc?
That's a NACK by the way. ;)
> > 3 files changed, 74 insertions(+), 52 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/mfd/syscon.txt
> > delete mode 100644 Documentation/devicetree/bindings/misc/allwinner,syscon.txt
> > create mode 100644 Documentation/devicetree/bindings/misc/syscon.yaml
>
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-07 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01 14:10 [PATCH] dt-bindings: Add syscon YAML description Maxime Ripard
2019-11-04 7:15 ` Lee Jones
2019-11-07 21:31 ` Lee Jones
2019-11-06 4:30 ` Rob Herring
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).