From patchwork Tue Dec 10 21:27:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13902090 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2061.outbound.protection.outlook.com [40.107.249.61]) (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 D9980231CA0; Tue, 10 Dec 2024 21:27:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733866048; cv=fail; b=pOPjeBaDwf3YfEU642hoRDiTUWRzwXpjeu51AzasVOiBcyyM45bAIejsD1WM86v2m4g78jk7krcRPZopXxWIY2ICwpdIiv7GHqvYLxoXXMECc3K0F6X7IKdJrnGkvWIe2SW0PwUhi89KSC9IDXk3nTg16q/d8b6Ohr9k+w4a4Ao= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733866048; c=relaxed/simple; bh=6QvioNdLBxHT/ITBdNt/yr8/AuwRCdJA2DWHZtE2U2Y=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=tOEz5kxtkvrE07PHcNFAvpLoIcS4Z1p8dDknjVsL7BvT2FX6gC/9xTifUhQD+O8lRQYeTYSD599uPvEawam54rZZUrGORRwDfAkjFQvTnM36Sz45LvJltKvYRvkRKi5/8ptGsTh4Sey3hn14QETXnmx5ztFBQtSXFsFmBGhMg58= 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=A7NOKnDR; arc=fail smtp.client-ip=40.107.249.61 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="A7NOKnDR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jUvqtYcadrxVym8P9PIUOAdVBDAuFQQ8nXkUvdOgb9VfUsnVuqr4eyItMQT9DbxqIpBMBpgQ23PQdW6aQTqqvqb5HG2G/fVJa5cH3sgMkZP9vrtITQZT3ZzaIVsZOkmHmIGyUMIUexNsGtC0IG2V41GLyMG6z+KOTbFzY0E7xGLOsLvcYtHpyqcGoX4W9m0V1YLn+t/DXv/gLQ52yu0liByc3+O0O/ofQZhx+zjxSfOvl1yHkHGP616X626eLrSe/YNQ59R65sXqpIRxFD/XqJP1uHH9y1E/IGYAvMRCEUFVRypIWkog1feV2LQ09CH7B6zTqM5tLpsMK0H90nRemA== 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=M2FNRg10a1brC0ZLMD6Q3Fg5AEOltEDfVOWX7F/08YY=; b=oIc5rzjYdo1Nmut1kGn+eJ3Yba72lQK6KrXFDnhhLTKBevn0xAgIPTccukTa7ny1bhcwYC9TtO9yx92+kXycIJS5fC1b6ptywTPmsng4/i+G9TP6su2vKdxjWACURZpTkm0eCs1Pjb6VsO36+TsLbAnV4KHjCw75fPhsUz3stOU6jT35gKn5kG+wO49J0iFCHz1gtay9KiZOOR7gCnT8GUwH9vY1DMqyJpLRJiaBIH7ormOaJD1F9nwAuyrX65RWZJUP7SwB1oaaYzjUY6lcrFlzDdBRhpgkOFZojwiRzeiU/QHNMaBenbtwZ5V1A5m5zmZEfWFvD90ASyQLLbPhNw== 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=M2FNRg10a1brC0ZLMD6Q3Fg5AEOltEDfVOWX7F/08YY=; b=A7NOKnDRBU1sEpf7RnhaTr8Ch4BjJo+LVsyJepjGi0AI29bszq7xG+xYOQpD2Db3fBmlLSQYhylPQB2ArzQnZX6lyqw1QnHx+TXreUcIMvWvaFeM9goEN/Xt8FPzrEOPFrR0tFjiEplhrj6I+seP109gb7iDp1B7Jgh+UcJU5MsvI57HbKPHIXp4hOSL4X0qHM1m+hEcvDxJ/geYXzF1s6CIp20aL/PDPcUekiQiJckSxiO5HjLl2X7tAuqkd6MHVEAdGZ0mhifYLZxHBm40tbW0BGgPSzH7WRNdm9YNB7RoLrvKdg50uYhv2/xu8Fax/n99LaAYMss9phNUm7xJKw== 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 PA4PR04MB7550.eurprd04.prod.outlook.com (2603:10a6:102:f0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Tue, 10 Dec 2024 21:27: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%5]) with mapi id 15.20.8230.010; Tue, 10 Dec 2024 21:27:21 +0000 From: Frank Li Subject: [PATCH v2 0/2] thermal: imx91: Add support for i.MX91 thermal monitoring unit Date: Tue, 10 Dec 2024 16:27:01 -0500 Message-Id: <20241210-imx91tmu-v2-0-5032aad4d88e@nxp.com> X-B4-Tracking: v=1; b=H4sIACWyWGcC/23MSw6DIBSF4a2YOy4NoAboyH00DgiPegeAAWtsD Hsvddzhf3LynVBcRlfg0Z2Q3Y4FU2zBbx2YRceXI2hbA6d8YJwqguFQbAtvoj3XwtCBW2mh3df sPB4X9ZxbL1i2lD+XvLPf+gfZGaFEyFGZsZfC92yKx3o3KcBca/0CyrccrJ4AAAA= To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Pengfei Li , Marco Felsch Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Frank Li , Peng Fan X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733866037; l=1284; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=6QvioNdLBxHT/ITBdNt/yr8/AuwRCdJA2DWHZtE2U2Y=; b=99XTYUPZ6hf/aVlRDKL6jwpwE8Z2Yl/8OlykUCI0tXSjYTjWCwwQtVWnrCfyuV7a9L3uNXlFa lbx+6T0B4ArC+6o8lEoKWP5sSmqQcd4DW/UBicaAxlxV1LDHuNeG6ot X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0P220CA0018.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::28) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|PA4PR04MB7550:EE_ X-MS-Office365-Filtering-Correlation-Id: f22955d0-d4ce-4096-e21e-08dd19616eb1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ZgBc2XCXUzdgK/jMUvaRUQDUOT8i19r?= =?utf-8?q?79XDFxc9zY3atmgxe/etxtd2AcYemx9SDffv3XVbrzk+hg1fg2snLP9XyFJNMNY8i?= =?utf-8?q?yIWjMteYXZCWWONaMBijSee8BgUX+bYtRYGtYwUoQ6w9eOuR26Q0xmjuXHn6Rr1ps?= =?utf-8?q?jpYBsyKr0/n6WF/Ar2LVYvdy+0RyWUIpu4pbyuLIXr1LP2ulTlOnluyvsSiYN90Hi?= =?utf-8?q?uumNIFNJOoyj8sni+P9pQkOaJL6zRw0ebRVE4kmOTDPTSG2hA+EXl4CydXDGg+2Qu?= =?utf-8?q?DNrjKeTHdKxeSd55AXo6BCLw86Rwvnp2S/BA4y3JcXGiAZWVTdBOphUrv11YgTqJy?= =?utf-8?q?nqNmdwTwjGVkERzr5U4AsZpMjjQJMXhHm5z5XUFhgu0ZJbsPEN4l95ZAdUiH78Rom?= =?utf-8?q?gwTE3ftp8is7oJbydzR6Ke7Ubh/Z++7Vv6TtmP28irQSTdhGk15Adc59C9dUSnQsv?= =?utf-8?q?KJRsPhXLI2SA4GpWgadcvTBZeI7RgFhEf4YJvFmKSqSiMayA4vFcDXinnlyeP+XAc?= =?utf-8?q?S2lvQDRuBccSLkieRWhrVB8QodVXJWBSqrv2prgw4p8r5WZ/fxpvx4vWPp9hOByeI?= =?utf-8?q?PuyfCSQ4FK2U2VP0PXBnnSzhfHfPdH8UHDrS8QI9KV7wEryzI8VPFLc8S5DiaPZOd?= =?utf-8?q?B0njJgmQ0XOCXc7nPf5bB4UmV/Se3dZq/SdkoaMEGZBwDArGoFG1Efg4P8WdvRBxZ?= =?utf-8?q?A43/kGnWeEth7JU/Wm8fdXA63UgOkn2F/k/OMaGITJjcGnHEPFrI0ToWIhKF9OBj6?= =?utf-8?q?4xBzZY65kwEDZ2Ni2LuCvKXSYePbqGgCU8cB5Ptk1glG6VcUJQU3AKwTT7RNtDFAv?= =?utf-8?q?nVjm62AOnkzwRmhUpsGKpJ375d+2natSPt5zGOJzFfXB03JH7auJbPp6TeTTyl2kl?= =?utf-8?q?+aTiF6RkyzCTov7+Da3qaptzbGlSCZLWCLsEI66gUIQ1TEtEyki0hmItQhd2xPey0?= =?utf-8?q?V8jk+6ON4R+05I0fymVbotu8ziPQQ5TMj6A72gOmVay46gokBoL85UQBd/cZaqiOw?= =?utf-8?q?EnSnrxj9dEmapKTMf078j2//0vdFIsPT55CJ7TxYx1l8g6DswZF6RWAni9Ka2MJNd?= =?utf-8?q?ju4QJoNSZloguLejUV2W/FoLqCaUMZ3f3kOunewKiZjRnORFDOoVdICwIsd+NyAXO?= =?utf-8?q?W61Jwg4kYNtO8xaWukOJCt5BqSESpi9D+xM4jRovG85eWE4nA/6YHtUGIXM3TdXgc?= =?utf-8?q?0oqYoKlx4IkMe9YH996dHhs884xmMjlz8HVszF97SZtVrCtOn7K00hC6GvaW/7Fc8?= =?utf-8?q?7GIhtz2tFlcPNPAL9hTI72Y2GtLyIkO22vRU1NWZD0Iw6o6vsZ9ZEk+i8CT2DtZTG?= =?utf-8?q?dLUEJMhngoB9o9TI63r/u0SqSGa07yvqVUgH2dsSH9DKE8dlsHVgwfo=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)(1800799024)(366016)(376014)(7416014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?M7fpYhKNn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VlwsoBX5iokwUUA?= =?utf-8?q?Ej7+RA9kJX9kCHEddWKuM7AnZCmjQfvWgiNoX/Cusp7xso2FOfYxDLG4khtgvGaz/?= =?utf-8?q?dwcx1+eRkjF2RJ/BZMcVcyo9Z2L3XBS+adT//xiUmASMNOUleRtEeQwxgXkQlyqTn?= =?utf-8?q?dqyIIHU+uAsNCQrdHlVyo5uOy0fLT/1Vevuosd4Nv55dZ/rCWjAc1cljbfyHFF8mA?= =?utf-8?q?34eIAVQi1uATEnPQ+Y24bzymjVPgC5pLDBbWSOOtg0WY2/mUiNiivP+dp70Crt8p+?= =?utf-8?q?b3MYNeSI17Dk57nQSJn2XAKIXgyDWZtIIhX2UXPJAw/KZPr3kONd5+blUcw4WSYXz?= =?utf-8?q?/mXKKofqd/Ih5qtMjzq6ppGPxGMQw3Go7BUaOS+rmAv7VYl2VOTXNi32e+lL9CTR0?= =?utf-8?q?Czgrnovq8pTgzVDg2uMGHbbdaLhTAs6/JsX6Bun5riQUE6esYyOgSmMyDRTQLGynh?= =?utf-8?q?/XgDaYqgrn0tn6skj+MaTKKAoT9pOXQio+nCb+8tKvpHQ9dvNHy8TLDqcvUnhWgiZ?= =?utf-8?q?Q5J6Vfrhc7JMJlcoB4AmdPqoXNB+DfbLU8KXgqMWo1gpI7ePT9RtGBeKLnIzXR0AK?= =?utf-8?q?9JxmHkJ0vfIQhsPlj4p/ZYJ64H/2rPhAwSXlHzxESE/OQH1iPcmWBERb81IYixB9u?= =?utf-8?q?flpMPPGbBXiC?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f22955d0-d4ce-4096-e21e-08dd19616eb1 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2024 21:27:21.7405 (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: SX32kTghjTtwdpXF3prStdIVbwGoJBdW5vgVKIv+HExK4HeD7nL5r7NItC3pLe2j5XKlnX6y/jHgqQUcTXx0Ig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7550 - Add binding doc - Add imx91 thermal driver - dts part wait for https://lore.kernel.org/imx/Z04W5chGq5TitB9f@lizhi-Precision-Tower-5810/ merged, so not in this serial. Signed-off-by: Frank Li --- Changes in v2: - use low case for hexvalue - combine struct imx91_tmu and tmu_sensor - simplify imx91_tmu_start() and imx91_tmu_enable() - use s16 for imx91_tmu_get_temp(), which may negative value - use reverse christmas tree style - use run time pm - use oneshot to sample temp - register thermal zone after hardware init - Link to v1: https://lore.kernel.org/r/20241209-imx91tmu-v1-0-7859c5387f31@nxp.com --- Pengfei Li (2): dt-bindings: thermal: fsl,imx91-tmu: add bindings for NXP i.MX91 thermal module thermal: imx91: Add support for i.MX91 thermal monitoring unit .../devicetree/bindings/thermal/fsl,imx91-tmu.yaml | 65 +++++ drivers/thermal/Kconfig | 10 + drivers/thermal/Makefile | 1 + drivers/thermal/imx91_thermal.c | 265 +++++++++++++++++++++ 4 files changed, 341 insertions(+) --- base-commit: d07c576946b2bc440d6d2073998023e8a0bd7568 change-id: 20241209-imx91tmu-af2a7c042d8d Best regards, --- Frank Li