0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/gpio/nvidia,tegra20-gpio.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: NVIDIA Tegra GPIO Controller (Tegra20 - Tegra210)
0008
0009 maintainers:
0010 - Thierry Reding <thierry.reding@gmail.com>
0011 - Jon Hunter <jonathanh@nvidia.com>
0012
0013 properties:
0014 compatible:
0015 oneOf:
0016 - enum:
0017 - nvidia,tegra20-gpio
0018 - nvidia,tegra30-gpio
0019
0020 - items:
0021 - enum:
0022 - nvidia,tegra114-gpio
0023 - nvidia,tegra124-gpio
0024 - nvidia,tegra210-gpio
0025 - const: nvidia,tegra30-gpio
0026
0027 reg:
0028 maxItems: 1
0029
0030 interrupts:
0031 description: The interrupt outputs from the controller. For Tegra20,
0032 there should be 7 interrupts specified, and for Tegra30, there should
0033 be 8 interrupts specified.
0034
0035 "#gpio-cells":
0036 description: The first cell is the pin number and the second cell is used
0037 to specify the GPIO polarity (0 = active high, 1 = active low).
0038 const: 2
0039
0040 gpio-controller: true
0041
0042 gpio-ranges:
0043 maxItems: 1
0044
0045 "#interrupt-cells":
0046 description: |
0047 Should be 2. The first cell is the GPIO number. The second cell is
0048 used to specify flags:
0049
0050 bits[3:0] trigger type and level flags:
0051 1 = low-to-high edge triggered.
0052 2 = high-to-low edge triggered.
0053 4 = active high level-sensitive.
0054 8 = active low level-sensitive.
0055
0056 Valid combinations are 1, 2, 3, 4, 8.
0057 const: 2
0058
0059 interrupt-controller: true
0060
0061 allOf:
0062 - if:
0063 properties:
0064 compatible:
0065 contains:
0066 const: nvidia,tegra30-gpio
0067 then:
0068 properties:
0069 interrupts:
0070 minItems: 8
0071 maxItems: 8
0072 else:
0073 properties:
0074 interrupts:
0075 minItems: 7
0076 maxItems: 7
0077
0078 required:
0079 - compatible
0080 - reg
0081 - interrupts
0082 - "#gpio-cells"
0083 - gpio-controller
0084 - "#interrupt-cells"
0085 - interrupt-controller
0086
0087 additionalProperties:
0088 type: object
0089 required:
0090 - gpio-hog
0091
0092 examples:
0093 - |
0094 #include <dt-bindings/interrupt-controller/arm-gic.h>
0095
0096 gpio: gpio@6000d000 {
0097 compatible = "nvidia,tegra20-gpio";
0098 reg = <0x6000d000 0x1000>;
0099 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
0100 <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
0101 <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>,
0102 <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
0103 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
0104 <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
0105 <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
0106 #gpio-cells = <2>;
0107 gpio-controller;
0108 #interrupt-cells = <2>;
0109 interrupt-controller;
0110 };