0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/auxdisplay/hit,hd44780.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Hitachi HD44780 Character LCD Controller
0008
0009 maintainers:
0010 - Geert Uytterhoeven <geert@linux-m68k.org>
0011
0012 description:
0013 The Hitachi HD44780 Character LCD Controller is commonly used on character
0014 LCDs that can display one or more lines of text. It exposes an M6800 bus
0015 interface, which can be used in either 4-bit or 8-bit mode. By using a
0016 GPIO expander it is possible to use the driver with one of the popular I2C
0017 expander boards based on the PCF8574 available for these displays. For
0018 an example see below.
0019
0020 properties:
0021 compatible:
0022 const: hit,hd44780
0023
0024 data-gpios:
0025 description:
0026 GPIO pins connected to the data signal lines DB0-DB7 (8-bit mode) or
0027 DB4-DB7 (4-bit mode) of the LCD Controller's bus interface.
0028 oneOf:
0029 - maxItems: 4
0030 - maxItems: 8
0031
0032 enable-gpios:
0033 description:
0034 GPIO pin connected to the "E" (Enable) signal line of the LCD
0035 Controller's bus interface.
0036 maxItems: 1
0037
0038 rs-gpios:
0039 description:
0040 GPIO pin connected to the "RS" (Register Select) signal line of the LCD
0041 Controller's bus interface.
0042 maxItems: 1
0043
0044 rw-gpios:
0045 description:
0046 GPIO pin connected to the "RW" (Read/Write) signal line of the LCD
0047 Controller's bus interface.
0048 maxItems: 1
0049
0050 backlight-gpios:
0051 description: GPIO pin used for enabling the LCD's backlight.
0052 maxItems: 1
0053
0054 display-height-chars:
0055 description: Height of the display, in character cells,
0056 $ref: /schemas/types.yaml#/definitions/uint32
0057 minimum: 1
0058 maximum: 4
0059
0060 display-width-chars:
0061 description: Width of the display, in character cells.
0062 $ref: /schemas/types.yaml#/definitions/uint32
0063 minimum: 1
0064 maximum: 64
0065
0066 internal-buffer-width:
0067 description:
0068 Internal buffer width (default is 40 for displays with 1 or 2 lines, and
0069 display-width-chars for displays with more than 2 lines).
0070 $ref: /schemas/types.yaml#/definitions/uint32
0071 minimum: 1
0072 maximum: 64
0073
0074 required:
0075 - compatible
0076 - data-gpios
0077 - enable-gpios
0078 - rs-gpios
0079 - display-height-chars
0080 - display-width-chars
0081
0082 additionalProperties: false
0083
0084 examples:
0085 - |
0086 #include <dt-bindings/gpio/gpio.h>
0087 auxdisplay {
0088 compatible = "hit,hd44780";
0089
0090 data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
0091 <&hc595 1 GPIO_ACTIVE_HIGH>,
0092 <&hc595 2 GPIO_ACTIVE_HIGH>,
0093 <&hc595 3 GPIO_ACTIVE_HIGH>;
0094 enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
0095 rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
0096
0097 display-height-chars = <2>;
0098 display-width-chars = <16>;
0099 };
0100 - |
0101 #include <dt-bindings/gpio/gpio.h>
0102 i2c {
0103 #address-cells = <1>;
0104 #size-cells = <0>;
0105
0106 pcf8574: pcf8574@27 {
0107 compatible = "nxp,pcf8574";
0108 reg = <0x27>;
0109 gpio-controller;
0110 #gpio-cells = <2>;
0111 };
0112 };
0113 hd44780 {
0114 compatible = "hit,hd44780";
0115 display-height-chars = <2>;
0116 display-width-chars = <16>;
0117 data-gpios = <&pcf8574 4 0>,
0118 <&pcf8574 5 0>,
0119 <&pcf8574 6 0>,
0120 <&pcf8574 7 0>;
0121 enable-gpios = <&pcf8574 2 0>;
0122 rs-gpios = <&pcf8574 0 0>;
0123 rw-gpios = <&pcf8574 1 0>;
0124 backlight-gpios = <&pcf8574 3 0>;
0125 };