Skip to content

Commit 36f4223

Browse files
hshahaxiadoarndb
authored andcommitted
dt-bindings: gpio: cdns: convert to YAML
Convert Cadence family GPIO controller bindings to DT schema. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Harshit Shah <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent c1fbbb7 commit 36f4223

File tree

2 files changed

+79
-43
lines changed

2 files changed

+79
-43
lines changed

Documentation/devicetree/bindings/gpio/cdns,gpio.txt

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/cdns,gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Cadence GPIO Controller
8+
9+
maintainers:
10+
- Jan Kotas <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: cdns,gpio-r1p02
15+
16+
reg:
17+
maxItems: 1
18+
19+
clocks:
20+
maxItems: 1
21+
22+
ngpios:
23+
minimum: 1
24+
maximum: 32
25+
26+
gpio-controller: true
27+
28+
"#gpio-cells":
29+
const: 2
30+
description: |
31+
- First cell is the GPIO line number.
32+
- Second cell is flags as defined in <dt-bindings/gpio/gpio.h>,
33+
only GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW supported.
34+
35+
interrupt-controller: true
36+
37+
"#interrupt-cells":
38+
const: 2
39+
description: |
40+
- First cell is the GPIO line number used as IRQ.
41+
- Second cell is the trigger type, as defined in
42+
<dt-bindings/interrupt-controller/irq.h>.
43+
44+
interrupts:
45+
maxItems: 1
46+
47+
required:
48+
- compatible
49+
- reg
50+
- clocks
51+
- gpio-controller
52+
- "#gpio-cells"
53+
54+
if:
55+
required: [interrupt-controller]
56+
then:
57+
required:
58+
- interrupts
59+
60+
additionalProperties: false
61+
62+
examples:
63+
- |
64+
#include <dt-bindings/interrupt-controller/arm-gic.h>
65+
#include <dt-bindings/interrupt-controller/irq.h>
66+
gpio0: gpio-controller@fd060000 {
67+
compatible = "cdns,gpio-r1p02";
68+
reg = <0xfd060000 0x1000>;
69+
clocks = <&gpio_clk>;
70+
71+
interrupt-parent = <&gic>;
72+
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
73+
74+
gpio-controller;
75+
#gpio-cells = <2>;
76+
77+
interrupt-controller;
78+
#interrupt-cells = <2>;
79+
};

0 commit comments

Comments
 (0)