From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 1/2] drm/panel: Add Raydium RM67191 DSI Panel Date: Thu, 26 Apr 2018 16:54:40 +0200 Message-ID: <20180426145440.GD31888@ulmo> References: <1522751401-3381-1-git-send-email-robert.chiras@nxp.com> <1522751401-3381-2-git-send-email-robert.chiras@nxp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0698156946==" Return-path: Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 780126E70E for ; Thu, 26 Apr 2018 14:54:44 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id t11so6631667wmt.0 for ; Thu, 26 Apr 2018 07:54:44 -0700 (PDT) In-Reply-To: <1522751401-3381-2-git-send-email-robert.chiras@nxp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Robert Chiras Cc: linux-imx@nxp.com, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0698156946== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q0rSlbzrZN6k9QnT" Content-Disposition: inline --Q0rSlbzrZN6k9QnT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 03, 2018 at 01:30:00PM +0300, Robert Chiras wrote: > Add support for the OLED display based on MIPI-DSI protocol from Raydium: > RM67191. >=20 > Signed-off-by: Robert Chiras > --- > .../bindings/display/panel/raydium,rm67191.txt | 55 ++ > drivers/gpu/drm/panel/Kconfig | 9 + > drivers/gpu/drm/panel/Makefile | 1 + > drivers/gpu/drm/panel/panel-raydium-rm67191.c | 645 +++++++++++++++= ++++++ > 4 files changed, 710 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/panel/raydi= um,rm67191.txt > create mode 100644 drivers/gpu/drm/panel/panel-raydium-rm67191.c >=20 > diff --git a/Documentation/devicetree/bindings/display/panel/raydium,rm67= 191.txt b/Documentation/devicetree/bindings/display/panel/raydium,rm67191.t= xt > new file mode 100644 > index 0000000..18a57de > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt > @@ -0,0 +1,55 @@ > +Raydium RM67171 OLED LCD panel with MIPI-DSI protocol > + > +Required properties: > +- compatible: "raydium,rm67191" > +- reg: virtual channel for MIPI-DSI protocol > + must be <0> > +- dsi-lanes: number of DSI lanes to be used > + must be <3> or <4> > +- port: input port node with endpoint definition as > + defined in Documentation/devicetree/bindings/graph.txt; > + the input port should be connected to a MIPI-DSI device > + driver > + > +Optional properties: > +- reset-gpio: a GPIO spec for the RST_B GPIO pin > +- display-timings: timings for the connected panel according to [1] > +- pinctrl-0 phandle to the pin settings for the reset pin > +- panel-width-mm: physical panel width [mm] > +- panel-height-mm: physical panel height [mm] > + > +[1]: Documentation/devicetree/bindings/display/display-timing.txt > + > +Example: > + > + panel@0 { > + compatible =3D "raydium,rm67191"; > + reg =3D <0>; > + pinctrl-0 =3D <&pinctrl_mipi_dsi_0_1_en>; > + reset-gpio =3D <&gpio1 7 GPIO_ACTIVE_HIGH>; > + dsi-lanes =3D <4>; > + panel-width-mm =3D <68>; > + panel-height-mm =3D <121>; > + display-timings { > + timing { > + clock-frequency =3D <132000000>; > + hactive =3D <1080>; > + vactive =3D <1920>; > + hback-porch =3D <11>; > + hfront-porch =3D <4>; > + vback-porch =3D <48>; > + vfront-porch =3D <20>; > + hsync-len =3D <5>; > + vsync-len =3D <12>; > + hsync-active =3D <0>; > + vsync-active =3D <0>; > + de-active =3D <0>; > + pixelclk-active =3D <0>; > + }; > + }; This shouldn't be necessary. You already have the timings in your driver, why the extra work of getting it from DT? > + port { > + panel1_in: endpoint { > + remote-endpoint =3D <&mipi1_out>; > + }; > + }; > + }; Please split device tree bindings patches off into a separate patch and make sure you Cc the devicetree@vger.kernel.org mailing list so that they can be reviewed by the respective maintainers. Also make sure that you put maintainers on To: or at least Cc: so that they have a better chance of seeing your patch and don't have to go find them. > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index 6ba4031..769cba7 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -158,4 +158,13 @@ config DRM_PANEL_SITRONIX_ST7789V > Say Y here if you want to enable support for the Sitronix > ST7789V controller for 240x320 LCD panels > =20 > +config DRM_PANEL_RAYDIUM_RM67191 > + tristate "Raydium RM67191 FHD panel" > + depends on OF > + depends on DRM_MIPI_DSI > + depends on BACKLIGHT_CLASS_DEVICE > + help > + Say Y here if you want to enable support for Raydium RM67191 FHD > + (1080x1920) DSI panel. > + These should be sorted alphabetically. > endmenu > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makef= ile > index 6d251eb..838d5c6 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -16,3 +16,4 @@ obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) +=3D panel-seiko-= 43wvf1g.o > obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) +=3D panel-sharp-lq101r1sx01.o > obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) +=3D panel-sharp-ls043t1le01.o > obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) +=3D panel-sitronix-st7789v.o > +obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) +=3D panel-raydium-rm67191.o Same here. > diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c b/drivers/gpu/= drm/panel/panel-raydium-rm67191.c > new file mode 100644 > index 0000000..07b0bd4 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c > @@ -0,0 +1,645 @@ > +/* > + * i.MX drm driver - Raydium MIPI-DSI panel driver > + * > + * Copyright (C) 2017 NXP > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version 2 > + * of the License, or (at your option) any later version. > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include