aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/patches-5.10/001-5.13-dt-bindings-gpio-binding-for-realtek-otto-gpio.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/realtek/patches-5.10/001-5.13-dt-bindings-gpio-binding-for-realtek-otto-gpio.patch')
-rw-r--r--target/linux/realtek/patches-5.10/001-5.13-dt-bindings-gpio-binding-for-realtek-otto-gpio.patch109
1 files changed, 109 insertions, 0 deletions
diff --git a/target/linux/realtek/patches-5.10/001-5.13-dt-bindings-gpio-binding-for-realtek-otto-gpio.patch b/target/linux/realtek/patches-5.10/001-5.13-dt-bindings-gpio-binding-for-realtek-otto-gpio.patch
new file mode 100644
index 0000000000..111591c640
--- /dev/null
+++ b/target/linux/realtek/patches-5.10/001-5.13-dt-bindings-gpio-binding-for-realtek-otto-gpio.patch
@@ -0,0 +1,109 @@
+From a362c0ce64866939c3daa17c76943cfed555b065 Mon Sep 17 00:00:00 2001
+From: Sander Vanheule <sander@svanheule.net>
+Date: Tue, 30 Mar 2021 19:48:42 +0200
+Subject: dt-bindings: gpio: Binding for Realtek Otto GPIO
+
+Add a binding description for Realtek's GPIO controller found on several
+of their MIPS-based SoCs (codenamed Otto), such as the RTL838x and
+RTL839x series of switch SoCs.
+
+A fallback binding 'realtek,otto-gpio' is provided for cases where the
+actual port ordering is not known yet, and enabling the interrupt
+controller may result in uncaught interrupts.
+
+Signed-off-by: Sander Vanheule <sander@svanheule.net>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Reviewed-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+---
+ .../bindings/gpio/realtek,otto-gpio.yaml | 78 ++++++++++++++++++++++
+ 1 file changed, 78 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
+
+diff --git a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
+new file mode 100644
+index 0000000000000..100f20cebd76a
+--- /dev/null
++++ b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
+@@ -0,0 +1,78 @@
++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
++%YAML 1.2
++---
++$id: http://devicetree.org/schemas/gpio/realtek,otto-gpio.yaml#
++$schema: http://devicetree.org/meta-schemas/core.yaml#
++
++title: Realtek Otto GPIO controller
++
++maintainers:
++ - Sander Vanheule <sander@svanheule.net>
++ - Bert Vermeulen <bert@biot.com>
++
++description: |
++ Realtek's GPIO controller on their MIPS switch SoCs (Otto platform) consists
++ of two banks of 32 GPIOs. These GPIOs can generate edge-triggered interrupts.
++ Each bank's interrupts are cascased into one interrupt line on the parent
++ interrupt controller, if provided.
++ This binding allows defining a single bank in the devicetree. The interrupt
++ controller is not supported on the fallback compatible name, which only
++ allows for GPIO port use.
++
++properties:
++ $nodename:
++ pattern: "^gpio@[0-9a-f]+$"
++
++ compatible:
++ items:
++ - enum:
++ - realtek,rtl8380-gpio
++ - realtek,rtl8390-gpio
++ - const: realtek,otto-gpio
++
++ reg:
++ maxItems: 1
++
++ "#gpio-cells":
++ const: 2
++
++ gpio-controller: true
++
++ ngpios:
++ minimum: 1
++ maximum: 32
++
++ interrupt-controller: true
++
++ "#interrupt-cells":
++ const: 2
++
++ interrupts:
++ maxItems: 1
++
++required:
++ - compatible
++ - reg
++ - "#gpio-cells"
++ - gpio-controller
++
++additionalProperties: false
++
++dependencies:
++ interrupt-controller: [ interrupts ]
++
++examples:
++ - |
++ gpio@3500 {
++ compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
++ reg = <0x3500 0x1c>;
++ gpio-controller;
++ #gpio-cells = <2>;
++ ngpios = <24>;
++ interrupt-controller;
++ #interrupt-cells = <2>;
++ interrupt-parent = <&rtlintc>;
++ interrupts = <23>;
++ };
++
++...
+--
+cgit 1.2.3-1.el7
+