1951f7da9SSander Vanheule# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2951f7da9SSander Vanheule%YAML 1.2 3951f7da9SSander Vanheule--- 4951f7da9SSander Vanheule$id: http://devicetree.org/schemas/gpio/realtek,otto-gpio.yaml# 5951f7da9SSander Vanheule$schema: http://devicetree.org/meta-schemas/core.yaml# 6951f7da9SSander Vanheule 7951f7da9SSander Vanheuletitle: Realtek Otto GPIO controller 8951f7da9SSander Vanheule 9951f7da9SSander Vanheulemaintainers: 10951f7da9SSander Vanheule - Sander Vanheule <sander@svanheule.net> 11951f7da9SSander Vanheule - Bert Vermeulen <bert@biot.com> 12951f7da9SSander Vanheule 13951f7da9SSander Vanheuledescription: | 14951f7da9SSander Vanheule Realtek's GPIO controller on their MIPS switch SoCs (Otto platform) consists 15951f7da9SSander Vanheule of two banks of 32 GPIOs. These GPIOs can generate edge-triggered interrupts. 16951f7da9SSander Vanheule Each bank's interrupts are cascased into one interrupt line on the parent 17951f7da9SSander Vanheule interrupt controller, if provided. 18951f7da9SSander Vanheule This binding allows defining a single bank in the devicetree. The interrupt 19951f7da9SSander Vanheule controller is not supported on the fallback compatible name, which only 20951f7da9SSander Vanheule allows for GPIO port use. 21951f7da9SSander Vanheule 22951f7da9SSander Vanheuleproperties: 23951f7da9SSander Vanheule $nodename: 24951f7da9SSander Vanheule pattern: "^gpio@[0-9a-f]+$" 25951f7da9SSander Vanheule 26951f7da9SSander Vanheule compatible: 27951f7da9SSander Vanheule items: 28951f7da9SSander Vanheule - enum: 29951f7da9SSander Vanheule - realtek,rtl8380-gpio 30951f7da9SSander Vanheule - realtek,rtl8390-gpio 31*06a6a774SSander Vanheule - realtek,rtl9300-gpio 32951f7da9SSander Vanheule - const: realtek,otto-gpio 33951f7da9SSander Vanheule 34*06a6a774SSander Vanheule reg: true 35951f7da9SSander Vanheule 36951f7da9SSander Vanheule "#gpio-cells": 37951f7da9SSander Vanheule const: 2 38951f7da9SSander Vanheule 39951f7da9SSander Vanheule gpio-controller: true 40951f7da9SSander Vanheule 41951f7da9SSander Vanheule ngpios: 42951f7da9SSander Vanheule minimum: 1 43951f7da9SSander Vanheule maximum: 32 44951f7da9SSander Vanheule 45951f7da9SSander Vanheule interrupt-controller: true 46951f7da9SSander Vanheule 47951f7da9SSander Vanheule "#interrupt-cells": 48951f7da9SSander Vanheule const: 2 49951f7da9SSander Vanheule 50951f7da9SSander Vanheule interrupts: 51951f7da9SSander Vanheule maxItems: 1 52951f7da9SSander Vanheule 53*06a6a774SSander Vanheuleif: 54*06a6a774SSander Vanheule properties: 55*06a6a774SSander Vanheule compatible: 56*06a6a774SSander Vanheule contains: 57*06a6a774SSander Vanheule const: realtek,rtl9300-gpio 58*06a6a774SSander Vanheulethen: 59*06a6a774SSander Vanheule properties: 60*06a6a774SSander Vanheule reg: 61*06a6a774SSander Vanheule items: 62*06a6a774SSander Vanheule - description: GPIO and interrupt control 63*06a6a774SSander Vanheule - description: interrupt CPU map 64*06a6a774SSander Vanheuleelse: 65*06a6a774SSander Vanheule properties: 66*06a6a774SSander Vanheule reg: 67*06a6a774SSander Vanheule items: 68*06a6a774SSander Vanheule - description: GPIO and interrupt control 69*06a6a774SSander Vanheule 70951f7da9SSander Vanheulerequired: 71951f7da9SSander Vanheule - compatible 72951f7da9SSander Vanheule - reg 73951f7da9SSander Vanheule - "#gpio-cells" 74951f7da9SSander Vanheule - gpio-controller 75951f7da9SSander Vanheule 76951f7da9SSander VanheuleadditionalProperties: false 77951f7da9SSander Vanheule 78951f7da9SSander Vanheuledependencies: 79951f7da9SSander Vanheule interrupt-controller: [ interrupts ] 80951f7da9SSander Vanheule 81951f7da9SSander Vanheuleexamples: 82951f7da9SSander Vanheule - | 83951f7da9SSander Vanheule gpio@3500 { 84951f7da9SSander Vanheule compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio"; 85951f7da9SSander Vanheule reg = <0x3500 0x1c>; 86951f7da9SSander Vanheule gpio-controller; 87951f7da9SSander Vanheule #gpio-cells = <2>; 88951f7da9SSander Vanheule ngpios = <24>; 89951f7da9SSander Vanheule interrupt-controller; 90951f7da9SSander Vanheule #interrupt-cells = <2>; 91951f7da9SSander Vanheule interrupt-parent = <&rtlintc>; 92951f7da9SSander Vanheule interrupts = <23>; 93951f7da9SSander Vanheule }; 94*06a6a774SSander Vanheule - | 95*06a6a774SSander Vanheule gpio@3300 { 96*06a6a774SSander Vanheule compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio"; 97*06a6a774SSander Vanheule reg = <0x3300 0x1c>, <0x3338 0x8>; 98*06a6a774SSander Vanheule gpio-controller; 99*06a6a774SSander Vanheule #gpio-cells = <2>; 100*06a6a774SSander Vanheule ngpios = <24>; 101*06a6a774SSander Vanheule interrupt-controller; 102*06a6a774SSander Vanheule #interrupt-cells = <2>; 103*06a6a774SSander Vanheule interrupt-parent = <&rtlintc>; 104*06a6a774SSander Vanheule interrupts = <13>; 105*06a6a774SSander Vanheule }; 106951f7da9SSander Vanheule 107951f7da9SSander Vanheule... 108