From patchwork Sun Mar 18 03:14:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10291053 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9AC47600F6 for ; Sun, 18 Mar 2018 05:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 898D828FE9 for ; Sun, 18 Mar 2018 05:56:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E4D128FF0; Sun, 18 Mar 2018 05:56:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE66E28FE9 for ; Sun, 18 Mar 2018 05:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: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=uZcswKycoaHUi/Bu2C9m1ty/TGXdsjr49FAbGSDRyIQ=; b=ie6FzfMP9bFmpq GjfHJ5TqhAub9RIqKMlriXODnXBKiFqtsKJ0TOv/+9GIwB3yAv3uIlEH0pEPyRKcVv2iEJD1DMP84 4k4wxpPPjZWnQX3X47GW9qEPoyLiyZqAU2LpCrvvl1Y8xeamVN8AH2hx4oezBpUbWE19U80VXBYTx iRMxJNkowQ1x+n0ijE/M/PE/86FbmlxC5X76SNjh7/fJxtVMrfsWoLQ0qVDYpgR55Jj3O3Dvzyymd pQbjKZeP/+0Lh/rNNWpZt/U03n+aVYyXPFey5d3Byo88J4pN3q7Ua+PelLH7Voj0/T/PZYUBGfAYi 5VJgaSK25MOtNcukmltA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1exRIv-0008P6-8a; Sun, 18 Mar 2018 05:56:25 +0000 Received: from mail-by2nam01on0083.outbound.protection.outlook.com ([104.47.34.83] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1exRIW-00088V-94 for linux-arm-kernel@lists.infradead.org; Sun, 18 Mar 2018 05:56:02 +0000 Received: from BN3PR03CA0061.namprd03.prod.outlook.com (10.167.1.149) by BN6PR03MB2754.namprd03.prod.outlook.com (10.173.144.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.14; Sun, 18 Mar 2018 05:55:44 +0000 Received: from BN1BFFO11FD027.protection.gbl (2a01:111:f400:7c10::1:118) by BN3PR03CA0061.outlook.office365.com (2a01:111:e400:7a4d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.588.14 via Frontend Transport; Sun, 18 Mar 2018 05:55:43 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD027.mail.protection.outlook.com (10.58.144.90) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.527.18 via Frontend Transport; Sun, 18 Mar 2018 05:55:42 +0000 Received: from anson-OptiPlex-790.ap.freescale.net (anson-OptiPlex-790.ap.freescale.net [10.192.242.177]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w2I3H9o8016179; Sat, 17 Mar 2018 20:17:09 -0700 From: Anson Huang To: , , , , , , , , Subject: [PATCH 1/2] clk: imx6sx: add missing lvds2 clock to the clock tree Date: Sun, 18 Mar 2018 11:14:12 +0800 Message-ID: <1521342853-2941-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131658261434635952; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:CAL; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(376002)(39380400002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(85426001)(107886003)(498600001)(81166006)(86362001)(26826003)(81156014)(316002)(53936002)(26005)(8676002)(97736004)(2906002)(6666003)(110136005)(68736007)(16586007)(336012)(305945005)(72206003)(8936002)(47776003)(2201001)(5660300001)(54906003)(356003)(48376002)(104016004)(6636002)(50466002)(36756003)(77096007)(51416003)(4326008)(105606002)(106466001)(50226002)(32563001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2754; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD027; 1:dZlb99aCHeq9fvP7wtM1ssic70UijNNtYWyR5FQYl8tIA7yjLP+HIYqsINUBCaPnyg0UvkqiO/msJbPixUvcCDAQ1OB691knNH7E6Rrh/LzMFTZ5B6J1yrvxHK9ov1QZ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3beb9aec-6bff-4fe1-354f-08d58c94e303 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603328); SRVR:BN6PR03MB2754; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2754; 3:PxwDMToDeoUK72SEQiWMHtZMkdeNaMfWAYeE6XZ3BdO9wia2YbyEhHqpe8D+3WkjybH3u1d4BFb/6cmOe3alttuYOgHgxS0l5Wm2IkcLdtH4S74VLizuYtmsFiGBV4ERFv0KSmM6ErnuQdqVH6m55IueDd3jq6ti8DDPJcXMkpmNHe2qYGJVWs9uXC5GehznXY20aTRoWguZNqi6KcfuJhIYgwufTrdXZXkJZ669JcxQNOrmSxlKKT8ruWxloQcsXf0eQRcaSdBsIu9sql6xI+WEGqhCEc4v0RT2V8ntWF/Fo60WLqrYGqGr6KvbaRRu+8H3nvxRTtwYdQiSfdE7JaZ2O0p/N4KHZecozpKsEEI=; 25:ZUmrtYLoH86MUm2frJ2GjJNsqICtEw9MHbH2OZrTbiElKYSRVeR+WdgCwgiZVKrHM050po9F3En9hLzneVO2KPyEIFH3RnG5vEkxYMv9Glb1XZTuC55Wn0KJvrm14+I/YinOwY5iKOWzJrwk13GEO52CE4coAyzZdaQLoYsUlYYGHIfcnF76YRE5xhuRWvcp9U0u7SSAL8EnCljmsIuFwFPbLmemyKkGOlN5mPKg3C4uBZOZFtO0wiH8/x32EwgmB/8IrZq7zL/6Rf59aLtsCmUGiTnxrm+5WMQhKvQd/WOyhO5uoufpQhwNaAQy2CoD4h8d7P3Exs8RozSgNeCOBA== X-MS-TrafficTypeDiagnostic: BN6PR03MB2754: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2754; 31:JFvs/ubvBBC9f7xtmt5Gdpe4iQCduJ0Wgulng8l5Uz0FRCu+8tj8Bq9qjACfm7tStD5ibzan3J3fq0pJVzGz17NasMI0J6hgctt3M7kJpW/L+UPLk+vLjDvMkSoQjFgtklYVTuV0xpPKWJXdonqfAkwBuc+DbYnh5jAgSc4Uix3Vm0kDH7LWReKzavGlKW0H+R7OLnxjRwyb3JdzpqqTOC4Hbx/mNb8iprFk7y5h8o8=; 4:fA5kBc++U7qLh9fHsbxhgPhq6k4nSXsOBd54iMs04b+GH/gr5QjudRJFjzDkVlSbfqMd+XE9UCUhNUysprZKkTkxKXu1a5ymBP+p0B35bJXxNlUmOJdwdOjb0RyhSdmXMEBfUKvk11JVPpHuMOMPjKWhzegNUBmWLKgV9R1VkmVmaU5SXBRRTEcxdKZNGk7XJS9yi1+WVJB5aO3qSaXM6Vba4KQSts0I6qziulTRSl6mHx6GgZZ/FIl9U2c6H376aGfhRRbM/BpK2oPeF5inctKFJVn1C073dKmkesJ1WLnNELXYdTnUrLLxU1RolkE7 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123556025)(20161123561025)(20161123559100)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:BN6PR03MB2754; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2754; X-Forefront-PRVS: 06157D541C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2754; 23:9OJl06PlPFCcucgQrb8+88dPSjZOct2Co26lPMKPc?= =?us-ascii?Q?isK6cYFGJHsd11U7eDaq8/S84/oiAYf6qOv61yEv5xIasomM6juTTKTeJil+?= =?us-ascii?Q?bzvXDhv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/zcc28IorIGiFONRyA6P4TnXZ+HBbTWmXDpEMOgvs60BlaHBrw2lHQ=; 7:M9POH4/4LA2YncggGmpsz5clNPaWEG0BFCXoDSGxT/OfEiVu0454WxEswTHUr3Hu0qP8K8urR7Ysy+0pS12Ho+knQkX7hNxD50xVrHhPP20/wzjyEfqrBp2v8oqfRmKFEduvYUvihnakd54M4H8yjdkebV4+vLMgwux8i0TAYHDC+TiajQ2v3eRJmmv71dYmL0zKlTir8tF1/WQZq07bcJUoE3XH7XakYOdj9zDc2oN9EL6algCRbWMjpPkwwlFG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2018 05:55:42.8863 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3beb9aec-6bff-4fe1-354f-08d58c94e303 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2754 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180317_225600_341089_77ECA0A0 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP i.MX6SX has lvds2 (analog clock2), an I/O clock like lvds1. And this lvds2, along with lvds1, can be used to provide external clock source to the internal pll, such as pll4_audio and pll5_video. This patch mainly adds the lvds2 to the clock tree and fix its relationship with pll accordingly. Signed-off-by: Anson Huang Signed-off-by: Shengjiu Wang --- drivers/clk/imx/clk-imx6sx.c | 6 +++++- include/dt-bindings/clock/imx6sx-clock.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk-imx6sx.c b/drivers/clk/imx/clk-imx6sx.c index e6d389e..d180797 100644 --- a/drivers/clk/imx/clk-imx6sx.c +++ b/drivers/clk/imx/clk-imx6sx.c @@ -80,7 +80,7 @@ static const char *lvds_sels[] = { "arm", "pll1_sys", "dummy", "dummy", "dummy", "dummy", "dummy", "pll5_video_div", "dummy", "dummy", "pcie_ref_125m", "dummy", "usbphy1", "usbphy2", }; -static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", }; +static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", "lvds2_in", "dummy", }; static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", }; static const char *pll2_bypass_sels[] = { "pll2", "pll2_bypass_src", }; static const char *pll3_bypass_sels[] = { "pll3", "pll3_bypass_src", }; @@ -160,6 +160,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) /* Clock source from external clock via CLK1 PAD */ clks[IMX6SX_CLK_ANACLK1] = imx_obtain_fixed_clock("anaclk1", 0); + clks[IMX6SX_CLK_ANACLK2] = imx_obtain_fixed_clock("anaclk2", 0); np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop"); base = of_iomap(np, 0); @@ -228,7 +229,9 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) clks[IMX6SX_CLK_PCIE_REF_125M] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19); clks[IMX6SX_CLK_LVDS1_OUT] = imx_clk_gate_exclusive("lvds1_out", "lvds1_sel", base + 0x160, 10, BIT(12)); + clks[IMX6SX_CLK_LVDS2_OUT] = imx_clk_gate_exclusive("lvds2_out", "lvds2_sel", base + 0x160, 11, BIT(13)); clks[IMX6SX_CLK_LVDS1_IN] = imx_clk_gate_exclusive("lvds1_in", "anaclk1", base + 0x160, 12, BIT(10)); + clks[IMX6SX_CLK_LVDS2_IN] = imx_clk_gate_exclusive("lvds2_in", "anaclk2", base + 0x160, 13, BIT(11)); clks[IMX6SX_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0, base + 0xe0, 0, 2, 0, clk_enet_ref_table, @@ -270,6 +273,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) /* name reg shift width parent_names num_parents */ clks[IMX6SX_CLK_LVDS1_SEL] = imx_clk_mux("lvds1_sel", base + 0x160, 0, 5, lvds_sels, ARRAY_SIZE(lvds_sels)); + clks[IMX6SX_CLK_LVDS2_SEL] = imx_clk_mux("lvds2_sel", base + 0x160, 5, 5, lvds_sels, ARRAY_SIZE(lvds_sels)); np = ccm_node; base = of_iomap(np, 0); diff --git a/include/dt-bindings/clock/imx6sx-clock.h b/include/dt-bindings/clock/imx6sx-clock.h index 36f0324..cd2d6c5 100644 --- a/include/dt-bindings/clock/imx6sx-clock.h +++ b/include/dt-bindings/clock/imx6sx-clock.h @@ -275,6 +275,10 @@ #define IMX6SX_PLL6_BYPASS 262 #define IMX6SX_PLL7_BYPASS 263 #define IMX6SX_CLK_SPDIF_GCLK 264 -#define IMX6SX_CLK_CLK_END 265 +#define IMX6SX_CLK_LVDS2_SEL 265 +#define IMX6SX_CLK_LVDS2_OUT 266 +#define IMX6SX_CLK_LVDS2_IN 267 +#define IMX6SX_CLK_ANACLK2 268 +#define IMX6SX_CLK_CLK_END 269 #endif /* __DT_BINDINGS_CLOCK_IMX6SX_H */