Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp118494pxb; Thu, 7 Jan 2021 23:51:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyINTztcM9+5Ud2gdCaT3DINpJKC27OiS8ukjijYftvA+4zOuXiKiSp9EplTE/ItMTNI8vk X-Received: by 2002:a05:6402:171a:: with SMTP id y26mr4508955edu.371.1610092268911; Thu, 07 Jan 2021 23:51:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610092268; cv=none; d=google.com; s=arc-20160816; b=tYF7lAzmt1SHicFDPnTN9SxaIelV5fUpXFSCB8d0ILN1TiwjiSrBpdlxo8UwO+6K+q MA7nhbkLFlFqQEHJcbYFljI98aOxYvGeRqDDSIc8EUVjzvFfvlXluUvf00YT12MEpGar ljSLOXRGH7OhpPZlDQi2tt2GQeJfrVyrAXDHqxRkQmifcCSYXAYzoNRBjKJbPZCE0wJe SUxGB/23WHIAyOHdgUEcGabLJdLlM+UdOhDAhQkfPlU8M2awmZIOcgMuTeFdUm27iFCM CLsjujRh2bbyH9BGupKMKBae5Eh95eUhc/j2mjVvBgbHS2d+zXBe+xG2cpb1vHTeANWX jTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=HsonG3TXvU9NgVqKyKV858IG6IPlNgpzsCQt1N2/Axg=; b=ufIx49/DEEhan526GBH4AM0mcs3VjuDwjptj71/M83of/dcqAb0OspkSLFFbEUqN/D w2nYM9ePYk/wTnut7YdPU807RVytRhQGNyTPiJXZ47liQ8FjJYPRGdEevCtuInn+Rkl+ JK4DqFBqMiavv/YWz4sfv7MS2kskqZaHYIRvy/nDq+u8Skc2xYfZ4aL60iPqQqkZoKvT uBVVSY2IdiU3HfXENIYrONZ+e8DXaHrDHwOlKO5Pq2pzW2NivCOehASQfDVFRI2sfg3X KxuiMunb/1RtamKa0NfGuLkDQ3AOMfY30tIkosWdAG33vtrk90VG1ccfNaOkVhna7LYH Sj/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu1si3234547ejb.20.2021.01.07.23.50.45; Thu, 07 Jan 2021 23:51:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727294AbhAHHtD (ORCPT + 99 others); Fri, 8 Jan 2021 02:49:03 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:45669 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725848AbhAHHtD (ORCPT ); Fri, 8 Jan 2021 02:49:03 -0500 X-UUID: 029293a19a254a159457bdbf18dc946f-20210108 X-UUID: 029293a19a254a159457bdbf18dc946f-20210108 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 587248561; Fri, 08 Jan 2021 15:48:20 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 Jan 2021 15:48:19 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 8 Jan 2021 15:48:18 +0800 From: Henry Chen To: Georgi Djakov , Rob Herring , Matthias Brugger , Stephen Boyd , Ryan Case , Mark Brown CC: Mark Rutland , Nicolas Boichat , Fan Chen , James Liao , Arvin Wang , , , , , Subject: [PATCH V7 00/13] Add driver for dvfsrc, support for active state of scpsys Date: Fri, 8 Jan 2021 15:48:02 +0800 Message-ID: <1610092095-5113-1-git-send-email-henryc.chen@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series is based on v5.11-rc1. 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 3 frameworks basically: 1. interconnect framework: to aggregate the bandwidth requirements from different clients [1] https://patchwork.kernel.org/cover/10766329/ There has a hw module "DRAM scheduler", which used to control the throughput. The DVFSRC will collect forecast data of dram bandwidth from SW consumers(camera/gpu...), and according the forecast to change the DRAM frequency 2. Regualtor framework: to handle the operating voltage requirement from user or cosumer which not belong any power domain Changes in V7: * Fixed the dt_binding_check error of dvfsrc.yaml. (Rob) * Fixed the checkpatch complains of "Signed-off-by: email name mismatch". (Georgi) * Fixed coding style of interconnect driver. (Georgi) * Upate comment of the years to 2021. (Georgi) Changes in V6: * Remove the performace state support, because the request from consumer can be replaced by using interconnect and regulator framework. * Update the DT patches and convert them to DT schema. (Georgi) * Modify the comment format and coding style. (Mark) Changes in V5: * Support more platform mt6873/mt8192 * Drop the compatible and interconnect provider node and make the parent node an interconnect provider. (Rob/Georgi) * Make modification of interconnect driver from coding suggestion. (Georgi) * Move interconnect diagram into the commit text of patch. (Georgi) * Register the interconnect provider as a platform sub-device. (Georgi) Changes in V4: * Add acked TAG on dt-bindings patches. (Rob) * Declaration of emi_icc_aggregate since the prototype of aggregate function has changed meanwhile. (Georgi) * Used emi_icc_remove instead of icc_provider_del on probe. (Georgi) * Add dvfsrc regulator driver into series. * Bug fixed of mt8183_get_current_level. * Add mutex protection for pstate operation on dvfsrc_set_performance. Changes in V3: * Remove RFC from the subject prefix of the series * Combine dt-binding patch and move interconnect dt-binding document into dvfsrc. (Rob) * Remove unused header, add unit descirption to the bandwidth, rename compatible name on interconnect driver. (Georgi) * Fixed some coding style: check flow, naming, used readx_poll_timeout on dvfsrc driver. (Ryan) * Rename interconnect driver mt8183.c to mtk-emi.c * Rename interconnect header mtk,mt8183.h to mtk,emi.h * mtk-scpsys.c: Add opp table check first to avoid OF runtime parse failed Changes in RFC V2: * Remove the DT property dram_type. (Rob) * Used generic dts property 'opp-level' to get the performace state. (Stephen) * Remove unecessary dependency config on Kconfig. (Stephen) * Remove unused header file, fixed some coding style issue, typo, error handling on dvfsrc driver. (Nicolas/Stephen) * Remove irq handler on dvfsrc driver. (Stephen) * Remove init table on dvfsrc driver, combine hw init on trustzone. * Add interconnect support of mt8183 to aggregate the emi bandwidth. (Georgi) V6: https://patchwork.kernel.org/project/linux-mediatek/list/?series=406077 V5: https://patchwork.kernel.org/project/linux-mediatek/list/?series=348065 V4: https://lore.kernel.org/patchwork/cover/1209284/ V3: https://patchwork.kernel.org/cover/11118867/ RFC V2: https://lore.kernel.org/patchwork/patch/1068113/ RFC V1: https://lore.kernel.org/patchwork/cover/1028535/