From patchwork Thu Nov 29 01:49:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10703773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0060215A8 for ; Thu, 29 Nov 2018 01:50:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7B6C2D4BE for ; Thu, 29 Nov 2018 01:50:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB7352DFC3; Thu, 29 Nov 2018 01:50:23 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 6E30E2D4BE for ; Thu, 29 Nov 2018 01:50:23 +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=WHgQaLsV1wBTRotZQP1II7+ase17epqVMtnTaA0ls1k=; b=LXWDLd/7gK0bl3 f5+ZkKWCtHL0rJW0OxEMAnN0loURNa4dgR8XTvljgSpCunQc5207brSN/mcuSqygMMfP9g7ehp+Ks ZeYvfBmFUY5pO0IpgmooZsfR6a7Y2QMm1J5bn6bhsXbHxGekUQyqVdhwMQ0PeMJaDWPBKCXanMALb eDLl6Eu6NjNRehQ3pIJ42gFLKBE6011OL1XMToFHM0Oxvp2B0NugTZm+eLxW+LsGmF3DvFS/R1bBf VgrGhbmp8rvhhbu5ERyqtBwwAByDpvXm2chxHtZ9dcQLIT7ibiMMqxk6U3979YQj9VhiukHt0wY/l 6FfPhxajo+AXVlofRA5g==; 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 1gSBT5-0000bt-PC; Thu, 29 Nov 2018 01:50:15 +0000 Received: from mail-he1eur02on0621.outbound.protection.outlook.com ([2a01:111:f400:fe05::621] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSBT2-0007iZ-Fv for linux-arm-kernel@lists.infradead.org; Thu, 29 Nov 2018 01:50:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oKjfdlfTufn/6WM5DbBbvEtt1I5sJDVpyJNBXPNoL+w=; b=l7hm6BSp6BKDva9pZcuiatB3AdMIqpR8sJkIPu3drc0jN4b3VSuvv/vLv9H5pnrRc/wmpcUDGcNYQbjkVWDT6CnInFEs9VN1ZLGJ+ylxoeZC6L6PsaiHUxHrzH/KhgmGNZhaDoeQ/r7AqyN/wytSM2AxXimrIm8ECcDpUz2rzNA= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3930.eurprd04.prod.outlook.com (52.134.71.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.20; Thu, 29 Nov 2018 01:49:57 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::adf8:f49d:deb4:58fd%2]) with mapi id 15.20.1361.019; Thu, 29 Nov 2018 01:49:57 +0000 From: Anson Huang To: "a.zummo@towertech.it" , "alexandre.belloni@bootlin.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Aisheng DONG , Andy Gross , "arnd@arndb.de" , "horms+renesas@verge.net.au" , "heiko@sntech.de" , "bjorn.andersson@linaro.org" , "enric.balletbo@collabora.com" , "amit.kucheria@linaro.org" , "ezequiel@collabora.com" , "olof@lixom.net" , "LW@KARO-electronics.de" , "shawnguo@kernel.org" , "linux-rtc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: [PATCH V4 0/4] Add i.MX system controller RTC driver Thread-Topic: [PATCH V4 0/4] Add i.MX system controller RTC driver Thread-Index: AQHUh4XVDagmHqVV106EeG0wt2T6cg== Date: Thu, 29 Nov 2018 01:49:57 +0000 Message-ID: <1543455856-18021-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK2PR03CA0045.apcprd03.prod.outlook.com (2603:1096:202:17::15) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0402MB3930; 6:FehLTAuyB6MlcU52fscn2en1OistGiHClUfIu8et2X6l/1yTNlEJmTvO5EESkCxA7DoY/6tsId87W8l/P7mtqP2akCT8sGfUheprKz2SSxieUq6hkE0Gb2+oPNIjwRaX8K2Vmm0WTqpiZXR1xUBvPCkZWsQpLxSZT1Bq9K+dxvg7hpQ9/DAfGV4WsKDdi6orUUbbevTmDlIyEYLsgYObGclirx/moWZkdgbdiQY9V+ekToabmGJyke3RQlybyAdJ8gCZKcXcgTbsNw9ia8BQUX6tYTxvOaYbUsdhWC2/uQR+i81gu+irYIeeMSK1WYEQ1TXnKiFwHy6juuYjnkSEpQO6tgOhx4yI4BGueRYoYK/Wt+2PX28WEZwE+Tml60hf36u1omeg3PNpBW0HIOqpmUIF5fdKGnrc/4k4ykssgN4Y07KAvE0OH0FWVzuEi94WXcAekriMsvsk0v1pVaPgiA==; 5:7Fd2eYZ6VxyHa0RHHpTVh/csTsDgcRpcfanNklLjD5aRTFUj8KVMycJmJy0gtmBt3mjaWYjTQVOeq/D2JVU7tBClB5PjIhyezgJQeLT+0OaPQ7dIfwl8lgV2BaTUFODlm56S4u5PpkiHmBTt7GZNgWj5ubygTHM++ceUjjlhgBY=; 7:jS2QMXbVJf6BraZ+VpSYC1W4cJgYIqj6bLFVuoCM88gvPHjO2msDaE/inTW11cQhaDqdQ++KiQO49yMFNt4xERsFuHdFV9Bs6juZaYJtDms/eaIGb9vUZ5yNHf01Rn67aJSixOQMBfS/unrO9jfwxA== x-ms-office365-filtering-correlation-id: 6dcedd22-9b76-435d-b4ae-08d6559cf737 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB3PR0402MB3930; x-ms-traffictypediagnostic: DB3PR0402MB3930: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231453)(999002)(944501410)(52105112)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:DB3PR0402MB3930; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0402MB3930; x-forefront-prvs: 0871917CDA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(396003)(136003)(376002)(366004)(189003)(199004)(110136005)(2501003)(316002)(3846002)(6116002)(52116002)(7416002)(71200400001)(305945005)(478600001)(25786009)(6512007)(53936002)(7736002)(14454004)(99286004)(36756003)(5660300001)(97736004)(4326008)(6306002)(86362001)(81156014)(6506007)(81166006)(102836004)(8676002)(2201001)(68736007)(6436002)(6486002)(50226002)(386003)(2906002)(105586002)(186003)(106356001)(2616005)(26005)(256004)(8936002)(476003)(66066001)(71190400001)(486006)(966005)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0402MB3930; H:DB3PR0402MB3916.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: KwQmLuHl1uqba8Mdd17CtTbXdwBWE3RlYHhwlQxzG4sSpcie9jFbY+r/lqWvw/HpYEtUki2QDaCjeraluNTcAEig+iuKYKhAN0R9uUK1wW+8tlXzIP9jUGhvBc13YHqmaR2IQE9e2BrAKrUwkFaYR5DOVhFDhkPnapqF4VxU4kAU3Att0vuDM0lfE8uwOv9KK1RVOnI3N5JP+yG++2+icascW8qqdKTrpo+uzW+zwo6aCmJOZxyhZ6QiVuwlXvAlgv0VRYKyvl2tLAJtKvPoXCPP2t/xIFydbIr5xMPdqhmsM5m0/sFb57YRnzgI1CKMy5z7ysXDauL5PiEfYj0vvE07TcDOTxWJJWfy74621DE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6dcedd22-9b76-435d-b4ae-08d6559cf737 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2018 01:49:57.5386 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3930 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_175012_590904_6E7C3DD5 X-CRM114-Status: GOOD ( 12.23 ) 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: dl-linux-imx 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 NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller, the system controller is in charge of system power, clock and secure RTC etc. management, Linux kernel has to communicate with system controller via MU (message unit) IPC to do RTC operation. Since the RTC set time MUST to be done in secure EL3 mode (required by system controller firmware) and ALARM functions needs to be done with general MU IRQ handle, these are NOT ready NOW, so this patch ONLY supports RTC read time for now. Note that this patch set is based on [V4,5/5] defconfig: arm64: add imx8qxp support, https://patchwork.kernel.org/patch/10677315/ Anson Huang (4): rtc: add i.MX system controller RTC support dt-bindings: rtc: add binding doc for i.MX system controller RTC driver defconfig: arm64: add i.MX system controller RTC support ARM64: dts: imx: add i.MX8QXP system controller RTC support .../devicetree/bindings/rtc/rtc-imx-sc.txt | 10 ++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 4 + arch/arm64/configs/defconfig | 1 + drivers/rtc/Kconfig | 6 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-imx-sc.c | 104 +++++++++++++++++++++ 6 files changed, 126 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-imx-sc.txt create mode 100644 drivers/rtc/rtc-imx-sc.c