On Wed, Apr 27, 2022 at 12:25:23PM +0100, Andre Przywara wrote: > 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@xxxxxxx> > --- > .../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@xxxxxxx> > + > +description: |+ Don't need '|+' unless you have formatting to maintain and you don't. > + 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. comma ^ > + > +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]+$': Lowercase hex only for unit address. > + type: object additionalProperties: false > + 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 > >