From patchwork Thu Feb 14 11:24:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10812495 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 456C71399 for ; Thu, 14 Feb 2019 11:24:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32D2D2D860 for ; Thu, 14 Feb 2019 11:24:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26EC52D8AF; Thu, 14 Feb 2019 11:24:17 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 B0F992D89F for ; Thu, 14 Feb 2019 11:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389976AbfBNLYL (ORCPT ); Thu, 14 Feb 2019 06:24:11 -0500 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:62836 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389603AbfBNLYK (ORCPT ); Thu, 14 Feb 2019 06:24:10 -0500 X-IronPort-AV: E=Sophos;i="5.58,368,1544511600"; d="scan'208";a="26269337" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Feb 2019 04:24:09 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.105) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 14 Feb 2019 04:24:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Td+MnSdr7EaUVSktSV1JUfvVbhtyqhDSiopXPUuFB68=; b=iPDScGTcrI2FHS/B4awgc/kt1630d/KrajqfPHl04OHFxaWYU0zGyDpBMzqRFULT05vEB/k2e6BwT17DHGbUi6YVRSOr3QOsk+uVtVCQ58U9Ovq/qUGHsSrAaWIBfCnHPOQLcODkROqcuJfZ87NxFMkwKovQJMZ+2cjcDmY42wM= Received: from MWHPR11MB1920.namprd11.prod.outlook.com (10.175.54.19) by MWHPR11MB1661.namprd11.prod.outlook.com (10.172.55.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.24; Thu, 14 Feb 2019 11:24:07 +0000 Received: from MWHPR11MB1920.namprd11.prod.outlook.com ([fe80::d917:8496:9d53:1f55]) by MWHPR11MB1920.namprd11.prod.outlook.com ([fe80::d917:8496:9d53:1f55%9]) with mapi id 15.20.1622.016; Thu, 14 Feb 2019 11:24:07 +0000 From: To: , , , , , CC: , , , , Subject: [PATCH 1/3] power: reset: at91-poweroff: add RTT wakeup capability Thread-Topic: [PATCH 1/3] power: reset: at91-poweroff: add RTT wakeup capability Thread-Index: AQHUxFfM+pYGXoQlZ0u8Bc2PaN4VYg== Date: Thu, 14 Feb 2019 11:24:07 +0000 Message-ID: <1550143407-26109-2-git-send-email-claudiu.beznea@microchip.com> References: <1550143407-26109-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1550143407-26109-1-git-send-email-claudiu.beznea@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0102CA0104.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::45) To MWHPR11MB1920.namprd11.prod.outlook.com (2603:10b6:300:110::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Claudiu.Beznea@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [213.233.85.122] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0a23d251-2e34-4513-2d9d-08d6926eee8d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605077)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:MWHPR11MB1661; x-ms-traffictypediagnostic: MWHPR11MB1661: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BMWHPR11MB1661=3B23=3A4y?= =?iso-8859-1?q?I689/pdumiUOE0YzzMEIjdfu05KIbyCg537CheGRY0FacJsGQpjfOlgn3WC7?= =?iso-8859-1?q?oTJAUtBkMTa84psiq0jDaa575wfVUJlhZVo8a8xUAXY+ckYA4pYSDjcDL8n2?= =?iso-8859-1?q?UuuFOsWXVpmAGJBynv5FMb+SyCVlJLXd2zDaqcl26PAGdwK7uotNAhqQZc1+?= =?iso-8859-1?q?rcQdfHoq/UBHGckFz3TdJtWGlIong6bAxfyH4WMgc10OHxOyC8jDI74f+EzJ?= =?iso-8859-1?q?E+lvWiOmOMnj7PJk9YO892E9Dnd6/sk/+Ut+7J4whUKZo0W9/EtlrBaB8WmE?= =?iso-8859-1?q?cSOhfnaMctu4tFJ1Z7jBjLVeWSh2fxyLIw/7n26RDtk+MRwp9OA9B7DyTAKy?= =?iso-8859-1?q?AgzFEm58HgUjaemj72iFcBk3CMvObCfSFu6eC5pl3W0wYrDPIRtsuRpYSCym?= =?iso-8859-1?q?+perCgQ86fkzG4cdvPZ0uZ+E/WE3ZQhc4bXe68L6qT6TR6kx29YPV8gZVOb4?= =?iso-8859-1?q?dL6p0QipJvjj4lwFgFjttrzeHQE3lJrswRVKoC5vzFvS3QktQYcQ0T5El4mj?= =?iso-8859-1?q?HPsz8EfZ9m4kWyKcIraqXlVt9JkC3UEd7bOZYDYjcxuLdu7imi/NVOBnV2zQ?= =?iso-8859-1?q?O1Id8WJPO0x6rwOw1zA6kOk6XQC0DKTugTUlaN6EuqZJ2frpkKuTB42UFpvk?= =?iso-8859-1?q?5Dsjn238cWPpG6vcnuaSrxKadef1y72OXPXbyiRlaPSP/ZZxWz7bkjy2RViP?= =?iso-8859-1?q?SRoyeT7TWjBasDLu9rPGezwK8de5SO4Ox4jLCkmuIf5FdtocDBn8wDydQcqj?= =?iso-8859-1?q?TSKbr74nF34/vkw40XsDlGoqgyXs1YZazO6wl+MpYDcBpV2DdyrFm62bb1xR?= =?iso-8859-1?q?urQ6ImM7Uul6YaxSQSiaTmsI9MpFtpmFy1PpsNqh++MSkA+l9r+420lgKPhw?= =?iso-8859-1?q?qZ9s2T/YWIWuTix4Cf8L+qcgkRLketLQYdUVQ58dGBcM7LxrSg174VqUYTmX?= =?iso-8859-1?q?l5S41SKtpwIQVvZHVoyJW+tVfqmIw6E+DgEnIQ3gBXUV4HchhxCOK4aIfO8K?= =?iso-8859-1?q?NGhyvsO7sXd5Kxt28h1UN2p9lDQQJrYsYyXb+NrMSlnhzGbBxS6SMjtaENoJ?= =?iso-8859-1?q?Z5Y+cSb/ApklSXFObaIy3oBuRQ7G98h6z1VUmlkwiKgyOUths6bP8NkwncuR?= =?iso-8859-1?q?eMHNADAA27d5WK/Kkc6c1sIeVRaYsSfpJFvNO2FKKK9EBGj3apyYSHsPbTeU?= =?iso-8859-1?q?mtOlqIP6vPBbPpNQSFaMcsb7BvC7ztt1chmg=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09480768F8 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(376002)(136003)(346002)(396003)(39860400002)(199004)(189003)(68736007)(446003)(54906003)(386003)(105586002)(6506007)(106356001)(486006)(71190400001)(99286004)(71200400001)(478600001)(76176011)(36756003)(11346002)(72206003)(6436002)(110136005)(107886003)(2616005)(476003)(4326008)(97736004)(86362001)(316002)(6512007)(53936002)(2906002)(2501003)(256004)(6486002)(305945005)(186003)(81156014)(50226002)(81166006)(66066001)(7736002)(8936002)(102836004)(52116002)(14454004)(3846002)(26005)(25786009)(6116002)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1661;H:MWHPR11MB1920.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: wIhA3CQWxDBiMG4dPgsNwDGpmJcbeE5SMXjzQ/0vgUmhhjdf/7mSN9BNCElBH8ybV/j0m6b3lw9BIS5FNrJ3ygBSgr2lJoDakhDkiVMCCm5T7uWS7MQ+I8HP/3jk3dFsvAc/fPRVO3/y7y3hrwhA48z0EgR9q9vS8itgb8JHjGqSr/tlx3VarPkbhlXt3jMqbNbxxVvQxgbP5YX7fXU+AH4wCrYT/Qgv/kyWO/yLmrNmYiH4qwcAo2UvD++sy3t7j3heV9z3rP965+qV7i7kh9B2teNLF/ZF6bJlZQep93vjOmG++vSPIIZ8mCm0t0vNdrEY1wxJbJe1XCA8896LIkcaFHDaiWCkiligc1c/4DfzQWHErbfDGEM6uDfhE3GTKqLRKPmd1CUI27VVU3/SBZTIJYO3T9wVtKJp7vqH2lE= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0a23d251-2e34-4513-2d9d-08d6926eee8d X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2019 11:24:01.2347 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1661 X-OriginatorOrg: microchip.com Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Claudiu Beznea Add RTT wakeup capability. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre --- drivers/power/reset/at91-sama5d2_shdwc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c index 2b686c55b717..0747e0cdf350 100644 --- a/drivers/power/reset/at91-sama5d2_shdwc.c +++ b/drivers/power/reset/at91-sama5d2_shdwc.c @@ -57,15 +57,21 @@ #define SHDW_WK_PIN(reg, cfg) ((reg) & AT91_SHDW_WKUPIS((cfg)->wkup_pin_input)) #define SHDW_RTCWK(reg, cfg) (((reg) >> ((cfg)->sr_rtcwk_shift)) & 0x1) +#define SHDW_RTTWK(reg, cfg) (((reg) >> ((cfg)->sr_rttwk_shift)) & 0x1) #define SHDW_RTCWKEN(cfg) (1 << ((cfg)->mr_rtcwk_shift)) +#define SHDW_RTTWKEN(cfg) (1 << ((cfg)->mr_rttwk_shift)) #define DBC_PERIOD_US(x) DIV_ROUND_UP_ULL((1000000 * (x)), \ SLOW_CLOCK_FREQ) +#define SHDW_CFG_NOT_USED (32) + struct shdwc_config { u8 wkup_pin_input; u8 mr_rtcwk_shift; + u8 mr_rttwk_shift; u8 sr_rtcwk_shift; + u8 sr_rttwk_shift; }; struct shdwc { @@ -104,6 +110,8 @@ static void __init at91_wakeup_status(struct platform_device *pdev) reason = "WKUP pin"; else if (SHDW_RTCWK(reg, shdw->cfg)) reason = "RTC"; + else if (SHDW_RTTWK(reg, shdw->cfg)) + reason = "RTT"; pr_info("AT91: Wake-Up source: %s\n", reason); } @@ -221,6 +229,9 @@ static void at91_shdwc_dt_configure(struct platform_device *pdev) if (of_property_read_bool(np, "atmel,wakeup-rtc-timer")) mode |= SHDW_RTCWKEN(shdw->cfg); + if (of_property_read_bool(np, "atmel,wakeup-rtt-timer")) + mode |= SHDW_RTTWKEN(shdw->cfg); + dev_dbg(&pdev->dev, "%s: mode = %#x\n", __func__, mode); writel(mode, shdw->shdwc_base + AT91_SHDW_MR); @@ -231,7 +242,10 @@ static void at91_shdwc_dt_configure(struct platform_device *pdev) static const struct shdwc_config sama5d2_shdwc_config = { .wkup_pin_input = 0, .mr_rtcwk_shift = 17, + .mr_rttwk_shift = SHDW_CFG_NOT_USED, .sr_rtcwk_shift = 5, + .sr_rttwk_shift = SHDW_CFG_NOT_USED, +}; }; static const struct of_device_id at91_shdwc_of_match[] = { From patchwork Thu Feb 14 11:24:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10812501 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 2CCDD1399 for ; Thu, 14 Feb 2019 11:24:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19D892D860 for ; Thu, 14 Feb 2019 11:24:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 165432D95F; Thu, 14 Feb 2019 11:24:24 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 97E562D950 for ; Thu, 14 Feb 2019 11:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406888AbfBNLYS (ORCPT ); Thu, 14 Feb 2019 06:24:18 -0500 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:37939 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389603AbfBNLYR (ORCPT ); Thu, 14 Feb 2019 06:24:17 -0500 X-IronPort-AV: E=Sophos;i="5.58,368,1544511600"; d="scan'208";a="23850296" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Feb 2019 04:24:15 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.108) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 14 Feb 2019 04:24:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CdNbPHEQzZQY/crhHPkeYp5zK+1VSmdjf16ikwmXzBQ=; b=eJT64NGisenKOT4hm/NCe0cIqD/n6r/DxhV8DFRtV5+CfYxNwu+/BgVqCAuKVpJQCfzzJOzzb+8Rux+RmAJT7kswdkr5BTzqzMUznN8mz3awHncrGhEvcZjRZPgQTh5N3b2PMSnffCfD3JhZWzoFtRUluL+yTOQ73IvuraYuvHM= Received: from MWHPR11MB1920.namprd11.prod.outlook.com (10.175.54.19) by MWHPR11MB1661.namprd11.prod.outlook.com (10.172.55.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.24; Thu, 14 Feb 2019 11:24:12 +0000 Received: from MWHPR11MB1920.namprd11.prod.outlook.com ([fe80::d917:8496:9d53:1f55]) by MWHPR11MB1920.namprd11.prod.outlook.com ([fe80::d917:8496:9d53:1f55%9]) with mapi id 15.20.1622.016; Thu, 14 Feb 2019 11:24:12 +0000 From: To: , , , , , CC: , , , , Subject: [PATCH 2/3] power: reset: at91-poweroff: add support for SAM9X60 Thread-Topic: [PATCH 2/3] power: reset: at91-poweroff: add support for SAM9X60 Thread-Index: AQHUxFfPG6YiVvagZUSJ4bNY2F3jzw== Date: Thu, 14 Feb 2019 11:24:12 +0000 Message-ID: <1550143407-26109-3-git-send-email-claudiu.beznea@microchip.com> References: <1550143407-26109-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1550143407-26109-1-git-send-email-claudiu.beznea@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0102CA0104.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::45) To MWHPR11MB1920.namprd11.prod.outlook.com (2603:10b6:300:110::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Claudiu.Beznea@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [213.233.85.122] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 841f9afc-cbf5-4f51-e098-08d6926ef1de x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605077)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:MWHPR11MB1661; x-ms-traffictypediagnostic: MWHPR11MB1661: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BMWHPR11MB1661=3B23=3AU4?= =?iso-8859-1?q?S70XVYg5DwCowAqlSwGtqvxZY2GpfYjg+yrzz3/WyUC63ud0G9/J7I6g04/G?= =?iso-8859-1?q?GZWMjK3oQK9bA3rKmQw12uZ6wAPWglj8u+DULCcmV8trFUoTqzBtlz7RT/4f?= =?iso-8859-1?q?2ZGlL+ZouMcGWAJEyhaU/HHiSBA+KTt/G90X2a6BrbHM/yubl4pli/GbRjdC?= =?iso-8859-1?q?YfEDn2ac1Kwim9ge9c7VpiubbiwqUd7XinOMpjbZKqBtS9GobWm4dxcmV4Lv?= =?iso-8859-1?q?AZc1SqUdK/urxnDTllMDZ2yzOQrGJyZmECFTQCD8XPlyixye3rhALphLN9Kj?= =?iso-8859-1?q?z+Ca9IK84vkYM3dtEaZrEcN2Ulp/OrPKS4xQWhwHV7XOktW9+jy+u9YtnLS6?= =?iso-8859-1?q?84rHVjfCfIsi11nhba6X+UF7jWJzdEcdh199YOp+AvqCQpTDuRWVJt2GF7Rl?= =?iso-8859-1?q?o4pvtB3ozq0MAIGtVH860tbmqUcIalU19BavMo9f19zj5YSc1quy+ibwdIe5?= =?iso-8859-1?q?fVslmdT3sDPGnbLrbPc62KTpH50EELcpLmtC+Iwb7s83NDaiTITk1TouVlQT?= =?iso-8859-1?q?aOrE1l/hT9oPpp7U/I8O9jFm/YiDW7kt2BczSrR6X2vjzoJCFvT58u87Ra5U?= =?iso-8859-1?q?mCAqUy3KQoTDBC2he8kiRRO0Dbk04OGe9I7uaauISbc+I3QfNckRCuvB898D?= =?iso-8859-1?q?7pkneie173Eb+Le7lg/bu3MlRhXA68WDPlhxVsdAIdvEtoibUnQjrKbyNiZb?= =?iso-8859-1?q?+/5W14YspzT4OM1574bwnNwGuxIIijnIrNioBmtayykUIQcrx9hqH6K2ZGU6?= =?iso-8859-1?q?TXzJfDUTw+m7JIEtQFw/pWLIy0q84QObDHaV0I3AL26gS48dwRdOtbavwuNq?= =?iso-8859-1?q?UqlVnEHo5K/YzgRuwy852G5CK9to3+pt7PP1r4PviswamxyeEudcA5Kn3Wtd?= =?iso-8859-1?q?iQzYnXQiDFd1gOxz5gz7cBATwQEvNckFBrhCghn02NvYm5NtCCCoFPHc7//D?= =?iso-8859-1?q?QNhLjFVzyq0ziNcSAAKElguO1I50RhvzTwLPtRxGtovH8JdZgSNLwTq0sMeA?= =?iso-8859-1?q?3zcKoMVnONynglyArrJ6rHfd3c63cF/YsctiIJuwWQWDey2I/oXqRYhffoPg?= =?iso-8859-1?q?x45UwSqWBlnyMJxGPsIZGEOlyaBGUxF4MNBorDgB3tX+TXTQAmipvknIsDRX?= =?iso-8859-1?q?rZMyOVkjimFDRzLSLf1x8ArKCqkkoE3NhWJ705yCeWpVNwcFqFCVijVl2pFg?= =?iso-8859-1?q?7ecyHgB+1pf5MO1qmZdllRIqigswYqPXxnr+1va6EpcRi/lJG3WD07tdQ=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09480768F8 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(376002)(136003)(346002)(396003)(39860400002)(199004)(189003)(68736007)(446003)(54906003)(386003)(105586002)(6506007)(106356001)(486006)(71190400001)(99286004)(71200400001)(478600001)(76176011)(36756003)(11346002)(72206003)(6436002)(110136005)(107886003)(2616005)(476003)(4326008)(4744005)(97736004)(86362001)(316002)(6512007)(53936002)(2906002)(2501003)(256004)(6486002)(305945005)(186003)(81156014)(50226002)(81166006)(66066001)(7736002)(8936002)(102836004)(52116002)(14454004)(3846002)(26005)(25786009)(6116002)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1661;H:MWHPR11MB1920.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 6V4CWDnJ3D1qGZ3WPkFqu79Qb8pM+TziyROP9KAUW5gLWDxFTwuTjgDbScBELhg4pUe3/tsDfAMkGDKeu6thxNf8b7iSu75CHiHgsrV9pxYTA95Pbf3D7qLvVsLj/HmJxIzXUiOK/oJCvZCKsCmdqD5PlITxo1ezhiirCEBlnFCgGFFaBuR43lULDqqH9QkzOjebSas32+/Ka8H98OqQMVKxO1bvwgiYX1P1cCSMCRy+sdhmYoSTcvm6KZDQIlGgAi3Q+swKT31Z08+40LkboORRt5P7TqfVI1Z045V2mBrU0tUH6wmU4OigFHAJh3qP9S1wyzr1rbYmHJ4qjFiniPZWXKMRYEuK7Vbj8XJO8ALwG9ZHh/yDsfCXGwOc3a8jgD7/WqJJ/lFFx+E8SYDqpMxSmMSYGpbbMqL7nIxmZMw= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 841f9afc-cbf5-4f51-e098-08d6926ef1de X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2019 11:24:07.6270 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1661 X-OriginatorOrg: microchip.com Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Claudiu Beznea Add support for SAM9X60 shutdown controller. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre --- drivers/power/reset/at91-sama5d2_shdwc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c index 0747e0cdf350..e341cc5c0ea6 100644 --- a/drivers/power/reset/at91-sama5d2_shdwc.c +++ b/drivers/power/reset/at91-sama5d2_shdwc.c @@ -246,12 +246,23 @@ static const struct shdwc_config sama5d2_shdwc_config = { .sr_rtcwk_shift = 5, .sr_rttwk_shift = SHDW_CFG_NOT_USED, }; + +static const struct shdwc_config sam9x60_shdwc_config = { + .wkup_pin_input = 0, + .mr_rtcwk_shift = 17, + .mr_rttwk_shift = 16, + .sr_rtcwk_shift = 5, + .sr_rttwk_shift = 4, }; static const struct of_device_id at91_shdwc_of_match[] = { { .compatible = "atmel,sama5d2-shdwc", .data = &sama5d2_shdwc_config, + }, + { + .compatible = "microchip,sam9x60-shdwc", + .data = &sam9x60_shdwc_config, }, { /*sentinel*/ } From patchwork Thu Feb 14 11:24:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10812505 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 777716C2 for ; Thu, 14 Feb 2019 11:24:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 636032B53F for ; Thu, 14 Feb 2019 11:24:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53C002D8FB; Thu, 14 Feb 2019 11:24:30 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 D7EDD2B53F for ; Thu, 14 Feb 2019 11:24:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406901AbfBNLYW (ORCPT ); Thu, 14 Feb 2019 06:24:22 -0500 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:37939 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389603AbfBNLYV (ORCPT ); Thu, 14 Feb 2019 06:24:21 -0500 X-IronPort-AV: E=Sophos;i="5.58,368,1544511600"; d="scan'208";a="23850304" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Feb 2019 04:24:21 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.105) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 14 Feb 2019 04:24:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RddlZD9FSGsdUFRawqDmTmpieA0j7l7dUMnuglYnEVo=; b=MRmkGK3Dvul5nz380yToVJifnmlrXvXkTynorA9KgEhCMLptPou3IeqXstC39cgGgsPVRX90hRZeyILr32++PKhanci4zN0umxkxsoNOHlaQQD000GRSj8n+IBhTa8enUtJfkFxkr+SAhLWapD19pdJJDKkich9fKw/raWN5QD4= Received: from MWHPR11MB1920.namprd11.prod.outlook.com (10.175.54.19) by MWHPR11MB1661.namprd11.prod.outlook.com (10.172.55.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.24; Thu, 14 Feb 2019 11:24:18 +0000 Received: from MWHPR11MB1920.namprd11.prod.outlook.com ([fe80::d917:8496:9d53:1f55]) by MWHPR11MB1920.namprd11.prod.outlook.com ([fe80::d917:8496:9d53:1f55%9]) with mapi id 15.20.1622.016; Thu, 14 Feb 2019 11:24:18 +0000 From: To: , , , , , CC: , , , , Subject: [PATCH 3/3] dt-bindings: arm: atmel: add binding for SAM9X60 shutdown controller Thread-Topic: [PATCH 3/3] dt-bindings: arm: atmel: add binding for SAM9X60 shutdown controller Thread-Index: AQHUxFfTL1CYZiysKUi13XXnc4JnEA== Date: Thu, 14 Feb 2019 11:24:18 +0000 Message-ID: <1550143407-26109-4-git-send-email-claudiu.beznea@microchip.com> References: <1550143407-26109-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1550143407-26109-1-git-send-email-claudiu.beznea@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0102CA0104.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::45) To MWHPR11MB1920.namprd11.prod.outlook.com (2603:10b6:300:110::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Claudiu.Beznea@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [213.233.85.122] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: eb04f0b4-4d49-4380-8e9a-08d6926ef53d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605077)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:MWHPR11MB1661; x-ms-traffictypediagnostic: MWHPR11MB1661: x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BMWHPR11MB1661=3B23=3AQN?= =?iso-8859-1?q?ABpLDJ/PwapfY7cuTv/HEz9cMgdUdshc2uEiyVtkyGxiy0pqhAHkm4G/PstV?= =?iso-8859-1?q?Vkiz7niTQRrEWMP9xzyqIWApiVfCLNSmv5KYwlGBRU3FUk1rcpHEH8aO5PDE?= =?iso-8859-1?q?GxUimFLKEqeBxJ7jA0ouWYL+8dqucf7VrYhUErcTjikxSKCcug/gMLm/ZQd5?= =?iso-8859-1?q?jkbN4VdFIfssMXQu0ZghI5LOp0uPwUECdp3c71wt/12F/QE/SPtY4i49EKrF?= =?iso-8859-1?q?ESi9mC0AaMkhUfZy1Ul3pK2ry66eZDpHdLkqubB1bOoZbXr4I+7jOroMDSKo?= =?iso-8859-1?q?BhdIHjCx4xwqvTU05wmHQbh3HYFk8qWdDHqfkntQOW8V9JSd/hMAejYnJwwH?= =?iso-8859-1?q?FCphMibzZf03jV6RzSuklRmf5MP9S7xhrih/CF8dU1CVyoYaRB3gZ49WggIc?= =?iso-8859-1?q?DnvjqVVsMK84+Xq5ZDWcJW942ptYR/IObUDCaEeLvR4/6ZEoSdpIVZmNkO1+?= =?iso-8859-1?q?flhkcFUjRdDfKgW/h5pfn46naqipKgHcACfdfJg/1J4vc6ozcfFPxeomtQG3?= =?iso-8859-1?q?fcmJuaq7C0t6RItmNnTJdLls8MwL/BLWJ4BTvkH8HPHgfLavRGE3QurXfINs?= =?iso-8859-1?q?k5Uh+cmOR9OZxuyR+PAdRV3f+oden6J+2ycVk7uNSEQ3NHt0t1LSa9gwLQTx?= =?iso-8859-1?q?QVrAUP2HXAGlvC9/37M/7UQkGcXeaz3LtzB0CTprGEsPvU2Isy516oP2zOrF?= =?iso-8859-1?q?2p+Q9kbrHT7OuUP7Ceqp2cWTbqh9vFdSF2MHmSHVBaqoImkMLBeK0ba41w2K?= =?iso-8859-1?q?OE0NSECZzxUMvONPJA3ORau2JADSOQbt06mH05KMDPbCFtuqYf2KIoEbwwny?= =?iso-8859-1?q?HbCTwjvJlRGMukefCiIfOa8pdvUH/geU8/m59Ux4AHPJMVmBB9/ItXHZWhp7?= =?iso-8859-1?q?aU0xAML2bJiQPlvHYf0HL/MCcDsl4NQYEcx0XKtJ4wE7Tk3RpdGi55Dri3uh?= =?iso-8859-1?q?jZKOz6aGy2d5FBP5XGuAFK3nXPSFRTpT3B48q7Y5yoKnvzLdyZlMI3/H5lNT?= =?iso-8859-1?q?wKAYqXJDrfr+lsUU2wJdB07f8oHdUm/8IbeHP5+iYckzy1g12bf64o2j49/K?= =?iso-8859-1?q?sIauWKMa45LG7fQJvFeIQPdYuICde9kzRiE0ENH0hResWGeDZDwT55mC3v0o?= =?iso-8859-1?q?8Zf3XuKMdceL42L6QLmzHnCEaRAv1qlLfRgAJyKF5E8lQ3jxNgwF266gtlr6?= =?iso-8859-1?q?Y27s6mgt9DnXX7CWxe8cohTByXOm1baeTi/pL8+UN3hU1hw1tAGC6zu9s=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09480768F8 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(376002)(136003)(346002)(396003)(39860400002)(199004)(189003)(68736007)(446003)(54906003)(386003)(105586002)(6506007)(106356001)(486006)(71190400001)(99286004)(71200400001)(478600001)(76176011)(36756003)(11346002)(72206003)(6436002)(110136005)(107886003)(14444005)(2616005)(476003)(4326008)(97736004)(86362001)(316002)(6512007)(53936002)(2906002)(2501003)(256004)(6486002)(305945005)(186003)(81156014)(50226002)(81166006)(66066001)(7736002)(8936002)(102836004)(52116002)(14454004)(3846002)(26005)(25786009)(6116002)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1661;H:MWHPR11MB1920.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: DuAZV6eqB+6dGBvljWQHzKT129AkY9/MCC3L3Hsmw7i/ek8+LALM8eedR2gtofRaeucEZr/4gg0Dv0AoUKbE7V691Dmu8SML0fcvfq6VbcWJrNHZwiOo4BVDe73E60T+nfW5jUdM+GbknvtEsuGmYfuCT42DZZcLBpDm5NxW6+KAPvi2yqVaxyTiF06gUneL4dlZRG5fb7F/5um4iFzSkxqsx7B0yi2OGdEWsI4fePGKcWG7BvLkZM79x4YV86EV0y8uQQqFW1DCbnHu7P+4pbf62Oc3+sQSJ1kiohzirCNnmRUvvZxptakn0NsxwxJurJbsc8dlBRxJJ40OIgWXoMDE7Thyx+jgCUyHXdtEaMeCR0rnkar/NXKgcVZu4KY6fM3c6KDO/sPx8WT9w8Wa+YWk8Heb7yY3hjLBgfcK20o= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: eb04f0b4-4d49-4380-8e9a-08d6926ef53d X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2019 11:24:13.5118 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1661 X-OriginatorOrg: microchip.com Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Claudiu Beznea Add documentation for SAM9X60 shutdown controller. Signed-off-by: Claudiu Beznea --- Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt index 14f319f694b7..9711052c5800 100644 --- a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt +++ b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt @@ -83,7 +83,7 @@ SHDWC SAMA5D2-Compatible Shutdown Controller 1) shdwc node required properties: -- compatible: should be "atmel,sama5d2-shdwc". +- compatible: should be "atmel,sama5d2-shdwc" or "microchip,sam9x60-shdwc". - reg: should contain registers location and length - clocks: phandle to input clock. - #address-cells: should be one. The cell is the wake-up input index. @@ -95,6 +95,10 @@ optional properties: microseconds. It's usually a board-related property. - atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up. +optional properties for microchip,sam9x60-shdwc: +- atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up. +- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up. + The node contains child nodes for each wake-up input that the platform uses. 2) input nodes