Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9721924ybi; Wed, 24 Jul 2019 08:51:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaDra6hyiejaU5pkAbUxZwwv2I41FmE0B7VA6WngliTQON7veHmSYP16pTjtRbgKGQDRD1 X-Received: by 2002:a17:90a:d593:: with SMTP id v19mr88344643pju.1.1563983497163; Wed, 24 Jul 2019 08:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563983497; cv=none; d=google.com; s=arc-20160816; b=Ahs/vJ2NGLffs+doibMyTYhqmCfllGgOajI1Kr2+1sn/DLctfy5Rq63S4JbXq4+BU2 wypDWjxtLc7+sYSjqxxzb/PZ9Rni2Bx4TvfAyoFksphooQbfW6j5ibjDvUGqAguGS+cF tdYgXU6vHpsM0PGFixSFBuHrYz6+h4Nfq//79OQLPvmMrwkXbvY0lXzI/ZDcpHgkSfs3 RLAXtCh8kpeBwFcyw3L3pjUblxUWPVspyzDJ+X7lyPCsKxH6ue771Wfm417vfdq4JW1f qMrBRV+pCsVA4bEOcOxgkdzJVeEFiB20lH14/FKCRWtqHsa+Bp3QHmNYM0OqlYZeMi0O DVkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=2lijtgqECRrE8fz4BzfZOtQQ1aL/lRWyD0ZWUtFJHvY=; b=o2kztknGCdydeEcN1KNGRY1iZ+lSoCqgqjxZfA0+m3ebCGoFkS8dmo862peFFKyx/Y zfpjRfWRkUex+VEUunxQkOm9cmPLPA/aiG3O35tuLTrU3iIXKYmRc1UcnEetlHRIiWZM XMiIKlzB0Yi/tcclpGrSI+Ovq9bJyipjnav36kG2F4ZfrTYCGPv0g0ejRbreD8tQHQef 28Zh8XOl1lVXAQjF6cb29/UlKF4lDuHacgwsjlO8C17h+YGsunbliNkuvqeWEuSQjlK8 kv6/qKS4sFQqlo2b1k7KkAcFBtkO2JxV6NvWM3aWY6b9qTI0ZpLpBE0+221afP65Iku+ I+TQ== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si15244206plk.342.2019.07.24.08.51.22; Wed, 24 Jul 2019 08:51:37 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726659AbfGXMiw (ORCPT + 99 others); Wed, 24 Jul 2019 08:38:52 -0400 Received: from inva020.nxp.com ([92.121.34.13]:51490 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725826AbfGXMiw (ORCPT ); Wed, 24 Jul 2019 08:38:52 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3BC6D1A01FD; Wed, 24 Jul 2019 14:38:51 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2D2CB1A0148; Wed, 24 Jul 2019 14:38:51 +0200 (CEST) Received: from fsr-ub1864-112.ea.freescale.net (fsr-ub1864-112.ea.freescale.net [10.171.82.98]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id ED221205D8; Wed, 24 Jul 2019 14:38:49 +0200 (CEST) From: Leonard Crestez To: MyungJoo Ham , Kyungmin Park , Will Deacon , Stephen Boyd Cc: Michael Turquette , Jacky Bai , Anson Huang , Abel Vesa , Dong Aisheng , Viresh Kumar , Georgi Djakov , Alexandre Bailon , Chanwoo Choi , Mark Rutland , Frank Li , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFCv2 0/3] PM / devfreq: Add imx driver Date: Wed, 24 Jul 2019 15:38:43 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series attempts to add devfreq support for imx8mm, covering dynamic scaling of internal buses and dram. Actual scaling is performed through the clk framework: The NOC and main NICs are driven by composite clks and a new 'imx8m-dram' clk is used for scaling dram using firmware calls. Frequency target is set via "clk_set_min_rate", this allows an unrelated subsystem (for example interconnect) to also request minimum rates as a form for proactive scaling. The dram controller (DDRC) has a performance monitoring block attached for which a perf driver already exists. Instead of reimplementing that as devfreq-events the perf in-kernel API is used. Changes since v2: * Solve review comments * Add yaml binding doc * Add perf event support Link to v2: https://patchwork.kernel.org/patch/11021571/ DRAM frequency switching through clk framework is here: * https://patchwork.kernel.org/patch/11049429/ That part might not be accepted in clk and it might have to be moved to devfreq also. Leonard Crestez (3): dt-bindings: devfreq: Add initial bindings for i.MX PM / devfreq: Add imx driver PM / devfreq: Add imx perf event support .../devicetree/bindings/devfreq/imx.yaml | 59 ++++ drivers/devfreq/Kconfig | 10 + drivers/devfreq/Makefile | 1 + drivers/devfreq/imx-devfreq.c | 278 ++++++++++++++++++ 4 files changed, 348 insertions(+) create mode 100644 Documentation/devicetree/bindings/devfreq/imx.yaml create mode 100644 drivers/devfreq/imx-devfreq.c -- 2.17.1