Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1742692pxb; Sun, 10 Jan 2021 09:05:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyW0J+J+hJifouOfH5jUcc64RpabSqveXgLpHIx9kbOxCPi3HYqLqrLRkvPXMRxkwqVnhl5 X-Received: by 2002:a17:906:2f8b:: with SMTP id w11mr8100685eji.246.1610298324336; Sun, 10 Jan 2021 09:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610298324; cv=none; d=google.com; s=arc-20160816; b=fOFcLB2U6d/lM1tFEU7YwnMc7TDkZHTLQ8pm1/RJze06nZzoJJRj161FO7+lmbZ5V6 yeyES02cotbya1/TqF7Loes+HHA4l7f9y6gXbOzTlc7QNYYblJ+q0c0+g+t3odg9G0NK 7ag+hxgev1e0gEyg8J+ifdB+wuBefLxcRRcK9H0WCClBwZnUj32K4mZ4FTsmjdawVY/m d5CE9LXc7b+VsQ4EdPTUheQU8/tzp/hk0Y0AXl9D17BRICBXYJMP87IuGuwLZMW4DQhE FxWqMVz1u8pa2UNUwo9EohmDeuW6NLRUToW02EhqiLeUk8t0dwj1OT5Z0h/hzDPOXIVr WOsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+Sf+1FcC2jxL/to+QXloptno7REDZ4BSKw8xPJ+u5kk=; b=WzlFksX44hy8L9+xbo3utJqnkz/Aq6JBKNOuwNAj4EKvNdheVSKjMHKj6rkssIHaZR 6ErJFv+xou+YvGKrbatKn6OdyxnKKQlvZKBYA224eS8okEctpkAzFW0uEpFG06TSMrbK BqROi/WudTfLdP0nf4zaszFt/n2shlnyJwj9HcawYkujNk45MyjuaHnbU0PU1D8OPTtg 6ZqCgAHQwr93hOBRstrDPEnkwzAzglV9ov+Hvk25TfuLSG1lEnPTgc3U8CJx9S6bImeO +3WzTHD6ktHp+iebzty2sw8CrSEs3ZgiEo+XaPQ5wWBIOvCk747bLKP1+VSEMOKHQ00Y 5R1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si6077220edr.313.2021.01.10.09.04.58; Sun, 10 Jan 2021 09:05:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbhAJREF (ORCPT + 99 others); Sun, 10 Jan 2021 12:04:05 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:35500 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbhAJREF (ORCPT ); Sun, 10 Jan 2021 12:04:05 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 19E31FB03; Sun, 10 Jan 2021 18:03:23 +0100 (CET) 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 j46i6NiFsSWV; Sun, 10 Jan 2021 18:03:22 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id A9B3A40885; Sun, 10 Jan 2021 18:03:21 +0100 (CET) Date: Sun, 10 Jan 2021 18:03:21 +0100 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Shawn Guo Cc: Rob Herring , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Peng Fan , Dong Aisheng , Anson Huang , Krzysztof Kozlowski , Shengjiu Wang , Philipp Zabel , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: dts: imx8mq: Add clock parents for mipi dphy Message-ID: <20210110170321.GA30072@bogon.m.sigxcpu.org> References: <20210110124629.GO28365@dragon> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210110124629.GO28365@dragon> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Jan 10, 2021 at 08:46:29PM +0800, Shawn Guo wrote: > On Fri, Dec 18, 2020 at 06:50:05PM +0100, Guido G?nther wrote: > > This makes sure the clock tree setup for the dphy is not dependent on > > other components. > > > > Without this change bringing up the display can fail like > > > > kernel: phy phy-30a00300.dphy.2: Invalid CM/CN/CO values: 165/217/1 > > kernel: phy phy-30a00300.dphy.2: for hs_clk/ref_clk=451656000/593999998 ~ 165/217 > > > > if LCDIF doesn't set up that part of the clock tree first. This was > > noticed when testing the Librem 5 devkit with defconfig. It doesn't > > happen when modules are built in. > > > > Signed-off-by: Guido G?nther > > --- > > arch/arm64/boot/dts/freescale/imx8mq.dtsi | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi > > index a841a023e8e0..ca0847e8f13c 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi > > @@ -1016,9 +1016,14 @@ dphy: dphy@30a00300 { > > reg = <0x30a00300 0x100>; > > clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; > > clock-names = "phy_ref"; > > - assigned-clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; > > - assigned-clock-parents = <&clk IMX8MQ_VIDEO_PLL1_OUT>; > > - assigned-clock-rates = <24000000>; > > + assigned-clocks = <&clk IMX8MQ_VIDEO_PLL1_REF_SEL>, > > + <&clk IMX8MQ_VIDEO_PLL1_BYPASS>, > > + <&clk IMX8MQ_CLK_DSI_PHY_REF>, > > + <&clk IMX8MQ_VIDEO_PLL1>; > > You do not seem to set parent or rate on IMX8MQ_VIDEO_PLL1. Why do you > have it here? Good point. I've added a clock rate for IMX8MQ_VIDEO_PLL1 since then the clock tree reproduces exactly with and with the DSI host controller disabled in DT (otherwise we end up with a rate of 22MHz instead of 24Mhz). Cheers, -- Guido > > Shawn > > > + assigned-clock-parents = <&clk IMX8MQ_CLK_25M>, > > + <&clk IMX8MQ_VIDEO_PLL1>, > > + <&clk IMX8MQ_VIDEO_PLL1_OUT>; > > + assigned-clock-rates = <0>, <0>, <24000000>; > > #phy-cells = <0>; > > power-domains = <&pgc_mipi>; > > status = "disabled"; > > -- > > 2.29.2 > > >