xref: /linux/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.yaml (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/auxdisplay/hit,hd44780.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Hitachi HD44780 Character LCD Controller
8
9maintainers:
10  - Geert Uytterhoeven <geert@linux-m68k.org>
11
12description:
13  The Hitachi HD44780 Character LCD Controller is commonly used on character
14  LCDs that can display one or more lines of text. It exposes an M6800 bus
15  interface, which can be used in either 4-bit or 8-bit mode.
16
17properties:
18  compatible:
19    const: hit,hd44780
20
21  data-gpios:
22    description:
23      GPIO pins connected to the data signal lines DB0-DB7 (8-bit mode) or
24      DB4-DB7 (4-bit mode) of the LCD Controller's bus interface.
25    oneOf:
26      - maxItems: 4
27      - maxItems: 8
28
29  enable-gpios:
30    description:
31      GPIO pin connected to the "E" (Enable) signal line of the LCD
32      Controller's bus interface.
33    maxItems: 1
34
35  rs-gpios:
36    description:
37      GPIO pin connected to the "RS" (Register Select) signal line of the LCD
38      Controller's bus interface.
39    maxItems: 1
40
41  rw-gpios:
42    description:
43      GPIO pin connected to the "RW" (Read/Write) signal line of the LCD
44      Controller's bus interface.
45    maxItems: 1
46
47  backlight-gpios:
48    description: GPIO pin used for enabling the LCD's backlight.
49    maxItems: 1
50
51  display-height-chars:
52    description: Height of the display, in character cells,
53    $ref: /schemas/types.yaml#/definitions/uint32
54    minimum: 1
55    maximum: 4
56
57  display-width-chars:
58    description: Width of the display, in character cells.
59    $ref: /schemas/types.yaml#/definitions/uint32
60    minimum: 1
61    maximum: 64
62
63  internal-buffer-width:
64    description:
65      Internal buffer width (default is 40 for displays with 1 or 2 lines, and
66      display-width-chars for displays with more than 2 lines).
67    $ref: /schemas/types.yaml#/definitions/uint32
68    minimum: 1
69    maximum: 64
70
71required:
72  - compatible
73  - data-gpios
74  - enable-gpios
75  - rs-gpios
76  - display-height-chars
77  - display-width-chars
78
79additionalProperties: false
80
81examples:
82  - |
83    #include <dt-bindings/gpio/gpio.h>
84    auxdisplay {
85            compatible = "hit,hd44780";
86
87            data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
88                         <&hc595 1 GPIO_ACTIVE_HIGH>,
89                         <&hc595 2 GPIO_ACTIVE_HIGH>,
90                         <&hc595 3 GPIO_ACTIVE_HIGH>;
91            enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
92            rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
93
94            display-height-chars = <2>;
95            display-width-chars = <16>;
96    };
97