Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/auxdisplay/holtek,ht16k33.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Holtek HT16K33 RAM mapping 16*8 LED controller with keyscan
0008 
0009 maintainers:
0010   - Robin van der Gracht <robin@protonic.nl>
0011 
0012 allOf:
0013   - $ref: "/schemas/input/matrix-keymap.yaml#"
0014 
0015 properties:
0016   compatible:
0017     oneOf:
0018       - items:
0019           - enum:
0020               - adafruit,3108  # 0.56" 4-Digit 7-Segment FeatherWing Display (Red)
0021               - adafruit,3130  # 0.54" Quad Alphanumeric FeatherWing Display (Red)
0022           - const: holtek,ht16k33
0023 
0024       - const: holtek,ht16k33     # Generic 16*8 LED controller with dot-matrix display
0025 
0026   reg:
0027     maxItems: 1
0028 
0029   refresh-rate-hz:
0030     maxItems: 1
0031     description: Display update interval in Hertz for dot-matrix displays
0032 
0033   interrupts:
0034     maxItems: 1
0035 
0036   debounce-delay-ms:
0037     maxItems: 1
0038     description: Debouncing interval time in milliseconds
0039 
0040   linux,keymap: true
0041 
0042   linux,no-autorepeat:
0043     description: Disable keyrepeat
0044 
0045   default-brightness-level:
0046     minimum: 1
0047     maximum: 16
0048     default: 16
0049     description: Initial brightness level
0050 
0051   led:
0052     type: object
0053     $ref: /schemas/leds/common.yaml#
0054     unevaluatedProperties: false
0055 
0056 required:
0057   - compatible
0058   - reg
0059 
0060 if:
0061   properties:
0062     compatible:
0063       const: holtek,ht16k33
0064 then:
0065   required:
0066     - refresh-rate-hz
0067 
0068 additionalProperties: false
0069 
0070 examples:
0071   - |
0072     #include <dt-bindings/interrupt-controller/irq.h>
0073     #include <dt-bindings/input/input.h>
0074     #include <dt-bindings/leds/common.h>
0075     i2c1 {
0076             #address-cells = <1>;
0077             #size-cells = <0>;
0078 
0079             ht16k33: ht16k33@70 {
0080                     compatible = "holtek,ht16k33";
0081                     reg = <0x70>;
0082                     refresh-rate-hz = <20>;
0083                     interrupt-parent = <&gpio4>;
0084                     interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
0085                     debounce-delay-ms = <50>;
0086                     linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>,
0087                                    <MATRIX_KEY(3, 0, KEY_F8)>,
0088                                    <MATRIX_KEY(4, 0, KEY_F10)>,
0089                                    <MATRIX_KEY(5, 0, KEY_F4)>,
0090                                    <MATRIX_KEY(6, 0, KEY_F2)>,
0091                                    <MATRIX_KEY(2, 1, KEY_F5)>,
0092                                    <MATRIX_KEY(3, 1, KEY_F7)>,
0093                                    <MATRIX_KEY(4, 1, KEY_F9)>,
0094                                    <MATRIX_KEY(5, 1, KEY_F3)>,
0095                                    <MATRIX_KEY(6, 1, KEY_F1)>;
0096 
0097                     led {
0098                             color = <LED_COLOR_ID_RED>;
0099                             function = LED_FUNCTION_BACKLIGHT;
0100                             linux,default-trigger = "backlight";
0101                     };
0102             };
0103       };