From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"open list:DRM PANEL DRIVERS"
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/3] drm/panel: Add DT bindings for Ilitek ILI9322
Date: Sat, 2 Sep 2017 23:17:06 +0200 [thread overview]
Message-ID: <CACRpkdZgaKUDhVZ4spMsK_pG+LWOAkSWKrQTAbbXOFpUEk4rLQ@mail.gmail.com> (raw)
In-Reply-To: <20170817204424.e2wdkmyp4vyx2qj3@rob-hp-laptop>
On Thu, Aug 17, 2017 at 10:44 PM, Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Sun, Aug 13, 2017 at 01:44:47PM +0200, Linus Walleij wrote:
>> This adds device tree bindings for the Ilitek ILI9322
>> 320x240 TFT panel driver.
>>
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
(...)
>> +Optional properties:
>> + - width-mm: physical panel width [mm]
>> + - height-mm: physical panel height [mm]
>> + - vcc-supply: core voltage supply, see regulator/regulator.txt
>> + - iovcc-supply: voltage supply for the interface input/output signals,
>> + see regulator/regulator.txt
>> + - vci-supply: voltage supply for analog parts, see regulator/regulator.txt
>> + - reset-gpios: a GPIO spec for the reset pin, see gpio/gpio.txt
>> + - ilitek,vreg1out-microvolt: the output in microvolts for the VREGOUT1
>> + regulator used to drive the physical display. Valid ranges are 3600 thru
>> + 6000 in 100 microvolt increments. If not specified, hardware defaults will
>> + be used (4.5V).
>> + - ilitek,vcom-amplitude-percent: the percentage of VREGOUT1 used for the
>> + peak-to-peak amplitude of the communcation signals to the physical display.
>> + Valid ranges are 70 thru 132 percent in increments if two percent. Odd
>> + percentages will be truncated. If not specified, hardware defaults will be
>> + used (114%).
>> + - ilitek,vcom-high-percent: the percentage of VREGOUT1 used for the peak
>> + voltage on the communications link. Valid ranges are 37 thru 100 percent.
>> + If not specified, hardware defaults will be used (91%).
>> + - ilitek,gamma-correction-neg: a set of 8 nybbles describing negative
>> + gamma correction for voltages V1 thru V8. Valid range 0..15
>> + - ilitek,gamma-correction-pos: a set of 8 nybbles describing positive
>> + gamma correction for voltages V1 thru V8. Valid range 0..15
>> + These adjust what grayscale voltage will be output for input data V1 = 0,
>> + V2 = 16, V3 = 48, V4 = 96, V5 = 160, V6 = 208, V7 = 240 and V8 = 255.
>> + The curve is shaped like this:
>> +
>> + ^
>> + | V8
>> + | V7
>> + | V6
>> + | V5
>> + | V4
>> + | V3
>> + | V2
>> + | V1
>> + +----------------------------------------------------------->
>> + 0 16 48 96 160 208 240 255
>> +
>> + The negative and postive gamma values adjust the V1 thru V8 up/down
>> + according to the datasheet specifications. This is a property of the
>> + physical display connected to the display controller and may vary.
>> + If defined, both arrays must be supplied in full. If the properties
>> + are not supplied, hardware defaults will be used.
>
> Normally, we the physical panel is described which would imply all these
> settings. Are there lots of panels with this controller that would
> justify all these settings?
The datasheet for the ili9322 just says it "drives panels" essentially.
Googling around gives at hand that it is used pretty frequently in
Shenzhen China for adapting different off-the-shelf panels to
different inputs.
I can't really answer how many of these products that run one or
another OS using device tree to describe the configuration. It feels more
like I'm paving the road for others to travel.
Probably other Ilitek panel adapters will need something similar.
>> + - ilitek,entry-mode: the panel can be connected to various input streams
>> + and four of them can be selected by electronic straps on the display.
>> + However it is possible to select another mode or override the
>> + electronic default with this property. Valid values:
>> + 0: 8 bit serial RGB through
>> + 1: 8 bit serial RGB aligned
>> + 2: 8 bit serial RGB dummy 320x240
>> + 3: 8 bit serial RGB dummy 360x240
>> + 4: disabled
>> + 5: 24 bit parallel RGB through
>> + 6: 24 bit parallel RGB aligned
>> + 7: 24 bit YUV 640Y 320CbCr
>> + 8: 24 bit YUV 720Y 360CbCr
>> + 9: disabled
>> + 10: 8 bit ITU-R BT.656 720Y 360CbCr
>> + 11: 8 bit ITU-R BT.656 640Y 320CbCr
>
> To some extent, we have some standard bindings to describe this.
I don't find any. Maybe I'm looking in the wrong places :(
These are closest associated with the DRM "media bus formats"
in Linux include/uapi/linux/media-bus-format.h
such as:
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
#define MEDIA_BUS_FMT_RGB565_1X16 0x1017
#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
#define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
(...)
We can surely regard this bus format list as standard and
copy and extend it in DT (it does not have ITU-R formats for
the moment) but I don't know if that is wise.
Also the input modes of ili9322 is coupled with resolution so
it would need two more cells or so for resolution so I feel
it would over-complicate things for these 12 enumerators.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-09-02 21:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 11:44 [PATCH 1/3] dt-bindings: Add Ilitek vendor ID Linus Walleij
[not found] ` <20170813114448.20179-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-08-13 11:44 ` [PATCH 2/3] drm/panel: Add DT bindings for Ilitek ILI9322 Linus Walleij
[not found] ` <20170813114448.20179-2-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-08-17 20:44 ` Rob Herring
2017-09-02 21:17 ` Linus Walleij [this message]
2017-09-20 11:56 ` Linus Walleij
2017-09-24 20:36 ` Rob Herring
2017-09-30 23:42 ` Linus Walleij
[not found] ` <CACRpkdaP42pRR=M-QPQr5k-KDau-5zkA0UVY8O9DYf8czcY3Rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-01 15:15 ` Rob Herring
2017-08-17 20:35 ` [PATCH 1/3] dt-bindings: Add Ilitek vendor ID Rob Herring
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=CACRpkdZgaKUDhVZ4spMsK_pG+LWOAkSWKrQTAbbXOFpUEk4rLQ@mail.gmail.com \
--to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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).