apple,pinctrl.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/pinctrl/apple,pinctrl.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Apple GPIO controller
  7. maintainers:
  8. - Mark Kettenis <kettenis@openbsd.org>
  9. description: |
  10. The Apple GPIO controller is a simple combined pin and GPIO
  11. controller present on Apple ARM SoC platforms, including various
  12. iPhone and iPad devices and the "Apple Silicon" Macs.
  13. properties:
  14. compatible:
  15. items:
  16. - const: apple,t8103-pinctrl
  17. - const: apple,pinctrl
  18. reg:
  19. maxItems: 1
  20. clocks:
  21. maxItems: 1
  22. gpio-controller: true
  23. '#gpio-cells':
  24. const: 2
  25. gpio-ranges:
  26. maxItems: 1
  27. interrupts:
  28. description: One interrupt for each of the (up to 7) interrupt
  29. groups supported by the controller sorted by interrupt group
  30. number in ascending order.
  31. minItems: 1
  32. maxItems: 7
  33. interrupt-controller: true
  34. patternProperties:
  35. '-pins$':
  36. type: object
  37. $ref: pinmux-node.yaml#
  38. properties:
  39. pinmux:
  40. description:
  41. Values are constructed from pin number and alternate function
  42. configuration number using the APPLE_PINMUX() helper macro
  43. defined in include/dt-bindings/pinctrl/apple.h.
  44. required:
  45. - pinmux
  46. additionalProperties: false
  47. required:
  48. - compatible
  49. - reg
  50. - gpio-controller
  51. - '#gpio-cells'
  52. - gpio-ranges
  53. additionalProperties: false
  54. examples:
  55. - |
  56. #include <dt-bindings/interrupt-controller/apple-aic.h>
  57. #include <dt-bindings/pinctrl/apple.h>
  58. soc {
  59. #address-cells = <2>;
  60. #size-cells = <2>;
  61. pinctrl: pinctrl@23c100000 {
  62. compatible = "apple,t8103-pinctrl", "apple,pinctrl";
  63. reg = <0x2 0x3c100000 0x0 0x100000>;
  64. clocks = <&gpio_clk>;
  65. gpio-controller;
  66. #gpio-cells = <2>;
  67. gpio-ranges = <&pinctrl 0 0 212>;
  68. interrupt-controller;
  69. interrupt-parent = <&aic>;
  70. interrupts = <AIC_IRQ 16 IRQ_TYPE_LEVEL_HIGH>,
  71. <AIC_IRQ 17 IRQ_TYPE_LEVEL_HIGH>,
  72. <AIC_IRQ 18 IRQ_TYPE_LEVEL_HIGH>,
  73. <AIC_IRQ 19 IRQ_TYPE_LEVEL_HIGH>,
  74. <AIC_IRQ 20 IRQ_TYPE_LEVEL_HIGH>,
  75. <AIC_IRQ 21 IRQ_TYPE_LEVEL_HIGH>,
  76. <AIC_IRQ 22 IRQ_TYPE_LEVEL_HIGH>;
  77. pcie_pins: pcie-pins {
  78. pinmux = <APPLE_PINMUX(150, 1)>,
  79. <APPLE_PINMUX(151, 1)>,
  80. <APPLE_PINMUX(32, 1)>;
  81. };
  82. };
  83. };