Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp982695iob; Fri, 13 May 2022 18:31:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc5W+ChGpuEHEiDswjbiJ+Nh+8Dkvwiayq/6NSOhLaeoAlXLh8cxcFkUBuMwqNJiPkh1Sk X-Received: by 2002:a05:600c:21c8:b0:394:7796:49c0 with SMTP id x8-20020a05600c21c800b00394779649c0mr7039765wmj.191.1652491900922; Fri, 13 May 2022 18:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652491900; cv=none; d=google.com; s=arc-20160816; b=S2jaWqDAzoNPSZ7JqYk5Qk7bbEH+i6julR81Jmf5/aZMXQqIHW9BrHh+EsQbmgySyD IyVIzCC/TjhNihw7aFSzOd3zK3Eqt5SBL5bPDaiQJ4r6uCp+/kLnaCyX304RkB75ajSH JrcbYU+qrIsopfKhgLHfGxWOcRB1YvskTghBZUMkg2EaHUbRXAt3aiJChH2KyTYCujBP LpfL5ih3ZFxxSHHB05UnyVo1Q3TRsUzyPl/+tdOoGd+1JXJBK0l7BN/Ohug2yEEVODld Xmtb0Ev6Qo0Poh0fmm4rYQeCflrgLjheNxVh1SyiSuJ5vEqMxmChX2wTF21Nq9HFFgT+ WdUg== 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=UeZpWPEpime91NpiDYyXWvAsYgHi2OipZmerBHiq1K4=; b=saHrhGhAxGPBg5oBYSAbZsXvej8LUun+tWChadplfu2J1DIea16Te4jgapt5XkqRwf D3/+b7sdexdACScWXbEyb4XdN29iZJ/rddtW2xFuLDdvgliPB9R08f6jSBEwdZ5em9mv Up1UIofKPiIb74hwciDg9AOHP5IScg9/BXNy6dxMkx5tDz4pPJruc+UhTyj0gwZ+NiV3 YlGVZG3qBS7IudCZwYoxflOEDNmacdOzcTRSFN6Y66SDNg1QEuDUZQsjABfAkOg0WNvQ 5s3qNMRNwxEyNdhP9nTATJZdbkzALNKQwE6vISepn+fhUEq/upySByG6bXBiIO50F1ak Zp0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m10-20020a5d624a000000b0020a7c97cd9esi3203326wrv.926.2022.05.13.18.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:31:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 777303FDA46; Fri, 13 May 2022 16:59:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354155AbiELNHe (ORCPT + 99 others); Thu, 12 May 2022 09:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343603AbiELNH2 (ORCPT ); Thu, 12 May 2022 09:07:28 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4E9D69CF8; Thu, 12 May 2022 06:07:26 -0700 (PDT) X-UUID: 64c3217995a74c68b09e6628503771fd-20220512 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.4,REQID:3ecb6442-4c2b-423e-8fe3-32b3b4fa5c57,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-META: VersionHash:faefae9,CLOUDID:79be12a7-eab7-4b74-a74d-5359964535a9,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,File:nil,QS:0,BEC:nil X-UUID: 64c3217995a74c68b09e6628503771fd-20220512 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1677234903; Thu, 12 May 2022 21:07:20 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 12 May 2022 21:07:19 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 12 May 2022 21:07:19 +0800 From: Johnson Wang To: , , , CC: , , , , , , , , Johnson Wang Subject: [PATCH v4 0/2] Introduce MediaTek CCI devfreq driver Date: Thu, 12 May 2022 21:07:13 +0800 Message-ID: <20220512130715.8165-1-johnson.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Cache Coherent Interconnect (CCI) is the management of cache coherency by hardware. CCI DEVFREQ is DVFS driver for power saving by scaling clock frequency and supply voltage of CCI. CCI uses the same input clock source and power rail as LITTLE CPUs on Mediatek SoCs. This series depends on: Chanwoo's repo: kernel/git/chanwoo/linux.git branch: devfreq-testing [1]: PM / devfreq: Export devfreq_get_freq_range symbol within devfreq [2]: PM / devfreq: Add cpu based scaling support to passive governor [3]: PM / devfreq: passive: Reduce duplicate code when passive_devfreq case [4]: PM / devfreq: passive: Update frequency when start governor Changes in v4: - Add a maintainer in the binding document. - Modify clock description. - Add binding document into MAINTAINERS. - Replace format specifier %d with %ld. Changes in v3: - Move binding document to 'interconnect' and rename it. - Add COMPILE_TEST dependence symbol. - Remove need_voltage_tracking variable. - Move mtk_ccifreq_voltage_tracking() code into mtk_ccifreq_set_voltage(). - Add an interation limit in the while() loop. - Replace 'cci_dev' with 'dev' - Replace old_* with pre_* - Remove of_match_ptr() - Use module_platform_driver() Changes in v2: - Take MT8183 as example in binding document. - Use dev_err() instead of pr_err(). - Use 'goto' statement to handle error case. - Clean up driver code. Johnson Wang (2): dt-bindings: interconnect: Add MediaTek CCI dt-bindings PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver .../bindings/interconnect/mediatek,cci.yaml | 140 ++++++ MAINTAINERS | 1 + drivers/devfreq/Kconfig | 10 + drivers/devfreq/Makefile | 1 + drivers/devfreq/mtk-cci-devfreq.c | 474 ++++++++++++++++++ 5 files changed, 626 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/mediatek,cci.yaml create mode 100644 drivers/devfreq/mtk-cci-devfreq.c -- 2.18.0