drivers: mfd: add new driver "mfd_adp5585"

Add mfd_adp5585 and gpio_adp5585 driver. This driver enables ADP5585
as an GPIO expander.
This chip is used as an GPIO expander on i.MX93 EVK. GPIO pinctrl,
read/write and interrupt is supported.
Note that ADP5585 has 2 GPIO banks with 5 pins each. The driver combines
two group into a 16-bit port. Index 0~4 correspond to R0~R4 lines, index
8~12 correspond to C0~C4 lines. Index 5~7 is reserved unavailable.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
This commit is contained in:
Chekhov Ma 2024-05-08 15:55:52 +08:00 committed by Anas Nashif
commit ad2745471c
12 changed files with 829 additions and 0 deletions

View file

@ -0,0 +1,30 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0
description: ADP5585 GPIO Controller
compatible: "adi,adp5585-gpio"
include: gpio-controller.yaml
properties:
"#gpio-cells":
const: 2
ngpios:
const: 13
description: |
Number of GPIOs available on port expander.
gpio-reserved-ranges:
required: true
const: [5, 3]
description: |
Ranges of GPIOs reserved unavailable on port expander.
The ADP5585 has 10 GPIO lines divided in 2 groups. GPIO number
5, 6, 7 is reserved. That's to say, GPIO R0~R4 occupy line
number 0~4, GPIO C0~C4 occupy line number 8~12.
gpio-cells:
- pin
- flags

View file

@ -0,0 +1,19 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0
description: Analog ADP5585 GPIO/keypad/PWM chip
compatible: "adi,adp5585"
include: i2c-device.yaml
properties:
reset-gpios:
type: phandle-array
description: RESET pin
nint-gpios:
type: phandle-array
description: |
Connection for the NINT signal. This signal is active-low when
produced by adp5585 GPIO node.