From patchwork Mon Jan 28 17:29:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 10784153 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 125F11390 for ; Mon, 28 Jan 2019 17:32:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F064A2BE2B for ; Mon, 28 Jan 2019 17:32:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E43942BE33; Mon, 28 Jan 2019 17:32:05 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 87C462BE33 for ; Mon, 28 Jan 2019 17:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730431AbfA1Rb7 (ORCPT ); Mon, 28 Jan 2019 12:31:59 -0500 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25433 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730136AbfA1Rb6 (ORCPT ); Mon, 28 Jan 2019 12:31:58 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1548696679; cv=none; d=zoho.com; s=zohoarc; b=ddMIIsv9TA/YQJhNlRNL4OYLTZLcZFZP+WEMImEYp85m0B0sUvuEhc2vgc+UlaxhVqMMdAHwdsLGxjaPpjstaJ2ZMfvx/wVewHcJox+bnDZjQg5/jXy8jFOTxZ4+xspLjlwj62zu6Pz8N/ok7EEBxvRcsPkgzNadwLM6vMxwI7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1548696679; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=JCIEz/20JAonFJ+lboQH2xyKwW1qYqwbsPE71m3Y2k0=; b=YJRTygTIaVCPQUjy1j9TrY0nztm4GmIWa3NQo5uTkMuQIdJOevm83EK6UPPFoomwozWfxlFitU2w1DBwqJ+Id3JYCHkDy2kQkQcYfgMk1XMeCHTl000BuKkhcipfL7UaSekuWaDxWUAYNyRQf3iLlJ1KpygO3LPIDeMnHt7Hg2Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=smANOio4TH2jiVojIGPISEbZpufJcvfD/kCHh3VBWwhC3MZpYRGljVdIf7+Iz6Is0V3Xu0fXP56j RFeVtvutw/eNphoQeEy0ewhtn2SejDi8QK+RqmKhfIUwa9Qj3oec DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1548696679; s=default; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=1728; bh=JCIEz/20JAonFJ+lboQH2xyKwW1qYqwbsPE71m3Y2k0=; b=roTtRAOA1FESPif0vHEHcJ0ttLFbKYqDG2y/rEvNUoEfOzJVO55097PZzQknEw2F RN3r0ECNUnkfyEJuP9treBxM8y3xkYpdG9Yki8h1EgFtquZGeAayOo1BVeYPYUBtmhN 4Ov0jTdGO72pl0Nbe2dPDVb8O9BXlh5kNR2OufXw= Received: from localhost.localdomain (171.221.112.7 [171.221.112.7]) by mx.zohomail.com with SMTPS id 1548696678305861.8532035662225; Mon, 28 Jan 2019 09:31:18 -0800 (PST) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org, paul.burton@mips.com, mark.rutland@arm.com, syq@debian.org, jiaxun.yang@flygoat.com, 772753199@qq.com Subject: [PATCH 1/3] RTC: Ingenic: Add support for the X1000. Date: Tue, 29 Jan 2019 01:29:57 +0800 Message-Id: <1548696599-53639-2-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548696599-53639-1-git-send-email-zhouyanjie@zoho.com> References: <1548696599-53639-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for probing the rtc-jz4740 driver on the X1000 Soc from Ingenic. Signed-off-by: Zhou Yanjie --- drivers/rtc/rtc-jz4740.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index d0a8917..0c7ae65 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c @@ -34,7 +34,7 @@ #define JZ_REG_RTC_RESET_COUNTER 0x28 #define JZ_REG_RTC_SCRATCHPAD 0x34 -/* The following are present on the jz4780 */ +/* The following are present on the jz4780 and x1000 */ #define JZ_REG_RTC_WENR 0x3C #define JZ_RTC_WENR_WEN BIT(31) @@ -46,7 +46,7 @@ #define JZ_RTC_CTRL_AE BIT(2) #define JZ_RTC_CTRL_ENABLE BIT(0) -/* Magic value to enable writes on jz4780 */ +/* Magic value to enable writes on jz4780 and x1000 */ #define JZ_RTC_WENR_MAGIC 0xA55A #define JZ_RTC_WAKEUP_FILTER_MASK 0x0000FFE0 @@ -55,6 +55,7 @@ enum jz4740_rtc_type { ID_JZ4740, ID_JZ4780, + ID_X1000, }; struct jz4740_rtc { @@ -301,6 +302,7 @@ static void jz4740_rtc_power_off(void) static const struct of_device_id jz4740_rtc_of_match[] = { { .compatible = "ingenic,jz4740-rtc", .data = (void *)ID_JZ4740 }, { .compatible = "ingenic,jz4780-rtc", .data = (void *)ID_JZ4780 }, + { .compatible = "ingenic,x1000-rtc", .data = (void *)ID_X1000 }, {}, }; MODULE_DEVICE_TABLE(of, jz4740_rtc_of_match); @@ -429,6 +431,7 @@ static const struct dev_pm_ops jz4740_pm_ops = { static const struct platform_device_id jz4740_rtc_ids[] = { { "jz4740-rtc", ID_JZ4740 }, { "jz4780-rtc", ID_JZ4780 }, + { "x1000-rtc", ID_X1000 }, {} }; MODULE_DEVICE_TABLE(platform, jz4740_rtc_ids); From patchwork Mon Jan 28 17:29:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 10784155 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 6C7591390 for ; Mon, 28 Jan 2019 17:32:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57C462BC1C for ; Mon, 28 Jan 2019 17:32:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 560982BE51; Mon, 28 Jan 2019 17:32:37 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 0BD242BC1C for ; Mon, 28 Jan 2019 17:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728755AbfA1Rca (ORCPT ); Mon, 28 Jan 2019 12:32:30 -0500 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25445 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbfA1Rca (ORCPT ); Mon, 28 Jan 2019 12:32:30 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1548696689; cv=none; d=zoho.com; s=zohoarc; b=Ad8O/IKz6iUsuVFaGI9JxB+J2e+/sn2NZ7HxVYDaAojYNr/3NRAieVeq4jy4DFv18upWzANRIAQPUi67OhsNqZX3hjWp+fP0uDwdIU1r/mAE+QRiPSG63V9BeorDaGGSCoPSCWumLTdN3CYeWdn3rM/fgP9UPfa/1kUGPTCI4PY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1548696689; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=tlUMz/9XyBzyNUGs+f98DBJkkC8vBaUq0Vz9AV1qX7c=; b=g8OT7gLFWB0ZOcszNFCk93RMtq2i8B0QlbtrBeOGVaChDLPpnSCkH7ffLtXSTyYKWjCPyApmGUDqkw8UY6PPod0cV3KfSqGIKACNzY8NQEXq7dUMoCbN4SUH+juHc6tJ/CZGZ8D3p6Aqc3U3w2hNHbCfY3kasHjkDKul9JDKhV0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=E2FzBMcIFv28LFCXnwAIq07IcgV7B2ikVvGA8C+6zoGlYIcM01Zge9kR+IX/IaXipEwgqjRXU2lc FRXdMJykMFjOLhuCNrzePSj/j66di/VE3IPsAsjEtoHqhyFqze+b DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1548696689; s=default; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=890; bh=tlUMz/9XyBzyNUGs+f98DBJkkC8vBaUq0Vz9AV1qX7c=; b=GCe5lUSYdsYNBZy6uoZNIXHm3YhMyWP86aiakQnjb+T1Ns47MTlNdMce/PsdgF6s 4N+NY8BcplIl+3Oq27WrUjsR5l+NMlHqNxTQVp5oOd96iQE5/FzCEGv3PIKRA5UerzL 9mFeuVHfCWCZRatHvQz1Mr41DgvkLOtDQww9ptog= Received: from localhost.localdomain (171.221.112.7 [171.221.112.7]) by mx.zohomail.com with SMTPS id 1548696688032977.7950250734209; Mon, 28 Jan 2019 09:31:28 -0800 (PST) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org, paul.burton@mips.com, mark.rutland@arm.com, syq@debian.org, jiaxun.yang@flygoat.com, 772753199@qq.com Subject: [PATCH 2/3] Dt-bindings: RTC: Add X1000 RTC bindings. Date: Tue, 29 Jan 2019 01:29:58 +0800 Message-Id: <1548696599-53639-3-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548696599-53639-1-git-send-email-zhouyanjie@zoho.com> References: <1548696599-53639-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the RTC bindings for the X1000 Soc from Ingenic. Signed-off-by: Zhou Yanjie --- Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt b/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt index 41c7ae1..7ce0018 100644 --- a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt +++ b/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt @@ -5,6 +5,7 @@ Required properties: - compatible: One of: - "ingenic,jz4740-rtc" - for use with the JZ4740 SoC - "ingenic,jz4780-rtc" - for use with the JZ4780 SoC + - "ingenic,x1000-rtc" - for use with the X1000 SoC - reg: Address range of rtc register set - interrupts: IRQ number for the alarm interrupt - clocks: phandle to the "rtc" clock From patchwork Mon Jan 28 17:29:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 10784157 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 BE685922 for ; Mon, 28 Jan 2019 17:33:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A936D2BE2B for ; Mon, 28 Jan 2019 17:33:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D5362BE56; Mon, 28 Jan 2019 17:33:16 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 4D5FB2BE2B for ; Mon, 28 Jan 2019 17:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730376AbfA1RdB (ORCPT ); Mon, 28 Jan 2019 12:33:01 -0500 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25457 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729351AbfA1RdA (ORCPT ); Mon, 28 Jan 2019 12:33:00 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1548696701; cv=none; d=zoho.com; s=zohoarc; b=YIyjRszvDDBO4ukdquYlxg4eSL4lUQ+76YchNpOvAK1JFOZnm6wbwDSpJdjScuKtKFxJx+08SfwfzzJKmA7TredE5UoUbVFaBqab4FsxqVdfEkUXVLfn1RnqQH7IU9PVgMCuKOKJhyARdx4UWPji7HNz938ph2R2hbIVg8ah2j8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1548696701; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=Hb4V+UUvIgOaR8+FOF5/tTTgrHynv8qZbzdGENKIw/Q=; b=XVM0urhhPK9ey61YhnF/MvKgX7/pwlRHfKqG5VZA8VIt3351Z/jDIOldqJQnRRVUE1a5wyrnXYrp184z7lug88ZXPltpN6bCbYJntvRjZYqdeC7R9IMOax4G9OXZ1dxxggfPSdcXY5Z1eCv3n9rQqXZ8TU9Yxx53e5wboudn7jE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=v5YhN9/MkxYpgRBAN/Pcn302sEFc518gtDgjgI3Yv3KlJo3vpAUBUeeyMpXhg+kbqxAwH1WyVX66 hmiuJ2iMyHnul8UPZt3rC1L9D5Ha+H+obTusVsnFI8JfFcTinUKe DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1548696701; s=default; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=2150; bh=Hb4V+UUvIgOaR8+FOF5/tTTgrHynv8qZbzdGENKIw/Q=; b=Vi6ujWBWAwhzv4JQ46bQVmShIvKBfISlINOq/qYfwK3TVK40ZrhgiqTd7nT2ilIx ZD0qoR9iFNtNj+Z+amzYBF28PEbDVXP0nkMXEb144GAVn9GDHJidVbjDZAmo6FjSMnS DssU0H/0paMQsnEYkgSlEwYQyJovt6RmAKAgxorE= Received: from localhost.localdomain (171.221.112.7 [171.221.112.7]) by mx.zohomail.com with SMTPS id 1548696698449303.6388026767029; Mon, 28 Jan 2019 09:31:38 -0800 (PST) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org, paul.burton@mips.com, mark.rutland@arm.com, syq@debian.org, jiaxun.yang@flygoat.com, 772753199@qq.com Subject: [PATCH 3/3] RTC: Ingenic: Replace jz47xx with XBurst. Date: Tue, 29 Jan 2019 01:29:59 +0800 Message-Id: <1548696599-53639-4-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548696599-53639-1-git-send-email-zhouyanjie@zoho.com> References: <1548696599-53639-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Ingenic had changed their product code name. Latest SoCs had divided to several series such as T30/M200/X1000 and no longer called JZ47xx. Signed-off-by: Zhou Yanjie --- drivers/rtc/Kconfig | 4 ++-- drivers/rtc/rtc-jz4740.c | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 225b0b8..8b41853 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -1576,10 +1576,10 @@ config RTC_DRV_MPC5121 will be called rtc-mpc5121. config RTC_DRV_JZ4740 - tristate "Ingenic JZ4740 SoC" + tristate "Ingenic XBurst SoC" depends on MIPS || COMPILE_TEST help - If you say yes here you get support for the Ingenic JZ47xx SoCs RTC + If you say yes here you get support for the Ingenic XBurst SoCs RTC controllers. This driver can also be built as a module. If so, the module diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 0c7ae65..a262632 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c @@ -1,17 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2009-2010, Lars-Peter Clausen * Copyright (C) 2010, Paul Cercueil - * JZ4740 SoC RTC driver - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - * + * Ingenic XBurst platform RTC support */ #include @@ -450,5 +441,5 @@ module_platform_driver(jz4740_rtc_driver); MODULE_AUTHOR("Lars-Peter Clausen "); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("RTC driver for the JZ4740 SoC\n"); +MODULE_DESCRIPTION("RTC driver for Ingenic XBurst platform\n"); MODULE_ALIAS("platform:jz4740-rtc");