Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp1994792lfo; Sat, 28 May 2022 13:04:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymn2qqD8uflLJmsuyE+rzmCoh1T/vQa+qWR1Fn18P7Sshehi3oOxxRLE/onF6bE3IEBApw X-Received: by 2002:a17:902:bf06:b0:14d:8c72:96c6 with SMTP id bi6-20020a170902bf0600b0014d8c7296c6mr48895649plb.156.1653768276623; Sat, 28 May 2022 13:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653768276; cv=none; d=google.com; s=arc-20160816; b=YGW8R+KO4xdZpHBNhtkdukuBL25/++T+CbYCra389k+YG3qQgcEEcIDhZpxjH3rBEB ioUX+PCgtDDM+IjnCOuz3Y9tV3fmgkHlnF3IpM2qMvhIGsNdGzXynyPJ3p257X2tfByu +aWklEnH++bgTnUidrrZMZG7fz2R14y+1IgSi4fo6VeEw/VtWfgwQ9b6l2jz1TooMf8S RA92UNMXwudQ14Hw+OAXSUvQ3869fmClZfEYdcBGqZdnBC17jj1zup5gjYvMutXyegi3 ueeE/k6xdrt2KrwubFdYehRkvVXo7PC41V2DtIhe0fsLy+OquaOCZB79HTooblBwvs6M JOAQ== 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=K42rz0dDncdYVt5odTx4tXE0Idha72019Bmoz/95ZiM=; b=PJkP0qtdYJ8C2xf/fTNl20cJurtYMVNJ/jWveOYUm6fOHfS4Lk9M/bymvGHlXdiySj ApjsMDtEQTWNQ8T4Tkthp/AtF7r7xsYkfaGzPGvsKZ3m1DhriXzzj5Crk+My/Tp8hpRD KN9YAr3Xa68es6kyE3a2q95ny1ozs58TmFs2BrUpMHTKtHUjrzpF8jezt5rlt+hxPzSC JkuOLNIHfhZtKd+qTykpl4kxzMieQBPBZkaqQz4CBgv0lVV+81aHNt5WSo2SxN0FJyJ4 RveIQSg7VDVtxiYasFnnC4Q4TdF0gqPSpkAKMfaS9X4QDof5RFdc+UZZqr+/CahOkfEG YpRg== 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 e187-20020a6369c4000000b003faa80f15f9si9943397pgc.728.2022.05.28.13.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:04:36 -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 07E6E4A936; Sat, 28 May 2022 12:21:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351158AbiE0LBC (ORCPT + 99 others); Fri, 27 May 2022 07:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350414AbiE0LAu (ORCPT ); Fri, 27 May 2022 07:00:50 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4A6612E312; Fri, 27 May 2022 04:00:45 -0700 (PDT) X-UUID: e89884477f564b6abae5384d5c00b662-20220527 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:09582b69-8c3b-4dce-9e74-524b0c1fc3b5,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:100,FILE:0,RULE:Release_Ham,AC TION:release,TS:100 X-CID-INFO: VERSION:1.1.5,REQID:09582b69-8c3b-4dce-9e74-524b0c1fc3b5,OB:0,LOB: 0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:100,FILE:0,RULE:Spam_GS981B3D,AC TION:quarantine,TS:100 X-CID-META: VersionHash:2a19b09,CLOUDID:c8747fb8-3c45-407b-8f66-25095432a27a,C OID:238c0bece6fb,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,QS:0,BEC:nil X-UUID: e89884477f564b6abae5384d5c00b662-20220527 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 751117326; Fri, 27 May 2022 19:00:39 +0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Fri, 27 May 2022 19:00:38 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 27 May 2022 19:00:38 +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; Fri, 27 May 2022 19:00:38 +0800 From: Johnson Wang To: , , , CC: , , , , , , , , Johnson Wang Subject: [PATCH v6 0/2] Introduce MediaTek CCI devfreq driver Date: Fri, 27 May 2022 19:00:34 +0800 Message-ID: <20220527110036.8810-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 v6: - Remove unnecessary "goto" statement. Changes in v5: - Modify some binding description. - Remove pre_voltage member. - Not to enable/disable intermediate clock. - Not to "put" resources that using devm_ variants. Resend v4: - CC interconnect maintainer. - Change sign-off sequence in commit message. 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