xref: /linux/Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml (revision fc2d791a43d3880496d1c729b8bd74d2c19cb4e7)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/auxdisplay/holtek,ht16k33.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Holtek HT16K33 RAM mapping 16*8 LED controller with keyscan
8
9maintainers:
10  - Robin van der Gracht <robin@protonic.nl>
11
12allOf:
13  - $ref: /schemas/input/input.yaml#
14  - $ref: /schemas/input/matrix-keymap.yaml#
15
16properties:
17  compatible:
18    oneOf:
19      - items:
20          - enum:
21              - adafruit,3108  # 0.56" 4-Digit 7-Segment FeatherWing Display (Red)
22              - adafruit,3130  # 0.54" Quad Alphanumeric FeatherWing Display (Red)
23          - const: holtek,ht16k33
24
25      - const: holtek,ht16k33     # Generic 16*8 LED controller with dot-matrix display
26
27  reg:
28    maxItems: 1
29
30  refresh-rate-hz:
31    maxItems: 1
32    description: Display update interval in Hertz for dot-matrix displays
33
34  interrupts:
35    maxItems: 1
36
37  debounce-delay-ms: true
38
39  linux,keymap: true
40
41  linux,no-autorepeat:
42    type: boolean
43    description: Disable keyrepeat
44
45  default-brightness-level:
46    minimum: 1
47    maximum: 16
48    default: 16
49    description: Initial brightness level
50
51  led:
52    type: object
53    $ref: /schemas/leds/common.yaml#
54    unevaluatedProperties: false
55
56required:
57  - compatible
58  - reg
59
60if:
61  properties:
62    compatible:
63      const: holtek,ht16k33
64then:
65  required:
66    - refresh-rate-hz
67
68unevaluatedProperties: false
69
70examples:
71  - |
72    #include <dt-bindings/interrupt-controller/irq.h>
73    #include <dt-bindings/input/input.h>
74    #include <dt-bindings/leds/common.h>
75    i2c {
76        #address-cells = <1>;
77        #size-cells = <0>;
78
79        display-controller@70 {
80            compatible = "holtek,ht16k33";
81            reg = <0x70>;
82            refresh-rate-hz = <20>;
83            interrupt-parent = <&gpio4>;
84            interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
85            debounce-delay-ms = <50>;
86            linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>,
87                           <MATRIX_KEY(3, 0, KEY_F8)>,
88                           <MATRIX_KEY(4, 0, KEY_F10)>,
89                           <MATRIX_KEY(5, 0, KEY_F4)>,
90                           <MATRIX_KEY(6, 0, KEY_F2)>,
91                           <MATRIX_KEY(2, 1, KEY_F5)>,
92                           <MATRIX_KEY(3, 1, KEY_F7)>,
93                           <MATRIX_KEY(4, 1, KEY_F9)>,
94                           <MATRIX_KEY(5, 1, KEY_F3)>,
95                           <MATRIX_KEY(6, 1, KEY_F1)>;
96
97            led {
98                color = <LED_COLOR_ID_RED>;
99                function = LED_FUNCTION_BACKLIGHT;
100                linux,default-trigger = "backlight";
101            };
102        };
103    };
104