From patchwork Wed Sep 11 07:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Marian Costea X-Patchwork-Id: 13799777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C6A3EE0213 for ; Wed, 11 Sep 2024 07:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:Message-ID:Date:Subject:Cc: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=Pk88qSp/nHT/zatXuB10xJuqOhNhCb/34wcUjPslB0Q=; b=v4wGGxwBxCN35Z3muf9v2htTaW lvLpm5mXcduI80x5VOCeG0nVQJWAptzh7fqkh9hw01phUm1fdsxZ1TQwyKPs7m0Z23pFkH08r1bjJ hWmz6IYwnA1rGmlDTBm3JzT59Fks3Grxp7R08aDwzZXy0UwbmzsPM6rSdTUtcm5AnZuhTmD/V0vFm Vdcpy6ZTmLuSeRgtVW5ZC1QhxO6Y4xkxZ9im2O/apXWQ3C385XVfoW+ytYKdXsuGFLx3ZFvT7qZYN OZIA99HUCV4dVW/z8uMb+dl2RwlQBXLuQWqiDezNcWQ6TU6nrxZp8pMqS3IF1NhT84fajeHyWcxTl 0psmjGgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soHOG-00000008Mj5-23aR; Wed, 11 Sep 2024 07:03:48 +0000 Received: from mail-vi1eur03on2060a.outbound.protection.outlook.com ([2a01:111:f403:260c::60a] helo=EUR03-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soHLK-00000008LuO-3jRc for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 07:00:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ndGzWYgU9lCf/pHt/TNq1/4sLuxzgC1x9zyx9LpXmTqL2COdFeT5hOk+per0KxGIzeg8mwhYnRj5aO/QOuqG1Vc3rRzj70UwAJRSi+B/2vyL3QbzA8W6KXUT3v2c3b6FZGsJloOxwn246031bA3kFlRCvfkLBslUFKzgq4bnbucSgrrlc0JJwHKvhEoOPtQWI4cxJt/JZww35hkuFw94CgLH4RxhSuU4PAxYl/olqiac9xjKUUTkYPKmdRtHQo8aPtIi1faGsHzO7b6iPf45iV2Q+lIlKQ2ead4qrRdpmlDm9qfrA2wLGZC/gc2D/XxROpHXbQL+o/XN54On8wM02w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Pk88qSp/nHT/zatXuB10xJuqOhNhCb/34wcUjPslB0Q=; b=Unlatcds5T7QVcf5XfIUIs47hUTBnYRvWcyfeSKhJzEJ9F5Fo7uk3BrmZy6CUqiK+4WRSWxvsnXpa9b/IGubG/2x8lxRVX01MN1HachVFasu3yXdZ7L4RpoaO87+uoH9A6CE+UgYP69gBkpgSAduxAeivvalZ/i7avzXMGEqLXieR3ho0hMxrgxWwECvyDnSlh9t+FWApnX2NQblj4EMxswy3OmtCbVfK+1c1pJ7R22MXiNSEhsXgDpuEwJuzRvqWH14XXHqq+BkpY51RP0SFGilNt1GN1bD413VuYZXA0SILq5Vh4atmBZFfdljhGlsvUbUdhv+BaF/QXTAQZHycA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Pk88qSp/nHT/zatXuB10xJuqOhNhCb/34wcUjPslB0Q=; b=taAIlm+wf1anq6B244cWipImKKSrBCj+yJB/+RL3yQT5Uq6YrozwBlQ9BHVIt0ZgJTb59d1GLoCQkChsrnL6eC0Waiy6431qHRviyXGwfgjzVnXJTTU73qxE765L3YcY7GNj4fhKNywn5RbU3rFYzpX8bIdpCz4p+GZWmYPbdOsuoLZy5sAFwppVnRgriDell+I5V84ajbvh4BQLt9m9peeGLlVSrz/cxZYqR5C+3cfaW2JgGem9atTZkNKf8Q/UJPJBJO3Rdb2AA/9sZJ5C63N5lWZd84dbPaS1mQnwTWkGd61NRBgXGEyO/yIlj0H9nBhIYZEsXvkf3JmeVY8gcQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) by AS4PR04MB9507.eurprd04.prod.outlook.com (2603:10a6:20b:4ca::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Wed, 11 Sep 2024 07:00:35 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%7]) with mapi id 15.20.7939.022; Wed, 11 Sep 2024 07:00:33 +0000 From: Ciprian Costea To: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Ciprian Marian Costea Subject: [PATCH 0/4] add NXP RTC driver support for S32G2/S32G3 SoCs Date: Wed, 11 Sep 2024 10:00:24 +0300 Message-ID: <20240911070028.127659-1-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 X-ClientProxiedBy: AM0PR02CA0117.eurprd02.prod.outlook.com (2603:10a6:20b:28c::14) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|AS4PR04MB9507:EE_ X-MS-Office365-Filtering-Correlation-Id: fb21a6d3-4965-4cc2-b38c-08dcd22f6de4 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?q?gglF6B2uKmp6/Q2xaaYgWQizE2L2Blg?= =?utf-8?q?VSgoUzKoUnfV/HDThwbcH+ZJO9NSZvpEyxTLsU4cw8AUwu8+VWkfQj6Gd7DBvzjXz?= =?utf-8?q?HJm80SCkrU462R6fzFH3B+RBTfMR1k2Bg2YO9TFREE5fhfRAHIm4L6/t0Me/Uh6Lx?= =?utf-8?q?w/qLvjhIgagph3sge4h/QCOTd9OKdxToUR1Bz8UxAFs51sO3IzGmjKHPQx/QNL+oq?= =?utf-8?q?h+QHsAPST4NgxcLTp/5driuUo8RyffXRGWH/5PK1u2tu3fNW2dUa58leLKg8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a?= =?utf-8?q?VJsK4F0M3FBvPA8Ac5p4WujwR1jDBkUE92D1kBpGWfF+V/xn0U7K0kDh15EKMRhpr?= =?utf-8?q?mwV0m4nOT1YbeIe8LiZqHvu9lfj/YjTBrwt8wcgnoMcdPb9Ft0CdVTrretBfz3x+4?= =?utf-8?q?mmLYd311eP9LgfgrT6EDKLuQgn4YHr5iYcQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9251.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?k3U25Z5eVcsgmL71dGw3CEn7lFVK?= =?utf-8?q?mPu752Yn7sLbRU55GovH7KnSvJrcuQVNuM5zrGSX53EfsPqPFXeqATBOY5ymQRvPj?= =?utf-8?q?dkEQbvazXa7o7Mv3d/b3YM//awqDEX+M8Uvedy+gMTrj0c9KUaZbJroAupTJmT717?= =?utf-8?q?FgK8Mtael6ECGsmAS2S3llxtsVNLrNvDKzeYoLIBOOQjMRbgHzgRrkLubCTLz0jnc?= =?utf-8?q?gTNqUIAgpLHYj44LXHYGe8ERazdNjVY3uh2KFl0UwGXWD3E9yhTUGkc0muh18rgkk?= =?utf-8?q?F/4zFCRkNocsctuxf+8ZJ543Q4jE70c3JgatQcQEK2/g6GAEjNhuryLy9qkvz3Htr?= =?utf-8?q?k1djKjzU3QhfEkYIJctQEaPUJJne3ALgogW+63MbGtT2tHVcJuknzvRH9YMrkaGdp?= =?utf-8?q?DvmKtQFGJzQg22x3z5ssSgjPE9GACoolhpValDr1s530wk+juQnH12PD5KYw6oDD3?= =?utf-8?q?c8Begst6qBoMcK69e6C/JzDSue3Q6/zt12Zm4A1qCexn5DP3hHn3gWnORZ+RCyJlb?= =?utf-8?q?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K+rEMaaUaLz32yTcy/5NKZwPd/H3JlsGSiPIz/mpf1fMXnr8428TrfW0a?= =?utf-8?q?ey1bpdMTyN84cGrf6ZprXstNXGOaiiX5XfnTD9fcByYxu7fLyhsky/s9xIbngPp6a?= =?utf-8?q?a/OK/FuH81eG4W2iR1Tbqw3l+99O2N7NVQ=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb21a6d3-4965-4cc2-b38c-08dcd22f6de4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 07:00:33.6608 (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: WyhdxOqUkzNglQaXJVtclKX8v2cqmH3kvMgD4CJYFKniCBVw5GEKb0vhUd/ReFaC+Nd7+bxcqqIQ437XMLj3boXxZ53/P6RUodefaxbGEAA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9507 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_000046_968489_FA44BF0D X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ciprian Marian Costea This patch series add support for the NXP RTC hardware module present on S32G2/S32G3 SoCs. The RTC module is used to enable Suspend to RAM (STR) support. RTC tracks clock time during system suspend. Following is an example of Suspend to RAM trigger on S32G2/S32G3 SoCs, using userspace tools such as rtcwake: # rtcwake -s 2 -m mem # rtcwake: assuming RTC uses UTC ... # rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Feb 6 06:28:36 2036 # Ciprian Marian Costea (4): dt-bindings: rtc: add schema for NXP S32G2/S32G3 SoCs rtc: s32g: add NXP S32G2/S32G3 SoC support arm64: defconfig: add S32G RTC module support MAINTAINERS: add MAINTAINER for S32G2/S32G3 RTC driver .../devicetree/bindings/rtc/nxp,s32g-rtc.yaml | 79 ++ MAINTAINERS | 2 + arch/arm64/configs/defconfig | 1 + drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-s32g.c | 689 ++++++++++++++++++ 6 files changed, 782 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/nxp,s32g-rtc.yaml create mode 100644 drivers/rtc/rtc-s32g.c