The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dts/bindings-gpio.txt

Version: -  FREEBSD  -  FREEBSD11  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 $FreeBSD: head/sys/dts/bindings-gpio.txt 333031 2018-04-26 19:00:48Z mw $
    2 
    3 GPIO configuration.
    4 ===================
    5 
    6 1. Properties for GPIO Controllers
    7 
    8 1.1 #gpio-cells
    9 
   10 Property:       #gpio-cells
   11 
   12 Value type:     <u32>
   13 
   14 Description:    The #gpio-cells property defines the number of cells required
   15                 to encode a gpio specifier.
   16 
   17 
   18 1.2 gpio-controller
   19 
   20 Property:       gpio-controller
   21 
   22 Value type:     <empty>
   23 
   24 Description:    The presence of a gpio-controller property defines a node as a
   25                 GPIO controller node.
   26 
   27 
   28 1.3 pin-count
   29 
   30 Property:       pin-count
   31 
   32 Value type:     <u32>
   33 
   34 Description:    The pin-count property defines the number of GPIO pins.
   35 
   36 
   37 1.4 Example
   38 
   39         GPIO: gpio@10100 {
   40                 #gpio-cells = <3>;
   41                 compatible = "mrvl,gpio";
   42                 reg = <0x10100 0x20>;
   43                 gpio-controller;
   44                 interrupts = <6 7 8 9>;
   45                 interrupt-parent = <&PIC>;
   46                 pin-count = <50>
   47         };
   48 
   49 2. Properties for GPIO consumer nodes.
   50 
   51 2.1 gpios
   52 
   53 Property:       gpios
   54 
   55 Value type:     <prop-encoded-array> encoded as arbitrary number of GPIO
   56                 specifiers.
   57 
   58 Description:    The gpios property of a device node defines the GPIO or GPIOs
   59                 that are used by the device. The value of the gpios property
   60                 consists of an arbitrary number of GPIO specifiers.
   61                 
   62                 The first cell of the GPIO specifier is phandle of the node's
   63                 parent GPIO controller and remaining cells are defined by the
   64                 binding describing the GPIO parent, typically include
   65                 information like pin number, direction and various flags.
   66 
   67 Example:
   68                 gpios = <&GPIO 0 1              /* GPIO[0]:  FLAGS */
   69                          &GPIO 1 2>;            /* GPIO[1]:  FLAGS */
   70 
   71 
   72 3. GPIO controller specifier
   73 
   74         <phandle pin dir flags>
   75 
   76 
   77 pin:    0-MAX                           GPIO pin number.
   78 
   79 flags:
   80         Available flags are listed in sys/conf.h. Following combination
   81         can be supported by the controller. For details please refer
   82         to controller's GPIO reference manual.
   83 
   84         GPIO_PIN_INPUT          0x0001  Input direction
   85         GPIO_PIN_OUTPUT         0x0002  Output direction
   86         GPIO_PIN_OPENDRAIN      0x0004  Open-drain output
   87         GPIO_PIN_OPENSOURCE     0x0008  Open-source output
   88         GPIO_PIN_PUSHPULL       0x0010  Push-pull output
   89         GPIO_PIN_TRISTATE       0x0020  Output disabled
   90         GPIO_PIN_PULLUP         0x0040  Internal pull-up enabled
   91         GPIO_PIN_PULLDOWN       0x0080  Internal pull-down enabled
   92         GPIO_PIN_INVIN          0x0100  Invert input
   93         GPIO_PIN_INVOUT         0x0200  Invert output
   94         GPIO_PIN_PULSATE        0x0400  Pulsate in hardware
   95         GPIO_PIN_IRQ_POL_EDG    0x0800  IRQ active single edge
   96         GPIO_PIN_IRQ_POL_DBL    0x1000  IRQ active double edge
   97         GPIO_PIN_IRQ_POL_LVL    0x2000  IRQ active level
   98         GPIO_PIN_IRQ_DEBOUNCE   0x4000  Debounce on IRQ pin
   99 
  100 Example:
  101         gpios = <&GPIO 0  0x00000001    /* GPIO[0]:   IN */
  102                  &GPIO 1  0x00000002    /* GPIO[1]:   OUT */
  103                  &GPIO 2  0x00000801    /* GPIO[2]:   IN, IRQ (edge) */
  104                  &GPIO 3  0x00004001    /* GPIO[3]:   IN, IRQ (level) */
  105                  ...
  106                  &GPIO 10 0x00000401>;  /* GPIO[10]:  OUT, blink */

Cache object: c39299350aa185bcd369bc83bd874e7b


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.