Path: blob/master/Documentation/devicetree/bindings/firmware/cznic,turris-omnia-mcu.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/firmware/cznic,turris-omnia-mcu.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: CZ.NIC's Turris Omnia MCU78maintainers:9- Marek Behún <kabel@kernel.org>1011description:12The MCU on Turris Omnia acts as a system controller providing additional13GPIOs, interrupts, watchdog, system power off and wakeup configuration.1415properties:16compatible:17const: cznic,turris-omnia-mcu1819reg:20description: MCU I2C slave address21maxItems: 12223interrupts:24maxItems: 12526interrupt-controller: true2728'#interrupt-cells':29const: 230description: |31The first cell specifies the interrupt number (0 to 63), the second cell32specifies interrupt type (which can be one of IRQ_TYPE_EDGE_RISING,33IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH).34The interrupt numbers correspond sequentially to GPIO numbers, taking the35GPIO banks into account:36IRQ number GPIO bank GPIO pin within bank370 - 15 0 0 - 153816 - 47 1 0 - 313948 - 63 2 0 - 1540There are several exceptions:41IRQ number meaning4211 LED panel brightness changed by button press4313 TRNG entropy ready4414 ECDSA message signature computation done4546gpio-controller: true4748'#gpio-cells':49const: 350description:51The first cell is bank number (0, 1 or 2), the second cell is pin number52within the bank (0 to 15 for banks 0 and 2, 0 to 31 for bank 1), and the53third cell specifies consumer flags.5455required:56- compatible57- reg58- interrupts59- interrupt-controller60- gpio-controller6162additionalProperties: false6364examples:65- |66#include <dt-bindings/interrupt-controller/irq.h>6768i2c {69#address-cells = <1>;70#size-cells = <0>;7172system-controller@2a {73compatible = "cznic,turris-omnia-mcu";74reg = <0x2a>;7576interrupt-parent = <&gpio1>;77interrupts = <11 IRQ_TYPE_NONE>;7879gpio-controller;80#gpio-cells = <3>;8182interrupt-controller;83#interrupt-cells = <2>;84};85};868788