xref: /linux/Documentation/devicetree/bindings/mfd/adi,adp5585.yaml (revision 9ca84b355d607330321a205fdd93f8c2ad1e57af)
1312fc21cSLaurent Pinchart# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2312fc21cSLaurent Pinchart%YAML 1.2
3312fc21cSLaurent Pinchart---
4312fc21cSLaurent Pinchart$id: http://devicetree.org/schemas/mfd/adi,adp5585.yaml#
5312fc21cSLaurent Pinchart$schema: http://devicetree.org/meta-schemas/core.yaml#
6312fc21cSLaurent Pinchart
7312fc21cSLaurent Pincharttitle: Analog Devices ADP5585 Keypad Decoder and I/O Expansion
8312fc21cSLaurent Pinchart
9312fc21cSLaurent Pinchartmaintainers:
10312fc21cSLaurent Pinchart  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
11312fc21cSLaurent Pinchart
12312fc21cSLaurent Pinchartdescription:
13312fc21cSLaurent Pinchart  The ADP5585 is a 10/11 input/output port expander with a built in keypad
14312fc21cSLaurent Pinchart  matrix decoder, programmable logic, reset generator, and PWM generator.
15312fc21cSLaurent Pinchart
16312fc21cSLaurent Pinchartproperties:
17312fc21cSLaurent Pinchart  compatible:
18312fc21cSLaurent Pinchart    items:
19312fc21cSLaurent Pinchart      - enum:
20312fc21cSLaurent Pinchart          - adi,adp5585-00  # Default
21312fc21cSLaurent Pinchart          - adi,adp5585-01  # 11 GPIOs
22312fc21cSLaurent Pinchart          - adi,adp5585-02  # No pull-up resistors by default on special pins
23312fc21cSLaurent Pinchart          - adi,adp5585-03  # Alternate I2C address
24312fc21cSLaurent Pinchart          - adi,adp5585-04  # Pull-down resistors on all pins by default
25312fc21cSLaurent Pinchart      - const: adi,adp5585
26312fc21cSLaurent Pinchart
27312fc21cSLaurent Pinchart  reg:
28312fc21cSLaurent Pinchart    maxItems: 1
29312fc21cSLaurent Pinchart
30312fc21cSLaurent Pinchart  interrupts:
31312fc21cSLaurent Pinchart    maxItems: 1
32312fc21cSLaurent Pinchart
33312fc21cSLaurent Pinchart  vdd-supply: true
34312fc21cSLaurent Pinchart
35312fc21cSLaurent Pinchart  gpio-controller: true
36312fc21cSLaurent Pinchart
37312fc21cSLaurent Pinchart  '#gpio-cells':
38312fc21cSLaurent Pinchart    const: 2
39312fc21cSLaurent Pinchart
40312fc21cSLaurent Pinchart  gpio-reserved-ranges: true
41312fc21cSLaurent Pinchart
42312fc21cSLaurent Pinchart  "#pwm-cells":
43312fc21cSLaurent Pinchart    const: 3
44312fc21cSLaurent Pinchart
45*9ca84b35SHaibo ChenpatternProperties:
46*9ca84b35SHaibo Chen  "-hog(-[0-9]+)?$":
47*9ca84b35SHaibo Chen    type: object
48*9ca84b35SHaibo Chen
49*9ca84b35SHaibo Chen    required:
50*9ca84b35SHaibo Chen      - gpio-hog
51*9ca84b35SHaibo Chen
52312fc21cSLaurent Pinchartrequired:
53312fc21cSLaurent Pinchart  - compatible
54312fc21cSLaurent Pinchart  - reg
55312fc21cSLaurent Pinchart  - gpio-controller
56312fc21cSLaurent Pinchart  - "#gpio-cells"
57312fc21cSLaurent Pinchart  - "#pwm-cells"
58312fc21cSLaurent Pinchart
59312fc21cSLaurent PinchartallOf:
60312fc21cSLaurent Pinchart  - if:
61312fc21cSLaurent Pinchart      properties:
62312fc21cSLaurent Pinchart        compatible:
63312fc21cSLaurent Pinchart          contains:
64312fc21cSLaurent Pinchart            const: adi,adp5585-01
65312fc21cSLaurent Pinchart    then:
66312fc21cSLaurent Pinchart      properties:
67312fc21cSLaurent Pinchart        gpio-reserved-ranges: false
68312fc21cSLaurent Pinchart    else:
69312fc21cSLaurent Pinchart      properties:
70312fc21cSLaurent Pinchart        gpio-reserved-ranges:
71312fc21cSLaurent Pinchart          maxItems: 1
72312fc21cSLaurent Pinchart          items:
73312fc21cSLaurent Pinchart            items:
74312fc21cSLaurent Pinchart              - const: 5
75312fc21cSLaurent Pinchart              - const: 1
76312fc21cSLaurent Pinchart
77312fc21cSLaurent PinchartadditionalProperties: false
78312fc21cSLaurent Pinchart
79312fc21cSLaurent Pinchartexamples:
80312fc21cSLaurent Pinchart  - |
81312fc21cSLaurent Pinchart    i2c {
82312fc21cSLaurent Pinchart        #address-cells = <1>;
83312fc21cSLaurent Pinchart        #size-cells = <0>;
84312fc21cSLaurent Pinchart
85312fc21cSLaurent Pinchart        io-expander@34 {
86312fc21cSLaurent Pinchart            compatible = "adi,adp5585-00", "adi,adp5585";
87312fc21cSLaurent Pinchart            reg = <0x34>;
88312fc21cSLaurent Pinchart
89312fc21cSLaurent Pinchart            vdd-supply = <&reg_3v3>;
90312fc21cSLaurent Pinchart
91312fc21cSLaurent Pinchart            gpio-controller;
92312fc21cSLaurent Pinchart            #gpio-cells = <2>;
93312fc21cSLaurent Pinchart            gpio-reserved-ranges = <5 1>;
94312fc21cSLaurent Pinchart
95312fc21cSLaurent Pinchart            #pwm-cells = <3>;
96312fc21cSLaurent Pinchart        };
97312fc21cSLaurent Pinchart    };
98312fc21cSLaurent Pinchart
99312fc21cSLaurent Pinchart...
100