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