From patchwork Fri Jun 2 22:16:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13265911 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24E4CC7EE2C for ; Fri, 2 Jun 2023 22:16:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236194AbjFBWQS (ORCPT ); Fri, 2 Jun 2023 18:16:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235994AbjFBWQR (ORCPT ); Fri, 2 Jun 2023 18:16:17 -0400 Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F3C1B7 for ; Fri, 2 Jun 2023 15:16:16 -0700 (PDT) Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-19a34a63522so525752fac.0 for ; Fri, 02 Jun 2023 15:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685744175; x=1688336175; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YaPsyLeb5FyKRIBkJzm+0FR3Zt6fEWpe98Trce5vtAY=; b=j4LEKIeBvGlQxksrmagLpuwp15x2hZ5EARGIfhIcdtCCP8GhSDc4bZX0BAmc05dnbI Ved/4LtLd+FMmL5kTxmnjbX6F5oLjIGeb76iAZHtVPKV6HFXXzdij9NCOKtcqGXmXosj ubhKnTERh+JsC9QpT7hRKXJmtzlZBCeMfsrJK2EDJYj1QOWh9hxWoJPxRIqJD8uZxjIq 9uYHnfy8LyVXP9MlHeF6+37bodx+oBsXs+BWRN5ABPYodF2SM08cIrpn80IKhBj2lzAh OQ8lH1dxerL9ly8Xj0hHK8S1VqANBmNbQrkHLXAfGfnHTZ6+IXvN1tjjpPpUPsCOZ4r9 J88Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685744175; x=1688336175; 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=YaPsyLeb5FyKRIBkJzm+0FR3Zt6fEWpe98Trce5vtAY=; b=PgMqw5Rrw4tZmuZl3lSErSUzbBbEh0QFP572zZDIw7wYDxQFB5ToxI+0zL0WhSEwxx tkSauVkbbodshtXGXtLMeeCLTOP/1tM0nHn1gLcZ3hkwrtw8AtgrIWkU7tHszX7popnp NpRxTCK0Wgs2nEQTjRSIxsxggPtanap4/nlUbu1JfwvfTkYO4l6V/vf70rzd7nJLe1dF aCQ7aVSxVow7qomwgV0pXF6ERzM0GFhxW6bfDxb0k1xAgydCLNp4z+gPw2nlpxUtEIYh nYv45Uo8IBxHmjS7cFmbcr3F70vvYmZEfrmKxDgQ/eEqoEi6HJQKzZGAXW8Sz1k/XqLl OoYw== X-Gm-Message-State: AC+VfDy+1OwxG+UfYuEuzPQ1t1tV6d2viNibDdAHD/a7YLoYhNdw7A1C s9+LZuCzIh/uvY95gs21D1k= X-Google-Smtp-Source: ACHHUZ6RqSGNNXksBXWmvjRaNtjha/H2AFlj+aOTib8aUYjfs5QsvNzi4Og5/aTAtwzKt9LaY+8mNQ== X-Received: by 2002:a05:6870:c08e:b0:192:beba:7bd with SMTP id c14-20020a056870c08e00b00192beba07bdmr8503650oad.2.1685744175578; Fri, 02 Jun 2023 15:16:15 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:dad1:c980:e6de:3901]) by smtp.gmail.com with ESMTPSA id k4-20020a4a4304000000b005584e0c8f9csm951587ooj.3.2023.06.02.15.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 15:16:15 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: hs@denx.de, abelvesa@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH 1/3] ARM: dts: imx6sx: Remove LDB endpoint Date: Fri, 2 Jun 2023 19:16:02 -0300 Message-Id: <20230602221604.155027-1-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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 --- 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 2 22:16:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13265912 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89C65C77B7A for ; Fri, 2 Jun 2023 22:16:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236190AbjFBWQV (ORCPT ); Fri, 2 Jun 2023 18:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235994AbjFBWQU (ORCPT ); Fri, 2 Jun 2023 18:16:20 -0400 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C38431B7 for ; Fri, 2 Jun 2023 15:16:19 -0700 (PDT) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-19a336df959so334373fac.0 for ; Fri, 02 Jun 2023 15:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685744179; x=1688336179; 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=mK9ooTnIIPstvRuHFdXn4jUqcXC6NMJg2ggUZKFIvy8=; b=fqNW2WgZWlvWlv3Hr75Zeylkqm2/Vm5PuMRmuGBfFS0GjJgoMSjT0b9On2BFDxq9eE 09mdkXGtSYrdd4dxol4GN75+gv5cUUw5ifRtta6szECqhosYbDNquKflzO6EfB2HXwV0 RCGQ8ewA5D53eF0MYa4rj6B48rPbok9bc3GflKHc21W3RKmONIiMtxgJW4I95wSDR4vo q7tdPfZGfYg6ud8LYmD5wFAAUUzTkNPJJqZMEZohBuAqI1wJScWH8vdXVy5MzXnLauXQ z5rbzcBsPC+eFAr3fAhX7NJF/ya1BizTjFPAS5Fkv0zqc7Osd6Uy+NoeD1xQsNdvbvCT pKiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685744179; x=1688336179; 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=mK9ooTnIIPstvRuHFdXn4jUqcXC6NMJg2ggUZKFIvy8=; b=a4kC2laSMld1l1/jhl7sbac242sXQI0b1ptgOvWoIrkPfA867BdMrI+IyvuuYEzVn4 yK1iOy+WS7CM8iH2h31XY1TblplSOQTsj8tzglMoYSy59LregqFSlPd7Vfuj3WwImgOV 7nDsN4FVMrIdQ0zKEqlhmk7+GowBqr/8vKvnEIAL8eCQr0qNArUCHFm+phZ1BVAuE/sz 34ucGfj1xOlkzROvX2s0p8pjZJ4YtPKfDMLtMnE+Wl5NINUOmyogtPBaY+S6MMfUw0Uq 56BTyqIBf69ho+eTn3rh+6CnCX4ZkT3KLe8BnxWMaoBA6T8K7GAe8OcYVku+I6SY5hw3 ghLg== X-Gm-Message-State: AC+VfDw5/YbUSc2xXsEsfnVuc4uuBLicgrM1cmI8UPZvFba47Q4GUlxb JhsFzR9j0LldNRrb1sbCY04= X-Google-Smtp-Source: ACHHUZ5PcZIPcD/CDwiMTGCm6Hjx0oaaa6NIs0etRWPWX9rPJxQ+L5t5kG7HP1j3LClnmyBj1/DBxg== X-Received: by 2002:a05:6870:8184:b0:187:afcb:87ec with SMTP id k4-20020a056870818400b00187afcb87ecmr7646427oae.4.1685744179006; Fri, 02 Jun 2023 15:16:19 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:dad1:c980:e6de:3901]) by smtp.gmail.com with ESMTPSA id k4-20020a4a4304000000b005584e0c8f9csm951587ooj.3.2023.06.02.15.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 15:16:18 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: hs@denx.de, abelvesa@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH 2/3] ARM: dts: imx6sx: Describe the default LCDIF1 parent Date: Fri, 2 Jun 2023 19:16:03 -0300 Message-Id: <20230602221604.155027-2-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230602221604.155027-1-festevam@gmail.com> References: <20230602221604.155027-1-festevam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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 --- 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 2 22:16:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13265913 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75465C7EE2C for ; Fri, 2 Jun 2023 22:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236313AbjFBWQY (ORCPT ); Fri, 2 Jun 2023 18:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235994AbjFBWQX (ORCPT ); Fri, 2 Jun 2023 18:16:23 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 061C21B7 for ; Fri, 2 Jun 2023 15:16:23 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-19f4c3aa5a8so295749fac.1 for ; Fri, 02 Jun 2023 15:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685744182; x=1688336182; 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=2rErrTpHTVSZk1IodoNCi7TyWfBvMAj2ALKyW0WqhMw=; b=SabottUfBEm5+Lv2y3aUvRIpF6SzEBgMAHVToCOvtyTOh+L8v8JrA8Qzw+OIygiQBH 7jwz6OrBsVcxq/N7i+fItJZhrz4oKfNLCIZPEVBDZqpLOeaQHGHREdRDaMv95OCPpjiQ rHaxtnfGaxylyBwGxFb17SClT+jiJtO8/Ow6ooDvYRq+E8A4FJnNCVMsDPsLVe1sGzIF +dZ1wv4chVEOVg7WU95j0O8aFiK1TCyEXxLQZ9BqYftE7kSM5FYzpnBObMbzsHkp+rRl CAAcRLoN+Bb+NhMbohtIo20AVI4PO5qunhseoizrl52Mxpb5JRsfEmW2gGOb6LuKI/Nd arQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685744182; x=1688336182; 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=2rErrTpHTVSZk1IodoNCi7TyWfBvMAj2ALKyW0WqhMw=; b=e/KfNBxqmHRCuIWMAO/IZSMPLujucYumTgmKy+Y367aF/0jP4hl0Eh1oPTgxKlTU9T 3F1WmW0zqjg45IOUwaXIfkQcGe9FM6VhkUAHFE00/VtQ92doc0MKnNe/eO73K0+I347b tZeP2x1JMpNaNStbCkaXU0yt1kve8Q8h5T6IrMyu9TKATr0hWmQZVV7iLryjyReGoALQ 7YRz3fyV0695Z6Ma2jgfgNLHfcqOJ/EkWOSxsUelEILToFQ8tyihHRCp/0QxcJXhCbnA yOAwOCp3aaVW92/q+jsBZsGLuWcIF6qA6xNuBOZRDN5s7og3bE8emNgbMfvpCjmW0fic Aw4g== X-Gm-Message-State: AC+VfDyIljCVYXzWQvegecZRd3hzLRaxtlzimPGyQUaWccjkLb+88OWY XLj0gf4LSAqdZHwqOzqSjJpi5bOGees= X-Google-Smtp-Source: ACHHUZ4sxR8twVuVuqR45j0iedDkPDiMF8PknPV7ZyI4sX8skgaWe5xRXuzh3ossftDr0lRyOa3Fcg== X-Received: by 2002:a4a:ba8d:0:b0:547:50b4:9236 with SMTP id d13-20020a4aba8d000000b0054750b49236mr5707180oop.0.1685744182271; Fri, 02 Jun 2023 15:16:22 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:dad1:c980:e6de:3901]) by smtp.gmail.com with ESMTPSA id k4-20020a4a4304000000b005584e0c8f9csm951587ooj.3.2023.06.02.15.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 15:16:21 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: hs@denx.de, abelvesa@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH 3/3] clk: imx: imx6sx: Remove hardcoded LCDIF1 parent Date: Fri, 2 Jun 2023 19:16:04 -0300 Message-Id: <20230602221604.155027-3-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230602221604.155027-1-festevam@gmail.com> References: <20230602221604.155027-1-festevam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org From: Fabio Estevam 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 as this is better described via devicetree. Signed-off-by: Fabio Estevam --- drivers/clk/imx/clk-imx6sx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx6sx.c b/drivers/clk/imx/clk-imx6sx.c index 3f1502933e59..b110258b9036 100644 --- a/drivers/clk/imx/clk-imx6sx.c +++ b/drivers/clk/imx/clk-imx6sx.c @@ -498,10 +498,6 @@ 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); - /* 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)) pr_err("Failed to set pcie bus parent clk.\n");