From patchwork Mon Apr 15 21:29:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABl_PORTAY?= X-Patchwork-Id: 10901577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 560011390 for ; Mon, 15 Apr 2019 21:30:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CE82286FE for ; Mon, 15 Apr 2019 21:30:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31143288DA; Mon, 15 Apr 2019 21:30:14 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 4216128806 for ; Mon, 15 Apr 2019 21:30:12 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=QbKq9qVrxejN/StIri22A3RUxDD03pI18AnS96WJEpQ=; b=ePANzdvjUFF7iJ qP1nNAfz0pDQ4UMXkv+QhjvpWZ4Taxm6d5pUnuPuafdRxnua7hwjdJWt4N1qr5E9pX2aeQp/BPzh6 eRmQzY568JMj4HtCvzFm72du4QaEtRmRmDBfchNwvg9TKIJXMxGXD9OCl7ddKfhNQ6pb1YpLNBwbc FOXzDhiIRpl8QodFs6cvG11manB3JYKfLUD+m1F36Q2nGIYhZc5w0A0qScTNmFYOAjBHw73xeVtkl fKgeL2Q1Y2AlPkoUGv32ZwuE1AM1naS2fxfywL68wp1HmBks+GpnR6u8fdRqStNNT61cVosICeb4s nr9p7nNKZP+lAIDNYYQA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG9B2-0006VB-Mq; Mon, 15 Apr 2019 21:30:08 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG9Al-0005gE-JA; Mon, 15 Apr 2019 21:29:53 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gportay) with ESMTPSA id B6103263BB8 From: =?utf-8?q?Ga=C3=ABl_PORTAY?= 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 Subject: [PATCH v4 0/5] Add support for drm/rockchip to dynamically control the DDR frequency. Date: Mon, 15 Apr 2019 17:29:43 -0400 Message-Id: <20190415212948.7736-1-gael.portay@collabora.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_142951_888328_4A74FE8B X-CRM114-Status: GOOD ( 15.18 ) 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: Mark Rutland , =?utf-8?q?Ga=C3=ABl_PORTAY?= Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Dear all, The rk3399 platform has a DFI controller that can monitor DDR load and a DMC driver that talks with the TF-A (Trusted Firmware-A) to dynamically set the DDR frequency with following flow. kernel Trusted Firmware-A (bl31) monitor ddr load | | get_target_rate | | pass rate to TF-A clk_set_rate(ddr) --------------------->run ddr dvs flow | | <------------------------------end ddr dvs flow | | return These patches add support for devfreq to dynamically control the DDR frequency for the gru chromebooks. By default it uses the 'simple_ondemand' governor which can adjust the frequency based on the DDR load. Waiting for your feedback. Best regards, Gaël Note: The RFC and the first patchset contained three patches to sync the DDR frequency change within the vblank. These patches was removed. Changes in v4: - [PATCH v3 1/5] Add Acked-by: MyungJoo Ham . - [PATCH v3 2/5] Add Acked-by: MyungJoo Ham . - [PATCH v3 3/5] Add Acked-by: MyungJoo Ham . - [PATCH v3 4/5] Remove board related DDR settings (moved to 5/5). - [PATCH v3 5/5] Add board related DDR settings (moved from 5/5). Changes in v3: - [PATCH v2 1/5] Add Signed-off-by: Gaël PORTAY . - [PATCH v2 2/5] Add Signed-off-by: Gaël PORTAY . - [PATCH v2 3/5] Add Signed-off-by: Gaël PORTAY . Remove comments. Move pmu dt parsing after dt-parsing of timings to fix data->odt_dis_freq value. - [PATCH v2 5/5] Remove display_subsystem nodes. Changes in v2: - [PATCH 1/8] Really add Acked-by: Chanwoo Choi . - [PATCH 4/8] Removed from patchset. - [PATCH 5/8] Removed from patchset. - [PATCH 6/8] Removed from patchset. - [PATCH 7/8] Reword the commit message to reflect the removal of rk3390-dram-default-timing.dts in v1. - [PATCH 8/8] Move center-supply attribute of dmc node in file rk3399-gru-chromebook.dtsi (where ppvar_centerlogic is defined). Changes in v1: - [RFC 1/10] Add Acked-by: Chanwoo Choi - [RFC 1/10] s/Generic/General/ (Robin Murphy) - [RFC 2/10] Add reviewed and acked tags from Chanwoo Choi and Rob Herring - [RFC 3/10] Add an explanation for platform SIP calls. - [RFC 3/10] Change if statement for a switch. - [RFC 3/10] Rename ddr_flag to odt_enable to be more clear. - [RFC 4/10] Removed from the series. I did not found a use case where not holding the mutex causes the issue. - [RFC 7/10] Removed from the series. I did not found a use case where this matters. - [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 Enric Balletbo i Serra (3): devfreq: rockchip-dfi: Move GRF definitions to a common place. dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle. devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A. Lin Huang (2): arm64: dts: rk3399: Add dfi and dmc nodes. arm64: dts: rockchip: Enable dmc and dfi nodes on gru. .../bindings/devfreq/rk3399_dmc.txt | 2 + .../dts/rockchip/rk3399-gru-chromebook.dtsi | 4 + arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 46 ++++++++++++ .../boot/dts/rockchip/rk3399-op1-opp.dtsi | 29 ++++++++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 19 +++++ drivers/devfreq/event/rockchip-dfi.c | 23 ++---- drivers/devfreq/rk3399_dmc.c | 71 +++++++++++++++++- include/dt-bindings/power/rk3399-dram.h | 73 +++++++++++++++++++ include/soc/rockchip/rk3399_grf.h | 21 ++++++ include/soc/rockchip/rockchip_sip.h | 1 + 10 files changed, 272 insertions(+), 17 deletions(-) create mode 100644 include/dt-bindings/power/rk3399-dram.h create mode 100644 include/soc/rockchip/rk3399_grf.h