Debian Codegraph @

Documentation/devicetree/bindings/gpio/spacemit,k1-gpio.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/gpio/spacemit,k1-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: SpacemiT K1 GPIO controller
8
9 maintainers:
10 - Yixun Lan <[email protected]>
11
12 description:
13 The controller's registers are organized as sets of eight 32-bit
14 registers with each set of port controlling 32 pins. A single
15 interrupt line is shared for all of the pins by the controller.
16
17 properties:
18 $nodename:
19 pattern: "^gpio@[0-9a-f]+$"
20
21 compatible:
22 enum:
23 - spacemit,k1-gpio
24 - spacemit,k3-gpio
25
26 reg:
27 maxItems: 1
28
29 clocks:
30 items:
31 - description: GPIO Core Clock
32 - description: GPIO Bus Clock
33
34 clock-names:
35 items:
36 - const: core
37 - const: bus
38
39 resets:
40 maxItems: 1
41
42 gpio-controller: true
43
44 "#gpio-cells":
45 const: 3
46 description:
47 The first two cells are the GPIO bank index and offset inside the bank,
48 the third cell should specify GPIO flag.
49
50 gpio-ranges: true
51
52 interrupts:
53 maxItems: 1
54
55 interrupt-controller: true
56
57 "#interrupt-cells":
58 const: 3
59 description:
60 The first two cells are the GPIO bank index and offset inside the bank,
61 the third cell should specify interrupt flag. The controller does not
62 support level interrupts, so flags of IRQ_TYPE_LEVEL_HIGH,
63 IRQ_TYPE_LEVEL_LOW should not be used.
64 Refer <dt-bindings/interrupt-controller/irq.h> for valid flags.
65
66 required:
67 - compatible
68 - reg
69 - clocks
70 - clock-names
71 - gpio-controller
72 - "#gpio-cells"
73 - interrupts
74 - interrupt-controller
75 - "#interrupt-cells"
76 - gpio-ranges
77
78 additionalProperties: false
79
80 examples:
81 - |
82 gpio@d4019000 {
83 compatible = "spacemit,k1-gpio";
84 reg = <0xd4019000 0x800>;
85 clocks = <&ccu 9>, <&ccu 61>;
86 clock-names = "core", "bus";
87 gpio-controller;
88 #gpio-cells = <3>;
89 interrupts = <58>;
90 interrupt-controller;
91 interrupt-parent = <&plic>;
92 #interrupt-cells = <3>;
93 gpio-ranges = <&pinctrl 0 0 0 32>,
94 <&pinctrl 1 0 32 32>,
95 <&pinctrl 2 0 64 32>,
96 <&pinctrl 3 0 96 32>;
97 };
98 ...