^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) * Samsung's Keypad Controller device tree bindings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Samsung's Keypad controller is used to interface a SoC with a matrix-type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) keypad device. The keypad controller supports multiple row and column lines.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) A key can be placed at each intersection of a unique row and a unique column.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) The keypad controller can sense a key-press and key-release and report the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) event using a interrupt to the cpu.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Required SoC Specific Properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - compatible: should be one of the following
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - "samsung,s3c6410-keypad": For controllers compatible with s3c6410 keypad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) - "samsung,s5pv210-keypad": For controllers compatible with s5pv210 keypad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) - reg: physical base address of the controller and length of memory mapped
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) region.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) - interrupts: The interrupt number to the cpu.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) Required Board Specific Properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) - samsung,keypad-num-rows: Number of row lines connected to the keypad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) - samsung,keypad-num-columns: Number of column lines connected to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) keypad controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) - Keys represented as child nodes: Each key connected to the keypad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) controller is represented as a child node to the keypad controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) device node and should include the following properties.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) - keypad,row: the row number to which the key is connected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - keypad,column: the column number to which the key is connected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) - linux,code: the key-code to be reported when the key is pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) and released.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) - pinctrl-0: Should specify pin control groups used for this controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) - pinctrl-names: Should contain only one value - "default".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) Optional Properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) - wakeup-source: use any event on keypad as wakeup event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) (Legacy property supported: "linux,input-wakeup")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Optional Properties specific to linux:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) - linux,keypad-no-autorepeat: do no enable autorepeat feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) keypad@100a0000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) compatible = "samsung,s5pv210-keypad";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) reg = <0x100A0000 0x100>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) interrupts = <173>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) samsung,keypad-num-rows = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) samsung,keypad-num-columns = <8>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) linux,input-no-autorepeat;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) wakeup-source;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) pinctrl-names = "default";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) pinctrl-0 = <&keypad_rows &keypad_columns>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) key_1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) keypad,row = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) keypad,column = <3>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) linux,code = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) key_2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) keypad,row = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) keypad,column = <4>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) linux,code = <3>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) key_3 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) keypad,row = <0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) keypad,column = <5>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) linux,code = <4>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) };