1*f5e6f47fSMarek Behún# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*f5e6f47fSMarek Behún%YAML 1.2 3*f5e6f47fSMarek Behún--- 4*f5e6f47fSMarek Behún$id: http://devicetree.org/schemas/firmware/cznic,turris-omnia-mcu.yaml# 5*f5e6f47fSMarek Behún$schema: http://devicetree.org/meta-schemas/core.yaml# 6*f5e6f47fSMarek Behún 7*f5e6f47fSMarek Behúntitle: CZ.NIC's Turris Omnia MCU 8*f5e6f47fSMarek Behún 9*f5e6f47fSMarek Behúnmaintainers: 10*f5e6f47fSMarek Behún - Marek Behún <kabel@kernel.org> 11*f5e6f47fSMarek Behún 12*f5e6f47fSMarek Behúndescription: 13*f5e6f47fSMarek Behún The MCU on Turris Omnia acts as a system controller providing additional 14*f5e6f47fSMarek Behún GPIOs, interrupts, watchdog, system power off and wakeup configuration. 15*f5e6f47fSMarek Behún 16*f5e6f47fSMarek Behúnproperties: 17*f5e6f47fSMarek Behún compatible: 18*f5e6f47fSMarek Behún const: cznic,turris-omnia-mcu 19*f5e6f47fSMarek Behún 20*f5e6f47fSMarek Behún reg: 21*f5e6f47fSMarek Behún description: MCU I2C slave address 22*f5e6f47fSMarek Behún maxItems: 1 23*f5e6f47fSMarek Behún 24*f5e6f47fSMarek Behún interrupts: 25*f5e6f47fSMarek Behún maxItems: 1 26*f5e6f47fSMarek Behún 27*f5e6f47fSMarek Behún interrupt-controller: true 28*f5e6f47fSMarek Behún 29*f5e6f47fSMarek Behún '#interrupt-cells': 30*f5e6f47fSMarek Behún const: 2 31*f5e6f47fSMarek Behún description: | 32*f5e6f47fSMarek Behún The first cell specifies the interrupt number (0 to 63), the second cell 33*f5e6f47fSMarek Behún specifies interrupt type (which can be one of IRQ_TYPE_EDGE_RISING, 34*f5e6f47fSMarek Behún IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH). 35*f5e6f47fSMarek Behún The interrupt numbers correspond sequentially to GPIO numbers, taking the 36*f5e6f47fSMarek Behún GPIO banks into account: 37*f5e6f47fSMarek Behún IRQ number GPIO bank GPIO pin within bank 38*f5e6f47fSMarek Behún 0 - 15 0 0 - 15 39*f5e6f47fSMarek Behún 16 - 47 1 0 - 31 40*f5e6f47fSMarek Behún 48 - 63 2 0 - 15 41*f5e6f47fSMarek Behún There are several exceptions: 42*f5e6f47fSMarek Behún IRQ number meaning 43*f5e6f47fSMarek Behún 11 LED panel brightness changed by button press 44*f5e6f47fSMarek Behún 13 TRNG entropy ready 45*f5e6f47fSMarek Behún 14 ECDSA message signature computation done 46*f5e6f47fSMarek Behún 47*f5e6f47fSMarek Behún gpio-controller: true 48*f5e6f47fSMarek Behún 49*f5e6f47fSMarek Behún '#gpio-cells': 50*f5e6f47fSMarek Behún const: 3 51*f5e6f47fSMarek Behún description: 52*f5e6f47fSMarek Behún The first cell is bank number (0, 1 or 2), the second cell is pin number 53*f5e6f47fSMarek Behún within the bank (0 to 15 for banks 0 and 2, 0 to 31 for bank 1), and the 54*f5e6f47fSMarek Behún third cell specifies consumer flags. 55*f5e6f47fSMarek Behún 56*f5e6f47fSMarek Behúnrequired: 57*f5e6f47fSMarek Behún - compatible 58*f5e6f47fSMarek Behún - reg 59*f5e6f47fSMarek Behún - interrupts 60*f5e6f47fSMarek Behún - interrupt-controller 61*f5e6f47fSMarek Behún - gpio-controller 62*f5e6f47fSMarek Behún 63*f5e6f47fSMarek BehúnadditionalProperties: false 64*f5e6f47fSMarek Behún 65*f5e6f47fSMarek Behúnexamples: 66*f5e6f47fSMarek Behún - | 67*f5e6f47fSMarek Behún #include <dt-bindings/interrupt-controller/irq.h> 68*f5e6f47fSMarek Behún 69*f5e6f47fSMarek Behún i2c { 70*f5e6f47fSMarek Behún #address-cells = <1>; 71*f5e6f47fSMarek Behún #size-cells = <0>; 72*f5e6f47fSMarek Behún 73*f5e6f47fSMarek Behún system-controller@2a { 74*f5e6f47fSMarek Behún compatible = "cznic,turris-omnia-mcu"; 75*f5e6f47fSMarek Behún reg = <0x2a>; 76*f5e6f47fSMarek Behún 77*f5e6f47fSMarek Behún interrupt-parent = <&gpio1>; 78*f5e6f47fSMarek Behún interrupts = <11 IRQ_TYPE_NONE>; 79*f5e6f47fSMarek Behún 80*f5e6f47fSMarek Behún gpio-controller; 81*f5e6f47fSMarek Behún #gpio-cells = <3>; 82*f5e6f47fSMarek Behún 83*f5e6f47fSMarek Behún interrupt-controller; 84*f5e6f47fSMarek Behún #interrupt-cells = <2>; 85*f5e6f47fSMarek Behún }; 86*f5e6f47fSMarek Behún }; 87