hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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 <cody.xie@rock-chips.com>
 
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 <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    / {
     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>;
    };
 
 
...