Skip to content

Commit bf26a47

Browse files
Chunyan ZhangBartosz Golaszewski
authored andcommitted
dt-bindings: gpio: Convert Unisoc EIC controller binding to yaml
Convert the Unisoc EIC controller binding to DT schema format. Update the maxItems of 'reg' property, since the current gpio-eic-sprd driver supports 3 reg items. Also removed a few similar examples. Signed-off-by: Chunyan Zhang <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 59184e1 commit bf26a47

File tree

2 files changed

+103
-97
lines changed

2 files changed

+103
-97
lines changed

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

Lines changed: 0 additions & 97 deletions
This file was deleted.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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-eic.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Unisoc EIC controller
9+
10+
maintainers:
11+
- Orson Zhai <[email protected]>
12+
- Baolin Wang <[email protected]>
13+
- Chunyan Zhang <[email protected]>
14+
15+
description: |
16+
The EIC is the abbreviation of external interrupt controller, which can
17+
be used only in input mode. The Spreadtrum platform has 2 EIC controllers,
18+
one is in digital chip, and another one is in PMIC. The digital chip EIC
19+
controller contains 4 sub-modules, i.e. EIC-debounce, EIC-latch, EIC-async and
20+
EIC-sync. But the PMIC EIC controller contains only one EIC-debounce sub-
21+
module.
22+
23+
The EIC-debounce sub-module provides up to 8 source input signal
24+
connections. A debounce mechanism is used to capture the input signals'
25+
stable status (millisecond resolution) and a single-trigger mechanism
26+
is introduced into this sub-module to enhance the input event detection
27+
reliability. In addition, this sub-module's clock can be shut off
28+
automatically to reduce power dissipation. Moreover the debounce range
29+
is from 1ms to 4s with a step size of 1ms. The input signal will be
30+
ignored if it is asserted for less than 1 ms.
31+
32+
The EIC-latch sub-module is used to latch some special power down signals
33+
and generate interrupts, since the EIC-latch does not depend on the APB
34+
clock to capture signals.
35+
36+
The EIC-async sub-module uses a 32kHz clock to capture the short signals
37+
(microsecond resolution) to generate interrupts by level or edge trigger.
38+
39+
The EIC-sync is similar with GPIO's input function, which is a synchronized
40+
signal input register. It can generate interrupts by level or edge trigger
41+
when detecting input signals.
42+
43+
properties:
44+
compatible:
45+
enum:
46+
- sprd,sc9860-eic-debounce
47+
- sprd,sc9860-eic-latch
48+
- sprd,sc9860-eic-async
49+
- sprd,sc9860-eic-sync
50+
- sprd,sc2731-eic
51+
52+
reg:
53+
minItems: 1
54+
maxItems: 3
55+
description:
56+
EIC controller can support maximum 3 banks which has its own
57+
address base.
58+
59+
gpio-controller: true
60+
61+
"#gpio-cells":
62+
const: 2
63+
64+
interrupt-controller: true
65+
66+
"#interrupt-cells":
67+
const: 2
68+
69+
interrupts:
70+
maxItems: 1
71+
description:
72+
The interrupt shared by all GPIO lines for this controller.
73+
74+
required:
75+
- compatible
76+
- reg
77+
- gpio-controller
78+
- "#gpio-cells"
79+
- interrupt-controller
80+
- "#interrupt-cells"
81+
- interrupts
82+
83+
additionalProperties: false
84+
85+
examples:
86+
- |
87+
#include <dt-bindings/interrupt-controller/arm-gic.h>
88+
89+
soc {
90+
#address-cells = <2>;
91+
#size-cells = <2>;
92+
93+
eic_debounce: gpio@40210000 {
94+
compatible = "sprd,sc9860-eic-debounce";
95+
reg = <0 0x40210000 0 0x80>;
96+
gpio-controller;
97+
#gpio-cells = <2>;
98+
interrupt-controller;
99+
#interrupt-cells = <2>;
100+
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
101+
};
102+
};
103+
...

0 commit comments

Comments
 (0)