Path: blob/master/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/auxdisplay/hit,hd44780.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Hitachi HD44780 Character LCD Controller78maintainers:9- Geert Uytterhoeven <geert@linux-m68k.org>1011description:12The Hitachi HD44780 Character LCD Controller is commonly used on character13LCDs that can display one or more lines of text. It exposes an M6800 bus14interface, which can be used in either 4-bit or 8-bit mode. By using a15GPIO expander it is possible to use the driver with one of the popular I2C16expander boards based on the PCF8574 available for these displays. For17an example see below.1819properties:20compatible:21const: hit,hd447802223data-gpios:24description:25GPIO pins connected to the data signal lines DB0-DB7 (8-bit mode) or26DB4-DB7 (4-bit mode) of the LCD Controller's bus interface.27oneOf:28- maxItems: 429- maxItems: 83031enable-gpios:32description:33GPIO pin connected to the "E" (Enable) signal line of the LCD34Controller's bus interface.35maxItems: 13637rs-gpios:38description:39GPIO pin connected to the "RS" (Register Select) signal line of the LCD40Controller's bus interface.41maxItems: 14243rw-gpios:44description:45GPIO pin connected to the "RW" (Read/Write) signal line of the LCD46Controller's bus interface.47maxItems: 14849backlight-gpios:50description: GPIO pin used for enabling the LCD's backlight.51maxItems: 15253display-height-chars:54description: Height of the display, in character cells,55$ref: /schemas/types.yaml#/definitions/uint3256minimum: 157maximum: 45859display-width-chars:60description: Width of the display, in character cells.61$ref: /schemas/types.yaml#/definitions/uint3262minimum: 163maximum: 646465internal-buffer-width:66description:67Internal buffer width (default is 40 for displays with 1 or 2 lines, and68display-width-chars for displays with more than 2 lines).69$ref: /schemas/types.yaml#/definitions/uint3270minimum: 171maximum: 647273required:74- compatible75- data-gpios76- enable-gpios77- rs-gpios78- display-height-chars79- display-width-chars8081additionalProperties: false8283examples:84- |85#include <dt-bindings/gpio/gpio.h>86display-controller {87compatible = "hit,hd44780";8889data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,90<&hc595 1 GPIO_ACTIVE_HIGH>,91<&hc595 2 GPIO_ACTIVE_HIGH>,92<&hc595 3 GPIO_ACTIVE_HIGH>;93enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;94rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;9596display-height-chars = <2>;97display-width-chars = <16>;98};99100- |101#include <dt-bindings/gpio/gpio.h>102i2c {103#address-cells = <1>;104#size-cells = <0>;105106pcf8574: gpio-expander@27 {107compatible = "nxp,pcf8574";108reg = <0x27>;109gpio-controller;110#gpio-cells = <2>;111};112};113114display-controller {115compatible = "hit,hd44780";116display-height-chars = <2>;117display-width-chars = <16>;118data-gpios = <&pcf8574 4 GPIO_ACTIVE_HIGH>,119<&pcf8574 5 GPIO_ACTIVE_HIGH>,120<&pcf8574 6 GPIO_ACTIVE_HIGH>,121<&pcf8574 7 GPIO_ACTIVE_HIGH>;122enable-gpios = <&pcf8574 2 GPIO_ACTIVE_HIGH>;123rs-gpios = <&pcf8574 0 GPIO_ACTIVE_HIGH>;124rw-gpios = <&pcf8574 1 GPIO_ACTIVE_HIGH>;125backlight-gpios = <&pcf8574 3 GPIO_ACTIVE_HIGH>;126};127128129