From patchwork Fri Jun 9 03:12:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13273216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AC5BBC7EE25 for ; Fri, 9 Jun 2023 03:13:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Axc5UBvb9KjcOMoilTldfcN4CUooM3K3paQNvZk7JQc=; b=dK5xY0m8Metzbn tf2ufhu7QQMpj81ZA2IYW9pcFJkRJbd5eXg9Pi3zCsKHyPPYU97tIqPZC07GqUbIXL0rvY+dInxPJ y44jQue5avM9kFp0Fu5R5yUAhjGuI4cFKBW7pVUp69mRCx9XLZR5tawEgDcmIJkmhm8lNikL2qpcy 9ObGDq7ZIVXRWtDgZRYVCSJOEwHIcRQZl/p4CXCsdkayZ7NnxnCBk3D+wHcpNbn7GyshUeu7gRlx7 eS08qm/R4u1hSDF4UgNgCsVWKrHvQ114fYOnpTVKtr2juBKKmizQfse39YzCZjSZ+zRhJ+/je9p4u EjtRLDybieH4vdKHowyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7SYi-00BQCW-1L; Fri, 09 Jun 2023 03:13:04 +0000 Received: from mail-oa1-x2b.google.com ([2001:4860:4864:20::2b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7SYf-00BQBw-1c for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 03:13:02 +0000 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-19f84b396b4so283600fac.0 for ; Thu, 08 Jun 2023 20:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686280379; x=1688872379; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ONtBub6zTiGILsFXcr0jpjnAmwxvEv6wu11A7UAraNI=; b=B4nvrHXK0cAyGJjc2LNvkucxGZZAODju1NqbN+tckhBktUlwq/S3Y1q9feNKei9fhX ZjZF6NPbxCNbs+4vufNM5dDylrddi9gFYb3fWQoLjWHycDGFRHGX9ls+y2uKBRxXd70M 7IuVG76cS0nskRksP1Bb+kdtF3s9heKPtChnBxDTuKGps0c+PX/qS78uvL8orphlDI/N qxXkj9zmvfDdTwDwbtatXbLWpwRbQT2z9nmqkX0zOrmzi03/UMWCdzv6wxQ3zYhT8uN6 6SF6RX0lA1FF59FjtK8AKb95rcoVAR9cPlTlhEbFl5agH+3sdQ9J/z5Mzmjbmtb4B/BO 3GMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686280379; x=1688872379; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ONtBub6zTiGILsFXcr0jpjnAmwxvEv6wu11A7UAraNI=; b=Ic23sjDTKAesgn7yv0rPXPDtQ4SQrmuZcsfZTTUjIblhgBs0btkbDWbulXb1PVXXMq 91bEq6HChNt0FuZ+dj8H2rAjlu8m+byj7PKnUz8uFWYwdsJ4x5ZUmErGuCq7MyuzAulw H57CI+iKwkee1QAGmO5Ys7hSUb4DQw6FYBOht7JqHqN8Hi3OOmfQRVH72qDYDZcQpB8D qCZQ18cMesHEZkAS30Ds/Dq/wups79PYtoPL4dAb5FvXk5LHD9j512m/FLRUbq7nzqSu cfK+XYRj5YbUkMCqbIQR7n6vrbK8hOnv0Qpmo8Tr+aXSgklbBnIVIGUf/78xqZudfX1o XuPQ== X-Gm-Message-State: AC+VfDzUo44W44nGFWw+nHqiIbXaIg/dd+3OodTqa/jAt+5ZRt6k5qHJ M3AXfbqHyVLCDFjcbhIvBgU= X-Google-Smtp-Source: ACHHUZ41TMdV0Tfhj5Yxysosp4JSH70wcUCY+rg5Yb3fLSqQ2c8Mqvz0ynPU20LxfJGzm2gEl/gWUw== X-Received: by 2002:aca:3d83:0:b0:39a:17c1:97ed with SMTP id k125-20020aca3d83000000b0039a17c197edmr191847oia.4.1686280377926; Thu, 08 Jun 2023 20:12:57 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:8c46:67c3:a757:2399]) by smtp.gmail.com with ESMTPSA id r3-20020acac103000000b00395f5cd1a0dsm1047493oif.9.2023.06.08.20.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 20:12:57 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: sboyd@kernel.org, abelvesa@kernel.org, hs@denx.de, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH v2 1/3] ARM: dts: imx6sx: Remove LDB endpoint Date: Fri, 9 Jun 2023 00:12:47 -0300 Message-Id: <20230609031249.3692841-1-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_201301_538147_1E13B63D X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Fabio Estevam Remove the LDB endpoint description from the common imx6sx.dtsi as it causes regression for boards that has the LCDIF connected directly to a parallel display. Let the LDB endpoint be described in the board devicetree file instead. Fixes: b74edf626c4f ("ARM: dts: imx6sx: Add LDB support") Signed-off-by: Fabio Estevam --- Changes since v1: - None arch/arm/boot/dts/imx6sx.dtsi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index 3a4308666552..41c900929758 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -863,7 +863,6 @@ port@0 { reg = <0>; ldb_from_lcdif1: endpoint { - remote-endpoint = <&lcdif1_to_ldb>; }; }; @@ -1309,11 +1308,8 @@ lcdif1: lcdif@2220000 { power-domains = <&pd_disp>; status = "disabled"; - ports { - port { - lcdif1_to_ldb: endpoint { - remote-endpoint = <&ldb_from_lcdif1>; - }; + port { + lcdif1_to_ldb: endpoint { }; }; }; From patchwork Fri Jun 9 03:12:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13273215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B14FFC7EE23 for ; Fri, 9 Jun 2023 03:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j9maPHechLnjU6SZ4Vc9T6aqRVM/8tVY0UizIhq0tZ0=; b=JuA6OGDpmw0ryP ovz2f4/aGrFdgFcFMRe0yOqh91knUjihaaxND1m7ky7/qXiZuPx6jNq5G5JZ8WI65Hd+UQ1z07kJd gSMJ7szdq8iV6bnMrRPDbIERlMuwxkEmmWSGyMMwGALMJEug6eeCpbrWnh9Hb0lDX5uC7e01Yarn0 bR98bm1OnqDM+LQcjyh68+EenqR7XzNk3JVdkuhpWlIyFL9n+PT1fc0ICePDUk2KUwTLjsG4w/mqz yQ1D3aCfm18vkgnTxfk+O4AqoYWh0VvOWb+aZy6n3DCbdj1JFX3Ya/IUoNX3bnBrWNAJ/Bjk2J4JM 0RGlTXzuuxx6JwWkuXVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7SYm-00BQDZ-0J; Fri, 09 Jun 2023 03:13:08 +0000 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7SYi-00BQCQ-2R for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 03:13:05 +0000 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-39b349405d9so108444b6e.1 for ; Thu, 08 Jun 2023 20:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686280383; x=1688872383; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pdcoXrVKUjNxK20AUGxUd3nCpXpvG2ISuks4CEzgCZ4=; b=IRmsHH3e0y2zI1SQsQA6zlPQ0K8S8eLRrtrwTtJyRvBDJMAqpe/p1912uqZDFFVBye NgGw/+FSzebELnvVkLMtNTL0rTYhaxpyakqMAfY45gZsgtR63rLky/IjtvwkV7oRNMst 5b1GBxWmYiCfeR58IuQVgOZp5mVZIEi5Uu2X+80YC90qZlUkHjF33KyWmEuRB+QLhkD8 KLzrPAzHdOSDJRx0XQuh2sqsI2zp9NFVKRfc5gvUERBI/Pw970Uj6fpXFQRht0i93A7m RFWkLcNp5uBZwENNxO5VK5UGEw7TJ1RSsOF0eRaUgeXos1gRL0v4BOD2/pZmYf9QLmSu YuCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686280383; x=1688872383; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pdcoXrVKUjNxK20AUGxUd3nCpXpvG2ISuks4CEzgCZ4=; b=GzJh5Pn4X+XFoV9ABTLtsSMdbCW62gsye0MpX1xjllG/UGPC+fvV4CzppR1QUSDCjj lePkRDWO8zggIcbQMAImTNfhreZXtE0uqp9bfcf8DVioi+9S+ywEGAvGgWFHivyWIrr6 Oe3eGmUl22AJu8/D8sdROv0GYXZH7OaRkBMNWN/RfHX3GtmLt0l/mA5YpzuMqcDBByEl IE3BfUWA7nsCz1/thFmU8ujf3cl+nJf4LPCP1ba0ZrPwLWgieVPTuPWP4XLW50OSi6mw iTtW5tM/2zZUoh65JpTCcUujeMXkzmlys+3soM8YeaHUx1CxNGESzEUvkFF0VApf6fbT 0kAA== X-Gm-Message-State: AC+VfDzaa8zOmW8CLtOc5fPYqXgl8hcqDQYYXSiUiHAheTVhKzwcHRGq QVMn1Wzt3d4QKodxZSzYJiM= X-Google-Smtp-Source: ACHHUZ7aV6JiIRnVdy3z9BctAAbLJ0NFniFjkGmZHcvZWsFw5zrbszYlMUB7vZObABURZ3Rai9IihA== X-Received: by 2002:aca:ef06:0:b0:394:b8:cb8b with SMTP id n6-20020acaef06000000b0039400b8cb8bmr198478oih.5.1686280383022; Thu, 08 Jun 2023 20:13:03 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:8c46:67c3:a757:2399]) by smtp.gmail.com with ESMTPSA id r3-20020acac103000000b00395f5cd1a0dsm1047493oif.9.2023.06.08.20.12.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 20:13:02 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: sboyd@kernel.org, abelvesa@kernel.org, hs@denx.de, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH v2 2/3] ARM: dts: imx6sx: Describe the default LCDIF1 parent Date: Fri, 9 Jun 2023 00:12:48 -0300 Message-Id: <20230609031249.3692841-2-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609031249.3692841-1-festevam@gmail.com> References: <20230609031249.3692841-1-festevam@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_201304_789895_183F64F9 X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Fabio Estevam A suitable default for the LCDIF parent is the PLL5 clock, so describe it in the device tree. The imx6sx clock driver harcodes PLL5 as the LCDIF1 parent, but in preparation for removing such hardcoding, describe the parent relationship via devicetree. There are some boards that may want to use a different parent for the LCDIF due to EMI reasons, for example. With this approch, the user can change the LCDIF parent in the board devicetree if needed. Signed-off-by: Fabio Estevam --- Changes since v1: - None arch/arm/boot/dts/imx6sx.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index 41c900929758..0d549e1f3ced 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -1305,6 +1305,10 @@ lcdif1: lcdif@2220000 { <&clks IMX6SX_CLK_LCDIF_APB>, <&clks IMX6SX_CLK_DISPLAY_AXI>; clock-names = "pix", "axi", "disp_axi"; + assigned-clocks = <&clks IMX6SX_CLK_LCDIF1_PRE_SEL>, + <&clks IMX6SX_CLK_LCDIF1_SEL>; + assigned-clock-parents = <&clks IMX6SX_CLK_PLL5_VIDEO_DIV>, + <&clks IMX6SX_CLK_LCDIF1_PODF>; power-domains = <&pd_disp>; status = "disabled"; From patchwork Fri Jun 9 03:12:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13273214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D6B33C7EE2E for ; Fri, 9 Jun 2023 03:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a5XHf0VURCAY+EAxxj2W/28xKLfq+HKnEn8PedRogls=; b=SzFqzbN0b09XP3 amZViJTlVmjzxAtXTaDPdIE20vfXJn+Ru3yYqwNe3PGaIu002E449UO5fQQx7hULwJgMlGhOx6ycf XHTx+DZBmHUbOuTbBebxBEhLTQIy5dKKgTWMCMGsZMfMKvX8LXK+8KzDwB0QmG5IPreKEkUuPSlVN uc7wcidJ1alzO/pCJ1mk1ef4SeQVNICN4f3mid6I1vaaeTRg71Mw49Ia8iYmVuvEeZLQn2NP05OT1 cpNhp2eGDvPBndcdSrLC6yfw9S4a2YLaZmm9X7q4QmwjVfBgLFucY8zaQS6rjQfMXXIwyBtrtcLwB mlFA0ZwEBj7HQ9Xrs9Iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7SYo-00BQEg-2Z; Fri, 09 Jun 2023 03:13:10 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7SYl-00BQD8-30 for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 03:13:09 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-39aab5cf7baso122313b6e.1 for ; Thu, 08 Jun 2023 20:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686280386; x=1688872386; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uq0koP/F2W4q5CpX2VXG7fhsAJ76lOHszEn4twrgKgY=; b=l02oS5A6QcTVuBMCjzp3Lj1Ngky5CIFaI8PYcUQNvTMhFkjzm7Wn+71/l8h5TZsTD9 bjZpPD0pBXnR0XAntQ9qwfuQXMd0ZYWfMHrNoJljHntafFMd1fxaHwQ01kKy8KPtYHWW CcxPDjGsejxP+FQYv8u2LuWBIGQIWz6W5xyYG5JUCG/PW3OGMxXPHmuJMYbaXNvQgKVN bgH42nInQ0d0lpsUI+WE6LAqrocvrn/9gqTyuxOb/ZKMnIemVAhNUnXlcGDnow/83IJO bCDcCun72x8fzyn5BXPB6GjDepK1z3jrPPkh6wUkV71f8/N196kO9u7B4ukn6nO8oTrW otXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686280386; x=1688872386; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uq0koP/F2W4q5CpX2VXG7fhsAJ76lOHszEn4twrgKgY=; b=WXhVH338fDhdVSY7DwiA5u7nu6lBR7QQLZWhhscI6nFHxMhQBRz6zduHx3qq0I6dP+ KDwoQWsTLV1vSws0JmL9wFrmy1u6TVDSt+/l5KBrOuYkO1bHiUbqj9dCd0Gdf6/BcwhS BK5MqpaQdalyf+FSVQL/9OuxIUCf6wJhkty3wVOSOua97kE2fXfqr0jMHf0jldsAYpJW /JtPyxmS1dndwaQonieibVDoEvP4B4t+ZSHuAwqDDlGZt+1MwEUl5IYagz39SaRd0LjQ eRTbSPhwI/+0CpcE3n5KuNiTzICGV3ftYG/4aTMrh9R9kYpNt4k+HypqeBClbMfxOHvu sEGw== X-Gm-Message-State: AC+VfDzpcs3Yg7mXVmzyD0r4iZ6OeTMXb8CE+kXwyq6FshewZ3N+XjxF fEHWfJGOtE5WKQ0q9Rim7doeySGP1iU= X-Google-Smtp-Source: ACHHUZ6nCO5DhkRn4gaNK0wK0bjSafxQDqfOgLlFFPtBHdOr2gfZ2FZ6Y5HXYbjgrTY6pvYMDlaWtQ== X-Received: by 2002:aca:3d82:0:b0:39a:9e76:ea3c with SMTP id k124-20020aca3d82000000b0039a9e76ea3cmr268736oia.2.1686280386402; Thu, 08 Jun 2023 20:13:06 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:8c46:67c3:a757:2399]) by smtp.gmail.com with ESMTPSA id r3-20020acac103000000b00395f5cd1a0dsm1047493oif.9.2023.06.08.20.13.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 20:13:06 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: sboyd@kernel.org, abelvesa@kernel.org, hs@denx.de, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH v2 3/3] clk: imx: imx6sx: Allow passing the LCDIF1 parent via DT Date: Fri, 9 Jun 2023 00:12:49 -0300 Message-Id: <20230609031249.3692841-3-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609031249.3692841-1-festevam@gmail.com> References: <20230609031249.3692841-1-festevam@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_201307_976466_608313DC X-CRM114-Status: GOOD ( 14.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It is not a good idea to hardcode the LCDIF1 parent inside the clock driver because some users may want to use a different clock parent for LCDIF1. One of the reasons could be related to EMI tests. Remove the harcoded LCDIF1 parent when the LCDIF1 parent is described via devicetree. Old dtb's that do not describe the LCDIF1 parent via devicetree will use the same PLL5 clock as parent to keep the same behavior. Signed-off-by: Fabio Estevam --- Changes since v1: - Check for the presence of 'assigned-clock-parents'. (Stephen) drivers/clk/imx/clk-imx6sx.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx6sx.c b/drivers/clk/imx/clk-imx6sx.c index 3f1502933e59..69f8f6f9ca49 100644 --- a/drivers/clk/imx/clk-imx6sx.c +++ b/drivers/clk/imx/clk-imx6sx.c @@ -121,6 +121,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) { struct device_node *np; void __iomem *base; + bool lcdif1_assigned_clk; clk_hw_data = kzalloc(struct_size(clk_hw_data, hws, IMX6SX_CLK_CLK_END), GFP_KERNEL); @@ -498,9 +499,16 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) clk_set_parent(hws[IMX6SX_CLK_EIM_SLOW_SEL]->clk, hws[IMX6SX_CLK_PLL2_PFD2]->clk); clk_set_rate(hws[IMX6SX_CLK_EIM_SLOW]->clk, 132000000); - /* set parent clock for LCDIF1 pixel clock */ - clk_set_parent(hws[IMX6SX_CLK_LCDIF1_PRE_SEL]->clk, hws[IMX6SX_CLK_PLL5_VIDEO_DIV]->clk); - clk_set_parent(hws[IMX6SX_CLK_LCDIF1_SEL]->clk, hws[IMX6SX_CLK_LCDIF1_PODF]->clk); + np = of_find_node_by_path("/soc/bus@2200000/spba-bus@2240000/lcdif@2220000"); + lcdif1_assigned_clk = of_find_property(np, "assigned-clock-parents", NULL); + + /* Set parent clock for LCDIF1 pixel clock if not done via devicetree */ + if (!lcdif1_assigned_clk) { + clk_set_parent(hws[IMX6SX_CLK_LCDIF1_PRE_SEL]->clk, + hws[IMX6SX_CLK_PLL5_VIDEO_DIV]->clk); + clk_set_parent(hws[IMX6SX_CLK_LCDIF1_SEL]->clk, + hws[IMX6SX_CLK_LCDIF1_PODF]->clk); + } /* Set the parent clks of PCIe lvds1 and pcie_axi to be pcie ref, axi */ if (clk_set_parent(hws[IMX6SX_CLK_LVDS1_SEL]->clk, hws[IMX6SX_CLK_PCIE_REF_125M]->clk))