xref: /linux/Documentation/devicetree/bindings/mfd/tc3589x.txt (revision 3eb66e91a25497065c5322b1268cbc3953642227)
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 - interrupts : the interrupt on the parent the controller is connected to
19bc804360SLinus Walleij - interrupt-controller : marks the device node as an interrupt controller
20bc804360SLinus Walleij - #interrupt-cells : should be <1>, the first cell is the IRQ offset on this
21bc804360SLinus Walleij   TC3589x interrupt controller.
22bc804360SLinus Walleij
23bc804360SLinus WalleijOptional nodes:
24bc804360SLinus Walleij
25bc804360SLinus Walleij- GPIO
26bc804360SLinus Walleij  This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20
27bc804360SLinus Walleij  (other models) GPIO lines.
28bc804360SLinus Walleij - compatible : must be "toshiba,tc3589x-gpio"
29bc804360SLinus Walleij - interrupts : interrupt on the parent, which must be the tc3589x MFD device
30bc804360SLinus Walleij - interrupt-controller : marks the device node as an interrupt controller
31bc804360SLinus Walleij - #interrupt-cells : should be <2>, the first cell is the IRQ offset on this
32bc804360SLinus Walleij   TC3589x GPIO interrupt controller, the second cell is the interrupt flags
33bc804360SLinus Walleij   in accordance with <dt-bindings/interrupt-controller/irq.h>. The following
34bc804360SLinus Walleij   flags are valid:
35bc804360SLinus Walleij   - IRQ_TYPE_LEVEL_LOW
36bc804360SLinus Walleij   - IRQ_TYPE_LEVEL_HIGH
37bc804360SLinus Walleij   - IRQ_TYPE_EDGE_RISING
38bc804360SLinus Walleij   - IRQ_TYPE_EDGE_FALLING
39bc804360SLinus Walleij   - IRQ_TYPE_EDGE_BOTH
40bc804360SLinus Walleij - gpio-controller : marks the device node as a GPIO controller
41bc804360SLinus Walleij - #gpio-cells : should be <2>, the first cell is the GPIO offset on this
42bc804360SLinus Walleij   GPIO controller, the second cell is the flags.
43bc804360SLinus Walleij
44bc804360SLinus Walleij- Keypad
45bc804360SLinus Walleij  This keypad is the same on all variants, supporting up to 96 different
46bc804360SLinus Walleij  keys. The linux-specific properties are modeled on those already existing
47bc804360SLinus Walleij  in other input drivers.
48bc804360SLinus Walleij - compatible : must be "toshiba,tc3589x-keypad"
49bc804360SLinus Walleij - debounce-delay-ms : debounce interval in milliseconds
50bc804360SLinus Walleij - keypad,num-rows : number of rows in the matrix, see
51bc804360SLinus Walleij   bindings/input/matrix-keymap.txt
52bc804360SLinus Walleij - keypad,num-columns : number of columns in the matrix, see
53bc804360SLinus Walleij   bindings/input/matrix-keymap.txt
54bc804360SLinus Walleij - linux,keymap: the definition can be found in
55bc804360SLinus Walleij   bindings/input/matrix-keymap.txt
56bc804360SLinus Walleij - linux,no-autorepeat: do no enable autorepeat feature.
57e571c73eSDmitry Torokhov - wakeup-source: use any event on keypad as wakeup event.
58*71a0151cSSudeep Holla		  (Legacy property supported: "linux,wakeup")
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>;
105e571c73eSDmitry Torokhov		wakeup-source;
106bc804360SLinus Walleij	};
107bc804360SLinus Walleij};
108