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