2
0

801-DT-Add-documentation-for-gpio-ralink.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From: John Crispin <[email protected]>
  2. Date: Sun, 28 Jul 2013 19:45:30 +0200
  3. Subject: [PATCH 1/2] DT: Add documentation for gpio-ralink
  4. Describe gpio-ralink binding.
  5. Signed-off-by: John Crispin <[email protected]>
  6. ---
  7. .../devicetree/bindings/gpio/gpio-ralink.txt | 42 +++++++++++++++++++
  8. 1 file changed, 42 insertions(+)
  9. create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ralink.txt
  10. --- /dev/null
  11. +++ b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
  12. @@ -0,0 +1,42 @@
  13. +Ralink SoC GPIO controller bindings
  14. +
  15. +Required properties:
  16. +- compatible:
  17. + - "ralink,rt2880-gpio" for Ralink controllers
  18. +- #gpio-cells : Should be two.
  19. + - first cell is the pin number
  20. + - second cell is used to specify optional parameters (unused)
  21. +- gpio-controller : Marks the device node as a GPIO controller
  22. +- reg : Physical base address and length of the controller's registers
  23. +- interrupt-parent: phandle to the INTC device node
  24. +- interrupts : Specify the INTC interrupt number
  25. +- ngpios : Specify the number of GPIOs
  26. +- ralink,register-map : The register layout depends on the GPIO bank and actual
  27. + SoC type. Register offsets need to be in this order.
  28. + [ INT, EDGE, RENA, FENA, DATA, DIR, POL, SET, RESET, TOGGLE ]
  29. +- interrupt-controller : marks this as an interrupt controller
  30. +- #interrupt-cells : a standard two-cell interrupt flag, see
  31. + interrupt-controller/interrupts.txt
  32. +
  33. +Example:
  34. +
  35. + gpio0: gpio@600 {
  36. + compatible = "ralink,rt2880-gpio";
  37. +
  38. + #gpio-cells = <2>;
  39. + gpio-controller;
  40. +
  41. + reg = <0x600 0x34>;
  42. +
  43. + interrupt-controller;
  44. + #interrupt-cells = <2>;
  45. +
  46. + interrupt-parent = <&intc>;
  47. + interrupts = <6>;
  48. +
  49. + ngpios = <24>;
  50. + ralink,register-map = [ 00 04 08 0c
  51. + 20 24 28 2c
  52. + 30 34 ];
  53. +
  54. + };