Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4296235pxb; Tue, 2 Mar 2021 11:20:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJykre+cMQr0w6J6PuN9AySnaMBQnRT1tOW5ZIaJGRFgiSZZSv4S0a9/KwohT59ckDVMhyJN X-Received: by 2002:a17:906:fa0e:: with SMTP id lo14mr22009598ejb.263.1614712839996; Tue, 02 Mar 2021 11:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614712839; cv=none; d=google.com; s=arc-20160816; b=fsjFgdxTYlU9/K9GDENHAghXCbLeEjKAmUB+FMZ+Z4DLRKm6pWgyODRZ/iA4dVaBH2 6vTYyexUl+pEe6kF9qjttAiNCmC8WEaKLC1FbMsLAMsMhWAgBPG5zaheABcp1jdK1xR3 pjXEtvVyqAsu50zJpMv9dBRhS3vAxtoEIEF6CdVOx2G6ZNQtGnHRsZzLBQysFVN5iM4E dupDNzy9u0/aKTP9ZIQMoHrwPaCrBSnDBsckLcKkryBbn1XkPI7kADSu0Wui4a5MiAhO PwO8gaIPN2DyMHBF9l6LUf/6qYnSqGono+ecwjw6FP0E6aovoxAYi3oDV29npmg2Rs5A aeLQ== 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=pGPg0fqLSVpKJL98ph6oH8BnMAgaQJPbLr+EZis2tVU=; b=vJdxEcBxEwGA9G99x9i5gcS5PQXlB14OPoUeZNbv2rLXNn1arOQjCPGWVUMoLV02di lnO0oyygzXE8deJIB/C8G51QNlN7wiQ2tERLq5Y/av01m5lJg8tVGOUrwr1U92dYIbuH q4fBaTvlpZlngYp+zBXh11s/jEWQnuGG7f7BkL2v56YBOmzGMkN7bHG3+VoSKdW4Oxkb rSlzhAQnyyfs9D9d+WkFC+i4gPmkuxGcbBtN38zL7V/VMS0bOMBZqhOJ6tVC1Mt+i1Ow Zgkef53uhRaQ8jC/A+Lusb7dnlfJyqm8bU9EepnCCSBqGyfvshP1FSq4K4WhXYIKZNdC sTUQ== 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 k18si8822188ejp.292.2021.03.02.11.20.14; Tue, 02 Mar 2021 11:20:39 -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 S1344609AbhCBFrW (ORCPT + 99 others); Tue, 2 Mar 2021 00:47:22 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:41011 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1574625AbhCBDs1 (ORCPT ); Mon, 1 Mar 2021 22:48:27 -0500 X-UUID: 60c410a24b8d422ca5f4f60971135c51-20210302 X-UUID: 60c410a24b8d422ca5f4f60971135c51-20210302 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.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 1082872483; Tue, 02 Mar 2021 11:47:45 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 11:47:44 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 2 Mar 2021 11:47:44 +0800 From: Henry Chen To: Georgi Djakov , Rob Herring , Matthias Brugger , Stephen Boyd , Ryan Case CC: Mark Rutland , Nicolas Boichat , Fan Chen , James Liao , Arvin Wang , , , , , Subject: [PATCH V9 00/13] Add driver for dvfsrc, support for interconnect Date: Tue, 2 Mar 2021 11:47:31 +0800 Message-ID: <1614656863-8530-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-TM-SNTS-SMTP: A7F0D9978F26DE918312832130BCDB060CB041E6DFAAC02AB858325300E579412000:8 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 V9: * modify the cnfiguration of dvfsrc.yaml. (Rob) Changes in V8: * Fixed the dt_binding_check error of dvfsrc.yaml. (Rob) * Remove Kconfig dependency of DVFSRC 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) V8: https://patchwork.kernel.org/project/linux-mediatek/list/?series=421713 V7: https://patchwork.kernel.org/project/linux-mediatek/list/?series=411057 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/