Skip to content

Commit 59184e1

Browse files
Chunyan ZhangBartosz Golaszewski
authored andcommitted
dt-bindings: gpio: Convert Unisoc GPIO controller binding to yaml
Convert the Unisoc gpio controller binding to DT schema format. Signed-off-by: Chunyan Zhang <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 83b9e0f commit 59184e1

File tree

2 files changed

+70
-28
lines changed

2 files changed

+70
-28
lines changed

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

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2022 Unisoc Inc.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Unisoc GPIO controller
9+
10+
maintainers:
11+
- Orson Zhai <[email protected]>
12+
- Baolin Wang <[email protected]>
13+
- Chunyan Zhang <[email protected]>
14+
15+
description: |
16+
The controller's registers are organized as sets of sixteen 16-bit
17+
registers with each set controlling a bank of up to 16 pins. A single
18+
interrupt is shared for all of the banks handled by the controller.
19+
20+
properties:
21+
compatible:
22+
const: sprd,sc9860-gpio
23+
24+
reg:
25+
maxItems: 1
26+
27+
gpio-controller: true
28+
29+
"#gpio-cells":
30+
const: 2
31+
32+
interrupt-controller: true
33+
34+
"#interrupt-cells":
35+
const: 2
36+
37+
interrupts:
38+
maxItems: 1
39+
description: The interrupt shared by all GPIO lines for this controller.
40+
41+
required:
42+
- compatible
43+
- reg
44+
- gpio-controller
45+
- "#gpio-cells"
46+
- interrupt-controller
47+
- "#interrupt-cells"
48+
- interrupts
49+
50+
additionalProperties: false
51+
52+
examples:
53+
- |
54+
#include <dt-bindings/interrupt-controller/arm-gic.h>
55+
56+
soc {
57+
#address-cells = <2>;
58+
#size-cells = <2>;
59+
60+
ap_gpio: gpio@40280000 {
61+
compatible = "sprd,sc9860-gpio";
62+
reg = <0 0x40280000 0 0x1000>;
63+
gpio-controller;
64+
#gpio-cells = <2>;
65+
interrupt-controller;
66+
#interrupt-cells = <2>;
67+
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
68+
};
69+
};
70+
...

0 commit comments

Comments
 (0)