summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
blob: 0c75d8bde5688217bdd6d2483e23a56ff77b9b6c (plain)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/qcom,pm8008.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Technologies, Inc. PM8008 PMIC

maintainers:
  - Guru Das Srinagesh <quic_gurus@quicinc.com>

description: |
  Qualcomm Technologies, Inc. PM8008 is a dedicated camera PMIC that integrates
  all the necessary power management, housekeeping, and interface support
  functions into a single IC.

properties:
  compatible:
    const: qcom,pm8008

  reg:
    description:
      I2C slave address.

    maxItems: 1

  interrupts:
    maxItems: 1

    description: Parent interrupt.

  "#interrupt-cells":
    const: 2

    description: |
      The first cell is the IRQ number, the second cell is the IRQ trigger
      flag. All interrupts are listed in include/dt-bindings/mfd/qcom-pm8008.h.

  interrupt-controller: true

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

patternProperties:
  "^gpio@[0-9a-f]+$":
    type: object

    description: |
      The GPIO peripheral. This node may be specified twice, one for each GPIO.

    properties:
      compatible:
        items:
          - const: qcom,pm8008-gpio
          - const: qcom,spmi-gpio

      reg:
        description: Peripheral address of one of the two GPIO peripherals.
        maxItems: 1

      gpio-controller: true

      gpio-ranges:
        maxItems: 1

      interrupt-controller: true

      "#interrupt-cells":
        const: 2

      "#gpio-cells":
        const: 2

    required:
      - compatible
      - reg
      - gpio-controller
      - interrupt-controller
      - "#gpio-cells"
      - gpio-ranges
      - "#interrupt-cells"

    additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - "#address-cells"
  - "#size-cells"
  - "#interrupt-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/mfd/qcom-pm8008.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      pmic@8 {
        compatible = "qcom,pm8008";
        reg = <0x8>;
        #address-cells = <1>;
        #size-cells = <0>;
        interrupt-controller;
        #interrupt-cells = <2>;

        interrupt-parent = <&tlmm>;
        interrupts = <32 IRQ_TYPE_EDGE_RISING>;

        pm8008_gpios: gpio@c000 {
          compatible = "qcom,pm8008-gpio", "qcom,spmi-gpio";
          reg = <0xc000>;
          gpio-controller;
          gpio-ranges = <&pm8008_gpios 0 0 2>;
          #gpio-cells = <2>;
          interrupt-controller;
          #interrupt-cells = <2>;
        };
      };
    };

...