xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/adi,adp5585.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*b2d2a78aSEmmanuel Vadot%YAML 1.2
3*b2d2a78aSEmmanuel Vadot---
4*b2d2a78aSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/adi,adp5585.yaml#
5*b2d2a78aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b2d2a78aSEmmanuel Vadot
7*b2d2a78aSEmmanuel Vadottitle: Analog Devices ADP5585 Keypad Decoder and I/O Expansion
8*b2d2a78aSEmmanuel Vadot
9*b2d2a78aSEmmanuel Vadotmaintainers:
10*b2d2a78aSEmmanuel Vadot  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
11*b2d2a78aSEmmanuel Vadot
12*b2d2a78aSEmmanuel Vadotdescription:
13*b2d2a78aSEmmanuel Vadot  The ADP5585 is a 10/11 input/output port expander with a built in keypad
14*b2d2a78aSEmmanuel Vadot  matrix decoder, programmable logic, reset generator, and PWM generator.
15*b2d2a78aSEmmanuel Vadot
16*b2d2a78aSEmmanuel Vadotproperties:
17*b2d2a78aSEmmanuel Vadot  compatible:
18*b2d2a78aSEmmanuel Vadot    items:
19*b2d2a78aSEmmanuel Vadot      - enum:
20*b2d2a78aSEmmanuel Vadot          - adi,adp5585-00  # Default
21*b2d2a78aSEmmanuel Vadot          - adi,adp5585-01  # 11 GPIOs
22*b2d2a78aSEmmanuel Vadot          - adi,adp5585-02  # No pull-up resistors by default on special pins
23*b2d2a78aSEmmanuel Vadot          - adi,adp5585-03  # Alternate I2C address
24*b2d2a78aSEmmanuel Vadot          - adi,adp5585-04  # Pull-down resistors on all pins by default
25*b2d2a78aSEmmanuel Vadot      - const: adi,adp5585
26*b2d2a78aSEmmanuel Vadot
27*b2d2a78aSEmmanuel Vadot  reg:
28*b2d2a78aSEmmanuel Vadot    maxItems: 1
29*b2d2a78aSEmmanuel Vadot
30*b2d2a78aSEmmanuel Vadot  interrupts:
31*b2d2a78aSEmmanuel Vadot    maxItems: 1
32*b2d2a78aSEmmanuel Vadot
33*b2d2a78aSEmmanuel Vadot  vdd-supply: true
34*b2d2a78aSEmmanuel Vadot
35*b2d2a78aSEmmanuel Vadot  gpio-controller: true
36*b2d2a78aSEmmanuel Vadot
37*b2d2a78aSEmmanuel Vadot  '#gpio-cells':
38*b2d2a78aSEmmanuel Vadot    const: 2
39*b2d2a78aSEmmanuel Vadot
40*b2d2a78aSEmmanuel Vadot  gpio-reserved-ranges: true
41*b2d2a78aSEmmanuel Vadot
42*b2d2a78aSEmmanuel Vadot  "#pwm-cells":
43*b2d2a78aSEmmanuel Vadot    const: 3
44*b2d2a78aSEmmanuel Vadot
45*b2d2a78aSEmmanuel VadotpatternProperties:
46*b2d2a78aSEmmanuel Vadot  "-hog(-[0-9]+)?$":
47*b2d2a78aSEmmanuel Vadot    type: object
48*b2d2a78aSEmmanuel Vadot
49*b2d2a78aSEmmanuel Vadot    required:
50*b2d2a78aSEmmanuel Vadot      - gpio-hog
51*b2d2a78aSEmmanuel Vadot
52*b2d2a78aSEmmanuel Vadotrequired:
53*b2d2a78aSEmmanuel Vadot  - compatible
54*b2d2a78aSEmmanuel Vadot  - reg
55*b2d2a78aSEmmanuel Vadot  - gpio-controller
56*b2d2a78aSEmmanuel Vadot  - "#gpio-cells"
57*b2d2a78aSEmmanuel Vadot  - "#pwm-cells"
58*b2d2a78aSEmmanuel Vadot
59*b2d2a78aSEmmanuel VadotallOf:
60*b2d2a78aSEmmanuel Vadot  - if:
61*b2d2a78aSEmmanuel Vadot      properties:
62*b2d2a78aSEmmanuel Vadot        compatible:
63*b2d2a78aSEmmanuel Vadot          contains:
64*b2d2a78aSEmmanuel Vadot            const: adi,adp5585-01
65*b2d2a78aSEmmanuel Vadot    then:
66*b2d2a78aSEmmanuel Vadot      properties:
67*b2d2a78aSEmmanuel Vadot        gpio-reserved-ranges: false
68*b2d2a78aSEmmanuel Vadot    else:
69*b2d2a78aSEmmanuel Vadot      properties:
70*b2d2a78aSEmmanuel Vadot        gpio-reserved-ranges:
71*b2d2a78aSEmmanuel Vadot          maxItems: 1
72*b2d2a78aSEmmanuel Vadot          items:
73*b2d2a78aSEmmanuel Vadot            items:
74*b2d2a78aSEmmanuel Vadot              - const: 5
75*b2d2a78aSEmmanuel Vadot              - const: 1
76*b2d2a78aSEmmanuel Vadot
77*b2d2a78aSEmmanuel VadotadditionalProperties: false
78*b2d2a78aSEmmanuel Vadot
79*b2d2a78aSEmmanuel Vadotexamples:
80*b2d2a78aSEmmanuel Vadot  - |
81*b2d2a78aSEmmanuel Vadot    i2c {
82*b2d2a78aSEmmanuel Vadot        #address-cells = <1>;
83*b2d2a78aSEmmanuel Vadot        #size-cells = <0>;
84*b2d2a78aSEmmanuel Vadot
85*b2d2a78aSEmmanuel Vadot        io-expander@34 {
86*b2d2a78aSEmmanuel Vadot            compatible = "adi,adp5585-00", "adi,adp5585";
87*b2d2a78aSEmmanuel Vadot            reg = <0x34>;
88*b2d2a78aSEmmanuel Vadot
89*b2d2a78aSEmmanuel Vadot            vdd-supply = <&reg_3v3>;
90*b2d2a78aSEmmanuel Vadot
91*b2d2a78aSEmmanuel Vadot            gpio-controller;
92*b2d2a78aSEmmanuel Vadot            #gpio-cells = <2>;
93*b2d2a78aSEmmanuel Vadot            gpio-reserved-ranges = <5 1>;
94*b2d2a78aSEmmanuel Vadot
95*b2d2a78aSEmmanuel Vadot            #pwm-cells = <3>;
96*b2d2a78aSEmmanuel Vadot        };
97*b2d2a78aSEmmanuel Vadot    };
98*b2d2a78aSEmmanuel Vadot
99*b2d2a78aSEmmanuel Vadot...
100