From patchwork Wed Jul 12 06:29:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 9835939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 683E3602BD for ; Wed, 12 Jul 2017 06:30:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55D7F285A1 for ; Wed, 12 Jul 2017 06:30:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A6D4285E7; Wed, 12 Jul 2017 06:30:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B8E35285A1 for ; Wed, 12 Jul 2017 06:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lmh90lAldytGhZyYoNrY1JcivlQWv428LL9eaxTsq0k=; b=Sxvu08Pz8y8nKCewe6mdt6HiFZ ldaSuX2L4o/hkLxqKqUvEI8mdVBMRqv6Wkpx7YpzIV4i8VaM5A16k6pYOQwA6qF697EoC8fRwwm7J NCwK1obKauQOoqD96dcwLMr7j9s1GOPR31s3O4PX5wXnAS0Z9b9zaoHPmcLn7Yr3CCMMBqK8ElzZv HVEF55OXChjhq7iK4a1a4h3911u2suEON2bz5qzReYOwis97Xh69L8ttT5sO71khdrxcmgRnb7DHv /29RX1P6HYlSz9o3A2JRljkimFCOGPJDl+QMBWvXhMRze0vESAdQUvzmnusINcC5fvHxz8VdfNZf0 /1SueHbA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dVBAP-0005Po-2J; Wed, 12 Jul 2017 06:30:33 +0000 Received: from mail-pg0-f66.google.com ([74.125.83.66]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dVBAE-0003yC-Px; Wed, 12 Jul 2017 06:30:25 +0000 Received: by mail-pg0-f66.google.com with SMTP id u62so1847479pgb.0; Tue, 11 Jul 2017 23:30:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4i6SfXTmgb0b4A8+Dwaw0yHLBsQhEQaSgQipP26qsXI=; b=oDx/yzU8kcZuVtRm4KhKAjhTD9WClW3SnRVSSaJ0tZWcRQ20uavzwGyQv+J2RFxcxv I2cWE4E3IOnf9cGjBBgi7PkuxV8Lj/U0l1sbYkcWHr99g3adGOYRxleWQxK2XxFj9OLC KB5pQXKrwQrDefgYWzB5Eyb0r3aYLr4H9Kx6Qv/Cz0oHr28FORE3kifz7rjOWu5nnyYK YK12QSOQKTi1gRuYRNFtppuC41bjIumrsDS/55D0oJ57QSczf+FFf76HNlzG1KxlDJMA PpxSH4rjCQTOPe/OiDooJhEIM2hby751rvCYkaEvCBE1cF8mhWJDToAwoKjEkU1NIdsu 0A9w== X-Gm-Message-State: AIVw112Iu/MmkTjmH3iFQFkiAfNsOiMBWtYm7fh6q3ssUh83i9XGjPrG q/uNIGxVUW0hVNe7 X-Received: by 10.84.139.36 with SMTP id 33mr2519852plq.20.1499841001785; Tue, 11 Jul 2017 23:30:01 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id b8sm2623839pfd.65.2017.07.11.23.29.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 23:30:01 -0700 (PDT) From: Caesar Wang To: Heiko Stuebner Subject: [PATCH 2/4] arm64: dts: rockchip: add ARM Mali GPU node for RK3399 SoCs Date: Wed, 12 Jul 2017 14:29:28 +0800 Message-Id: <1499840971-20392-3-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499840971-20392-1-git-send-email-wxt@rock-chips.com> References: <1499840971-20392-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170711_233022_893132_2D45DEC5 X-CRM114-Status: UNSURE ( 8.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Douglas Anderson , devicetree@vger.kernel.org, Brian Norris , Catalin Marinas , Shawn Lin , Elaine Zhang , Will Deacon , Kever Yang , Mark Rutland , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Rob Herring , Roger Chen , William wu , rocky.hao@rock-chips.com, linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add Mali GPU device tree node for the RK3399 SoCs, with devfreq opp table. RK3399 and RK3399-OP1 SoCs have a different recommendation table with gpu opp. As the ARM's mali driver found on https://developer.arm.com/products/software/mali-drivers/midgard-kernel. Signed-off-by: Caesar Wang --- arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 33 ++++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 16 ++++++++++++ 3 files changed, 82 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi index be7fe63..d8a120f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi @@ -118,6 +118,35 @@ opp-microvolt = <1250000>; }; }; + + gpu_opp_table: opp-table2 { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <800000>; + }; + opp01 { + opp-hz = /bits/ 64 <297000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <825000>; + }; + opp03 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <850000>; + }; + opp04 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <925000>; + }; + opp05 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1075000>; + }; + }; }; &cpu_l0 { @@ -143,3 +172,7 @@ &cpu_b1 { operating-points-v2 = <&cluster1_opp>; }; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi index c83460d..81617bc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi @@ -110,6 +110,35 @@ opp-microvolt = <1200000>; }; }; + + gpu_opp_table: opp-table2 { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <800000>; + }; + opp01 { + opp-hz = /bits/ 64 <297000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <825000>; + }; + opp03 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <875000>; + }; + opp04 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <925000>; + }; + opp05 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1100000>; + }; + }; }; &cpu_l0 { @@ -135,3 +164,7 @@ &cpu_b1 { operating-points-v2 = <&cluster1_opp>; }; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 1cbd7a2..8c6438b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -1443,6 +1443,22 @@ status = "disabled"; }; + gpu: gpu@ff9a0000 { + compatible = "arm,rk3399-mali", + "arm,malit860", + "arm,malit86x", + "arm,malit8xx"; + reg = <0x0 0xff9a0000 0x0 0x10000>; + interrupts = , + , + ; + interrupt-names = "GPU", "JOB", "MMU"; + clocks = <&cru ACLK_GPU>; + clock-names = "clk_mali"; + power-domains = <&power RK3399_PD_GPU>; + status = "disabled"; + }; + pinctrl: pinctrl { compatible = "rockchip,rk3399-pinctrl"; rockchip,grf = <&grf>;