From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
To: "Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Kamel Bouhara" <kamel.bouhara@bootlin.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-input@vger.kernel.org,
linux-pwm@vger.kernel.org,
"Grégory Clement" <gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
Subject: [PATCH 2/8] dt-bindings: Add MAX7360 subdevices
Date: Thu, 19 Dec 2024 17:21:19 +0100 [thread overview]
Message-ID: <20241219-mdb-max7360-support-v1-2-8e8317584121@bootlin.com> (raw)
In-Reply-To: <20241219-mdb-max7360-support-v1-0-8e8317584121@bootlin.com>
Add device tree bindings for Maxim Integrated MAX7360 MFD functions:
keypad, rotary, gpios and pwm.
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
.../devicetree/bindings/gpio/max7360-gpio.yaml | 96 ++++++++++++++++++++++
.../devicetree/bindings/input/max7360-keypad.yaml | 67 +++++++++++++++
.../devicetree/bindings/input/max7360-rotary.yaml | 52 ++++++++++++
.../devicetree/bindings/pwm/max7360-pwm.yaml | 35 ++++++++
4 files changed, 250 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/max7360-gpio.yaml b/Documentation/devicetree/bindings/gpio/max7360-gpio.yaml
new file mode 100644
index 000000000000..3c006dc0380b
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/max7360-gpio.yaml
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/max7360-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX7360 GPIO controller
+
+maintainers:
+ - Kamel Bouhara <kamel.bouhara@bootlin.com>
+ - Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
+
+description: |
+ Maxim MAX7360 GPIO controller, in MAX7360 MFD
+ https://www.analog.com/en/products/max7360.html
+
+properties:
+ compatible:
+ enum:
+ - maxim,max7360-gpio
+ - maxim,max7360-gpo
+
+ gpio-controller: true
+
+ "#gpio-cells":
+ const: 2
+
+ ngpios:
+ minimum: 0
+ maximum: 8
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 2
+
+ interrupts:
+ description: The interrupt line the device is connected to.
+ maxItems: 1
+
+ constant-current-disable:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Bit field, each bit disables constant-current output of the
+ associated GPIO.
+
+
+required:
+ - compatible
+ - gpio-controller
+ - ngpios
+
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - maxim,max7360-gpio
+then:
+ required:
+ - interrupt-controller
+ - interrupts
+else:
+ properties:
+ interrupt-controller: false
+ interrupts: false
+ constant-current-disable: false
+
+ ngpios:
+ maximum: 6
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ max7360_gpo: max7360_gpo {
+ compatible = "maxim,max7360-gpo";
+ gpio-controller;
+ #gpio-cells = <0x2>;
+ ngpios = <4>;
+ };
+
+ max7360_gpio: max7360_gpio {
+ compatible = "maxim,max7360-gpio";
+
+ gpio-controller;
+ #gpio-cells = <0x2>;
+ ngpios = <8>;
+ constant-current-disable = <0x06>;
+
+ interrupt-controller;
+ #interrupt-cells = <0x2>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
+ };
diff --git a/Documentation/devicetree/bindings/input/max7360-keypad.yaml b/Documentation/devicetree/bindings/input/max7360-keypad.yaml
new file mode 100644
index 000000000000..8bc3c841465b
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/max7360-keypad.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/max7360-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX7360 Keypad Controller
+
+maintainers:
+ - Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
+
+description: |
+ Maxim MAX7360 Keypad Controller, in MAX7360 MFD
+ https://www.analog.com/en/products/max7360.html
+
+allOf:
+ - $ref: matrix-keymap.yaml#
+ - $ref: input.yaml#
+
+properties:
+ compatible:
+ enum:
+ - maxim,max7360-keypad
+
+ interrupts:
+ description: The interrupt line the device is connected to.
+ maxItems: 1
+
+ debounce-delay-ms:
+ description: Debounce delay in ms
+ minimum: 9
+ maximum: 40
+ default: 9
+
+ linux,input-no-autorepeat:
+ description: If present, the keys will not autorepeat when pressed
+
+required:
+ - compatible
+ - interrupts
+ - linux,keymap
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/input/input.h>
+
+ max7360_keypad {
+ compatible = "maxim,max7360-keypad";
+
+ keypad,num-rows = <8>;
+ keypad,num-columns = <4>;
+
+ linux,keymap = <
+ MATRIX_KEY(0x00, 0x00, KEY_F5)
+ MATRIX_KEY(0x01, 0x00, KEY_F4)
+ MATRIX_KEY(0x02, 0x01, KEY_F6)
+ >;
+
+ interrupt-parent = <&gpio1>;
+ interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
+
+ debounce-delay-ms = <10>;
+ linux,input-no-autorepeat;
+ };
diff --git a/Documentation/devicetree/bindings/input/max7360-rotary.yaml b/Documentation/devicetree/bindings/input/max7360-rotary.yaml
new file mode 100644
index 000000000000..19afa8344249
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/max7360-rotary.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/max7360-rotary.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX7360 Rotary Encoder
+
+maintainers:
+ - Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
+
+description: |
+ Maxim MAX7360 Rotary Encoder, in MAX7360 MFD
+ https://www.analog.com/en/products/max7360.html
+
+properties:
+ compatible:
+ enum:
+ - maxim,max7360-rotary
+
+ interrupts:
+ description: The interrupt line the device is connected to.
+ maxItems: 1
+
+ debounce-delay-ms:
+ description: Debounce delay in ms
+ minimum: 0
+ maximum: 15
+ default: 0
+
+ linux,axis:
+ description: The input subsystem axis to map to this rotary encoder.
+
+required:
+ - compatible
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ max7360_rotary: max7360_rotary {
+ compatible = "maxim,max7360-rotary";
+
+ debounce-delay-ms = <2>;
+ linux,axis = <0>; /* REL_X */
+
+ interrupt-parent = <&gpio1>;
+ interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
+ };
diff --git a/Documentation/devicetree/bindings/pwm/max7360-pwm.yaml b/Documentation/devicetree/bindings/pwm/max7360-pwm.yaml
new file mode 100644
index 000000000000..68d48969e542
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/max7360-pwm.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/max7360-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX7360 PWM controller
+
+maintainers:
+ - Kamel Bouhara <kamel.bouhara@bootlin.com>
+
+description: |
+ Maxim MAX7360 PWM controller, in MAX7360 MFD
+ https://www.analog.com/en/products/max7360.html
+
+properties:
+ compatible:
+ enum:
+ - maxim,max7360-pwm
+
+ "#pwm-cells":
+ const: 2
+
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ max7360_pwm: max7360_pwm {
+ compatible = "maxim,max7360-pwm";
+ #pwm-cells = <2>;
+ };
--
2.39.5
next prev parent reply other threads:[~2024-12-19 16:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 16:21 [PATCH 0/8] Add support for MAX7360 multifunction device Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 1/8] dt-bindings: Add MAX7360 MFD device Mathieu Dubois-Briand
2024-12-21 20:28 ` Krzysztof Kozlowski
2024-12-19 16:21 ` Mathieu Dubois-Briand [this message]
2024-12-19 21:54 ` [PATCH 2/8] dt-bindings: Add MAX7360 subdevices Uwe Kleine-König
2024-12-21 20:34 ` Krzysztof Kozlowski
2024-12-23 15:20 ` Mathieu Dubois-Briand
2024-12-24 9:00 ` Krzysztof Kozlowski
2024-12-24 12:10 ` Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 3/8] mfd: Add max7360 support mathieu.dubois-briand
2024-12-20 23:01 ` kernel test robot
2024-12-19 16:21 ` [PATCH 4/8] pwm: max7360: Add MAX7360 PWM support mathieu.dubois-briand
2024-12-19 21:53 ` Uwe Kleine-König
2024-12-23 15:26 ` Mathieu Dubois-Briand
2024-12-20 5:51 ` Uwe Kleine-König
2024-12-21 20:35 ` Krzysztof Kozlowski
2024-12-19 16:21 ` [PATCH 5/8] gpio: max7360: Add MAX7360 gpio support Mathieu Dubois-Briand
2024-12-20 15:54 ` kernel test robot
2024-12-20 16:39 ` kernel test robot
2024-12-19 16:21 ` [PATCH 6/8] input: keyboard: Add support for MAX7360 keypad Mathieu Dubois-Briand
2024-12-19 19:35 ` Dmitry Torokhov
2024-12-23 15:38 ` Mathieu Dubois-Briand
2024-12-20 17:12 ` kernel test robot
2024-12-19 16:21 ` [PATCH 7/8] input: misc: Add support for MAX7360 rotary Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 8/8] MAINTAINERS: Add entry on MAX7360 driver Mathieu Dubois-Briand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241219-mdb-max7360-support-v1-2-8e8317584121@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregory.clement@bootlin.com \
--cc=kamel.bouhara@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=ukleinek@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox