Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1738614pxb; Sun, 10 Jan 2021 08:57:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNStA7A9556i4nEDnEoDninOmI4HDNWFTqguZb6DI2VHHeyI/r1nDKIf58aNLlY1mwGs3Y X-Received: by 2002:a17:906:cd14:: with SMTP id oz20mr7677146ejb.99.1610297876333; Sun, 10 Jan 2021 08:57:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610297876; cv=none; d=google.com; s=arc-20160816; b=skX7owjttUYtrnmAY05lKYXi2v2+7/EZUZ6bAH0DDzypTb+tBInUvvLCM0MCfETpX+ tfA+a3YXXE4ytOy+iFtTZYMJEcz22myz7h7hT9HLko/MLpFQQTVZ8oBpvvq9jofPfTUV RfYlSNA50PmHwunRb4gsqqb19vhkd+bhIhpXBLBG04U2ODMfdp4WBOo7pz+Na119Ox37 IUPCC4s/oJh0pPTnlYiLO0xQg7+n1X8mmT849+3hp3oE2B91UeMiVk8tmunSBBzMit7G zXGSwKPvoqZBmI8Pyc+E70d/pd9kBBzu6ZpB9WtxRj/1G92LMmKp7HczbFz9ZtBoCxo0 poaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=3VxkQSK3xnFDYU1Gnlp1/RUuVhlid4766K3rVzqZ7NQ=; b=djEX1jWCFMHC2ff10SAgaPOpNV/iDKRD79Ak4ZtCzZKWgGtvUZqto/kcOU4NWzhG63 XMPEaMPohf++Uh4B2ksJF5VJYxJNglQr8DxbQHNzCUAiLgH+sSdvAzpNiSYXSwYFSFfE sRkz3GKD+Z1ZJGVX0FPkHx/m8WlSyGDKwYKOnfNCpMo/On51mA9PWnvrOPQzae0yAQNS 2dgsQlTty9GQulWs4LuQE1CAONFFNc+h1DVdqlU7MME68slAJ59YY+2cDRFOnj2x+WGq jD/ACMIFvF4GM18WGzezUVlT0+6KKwpnPAij6FRP2567ATDo/IBshM27KLLITQu24CyO N/UA== 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 m22si6167728edr.514.2021.01.10.08.57.32; Sun, 10 Jan 2021 08:57:56 -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 S1726554AbhAJQ4f (ORCPT + 99 others); Sun, 10 Jan 2021 11:56:35 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:35348 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbhAJQ4f (ORCPT ); Sun, 10 Jan 2021 11:56:35 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id DB287FB03; Sun, 10 Jan 2021 17:55:52 +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 ZM3TsJHU2O_u; Sun, 10 Jan 2021 17:55:51 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 3C0AD40885; Sun, 10 Jan 2021 17:55:51 +0100 (CET) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Peng Fan , Dong Aisheng , Anson Huang , Krzysztof Kozlowski , Shengjiu Wang , =?UTF-8?q?Guido=20G=C3=BCnther?= , Philipp Zabel , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] arm64: dts: imx8mq: Add clock parents for mipi dphy Date: Sun, 10 Jan 2021 17:55:51 +0100 Message-Id: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Changes from v1: - as per review comment from Shawn Guo https://lore.kernel.org/linux-arm-kernel/20210110124629.GO28365@dragon/ Set clock rate for IMX8MQ_VIDEO_PLL1 too. Otherwise we end up with a close but not exact clock rate. 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..50ae17f65a51 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>; + assigned-clock-parents = <&clk IMX8MQ_CLK_25M>, + <&clk IMX8MQ_VIDEO_PLL1>, + <&clk IMX8MQ_VIDEO_PLL1_OUT>; + assigned-clock-rates = <0>, <0>, <24000000>, <594000000>; #phy-cells = <0>; power-domains = <&pgc_mipi>; status = "disabled"; -- 2.29.2