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

dt-bindings: gpio: aspeed,ast2400-gpio: Convert to DT schema

Squash warnings such as:

```
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dtb: /ahb/apb@1e600000/gpio@1e780000: failed to match any schema with compatible: ['aspeed,ast2400-gpio']
```

Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Andrew Jeffery and committed by
Bartosz Golaszewski
177f954f 8122c7c6

+148 -39
+148
Documentation/devicetree/bindings/gpio/aspeed,ast2400-gpio.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/gpio/aspeed,ast2400-gpio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Aspeed GPIO controller 8 + 9 + maintainers: 10 + - Andrew Jeffery <andrew@codeconstruct.com.au> 11 + 12 + properties: 13 + compatible: 14 + enum: 15 + - aspeed,ast2400-gpio 16 + - aspeed,ast2500-gpio 17 + - aspeed,ast2600-gpio 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + clocks: 23 + maxItems: 1 24 + description: The clock to use for debounce timings 25 + 26 + gpio-controller: true 27 + gpio-line-names: 28 + minItems: 36 29 + maxItems: 232 30 + 31 + gpio-ranges: true 32 + 33 + "#gpio-cells": 34 + const: 2 35 + 36 + interrupts: 37 + maxItems: 1 38 + 39 + interrupt-controller: true 40 + 41 + "#interrupt-cells": 42 + const: 2 43 + 44 + ngpios: 45 + minimum: 36 46 + maximum: 232 47 + 48 + required: 49 + - compatible 50 + - reg 51 + - interrupts 52 + - interrupt-controller 53 + - "#interrupt-cells" 54 + - gpio-controller 55 + - "#gpio-cells" 56 + 57 + allOf: 58 + - if: 59 + properties: 60 + compatible: 61 + contains: 62 + const: aspeed,ast2400-gpio 63 + then: 64 + properties: 65 + gpio-line-names: 66 + minItems: 220 67 + maxItems: 220 68 + ngpios: 69 + const: 220 70 + - if: 71 + properties: 72 + compatible: 73 + contains: 74 + const: aspeed,ast2500-gpio 75 + then: 76 + properties: 77 + gpio-line-names: 78 + minItems: 232 79 + maxItems: 232 80 + ngpios: 81 + const: 232 82 + - if: 83 + properties: 84 + compatible: 85 + contains: 86 + const: aspeed,ast2600-gpio 87 + then: 88 + properties: 89 + gpio-line-names: 90 + minItems: 36 91 + maxItems: 208 92 + ngpios: 93 + enum: [ 36, 208 ] 94 + required: 95 + - ngpios 96 + 97 + additionalProperties: false 98 + 99 + examples: 100 + - | 101 + gpio@1e780000 { 102 + compatible = "aspeed,ast2400-gpio"; 103 + reg = <0x1e780000 0x1000>; 104 + interrupts = <20>; 105 + interrupt-controller; 106 + #interrupt-cells = <2>; 107 + gpio-controller; 108 + #gpio-cells = <2>; 109 + }; 110 + - | 111 + gpio: gpio@1e780000 { 112 + compatible = "aspeed,ast2500-gpio"; 113 + reg = <0x1e780000 0x200>; 114 + interrupts = <20>; 115 + interrupt-controller; 116 + #interrupt-cells = <2>; 117 + gpio-controller; 118 + #gpio-cells = <2>; 119 + gpio-ranges = <&pinctrl 0 0 232>; 120 + }; 121 + - | 122 + #include <dt-bindings/clock/ast2600-clock.h> 123 + #include <dt-bindings/interrupt-controller/arm-gic.h> 124 + #include <dt-bindings/interrupt-controller/irq.h> 125 + gpio0: gpio@1e780000 { 126 + compatible = "aspeed,ast2600-gpio"; 127 + reg = <0x1e780000 0x400>; 128 + clocks = <&syscon ASPEED_CLK_APB2>; 129 + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; 130 + interrupt-controller; 131 + #interrupt-cells = <2>; 132 + #gpio-cells = <2>; 133 + gpio-controller; 134 + gpio-ranges = <&pinctrl 0 0 208>; 135 + ngpios = <208>; 136 + }; 137 + gpio1: gpio@1e780800 { 138 + compatible = "aspeed,ast2600-gpio"; 139 + reg = <0x1e780800 0x800>; 140 + clocks = <&syscon ASPEED_CLK_APB1>; 141 + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 142 + interrupt-controller; 143 + #interrupt-cells = <2>; 144 + gpio-controller; 145 + #gpio-cells = <2>; 146 + gpio-ranges = <&pinctrl 0 208 36>; 147 + ngpios = <36>; 148 + };
-39
Documentation/devicetree/bindings/gpio/gpio-aspeed.txt
··· 1 - Aspeed GPIO controller Device Tree Bindings 2 - ------------------------------------------- 3 - 4 - Required properties: 5 - - compatible : Either "aspeed,ast2400-gpio", "aspeed,ast2500-gpio", 6 - or "aspeed,ast2600-gpio". 7 - 8 - - #gpio-cells : Should be two 9 - - First cell is the GPIO line number 10 - - Second cell is used to specify optional 11 - parameters (unused) 12 - 13 - - reg : Address and length of the register set for the device 14 - - gpio-controller : Marks the device node as a GPIO controller. 15 - - interrupts : Interrupt specifier (see interrupt bindings for 16 - details) 17 - - interrupt-controller : Mark the GPIO controller as an interrupt-controller 18 - 19 - Optional properties: 20 - 21 - - clocks : A phandle to the clock to use for debounce timings 22 - - ngpios : Number of GPIOs controlled by this controller. Should be set 23 - when there are multiple GPIO controllers on a SoC (ast2600). 24 - 25 - The gpio and interrupt properties are further described in their respective 26 - bindings documentation: 27 - 28 - - Documentation/devicetree/bindings/gpio/gpio.txt 29 - - Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 30 - 31 - Example: 32 - gpio@1e780000 { 33 - #gpio-cells = <2>; 34 - compatible = "aspeed,ast2400-gpio"; 35 - gpio-controller; 36 - interrupts = <20>; 37 - reg = <0x1e780000 0x1000>; 38 - interrupt-controller; 39 - };