Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp754866rwi; Thu, 13 Oct 2022 05:01:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5moyCkh/hmxGyISefQnZfT5LyDuIVm0dpsgFQwEJZ6u6HfoKcXMwqwPhFck11P/W83eTvC X-Received: by 2002:a17:90b:2751:b0:20a:e437:a9e8 with SMTP id qi17-20020a17090b275100b0020ae437a9e8mr10570848pjb.181.1665662464476; Thu, 13 Oct 2022 05:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665662464; cv=none; d=google.com; s=arc-20160816; b=CYFhPWp1cUNM8JiykUl0NlJuAjSFUPIgirskdKbv/QYQvNwyzhveA1lAvOj4LgQURe W4Xlk3WFSo6CJQBnns0PjYZfMzep+lg7yspgn6Hvp4FSMNVEMjZHXqTb2/Fm+fj+089l oOzRoym0SLRElzNT6pM1WeLcjU5xQ+O2bjobOYG8bJQTDaw9B7wvOvfRRZDwFfIN7A9S 0ypWSW9Z+z4oJ9xIhcIpuHFvAzGiwGA2zT1mflsUQ62kYEWfNlSUBwj/wzRUTqRPagEK Np+lwXeHwyenO7mdeCQPbkaeXoN4lVYK2uomphlZpz8K3vmneXj5LYoJxmgjDNTlnsG0 twNw== 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 :dkim-signature; bh=xHg1H54Fp557c8dP/j/enzMQiG2x94tak33lJ6HXOWU=; b=xolbUkBTtO8OB0HUkyuIRMaDQJkdqkMuTJASw0yHE6kUIxmZhKjbzuip5DbL8ZwF0P 11FiVdM0L8C73WK8ZchoSDtRQqsO8iWrHtebey2GDXMqvEqubVewMCL/xpTtsxjOJPGn P5e9GqpJbKJ5Juu6aUSshoW+H7PAS2juZy7Ze8wbBvXyQvgnoLBVBzThManBnZcYdgg1 u5R+qHJCRO+58FAVLQo8HkB0266ye2dDYiXnYkaW+bUJjqb9pKym9EcdGvcedoZrMGSq LWYR0xIN3nar8JAM4kJaGnwZAweUEyWsrfEhxPz3iAeUwmagaJ/2mJoAZmFUo4oAmRdQ 1lMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Gd7PCQ5J; 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=pass (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 i10-20020a170902cf0a00b00172db9d9a01si22083852plg.616.2022.10.13.05.00.52; Thu, 13 Oct 2022 05:01:04 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=Gd7PCQ5J; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbiJMLXu (ORCPT + 99 others); Thu, 13 Oct 2022 07:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbiJMLXs (ORCPT ); Thu, 13 Oct 2022 07:23:48 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD61946864; Thu, 13 Oct 2022 04:23:46 -0700 (PDT) X-UUID: 64896aaa555e4889b3fd3581a49ba0e2-20221013 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=xHg1H54Fp557c8dP/j/enzMQiG2x94tak33lJ6HXOWU=; b=Gd7PCQ5J4SfgjCPjqmAMCxxTyyLHYtGkikggzelr7GUcN9oR4zl5jpLV8LkPDJfEH8l4U8Mi+PdI6Qo7rADOrw5G8ixiU8i0AsU7m+PUijfPJ6pudP9kq7U4jRMwPgC0i9OGnzydjbUsR9qra+qdQoLSgxlkKjZ/3iwwwcoWtKc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:f81f07cb-2a2e-44b7-b76e-c2c408b95bb8,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:39a5ff1,CLOUDID:b0dad5e1-2948-402a-a6e4-b5d31fe11eb7,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 64896aaa555e4889b3fd3581a49ba0e2-20221013 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1162402231; Thu, 13 Oct 2022 19:23:41 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Thu, 13 Oct 2022 19:23:39 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 13 Oct 2022 19:23:39 +0800 From: Johnson Wang To: , , , CC: , , , , , , , , Johnson Wang Subject: [PATCH v4 0/4] Introduce MediaTek frequency hopping driver Date: Thu, 13 Oct 2022 19:23:32 +0800 Message-ID: <20221013112336.15438-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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham 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 purpose of this serie is to enhance frequency hopping and spread spectrum clocking feature for MT8186. We introduce new PLL register APIs and some helpers for FHCTL hardware control. For MT8186 PLL driver, we replace mtk_clk_register_plls() with newly added API to support frequency hopping and SSC function for specific PLLs. Changes in v4: - Fixup iospace error in the binding. - Use GENMASK marco and remove extra line. Changes in v3: - Change binding file name. - Add some constraints for properties. - Rename "mediatek,hopping-ssc-percents" to "mediatek,hopping-ssc-percent". - Add new config symbol. Changes in v2: - Use SoC-specific compatible instead of generic one. - Use standard clocks property and vendor-specific property in dt-binding. - Remove some unused arguments and fix some coding style. Johnson Wang (4): clk: mediatek: Export PLL operations symbols dt-bindings: arm: mediatek: Add new bindings of MediaTek frequency hopping clk: mediatek: Add new clock driver to handle FHCTL hardware clk: mediatek: Change PLL register API for MT8186 .../arm/mediatek/mediatek,mt8186-fhctl.yaml | 53 ++++ drivers/clk/mediatek/Kconfig | 8 + drivers/clk/mediatek/Makefile | 1 + drivers/clk/mediatek/clk-fhctl.c | 244 ++++++++++++++++ drivers/clk/mediatek/clk-fhctl.h | 26 ++ drivers/clk/mediatek/clk-mt8186-apmixedsys.c | 66 ++++- drivers/clk/mediatek/clk-pll.c | 84 +++--- drivers/clk/mediatek/clk-pll.h | 55 ++++ drivers/clk/mediatek/clk-pllfh.c | 268 ++++++++++++++++++ drivers/clk/mediatek/clk-pllfh.h | 82 ++++++ 10 files changed, 834 insertions(+), 53 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml create mode 100644 drivers/clk/mediatek/clk-fhctl.c create mode 100644 drivers/clk/mediatek/clk-fhctl.h create mode 100644 drivers/clk/mediatek/clk-pllfh.c create mode 100644 drivers/clk/mediatek/clk-pllfh.h -- 2.18.0