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