From: dillon min <dillon.minfei@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre TORGUE <alexandre.torgue@st.com>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>, Dave Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
linux-stm32@st-md-mailman.stormreply.com,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
linux-clk <linux-clk@vger.kernel.org>
Subject: Re: [PATCH v3 5/5] drm/panel: Add ilitek ili9341 driver
Date: Thu, 14 May 2020 16:11:00 +0800 [thread overview]
Message-ID: <CAL9mu0Kdc4TqcGB7JYDWkOJqwvxX1m_026aB0iprkHTzN4HXoQ@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdbcD7i+kNoJ9YP5XXTtLi12=yzW5OBNzet5oRdwPYz=dA@mail.gmail.com>
Hi Linus,
Linus Walleij <linus.walleij@linaro.org> 于2020年5月14日周四 下午10:08写道:
>
> On Thu, May 14, 2020 at 12:22 PM dillon min <dillon.minfei@gmail.com> wrote:
>
> > > > + /* Gamma */
> > > > + mipi_dbi_command(dbi, ILI9341_3GAMMA_EN, 0x00);
> > > > + mipi_dbi_command(dbi, MIPI_DCS_SET_GAMMA_CURVE, 0x01);
> > > > + mipi_dbi_command(dbi, ILI9341_PGAMMA,
> > > > + 0x0f, 0x31, 0x2b, 0x0c, 0x0e, 0x08, 0x4e, 0xf1,
> > > > + 0x37, 0x07, 0x10, 0x03, 0x0e, 0x09, 0x00);
> > > > + mipi_dbi_command(dbi, ILI9341_NGAMMA,
> > > > + 0x00, 0x0e, 0x14, 0x03, 0x11, 0x07, 0x31, 0xc1,
> > > > + 0x48, 0x08, 0x0f, 0x0c, 0x31, 0x36, 0x0f);
> > >
> > > It seems to be copies of the stuff above, but why is there a different
> > > gamma if you use DBI?
>
> > for dbi interface, currently i just copy the code from tiny/ili9341.c.
> > as so many boards use this driver now, like raspberry pi, etc
> > i'm afraid it's will not work after modification. so, just leave the
> > original code there.
>
> OK if you move it to ili9341_config it will be clear which panels
> need this gamma and which panels need another gamma.
>
> I think there should be one ili9341_config for the new st,*
> variant and one for the old DBI variant.
>
Okay, it's a good idea to setup two different configs. ili9341_dbi_config,
ili9341_dpi_config. first for old dbi variant, second for dpi variant.
> > anther question:
> > is there any panel driver have dbi & dpi or dpi & dsi supported? which
> > i mean support
> > two different panel interface in one driver.
> > thanks
>
> Usually you split the driver in three files becuase a driver can
> only list one initcall, and also it makes it modularized.
>
> There is nothing in-tree but look at my branch here:
> https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/log/?h=ux500-skomer-v5.7-rc1
>
> You see how I split up the s6e63m0 driver in one SPI part
> and one DSI part:
> https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?h=ux500-skomer-v5.7-rc1&id=6c0e1fb5df5fa8fa857dee65f6c0f54d06d158a7
> https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?h=ux500-skomer-v5.7-rc1&id=cfbf562cc709b53b62f5fbc7fedf176ffa17b088
>
> The overall idea should work the same with DBI.
>
> Yours,
> Linus Walleij
>
> Yours,
> Linus Walleij
Thanks for share, but i thinks it's not suitable to my case. the difference is
for panel s6e63m0
1 spi only for panel register configuration
2 dpi for rgb video data transfer (drm_panel_init(..., DRM_MODE_CONNECTOR_DPI);)
my case:
1 support ili9341 by drm mipi dbi (only spi bus, "3/4 line serial
interface", pdf chap 7.6.1), Ie, raspberry pi + ili9341 + spi
2 support ili9341 by spi & dpi (spi for register set, dpi for rgb
data, "6/16/18 bit parallel rgb interface", pdf chap 7.6.8)
Ie, stm32f429+ili9341+ltdc+spi
these two communication type has no dependency with each other.
DBI has much more difference than DPI & SPI, or DSI & SPI in drm.
drm_mipi_dbi support both panel register configuration and video
data transfer via spi
with or without dc pins.
also the registration to drm is difference, for dbi is
mipi_dbi_dev_init and drm_fbdev_generic_setup
for panel driver is drm_panel_init and drm_panel_add
at soc's view, we can drive ili9341 to work just by drm mipi dbi
(actually it's dbi -> spi bus) without host's lcd or dsi controller
but for some panel can't transfer video data by spi, and with dpi or
dsi interface, must connect to host's lcd or dsi controller.
so, for ilitek-ili9341 , it's use different dts binding drive to
register different client type (dbi, or dpi & spi) to drm.
actually, there is a driver tiny/ili9341.c support this panel by spi
bus only already. but, from Sam's suggestion, should extend this
driver
to support dpi & spi interface, this is the background of panel-ilitek-ili9341.c
thanks.
best regards.
dillon
prev parent reply other threads:[~2020-05-14 16:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 7:03 [PATCH v3 0/5] Enable ilitek ili9341 on stm32f429-disco board dillon.minfei
2020-05-12 7:03 ` [PATCH v3 1/5] ARM: dts: stm32: Add pin map for ltdc, spi5 " dillon.minfei
2020-05-12 7:03 ` [PATCH v3 2/5] dt-bindings: display: panel: Add ilitek ili9341 panel bindings dillon.minfei
2020-05-14 8:21 ` Linus Walleij
2020-05-12 7:03 ` [PATCH v3 3/5] ARM: dts: stm32: enable ltdc binding with ili9341 on stm32429-disco board dillon.minfei
2020-05-14 8:24 ` Linus Walleij
2020-05-14 9:17 ` dillon min
2020-05-14 12:52 ` Alexandre Torgue
2020-05-14 13:07 ` dillon min
2020-05-15 8:31 ` [Linux-stm32] " Benjamin GAIGNARD
2020-05-15 9:24 ` dillon min
2020-05-15 9:34 ` Benjamin GAIGNARD
2020-05-15 10:32 ` dillon min
2020-05-12 7:03 ` [PATCH v3 4/5] clk: stm32: Fix stm32f429 ltdc driver loading hang in clk set rate. keep ltdc clk running after kernel startup dillon.minfei
2020-05-14 21:02 ` Stephen Boyd
2020-05-15 10:31 ` dillon min
2020-05-12 7:03 ` [PATCH v3 5/5] drm/panel: Add ilitek ili9341 driver dillon.minfei
2020-05-14 8:14 ` Linus Walleij
2020-05-14 10:22 ` dillon min
2020-05-14 14:07 ` Linus Walleij
2020-05-14 8:11 ` dillon min [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL9mu0Kdc4TqcGB7JYDWkOJqwvxX1m_026aB0iprkHTzN4HXoQ@mail.gmail.com \
--to=dillon.minfei@gmail.com \
--cc=airlied@linux.ie \
--cc=alexandre.torgue@st.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).