From patchwork Wed Jan 2 14:09:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Chen X-Patchwork-Id: 10746465 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 43DF41399 for ; Wed, 2 Jan 2019 14:17:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31E6A28825 for ; Wed, 2 Jan 2019 14:17:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25F0F2888A; Wed, 2 Jan 2019 14:17:40 +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,UNPARSEABLE_RELAY 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 C8BB028825 for ; Wed, 2 Jan 2019 14:17:39 +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=pNlHypddOaPnW5Qi+hYNqXnfNAVCGRXo1ewo8N5Ab3w=; b=LMQvlCzud5KwtE EmGr1ze3s8Uq3Ab+d059uAjPB1VgHyr4xW/b2nuU86jut/k3HM3UrQ0d0xkH67BHqJ3eWFyXT/KY6 rJBJKZgW+zJM4WB9rqch1DAe40viXCoq+nWXzM+wXFwBynOor8C12q8GqRrEm5AH5BxJL5d7vUp4t XtCHQK0GWXeN7wdWwYIQgHK+UHn8d9zKdhDXYJRXa15qkfR0/ExZDEzWt0qlPQjE//fvAxoZhVGMz dtWEKGKQ1vwgPB1HD3T3PO41/O8DHkxuENpwgHRbRBY2UCRyPWjdLuHpFOO3mum7EMTemRb8DOt3I OicyR0vBTqIRdA5qb4wA==; 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 1gehL1-0002Qd-B9; Wed, 02 Jan 2019 14:17:39 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gehEF-00062D-CL; Wed, 02 Jan 2019 14:10:46 +0000 X-UUID: 9b4dce0da76648e0a34fe008980aabd2-20190102 X-UUID: 9b4dce0da76648e0a34fe008980aabd2-20190102 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 352485292; Wed, 02 Jan 2019 22:10:33 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 2 Jan 2019 22:10:26 +0800 Received: from mtkslt205.mediatek.inc (10.21.15.75) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 2 Jan 2019 22:10:26 +0800 From: Henry Chen To: Viresh Kumar , Stephen Boyd , "Rob Herring" , Matthias Brugger , "Ulf Hansson" Subject: [RFC RESEND PATCH 0/7] Add driver for dvfsrc and add support for active state of scpsys on mt8183 Date: Wed, 2 Jan 2019 22:09:51 +0800 Message-ID: <1546438198-1677-1-git-send-email-henryc.chen@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190102_061040_113017_F9AD39DE X-CRM114-Status: GOOD ( 13.68 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , James Liao , Kees Cook , Weiyi Lu , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Fan Chen , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The patchsets add support for MediaTek hardware module named DVFSRC (dynamic voltage and frequency scaling resource collector). The DVFSRC is a HW module which is used to collect all the requests from both software and hardware and turn into the decision of minimum operating voltage and minimum DRAM frequency to fulfill those requests. So, This series is to implement the dvfsrc driver to collect all the requests of operating voltage or DRAM bandwidth from other device drivers likes GPU/Camera through 2 frameworks basically: 1. PM_QOS_MEMORY_BANDWIDTH from PM QOS: to aggregate the bandwidth requirements from different clients 2. Active state management of power domains[1]: to handle the operating voltage opp requirement from different power domains [1] https://lwn.net/Articles/744047/ Henry Chen (7): dt-bindings: soc: Add DVFSRC driver bindings dt-bindings: soc: Add opp table on scpsys bindings soc: mediatek: add support for the performance state arm64: dts: mt8183: add performance state support of scpsys soc: mediatek: add header for mediatek SIP interface soc: mediatek: add MT8183 dvfsrc support arm64: dts: mt8183: add dvfsrc related nodes Documentation/devicetree/bindings/opp/mtk-opp.txt | 24 ++ .../devicetree/bindings/soc/mediatek/dvfsrc.txt | 26 ++ .../devicetree/bindings/soc/mediatek/scpsys.txt | 42 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 29 ++ drivers/soc/mediatek/Kconfig | 15 + drivers/soc/mediatek/Makefile | 1 + drivers/soc/mediatek/mtk-dvfsrc.c | 473 +++++++++++++++++++++ drivers/soc/mediatek/mtk-scpsys.c | 60 +++ drivers/soc/mediatek/mtk-scpsys.h | 22 + include/dt-bindings/soc/mtk,dvfsrc.h | 18 + include/soc/mediatek/mtk_sip.h | 17 + 11 files changed, 727 insertions(+) create mode 100644 Documentation/devicetree/bindings/opp/mtk-opp.txt create mode 100644 Documentation/devicetree/bindings/soc/mediatek/dvfsrc.txt create mode 100644 drivers/soc/mediatek/mtk-dvfsrc.c create mode 100644 drivers/soc/mediatek/mtk-scpsys.h create mode 100644 include/dt-bindings/soc/mtk,dvfsrc.h create mode 100644 include/soc/mediatek/mtk_sip.h