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