From patchwork Thu Nov 7 23:02:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13867261 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2077.outbound.protection.outlook.com [40.107.21.77]) (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 C714E218D61; Thu, 7 Nov 2024 23:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731020601; cv=fail; b=hj/k9GZ0sTIxNAz/Uypd5XUB1m5IPE3r14b5nE7BVIcV9RTeWmF9QgkqbVg3YW17ct28hCIHdZ2d3v4P1j6PdT0ESni3pYvitwlH3Z4OtA3o7/PgISi6UwS20soqMfPjhw9eEa75NI13KLJqf9h+jqKK9+a3w+9qCZPzfZyl1yo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731020601; c=relaxed/simple; bh=978YyUFOfnbYuHXbV4ZoywPThcziwlmR3i0UA2i1+ho=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=XJWq/3rt80FmBhTBhYCY+T+suduELNwManCjUTZTsyjN4Bz+K0Ciw2P+X7bXJfxVz+GxfZEWSb3XV/Q7/WV3pHE8tzyIj0X2V5konU3vYZr5fTiMmZhEY/1FCHStvHV7ukezoA+Tn/tgI6HwEWyc8rR1N5QuqzgpKQcswO/QSR4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=jfSHgzF5; arc=fail smtp.client-ip=40.107.21.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="jfSHgzF5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vc9XREidsQAIEttceYlIGJpqO9B77lJJK6IoXgWQJSX2tmcajug5ZgYPx22PvvGhMQEo1M/RhKM2u1hyzjHQTPuRCYRdJH6P3bv93RvPwjBoC8LDz/64rJX1ZdddDZCkQL7uIR2/BGe5fpyLVuluTr7U1c7/X+1c9S6eIceK+/OAamSzdWEIfJBWgNRvvCI+1YmnGgJeZ5CsMwkdyl3qcKUqwwWFBID6c8o8nGb/eCAru2e3vv1N/StxcqOROHXyzxPwwTP0GJJiWXkGMnxfZtMG1FOYE2b04Nax09HYOg4XR91j4yA5auzcTPrTrwwevLe4WtBGj4knyTl7AD8rpw== 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=ruhXI9BDcyEKJ61c1OlyrxwnIUQ4QtwbwselMQtOcBs=; b=RZW7VamlLzQhlnoMTHPX+wGaqApCjuKTJ5CmKcHeUOBdPOyegXPEw4sK0f2sZ4Cq4yFVq4NNTu9Ty+5Oijs1CftgHO65hIeJdB5t3p03cB8nBfhdLFGUeKUPZVMrsHv7OFAJ1LXsOy4f6vsNVIx+aoiSs4Tj/hDd6hkePszzGQuct0/iZ7FUdaMo3Ji8DBsVDrBMqiF9266rxn9puns0nf48tCQp1zo0u7D4/QC0J4t0jdCAgbGhpy4enICIkxRJ6gXiVKscVHTIXwKYc9nostJoi2wC06qMFUsJ8IE8OojzUlUEMPw1XqzAmiliyWEcz8q3n65GMnwtb0EFKaw/qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ruhXI9BDcyEKJ61c1OlyrxwnIUQ4QtwbwselMQtOcBs=; b=jfSHgzF5Kv1vhrZt7lXBMHHV/NkDDQfJZvCxXi/vXsQR96SrYR+3M6e4wCefe4gBNmsT0F/nQBdpomCDD3viU/fNYKt75i0dJ/C4YEqQfBp/0lFyu/w2/uPcSVKDIE0xDD22GvfOZMpCp0MyW3aYiB8Qlfph/r6rQxqMQ76QMHiyNbJQyE2fPRgYC94ZSqCan2p1y5+Z7Yw+E9p94HpvfzGJ7YQSWEq937HhMStSvFlLSuNl30sSi3+EoYQiHS/LybT2YduHFRZEBhFPp8VUH+3q1RUXWbNC2ABWKkI/+Oh9IL+iF+vjj1Xo9fgDx/2dO3i2JFolTCTmorqn83INYw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18; Thu, 7 Nov 2024 23:03:17 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8137.018; Thu, 7 Nov 2024 23:03:17 +0000 From: Frank Li Date: Thu, 07 Nov 2024 18:02:27 -0500 Subject: [PATCH 1/3] dt-bindings: trivial-devices: Add NXP P3T1085UK I3C/I2C temperature sensor Message-Id: <20241107-p3t1085-v1-1-9a76cb85673f@nxp.com> References: <20241107-p3t1085-v1-0-9a76cb85673f@nxp.com> In-Reply-To: <20241107-p3t1085-v1-0-9a76cb85673f@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731020590; l=1141; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=978YyUFOfnbYuHXbV4ZoywPThcziwlmR3i0UA2i1+ho=; b=ubJ0VjcmaW7PihPRWMxtJ73Mq9Mm5D7g1d2mSPGq/OnrtMGwJOruLgG2rXWArrrKx6zVGMSMV rLBHfj0/iKUCjnmJg5T51z7futni8GK7TOFQ/B29n3TxItag/cwqteA X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0094.namprd05.prod.outlook.com (2603:10b6:a03:334::9) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: 81daf812-fd40-4bc7-4a95-08dcff805dfd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-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SYluFSf6LliMU7QmXKI/ZQ7SiiSp6I0TLaF3/K?= =?utf-8?q?OO+nIsoxHAcI59u2nLJOpCm2rnMZ37ZmghMmVBRWOPP0pERVFs+wVJ7cYCr24JOJn?= =?utf-8?q?kcXQ+sPysRreOL9jAyeWNUN1g6MQqUO9o3lrI/rGagAHg7u2VSQenes6pZelXKt9H?= =?utf-8?q?hwJNJ9swcn6frgMpjzmER5wYKjEeEg1fE4HTOgod39UTVYiyEHqd/2Nlr/GiZjUV+?= =?utf-8?q?yhR1vqGoVsahhvGPxJ5hl7cfRU08lwZIDeMFM6tB547q4fEpkntqH2T7wIDjNb/kx?= =?utf-8?q?QIXm+4UdkaYrJkmyi9L+tWeAWQRBEkUrjhhmQqZ8lsHcBI8sxXktC+h0nKu+5yNXh?= =?utf-8?q?yfK6nUQVBGHF0Iwsm0OXXP8q0jR9odmA3N2Abeobtoqau967rebZtJFfOHa5oGe94?= =?utf-8?q?W6q9TtDeG1DJOs6Cx9NLZFzOInyLuVanMLNcKZ1n6OI2EJfIM+my8GqM=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PWy3q0XX7XX3zmvLkY3hPwDLmQZu?= =?utf-8?q?o/PWxFchgFP0mit9QlmhK93nA0V8s8hul+CeDIgQfmQvVMPwiYe6Fz6CvbUgA2E7H?= =?utf-8?q?EUupEG96Li4ZmKweV3lvZImwiSF63JbRigBa1+3iGG3lPEIB5Kb6zazmnl8zXMkyc?= =?utf-8?q?qndNmg1yDW/eeI9B4tzs/gvJKSFAA7pJdXLOWGkeW7vEIYgIdIaCQ8YawYYZaFegF?= =?utf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t3b6ZRYiGtEo78RwHLYrnkO727vdkFOJUJgPAaoddOpqd0xMSvxDYQD1?= =?utf-8?q?7EPHg3Vl6CCLotAHJo6BD0H5ho3VRJpOJPXSBNUk7GvqXzBEW7Ygiev4+7pFUCbNj?= =?utf-8?q?Y8BzMTyGB1wc6MM8VYabrBMLktP4qpY16YA1XEZUnxtGnrNF5zg/xVBXCd39nZkZN?= =?utf-8?q?gy9/x2Z4i8d9j1V12fjtDpDCq1a8ligsFvqlARiWp1Rjke2lqAE8pqFnPubpkQoK8?= =?utf-8?q?R9m06i9MdM61S+xx5RsodJJbJI9zB+YZ7WiDNC4yHNy3lZ2WoYF0g9usFWCXrx3w5?= =?utf-8?q?1FELzFjYmm/R70f7of9r/3ljD4pEcd197xTEVf/4lQCh1mi1dgp66ZQwSLWLNK4WV?= =?utf-8?q?9Bj/d5JVWUI+oz1QMJ/yrQq1uoqmnjBsl/RKT6g5SVN+9iNCCsFnZUjHVQfJ8H8Gv?= =?utf-8?q?wCfhgK2tKahk?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81daf812-fd40-4bc7-4a95-08dcff805dfd X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2024 23:03:17.8484 (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: fFHwGZr2ZiKhUTmmSdwFsX0yifVOfB54g3dDA0/negr9hUcOJiO7kTUjzB4dgy6Cym9CeGfxUYU+LGpQecGcVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 P3T1085UK is a temperature-to-digital converter with a -40 °C to +125 °C range. The device can be communicated by a controller via the 2-wire serial I3C (up to 12.5 MHz) and I2C (up to 3.4 MHz) interface. Add it to trivial-devices.yaml because only one 'reg' and 'interrupts' needs. Signed-off-by: Frank Li --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 6ecd6432b021b..361943b3d73bc 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -301,6 +301,8 @@ properties: - national,lm92 # Nuvoton Temperature Sensor - nuvoton,w83773g + # NXP I2C/I3C Temperature Sensor (-40 °C to +125 °C) + - nxp,p3t1085 # OKI ML86V7667 video decoder - oki,ml86v7667 # ON Semiconductor ADT7462 Temperature, Voltage Monitor and Fan Controller From patchwork Thu Nov 7 23:02:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13867262 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2040.outbound.protection.outlook.com [40.107.22.40]) (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 E53CD21A4A3; Thu, 7 Nov 2024 23:03:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731020607; cv=fail; b=OUEWmVKWS/V4KKMwVNDsyOLpfMEJgoTMZlqV7tPwitT1AskFxbD4mPhG8dUL0pWu1QMAfL6PU9EWEFuGS1WdDgO2fkXQu8qVO+E40IH18KNeNtmoeh0TiMB5Hhj25bKix+WqZXjeTCmVJIy7XR6UB2V61wSUX77ZfbrIzr3MXdQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731020607; c=relaxed/simple; bh=1o2wdv4gqaWnXskqvSbL+ed4Q5AuNMkgQRffjjHgeMU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=rYC6vRE7LdcbFF+8aeuEWCkqJCCAHRam+7wcN2GP5w/zKEcq10w6C24abuYtbkwrW1CuvwJ3GJYAubtBTT20KGdePE4G5l0q8hdzP5Ph5AQ5pDTxBfybTL7JmJnH9Uz3bZdLRqXTFroXobr9+MsguzwgGKLQo0rDgdWz1e83X2o= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=S6PrkWjG; arc=fail smtp.client-ip=40.107.22.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="S6PrkWjG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i4jkRzhMOL48P4zKJlB/CNM+7k8Do9JtDFJyStTwuzBQYj7Rs6ZuEqQuJhLlmTkrvKBSuIr98w/tDWuDhlcqRs5kyn5JV+ep94jbXNr3E9CrpTogeR4Om0h4vWa9skcaWk5FtlgL6qV4dhTc8Cp+MntggR980Y5tA593XL6EY7bF5N4NhLHpQ+waZuIlnl1VXg43BJQNPondku2WGOe+RXCpXHitjYrfKoNpM5P0Xxs4NZjSakgATvsPFWiQtTqYqNKFATr+H4cwn2k1ol+qFp7SbaBlznX+J5OOYAZ82NF/PZBjNFVYA9mRPf5GE/lzFgb7uYDd3WOvokzvCHT8tQ== 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=l4jpQRHA2wXLqR7H/sC/XWgVEchK+V9PTWhYv9dnidY=; b=gTT9On9BVeaRStE2q/VW7hWQ1iTvzx3hn3zv0ww2gG52JAm0WdQhp9iqPd48D0Yy6CR1AgcXZeT99AaAFioO/y5/kILG/hnjPIDLpEJzlAiW79+UahDA4WGSekZ4dC1d79Wog42QHIeF0S4iAzpty/fUTl0dBxqbptESExD5VWAnwj3ARKxIZ+bfUfcbm9ct4V7ET5olEdi+pB2x3BWp5hL7HmY+baBa0EGH4hoKfsdDZ4VCCHA3pdigeFiksM//Z646HGCbrfNKjts34IZGjCqw70XroPYQSIaV5kgNIGqhgCGYPZcDsE4Ym+YcORMZ7ZxQsXf5BXMTq7PGvFWtlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l4jpQRHA2wXLqR7H/sC/XWgVEchK+V9PTWhYv9dnidY=; b=S6PrkWjGJk2sXr3fmjM6iFCyS/tyC/ZNIrcYxXYgpy2IHI9s9Y0QXsI18D3b9gm9kZxMVc81yYjZb6ZYCerwnZofPz/V9idC/fcPDCrtRGumYvmxFgRglpW9n8uMQ0Enyocx8/3lBnZptxLcjcyGIPBOQceyilnDZUHa52dqExG/Yjw7j9UEQeWzTVp3i177xGC/ueWXddC/RyB8sPuQiTdkyzg3yzpGgYe9O6+NLCV9oTt3S8i5FvnI1IksEaLJuWqoPzioeqFm2XcIVyzcUQJWO89jGD1x/jvUt5yY/fp098mjdlIPfHmPRNrkVvear98Sci7w9wkhW8t7qgwjDg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18; Thu, 7 Nov 2024 23:03:22 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8137.018; Thu, 7 Nov 2024 23:03:22 +0000 From: Frank Li Date: Thu, 07 Nov 2024 18:02:28 -0500 Subject: [PATCH 2/3] iio: temperature: Add support for P3T1085 Message-Id: <20241107-p3t1085-v1-2-9a76cb85673f@nxp.com> References: <20241107-p3t1085-v1-0-9a76cb85673f@nxp.com> In-Reply-To: <20241107-p3t1085-v1-0-9a76cb85673f@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li , Carlos Song , Clark Wang X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731020590; l=10073; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Sz9Q+6YHuWSvSb3gpsYVOO4SXJ4eqmHsQQa4pS5GzUk=; b=lsoTv4hN1Ve8RM+YdWsugsKlVV4t11d86e/xmDqtTx/XXjnpB0MZPuIdogPoVshikHUZSBvVk kPTnK070/emAOCCNRMnqdl1DQSn8oBwpJCvHEWk+WJmd6L7h5UyHImV X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0094.namprd05.prod.outlook.com (2603:10b6:a03:334::9) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: c2739906-3d82-42e0-3cb6-08dcff80607b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?oeVoyfoNwVUV1Gp6PQG5fygx6HPrQX2?= =?utf-8?q?5uW7IBQyabjvKbTG3wZiI58JcSPMg3aerlaRhI2oU1vplla4jBnSr2JpvavR58jjw?= =?utf-8?q?UawtoBqPuNi24eIXqligCylFbrcz4/zwCfpukv5UyvP47csSGRmBEnkZs9n38c1Q2?= =?utf-8?q?OZ13Jh91c5MGJLopIKi5YzcKD4AA+8ppWS3O0ExERN8gLr0E+v9Q2hHhpwSe0nJpj?= =?utf-8?q?/y1I5EBQ1E6nl3SAfw4j43Kt630nKTTKpAfGMGB/KSbgZ/EdSCJvVty0XVofk2CYZ?= =?utf-8?q?ln1wb/JRLo7rDOgm6iNsJLQl/WoI0ElbjD3Ftygy5gDoecDuFfLvWqnuORKzcBEf2?= =?utf-8?q?ffd3BjsSOc507/L37qtpZhNHdK7KslP4a/CC0n3iMTO8Fhct1NFKCwF6B9bBglc52?= =?utf-8?q?RR1YyaaeHS5kRfndD4Kk6q5RtIp6qybgvBo6Zi1FTM/FmUheNF/beE4KcCK+yY9vY?= =?utf-8?q?46aIDfREulZSjjuurgjlI5cKBNn4Z4/w2MoIHXtsaiSSQ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FV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5rfUQwytbbseIOSjmzvKoGh1mE7V?= =?utf-8?q?l5/FZvylzZdLqpxGvDnGAUwwOfAejP0AQG6afIUui2PIeJ6o3s7JbwDYXsZkQ4LT7?= =?utf-8?q?4qLdNaIbN8bfhkSt0ggI36IxN+N7/2wzsuh+8BvUJ2cdH8Zc2UFLtLqI1SvChQN8L?= =?utf-8?q?r0Q7UA/LPvJl8k0xPFTuo+ZK5tcLPSasRSFKutCHJ0lg+H32N1cmvIIh/OrMUdfVI?= =?utf-8?q?p1PxUdRPRJCzdp05+Fz9TvFoOPTPo0lRDmsqddR2cloVxHhQ2/miyBcAx3rzm7Noc?= =?utf-8?q?dEKl+gTELbu+MIRAMPM9gIfYMfWa1jumkOk6qdjSDfUoVtgP0gs0AMOYgTMIt3ruR?= =?utf-8?q?zhRS8Al45V/r6kHbKdLhC+OUAPJ952V22hvFut2NOIC7Tje4wJ1ui69/HF1avjjQD?= =?utf-8?q?xDuhWaZIGfnN6N5LrojPKNKAPmIB8myqMJkVnAYdL6OhIHnu57IQzIHO15V3+8pIj?= =?utf-8?q?C92Yk7GivH/DqPf/IMXwE38duBaoGjJCrfO6HbO0Mk6C4ly9S+jN7iMjH1I1BwiSv?= =?utf-8?q?9kN5AoXKqFrVfaFidh/bSy9lLAVCXHoqe723aAH18+eTgqsPAnItBdbPG0OSfjfKV?= =?utf-8?q?p+IWQ5s+6kF3T13AbNlDnjbzZCTr6KEwkCnqDEPFzD5GY0PA+WV0pc5UN907/+Yt1?= =?utf-8?q?JCXWGt28cnwFJ+Eql7KiRBemJJrpcISfpCxnB5cTPa/cA1BXqcOcYxXrEL0z35MUD?= =?utf-8?q?tuKi/VoMAbyvwgvGwwYvvzUzlfRDtWss6fB/NYAIVq//313dgn+6Rg0bPxDvAaW0E?= =?utf-8?q?unup1T+ONy0uG/o89KKoLwZhEDAcFI9Y5L9Vg5G5XueBS3eOME6KLW8wD4YpMsKPV?= =?utf-8?q?mQvJXvBKKocnvrABYNzIFshT1u0foCVThn05DmAdDlC4FANDOl+n218nI05zgLfz4?= =?utf-8?q?2YXXzStWVMjceWd37orgrk+uNK4g5tk2+HU7Tct8dIlk2BcWi2bulS496xPqTEnyR?= =?utf-8?q?QqglXOswJuaqThd0S0J3ipNHIpakPVu0i6LX6GymtB7pmER+P2+lZkY0cCc+vvrNv?= =?utf-8?q?jTohJ1efq3ViN1SI68j1DdCQmXtjpMHWUr2Dm41Lc/spwtNKCxGuJxcfzAoKIt9pd?= =?utf-8?q?mKZ5aVlIOkG4sN9DjoQKLGnBDIuo1nlxR/+EL5OkR4fpqeLkklubHO37mfg/wp1np?= =?utf-8?q?rZLRDr7U67hhoAhAw0Cm+rJUou8XrR2g4GPW8FHfFySXurinDMZLrR0JpRIht/NNb?= =?utf-8?q?4p4NsoMUhK1lGJgxes0LcZ58k+zqgexF7fzZji8IL9Z2JHHdjFYa6DHJ3I2lUQiKo?= =?utf-8?q?0/He3DKkM7VFBbnrXUWjUQQf8nVNsyOscKTJdAJglzjoCSMZMQ7mJ6zbfzqOv1lZ6?= =?utf-8?q?DGt98iLIPYlIOrw/XiPFtaV0de1wlqA8tImdynOF+I7KJb3vIUD26sG//h/+YhlKH?= =?utf-8?q?X5tU9ciAomepQGejj680LFlRECRbFIN+PQZKNTGfHmhWcJGJvJe+eJ6ogayGOsiRd?= =?utf-8?q?cmD65nyPAbuXf+qQYr8GMqgUkVjwSkXUduGSDz0tetzKsAvAVAiRkC57UdmuLjMrt?= =?utf-8?q?PiY0b7h8DQNb?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2739906-3d82-42e0-3cb6-08dcff80607b X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2024 23:03:22.0396 (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: iRVPMWvdlKcQ9n88JbbK4CHqeu2weYlzlkvBxSnMPdfXa1BdQHMRDIfQmbSCoy2eEvZpbQD/Nhe7Rp896hrFZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 From: Carlos Song Add basic function support for P3T1085 temperature sensor. P3T1085UK is a temperature-to-digital converter with a -40 °C to +125 °C range. The device can be communicated by a controller via the 2-wire serial I3C (up to 12.5 MHz) and I2C (up to 3.4 MHz) interface. Signed-off-by: Clark Wang Signed-off-by: Carlos Song Signed-off-by: Frank Li --- drivers/iio/temperature/Kconfig | 1 + drivers/iio/temperature/Makefile | 2 + drivers/iio/temperature/p3t/Kconfig | 29 +++++++++++ drivers/iio/temperature/p3t/Makefile | 5 ++ drivers/iio/temperature/p3t/p3t1085.h | 31 ++++++++++++ drivers/iio/temperature/p3t/p3t1085_core.c | 79 ++++++++++++++++++++++++++++++ drivers/iio/temperature/p3t/p3t1085_i2c.c | 68 +++++++++++++++++++++++++ drivers/iio/temperature/p3t/p3t1085_i3c.c | 59 ++++++++++++++++++++++ 8 files changed, 274 insertions(+) diff --git a/drivers/iio/temperature/Kconfig b/drivers/iio/temperature/Kconfig index 1244d8e17d504..7cdd49279aba2 100644 --- a/drivers/iio/temperature/Kconfig +++ b/drivers/iio/temperature/Kconfig @@ -182,4 +182,5 @@ config MCP9600 This driver can also be built as a module. If so, the module will be called mcp9600. +source "drivers/iio/temperature/p3t/Kconfig" endmenu diff --git a/drivers/iio/temperature/Makefile b/drivers/iio/temperature/Makefile index 07d6e65709f7f..d5e89c20d58b6 100644 --- a/drivers/iio/temperature/Makefile +++ b/drivers/iio/temperature/Makefile @@ -19,3 +19,5 @@ obj-$(CONFIG_TMP007) += tmp007.o obj-$(CONFIG_TMP117) += tmp117.o obj-$(CONFIG_TSYS01) += tsys01.o obj-$(CONFIG_TSYS02D) += tsys02d.o + +obj-y += p3t/ diff --git a/drivers/iio/temperature/p3t/Kconfig b/drivers/iio/temperature/p3t/Kconfig new file mode 100644 index 0000000000000..09e925024b66f --- /dev/null +++ b/drivers/iio/temperature/p3t/Kconfig @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: GPL-2.0-only + +config IIO_P3T1085 + tristate + depends on (I2C || I3C) + +config IIO_P3T1085_I2C + tristate "NXP P3T1085 temperature sensor I2C driver" + depends on I2C + select IIO_P3T1085 + select REGMAP_I2C + help + Say yes here to build support for NXP P3T1085 I2C temperature + sensor. + + To compile this driver as a module, choose M here: the module + will be called p3t1085_i2c + +config IIO_P3T1085_I3C + tristate "NXP P3T1085 temperature sensor I3C driver" + depends on I3C + select IIO_P3T1085 + select REGMAP_I3C + help + Say yes here to build support for NXP P3T1085 I3C temperature + sensor. + + To compile this driver as a module, choose M here: the module + will be called p3t1085_i3c diff --git a/drivers/iio/temperature/p3t/Makefile b/drivers/iio/temperature/p3t/Makefile new file mode 100644 index 0000000000000..21aaeb51e044d --- /dev/null +++ b/drivers/iio/temperature/p3t/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-only + +obj-$(CONFIG_IIO_P3T1085) += p3t1085_core.o +obj-$(CONFIG_IIO_P3T1085_I2C) += p3t1085_i2c.o +obj-$(CONFIG_IIO_P3T1085_I3C) += p3t1085_i3c.o diff --git a/drivers/iio/temperature/p3t/p3t1085.h b/drivers/iio/temperature/p3t/p3t1085.h new file mode 100644 index 0000000000000..b018a04e4aee4 --- /dev/null +++ b/drivers/iio/temperature/p3t/p3t1085.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * NXP P3T1085 Temperature Sensor Driver + * + * Copyright 2024 NXP + */ +#ifndef P3T1085_H +#define P3T1085_H + +#include +#include + +#define P3T1085_REG_TEMP 0x0 +#define P3T1085_REG_CFGR 0x1 +#define P3T1085_REG_HIGH_LIM 0x2 +#define P3T1085_REG_LOW_LIM 0x3 + +#define P3T1085_RESOLUTION_10UC 62500 + +enum p3t1085_hw_id { + P3T1085_ID, +}; + +struct p3t1085_data { + struct device *dev; + struct regmap *regmap; +}; + +int p3t1085_probe(struct device *dev, int irq, int hw_id, struct regmap *regmap); + +#endif /* P3T1085_H */ diff --git a/drivers/iio/temperature/p3t/p3t1085_core.c b/drivers/iio/temperature/p3t/p3t1085_core.c new file mode 100644 index 0000000000000..4b00e606a6d04 --- /dev/null +++ b/drivers/iio/temperature/p3t/p3t1085_core.c @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * NXP P3T1085 Temperature Sensor Driver + * + * Copyright 2024 NXP + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "p3t1085.h" + +static int p3t1085_read_raw(struct iio_dev *indio_dev, + struct iio_chan_spec const *channel, int *val, + int *val2, long mask) +{ + struct p3t1085_data *data = iio_priv(indio_dev); + int ret; + + switch (mask) { + case IIO_CHAN_INFO_RAW: + ret = regmap_read(data->regmap, P3T1085_REG_TEMP, val); + if (ret < 0) { + dev_err(data->dev, "failed to read temperature register\n"); + return ret; + } + *val = *val >> 4; + return IIO_VAL_INT; + + default: + return -EINVAL; + } +} + +static const struct iio_chan_spec p3t1085_channels[] = { + { + .type = IIO_TEMP, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + }, +}; + +static const struct iio_info p3t1085_info = { + .read_raw = p3t1085_read_raw, +}; + +int p3t1085_probe(struct device *dev, int irq, int hw_id, struct regmap *regmap) +{ + struct p3t1085_data *data; + struct iio_dev *iio_dev; + + iio_dev = devm_iio_device_alloc(dev, sizeof(*data)); + if (!iio_dev) + return -ENOMEM; + + data = iio_priv(iio_dev); + data->dev = dev; + data->regmap = regmap; + + iio_dev->name = "p3t1085"; + iio_dev->modes = INDIO_DIRECT_MODE; + iio_dev->info = &p3t1085_info; + + iio_dev->channels = p3t1085_channels; + iio_dev->num_channels = ARRAY_SIZE(p3t1085_channels); + + return devm_iio_device_register(dev, iio_dev); +} +EXPORT_SYMBOL_NS(p3t1085_probe, IIO_P3T1085); + +MODULE_AUTHOR("Xiaoning Wang "); +MODULE_DESCRIPTION("NXP P3T1085 driver"); +MODULE_LICENSE("GPL"); diff --git a/drivers/iio/temperature/p3t/p3t1085_i2c.c b/drivers/iio/temperature/p3t/p3t1085_i2c.c new file mode 100644 index 0000000000000..20e5f7a68dd9e --- /dev/null +++ b/drivers/iio/temperature/p3t/p3t1085_i2c.c @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * NXP P3T1085 Temperature Sensor Driver + * + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include + +#include "p3t1085.h" + +static const struct regmap_config p3t1085_i2c_regmap_config = { + .reg_bits = 8, + .val_bits = 16, +}; + +static int p3t1085_i2c_probe(struct i2c_client *client) +{ + const struct i2c_device_id *id; + struct regmap *regmap; + int ret; + + id = i2c_client_get_device_id(client); + if (!id) + return -EINVAL; + + regmap = devm_regmap_init_i2c(client, &p3t1085_i2c_regmap_config); + if (IS_ERR(regmap)) + return dev_err_probe(&client->dev, PTR_ERR(regmap), + "Failed to register i2c regmap %ld\n", PTR_ERR(regmap)); + + ret = p3t1085_probe(&client->dev, client->irq, id->driver_data, regmap); + if (ret) + return dev_err_probe(&client->dev, ret, "Failed to probe\n"); + + return 0; +} + +static const struct of_device_id p3t1085_i2c_of_match[] = { + { .compatible = "nxp,p3t1085", }, + { } +}; +MODULE_DEVICE_TABLE(of, p3t1085_i2c_of_match); + +static const struct i2c_device_id p3t1085_i2c_id_table[] = { + { "p3t1085", P3T1085_ID }, + { } +}; +MODULE_DEVICE_TABLE(i2c, p3t1085_i2c_id_table); + +static struct i2c_driver p3t1085_driver = { + .driver = { + .name = "p3t1085_i2c", + .of_match_table = p3t1085_i2c_of_match, + }, + .probe = p3t1085_i2c_probe, + .id_table = p3t1085_i2c_id_table, +}; +module_i2c_driver(p3t1085_driver); + +MODULE_AUTHOR("Xiaoning Wang "); +MODULE_DESCRIPTION("NXP P3T1085 i2c driver"); +MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(IIO_P3T1085); diff --git a/drivers/iio/temperature/p3t/p3t1085_i3c.c b/drivers/iio/temperature/p3t/p3t1085_i3c.c new file mode 100644 index 0000000000000..0007d79aa0a6d --- /dev/null +++ b/drivers/iio/temperature/p3t/p3t1085_i3c.c @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * NXP P3T1085 Temperature Sensor Driver + * + * Copyright 2024 NXP + */ +#include +#include +#include +#include +#include +#include +#include + +#include "p3t1085.h" + +static const struct i3c_device_id p3t1085_i3c_ids[] = { + I3C_DEVICE(0x011B, 0x1529, (void *)P3T1085_ID), + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(i3c, p3t1085_i3c_ids); + +static int p3t1085_i3c_probe(struct i3c_device *i3cdev) +{ + const struct regmap_config p3t1085_i3c_regmap_config = { + .reg_bits = 8, + .val_bits = 16, + }; + int ret; + + const struct i3c_device_id *id = i3c_device_match_id(i3cdev, + p3t1085_i3c_ids); + struct regmap *regmap; + + regmap = devm_regmap_init_i3c(i3cdev, &p3t1085_i3c_regmap_config); + if (IS_ERR(regmap)) + return dev_err_probe(&i3cdev->dev, PTR_ERR(regmap), + "Failed to register i3c regmap\n"); + + ret = p3t1085_probe(&i3cdev->dev, 0, (uintptr_t)id->data, regmap); + if (ret) + return dev_err_probe(&i3cdev->dev, ret, "Failed to probe\n"); + + return 0; +} + +static struct i3c_driver p3t1085_driver = { + .driver = { + .name = "p3t1085_i3c", + }, + .probe = p3t1085_i3c_probe, + .id_table = p3t1085_i3c_ids, +}; +module_i3c_driver(p3t1085_driver); + +MODULE_AUTHOR("Xiaoning Wang "); +MODULE_DESCRIPTION("NXP p3t1085 i3c driver"); +MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(IIO_P3T1085); From patchwork Thu Nov 7 23:02:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13867263 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2040.outbound.protection.outlook.com [40.107.22.40]) (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 770EB21A4B7; Thu, 7 Nov 2024 23:03:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731020609; cv=fail; b=GnxMjarAB0C8Yypi7EA9S8xZdUPhgtXffgokAixidRfVbRGsNauK5wQYHFi+apgY5K5l/+Da+UVxuaWBGyGJBieypCqbNhpfgOSNKapEAIWo36p+mh67V8X97U7qZBUvHEyJkLUvquUkDoMc2z3WP3wK0iyLDSgP38thpyqK9UE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731020609; c=relaxed/simple; bh=674fGre16wsgmxYfHmqsN6VLMJ4S2VE2ToXL1V2Wrqc=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=q5nojzzvZUQsXlzP9yfGMkn4sM+fm9DRMeHJ9qWOPKMuwuOW8iFITl3PHYzJORRHtgk+phc3GPqirCp6hvic35njV6PGkRpbyTh1aFGdsZwJ1VqB75NPjNP+4tO6H+dReqaJtSk5v0CaMiutfKf3WFzFJa4S8pD3dhdcuDi99HM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=TjEZaFC/; arc=fail smtp.client-ip=40.107.22.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="TjEZaFC/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G5OGkipijqm7W1UY1p5rSBdLqP7bwcOmzUftK72rGFNvBE6nq4G9HlYIYcNwSBClqO+t8VvJR0XJ+RbZFdBdf1imZnLkg9kyTbzJokVWh2fgwXcveYOVUx40SnwYZXln1JHPgniFMKXpQW5B73CTi9wb4Wxa+cBY+oPuOY4sbKDJHvGtDICoNDblPJkG96VGZAk+5tPCQXK5vDCcvc5Q1QE8OqUszu/3OLq+K2nBoVniimMtvoJbpa1P7TBGAskVvSreHyku5lkp8SBPoOn2CD6CuAjoR8gW9EJre56i2c4DyoHVrMRjUi+2lu1eEY4FISWjIfm8yFUOUOwLxLbDog== 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=6awtrZQU6LkJHPear9BLzG6arSog9kzzlZX/iwhrU9E=; b=hTUq7XjvIXxiJKwO6IFHegEHFrB+uWBvzpdkT2Z2xVPzo0gcl4gkxbx2nnGE9oSpWxFt3wUnqlDSh6d9v6NlMl5guoCMb8+iRped/8E2S7FyAp6Ct1JkPFYAXIBSPWXBmGtJh+hl0aQLFAQCipzOLYwBClBNu3ARcGiiLvOJKNo8BHI6NPh1Xu2ZtMZmXy0uSDp+bCVZYlPiEYEw5BWb0DtuI26bzjqghxsLIYw+gd8SoKsDryECxwMyDGLErvbyk4fge5oe4ueYJzY/rlOmBFiEfndZWZ7LgVL5WS89TWrz7LNxf+HjtWPNLQoVDn+y9oc5T2r20JbfaCVuZEJ/0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6awtrZQU6LkJHPear9BLzG6arSog9kzzlZX/iwhrU9E=; b=TjEZaFC/V2t1hNtuYURL0qji8obqaLDnsanKgSUfvPgNZU2vEho3Ld2GjbsxjN1c21+xGvFHUeCUpZQalbzKLsAXD1vrblbn8qmmKk99TjMXN/ZFuZwcFq+PeWhmg9qaoiXU2U5xvS7MI6qx8rEzZJwYBh8LiiXgs4OIzGFVBStQb+ZP5cep5dkn6JGgpmN3Ou/SntqKzjTy0XdDGRY/ayeQZz5w0mAYg+ksyVs7x2drqkBCBs40qXgOuWjqdxYyT891g//BpZV/0vsqViao44M7WoJx6vh5yTUR1boXEsESL4eEqUYH51RSOmSr19tQnh6veZboqOl2wjXZSlv53w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18; Thu, 7 Nov 2024 23:03:26 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8137.018; Thu, 7 Nov 2024 23:03:25 +0000 From: Frank Li Date: Thu, 07 Nov 2024 18:02:29 -0500 Subject: [PATCH 3/3] arm64: dts: imx93-9x9-qsb: add temp-sensor nxp,p3t1085 Message-Id: <20241107-p3t1085-v1-3-9a76cb85673f@nxp.com> References: <20241107-p3t1085-v1-0-9a76cb85673f@nxp.com> In-Reply-To: <20241107-p3t1085-v1-0-9a76cb85673f@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1731020590; l=721; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=674fGre16wsgmxYfHmqsN6VLMJ4S2VE2ToXL1V2Wrqc=; b=F6UCABJm42SDK0mHrxxijQdpJmGfVWQT7mmiogWp9Wcpp5wIYWvE6Q4BYy3Ddm40xoaYEx4bX lXPo+0QpuHlARl/2wkJALuGxUF7/KgNQlIOPHc44xYBn4FtlG9W+u3i X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0094.namprd05.prod.outlook.com (2603:10b6:a03:334::9) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: dc0c9ced-5be3-4ef7-0c1a-08dcff8062c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?q8gZuKJayNjkidHgteh+Cql4wdeAauV?= =?utf-8?q?BGXIvOuaSiDym0nMP3NYK5Afr+hlDLzx2MP8cDfKPHQM8aEWadN+ONLZEue+mImco?= =?utf-8?q?+xX/VaxQTEEebT3Nks991XyIktQ3L7cMnH+cRfRFDXNTjV3JENVgaMsdPbspIooTe?= =?utf-8?q?efZevuekashTyPDcZAye4XrXdgnTxbBcvyLagIaFrIQl2YYdtBko5plUwdCSrDRu0?= =?utf-8?q?i9pvSExyL4uYDwcU6thp7u6pL0SjzeCZEsjzfvypU0+q7SyAa6hS9LqDQKUn9szIA?= =?utf-8?q?TuBJz3UixZvAlo9p/3A8DeX5HeWRjsHtJZ+acxQQ7aRXOdWqj+62TTg9Cp6Bye7l6?= =?utf-8?q?5hJubeuRLQyBADFtLlsXrTkuBV88D6m/NIWUQKKZeScXI15lJAakL0nm1Ek3V/KKT?= =?utf-8?q?J3hCtOtnVM8Iwc/fArh93Jme8+daq6BZymmVpAwTLc48j+9yyE2/UTYr5M/A77w2R?= =?utf-8?q?xgXtJF7FdTUGd/7PRNGN0z1l+uzvmUMT2oGX4S8zMY1xc6po2rIZURDxCuWxROgOc?= =?utf-8?q?Li0ilmDKPK69pjlKDINDtCWwDaQ321ZEtezo7hnnN0B+aG+49rkTRhO07u48+vhf+?= =?utf-8?q?oTB7feahboPYCTLezc7D6Pdl2crkIlq0xnOJfx2rDAILUhNxcOIYtm2aDyUMHo9n1?= =?utf-8?q?utpYx6v67RBkR3vhKjiNodEuk+SaMsVF5RsBvJPH8vFwrQpv4UDhZ3tQx3kpJU5P0?= =?utf-8?q?yoGTaQ2/Oof35i/+MekC08F0rwQjFirSRUHkLlXpaRM6Fo3xEeehRx+ncRWmx43Q/?= =?utf-8?q?Cf5C9Xy9YQDY5/usXTcOrhOZz8p66IBG9inXfggnLBOwkNiAEPTHpk/Y2T8B4yn9w?= =?utf-8?q?Q9WiPpDa3Ty5sxLDbegIAfmbJmDnk7nxcJfOOwCzV9t0bJ6UFna4FlL3rOtG4zoWa?= =?utf-8?q?KbrUE3h7L6Eyh8htaVh9Hiqr2rqVahW2Tpk8RM6Ac83LFNFqIGJrX1k9I1QERCkts?= =?utf-8?q?7XwSQ27vPJPh2mpULrvWW9rWn0Bp/lJ7TM75DbspLmB/0NdrjPPOmnwpFgm7BDOYD?= =?utf-8?q?m+jrcyrJydWe47eI4haVasTah5MmtXk5U3qCx1hYh6MdU9/wMe2I9+rn0jYg1r3z6?= =?utf-8?q?nldZ9fZK+ylMpwvFFV7DoCXNTdBgemwP68BelROB23b3oXQ0i5EW4naLH4OhqH0jv?= =?utf-8?q?bcXmMQ+6jxYfV0L5H/myFBYxQh5kLgjUZqj0gs+sfJQFV3cZ+9UFjRhWHVJBXqNQx?= =?utf-8?q?yPpDsuOl28VNymLAgl/qM8Wrn6xNmDZxexU2O+rzpgzN43RDB35FMlHPP0jcIeeT0?= =?utf-8?q?yBlqEvO8WcV8yJM7vvbLVy8+5UWn5DF70+052q881gJ9sxgiSvicrg4Y=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lRsUUZYntQXVoTZr2zhoMTFOA1Rn?= =?utf-8?q?LRumd/yoLTyV1+JSm5SgKAnHkmOV5/7FOo/nf1D6XG7GvotOfZnzGRMh9kRkROM42?= =?utf-8?q?vRK+5ZKZIvjB3reJ0kptW57O5evHkxzfXbNNXT60aC87kcuGeRj/6DGLY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?= =?utf-8?q?uJxkRuNDfUR0AlIX3vSLaYKBh/XZs3e43XRThrOtS2JtYNKx4N0EPyvBdazSLJgXA?= =?utf-8?q?Cv6u5lq3S8If7aQHTBaa4UGrRxVCLtC7A7R0AODrvEKuisiFT81/Usmji+lBwu34v?= =?utf-8?q?MQfQPwCKhP5Lp8+QnwVRwKAaOFq4ALTS8p2aU4vWU54OORhp9JoyXTm3TzRkrp7Ty?= =?utf-8?q?R1JRX43ja7IMbPxf4IBcLYJMcmA8fyNnMw5I+gjZlvlDqL58TPaGz5XIShUAqgQp/?= =?utf-8?q?NISD/gqzOvSgIRwmAePoEP9lVefbhrI43DrctkSBwO4NmYDkBWZacG+7JMqlXIf9P?= =?utf-8?q?FzZ2zEC5lOVSNbYE0Xun+uWtdk1Uj0cA7OfjLtsUjtppAVSrM9kngUqt1pWxwMInu?= =?utf-8?q?BH6lYMqSNCuR+ECTqQ/LQ/pVCe7JlKGwzqZxkzcA9ECnmdCJV4aInPi+lA1a0qfKQ?= =?utf-8?q?FV5OXrKj3MwmnH6XtISP/CCf1b1La6AB7yHrvzUcOIyBb9T2h6zP7CIKksFZiw9Un?= =?utf-8?q?EU6mcg9PQ8J9?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc0c9ced-5be3-4ef7-0c1a-08dcff8062c1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2024 23:03:25.8803 (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: e1L9Cx8zZTBYUC97hhi0JtGOjo7Drma1jzCDLx+h2rl5oJ07MbY7NAIp3Ela874qDwJKN3nz0oHCxIV7ytAvMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 Add temp-sensor nxp,p3t1085 for imx93-9x9-qsb boards. Signed-off-by: Frank Li --- arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts index 20ec5b3c21f42..36f2995acbe29 100644 --- a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts +++ b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts @@ -221,6 +221,11 @@ wm8962: audio-codec@1a { >; }; + p3t1085: temperature-sensor@48 { + compatible = "nxp,p3t1085"; + reg = <0x48>; + }; + ptn5110: tcpc@50 { compatible = "nxp,ptn5110", "tcpci"; reg = <0x50>;