blob: 2d5eef5add544fa1eea30e37b242405ad462638f [file]
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/syscon-common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: System Controller Registers R/W Common Properties
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@kernel.org>
select:
properties:
compatible:
contains:
const: syscon
required:
- compatible
properties:
compatible:
contains:
const: syscon
# Always require a specific compatible for syscon
minItems: 2
maxItems: 5 # Should be enough
reg-io-width:
description:
The size (in bytes) of the IO accesses that should be performed
on the device.
enum: [1, 2, 4, 8]
required:
- compatible
- reg
allOf:
- if:
properties:
compatible:
contains:
const: simple-mfd
then:
# Always require a specific compatible for syscon with simple-mfd
properties:
compatible:
minItems: 3
maxItems: 5
- if:
properties:
compatible:
contains:
const: simple-bus
then:
# simple-bus conflicts with syscon - if a device is a system controller
# with miscellaneous registers, then it has at least one dedicated
# function thus it is not a simple bus. Allow existing exceptions.
if:
properties:
compatible:
not:
contains:
# This list CANNOT grow
enum:
- cznic,turris1x-cpld
- img,pistachio-cr-periph
- ti,am3352-scm-conf
- ti,am4372-scm-conf
- ti,dm814-scm-conf
- ti,dm8168-scm-conf
- ti,dra7-scm-conf
- ti,omap2-scm-conf
- ti,omap3-scm-conf
- ti,omap4-sysc-padconf-global
- ti,omap5-scm-wkup-conf
- ti,omap5-sysc-padconf-global
then:
required:
- incorrect-usage-of-simple-bus-and-syscon
additionalProperties: true
examples:
- |
syscon: syscon@1c00000 {
compatible = "allwinner,sun8i-h3-system-controller", "syscon";
reg = <0x01c00000 0x1000>;
};
...