Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/gpio/nxp,pcf8575.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: PCF857x-compatible I/O expanders
0008 
0009 maintainers:
0010   - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
0011 
0012 description:
0013   The PCF857x-compatible chips have "quasi-bidirectional" I/O lines that can be
0014   driven high by a pull-up current source or driven low to ground. This
0015   combines the direction and output level into a single bit per line, which
0016   can't be read back. We can't actually know at initialization time whether a
0017   line is configured (a) as output and driving the signal low/high, or (b) as
0018   input and reporting a low/high value, without knowing the last value written
0019   since the chip came out of reset (if any). The only reliable solution for
0020   setting up line direction is thus to do it explicitly.
0021 
0022 properties:
0023   compatible:
0024     enum:
0025       - maxim,max7328
0026       - maxim,max7329
0027       - nxp,pca8574
0028       - nxp,pca8575
0029       - nxp,pca9670
0030       - nxp,pca9671
0031       - nxp,pca9672
0032       - nxp,pca9673
0033       - nxp,pca9674
0034       - nxp,pca9675
0035       - nxp,pcf8574
0036       - nxp,pcf8574a
0037       - nxp,pcf8575
0038 
0039   reg:
0040     maxItems: 1
0041 
0042   gpio-controller: true
0043 
0044   '#gpio-cells':
0045     const: 2
0046     description:
0047       The first cell is the GPIO number and the second cell specifies GPIO
0048       flags, as defined in <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH
0049       and GPIO_ACTIVE_LOW flags are supported.
0050 
0051   lines-initial-states:
0052     $ref: /schemas/types.yaml#/definitions/uint32
0053     description:
0054       Bitmask that specifies the initial state of each line.
0055       When a bit is set to zero, the corresponding line will be initialized to
0056       the input (pulled-up) state.
0057       When the  bit is set to one, the line will be initialized to the
0058       low-level output state.
0059       If the property is not specified all lines will be initialized to the
0060       input state.
0061 
0062   interrupts:
0063     maxItems: 1
0064 
0065   interrupt-controller: true
0066 
0067   '#interrupt-cells':
0068     const: 2
0069 
0070   wakeup-source: true
0071 
0072 patternProperties:
0073   "^(.+-hog(-[0-9]+)?)$":
0074     type: object
0075 
0076     required:
0077       - gpio-hog
0078 
0079 required:
0080   - compatible
0081   - reg
0082   - gpio-controller
0083   - '#gpio-cells'
0084 
0085 additionalProperties: false
0086 
0087 examples:
0088   - |
0089     i2c {
0090             #address-cells = <1>;
0091             #size-cells = <0>;
0092 
0093             pcf8575: gpio@20 {
0094                     compatible = "nxp,pcf8575";
0095                     reg = <0x20>;
0096                     interrupt-parent = <&irqpin2>;
0097                     interrupts = <3 0>;
0098                     gpio-controller;
0099                     #gpio-cells = <2>;
0100                     interrupt-controller;
0101                     #interrupt-cells = <2>;
0102             };
0103     };