Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932133AbaLJNQu (ORCPT ); Wed, 10 Dec 2014 08:16:50 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:37291 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755542AbaLJNQr (ORCPT ); Wed, 10 Dec 2014 08:16:47 -0500 Date: Wed, 10 Dec 2014 14:16:42 +0100 From: Thierry Reding To: Liu Ying Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, p.zabel@pengutronix.de, shawn.guo@linaro.org, kernel@pengutronix.de, linux@arm.linux.org.uk, mturquette@linaro.org, airlied@linux.ie Subject: Re: [PATCH RFC 09/15] drm: imx: Add MIPI DSI host controller driver Message-ID: <20141210131640.GD23558@ulmo.nvidia.com> References: <1418200648-32656-1-git-send-email-Ying.Liu@freescale.com> <1418200648-32656-10-git-send-email-Ying.Liu@freescale.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OROCMA9jn6tkzFBc" Content-Disposition: inline In-Reply-To: <1418200648-32656-10-git-send-email-Ying.Liu@freescale.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --OROCMA9jn6tkzFBc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 10, 2014 at 04:37:22PM +0800, Liu Ying wrote: > This patch adds i.MX MIPI DSI host controller driver support. > Currently, the driver supports the burst with sync pulses mode only. >=20 > Signed-off-by: Liu Ying > --- > .../devicetree/bindings/drm/imx/mipi_dsi.txt | 81 ++ > drivers/gpu/drm/imx/Kconfig | 6 + > drivers/gpu/drm/imx/Makefile | 1 + > drivers/gpu/drm/imx/imx-mipi-dsi.c | 1017 ++++++++++++++= ++++++ > 4 files changed, 1105 insertions(+) > create mode 100644 Documentation/devicetree/bindings/drm/imx/mipi_dsi.txt > create mode 100644 drivers/gpu/drm/imx/imx-mipi-dsi.c >=20 > diff --git a/Documentation/devicetree/bindings/drm/imx/mipi_dsi.txt b/Doc= umentation/devicetree/bindings/drm/imx/mipi_dsi.txt > new file mode 100644 > index 0000000..3d07fd7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/drm/imx/mipi_dsi.txt > @@ -0,0 +1,81 @@ > +Device-Tree bindings for MIPI DSI host controller > + > +MIPI DSI host controller > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +The MIPI DSI host controller is a Synopsys DesignWare IP. > +It is a digital core that implements all protocol functions defined > +in the MIPI DSI specification, providing an interface between the > +system and the MIPI DPHY, and allowing communication with a MIPI DSI > +compliant display. > + > +Required properties: > + - #address-cells : Should be <1>. > + - #size-cells : Should be <0>. > + - compatible : Should be "fsl,imx6q-mipi-dsi" for i.MX6q/sdl SoCs. > + - reg : Physical base address of the controller and length of memory > + mapped region. > + - interrupts : The controller's interrupt number to the CPU(s). > + - gpr : Should be <&gpr>. > + The phandle points to the iomuxc-gpr region containing the > + multiplexer control register for the controller. Side-note: Shouldn't this really be a pinmux, then? > + - clocks, clock-names : Phandles to the controller pllref, pllref_gate > + and core_cfg clocks, as described in [1] and [2]. > + - panel@0 : A panel node which contains a display-timings child node as > + defined in [3]. There's no need for these to be named panel@*. They could be bridges for example. And no, they shouldn't contain a display-timings child node either. Panels should have a proper driver and the driver being device specific it should have the timings embedded. > + - port@[0-4] : Up to four port nodes with endpoint definitions as defin= ed > + in [4], corresponding to the four inputs to the controller multiplexe= r. > + Note that each port node should contain the input-port property to > + distinguish it from the panel node, as described in [5]. [4] says that you can group all port nodes under a ports parent node. I think this is really what you want to do here to make it clear that the ports aren't part of the DSI host binding part of the device. > diff --git a/drivers/gpu/drm/imx/imx-mipi-dsi.c b/drivers/gpu/drm/imx/imx= -mipi-dsi.c [...] > +/* > + * i.MX drm driver - MIPI DSI Host Controller > + * > + * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. > + * > + * 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 > +#include Don't you want the more generic linux/math64.h here? > +#include > +#include > +#include I don't see any of the functions defined in that header used here. > +#include > +#include > +#include