12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 22eb4d8dcSEmmanuel Vadot%YAML 1.2 32eb4d8dcSEmmanuel Vadot--- 42eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/realtek,otto-gpio.yaml# 52eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 62eb4d8dcSEmmanuel Vadot 72eb4d8dcSEmmanuel Vadottitle: Realtek Otto GPIO controller 82eb4d8dcSEmmanuel Vadot 92eb4d8dcSEmmanuel Vadotmaintainers: 102eb4d8dcSEmmanuel Vadot - Sander Vanheule <sander@svanheule.net> 112eb4d8dcSEmmanuel Vadot - Bert Vermeulen <bert@biot.com> 122eb4d8dcSEmmanuel Vadot 132eb4d8dcSEmmanuel Vadotdescription: | 142eb4d8dcSEmmanuel Vadot Realtek's GPIO controller on their MIPS switch SoCs (Otto platform) consists 152eb4d8dcSEmmanuel Vadot of two banks of 32 GPIOs. These GPIOs can generate edge-triggered interrupts. 162eb4d8dcSEmmanuel Vadot Each bank's interrupts are cascased into one interrupt line on the parent 172eb4d8dcSEmmanuel Vadot interrupt controller, if provided. 182eb4d8dcSEmmanuel Vadot This binding allows defining a single bank in the devicetree. The interrupt 192eb4d8dcSEmmanuel Vadot controller is not supported on the fallback compatible name, which only 202eb4d8dcSEmmanuel Vadot allows for GPIO port use. 212eb4d8dcSEmmanuel Vadot 222eb4d8dcSEmmanuel Vadotproperties: 232eb4d8dcSEmmanuel Vadot $nodename: 242eb4d8dcSEmmanuel Vadot pattern: "^gpio@[0-9a-f]+$" 252eb4d8dcSEmmanuel Vadot 262eb4d8dcSEmmanuel Vadot compatible: 272eb4d8dcSEmmanuel Vadot items: 282eb4d8dcSEmmanuel Vadot - enum: 292eb4d8dcSEmmanuel Vadot - realtek,rtl8380-gpio 302eb4d8dcSEmmanuel Vadot - realtek,rtl8390-gpio 31*d5b0e70fSEmmanuel Vadot - realtek,rtl9300-gpio 32*d5b0e70fSEmmanuel Vadot - realtek,rtl9310-gpio 332eb4d8dcSEmmanuel Vadot - const: realtek,otto-gpio 342eb4d8dcSEmmanuel Vadot 35*d5b0e70fSEmmanuel Vadot reg: true 362eb4d8dcSEmmanuel Vadot 372eb4d8dcSEmmanuel Vadot "#gpio-cells": 382eb4d8dcSEmmanuel Vadot const: 2 392eb4d8dcSEmmanuel Vadot 402eb4d8dcSEmmanuel Vadot gpio-controller: true 412eb4d8dcSEmmanuel Vadot 422eb4d8dcSEmmanuel Vadot ngpios: 432eb4d8dcSEmmanuel Vadot minimum: 1 442eb4d8dcSEmmanuel Vadot maximum: 32 452eb4d8dcSEmmanuel Vadot 462eb4d8dcSEmmanuel Vadot interrupt-controller: true 472eb4d8dcSEmmanuel Vadot 482eb4d8dcSEmmanuel Vadot "#interrupt-cells": 492eb4d8dcSEmmanuel Vadot const: 2 502eb4d8dcSEmmanuel Vadot 512eb4d8dcSEmmanuel Vadot interrupts: 522eb4d8dcSEmmanuel Vadot maxItems: 1 532eb4d8dcSEmmanuel Vadot 54*d5b0e70fSEmmanuel Vadotif: 55*d5b0e70fSEmmanuel Vadot properties: 56*d5b0e70fSEmmanuel Vadot compatible: 57*d5b0e70fSEmmanuel Vadot contains: 58*d5b0e70fSEmmanuel Vadot const: realtek,rtl9300-gpio 59*d5b0e70fSEmmanuel Vadotthen: 60*d5b0e70fSEmmanuel Vadot properties: 61*d5b0e70fSEmmanuel Vadot reg: 62*d5b0e70fSEmmanuel Vadot items: 63*d5b0e70fSEmmanuel Vadot - description: GPIO and interrupt control 64*d5b0e70fSEmmanuel Vadot - description: interrupt CPU map 65*d5b0e70fSEmmanuel Vadotelse: 66*d5b0e70fSEmmanuel Vadot properties: 67*d5b0e70fSEmmanuel Vadot reg: 68*d5b0e70fSEmmanuel Vadot items: 69*d5b0e70fSEmmanuel Vadot - description: GPIO and interrupt control 70*d5b0e70fSEmmanuel Vadot 712eb4d8dcSEmmanuel Vadotrequired: 722eb4d8dcSEmmanuel Vadot - compatible 732eb4d8dcSEmmanuel Vadot - reg 742eb4d8dcSEmmanuel Vadot - "#gpio-cells" 752eb4d8dcSEmmanuel Vadot - gpio-controller 762eb4d8dcSEmmanuel Vadot 772eb4d8dcSEmmanuel VadotadditionalProperties: false 782eb4d8dcSEmmanuel Vadot 792eb4d8dcSEmmanuel Vadotdependencies: 802eb4d8dcSEmmanuel Vadot interrupt-controller: [ interrupts ] 812eb4d8dcSEmmanuel Vadot 822eb4d8dcSEmmanuel Vadotexamples: 832eb4d8dcSEmmanuel Vadot - | 842eb4d8dcSEmmanuel Vadot gpio@3500 { 852eb4d8dcSEmmanuel Vadot compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio"; 862eb4d8dcSEmmanuel Vadot reg = <0x3500 0x1c>; 872eb4d8dcSEmmanuel Vadot gpio-controller; 882eb4d8dcSEmmanuel Vadot #gpio-cells = <2>; 892eb4d8dcSEmmanuel Vadot ngpios = <24>; 902eb4d8dcSEmmanuel Vadot interrupt-controller; 912eb4d8dcSEmmanuel Vadot #interrupt-cells = <2>; 922eb4d8dcSEmmanuel Vadot interrupt-parent = <&rtlintc>; 932eb4d8dcSEmmanuel Vadot interrupts = <23>; 942eb4d8dcSEmmanuel Vadot }; 95*d5b0e70fSEmmanuel Vadot - | 96*d5b0e70fSEmmanuel Vadot gpio@3300 { 97*d5b0e70fSEmmanuel Vadot compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio"; 98*d5b0e70fSEmmanuel Vadot reg = <0x3300 0x1c>, <0x3338 0x8>; 99*d5b0e70fSEmmanuel Vadot gpio-controller; 100*d5b0e70fSEmmanuel Vadot #gpio-cells = <2>; 101*d5b0e70fSEmmanuel Vadot ngpios = <24>; 102*d5b0e70fSEmmanuel Vadot interrupt-controller; 103*d5b0e70fSEmmanuel Vadot #interrupt-cells = <2>; 104*d5b0e70fSEmmanuel Vadot interrupt-parent = <&rtlintc>; 105*d5b0e70fSEmmanuel Vadot interrupts = <13>; 106*d5b0e70fSEmmanuel Vadot }; 1072eb4d8dcSEmmanuel Vadot 1082eb4d8dcSEmmanuel Vadot... 109