From patchwork Wed Mar 13 19:34:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 10851703 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 834B917EF for ; Wed, 13 Mar 2019 19:34:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C2AA28A15 for ; Wed, 13 Mar 2019 19:34:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FFE329D90; Wed, 13 Mar 2019 19:34:11 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0709228A15 for ; Wed, 13 Mar 2019 19:34:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727537AbfCMTdr (ORCPT ); Wed, 13 Mar 2019 15:33:47 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52468 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727073AbfCMTdq (ORCPT ); Wed, 13 Mar 2019 15:33:46 -0400 Received: by mail-wm1-f67.google.com with SMTP id f65so503087wma.2 for ; Wed, 13 Mar 2019 12:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4yaqBufTiQj9h4Ld9rc8jXJTirNVJFhxGZsk/fyw48g=; b=trxa8V8PkQ01GLm/fmoz+i9eOWQLGmoCezFMGXKFlBu/TwSoa4YQRCtRRix5VyE8DS kDdUuUAXCgCyUyhsC0MUljIud1MJtI7cprVBpOZIOmGxwT7RQwyUwoDYvSAS/sBWWgJm fTXm19WqpqCdIcTYTrk7IptnxtcPqnlvnvuP6hgge+QhBl2GkUuGsIWRTCKVD3QgPRiT +6i19RGiYatf5l4dN0kUKFxj3XRaB8YewH/S3/6k/o0N3YInPowkjYr9ZLDR8HpbRn9Z S6Kd+ICCAI9JoEBbh73ubn7iaqXzfh7dX9NNWdvmzX2FNrHVT8GkcqScnhJk+J3t2fpz 4iRg== 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:mime-version :content-transfer-encoding; bh=4yaqBufTiQj9h4Ld9rc8jXJTirNVJFhxGZsk/fyw48g=; b=sTkKXL8EaTHWw3QVrlls7gZ6J/e6PBxD6dA5IASlu/fxlf69/dBq6ljgQocRbyFrAG hV4fdEV16hfqM9Nk8kr6gIzTjU7JbBUKY4GaYc/C3s+p0GcSMz0e4tVS5MKOOXrnclKf eR84/WzTdS6TXH/7rIlXSNOTl/uvz/kYXRb2sBoshZzneHlX1UqAlTPBC3hKuHr5zikA VlIwADVeh1n8CZyXdvN7p2ULnWgM/FIfgXbEJ4zBNHf907/1IQXP2AgHHLdlyBMtcHqt yqJkWTgtiAP/fdUpFd28IsDlGP5i8ZxAnMARlQhathNHi6j/pvDsIC5vFSAttFNYeQFf OWEg== X-Gm-Message-State: APjAAAWwxyjMrwIvEEUuxT/EkZqL+LVuc/Mt8jlamztJ3YmpMZLyJW5s 1uhAbbyATi5Sg8DuatsvVlILpqo1zp0= X-Google-Smtp-Source: APXvYqyitGuPIll6gKgcOC3wjTOdjtpn+dycd771bfS0kL+Y9TAKHwBJsDFaVw4aIqjtsuY2GtHDxA== X-Received: by 2002:a1c:f709:: with SMTP id v9mr3393752wmh.134.1552505623556; Wed, 13 Mar 2019 12:33:43 -0700 (PDT) Received: from localhost.localdomain (205.66.21.93.rev.sfr.net. [93.21.66.205]) by smtp.gmail.com with ESMTPSA id z198sm3017497wmc.10.2019.03.13.12.33.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 12:33:42 -0700 (PDT) From: Alexandre Bailon To: linux-pm@vger.kernel.org, georgi.djakov@linaro.org Cc: mturquette@baylibre.com, ptitiano@baylibre.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, zening.wang@nxp.com, aisheng.dong@nxp.com, khilman@baylibre.com, ccaione@baylibre.com, Alexandre Bailon Subject: [RFC PATCH 0/3] Add support of busfreq Date: Wed, 13 Mar 2019 20:34:05 +0100 Message-Id: <20190313193408.23740-1-abailon@baylibre.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This series implements busfreq, a framework used in MXP's tree to scale the interconnect and dram frequencies. In the vendor tree, device's driver request for a performance level, which is used to scale the frequencies. This series implements it using the interconnect framework. Devices' driver request for bandwidth which is use by busfreq to determine a performance level, and then scale the frequency. Busfreq is quite generic. It could be used for any i.MX SoC. A busfreq platform driver just have to define a list of interconnect nodes, and some OPPs. This series is sent as RFC mostly because the current support of i.MX SoC won't benefit of busfreq framework, because the clocks' driver don't support interconnect / dram frequency scaling. As exemple, this series implements busfreq for i.MX8MM whose upstreaming is in progress. Because this relies on ATF to do the frequency scaling, it won't be hard make it work. As exemple, this series implements busfreq for Alexandre Bailon (3): drivers: interconnect: Add a driver for i.MX SoC drivers: interconnect: imx: Add support of i.MX8MM dt-bindings: interconnect: Document fsl,busfreq-imx8mm bindings .../bindings/interconnect/imx8mm.txt | 24 + drivers/interconnect/Kconfig | 1 + drivers/interconnect/Makefile | 1 + drivers/interconnect/imx/Kconfig | 17 + drivers/interconnect/imx/Makefile | 2 + drivers/interconnect/imx/busfreq-imx8mm.c | 132 ++++ drivers/interconnect/imx/busfreq.c | 570 ++++++++++++++++++ drivers/interconnect/imx/busfreq.h | 123 ++++ include/dt-bindings/interconnect/imx8mm.h | 37 ++ 9 files changed, 907 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/imx8mm.txt create mode 100644 drivers/interconnect/imx/Kconfig create mode 100644 drivers/interconnect/imx/Makefile create mode 100644 drivers/interconnect/imx/busfreq-imx8mm.c create mode 100644 drivers/interconnect/imx/busfreq.c create mode 100644 drivers/interconnect/imx/busfreq.h create mode 100644 include/dt-bindings/interconnect/imx8mm.h