xref: /linux/Documentation/devicetree/bindings/mfd/syscon-common.yaml (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/syscon-common.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: System Controller Registers R/W Common Properties
8
9description:
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
19maintainers:
20  - Lee Jones <lee@kernel.org>
21
22select:
23  properties:
24    compatible:
25      contains:
26        const: syscon
27
28  required:
29    - compatible
30
31properties:
32  compatible:
33    contains:
34      const: syscon
35    # Always require a specific compatible for syscon
36    minItems: 2
37    maxItems: 5  # Should be enough
38
39  reg-io-width:
40    description:
41      The size (in bytes) of the IO accesses that should be performed
42      on the device.
43    enum: [1, 2, 4, 8]
44
45required:
46  - compatible
47  - reg
48
49allOf:
50  - if:
51      properties:
52        compatible:
53          contains:
54            const: simple-mfd
55    then:
56      # Always require a specific compatible for syscon with simple-mfd
57      properties:
58        compatible:
59          minItems: 3
60          maxItems: 5
61
62  - if:
63      properties:
64        compatible:
65          contains:
66            const: simple-bus
67    then:
68      # simple-bus conflicts with syscon - if a device is a system controller
69      # with miscellaneous registers, then it has at least one dedicated
70      # function thus it is not a simple bus. Allow existing exceptions.
71      if:
72        properties:
73          compatible:
74            not:
75              contains:
76                # This list CANNOT grow
77                enum:
78                  - cznic,turris1x-cpld
79                  - img,pistachio-cr-periph
80                  - ti,am3352-scm-conf
81                  - ti,am4372-scm-conf
82                  - ti,dm814-scm-conf
83                  - ti,dm8168-scm-conf
84                  - ti,dra7-scm-conf
85                  - ti,omap2-scm-conf
86                  - ti,omap3-scm-conf
87                  - ti,omap4-sysc-padconf-global
88                  - ti,omap5-scm-wkup-conf
89                  - ti,omap5-sysc-padconf-global
90      then:
91        required:
92          - incorrect-usage-of-simple-bus-and-syscon
93
94additionalProperties: true
95
96examples:
97  - |
98    syscon: syscon@1c00000 {
99        compatible = "allwinner,sun8i-h3-system-controller", "syscon";
100        reg = <0x01c00000 0x1000>;
101    };
102...
103