87 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/firmware/cznic,turris-omnia-mcu.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: CZ.NIC's Turris Omnia MCU8 9maintainers:10 - Marek Behún <kabel@kernel.org>11 12description:13 The MCU on Turris Omnia acts as a system controller providing additional14 GPIOs, interrupts, watchdog, system power off and wakeup configuration.15 16properties:17 compatible:18 const: cznic,turris-omnia-mcu19 20 reg:21 description: MCU I2C slave address22 maxItems: 123 24 interrupts:25 maxItems: 126 27 interrupt-controller: true28 29 '#interrupt-cells':30 const: 231 description: |32 The first cell specifies the interrupt number (0 to 63), the second cell33 specifies interrupt type (which can be one of IRQ_TYPE_EDGE_RISING,34 IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH).35 The interrupt numbers correspond sequentially to GPIO numbers, taking the36 GPIO banks into account:37 IRQ number GPIO bank GPIO pin within bank38 0 - 15 0 0 - 1539 16 - 47 1 0 - 3140 48 - 63 2 0 - 1541 There are several exceptions:42 IRQ number meaning43 11 LED panel brightness changed by button press44 13 TRNG entropy ready45 14 ECDSA message signature computation done46 47 gpio-controller: true48 49 '#gpio-cells':50 const: 351 description:52 The first cell is bank number (0, 1 or 2), the second cell is pin number53 within the bank (0 to 15 for banks 0 and 2, 0 to 31 for bank 1), and the54 third cell specifies consumer flags.55 56required:57 - compatible58 - reg59 - interrupts60 - interrupt-controller61 - gpio-controller62 63additionalProperties: false64 65examples:66 - |67 #include <dt-bindings/interrupt-controller/irq.h>68 69 i2c {70 #address-cells = <1>;71 #size-cells = <0>;72 73 system-controller@2a {74 compatible = "cznic,turris-omnia-mcu";75 reg = <0x2a>;76 77 interrupt-parent = <&gpio1>;78 interrupts = <11 IRQ_TYPE_NONE>;79 80 gpio-controller;81 #gpio-cells = <3>;82 83 interrupt-controller;84 #interrupt-cells = <2>;85 };86 };87