From patchwork Fri Jan 19 13:11:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10175589 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 A4C0860386 for ; Fri, 19 Jan 2018 15:25:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 955602869C for ; Fri, 19 Jan 2018 15:25:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89BC4286AA; Fri, 19 Jan 2018 15:25:21 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C73C2869C for ; Fri, 19 Jan 2018 15:25:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756033AbeASPZS (ORCPT ); Fri, 19 Jan 2018 10:25:18 -0500 Received: from mail-dm3nam03on0062.outbound.protection.outlook.com ([104.47.41.62]:32533 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756005AbeASPZD (ORCPT ); Fri, 19 Jan 2018 10:25:03 -0500 Received: from MWHPR03CA0011.namprd03.prod.outlook.com (10.175.133.149) by MWHPR03MB2701.namprd03.prod.outlook.com (10.168.207.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 19 Jan 2018 15:25:00 +0000 Received: from BN1AFFO11FD024.protection.gbl (2a01:111:f400:7c10::197) by MWHPR03CA0011.outlook.office365.com (2603:10b6:300:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Fri, 19 Jan 2018 15:25:00 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.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 BN1AFFO11FD024.mail.protection.outlook.com (10.58.52.84) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Fri, 19 Jan 2018 15:24:57 +0000 Received: from b29396-OptiPlex-7040.ap.freescale.net (b29396-OptiPlex-7040.ap.freescale.net [10.192.242.1]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0JDBGiU013190; Fri, 19 Jan 2018 06:11:53 -0700 From: Dong Aisheng To: CC: , , , , , , , , , Dong Aisheng Subject: [PATCH V3 10/10] add imx7ulp support Date: Fri, 19 Jan 2018 21:11:10 +0800 Message-ID: <1516367470-24340-11-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516367470-24340-1-git-send-email-aisheng.dong@nxp.com> References: <1516367470-24340-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131608490994706282; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(346002)(376002)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(450100002)(4326008)(48376002)(59450400001)(50466002)(6306002)(47776003)(16586007)(2351001)(53936002)(54906003)(316002)(105606002)(106466001)(5660300001)(356003)(68736007)(2906002)(498600001)(6916009)(6666003)(36756003)(81166006)(305945005)(97736004)(26005)(50226002)(8936002)(85426001)(81156014)(86362001)(76176011)(575784001)(2950100002)(104016004)(8676002)(77096007)(51416003)(966005)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2701; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD024; 1:etiywQmpTzg0S8QCSDe0aSDUQ1r2vkruRPhJs308J8mCJYBM7xoJiduNijFAnjQ5t/tXoR7FJ9hhYm/YJt9a2OeFkr36Uu4IyVTn1+j+0KTBAOKBlWuVUSJyVIhRzp7h MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bad19e1f-1800-4218-64a8-08d55f50cd9c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:MWHPR03MB2701; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2701; 3:gSgZc1/mbbSUsf4NfaAEVCAQur2EAkhUKl6jl/YX6Fm7VeQVkqUEqkFmo5AAl4HrOaL8k7B0lgZkKVv1zz2j2ezBEX6v81VWPn8HmjSo9kxz3ZYRsv6VXJYX9fTlcG0D3s+gGv/cCVQpx/9XQzLECCLVB+h99Est3LKcpZgpUDgMi73B+VrXQaGZBnWrm3GBFGb2bWF3USVIFL8vyQHrbyezrD8bzp/o25o3sgXxh2cdZtgnh+oKC3SKIWoJi2y8CLxsvJKNxkdQTnKY0Dj2u9P5g2fWhI37FaJz2NFge/5zkVmOyVVNwBn2PfMhgDDK/WrgJwP6L3JnWWgL1IxMJDKGjUCDcGk1E/jYWKisU3I=; 25:5KHces1AklAGrno60KrhwYc6n7l+BHKMJ6y/VaooNJe6NOWR+OmpPCIek/KEboTgKJrnYKxsSMwsTmF0dFCA2GvF9Y/RixZN0BmVP5CKpn/v2lTZ4De8G8K230Yvo4+/ARqQoifREn5/E+Qta/wByDV2B/zK805E9pqMKAP+FTAoUmh9lSjyaHBDDZnARUHJM2IWjkVWXmXniQk15QVz+Pax58B6AYE0hK4CJOnmbzU3Jmcei5bMXwcw8I148Vc/rA7qtGPX53A30Fegp1zwRvt8CFJ4rFjsz0DZ7lUbzVvjfP45P9Wz9KIXYPoerEx26eProtdeZzhZMW8GjXNsZw== X-MS-TrafficTypeDiagnostic: MWHPR03MB2701: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2701; 31:9LvoNR+HAytCmClmam5GqT1YKFVDMcSZznax+8wTIGuaxSa7or9cue0AUuMRDueuzlGqL+NK5ul1ifStpoWPPo9IABfkxvhtMkbBrQlNfj+m5yOpxrBrhcr1WJRujHYMd6GtgEajLa1Q5fpx5iN9S6xCCAb9Qp4A3Ga4c5zzBnOmYdWANKUCkwA2K2/UlubWvgdx98Zy5a7bV8JYuQ0OSlBomg9q1dVCZfi2dHt5LSY=; 4:1Io0ntaXh+4ObBbDGVQ+AuhE+bL7OQJBUDkyDyvTIms67IDdOS3NK+87NvnbkxRfDhFlcFbTjyO25Y2NOIQmybiBGWgE77cg4yHCD08CYRROwBIcENgXTOuWZlnR9cdjNHnBASe8DDTtkslq7yzbY/alt8RCHtEN9N1EVEeD7gLiGBr2assVf4uyq4kkjQyxi+sZqErpji+9X8HaCrioxGIsXOFnBmgZke5NDNQsEs769D5R/VK/q4CH1fzi9MirZN8pkmOB10YGQJAHWVhQ34RNZd5SXOJaj0jBjdidLs4SmBa8Mn+nbHnXjwxPRytsNqD2zYIwBlAO+q4L4PgPiBZny1EWIlDCr/BYr9tj4rT3ic5vKJwF9iHNdkwcwrTp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(2400079)(944501161)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123565025)(20161123563025)(20161123561025)(20161123559100)(20161123556025)(201708071742011); SRVR:MWHPR03MB2701; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2701; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2701; 23:VfM4oozCSdf1lcAxMacCC+UkGl3u5WJrG13gvqyQs?= =?us-ascii?Q?43azVQWbHw2iGTOZxdjBNzVYimflzD+bGqT4tMbr0+PE6lWJ2xW139uYkbWw?= =?us-ascii?Q?MSfWkHK+lWslbehyl+EsD2aK1sUzfO7aZq1w1QgHEHBr+LasZaCArJt8ud+v?= =?us-ascii?Q?tkxRl3inZdqgZifzZn1nHqnuMcbKq/eJjsaFwA1XJOtXcnqWXPr+bpAh5FTP?= =?us-ascii?Q?D2/veiBPOoNNrql6Rhha11zYg+KqQVBZRGM2Jkgy91liNNASJF9wOb3kB3AA?= =?us-ascii?Q?PVhVbcZSIgl8Mkn4Ft6ynjK8gd9ZJWYORza4F5SNovwdXZJTekFgctSK1C3U?= =?us-ascii?Q?lnLn5aenWeLst8xQZ9h+Ds7KePSPQRqNwc4Bys8+Lga4s/t8iy59psXEapG4?= =?us-ascii?Q?USQynJDPCdmtR7iKNyt9bce5DDEccFmKqmqg+7XUTiuL9nTneb9M53kIz+g5?= =?us-ascii?Q?HXCmk40zlQUXQ7Tao66dHAAoy5KBXFHTQA2RHOGS9ts4GCNhlPGXgCtiJy74?= =?us-ascii?Q?rfhMjaQvfPxD8XR5kWV5DdrTY+qyvuCJcq6knWWt+8Q2wZ3EozP9QLzMxUkC?= =?us-ascii?Q?rREvYclgPumW6GNw4sQhuVKdOjfc30rR8pIfqAWFtAuneHPOKHcI5SPj30E2?= =?us-ascii?Q?p0AcL110ua8fUBQoHuNw8+hDB58s4jo7QcvyMpHrlE9THgU6Vq5bq1mzs5SX?= =?us-ascii?Q?7456tv26ZuzVdCQ+1PisMZhGK7VyglopJ39jA17p3IFldi0yBVz+z0TFVjT8?= =?us-ascii?Q?SNFOl7z6FWJuRrD1hoJEMQSQxnk4dR3+q96Ib6NQEUKnS6t/E1iC3znl2kar?= =?us-ascii?Q?LrP4uE0lQ9dPRwE1Idl2Pa/lMXlEtEc2ASQct2tqV9TT5yH9P9AYpWPUd22g?= =?us-ascii?Q?HMUrJeaukW6yYABUR7LjQ9cEkxqusf4tMqHo0Pic9T7dvOxavPvw/eT7/QwQ?= =?us-ascii?Q?VWlWp+JY7Z1JtmQSqRnR+NsR22m+57rcq4xyOvWqpTki3K7U11otBG/e6PSS?= =?us-ascii?Q?UCK65RRHck7zgYpxBkWAIeAK07XVnxneBxWawDgWQ0lMs/15W26ESQ9dxkbm?= =?us-ascii?Q?DXHmx2kvWH8yU4mVmk4FG+3tqnVDBth19KbB982JigOBAux+Iqt53XWOFzAl?= =?us-ascii?Q?qgFiTF4EetiCPNhwqe4+3FFKGTHdUwcQil0td2kGGQND/lL9L71EIvmjU1Xn?= =?us-ascii?Q?5mq0TqdTDct8ZQ=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2701; 6:rZ0hrFqoTR6igce3uqdZu3Lwhr9+z9Bvq1Cg4mQ0YMOy2V1F7PNArS7joRYbuqi5l+Eyrq4HmMgt1Go/iV2DPTXNqJ79VgPypzGY/w+ffVbYTqdqbiEzw+fxomfZwlSUsYpzxBHMfl5GZyuPTxyAQxwkBIn+WopBF2pLoaDmgDAE6Itu5dhOOP1X5B3vAQRZ+QzkKoGo+cmUV2+9RFayXLQdtU/Ki91IEulHQTsI2YNHMA2Ev9eWkY5zRMnSCbW3NdDRGYL/BX1W2XYDc8RA4r6r0ERQXWICaBJYhVFnuAbgLpwOprnFoLqMgMT8YOZukYAllFxsZ1/R4hI9OxGPW8fbNwVs/Vih9eCDaQzsg4Q=; 5:k0iU56yiN0/r5CrP4jeNb4yHTH0SBknDmbSoQ2iOXwO+oslO0WpvL+ywUCiOZp5n09Gkyx1+ymM+9eMSDrV2JrlHAhR/+d3R1rBMpkqDg376613+zSk8jKg19/7e5oWFwLKkoMeYSZkbxJNBQTpartLMMI3dUF+sfaa22Y1UHxQ=; 24:ZXyN+amleOE7Yu4ZnmnhahW9yOeCI7zsWX9/ksQEVSqggz57BOgFrKyJxNLvMa4llozy3kbH52q+8MEsjF3mUsln8/DLw1s8T3uYwacShvg=; 7:o94fKCov676uzQSCuHcc8JsoSVU+YGwXZQXKH148gQnPdhBOIuJrOQB3mjrE5SQin8uAjsGcvaQF6HZgezmFQyYHFfJ2Y8NJMMdwSi9niN+Audv7PpGAISNfapERzG3KMoiyaOSTKb6lS75Fq55GJ3P17pCV6OuvZj6b+aUEJjn7pxGHEO5F1+2Bx2SwmSnV08i0cl18vBqLfR85GFIA9LHuljRAwv/Iyvk+UYPvqe2pLGSIc6WnF4JnZWgTYvcv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 15:24:57.3334 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bad19e1f-1800-4218-64a8-08d55f50cd9c 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: MWHPR03MB2701 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Dong Aisheng --- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/imx7ulp-evk.dts | 87 +++++++++++++++ arch/arm/boot/dts/imx7ulp.dtsi | 202 +++++++++++++++++++++++++++++++++++ arch/arm/configs/imx_v6_v7_defconfig | 16 ++- arch/arm/mach-imx/Kconfig | 9 ++ arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/common.h | 1 + arch/arm/mach-imx/cpu.c | 3 + arch/arm/mach-imx/mach-imx7ulp.c | 37 +++++++ arch/arm/mach-imx/mxc.h | 1 + arch/arm/mach-imx/pm-imx7ulp.c | 32 ++++++ 11 files changed, 381 insertions(+), 10 deletions(-) create mode 100644 arch/arm/boot/dts/imx7ulp-evk.dts create mode 100644 arch/arm/boot/dts/imx7ulp.dtsi create mode 100644 arch/arm/mach-imx/mach-imx7ulp.c create mode 100644 arch/arm/mach-imx/pm-imx7ulp.c diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index d0381e9..3257e71 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -519,6 +519,8 @@ dtb-$(CONFIG_SOC_IMX7D) += \ imx7d-sdb-sht11.dtb \ imx7s-colibri-eval-v3.dtb \ imx7s-warp.dtb +dtb-$(CONFIG_SOC_IMX7ULP) += \ + imx7ulp-evk.dtb dtb-$(CONFIG_SOC_LS1021A) += \ ls1021a-qds.dtb \ ls1021a-twr.dtb diff --git a/arch/arm/boot/dts/imx7ulp-evk.dts b/arch/arm/boot/dts/imx7ulp-evk.dts new file mode 100644 index 0000000..cc4e6ef --- /dev/null +++ b/arch/arm/boot/dts/imx7ulp-evk.dts @@ -0,0 +1,87 @@ +/* + * Copyright 2017 NXP + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; + +#include "imx7ulp.dtsi" + +/ { + model = "NXP i.MX7ULP EVK"; + compatible = "fsl,imx7ulp-evk", "fsl,imx7ulp", "Generic DT based system"; + + chosen { + bootargs = "console=ttyLP0,115200 earlycon=lpuart32,0x402D0010,115200"; + stdout-path = &lpuart4; + }; + + memory { + device_type = "memory"; + reg = <0x60000000 0x40000000>; + }; +}; + +&lpuart4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lpuart4>; + status = "okay"; +}; + +&usdhc0 { + pinctrl-names = "default"; + pinctrl-0 = <>; + pinctrl-0 = <&pinctrl_usdhc0_cmd_data>, <&pinctrl_usdhc0_clk>; +// <&pinctrl_usdhc0_cd>, <&pinctrl_usdhc0_rst>; + status = "okay"; +}; + +&iomuxc1 { + pinctrl_lpuart4: lpuart4grp { + pins = < + IMX7ULP_PAD_PTC3__LPUART4_RX + IMX7ULP_PAD_PTC2__LPUART4_TX + >; + bias-pull-up; + }; + + pinctrl_usdhc0_cmd_data: usdhc0_cmd_data_0_3_grp { + pins = < + IMX7ULP_PAD_PTD1__SDHC0_CMD + IMX7ULP_PAD_PTD2__SDHC0_CLK + IMX7ULP_PAD_PTD7__SDHC0_D3 + IMX7ULP_PAD_PTD8__SDHC0_D2 + IMX7ULP_PAD_PTD9__SDHC0_D1 + IMX7ULP_PAD_PTD10__SDHC0_D0 + >; + drive-strength = <1>; + bias-pull-up; + }; + + pinctrl_usdhc0_clk: usdhc0_clk_grp { + pins = < + IMX7ULP_PAD_PTD2__SDHC0_CLK + >; + drive-strength = <1>; + bias-pull-down; + }; + + pinctrl_usdhc0_cd: usdhc0_gpios_cd_grp { + pins = < + IMX7ULP_PAD_PTC10__PTC10 /* USDHC0 CD */ + >; + nxp,input-buffer-enable; + bias-pull-up; + }; + + pinctrl_usdhc0_rst: usdhc0_gpios_rst_grp { + pins = < + IMX7ULP_PAD_PTD0__PTD0 /* USDHC0 RST */ + >; + nxp,output-buffer-enable; + bias-pull-up; + }; +}; diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi new file mode 100644 index 0000000..05410ba --- /dev/null +++ b/arch/arm/boot/dts/imx7ulp.dtsi @@ -0,0 +1,202 @@ +/* + * Copyright NXP + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include "skeleton.dtsi" + +#include "imx7ulp-pinfunc.h" + +/ { + interrupt-parent = <&intc>; + + aliases { + serial0 = &lpuart4; + serial1 = &lpuart6; + serial2 = &lpuart5; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu0: cpu@0 { + compatible = "arm,cortex-a7"; + device_type = "cpu"; + reg = <0>; + }; + }; + + intc: interrupt-controller@40021000 { + compatible = "arm,cortex-a7-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0x40021000 0x1000>, + <0x40022000 0x100>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <0>; + rosc: clock@0 { + compatible = "fixed-clock"; + reg = <0>; + clock-frequency = <32768>; + clock-output-names = "rosc"; + #clock-cells = <0>; + }; + + sosc: clock@1 { + compatible = "fixed-clock"; + reg = <1>; + clock-frequency = <24000000>; + clock-output-names = "sosc"; + #clock-cells = <0>; + }; + + sirc: clock@2 { + compatible = "fixed-clock"; + reg = <2>; + clock-frequency = <16000000>; + clock-output-names = "sirc"; + #clock-cells = <0>; + }; + + firc: clock@3 { + compatible = "fixed-clock"; + reg = <3>; + clock-frequency = <48000000>; + clock-output-names = "firc"; + #clock-cells = <0>; + }; + + upll: clock@4 { + compatible = "fixed-clock"; + reg = <4>; + clock-frequency = <480000000>; + clock-output-names = "upll"; + #clock-cells = <0>; + }; + + mpll: clock@5 { + compatible = "fixed-clock"; + reg = <5>; + clock-frequency = <480000000>; + clock-output-names = "mpll"; + #clock-cells = <0>; + }; + }; + + timer { + compatible = "arm,armv7-timer"; + arm,cpu-registers-not-fw-configured; + interrupts = , + ; + interrupt-parent = <&intc>; + clock-frequency = <1000000>; + status = "disabled"; + }; + + sram: sram@20000000 { + compatible = "fsl,lpm-sram"; + reg = <0x20008000 0x4000>; + }; + + ahbbridge0: ahb-bridge0@40000000 { + compatible = "fsl,aips-bus", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x40000000 0x800000>; + ranges; + + lpuart4: serial@402D0000 { + compatible = "fsl,imx7ulp-lpuart"; + reg = <0x402D0000 0x1000>; + interrupts = ; + clocks = <&clks IMX7ULP_CLK_LPUART4>; + clock-names = "ipg"; + assigned-clocks = <&clks IMX7ULP_CLK_LPUART4>; + assigned-clock-parents = <&clks IMX7ULP_CLK_SOSC_BUS_CLK>; + assigned-clock-rates = <24000000>; + status = "disabled"; + }; + + lpuart5: serial@402E0000 { + compatible = "fsl,imx7ulp-lpuart"; + reg = <0x402E0000 0x1000>; + interrupts = ; + assigned-clocks = <&clks IMX7ULP_CLK_LPUART5>; + assigned-clock-parents = <&clks IMX7ULP_CLK_FIRC>; + assigned-clock-rates = <48000000>; + status = "disabled"; + }; + + tpm5: tpm@40260000 { + compatible = "fsl,imx7ulp-tpm"; + reg = <0x40260000 0x1000>; + interrupts = ; + clocks = <&clks IMX7ULP_CLK_NIC1_BUS_DIV>, + <&clks IMX7ULP_CLK_LPTPM5>; + clock-names = "ipg", "per"; + }; + + usdhc0: usdhc@40370000 { + compatible = "fsl,imx7ulp-usdhc", "fsl,imx6sl-usdhc"; + reg = <0x40370000 0x10000>; + interrupts = ; + clocks = <&clks IMX7ULP_CLK_NIC1_BUS_DIV>, + <&clks IMX7ULP_CLK_NIC1_DIV>, + <&clks IMX7ULP_CLK_USDHC0>; + clock-names ="ipg", "ahb", "per"; + bus-width = <4>; + status = "disabled"; + }; + + clks: scg1@403e0000 { + compatible = "fsl,imx7ulp-clock"; + reg = <0x403e0000 0x10000>, + <0x403f0000 0x10000>, + <0x40b30000 0x10000>; + reg-names = "scg1", "pcc2", "pcc3"; + clocks = <&rosc>, <&sosc>, <&sirc>, + <&firc>, <&upll>, <&mpll>; + clock-names = "rosc", "sosc", "sirc", + "firc", "upll", "mpll"; + assigned-clocks = <&clks IMX7ULP_CLK_LPTPM5>, + <&clks IMX7ULP_CLK_USDHC1>; + assigned-clock-parents = <&clks IMX7ULP_CLK_SOSC_BUS_CLK>, + <&clks IMX7ULP_CLK_NIC1_DIV>; + #clock-cells = <1>; + }; + + smc1: smc1@40410000 { + compatible = "fsl,imx7ulp-smc1"; + reg = <0x40410000 0x1000>; + }; + }; + + ahbbridge1: ahb-bridge1@40800000 { + compatible = "fsl,aips-bus", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x40800000 0x800000>; + ranges; + + iomuxc1: iomuxc1@40ac0000 { + compatible = "fsl,imx7ulp-iomuxc1"; + reg = <0x40ac0000 0x1000>; + }; + + lpuart6: serial@40A60000 { + compatible = "fsl,imx7ulp-lpuart"; + reg = <0x40A60000 0x1000>; + interrupts = ; + status = "disabled"; + }; + }; +}; diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 0d44949..3ce8ff6 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -41,6 +41,7 @@ CONFIG_SOC_IMX6SL=y CONFIG_SOC_IMX6SX=y CONFIG_SOC_IMX6UL=y CONFIG_SOC_IMX7D=y +CONFIG_SOC_IMX7ULP=y CONFIG_SOC_VF610=y CONFIG_PCI=y CONFIG_PCI_MSI=y @@ -48,9 +49,7 @@ CONFIG_PCI_IMX6=y CONFIG_SMP=y CONFIG_ARM_PSCI=y CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y CONFIG_HIGHMEM=y -CONFIG_CMA=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" CONFIG_KEXEC=y @@ -81,7 +80,6 @@ CONFIG_CAN_FLEXCAN=y CONFIG_BT=y CONFIG_BT_HCIUART=y CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_LL=y CONFIG_CFG80211=y CONFIG_CFG80211_WEXT=y CONFIG_MAC80211=y @@ -90,7 +88,6 @@ CONFIG_RFKILL_INPUT=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set -CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=64 CONFIG_IMX_WEIM=y CONFIG_CONNECTOR=y @@ -167,9 +164,9 @@ CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_ADS7846=y CONFIG_TOUCHSCREEN_EGALAX=y +CONFIG_TOUCHSCREEN_MAX11801=y CONFIG_TOUCHSCREEN_IMX6UL_TSC=y CONFIG_TOUCHSCREEN_EDT_FT5X06=y -CONFIG_TOUCHSCREEN_MAX11801=y CONFIG_TOUCHSCREEN_MC13783=y CONFIG_TOUCHSCREEN_TSC2004=y CONFIG_TOUCHSCREEN_TSC2007=y @@ -178,7 +175,6 @@ CONFIG_TOUCHSCREEN_SX8654=y CONFIG_TOUCHSCREEN_COLIBRI_VF50=y CONFIG_INPUT_MISC=y CONFIG_INPUT_MMA8450=y -CONFIG_HID_MULTITOUCH=y CONFIG_SERIO_SERPORT=m # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_IMX=y @@ -228,13 +224,13 @@ CONFIG_REGULATOR_GPIO=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_REGULATOR_PFUZE100=y +CONFIG_RC_CORE=y +CONFIG_RC_DEVICES=y +CONFIG_IR_GPIO_CIR=y CONFIG_MEDIA_SUPPORT=y CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_RC_CORE=y CONFIG_MEDIA_CONTROLLER=y CONFIG_VIDEO_V4L2_SUBDEV_API=y -CONFIG_RC_DEVICES=y -CONFIG_IR_GPIO_CIR=y CONFIG_MEDIA_USB_SUPPORT=y CONFIG_USB_VIDEO_CLASS=m CONFIG_V4L_PLATFORM_DRIVERS=y @@ -245,7 +241,6 @@ CONFIG_VIDEO_CODA=m # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set CONFIG_VIDEO_ADV7180=m CONFIG_VIDEO_OV5640=m -CONFIG_SOC_CAMERA_OV2640=y CONFIG_IMX_IPUV3_CORE=y CONFIG_DRM=y CONFIG_DRM_PANEL_SIMPLE=y @@ -283,6 +278,7 @@ CONFIG_SND_SOC_CS42XX8_I2C=y CONFIG_SND_SOC_TLV320AIC3X=y CONFIG_SND_SOC_WM8960=y CONFIG_SND_SIMPLE_CARD=y +CONFIG_HID_MULTITOUCH=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_MXC=y diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 782699e..54002c3 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -554,6 +554,15 @@ comment "Cortex-A/Cortex-M asymmetric multiprocessing platforms" if ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M +config SOC_IMX7ULP + bool "i.MX7ULP support" + select ARM_GIC + select CLKSRC_IMX_TPM + select HAVE_ARM_ARCH_TIMER + select PINCTRL_IMX7ULP + help + This enables support for Freescale i.MX7 Ultra Low Power processor. + config SOC_VF610 bool "Vybrid Family VF610 support" select ARM_GIC if ARCH_MULTI_V7 diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 8ff7105..69c2517 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -81,6 +81,7 @@ obj-$(CONFIG_SOC_IMX6SL) += mach-imx6sl.o obj-$(CONFIG_SOC_IMX6SX) += mach-imx6sx.o obj-$(CONFIG_SOC_IMX6UL) += mach-imx6ul.o obj-$(CONFIG_SOC_IMX7D) += mach-imx7d.o +obj-$(CONFIG_SOC_IMX7ULP) += mach-imx7ulp.o pm-imx7ulp.o ifeq ($(CONFIG_SUSPEND),y) AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index b09a2ec..b0e85df 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -128,6 +128,7 @@ void imx6dl_pm_init(void); void imx6sl_pm_init(void); void imx6sx_pm_init(void); void imx6ul_pm_init(void); +void imx7ulp_pm_init(void); #ifdef CONFIG_PM void imx51_pm_init(void); diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index d4e55f2..46f344f 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -138,6 +138,9 @@ struct device * __init imx_soc_device_init(void) case MXC_CPU_IMX7D: soc_id = "i.MX7D"; break; + case MXC_CPU_IMX7ULP: + soc_id = "i.MX7ULP"; + break; default: soc_id = "Unknown"; } diff --git a/arch/arm/mach-imx/mach-imx7ulp.c b/arch/arm/mach-imx/mach-imx7ulp.c new file mode 100644 index 0000000..9f7a25c --- /dev/null +++ b/arch/arm/mach-imx/mach-imx7ulp.c @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright (C) 2017 NXP + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include +#include +#include + +#include "common.h" +#include "hardware.h" + +static void __init imx7ulp_init_machine(void) +{ + imx7ulp_pm_init(); + + mxc_set_cpu_type(MXC_CPU_IMX7ULP); + imx_print_silicon_rev("i.MX7ULP", IMX_CHIP_REVISION_1_0); + of_platform_default_populate(NULL, NULL, imx_soc_device_init()); +} + +static const char *const imx7ulp_dt_compat[] __initconst = { + "fsl,imx7ulp", + NULL, +}; + +DT_MACHINE_START(IMX7ulp, "Freescale i.MX7ULP (Device Tree)") + .init_machine = imx7ulp_init_machine, + .dt_compat = imx7ulp_dt_compat, +MACHINE_END diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h index e00d626..ac9677b 100644 --- a/arch/arm/mach-imx/mxc.h +++ b/arch/arm/mach-imx/mxc.h @@ -41,6 +41,7 @@ #define MXC_CPU_IMX6UL 0x64 #define MXC_CPU_IMX6ULL 0x65 #define MXC_CPU_IMX7D 0x72 +#define MXC_CPU_IMX7ULP 0xff #define IMX_DDR_TYPE_LPDDR2 1 diff --git a/arch/arm/mach-imx/pm-imx7ulp.c b/arch/arm/mach-imx/pm-imx7ulp.c new file mode 100644 index 0000000..00401e0 --- /dev/null +++ b/arch/arm/mach-imx/pm-imx7ulp.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2016 Freescale Semiconductor, Inc. + * Copyright (C) 2017 NXP + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +#include +#include +#include + +#define SMC_PMCTRL 0x10 +#define BP_PMCTRL_PSTOPO 16 +#define PSTOPO_PSTOP3 0x3 + +void __init imx7ulp_pm_init(void) +{ + struct device_node *np; + void __iomem *smc1_base; + + np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1"); + smc1_base = of_iomap(np, 0); + WARN_ON(!smc1_base); + + /* Partial Stop mode 3 with system/bus clock enabled */ + writel_relaxed(PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO, smc1_base + SMC_PMCTRL); +}