From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner Subject: Re: [PATCH 2/3] drm/rockchip: add ability to handle external dphys in mipi-dsi Date: Thu, 07 Nov 2019 20:10:57 +0100 Message-ID: <1772103.UzfIEELiUT@phil> References: <20191106112650.8365-1-heiko.stuebner@theobroma-systems.com> <20191106112650.8365-2-heiko.stuebner@theobroma-systems.com> <20191106130557.GF4878@pendragon.ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <20191106130557.GF4878@pendragon.ideasonboard.com> Sender: linux-kernel-owner@vger.kernel.org To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, a.hajda@samsung.com, hjc@rock-chips.com, robh+dt@kernel.org, mark.rutland@arm.com, narmstrong@baylibre.com, jonas@kwiboo.se, jernej.skrabec@siol.net, philippe.cornu@st.com, yannick.fertre@st.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, christoph.muellner@theobroma-systems.com List-Id: linux-rockchip.vger.kernel.org Hi Laurent, Am Mittwoch, 6. November 2019, 14:05:57 CET schrieb Laurent Pinchart: > On Wed, Nov 06, 2019 at 12:26:49PM +0100, Heiko Stuebner wrote: > > While the common case is that the dsi controller uses an internal dphy, > > accessed through the phy registers inside the dsi controller, there is > > also the possibility to use a separate dphy from a different vendor. > > > > One such case is the Rockchip px30 that uses a Innosilicon Mipi dphy, > > so add the support for handling such a constellation, including the pll > > also getting generated inside that external phy. > > > > Signed-off-by: Heiko Stuebner > > --- > > .../display/rockchip/dw_mipi_dsi_rockchip.txt | 7 ++- > > .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 54 ++++++++++++++++++- > > 2 files changed, 57 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt > > index ce4c1fc9116c..8b25156a9dcf 100644 > > --- a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt > > +++ b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt > > @@ -8,8 +8,9 @@ Required properties: > > "rockchip,rk3399-mipi-dsi", "snps,dw-mipi-dsi". > > - reg: Represent the physical address range of the controller. > > - interrupts: Represent the controller's interrupt to the CPU(s). > > -- clocks, clock-names: Phandles to the controller's pll reference > > - clock(ref) and APB clock(pclk). For RK3399, a phy config clock > > +- clocks, clock-names: Phandles to the controller's and APB clock(pclk) > > + and either a pll reference clock(ref) (internal dphy) or pll clock(pll) > > + (when connected to an external phy). For RK3399, a phy config clock > > Why does external PHY clock need to be specified here ? Shouldn't it be > handled by the PHY instead ? You're completely right and it seems I didn't "see the forest for the trees", as there actually exists the phy_configure_* structs to transfer parameters to an external phy in a correct way. I'll revise my approach (and the phy driver) accordingly. Thanks for the push in the right direction :-) Heiko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92971C5DF60 for ; Thu, 7 Nov 2019 19:11:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B1E02084D for ; Thu, 7 Nov 2019 19:11:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FpBBgsKN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B1E02084D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QrqJZZBLb4kt9c6/jWWyZrrOG3rUaNnhQm+GDZNuD2A=; b=FpBBgsKNlsuzcl QtB84qENoZhUKklJYJbQAsBNkwz2ykUXHTP7/EYxUf+dhJ49934SQ32XPrgHNUsUiwjU/rljBBg2U cWCx2MOoQ9HZqRDYBuDaVvsgacCvJGrPPDq0yPmYrd6KVLOIRbUrFbm/EuV9RC/cPMml6VMWOZxNF 2bVLpoO/m1RMJ10qPoaK0bmkOSjZwG2ilLO63NDtWFDlDrMzRnEjlVloKJal34BdF4biw+87c7x2d 9z1UlyHfxKaUXztwAo4Wh/dS4geNL8XQ4FDYjYY6G/0ZZ/R3vgn/D7WuauLrwd/+2B2Wa6DtDEI2B P2E0cUn2ZPSx8Px3PErA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSnBd-0005m6-Ot; Thu, 07 Nov 2019 19:11:17 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSnBb-0005kt-79; Thu, 07 Nov 2019 19:11:16 +0000 Received: from ip5f5a6266.dynamic.kabel-deutschland.de ([95.90.98.102] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSnBK-0004qp-Rm; Thu, 07 Nov 2019 20:10:58 +0100 From: Heiko Stuebner To: Laurent Pinchart Subject: Re: [PATCH 2/3] drm/rockchip: add ability to handle external dphys in mipi-dsi Date: Thu, 07 Nov 2019 20:10:57 +0100 Message-ID: <1772103.UzfIEELiUT@phil> In-Reply-To: <20191106130557.GF4878@pendragon.ideasonboard.com> References: <20191106112650.8365-1-heiko.stuebner@theobroma-systems.com> <20191106112650.8365-2-heiko.stuebner@theobroma-systems.com> <20191106130557.GF4878@pendragon.ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191107_111115_408777_7A719D55 X-CRM114-Status: GOOD ( 18.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, jernej.skrabec@siol.net, narmstrong@baylibre.com, linux-kernel@vger.kernel.org, jonas@kwiboo.se, hjc@rock-chips.com, dri-devel@lists.freedesktop.org, philippe.cornu@st.com, yannick.fertre@st.com, a.hajda@samsung.com, robh+dt@kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, christoph.muellner@theobroma-systems.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Laurent, Am Mittwoch, 6. November 2019, 14:05:57 CET schrieb Laurent Pinchart: > On Wed, Nov 06, 2019 at 12:26:49PM +0100, Heiko Stuebner wrote: > > While the common case is that the dsi controller uses an internal dphy, > > accessed through the phy registers inside the dsi controller, there is > > also the possibility to use a separate dphy from a different vendor. > > > > One such case is the Rockchip px30 that uses a Innosilicon Mipi dphy, > > so add the support for handling such a constellation, including the pll > > also getting generated inside that external phy. > > > > Signed-off-by: Heiko Stuebner > > --- > > .../display/rockchip/dw_mipi_dsi_rockchip.txt | 7 ++- > > .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 54 ++++++++++++++++++- > > 2 files changed, 57 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt > > index ce4c1fc9116c..8b25156a9dcf 100644 > > --- a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt > > +++ b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt > > @@ -8,8 +8,9 @@ Required properties: > > "rockchip,rk3399-mipi-dsi", "snps,dw-mipi-dsi". > > - reg: Represent the physical address range of the controller. > > - interrupts: Represent the controller's interrupt to the CPU(s). > > -- clocks, clock-names: Phandles to the controller's pll reference > > - clock(ref) and APB clock(pclk). For RK3399, a phy config clock > > +- clocks, clock-names: Phandles to the controller's and APB clock(pclk) > > + and either a pll reference clock(ref) (internal dphy) or pll clock(pll) > > + (when connected to an external phy). For RK3399, a phy config clock > > Why does external PHY clock need to be specified here ? Shouldn't it be > handled by the PHY instead ? You're completely right and it seems I didn't "see the forest for the trees", as there actually exists the phy_configure_* structs to transfer parameters to an external phy in a correct way. I'll revise my approach (and the phy driver) accordingly. Thanks for the push in the right direction :-) Heiko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 979F1C5DF60 for ; Fri, 8 Nov 2019 08:13:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 756C721D7B for ; Fri, 8 Nov 2019 08:13:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 756C721D7B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E31416F868; Fri, 8 Nov 2019 08:12:33 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D8196E0C1 for ; Thu, 7 Nov 2019 19:11:04 +0000 (UTC) Received: from ip5f5a6266.dynamic.kabel-deutschland.de ([95.90.98.102] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSnBK-0004qp-Rm; Thu, 07 Nov 2019 20:10:58 +0100 From: Heiko Stuebner To: Laurent Pinchart Subject: Re: [PATCH 2/3] drm/rockchip: add ability to handle external dphys in mipi-dsi Date: Thu, 07 Nov 2019 20:10:57 +0100 Message-ID: <1772103.UzfIEELiUT@phil> In-Reply-To: <20191106130557.GF4878@pendragon.ideasonboard.com> References: <20191106112650.8365-1-heiko.stuebner@theobroma-systems.com> <20191106112650.8365-2-heiko.stuebner@theobroma-systems.com> <20191106130557.GF4878@pendragon.ideasonboard.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 08 Nov 2019 08:12:31 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, jernej.skrabec@siol.net, narmstrong@baylibre.com, linux-kernel@vger.kernel.org, jonas@kwiboo.se, dri-devel@lists.freedesktop.org, philippe.cornu@st.com, yannick.fertre@st.com, robh+dt@kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, christoph.muellner@theobroma-systems.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Message-ID: <20191107191057.YylU5oKtqLcO86MBOejg-QEeZDh-FmFd0_i9dgQ8UF8@z> SGkgTGF1cmVudCwKCkFtIE1pdHR3b2NoLCA2LiBOb3ZlbWJlciAyMDE5LCAxNDowNTo1NyBDRVQg c2NocmllYiBMYXVyZW50IFBpbmNoYXJ0Ogo+IE9uIFdlZCwgTm92IDA2LCAyMDE5IGF0IDEyOjI2 OjQ5UE0gKzAxMDAsIEhlaWtvIFN0dWVibmVyIHdyb3RlOgo+ID4gV2hpbGUgdGhlIGNvbW1vbiBj YXNlIGlzIHRoYXQgdGhlIGRzaSBjb250cm9sbGVyIHVzZXMgYW4gaW50ZXJuYWwgZHBoeSwKPiA+ IGFjY2Vzc2VkIHRocm91Z2ggdGhlIHBoeSByZWdpc3RlcnMgaW5zaWRlIHRoZSBkc2kgY29udHJv bGxlciwgdGhlcmUgaX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