Загрузка данных


# dts/bindings/wch,ch455g-kbd.yaml

description: WCH CH455G I2C Keyboard Matrix Controller

compatible: "wch,ch455g-kbd"

include: [i2c-device.yaml]

properties:
  int-gpios:
    type: phandle-array
    required: true
    description: |
           An interrupt pin (usually SEG7/INT# on the CH455G chip),
           connected to a GPIO controller pin (e.g., GPIO_SD_B1_09).
           Must use the GPIO_ACTIVE_LOW flag.

# We describe that there must be a child node keymap inside ch455g
child-binding:
  description: 4x4 button matrix layout
  properties:
    compatible:
      type: string
      enum:
        - "input-keymap"
    keymap:
      type: array
      required: true
      description: |
             An array of macros, MATRIX_KEY(row, col, key_code), that maps the hardware intersections SEGx (row) and DIGx (col)
             to the standard INPUT_KEY_* key codes.
    row-size:
      type: int
      required: true
      const: 4
      description: Number of matrix rows (SEG0-SEG3).
    col-size:
      type: int
      required: true
      const: 4
      description: Number of matrix columns (DIG0-DIG3).

	ch455g: ch455g@24 {
	        compatible = "wch,ch455g-kbd";
	        reg = <0x24>;
	        /* INT GPIO_SD_B1_09 (gpio3_29) */
	        int-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
	        status = "okay";

	        /* MATRIX_KEY(row, col, code):
	           row — SEG (0..3) CH455G
	           col — DIG (0..3) CH455G */
		keymap = <
		    MATRIX_KEY(0, 0, INPUT_KEY_1)   /* SEG0, DIG0 */
		    MATRIX_KEY(0, 1, INPUT_KEY_4)   /* SEG0, DIG1 */
		    MATRIX_KEY(0, 2, INPUT_KEY_7)   /* SEG0, DIG2 */
		    MATRIX_KEY(0, 3, INPUT_KEY_DOT) /* SEG0, DIG3 (*) */
		    
		    MATRIX_KEY(1, 0, INPUT_KEY_2)   /* SEG1, DIG0 */
		    MATRIX_KEY(1, 1, INPUT_KEY_5)   /* SEG1, DIG1 */
		    MATRIX_KEY(1, 2, INPUT_KEY_8)   /* SEG1, DIG2 */
		    MATRIX_KEY(1, 3, INPUT_KEY_0)   /* SEG1, DIG3 */
		    
		    MATRIX_KEY(2, 0, INPUT_KEY_3)   /* SEG2, DIG0 */
		    MATRIX_KEY(2, 1, INPUT_KEY_6)   /* SEG2, DIG1 */
		    MATRIX_KEY(2, 2, INPUT_KEY_9)   /* SEG2, DIG2 */
		    MATRIX_KEY(2, 3, INPUT_KEY_T)   /* SEG2, DIG3 (#) */
		    
		    MATRIX_KEY(3, 0, INPUT_KEY_A)   /* SEG3, DIG0 */
		    MATRIX_KEY(3, 1, INPUT_KEY_B)   /* SEG3, DIG1 */
		    MATRIX_KEY(3, 2, INPUT_KEY_C)   /* SEG3, DIG2 */
		    MATRIX_KEY(3, 3, INPUT_KEY_D)   /* SEG3, DIG3 */
		>;
		row-size = <4>;
		col-size = <4>;
	};
-- Found devicetree overlay: /home/vovan/ZEPHYR_RTOS/zephyrproject/zephyr/samples/pjsip/pjproject/boards/mimxrt1024_evk.overlay
devicetree error: 'keymap' appears in /soc/i2c@403fc000/ch455g@24 in /home/vovan/ZEPHYR_RTOS/zephyrproject/zephyr/build_rt1024/build_pjsip/zephyr/zephyr.dts.pre, but is not declared in 'properties:' in /home/vovan/ZEPHYR_RTOS/zephyrproject/zephyr/dts/bindings/input/wch,ch455g-kbd.yaml