Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7502969yba; Thu, 2 May 2019 10:59:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzu0hwqgCp7in2a74U7rRY1Ntw50iPbmGFnNjidEKYWLt59/4NwfTCNaXmemQoqPgFVHS5f X-Received: by 2002:a63:d816:: with SMTP id b22mr5244102pgh.349.1556819999574; Thu, 02 May 2019 10:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556819999; cv=none; d=google.com; s=arc-20160816; b=rkxJJYmcVpjBhYAgB3F8cYWWO6mYADI+W5rvzWbbzbxw9MBcj6xhhngV8noYx6cqzW iLAJb4TT7cX93/RLTYPoPJc6G2CvAfy1Ws2KsY0oD3ngqMfzHCxtH4BYjCqgpz5xvuF9 iEhp059wT+B28CVSi+1q7TRnaTJOljKIkpI7ZoWGALp5Dx1MqJ1xv3/tAQ8yWJt5tIQO EOvHFvSn+9Nxxjjamo/73aQRzUOIyeXtNE/bnuH+LInxhI7RDnBjWkn8Dbff/5eQc+Nl Nl1ArYyrAQ85+mBe/jtQY+Zgr4am1Jc3HJGlH7XYwnDbG7zgQAnsiqUuiM/H8RIYUkY3 rVCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=N+XIZXfzGQnQ+py6j6qm0iDyT5eAikfXBLn4Gyazm5M=; b=OzqDZCRfUfqo+I+Zro7mZ8qJC7hNF4VC7lg9BxqTiBJzpbM6hQV/CmTMOm12zKYedY KfNKegLNw9l25xRGxiHPX/KHungngM/kJzFkdUEJyVn4P9uCB/3DGCYVlWnWhJPYRHhe bdyziVKSkKDswi/HUqdf3e7/rso7I6yDd3Rc+vDh2p3hXh9pSu3v5kPQFcs15q9Wuyj6 3SLTvg0lorzCM2jWr0kYzu5QeyfkbqYcnVgOiMsuvnHof3nGvx3WHChtFl6A+MCRJNvs +uJ2kwTJ84J9xz1D2l405BX9PSI5xdhKcNPChX2lz8dYNTPmAP1dSrE8lQ0uTHAirGRA aYAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d126si3906734pfc.125.2019.05.02.10.59.44; Thu, 02 May 2019 10:59:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726521AbfEBR6d (ORCPT + 99 others); Thu, 2 May 2019 13:58:33 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:41904 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfEBR6c (ORCPT ); Thu, 2 May 2019 13:58:32 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gportay) with ESMTPSA id 7C0FA2834A8 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= To: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Rob Herring , Heiko Stuebner , Enric Balletbo i Serra , Lin Huang , Brian Norris , Douglas Anderson , Klaus Goger , Derek Basehore , Randy Li , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Cc: Mark Rutland , kernel@collabora.com, =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Subject: [PATCH v5 5/6] arm64: dts: rockchip: Enable dmc and dfi nodes on gru. Date: Thu, 2 May 2019 13:58:19 -0400 Message-Id: <20190502175820.25382-6-gael.portay@collabora.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502175820.25382-1-gael.portay@collabora.com> References: <20190502175820.25382-1-gael.portay@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lin Huang Enable the DMC (Dynamic Memory Controller) and the DFI (DDR PHY Interface) nodes on gru boards so we can support DDR DVFS. Signed-off-by: Lin Huang Signed-off-by: Enric Balletbo i Serra Signed-off-by: Gaƫl PORTAY --- Changes in v5: - [PATCH v4 5/5] Remove use of DRAM setting defines. Remove new DRAM setting header. Changes in v4: - [PATCH v3 5/5] Add board related DDR settings (moved from 4/5). Changes in v3: - [PATCH v2 5/5] Remove display_subsystem nodes. Changes in v2: - [PATCH 8/8] Move center-supply attribute of dmc node in file rk3399-gru-chromebook.dtsi (where ppvar_centerlogic is defined). Changes in v1: None .../dts/rockchip/rk3399-gru-chromebook.dtsi | 4 ++ arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 45 +++++++++++++++++++ .../boot/dts/rockchip/rk3399-op1-opp.dtsi | 29 ++++++++++++ 3 files changed, 78 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi index 931640e9aed4..cfb81356c61e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi @@ -400,3 +400,7 @@ ap_i2c_tp: &i2c5 { rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + +&dmc { + center-supply = <&ppvar_centerlogic>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi index da03fa9c5662..f3ff3dd689c7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi @@ -289,6 +289,12 @@ status = "okay"; }; +&dmc_opp_table { + opp04 { + opp-suspend; + }; +}; + /* * Set some suspend operating points to avoid OVP in suspend * @@ -489,6 +495,45 @@ ap_i2c_audio: &i2c8 { status = "okay"; }; +&dfi { + status = "okay"; +}; + +&dmc { + status = "okay"; + upthreshold = <25>; + downdifferential = <15>; + rockchip,ddr3_speed_bin = <21>; + rockchip,pd_idle = <0x40>; + rockchip,sr_idle = <0x2>; + rockchip,sr_mc_gate_idle = <0x3>; + rockchip,srpd_lite_idle = <0x4>; + rockchip,standby_idle = <0x2000>; + rockchip,dram_dll_dis_freq = <300000000>; + rockchip,phy_dll_dis_freq = <125000000>; + rockchip,auto_pd_dis_freq = <666000000>; + rockchip,ddr3_odt_dis_freq = <333000000>; + rockchip,ddr3_drv = <40>; + rockchip,ddr3_odt = <120>; + rockchip,phy_ddr3_ca_drv = <40>; + rockchip,phy_ddr3_dq_drv = <40>; + rockchip,phy_ddr3_odt = <240>; + rockchip,lpddr3_odt_dis_freq = <333000000>; + rockchip,lpddr3_drv = <34>; + rockchip,lpddr3_odt = <240>; + rockchip,phy_lpddr3_ca_drv = <40>; + rockchip,phy_lpddr3_dq_drv = <40>; + rockchip,phy_lpddr3_odt = <240>; + rockchip,lpddr4_odt_dis_freq = <333000000>; + rockchip,lpddr4_drv = <60>; + rockchip,lpddr4_dq_odt = <40>; + rockchip,lpddr4_ca_odt = <40>; + rockchip,phy_lpddr4_ca_drv = <40>; + rockchip,phy_lpddr4_ck_cs_drv = <80>; + rockchip,phy_lpddr4_dq_drv = <80>; + rockchip,phy_lpddr4_odt = <60>; +}; + &sdhci { /* * Signal integrity isn't great at 200 MHz and 150 MHz (DDR) gives the diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi index 69cc9b05baa5..c9e7032b01a8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi @@ -110,6 +110,31 @@ opp-microvolt = <1075000>; }; }; + + dmc_opp_table: dmc_opp_table { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <900000>; + }; + opp01 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <900000>; + }; + opp02 { + opp-hz = /bits/ 64 <666000000>; + opp-microvolt = <900000>; + }; + opp03 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <900000>; + }; + opp04 { + opp-hz = /bits/ 64 <928000000>; + opp-microvolt = <900000>; + }; + }; }; &cpu_l0 { @@ -139,3 +164,7 @@ &gpu { operating-points-v2 = <&gpu_opp_table>; }; + +&dmc { + operating-points-v2 = <&dmc_opp_table>; +}; -- 2.21.0