1*e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*e67e8565SEmmanuel Vadot%YAML 1.2 3*e67e8565SEmmanuel Vadot--- 4*e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/nvidia,tegra20-gpio.yaml# 5*e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*e67e8565SEmmanuel Vadot 7*e67e8565SEmmanuel Vadottitle: NVIDIA Tegra GPIO Controller (Tegra20 - Tegra210) 8*e67e8565SEmmanuel Vadot 9*e67e8565SEmmanuel Vadotmaintainers: 10*e67e8565SEmmanuel Vadot - Thierry Reding <thierry.reding@gmail.com> 11*e67e8565SEmmanuel Vadot - Jon Hunter <jonathanh@nvidia.com> 12*e67e8565SEmmanuel Vadot 13*e67e8565SEmmanuel Vadotproperties: 14*e67e8565SEmmanuel Vadot compatible: 15*e67e8565SEmmanuel Vadot oneOf: 16*e67e8565SEmmanuel Vadot - enum: 17*e67e8565SEmmanuel Vadot - nvidia,tegra20-gpio 18*e67e8565SEmmanuel Vadot - nvidia,tegra30-gpio 19*e67e8565SEmmanuel Vadot 20*e67e8565SEmmanuel Vadot - items: 21*e67e8565SEmmanuel Vadot - enum: 22*e67e8565SEmmanuel Vadot - nvidia,tegra114-gpio 23*e67e8565SEmmanuel Vadot - nvidia,tegra124-gpio 24*e67e8565SEmmanuel Vadot - nvidia,tegra210-gpio 25*e67e8565SEmmanuel Vadot - const: nvidia,tegra30-gpio 26*e67e8565SEmmanuel Vadot 27*e67e8565SEmmanuel Vadot reg: 28*e67e8565SEmmanuel Vadot maxItems: 1 29*e67e8565SEmmanuel Vadot 30*e67e8565SEmmanuel Vadot interrupts: 31*e67e8565SEmmanuel Vadot description: The interrupt outputs from the controller. For Tegra20, 32*e67e8565SEmmanuel Vadot there should be 7 interrupts specified, and for Tegra30, there should 33*e67e8565SEmmanuel Vadot be 8 interrupts specified. 34*e67e8565SEmmanuel Vadot 35*e67e8565SEmmanuel Vadot "#gpio-cells": 36*e67e8565SEmmanuel Vadot description: The first cell is the pin number and the second cell is used 37*e67e8565SEmmanuel Vadot to specify the GPIO polarity (0 = active high, 1 = active low). 38*e67e8565SEmmanuel Vadot const: 2 39*e67e8565SEmmanuel Vadot 40*e67e8565SEmmanuel Vadot gpio-controller: true 41*e67e8565SEmmanuel Vadot 42*e67e8565SEmmanuel Vadot gpio-ranges: 43*e67e8565SEmmanuel Vadot maxItems: 1 44*e67e8565SEmmanuel Vadot 45*e67e8565SEmmanuel Vadot "#interrupt-cells": 46*e67e8565SEmmanuel Vadot description: | 47*e67e8565SEmmanuel Vadot Should be 2. The first cell is the GPIO number. The second cell is 48*e67e8565SEmmanuel Vadot used to specify flags: 49*e67e8565SEmmanuel Vadot 50*e67e8565SEmmanuel Vadot bits[3:0] trigger type and level flags: 51*e67e8565SEmmanuel Vadot 1 = low-to-high edge triggered. 52*e67e8565SEmmanuel Vadot 2 = high-to-low edge triggered. 53*e67e8565SEmmanuel Vadot 4 = active high level-sensitive. 54*e67e8565SEmmanuel Vadot 8 = active low level-sensitive. 55*e67e8565SEmmanuel Vadot 56*e67e8565SEmmanuel Vadot Valid combinations are 1, 2, 3, 4, 8. 57*e67e8565SEmmanuel Vadot const: 2 58*e67e8565SEmmanuel Vadot 59*e67e8565SEmmanuel Vadot interrupt-controller: true 60*e67e8565SEmmanuel Vadot 61*e67e8565SEmmanuel VadotallOf: 62*e67e8565SEmmanuel Vadot - if: 63*e67e8565SEmmanuel Vadot properties: 64*e67e8565SEmmanuel Vadot compatible: 65*e67e8565SEmmanuel Vadot contains: 66*e67e8565SEmmanuel Vadot const: nvidia,tegra30-gpio 67*e67e8565SEmmanuel Vadot then: 68*e67e8565SEmmanuel Vadot properties: 69*e67e8565SEmmanuel Vadot interrupts: 70*e67e8565SEmmanuel Vadot minItems: 8 71*e67e8565SEmmanuel Vadot maxItems: 8 72*e67e8565SEmmanuel Vadot else: 73*e67e8565SEmmanuel Vadot properties: 74*e67e8565SEmmanuel Vadot interrupts: 75*e67e8565SEmmanuel Vadot minItems: 7 76*e67e8565SEmmanuel Vadot maxItems: 7 77*e67e8565SEmmanuel Vadot 78*e67e8565SEmmanuel Vadotrequired: 79*e67e8565SEmmanuel Vadot - compatible 80*e67e8565SEmmanuel Vadot - reg 81*e67e8565SEmmanuel Vadot - interrupts 82*e67e8565SEmmanuel Vadot - "#gpio-cells" 83*e67e8565SEmmanuel Vadot - gpio-controller 84*e67e8565SEmmanuel Vadot - "#interrupt-cells" 85*e67e8565SEmmanuel Vadot - interrupt-controller 86*e67e8565SEmmanuel Vadot 87*e67e8565SEmmanuel VadotadditionalProperties: 88*e67e8565SEmmanuel Vadot type: object 89*e67e8565SEmmanuel Vadot required: 90*e67e8565SEmmanuel Vadot - gpio-hog 91*e67e8565SEmmanuel Vadot 92*e67e8565SEmmanuel Vadotexamples: 93*e67e8565SEmmanuel Vadot - | 94*e67e8565SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 95*e67e8565SEmmanuel Vadot 96*e67e8565SEmmanuel Vadot gpio: gpio@6000d000 { 97*e67e8565SEmmanuel Vadot compatible = "nvidia,tegra20-gpio"; 98*e67e8565SEmmanuel Vadot reg = <0x6000d000 0x1000>; 99*e67e8565SEmmanuel Vadot interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>, 100*e67e8565SEmmanuel Vadot <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>, 101*e67e8565SEmmanuel Vadot <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>, 102*e67e8565SEmmanuel Vadot <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>, 103*e67e8565SEmmanuel Vadot <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>, 104*e67e8565SEmmanuel Vadot <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>, 105*e67e8565SEmmanuel Vadot <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; 106*e67e8565SEmmanuel Vadot #gpio-cells = <2>; 107*e67e8565SEmmanuel Vadot gpio-controller; 108*e67e8565SEmmanuel Vadot #interrupt-cells = <2>; 109*e67e8565SEmmanuel Vadot interrupt-controller; 110*e67e8565SEmmanuel Vadot }; 111