Commit 312fc21c authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Lee Jones
Browse files

dt-bindings: mfd: Add Analog Devices ADP5585



The ADP5585 is a 10/11 input/output port expander with a built in keypad
matrix decoder, programmable logic, reset generator, and PWM generator.
These bindings model the device as an MFD, and support the GPIO expander
and PWM functions.

These bindings support the GPIO and PWM functions.

Drop the existing adi,adp5585 and adi,adp5585-02 compatible strings from
trivial-devices.yaml. They have been added there by mistake as the
driver that was submitted at the same time used different compatible
strings. We can take them over safely.

Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240722121100.2855-2-laurent.pinchart@ideasonboard.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 8400291e
Loading
Loading
Loading
Loading
+92 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/adi,adp5585.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices ADP5585 Keypad Decoder and I/O Expansion

maintainers:
  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>

description:
  The ADP5585 is a 10/11 input/output port expander with a built in keypad
  matrix decoder, programmable logic, reset generator, and PWM generator.

properties:
  compatible:
    items:
      - enum:
          - adi,adp5585-00  # Default
          - adi,adp5585-01  # 11 GPIOs
          - adi,adp5585-02  # No pull-up resistors by default on special pins
          - adi,adp5585-03  # Alternate I2C address
          - adi,adp5585-04  # Pull-down resistors on all pins by default
      - const: adi,adp5585

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdd-supply: true

  gpio-controller: true

  '#gpio-cells':
    const: 2

  gpio-reserved-ranges: true

  "#pwm-cells":
    const: 3

required:
  - compatible
  - reg
  - gpio-controller
  - "#gpio-cells"
  - "#pwm-cells"

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: adi,adp5585-01
    then:
      properties:
        gpio-reserved-ranges: false
    else:
      properties:
        gpio-reserved-ranges:
          maxItems: 1
          items:
            items:
              - const: 5
              - const: 1

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        io-expander@34 {
            compatible = "adi,adp5585-00", "adi,adp5585";
            reg = <0x34>;

            vdd-supply = <&reg_3v3>;

            gpio-controller;
            #gpio-cells = <2>;
            gpio-reserved-ranges = <5 1>;

            #pwm-cells = <3>;
        };
    };

...
+0 −4
Original line number Diff line number Diff line
@@ -38,10 +38,6 @@ properties:
          - ad,adm9240
            # AD5110 - Nonvolatile Digital Potentiometer
          - adi,ad5110
            # Analog Devices ADP5585 Keypad Decoder and I/O Expansion
          - adi,adp5585
            # Analog Devices ADP5585 Keypad Decoder and I/O Expansion with support for Row5
          - adi,adp5585-02
            # Analog Devices ADP5589 Keypad Decoder and I/O Expansion
          - adi,adp5589
            # Analog Devices LT7182S Dual Channel 6A, 20V PolyPhase Step-Down Silent Switcher
+7 −0
Original line number Diff line number Diff line
@@ -537,6 +537,13 @@ F: drivers/leds/leds-adp5520.c
F:	drivers/mfd/adp5520.c
F:	drivers/video/backlight/adp5520_bl.c
ADP5585 GPIO EXPANDER, PWM AND KEYPAD CONTROLLER DRIVER
M:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
L:	linux-gpio@vger.kernel.org
L:	linux-pwm@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/*/adi,adp5585*.yaml
ADP5588 QWERTY KEYPAD AND IO EXPANDER DRIVER (ADP5588/ADP5587)
M:	Michael Hennerich <michael.hennerich@analog.com>
S:	Supported