18c2ecf20Sopenharmony_ci* Toshiba TC3589x multi-purpose expander
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe Toshiba TC3589x series are I2C-based MFD devices which may expose the
48c2ecf20Sopenharmony_cifollowing built-in devices: gpio, keypad, rotator (vibrator), PWM (for
58c2ecf20Sopenharmony_cie.g. LEDs or vibrators) The included models are:
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci- TC35890
88c2ecf20Sopenharmony_ci- TC35892
98c2ecf20Sopenharmony_ci- TC35893
108c2ecf20Sopenharmony_ci- TC35894
118c2ecf20Sopenharmony_ci- TC35895
128c2ecf20Sopenharmony_ci- TC35896
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciRequired properties:
158c2ecf20Sopenharmony_ci - compatible : must be "toshiba,tc35890", "toshiba,tc35892", "toshiba,tc35893",
168c2ecf20Sopenharmony_ci   "toshiba,tc35894", "toshiba,tc35895" or "toshiba,tc35896"
178c2ecf20Sopenharmony_ci - reg : I2C address of the device
188c2ecf20Sopenharmony_ci - interrupts : the interrupt on the parent the controller is connected to
198c2ecf20Sopenharmony_ci - interrupt-controller : marks the device node as an interrupt controller
208c2ecf20Sopenharmony_ci - #interrupt-cells : should be <1>, the first cell is the IRQ offset on this
218c2ecf20Sopenharmony_ci   TC3589x interrupt controller.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciOptional nodes:
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci- GPIO
268c2ecf20Sopenharmony_ci  This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20
278c2ecf20Sopenharmony_ci  (other models) GPIO lines.
288c2ecf20Sopenharmony_ci - compatible : must be "toshiba,tc3589x-gpio"
298c2ecf20Sopenharmony_ci - interrupts : interrupt on the parent, which must be the tc3589x MFD device
308c2ecf20Sopenharmony_ci - interrupt-controller : marks the device node as an interrupt controller
318c2ecf20Sopenharmony_ci - #interrupt-cells : should be <2>, the first cell is the IRQ offset on this
328c2ecf20Sopenharmony_ci   TC3589x GPIO interrupt controller, the second cell is the interrupt flags
338c2ecf20Sopenharmony_ci   in accordance with <dt-bindings/interrupt-controller/irq.h>. The following
348c2ecf20Sopenharmony_ci   flags are valid:
358c2ecf20Sopenharmony_ci   - IRQ_TYPE_LEVEL_LOW
368c2ecf20Sopenharmony_ci   - IRQ_TYPE_LEVEL_HIGH
378c2ecf20Sopenharmony_ci   - IRQ_TYPE_EDGE_RISING
388c2ecf20Sopenharmony_ci   - IRQ_TYPE_EDGE_FALLING
398c2ecf20Sopenharmony_ci   - IRQ_TYPE_EDGE_BOTH
408c2ecf20Sopenharmony_ci - gpio-controller : marks the device node as a GPIO controller
418c2ecf20Sopenharmony_ci - #gpio-cells : should be <2>, the first cell is the GPIO offset on this
428c2ecf20Sopenharmony_ci   GPIO controller, the second cell is the flags.
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci- Keypad
458c2ecf20Sopenharmony_ci  This keypad is the same on all variants, supporting up to 96 different
468c2ecf20Sopenharmony_ci  keys. The linux-specific properties are modeled on those already existing
478c2ecf20Sopenharmony_ci  in other input drivers.
488c2ecf20Sopenharmony_ci - compatible : must be "toshiba,tc3589x-keypad"
498c2ecf20Sopenharmony_ci - debounce-delay-ms : debounce interval in milliseconds
508c2ecf20Sopenharmony_ci - keypad,num-rows : number of rows in the matrix, see
518c2ecf20Sopenharmony_ci   bindings/input/matrix-keymap.txt
528c2ecf20Sopenharmony_ci - keypad,num-columns : number of columns in the matrix, see
538c2ecf20Sopenharmony_ci   bindings/input/matrix-keymap.txt
548c2ecf20Sopenharmony_ci - linux,keymap: the definition can be found in
558c2ecf20Sopenharmony_ci   bindings/input/matrix-keymap.txt
568c2ecf20Sopenharmony_ci - linux,no-autorepeat: do no enable autorepeat feature.
578c2ecf20Sopenharmony_ci - wakeup-source: use any event on keypad as wakeup event.
588c2ecf20Sopenharmony_ci		  (Legacy property supported: "linux,wakeup")
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ciExample:
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_citc35893@44 {
638c2ecf20Sopenharmony_ci	compatible = "toshiba,tc35893";
648c2ecf20Sopenharmony_ci	reg = <0x44>;
658c2ecf20Sopenharmony_ci	interrupt-parent = <&gpio6>;
668c2ecf20Sopenharmony_ci	interrupts = <26 IRQ_TYPE_EDGE_RISING>;
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci	interrupt-controller;
698c2ecf20Sopenharmony_ci	#interrupt-cells = <1>;
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci	tc3589x_gpio {
728c2ecf20Sopenharmony_ci		compatible = "toshiba,tc3589x-gpio";
738c2ecf20Sopenharmony_ci		interrupts = <0>;
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci		interrupt-controller;
768c2ecf20Sopenharmony_ci		#interrupt-cells = <2>;
778c2ecf20Sopenharmony_ci		gpio-controller;
788c2ecf20Sopenharmony_ci		#gpio-cells = <2>;
798c2ecf20Sopenharmony_ci	};
808c2ecf20Sopenharmony_ci	tc3589x_keypad {
818c2ecf20Sopenharmony_ci		compatible = "toshiba,tc3589x-keypad";
828c2ecf20Sopenharmony_ci		interrupts = <6>;
838c2ecf20Sopenharmony_ci		debounce-delay-ms = <4>;
848c2ecf20Sopenharmony_ci		keypad,num-columns = <8>;
858c2ecf20Sopenharmony_ci		keypad,num-rows = <8>;
868c2ecf20Sopenharmony_ci		linux,no-autorepeat;
878c2ecf20Sopenharmony_ci		linux,keymap = <0x0301006b
888c2ecf20Sopenharmony_ci				0x04010066
898c2ecf20Sopenharmony_ci				0x06040072
908c2ecf20Sopenharmony_ci				0x040200d7
918c2ecf20Sopenharmony_ci				0x0303006a
928c2ecf20Sopenharmony_ci				0x0205000e
938c2ecf20Sopenharmony_ci				0x0607008b
948c2ecf20Sopenharmony_ci				0x0500001c
958c2ecf20Sopenharmony_ci				0x0403000b
968c2ecf20Sopenharmony_ci				0x03040034
978c2ecf20Sopenharmony_ci				0x05020067
988c2ecf20Sopenharmony_ci				0x0305006c
998c2ecf20Sopenharmony_ci				0x040500e7
1008c2ecf20Sopenharmony_ci				0x0005009e
1018c2ecf20Sopenharmony_ci				0x06020073
1028c2ecf20Sopenharmony_ci				0x01030039
1038c2ecf20Sopenharmony_ci				0x07060069
1048c2ecf20Sopenharmony_ci				0x050500d9>;
1058c2ecf20Sopenharmony_ci		wakeup-source;
1068c2ecf20Sopenharmony_ci	};
1078c2ecf20Sopenharmony_ci};
108