^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) %YAML 1.2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) $id: http://devicetree.org/schemas/input/matrix-keymap.yaml#
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) $schema: http://devicetree.org/meta-schemas/core.yaml#
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) title: Common key matrices binding for matrix-connected key boards
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) maintainers:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - Olof Johansson <olof@lixom.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) description: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) A simple common binding for matrix-connected key boards. Currently targeted at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) defining the keys in the scope of linux key codes since that is a stable and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) standardized interface at this time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Some users of this binding might choose to specify secondary keymaps for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) cases where there is a modifier key such as a Fn key. Proposed names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) for said properties are "linux,fn-keymap" or with another descriptive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) word for the modifier other from "Fn".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) linux,keymap:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) $ref: '/schemas/types.yaml#/definitions/uint32-array'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) description: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) An array of packed 1-cell entries containing the equivalent of row,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) column and linux key-code. The 32-bit big endian cell is packed as:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) row << 24 | column << 16 | key-code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) keypad,num-rows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) $ref: /schemas/types.yaml#/definitions/uint32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) description: Number of row lines connected to the keypad controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) keypad,num-columns:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) $ref: /schemas/types.yaml#/definitions/uint32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) description: Number of column lines connected to the keypad controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) additionalProperties: true
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) examples:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) keypad {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) /* ... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) linux,keymap = < 0x00030012
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 0x0102003a >;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) keypad,num-rows = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) keypad,num-columns = <8>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) };