From patchwork Fri Aug 23 14:36:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 11111865 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1AFC112C for ; Fri, 23 Aug 2019 14:37:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9312A21848 for ; Fri, 23 Aug 2019 14:37:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fEP0bQVs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9312A21848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=z++Vw2wLFRlB8tnQGHdB0t3XXJ2xZO092Z7CiB5JS44=; b=fEP 0bQVsCFK+vVJmKydTMcfLQlPU3AaABzpvP2vp94r8y45K73BXCUhlSbjlySdnJR4e3P4hUnwyCDX+ VEhjyQOz8cOJk1szBhte4rdI77FYdBx9lrP4TX3QnJDXRfd2GnW5v/H6JNXJsOA4plTSEcM8QtmB7 rR/1Te/VoL/buJexyoMlKuTscLDDklrUrCWd6YYFM4z50YgevDI1e0Yvsn/1bLO15EduDHAGZhZkm sGYM34SohVQtJq/rLX9xO1CUy6qb+ND31FpLEwGNjdF8hJ+eLmhXjpGm+YFVfyzhPcJ7BCLKGT5EY 7c36vaEtBJMxAC1lB5w65tztkxxuZ6A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i1Agn-00021e-1R; Fri, 23 Aug 2019 14:37:17 +0000 Received: from inva021.nxp.com ([92.121.34.21]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i1Agb-0001qs-NH for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2019 14:37:07 +0000 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D737A200741; Fri, 23 Aug 2019 16:37:02 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C86A920073F; Fri, 23 Aug 2019 16:37:02 +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 E792D205D9; Fri, 23 Aug 2019 16:37:01 +0200 (CEST) From: Leonard Crestez To: Georgi Djakov , Rob Herring , =?utf-8?b?QXJ0dXIgxZp3aWdvxYQ=?= , Chanwoo Choi Subject: [RFCv4 0/7] interconnect: Add imx support via devfreq Date: Fri, 23 Aug 2019 17:36:53 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190823_073706_040840_B5E54EE3 X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [92.121.34.21 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Dong Aisheng , linux-arm-kernel@lists.infradead.org, Saravana Kannan , linux-pm@vger.kernel.org, Stephen Boyd , Viresh Kumar , Michael Turquette , Krzysztof Kozlowski , Kyungmin Park , MyungJoo Ham , Alexandre Bailon , kernel@pengutronix.de, Fabio Estevam , Shawn Guo , devicetree@vger.kernel.org, linux-imx@nxp.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This series add imx support for interconnect via devfreq: the ICC framework is used to aggregate requests from devices and then those are converted to DEV_PM_QOS_MIN_FREQUENCY requests for devfreq. The devfreq parts are posted separately, this series only intersects in devicetree: https://patchwork.kernel.org/cover/11104113/ Since there is no single devicetree node that can represent the "interconnect" new API is added to allow individual devfreq nodes to act as parsing proxies all mapping to a single soc-level icc provider. This is still RFC because this The rest of the changes are small and deal with review comments. Changes since RFCv3: * Remove the virtual "icc" node and add devfreq nodes as proxy providers * Fix build on 32-bit arm (reported by kbuilt test robot) * Remove ARCH_MXC_ARM64 (never existed in upstream) * Remove _numlinks, calculate instead * Replace __BUSFREQ_H header guard * Improve commit message and comment spelling * Fix checkpatch issues Link to RFCv3: https://patchwork.kernel.org/cover/11078671/ Changes since RFCv2 and initial work by Alexandre Bailon: * Relying on devfreq and dev_pm_qos instead of CLK * No more "platform opp" stuff * No more special suspend handling: use suspend-opp on devfreq instead. * Replace all mentions of "busfreq" with "interconnect" Link to v2: https://patchwork.kernel.org/patch/11056789/ Leonard Crestez (7): PM / devfreq: Add devfreq_get_devfreq_by_node interconnect: Add of_icc_add_proxy dt-bindings: devfreq: imx: Describe interconnect properties interconnect: Add imx core driver interconnect: imx: Add platform driver for imx8mm soc: imx8mm: Register interconnect platform device arm64: dts: imx8mm: Add interconnect properties .../devicetree/bindings/devfreq/imx-ddrc.yaml | 5 + .../devicetree/bindings/devfreq/imx.yaml | 5 + arch/arm64/boot/dts/freescale/imx8mm.dtsi | 5 + drivers/devfreq/devfreq.c | 42 ++- drivers/interconnect/Kconfig | 1 + drivers/interconnect/Makefile | 1 + drivers/interconnect/core.c | 88 +++++- drivers/interconnect/imx/Kconfig | 9 + drivers/interconnect/imx/Makefile | 2 + drivers/interconnect/imx/imx.c | 279 ++++++++++++++++++ drivers/interconnect/imx/imx.h | 60 ++++ drivers/interconnect/imx/imx8mm.c | 105 +++++++ drivers/soc/imx/soc-imx8.c | 4 + include/dt-bindings/interconnect/imx8mm.h | 49 +++ include/linux/devfreq.h | 1 + include/linux/interconnect-provider.h | 7 + 16 files changed, 645 insertions(+), 18 deletions(-) create mode 100644 drivers/interconnect/imx/Kconfig create mode 100644 drivers/interconnect/imx/Makefile create mode 100644 drivers/interconnect/imx/imx.c create mode 100644 drivers/interconnect/imx/imx.h create mode 100644 drivers/interconnect/imx/imx8mm.c create mode 100644 include/dt-bindings/interconnect/imx8mm.h