Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp728936ybb; Thu, 28 Mar 2019 11:01:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqk7/IuX8AYmu7yGXJspoVCvz5sbD0sTsOWoD0ySUuhfhnsK1Nt2KXln4cFdmOrY+Xex8t X-Received: by 2002:a63:7444:: with SMTP id e4mr22871060pgn.261.1553796063365; Thu, 28 Mar 2019 11:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553796063; cv=none; d=google.com; s=arc-20160816; b=hciVfHOD0v5rMpYFiBhdp1j2nXbU5rDPONFj3EIxlo+tOtNvToxwz5LrssiDYG8X6p yCVI7RjBvMHC3kuO/jHQ/l4ZULQ/Ip5F/MAJZHBXEyvSoHV57RlpeMtFngAtreGR66bE s5XKWl9VfNu4nQt9ejeBf8/D2fgnJ9oqf2/TCKkXWOLTYMwR2PqE1rQy+Tc2Pcwbh653 BgagqqFcVULHxOiAnxmjCuhDK6/Pvj0OVVLqcMX1l67R9HXi1AunVVF544CBjs6HWHR8 VKAoWsp09ZsMggTQJkOmq0VINtGiVAsZA/oNnTdFBMfi3pj0l9J+ZP+ZnftP/mZR1uWH Na2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=xQNxxs+ysHE81A+umKaN1DTeFmXockFMUA8sFOkGQXk=; b=a/06iHf+CqHbx0zgcWhWL5cKhH9FFbuQATD0VhthV8Oru9Aqv/KnfDD/EmrwlLuyis el5BKjAtyC4qULQaYCTEt4kgb8wPj1KM0R/FNyVi6Ifn2DnhwYuOjjg6bxCCtD4bSyU5 T+nWd5nAZtXyE8H6KHRLxaVKapwVOBFHEpO9EHoPbRnIkbHBliQlgFYeHpeBoPv5up+i An81zOsslNH8AVX91BdSsuwP201ruMW6q8Vw1eo0uATLGqCVODORNygy0jNcvP678/Qw wwMG/F2OX9bpcjnwGL3l4NWQ5WKYzMiJ3ryYbMN2I2zAb+o3Zc85Ohc6Eq8mGxiSztSK UqpA== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f131si22104761pfc.92.2019.03.28.11.00.45; Thu, 28 Mar 2019 11:01:03 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbfC1R7z (ORCPT + 99 others); Thu, 28 Mar 2019 13:59:55 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:34686 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbfC1R7z (ORCPT ); Thu, 28 Mar 2019 13:59:55 -0400 Received: by mail-ot1-f68.google.com with SMTP id k21so17835763otf.1; Thu, 28 Mar 2019 10:59:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xQNxxs+ysHE81A+umKaN1DTeFmXockFMUA8sFOkGQXk=; b=EmM1Gpjnh/CnI3BA+RtcaYWBYjjBUYtReVXt9FGWTmFvT4qyhKJY4Zfke6e2MgLsuB cHUNoH3F35hailkwmG4UYgwB406GX47t44GOn9loTIWbtPR+ZSPL9jc04elpDRq956lH xhxzzB3lyhL6O3ZFcO4pyKJv/YNEr7/pAHs5af4GrQzNiwaOAtqKHbz75TKGtbFr3VlE yUHHYD2FTO1uNxFV0nS/UXRfvn5WCB1Z7zbUaghc0yFz5+PVpo6lg+hG5omHYa0w7QQT FfuAKiJ59ewoD7Oym+WTk5nR3AVnrRyfLvxDtUYYE19L+rEXNRWA3jgFm+v62YS8pw66 H4Dw== X-Gm-Message-State: APjAAAXTKkMbK4IA0XiGGrHV0eIutLlckzk7DHQ/daoTCbSHv333GXy9 tRfsPNVG+zakjpvVFqRdXg== X-Received: by 2002:a9d:6393:: with SMTP id w19mr27941797otk.257.1553795993863; Thu, 28 Mar 2019 10:59:53 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id r67sm10236656oib.18.2019.03.28.10.59.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Mar 2019 10:59:52 -0700 (PDT) Date: Thu, 28 Mar 2019 12:59:52 -0500 From: Rob Herring To: =?iso-8859-1?Q?Ga=EBl?= PORTAY Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , 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, Mark Rutland Subject: Re: [PATCH v3 4/5] arm64: dts: rk3399: Add dfi and dmc nodes. Message-ID: <20190328175952.GA21288@bogus> References: <20190321231440.19031-1-gael.portay@collabora.com> <20190321231440.19031-5-gael.portay@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190321231440.19031-5-gael.portay@collabora.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 21, 2019 at 07:14:39PM -0400, Ga?l PORTAY wrote: > From: Lin Huang > > These are required to support DDR DVFS on rk3399 platform. The patch also > introduces a new file with default DRAM settings. > > Signed-off-by: Lin Huang > Signed-off-by: Enric Balletbo i Serra > Signed-off-by: Ga?l PORTAY > --- > > Changes in v3: None > > Changes in v2: > - [PATCH 7/8] Reword the commit message to reflect the removal of > rk3390-dram-default-timing.dts in v1. > > Changes in v1: > - [RFC 8/10] Move rk3399-dram.h to dt-includes. > - [RFC 8/10] Put sdram default values under the dmc node. > - [RFC 8/10] Removed rk3399-dram-default-timing.dts > > .../boot/dts/rockchip/rk3399-op1-opp.dtsi | 29 ++++++++ > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 49 +++++++++++++ > include/dt-bindings/power/rk3399-dram.h | 73 +++++++++++++++++++ > 3 files changed, 151 insertions(+) > create mode 100644 include/dt-bindings/power/rk3399-dram.h > > 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>; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > index db9d948c0b03..8fe86a3e7658 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -1885,6 +1886,54 @@ > status = "disabled"; > }; > > + dfi: dfi@ff630000 { > + reg = <0x00 0xff630000 0x00 0x4000>; > + compatible = "rockchip,rk3399-dfi"; > + rockchip,pmu = <&pmugrf>; > + interrupts = ; > + clocks = <&cru PCLK_DDR_MON>; > + clock-names = "pclk_ddr_mon"; > + status = "disabled"; > + }; > + > + dmc: dmc { > + compatible = "rockchip,rk3399-dmc"; > + rockchip,pmu = <&pmugrf>; > + devfreq-events = <&dfi>; > + clocks = <&cru SCLK_DDRC>; > + clock-names = "dmc_clk"; > + status = "disabled"; > + 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 = ; > + rockchip,ddr3_odt = ; > + rockchip,phy_ddr3_ca_drv = ; > + rockchip,phy_ddr3_dq_drv = ; > + rockchip,phy_ddr3_odt = ; > + rockchip,lpddr3_odt_dis_freq = <333000000>; > + rockchip,lpddr3_drv = ; > + rockchip,lpddr3_odt = ; > + rockchip,phy_lpddr3_ca_drv = ; > + rockchip,phy_lpddr3_dq_drv = ; > + rockchip,phy_lpddr3_odt = ; > + rockchip,lpddr4_odt_dis_freq = <333000000>; > + rockchip,lpddr4_drv = ; > + rockchip,lpddr4_dq_odt = ; > + rockchip,lpddr4_ca_odt = ; > + rockchip,phy_lpddr4_ca_drv = ; > + rockchip,phy_lpddr4_ck_cs_drv = ; > + rockchip,phy_lpddr4_dq_drv = ; > + rockchip,phy_lpddr4_odt = ; These settings aren't board specific? Rob