Add ilitek ili9341 panel driver
Subsystems (5)
v4 cover Add ilitek ili9341 panel driver
From: Dillon Min <[email protected]>
Since the st,sf-tc240t-9370-t dts binding already exist in stm32f429-disco.dts but, the panel driver didn't get accepted from mainline. it's time to submit patch fot it.
This driver can support two different interface by different dts bindings:
- spi+dpi, use spi to configure register, dpi for graphic data. st,sf-tc240t-9370-t
- only spi, just like tiny/ili9341.c (actually, this part is copy from tiny) adafruit,yx240qv29
I was submited the first patch last year, you can find it at [1]. this patch has one major difference from that one, which is replace the low level communication way, from spi_sync() to mipi_dbi_{command, command_stackbuf}() interface, referred from Linus's patch [2].
both the two dpi/dbi interface was tested on stm32f429-disco board, if anyone want to verify this patch, you need apply the clk patch for this board first, you can get it from [3].
[1] "drm/panel: Add ilitek ili9341 panel driver"
https://lore.kernel.org/lkml/1590378348-8115-7-git-send-email-dillon.minfei(a)gmail.com/
[2] "drm/panel: s6e63m0: Switch to DBI abstraction for SPI"
https://lore.kernel.org/dri-devel/20210611214243.669892-1-linus.walleij(a)linaro.org/
[3]
https://lore.kernel.org/lkml/1590378348-8115-6-git-send-email-dillon.minfei(a)gmail.com/
v4:
- fix m68k-allmodconfig build error which reported by lkp, thanks.
- add Copyright 2018 David Lechner <[email protected]>. v3 link:
https://lore.kernel.org/lkml/1627013203-23099-1-git-send-email-dillon.minfei(a)gmail.com/
v3:
- add Fixes tags.
- collect reviewed-by tags from linus and jagan.
- replace DRM_ERROR() with dev_err() or drm_err().
- remove kernel-doc markers from struct ili9341_config{}.
- reorder include headers.
- remove the struct device *dev from struct ili9341{}.
- restructure the ili9341_probe() function, add two ili9341_{dbi,dpi)_probe() to make it more readable according to jagan's suggestion, thanks.
for the full drm driver exist in drm/panel need Sam and Laurent's feedback. so, not cover this part at this time, will be update later.
v2 link:
https://lore.kernel.org/lkml/1626853288-31223-1-git-send-email-dillon.minfei(a)gmail.com/
v2:
- replace vcc regulator to bulk regulators in driver, from linus suggestion.
- fix dtbs_check warnings on ili9341 dts binding check.
- add bulk regulation node in ilitek,ili9341.yaml.
v1 link:
https://lore.kernel.org/lkml/1626430843-23823-1-git-send-email-dillon.minfei(a)gmail.com/
Dillon Min (3):
dt-bindings: display: panel: Add ilitek ili9341 panel bindings
ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding drm/panel: Add ilitek ili9341 panel driver
.../bindings/display/panel/ilitek,ili9341.yaml | 78 ++ arch/arm/boot/dts/stm32f429-disco.dts | 2 +- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 792 +++++++++++++++++++++ 5 files changed, 884 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c
Signature · 1 line
1.9.1
PATCH v4 1/3 dt-bindings: display: panel: Add ilitek ili9341 panel bindings
From: Dillon Min <[email protected]>
Add documentation for "ilitek,ili9341" panel.
---
v4: no change.
.../bindings/display/panel/ilitek,ili9341.yaml | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml
Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml new file +78 -0
@@ -0,0 +1,78 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/ilitek,ili9341.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek-9341 Display Panel + +maintainers: + - Dillon Min <[email protected]> + +description: | + Ilitek ILI9341 TFT panel driver with SPI control bus + This is a driver for 320x240 TFT panels, accepting a rgb input + streams with 16 bits or 18 bits. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - enum: + # ili9341 240*320 Color on stm32f429-disco board + - st,sf-tc240t-9370-t + - const: ilitek,ili9341 + + reg: true + + dc-gpios: + maxItems: 1 + description: Display data/command selection (D/CX) of this DBI panel + + spi-3wire: true + + spi-max-frequency: + const: 10000000 + + port: true + + vci-supply: + description: Analog voltage supply (2.5 .. 3.3V) + + vddi-supply: + description: Voltage supply for interface logic (1.65 .. 3.3 V) + + vddi-led-supply: + description: Voltage supply for the LED driver (1.65 .. 3.3 V) + +additionalProperties: false + +required: + - compatible + - reg + - dc-gpios + - port + +examples: + - |+ + spi { + #address-cells = <1>; + #size-cells = <0>; + panel: display(a)0 { + compatible = "st,sf-tc240t-9370-t", + "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; + }; +... +
Signature · 1 line
1.9.1
Re: [PATCH v4 1/3] dt-bindings: display: panel: Add ilitek ili9341 panel bindings
Quoted 8 lines · On Sat, Jul 24, 2021 at 5:44 AM <[email protected]> wrote:
From: Dillon Min <[email protected]>
Add documentation for "ilitek,ili9341" panel.
Patch applied to drm-misc-next.
Thanks for working on this!
Yours,
Linus Walleij
PATCH v4 2/3 ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding
In reply to [email protected]From: Dillon Min <[email protected]>
Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341"
so, append "ilitek,ili9341" to avoid the below dtbs_check warning.
arch/arm/boot/dts/stm32f429-disco.dt.yaml: display(a)1: compatible:
['st,sf-tc240t-9370-t'] is too short
---
v4: no change.
arch/arm/boot/dts/stm32f429-disco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/stm32f429-disco.dts +1 -1
@@ -192,7 +192,7 @@ display: display(a)1{ /* Connect panel-ilitek-9341 to ltdc */ - compatible = "st,sf-tc240t-9370-t"; + compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341"; reg = <1>; spi-3wire; spi-max-frequency = <10000000>;
Signature · 1 line
1.9.1
Re: [PATCH v4 2/3] ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding
Quoted 7 lines · On Sat, Jul 24, 2021 at 5:44 AM <[email protected]> wrote:
From: Dillon Min <[email protected]>
Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341"
so, append "ilitek,ili9341" to avoid the below
dtbs_checkwarning.
Quoted 8 lines
arch/arm/boot/dts/stm32f429-disco.dt.yaml: display(a)1: compatible:
['st,sf-tc240t-9370-t'] is too shortFixes a726e2f000ec ("ARM: dts: stm32: enable ltdc binding with ili9341, gyro l3gd20 on stm32429-disco board")Signed-off-by Dillon Min <[email protected]>Reported-by kernel test robot <[email protected]>---
v4: no change.
Please funnel this patch through the STM and ARM SoC tree.
Yours,
Linus Walleij
Re: [PATCH v4 2/3] ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding
Hi Linus
Thanks.
Quoted 19 lines · Linus Walleij
Quoted 7 lines · On Sat, Jul 24, 2021 at 5:44 AM <[email protected]> wrote:
From: Dillon Min <[email protected]>
Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341"
so, append "ilitek,ili9341" to avoid the below
dtbs_checkwarning.Quoted 8 lines
arch/arm/boot/dts/stm32f429-disco.dt.yaml: display(a)1: compatible:
['st,sf-tc240t-9370-t'] is too shortFixes a726e2f000ec ("ARM: dts: stm32: enable ltdc binding with ili9341, gyro l3gd20 on stm32429-disco board")Signed-off-by Dillon Min <[email protected]>Reported-by kernel test robot <[email protected]>---
v4: no change.
Quoted 3 lines
Reviewed-by Linus Walleij <[email protected]>Please funnel this patch through the STM and ARM SoC tree.
Sure, I will let Alex know. Thanks for your help on this driver.
Hi Alex,
Should I send v5 with Linus's Reviewed-by tag on this patch? thanks.
Best Regards
Dillon
Quoted 3 lines
Yours,
Linus Walleij
Alexandre TORGUE
maintainerRe: [PATCH v4 2/3] ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding
Hi Dillon
Quoted 24 lines · Dillon Min
Hi Linus
Thanks.
Quoted 19 lines · Linus Walleij
Quoted 15 lines · On Sat, Jul 24, 2021 at 5:44 AM <[email protected]> wrote:
From: Dillon Min <[email protected]>
Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341"
so, append "ilitek,ili9341" to avoid the below
dtbs_checkwarning.
arch/arm/boot/dts/stm32f429-disco.dt.yaml: display(a)1: compatible:
['st,sf-tc240t-9370-t'] is too shortFixes a726e2f000ec ("ARM: dts: stm32: enable ltdc binding with ili9341, gyro l3gd20 on stm32429-disco board")Signed-off-by Dillon Min <[email protected]>Reported-by kernel test robot <[email protected]>---
v4: no change.
Quoted 8 lines
Quoted 3 lines
Reviewed-by Linus Walleij <[email protected]>Please funnel this patch through the STM and ARM SoC tree.
Sure, I will let Alex know. Thanks for your help on this driver.
Hi Alex,
Should I send v5 with Linus's Reviewed-by tag on this patch? thanks.
No, I'll do it.
cheers
alex
Quoted 7 lines
Best Regards
DillonQuoted 3 lines
Yours,
Linus Walleij
Alexandre TORGUE
maintainerRe: [PATCH v4 2/3] ARM: dts: stm32: fix dtbs_check warning on ili9341 dts binding
In reply to [email protected]Hi Dillon
Quoted 25 lines · dillon.minfei(a)gmail.com
From: Dillon Min <[email protected]>
Since the compatible string defined from ilitek,ili9341.yaml is "st,sf-tc240t-9370-t", "ilitek,ili9341"
so, append "ilitek,ili9341" to avoid the below
dtbs_checkwarning.
arch/arm/boot/dts/stm32f429-disco.dt.yaml: display(a)1: compatible:
['st,sf-tc240t-9370-t'] is too shortFixes a726e2f000ec ("ARM: dts: stm32: enable ltdc binding with ili9341, gyro l3gd20 on stm32429-disco board")Signed-off-by Dillon Min <[email protected]>Reported-by kernel test robot <[email protected]>---
v4: no change.arch/arm/boot/dts/stm32f429-disco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/stm32f429-disco.dts +0
-0
arch/arm/boot/dts/stm32f429-disco.dts line 198
Quoted 8 lines
arch/arm/boot/dts/stm32f429-disco.dts +1
-1@@ -192,7 +192,7 @@ display: display(a)1{ /* Connect panel-ilitek-9341 to ltdc */ - compatible = "st,sf-tc240t-9370-t"; + compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341"; reg = <1>; spi-3wire; spi-max-frequency = <10000000>;
Patch applied on stm32-next. I updated commit title to indicate targeted board.
regards
Alex
PATCH v4 3/3 drm/panel: Add ilitek ili9341 panel driver
In reply to [email protected]From: Dillon Min <[email protected]>
This driver combines tiny/ili9341.c mipi_dbi_interface driver with mipi_dpi_interface driver, can support ili9341 with serial mode and parallel rgb interface mode by different dts bindings.
---
v4:
- fix m68k-allmodconfig build error which reported by lkp, thanks.
- add Copyright 2018 David Lechner <[email protected]>.
drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 792 +++++++++++++++++++++++++++ 3 files changed, 805 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c
drivers/gpu/drm/panel/Kconfig +12 -0
@@ -124,6 +124,18 @@ config DRM_PANEL_ILITEK_IL9322 Say Y here if you want to enable support for Ilitek IL9322 QVGA (320x240) RGB, YUV and ITU-T BT.656 panels. +config DRM_PANEL_ILITEK_ILI9341 + tristate "Ilitek ILI9341 240x320 QVGA panels" + depends on OF && SPI + depends on DRM_KMS_HELPER + depends on DRM_KMS_CMA_HELPER + depends on BACKLIGHT_CLASS_DEVICE + select DRM_MIPI_DBI + help + Say Y here if you want to enable support for Ilitek IL9341 + QVGA (240x320) RGB panels. support serial & parallel rgb + interface. + config DRM_PANEL_ILITEK_ILI9881C tristate "Ilitek ILI9881C-based panels" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o
drivers/gpu/drm/panel/panel-ilitek-ili9341.c new file +792 -0
792 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v4 3/3] drm/panel: Add ilitek ili9341 panel driver
Quoted 6 lines · On Sat, Jul 24, 2021 at 5:44 AM <[email protected]> wrote:
From: Dillon Min <[email protected]>
This driver combines
tiny/ili9341.cmipi_dbi_interfacedriver withmipi_dpi_interfacedriver, can support ili9341 with serial mode and parallel rgb interface mode by different dts bindings.
Quoted 8 lines
Signed-off-by Dillon Min <[email protected]>Reported-by kernel test robot <[email protected]>Reviewed-by Linus Walleij <[email protected]>Reviewed-by Jagan Teki <[email protected]>---
v4:
- fix m68k-allmodconfig build error which reported by lkp, thanks.
- add Copyright 2018 David Lechner <[email protected]>.
Patch applied to drm-misc-next
Thanks for working on this driver!
Yours,
Linus Walleij
Hi All
Just a gentle ping, thanks.
Best regards.
Dillon
Quoted 77 lines · On Sat, 24 Jul 2021 at 11:44, <[email protected]> wrote:
From: Dillon Min <[email protected]>
Since the st,sf-tc240t-9370-t dts binding already exist in
stm32f429-disco.dtsbut, the panel driver didn't get accepted from mainline. it's time to submit patch fot it.This driver can support two different interface by different dts bindings:
- spi+dpi, use spi to configure register, dpi for graphic data. st,sf-tc240t-9370-t
- only spi, just liketiny/ili9341.c(actually, this part is copy from tiny) adafruit,yx240qv29I was submited the first patch last year, you can find it at [1]. this patch has one major difference from that one, which is replace the low level communication way, from
spi_sync()to mipi_dbi_{command, command_stackbuf}() interface, referred from Linus's patch [2].both the two dpi/dbi interface was tested on stm32f429-disco board, if anyone want to verify this patch, you need apply the clk patch for this board first, you can get it from [3].
[1] "drm/panel: Add ilitek ili9341 panel driver"
https://lore.kernel.org/lkml/1590378348-8115-7-git-send-email-dillon.minfei(a)gmail.com/[2] "drm/panel: s6e63m0: Switch to DBI abstraction for SPI"
https://lore.kernel.org/dri-devel/20210611214243.669892-1-linus.walleij(a)linaro.org/[3]
https://lore.kernel.org/lkml/1590378348-8115-6-git-send-email-dillon.minfei(a)gmail.com/v4:
- fix m68k-allmodconfig build error which reported by lkp, thanks.
- add Copyright 2018 David Lechner <[email protected]>. v3 link:
https://lore.kernel.org/lkml/1627013203-23099-1-git-send-email-dillon.minfei(a)gmail.com/v3:
- add Fixes tags.
- collect reviewed-by tags from linus and jagan.
- replaceDRM_ERROR()withdev_err()ordrm_err().
- remove kernel-doc markers from struct ili9341_config{}.
- reorder include headers.
- remove the struct device *dev from struct ili9341{}.
- restructure theili9341_probe()function, add two ili9341_{dbi,dpi)_probe() to make it more readable according to jagan's suggestion, thanks.for the full drm driver exist in drm/panel need Sam and Laurent's feedback. so, not cover this part at this time, will be update later.
v2 link:
https://lore.kernel.org/lkml/1626853288-31223-1-git-send-email-dillon.minfei(a)gmail.com/v2:
- replace vcc regulator to bulk regulators in driver, from linus suggestion.
- fixdtbs_checkwarnings on ili9341 dts binding check.
- add bulk regulation node in ilitek,ili9341.yaml.
v1 link:
https://lore.kernel.org/lkml/1626430843-23823-1-git-send-email-dillon.minfei(a)gmail.com/Dillon Min (3):
dt-bindings: display: panel: Add ilitek ili9341 panel bindings
ARM: dts: stm32: fixdtbs_checkwarning on ili9341 dts binding drm/panel: Add ilitek ili9341 panel driver.../bindings/display/panel/ilitek,ili9341.yaml | 78 ++ arch/arm/boot/dts/stm32f429-disco.dts | 2 +- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 792 +++++++++++++++++++++ 5 files changed, 884 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c--
1.9.1
Quoted 12 lines · On Sat, Jul 24, 2021 at 6:46 AM <[email protected]> wrote:
From: Dillon Min <[email protected]>
Since the st,sf-tc240t-9370-t dts binding already exist in
stm32f429-disco.dtsbut, the panel driver didn't get accepted from mainline. it's time to submit patch fot it.This driver can support two different interface by different dts bindings:
- spi+dpi, use spi to configure register, dpi for graphic data. st,sf-tc240t-9370-t
- only spi, just liketiny/ili9341.c(actually, this part is copy from tiny) adafruit,yx240qv29
...
Quoted 1 line
I was submited the first patch last year, you can find it at [1].
submitted
Quoted 3 lines
this patch has one major difference from that one, which is replace the low level communication way, from
spi_sync()to mipi_dbi_{command, command_stackbuf}() interface, referred from Linus's patch [2].
Can you shed a light on the road map here.
I have the SPI panel (tiny) based on the ILI9341 and I'm using actually mi0283qt driver. With yours we will have 3 (three!) drivers for the same chip. I really do not want this. Without road map on the prospective of these all drivers, NAK.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy
Thanks for your question.
Quoted 15 lines · Andy Shevchenko
Quoted 7 lines · On Sat, Jul 24, 2021 at 6:46 AM <[email protected]> wrote:
From: Dillon Min <[email protected]>
Since the st,sf-tc240t-9370-t dts binding already exist in
stm32f429-disco.dtsbut, the panel driver didn't get accepted from mainline. it's time to submit patch fot it.Quoted 5 lines
This driver can support two different interface by different dts bindings:
- spi+dpi, use spi to configure register, dpi for graphic data. st,sf-tc240t-9370-t
- only spi, just liketiny/ili9341.c(actually, this part is copy from tiny) adafruit,yx240qv29
Quoted 5 lines
...
Quoted 1 line
I was submited the first patch last year, you can find it at [1].
submitted
Thanks.
Quoted 6 lines
Quoted 4 lines
this patch has one major difference from that one, which is replace the low level communication way, from
spi_sync()to mipi_dbi_{command, command_stackbuf}() interface, referred from Linus's patch [2].Can you shed a light on the road map here.
Personally, I'd like to merge tiny/mi0283qt.c, tiny/ili9341.c(already done) into this driver later
(keep original author, copyright, dts compatible string). then remove these two drivers under tiny, but it's up to Sam and Laurent agreement.
For long term, just like Peter suggested, let all panel based on ili9xxx with single-dbi or dbi & dpi interface to be supported by single ilitek-ili9xxx.c, something like panel/panel-simple.c
(panel/panel-ilitek-ili9322c, tiny/ili9225.c, tiny/ili9486.c,tiny/mi0283qt.c, etc).
it's also needs maintainers permission.
Quoted 4 lines
I have the SPI panel (tiny) based on the ILI9341 and I'm using actually mi0283qt driver. With yours we will have 3 (three!) drivers for the same chip. I really do not want this. Without road map on the prospective of these all drivers, NAK.
Yes, it will make users confused if there are three different drivers for the same chip.
I'll continue to work on this driver.
Thanks again for point this out.
Best Regards
Dillon
Quoted 4 lines
--
With Best Regards,
Andy Shevchenko