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: 10851705 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 04EB56C2 for ; Wed, 13 Mar 2019 19:34:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91CC528A15 for ; Wed, 13 Mar 2019 19:34:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 831E129D31; Wed, 13 Mar 2019 19:34:19 +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 2EAE628A15 for ; Wed, 13 Mar 2019 19:34:19 +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=8tYSMqYCMBaWmSJ6h9/yIBVtFmh+3OkGpoBgFabRjTU=; b=QQBV/6Zvx6bCtE 5nAPpapHmFYRAlCJFuU+ukdYRhV3CcXq88XqCXAOONDgEMxQ/SKiNJjzFNKqHtgfGPlulewWGz2B8 RL52sMXWnNtxpP5CWMxMyvZIG3xULjPBZ5NCjzfceKJ/Szu1klOwv/uMdwLjyJGfITP40QWAbsPDg 3DKR79/wvyI+s1D2XjDG+PtsMuhJl+7Am4q0r3zQPQfeYEuUIyg+Rqv+HU5qzqGLVpmE39/ucJFeT 7DLp4DWzSh65gtgpQB+Wds68KtsmwIyTRs8YgMwqGkUXGdLWGjYDqW/CpJefeZhueKfvLZQlSSDd6 4gAviqh9cythSa4RsYWw==; 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 1h49dj-0005fb-Fm; Wed, 13 Mar 2019 19:34:11 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h49dN-0005DP-Da for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2019 19:33:51 +0000 Received: by mail-wm1-x341.google.com with SMTP id x7so517798wmj.0 for ; Wed, 13 Mar 2019 12:33:48 -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=DC4JU11CD9HJcFROu6jMR2FHds/bOIEcTpT+C3Tlt69j+pGmhmtbytOxymsHJ+80wh pJGqoySwk6KB9Suzqzn3o6zO+1PF8hRZGCsulMAUpSgYjEgpPBod884JPN1v/f6lcQnX krYXcBUUCQ02sZrBZN+XvXTyKNP366tRWPSDkDujdoFKjLBmmHp7ehepVbCmnqQ5HZF7 CJx0JFQlgDrldntkfRc7Fa0hHXHL3xsa8jGfOJ5C+6mYlAH7QcXYabRZZDSZ7/ikmv8S IWRUwyPQ4vBJEpJvKnxY3+ggtBjur2Csfzu62ZFHT/x1+UZRVLBIb/FY34KtAnOeSyLc 3AAg== X-Gm-Message-State: APjAAAWCMAa3X8kWPLTYG2+pX+8Dn2PgM3p3DnfbUSWgVx4C/1jtrLrK FPFZErpx+xKevoaK9w6+9Rc33Q== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_123349_455752_D51A5E55 X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aisheng.dong@nxp.com, ccaione@baylibre.com, khilman@baylibre.com, mturquette@baylibre.com, linux-kernel@vger.kernel.org, zening.wang@nxp.com, Alexandre Bailon , ptitiano@baylibre.com, linux-arm-kernel@lists.infradead.org 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 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