tc3589x.txt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. * Toshiba TC3589x multi-purpose expander
  2. The Toshiba TC3589x series are I2C-based MFD devices which may expose the
  3. following built-in devices: gpio, keypad, rotator (vibrator), PWM (for
  4. e.g. LEDs or vibrators) The included models are:
  5. - TC35890
  6. - TC35892
  7. - TC35893
  8. - TC35894
  9. - TC35895
  10. - TC35896
  11. Required properties:
  12. - compatible : must be "toshiba,tc35890", "toshiba,tc35892", "toshiba,tc35893",
  13. "toshiba,tc35894", "toshiba,tc35895" or "toshiba,tc35896"
  14. - reg : I2C address of the device
  15. - interrupt-parent : specifies which IRQ controller we're connected to
  16. - interrupts : the interrupt on the parent the controller is connected to
  17. - interrupt-controller : marks the device node as an interrupt controller
  18. - #interrupt-cells : should be <1>, the first cell is the IRQ offset on this
  19. TC3589x interrupt controller.
  20. Optional nodes:
  21. - GPIO
  22. This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20
  23. (other models) GPIO lines.
  24. - compatible : must be "toshiba,tc3589x-gpio"
  25. - interrupts : interrupt on the parent, which must be the tc3589x MFD device
  26. - interrupt-controller : marks the device node as an interrupt controller
  27. - #interrupt-cells : should be <2>, the first cell is the IRQ offset on this
  28. TC3589x GPIO interrupt controller, the second cell is the interrupt flags
  29. in accordance with <dt-bindings/interrupt-controller/irq.h>. The following
  30. flags are valid:
  31. - IRQ_TYPE_LEVEL_LOW
  32. - IRQ_TYPE_LEVEL_HIGH
  33. - IRQ_TYPE_EDGE_RISING
  34. - IRQ_TYPE_EDGE_FALLING
  35. - IRQ_TYPE_EDGE_BOTH
  36. - gpio-controller : marks the device node as a GPIO controller
  37. - #gpio-cells : should be <2>, the first cell is the GPIO offset on this
  38. GPIO controller, the second cell is the flags.
  39. - Keypad
  40. This keypad is the same on all variants, supporting up to 96 different
  41. keys. The linux-specific properties are modeled on those already existing
  42. in other input drivers.
  43. - compatible : must be "toshiba,tc3589x-keypad"
  44. - debounce-delay-ms : debounce interval in milliseconds
  45. - keypad,num-rows : number of rows in the matrix, see
  46. bindings/input/matrix-keymap.txt
  47. - keypad,num-columns : number of columns in the matrix, see
  48. bindings/input/matrix-keymap.txt
  49. - linux,keymap: the definition can be found in
  50. bindings/input/matrix-keymap.txt
  51. - linux,no-autorepeat: do no enable autorepeat feature.
  52. - wakeup-source: use any event on keypad as wakeup event.
  53. (Legacy property supported: "linux,wakeup")
  54. Example:
  55. tc35893@44 {
  56. compatible = "toshiba,tc35893";
  57. reg = <0x44>;
  58. interrupt-parent = <&gpio6>;
  59. interrupts = <26 IRQ_TYPE_EDGE_RISING>;
  60. interrupt-controller;
  61. #interrupt-cells = <1>;
  62. tc3589x_gpio {
  63. compatible = "toshiba,tc3589x-gpio";
  64. interrupts = <0>;
  65. interrupt-controller;
  66. #interrupt-cells = <2>;
  67. gpio-controller;
  68. #gpio-cells = <2>;
  69. };
  70. tc3589x_keypad {
  71. compatible = "toshiba,tc3589x-keypad";
  72. interrupts = <6>;
  73. debounce-delay-ms = <4>;
  74. keypad,num-columns = <8>;
  75. keypad,num-rows = <8>;
  76. linux,no-autorepeat;
  77. linux,keymap = <0x0301006b
  78. 0x04010066
  79. 0x06040072
  80. 0x040200d7
  81. 0x0303006a
  82. 0x0205000e
  83. 0x0607008b
  84. 0x0500001c
  85. 0x0403000b
  86. 0x03040034
  87. 0x05020067
  88. 0x0305006c
  89. 0x040500e7
  90. 0x0005009e
  91. 0x06020073
  92. 0x01030039
  93. 0x07060069
  94. 0x050500d9>;
  95. wakeup-source;
  96. };
  97. };