128 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---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 Controller8 9maintainers:10 - Geert Uytterhoeven <geert@linux-m68k.org>11 12description:13 The Hitachi HD44780 Character LCD Controller is commonly used on character14 LCDs that can display one or more lines of text. It exposes an M6800 bus15 interface, which can be used in either 4-bit or 8-bit mode. By using a16 GPIO expander it is possible to use the driver with one of the popular I2C17 expander boards based on the PCF8574 available for these displays. For18 an example see below.19 20properties:21 compatible:22 const: hit,hd4478023 24 data-gpios:25 description:26 GPIO pins connected to the data signal lines DB0-DB7 (8-bit mode) or27 DB4-DB7 (4-bit mode) of the LCD Controller's bus interface.28 oneOf:29 - maxItems: 430 - maxItems: 831 32 enable-gpios:33 description:34 GPIO pin connected to the "E" (Enable) signal line of the LCD35 Controller's bus interface.36 maxItems: 137 38 rs-gpios:39 description:40 GPIO pin connected to the "RS" (Register Select) signal line of the LCD41 Controller's bus interface.42 maxItems: 143 44 rw-gpios:45 description:46 GPIO pin connected to the "RW" (Read/Write) signal line of the LCD47 Controller's bus interface.48 maxItems: 149 50 backlight-gpios:51 description: GPIO pin used for enabling the LCD's backlight.52 maxItems: 153 54 display-height-chars:55 description: Height of the display, in character cells,56 $ref: /schemas/types.yaml#/definitions/uint3257 minimum: 158 maximum: 459 60 display-width-chars:61 description: Width of the display, in character cells.62 $ref: /schemas/types.yaml#/definitions/uint3263 minimum: 164 maximum: 6465 66 internal-buffer-width:67 description:68 Internal buffer width (default is 40 for displays with 1 or 2 lines, and69 display-width-chars for displays with more than 2 lines).70 $ref: /schemas/types.yaml#/definitions/uint3271 minimum: 172 maximum: 6473 74required:75 - compatible76 - data-gpios77 - enable-gpios78 - rs-gpios79 - display-height-chars80 - display-width-chars81 82additionalProperties: false83 84examples:85 - |86 #include <dt-bindings/gpio/gpio.h>87 display-controller {88 compatible = "hit,hd44780";89 90 data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,91 <&hc595 1 GPIO_ACTIVE_HIGH>,92 <&hc595 2 GPIO_ACTIVE_HIGH>,93 <&hc595 3 GPIO_ACTIVE_HIGH>;94 enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;95 rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;96 97 display-height-chars = <2>;98 display-width-chars = <16>;99 };100 101 - |102 #include <dt-bindings/gpio/gpio.h>103 i2c {104 #address-cells = <1>;105 #size-cells = <0>;106 107 pcf8574: gpio-expander@27 {108 compatible = "nxp,pcf8574";109 reg = <0x27>;110 gpio-controller;111 #gpio-cells = <2>;112 };113 };114 115 display-controller {116 compatible = "hit,hd44780";117 display-height-chars = <2>;118 display-width-chars = <16>;119 data-gpios = <&pcf8574 4 GPIO_ACTIVE_HIGH>,120 <&pcf8574 5 GPIO_ACTIVE_HIGH>,121 <&pcf8574 6 GPIO_ACTIVE_HIGH>,122 <&pcf8574 7 GPIO_ACTIVE_HIGH>;123 enable-gpios = <&pcf8574 2 GPIO_ACTIVE_HIGH>;124 rs-gpios = <&pcf8574 0 GPIO_ACTIVE_HIGH>;125 rw-gpios = <&pcf8574 1 GPIO_ACTIVE_HIGH>;126 backlight-gpios = <&pcf8574 3 GPIO_ACTIVE_HIGH>;127 };128