From patchwork Sun Aug 21 17:30:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 12950020 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 D20D5C3F6B0 for ; Sun, 21 Aug 2022 17:32:55 +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:References:In-Reply-To: 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: List-Owner; bh=UYzH0+9yMxeNQaa4rnuFhQHlHMNjqhB2SZYcYtMJZV4=; b=3UA9XL3roOyVuX z+PRjcV9p5Arsvg7rdIgYxsRd+dbAqHC5Dj01Z0obMhaSFUgWMyafJPNbCaKcxTpR8IIj32pxX0V6 2M7LXxerXenmTEeKC6U4pQccK/WNOY/Vwq3VT57J5AYj233jQgemAWAJmjCPfiFOklmnG1mrhi18q fVa+6a/tInxRY00ebEVAsnpSQQyIHRRRk2ViR511kzq+RU9084bbcNI82USCQtoWh6nDwPFrmqCGM A+BeoCkDTecKRCw0xsDUrgB9Prf04qOvJC4OskyV3wjalEavqJZKFMMtdGxCAGsm/YHFH4zQ3+Ev5 kXPkBp6wmGQEyCI8hJPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPonD-00Cpz6-Ap; Sun, 21 Aug 2022 17:31:23 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPomy-00CpsL-6F for linux-arm-kernel@lists.infradead.org; Sun, 21 Aug 2022 17:31:09 +0000 Received: by mail-wr1-x433.google.com with SMTP id k9so10681777wri.0 for ; Sun, 21 Aug 2022 10:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=aSJ84KqrNn6MWyh6FORcW3yirHeYw6hYSs0IzGec01M=; b=oMPqfpeHVVfNLHP2MjvlbDraFSkaHgYrFskuQI4NmmbhLtDnnhLOa3vC2pdNgKyy9t +Fb4PAHxafTxVQLv2RdYwIQnu469rsfq3eC5wkJkZGheKOO0TwANXPxpol8qfr8qCYWM jV075pLCfKUO0CMi68yqYoaMawBNfzo4UJxSCYGRmD0bnBj9Q7e28YKUOEKxio16M1I+ qb8ON1lB2aOqY+jhfsDiOnyXb+gY6gH6jLnP+97TO2I+mqwhlqhr1LFVdrFuUc24nUdj Da6dWlIzJccvrTZ2TlyNOhkKBm4OBpPMrIBaiyljjVAwCOR40N+l5yczII4Td45mMr1Y ScaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=aSJ84KqrNn6MWyh6FORcW3yirHeYw6hYSs0IzGec01M=; b=dL48XuovTxw+2luzsdkWXtpgmwYSe55ppBuKL7I4p3YZsPiGdR1T5GL8OeRfdR+jD4 KNQLLa4xRKFoXhj37iUgvImg1x++O0p9EzC1lmTQ6LKL7vIrEQcY53+vg1e3yHUcsqoX LdZbeCZ4jjOHU92gYTUEedc08wl30B450NJx46LYJKgutadZe+ssBmoEUIcYDFIk/FIL u5GJxQ3LxaJwv+12KzHAMjJ+pPZTyqUx37ecA9Bk963XXEdaBOpO9IPISzcof5eIr8No BeZN8OsvSGGvcCUDnNtmN1/UI7lT+cvgX8jPwB2AGu6eCk1gUnJhZiWVPDrmoyCO/wP6 5+KQ== X-Gm-Message-State: ACgBeo2QbFiyZEyCMe34adh1D6c1KAEIRF3mO/QhR/lPRRMjhNu8D3NA jNxKkWcU7Ua/AobZMmPf+LA= X-Google-Smtp-Source: AA6agR6fKo9R8ycp4Gb4tGnIr8ckPmGoMswlycqEn46ezfu/KXVXYdHG72MTfHpaSq4d5MQIOxl36Q== X-Received: by 2002:adf:eb01:0:b0:225:294d:c9c6 with SMTP id s1-20020adfeb01000000b00225294dc9c6mr8779399wrn.285.1661103065929; Sun, 21 Aug 2022 10:31:05 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:a77:3d70:9d84:ec8d:98d9:c29a]) by smtp.gmail.com with ESMTPSA id b18-20020adff912000000b00224f7c1328dsm9387205wrr.67.2022.08.21.10.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 10:31:05 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Catalin Marinas , Will Deacon Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, =?utf-8?b?Q2w=?= =?utf-8?b?w6ltZW50IFDDqXJvbg==?= Subject: [PATCH v2 1/4] arm64: defconfig: Enable devfreq cooling device Date: Sun, 21 Aug 2022 19:30:48 +0200 Message-Id: <20220821173051.155038-2-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220821173051.155038-1-peron.clem@gmail.com> References: <20220821173051.155038-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220821_103108_264796_7A76E1D4 X-CRM114-Status: GOOD ( 10.84 ) 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 Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature. Enable this driver for ARM64 SoC. Signed-off-by: Clément Péron Acked-by: Jernej Skrabec --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index d5b2d2dd4904..109004e44d21 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -584,6 +584,7 @@ CONFIG_SENSORS_INA2XX=m CONFIG_SENSORS_INA3221=m CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_CPU_THERMAL=y +CONFIG_DEVFREQ_THERMAL=y CONFIG_THERMAL_EMULATION=y CONFIG_IMX_SC_THERMAL=m CONFIG_IMX8MM_THERMAL=m From patchwork Sun Aug 21 17:30:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 12950022 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 14B67C00140 for ; Sun, 21 Aug 2022 17:33:03 +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:References:In-Reply-To: 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: List-Owner; bh=e5FEIU/+h0S8AH/pyEF93v+H3HTHAHOxcUYn2KjbsSw=; b=x4sj8o8Rm7r85y TJPmvr6F48si63blrem6xiixAJTbjCCiGyxJIu0I0O0QXyx0B8yTmerWv/1mYB1RYb1fp4KUbT9WW rPpS/t7a5jVEBhhvkD2pErtLCCm0DxgzlrdsqSWCMAO0eWcCFCQ4QkdBd21lvGM9C43J+32pdgIO0 wLYXO/tYUltiXl7jeY94SxmV3Hb+HXU4jclW3U4hq8mnNfheDEsIT+4i4A7AOxkh1SdQ7oK/SsAw5 a9Lkr3etDpwK8aS2gtMWPKBau08r7URC8ebFZVKhNVpKwH541PFqpYWQ6/AG8ix+voTeZXgeEh6lT Bn9/s/AUdIhntPE87FXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPonc-00Cq4h-EG; Sun, 21 Aug 2022 17:31:48 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPomy-00Cpt6-Tw for linux-arm-kernel@lists.infradead.org; Sun, 21 Aug 2022 17:31:10 +0000 Received: by mail-wr1-x42f.google.com with SMTP id d16so5354976wrr.3 for ; Sun, 21 Aug 2022 10:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=xXtd3T1/ZmQUyro/3HUWSi05URHaw6Uj3JAxrNnokZQ=; b=WrCaNmPmrBGJvcCKPkD/xrN9evhffeqMgS/b4hmh1mBEAG1Ow5N7Zlj9BKGmeGuRTS afuBjwzks5LCQ3PW0m6IJJLbkIGaOzMU61twhKeaK+a3jSc+HVE/e9OwQF5pGnG0TXTd XHJfJh5GchRTl5S7oIvp9AT1+WvBSk/Y2iAdc2kV9tDYRm69BZKtf1t4v/LkukH/OD0j 9pdGK/Nb9rZFvsTDw2Z6SQdxGe1KsQ/RvNxSnw64Ems1gjopQnrZ3AN9oI6V5eXvqt4X 0fCk39/so6YeaVn06GZkQgl84qmoxDZ29mwKlXyUnYzJTpCxDOmlkU55l8lPiNhuph6X olBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=xXtd3T1/ZmQUyro/3HUWSi05URHaw6Uj3JAxrNnokZQ=; b=hZxUJ4yUuFAadT52x7XUf/HJq/U/LLaMv4LnKO2DcbB3mBQmJ6I5UfEau/UYSws+j5 zwJt0/FBZo1NN8ie8MGtJgKGg3rx0/h9Xu+htjL7+lXUKhJ8w/Qf34jifXX39bJGvmZf 2b3aVnqzJMTqEx3Igu48S9kqxP17FhHJPGPjd3ZcHZfCJWj5UrRnfBaiES9Ru8jGbfBC wmfD17jjTROBgfmMdM3N7vHAbZ1gwURyCt1Qksl7rAgxn5leUq+Y9dUCus/9Y7AIyeUs uUF3OuFZUkBdPJeh39iXLPADNNwOgk95zPbw+kSAGab4qWBHX6mK7pKv2bzOvqI2CUWg BoOw== X-Gm-Message-State: ACgBeo0YNMfgpPPSfHoskK6xaDJSvzdUul3rnHPYz/ZoOSGoOd8GsT7k 8sU9Utf9jqt76aqrDMgOTpM= X-Google-Smtp-Source: AA6agR4viVgw7SRXAAacJiqkBrwpN7r4KswavSgQ6UWx06oXqqUMu6VnRmfkNRqzLYnrE+PRPvYBUQ== X-Received: by 2002:a5d:43d1:0:b0:225:2707:dee with SMTP id v17-20020a5d43d1000000b0022527070deemr8873986wrr.25.1661103067713; Sun, 21 Aug 2022 10:31:07 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:a77:3d70:9d84:ec8d:98d9:c29a]) by smtp.gmail.com with ESMTPSA id b18-20020adff912000000b00224f7c1328dsm9387205wrr.67.2022.08.21.10.31.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 10:31:07 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, =?utf-8?b?Q2w=?= =?utf-8?b?w6ltZW50IFDDqXJvbg==?= Subject: [PATCH v2 2/4] arm64: dts: allwinner: h6: Add cooling map for GPU Date: Sun, 21 Aug 2022 19:30:49 +0200 Message-Id: <20220821173051.155038-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220821173051.155038-1-peron.clem@gmail.com> References: <20220821173051.155038-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220821_103109_058008_E2B3AD8F X-CRM114-Status: GOOD ( 11.87 ) 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 Add a simple cooling map for the GPU. Signed-off-by: Clément Péron Acked-by: Samuel Holland --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 5a28303d3d4c..943ae5374dd6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -186,6 +186,7 @@ gpu: gpu@1800000 { clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; clock-names = "core", "bus"; resets = <&ccu RST_BUS_GPU>; + #cooling-cells = <2>; status = "disabled"; }; @@ -1075,6 +1076,27 @@ gpu-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>; + + trips { + gpu_alert: gpu-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + gpu-crit { + temperature = <100000>; + hysteresis = <0>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&gpu_alert>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; }; }; }; From patchwork Sun Aug 21 17:30:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 12950023 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 84966C00140 for ; Sun, 21 Aug 2022 17:33:25 +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:References:In-Reply-To: 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: List-Owner; bh=ltV9DkRdQYE2EiV9ub3jIjiwnUHqqu8s9/s2k3h3sEo=; b=c4jqvd37tYo/YZ vbL3piq6c5N+fty66KpaS5IKBjEk6zepvtYjugQ9NrkkaScduiM0jkrHIFNog+L/ceZF39VgGSwuB zchmhC2g2/CC00iyET3RZNmwnQxZxUMWYpiga1u9gSSCUUKFjgYySMUrR/Gv3QlbsRFZL7gFV5ymG pHcuoCkq6iAJVW38hrLumSCZ263Ma27Y3Oe1wsTwCBuSwBK2WrIhPlT0xH4JBzMtijLmDsB0jEUuX VAvSLesnHvII0qr31v8ECuLxNNh04mBK9noXoMoHtBKmMNIa7hRs8n/MO2pFH/GA4gYqBeujlb2+Y mIkig1heqMZyOSbk2qIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPonm-00Cq8h-Fw; Sun, 21 Aug 2022 17:31:58 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPon0-00CpuD-U1 for linux-arm-kernel@lists.infradead.org; Sun, 21 Aug 2022 17:31:12 +0000 Received: by mail-wm1-x335.google.com with SMTP id ay12so4526731wmb.1 for ; Sun, 21 Aug 2022 10:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=rVeHL3XvYGZ6orYIoYz1XXXquShX0TNS4nHwqMLcSJ8=; b=BWcTk6yoxL1icGJDYiDE/gy02YAodotBzePCyFqUDjMk3W3m+9a/P1wWigW0BwdqGW clnaCETFOGOYLBzqxPUdJxI2fsY3GUPPZnISYqp3Z5tDW50VnienqWRueZFhwn0Az64n VJ4rTgYFx9ANOhpJD7xa4JCM51yIAol3DG0HgX9coAz3acighJ2rKXvbR6SYEn7NRgM9 f/DPDF3JalF9uGY2J3HYKkfBG29ZZbp0tEGnaoth8VXutPSL5Ep1zlCF/dI2PwuJg2nJ ZY1HXi/jT3om7aeE6z9PM4m7AIx0A3MO3A3BPkEUy9x3LT5uSfMF+aXrDzYZ0o0cLT8l eb9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=rVeHL3XvYGZ6orYIoYz1XXXquShX0TNS4nHwqMLcSJ8=; b=d75twblD4qPQOK0gsDZEf6QnzykvEEzr05O9kJ/FYTm69OkPlLfLEQusTWmZniFKyH 43KVQJPzLkZZmW3O8c232yeDVWw4WDdX864QhwC/EpPSAxNs+WDTtuXlJjamwe5wuYzQ UyjB9j2cs7tTMJ+UcVIxBd+UZjSNp9wjLWOPt3KBvoCxgtqyWKdYITTl0GXIkhuckJHf Exn6Hpw8VDt6k4ixrr1VJ4nNR+SDMPADhjkN0lQTMtE0SD9K/j63r0Xs7wtMsxbqapUq j6xxA69/IkmqVUiJ76USwjHglCFctTBL+rjcZZiXzpbQvKwdWiN7r037ZlFFD24H3Os0 P3fw== X-Gm-Message-State: ACgBeo04QlLGkiTIj3B+k9XLTgvPl4L+WWkPJvM12L4f3D9mGeeFPVup OWDHiXcyQ/JWb/irTViTOzM= X-Google-Smtp-Source: AA6agR4O1FHEREDqGDsj8VJ42P/BMWkbYBZbIH43j2PApyw1cDuPDlt54sD4PfatY62c4hcqxfxxbg== X-Received: by 2002:a05:600c:3846:b0:3a6:5292:f8af with SMTP id s6-20020a05600c384600b003a65292f8afmr3625313wmr.50.1661103069186; Sun, 21 Aug 2022 10:31:09 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:a77:3d70:9d84:ec8d:98d9:c29a]) by smtp.gmail.com with ESMTPSA id b18-20020adff912000000b00224f7c1328dsm9387205wrr.67.2022.08.21.10.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 10:31:08 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, =?utf-8?b?Q2w=?= =?utf-8?b?w6ltZW50IFDDqXJvbg==?= Subject: [PATCH v2 3/4] arm64: dts: allwinner: h6: Add GPU OPP table Date: Sun, 21 Aug 2022 19:30:50 +0200 Message-Id: <20220821173051.155038-4-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220821173051.155038-1-peron.clem@gmail.com> References: <20220821173051.155038-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220821_103111_009387_DBB6794A X-CRM114-Status: GOOD ( 14.12 ) 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 Add an Operating Performance Points table for the GPU to enable Dynamic Voltage & Frequency Scaling on the H6. The voltage range is set with minival voltage set to the target and the maximal voltage set to 1.2V. This allow DVFS framework to work properly on board with fixed regulator. Signed-off-by: Clément Péron --- .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi new file mode 100644 index 000000000000..a66204243515 --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +// Copyright (C) 2022 Clément Péron + +/ { + gpu_opp_table: gpu-opp-table { + compatible = "operating-points-v2"; + + opp@216000000 { + opp-hz = /bits/ 64 <216000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@264000000 { + opp-hz = /bits/ 64 <264000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@312000000 { + opp-hz = /bits/ 64 <312000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@336000000 { + opp-hz = /bits/ 64 <336000000>; + opp-microvolt = <810000 810000 1200000>; + }; + + opp@360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <820000 820000 1200000>; + }; + + opp@384000000 { + opp-hz = /bits/ 64 <384000000>; + opp-microvolt = <830000 830000 1200000>; + }; + + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <840000 840000 1200000>; + }; + + opp@420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <850000 850000 1200000>; + }; + + opp@432000000 { + opp-hz = /bits/ 64 <432000000>; + opp-microvolt = <860000 860000 1200000>; + }; + + opp@456000000 { + opp-hz = /bits/ 64 <456000000>; + opp-microvolt = <870000 870000 1200000>; + }; + + opp@504000000 { + opp-hz = /bits/ 64 <504000000>; + opp-microvolt = <890000 890000 1200000>; + }; + + opp@540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <910000 910000 1200000>; + }; + + opp@576000000 { + opp-hz = /bits/ 64 <576000000>; + opp-microvolt = <930000 930000 1200000>; + }; + + opp@624000000 { + opp-hz = /bits/ 64 <624000000>; + opp-microvolt = <950000 950000 1200000>; + }; + + opp@756000000 { + opp-hz = /bits/ 64 <756000000>; + opp-microvolt = <1040000 1040000 1200000>; + }; + }; + +}; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; +}; From patchwork Sun Aug 21 17:30:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 12950024 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 395CCC00140 for ; Sun, 21 Aug 2022 17:33:33 +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:References:In-Reply-To: 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: List-Owner; bh=420ilcWXR0z7ECiyYKIQs4hFDzbOjEajH1kIpXo+DtE=; b=HyGsom63lLND2a lQy59/nCc/AhvFgVXhyMsIjMCJcpAxY0PjcbRXNBzx8JOCPUer5994dodS/NPL081zPsGoItbJYjE /O/EKHmG1KBMat4lT2rkzxIFDh7ZSQCMK2uL2z4G7Q5Y+HHcoU/o8OI5V44U8wYXqQsqP5KHLzmH0 5fBdJJ+m6Nqk8Os6FrteicowynbleYrC53geEc+wsqPGiqthf7ibQ9PF33zD9qw7gjUdMDnbHmSHC rA+dPkURjKdebzPVx8azXJqASOmiF+jJthsT8dGD39vvbS/t4NmtBfGYuFAtt9rBS9+USHYwWvG9I Aq9mvneaTGaJFGQdaOIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPonw-00CqD9-3d; Sun, 21 Aug 2022 17:32:08 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPon1-00CpsL-1z for linux-arm-kernel@lists.infradead.org; Sun, 21 Aug 2022 17:31:12 +0000 Received: by mail-wr1-x433.google.com with SMTP id k9so10681904wri.0 for ; Sun, 21 Aug 2022 10:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Hlj56Jwh1i0Eee3H3mGRhZzTcxVry+oPiQLbuChwm1g=; b=dOnoJjs0KM9cLcfIRQsOUTFnxnDhcY5whzv3e0hOWpyPfCkLaiYsvBAGm/9xyThEWE ELt/NEgjZIDAtxWw6nCqdEZIsNuvjHL+wyx6qpdA1KDS6qx5St7v6yR+OybTySVkCptR XKYg0eG12RW85QgVFwk6DjVNsmyvGDS2Su6ZF/nq26lZ1+rnDPWn92y+//rMuTWPxkQd VTipjcaMuk1V3FUqI5DdqFuQ45CZjG+m3LZJduFBI2LrSJP2Kv7LMDLFiSG/OFEQQhS6 RRp91ScPYolCvwAlMbqCBhJ1oe3q+c2huwjzalvtxSwN7bPNz8FSUfE/xx7KzPCXyZ1I +v9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Hlj56Jwh1i0Eee3H3mGRhZzTcxVry+oPiQLbuChwm1g=; b=lwIXLP0qy+1gdBzFhLyke7Xibx22QjO3QfiBGLJn3Tm+0nKIvK6hoLHc0VFfOlAvYR LuN634vBtpkiE6vkz8AmY1co751QbhlHymxZX9vjjgMe9rL+GgH9d2CrOr1gORicIYOD X4p/H/83cVEsEjG255j5BRFYrNJ02QygMnQ/lVFp9jVQqbYuiox/ycVth5dDx0VW2bIk fopVFJrNPuUKHH+ibehBcBYPsjCykr8PUrxePa5ipXvSQYOjizSgTyYePZ+BRCuilsh5 t/Ndiv9s7eTr7VDdeZ64k+5gHcGErdfb6mW+g3Pv8xtk7tUpNxe3bOKd8KT84ywxpvwh 4w8A== X-Gm-Message-State: ACgBeo1h8omES6Rzd3lspVw5e//GnEM5222xmdEAmw0+gGq9A+1ARmeQ fGbjiqr8D0YCpJXtuXawyas= X-Google-Smtp-Source: AA6agR7bLyuK/H9MZotXuyq6EIiqzmQenCzhYTSPqQs16biWFiQheDSr5OFXBKStzbIG5tV5qV5L1Q== X-Received: by 2002:adf:d4c6:0:b0:225:2eeb:fe8e with SMTP id w6-20020adfd4c6000000b002252eebfe8emr8770137wrk.429.1661103070449; Sun, 21 Aug 2022 10:31:10 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:a77:3d70:9d84:ec8d:98d9:c29a]) by smtp.gmail.com with ESMTPSA id b18-20020adff912000000b00224f7c1328dsm9387205wrr.67.2022.08.21.10.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 10:31:09 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, =?utf-8?b?Q2w=?= =?utf-8?b?w6ltZW50IFDDqXJvbg==?= Subject: [PATCH v2 4/4] arm64: dts: allwinner: beelink-gs1: Enable GPU OPP Date: Sun, 21 Aug 2022 19:30:51 +0200 Message-Id: <20220821173051.155038-5-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220821173051.155038-1-peron.clem@gmail.com> References: <20220821173051.155038-1-peron.clem@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220821_103111_174834_D12EA5E7 X-CRM114-Status: GOOD ( 11.42 ) 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 Enable GPU OPP table for Beelink GS1 Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts index 6249e9e02928..20fc0584d1c6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts @@ -5,6 +5,7 @@ #include "sun50i-h6.dtsi" #include "sun50i-h6-cpu-opp.dtsi" +#include "sun50i-h6-gpu-opp.dtsi" #include @@ -261,6 +262,7 @@ reg_dcdca: dcdca { }; reg_dcdcc: dcdcc { + regulator-always-on; regulator-enable-ramp-delay = <32000>; regulator-min-microvolt = <810000>; regulator-max-microvolt = <1080000>;