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: 12640971 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 F3645C433EF for ; Fri, 26 Nov 2021 15:18:42 +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=tRGGw0jfbyHLBtgHwyWyrxNj/zOF9xLdBLRuCvBYmEA=; b=2Qs13Cs0ewOy/l L7n+e0Fo+zZ3Hh3Km6uOxn8oWyTqIaMM8ZXgmmvzRxHUb5OPnlX22JzMT2caTSPpVjaUhhUnJTA7U ilw5ex/Vx+uLnedYPGE+t0gnE84gBoblU4fWSSofwVh0kp2C+X8CAAcHprW6Jo0xq722Ull3N2oQv J1aLd5PY9BOwinbweQJG5LPQWd6MbCbyALdqip7Dg3jQ+oPgOGit3bRoXMB8qgosD7sHO4yHknBq0 +/SJIF04TEjUwdQWYuM46MAXMmZjqFk+iBINfvboAZjVF4qPjKR42GSFqIQ1JOaaUYL/JmzsGNsl3 p5FS2zSYUefYFKn71KeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqczn-00Atxd-Ub; Fri, 26 Nov 2021 15:18:39 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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: 12640961 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 748B5C433F5 for ; Fri, 26 Nov 2021 15:17:59 +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=OKzFw76Taii7YSRY3fzgv72nHdB+pBm4LFLm5fskRMo=; b=EP/KBMlXxmimbU TsWkjfq/J6qXtPyfWsC/tlKuiE9wwwlErVOpjq4jQxieiE7SAIXvfrBxu68d6FneWWIWG3RApRl/m 6Gd4OhuXLpvN2ZqSleTLQKPYHW7Ol8VDExtvPkuZ5ta855bqt9JOzGxCG3TOVqUB+5ycDjwxEggRF 408LyA3zgV28Vk2nHUSt52h/h50YfsqOO2UlQCMqrf7mzJsiU+2AyI0sutvH6ASxLVdkRkvCNPB/H TF1rYy88W3FfsSK9imYGzku4V6SpzSyM7yhdOC0ye6zI3J+lmiR4gxlSBtRCSbMmQAY/x5r5+M+9A is6c4b0pjkxGcB0rWttQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqcz5-00Atdc-Nl; Fri, 26 Nov 2021 15:17:55 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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: 12640963 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 26B6CC433FE for ; Fri, 26 Nov 2021 15:18:13 +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=s7KfM9tkloN548JJ+MOPCAWfO3DH3+qF6rzaxzlquxw=; b=VP+Alkbk3iLF/y e9y+YegprOnYFUboAFT2seDmQJSK9inwC9zKABu5UvX2I9m7X9UCov8MM0475/yT2rmMrFrb4nyq3 Hue5yuir1O8sscDvwU+2v45PZHGua/dtgN57paZOFdejRPu6rC5LVB8W3519maJGPDubpuu8WFSAK hiurTJbCvYcOk0HGAHFZ54jidvEe4QieSxyp7MXZ7ep7hvh6WfXqqNAnXwnRmPAaKiEwU8eIkZS3K ewPCJxkZCyKLssz9xhdsQWZWq3hzfpvm/nHNMxUyAsRHOVjPZL3q25WN5mIRnB92JSddq7lzqBOhD YXu66jtQw9r60HCEZLDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqczJ-00Atj9-MZ; Fri, 26 Nov 2021 15:18:09 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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: 12640965 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 4E2E9C433EF for ; Fri, 26 Nov 2021 15:18:29 +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=Spu1B2P8SjDWdsV6QiJ/VMNVRuBBCIA0lpCc7Uvpo9M=; b=sTSdEu96pOt27x j7cYqeB7u+zbLs6qflHkNbbhfgkq6vyb1VTAVO/NuJtme9eJWzZv3+evAvEAeK4ntm8aBU/uQxbEX mLKNMwf0FPOKd1u5ZZy3lCpzeq8TmLrcmDyESxcMtXhkjDWFU6uYt5gnoUCyymnpGcWZGend/6otD fZh2hgVc+kCe4OkGdJZiDZijBsty1MG5DGu7rknP+GpN/8EMzal9CUtPhVZUy1w24B50HkzyKX83u GScztXVV6CSxXAb4KbdUBUngWP7f/MNFLxnM6IHVJTfD7hSP5LiHwl/No0c1yaUYyl4m8nt9pP5Bi 7ZuUoWo5ptODeaG48MsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqczY-00Atpu-JN; Fri, 26 Nov 2021 15:18:24 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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";