From patchwork Tue Aug 6 10:55:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 11078671 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 7AF0A13AC for ; Tue, 6 Aug 2019 10:56:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6590128837 for ; Tue, 6 Aug 2019 10:56:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58894288D0; Tue, 6 Aug 2019 10:56:09 +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 autolearn=unavailable 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 075C028837 for ; Tue, 6 Aug 2019 10:56:08 +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: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=YnbeYeSXWjjgsP/aKaqVVh2eepVxgFwPjnYvKPJEe5Y=; b=eco fGGZJRmdvk3uKeyLczvKLVhs5W9DA+AogDusO9KZVClfFpoZe2GYT6h63OeV/7kMdrSyXZDEPMgwu LHLaw9BtAilG2XCk5Wuqohwv7yT+7+OCQ5Zg0didheVunX2q3U1rgF/uWMM+Bt/119w4XHTcAwoWu 2fOnEpFwlUFbpULRyJslZrETYXcl8Fu3JOjL0+pqwDE667HJa/ilCdXrt302XmnpwrxrcCRpOAyL3 AVlyM0/R5nWDRLmaN6HXfIsPIQPzEq9DkVzEG9zNfgJEUWVMPVPMRRLlwcfGd19hIOSCajPaJzEDC H0YGzyk4+LIZ7RpwWm8f4yo9R0A2IRg==; 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 1hux8Q-0000RW-Gl; Tue, 06 Aug 2019 10:56:06 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hux8N-0000Po-Sk for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2019 10:56:05 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7A07D1A05E1; Tue, 6 Aug 2019 12:55:58 +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 6C6501A05D4; Tue, 6 Aug 2019 12:55:58 +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 78284205DD; Tue, 6 Aug 2019 12:55:57 +0200 (CEST) From: Leonard Crestez To: Georgi Djakov , Rob Herring , =?utf-8?b?QXJ0dXIgxZp3aWdvxYQ=?= , Alexandre Bailon , Viresh Kumar Subject: [RFCv3 0/3] interconnect: Add imx support via devfreq Date: Tue, 6 Aug 2019 13:55:51 +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-20190806_035604_211039_2DEE4CF2 X-CRM114-Status: GOOD ( 11.78 ) 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 , Jacky Bai , Saravana Kannan , Anson Huang , Stephen Boyd , Michael Turquette , linux-pm@vger.kernel.org, Krzysztof Kozlowski , Chanwoo Choi , Kyungmin Park , MyungJoo Ham , linux-imx@nxp.com, kernel@pengutronix.de, Fabio Estevam , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 "min_freq" requests to devfreq. The dev_pm_qos API is used to request min frequencies from devfreq, it relies on this patch: https://patchwork.kernel.org/patch/11078475/ This is greatly reduced compared to previous submissions: * Relying on devfreq and dev_pm_qos instead of CLK allows a wider range of implementations for scaling individual nodes. In particular it's no longer required to force DDR scaling into CLK. * No more "platform opp" stuff: forcing everything to scale together loses many of the benefits of ICC. The devfreq "passive" governor can still be used to tie some pieces of the fabric together. * No more suspend/resume handling: devfreq uses OPP framework which already supports "suspend-opp". * Replace all mentions of "busfreq" with "interconnect" Link to v2: https://patchwork.kernel.org/patch/11056789/ The per-soc platform drivers still need to defined the interconnect graph and links to devfreq (by name) as well as bus widths. For example some of the 128-bit buses on imx8m mini are 64-bit on imx8m nano. There was another recent series tying icc and devfreq, for exynos: * https://lkml.org/lkml/2019/7/23/394 That series defines the interconnect graph/tree entirely inside devicetree but that seems limiting. I'd rather keep the graph in a SOC driver and #define ids for all bus masters/slaves. This way if USB1 and USB2 are on the same bus they can still be treated differently. One interesting idea from there is to turn devfreq nodes into interconnect providers, this can avoid the need for a "virtual" ICC node in devicetree. I expect devicetree folks will object to that? Leonard Crestez (3): dt-bindings: interconnect: Add bindings for imx interconnect: Add imx core driver interconnect: imx: Add platform driver for imx8mm .../devicetree/bindings/interconnect/imx.yaml | 38 +++ drivers/interconnect/Kconfig | 1 + drivers/interconnect/Makefile | 1 + drivers/interconnect/imx/Kconfig | 9 + drivers/interconnect/imx/Makefile | 2 + drivers/interconnect/imx/imx.c | 258 ++++++++++++++++++ drivers/interconnect/imx/imx.h | 62 +++++ drivers/interconnect/imx/imx8mm.c | 114 ++++++++ include/dt-bindings/interconnect/imx8mm.h | 49 ++++ 9 files changed, 534 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/imx.yaml 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