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: 13598206 X-Patchwork-Delegate: daniel.lezcano@linaro.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26EA74F8B2; Wed, 20 Mar 2024 21:33:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970438; cv=none; b=X/QQPvZ5wv/XV7cEwVXGW22WTJLXgert1HlIbHWdjGqXhAnIQHK3FiQv17apeyCM1wgZRZHNXOnMyPG4E2vNoCI8Mdzu0pLdlAW2M65w7Tu7xuxayZV0VJf8yBkJanebKhCz46xDX0TyMLRHwrGveE+LOONU/4T5dKiYvskSeq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970438; c=relaxed/simple; bh=jN5oDfmJ8pi58iVOe5bgdatiEqJ5TMzdSYZ+Okekcs4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iXSt8BdQlyWi902rOKH/oGUlJ7FNQpjeonghZFNmOjC/JUkwYSl+InuQij6FNAP2uy7tMnMsttllDWCiGokjISwydJSQxfT/CL1gKiDZNueTDGVjwW0tmMg4ff8h8Yfyj+swZbqRpE1/CnwJlKrrHYlw7L9LCsK44ugujig8Vm0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YVb/tSAV; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YVb/tSAV" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-414689ba80eso2432005e9.2; 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=vger.kernel.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=YVb/tSAVBL0eYQ6D6jiRr/79/2LHLTwQe3yo/NQSZZXCvDvJZ7PMOKi7clxLB1trV9 6WN3A1RGpxSfqPVMEpLhcnBNH3fSfrMPMyveNSxdHdOq+7LDip8ibyjflYYsj4q7j5mq DPWbJZ6N3hX+jTxfc5uhCTVtxOXtfySxVUvhp/6G3sQrwM//yePlrhQvXKwja5jHDxcN kxd06DavZ0yC1gPbf/yoSfrO3xvmCOKWLlDv3oroi0G342i1fRn9/eDJgpaAsD9tbGg8 HtoouSl3RUA5z13laFWn837AjTs7NMhLh1wyLMhmtvvs3vfIngCuwXqG6B9KNSd6+hEc cLkA== 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=t5pLGPMpyfG1tl9q8xXsews5/2MsRmkpGpHr+D8+UkXVRn0zJOtuxMX73p8f42TXgK 7w2HrdjDuHdTOUYfizPam62RV0BpXkD1kWYB7UTrM5Q+2/fKE6k/rfnxG2bUxtVyNb0H fiA0c7KkvRGC+scIokOVziDRwH0jtGwd/Avo9y6jpvJWlvXMzLR9as1wRiGw5LmhQMqc XAnxbhk8ZnM2UHHfe5pGIPMgPw8PnlSGTPsmWWDGh7QmdsK2MzAe7hVExX8yWsZ2ZQ2w SQZwhqr27WMVEftrihqrMlsad2SoMEuwb3417imW3uBsG1931lMEXCKfaIHKQKJsbyBW 5nng== X-Forwarded-Encrypted: i=1; AJvYcCU/GzFJQt43TIQ1sIwRrChE3KGMVSev4baRCTTtjSuVC3mQLrYrbo5qvd05QlFHsBPASgPbzp4K49g//Q+XAHmUflu8ShAD1JY+YUKiU1r10N0Cpu7vbBV/GAe2KDdZc0Amc5f4mUINjA== X-Gm-Message-State: AOJu0YwebS+pStMSdM5w0nEGwA0/5mOb6nmsOnupM29+5vfNou7KQkPb jnoNeoqbJzgHSiPcecmLmYgXdszSRoeqVei4SS4aY2gsjUCxBM1bksL/d0zvyKs= 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 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 '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: 13598205 X-Patchwork-Delegate: daniel.lezcano@linaro.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D947385295; Wed, 20 Mar 2024 21:33:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970438; cv=none; b=ebi8F6Y2eczxjDngjekn4cKSoj+gzTiEb2XCh2z7Rph2omlO14grwfu9ZLrkrRbwoMWFjWh6nuVXnFMLwLWuLlCePco1V7B2O2ju5f0wI63RS2qcd9yOaXHg2Z7U/tceCBjF+m3+eC8MUHBxo5+v7o2x6z325rtoMGvsgqMQz6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710970438; c=relaxed/simple; bh=s5E1qvSYEd/GOc4QJBEGVXbenNJCECzx/wZu8bTdnTM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B/RD1CAmtbUkHIELEjHB+93gdf0amND33knapE2FEBgluAIUxic9ZigRwB2FDjm+2N7V3Y2a7fcVc42UC6F1NQjrBo87hgGPQMWtSXBGWHdrRrUPnpyWhqEVF210FqgGrn7dK1Ek1sSKiteLMlPWplwIlcBv1RiTNl9CLf3CGjA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NueZmtsN; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NueZmtsN" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-33d90dfe73cso201765f8f.0; 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=vger.kernel.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=NueZmtsNvZNDo2HEGPWFwtpLDA4b9ljtwOrsmIGclXkxxJOcsgJXi74t65g7ukXvTo FyHzmWfi4LzTzpODOkQUa7fcxHdI23WDo2Jgpp27IxWEiU+A5EoFN4tjHjNce4clvjEu bMafXOQUAr+EpWo9g2PsS/bnKeMIk6JeCxy9fI1/S91v4Am4aQmEG0biHWbC5YB0iLvo xjDDTq0eL+BaErdsMj9r8a6APq/EyC2GQxBMOMTBv78lJ1xdorpeNSEVvlPqrm3tIiO4 Jxma5r6wDRLUCwqw9ISWZKezkxWSZu2uHiiA8C2MJvX6EYxO3AaexaxTTTbYueJYrq57 CQyA== 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=FT4bq1ZquAEvcBicdbkIKBVE6TpXutuGqyVVfB5nwAaXc821AfLmM5LGhSuuU1Q4Yt 6j4tZgKsUBLbXEUeDDybmOCoggCQzDnCCkY9Uw9zBHjnilwO3MiGHoPYkdbq53sIIH3W caPFi9eFve1dLvkFRwR90u9h2DYtdzerrr3AJP+1j4Jr9jidTCvVHAPvMPZa7eIyh6i6 4obfgiblJmpM75Z9VNypmW0wGMunulBCZ7Pg3p6/KcNzLD1iSyocppkkMe3z3GB6+8wh M7ZPnkQka/4yeJibEaZ+82X4sdMGAymzZuM4dRVZbFBTesXA9HYK9fRQtpIgsgJT1OwN L0Zw== X-Forwarded-Encrypted: i=1; AJvYcCVxuM/MzLtlMa1HcLCU+w8jRHZpDoGHjxkqz2OjPvMOTM0XztONwytTOtQcyGZg0ADBaB5D5P7ACsM+T/ortpCz+LwGNzKIPAtISOYLbPyNf8JZorZvcFv7pScux3O+QY1iKq71DQcdyw== X-Gm-Message-State: AOJu0YzNIhAD7iUGhmHCvPSBYQ5SE6OSyVvg1prdJ2LK9Ub5ZluSKZop o5LH44lwg1LzKbdgvqfWyX6VTWkj/QhWSspOhaibW6hF7lW+cIgOE0YYjL9aHgU= 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 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 "#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>; }; }; };