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