Message ID | 20241111135940.2534034-1-ciprianmarian.costea@oss.nxp.com (mailing list archive) |
---|---|
Headers | show
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCA2919E826 for <imx@lists.linux.dev>; Mon, 11 Nov 2024 13:59:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731333592; cv=fail; b=Qls6ecLi8zCDfRaZeS5YeekIqOrSwZYXKlG9bUSRyOG6rvKPdT04mK7dq3Sk6uKp5d05HHQj9Pt3WG8k/6I/+lzRrpFr8/LFGEZPTm9gJQTYv86eIz+tRbMeIWsIrlkneGsZzfbbHZT3sXg4+CaX2m1hxq32vzBbHrD8qAFMNHc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731333592; c=relaxed/simple; bh=Ge+c8l39iKSoEZNRMHaXdEYvqwUhMwQQMkPBxcn3Hck=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=iZWSEZnjPX5PVtmq6WWbRlCbBkGRTBz3w94UFbKVnc1d10ztHtPNtqg/Vh3VVF8ykLIgDlSFfKDbEHE8CmltczKNWI+2F/6gKawzxHoEo4OWEdxOc3OfXWCK/+XGR5OvHOl9RqR3RUHNJtCQKsqCm7viEsTiUAwyN0hPKOW5vnI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=jv4xxbcs; arc=fail smtp.client-ip=40.107.20.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="jv4xxbcs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=U99YCVeQKRjouFF3tbM5UNZuERPIo4Rj0s1Zwn1kNjoYuvEx/iT65N2CJjX1Fump0C0metiCoH6Syp6CFVuLjWuQFaUu57bHupwJaHIY3FTleJ1HcoAp+aoj+WQq/LGscCWQVdW5WO9JELKS7qH+xA0QrkpVksiuvUlXw0LDwiRaErC7mQIiFXgDABExycTTtjkUnOt0KQvSmlzH2YQc6DiJc/lSXhKttg1C2pp5GXmh7t97OnpBN0+rS/4fTnbLyb66WUH3q/FTgSCnV61/tnUbwfDKEiw8FzR//fb4FrwoqIw4GOnPakdumgli4xm1j8SyAb3VCnmfKQaQMkZwDA== 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=oFqvOb0kafaQ/Rsqw3OiEgc3aZ5ogr0Z497eTktMCCM=; b=Y+jlrfcpB0gYgT2kBQvjc5CaEQaXxvAbuau3cr/XLFv2OHI+br31QrBMYUxwbNj1Yc6+aYr/dOI61qpdXJQDO9tlCCeRDlI2HgqK4bS9dNOZAa3p1I2NdOV0LYZrCGWY2zqpVPEk9Oa9KY7E5AFycrPH5WlWkqQpgwkv48F8B9u3JIJp6OC7DXqx+46EWdJNsXx3OL2peIO7RbegulVRHZDJjX9g6/Uh6rlkihY4teVVS4yfHqzf0v/ob2hCOWh7gg/uuGffy7SBLM4h6V1MyrXH92feA9d0KKoxJ7P3fyw4E88yd7gtrlMRFC3U9kVn9YNgoWWAI4Juq7Bj2MpQcg== 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=oFqvOb0kafaQ/Rsqw3OiEgc3aZ5ogr0Z497eTktMCCM=; b=jv4xxbcsL7cqmwsBVBSQgyI5PEJmUrfnIZTtXmZ6HT+cuZ/nGJrDow8KmNJnrVmP2mvC5OHhmputF178xjTe38pHYaiwkVGQhBxtpY1KZK9UfnNVgvOj6WbDpKs9Nif/jBpATjTX6xf3SpRklvQcPZVAQGxFtwMrtKSGpQeGD2VIf1AqLBKNp1ECFnGJBVughhJbbjQq88FrHG4RSc297c8AY6hpzclMt1Xv6yaaNgP2ujuJ+K4icK57dAnFo9DbqVRbwq8/NJlZyDsQBF46bR50s9GBO5ddPAavgt5ccrx+4+5jzOclUBQr925BY9/USvxIWNjWmBTNzMU5IYCtVQ== 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 GVXPR04MB9927.eurprd04.prod.outlook.com (2603:10a6:150:118::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 13:59:44 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%6]) with mapi id 15.20.8137.018; Mon, 11 Nov 2024 13:59:43 +0000 From: Ciprian Costea <ciprianmarian.costea@oss.nxp.com> To: Alexandre Belloni <alexandre.belloni@bootlin.com>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, NXP S32 Linux <s32@nxp.com>, Christophe Lizzi <clizzi@redhat.com>, Alberto Ruiz <aruizrui@redhat.com>, Enric Balletbo <eballetb@redhat.com>, Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com> Subject: [PATCH v4 0/4] add NXP RTC driver support for S32G2/S32G3 SoCs Date: Mon, 11 Nov 2024 15:59:36 +0200 Message-ID: <20241111135940.2534034-1-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: AS4P195CA0004.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:5e2::19) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|GVXPR04MB9927:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a5bad70-fca3-4ae3-a40b-08dd02591804 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|366016|1800799024|7416014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?7Fy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U/+fXmO08GusxNGK5whQ4YEimDCpcy4JZleUHO?= =?utf-8?q?TLLnoCHCc4/5XRGgKo+j82pjrUGuK34yXxfSR6s0LXRDTJu6hFmFMbJDANQbHoRLU?= =?utf-8?q?/f+qd1bdVyZADp6rLSwY/xRfJQ0/1riSKIUlpMOCiWvv5Zg6i2Bk9OEkSc8s5jvjN?= =?utf-8?q?wJJWke4cBMPDrKyUZsO2x107UvIK2NyWu1bYbdM0ER4CwEw8GF1bDta5404a1y+JK?= =?utf-8?q?m59wNR/LUZq8HTFbzc+vgp1YSsdlVonVhaXIf2RrieYft4BlcmNi3hyQZEGYxitDh?= =?utf-8?q?N2yh+1HO4TjYJuHFIredKjUGuAqiI9T0n2JDUFq3xo/y/yZwp9AuO0EEuzJFv7Dvr?= =?utf-8?q?iRYxEs5gdbqgjAqBThymWa8n/08DK8i8GgwT7xhzv0Q06WytoaEy6j6D8KS5BZ/+p?= =?utf-8?q?FgEe0T0RNi/0M?= 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)(366016)(1800799024)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?aUByxHNOzT3RDWiiUQUpICLJ3MmX?= =?utf-8?q?J9LgYeN9qM+JccnhkGLG9s68YdzK7hpU+gxGQJiOz1aCIeUYZQbUnkjmPAVjL7LLV?= =?utf-8?q?NyaJ8mfrbNquBm3s0qkkIHLoebXlDJbFsjl7bn54I1sf24szVvGgFb5g5BxmdkAsh?= =?utf-8?q?8cgiB3Bh0S2/elF47Rf2CwqjAzyztsiTMeZQPLgD6oFzaRbB/95rUYEYXvqvFatUH?= =?utf-8?q?+YRBJAFOJSDhEl/CiCmHss6nYjvdsrnrV1lMsFuID0axvElBrUx2bNgk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vY57vWLiJoEsfUD7/sdePhOGat5SvKVKBjJQXSr7Yr/r2i0Mgc4sbf9FyzwvijhHa?= =?utf-8?q?jrwDXcJR6jE/buJyQhpDQLIU3smpoeEJpHTQKfPnMSu/lPCOjZeb2TdxS6SqffNH5?= =?utf-8?q?F/Ex432Wv+LGSNJVIlLi9JRmLl3bXsKmSfBeaY9sP5+SpCKMXPUJ3Nc4zMhWg1El5?= =?utf-8?q?zNnnlScYmQMcsKs19I6DUp3WAZ1sIstZ6I9Je/KixebnruDniLPpYlhK0SJgwCnTs?= =?utf-8?q?GZQaCTZ1o60cUKKvH9ONoNy2vcDLi8nYjnZ2F3iTYzRG56Sdw+rJCz6grQTl4JwDI?= =?utf-8?q?5evF66stgbUHGlhxa8n/jJT/ZhjgaOeyPA7lROtPDKcC9CHeAEO8xepNjAPbSxD2u?= =?utf-8?q?5FGOqsM2ttxaXFG6BR2QF8XFc54O+dAwVw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a5bad70-fca3-4ae3-a40b-08dd02591804 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 13:59:43.7786 (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: RJUh9mf+sNs4gharQODyLXPaob9fBCsYmrz/kr8y66a31kK1sEhDmw3mf3wYkIf97fKQqGhdmrXQc+/JmGtbTOS4I+64mOrys8sxZEuB64s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9927 |
Series |
add NXP RTC driver support for S32G2/S32G3 SoCs
|
expand
|
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com> 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. It represents a time-based wakeup source for the S32G2/S32G3 SoCs. RTC is not battery-powered and it is not kept alive during system reset. 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 # Changes in V4: - Dropped 'assigned-*' clock management approach. Simplified RTC Runtime and Suspend/Standby clock configuration. - Simplified error paths on probe function - Removed node label from bindings example - Several cosmetic coding style fixes Changes in V3: - Removed 'nxp,s32g3-rtc' compatible string - Change to 'remove' callback from 'remove_new' - Used 'dev.parent' from 'struct rtc_device' instead of defining a specific 'struct device' in driver data - Fixed several errors reported by kernel test robot - Removed 'assigned-clocks', 'assigned-clock-parents' and 'assigned-clock-rates' from required properties in the binding documentation. - Refactored S32G RTC driver such that a default clock source and divisors configuration will be applied in case 'assigned-clocks' and 'assigned-clock-parents' properties are missing. Changes in V2: - Removed 'clksel' support from dts bindings. Used clock parents support from CCF to better illustrate the RTC hardware IP from S32G2/S32G3. - Removed frequency dividers support from dts bindings. Used assigned clock frequencies support from CCF instead. - Reduced the interval while RTC is voluntarily disabled to a simple register write in order to avoid any race condition between a possbile rollover and 'suspend' callback execution flow. - Updated bindings documentation with respect to clocking support. - Fixed a potential unused variable warning reported by kernel test robot. - Updated to usage of 'devm_rtc_allocate_device' and 'devm_rtc_register_device' instead of deprecated 'devm_rtc_device_register'. 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 NXP S32G RTC driver .../devicetree/bindings/rtc/nxp,s32g-rtc.yaml | 78 ++ MAINTAINERS | 2 + arch/arm64/configs/defconfig | 1 + drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-s32g.c | 692 ++++++++++++++++++ 6 files changed, 785 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/nxp,s32g-rtc.yaml create mode 100644 drivers/rtc/rtc-s32g.c