tc3589x.txt 3.2 KB

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