mediatek,mt7621-gpio.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/gpio/mediatek,mt7621-gpio.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Mediatek MT7621 SoC GPIO controller
  7. maintainers:
  8. - Sergio Paracuellos <sergio.paracuellos@gmail.com>
  9. description: |
  10. The IP core used inside these SoCs has 3 banks of 32 GPIOs each.
  11. The registers of all the banks are interwoven inside one single IO range.
  12. We load one GPIO controller instance per bank. Also the GPIO controller can receive
  13. interrupts on any of the GPIOs, either edge or level. It then interrupts the CPU
  14. using GIC INT12.
  15. properties:
  16. $nodename:
  17. pattern: "^gpio@[0-9a-f]+$"
  18. compatible:
  19. const: mediatek,mt7621-gpio
  20. reg:
  21. maxItems: 1
  22. "#gpio-cells":
  23. const: 2
  24. gpio-controller: true
  25. gpio-ranges: true
  26. interrupt-controller: true
  27. "#interrupt-cells":
  28. const: 2
  29. interrupts:
  30. maxItems: 1
  31. required:
  32. - compatible
  33. - reg
  34. - "#gpio-cells"
  35. - gpio-controller
  36. - gpio-ranges
  37. - interrupt-controller
  38. - "#interrupt-cells"
  39. - interrupts
  40. additionalProperties: false
  41. examples:
  42. - |
  43. #include <dt-bindings/gpio/gpio.h>
  44. #include <dt-bindings/interrupt-controller/mips-gic.h>
  45. gpio@600 {
  46. compatible = "mediatek,mt7621-gpio";
  47. reg = <0x600 0x100>;
  48. #gpio-cells = <2>;
  49. gpio-controller;
  50. gpio-ranges = <&pinctrl 0 0 95>;
  51. interrupt-controller;
  52. #interrupt-cells = <2>;
  53. interrupt-parent = <&gic>;
  54. interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>;
  55. };
  56. ...