gpio-xilinx.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Xilinx plb/axi GPIO controller
  2. Dual channel GPIO controller with configurable number of pins
  3. (from 1 to 32 per channel). Every pin can be configured as
  4. input/output/tristate. Both channels share the same global IRQ but
  5. local interrupts can be enabled on channel basis.
  6. Required properties:
  7. - compatible : Should be "xlnx,xps-gpio-1.00.a"
  8. - reg : Address and length of the register set for the device
  9. - #gpio-cells : Should be two. The first cell is the pin number and the
  10. second cell is used to specify optional parameters (currently unused).
  11. - gpio-controller : Marks the device node as a GPIO controller.
  12. Optional properties:
  13. - interrupts : Interrupt mapping for GPIO IRQ.
  14. - xlnx,all-inputs : if n-th bit is setup, GPIO-n is input
  15. - xlnx,dout-default : if n-th bit is 1, GPIO-n default value is 1
  16. - xlnx,gpio-width : gpio width
  17. - xlnx,tri-default : if n-th bit is 1, GPIO-n is in tristate mode
  18. - xlnx,is-dual : if 1, controller also uses the second channel
  19. - xlnx,all-inputs-2 : as above but for the second channel
  20. - xlnx,dout-default-2 : as above but the second channel
  21. - xlnx,gpio2-width : as above but for the second channel
  22. - xlnx,tri-default-2 : as above but for the second channel
  23. Example:
  24. gpio: gpio@40000000 {
  25. #gpio-cells = <2>;
  26. compatible = "xlnx,xps-gpio-1.00.a";
  27. gpio-controller ;
  28. interrupt-parent = <&microblaze_0_intc>;
  29. interrupts = < 6 2 >;
  30. reg = < 0x40000000 0x10000 >;
  31. xlnx,all-inputs = <0x0>;
  32. xlnx,all-inputs-2 = <0x0>;
  33. xlnx,dout-default = <0x0>;
  34. xlnx,dout-default-2 = <0x0>;
  35. xlnx,gpio-width = <0x2>;
  36. xlnx,gpio2-width = <0x2>;
  37. xlnx,interrupt-present = <0x1>;
  38. xlnx,is-dual = <0x1>;
  39. xlnx,tri-default = <0xffffffff>;
  40. xlnx,tri-default-2 = <0xffffffff>;
  41. } ;