162306a36Sopenharmony_ci* Toshiba TC3589x multi-purpose expander
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThe Toshiba TC3589x series are I2C-based MFD devices which may expose the
462306a36Sopenharmony_cifollowing built-in devices: gpio, keypad, rotator (vibrator), PWM (for
562306a36Sopenharmony_cie.g. LEDs or vibrators) The included models are:
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci- TC35890
862306a36Sopenharmony_ci- TC35892
962306a36Sopenharmony_ci- TC35893
1062306a36Sopenharmony_ci- TC35894
1162306a36Sopenharmony_ci- TC35895
1262306a36Sopenharmony_ci- TC35896
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ciRequired properties:
1562306a36Sopenharmony_ci - compatible : must be "toshiba,tc35890", "toshiba,tc35892", "toshiba,tc35893",
1662306a36Sopenharmony_ci   "toshiba,tc35894", "toshiba,tc35895" or "toshiba,tc35896"
1762306a36Sopenharmony_ci - reg : I2C address of the device
1862306a36Sopenharmony_ci - interrupts : the interrupt on the parent the controller is connected to
1962306a36Sopenharmony_ci - interrupt-controller : marks the device node as an interrupt controller
2062306a36Sopenharmony_ci - #interrupt-cells : should be <1>, the first cell is the IRQ offset on this
2162306a36Sopenharmony_ci   TC3589x interrupt controller.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciOptional nodes:
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci- GPIO
2662306a36Sopenharmony_ci  This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20
2762306a36Sopenharmony_ci  (other models) GPIO lines.
2862306a36Sopenharmony_ci - compatible : must be "toshiba,tc3589x-gpio"
2962306a36Sopenharmony_ci - interrupts : interrupt on the parent, which must be the tc3589x MFD device
3062306a36Sopenharmony_ci - interrupt-controller : marks the device node as an interrupt controller
3162306a36Sopenharmony_ci - #interrupt-cells : should be <2>, the first cell is the IRQ offset on this
3262306a36Sopenharmony_ci   TC3589x GPIO interrupt controller, the second cell is the interrupt flags
3362306a36Sopenharmony_ci   in accordance with <dt-bindings/interrupt-controller/irq.h>. The following
3462306a36Sopenharmony_ci   flags are valid:
3562306a36Sopenharmony_ci   - IRQ_TYPE_LEVEL_LOW
3662306a36Sopenharmony_ci   - IRQ_TYPE_LEVEL_HIGH
3762306a36Sopenharmony_ci   - IRQ_TYPE_EDGE_RISING
3862306a36Sopenharmony_ci   - IRQ_TYPE_EDGE_FALLING
3962306a36Sopenharmony_ci   - IRQ_TYPE_EDGE_BOTH
4062306a36Sopenharmony_ci - gpio-controller : marks the device node as a GPIO controller
4162306a36Sopenharmony_ci - #gpio-cells : should be <2>, the first cell is the GPIO offset on this
4262306a36Sopenharmony_ci   GPIO controller, the second cell is the flags.
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci- Keypad
4562306a36Sopenharmony_ci  This keypad is the same on all variants, supporting up to 96 different
4662306a36Sopenharmony_ci  keys. The linux-specific properties are modeled on those already existing
4762306a36Sopenharmony_ci  in other input drivers.
4862306a36Sopenharmony_ci - compatible : must be "toshiba,tc3589x-keypad"
4962306a36Sopenharmony_ci - debounce-delay-ms : debounce interval in milliseconds
5062306a36Sopenharmony_ci - keypad,num-rows : number of rows in the matrix, see
5162306a36Sopenharmony_ci   bindings/input/matrix-keymap.txt
5262306a36Sopenharmony_ci - keypad,num-columns : number of columns in the matrix, see
5362306a36Sopenharmony_ci   bindings/input/matrix-keymap.txt
5462306a36Sopenharmony_ci - linux,keymap: the definition can be found in
5562306a36Sopenharmony_ci   bindings/input/matrix-keymap.txt
5662306a36Sopenharmony_ci - linux,no-autorepeat: do no enable autorepeat feature.
5762306a36Sopenharmony_ci - wakeup-source: use any event on keypad as wakeup event.
5862306a36Sopenharmony_ci		  (Legacy property supported: "linux,wakeup")
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciExample:
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_citc35893@44 {
6362306a36Sopenharmony_ci	compatible = "toshiba,tc35893";
6462306a36Sopenharmony_ci	reg = <0x44>;
6562306a36Sopenharmony_ci	interrupt-parent = <&gpio6>;
6662306a36Sopenharmony_ci	interrupts = <26 IRQ_TYPE_EDGE_RISING>;
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci	interrupt-controller;
6962306a36Sopenharmony_ci	#interrupt-cells = <1>;
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci	tc3589x_gpio {
7262306a36Sopenharmony_ci		compatible = "toshiba,tc3589x-gpio";
7362306a36Sopenharmony_ci		interrupts = <0>;
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci		interrupt-controller;
7662306a36Sopenharmony_ci		#interrupt-cells = <2>;
7762306a36Sopenharmony_ci		gpio-controller;
7862306a36Sopenharmony_ci		#gpio-cells = <2>;
7962306a36Sopenharmony_ci	};
8062306a36Sopenharmony_ci	tc3589x_keypad {
8162306a36Sopenharmony_ci		compatible = "toshiba,tc3589x-keypad";
8262306a36Sopenharmony_ci		interrupts = <6>;
8362306a36Sopenharmony_ci		debounce-delay-ms = <4>;
8462306a36Sopenharmony_ci		keypad,num-columns = <8>;
8562306a36Sopenharmony_ci		keypad,num-rows = <8>;
8662306a36Sopenharmony_ci		linux,no-autorepeat;
8762306a36Sopenharmony_ci		linux,keymap = <0x0301006b
8862306a36Sopenharmony_ci				0x04010066
8962306a36Sopenharmony_ci				0x06040072
9062306a36Sopenharmony_ci				0x040200d7
9162306a36Sopenharmony_ci				0x0303006a
9262306a36Sopenharmony_ci				0x0205000e
9362306a36Sopenharmony_ci				0x0607008b
9462306a36Sopenharmony_ci				0x0500001c
9562306a36Sopenharmony_ci				0x0403000b
9662306a36Sopenharmony_ci				0x03040034
9762306a36Sopenharmony_ci				0x05020067
9862306a36Sopenharmony_ci				0x0305006c
9962306a36Sopenharmony_ci				0x040500e7
10062306a36Sopenharmony_ci				0x0005009e
10162306a36Sopenharmony_ci				0x06020073
10262306a36Sopenharmony_ci				0x01030039
10362306a36Sopenharmony_ci				0x07060069
10462306a36Sopenharmony_ci				0x050500d9>;
10562306a36Sopenharmony_ci		wakeup-source;
10662306a36Sopenharmony_ci	};
10762306a36Sopenharmony_ci};
108