From patchwork Fri Nov 26 15:17:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12693767 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 CE5B7C433EF for ; Fri, 26 Nov 2021 15:20:07 +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=TrPh3r8UQ5aiDjuh4+jHsJKzvZCnvOFNmcax0dyaW+E=; b=ZtZ9NNC3cZi+J1 lVBf3jVcc6b6KeU1WelVEmkcnBdJ3HxozyYHwAGUg0ILTH4e3wyCD6qLlfCAaw3ENmWB0lLlopJJl s4PXFGO2t5gxk/R6C0OztU2oZHDVopYwXBd9Bbba4jfCniymj/XxFWAxITvmmSBPLO/wGLbrOflfc BTjeuslKToqTFn+xbOU3OM/d5bR8kgJdqS7wFzyqmZDOKIeLhEfbgqeS7nTg98QpKT/Vem21POdxM 26pl+2WwAIzKFjMlIFeqQS38wVeABOzP/yxIetsXDP8z8RJ2Dk2WE7izWUFUb8AV9mhn/IIv788FN ACxMgOusAQo5HVjyKpiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqczq-00Atxy-6T; Fri, 26 Nov 2021 15:18:42 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqcyv-00AtZ5-1f; Fri, 26 Nov 2021 15:17:46 +0000 Received: by mail-wm1-x329.google.com with SMTP id 137so8438240wma.1; Fri, 26 Nov 2021 07:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+bFxhbi+YBOdMVe3lR8afDXUVB1LyZN9EknvfWnuqO4=; b=mkvudNPF7VhYVt3OaOIAEdEVP9/xN3txsrNbt2N/PNBtxwjicL+uesXe06jJs/nJTa I+t6D4QCrshuFBo/FLLTCpMxmyangJW6PmcAu7hiHX8Jydw+c8Du+zxbhfdNfsgD3rYR +e8Fu85w40PH0/8tUYK7kxJ08VqLuoqorrMxU5ccjp2mMGuNJZyLsLNCo12HXRhA0Ldu XeEXF8X9lXBR6HeZcjq6QY0rJGaRFweCdMODSpV6q7f3G9Kgf7oJrILkzQBUfvfuIbOi MhZ3ZtCsniUrirkTJrsLdNokgwHlasVmvJNzRJB1oORPNInNVdaN3tDyZoj0VdW+7lcV EE7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+bFxhbi+YBOdMVe3lR8afDXUVB1LyZN9EknvfWnuqO4=; b=aKEXf9np1nnvxtZkB7EnK3VpIP4OXGFCwekM3j3Lp0BMq3mgj0VbA3/Eo/GAxThP6q y4uL5R3lRJ2mUEMCwPu7JkDhCxR1v9LNQg2LSTRYmWDWZhEYwHklD3EkQLCGyPwWNfT1 hI7Q6xUSMvrw5RUTjagbDgSe5FcqzdcXK/gbD5HTfeBacVY3n819dfnfajcy2iyeVj/4 9U8dsYQBKXO3pWirir+c4ixWQSf/KZSh24pnIMl3x9pixb41szOQ4oxleuZomOaTyovm 7mjj8XbMjPrZ66W3lu7mySZhZS/tIgq+8ETMVFYhZc8PZRKG4T1xRT6X1r1cQZNj6pmv ky0Q== X-Gm-Message-State: AOAM533y/MVcBZ72XaPFcBWwbvmHkzCkMg3omgJt2s3Ohg/lDI+hhM1e 8oxwYdCQYa6iC53j4FN8og== X-Google-Smtp-Source: ABdhPJyGQtejEAreYJ4YBr09uEGV/yHcZX3kTWvoWliGGupW6SpIbPKgCZQDD0PhTWt9WmnOjZgT6g== X-Received: by 2002:a7b:ce16:: with SMTP id m22mr15743639wmc.39.1637939859270; Fri, 26 Nov 2021 07:17:39 -0800 (PST) Received: from alex-ThinkPad-E480.. (ip5b435a69.dynamic.kabel-deutschland.de. [91.67.90.105]) by smtp.googlemail.com with ESMTPSA id k187sm12323496wme.0.2021.11.26.07.17.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 07:17:38 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Rob Herring Cc: Ezequiel Garcia , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Bee Subject: [PATCH 1/4] dt-bindings: gpu: mali-bifrost: Allow up to two clocks Date: Fri, 26 Nov 2021 16:17:26 +0100 Message-Id: <20211126151729.1026566-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211126151729.1026566-1-knaerzche@gmail.com> References: <20211126151729.1026566-1-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_071745_166493_8275E234 X-CRM114-Status: GOOD ( 10.85 ) 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 Commit b681af0bc1cc ("drm: panfrost: add optional bus_clock") added an optional bus_clock to support Allwinner H6 T-720 GPU. Increase the max clock items in the dt-binding to reflect this. Bifrost GPU in Rockchip RK3568 SoCs also has a core and a bus clock and it gets added here in a (very) similar way it was done for allwinner,sun50i-h6-mali compatible in arm,mali-midgard binding. Signed-off-by: Alex Bee --- .../bindings/gpu/arm,mali-bifrost.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 6f98dd55fb4c..2849a7a97d73 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -39,7 +39,14 @@ properties: - const: gpu clocks: - maxItems: 1 + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + items: + - const: core + - const: bus mali-supply: true @@ -118,6 +125,17 @@ allOf: power-domains: maxItems: 1 sram-supply: false + - if: + properties: + compatible: + contains: + const: rockchip,rk3568-mali + then: + properties: + clocks: + minItems: 2 + required: + - clock-names examples: - | From patchwork Fri Nov 26 15:17:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12693764 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 8AF02C433F5 for ; Fri, 26 Nov 2021 15:19:22 +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=+y+35MuQ5fSzA+bOGwvhg4ypBNaFBBqTn4esjL4tgaQ=; b=pu/5/ZDwjX3hhL jB/2SZzE4nfeXhLI5nSkva1kGgBA81knjWdQOof8h8SLvVq38R9IAkYSKhB34kznQntdKS9bpXVnA ebiOenJ+7Zy0TkphrKZHo8elZ3Goplw3yWPhIkObkG0A4exh9Ky2VR01+VlOXQUeO1PPhDhNFqJ1x 4z1PqXy0Tq09HV9+lAcMp92PbNBCR6ur+Mr9Tk2NIGmBbmxBoymczMtGtEG9vMZC/yS67VexsvRnt pqltGUd17cCAP5N0uaOCNL/WpkOLKtcbb6zP4umw0kFSe/KmMLr/x5h8aSvSNh5xWbTPp1zyF0CyO DtjyULe2l5RbvWD8lo/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqcz7-00Atdq-BY; Fri, 26 Nov 2021 15:17:57 +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 1mqcys-00AtZ8-0Z; Fri, 26 Nov 2021 15:17:43 +0000 Received: by mail-wr1-x42f.google.com with SMTP id b12so19378267wrh.4; Fri, 26 Nov 2021 07:17:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7632Wp+Dnl5QiuckVe1VavN+ZTk/pekVUAmEmgU5JLo=; b=Bz7mbuRMPID17ZDmYvP0fKpqK4E//J2NOtGDfu3zmArWkioxBedFq9tyeQf7oQt/1L 9dT1+bf6F99+vrxmbEEnfRtlV8sYHzwNZEbGDl+fsytlM4XmbiW8qX3bhF56h04/H7Ow s0rKgYJ+ZbsKZTtpk1geLawQ+rza4ttBfCunJzuvpBBkybBHZOxCjCnBWv6027REcKBL flIG77FUl/fyLy6dxA/Yf44nBiGcAFo+nlXBslHdox3dmH5ZsoVJVnWg258ixJXXPIqo jg08lMRWGQ1Sg9o4fDjpoqo2UVzNZAA1b4II29xWFbQFcyjwm8073ChwCbxPfMq9bFSG OuUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7632Wp+Dnl5QiuckVe1VavN+ZTk/pekVUAmEmgU5JLo=; b=34A4GKqjwDUnZvYgpat1NyiFGKwnEoMK0XdITvrjCsQA7Rjn444pEyGgoRXs1E5GF8 M6LSZjE81fmOTvQiOY2GPhK9WTTu89g3+PFk+yHZtc9aoMp4Y76pxwR6ksDKCG8s2pxH DhQ+GRqypd36Y7IHKQwIZDSrJPv5E//6IPwoSpLT2jq+2/we7qIViMFtq2ZSH1Y/IrPq R4trsTWdpvJNmyctjXv5Y2PJmOAdyxnVxbQmdhPYxDOjoTRjkTg4NbHC77iBiItWthZU 5RPlSy39MbBNO1pcoom78kv03F6eJIlm34C0bVFVZ+DgrYYhM51Fw7KkqFYWjZOfKBDq lv9g== X-Gm-Message-State: AOAM533neQ9NtMYwhvlhMeBbhZkR71pJV2voJ2nQwzVXlJr8y27i6lrh OK4rsj1qHw93Cnl4wr1v2zbguiH7pESu X-Google-Smtp-Source: ABdhPJyPQuWLOtmO9f5rmyG1TcI0nYS+8H+GshbbqOdr8H3ilv4rcJQTDjiQ243aHwGIHBgR+6ypVw== X-Received: by 2002:a5d:480c:: with SMTP id l12mr14996630wrq.518.1637939860158; Fri, 26 Nov 2021 07:17:40 -0800 (PST) Received: from alex-ThinkPad-E480.. (ip5b435a69.dynamic.kabel-deutschland.de. [91.67.90.105]) by smtp.googlemail.com with ESMTPSA id k187sm12323496wme.0.2021.11.26.07.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 07:17:39 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Rob Herring Cc: Ezequiel Garcia , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ezequiel Garcia , Alex Bee Subject: [PATCH 2/4] arm64: dts: rockchip: Add GPU node for rk3568 Date: Fri, 26 Nov 2021 16:17:27 +0100 Message-Id: <20211126151729.1026566-3-knaerzche@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211126151729.1026566-1-knaerzche@gmail.com> References: <20211126151729.1026566-1-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_071742_081158_CF81196B X-CRM114-Status: GOOD ( 11.62 ) 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 From: Ezequiel Garcia Rockchip SoCs RK3566 and RK3568 have a Mali Gondul core which is based on the Bifrost architecture. It has one shader core and two execution engines. Quoting the datasheet: Mali-G52 1-Core-2EE * Support 1600Mpix/s fill rate when 800MHz clock frequency * Support 38.4GLOPs when 800MHz clock frequency Signed-off-by: Ezequiel Garcia Signed-off-by: Alex Bee --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 46d9552f6028..3b314ccd6c94 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -125,6 +125,40 @@ opp-1800000000 { }; }; + gpu_opp_table: opp-table-1 { + compatible = "operating-points-v2"; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <825000>; + }; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <825000>; + }; + + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <825000>; + }; + + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <825000>; + }; + + opp-700000000 { + opp-hz = /bits/ 64 <700000000>; + opp-microvolt = <900000>; + }; + + opp-800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1000000>; + }; + }; + firmware { scmi: scmi { compatible = "arm,scmi-smc"; @@ -386,6 +420,22 @@ power-domain@RK3568_PD_RKVENC { }; }; + gpu: gpu@fde60000 { + compatible = "rockchip,rk3568-mali", "arm,mali-bifrost"; + reg = <0x0 0xfde60000 0x0 0x4000>; + + interrupts = , + , + ; + interrupt-names = "job", "mmu", "gpu"; + clocks = <&scmi_clk 1>, <&cru CLK_GPU>; + clock-names = "core", "bus"; + operating-points-v2 = <&gpu_opp_table>; + #cooling-cells = <2>; + power-domains = <&power RK3568_PD_GPU>; + status = "disabled"; + }; + sdmmc2: mmc@fe000000 { compatible = "rockchip,rk3568-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x0 0xfe000000 0x0 0x4000>; From patchwork Fri Nov 26 15:17:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12693765 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 CD911C433EF for ; Fri, 26 Nov 2021 15:19:38 +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=QVlJDcC6LuZyTzHeXhi14NO6Vekl5pmr/jsGTHdRbic=; b=460rPEJPNdAeO9 LcOa+8EmrUFFytANBRsqsYScqyzlRlhqZjbvWvQJuORA1LqiKOoFeiY47G5+BQenobLroHnbez0LV IUceDTYAmQBk+WpcRUr1dgjY3VwVqKVzIfP8wQYSdGsz8uPRm4EFyOK2VUNkHpoi+n6ko0Ud60K+i USajIisZWCcdT/TdTwsS6c8zqdlJB2vccdvjwDxv4KO3cRrC9b+vb1A5VIccai0I055DSxNRIO+9J NfjsE/Lc9YTCLkDp2pR5ppMCmSEObcMZuG53AIuD1hd1DFsOCiYHSYFursYCucavrcWPvG5ZGV2Jp Gk68Lj0XhF+mVynQ0Qgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqczM-00Atjs-KM; Fri, 26 Nov 2021 15:18:12 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqcys-00AtZM-SQ; Fri, 26 Nov 2021 15:17:44 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 137so8438317wma.1; Fri, 26 Nov 2021 07:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ro5SqmCGondsXlAprqzMwpniqGQJH9OZ58tKVX0KLtE=; b=phTINQX2amsyXW3CSkOyU0ikEKZ1p+s37IA3fythVMHfQIvFhW4vW3he6e9xInurOM 6aRO8GJ2ZIFVZam7U8SoYhDpQAboFoZo14KjkTmB7SOT4VlXJAkYMX6YhjSp1ssg5st5 bQO7i0JHnLFQRGfZoxFaAGWBwf4FDAmZ0fDWOrhEWMddP46l5Ld15yRkQ7pWdHWzwLrR EjKmWvO0/r9AWyU2+o20qZXOIDByWQepheEReIfQQv1Si4kb7h/WKtmMsoaBNaf+ni5p gLpvAwRjMf2yukOs5aP42UkRd5CTgEPBP8htzG2yfv6KtET5bGdlVSswLJYLpz8VtAWm vPAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ro5SqmCGondsXlAprqzMwpniqGQJH9OZ58tKVX0KLtE=; b=R7qu4/lBIUPl+fQUZx3agRsj6dLswDcHTLX1ISbAknp3yMzgZkliaQS3+xwg4MI065 3CDiTd0g2s9us071j2WQOx8vNbsNzqVF2SZHfkWNSFitihPfuLO+3gnq4Dj0sE9FWMru eMbkoFmoZDXYOReZDs3yG6Oh/+VvjStYxTdieRJvMLzlD1ihb0jYyaQEGPRSeeWhOAV9 DM+Ou2yBTZtMTkcwA8o2WnmGqDxYCitdWCNqHSEi0w9We8L709X2lzmefspOU3M/4gSh d2Idz6XS/QCEff42wW87E7Cq/jFCEV+sSCFhPJe/I3l1hXqfmJsmgxTeZAwwDiJts0hX itsQ== X-Gm-Message-State: AOAM533q62HaiAa45R9icPf9PFjefbwZayd3tSTdWkieZ3qv6+4bBFEX LupgInDEAhn8Fjgh1NGwlQ== X-Google-Smtp-Source: ABdhPJyLUFmAZh7GZuQQShSOigym12Jf1vfsK/sn4ByDN84S+7wHs3MocHGrnG4VPil7PieiRBiDig== X-Received: by 2002:a7b:c7cd:: with SMTP id z13mr15928669wmk.172.1637939861058; Fri, 26 Nov 2021 07:17:41 -0800 (PST) Received: from alex-ThinkPad-E480.. (ip5b435a69.dynamic.kabel-deutschland.de. [91.67.90.105]) by smtp.googlemail.com with ESMTPSA id k187sm12323496wme.0.2021.11.26.07.17.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 07:17:40 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Rob Herring Cc: Ezequiel Garcia , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Bee Subject: [PATCH 3/4] arm64: dts: rockchip: Add cooling map / trip points for RK356x' GPU Date: Fri, 26 Nov 2021 16:17:28 +0100 Message-Id: <20211126151729.1026566-4-knaerzche@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211126151729.1026566-1-knaerzche@gmail.com> References: <20211126151729.1026566-1-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_071742_938382_5CB562D6 X-CRM114-Status: GOOD ( 12.49 ) 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 RK356x SoCs have a second thermal sensor for the GPU: This adds the cooling map / trip points for it to make use of it's contribution as a cooling device. Signed-off-by: Alex Bee --- 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 3b314ccd6c94..a67c279c164d 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -960,6 +960,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>; + }; + }; + }; }; From patchwork Fri Nov 26 15:17:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12693766 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 CD582C433EF for ; Fri, 26 Nov 2021 15:19:50 +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=e9lJ2awJbSlnb0gDxeu7ly4XJINA9SRfUzL5y5+r2Aw=; b=KcRu83SSj4Rcx9 z0tajKpP+J0gS+ltIU5p7kUyIAKaSBzuxyFvzSoGy5k2LrMrkIXjZHKMA8SDfrjQAeoh1kvUGr4ij xNw10snmajUzhbchCAK27sH3o+FDUUs3rOVxcbf+zte7Q3XVPZOZELVf+TN7oFp9BO87Vg1uamwm+ xANDgSkPfHFrW/eSm1EbWJioSUZHkdygi5C6Jf5e90f02CK6zL8MVoiBX7u6CY4KODG3wnTKUjbRi KPNv05FlFF8YgpfXdw/4sCZFUSB7MHOq88lMGMxulZeA2e3hVehGnOygaf5JpbspGRTUQOy8UggMO CEvkcrygp2rqWjpr0Ptg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqcza-00AtqE-Eo; Fri, 26 Nov 2021 15:18:26 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqcyt-00AtZd-OM; Fri, 26 Nov 2021 15:17:45 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 77-20020a1c0450000000b0033123de3425so10998561wme.0; Fri, 26 Nov 2021 07:17:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OLdg7HwQbvAV+brizYiBW+l2eqA2RggMeGyT4QmZCLk=; b=CDwmcHb2iG2QOeb1CvlOm9RbdSKzrqFe7BekiXZt4K+vmADjoAvzYV0+4c3zNnx2/7 uKerd3PNgCDQzuOvqVkyOTOEvXhzD8N4Sk1JDfZ0zdnB1tMhWNNpj1XB/3SePak6Muus aBpjWtiYja+nVVEE3XLRhBx9M6EJFvtDafchSTr43ajNdrssGZ6DQMNJYAftwqaReYVX lXNcQ+0mh3mXLzEGiGZxJ7YH70jp/OEprOb7+74pXNNgVqLVNr/Lr/iigSUy1gYsYe5J BaL6+/s9T/cTpXzWjgSgz3oO62EwdmcTGGalhguiFWs5nERNBQ4YSBDw14Qn8LyXoz2q S2oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OLdg7HwQbvAV+brizYiBW+l2eqA2RggMeGyT4QmZCLk=; b=cx1aHhX8WPsqfRcglJN8ySjMihTCJkYW4Y83w0mHO+P0eOIhG3iYorE8R2cRYX124X BI11Fknke2QyRQw/dfvswZ0GKxMEAeSWu5hoQj/o6uRVQfophPKFLocdHqfH6EgYXJWz Stqfgbixg9XEzWFpOr6Fkc4NToMDvdlNfPliJdGeoqezrK4SU7/RYybT6GgwE+CBDK3v CW5E5Ukc0AVqcRu+oKFeAT1zDTP/SUe2D4U4e8CMURRCPzetVN8szsa39btRx0f8YHY9 1TSwZwXawLx4axDBsUU5wkEyvM1IuuH8GZLJLEzLJtZGoVTmlZP3gbt0wwYJuJrfWahv eDTg== X-Gm-Message-State: AOAM533kmyXUhQX4NT61yQV4iizKI05thNZq0MMopdFTQEvHTMgsxYQT HIK1L6CrKmhYElyTQSgVHw== X-Google-Smtp-Source: ABdhPJwU44ffPVjwrN172U8Rre7Cpin6zr+0rXftU1O55iV/+oAQIjFNWHd9iv8RRByAGuzvl1GFTQ== X-Received: by 2002:a1c:4d8:: with SMTP id 207mr16246637wme.23.1637939861901; Fri, 26 Nov 2021 07:17:41 -0800 (PST) Received: from alex-ThinkPad-E480.. (ip5b435a69.dynamic.kabel-deutschland.de. [91.67.90.105]) by smtp.googlemail.com with ESMTPSA id k187sm12323496wme.0.2021.11.26.07.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 07:17:41 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Rob Herring Cc: Ezequiel Garcia , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ezequiel Garcia , Alex Bee Subject: [PATCH 4/4] arm64: dts: rockchip: Enable the GPU on Quartz64 Model A Date: Fri, 26 Nov 2021 16:17:29 +0100 Message-Id: <20211126151729.1026566-5-knaerzche@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211126151729.1026566-1-knaerzche@gmail.com> References: <20211126151729.1026566-1-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_071743_831562_60BDF3E0 X-CRM114-Status: GOOD ( 10.46 ) 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 From: Ezequiel Garcia Enable the GPU core on the Pine64 Quartz64 Model A. Signed-off-by: Ezequiel Garcia Signed-off-by: Alex Bee --- arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts index 4d4b2a301b1a..625489c60622 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts @@ -205,6 +205,11 @@ &gmac1m0_clkinout status = "okay"; }; +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + &i2c0 { status = "okay";