From patchwork Mon Mar 8 23:38:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 395517 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2131083jai; Mon, 8 Mar 2021 15:41:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2gUsmlwbCjqCZb5tzEBIgmnfHIC8YYtQd4UtUnFWfZcbkkNzeVY7oBay2nzxdSQ3GT7mJ X-Received: by 2002:a50:9d0b:: with SMTP id v11mr1022687ede.308.1615246904088; Mon, 08 Mar 2021 15:41:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615246904; cv=none; d=google.com; s=arc-20160816; b=YJdZyoY7HiQ6Zmh5GO2pGLRrMNZb8d8lxxnGK/dgU4pi3NJC65k/MvnLUSB65PgwUG J0EX9FOJv0Q6ahRb0iJXMFp0y1AzQB/unRL8PUa+SyWKGhSwhaZC1bdYrj5K0LaAS8Qc EupD+xDjaXVj8wmks4Pwea+P2a9ctJ37FMQTVwylj9hhTeDIVlZ7q0bnHR40CkF6QUOB n1ux/8QFCE8whW2r/yv9o7b5NbHwAAStMhlGnhZoMuncaDVQiFnwsB/wuN4J0p4ROxsr HfvF5JL0Biy5USBNUdg7qoh4gsf6bnhDrSWV0hAFYFhyGEVlNJ2WUe9L18m9kfKSZsyz ut5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uZSiFVg2/jE/hYgherndxXMvyjYS/mnvO0aiBAtVcTY=; b=pHgACNS2IeFBm1EjTt8KtQKI9tpabB78gwjSgYVyFq4kJWh+jvkgAPedDTlBQZsYS1 THdVLm5r+3o5vFnRkBh802PY3NIr0QOeVsH4pIxpOTpDFxHnLjwsUxJCmImzKx//xihf cmTc8betrRjzMFcYn8+CTqVeOxro76fddYUeSxSh+91krOmagE52ICDbwmRcE3QBEXPh u2nbiMaGdCjDtXV1PMJeyysxzSCoHtMMIUJJu8GdT3KlJYejn0gnmgAxa9180Gn++n8Z +yf+05h3vyhBS9fZmi5V8qtfSXEi+MKHYIdlNTTg4eXiBsTGuJyFUsKHbWwI8cuHlzlh I25Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P8IUb56a; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw1si8409660edb.412.2021.03.08.15.41.43; Mon, 08 Mar 2021 15:41:44 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P8IUb56a; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbhCHXk5 (ORCPT + 6 others); Mon, 8 Mar 2021 18:40:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbhCHXk0 (ORCPT ); Mon, 8 Mar 2021 18:40:26 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 540AAC06174A for ; Mon, 8 Mar 2021 15:39:36 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id w11so13252434wrr.10 for ; Mon, 08 Mar 2021 15:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uZSiFVg2/jE/hYgherndxXMvyjYS/mnvO0aiBAtVcTY=; b=P8IUb56aHvxNiBcR/CB2PDATcfaksqV1COHeci+/1rPLmnHVhC6/J6dmga1ype2kPD y5nO+fZRT+Q01YyfV6dVWpjcTV11S8AEgt0Dxv8iLETo3Qpqiyr7cMzYyVbhV3edes7D Ntt0UFi0vz8SeHE5hMwsYOeNeHeWcAoXpk5ZKt46Bo+ktVq3Y9izfK5uUe+7S0+v7eFu 9vMfA4eKgd0IEn1yEIgXRwddhbs780bpdI0xhI9olt3COY4rJ0giRYZnnW49jp8BdNjI gs2xNiv25fwG+FW6Ga3uwnMrTvMZUtYDa7uxqloKRC4t9A2Xs2ip5AqCtbPITWTov4pQ T6jg== 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:mime-version:content-transfer-encoding; bh=uZSiFVg2/jE/hYgherndxXMvyjYS/mnvO0aiBAtVcTY=; b=JE75cNmJJtzWaCAMRlVj4wSMG4USnvSoqIfwW0BlJYdS6CY8U6O56fStdBKIiZt6T2 t6OBkiU9hZ2WnQege+bakaZ7vztx1Ggq/CJpHJe4hhZszsnrFnPvvEL9i0dNyF7msaJF CaYWV1OHlsqDF1c12sbXTOsHxltKeEotg95auco43Qcz0173HpzhzuCugCuHKwhzhet8 1xONre3f2EVkPLY/lbEOXH3RaimuAQGxbt4ptbUR6iYMxX6TQSs7HCrJK8EJa3T+1su+ lV9yKSsSvTWDe+aNzAhocsJmqK2Bt0KiHBuFGUQvLP/fF60pp93+Hu7r5m0jsz5qigTw h5Kw== X-Gm-Message-State: AOAM5333w8SG7jZO3/so+GJ4hinExNDYwt9mCrCtk6KO0IBcnK1mrEin U2LwNzu+McvE1YS5ZAOMktJ7Gw== X-Received: by 2002:adf:b642:: with SMTP id i2mr2594471wre.8.1615246772633; Mon, 08 Mar 2021 15:39:32 -0800 (PST) Received: from localhost.localdomain (lns-bzn-59-82-252-141-80.adsl.proxad.net. [82.252.141.80]) by smtp.gmail.com with ESMTPSA id b186sm1145408wmc.44.2021.03.08.15.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 15:39:32 -0800 (PST) From: Daniel Lezcano To: heiko@sntech.de Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Lin Huang , Enric Balletbo i Serra , =?utf-8?q?Ga=C3=ABl_PORTAY?= , Rob Herring , Johan Jonker , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [RESEND PATCH v5 3/4] arm64: dts: rockchip: Enable dmc and dfi nodes on gru. Date: Tue, 9 Mar 2021 00:38:57 +0100 Message-Id: <20210308233858.24741-3-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210308233858.24741-1-daniel.lezcano@linaro.org> References: <20210308233858.24741-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Signed-off-by: Daniel Lezcano --- .../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(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi index 1384dabbdf40..d32b015ad2cd 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi @@ -398,3 +398,7 @@ ap_i2c_tp: &i2c5 { rockchip,pins = <0 RK_PB0 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 32dcaf210085..fc3dc9a4b43c 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>; +};