gpio-davinci.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Davinci/Keystone GPIO controller bindings
  2. Required Properties:
  3. - compatible: should be "ti,dm6441-gpio", "ti,keystone-gpio"
  4. - reg: Physical base address of the controller and the size of memory mapped
  5. registers.
  6. - gpio-controller : Marks the device node as a gpio controller.
  7. - #gpio-cells : Should be two.
  8. - first cell is the pin number
  9. - second cell is used to specify optional parameters (unused)
  10. - interrupt-parent: phandle of the parent interrupt controller.
  11. - interrupts: Array of GPIO interrupt number. Only banked or unbanked IRQs are
  12. supported at a time.
  13. - ti,ngpio: The number of GPIO pins supported.
  14. - ti,davinci-gpio-unbanked: The number of GPIOs that have an individual interrupt
  15. line to processor.
  16. The GPIO controller also acts as an interrupt controller. It uses the default
  17. two cells specifier as described in Documentation/devicetree/bindings/
  18. interrupt-controller/interrupts.txt.
  19. Example:
  20. gpio: gpio@1e26000 {
  21. compatible = "ti,dm6441-gpio";
  22. gpio-controller;
  23. #gpio-cells = <2>;
  24. reg = <0x226000 0x1000>;
  25. interrupt-parent = <&intc>;
  26. interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH
  27. 44 IRQ_TYPE_EDGE_BOTH 45 IRQ_TYPE_EDGE_BOTH
  28. 46 IRQ_TYPE_EDGE_BOTH 47 IRQ_TYPE_EDGE_BOTH
  29. 48 IRQ_TYPE_EDGE_BOTH 49 IRQ_TYPE_EDGE_BOTH
  30. 50 IRQ_TYPE_EDGE_BOTH>;
  31. ti,ngpio = <144>;
  32. ti,davinci-gpio-unbanked = <0>;
  33. interrupt-controller;
  34. #interrupt-cells = <2>;
  35. };
  36. leds {
  37. compatible = "gpio-leds";
  38. led1 {
  39. label = "davinci:green:usr1";
  40. gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
  41. ...
  42. };
  43. led2 {
  44. label = "davinci:red:debug1";
  45. gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
  46. ...
  47. };
  48. };