brcm,cygnus-gpio.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. Broadcom Cygnus GPIO/PINCONF Controller
  2. Required properties:
  3. - compatible:
  4. Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio",
  5. "brcm,cygnus-crmu-gpio" or "brcm,iproc-gpio"
  6. - reg:
  7. Define the base and range of the I/O address space that contains the Cygnus
  8. GPIO/PINCONF controller registers
  9. - #gpio-cells:
  10. Must be two. The first cell is the GPIO pin number (within the
  11. controller's pin space) and the second cell is used for the following:
  12. bit[0]: polarity (0 for active high and 1 for active low)
  13. - gpio-controller:
  14. Specifies that the node is a GPIO controller
  15. Optional properties:
  16. - interrupts:
  17. Interrupt ID
  18. - interrupt-controller:
  19. Specifies that the node is an interrupt controller
  20. - gpio-ranges:
  21. Specifies the mapping between gpio controller and pin-controllers pins.
  22. This requires 4 fields in cells defined as -
  23. 1. Phandle of pin-controller.
  24. 2. GPIO base pin offset.
  25. 3 Pin-control base pin offset.
  26. 4. number of gpio pins which are linearly mapped from pin base.
  27. Supported generic PINCONF properties in child nodes:
  28. - pins:
  29. The list of pins (within the controller's own pin space) that properties
  30. in the node apply to. Pin names are "gpio-<pin>"
  31. - bias-disable:
  32. Disable pin bias
  33. - bias-pull-up:
  34. Enable internal pull up resistor
  35. - bias-pull-down:
  36. Enable internal pull down resistor
  37. - drive-strength:
  38. Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA)
  39. Example:
  40. gpio_ccm: gpio@1800a000 {
  41. compatible = "brcm,cygnus-ccm-gpio";
  42. reg = <0x1800a000 0x50>,
  43. <0x0301d164 0x20>;
  44. #gpio-cells = <2>;
  45. gpio-controller;
  46. interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
  47. interrupt-controller;
  48. touch_pins: touch_pins {
  49. pwr: pwr {
  50. pins = "gpio-0";
  51. drive-strength = <16>;
  52. };
  53. event: event {
  54. pins = "gpio-1";
  55. bias-pull-up;
  56. };
  57. };
  58. };
  59. gpio_asiu: gpio@180a5000 {
  60. compatible = "brcm,cygnus-asiu-gpio";
  61. reg = <0x180a5000 0x668>;
  62. #gpio-cells = <2>;
  63. gpio-controller;
  64. interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
  65. interrupt-controller;
  66. gpio-ranges = <&pinctrl 0 42 1>,
  67. <&pinctrl 1 44 3>;
  68. };
  69. /*
  70. * Touchscreen that uses the CCM GPIO 0 and 1
  71. */
  72. tsc {
  73. ...
  74. ...
  75. gpio-pwr = <&gpio_ccm 0 0>;
  76. gpio-event = <&gpio_ccm 1 0>;
  77. };
  78. /* Bluetooth that uses the ASIU GPIO 5, with polarity inverted */
  79. bluetooth {
  80. ...
  81. ...
  82. bcm,rfkill-bank-sel = <&gpio_asiu 5 1>
  83. }