Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4389608pxb; Tue, 26 Jan 2021 22:01:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzIH+i14WjEbSuJjSm2Nm8bqVic6VcwW2WYYeucEx0LJcN6RbZ9sQ2BJv1dKFUkt7TQoU+ X-Received: by 2002:a17:907:a06f:: with SMTP id ia15mr5744259ejc.328.1611727266211; Tue, 26 Jan 2021 22:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611727266; cv=none; d=google.com; s=arc-20160816; b=ea6qShe9jKa/iZ1lnLRXttdT9yMFh+Efmy//EEblybCOo8YFktt7YiYqEP0qvcniQ7 gskDo9+rGWU6ZdVSw2jZOIERqymA0XfNSPkoHRH8+wgK5n3/a7gjVzNI805RqcNPVJOf mbS5Iu2DKKjUJl8pk119dCl0KDOm3NnxmvqQRo52XyZDYs56wJCd8rLwkJKvQ2DZl7Tf mUnoPR4hry5xCSzW3+2gSqgw1YOkf1J31kY/MvRNCVU1LlXF0e7dtFpHNueNoJnpRYFn kBjfDuzoeSSbfGFn4hsaaLJZPtla4SKXNFZlOCEIP76mnC3t78wOoUDL8pnzf9QskBVm D0CA== 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=BKyXyeejIU+bzCzVwQj7Q6Qd2P7T+ZXc0i40PYnH0gk=; b=j7Gm1hIspCV+kw7xRmGsfJAc2smkPlubDTl1WYfnVBXfx0q6Si73HeYZuSnA/Tt8lI WHI9NuF5D1y8UwGxtXazl9o0smipk975Wn2a3b6tXHfErBUG+VPcJKV2rCBGjlXSCIRg CVOpcdCTZM91IQESKz/rkn7XzQf4lT/oksAV9e7Z2xUbVX1DPJ3eeRtZgzgDjM/rRnVg Qz7wRFl+rePMYHXT91McSQ3IfRYRg8JVNnoVCkMT+hKxCYtVGQTsXGUKvwuTPCEnVEhx zskEXN/ZVmIDEAaO4NylUEGDMNYdzUuGsBu+z89+EfuCpf4Gj6ob6DrkWD2a981bHk+D q7lw== 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 f10si393958ejb.622.2021.01.26.22.00.42; Tue, 26 Jan 2021 22:01:06 -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 S2393018AbhAZRnb (ORCPT + 99 others); Tue, 26 Jan 2021 12:43:31 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:35889 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1732970AbhAZIHv (ORCPT ); Tue, 26 Jan 2021 03:07:51 -0500 X-UUID: f9171628db3544a3b65753ff863172cd-20210126 X-UUID: f9171628db3544a3b65753ff863172cd-20210126 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] 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 1072506722; Tue, 26 Jan 2021 16:03:56 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 26 Jan 2021 16:03:55 +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, 26 Jan 2021 16:03:55 +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 V8 00/13] Add driver for dvfsrc, support for interconnect Date: Tue, 26 Jan 2021 16:03:42 +0800 Message-ID: <1611648234-15043-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 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) 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/