Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1914524ybl; Thu, 29 Aug 2019 00:24:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkW7DK4ZlpNBHP3sBzX07zx3R07U+szNLajb19n0bV1p+IUja3dbtOq7V+SuAhJuaScJQq X-Received: by 2002:a17:90a:6d43:: with SMTP id z61mr8468579pjj.32.1567063450103; Thu, 29 Aug 2019 00:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567063450; cv=none; d=google.com; s=arc-20160816; b=GelUzK7IjdJ0ifo5oKLUcqcc4XjY4ykFqnlFgkgpQ4TOSrwfDuJoJ/cnA0r6rDJ+YO e4TIRGYBE4tk4xHq/VAubiv/JLr98ZMbriuUaG99KTbt4vOL03zWVUHIpApIPYl8co2N N1BAEtoEvRR4yAXo4T45tovJaGRHLvvJpPfHKxlEGekaW02S40mncUJLnrlri/B2h8Vy D4hOMARJnOKZeoKKF0cyN1WZE5xM/4rs6gmIduuF55Whbn5j2z8Em7n5kekRiAsxSvTS Iw8JdSp9KkcXOWxIlELelhK/9scC5YUsnukOl8CpKYZayZr1gGVfOKx4B97XpbpbQUah wd/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=+ZrW2Njz7RS76MkglgwPIkJgZskRHJ8Ry1K+4qvQsEI=; b=xoXJ4Rh/RnlWGFLnc+AC7w3NdawXEcPD1BUi3Lx3AbEZqeIs15B+O7m8kjLM3ZJ/Ro 66624KmSb7bwH5EaZT9gEBu2/vHgYLfB/01+Jne6yMYrkftz9F/dVneF58+f3YWI+wMI rm071/pT837VyeEVC8M+y8MRKG8ucG8tMpAUaDqfiLgOwbLOyPbb8eDvCLv5YMNeFnvm SSETz495av3VnIIYoK0ZU3ZsNFNQ73nWhTEcRkwuh8yjjYA7ulLkxJ/KJzSuIi98+Bq3 dK3UMftFkKGxkNDGyrJbDz4v/JFP7HP2jtSNfoPwWNN01zj1zPR0aXDtN4ZrKvT7j/Ge s/yQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j23si1413930pjn.19.2019.08.29.00.23.54; Thu, 29 Aug 2019 00:24:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727787AbfH2HXB (ORCPT + 99 others); Thu, 29 Aug 2019 03:23:01 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:58356 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfH2HXA (ORCPT ); Thu, 29 Aug 2019 03:23:00 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 787F0FB03; Thu, 29 Aug 2019 09:22:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KtmbkXjx-TTe; Thu, 29 Aug 2019 09:22:54 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 9278742EEE; Thu, 29 Aug 2019 09:22:53 +0200 (CEST) Date: Thu, 29 Aug 2019 09:22:53 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Robert Chiras Cc: dl-linux-imx , "narmstrong@baylibre.com" , "robh+dt@kernel.org" , "linux-kernel@vger.kernel.org" , "lee.jones@linaro.org" , "devicetree@vger.kernel.org" , "festevam@gmail.com" , "jernej.skrabec@siol.net" , "daniel@ffwll.ch" , "mark.rutland@arm.com" , "a.hajda@samsung.com" , "dri-devel@lists.freedesktop.org" , "jonas@kwiboo.se" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "sam@ravnborg.org" , "airlied@linux.ie" , "Laurent.pinchart@ideasonboard.com" , "kernel@pengutronix.de" , "arnd@arndb.de" , "s.hauer@pengutronix.de" Subject: Re: [EXT] [PATCH v3 0/2] drm: bridge: Add NWL MIPI DSI host controller support Message-ID: <20190829072253.GA5078@bogon.m.sigxcpu.org> References: <1567002587.3209.122.camel@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1567002587.3209.122.camel@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Aug 28, 2019 at 02:29:48PM +0000, Robert Chiras wrote: > Hi Guido, > > I tested this on my setup and it works. My DSI panel is a little bit > different and it doesn't work with this as-is, but I added some > improvements on top of this, in order to be able to setup the clocks. > The changes I made can arrive on top of this as improvements, of > course, since it will allow this driver to dinamically set the > video_pll clock for any kind of mode. > > So, for the whole patch-set, you can add: > Tested-by: Robert Chiras > Signed-off-by: Robert Chiras Added for v4, thanks! -- Guido > > Best regards, > Robert > > On Jo, 2019-08-22 at 12:44 +0200, Guido G?nther wrote: > > This adds initial support for the NWL MIPI DSI Host controller found > > on i.MX8 > > SoCs. > > > > It adds support for the i.MX8MQ but the same IP core can also be > > found on e.g. > > i.MX8QXP. I added the necessary hooks to support other imx8 variants > > but since > > I only have imx8mq boards to test I omitted the platform data for > > other SoCs. > > > > The code is based on NXPs BSP so I added Robert Chiras as > > Co-authored-by. Robert, if this looks sane could you add your > > Signed-off-by:? > > > > The most notable changes over the BSP driver are > > ?- Calculate HS mode timing from phy_configure_opts_mipi_dphy > > ?- Perform all clock setup via DT > > ?- Merge nwl-imx and nwl drivers > > ?- Add B0 silion revision quirk > > ?- become a bridge driver to hook into mxsfb (from what I read[0] > > DCSS, which > > ???also can drive the nwl on the imx8mq will likely not become part > > of > > ???imx-display-subsystem so it makes sense to make it drive a bridge > > for dsi as > > ???well). > > ?- Use panel_bridge to attach the panel > > ?- Use multiplex framework instead of accessing syscon directly > > > > This has been tested on a Librem 5 devkit using mxsfb with Robert's > > patches[1] > > and the rocktech-jh057n00900 panel driver on next-20190821. The DCSS > > can later > > on also act as input source too. > > > > Changes from v2: > > - Per review comments by Rob Herring > > ? https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fl > > ists.freedesktop.org%2Farchives%2Fdri-devel%2F2019- > > August%2F230448.html&data=02%7C01%7Crobert.chiras%40nxp.com%7C757 > > 201f9aaa54653580e08d726edb290%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0% > > 7C0%7C637020674654566414&sdata=JdvAdCPGq2CTsW%2BgXgnAVltWMIfdCDQn > > dXSLYpnjEH8%3D&reserved=0 > > ? - bindings: > > ????- Simplify by restricting to fsl,imx8mq-nwl-dsi > > ????- document reset lines > > ????- add port@{0,1} > > ????- use a real compatible string for the panel > > ????- resets are required > > - Per review comments by Arnd Bergmann > > ? https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fl > > ists.freedesktop.org%2Farchives%2Fdri-devel%2F2019- > > August%2F230868.html&data=02%7C01%7Crobert.chiras%40nxp.com%7C757 > > 201f9aaa54653580e08d726edb290%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0% > > 7C0%7C637020674654566414&sdata=LyJpZjQjMCe5zUdvK8CD8ETucLPxx621gW > > xtpAr8DM4%3D&reserved=0 > > ? - Don't access iomuxc_gpr regs directly. This allows us to drop the > > ????first patch in the series with the iomuxc_gpr field defines. > > - Per review comments by Laurent Pinchart > > ????- Fix wording in bindings > > - Add mux-controls to bindings > > - Don't print error message on dphy probe deferal > > > > Changes from v1: > > - Per review comments by Sam Ravnborg > > ? https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fl > > ists.freedesktop.org%2Farchives%2Fdri-devel%2F2019- > > July%2F228130.html&data=02%7C01%7Crobert.chiras%40nxp.com%7C75720 > > 1f9aaa54653580e08d726edb290%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C > > 0%7C637020674654566414&sdata=AU2gzIwrbCdIBZenPWWYYX%2BgdX53zc2%2B > > SQhZbuN%2FWpU%3D&reserved=0 > > ? - Change binding docs to YAML > > ? - build: Don't always visit imx-nwl/ > > ? - build: Add header-test-y > > ? - Sort headers according to DRM convention > > ? - Use drm_display_mode instead of videmode > > - Per review comments by Fabio Estevam > > ? https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fl > > ists.freedesktop.org%2Farchives%2Fdri-devel%2F2019- > > July%2F228299.html&data=02%7C01%7Crobert.chiras%40nxp.com%7C75720 > > 1f9aaa54653580e08d726edb290%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C > > 0%7C637020674654566414&sdata=6kpIZ6iNAQ13fMXU6sqENLwy%2FdIWL6ef8j > > gyas7I0CQ%3D&reserved=0 > > ? - Don't restrict build to ARCH_MXC > > ? - Drop unused includes > > ? - Drop unreachable code in imx_nwl_dsi_bridge_mode_fixup() > > ? - Drop remaining calls of dev_err() and use DRM_DEV_ERR() > > ????consistently. > > ? - Use devm_platform_ioremap_resource() > > ? - Drop devm_free_irq() in probe() error path > > ? - Use single line comments where sufficient > > ? - Use instead of defining USEC_PER_SEC > > ? - Make input source select imx8 specific > > ? - Drop inclusion (after removal of > > get_unaligned_le32) > > ? - Drop all EXPORT_SYMBOL_GPL() for functions used in the same > > module > > ????but different source files. > > ? - Drop nwl_dsi_enable_{rx,tx}_clock() by invoking > > clk_prepare_enable() > > ????directly > > ? - Remove pointless comment > > - Laurent Pinchart > > ? https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fl > > ists.freedesktop.org%2Farchives%2Fdri-devel%2F2019- > > July%2F228313.html&data=02%7C01%7Crobert.chiras%40nxp.com%7C75720 > > 1f9aaa54653580e08d726edb290%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C > > 0%7C637020674654566414&sdata=tDlVGeET1CPMH9W%2FqmnePNR51vNaTKD%2F > > iFOoR9%2FmESc%3D&reserved=0 > > ? https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fl > > ists.freedesktop.org%2Farchives%2Fdri-devel%2F2019- > > July%2F228308.html&data=02%7C01%7Crobert.chiras%40nxp.com%7C75720 > > 1f9aaa54653580e08d726edb290%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C > > 0%7C637020674654566414&sdata=NsLGAL8%2BcOC0ZZxxeoGe7VxQCgqSBEN4G3 > > WVGOeZpCo%3D&reserved=0 > > ? - Drop (on iMX8MQ) unused csr regmap > > ? - Use NWL_MAX_PLATFORM_CLOCKS everywhere > > ? - Drop get_unaligned_le32() usage > > ? - remove duplicate 'for the' in binding docs > > ? - Don't include unused > > ? - Don't include unused > > ? - Drop dpms_mode for tracking state, trust the drm layer on that > > ? - Use pm_runtime_put() instead of pm_runtime_put_sync() > > ? - Don't overwrite encoder type > > ? - Make imx_nwl_platform_data const > > ? - Use the reset controller API instead of open coding that platform > > specific > > ????part > > ? - Use intead of making up our own defines > > ? - name mipi_dsi_transfer less generic: nwl_dsi_transfer > > ? - ensure clean in .remove by calling mipi_dsi_host_unregister. > > ? - prefix constants by NWL_DSI_ > > ? - properly format transfer_direction enum > > ? - simplify platform clock handling > > ? - Don't modify state in mode_fixup() and use mode_set() instead > > ? - Drop bridge detach(), already handle by nwl_dsi_host_detach() > > ? - Drop USE_*_QUIRK() macros > > - Drop (for now) unused clock defnitions. 'pixel' and 'bypass' clock > > will be > > ? used for i.MX8 SoCs but since they're unused atm drop the > > definitions - but > > ? keep the logic to enable/disable several clocks in place since we > > know we'll > > ? need it in the future. > > > > Changes from v0: > > - Add quirk for IMQ8MQ silicon B0 revision to not mess with the > > ? system reset controller on power down since enable() won't work > > ? otherwise. > > - Drop devm_free_irq() handled by the device driver core > > - Disable tx esc clock after the phy power down to unbreak > > ? disable/enable (unblank/blank) > > - Add ports to dt binding docs > > - Select GENERIC_PHY_MIPI_DPHY instead of GENERIC_PHY for > > ? phy_mipi_dphy_get_default_config > > - Select DRM_MIPI_DSI > > - Include drm_print.h to fix build on next-20190408 > > - Drop some debugging messages > > - Newline terminate all DRM_ printouts > > - Turn component driver into a drm bridge > > > > [0]: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F% > > 2Flists.freedesktop.org%2Farchives%2Fdri-devel%2F2019- > > May%2F219484.html&data=02%7C01%7Crobert.chiras%40nxp.com%7C757201 > > f9aaa54653580e08d726edb290%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0 > > %7C637020674654566414&sdata=4IVjhLy3a2XxZ4jYwDFD23D%2BvwAVAEj44hY > > fvvp8OpQ%3D&reserved=0 > > [1]: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F% > > 2Fpatchwork.freedesktop.org%2Fseries%2F62822%2F&data=02%7C01%7Cro > > bert.chiras%40nxp.com%7C757201f9aaa54653580e08d726edb290%7C686ea1d3bc > > 2b4c6fa92cd99c5c301635%7C0%7C0%7C637020674654566414&sdata=GueUBOc > > baGjWtWcMYBplL6ki2UbgaFPkQHg%2F6eReiYg%3D&reserved=0 > > > > To: David Airlie , Daniel Vetter , > > Rob Herring , Mark Rutland > > , Shawn Guo , Sascha Hauer > de>, Pengutronix Kernel Team , Fabio Estevam < > > festevam@gmail.com>, NXP Linux Team , Andrzej > > Hajda , Neil Armstrong > > , Laurent Pinchart , Jonas Karlman > > , Jernej Skrabec , Lee > > Jones , Guido G?nther , dri-de > > vel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kern > > el@lists.infradead.org, linux-kernel@vger.kernel.org, Robert Chiras < > > robert.chiras@nxp.com>, Sam Ravnborg , Fabio > > Estevam , Arnd Bergmann > > > > > > Guido G?nther (2): > > ? dt-bindings: display/bridge: Add binding for NWL mipi dsi host > > ????controller > > ? drm/bridge: Add NWL MIPI DSI host controller support > > > > ?.../bindings/display/bridge/nwl-dsi.yaml??????| 155 ++++ > > ?drivers/gpu/drm/bridge/Kconfig????????????????|???2 + > > ?drivers/gpu/drm/bridge/Makefile???????????????|???1 + > > ?drivers/gpu/drm/bridge/nwl-dsi/Kconfig????????|??16 + > > ?drivers/gpu/drm/bridge/nwl-dsi/Makefile???????|???4 + > > ?drivers/gpu/drm/bridge/nwl-dsi/nwl-drv.c??????| 501 +++++++++++++ > > ?drivers/gpu/drm/bridge/nwl-dsi/nwl-drv.h??????|??65 ++ > > ?drivers/gpu/drm/bridge/nwl-dsi/nwl-dsi.c??????| 700 > > ++++++++++++++++++ > > ?drivers/gpu/drm/bridge/nwl-dsi/nwl-dsi.h??????| 112 +++ > > ?9 files changed, 1556 insertions(+) > > ?create mode 100644 > > Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml > > ?create mode 100644 drivers/gpu/drm/bridge/nwl-dsi/Kconfig > > ?create mode 100644 drivers/gpu/drm/bridge/nwl-dsi/Makefile > > ?create mode 100644 drivers/gpu/drm/bridge/nwl-dsi/nwl-drv.c > > ?create mode 100644 drivers/gpu/drm/bridge/nwl-dsi/nwl-drv.h > > ?create mode 100644 drivers/gpu/drm/bridge/nwl-dsi/nwl-dsi.c > > ?create mode 100644 drivers/gpu/drm/bridge/nwl-dsi/nwl-dsi.h > > > > -- > > 2.20.1 > >