108 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/gpio/nxp,pcf8575.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: PCF857x-compatible I/O expanders8 9maintainers:10 - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>11 12description:13 The PCF857x-compatible chips have "quasi-bidirectional" I/O lines that can be14 driven high by a pull-up current source or driven low to ground. This15 combines the direction and output level into a single bit per line, which16 can't be read back. We can't actually know at initialization time whether a17 line is configured (a) as output and driving the signal low/high, or (b) as18 input and reporting a low/high value, without knowing the last value written19 since the chip came out of reset (if any). The only reliable solution for20 setting up line direction is thus to do it explicitly.21 22properties:23 compatible:24 enum:25 - maxim,max732826 - maxim,max732927 - nxp,pca857428 - nxp,pca857529 - nxp,pca967030 - nxp,pca967131 - nxp,pca967232 - nxp,pca967333 - nxp,pca967434 - nxp,pca967535 - nxp,pcf857436 - nxp,pcf8574a37 - nxp,pcf857538 39 reg:40 maxItems: 141 42 gpio-line-names:43 minItems: 144 maxItems: 1645 46 gpio-controller: true47 48 '#gpio-cells':49 const: 250 description:51 The first cell is the GPIO number and the second cell specifies GPIO52 flags, as defined in <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH53 and GPIO_ACTIVE_LOW flags are supported.54 55 lines-initial-states:56 $ref: /schemas/types.yaml#/definitions/uint3257 description:58 Bitmask that specifies the initial state of each line.59 When a bit is set to zero, the corresponding line will be initialized to60 the input (pulled-up) state.61 When the bit is set to one, the line will be initialized to the62 low-level output state.63 If the property is not specified all lines will be initialized to the64 input state.65 66 interrupts:67 maxItems: 168 69 interrupt-controller: true70 71 '#interrupt-cells':72 const: 273 74 wakeup-source: true75 76patternProperties:77 "^(.+-hog(-[0-9]+)?)$":78 type: object79 80 required:81 - gpio-hog82 83required:84 - compatible85 - reg86 - gpio-controller87 - '#gpio-cells'88 89additionalProperties: false90 91examples:92 - |93 i2c {94 #address-cells = <1>;95 #size-cells = <0>;96 97 pcf8575: gpio@20 {98 compatible = "nxp,pcf8575";99 reg = <0x20>;100 interrupt-parent = <&irqpin2>;101 interrupts = <3 0>;102 gpio-controller;103 #gpio-cells = <2>;104 interrupt-controller;105 #interrupt-cells = <2>;106 };107 };108