From patchwork Sat Jan 11 16:15:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 213062 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80207C3F68F for ; Sat, 11 Jan 2020 16:16:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6076F2082E for ; Sat, 11 Jan 2020 16:16:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730323AbgAKQQQ (ORCPT ); Sat, 11 Jan 2020 11:16:16 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:46109 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730319AbgAKQQQ (ORCPT ); Sat, 11 Jan 2020 11:16:16 -0500 Received: from localhost.localdomain ([37.4.249.154]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MMWcT-1j9DUG0YRr-00JcDG; Sat, 11 Jan 2020 17:15:51 +0100 From: Stefan Wahren To: Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Nicolas Saenz Julienne , Florian Fainelli , Catalin Marinas , Will Deacon Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Stefan Wahren Subject: [PATCH V4 1/4] dt-bindings: Add Broadcom AVS RO thermal Date: Sat, 11 Jan 2020 17:15:39 +0100 Message-Id: <1578759342-4550-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578759342-4550-1-git-send-email-stefan.wahren@i2se.com> References: <1578759342-4550-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:c1+Mg9NKoWCLsN8E1wZaMxrh5a2EHZsNfpj80gj1+uD4c7oIiwg B3VvaHwXDziW/0JZNSoLmcZX8rLv0yBvdngyCtKwW1gYSC5Tb2b7wF6GswrAYW9I+WHKu/o LTaFSb+hdE937/T5VA55+bpUm7bMwoXxhCnwMuCcO7Kvivv9lh/LFNaaELpESpgXuR7c5Od yOjaNwupb1GP1TMr/Lp0g== X-UI-Out-Filterresults: notjunk:1; V03:K0:bDV4gChWJ6A=:zVDMyHIm0wg/sFXJsxBFfg vngWYXC+y1Ggagzjk+77JYoa5b8mlaU7s3yQysh/DUcYDchjc2QE+oKBV2X/cMebilELriIOu GhmEp0SQpix3GArGJMKuMqF1IxCI15L9gjDGX/RNoJVqFqxqgGOs647EWR1TAcGe12Xl/UFzF yQQ3cDZ/IbLfKTKf3FUm27gVfsJFK+as6TGliiefFdHgdRg2HE4hklN4EPR3EFivwP8bpboNc 3ZvgkRDm7duKqdiWFQSZ1zB6e0WeTBhbrJ9UZaT6D7af6Bu/U6072B+qAUgA+2w0h1zJUppqH Hr8vvVFWdZo3nyqjZ+qiB6EJ8QkkeU9rCxBlxU7ZjF9IInhJBOamwjbNAudlesivbMfVy0jzz a+JlGtygizahGncvqBM+hLVuYgPeMvUBieneXCq24uAVJEFch9oUeUn3bEulqZ0Sj/2gRFe63 wqRPYahB1wAEch+A/wKcVMj7y37TTMtvm0A84VT9UnkEE56//NhE5gL7BUmA7m2MfABMb4aVg vKkjETfAuqYxj0A2yh6+v5cOyztnjBG/zt8+/eryT11h91mPcDtd5ltWmSuhVeqomXNIjaDIJ JxoEgCFbd/fAHqE/tczrz0Of38IQjktzXm96FpwwLa8u8hKjLBcf6oYjOJv5sNgbDoZBHu7YR 1Gvjse1+vdz6hef6XU/FO/D3xqp+taSVj9IUZIOsV1lGBaeVUcI1zVA1quOEhVza36sLDPamj xGoaGYGp0FYhbEdG3ZlTLzHLtZM8N0nE5YZ0cunW8Yv5NPSCTwZ0oBp6hnT6Y1eeBAyM+K+7W apIiRHo9Vaa68SxMS4JXRGizA4wnUmXXPxX0Jbo4/0YDzMSDHc+JBLFeDxKTbgmlLlAY5+4en QmlpyU4MCCmOIQr/pmA6q3/sIYrU2c0p6DC4rPrwA= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Since the BCM2711 doesn't have a AVS TMON block, the thermal information must be retrieved from the AVS ring oscillator block. This block is part of the AVS monitor which contains a bunch of raw sensors. Signed-off-by: Stefan Wahren Reviewed-by: Rob Herring Reviewed-by: Nicolas Saenz Julienne --- .../bindings/thermal/brcm,avs-ro-thermal.yaml | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/brcm,avs-ro-thermal.yaml diff --git a/Documentation/devicetree/bindings/thermal/brcm,avs-ro-thermal.yaml b/Documentation/devicetree/bindings/thermal/brcm,avs-ro-thermal.yaml new file mode 100644 index 0000000..98e7b57 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/brcm,avs-ro-thermal.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/brcm,avs-ro-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom AVS ring oscillator thermal + +maintainers: + - Stefan Wahren + +description: |+ + The thermal node should be the child of a syscon node with the + required property: + + - compatible: Should be one of the following: + "brcm,bcm2711-avs-monitor", "syscon", "simple-mfd" + + Refer to the the bindings described in + Documentation/devicetree/bindings/mfd/syscon.txt + +properties: + compatible: + const: brcm,bcm2711-thermal + + reg: + maxItems: 1 + +required: + - compatible + - reg + +examples: + - | + avs-monitor@7d5d2000 { + compatible = "brcm,bcm2711-avs-monitor", + "syscon", "simple-mfd"; + reg = <0x7d5d2000 0xf00>; + + thermal: thermal { + compatible = "brcm,bcm2711-thermal"; + #thermal-sensor-cells = <0>; + }; + }; +... From patchwork Sat Jan 11 16:15:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 213061 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2307C33CA5 for ; Sat, 11 Jan 2020 16:16:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C033320661 for ; Sat, 11 Jan 2020 16:16:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730348AbgAKQQS (ORCPT ); Sat, 11 Jan 2020 11:16:18 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:52643 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730344AbgAKQQR (ORCPT ); Sat, 11 Jan 2020 11:16:17 -0500 Received: from localhost.localdomain ([37.4.249.154]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MAxLT-1iwc0f1XRZ-00BKky; Sat, 11 Jan 2020 17:15:52 +0100 From: Stefan Wahren To: Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Nicolas Saenz Julienne , Florian Fainelli , Catalin Marinas , Will Deacon Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Stefan Wahren Subject: [PATCH V4 3/4] ARM: dts: bcm2711: Enable thermal Date: Sat, 11 Jan 2020 17:15:41 +0100 Message-Id: <1578759342-4550-4-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578759342-4550-1-git-send-email-stefan.wahren@i2se.com> References: <1578759342-4550-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:0IUicZLxdYp4qHZTyX6kmYwbihuuzvekhpMT2zBM5MdAzJFI8Zb TnyIvYP83Sd6Q1mNIZClhRa8DgoepMjtak3u/3UC2PvTJmhvKg3bOobmKjRNuX3Ct6zVOib 4MZj57j1ValZPtjVGT6916Kct6VP+7X7KmoUzAzbBAtxzozfuE54d7Dp7jg/s3tZkWDDzhr O0pRr8746i+6ag5larC/g== X-UI-Out-Filterresults: notjunk:1; V03:K0:PG4FVKCkg8o=:p72Bcm07B31S0vAEPP3C86 pvVcGFbOsQmqlyiyCFi8u4/QcSZ12aNgOePNixWnVmNS43xMhc6AwZ1tbkcopV1d3TyZY7nJp stfc0RO3zPWkGXHejh4Beg+PVoiZKNuzUEm/L711hKjGyWBsrNZUnOqjQPdY0UMPH7SekX6OB XJGsBDbvF6CGZ3f2NpSis5xmV4Bb4lfJBLPIuFSUzZxHDXQRkeT2Oh9SGROvogfojcq3RjPCd CmCafC+JsEF6hfeMOqtDGVJoUx1yaX4zox5SAnANVNB5V+dxFHV+5FzNsQ76BzJr8nH0qJ9yQ JCZ/iwnsuGB+10NS85x58oDGDTawCy7LEEYiDW1Kh/Nrf8FALg9bRE54llfWv6pExV39numVO KgSO+LUoisGO0ehBkjWNCPDoZ2eyihsH2iyYSZqDzQltuQPYJgMdwJBY85Gw4iyREktWPjnm8 f99GqOiVjleHPOWigwV9XnYoDON4Xc7OV8p55Kzox2Y4zmXArBeummyn3o1k9ghss9u1NA+T/ oK5izKsf1SGZK5gxh1ewEiu2AIskARqqo6L43Tf8a3m/t7hMb2sPRE9ZSKHKbU170d1iO225W CtxngFJtKhV1X+uebG1W25w6q9cIxrKb8dBLZFkKeiUpxfoi5dUSm7TLrZlaeyhy2C/N5h57I 8Cl1C/XcB3HITsiSYfkHeMXJHcC0lKCzJea9xxBsmC2l9h6U530wsY5ddBplZ95bIfxDB3l7r egNDPMvZZOr+buA8iBcNRTZuCRjxQJnbfjZWC0fupJB3veiDZxeCnkOfQC5QNygRNWoEpx/Mr QJl4Y06GbntfFN1lz08k0RAwEIKAplo4dtuJv1WAQOrCows68pjYWMILRXJFoTvx0dGkpevui AtsY/W8p5s9TFG6LUTe1gdFLiM54Ojwm0PeJYwHxU= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This enables thermal for the BCM2711 (used on Raspberry Pi 4) by adding the AVS monitor and a subnode for the thermal part. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne --- arch/arm/boot/dts/bcm2711.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index 961bed8..96f341d 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -66,6 +66,17 @@ IRQ_TYPE_LEVEL_HIGH)>; }; + avs_monitor: avs-monitor@7d5d2000 { + compatible = "brcm,bcm2711-avs-monitor", + "syscon", "simple-mfd"; + reg = <0x7d5d2000 0xf00>; + + thermal: thermal { + compatible = "brcm,bcm2711-thermal"; + #thermal-sensor-cells = <0>; + }; + }; + dma: dma@7e007000 { compatible = "brcm,bcm2835-dma"; reg = <0x7e007000 0xb00>; @@ -363,6 +374,7 @@ &cpu_thermal { coefficients = <(-487) 410040>; + thermal-sensors = <&thermal>; }; &dsi0 { From patchwork Sat Jan 11 16:15:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 213060 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 642A6C33CA4 for ; Sat, 11 Jan 2020 16:16:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 460D820661 for ; Sat, 11 Jan 2020 16:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730249AbgAKQQc (ORCPT ); Sat, 11 Jan 2020 11:16:32 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:53159 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730241AbgAKQQc (ORCPT ); Sat, 11 Jan 2020 11:16:32 -0500 Received: from localhost.localdomain ([37.4.249.154]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MlO5j-1jWldt45e9-00lm2O; Sat, 11 Jan 2020 17:15:53 +0100 From: Stefan Wahren To: Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Nicolas Saenz Julienne , Florian Fainelli , Catalin Marinas , Will Deacon Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Stefan Wahren Subject: [PATCH V4 4/4] ARM: configs: Build BCM2711 thermal as module Date: Sat, 11 Jan 2020 17:15:42 +0100 Message-Id: <1578759342-4550-5-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578759342-4550-1-git-send-email-stefan.wahren@i2se.com> References: <1578759342-4550-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:PGzIYruZHR30DesD7wJ+elb2eQS3441bmcXLTgoww362SkbKOqv y7l5+cOKxknUI5qQREvnPRQFO9rGVdK/fg6udRYDUhnh6l2HVbHpbVal0TisaemPqmZhYd9 hkKTRdm5rttJmKhtKWCgonPaRep1878OxdPg5aJhFQBzNBEZOTx4v633r3p2gAoMpP60lJt +K5AO/aaMSTS4iYcMYffQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:zIMcgdIknNE=:G0dKVNn1GloLF3qitLLuSB zg3m/E+0b0lWgdxg8628Ty/PZDjhlxYm4PEja1NDFOtC4y6ia8Dwt4EX4CBaw9utcqdeZIxtz 8r5UHDDQdVuyacIOpBbGnHjCOuvxstimNhT94ji1iQEM3bpOyb8lOKKbRizkHGB6KX5aAWvPi GdW78ry9/fDuUeOsoyvKxKuAvwwL6pEiMqaOtPnhMeqwORtId7bJGkPZuFMyyh6QxeWVRRM14 i6729LkdbfxD3x+Mbwg3bkWi5gkgCd/Zl5sO6gdeLhrRjXvT0b0MEx9GCv5uxfkHdBp7//QB+ zrzCLslqKP5+dGPvdxgnsgLMZ5mn93NcYehcjUKx3Vt1mzVUlAeRK3Ym2Pw3YE/jH4r3+aIke l5Jo2NbRLZHa7cvO7YGTfdtfr/jWp99vwx3v8vLEQAEi8vy/L2LeVlfhRjB2eRbPHOJFMLQg3 ocpxR74nwNS9gVY8ioJ3RiWrlbCaHKeIk2xqCIAtxByxP7brYblBsjdUa2DARzR9D7otEvHUE rxtWTtJfX1TdzaUCBbCoy/frTSqG5b6XUp+LE3vVBP5rDWvA+8jd+aQy38ANIyE+mJNZLNQ3A ZctZLrhuuGGNyWzqkc5U1rqQEydTcp0iBq1qp/2KI7ObuYUWhqYHCy3pvh9daKNB8+o/YdJwj IOFg4CZx0LqlaUQiBI7vJ59a+XdFCar6TIzH4dD2Y3X/Xo02ahJH+uEG14zE6vXKL1nhhukqs z7JvsEmSfX6M1vawD2IgfkzDyHef70gWjgiZ8wNVT16aAde6qpzU+T54P0OCKYFO5RbPK+iLS vFA//jHVaVxwTiem8wL/ER7q1/KP+Gj8FM/mxndW8WXkFkQ6+cfiJGRY8KAlpeJuYHL+FENuF dm82scAuUFUTGlMWM6M/ZJBbDeu0P0viprN25wAQI= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This builds the BCM2711 thermal driver as module for the Raspberry Pi 4. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne --- arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 3f1b96d..f5d19cc 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -496,6 +496,7 @@ CONFIG_IMX_THERMAL=y CONFIG_ROCKCHIP_THERMAL=y CONFIG_RCAR_THERMAL=y CONFIG_ARMADA_THERMAL=y +CONFIG_BCM2711_THERMAL=m CONFIG_BCM2835_THERMAL=m CONFIG_BRCMSTB_THERMAL=m CONFIG_ST_THERMAL_MEMMAP=y diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6a83ba2..b2f6673 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -442,6 +442,7 @@ CONFIG_ROCKCHIP_THERMAL=m CONFIG_RCAR_THERMAL=y CONFIG_RCAR_GEN3_THERMAL=y CONFIG_ARMADA_THERMAL=y +CONFIG_BCM2711_THERMAL=m CONFIG_BCM2835_THERMAL=m CONFIG_BRCMSTB_THERMAL=m CONFIG_EXYNOS_THERMAL=y