Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1550150lkv; Wed, 19 May 2021 12:33:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLHkgItxqJD4CExl36eTy9gMRKFNDFbdL6eYoNHiAiyq1zemfxPgLnVsxqOMYx9HPOMFR/ X-Received: by 2002:a17:906:fccc:: with SMTP id qx12mr757165ejb.21.1621452780489; Wed, 19 May 2021 12:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452780; cv=none; d=google.com; s=arc-20160816; b=oOTb8o00S3vhU7Cc52lDntKAtW3OOV8nJcaauUhzLw3kVLYCmZ+eXT68dkx4hizy6M gXHnyVZspQowGX9RlLzV1ercJBdQWDSUPuw0weMK4bCsIrTpsoYE7Xf8Q2rcIG4lwj/n 4WxaO1HRsC0QBtDpbjEesSm2e3aXhF7+qBqFVN4DqtHequoP1TWlpDMNpJaNa0mdpsdz t3xezMhsz8drTm7BXKhKPuvbyRJQJGyQd7gktdSJCSc7Szj4wQ6Wee8Qd26+t1HkKFFP mOIrZ7Hnyy9lzVs5TvH49ynYbVJGwKPmv0OcORRB6VQoYF0vfZlXTlj93Aj0orHg3l4s /MXw== 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:cc:to:from:date; bh=Z+w13jeXXnlVbmbsHzbGRJgdW0Fl6gcz6ztvsB1OoW0=; b=oetGbkAdep2dTXmN0gNjfLcfl8guylEgDBkvqSVbIDdTE107ruYZ0V4Ci8mzrSl9ZJ /bam2DZcAK4pReGyptu1vibzJSz7nxU6PPq5FxRa537c6V+9zE4S2lRlmoNvc/Q4JCI8 8VqBTg8/3NiQze9Wv0THyZqwYyI8/HNrQLuB1ljwXvTxjr8IY5MleHH4z2/puKMdGjSE e1HiDGwy11xQKrB8dQlqX13ixk4EE4lCx7SdBViWTE0TsqeZjcxgFZWjgyHYIbQn97oK G9oyifoQ4NUfg0SkD+fpWSsx/x71qZN1Adagd0rVLs6I4gMPZ9hV9iiN2iWCpyGg7mKV QU4g== 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 y15si85325ede.450.2021.05.19.12.32.35; Wed, 19 May 2021 12:33:00 -0700 (PDT) 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 S1352678AbhESL4P (ORCPT + 99 others); Wed, 19 May 2021 07:56:15 -0400 Received: from tux.runtux.com ([176.9.82.136]:39240 "EHLO tux.runtux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240448AbhESL4O (ORCPT ); Wed, 19 May 2021 07:56:14 -0400 Received: from localhost (localhost [127.0.0.1]) by tux.runtux.com (Postfix) with ESMTP id A77CB6F0D6; Wed, 19 May 2021 13:54:52 +0200 (CEST) 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 LMTP id S3S3Grr3HLSe; Wed, 19 May 2021 13:54:51 +0200 (CEST) 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 9F36A6EFFE; Wed, 19 May 2021 13:54:51 +0200 (CEST) Received: by bee.priv.zoo (Postfix, from userid 1002) id 32B5A46E; Wed, 19 May 2021 13:54:51 +0200 (CEST) Date: Wed, 19 May 2021 13:54:51 +0200 From: Ralf Schlatterbeck To: Geert Uytterhoeven Cc: Rob Herring , Miguel Ojeda , linux-kernel , Willy Tarreau , Lars Poeschel , Linus Walleij , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Subject: Re: [PATCH 1/1] auxdisplay: Add I2C gpio expander example Message-ID: <20210519115450.qoqpy7d5dgnjtenx@runtux.com> References: <20210106113730.k5qveshjgcd57kgx@runtux.com> <20210106113929.fizyg6fcsmsntkiy@runtux.com> <20210517152035.GA2581887@robh.at.kernel.org> <20210519090047.e63d2im5vgskqpcs@runtux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 --- Updated Patch, thanks to Geert Uytterhoeven for his tip on how to reproduce the warning. I've removed the address from the i2c stanza which fixes it. Let me know if I should re-post the patch in a separate thread. .../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..fde07e4b119d 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 { + #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