From patchwork Wed Mar 20 21:33:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Rapha=C3=ABl_Gallais-Pou?= X-Patchwork-Id: 13598202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E05EC54E67 for ; Wed, 20 Mar 2024 21:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OmaF7W3ZwgN4OK4fINvryjV7KIfbsvjiC5LCmD4cGPQ=; b=t/mcNNK1hxAFMp NHCARZ8M/FGw5hWqlvPuuH82D8eyaZeg15+yrnNAjjmhNoF4M0PQ4ECihUXYoRHc6p/egZvphiQA/ EYibi8ta0Yb5V8Xic/DQ81afGTbI6v190MeB/rHwGoUhvESYLWcJ8U45whc+ALi0jFiNFzL+VffsT vF8n3YFpaUwo9TVuH5EObQtWcX7RRHGw+IuZe6ZqfOLhw3pZsPImKdN+MIvEBYbf8iwK8EKtlSL+4 yiguxZzExszizRgkFKVfF4+dEiIRIHrhA62J0QaNlDakkmxIgTcrGqD4z3PUmQivgayfy0YqcnarW sRh34MTwhJJ/C0+aFyUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rn3ZT-000000011ma-4BS8; Wed, 20 Mar 2024 21:34:04 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rn3ZP-000000011lC-2Vfe for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2024 21:34:01 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4146f2bd5f1so2418165e9.3 for ; Wed, 20 Mar 2024 14:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710970434; x=1711575234; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Luf7LRUpOAFhMlxRw+l+V8h6+0FkYHyPc4K9DHr0oFI=; b=J/aBEQGh+sLXc8rtLdQOhM2Ry+DmyTB21O2aaAVZBq9W0Eu+LvIGF9G2pY7YjXIggn 3/Ty1fJErgsXfVaoP6h4TIx++Z6E0QTbq+yh1Z5feBJ4wPcRDl1ljjyha1QNRBS8oovA 2sryjb9Ftyeav1ysoEfJujOZfBc20VoifXec3ddByLWHryBMbTK5FuC6wfqf5nw4wGPG S6LYK99COcw9O3Oapxq/tAjz9NVPmdWg0VqW3psOJTfLhEyzZk79ezj4C9mrBud1/Dh8 yGyOKphDysICWfBwghCkKaJ/MHT6l6+bX36ruA7ggNiaCoqLooqdshx2RH6kHh1pmYWI H/HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710970434; x=1711575234; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Luf7LRUpOAFhMlxRw+l+V8h6+0FkYHyPc4K9DHr0oFI=; b=H3C2CqtjB1CdNFd2cBf89uoT5UnIogBnhyQBM71dk3jSySh2JMXjEvR+icRLaI/y3p 1G9txm/MNaegxC3WhvAlBfXRE1v+7aMitJgSu+yOMr+y6BfDQx9G+NA5n+4ADc7qAZ/w bUtT0uzLUtxx5E/kYN+BBfzFjFNE7Wmq7dpWn70OkvLgkopGPN0fWtty5zwkW6Z5iORm GWWTuSGjjyld7DpotgXAC8xuDkQRS2SzBBAgNBwsRgU0RV5Mg+mq2aIpRVzQpNzMzwi0 qGdDfFuekDWTUIF6jas20wUDzlxqadzqNbUba1IvySQI+inKptOmj/TdoFGv1JXWP7nQ 9qIw== X-Forwarded-Encrypted: i=1; AJvYcCVEMa3onocySiFC3gaDcV6JkX9a4oIa25pjF6gI8yrYmCuxlZHgESnKWSJkIsR2TbAxzSKlApG4KUAzwUcpJoV6VHpcugpU7NZskAUzLy4uxaFD7BM= X-Gm-Message-State: AOJu0YzS7LXgM3Nlu1PbsqsvRFAQRoHFWiDOdlz5jvvoqhSvVhlXO/Dv 7wUJQgwzc43aSXK2gIjNP6MHLJyNa5khpoFHfzczXKlzctIPuIQK X-Google-Smtp-Source: AGHT+IGezsMTBHc2QdgFq0n7EozdBXZgHvgQuWQyJPBcvJpyQhLkTLUDVcBjSgox1jdOY++8RpnB2g== X-Received: by 2002:a05:600c:1d28:b0:414:101a:fa67 with SMTP id l40-20020a05600c1d2800b00414101afa67mr2641769wms.18.1710970434560; Wed, 20 Mar 2024 14:33:54 -0700 (PDT) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id t18-20020a05600c199200b00414612a43a9sm3396821wmq.28.2024.03.20.14.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 14:33:54 -0700 (PDT) From: Raphael Gallais-Pou Date: Wed, 20 Mar 2024 22:33:48 +0100 Subject: [PATCH v3 1/2] dt-bindings: thermal: convert st,stih407-thermal to DT schema MIME-Version: 1.0 Message-Id: <20240320-thermal-v3-1-700296694c4a@gmail.com> References: <20240320-thermal-v3-0-700296694c4a@gmail.com> In-Reply-To: <20240320-thermal-v3-0-700296694c4a@gmail.com> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Patrice Chotard , Lee Jones Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240320_143359_737973_4D924DE6 X-CRM114-Status: GOOD ( 18.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'st,passive_colling_temp' does not appear in the device-tree, 'reg' and '#thermal-sensor-cells' are also missing in the device description. Convert st,stih407-thermal binding to DT schema format in order to clean unused 'st,passive_cooling_temp' and add missing properties. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Krzysztof Kozlowski --- Changes in v3: - Specify const value for '#thermal-sensor-cells' - Add 'maxItems' for 'interrupts' property - Change commit log accordingly Changes in v2: - Change commit log to use imperative - Drop description - Drop 'clocks' description - Add 'reg' property - Add '#thermal-sensor-cells' - Make node name generic in example - Fix YAML style --- .../bindings/thermal/st,stih407-thermal.yaml | 58 ++++++++++++++++++++++ .../devicetree/bindings/thermal/st-thermal.txt | 32 ------------ 2 files changed, 58 insertions(+), 32 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/st,stih407-thermal.yaml b/Documentation/devicetree/bindings/thermal/st,stih407-thermal.yaml new file mode 100644 index 000000000000..9f6fc5c95c55 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/st,stih407-thermal.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/st,stih407-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STi digital thermal sensor (DTS) + +maintainers: + - Patrice Chotard + - Lee Jones + +allOf: + - $ref: thermal-sensor.yaml + +properties: + compatible: + const: st,stih407-thermal + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: thermal + + interrupts: + description: + For thermal sensors for which no interrupt has been defined, a polling + delay of 1000ms will be used to read the temperature from device. + maxItems: 1 + + '#thermal-sensor-cells': + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + temperature-sensor@91a0000 { + compatible = "st,stih407-thermal"; + reg = <0x91a0000 0x28>; + clock-names = "thermal"; + clocks = <&CLK_SYSIN>; + interrupts = ; + #thermal-sensor-cells = <0>; + }; +... diff --git a/Documentation/devicetree/bindings/thermal/st-thermal.txt b/Documentation/devicetree/bindings/thermal/st-thermal.txt deleted file mode 100644 index a2f939137e35..000000000000 --- a/Documentation/devicetree/bindings/thermal/st-thermal.txt +++ /dev/null @@ -1,32 +0,0 @@ -Binding for Thermal Sensor driver for STMicroelectronics STi series of SoCs. - -Required parameters: -------------------- - -compatible : Should be "st,stih407-thermal" - -clock-names : Should be "thermal". - See: Documentation/devicetree/bindings/resource-names.txt -clocks : Phandle of the clock used by the thermal sensor. - See: Documentation/devicetree/bindings/clock/clock-bindings.txt - -Optional parameters: -------------------- - -reg : For non-sysconf based sensors, this should be the physical base - address and length of the sensor's registers. -interrupts : Standard way to define interrupt number. - NB: For thermal sensor's for which no interrupt has been - defined, a polling delay of 1000ms will be used to read the - temperature from device. - -Example: - - temp0@91a0000 { - compatible = "st,stih407-thermal"; - reg = <0x91a0000 0x28>; - clock-names = "thermal"; - clocks = <&CLK_SYSIN>; - interrupts = ; - st,passive_cooling_temp = <110>; - }; From patchwork Wed Mar 20 21:33:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Rapha=C3=ABl_Gallais-Pou?= X-Patchwork-Id: 13598201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B1C2CD11DB for ; Wed, 20 Mar 2024 21:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LNLPwedtiVIM3M7zAeIBZbV+1i3QfKHBXTe7jlThSgk=; b=ySkK7IzUgDLU6d rJ383heivNByXeqbG2d9e2WVmQmUPfmKrif4J0yttDIOgjagZT3fsuGy5+0qs436JUdUrp1jbKJP4 yfUbhLzXR18HZ4B5CKmukuP1Uf3I2lU8esNOGDU3zuwS6MGttLvPI6FLzxnURkQ3s+vqPA0mhUaQ5 ujXU3o0rcYCsXJoSppcky8k3YspbCn9q9zJPxIQdTpYOALbbu1IH+Tp8qSjilLDss+GcYAD8tRtsZ T9EoJdf+Cr7DKFozl5kscDQwRwiV4uEoRcnkWqRZmuwCyKRbYpj+CPyiF1LeF7NISRVl6dnsYBjEo MHwzMsdZ1d2jPqsPukOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rn3Zc-000000011o2-3lxr; Wed, 20 Mar 2024 21:34:12 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rn3ZP-000000011lH-48D0 for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2024 21:34:02 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-33ddd1624beso210319f8f.1 for ; Wed, 20 Mar 2024 14:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710970435; x=1711575235; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zO2E2GClWBnOraTMVHKXlSY8ldIuEQRndWqb5IE+w6c=; b=BnstRWVBtfJhgrCUOkX7rWSgw75+5U65XjPJCYjE8UANmgA9UFvHzlf4vheP311K7Z Ekrpg3IOqMmy8oD1ylPJYVQXamAS2MaO2I800Iru9aXBKtGuS6EV51q7jhlDOaHQQiFF kETnRI3RZLh6+tGGyXPY4wjvtRVHnlVRkGEfR1nFLAKSJ8CqsoP4wYGp9QF20OPyqMIU 9FMXUq7hAYwg06n5yaP9bUyFqqjO4ZrNtSLIFyv4tduXbkJdxk1YWxOFc+tllmT4L7wF 9yoCE8b9v2AJQ0pYJ81kvBAu2vDPuNQaZ/DwyIY0juCTYLC+k59/kdXWooWsWS03Tf/I nC2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710970435; x=1711575235; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zO2E2GClWBnOraTMVHKXlSY8ldIuEQRndWqb5IE+w6c=; b=LP4Yj+NKR0xve+fhug2r+m6Kh1CKyQuk3LzIko7vTi63xoMRPdPEhn5hynK0Jn1Bv3 r+csa/aO4m+b79unx5G1plbZHbP+2DKVKGYbYlK7JtKuw5F1L0kD2Rll8R30I0/xai5O ky8Z9vuU1/Z48DQc6clC1kcGe/bMhE/aPH6BgbhBCax0YQaA4a0PKmyT2b19zbreyrkC 9ha6p2c3YxbLCDYZmjMfpLIu1m06gh0OQgE4vZ3CNpGqX8cIBFuabMkmUc34Xi9oaixk xeDpyDtKLI19yFOmotwLvs0ad2pc6knJb4BL+SblXZ3VgZ4ZIPrkOjzw5qp2MFW7V1dT Ta/g== X-Forwarded-Encrypted: i=1; AJvYcCXfgf1ryw/t3PMNys+dg0ezSkdNs1jeNY3UN/dYmsyr6kqt9tyOk/E1NAab+MA54+Ig5t11hB42ux6jG18Ex6Jv+LZ6OZvY+FhF+Ae0u6y5QirRKcY= X-Gm-Message-State: AOJu0YxNyMYUQ9v14EXsjZXG7iMf/7unS/TAq3Hy2/DYAW3ukbizo5KT x1giQSkw38BeRoXYqNWXu4pzzf4mYDL2PPM5j/fJbcYRjaGwJ5EdA07CPajVc+o= X-Google-Smtp-Source: AGHT+IF+yCzfTSAs0Xl9quHvnFnE2sf/uloR005a1iCcsM2w0FKXj7jsilFC2RcBCO19mN7UBryDrQ== X-Received: by 2002:adf:e6c9:0:b0:33e:5970:e045 with SMTP id y9-20020adfe6c9000000b0033e5970e045mr730314wrm.21.1710970435237; Wed, 20 Mar 2024 14:33:55 -0700 (PDT) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm15547567wru.18.2024.03.20.14.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 14:33:55 -0700 (PDT) From: Raphael Gallais-Pou Date: Wed, 20 Mar 2024 22:33:49 +0100 Subject: [PATCH v3 2/2] ARM: dts: st: add thermal property on stih410.dtsi and stih418.dtsi MIME-Version: 1.0 Message-Id: <20240320-thermal-v3-2-700296694c4a@gmail.com> References: <20240320-thermal-v3-0-700296694c4a@gmail.com> In-Reply-To: <20240320-thermal-v3-0-700296694c4a@gmail.com> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Patrice Chotard , Lee Jones Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240320_143400_142374_526861EE X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org "#thermal-sensor-cells" is required and missing in thermal nodes. Add it. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Patrice Chotard --- arch/arm/boot/dts/st/stih410.dtsi | 1 + arch/arm/boot/dts/st/stih418.dtsi | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/st/stih410.dtsi b/arch/arm/boot/dts/st/stih410.dtsi index 29e95e9d3229..a69231854f78 100644 --- a/arch/arm/boot/dts/st/stih410.dtsi +++ b/arch/arm/boot/dts/st/stih410.dtsi @@ -270,6 +270,7 @@ thermal@91a0000 { clock-names = "thermal"; clocks = <&clk_sysin>; interrupts = ; + #thermal-sensor-cells = <0>; }; cec@94a087c { diff --git a/arch/arm/boot/dts/st/stih418.dtsi b/arch/arm/boot/dts/st/stih418.dtsi index b35b9b7a7ccc..0f0db988a907 100644 --- a/arch/arm/boot/dts/st/stih418.dtsi +++ b/arch/arm/boot/dts/st/stih418.dtsi @@ -113,6 +113,7 @@ thermal@91a0000 { clock-names = "thermal"; clocks = <&clk_sysin>; interrupts = ; + #thermal-sensor-cells = <0>; }; }; };