From patchwork Tue Sep 24 14:12:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Costea X-Patchwork-Id: 830426 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2068.outbound.protection.outlook.com [40.107.22.68]) (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 620431A7AEC; Tue, 24 Sep 2024 14:13:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727187183; cv=fail; b=nODxrQwL8Sz252m49/zUXzIV+Cgo8Dwz4YH2asWCC0vPhiVNUNExTNcQARg6uV7n8r+px42pLeUED+9xv8EKIpPc2Fc2joyOE3xgP4QQq8OL4WJ1q/azdqG0wUHIHOUe1ZSEJpLSlB+mFizlL2jC1IBN0kZhH0zBFoR9YGikh7s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727187183; c=relaxed/simple; bh=oDDXauypNdkQQ8fmGLKES1gHJ6ooCu5NAYWxl/YM5ww=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=h115iLky/vIK2WDKdT/QMo4zgvdZPlBHGcUcCVi6K/mFe1nkmu0i3dKA05ZLX6VI7Is45QcKsUoSDWQZxjgZjVmrpNYW3nbhyrNs9L1GAuT1kG8zH/JLEucO8B9QulSOWGdIUT3bR2Fs4eKCQsknE/Pru1+bbKMeqxnKEOBjFp4= 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=Vd9Iv95G; arc=fail smtp.client-ip=40.107.22.68 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="Vd9Iv95G" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N0CHb0KA0zYmiDL0h7ItjEzvq6ZDCglds04+xrldR4PF2U5lBJs3j+aeS8AkLnJo/nG8aVfkBulP1ke+OVoSCjq/1q6bV3d3f8hKAQFcSRK5ceNghIeddEBOss3tr3FF13oKjg4eDVipIuuoaUBm+tIqLy9GeCbXbKujocxec274dR+YGMO4nHmgNkv7OSAmtdC3ofAkrKMpESfzkPueLDfTVq9VXcsmpn+7UsrCh6MU3HQ0K9uhTyy1ebTAH/nR68txviWIL1hNtaedtXFputL0Sx6DlJkOpa5pI04Vwg9NpRbxIjCdSVqvWsaCfc6hKfSqbTKwOG/xF7ueFOMpFw== 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=Q+0p77TSPj04O9uwhC6YZekEGQUgX/00MAKKxt60OtQ=; b=BPZHkyHDJTbXDCOOjGzn7pF1DOmfULUJcUymPZYOADWz5ZZ/Es72GIS22kCurt/Tmov0rjx1RQ+//aFHMYN2ke/GexcjMkdsxqXPY0nH1sx3WDRpI8rdW1ZQ5DHcdyYQgWw6appHZZZEcOiY16j1gz+ZD4cU5hUxXR2ixMX0MCm/46waNBCRXuq3hl5DIRoJnNl6dh4Zm7/ZSQ7ptuRhdMF2h0owi7jjtPI44ktR2m/HDckshiQ4HRC+Hd++TUHkm0b7qf9VCS8r34lvDtPtVvfT4uv0T5kB74rnfjHCe0v09vDwjWl2n0kfgkVbWWHGjEvLYvilq9dj/OkudhmUZw== 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=Q+0p77TSPj04O9uwhC6YZekEGQUgX/00MAKKxt60OtQ=; b=Vd9Iv95G4ACx7tIH0qPiTthOsS7ozflfR3iPMvd2uGH4Km/2orQlZMmwGhEsgu2geSwcCZ0P8wtY6FCVrPPNMKm1ENx2Ps7EwbeluCMAIUDTM+bj29xNusO+iFUqM+NX8wW7OM1l4z0kHStnUNcOqYABnwvMB5ba5mgnjAesKc0Gpg8FTwPX5wrxC1mRkMlOlNUBG2/UgqIE+vEKK3IGNBMX+ae+tdp3W27stfGgdUQOW4Pm3wXAfJg8Y5vAhAqZhFHoMQl7luDNh/yZpjp5XmmYlcx1u3SOGcwjaNJAkoMEmeNKCTJQdPC/bawSUHgGDXFCRw5DT+VISlY9g+57zg== 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 DB9PR04MB9791.eurprd04.prod.outlook.com (2603:10a6:10:4ce::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 14:12:53 +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.7982.022; Tue, 24 Sep 2024 14:12:53 +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 1/2] dt-bindings: linflexuart: add clock definitions Date: Tue, 24 Sep 2024 17:12:46 +0300 Message-ID: <20240924141247.132455-2-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240924141247.132455-1-ciprianmarian.costea@oss.nxp.com> References: <20240924141247.132455-1-ciprianmarian.costea@oss.nxp.com> X-ClientProxiedBy: AM0PR07CA0025.eurprd07.prod.outlook.com (2603:10a6:208:ac::38) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-serial@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_|DB9PR04MB9791:EE_ X-MS-Office365-Filtering-Correlation-Id: ea174864-4e54-4a4a-dceb-08dcdca2faed 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|7416014|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?V421nlSlZwFgVF6u0w0M9ErKSYEqA8y?= =?utf-8?q?mGWdCguGejJDW43vNAv+EaZCkeFAAYaRiBI/cqosXUZYZkx4qQsHw4EnRzzgqAefs?= =?utf-8?q?RcSls1k2YJh9R2B+RpViip8jtzow4QbB+az4xlvWuRrItNxsbAASpUdWr3ZDfH9Ag?= =?utf-8?q?BY22tD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po3mkMoBHRrSaFIQIhgo7nIoqS7k2hKKE47FueomXVIf9F7K?= =?utf-8?q?y8x81vpoxW7kcQD8LEeXvnRBWOVCKd1DiKezGfVaRw+2Z30ojTuO5wwrhweGKvhyr?= =?utf-8?q?bc2NeptvDIzKTN/pohwZ3IiVBARxm7W47jDDLS7cJHauXkMqYUjmu3G9jkvDdvsSB?= =?utf-8?q?mGxX5uOMh8uZp3z3x6wD5rs1p2e9TBFXQf8/nIJSnhLEQFnD7UGt0/A9+ftdRAFM2?= =?utf-8?q?F8Fea7B7OEO1uvRV6HW/hooFDZ/F8NGvi2g=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)(7416014)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?qzb6JlpKFt8rpiS6L+8Fd5BfZ2Xt?= =?utf-8?q?HB9GRdU45R7MRYRW683nwQh010bn42rQq/mvcf1EMMndHZLVxE+yy0s239KAF9Djh?= =?utf-8?q?zTwh5VKiktNwd/A5qqYw076/ed3b7gfL0dz+GBu4bBYN+gmjpuXDQTZxl1SOGpkOV?= =?utf-8?q?zZkkX9h7jFrlIEAhDhVOhI4QX6ZUma2oxdEOH8WLoffMv+1Bj874u2NMI1UGvU1pe?= =?utf-8?q?4latvPMOr9BD6rIxJwSDFbqkKv9qNcLZM+6l4nSoOP8FPruNtrD/URnYvc418rfhm?= =?utf-8?q?4saWqLX0VkJpz/M0wU8KpbAebagaGPFGziEYEx76i3IiCCm2LLXLb6c+UEHj9+Fp9?= =?utf-8?q?dgX7kjQpMau4VpMrvs9rBy2iMNuzp6VhgNcHKKoPwGBYo1RePb54e7Hh8C8+ImFyb?= =?utf-8?q?KIwM5cL1JbQJ716yb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6seujSYEiE4KFJJJrSOnufcUvPPG5PFFQY4Q0s69iw296WE?= =?utf-8?q?GUOphQeHxB3uxh4SIaKxZANr8n1PHP+8xoky1Fq3xGXOAxQ7ugUuiUOLkPY4ak3eU?= =?utf-8?q?SX5Xm3riy6Fn2kXAiocJinwV2hRPEtB7lk3FLj/LzWZiUWHHI7xD5G/vm622Lu92o?= =?utf-8?q?u0/zaAeg6COwCQSPUJ0R+D6P64HFIjWJQgMc3qXSLvAAPU2yVQceAUN/0vo/LjV1C?= =?utf-8?q?kDff7GWM4hKdRRYoI1RLF9CAupNRCQD9Pw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea174864-4e54-4a4a-dceb-08dcdca2faed X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 14:12:53.3615 (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: /ngKNpw85229J4IrOVv0YudsGpYGozWBDSUTjxv3RLcLHY9dMafV0t5W2NQy5+4B0epOR3xdAVBJef30MHcpcnGqwyqpOZXjCX63gp4PoxQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9791 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 | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml index 4171f524a928..45fcab9e186d 100644 --- a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml +++ b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml @@ -34,6 +34,14 @@ properties: interrupts: maxItems: 1 + clocks: + maxItems: 2 + + clock-names: + items: + - const: ipg + - const: lin + required: - compatible - reg @@ -48,3 +56,16 @@ examples: reg = <0x40053000 0x1000>; interrupts = <0 59 4>; }; + + - | + #include + #include + + serial@401c8000 { + compatible = "nxp,s32g2-linflexuart", + "fsl,s32v234-linflexuart"; + reg = <0x401c8000 0x3000>; + interrupts = ; + clocks = <&clks 14>, <&clks 13>; + clock-names = "lin", "ipg"; + }; From patchwork Tue Sep 24 14:12:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Costea X-Patchwork-Id: 830695 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2068.outbound.protection.outlook.com [40.107.22.68]) (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 9E14D1AAE2D; Tue, 24 Sep 2024 14:13:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727187185; cv=fail; b=OoAez9nlxggvZRixNVWiPZFo3Ze94hfwKhi0ztqpv3Qe0Bshuo5/TZqKb9FRyPXC9jGnLqfYF3te26U2ycnCefHMvcmY+07qf+Q/5+MfesnYSYm+zx8s4SsaoC5ZLMcDgIzD6P4K7OSD2ZFp+g4heo1wRk4zrqkwdgFPZ502uoU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727187185; 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=b1UY9Rf76uPv7zBQHy8NV70obPwG0XzHB1qdsALLS0MC4p06dHoMzpL4732P8vCBJ+zhDmRlrpVg4xvSdIJ7hpR90LwAaW+y43i/hFwMgos3++xY5VB4KR4KYad0RGBWCJcSmp1M5PExfFp38fUJ4r75kLvfQzaAfRG1+bL3Xl4= 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=I393AtOp; arc=fail smtp.client-ip=40.107.22.68 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="I393AtOp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=F4G6cifa7hY73BBBaOC2O3+01eoy70SARzX4Ky14/zpG5Lw+zqp7C9AYDKTFBEPPgUisPyA5Q3xQYpSSQEW/tQbuNUZGeSsuyOlgBaNrfaouiP9Hhi7Mw8vH/RH9I+ljGKe0RLhXmuc19gyDFtaN6LhoEtB7pubUYbekq6BbYf0nMqOkA9UCeMvBUOPJjBjC0UCnbnpv5E+TzCevUPfWg4aNHNPlTIz6XE+cJlJxAg3vCZXF92hnPKA6I76zLzr7fmU5g53s9jxUtSoQ0YtBtXmGuhY8glDkq4tb6xBFi2BOpvz2sk8oCRyoZ3vFB9bms+6PMxgPh8MOWzgWTXJ9Wg== 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=mVb6Yis4YN+uR9v9errv0ZAuR5NmDVevu5tPJPW1iC39rN7w634Ed0KDV0PW8NvjJYqFwBY/g6VOl/olsBcpKtYI4qAi5m66Sos52AAd9nm7u1EWGP/pEdwGXCAppHodiX9R/2K8rpIOFi0Ip+s7EgGDfo3HEiBwXypN7W7rLzP463wjTq+HiLx80nQkKNnfUM6mjaSGbcrExxprtKKtPCybIp9JSNC7ps4m5Co2mSGRUwnXHVu4SWaGNW5EDlPiykgWMXAfIPJZBqlEIBDUd2362E1JWWztdkFCPcQQUGFYDZc0d8n3118Gqj3rz/BWyu89XK7pJ0iVyGFH2HYzEg== 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=I393AtOpkdCWqW8mP/BHfSAQBUHKG6IyAopUWkeggUGkbxlNF7Dni5U+jc5dioDB6nImtoIPHR4G4/FT7TBebO97vnr4ImFswa/JqTijj/aRDrfIIanR4hCznbA9nA6wILE49aB0cRsJUMhPEdPiJPZRKhW8ZbJkQ6gAOU/o6+e/fMGxBXskCm6khGxkMEUbErdmqz/XpSaY+wtdoCfThhuXk0k+Nj+Ep9co+S44o4nSqtHUVzhkcfjeth7ClWWJNm4w1YCEOsLm3/l7tBEvEcXzlvFpwWnLUoQzlxe+ptIorcCw7oRQsNIFSYDID7JaZelkmTBjcDqkilp1zpWImA== 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 DB9PR04MB9791.eurprd04.prod.outlook.com (2603:10a6:10:4ce::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 14:12:55 +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.7982.022; Tue, 24 Sep 2024 14:12:55 +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 2/2] serial: fsl_linflexuart: add clock support Date: Tue, 24 Sep 2024 17:12:47 +0300 Message-ID: <20240924141247.132455-3-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240924141247.132455-1-ciprianmarian.costea@oss.nxp.com> References: <20240924141247.132455-1-ciprianmarian.costea@oss.nxp.com> X-ClientProxiedBy: AM0PR07CA0002.eurprd07.prod.outlook.com (2603:10a6:208:ac::15) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-serial@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_|DB9PR04MB9791:EE_ X-MS-Office365-Filtering-Correlation-Id: d3a6b197-d9e2-4f3e-1fa3-08dcdca2fbfc 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|7416014|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?eUrIwfoWWhovxhekJTz0T15tl9OlzHn?= =?utf-8?q?buddIWeCBtxc60w8g5EIN0o12Cbki81XL/NRm7Vh/wjeC/LT3Tna1ytax5bnUFtEb?= =?utf-8?q?U2BvKmOESjTKaYiZk1pXHnfOWiFiHqh63SCg9FH4/3lVzMUC0VeLO2bdVvoTb717E?= =?utf-8?q?54lqFZzIt+IZNbg7hLCnnzBOC7Q5eTpaz6CHUiea3j0f2U5gbeQQYe7BlOKxUQSPQ?= =?utf-8?q?0tMa7wLACggw0rpqKfkvHdUWFdyIfCZlHJ6h74VRgFBLwYiCUm1Ts8qBrFrkbSFP6?= =?utf-8?q?JXR7pm+x+DpOIEJ1G0Eq2/3sGM/SJ0dL2E1cN+eHfVSur0RbmcNlsjzwO62W9ryt1?= =?utf-8?q?hSJoYM0XQ7VEtSoWQZ7gCWCK/GBW30N0qPEQESZpBE2ecFCF+SNM9D7aZpC4yU/VC?= =?utf-8?q?8kW5sWYTUOIjpPs1Z2n/50K4INLfNcR3JJfwqKbXuYKA9UUg7DtDrw8MKcJ9+zBtJ?= =?utf-8?q?hAg/2AiGw/G2Fk/ahspbzBXkrePQXQvvpvAMLIAW3fjDfIVRus8txOlxzikm1ZYCY?= =?utf-8?q?MoeYs+5h/NRNfBOPJjtOhsYYtQmsXJOocvarpYyAXi5CgXUd6qpPeOMQ088Ujlb/O?= =?utf-8?q?TuDDaPBWOFzehd/EQ1VLE6D2mjHs962qp2O0PClgx3/wKI1xBo65kklMyRj1eNWiM?= =?utf-8?q?ndJAv7xRf/JFyWUQys9XAfS0+08jViPc5YbwDvo8rRspIF0AQfJaz6KynjftDDr7E?= =?utf-8?q?ppVY4iDdZK07wJWO3VkoBU+Y8/8KbaXhlLT1DCoheUuz+TMBP/DnUpyPVk1ytc5fT?= =?utf-8?q?uViQegWRP5SKQj7kqC2VtJMNlHDTaQ/fzjr0/AsB05mwsh3j71SfQPDOO534n1A6U?= =?utf-8?q?SK9Fqu7pb9AoDe+mfx7+e0q6We+erXW1yiy4Nybwxac/Q+NNWtz29mmiiCgtIGXlE?= =?utf-8?q?mQUdqrULbEc70WMbubquJnRIv3TfEn8EJlJVn/u/9yWf+YTznOVbXcMXartcHmAPt?= =?utf-8?q?F3DcmsGlyGgzkxUYBA9nHXYL37JZ8ImZIVJgjkLEDlvaHz3y69wZwEOiP3JSxtuVY?= =?utf-8?q?T+AI+sj3j8nYldAip39TD2UdRuUvbwN1xhZt+LGFwPYy0l1WBIaxO4ZncevPZNduc?= =?utf-8?q?2mduJZcARuaO4EGE9u/9LGIgNQHInYkcFUY/JWWTcXPIMPu8MuUkmdOzkbnFbXQjx?= =?utf-8?q?Jsap9/GVSQ0gvgCot/ZVBavnArITG0SW7zlc7QksLXNQVrm1sUUSX6nyaEk42FzQD?= =?utf-8?q?erN2/zx5ox24WwYqqKQ2iN1Wdi+odRoWeGGRSQWjxzqiLApbIGIt+o9AKQPbpZ2NE?= =?utf-8?q?OyI8ZFGXdZev4MHRfRo9SHSM9EYReVRSqpg=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)(7416014)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?+OSDuhkH57KSj5cUY4PMCLmzvuq/?= =?utf-8?q?VC9v+K3FiEMrZbn0Xc9ZGOgeLKQEvNMZzpJMnZJdUb7PO20lUJT46EswQpNdDggyi?= =?utf-8?q?J/OHubAnmNfKQ/eHV6V7KPUEdehjluDo07lv5v/KrYl5ZJ+Ujc7s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w?= =?utf-8?q?eL29fEka4WYRmxnXsuL5y5NMd/1zHbvlE5G8NTeCcORKKRbL99088KMsIw8YxnKFY?= =?utf-8?q?NWbP4aHzUNrWcY9ZlgrS1+ZqtCJjA4UXXjWdgrWhZlJ1BCO41uw9g7fbIZcTVfOvj?= =?utf-8?q?lpDh9BZ+4dzfiFOcr13O85IqNMo5I0vFSu7Yi4JnfQSVPUpwG3raDe7+g9bflxzdD?= =?utf-8?q?2tO0ybPaOpUmsFTWvPy7flRtN4fhLAvzDeORYDdktMBcPi2fHkbhu1DbPJJOY7nA3?= =?utf-8?q?tLG9yYwcHoSSpCRT54Os/YOl2Hl++Mlf9nq7+P6XIQ7t+1y1rl9jycaxjZE1P0IYe?= =?utf-8?q?PDwDJg+xytnqW7bXqvclNifJcMD+/VfUdty7O4eH02iRw8bAJX6xkIbx9HUfT/Xtn?= =?utf-8?q?/cuTyDqT/e+rrHbGlnko/DlVdHtL3ADX4d7KZG1B5Ghmva8sFoFUur+0aYjjDzy/A?= =?utf-8?q?VIr+NVjfFwBcdu3t1yei4cwuDJDT1LqLV4Nt090Jc1vuOnXbhn6/JVNkJBbW9lGXQ?= =?utf-8?q?XAm1covS0jG3CEtt+fDUSLVeyXthNvTp6Q=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3a6b197-d9e2-4f3e-1fa3-08dcdca2fbfc X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 14:12:55.1518 (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: Zfsp8K2hMpHGq/C4NW7W5iiYzuaIHs2ojJeodKUbelSNIjdt06YFBMHNwgB1fuklXjAlVlHPD7t6WuQ7yQwmmeR3JsXiDHlB3NJjNf+M8qQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9791 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 */ +#include #include #include #include @@ -120,6 +121,12 @@ #define PREINIT_DELAY 2000 /* us */ +struct linflex_port { + struct uart_port port; + struct clk *clk_lin; + struct clk *clk_ipg; +}; + static const struct of_device_id linflex_dt_ids[] = { { .compatible = "fsl,s32v234-linflexuart", @@ -807,12 +814,13 @@ static struct uart_driver linflex_reg = { static int linflex_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; + struct linflex_port *lfport; struct uart_port *sport; struct resource *res; int ret; - sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL); - if (!sport) + lfport = devm_kzalloc(&pdev->dev, sizeof(*lfport), GFP_KERNEL); + if (!lfport) return -ENOMEM; ret = of_alias_get_id(np, "serial"); @@ -826,6 +834,7 @@ static int linflex_probe(struct platform_device *pdev) return -ENOMEM; } + sport = &lfport->port; sport->line = ret; sport->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); @@ -844,39 +853,65 @@ static int linflex_probe(struct platform_device *pdev) sport->flags = UPF_BOOT_AUTOCONF; sport->has_sysrq = IS_ENABLED(CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE); - linflex_ports[sport->line] = sport; + lfport->clk_lin = 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"); - platform_set_drvdata(pdev, sport); + lfport->clk_ipg = 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] = sport; + platform_set_drvdata(pdev, lfport); return uart_add_one_port(&linflex_reg, sport); } static void linflex_remove(struct platform_device *pdev) { - struct uart_port *sport = platform_get_drvdata(pdev); + struct linflex_port *lfport = platform_get_drvdata(pdev); - uart_remove_one_port(&linflex_reg, sport); + uart_remove_one_port(&linflex_reg, &lfport->port); } -#ifdef CONFIG_PM_SLEEP -static int linflex_suspend(struct device *dev) +static int __maybe_unused linflex_suspend(struct device *dev) { - struct uart_port *sport = dev_get_drvdata(dev); + struct linflex_port *lfport = dev_get_drvdata(dev); + + uart_suspend_port(&linflex_reg, &lfport->port); - uart_suspend_port(&linflex_reg, sport); + clk_disable_unprepare(lfport->clk_lin); + clk_disable_unprepare(lfport->clk_ipg); return 0; } -static int linflex_resume(struct device *dev) +static int __maybe_unused linflex_resume(struct device *dev) { - struct uart_port *sport = dev_get_drvdata(dev); + struct linflex_port *lfport = dev_get_drvdata(dev); + int ret; - uart_resume_port(&linflex_reg, sport); + if (lfport->clk_lin) { + ret = clk_prepare_enable(lfport->clk_lin); + if (ret) { + dev_err(dev, "Failed to enable linflexuart clk: %d\n", ret); + return ret; + } + } - return 0; + if (lfport->clk_ipg) { + ret = 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 static SIMPLE_DEV_PM_OPS(linflex_pm_ops, linflex_suspend, linflex_resume);