Skip to content

Commit 177f954

Browse files
amboarBartosz Golaszewski
authored andcommitted
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 <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 8122c7c commit 177f954

File tree

2 files changed

+148
-39
lines changed

2 files changed

+148
-39
lines changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
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 <[email protected]>
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+
};

Documentation/devicetree/bindings/gpio/gpio-aspeed.txt

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)