Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752019AbaLQKWx (ORCPT ); Wed, 17 Dec 2014 05:22:53 -0500 Received: from mail-bn1bn0102.outbound.protection.outlook.com ([157.56.110.102]:45120 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751911AbaLQKWu (ORCPT ); Wed, 17 Dec 2014 05:22:50 -0500 Message-ID: <54915A78.9040904@freescale.com> Date: Wed, 17 Dec 2014 18:27:04 +0800 From: Liu Ying User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Thierry Reding CC: , , , , , , , , , Subject: Re: [PATCH RFC 10/15] drm: panel: Add support for Himax HX8369A MIPI DSI panel References: <1418200648-32656-1-git-send-email-Ying.Liu@freescale.com> <1418200648-32656-11-git-send-email-Ying.Liu@freescale.com> <20141210140334.GE23558@ulmo.nvidia.com> In-Reply-To: <20141210140334.GE23558@ulmo.nvidia.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Ying.Liu@freescale.com; X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(199003)(51704005)(189002)(164054003)(24454002)(479174004)(377454003)(83506001)(65956001)(4396001)(50466002)(99396003)(46102003)(77096005)(23746002)(110136001)(104016003)(105606002)(62966003)(64706001)(65806001)(20776003)(36756003)(92566001)(77156002)(47776003)(19580405001)(21056001)(107046002)(59896002)(87936001)(65816999)(6806004)(31966008)(84676001)(64126003)(19580395003)(97736003)(50986999)(120916001)(99136001)(33656002)(106466001)(68736005)(80316001)(85426001)(2950100001)(54356999)(86362001)(76176999)(87266999)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR0301MB0627;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0627; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004);SRVR:BN1PR0301MB0627; X-Forefront-PRVS: 042857DBB5 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0627; X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/2014 10:03 PM, Thierry Reding wrote: > On Wed, Dec 10, 2014 at 04:37:23PM +0800, Liu Ying wrote: >> This patch adds support for Himax HX8369A MIPI DSI panel. >> >> Signed-off-by: Liu Ying >> --- >> .../devicetree/bindings/panel/himax,hx8369a.txt | 86 +++ >> drivers/gpu/drm/panel/Kconfig | 6 + >> drivers/gpu/drm/panel/Makefile | 1 + >> drivers/gpu/drm/panel/panel-hx8369a.c | 627 +++++++++++++++++++++ >> 4 files changed, 720 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/panel/himax,hx8369a.txt >> create mode 100644 drivers/gpu/drm/panel/panel-hx8369a.c >> >> diff --git a/Documentation/devicetree/bindings/panel/himax,hx8369a.txt b/Documentation/devicetree/bindings/panel/himax,hx8369a.txt >> new file mode 100644 >> index 0000000..6fe251e >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/panel/himax,hx8369a.txt >> @@ -0,0 +1,86 @@ >> +Himax HX8369A WVGA 16.7M color TFT single chip driver with internal GRAM >> + >> +Himax HX8369A is a WVGA resolution driving controller. >> +It is designed to provide a single chip solution that combines a source >> +driver and power supply circuits to drive a TFT dot matrix LCD with >> +480RGBx864 dots at the maximum. >> + >> +The HX8369A supports several interface modes, including MPU MIPI DBI Type >> +A/B mode, MIPI DPI/DBI Type C mode, MIPI DSI video mode, MIPI DSI command >> +mode and MDDI mode. The interface mode is selected by the external hardware >> +pins BS[3:0]. >> + >> +Currently, only the MIPI DSI video mode is supported. >> + >> +Required properties: >> + - compatible: "himax,hx8369a-dsi" >> + - reg: the virtual channel number of a DSI peripheral >> + - reset-gpios: a GPIO spec for the reset pin >> + - data-lanes: the data lane number of a DSI peripheral > > This is implied by the compatible already. Accepted. > >> + - display-timings: timings for the connected panel as described by [1] > > Also implied by the compatible value. Accepted. > >> + - bs: the interface mode number described by the following table >> + -------------------------- >> + | DBI_TYPE_A_8BIT | 0 | >> + | DBI_TYPE_A_9BIT | 1 | >> + | DBI_TYPE_A_16BIT | 2 | >> + | DBI_TYPE_A_18BIT | 3 | >> + | DBI_TYPE_B_8BIT | 4 | >> + | DBI_TYPE_B_9BIT | 5 | >> + | DBI_TYPE_B_16BIT | 6 | >> + | DBI_TYPE_B_18BIT | 7 | >> + | DSI_CMD_MODE | 8 | >> + | DBI_TYPE_B_24BIT | 9 | >> + | DSI_VIDEO_MODE | 10 | >> + | MDDI | 11 | >> + | DPI_DBI_TYPE_C_OPT1 | 12 | >> + | DPI_DBI_TYPE_C_OPT2 | 13 | >> + | DPI_DBI_TYPE_C_OPT3 | 14 | >> + -------------------------- > > Can this not be inferred by the driver? If it's a DSI driver can't it > select between DSI_VIDEO_MODE or DSI_CMD_MODE based on its capabilities? > That is, if the panel driver can setup command mode, shouldn't it be > using command mode in that case? And use DSI_VIDEO_MODE otherwise? I may remove this property. But, I choose not to add any logic in the host and slave drivers to handle the interface mode selection at present, since I only support the DSI_VIDEO_MODE now. Is this acceptable? > >> +Optional properties: >> + - power-on-delay: delay after turning regulators on [ms] >> + - reset-delay: delay after reset sequence [ms] > > Surely these are constant for this panel? Accepted. > >> + - panel-width-mm: physical panel width [mm] >> + - panel-height-mm: physical panel height [mm] > > These are also implied by compatible. > Accepted. >> +Example: >> + panel@0 { >> + compatible = "himax,hx8369a-dsi"; >> + reg = <0>; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_mipi_panel>; >> + reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; >> + reset-delay = <120>; >> + bs2-gpios = <&gpio6 14 GPIO_ACTIVE_HIGH>; >> + data-lanes = <2>; >> + panel-width-mm = <45>; >> + panel-height-mm = <76>; >> + bs = <10>; >> + status = "okay"; > > status = "okay" is the default, so it probably shouldn't be in this > example. > Accepted. >> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig >> index 024e98e..f1a5b58 100644 >> --- a/drivers/gpu/drm/panel/Kconfig >> +++ b/drivers/gpu/drm/panel/Kconfig >> @@ -40,4 +40,10 @@ config DRM_PANEL_SHARP_LQ101R1SX01 >> To compile this driver as a module, choose M here: the module >> will be called panel-sharp-lq101r1sx01. >> >> +config DRM_PANEL_HX8369A >> + tristate "HX8369A panel" >> + depends on OF >> + select DRM_MIPI_DSI >> + select VIDEOMODE_HELPERS >> + > > This should be sorted alphabetically. I think it would also be a good > idea to use a HIMAX prefix here, just to reduce the potential for name > clashes. Accepted. > >> diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile >> index 4b2a043..d6768ca 100644 >> --- a/drivers/gpu/drm/panel/Makefile >> +++ b/drivers/gpu/drm/panel/Makefile >> @@ -2,3 +2,4 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o >> obj-$(CONFIG_DRM_PANEL_LD9040) += panel-ld9040.o >> obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o >> obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o >> +obj-$(CONFIG_DRM_PANEL_HX8369A) += panel-hx8369a.o > > Needs to be sorted alphabetically, too. Accepted. > >> diff --git a/drivers/gpu/drm/panel/panel-hx8369a.c b/drivers/gpu/drm/panel/panel-hx8369a.c > [...] >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> + >> +#include