Back to home page

OSCL-LXR

 
 

    


0001 * Toshiba TC3589x multi-purpose expander
0002 
0003 The Toshiba TC3589x series are I2C-based MFD devices which may expose the
0004 following built-in devices: gpio, keypad, rotator (vibrator), PWM (for
0005 e.g. LEDs or vibrators) The included models are:
0006 
0007 - TC35890
0008 - TC35892
0009 - TC35893
0010 - TC35894
0011 - TC35895
0012 - TC35896
0013 
0014 Required properties:
0015  - compatible : must be "toshiba,tc35890", "toshiba,tc35892", "toshiba,tc35893",
0016    "toshiba,tc35894", "toshiba,tc35895" or "toshiba,tc35896"
0017  - reg : I2C address of the device
0018  - interrupts : the interrupt on the parent the controller is connected to
0019  - interrupt-controller : marks the device node as an interrupt controller
0020  - #interrupt-cells : should be <1>, the first cell is the IRQ offset on this
0021    TC3589x interrupt controller.
0022 
0023 Optional nodes:
0024 
0025 - GPIO
0026   This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20
0027   (other models) GPIO lines.
0028  - compatible : must be "toshiba,tc3589x-gpio"
0029  - interrupts : interrupt on the parent, which must be the tc3589x MFD device
0030  - interrupt-controller : marks the device node as an interrupt controller
0031  - #interrupt-cells : should be <2>, the first cell is the IRQ offset on this
0032    TC3589x GPIO interrupt controller, the second cell is the interrupt flags
0033    in accordance with <dt-bindings/interrupt-controller/irq.h>. The following
0034    flags are valid:
0035    - IRQ_TYPE_LEVEL_LOW
0036    - IRQ_TYPE_LEVEL_HIGH
0037    - IRQ_TYPE_EDGE_RISING
0038    - IRQ_TYPE_EDGE_FALLING
0039    - IRQ_TYPE_EDGE_BOTH
0040  - gpio-controller : marks the device node as a GPIO controller
0041  - #gpio-cells : should be <2>, the first cell is the GPIO offset on this
0042    GPIO controller, the second cell is the flags.
0043 
0044 - Keypad
0045   This keypad is the same on all variants, supporting up to 96 different
0046   keys. The linux-specific properties are modeled on those already existing
0047   in other input drivers.
0048  - compatible : must be "toshiba,tc3589x-keypad"
0049  - debounce-delay-ms : debounce interval in milliseconds
0050  - keypad,num-rows : number of rows in the matrix, see
0051    bindings/input/matrix-keymap.txt
0052  - keypad,num-columns : number of columns in the matrix, see
0053    bindings/input/matrix-keymap.txt
0054  - linux,keymap: the definition can be found in
0055    bindings/input/matrix-keymap.txt
0056  - linux,no-autorepeat: do no enable autorepeat feature.
0057  - wakeup-source: use any event on keypad as wakeup event.
0058                   (Legacy property supported: "linux,wakeup")
0059 
0060 Example:
0061 
0062 tc35893@44 {
0063         compatible = "toshiba,tc35893";
0064         reg = <0x44>;
0065         interrupt-parent = <&gpio6>;
0066         interrupts = <26 IRQ_TYPE_EDGE_RISING>;
0067 
0068         interrupt-controller;
0069         #interrupt-cells = <1>;
0070 
0071         tc3589x_gpio {
0072                 compatible = "toshiba,tc3589x-gpio";
0073                 interrupts = <0>;
0074 
0075                 interrupt-controller;
0076                 #interrupt-cells = <2>;
0077                 gpio-controller;
0078                 #gpio-cells = <2>;
0079         };
0080         tc3589x_keypad {
0081                 compatible = "toshiba,tc3589x-keypad";
0082                 interrupts = <6>;
0083                 debounce-delay-ms = <4>;
0084                 keypad,num-columns = <8>;
0085                 keypad,num-rows = <8>;
0086                 linux,no-autorepeat;
0087                 linux,keymap = <0x0301006b
0088                                 0x04010066
0089                                 0x06040072
0090                                 0x040200d7
0091                                 0x0303006a
0092                                 0x0205000e
0093                                 0x0607008b
0094                                 0x0500001c
0095                                 0x0403000b
0096                                 0x03040034
0097                                 0x05020067
0098                                 0x0305006c
0099                                 0x040500e7
0100                                 0x0005009e
0101                                 0x06020073
0102                                 0x01030039
0103                                 0x07060069
0104                                 0x050500d9>;
0105                 wakeup-source;
0106         };
0107 };