From 872587f88a21c2cad9771012c62bf1112880495f Mon Sep 17 00:00:00 2001 From: Cody Xie Date: Fri, 15 Sep 2023 20:07:46 +0800 Subject: [PATCH] dt-bindings: gpio: nca9539: Add nca9539 support Change-Id: Ib51bffad1130036891fd3020a3e1f28d5062e095 Signed-off-by: Cody Xie --- .../bindings/gpio/novo,nca9539-gpio.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/novo,nca9539-gpio.yaml diff --git a/Documentation/devicetree/bindings/gpio/novo,nca9539-gpio.yaml b/Documentation/devicetree/bindings/gpio/novo,nca9539-gpio.yaml new file mode 100644 index 000000000000..316c5df543f0 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/novo,nca9539-gpio.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/novo,nca9539-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Novosense I2C GPIO controller + +maintainers: + - Cody Xie + +description: | + This controller is A GPIO expander with I2C interface and one interrupt pin. + +properties: + compatible: + const: novo,nca9539-gpio + + reg: + items: + - description: the I2C address containing the GPIO controller registers. + + gpio-controller: true + + '#gpio-cells': + const: 2 + + ngpios: + minimum: 0 + maximum: 32 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + interrupts: + maxItems: 1 + + vdd-supply: + - description: the regulator for the VDD supplier. + +required: + - compatible + - reg + - "#gpio-cells" + - gpio-controller + - vdd-supply + +additionalProperties: false + +dependencies: + interrupt-controller: [ interrupts ] + +examples: + - | + #include + #include + / { + nca9539_vdd: nca9539-vdd { + compatible = "regulator-fixed"; + regulator-name = "nca9539_vdd"; + enable-active-high; + regulator-boot-on; + regulator-always-on; + }; + }; + + nca9539_gpio: gpio@74 { + compatible = "novo,nca9539-gpio"; + reg = <0x74>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + vdd-supply = <&nca9539_vdd>; + }; + + +...