Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp107164pxb; Mon, 25 Apr 2022 06:43:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkrhLtQsR47bJ5oWdRWzblu/lSFtwDCU/mwqV8ae4FyKyfOrZ5H1zkynLepAMOIisXI65I X-Received: by 2002:a05:6402:e96:b0:41d:1a0f:e70a with SMTP id h22-20020a0564020e9600b0041d1a0fe70amr19072459eda.411.1650894211069; Mon, 25 Apr 2022 06:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650894211; cv=none; d=google.com; s=arc-20160816; b=iufMEBuDPaLC1Xd2uFinJUtkkGR9gC13XAHYFsL8jddQfLdsOesfQbLfiTyXByYnW6 1xw1EnXvUlbIq6PbSuX13BJ5swv9Dr5Cm3yAaD2tHNnIaCiSKzafPDuE4KjRWoyn40NR v0usAxK483CBoZGufRg+azkdeTdqmMMvnh+MZyNkltzCPz2M1on72IjZ9lvQcLniWGRl 4rMJFgDTHWTonDX5I/YXlgq5RfEYIkQAb55d3s/ZrOahUVVLZj4BQ6bI6QvyAXnlztv0 zLjnKyzTUtgeThPR8QMmNGyw00u7eid9lsAi8VfHbvIaUVRagNPA6V4dhxQK+bQ8g8gG 4Epg== 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=5va1vkt6Erl2FSZ1SIdbr8p+hz6IQ9ulWRV052HyEw4=; b=zBUdSCtOs/O/pc5oRC8UI0PTCHL5G4luMxVTmUokuK/opKhkYl+w5FDGX0mZrZ0/uu OR61N8rJpcwGUJU5kirtnlO/vKNFUlTEkMMt+41ecgS7sp3jWQB2Yo8ARH8MBaN+sWXS 7gw0yNaLJu+TRacgPt+aSl+juOcotFC7RADYaW9VwfDS2YLTHMFDLHZiSAGl1QuJGude 865rAf+CHbHCSqQb2UixKBQgOLb5M5M9YHXYpHig2HFTsgbZkxxvyLH+N8rweeK45XTl Ij9oaixswd69gi7JE6Vn2Sv7mW4OlTQk6kx6QIKFIKeZ3zcFkUpu3BoJALMEHFSerK9M AECw== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a056402440f00b00423ef0b0967si16233077eda.224.2022.04.25.06.43.04; Mon, 25 Apr 2022 06:43:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232527AbiDYNAJ (ORCPT + 99 others); Mon, 25 Apr 2022 09:00:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235833AbiDYM72 (ORCPT ); Mon, 25 Apr 2022 08:59:28 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8F9C1409E; Mon, 25 Apr 2022 05:55:56 -0700 (PDT) X-UUID: 61afe927d777481899c1cc36f86b09c2-20220425 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.4,REQID:effaf1d9-7688-43a2-91b5-191fa1153c8c,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-20,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,AC TION:release,TS:-20 X-CID-META: VersionHash:faefae9,CLOUDID:403409f0-06b0-4305-bfbf-554bfc9d151a,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,File:nil,QS:0,BEC:nil X-UUID: 61afe927d777481899c1cc36f86b09c2-20220425 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1770244614; Mon, 25 Apr 2022 20:55:51 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 25 Apr 2022 20:55:49 +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; Mon, 25 Apr 2022 20:55:49 +0800 From: Johnson Wang To: , , , CC: , , , , , , , , Johnson Wang Subject: [PATCH v3 0/2] Introduce MediaTek CCI devfreq driver Date: Mon, 25 Apr 2022 20:55:44 +0800 Message-ID: <20220425125546.4129-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=-0.9 required=5.0 tests=BAYES_00,MAY_BE_FORGED, SPF_HELO_NONE,T_SPF_TEMPERROR,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 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: devfreq: mediatek: Add mtk cci devfreq dt-bindings PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver .../devicetree/bindings/devfreq/mtk-cci.yaml | 72 +++ drivers/devfreq/Kconfig | 10 + drivers/devfreq/Makefile | 1 + drivers/devfreq/mtk-cci-devfreq.c | 479 ++++++++++++++++++ 4 files changed, 562 insertions(+) create mode 100644 Documentation/devicetree/bindings/devfreq/mtk-cci.yaml create mode 100644 drivers/devfreq/mtk-cci-devfreq.c -- 2.18.0