gpio-xilinx.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. - interrupt-parent : Phandle for the interrupt controller that
  15. services interrupts for this device.
  16. - xlnx,all-inputs : if n-th bit is setup, GPIO-n is input
  17. - xlnx,dout-default : if n-th bit is 1, GPIO-n default value is 1
  18. - xlnx,gpio-width : gpio width
  19. - xlnx,tri-default : if n-th bit is 1, GPIO-n is in tristate mode
  20. - xlnx,is-dual : if 1, controller also uses the second channel
  21. - xlnx,all-inputs-2 : as above but for the second channel
  22. - xlnx,dout-default-2 : as above but the second channel
  23. - xlnx,gpio2-width : as above but for the second channel
  24. - xlnx,tri-default-2 : as above but for the second channel
  25. Example:
  26. gpio: gpio@40000000 {
  27. #gpio-cells = <2>;
  28. compatible = "xlnx,xps-gpio-1.00.a";
  29. gpio-controller ;
  30. interrupt-parent = <&microblaze_0_intc>;
  31. interrupts = < 6 2 >;
  32. reg = < 0x40000000 0x10000 >;
  33. xlnx,all-inputs = <0x0>;
  34. xlnx,all-inputs-2 = <0x0>;
  35. xlnx,dout-default = <0x0>;
  36. xlnx,dout-default-2 = <0x0>;
  37. xlnx,gpio-width = <0x2>;
  38. xlnx,gpio2-width = <0x2>;
  39. xlnx,interrupt-present = <0x1>;
  40. xlnx,is-dual = <0x1>;
  41. xlnx,tri-default = <0xffffffff>;
  42. xlnx,tri-default-2 = <0xffffffff>;
  43. } ;