xref: /linux/Documentation/devicetree/bindings/mfd/khadas,mcu.yaml (revision b8ea7da314c2efcb9c2f559ed65b7a36c869d68e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/khadas,mcu.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Khadas on-board Microcontroller
8
9maintainers:
10  - Neil Armstrong <neil.armstrong@linaro.org>
11
12description: |
13  Khadas embeds a microcontroller on their VIM and Edge boards adding some
14  system feature as PWM Fan control (for VIM2 rev14 or VIM3), User memory
15  storage, IR/Key resume control, system power LED control and more.
16
17properties:
18  compatible:
19    enum:
20      - khadas,mcu # MCU revision is discoverable
21      - khadas,vim4-mcu # Different MCU variant, not discoverable
22
23  "#cooling-cells": # Only needed for boards having FAN control feature
24    const: 2
25
26  reg:
27    maxItems: 1
28
29  fan-supply:
30    description: Phandle to the regulator that powers the fan.
31    $ref: /schemas/types.yaml#/definitions/phandle
32
33required:
34  - compatible
35  - reg
36
37allOf:
38  - if:
39      properties:
40        compatible:
41          contains:
42            const: khadas,vim4-mcu
43    then:
44      required:
45        - fan-supply
46    else:
47      properties:
48        fan-supply: false
49
50additionalProperties: false
51
52examples:
53  - |
54    i2c {
55      #address-cells = <1>;
56      #size-cells = <0>;
57      khadas_mcu: system-controller@18 {
58        compatible = "khadas,mcu";
59        reg = <0x18>;
60        #cooling-cells = <2>;
61      };
62    };
63