From nobody Wed Nov 27 03:34:42 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2076.outbound.protection.outlook.com [40.107.20.76]) (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 497201AA797; Mon, 14 Oct 2024 14:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917114; cv=fail; b=Oe5SHvLTXoBt108JHFj8gy1IjbEptFFKQX464gq0YPMBc/I2yr2c8qzqssH2hkJ4YH3vILhGLsCvRfy3HRhU+rE98pkFe3bxWdRbLBuIfaYi5ZbNT8KnDKfU/OeOU1rP9yc/+LFjfiHMhbzxlLoVsbInKWx0rrOkJWUtc3tMYc8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917114; c=relaxed/simple; bh=4w6PO35DMimRhNwszjrRtDMyeUDniXGpwxZ9q7hny78=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=crtLJIKpbr4j0qLqx3MaT41fcnqqFYTdh1fCFK9yTFJoavrgKAw1mGhITcV9fMvTCuRx3ooGOwiqKG+ZDcy8G0bxEUpAkY9ib9zIJ7lPTMriBAVD+XH+0fh3/wAeph7hFPDeIXIQrLpoWm8GlJESdDR3k34N0WKeKVAFHV0FI88= 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=cqrj8XKn; arc=fail smtp.client-ip=40.107.20.76 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="cqrj8XKn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nJ+M20FWtRdyyiVC1PGe1IziunG5xTueWgAoMHMz9eyjoIGy1B3WpwfvyjAdMIv4yi96vh3Ikt/ZffTMC10QmCp8Ci+DHWx7zpRjeikT1arBu4Oc/zFb1Shw1gB849ArNbNx0yvZuBBrXmGE/2pjmS69gBFjzbCxZZ0txK+0Gxt7JgJe5xIS8sMpN1YAZkJADhKRlo4TjZBNyNtfm04a11U9Oatlhnzl+gWWqvDGWomb+NE5T/WLj7qog+uYceWFIBwz2GmNplizuiHjUJpXyazAeVbnM/F6PRu9qsci+aRojAusYgFkvmdnytnfkTxxz+j9v3HTvzK4lL+/JgaFjg== 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=89Wqi+Wi58q90XXcq7RFwUL8NRFn2moNyrqZl9vyiL8=; b=aBvA8VyC3Dd8Lk9WPftr/qXZXy/1ahw8HY2TpJOxgpZ/JMT4EW5uNYWDC9X4AXwZ2HQJhRvZwFJZ56i3l9d5A7pltE3szrEYDDXHEw8M5VOq/1CnrGnewd2nLIR4AfERYzqEkYhRXoT43WoEXP3YuHShisGz9xCjWE4CYS+PGeErmo9GHtS/oa+Cxtik/lhVDWU8RIreOEm38QLWzYmq6cLYbM90gc3UQ+zKitVrJtyMbtdXJjXrTCAynGD4ZmZEf0lfh7yq+RJuZ4F4TR5C2ALDQBL96rTq32h9Nh8dInmWLyyxF6eWkGQMSLUjnmwd7IY4n2W4UqMVtjj9qLUxww== 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=89Wqi+Wi58q90XXcq7RFwUL8NRFn2moNyrqZl9vyiL8=; b=cqrj8XKnjHNjqPJ3Wp3zsnNPddolqV/K7vkUk6gVgcrm8RQm3zsbg/2XCoDc2R5xRqVIjU1H8qK2/8mW5p4qskur6S4i8ldOhyOVr4rBJPABPjhtCRGQe47kzgKzAHOO1ScYroOqln5v1uqL3Un7f8b5WXTp7O2OdbjPLCFe6RlZLqmr3SOf5PzQhQnXI3O/XU58OV4K/M7iCHHr0sphVmUdaZYJkzT0J28ehbyH4h8uibzLdLbsmGfvrKhfPQ12zrY/UUObyX9v6bh2noDxSMkyCHOOG+cKWt9dFDLGQfH82300n9Yj2nLKbuQe5WQX7oD8HanA204Z1walmIuT7g== 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 GV1PR04MB10275.eurprd04.prod.outlook.com (2603:10a6:150:1ad::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Mon, 14 Oct 2024 14:45:07 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%5]) with mapi id 15.20.8048.020; Mon, 14 Oct 2024 14:45:07 +0000 From: Ciprian Costea To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea Subject: [PATCH v2 1/2] dt-bindings: linflexuart: add clock definitions Date: Mon, 14 Oct 2024 17:45:00 +0300 Message-ID: <20241014144501.388050-2-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241014144501.388050-1-ciprianmarian.costea@oss.nxp.com> References: <20241014144501.388050-1-ciprianmarian.costea@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS4P250CA0006.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:5df::8) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|GV1PR04MB10275:EE_ X-MS-Office365-Filtering-Correlation-Id: 0900ea63-a87f-409d-be32-08dcec5ecc27 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|1800799024|376014|7416014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MDF3a2FOay9tbTVtMXp1MTJ2SlFuVVFwNnEwN0dxRzE2N1lnVCtER0EzZzFC?= =?utf-8?B?cDJkT2ZVN0VlcFVhdU9NVVUreWwwSDg5WklXWEJDeCt0eHJlMXdQWnFYNDU5?= =?utf-8?B?SERsS05Kc2VpODh1Y3cvS0tjSURhMlI5MnU3Ykp6TUJCNllaLzI1MVhnbjlQ?= =?utf-8?B?VjVOa1ROdEtwTFNiTy85bXdHOGJTMnBwclR6eTEycDYyZXA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0JkbEVxc1hzRHdmREZseGZCZWdkaWhPQi8vQ1IvdTRJSmlxcXY5WmU4?= =?utf-8?B?aHRRUjhYTDY2TURzZWx2QjFJOHZUZjFVQ0RwZEh4K2dJR1VnRzhObW8wRFFw?= =?utf-8?B?Wi85dnRsWHRGSHp4Ry9ZMm9VWUZ2LytHemx0S2loU3pMRU1qVkxET0xNVEcr?= =?utf-8?B?QUl1QzBjK1R1L3UweUR0WlZ2Zkd6OEVVT0NubGJING1QYWhLUEpRN2FRY29M?= =?utf-8?B?YTYyaW5WczRWTGtiSnpES1ludUd3aW9PUUVyelY0V2owLzNtSjVkZ29WK0Rq?= =?utf-8?B?ajJXcElDWTdCSTY3VFZsaHc2eTJLaVF0VktGUDhuOXBFc0x4MjNENytvbFh5?= =?utf-8?B?Qklta0dsZzFwczZhR2dlejJLUFd6ZDVYQmJrZVBxOHN5QVk2TjdLTmlpVzFC?= =?utf-8?B?STZFMVRZYjdFZUZmeStGZVFLTHNjUDVHTEpyRVdSaU56VG9nNEw0ZmhNMVEw?= =?utf-8?B?OFhZRGZQdzUrcjFKNkVVUXNxZEpxb29Gbll0a2pVYWFjbTJDUWVaNXJCRENV?= =?utf-8?B?U05tUWJ3V0xxZ3N0OTYyV1dBYzM3S3FVZ1dXaXJCdGFzOVdxZjU2dkp2Uk9Y?= =?utf-8?B?Tk1ER1JtMWdoR2JybEN2MCtHTW9GbWMzdkEyZjl1VStTaHl5d1l2YlF3PT0=?= 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)(1800799024)(376014)(7416014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dzlQU0I2dzd6NU93YUNZYkRoM1FVcjIydXBybWU5bEMweHFGQWFUQTFqZTFx?=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zRGwzTU5NbmZ0Rk5OWkdvVTVyYUNr?= =?utf-8?B?aUQ2TjB2QVVLUEpEcENUOTM1c0JMSFRBdVJiNURkcW1pa3FPbUV0ZHpPR2pm?= =?utf-8?B?QndQa2FmclE1TmdUY3pNdnB5L2FJVkx5R3RkL2UzNG84WWZJTnVYKy9JQUNY?= =?utf-8?B?RTBqMmx3WkE5cnVCbHdnTmQ1YS9semdkWVhERU9FUWRHbm1yQzZBbXg5Z2pC?= =?utf-8?B?K0pkVmRNc0wwYWZvL0pBSEsvekphQW11clpNbm1JcDRDeE1ncFBYbjRRL0po?= =?utf-8?B?ZWNKL3F3OWNVSDkyblVlK0NiOGdXaDRnVWk2OW90QTBORlJSMDRSVDhTYUNs?= =?utf-8?B?c3c9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0900ea63-a87f-409d-be32-08dcec5ecc27 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 14:45:07.7292 (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: n4gBidIWAYFu2uvZ54/TVVDia6p8DFX+eUomjOKJRC4ToK3Qt8KJ1zKUABexaAm4Z6IHlQUqEVNjxC0OYRhTDg7CJWas9McHwWCwhdNUO/g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10275 Content-Type: text/plain; charset="utf-8" From: Ciprian Marian Costea Add clock definitions for NXP LINFlexD UART bindings and update the binding examples with S32G2 node. Signed-off-by: Ciprian Marian Costea --- .../bindings/serial/fsl,s32-linflexuart.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.y= aml b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml index 4171f524a928..7b2ba14297f9 100644 --- a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml +++ b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml @@ -34,10 +34,24 @@ properties: interrupts: maxItems: 1 =20 + clocks: + items: + - description: + ipg clock drives the access to the LINFlexD + iomapped registers + - description: lin is the frequency of the baud clock + + clock-names: + items: + - const: ipg + - const: lin + required: - compatible - reg - interrupts + - clocks + - clock-names =20 unevaluatedProperties: false =20 @@ -48,3 +62,16 @@ examples: reg =3D <0x40053000 0x1000>; interrupts =3D <0 59 4>; }; + + - | + #include + #include + + serial@401c8000 { + compatible =3D "nxp,s32g2-linflexuart", + "fsl,s32v234-linflexuart"; + reg =3D <0x401c8000 0x3000>; + interrupts =3D ; + clocks =3D <&clks 13>, <&clks 14>; + clock-names =3D "ipg", "lin"; + }; --=20 2.45.2 From nobody Wed Nov 27 03:34:42 2024 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2053.outbound.protection.outlook.com [40.107.21.53]) (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 AE6F51BDC3; Mon, 14 Oct 2024 14:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917115; cv=fail; b=HH2jwroXfa+DtD2Ot2Z/zTOOmbVupwiWFfn38N+Q1w2CGXbwKu387z4xVj6LtphkI+UYnEJik9mMZh5Py6IRbq/3nN2x8ngCfGB23B8RRoHznvLaLLBk6wvVbm2PcUANKSVgqQaC4IACNkPV6ZPKCS6x8RJhG46Rb9I1andW1NI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917115; c=relaxed/simple; bh=9BS8rkL1QTTXNs58BG8bOTv58bYul+z+3qK+ATtGVwQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=BuZWtTD8qmLdoq/gHehDpLMbodPnLxJHrJr7mtLuCZRBDfFnTzII7REiEpY6o9hEVMLCZKNlqKxduIm9UxdoG70o+91o2gM8NLOX/bzsBuk+UwjibA2Sa+twC43/hG5nw5bBBsXnlLMC1n68aFBCeof+jwSjT8Efii2OiA3jqa0= 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=QwLvc1rm; arc=fail smtp.client-ip=40.107.21.53 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="QwLvc1rm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BrhU//Ihp8XxPOjWKTXn950KmWXaSGKOaoGdSBTPZs059cLb7nrQDObYyVKI1f8YSvt9KfOneNAkrLRJjYZpr0SeIykOHD3oVr6hkFYT4GPbyanE1WX99ljgxwhxPzjoUKqPcCVkJSDtIKut/nSv3XIMcyVpFDl/J118BGYCaZbNK2rMRWCj13wTXaGnTBgrZLh60kwzgHO2u0FI+6OhVsfnRRUeylBaqC7TazJRKeHCRwb0eyWkBAews8HGt4cbRTboAMjms8ic+dDat4HxdLXEeOYZiELki8+V0/kn9sWLw/d6E8hUfUCNquwQiRsBN3xyglOlXoR8n+jRRyDQgQ== 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=yspjoETqEAdBLiFSRO+LbYk8sVc/EX4lsqm7Ql8O2EM=; b=G1e0hYxAaHRr6ez289aYNrTDpaeRp0LtoDBEkVP2YFdAKvrUuz3dxT2yo9Gi6wx5CFgLbnrKEW13fy8HvNXbHzOotl4t4wEM4WK3SGUOZWV/oOPjindjQjUclbFBCCH4WmxmVZJh1qkY6yN9ppacI6BSrwdu2XLbDdUaMbiHEvsc+TVnGxMs7CT2rgpnx24OISbX+RQqWlaXmut32kB83+OfDdNaV+H3O9quWqMCZpVm+qsiNyHKI2LMS0N77HC0W1MoV30VfmErUOJWH25ba8QLS0LY/4TuJ1cDxymceON9Sr7PHvgc29jt22621SezGJK4R6hejWryGlL5cUNfhQ== 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=yspjoETqEAdBLiFSRO+LbYk8sVc/EX4lsqm7Ql8O2EM=; b=QwLvc1rmQ0WHcoUkICRrtP3af2lPZlgnn9IHgcWVZBsblatwiC9kpxdj2W8rQGO2oTV8WrkTgz3t0PBEkYidxAg6VnVCGPE/8BqLflwAyEPpM6iCyZet1VkxIyQPbWO0iISLgUTGmPPEgkeXOftmc09AncRDw9zGlCFg5+SWmDB6FGuFnRkzKtNTeAJ4q7pBe2DeJRBPNqd3oJFuze/DTMtPT3hJEytoXi0WFCWSKbvkGfHPQgWSkQbu3sIaqQ7elJK/+NkLgtDdPP+vEIKbBCAqXreV5cffv5UOucc1IsCUQ7t1t5dj/Xisi9FTXAt7Pmjm6sgwxCRnfwYLU/nW1A== 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 AS1PR04MB9406.eurprd04.prod.outlook.com (2603:10a6:20b:4da::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Mon, 14 Oct 2024 14:45:09 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%5]) with mapi id 15.20.8048.020; Mon, 14 Oct 2024 14:45:09 +0000 From: Ciprian Costea To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea Subject: [PATCH v2 2/2] serial: fsl_linflexuart: add clock support Date: Mon, 14 Oct 2024 17:45:01 +0300 Message-ID: <20241014144501.388050-3-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241014144501.388050-1-ciprianmarian.costea@oss.nxp.com> References: <20241014144501.388050-1-ciprianmarian.costea@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS4P250CA0015.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:5df::14) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|AS1PR04MB9406:EE_ X-MS-Office365-Filtering-Correlation-Id: ef2d5356-05fa-42f6-2948-08dcec5ecd2d 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|366016|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?VlNmZVBqaktXdml6Kzk3S3BSYzBQNGV2MTRHWC9OMFlkay9RZFpVdDV4WDlz?= =?utf-8?B?d0ZQSmt4SDZCMVhsaE95TW9WVEVUMFlCMEJGK3AwWGl5WFJJeDIxaVBWNFZm?= =?utf-8?B?YlN3dWdQRTRXUUdPL3lZbFZOaVliMWpPSHpMd3ZsSzdINmY3SmtDTllITUR1?= =?utf-8?B?ZUxsWlgzbzlhK3ZZK3N4dmJzR0g3YUVQc3hqa1pIT3cwWGRXWDYvdlZnRVU3?= =?utf-8?B?ZjhHUHJJVTFTR09naWRIdnNuN2VUOHVCeWY3RFI2bi9CanlGSW1HRitneUxX?= =?utf-8?B?dzlmOEo2WGhjd0F3SVhxcXdMSlBqUVRWL291bkltYkNNbFZ4ZW5MWWp2VWJQ?= =?utf-8?B?eThmdmRYSUkxdFJRa3R5UkU4ZEpMNWg0OHdFcXFUU3lEbXlNbTlzUExhQkhZ?= =?utf-8?B?b0tseWF5WlRueTNXamhCMDBrNG5BYjdxYUNiV01VQU40by8zcE8zdUlHSjlF?= =?utf-8?B?c1YrdU1leHVRdlNQOVZ2YWRmVmxqV1FPR3QwdzFNb29LYSsvbExXYnhIZnkz?= =?utf-8?B?cGtnaFpJb1pTb2c2OWp6ZU03WngvakRYS3V4RHQ1cmhHYXZka2ZWLy9JTlJ4?= =?utf-8?B?RTNMTzQzL1BQOThrQTBwdlhyS3E5UlpHSjdmczk4OUM4cENnaWl6dFh6a095?= =?utf-8?B?VjBqd1cwSU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= =?utf-8?B?Y0ZZSzZBL0IxZzZBMzdQU0lBb3hkdlhJRUtzVitXNlFUTUxSc3p5UmRPMVJF?= =?utf-8?B?ZDlrZGxvbzh6cEczUGduT1U0UWJtbU1pRUVaVkZSdWNIeS85cWozNDhsZFh5?= =?utf-8?B?NVdXY2hWcmhHZE50S2F5K0cxWThQYk1UTWxCTElkYlNWQ0VKZm1uVFZnPT0=?= 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)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SmdoMk9hVzJLNlFGN1JGbU9UZHowbkt1NVgrWUNDNktHcTU1bjkrd2NOWUJM?= =?utf-8?B?akNwb1JkYWJhR25IS1EwOWNXZjc3cVdYRU9Yd05YQzVSNDFJTkp6L1ZRVytD?= =?utf-8?B?cW9WUXNPUnV2Q0RQYTNUYkE4OTd0S0RjU1BrL0R1ZExFY1FONG5oWWJCYUxH?= =?utf-8?B?NTk5UVEzS01Sd2hTa0NtLzhYREs2ZlhmNUU1bWdsMmZQV0lEcXZuYi8zWWZX?= =?utf-8?B?OTI0aG8wbUJXK1p3TTlIZ0JtWktDbWtPQ2JzQ3U1TUtWRllrVW9hU0l6ajAz?= =?utf-8?B?NnI2KzBkTlNta0x2ZjNVZUcxZGYvWHFDbmMwSS9KOUVlSHN6eW1ldVZRL215?= =?utf-8?B?Rm1VNGZDbTZiNzAvV2d0SnN2TTROZGVjK1h6ekhIcjRyU2tMZ1VpNkI4NUp4?= =?utf-8?B?ZXc4WVp6TUdTWFBzK3FyTjNDQ1gwWGVhbVJvRFA0WDl4R0tkTDZBbjhBQy9T?= =?utf-8?B?MmpnRkQ3L1VXVU5hMWc3cGJYZkszazUzY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UxcjVrM2JBUy9YNHo3aFBtL2Z1ZlNBcCtLOXFrMlA0?= =?utf-8?B?WHRGMUVlaUVZSWRZdXZhNEp5cUwxdXhwOVNqU01oWnZMaFJTZGQzcDU1cmlZ?= =?utf-8?B?VndQTUJ1TThVc3AvWU5xZXdYZXF5U2JMam9ueWN4WXEvTHpTUWpLQkE2aU91?= =?utf-8?B?bU5kcSszbVhqSU94VGRUZk45Y2MwczZjaHk0QVMwN0RTVkpMWGVkWEZzRlow?= =?utf-8?B?Z0ZtYnFscC9jK3JaYUloWkRFNVJ0K3J3UlBxZEpuYjZPbFNkNG9MUzQ3VE1y?= =?utf-8?B?dEt3a3JKUkRXS3ZVOFdmZXBWanRCOTQrc0xKMmdTdEsxZXRTQmFtUHAweDJU?= =?utf-8?B?RThxWU5aNk5jcXAvdFErNXI1VVlsT1ZCaXJKWFlNWGpsMjBCY2FvbkdrZlJr?= =?utf-8?B?Qm1ZUEM2RDk2WlBaWmhPaVp4V1pqWFEwSnNYR3hRNkh1UDhlS2NUaytVdGRC?= =?utf-8?B?TWI2b0JqaW9qeHdEdlF0aHJnTHZvYkFxeHR4L3JZQVBtTnYwTU1oUzlTNXNp?= =?utf-8?B?ejBhTDFRL2Fid0ptYVBNdy9rOTh5NlRTM3NIR25MZXJFMnZySm1LbTJwZDhN?= =?utf-8?B?d1J0eDkvelhEZHNhWENObGN2VVZhRXhzamJNUDZ3eG9PaCtqOXVNWW1xSXA3?= =?utf-8?B?SmswYnhzM2JPQmxkQTRVRGtRS202RkdpVE9WQjFmQjNXU242OVlId0w2eHds?= =?utf-8?B?aS9WckhVMDUya29XVkR4NVBHMWF1WndNVUxNZkZkdUR6bGdFWVRrdmJDTVRh?= =?utf-8?B?eWc9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef2d5356-05fa-42f6-2948-08dcec5ecd2d X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 14:45:09.4598 (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: eDlvRi0kYlFuLEn98kDP3nkUI8pXl6PpNW5PoajgTWrbn9wOuQVSIxrJ2AjqGYuSLmO4py5BlAmPAM4b3TEUXGAICMnfJowZzesWpNNCuVM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9406 Content-Type: text/plain; charset="utf-8" From: Ciprian Marian Costea Add clocking support to the NXP LINFlexD UART driver. It is used by S32G2 and S32G3 SoCs. Clocking support is added as optional in order to not break existing support for S32V234 SoC. Signed-off-by: Ciprian Marian Costea --- drivers/tty/serial/fsl_linflexuart.c | 67 +++++++++++++++++++++------- 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/drivers/tty/serial/fsl_linflexuart.c b/drivers/tty/serial/fsl_= linflexuart.c index e972df4b188d..23aed3bbff6c 100644 --- a/drivers/tty/serial/fsl_linflexuart.c +++ b/drivers/tty/serial/fsl_linflexuart.c @@ -3,9 +3,10 @@ * Freescale LINFlexD UART serial port driver * * Copyright 2012-2016 Freescale Semiconductor, Inc. - * Copyright 2017-2019 NXP + * Copyright 2017-2019, 2024 NXP */ =20 +#include #include #include #include @@ -120,6 +121,12 @@ =20 #define PREINIT_DELAY 2000 /* us */ =20 +struct linflex_port { + struct uart_port port; + struct clk *clk_lin; + struct clk *clk_ipg; +}; + static const struct of_device_id linflex_dt_ids[] =3D { { .compatible =3D "fsl,s32v234-linflexuart", @@ -807,12 +814,13 @@ static struct uart_driver linflex_reg =3D { static int linflex_probe(struct platform_device *pdev) { struct device_node *np =3D pdev->dev.of_node; + struct linflex_port *lfport; struct uart_port *sport; struct resource *res; int ret; =20 - sport =3D devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL); - if (!sport) + lfport =3D devm_kzalloc(&pdev->dev, sizeof(*lfport), GFP_KERNEL); + if (!lfport) return -ENOMEM; =20 ret =3D of_alias_get_id(np, "serial"); @@ -826,6 +834,7 @@ static int linflex_probe(struct platform_device *pdev) return -ENOMEM; } =20 + sport =3D &lfport->port; sport->line =3D ret; =20 sport->membase =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); @@ -844,39 +853,65 @@ static int linflex_probe(struct platform_device *pdev) sport->flags =3D UPF_BOOT_AUTOCONF; sport->has_sysrq =3D IS_ENABLED(CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE); =20 - linflex_ports[sport->line] =3D sport; + lfport->clk_lin =3D devm_clk_get_optional_enabled(&pdev->dev, "lin"); + if (IS_ERR(lfport->clk_lin)) + return dev_err_probe(&pdev->dev, PTR_ERR(lfport->clk_lin), + "Failed to get linflexuart clk\n"); =20 - platform_set_drvdata(pdev, sport); + lfport->clk_ipg =3D devm_clk_get_optional_enabled(&pdev->dev, "ipg"); + if (IS_ERR(lfport->clk_ipg)) + return dev_err_probe(&pdev->dev, PTR_ERR(lfport->clk_ipg), + "Failed to get linflexuart ipg clk\n"); + + linflex_ports[sport->line] =3D sport; + platform_set_drvdata(pdev, lfport); =20 return uart_add_one_port(&linflex_reg, sport); } =20 static void linflex_remove(struct platform_device *pdev) { - struct uart_port *sport =3D platform_get_drvdata(pdev); + struct linflex_port *lfport =3D platform_get_drvdata(pdev); =20 - uart_remove_one_port(&linflex_reg, sport); + uart_remove_one_port(&linflex_reg, &lfport->port); } =20 -#ifdef CONFIG_PM_SLEEP -static int linflex_suspend(struct device *dev) +static int __maybe_unused linflex_suspend(struct device *dev) { - struct uart_port *sport =3D dev_get_drvdata(dev); + struct linflex_port *lfport =3D dev_get_drvdata(dev); + + uart_suspend_port(&linflex_reg, &lfport->port); =20 - uart_suspend_port(&linflex_reg, sport); + clk_disable_unprepare(lfport->clk_lin); + clk_disable_unprepare(lfport->clk_ipg); =20 return 0; } =20 -static int linflex_resume(struct device *dev) +static int __maybe_unused linflex_resume(struct device *dev) { - struct uart_port *sport =3D dev_get_drvdata(dev); + struct linflex_port *lfport =3D dev_get_drvdata(dev); + int ret; =20 - uart_resume_port(&linflex_reg, sport); + if (lfport->clk_lin) { + ret =3D clk_prepare_enable(lfport->clk_lin); + if (ret) { + dev_err(dev, "Failed to enable linflexuart clk: %d\n", ret); + return ret; + } + } =20 - return 0; + if (lfport->clk_ipg) { + ret =3D clk_prepare_enable(lfport->clk_ipg); + if (ret) { + dev_err(dev, "Failed to enable linflexuart ipg clk: %d\n", ret); + clk_disable_unprepare(lfport->clk_lin); + return ret; + } + } + + return uart_resume_port(&linflex_reg, &lfport->port); } -#endif =20 static SIMPLE_DEV_PM_OPS(linflex_pm_ops, linflex_suspend, linflex_resume); =20 --=20 2.45.2