8xxx_gpio.txt 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. GPIO controllers on MPC8xxx SoCs
  2. This is for the non-QE/CPM/GUTs GPIO controllers as found on
  3. 8349, 8572, 8610 and compatible.
  4. Every GPIO controller node must have #gpio-cells property defined,
  5. this information will be used to translate gpio-specifiers.
  6. See bindings/gpio/gpio.txt for details of how to specify GPIO
  7. information for devices.
  8. The GPIO module usually is connected to the SoC's internal interrupt
  9. controller, see bindings/interrupt-controller/interrupts.txt (the
  10. interrupt client nodes section) for details how to specify this GPIO
  11. module's interrupt.
  12. The GPIO module may serve as another interrupt controller (cascaded to
  13. the SoC's internal interrupt controller). See the interrupt controller
  14. nodes section in bindings/interrupt-controller/interrupts.txt for
  15. details.
  16. Required properties:
  17. - compatible: "fsl,<chip>-gpio" followed by "fsl,mpc8349-gpio"
  18. for 83xx, "fsl,mpc8572-gpio" for 85xx, or
  19. "fsl,mpc8610-gpio" for 86xx.
  20. - #gpio-cells: Should be two. The first cell is the pin number
  21. and the second cell is used to specify optional
  22. parameters (currently unused).
  23. - interrupt-parent: Phandle for the interrupt controller that
  24. services interrupts for this device.
  25. - interrupts: Interrupt mapping for GPIO IRQ.
  26. - gpio-controller: Marks the port as GPIO controller.
  27. Optional properties:
  28. - interrupt-controller: Empty boolean property which marks the GPIO
  29. module as an IRQ controller.
  30. - #interrupt-cells: Should be two. Defines the number of integer
  31. cells required to specify an interrupt within
  32. this interrupt controller. The first cell
  33. defines the pin number, the second cell
  34. defines additional flags (trigger type,
  35. trigger polarity). Note that the available
  36. set of trigger conditions supported by the
  37. GPIO module depends on the actual SoC.
  38. Example of gpio-controller nodes for a MPC8347 SoC:
  39. gpio1: gpio-controller@c00 {
  40. #gpio-cells = <2>;
  41. compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";
  42. reg = <0xc00 0x100>;
  43. interrupt-parent = <&ipic>;
  44. interrupts = <74 0x8>;
  45. gpio-controller;
  46. interrupt-controller;
  47. #interrupt-cells = <2>;
  48. };
  49. gpio2: gpio-controller@d00 {
  50. #gpio-cells = <2>;
  51. compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";
  52. reg = <0xd00 0x100>;
  53. interrupt-parent = <&ipic>;
  54. interrupts = <75 0x8>;
  55. gpio-controller;
  56. };
  57. Example of a peripheral using the GPIO module as an IRQ controller:
  58. funkyfpga@0 {
  59. compatible = "funky-fpga";
  60. ...
  61. interrupt-parent = <&gpio1>;
  62. interrupts = <4 3>;
  63. };