1 From a362c0ce64866939c3daa17c76943cfed555b065 Mon Sep 17 00:00:00 2001
2 From: Sander Vanheule <sander@svanheule.net>
3 Date: Tue, 30 Mar 2021 19:48:42 +0200
4 Subject: dt-bindings: gpio: Binding for Realtek Otto GPIO
6 Add a binding description for Realtek's GPIO controller found on several
7 of their MIPS-based SoCs (codenamed Otto), such as the RTL838x and
8 RTL839x series of switch SoCs.
10 A fallback binding 'realtek,otto-gpio' is provided for cases where the
11 actual port ordering is not known yet, and enabling the interrupt
12 controller may result in uncaught interrupts.
14 Signed-off-by: Sander Vanheule <sander@svanheule.net>
15 Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
16 Reviewed-by: Rob Herring <robh@kernel.org>
17 Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
19 .../bindings/gpio/realtek,otto-gpio.yaml | 78 ++++++++++++++++++++++
20 1 file changed, 78 insertions(+)
21 create mode 100644 Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
24 +++ b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
26 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
29 +$id: http://devicetree.org/schemas/gpio/realtek,otto-gpio.yaml#
30 +$schema: http://devicetree.org/meta-schemas/core.yaml#
32 +title: Realtek Otto GPIO controller
35 + - Sander Vanheule <sander@svanheule.net>
36 + - Bert Vermeulen <bert@biot.com>
39 + Realtek's GPIO controller on their MIPS switch SoCs (Otto platform) consists
40 + of two banks of 32 GPIOs. These GPIOs can generate edge-triggered interrupts.
41 + Each bank's interrupts are cascased into one interrupt line on the parent
42 + interrupt controller, if provided.
43 + This binding allows defining a single bank in the devicetree. The interrupt
44 + controller is not supported on the fallback compatible name, which only
45 + allows for GPIO port use.
49 + pattern: "^gpio@[0-9a-f]+$"
54 + - realtek,rtl8380-gpio
55 + - realtek,rtl8390-gpio
56 + - const: realtek,otto-gpio
64 + gpio-controller: true
70 + interrupt-controller: true
84 +additionalProperties: false
87 + interrupt-controller: [ interrupts ]
92 + compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
93 + reg = <0x3500 0x1c>;
97 + interrupt-controller;
98 + #interrupt-cells = <2>;
99 + interrupt-parent = <&rtlintc>;