Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp758415pxu; Wed, 6 Jan 2021 03:43:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJywmhhguQKLsxZ6S2pKx8WtebNY3ca9hOmsXoNtiTmbWEs0KcQno4gAP3wEy56hmCFDu9Bi X-Received: by 2002:a17:906:b793:: with SMTP id dt19mr2577963ejb.120.1609933407923; Wed, 06 Jan 2021 03:43:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609933407; cv=none; d=google.com; s=arc-20160816; b=rl3s4ciVPvUB88CfsemMl12/KsQjR8QINW+Rl/dKCEC0N0ID6nhnlsAMmQ74N1+5h7 mqoVsn2U2DI2pjAoP7+glEQy+aNdErxwMQn+gsL8MmaW+pB4EeFYV+Qwsehy0ZCLtldx K0ehNS1Wv6kICvfEfUQ61in0ZEyXmpDP8x9s7DHUlsmu300I0mlvbSNdD1tYmX75XWe4 qqzTtE7/DPva+r4+kybGxWyiYeTK9P3aZJYFnvUcTcF8Ubj9OnLZhpQ8mbir/v1bK6Jc phLer3J2mlbOSlPvM3xSDpEvv4FA85ZTW//XK9TgdQcXTy+RHNwUndh7pHoZ/spowpAb zt4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date; bh=VekltwQVSDzeoxODCHA9ys8F96oIwaQ9P5m9arzbLXA=; b=pE83qmd+jpMcGqJFwPj0h7u8vaqjr+wSiv5qxX17Pp2S/Wrj0MaxkgegF8cID+j7N8 cYpG06wt46q91Gth3Xt44IikZ+u3VVp47Ho3oZaupnjqqvylJXStNdLqxVHAxnUSZ+iF 5uE9K03fa9b/I1KjYYC5dcCTsjTg2juYP8Q9T8v5CSocdfeGVriQ7mtAlS6W9yiqDCdq arbRNqmq5XR4FDPxp58BLFieqgCD8w6Iz860dGBLD+1GVnoZw1lzXM5bOhae5k0hvt+r r+6ZJmvd8pdXJZiQumYx7PsSaCo4mTRokDWP7GGFgAyR3BE3Tfi7lIo64TMwWYbeSPqx X0lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si796393ejr.608.2021.01.06.03.43.02; Wed, 06 Jan 2021 03:43:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbhAFLkO (ORCPT + 99 others); Wed, 6 Jan 2021 06:40:14 -0500 Received: from tux.runtux.com ([176.9.82.136]:56838 "EHLO tux.runtux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbhAFLkN (ORCPT ); Wed, 6 Jan 2021 06:40:13 -0500 Received: from localhost (localhost [127.0.0.1]) by tux.runtux.com (Postfix) with ESMTP id C36A66EFD2; Wed, 6 Jan 2021 12:39:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at tux.runtux.com Received: from tux.runtux.com ([127.0.0.1]) by localhost (tux2.runtux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ztHTl1_m2aKa; Wed, 6 Jan 2021 12:39:30 +0100 (CET) Received: from bee.priv.zoo (62-99-217-90.static.upcbusiness.at [62.99.217.90]) (Authenticated sender: postmaster@runtux.com) by tux.runtux.com (Postfix) with ESMTPSA id C9C376EF93; Wed, 6 Jan 2021 12:39:29 +0100 (CET) Received: by bee.priv.zoo (Postfix, from userid 1002) id 5BB5346C; Wed, 6 Jan 2021 12:39:29 +0100 (CET) Date: Wed, 6 Jan 2021 12:39:29 +0100 From: Ralf Schlatterbeck To: linux-kernel , Willy Tarreau , Lars Poeschel , Linus Walleij , Miguel Ojeda Subject: [PATCH 1/1] auxdisplay: Add I2C gpio expander example Message-ID: <20210106113929.fizyg6fcsmsntkiy@runtux.com> References: <20210106113730.k5qveshjgcd57kgx@runtux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210106113730.k5qveshjgcd57kgx@runtux.com> X-ray: beware User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hd44780 displays are often used with pcf8574 based I/O expanders. Add example to documentation. Signed-off-by: Ralf Schlatterbeck --- .../bindings/auxdisplay/hit,hd44780.yaml | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.yaml b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.yaml index 9222b06e93a0..0ec2ce7b1df1 100644 --- a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.yaml +++ b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.yaml @@ -12,7 +12,10 @@ maintainers: description: 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. + 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. properties: compatible: @@ -94,3 +97,29 @@ examples: display-height-chars = <2>; display-width-chars = <16>; }; + - | + #include + i2c@2000 { + #address-cells = <1>; + #size-cells = <0>; + + pcf8574: pcf8574@27 { + compatible = "nxp,pcf8574"; + reg = <0x27>; + gpio-controller; + #gpio-cells = <2>; + }; + }; + hd44780 { + compatible = "hit,hd44780"; + display-height-chars = <2>; + display-width-chars = <16>; + data-gpios = <&pcf8574 4 0>, + <&pcf8574 5 0>, + <&pcf8574 6 0>, + <&pcf8574 7 0>; + enable-gpios = <&pcf8574 2 0>; + rs-gpios = <&pcf8574 0 0>; + rw-gpios = <&pcf8574 1 0>; + backlight-gpios = <&pcf8574 3 0>; + }; -- 2.20.1