[PATCH 2/2] auxdisplay: devicetree doc for HD44780/PCF8574

From: Ralf Schlatterbeck
Date: Tue Jan 05 2021 - 10:16:42 EST


Add devicetree documentation with example.

Signed-off-by: Ralf Schlatterbeck <rsc@xxxxxxxxxx>
---
.../auxdisplay/hit,hd44780+nxp,pcf8575.yaml | 65 +++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 Documentation/devicetree/bindings/auxdisplay/hit,hd44780+nxp,pcf8575.yaml

diff --git a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780+nxp,pcf8575.yaml b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780+nxp,pcf8575.yaml
new file mode 100644
index 000000000000..c8e822c43b10
--- /dev/null
+++ b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780+nxp,pcf8575.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/auxdisplay/hit,hd44780+nxp,pcf8575.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Hitachi HD44780 Character LCD Controller attached to I2C via PCF8575
+
+maintainers:
+ - Ralf Schlatterbeck <rsc@xxxxxxxxxx>
+
+description:
+ The Hitachi HD44780 Character LCD Controller is commonly used on character
+ LCDs that can display one or more lines of text. The display itself
+ exposes a parallel connection but they're often used with a PCF8575
+ I/O expander to connect them to an I2C bus.
+
+properties:
+ compatible:
+ const: hit,hd44780+nxp,pcf8575
+
+ reg:
+ description: I2C-bus address
+ maxItems: 1
+
+ display-height-chars:
+ description: Height of the display, in character cells,
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 4
+
+ display-width-chars:
+ description: Width of the display, in character cells.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 64
+
+ internal-buffer-width:
+ description:
+ Internal buffer width (default is 40 for displays with 1 or 2 lines, and
+ display-width-chars for displays with more than 2 lines).
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 64
+
+required:
+ - compatible
+ - display-height-chars
+ - display-width-chars
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c@2000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ auxdisplay: hd44780@27 {
+ compatible = "hit,hd44780+nxp,pcf8575";
+ reg = <0x27>;
+ display-height-chars = <2>;
+ display-width-chars = <16>;
+ };
+ };
--
2.20.1