summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml
blob: 59a630025f52fa919fbdfc48f4cb1bef8144e6f7 (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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/netronix,ntxec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Netronix Embedded Controller

maintainers:
  - Jonathan Neuschäfer <j.neuschaefer@gmx.net>

description: |
  This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and
  is typically implemented as a TI MSP430 microcontroller.

properties:
  compatible:
    const: netronix,ntxec

  reg:
    items:
      - description: The I2C address of the EC

  system-power-controller:
    type: boolean
    description: See Documentation/devicetree/bindings/power/power-controller.txt

  interrupts:
    minItems: 1
    description:
      The EC can signal interrupts via a GPIO line

  "#pwm-cells":
    const: 2
    description: |
      Number of cells in a PWM specifier.

      The following PWM channels are supported:
        - 0: The PWM channel controlled by registers 0xa1-0xa7

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            ec: embedded-controller@43 {
                    pinctrl-names = "default";
                    pinctrl-0 = <&pinctrl_ntxec>;

                    compatible = "netronix,ntxec";
                    reg = <0x43>;
                    system-power-controller;
                    interrupt-parent = <&gpio4>;
                    interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
                    #pwm-cells = <2>;
            };
    };

    backlight {
            compatible = "pwm-backlight";
            pwms = <&ec 0 50000>;
            power-supply = <&backlight_regulator>;
    };

    backlight_regulator: regulator-dummy {
            compatible = "regulator-fixed";
            regulator-name = "backlight";
    };