Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/gpio/realtek,otto-gpio.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Realtek Otto GPIO controller
0008 
0009 maintainers:
0010   - Sander Vanheule <sander@svanheule.net>
0011   - Bert Vermeulen <bert@biot.com>
0012 
0013 description: |
0014   Realtek's GPIO controller on their MIPS switch SoCs (Otto platform) consists
0015   of two banks of 32 GPIOs. These GPIOs can generate edge-triggered interrupts.
0016   Each bank's interrupts are cascased into one interrupt line on the parent
0017   interrupt controller, if provided.
0018   This binding allows defining a single bank in the devicetree. The interrupt
0019   controller is not supported on the fallback compatible name, which only
0020   allows for GPIO port use.
0021 
0022 properties:
0023   $nodename:
0024     pattern: "^gpio@[0-9a-f]+$"
0025 
0026   compatible:
0027     items:
0028       - enum:
0029           - realtek,rtl8380-gpio
0030           - realtek,rtl8390-gpio
0031           - realtek,rtl9300-gpio
0032           - realtek,rtl9310-gpio
0033       - const: realtek,otto-gpio
0034 
0035   reg: true
0036 
0037   "#gpio-cells":
0038     const: 2
0039 
0040   gpio-controller: true
0041 
0042   ngpios:
0043     minimum: 1
0044     maximum: 32
0045 
0046   interrupt-controller: true
0047 
0048   "#interrupt-cells":
0049     const: 2
0050 
0051   interrupts:
0052     maxItems: 1
0053 
0054 if:
0055   properties:
0056     compatible:
0057       contains:
0058         const: realtek,rtl9300-gpio
0059 then:
0060   properties:
0061     reg:
0062       items:
0063         - description: GPIO and interrupt control
0064         - description: interrupt CPU map
0065 else:
0066   properties:
0067     reg:
0068       items:
0069         - description: GPIO and interrupt control
0070 
0071 required:
0072   - compatible
0073   - reg
0074   - "#gpio-cells"
0075   - gpio-controller
0076 
0077 additionalProperties: false
0078 
0079 dependencies:
0080   interrupt-controller: [ interrupts ]
0081 
0082 examples:
0083   - |
0084       gpio@3500 {
0085         compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
0086         reg = <0x3500 0x1c>;
0087         gpio-controller;
0088         #gpio-cells = <2>;
0089         ngpios = <24>;
0090         interrupt-controller;
0091         #interrupt-cells = <2>;
0092         interrupt-parent = <&rtlintc>;
0093         interrupts = <23>;
0094       };
0095   - |
0096       gpio@3300 {
0097         compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
0098         reg = <0x3300 0x1c>, <0x3338 0x8>;
0099         gpio-controller;
0100         #gpio-cells = <2>;
0101         ngpios = <24>;
0102         interrupt-controller;
0103         #interrupt-cells = <2>;
0104         interrupt-parent = <&rtlintc>;
0105         interrupts = <13>;
0106       };
0107 
0108 ...