Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1574844 > unrolled thread
| Started by | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| First post | 2017-02-06 15:40 +0100 |
| Last post | 2017-02-09 10:00 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 12/13] dt-bindings: auxdisplay: Add bindings for Hitachi HD44780 Geert Uytterhoeven <geert@linux-m68k.org> - 2017-02-06 15:40 +0100
Re: [PATCH 12/13] dt-bindings: auxdisplay: Add bindings for Hitachi HD44780 Rob Herring <robh@kernel.org> - 2017-02-09 02:30 +0100
Re: [PATCH 12/13] dt-bindings: auxdisplay: Add bindings for Hitachi HD44780 Geert Uytterhoeven <geert@linux-m68k.org> - 2017-02-09 10:00 +0100
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2017-02-06 15:40 +0100 |
| Subject | [PATCH 12/13] dt-bindings: auxdisplay: Add bindings for Hitachi HD44780 |
| Message-ID | <t7SCv-68H-43@gated-at.bofh.it> |
Add DT bindings for an Hitachi HD44780 Character LCD Controller where
its M6800 bus interface is connected to GPIOs.
Memory-mapped configurations are not yet supported.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
---
.../devicetree/bindings/auxdisplay/hit,hd44780.txt | 44 ++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
diff --git a/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
new file mode 100644
index 0000000000000000..ee4054da458d412f
--- /dev/null
+++ b/Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt
@@ -0,0 +1,44 @@
+DT bindings for the Hitachi HD44780 Character LCD Controller
+
+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.
+
+Required properties:
+ - compatible: Must contain "hit,hd44780",
+ - data-gpios: Must contain an array of either 4 or 8 GPIO specifiers,
+ referring to the 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,
+ - enable-gpios: Must contain a GPIO specifier, referring to the GPIO pin
+ connected to the "E" (Enable) signal line of the LCD Controller's bus
+ interface,
+ - rs-gpios: Must contain a GPIO specifier, referring to the GPIO pin
+ connected to the "RS" (Register Select) signal line of the LCD Controller's
+ bus interface,
+ - display-height: Height of the display, in character cells,
+ - display-width: Width of the display, in character cells.
+
+Optional properties:
+ - rw-gpios: Must contain a GPIO specifier, referring to the GPIO pin
+ connected to the "RW" (Read/Write) signal line of the LCD Controller's bus
+ interface,
+ - backlight-gpios: Must contain a GPIO specifier, referring to the GPIO pin
+ used for enabling the LCD's backlight,
+ - internal-buffer-width: Internal buffer width (default is 40 for displays
+ with 1 or 2 lines, and display-width for displays with more than 2 lines).
+
+Example:
+
+ auxdisplay {
+ compatible = "hit,hd44780";
+
+ data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
+ <&hc595 1 GPIO_ACTIVE_HIGH>,
+ <&hc595 2 GPIO_ACTIVE_HIGH>,
+ <&hc595 3 GPIO_ACTIVE_HIGH>;
+ enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
+ rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
+
+ display-height = <2>;
+ display-width = <16>;
+ };
--
1.9.1
[toc] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-02-09 02:30 +0100 |
| Subject | Re: [PATCH 12/13] dt-bindings: auxdisplay: Add bindings for Hitachi HD44780 |
| Message-ID | <t8LIB-7Qw-5@gated-at.bofh.it> |
| In reply to | #1574844 |
On Mon, Feb 06, 2017 at 03:38:14PM +0100, Geert Uytterhoeven wrote: > Add DT bindings for an Hitachi HD44780 Character LCD Controller where > its M6800 bus interface is connected to GPIOs. Really, you should have a bit-bang M6800 bus driver and binding and then the binding for the LCD ctrl looks the same whether you are bit-banging it or not. That's a bit more work though. Maybe you could split the binding like this, but keep a monolithic driver for now. The driver can just fetch the GPIOs from the parent (bus controller) node. And you'd have to work out probing the driver. > Memory-mapped configurations are not yet supported. I guess this would require faulting on some address and then bit-banging the access. That sounds fun... Rob
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2017-02-09 10:00 +0100 |
| Message-ID | <t8SK6-3XY-25@gated-at.bofh.it> |
| In reply to | #1577241 |
Hi Rob,
On Thu, Feb 9, 2017 at 2:11 AM, Rob Herring <robh@kernel.org> wrote:
> On Mon, Feb 06, 2017 at 03:38:14PM +0100, Geert Uytterhoeven wrote:
>> Add DT bindings for an Hitachi HD44780 Character LCD Controller where
>> its M6800 bus interface is connected to GPIOs.
>
> Really, you should have a bit-bang M6800 bus driver and binding and then
> the binding for the LCD ctrl looks the same whether you are bit-banging
> it or not.
I thought about that, but turned it down due to the required complexity
for the little gain. And I think it would complicate memory mapped
configurations (see below), which would have to use regmap instead of readb()
and friends.
> That's a bit more work though. Maybe you could split the binding like
> this, but keep a monolithic driver for now. The driver can just fetch
> the GPIOs from the parent (bus controller) node. And you'd have to work
> out probing the driver.
Ugh...
>> Memory-mapped configurations are not yet supported.
>
> I guess this would require faulting on some address and then bit-banging
> the access. That sounds fun...
I meant connecting it to the processor bus instead of GPIOs, so the HD44780
registers become memory mapped.
That can be handled fairly easily by allowing a "reg" property as an
alternative to the data/enable/rw-gpios.
The only complication is that the M6800 bus has a single strobe (enable)
signal, and requires the rw signal to be valid before, while e.g. Intel CPUs
have separate read and write strobes. Usually people handle that by wiring\
rw to an address line, and thus using separate addresses for read and write.
I didn't add support for memory-mapped configurations as I can't test it
(without more hardware hacking ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web