@@ -4,7 +4,19 @@ $id: http://devicetree.org/schemas/gpio/gpio.yaml#
4
4
$schema : http://devicetree.org/meta-schemas/base.yaml#
5
5
6
6
title : GPIO Controller Common Properties
7
- description : Schema for GPIO devicetree bindings
7
+
8
+ description : |
9
+ Every GPIO controller node must contain both an empty "gpio-controller"
10
+ property, and a #gpio-cells integer property, which indicates the number of
11
+ cells in a gpio-specifier.
12
+
13
+ Some system-on-chips (SoCs) use the concept of GPIO banks. A GPIO bank is an
14
+ instance of a hardware IP core on a silicon die, usually exposed to the
15
+ programmer as a coherent range of I/O addresses. Usually each such bank is
16
+ exposed in the device tree as an individual gpio-controller node, reflecting
17
+ the fact that the hardware was synthesized by reusing the same IP block a few
18
+ times over.
19
+
8
20
maintainers :
9
21
10
22
@@ -17,13 +29,43 @@ properties:
17
29
$ref : /schemas/types.yaml#/definitions/flag
18
30
gpio-line-names :
19
31
$ref : /schemas/types.yaml#/definitions/non-unique-string-array
32
+ description : >
33
+ An array of strings defining the names of the GPIO lines going out of the
34
+ GPIO controller. This name should be the most meaningful producer name for
35
+ the system, such as a rail name indicating the usage. Package names such
36
+ as pin name are discouraged: such lines have opaque names (since they are
37
+ by definition generic purpose) and such names are usually not very
38
+ helpful. For example "MMC-CD", "Red LED Vdd" and "ethernet reset" are
39
+ reasonable line names as they describe what the line is used for. "GPIO0"
40
+ is not a good name to give to a GPIO line. Placeholders are discouraged:
41
+ rather use the "" (blank string) if the use of the GPIO line is undefined
42
+ in your design. The names are assigned starting from line offset 0 from
43
+ left to right from the passed array. An incomplete array (where the number
44
+ of passed named are less than ngpios) will still be used up until the last
45
+ provided valid line index.
46
+
20
47
ngpios :
21
48
$ref : /schemas/types.yaml#/definitions/uint32
49
+ description : >
50
+ Indicates the number of in-use slots of available slots for GPIOs. The
51
+ typical example is something like this: the hardware register is 32 bits
52
+ wide, but only 18 of the bits have a physical counterpart. The driver is
53
+ generally written so that all 32 bits can be used, but the IP block is
54
+ reused in a lot of designs, some using all 32 bits, some using 18 and some
55
+ using 12. In this case, setting "ngpios = <18>;" informs the driver that
56
+ only the first 18 GPIOs, at local offset 0 .. 17, are in use. If these
57
+ GPIOs do not happen to be the first N GPIOs at offset 0...N-1, an
58
+ additional set of tuples is needed to specify which GPIOs are unusable,
59
+ with the gpio-reserved-ranges binding.
60
+
22
61
gpio-reserved-ranges :
23
62
$ref : /schemas/types.yaml#/definitions/uint32-matrix
24
63
items :
25
64
minItems : 2
26
65
maxItems : 2
66
+ description :
67
+ Indicates the start and size of the GPIOs that can't be used.
68
+
27
69
gpio-ranges :
28
70
$ref : /schemas/types.yaml#/definitions/phandle-array
29
71
items :
0 commit comments