~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to Documentation/devicetree/bindings/gpio/gpio.txt

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-57i0gl3v99b3lkfg
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
1) gpios property
5
5
-----------------
6
6
 
7
 
Nodes that makes use of GPIOs should define them using `gpios' property,
8
 
format of which is: <&gpio-controller1-phandle gpio1-specifier
9
 
                     &gpio-controller2-phandle gpio2-specifier
10
 
                     0 /* holes are permitted, means no GPIO 3 */
11
 
                     &gpio-controller4-phandle gpio4-specifier
12
 
                     ...>;
13
 
 
14
 
Note that gpio-specifier length is controller dependent.
 
7
Nodes that makes use of GPIOs should specify them using one or more
 
8
properties, each containing a 'gpio-list':
 
9
 
 
10
        gpio-list ::= <single-gpio> [gpio-list]
 
11
        single-gpio ::= <gpio-phandle> <gpio-specifier>
 
12
        gpio-phandle : phandle to gpio controller node
 
13
        gpio-specifier : Array of #gpio-cells specifying specific gpio
 
14
                         (controller specific)
 
15
 
 
16
GPIO properties should be named "[<name>-]gpios".  Exact
 
17
meaning of each gpios property must be documented in the device tree
 
18
binding for each device.
 
19
 
 
20
For example, the following could be used to describe gpios pins to use
 
21
as chip select lines; with chip selects 0, 1 and 3 populated, and chip
 
22
select 2 left empty:
 
23
 
 
24
        gpio1: gpio1 {
 
25
                gpio-controller
 
26
                 #gpio-cells = <2>;
 
27
        };
 
28
        gpio2: gpio2 {
 
29
                gpio-controller
 
30
                 #gpio-cells = <1>;
 
31
        };
 
32
        [...]
 
33
         chipsel-gpios = <&gpio1 12 0>,
 
34
                         <&gpio1 13 0>,
 
35
                         <0>, /* holes are permitted, means no GPIO 2 */
 
36
                         <&gpio2 2>;
 
37
 
 
38
Note that gpio-specifier length is controller dependent.  In the
 
39
above example, &gpio1 uses 2 cells to specify a gpio, while &gpio2
 
40
only uses one.
15
41
 
16
42
gpio-specifier may encode: bank, pin position inside the bank,
17
43
whether pin is open-drain and whether pin is logically inverted.
 
44
Exact meaning of each specifier cell is controller specific, and must
 
45
be documented in the device tree binding for the device.
18
46
 
19
47
Example of the node using GPIOs:
20
48
 
28
56
2) gpio-controller nodes
29
57
------------------------
30
58
 
31
 
Every GPIO controller node must have #gpio-cells property defined,
32
 
this information will be used to translate gpio-specifiers.
 
59
Every GPIO controller node must both an empty "gpio-controller"
 
60
property, and have #gpio-cells contain the size of the gpio-specifier.
33
61
 
34
62
Example of two SOC GPIO banks defined as gpio-controller nodes:
35
63