| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/gpio/maxim,max7360-gpio.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: Maxim MAX7360 GPIO controller |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Kamel Bouhara <[email protected]> |
| 11 |
- Mathieu Dubois-Briand <[email protected]> |
| 12 |
|
| 13 |
description: | |
| 14 |
Maxim MAX7360 GPIO controller, in MAX7360 chipset |
| 15 |
https://www.analog.com/en/products/max7360.html |
| 16 |
|
| 17 |
The device provides two series of GPIOs, referred here as GPIOs and GPOs. |
| 18 |
|
| 19 |
PORT0 to PORT7 pins can be used as GPIOs, with support for interrupts and |
| 20 |
constant-current mode. These pins will also be used by the rotary encoder and |
| 21 |
PWM functionalities. |
| 22 |
|
| 23 |
COL2 to COL7 pins can be used as GPOs, there is no input capability. COL pins |
| 24 |
will be partitioned, with the first pins being affected to the keypad |
| 25 |
functionality and the last ones as GPOs. |
| 26 |
|
| 27 |
properties: |
| 28 |
compatible: |
| 29 |
enum: |
| 30 |
- maxim,max7360-gpio |
| 31 |
- maxim,max7360-gpo |
| 32 |
|
| 33 |
gpio-controller: true |
| 34 |
|
| 35 |
"#gpio-cells": |
| 36 |
const: 2 |
| 37 |
|
| 38 |
interrupt-controller: true |
| 39 |
|
| 40 |
"#interrupt-cells": |
| 41 |
const: 2 |
| 42 |
|
| 43 |
maxim,constant-current-disable: |
| 44 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 45 |
description: |
| 46 |
Bit field, each bit disables constant-current output of the associated |
| 47 |
GPIO, starting from the least significant bit for the first GPIO. |
| 48 |
maximum: 0xff |
| 49 |
|
| 50 |
required: |
| 51 |
- compatible |
| 52 |
- gpio-controller |
| 53 |
|
| 54 |
allOf: |
| 55 |
- if: |
| 56 |
properties: |
| 57 |
compatible: |
| 58 |
contains: |
| 59 |
enum: |
| 60 |
- maxim,max7360-gpio |
| 61 |
ngpios: false |
| 62 |
then: |
| 63 |
required: |
| 64 |
- interrupt-controller |
| 65 |
else: |
| 66 |
properties: |
| 67 |
interrupt-controller: false |
| 68 |
maxim,constant-current-disable: false |
| 69 |
|
| 70 |
additionalProperties: false |
| 71 |
|
| 72 |
examples: |
| 73 |
- | |
| 74 |
gpio { |
| 75 |
compatible = "maxim,max7360-gpio"; |
| 76 |
|
| 77 |
gpio-controller; |
| 78 |
#gpio-cells = <2>; |
| 79 |
maxim,constant-current-disable = <0x06>; |
| 80 |
|
| 81 |
interrupt-controller; |
| 82 |
#interrupt-cells = <2>; |
| 83 |
}; |