drivers/auxdisplay: Provide support for JHD1313
Subsystems (2)
cover drivers/auxdisplay: Provide support for JHD1313
From: Kieran Bingham <[email protected]>
The JHD1313 is a 16x2 LCD controller with an I2C interface. It is used in the Seeed RGB Backlight LCD [0] which has the LCD at the I2C address 0x3e. (A PCA9633 is also available at 0x62, to control the RGB backlight)
This series introduces a new Vendor prefix for JHD, and introduces bindings for the LCD controller. A driver for the JHD1313 is added to the auxdisplay subsystem providing a charlcd to control the display.
[0] http://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/
Because this interface is quite common, and generic - this could be potentially extended to other similar devices later, possibly with optional bindings to configure the display width and height. If so - perhaps a more generic naming for the binding/driver might be appropriate at that time.
Kieran Bingham (3):
dt-bindings: vendor: Add JHD LCD vendor
dt-bindings: auxdisplay: Add JHD1313 bindings
drivers: auxdisplay: Add JHD1313 I2C interface driver
.../bindings/auxdisplay/jhd,jhd1313.yaml | 33 ++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 4 + drivers/auxdisplay/Kconfig | 12 ++ drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/jhd1313.c | 111 ++++++++++++++++++ 6 files changed, 163 insertions(+) create mode 100644 Documentation/devicetree/bindings/auxdisplay/jhd,jhd1313.yaml create mode 100644 drivers/auxdisplay/jhd1313.c
Signature · 1 line
2.20.1
PATCH 1/3 dt-bindings: vendor: Add JHD LCD vendor
From: Kieran Bingham <[email protected]>
Jing Handa Electronics is an LCD manufacturer based in Shenzhen, China.
http://www.jhdlcd.com.cn/Company.html
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -473,6 +473,8 @@ patternProperties: description: JEDEC Solid State Technology Association "^jesurun,.*": description: Shenzhen Jesurun Electronics Business Dept. + "^jhd,.*": + description: Jing Handa Electronics "^jianda,.*": description: Jiandangjing Technology Co., Ltd. "^karo,.*":
Signature · 1 line
2.20.1
Re: [PATCH 1/3] dt-bindings: vendor: Add JHD LCD vendor
Quoted 10 lines · On Thu, 28 Nov 2019 10:55:06 +0000, [email protected] wrote:
From: Kieran Bingham <[email protected]>
Jing Handa Electronics is an LCD manufacturer based in Shenzhen, China.
http://www.jhdlcd.com.cn/Company.htmlSigned-off-by Kieran Bingham <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
PATCH 2/3 dt-bindings: auxdisplay: Add JHD1313 bindings
In reply to [email protected]From: Kieran Bingham <[email protected]>
The JHD1313 is used in the Grove RGB LCD controller [0] and provides an I2C interface to control the LCD.
The implementation is based upon the datasheet for the JHD1214 [1], as this is the only datasheet referenced by the documentation for the Grove part.
[0] http://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/
[1] https://seeeddoc.github.io/Grove-LCD_RGB_Backlight/res/JHD1214Y_YG_1.0.pdf
--- .../bindings/auxdisplay/jhd,jhd1313.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/auxdisplay/jhd,jhd1313.yaml
Documentation/devicetree/bindings/auxdisplay/jhd,jhd1313.yaml new file +33 -0
@@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/auxdisplay/jhd,jhd1313.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: DT bindings for the JHD1313 Character LCD Controller + +description: + The JHD1313 Character LCD Controller is used by the widely available Grove + LCD RGB Backlight display. This currently supports only 16x2 LCD Modules. The + reg property specifies the I2C address of the module, and is expected to be + 0x3e. + +maintainers: + - Kieran Bingham <[email protected]> + +properties: + compatible: + const: jhd,jhd1313 + + reg: true + +required: + - compatible + - reg + +examples: + - | + auxdisplay: lcd@3e { + compatible = "jhd,jhd1313"; + reg = <0x3e>; + };
Signature · 1 line
2.20.1
Re: [PATCH 2/3] dt-bindings: auxdisplay: Add JHD1313 bindings
Quoted 25 lines · On Thu, Nov 28, 2019 at 10:55:07AM +0000, [email protected] wrote:
From: Kieran Bingham <[email protected]>
The JHD1313 is used in the Grove RGB LCD controller [0] and provides an I2C interface to control the LCD.
The implementation is based upon the datasheet for the JHD1214 [1], as this is the only datasheet referenced by the documentation for the Grove part.
[0] http://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/
[1] https://seeeddoc.github.io/Grove-LCD_RGB_Backlight/res/JHD1214Y_YG_1.0.pdfSigned-off-by Simon Goda <[email protected]>Signed-off-by Kieran Bingham <[email protected]>--- .../bindings/auxdisplay/jhd,jhd1313.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/auxdisplay/jhd,jhd1313.yamlDocumentation/devicetree/bindings/auxdisplay/jhd,jhd1313.yaml new file +0
-0
Documentation/devicetree/bindings/auxdisplay/jhd,jhd1313.yaml line 1
Quoted 1 line
Documentation/devicetree/bindings/auxdisplay/jhd,jhd1313.yaml new file +1
-0@@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0
Dual license new bindings please.
(GPL-2.0-only OR BSD-2-Clause)
With that,
PATCH 3/3 drivers: auxdisplay: Add JHD1313 I2C interface driver
In reply to [email protected]From: Kieran Bingham <[email protected]>
Provide an auxdisplay driver for the JHD1313 as used by the Grove-LCD RGB Backlight module [0]. A datasheet for the JHD1214 is provided by seeed [1], which assumes that they are similar parts.
The backlight for the Grove-LCD is already controllable with the PCA963x driver.
[0] http://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/
[1] https://seeeddoc.github.io/Grove-LCD_RGB_Backlight/res/JHD1214Y_YG_1.0.pdf
--- MAINTAINERS | 4 ++ drivers/auxdisplay/Kconfig | 12 ++++ drivers/auxdisplay/Makefile | 1 + drivers/auxdisplay/jhd1313.c | 111 +++++++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 drivers/auxdisplay/jhd1313.c
MAINTAINERS +4 -0
@@ -8837,6 +8837,10 @@ S: Maintained F: Documentation/admin-guide/jfs.rst F: fs/jfs/ +JHD1313 LCD Dispaly driver +M: Kieran Bingham <[email protected]> +F: drivers/auxdisplay/jhd1313.c + JME NETWORK DRIVER M: Guo-Fu Tseng <[email protected]> L: [email protected]
drivers/auxdisplay/Kconfig +12 -0
@@ -27,6 +27,18 @@ config HD44780 kernel and started at boot. If you don't understand what all this is about, say N. +config JHD1313 + tristate "JHD1313 Character LCD support" + depends on I2C + select CHARLCD + ---help--- + Enable support for Character LCDs using a JHD1313 controller on I2C. + The LCD is accessible through the /dev/lcd char device (10, 156). + This code can either be compiled as a module, or linked into the + kernel and started at boot. + This supports the LCD panel on the Grove 16x2 LCD series. + If you don't understand what all this is about, say N. + config KS0108 tristate "KS0108 LCD Controller" depends on PARPORT_PC
drivers/auxdisplay/Makefile +1 -0
@@ -9,5 +9,6 @@ obj-$(CONFIG_KS0108) += ks0108.o obj-$(CONFIG_CFAG12864B) += cfag12864b.o cfag12864bfb.o obj-$(CONFIG_IMG_ASCII_LCD) += img-ascii-lcd.o obj-$(CONFIG_HD44780) += hd44780.o +obj-$(CONFIG_JHD1313) += jhd1313.o obj-$(CONFIG_HT16K33) += ht16k33.o obj-$(CONFIG_PARPORT_PANEL) += panel.o
drivers/auxdisplay/jhd1313.c new file +111 -0
111 lines not on this page · raw message
Signature · 1 line
2.20.1
Re: [PATCH 3/3] drivers: auxdisplay: Add JHD1313 I2C interface driver
Hi Kieran,
MAINTAINERS S: Maintained · line 8840
Quoted 10 lines · On Thu, Nov 28, 2019 at 11:55 AM <[email protected]> wrote:
MAINTAINERS +1
-0@@ -8837,6 +8837,10 @@ S: Maintained F: Documentation/admin-guide/jfs.rst F: fs/jfs/ +JHD1313 LCD Dispaly driver
Typo (and it should be all uppercase; and perhaps "Display" is not needed given LCD is there; but see also comments on the title below).
Also missing the "S:" entry.
Quoted 9 lines
drivers/auxdisplay/Kconfig +1
-0@@ -27,6 +27,18 @@ config HD44780 kernel and started at boot. If you don't understand what all this is about, say N. +config JHD1313
drivers/auxdisplay/Kconfig config HD44780 · line 40
Quoted 10 lines
drivers/auxdisplay/Kconfig +10
-0+ tristate "JHD1313 Character LCD support" + depends on I2C + select CHARLCD + ---help--- + Enable support for Character LCDs using a JHD1313 controller on I2C. + The LCD is accessible through the /dev/lcd char device (10, 156). + This code can either be compiled as a module, or linked into the + kernel and started at boot. + This supports the LCD panel on the Grove 16x2 LCD series. + If you don't understand what all this is about, say N.
Would it be useful/worth for users to put "Grove series" and/or "I2C" in the tristate title? (i.e. like the help section explains and also like the MODULE_DESCRIPTION says).
drivers/auxdisplay/jhd1313.c line 2
Quoted 8 lines
drivers/auxdisplay/jhd1313.c new file +2
-0@@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0+ +
Unconventional (AFAIK) empty line.
Thanks for the driver!
Cheers,
Miguel
Re: [PATCH 3/3] drivers: auxdisplay: Add JHD1313 I2C interface driver
Hi Miguel,
Quoted 12 lines · Miguel Ojeda
Hi Kieran,
Quoted 9 lines · On Thu, Nov 28, 2019 at 11:55 AM <[email protected]> wrote:
MAINTAINERS +0
-0@@ -8837,6 +8837,10 @@ S: Maintained F: Documentation/admin-guide/jfs.rst F: fs/jfs/
Quoted 4 lines
MAINTAINERS S: Maintained · line 8840
Quoted 1 line
MAINTAINERS +1
-0+JHD1313 LCD Dispaly driverTypo (and it should be all uppercase; and perhaps "Display" is not needed given LCD is there; but see also comments on the title below).
Good spot, and good point "Liquid Crystal Display Display" is a bit redundant.
Quoted 1 line
Also missing the "S:" entry.
Ah yes, I think we can add the following here:
S: Maintained
Quoted 8 lines
Quoted 8 lines
drivers/auxdisplay/Kconfig +0
-0@@ -27,6 +27,18 @@ config HD44780 kernel and started at boot. If you don't understand what all this is about, say N.
Quoted 15 lines
drivers/auxdisplay/Kconfig config HD44780 · line 40
Quoted 11 lines
drivers/auxdisplay/Kconfig +11
-0+config JHD1313 + tristate "JHD1313 Character LCD support" + depends on I2C + select CHARLCD + ---help--- + Enable support for Character LCDs using a JHD1313 controller on I2C. + The LCD is accessible through the /dev/lcd char device (10, 156). + This code can either be compiled as a module, or linked into the + kernel and started at boot. + This supports the LCD panel on the Grove 16x2 LCD series. + If you don't understand what all this is about, say N.Would it be useful/worth for users to put "Grove series" and/or "I2C" in the tristate title? (i.e. like the help section explains and also like the
MODULE_DESCRIPTIONsays).
I have struggled with the difference between the definition of this driver (which supports a 'JHD1313') vs the 'product' that uses it (the Grove display), and I also suspect that as it's just an implementation of a more generic part, so I'm also contemplating renaming this. For instance, the products at:
http://www.jhdlcd.com.cn/162character.html
All seem to reference an SPLC780D controller, and have varying properties of backlight colour, and text colour.
Thus I highly suspect that the JHD1313 is just a specific variant/implementation of the range which is utilised by the Grove LCD board. (which makes jhd1313 a bad name for this driver...)
Do you have any experience in these various part numbers, to suggest perhaps a better naming?
Or I wonder if anyone has any relevant contacts at either Seeed, or JHD or any other related part here...
Now that I track down the SPLC780D, I see:
https://www.newhavendisplay.com/app_notes/SPLC780D.pdf
Which leads to 'yet another vendor', and actually I already see newhaven,.* in vendor-prefixes.yaml ... however this looks like it relates to just the 'LCD driver', and does not provide the I2C interface
- so the device is of course more complex than a single part.
Anyway, certainly adding in I2C would be beneficial though.
Quoted 10 lines
drivers/auxdisplay/jhd1313.c line 2
Quoted 8 lines
drivers/auxdisplay/jhd1313.c new file +2
-0@@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0+ +Unconventional (AFAIK) empty line.
Ooops, I can drop that one :-D
Quoted 1 line
Thanks for the driver!
You're welcome. The charlcd_ framework makes it easy to add an LCD over I2C, and I hope this can be useful to others.
Quoted 2 lines
Cheers,
Miguel
--
Kieran
Re: [PATCH 3/3] drivers: auxdisplay: Add JHD1313 I2C interface driver
Hello again,
Quoted 71 lines · Kieran Bingham
Hi Miguel,
Quoted 12 lines · Miguel Ojeda
Hi Kieran,
Quoted 9 lines · On Thu, Nov 28, 2019 at 11:55 AM <[email protected]> wrote:
MAINTAINERS +0
-0@@ -8837,6 +8837,10 @@ S: Maintained F: Documentation/admin-guide/jfs.rst F: fs/jfs/Quoted 4 lines
MAINTAINERS S: Maintained · line 8840
Quoted 1 line
MAINTAINERS +1
-0+JHD1313 LCD Dispaly driverTypo (and it should be all uppercase; and perhaps "Display" is not needed given LCD is there; but see also comments on the title below).
Good spot, and good point "Liquid Crystal Display Display" is a bit redundant.
Quoted 1 line
Also missing the "S:" entry.
Ah yes, I think we can add the following here:
S: Maintained
Quoted 8 lines
Quoted 8 lines
drivers/auxdisplay/Kconfig +0
-0@@ -27,6 +27,18 @@ config HD44780 kernel and started at boot. If you don't understand what all this is about, say N.Quoted 15 lines
drivers/auxdisplay/Kconfig config HD44780 · line 40
Quoted 11 lines
drivers/auxdisplay/Kconfig +11
-0+config JHD1313 + tristate "JHD1313 Character LCD support" + depends on I2C + select CHARLCD + ---help--- + Enable support for Character LCDs using a JHD1313 controller on I2C. + The LCD is accessible through the /dev/lcd char device (10, 156). + This code can either be compiled as a module, or linked into the + kernel and started at boot. + This supports the LCD panel on the Grove 16x2 LCD series. + If you don't understand what all this is about, say N.Would it be useful/worth for users to put "Grove series" and/or "I2C" in the tristate title? (i.e. like the help section explains and also like the
MODULE_DESCRIPTIONsays).I have struggled with the difference between the definition of this driver (which supports a 'JHD1313') vs the 'product' that uses it (the Grove display), and I also suspect that as it's just an implementation of a more generic part, so I'm also contemplating renaming this. For instance, the products at:
http://www.jhdlcd.com.cn/162character.htmlAll seem to reference an SPLC780D controller, and have varying properties of backlight colour, and text colour.
Thus I highly suspect that the JHD1313 is just a specific variant/implementation of the range which is utilised by the Grove LCD board. (which makes jhd1313 a bad name for this driver...)
Do you have any experience in these various part numbers, to suggest perhaps a better naming?
Quoted 6 lines
Or I wonder if anyone has any relevant contacts at either Seeed, or JHD or any other related part here...
Now that I track down the SPLC780D, I see:
Following the rabbit-hole even deeper, I have now discovered that Seed have now put up a /real/ JHD1313 datasheet:
However, that leads down a further path - as it references in the block diagram on page 12 that the I2C component (which is really what this driver is about) is an AIP31068L (or equivalence) which handles the bridging between the I2C interface, and the segment driver.
(And this is yet again, another newhaven-display part)
So that's pushing me towards the idea that this is in fact a newhaven,aip31068l device driver.
Perhaps we would support compatibles such as "jhd,jhd1313", "jhd,jhd1214" as convenience aliases though ?
Any thoughts from anyone?
Quoted 19 lines
Which leads to 'yet another vendor', and actually I already see newhaven,.* in
vendor-prefixes.yaml... however this looks like it relates to just the 'LCD driver', and does not provide the I2C interface
- so the device is of course more complex than a single part.Anyway, certainly adding in I2C would be beneficial though.
Quoted 10 lines
drivers/auxdisplay/jhd1313.c line 2
Quoted 8 lines
drivers/auxdisplay/jhd1313.c new file +2
-0@@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0+ +Unconventional (AFAIK) empty line.
Quoted 9 lines
Ooops, I can drop that one :-D
Quoted 1 line
Thanks for the driver!
You're welcome. The
charlcd_framework makes it easy to add an LCD over I2C, and I hope this can be useful to others.Quoted 2 lines
Cheers,
Miguel
--
Kieran
Re: [PATCH 3/3] drivers: auxdisplay: Add JHD1313 I2C interface driver
In reply to Kieran BinghamQuoted 3 lines · Kieran Bingham
Do you have any experience in these various part numbers, to suggest perhaps a better naming?
Not at all, sorry :(
Quoted 1 line
Anyway, certainly adding in I2C would be beneficial though.
I'd go with whatever you think will be the best for whoever reads the option in the config. It is not a big deal in any case -- whoever wants to use this kind of drivers have to know what they are looking for :)
Cheers,
Miguel