From patchwork Fri Mar 1 17:47:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raphael Gallais-Pou X-Patchwork-Id: 13578890 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 19555C54E49 for ; Fri, 1 Mar 2024 17:47:57 +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=OOvPhWVICM1+N31ukzo/QDfjalUzd6pGnVrSDEI/Rrk=; b=QawMUXFv4WjfMo L9tLMjkDjgTQRCxqsW30uC0jkek0HaorAIiZktqOXdB3qqFCz64EUIQzEvffrbcFVXjgYkfjtCwO8 tZn9NDOm4sCOwJ8y5G1cHhIfJk3rCGju2vfKU2n+jXxmn31zIozlRk0BaniGMMYt+Tz8uxHD9b/uU VJN2waefzXmYOBCrDPjmYP/jHTl8givitM5BwNEyXm9dp9OPbJe6juQ/PCDgIjHr5kQ3i/eDVfJvB JOe9ab32lqlvh6BpFwR7fSAcJ5BKV+h6+guYqJunAyc7DvP/qIHm0eks4ui8H0qJ0JmiXTNRQNjxG PxVNysFmyeJgoBscG9jA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg6yx-00000001P2r-0oGY; Fri, 01 Mar 2024 17:47:39 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg6yt-00000001P1M-3cWT for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 17:47:37 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40fd72f7125so16848155e9.1 for ; Fri, 01 Mar 2024 09:47:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709315253; x=1709920053; 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=3FnpEmiF4nPHhd94SMr00ku6sR56qnzsYgoCp8rfi9I=; b=VgnwsyTsNWZSjO1IHVL600Vp566hKUgljt6mEevwQ1WC3rwSgeTGuEkICxSH2VbA0O PvGIoAZqXEbFVvvvnpnKBBcx8JLJQ2hRrUuVe8xV7RhI2mNF9fPqstf4HbGMhjYPbVl8 C5OxGt7gLr0pysy65tKXEfzVF/11SW7SmVY5M5cMj0o8SOxzKTV+j+VWkGY+TZY6Mw+U Nz8yebpOcHQFqQPcVUxTCRQ3sCdlckYwiVIwDswZ9AvcTX3J1cdadWBXN5iHC9ZYUP5R itdrgeZ4SVgnAcGhdGQxrkiYkD5u12VI9vIn70aqqaBd3zOByPdaDDSAG82OIJDuFuhc 94uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709315253; x=1709920053; 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=3FnpEmiF4nPHhd94SMr00ku6sR56qnzsYgoCp8rfi9I=; b=LmmK6TFOS4lyaQZy5uWPYtvuRQXtpZEMluuXaiyAw4fBI/BZ8JN7Nx4x2HEqFtl3u5 9uCauXZI17dc4EIH0ezYpcj//cKY6Zo9skSDprb6B/i86gSa93H4SfGanjyYpOuhDcVF d1hirc3yQgHZjYwrIcp2PqLeTAjRzsPrJEmfHaGhPNMB7H5+qPEHoQO8H4ptUGSo3NAT y3NXCA64gqwIJTmHGV/v9Dzt0y7rSLVxt8u8Y4URH7CQxUdwpaIYPEGaSc2dZTjiNDkB CZ5pQAxNtChVjC8RdOS2RR08xJyCuS7cvLrojyEKSmls5lgmAqAsK6qjedN8byaNDD41 tT0w== X-Forwarded-Encrypted: i=1; AJvYcCUewYUk4cxMV7LIMF7j3jhB3fvOfHnyDG6VSqjfYkCrB4JDIxIwymlT7gp55iWjemzRJRcBB34shSv7a58MV6/WImhHrtCL4ToF8NEGUl2L0nrIDHk= X-Gm-Message-State: AOJu0YwyGXr1jGYvQk+Z3dSbWEQCbJhNFX33Je6/qSjrtx9XV149j6Z7 KSHpPsGz1xZ+PwwEhfGrIRoTQ4jemNOC4HHKK3o6R7E7jIBPqQMI X-Google-Smtp-Source: AGHT+IHNY22DmyWFecV39yW+wBg61T6ryEUFgNCrg7E6CExJ7RCLAFSk7gp/XPGjwJ3r+1Y1Xl+ejA== X-Received: by 2002:a05:6000:12c5:b0:33e:1e0d:658c with SMTP id l5-20020a05600012c500b0033e1e0d658cmr1573306wrx.70.1709315252594; Fri, 01 Mar 2024 09:47:32 -0800 (PST) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id bu16-20020a056000079000b0033dc3f3d689sm5144705wrb.93.2024.03.01.09.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:47:32 -0800 (PST) From: Raphael Gallais-Pou Date: Fri, 01 Mar 2024 18:47:28 +0100 Subject: [PATCH v2 1/2] dt-bindings: thermal: convert st,stih407-thermal to DT schema MIME-Version: 1.0 Message-Id: <20240301-thermal-v2-1-1b32752029ec@gmail.com> References: <20240301-thermal-v2-0-1b32752029ec@gmail.com> In-Reply-To: <20240301-thermal-v2-0-1b32752029ec@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-20240301_094735_948941_9573A1AF 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, and 'reg' is 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 'reg' property. Signed-off-by: Raphael Gallais-Pou --- 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 | 56 ++++++++++++++++++++++ .../devicetree/bindings/thermal/st-thermal.txt | 32 ------------- 2 files changed, 56 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..68d7dd8b892f --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/st,stih407-thermal.yaml @@ -0,0 +1,56 @@ +# 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. + + '#thermal-sensor-cells': true + +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 Fri Mar 1 17:47:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raphael Gallais-Pou X-Patchwork-Id: 13578891 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 DD354C54E55 for ; Fri, 1 Mar 2024 17:47:57 +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=7HJz90R/4ufgqgMvTvfuFdtmH/45IWBGaMYlo+is0Aw=; b=UZhCGaYVjwThZo MNG7DM5Vjrp13HKkNfZkRU0L7MbDxAG+P0vRLQYSRLP2J/a8KuL0QFu7thx8DFt6h0FHVpxPeM1vY sPQVlM4N5GEXRjuxqgfo13jw8Xd25hW2r6ytSrPNbTosB/xwAohY/Wv1pHHcP+0E3+k7VUtMtFBP6 7Eo1k4Ivtlve9j1wsDbCnf21/n6Pj9bCpzX9EMKYGahNCkD8+zVZDK/TKputfGCZnuBXUaVwOXjZF JnZqkaqClfj9e7sIcC3fgYEXVoZhDUceyEF40Mnnj1/JEviX2K8iLT86tUu7ywkJcM7c0ZaRWhj5z 7N0baP8QYZYff4L5KTcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg6z0-00000001P4C-19D3; Fri, 01 Mar 2024 17:47:42 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rg6yu-00000001P1O-1Tzg for linux-arm-kernel@lists.infradead.org; Fri, 01 Mar 2024 17:47:38 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-33d38c9ca5bso1117682f8f.2 for ; Fri, 01 Mar 2024 09:47:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709315253; x=1709920053; 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=kBudS8pduB+JnQNCiuQyA0sgsK2wbQ0gKDhX+xdHCYQ=; b=mwgddtBO0C1RqZjY4fkGCwIKIXkmQY8meyV6Yjf8kJXy4hPope3WJ/3mfy5XHVBve9 4PG4el8Sok9U2U0s7F0VT49M3ajtS5Wg5+Wk7JjViGufKO4cLs9bT8vwFYzD4Wa2rw3K aJcsrbjapg4nvkQgCCM8t3watBHMMLF+E+hfU6Y86l3EsiYW+JEeJwyg94InshLBctfG L2OP8xddlAoM4mpoCX9cs16tOSh3/2V9N1Eei/dcUk72p/0QQh0yizumduKbdfUYUFHw xeqZLg7trEoDayQjkf8DZ0JAbExLe39j2Gm3iBSh7unrDcMmd+woZtTCeCgmGMRa4ShF YLPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709315253; x=1709920053; 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=kBudS8pduB+JnQNCiuQyA0sgsK2wbQ0gKDhX+xdHCYQ=; b=VyMwxykHYdwz1LMfFlzZNFRxkd/CKWiO6zPdEjBq12yA237XvHFj7srlQ7L5HTIeJw g+NjvKHyOsV/wmLGZaFLMVqOrPh9i2zxDExGotPkoJEhBcUPzVTmsVh8O0jSS3b0d2OJ GK/1gpH1SoxWWXOBJ9FvQ95nh1vlRo93AWYhiqqGjG9nMHLysKzcaUr9dlOtF1TIOHp+ uFaUte+fUBsOUCiE8thcFcW7t+WElcKw8JLBG2uNTEueqC4CB7kXvuAvYPFjHhdP03Kt PrNwwP+EnedMv0iG4qbUdMC4IKW/YbptpBSvv+ByKbUMrYjSUU4MXzDjuHxIECK8l/Qy Onqw== X-Forwarded-Encrypted: i=1; AJvYcCW1/+jb3FfiDtvfhlHsaVSxfsxHigN7E6OvXgqbzfrr3aZ1/Gyyq6EGE3Gf5htJu8rGy4uct8yk8yFGTxCUVBPiBlFLnm1m9WZN8jc1Al34X1SOSxw= X-Gm-Message-State: AOJu0YymGqz1aioBEGge185582tK+AIHPeMHjOFB3YoY93ANepZ1nxqX 5roZeUeTkkF0Tdq/E0xlTHTT0USO65vMPTkK2BqnWzN5LoaEsmN2 X-Google-Smtp-Source: AGHT+IG6sgBestRPxfhvYAGndynjIIz7DR2FrxGpqOAtytLHPLZ9H+YT0LBkU27ikJawlDPjCVBBeg== X-Received: by 2002:adf:f6c7:0:b0:33e:1e0e:69a with SMTP id y7-20020adff6c7000000b0033e1e0e069amr1955278wrp.13.1709315253246; Fri, 01 Mar 2024 09:47:33 -0800 (PST) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id h18-20020a5d5052000000b0033cf4e47496sm5061786wrt.51.2024.03.01.09.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:47:33 -0800 (PST) From: Raphael Gallais-Pou Date: Fri, 01 Mar 2024 18:47:29 +0100 Subject: [PATCH v2 2/2] ARM: dts: st: add thermal property on stih410.dtsi and stih418.dtsi MIME-Version: 1.0 Message-Id: <20240301-thermal-v2-2-1b32752029ec@gmail.com> References: <20240301-thermal-v2-0-1b32752029ec@gmail.com> In-Reply-To: <20240301-thermal-v2-0-1b32752029ec@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-20240301_094736_454745_BBA21204 X-CRM114-Status: GOOD ( 11.81 ) 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 --- 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>; }; }; };