Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp419865rdb; Mon, 22 Jan 2024 08:10:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2w/2RJbrIReWjjrfv3OkZA6j1D9eqflns80iwXQTMgKlgd5yYRW92xKLIeIyCxRVvO3d0 X-Received: by 2002:a17:907:7412:b0:a28:e376:70c8 with SMTP id gj18-20020a170907741200b00a28e37670c8mr1208315ejc.149.1705939835803; Mon, 22 Jan 2024 08:10:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705939835; cv=pass; d=google.com; s=arc-20160816; b=xMsMW+UgbqufaEZhvMvTidyaMyUmvC7Z9qJUu/rdN3QhK4ps8+tqk9By16ZKBXjnoI 8HcHB007Hp3SEBTkCwZOL1gIIxKpAaK8axlNtGep1QlpsJdL88OYSXonRzlX/o6/Y0LT 1JTlborOCjHo+1qpjunbfNhgJ+/yKMcJu092NOCyfUegFiJF+KBckgGBakwKpXMY3726 9NNzGOC/P8uF1y3UFToUeol9mkABcFfkTnsWjylKNx22DngcpXTL6WjXw5cdznn3GYib iqhI0RZQuWAmk8jNEjwOvcqAAlaQppZkbOLNKObCi5I3KZXGXMaAFie0sVjlQHk17ikI UBUQ== 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=zTnsz0oc6uz0GS+/Zg/86UP01t6gELNDiTJ1P1FN+4Q=; fh=mlAjXsoc9B4EhzVcwrHb12tNPfzgSQIS9mkojkCTODA=; b=S44AX2hgBI3JoPi7xjMotncNu2H6F3WTOHOjiF5sWKfXoJbxQGAycJbVKFg1xjYI5w VICp5yVWsph2E9kekzT+pH1F7rycJFvqyfoh8er30czyFznUUeite2YfbIuTXKhin9BA dyabFnbmBDwVqYTyVq41Fe/bsTFMdfhIdjgoHtWc+mfeBe+hpD0yjS5Y0cLblQOLMi4L I3im70XzzuVIpgPHoRlPOxcZHIMQWO+d8bS8T4URfleIsW0h1txNu+WFBzvjW7DhibvN 2apCK/XGwosN0i5+3EB3sr3XdPeJQtSvtR/nWDCb+lIbc7D7bMoSEJ/R38hMoy5EPx6j 0JUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DDNHjb37; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33444-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s16-20020a170906061000b00a30461d5b4fsi1169229ejb.933.2024.01.22.08.10.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 08:10:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DDNHjb37; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33444-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 901391F2438F for ; Mon, 22 Jan 2024 16:10:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C920312BE83; Mon, 22 Jan 2024 15:11:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DDNHjb37" 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 EE0E912AAF0; Mon, 22 Jan 2024 15:11:56 +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=1705936317; cv=none; b=p8/q8NGQ/DBY0owAq04nEM6EiY+VMl1gecvnVzGmL+LiRbLEonzYNxdHIZInEv//OFayFB64l4CnMFoIo8RgJDQ00I2XKVrkKAWL7FyuAA6ipohc3Gy+Y0IBxee/i1taZDBIyLagMFixl7bh9XXKpGzfHYvMkBbLI/IqxhXYKGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705936317; c=relaxed/simple; bh=Vnjgf4dqkyGDz4b/kMEZ3z7g1junkaXLE1bZZe7eqvA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dQX58FVL5pIpy5hYYW9oEZsCDK1VgUscJJHzWgTu02ip4szNU0ADhRnXk19qUay5WRXKL9k+ed07C5HuBQTtRiHNBqoOOeXY/H9k/dSGTyLjObQblS4RCfhmqDFHvLiGoNTE8dHXlD4krukhcxACnW4QfiaotG8hVoj8UUdPqAg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DDNHjb37; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2ECDC43390; Mon, 22 Jan 2024 15:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705936316; bh=Vnjgf4dqkyGDz4b/kMEZ3z7g1junkaXLE1bZZe7eqvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DDNHjb37rYqIAwm0KlnqqkdVlDWCfq1mY4bC0m/XXfaDF+nqv6Oqbp1F7PFI1uUfJ AvfER1sJqxOLmaEk7dnnyUv0S42ptjPd2dVQ4Mdz2c8W3nBB2nTzP4l7qDfZjjUrP9 fy8EIC4ExwVO8hL3OEgf17oaoWnFvXpAenOxGkF2QK7ord2+K4AfU47RHPTL7LSA+R /+A2FR5HzOKrwIoArMg+STw32O/EelQrdbhfCRgzZZL7vBUcZ4IizrBP/sUcxWLVwr xzbPMZxBQ55rnVTUXs3vEmeOJtyG1lwupiEsTbqazU2N+bXI9j1lRmFU5PI/9Tax8G hoi+tegPugMxg== 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.1 43/53] clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks Date: Mon, 22 Jan 2024 10:08:44 -0500 Message-ID: <20240122150949.994249-43-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122150949.994249-1-sashal@kernel.org> References: <20240122150949.994249-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.1.74 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 273de1f29307..1066ea16de62 100644 --- a/drivers/clk/imx/clk-imx8qxp.c +++ b/drivers/clk/imx/clk-imx8qxp.c @@ -67,6 +67,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", @@ -201,9 +217,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); @@ -213,9 +229,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