# Hitachi HD44780 Character LCD Controller

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Auxdisplay bindings_

> Device-tree binding reference for Hitachi HD44780 Character LCD Controller.

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;auxdisplay&#47;hit&#44;hd44780&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Geert Uytterhoeven &#60;geert&#64;linux&#45;m68k&#46;org&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Hitachi HD44780 Character LCD Controller is commonly used on character LCDs that can display one or more lines of text. It exposes an M6800 bus interface, which can be used in either 4-bit or 8-bit mode. By using a GPIO expander it is possible to use the driver with one of the popular I2C expander boards based on the PCF8574 available for these displays. For an example see below.</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;hit&#44;hd44780&#34;</code></span>

<a id="dt-8d82a5899698d4129ff4"></a>

### <code>data&#45;gpios</code> — required here

<div id="dt-70bd6caae45d951d6ae3">
<p style="white-space: pre-wrap">GPIO pins connected to the data signal lines DB0-DB7 (8-bit mode) or DB4-DB7 (4-bit mode) of the LCD Controller's bus interface.</p>
</div>

<a id="dt-3e7fb8a08d86eb24d33c"></a>

#### Exactly one of these rules must match (<code>oneOf</code>)

<a id="dt-c9c7d77c8614f81598a1"></a>

**Rule 1**

> **Maximum number of items (<code>maxItems</code>):** <span id="dt-d0d1441fefb5e56c2dce"><code>4</code></span>

<a id="dt-6d8ef0bc625b2d86bab0"></a>

**Rule 2**

> **Maximum number of items (<code>maxItems</code>):** <span id="dt-a06fceb71dd49da7f225"><code>8</code></span>

<a id="dt-0d068058a6f4b36b1505"></a>

### <code>enable&#45;gpios</code> — required here

<div id="dt-2169b15d9fc9d03c1e0f">
<p style="white-space: pre-wrap">GPIO pin connected to the "E" (Enable) signal line of the LCD Controller's bus interface.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-3ea466d5c9323bd58f62"><code>1</code></span>

<a id="dt-4f952d4ca6563eafd64b"></a>

### <code>rs&#45;gpios</code> — required here

<div id="dt-1b76aae3967e6987faae">
<p style="white-space: pre-wrap">GPIO pin connected to the "RS" (Register Select) signal line of the LCD Controller's bus interface.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-2698524a49b7d2b9cae4"><code>1</code></span>

<a id="dt-3a01948cb637a5557966"></a>

### <code>rw&#45;gpios</code> — not listed as required here

<div id="dt-584cbbe9c99ae824a9da">
<p style="white-space: pre-wrap">GPIO pin connected to the "RW" (Read/Write) signal line of the LCD Controller's bus interface.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-476d870bfbfe387de1e8"><code>1</code></span>

<a id="dt-6da0e23866fb22b811d5"></a>

### <code>backlight&#45;gpios</code> — not listed as required here

<div id="dt-d1ad59d6b4cd64d14ef4">
<p style="white-space: pre-wrap">GPIO pin used for enabling the LCD's backlight.</p>
</div>

**Maximum number of items (<code>maxItems</code>):** <span id="dt-bf09af4029bff5c3ecfa"><code>1</code></span>

<a id="dt-11ae20e1db9e0517f5a1"></a>

### <code>display&#45;height&#45;chars</code> — required here

<div id="dt-66be45a891655f5e0fbc">
<p style="white-space: pre-wrap">Height of the display, in character cells,</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-331a5397e319bc4fdb15">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Minimum value (<code>minimum</code>):** <span id="dt-a40305f2e50e739b0206"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-c1f3da43a44986237465"><code>4</code></span>

<a id="dt-b90ab7821d6ef3e4c2f0"></a>

### <code>display&#45;width&#45;chars</code> — required here

<div id="dt-1774af711b8cb370d586">
<p style="white-space: pre-wrap">Width of the display, in character cells.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-527d8ef4a38a5cfc6dfa">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Minimum value (<code>minimum</code>):** <span id="dt-8c887b678397a6899cf9"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-bc93b312b28102e20ec4"><code>64</code></span>

<a id="dt-8a47c524f6be44f4fcf6"></a>

### <code>internal&#45;buffer&#45;width</code> — not listed as required here

<div id="dt-1e1c12e7965783c4917a">
<p style="white-space: pre-wrap">Internal buffer width (default is 40 for displays with 1 or 2 lines, and display-width-chars for displays with more than 2 lines).</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-382ee03d1bcaa8f6eff5">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

**Minimum value (<code>minimum</code>):** <span id="dt-d1f75f7edb55a693e08d"><code>1</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-bd27f1eb897de4705714"><code>64</code></span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;data&#45;gpios&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;enable&#45;gpios&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;rs&#45;gpios&#34;</code></span>, <span id="dt-391b1d2b563ec12ed437"><code>&#34;display&#45;height&#45;chars&#34;</code></span>, <span id="dt-c127a87237cb22622910"><code>&#34;display&#45;width&#45;chars&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">#include &lt;dt-bindings/gpio/gpio.h&gt;
display-controller {
    compatible = "hit,hd44780";

    data-gpios = &lt;&amp;hc595 0 GPIO_ACTIVE_HIGH&gt;,
                 &lt;&amp;hc595 1 GPIO_ACTIVE_HIGH&gt;,
                 &lt;&amp;hc595 2 GPIO_ACTIVE_HIGH&gt;,
                 &lt;&amp;hc595 3 GPIO_ACTIVE_HIGH&gt;;
    enable-gpios = &lt;&amp;hc595 4 GPIO_ACTIVE_HIGH&gt;;
    rs-gpios = &lt;&amp;hc595 5 GPIO_ACTIVE_HIGH&gt;;

    display-height-chars = &lt;2&gt;;
    display-width-chars = &lt;16&gt;;
};
</code></pre>

<pre id="dt-bae0d43ea48e35208b4a"><code class="language-dts">#include &lt;dt-bindings/gpio/gpio.h&gt;
i2c {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    pcf8574: gpio-expander@27 {
        compatible = "nxp,pcf8574";
        reg = &lt;0x27&gt;;
        gpio-controller;
        #gpio-cells = &lt;2&gt;;
    };
};

display-controller {
    compatible = "hit,hd44780";
    display-height-chars = &lt;2&gt;;
    display-width-chars = &lt;16&gt;;
    data-gpios = &lt;&amp;pcf8574 4 GPIO_ACTIVE_HIGH&gt;,
                 &lt;&amp;pcf8574 5 GPIO_ACTIVE_HIGH&gt;,
                 &lt;&amp;pcf8574 6 GPIO_ACTIVE_HIGH&gt;,
                 &lt;&amp;pcf8574 7 GPIO_ACTIVE_HIGH&gt;;
    enable-gpios = &lt;&amp;pcf8574 2 GPIO_ACTIVE_HIGH&gt;;
    rs-gpios = &lt;&amp;pcf8574 0 GPIO_ACTIVE_HIGH&gt;;
    rw-gpios = &lt;&amp;pcf8574 1 GPIO_ACTIVE_HIGH&gt;;
    backlight-gpios = &lt;&amp;pcf8574 3 GPIO_ACTIVE_HIGH&gt;;
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
