From patchwork Thu Nov 19 13:26:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 328593 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 548F9C63697 for ; Thu, 19 Nov 2020 13:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEFAE246B2 for ; Thu, 19 Nov 2020 13:44:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Gferb6Kp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727206AbgKSNor (ORCPT ); Thu, 19 Nov 2020 08:44:47 -0500 Received: from mail-eopbgr80051.outbound.protection.outlook.com ([40.107.8.51]:21955 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727240AbgKSNoq (ORCPT ); Thu, 19 Nov 2020 08:44:46 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DtWL689R1LLMKlNG+V8RA7HsF4e0gYJTpmHk7SrGtCs0B5/d0pguGKjltbktSOU1uHlH/RbnU+UkWDwW1xBlb/T4gohNQO0smuZ8WusFzMMo4H7hLUO0xpXZ3Ccy/YBm6+F7wFVFWvC4sHnzL6P0c7xj5FMHPl1I2EQbiNYf80KIW57g7zFkbhnfWyQRNhmTYQ6/ExuZAiItR8R7dmHDGPIUOOQFsQftAmehPMs8YuE0bgvtcB6i5UklVcsFs1hJnHA1v/prUrIK/EiRb7+XWVMWlDAGFGVMCfOmtwkTKc/Ko/410PJam9yquiuNtpFS+5Pt7yIbwTi0zGtOys/FqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YzaJfegNyVimKKM/ca6WLBlc+EqPbPDJcxbkU7WtxiE=; b=O10SDMJXBXlgrz7NGHl3lrXCfvOKXpH1kAQ9TN9m1PVzdHT1DSpASH7fnb4QU9yaAaPSdOtXHQp158gAuhXzwOTKU12LJ7Bc99+tzfDruvTPgYtk/kPyVrEbeDlTKK7ugU/HgASDYJzNhVS2RWXbiJsXtXoGgXlE6Q9vr6mLnhf8nEm3ryZHcazgHRvJOrNi9eMQ85m1cmusnEZqSS111nqykN4OROmnTyUbyaEHSk3qRvpE1+3SGvsKZgE5Xt8xcKrIzEwSc1uKkIFTQMGJNojds2lPSuEEoGFFhqaHmNAJ7hRzYSSXfxKGrt7LrVU2IxN/2Z4iiSymVsS4q7MS2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YzaJfegNyVimKKM/ca6WLBlc+EqPbPDJcxbkU7WtxiE=; b=Gferb6KpH9VAzpd68RnN/Qctq/eKT86KB/loSdzxc2qVQA7sU1gcvq7jjpKhyiOIxjK6HBxEuEz3pYclcuWo80TX1uhJd+DZDB4YOkQ78B5eVzn8OzXKEdYosv4OhjEp1U+D3GZ2fAM6y/geIKdQj/Fn8nAFguDVSkPAIYAuMj0= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4966.eurprd04.prod.outlook.com (2603:10a6:20b:2::14) by AM6PR0402MB3784.eurprd04.prod.outlook.com (2603:10a6:209:23::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Thu, 19 Nov 2020 13:44:27 +0000 Received: from AM6PR04MB4966.eurprd04.prod.outlook.com ([fe80::3cfc:a92e:75ad:ce4a]) by AM6PR04MB4966.eurprd04.prod.outlook.com ([fe80::3cfc:a92e:75ad:ce4a%3]) with mapi id 15.20.3564.029; Thu, 19 Nov 2020 13:44:26 +0000 From: Dong Aisheng To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: shawnguo@kernel.org, fabio.estevam@nxp.com, aisheng.dong@nxp.com, kernel@pengutronix.de, linux-imx@nxp.com, mirela.rabulea@nxp.com, jan.kiszka@siemens.com, dongas86@gmail.com Subject: [PATCH v4 04/15] arm64: dts: imx8: add lsio lpcg clocks Date: Thu, 19 Nov 2020 21:26:43 +0800 Message-Id: <20201119132654.1755-5-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201119132654.1755-1-aisheng.dong@nxp.com> References: <20201119132654.1755-1-aisheng.dong@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0164.apcprd04.prod.outlook.com (2603:1096:4::26) To AM6PR04MB4966.eurprd04.prod.outlook.com (2603:10a6:20b:2::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29396-OptiPlex-7040.ap.freescale.net (119.31.174.66) by SG2PR04CA0164.apcprd04.prod.outlook.com (2603:1096:4::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3589.20 via Frontend Transport; Thu, 19 Nov 2020 13:44:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1771c445-16fd-4f7a-fdd8-08d88c913a98 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3784: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:110; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rx6nxm1qJdHuO7sWQtUc7lbZIgd/d3fn+a0F6pHnadebm9nSMz6+EOky1MFh9WKAMGtYZdO3op8WRZB+MOOMb7iHGYuLcAvdaFWnujz/4nVxrLV9dCcpY2mS5xZ9ql7A+1QOITtiKvOivx0Kq/odQRnJ1oj7JYYYgZ9X0xNskReJR10NC8V3TwKQBLdhHhwODxhvX0MfREVbCnjGo0qCw3HXcrMqo+ISqSqbB0bIOEVAv++EJzOAU1SRXBysWk1VD/ZZYcUfOQJVwG2a2ImZHBnbN9GJkhW+mk56xeLyPEhVoZYlJUV22VAgbuebAhzNAQ9wAwBys8kwjUg2k6R3pw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4966.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(366004)(376002)(346002)(396003)(83380400001)(186003)(66946007)(5660300002)(316002)(956004)(478600001)(6486002)(8676002)(66556008)(66476007)(6666004)(16526019)(2616005)(36756003)(6506007)(86362001)(1076003)(26005)(4326008)(52116002)(6512007)(8936002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Yii5tZphl5BaEI2FhzseLc7nCfmI4MqwPLwLNTNrxo4If1Vtnci5h4i9lx7xKNr6sAbexPyC85rpnPoWhgSDQN9Fg35x7Ow4vSZ74pGzwQRvyk4VFu+UvEPKs2D65Sh4/AEh70TkBhaCX9lfvKcRaoYcjfKzQT4fhAlOl6DOkggMdRkVuuxy2OqtwAhYntJWMSHZbLER0XEddGycPUosIQ2aQk1yu2bBdBsXhnjzzeEDwzOwo4b92nxml5Y54DXpJsU3d0S/vuAwgDR8ZLHaxJy4CPioW3x+MSlduIx9NRXNdfZaUin0WAbeAPJ6yg310LRc6uAPnejpSKLDQhsEyJDsK2oQLuHb4zsaoxldlBGoDdJGt+qju+7gUJR/npGlg14G+kgIVh3i2WCgCFssd3wyWpYaoh+1luVQxZbbmOBbYJQ5y6u3Mdc2Qmp2J60kiEfkN05tbiVA8STIL83gWdG5HBF5cniwkH/j8PWo+iWJtDrti4BcgTxD4L8s7kfelw/FuQB7UkFOyv4jafNdoET3pwrwFSYnEBhvxrqOZ5Nw9DH2xeluwAnRZgs292D22FBZJBEH26s0GD1BBXBfWM+Iutwf6tdiVFhXaRl1q0WWvnd6jJvWD8JEqT0pLxgq49rsO4HSlT0bEnhUdpAMaA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1771c445-16fd-4f7a-fdd8-08d88c913a98 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4966.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2020 13:44:26.4241 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3UGKAolEr5qjAkR3lvxDAKOQqQpqSJXgwJS/ygzeW+Mrrgd/kFFz4XCNgVs6U/KXFOURdVIgXMydIFpqATP8MA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3784 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add lsio lpcg clocks Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng --- ChangeLog: v2->v3: * update to use clock-indices property instead of bit-offset property v1->v2: * Use old SCU clock binding temporarily to avoid build warning due to SCU clock cell will be changed to 2. * add power domain property --- .../boot/dts/freescale/imx8-ss-lsio.dtsi | 156 +++++++++++++++++- 1 file changed, 155 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-lsio.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-lsio.dtsi index 70902f56cdb1..babe6c3e2c76 100644 --- a/arch/arm64/boot/dts/freescale/imx8-ss-lsio.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-ss-lsio.dtsi @@ -4,12 +4,29 @@ * Dong Aisheng */ +#include +#include + lsio_subsys: bus@5d000000 { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x5d000000 0x0 0x5d000000 0x1000000>; + lsio_mem_clk: clock-lsio-mem { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + clock-output-names = "lsio_mem_clk"; + }; + + lsio_bus_clk: clock-lsio-bus { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + clock-output-names = "lsio_bus_clk"; + }; + lsio_gpio0: gpio@5d080000 { reg = <0x5d080000 0x10000>; interrupts = ; @@ -131,8 +148,145 @@ lsio_subsys: bus@5d000000 { power-domains = <&pd IMX_SC_R_MU_13A>; }; - lsio_lpcg: clock-controller@5d400000 { + /* LPCG clocks */ + lsio_lpcg: clock-controller-legacy@5d400000 { reg = <0x5d400000 0x400000>; #clock-cells = <1>; }; + + pwm0_lpcg: clock-controller@5d400000 { + reg = <0x5d400000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM0_CLK>, <&clk IMX_LSIO_PWM0_CLK>, + <&clk IMX_LSIO_PWM0_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM0_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm0_lpcg_ipg_clk", + "pwm0_lpcg_ipg_hf_clk", + "pwm0_lpcg_ipg_s_clk", + "pwm0_lpcg_ipg_slv_clk", + "pwm0_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_0>; + }; + + pwm1_lpcg: clock-controller@5d410000 { + reg = <0x5d410000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM1_CLK>, <&clk IMX_LSIO_PWM1_CLK>, + <&clk IMX_LSIO_PWM1_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM1_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm1_lpcg_ipg_clk", + "pwm1_lpcg_ipg_hf_clk", + "pwm1_lpcg_ipg_s_clk", + "pwm1_lpcg_ipg_slv_clk", + "pwm1_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_1>; + }; + + pwm2_lpcg: clock-controller@5d420000 { + reg = <0x5d420000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM2_CLK>, <&clk IMX_LSIO_PWM2_CLK>, + <&clk IMX_LSIO_PWM2_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM2_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm2_lpcg_ipg_clk", + "pwm2_lpcg_ipg_hf_clk", + "pwm2_lpcg_ipg_s_clk", + "pwm2_lpcg_ipg_slv_clk", + "pwm2_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_2>; + }; + + pwm3_lpcg: clock-controller@5d430000 { + reg = <0x5d430000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM3_CLK>, <&clk IMX_LSIO_PWM3_CLK>, + <&clk IMX_LSIO_PWM3_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM3_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm3_lpcg_ipg_clk", + "pwm3_lpcg_ipg_hf_clk", + "pwm3_lpcg_ipg_s_clk", + "pwm3_lpcg_ipg_slv_clk", + "pwm3_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_3>; + }; + + pwm4_lpcg: clock-controller@5d440000 { + reg = <0x5d440000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM4_CLK>, <&clk IMX_LSIO_PWM4_CLK>, + <&clk IMX_LSIO_PWM4_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM4_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm4_lpcg_ipg_clk", + "pwm4_lpcg_ipg_hf_clk", + "pwm4_lpcg_ipg_s_clk", + "pwm4_lpcg_ipg_slv_clk", + "pwm4_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_4>; + }; + + pwm5_lpcg: clock-controller@5d450000 { + reg = <0x5d450000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM5_CLK>, <&clk IMX_LSIO_PWM5_CLK>, + <&clk IMX_LSIO_PWM5_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM5_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm5_lpcg_ipg_clk", + "pwm5_lpcg_ipg_hf_clk", + "pwm5_lpcg_ipg_s_clk", + "pwm5_lpcg_ipg_slv_clk", + "pwm5_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_5>; + }; + + pwm6_lpcg: clock-controller@5d460000 { + reg = <0x5d460000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM6_CLK>, <&clk IMX_LSIO_PWM6_CLK>, + <&clk IMX_LSIO_PWM6_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM6_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm6_lpcg_ipg_clk", + "pwm6_lpcg_ipg_hf_clk", + "pwm6_lpcg_ipg_s_clk", + "pwm6_lpcg_ipg_slv_clk", + "pwm6_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_6>; + }; + + pwm7_lpcg: clock-controller@5d470000 { + reg = <0x5d470000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_LSIO_PWM7_CLK>, <&clk IMX_LSIO_PWM7_CLK>, + <&clk IMX_LSIO_PWM7_CLK>, <&lsio_bus_clk>, + <&clk IMX_LSIO_PWM7_CLK>; + clock-indices = , , + , , + ; + clock-output-names = "pwm7_lpcg_ipg_clk", + "pwm7_lpcg_ipg_hf_clk", + "pwm7_lpcg_ipg_s_clk", + "pwm7_lpcg_ipg_slv_clk", + "pwm7_lpcg_ipg_mstr_clk"; + power-domains = <&pd IMX_SC_R_PWM_7>; + }; };