Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp396257rdb; Mon, 22 Jan 2024 07:32:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0G/IPevR67cfYqO1zTjO6WOmkMHzx17mxQOC83168YC/Dbu7jMPE7eEAXOZc4DWiS8Ksy X-Received: by 2002:a17:90a:f10d:b0:28d:2ad0:41fc with SMTP id cc13-20020a17090af10d00b0028d2ad041fcmr1836603pjb.24.1705937554683; Mon, 22 Jan 2024 07:32:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705937554; cv=pass; d=google.com; s=arc-20160816; b=Xd4l18G8hhhQXDAHDsXHwtvdl1KQFolnoFtjmIqBnDzaQR7kQK11v3ItpR3T7h9DFa rOScHitRJb3gGKiNJs/9OEKyi0Q8qmW1WaV2FH9xJM0PMoBtWpT/mhi95TVGDdRClHy5 Z/053z3cZqudA1zoYVNp/HnV39LKE+mICJ1ww/Q+6ppRft3kSdi1g/jCdncmzy0DorgL rJZCJQ57MrIhI61T5VcTvCILdKzH1NhZhTO0aNd8rXh1hNYn8hKInUKBPvcIi45feN+2 Uoa2OvMHqrMnkYIvhjKQ12nbktsa6pvfgFld/FhYVKdtbA9oSanFG1GiOIqBwkOOJ3o1 cWwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2Cz4Uz1xz0jfnCMCUZjQdS+DmRsJ8t1rwCAQLvxHyuI=; fh=mlAjXsoc9B4EhzVcwrHb12tNPfzgSQIS9mkojkCTODA=; b=Wg69t2C4J2y/uupRnsnGZUdQeysZzRIUr5s4A4DGdIePEYsl0Lz7KZahR6OHoCDrmZ 28AcuO9gnQ8m2duHIOIfjxw/FQCelsPvTsbCAgTZuxNqKYCEF5Nk/10kTXyiQUJHAp9O Qd/gy0FE83cvxechflB/vdvrFa6hbSpwJr8jw3yYecoEy1Vig/UeimLhCK3Ats11hMDx alVKeBRbDixpA0QUenyJ1ErSDM2WHWOigbEG3QTqHcc18GVB8mEx64rr4yOgBDKuHmIw CGI8Q4UGqng+IZvYP9eCDn+QImzmaCfOPiub99HuP2egxaYVGFt96KPZan7tV4jOxtE1 BKJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SkQ6OXgB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33293-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ci7-20020a17090afc8700b002900b3297dcsi6796954pjb.69.2024.01.22.07.32.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:32:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33293-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SkQ6OXgB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33293-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D6D9328C3C4 for ; Mon, 22 Jan 2024 15:25:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E34504174F; Mon, 22 Jan 2024 15:01:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SkQ6OXgB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 179DB5D72B; Mon, 22 Jan 2024 15:01:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935671; cv=none; b=WE62eSiiLUzHD6ueF3KL2O8SZXySFxjYdCgRvRSm/VnOESTZPeVWMsImkx0QMBUBEumTgelzbE9luXQ+r4+PT90wbsZLugUDdpBpqZiOL5gXMw5YuY0Cxl/PORtWwSe9qMtk+Z9iC0TO2WuyfL0vhinF8eLY3cbbooDi9PlnOB8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935671; c=relaxed/simple; bh=IVyJGvpiA9eg1GLGeKrTfWT38yVbLDTSmjexmMIhq5g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HZ8Ir7keIHoYlyh3dbgnP7P+vyrvjTXFWgmM6TWqVlWops/8SiwIlXkTYqu40kYZT/KbFf1+uF7hAfYOZ/mXwWFXbSRSWnjU9RXs1YJARm1444l2Tw3/rY7vTuWXWE1boyIZzC8bGfvBh7TuM292g+VkEIUrw9scxORgF80GBNM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SkQ6OXgB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1F82C43330; Mon, 22 Jan 2024 15:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705935670; bh=IVyJGvpiA9eg1GLGeKrTfWT38yVbLDTSmjexmMIhq5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SkQ6OXgBj3jDYP8HrLfmSYyk2KIhwJQigWVbv3h8dOci+U82Q4GrCM/KXff93mW9S PlM2EziLnA506N/70LY6NBCQnMkQeSb4iakhCHF7hdrod/byKB8qXFqIOkRFLVGImg vUbtd9kPB50F17LeTiu1ZymVCGfors+WYQVgD1eSYzh8sChbd2E4Mzi1Ys0H/U7c5G WcJsUSS/xFxeZ0Wo1eNk5iSfixxb0oeQTCvV/IJoX7UDOsitOYRaqDmmfFYifGpsB0 N6FzfGg0ubHkuV8vpM9sUBVQ6tzEGWlJOm0PNLzZPMTr5R8h1gQTXCU+9NA42K+53w 4vaNzA5+2qd7A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alexander Stein , "Oliver F . Brown" , Ranjani Vaidyanathan , Abel Vesa , Sasha Levin , abelvesa@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, linux-clk@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 6.7 71/88] clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks Date: Mon, 22 Jan 2024 09:51:44 -0500 Message-ID: <20240122145608.990137-71-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122145608.990137-1-sashal@kernel.org> References: <20240122145608.990137-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.7.1 Content-Transfer-Encoding: 8bit From: Alexander Stein [ Upstream commit 3f5f63adeea7e7aa715e101ffe4b4ac9705f9664 ] To be compatible with SCU firmware based on 1.15 a different clock routing for LVDS is needed. Signed-off-by: Oliver F. Brown Signed-off-by: Ranjani Vaidyanathan Signed-off-by: Alexander Stein Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20231218122407.2757175-1-alexander.stein@ew.tq-group.com/ Signed-off-by: Abel Vesa Signed-off-by: Sasha Levin --- drivers/clk/imx/clk-imx8qxp.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c index 41f0a45aa162..7d8883916cac 100644 --- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c @@ -66,6 +66,22 @@ static const char * const lcd_pxl_sels[] = { "lcd_pxl_bypass_div_clk", }; +static const char *const lvds0_sels[] = { + "clk_dummy", + "clk_dummy", + "clk_dummy", + "clk_dummy", + "mipi0_lvds_bypass_clk", +}; + +static const char *const lvds1_sels[] = { + "clk_dummy", + "clk_dummy", + "clk_dummy", + "clk_dummy", + "mipi1_lvds_bypass_clk", +}; + static const char * const mipi_sels[] = { "clk_dummy", "clk_dummy", @@ -207,9 +223,9 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) /* MIPI-LVDS SS */ imx_clk_scu("mipi0_bypass_clk", IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_BYPASS); imx_clk_scu("mipi0_pixel_clk", IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PER); - imx_clk_scu("mipi0_lvds_pixel_clk", IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC2); imx_clk_scu("mipi0_lvds_bypass_clk", IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_BYPASS); - imx_clk_scu("mipi0_lvds_phy_clk", IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC3); + imx_clk_scu2("mipi0_lvds_pixel_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC2); + imx_clk_scu2("mipi0_lvds_phy_clk", lvds0_sels, ARRAY_SIZE(lvds0_sels), IMX_SC_R_LVDS_0, IMX_SC_PM_CLK_MISC3); imx_clk_scu2("mipi0_dsi_tx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_MST_BUS); imx_clk_scu2("mipi0_dsi_rx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_SLV_BUS); imx_clk_scu2("mipi0_dsi_phy_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_0, IMX_SC_PM_CLK_PHY); @@ -219,9 +235,9 @@ static int imx8qxp_clk_probe(struct platform_device *pdev) imx_clk_scu("mipi1_bypass_clk", IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_BYPASS); imx_clk_scu("mipi1_pixel_clk", IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_PER); - imx_clk_scu("mipi1_lvds_pixel_clk", IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC2); imx_clk_scu("mipi1_lvds_bypass_clk", IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_BYPASS); - imx_clk_scu("mipi1_lvds_phy_clk", IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC3); + imx_clk_scu2("mipi1_lvds_pixel_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC2); + imx_clk_scu2("mipi1_lvds_phy_clk", lvds1_sels, ARRAY_SIZE(lvds1_sels), IMX_SC_R_LVDS_1, IMX_SC_PM_CLK_MISC3); imx_clk_scu2("mipi1_dsi_tx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_MST_BUS); imx_clk_scu2("mipi1_dsi_rx_esc_clk", mipi_sels, ARRAY_SIZE(mipi_sels), IMX_SC_R_MIPI_1, IMX_SC_PM_CLK_SLV_BUS); -- 2.43.0