From patchwork Tue Jul 2 09:30:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haylen Chu X-Patchwork-Id: 13719314 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01olkn2045.outbound.protection.outlook.com [40.92.107.45]) (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 9991215250C; Tue, 2 Jul 2024 09:31:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.107.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719912671; cv=fail; b=j/8UHSWxdj3s/RksC8/qn+ACV3oh+UgM1dy5OQQd14y/zZDoLCrtn9SUbxZwNoQewkiMiaQSSr2UBhVCyVW8i74zO6JOQIj3XILIa2BGdMrMWHK9Pl8NkOHM5gV2Xm53NCrNVuhnbitRZNpf9rZnZCpnT4EQq1h6Hxo6NeOE1j0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719912671; c=relaxed/simple; bh=6OPz8fRAL/9aKdt1yqlxOIMb3ox6wMg0b98ZsP7keeE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=GOjp7i4iplHnTSRtbeF+DuwJrGU7bJjlMl5uNeuxMUMIzAb0psDkRoZ03hx1Q87HLTEIqH+R8+HseDYIt0RJWQGddLBSIMQGtg/0rW67UfV68NKbABRXSnsProqb2nAcEDbTZJY1bawAQeHR1dbtfVogmhQNoFOe2CUPtkG1AYw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=t+IBEey6; arc=fail smtp.client-ip=40.92.107.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="t+IBEey6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SSwluto4wJGh610DovNmUVoPUdiy8byZoWcGon2jGe/dsZpadOLRq25o1Xvvm4N2lP33kXVtSqaR104blLFy3m4lH2wx68QdCOvRAeGjDB2bsIIcnhI7mj8iLg53+KQD9WY+gSa+oc620wpKiqk4S7HzxwLjBeHPo6g1OX74XM+JvXHpd+LkA1WHT+Leb5Y7pM0zaGx3/UwrxBwb15DckEFGbsjMBX17O8f4HPWKU0NSPSdK717OTBO4a6KXydXi4on/DsFdUwwy0x8IodywJBUFIWc8LUL/HeKkreZUcc5rTPDZJXGReWvkxZT52swQTV3l58/iZJMVTizTGgVmKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2HdbQjWM+VEKKI2HTVCOdOkUXCd9mQc9QGFddL4pYnU=; b=gjDqBRrU54AQkGrc8+ySd9ug6Gk6TiNBoCXB7aYAoAvJjblLG6HiwuZjvVT9VLyj33QcPWPJMyK9+u+KphK5miIA/oXtldhh+Z7oq5LFwjLSEtl61R2Z0nYK8z0d8TFXITKNrWstG/pIKfO9Vxvh+x4RDeOQ511au87sjsby6vltCQNpyKs7WQqv4I/9mK8yVqHD0bTFhDWTRYV3qSRnID4h9zW5yPzFGchoHacBmKVxkCGm6DfFY3x5bjrR3l3jyU/87dP2FBZ+/gKduGywb27ZZUkzfyKCdoCRiFB65/7ad3Sl1+vi8ogZp2ZD/z3sVCqlHMzoiCH8NXlIYsoD+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2HdbQjWM+VEKKI2HTVCOdOkUXCd9mQc9QGFddL4pYnU=; b=t+IBEey6xbh6JUQdzp/jvqtK1+ba5ClmAXAdiwUg6lcW0WdfwxSJ628ClbTYdtO+6qqDlCtSgbVMUIDixvcqZ1Wi/cJOn25tkrBhIVph4AfyIMOm93t9/I+y84m3HUfkrlYYgxbxjgCIm0AK7pHMA3dmJarHUieO5Xu9t6PoHqZg1W5ten3SaOIIw3gJ4qEvX3bfVOhm42g/xiJl3iNYV3XtiRAhI6PrC6JD+6EQEptcVmzhXNYTWvZRMmhXFamQVb6SqeunS7GHK47imENQVVvY8G0dVkxDmPvNsJnp9NHL9Sg6wQip58GSq6XROQrlQJb1FsWns9iHV2X8zujxfg== Received: from SEYPR01MB4221.apcprd01.prod.exchangelabs.com (2603:1096:101:56::12) by SEZPR01MB4613.apcprd01.prod.exchangelabs.com (2603:1096:101:91::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.34; Tue, 2 Jul 2024 09:31:02 +0000 Received: from SEYPR01MB4221.apcprd01.prod.exchangelabs.com ([fe80::b674:8f70:6e29:3756]) by SEYPR01MB4221.apcprd01.prod.exchangelabs.com ([fe80::b674:8f70:6e29:3756%4]) with mapi id 15.20.7719.029; Tue, 2 Jul 2024 09:31:02 +0000 From: Haylen Chu To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Haylen Chu Subject: [PATCH v3 1/3] dt-bindings: thermal: sophgo,cv1800-thermal: Add Sophgo CV1800 thermal Date: Tue, 2 Jul 2024 09:30:24 +0000 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-TMN: [17i62xjFeVM3yHP1oYezK0i5S0kz8QCo] X-ClientProxiedBy: SI2P153CA0006.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::22) To SEYPR01MB4221.apcprd01.prod.exchangelabs.com (2603:1096:101:56::12) X-Microsoft-Original-Message-ID: <20240702093025.449-2-heylenay@outlook.com> Precedence: bulk X-Mailing-List: linux-pm@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: SEYPR01MB4221:EE_|SEZPR01MB4613:EE_ X-MS-Office365-Filtering-Correlation-Id: 57056f5a-ae6a-4841-7d52-08dc9a79b0a6 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|8060799006|4302099013|3412199025|440099028|1602099012|1710799026; X-Microsoft-Antispam-Message-Info: rBHyE6Q+GmxLwaomWEYcX3NmnZk5Gg7HtR2pDGPc2rAmyCcZPyD1OErFUYyMLMkZHqRvkcXIjrNoEf684G/cZwSTUDZideskKiYR17s/LV2Q0pW/y5jIv9vDnrEk6bsa7ClU++cDP/rziKZyJ44tztQvKhNkwIHFUntJ/eNgi8b8PuPnPxSgVfIn8xz9Cu4SdKT3+wnnn9GGOQ2T/RhrtXIc49Oq+H5UUVmIgq5DP9oIlI2c/O2ydoJFnfEhSUm7cP4jn/9CqdFuFQckz4BpHKxd9Xgt9uhDiksAEnmvvgBS7vv75Ys4Ln9wzepY6xPLFBRcYNCcRcXVqx8SXL3ZRS+q8YgMBuFNeb4aH0kXDK8335E/Q7pTl1q5lqSLnQGpOv1251duL2nBhz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DAaZlry+y7XtCj/FwxNRmF6rEScg2Ln7kAOtmiaKn/0srpxkG3koatqbQvpVT8/FZ/FIlKnxwk4leUcwonf4M4M37bA2iwpTYmk+lSbyrL13YEBd63XioRzj9YW7HXIpZ09rcNlcuJ3l7Vk6IPLo0rNrMy2MVZFckv/QZWq97Hz59oXdfjpUEDHKATNPhSghBqGlQonOF2hoCnYK8gohDuv9Vwbx4/lX5+mXju9mbAwNsof2Wqdt8kx/XWXZg2e1bk0lP0QEi2p2m9ntQbj+FQO+gzY3J+BER044M8tCyZQWWboteDiKhjj22k1QqcBt1cTsAuLrqsmKaleUdS+HMEZttQ/JZ8JobYxQVdgz3G1d35byF34VQB1uxWRYvVt6c5vOfeku28ZIft89ZlsI5ZtBaF5A+Pm1dUNrWvqnMQ/r0jTanVRHfqowuXzAjNsyE3PJ2Ct4xvqAWXBw6DGldEHKreJM+ndpN7VZuHrPCLcaiP39NkQ/9MIsb1WYqZ/a+a6sXkwKA32OJ+Xh761rDSoW/TgOK3TeuDASQxQ3hIkRCWaG+0ACG/EDRUYNtmXc4r+8TL4IGbDK5Jv6qP533rityql3fNi7QHxLOFqHPfbUQ= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57056f5a-ae6a-4841-7d52-08dc9a79b0a6 X-MS-Exchange-CrossTenant-AuthSource: SEYPR01MB4221.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2024 09:31:02.8017 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR01MB4613 Add devicetree binding documentation for thermal sensors integrated in Sophgo CV180X SoCs. Signed-off-by: Haylen Chu --- .../thermal/sophgo,cv1800-thermal.yaml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/sophgo,cv1800-thermal.yaml diff --git a/Documentation/devicetree/bindings/thermal/sophgo,cv1800-thermal.yaml b/Documentation/devicetree/bindings/thermal/sophgo,cv1800-thermal.yaml new file mode 100644 index 000000000000..016299822c16 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/sophgo,cv1800-thermal.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/sophgo,cv1800-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo CV1800 on-SoC Thermal Sensor + +maintainers: + - Haylen Chu + +description: Binding for Sophgo CV1800 on-SoC thermal sensor + +properties: + compatible: + enum: + - sophgo,cv1800-thermal + + reg: + maxItems: 1 + + clocks: + description: The thermal sensor clock + + interrupts: + maxItems: 1 + + accumulation-period: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Accumulation period for a sample + enum: + - 512 + - 1024 + - 2048 + - 4096 + default: 2048 + + chop-period: + $ref: /schemas/types.yaml#/definitions/uint32 + description: ADC chop period + enum: + - 128 + - 256 + - 512 + - 1024 + default: 1024 + + sample-cycle-us: + description: Period between samples. Should be greater than 524us. + default: 1000000 + + '#thermal-sensor-cells': + const: 0 + +required: + - compatible + - reg + - clocks + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + thermal-sensor@30e0000 { + compatible = "sophgo,cv1800-thermal"; + reg = <0x30e0000 0x100>; + clocks = <&clk CLK_TEMPSEN>; + interrupts = <16 IRQ_TYPE_LEVEL_HIGH>; + #thermal-sensor-cells = <0>; + }; +...