Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: Add syscon YAML description

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>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Maxime Ripard and committed by
Rob Herring
cc57d7da a2f12f80

+84 -52
-32
Documentation/devicetree/bindings/mfd/syscon.txt
··· 1 - * System Controller Registers R/W driver 2 - 3 - System controller node represents a register region containing a set 4 - of miscellaneous registers. The registers are not cohesive enough to 5 - represent as any specific type of device. The typical use-case is for 6 - some other node's driver, or platform-specific code, to acquire a 7 - reference to the syscon node (e.g. by phandle, node path, or search 8 - using a specific compatible value), interrogate the node (or associated 9 - OS driver) to determine the location of the registers, and access the 10 - registers directly. 11 - 12 - Required properties: 13 - - compatible: Should contain "syscon". 14 - - reg: the register region can be accessed from syscon 15 - 16 - Optional property: 17 - - reg-io-width: the size (in bytes) of the IO accesses that should be 18 - performed on the device. 19 - - hwlocks: reference to a phandle of a hardware spinlock provider node. 20 - 21 - Examples: 22 - gpr: iomuxc-gpr@20e0000 { 23 - compatible = "fsl,imx6q-iomuxc-gpr", "syscon"; 24 - reg = <0x020e0000 0x38>; 25 - hwlocks = <&hwlock1 1>; 26 - }; 27 - 28 - hwlock1: hwspinlock@40500000 { 29 - ... 30 - reg = <0x40500000 0x1000>; 31 - #hwlock-cells = <1>; 32 - };
+84
Documentation/devicetree/bindings/mfd/syscon.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/syscon.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: System Controller Registers R/W Device Tree Bindings 8 + 9 + description: | 10 + System controller node represents a register region containing a set 11 + of miscellaneous registers. The registers are not cohesive enough to 12 + represent as any specific type of device. The typical use-case is 13 + for some other node's driver, or platform-specific code, to acquire 14 + a reference to the syscon node (e.g. by phandle, node path, or 15 + search using a specific compatible value), interrogate the node (or 16 + associated OS driver) to determine the location of the registers, 17 + and access the registers directly. 18 + 19 + maintainers: 20 + - Lee Jones <lee.jones@linaro.org> 21 + 22 + select: 23 + properties: 24 + compatible: 25 + contains: 26 + enum: 27 + - syscon 28 + 29 + required: 30 + - compatible 31 + 32 + properties: 33 + compatible: 34 + anyOf: 35 + - items: 36 + - enum: 37 + - allwinner,sun8i-a83t-system-controller 38 + - allwinner,sun8i-h3-system-controller 39 + - allwinner,sun8i-v3s-system-controller 40 + - allwinner,sun50i-a64-system-controller 41 + 42 + - const: syscon 43 + 44 + - contains: 45 + const: syscon 46 + additionalItems: true 47 + 48 + reg: 49 + maxItems: 1 50 + 51 + reg-io-width: 52 + description: | 53 + The size (in bytes) of the IO accesses that should be performed 54 + on the device. 55 + allOf: 56 + - $ref: /schemas/types.yaml#/definitions/uint32 57 + - enum: [ 1, 2, 4, 8 ] 58 + 59 + hwlocks: 60 + maxItems: 1 61 + description: 62 + Reference to a phandle of a hardware spinlock provider node. 63 + 64 + required: 65 + - compatible 66 + - reg 67 + 68 + unevaluatedProperties: false 69 + 70 + examples: 71 + - | 72 + syscon: syscon@1c00000 { 73 + compatible = "allwinner,sun8i-h3-system-controller", "syscon"; 74 + reg = <0x01c00000 0x1000>; 75 + }; 76 + 77 + - | 78 + gpr: iomuxc-gpr@20e0000 { 79 + compatible = "fsl,imx6q-iomuxc-gpr", "syscon"; 80 + reg = <0x020e0000 0x38>; 81 + hwlocks = <&hwlock1 1>; 82 + }; 83 + 84 + ...
-20
Documentation/devicetree/bindings/misc/allwinner,syscon.txt
··· 1 - * Allwinner sun8i system controller 2 - 3 - This file describes the bindings for the system controller present in 4 - Allwinner SoC H3, A83T and A64. 5 - The principal function of this syscon is to control EMAC PHY choice and 6 - config. 7 - 8 - Required properties for the system controller: 9 - - reg: address and length of the register for the device. 10 - - compatible: should be "syscon" and one of the following string: 11 - "allwinner,sun8i-h3-system-controller" 12 - "allwinner,sun8i-v3s-system-controller" 13 - "allwinner,sun50i-a64-system-controller" 14 - "allwinner,sun8i-a83t-system-controller" 15 - 16 - Example: 17 - syscon: syscon@1c00000 { 18 - compatible = "allwinner,sun8i-h3-system-controller", "syscon"; 19 - reg = <0x01c00000 0x1000>; 20 - };