From patchwork Mon Jun 5 03:58:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 13266888 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 EF443C7EE24 for ; Mon, 5 Jun 2023 03:58:48 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5y7beTSUiP+q6ysWMYJMewRbZUaAqORYdagtWj7OdsQ=; b=Ri7XkLnioMKxWk 6ddG9AdegASRq0eYwHYIFuhHsgjnwI74Q/vb+hUcF9Vp90bDBy/dyKtl2cHo88O4DyFtIPVWvTIng HM7he9+v7pRFukJt/UEf8f/a72dGeiifT7E3QYYkqerU/Zij5J+e3ARyIGoXQc1Y2brzGd6mZZ44Q bWfRzvHROXxoUEBYOuU9ek7pdj1OvsYvcVf/yWudbC7O8i35DfVxVT3kw1LsdPJRB79Eo+iuAbE4j TF4xK2TROpxUVfctMJ1cobSXJnrjRuAOLe8IfE/hGUB7wgKHxf8Nn5/r9Qh/C3Bu/owa9xShvvnOH DEed+Crh4gMNwbecwOhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q61MJ-00DzlY-2R; Mon, 05 Jun 2023 03:58:19 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q61MF-00Dzj6-10 for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2023 03:58:18 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f6094cb2d2so44561715e9.2 for ; Sun, 04 Jun 2023 20:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685937490; x=1688529490; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=C1INtN/KwPq/Kh+/tuqCsXKBvEKli+VsBh43RgsVDQQ=; b=CNJgdIQWmGpb04ERz1Ys1nZrFf5/mzRxPH6KaKPjMO/3ffHex71sKR7RzjL48hpK23 7nGHLu+rmyyzYpb/kRA1/17nnxrMFAT0PuuxqWCtMnWJZB2fyxvreBAWcjNc55O32PVY vl+6m3g9FI7LaUsjVyfboXH2VuXHRFE3Z0hPlkHGcRdmg255pieg9l+0prOmR/AnRMvI pYX4RsS/sxwLEPA/5IneiOqDd0fblgwJ5evcpRLsfl81aaU/F+23pDwIhXYD9pgRzkjW F5u/VYEE6E2x8G0sBGYcVEJHMsP0DzY2ckxmZBQBJSYZmm9z5dpoj8ETASH5ezPYTL5H W2tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685937490; x=1688529490; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=C1INtN/KwPq/Kh+/tuqCsXKBvEKli+VsBh43RgsVDQQ=; b=EJjqlZHlOUY6m77Zuor3ogla9c+lMQKexnmZNMPsMPOZSR9bTmUlB1C41u2fPWe9eL 2xA0YxasrDjChj0Ze8q33V4wRffKVSK0M1LigIS/PXZdRe4GY/TYX58bRO2bescFEXM0 1UqPq59BN74eqt+grks5eZnX8fRBIeylu9sCjk16eUoOht1atfBfpPv9Me6LTxi3VKPS mYMiaj5jOgoQ+Hs63f7Uw6kAfaslGVL7+iE2ewZy99Cmaap0rH2XWlbZrnh6baTk+QjP ZAgKcQpotRrQHkqEeXQEVnweSK5zMbSIUZK1JsVzgYCPhVufj1qcSJhY1x5+9j5yDly4 cZ3g== X-Gm-Message-State: AC+VfDy1XAmeUJsPF6yGEfsmBMvn73HoxBw4PuFRFek6bnRYVmcL9Y/8 zZbL1DnccK9NjMq+25Ql/Onhdg== X-Google-Smtp-Source: ACHHUZ4DJGhaMm7brMwF3P8AN9X/VOOOSJlkXVvH96yVnAEoah1Hx3Zw7Ukr9AL0H+eD7KQMt0LyCw== X-Received: by 2002:adf:fb45:0:b0:30a:ee5e:5cf5 with SMTP id c5-20020adffb45000000b0030aee5e5cf5mr4968771wrs.31.1685937490193; Sun, 04 Jun 2023 20:58:10 -0700 (PDT) Received: from localhost.localdomain ([2.223.46.74]) by smtp.gmail.com with ESMTPSA id l18-20020a05600c1d1200b003f61177faffsm22761574wms.0.2023.06.04.20.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 20:58:09 -0700 (PDT) From: Alexey Klimov To: linux-sunxi@lists.linux.dev Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, daniel.lezcano@linaro.org, peter.griffin@linaro.org, klimov.linux@gmail.com Subject: [PATCH] arm64: dts: allwinner: a64: Add thermal trip points for GPU Date: Mon, 5 Jun 2023 04:58:08 +0100 Message-Id: <20230605035808.594686-1-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230604_205815_379877_1BC1A9C5 X-CRM114-Status: GOOD ( 14.44 ) 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 Without trip points for GPU, the following errors are printed in the dmesg log and the sun8i-thermal driver fails to load: thermal_sys: Failed to find 'trips' node thermal_sys: Failed to find trip points for thermal-sensor id=1 sun8i-thermal: probe of 1c25000.thermal-sensor failed with error -22 When thermal zones are defined, trip points definitions are mandatory. Trip values for the GPU are assumed to be the same values as the CPU ones. The available specs do not provide any hints about thermal regimes for the GPU and it seems GPU is implemented on the same die as the CPU. Tested on Pine a64+. Cc: Samuel Holland Cc: Jernej Skrabec Cc: Chen-Yu Tsai Cc: Daniel Lezcano Cc: devicetree@vger.kernel.org Signed-off-by: Alexey Klimov --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 62f45f71ec65..07963eea1bf0 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -243,6 +243,29 @@ gpu0_thermal: gpu0-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>; + + trips { + gpu0_alert0: gpu0_alert0 { + /* milliCelsius */ + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu0_alert1: gpu0_alert1 { + /* milliCelsius */ + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + + gpu0_crit: gpu0_crit { + /* milliCelsius */ + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; }; gpu1_thermal: gpu1-thermal { @@ -250,6 +273,29 @@ gpu1_thermal: gpu1-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 2>; + + trips { + gpu1_alert0: gpu1_alert0 { + /* milliCelsius */ + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu1_alert1: gpu1_alert1 { + /* milliCelsius */ + temperature = <90000>; + hysteresis = <2000>; + type = "hot"; + }; + + gpu1_crit: gpu1_crit { + /* milliCelsius */ + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + }; + }; }; };