Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp725458imm; Fri, 21 Sep 2018 07:18:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYomsuMFx1zc4tQm1T2HXadCXWaXJC2PatjOFOIBS2GCueQTQzv+RD6D9tI4Iz6zGtrq8vc X-Received: by 2002:a62:8208:: with SMTP id w8-v6mr46174648pfd.215.1537539525099; Fri, 21 Sep 2018 07:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537539525; cv=none; d=google.com; s=arc-20160816; b=kps292KG7bvZj30nlrUFvv1v7hkStA36OAstfRhN71o9l8GvHned1Ruhtxcfqun7QL NtGQjDr4pFq8CS00VoVyb3WgLoo2OKiiher20cxEv1pw2dTod0iFYxreWBmZoD66UAXl JGI/7XpeTrKwl3Vu4BbNCBsVauJUKuXM7g3nrYHFrCD8wOZXoBjpB3OZzjw6gfAYoZKI +NkXg2ZqCC6wUuO9OHAdJwd5Ip7aQdJ6lFNHrSmvrV194dWBqLMt02qEhGQtKbkqGf+G AyCSk3SKnHBEuOySBheYpqRk1JnAMgnjjE20jpT5aCQjW5cByQqDXcJWxXH07AjIZezD omJg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VW9aBeLCRbTcmuXLmnzuYRvtPX83d23mAj4h6/vFeGs=; b=McHACOd6cjHNobUYtcyizp7yjWITipnbEdT8AjXKNGZ4mozsghsukz8lWzzkQpKGPv nRQ98te9NELi7ix3gdkQUlm9YqC/nLphGRGr/xFuB0a/wyBrPZZSEhCnwe2iqMfCyxuF 4iV17OToWx6k5G0Hue7UyJM4wiUk8yzQzdq+qP/rs/ty4jQPpPeTD4aJDQFNT4NS+d84 8f26UHRpyfVUp2iSy35efT5asgJafRwxXMoQl4suyP4O0crnUGmU/O5nfTB0RcFe7ONP 1PPvTKbtDI/FUzozZF6b0JXTqfMNSmOnvsr/bT6oLfdUlzRcs6eh0j68KeLgxaqhadK0 JSPA== 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 t33-v6si26396429pgm.679.2018.09.21.07.18.28; Fri, 21 Sep 2018 07:18:45 -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 S2389926AbeIUUHX (ORCPT + 99 others); Fri, 21 Sep 2018 16:07:23 -0400 Received: from mail.bootlin.com ([62.4.15.54]:41135 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbeIUUHX (ORCPT ); Fri, 21 Sep 2018 16:07:23 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 2B96F20714; Fri, 21 Sep 2018 16:18:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (AAubervilliers-681-1-42-80.w90-88.abo.wanadoo.fr [90.88.160.80]) by mail.bootlin.com (Postfix) with ESMTPSA id E952B203DA; Fri, 21 Sep 2018 16:18:04 +0200 (CEST) Date: Fri, 21 Sep 2018 16:18:05 +0200 From: Maxime Ripard To: Kishon Vijay Abraham I Cc: Boris Brezillon , Thomas Petazzoni , Laurent Pinchart , linux-media@vger.kernel.org, Archit Taneja , Andrzej Hajda , Chen-Yu Tsai , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Krzysztof Witos , Rafal Ciepiela Subject: Re: [PATCH 02/10] phy: Add configuration interface Message-ID: <20180921141805.s4u224xzmtii66dg@flea> References: <1ed01c1f-76d5-fa96-572b-9bfd269ad11b@ti.com> <20180906145622.kwxvkcuerbeqsj6b@flea> <1a169fad-72b7-fac0-1254-cac5d8304740@ti.com> <20180912084242.skxbwbgluakakyg6@flea> <20180919121436.ztjnxofe66quddeq@flea> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zldsfftxvy2fxfnd" Content-Disposition: inline In-Reply-To: <20180919121436.ztjnxofe66quddeq@flea> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zldsfftxvy2fxfnd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 19, 2018 at 02:14:36PM +0200, Maxime Ripard wrote: > > I'm sorry but I'm not convinced a consumer driver should have all the d= etails > > that are added in phy_configure_opts_mipi_dphy. >=20 > If it can convince you, here is the parameters that are needed by all > the MIPI-DSI drivers currently in Linux to configure their PHY: >=20 > - cdns-dsi (drivers/gpu/drm/bridge/cdns-dsi.c) > - hs_clk_rate > - lanes > - videomode >=20 > - kirin (drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c) > - hs_exit > - hs_prepare > - hs_trail > - hs_zero > - lpx > - ta_get > - ta_go > - wakeup >=20 > - msm (drivers/gpu/drm/msm/dsi/*) > - clk_post > - clk_pre > - clk_prepare > - clk_trail > - clk_zero > - hs_clk_rate > - hs_exit > - hs_prepare > - hs_trail > - hs_zero > - lp_clk_rate > - ta_get > - ta_go > - ta_sure >=20 > - mtk (drivers/gpu/drm/mediatek/mtk_dsi.c) > - hs_clk_rate > - hs_exit > - hs_prepare > - hs_trail > - hs_zero > - lpx >=20 > - sun4i (drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c) > - clk_post > - clk_pre > - clk_prepare > - clk_zero > - hs_prepare > - hs_trail > - lanes > - lp_clk_rate >=20 > - tegra (drivers/gpu/drm/tegra/dsi.c) > - clk_post > - clk_pre > - clk_prepare > - clk_trail > - clk_zero > - hs_exit > - hs_prepare > - hs_trail > - hs_zero > - lpx > - ta_get > - ta_go > - ta_sure >=20 > - vc4 (drivers/gpu/drm/vc4/vc4_dsi.c) > - hs_clk_rate > - lanes >=20 > Now, for MIPI-CSI receivers: >=20 > - marvell-ccic (drivers/media/platform/marvell-ccic/mcam-core.c) > - clk_term_en > - clk_settle > - d_term_en > - hs_settle > - lp_clk_rate >=20 > - omap4iss (drivers/staging/media/omap4iss/iss_csiphy.c) > - clk_miss > - clk_settle > - clk_term > - hs_settle > - hs_term > - lanes >=20 > - rcar-vin (drivers/media/platform/rcar-vin/rcar-csi2.c) > - hs_clk_rate > - lanes >=20 > - ti-vpe (drivers/media/platform/ti-vpe/cal.c) > - clk_term_en > - d_term_en > - hs_settle > - hs_term >=20 > So the timings expressed in the structure are the set of all the ones > currently used in the tree by DSI and CSI drivers. I would consider > that a good proof that it would be useful. >=20 > Note that at least cdns-dsi, exynos4-is > (drivers/media/platform/exynos4-is/mipi-csis.c), kirin, sun4i, msm, > mtk, omap4iss, plus the v4l2 drivers cdns-csi2tx and cdns-csi2rx I > want to convert, have already either a driver for their DPHY using the > phy framework plus a configuration function, or a design very similar > that could be migrated to such an API. There's also a patch set currently being submitted that uses a phy driver + custom functions: https://lore.kernel.org/patchwork/cover/988959/ Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --zldsfftxvy2fxfnd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAluk/ZwACgkQ0rTAlCFN r3QPsA//TW4vFjvM51035KuuVaJi4y5Tu7v4ock6POiSrP6k1buND4KfJXXU+iSj Z+OWrLSK0iDFtFLeZ2oN6dFucpHZdaHvZH+KWrrXkKj0zZVPS8eBuKnmQZOqEn8J DPvsEK2ckfcmtSYidr10APVWc2WbfUAgLBj0ZcGtGt/zELiQeW5cc9DRq5g5F12n HuVLrIi1/1GvzZYCI+oqQLga7D/7KTZ5ssD+zzQ2V4fA1p26ijQaNoIzRW05VB5v MHnJyoEwBr/HNO/zsVd9iihRv6S+/muQpXB2hBC/rDb1mPMbwN/U8M+Gc+9/fhN1 tsQlN6rBlhlpmJA5maaLvcoyvNjU4qTSp/dPtXhn6Xr4ajJQGQRasEuZo22eeC5I tZQoJaWABsBTz37NZOxpww0NkaDa7RmRg0iyhgGqmwSfj2AeTS/u7/vg2m0kbWpX 9c5bxE5WbuzqQlgvEAWJ/r++Ajl3d7OWT2TJCc7659OO6ozQQk5i+z4Q9MLSdhKj W0MacoUy3GbgmRv3Xg/kMa1aDUPiEhTr2odTZF2xsCrlHNRiCHJHXaFdsm4UOqik 5Qn9OXSORVS92xepO+XalE5KAy0N2ERgd0F7DXaou6BR04D0HWrcFEOxvuixFPwi FaSqIJ8ZifBWamfb5fhnMbIDxacQcTUAcQsYxiC6XkXG0A2cIqQ= =76Ph -----END PGP SIGNATURE----- --zldsfftxvy2fxfnd--