From patchwork Wed Feb 9 08:51:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 12739840 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 873DDC433EF for ; Wed, 9 Feb 2022 08:51:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 20AB710E5B1; Wed, 9 Feb 2022 08:51:34 +0000 (UTC) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2052.outbound.protection.outlook.com [40.107.22.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F6E510E5B1 for ; Wed, 9 Feb 2022 08:51:32 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DnqNtWmQzk+C+OFHpa+RgdLKgOhYG51LwEgVaqW8kjfmmasTmqFR28wEAiLK6ez7NpnAd+E/GpomwiWkTGx4UiX5lcTMxY2A449YpxdvPl13QrA4C5VqRU5mxZZZjfX3CIKyeHdTM0YeSL9dqGgCOryJm4p5hrt3rM2EcfzjWuYi65HBDpXE86llqSAenhYVNsubz6CSLM0NsjEw15/9qlWh3DL2CyrzOcyqd69LGlsYLJ6dUq3FPHlH/j+Hi2ahjYkM+0WjOE33A9f+qE1yU9dEhUBEYnqLWUnE0FDVWPZI8jxkMEq8wZ0DdRaxHSRuBv+tTHzzVZhwJ/7HyZ+ChQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WXWbAHo/uTDOoy57WLUJi+4TuYSVQl0u8t02WxWpJYo=; b=Cq1l+7oVTLDGqgxkq1noiKcSjv2D7BxsaNZpdnN60AMED1TTdZ49/l02Ys2h3687ZEDlgxMwmyCp0vStRD6lNmwRw0O2mIcrZNUnI3Pd5x3EN82PMB4SN312UejUr4+8zDbzR8NyevDinDd49LhBrxog3HHTL6e661XJIp1VvW0A3iX8PahybRNWLhg78jigVx/wZHCUHO7/EJrJFNA+Migq+2tXGffWxXZQApVTYD6brOnED7AhOFHTi0EnasUYjIvWUHEHJoSYXotB+Z2qauyWNlkPlF9k1eK43u3xbZlIpWFzaeLIG0xGWFHIeTugkenaWI5ZQR8h3hGSQqNCzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WXWbAHo/uTDOoy57WLUJi+4TuYSVQl0u8t02WxWpJYo=; b=yEjsfu2ALtJJm8kK+yDuvntDNIhjMVFjyln0MW9LGk5wnN90anmry2SPpRkSTqYPIMPxLBxkNKtQ6GIW1sX3iKwbYu3tmEITi0PQqRMvryS6MJgMz8Y6fcvWxat3UM5V/iaZx6Brj+imURmw0Yr03uUSRX7z1YsE6cASprhV5Mc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from HE1PR0802MB2426.eurprd08.prod.outlook.com (2603:10a6:3:e1::23) by VI1PR08MB2927.eurprd08.prod.outlook.com (2603:10a6:802:21::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Wed, 9 Feb 2022 08:51:30 +0000 Received: from HE1PR0802MB2426.eurprd08.prod.outlook.com ([fe80::e14f:197:5001:4c56]) by HE1PR0802MB2426.eurprd08.prod.outlook.com ([fe80::e14f:197:5001:4c56%3]) with mapi id 15.20.4951.019; Wed, 9 Feb 2022 08:51:30 +0000 From: Michael Riesch To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH v5 3/5] arm64: dts: rockchip: add cooling map and trip points for gpu to rk356x Date: Wed, 9 Feb 2022 09:51:08 +0100 Message-Id: <20220209085110.3588035-4-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220209085110.3588035-1-michael.riesch@wolfvision.net> References: <20220209085110.3588035-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0072.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::23) To HE1PR0802MB2426.eurprd08.prod.outlook.com (2603:10a6:3:e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d7429efa-c291-4a09-0daa-08d9eba95c89 X-MS-TrafficTypeDiagnostic: VI1PR08MB2927:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QGXaI2lT9p5utY/ZCfOyvevGWiVQwWm/R6Zzn/AKi92XP6C7RdCHI9elJQRRqIR4WbQYrHPV9epUe1WVfUL/aJ7DUoma9prsKYearu++P6Uk97xWZJRs7Xl6iGjEiO8fFGar+rb9K1WqYMBFlmhYFYiBK2I9NDzAH2xP4eVe1Cdb9IFh/mqdpk2CTNKTJxX9LSiEMkCKSeqxcaVQjhjNqSZnGyBwhnsaiRrgndDSYvUrKIDFAZcswUeoo7iL4CnbD9DxHr84BPdSDwf9bIx501slF4dgQbMvKKB+feRaICXaUFNZZuFvYwe2e0dY7PGagfV7m7Bf3LTv/RCb2pBmdtEInOVvPHLCTn/7FsqacVoQWPUkNLXtq52l73PHEueLYPka++5sCWHv73sNfJyc+6aoP8TShJPwo2Gk5aF8zGZE2YcyjhkSsIW7BSzuS++pHReRgeOp0Y09pbqLN3r7i9vzif5EN0aZcTP1H3ib1YeVtuGuwusajGNarEPYB/u7qedPZlJ5AY0XI1T5yILd0MjCVxUWWBdA5LFr58yB6vJI7uDJ1pGr0kWYtNa5xh4JhKJvsWi+ircj7QxCsA5I5TKSm/C+G+bnXcuZknRF+X+FmhOLzMVNDZ94HW0TATpWjq1kt4IVhF5mcjS2wv9W8Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0802MB2426.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(54906003)(66556008)(186003)(4326008)(316002)(66476007)(36756003)(6666004)(44832011)(8676002)(66946007)(7416002)(5660300002)(52116002)(6506007)(86362001)(83380400001)(2616005)(1076003)(8936002)(6486002)(508600001)(38100700002)(2906002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Sz0G1n59eGOnX8SebMdRTtRKFF9hDTbVAq9H3HxlcXUbZwKqBzsskhUfF4Wg+YThk2IsfsoisALnIbNObOkzPSkU9bdHfEXMZWrfQdMavQ1kfXAO7yYMtG725W055SjRRayUGHISTtBMgPOIXgTlLohLofHhEkibC2M76DHk3P949BzUQXZLf8PIXbpBl6M8ACcUfAXtZEsVtfrfOAgK5P5Mmh/7ZXBVDeo32Aj8BOT/nPoI6UYuHo1iJ5YEuTjj8lZ1cfuZTegNFf8Uqeou/JOyL+KZKCZArJlGPixmCGOeCPEqe8BXEv44ktQ1mUO10e9xSPDlrL+AyNuC13KGAru7s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4EuyYdUAiVJpp1tTaGATN/ngGZ5KuZfbBAOjQCU9dE9aq92hPQeNcjljaaz8F5rJb8LgnnTCTiThpaCk83OAvJZ8GxXWwHJ+LraLO+gkSAs2AXM04oxrlk60sLAOtFccRITIrNctGHDHou7cLJxRMIOTsnc8bV948501JI89cM4V0oCA+0ELdDCn35o7B9/MYVMUfki9PMaE5tdnxbIgog0+HaaTnsw2b/U8vi9Svuc9PtYJU+xw9pP1d3s5eO2FVDB/q7eqFXtt/kPwdWinOctVih1gHd0/qXkBSCWKPNUC+qB8ObrywVBL3EUWYlc9dCXnmoSCe4DItSaUmT2bZc5KZSnWjOLbVs+EPs= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: d7429efa-c291-4a09-0daa-08d9eba95c89 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0802MB2426.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 08:51:28.5840 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 92QPDRL2yoDdO1bnaPW5WHk3NqGB1IcjEFDV1g5xfhd+ZeYQPIsnt8R6Yms7H+jvHLpnuVnk//TwK8QMHqlT/mv0vmvZ8roWGPLB2zpXVM8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2927 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Sascha Hauer , Alex Bee , Nicolas Frattaroli , Rob Herring , Michael Riesch , Peter Geis , Liang Chen , Ezequiel Garcia Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Alex Bee RK356x SoCs have a second thermal sensor for the GPU. This adds the cooling map and trip points for it to make use of its contribution as a cooling device. Signed-off-by: Alex Bee Signed-off-by: Michael Riesch --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 47484305b7a4..2334fed4620f 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -1093,6 +1093,33 @@ gpu_thermal: gpu-thermal { polling-delay = <1000>; /* milliseconds */ thermal-sensors = <&tsadc 1>; + + trips { + gpu_threshold: gpu-threshold { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + gpu_target: gpu-target { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + gpu_crit: gpu-crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_target>; + cooling-device = + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; };