From patchwork Mon Jan 1 00:00:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 13508249 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 835CEC3DA6E for ; Mon, 1 Jan 2024 00:00:49 +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=Fb2alraswVgMTu bGks2jN/AcubN16Q+C4k2nSHNPy44wpg5rVp1d6Cs8HgAAtqS+maFEJrnFiYFO8fN8Pm1EcAJ74r8 JTzW2GNyWhGBzqSNHAPKULPlmvB8dkH/ELQgXgfjYO4j4Svm5FTVtPP5MQtBsspsBZdK+2FrOgk4W LhJeWUGAdsp8X9zvJzwnfPAd8baU8TihpqsOr0QulieWPr1s9IopK5BUqQTMbVQlxL4pk5gyRLrZq Ledz+eGXBtysZGVdz+YPs0219nAFB97d9qm52LwRAORN+mwOswkrVarQnccQCLtMZyLjDwryOYPWp g/AFgkcMzYbHUA5gMsRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rK5j5-005O0R-0C; Mon, 01 Jan 2024 00:00:15 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rK5j1-005Nzf-39 for linux-arm-kernel@lists.infradead.org; Mon, 01 Jan 2024 00:00:13 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-556275957ccso660143a12.0 for ; Sun, 31 Dec 2023 16:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704067209; x=1704672009; darn=lists.infradead.org; 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=BhoT8pCU9TSBqE0uFEhAb1vyAYvJUpOL0noymV0+yuLJORm22VpcTgfw7ovzbDVQBV 7xdHOoJHAsDcQmy9elQlNo8fAvmVa1izRvQ9FCut0H+tUCGlrI8Ja/g0pkQ9EB2AG/Fj rk7gT3VdxdcdztyYOvzZ5WrE/9mMs7Yvdkpej1HUjI8PSyeo9oeIVyqaHD7uYuRWsGkU gQt1nUGzntZ41R7RbxSdcHAViJUnhytNrvyw7GT2cll1RNC2biNPx95CZcUvUyRBi7H6 jJCUVgc+lGAXzyxpqktco3CESFvA1cquh6Wg4yjX/K1ZL80KxS992G+CISOlw8EVJjGw 6EOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704067209; x=1704672009; 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=NCtlezNCs9CVgWsNyeaBt3v/3gdlTffyVRTknHdEOHFlwzL8CnuaZFCMKPXLuAWgjV 4j3spioejYcevTVsAG028o3KAD4Iz+DM33ZRfgoDMhhxCwU3z7cqxqRm9B6nz76Y/izW kB6Ue9wdh26W7Ju7PZhtQkJDt3U1pQMKCZosjdzveL9UC9DZGxeoaJFHKZt7zdvcgszw FRtHWM0xeTMVfThFoYUXqujjW7ydLw4tXotOBI47wBiwQk5TOWLSnn2KV5Ur9WPHnmqS +5m6A4RdWH7Z/aj4ZHXVvWKN/Z1JH1WlSeOdMegBurbnr9eBO88Ik14xL4PljLnwtRuL S8AQ== X-Gm-Message-State: AOJu0YzHG3wHh9Xc9Ja2K54276+paoP5VzBPGmOYyH4aKYUnUHPoKbfB sCDID8Yo5THSdtsyRvRw6nYznVWWMBpAKQ== X-Google-Smtp-Source: AGHT+IFXEcZGbkvUmUE7n3yK8GOblmtp1rqPhnp6R3fS+jw+w58DxQeZOYGzzaX3pnL0cE39+XGT6g== X-Received: by 2002:a50:96cf:0:b0:555:f39a:8c90 with SMTP id z15-20020a5096cf000000b00555f39a8c90mr829490eda.35.1704067209415; Sun, 31 Dec 2023 16:00:09 -0800 (PST) Received: from tux.Home ([2.223.42.238]) by smtp.gmail.com with ESMTPSA id ek20-20020a056402371400b00555f49e7080sm2710514edb.56.2023.12.31.16.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 16:00:09 -0800 (PST) From: Alexey Klimov To: anarsoul@gmail.com, tiny.windzz@gmail.com, linux-sunxi@lists.linux.dev Cc: rafael@kernel.org, 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 RESEND] arm64: dts: allwinner: a64: Add thermal trip points for GPU Date: Mon, 1 Jan 2024 00:00:08 +0000 Message-ID: <20240101000008.65747-1-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231231_160012_095019_EAD46FF4 X-CRM114-Status: GOOD ( 13.77 ) 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"; + }; + }; }; };