Documentation / devicetree / bindings / firmware / cznic,turris-omnia-mcu.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

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
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/firmware/cznic,turris-omnia-mcu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: CZ.NIC's Turris Omnia MCU

maintainers:
  - Marek BehĂșn <kabel@kernel.org>

description:
  The MCU on Turris Omnia acts as a system controller providing additional
  GPIOs, interrupts, watchdog, system power off and wakeup configuration.

properties:
  compatible:
    const: cznic,turris-omnia-mcu

  reg:
    description: MCU I2C slave address
    maxItems: 1

  interrupts:
    maxItems: 1

  interrupt-controller: true
 
  '#interrupt-cells':
    const: 2
    description: |
      The first cell specifies the interrupt number (0 to 63), the second cell
      specifies interrupt type (which can be one of IRQ_TYPE_EDGE_RISING,
      IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH).
      The interrupt numbers correspond sequentially to GPIO numbers, taking the
      GPIO banks into account:
        IRQ number   GPIO bank   GPIO pin within bank
           0 - 15      0           0 - 15
          16 - 47      1           0 - 31
          48 - 63      2           0 - 15
      There are several exceptions:
        IRQ number   meaning
          11           LED panel brightness changed by button press
          13           TRNG entropy ready
          14           ECDSA message signature computation done

  gpio-controller: true
 
  '#gpio-cells':
    const: 3
    description:
      The first cell is bank number (0, 1 or 2), the second cell is pin number
      within the bank (0 to 15 for banks 0 and 2, 0 to 31 for bank 1), and the
      third cell specifies consumer flags.

required:
  - compatible
  - reg
  - interrupts
  - interrupt-controller
  - gpio-controller

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
 
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
 
        system-controller@2a {
            compatible = "cznic,turris-omnia-mcu";
            reg = <0x2a>;
 
            interrupt-parent = <&gpio1>;
            interrupts = <11 IRQ_TYPE_NONE>;
 
            gpio-controller;
            #gpio-cells = <3>;
 
            interrupt-controller;
            #interrupt-cells = <2>;
        };
    };