[v4,2/4] dt-bindings: arm: mediatek: Add new bindings of MediaTek frequency hopping
Message ID | 20221013112336.15438-3-johnson.wang@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp218810wrs; Thu, 13 Oct 2022 04:29:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ESES5fQzP2NlAWQFwMAw/M0qOaHoQy9z2vFF0lbha0JbAB7Rc55gFi2VGlHa3+8iYg/gB X-Received: by 2002:a17:90a:930b:b0:20b:a5d:35d6 with SMTP id p11-20020a17090a930b00b0020b0a5d35d6mr10577956pjo.146.1665660571896; Thu, 13 Oct 2022 04:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665660571; cv=none; d=google.com; s=arc-20160816; b=Gc7QCLQLjVOTXCeeuYeSXcQbvbh/ujcZBR/EocVFfvk6OwCoqPUTEGW8ZewdiFGvys jiTb8D6/jygHU7BPPSnGchuFAQI6Oy4XfjpfVCaemVg0HpetjpvSIpXNASzlkv03h2yj lmOR2Cwc9xJyr/WCCC5g4hZq+rqh62rB2YA150pPTfb9E4XnjKdNzQens7JjbsQ+Yug/ GVTSzAy0yeNjH0ukrEKK+Ex42WQf0cyBigiUVFK7Gzyfakq5MCm44hTMGoGtcgTdWvG3 keFGEO/6c5VgU7cxKqk/uNzaiN6Ty47QBC6UDVT4nNmoiTqFRqrXn4f+b0JbwdIbdlIK z9/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=MvQ0XvblbpzVtgq68+pIpGaKjYmZYO0OxZJvV2cdz8Q=; b=0nq75376Ecoj0TFYTtVN2/zIxGO++9rvm2i6q4Z4EIEJkZDLvsiUKGs1PYs6TasCsz BoON2FhQmDihoMozSEf28UVKRQ157THyioHvUhdxrxfsprHeVqqTi0BmdKkHRMXdcLpR j2DNuHq0OHgIok9bISL5lBvw7FtAOo9qG6LDzIidkhr+WSEPMW3E0kl2eK5xpnbhfJar mc7L7k0TONVHdx1dFXpx0/n/63mBordmrXq6DpFUJPEruJribH70wa2Cu0XF5orgDseD 4TcpW4+hIkMrO1qzqJfJIrwg21gY8INUtNjJviSnbfm8ORR3notseAMxSGW0MTAY+SI1 dKXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=k5vYWCqw; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j64-20020a638043000000b00464858cf6b1si7566599pgd.192.2022.10.13.04.29.20; Thu, 13 Oct 2022 04:29: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; dkim=pass header.i=@mediatek.com header.s=dk header.b=k5vYWCqw; 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 S229735AbiJMLX6 (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Thu, 13 Oct 2022 07:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbiJMLXt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Oct 2022 07:23:49 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90923E52D0; Thu, 13 Oct 2022 04:23:47 -0700 (PDT) X-UUID: f199d6c310164c3d9b4e5647c576ebe3-20221013 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=MvQ0XvblbpzVtgq68+pIpGaKjYmZYO0OxZJvV2cdz8Q=; b=k5vYWCqwNKzUHszAxSmuRQtuDTu5ZNN2uXWHTMt95cXyDyWO6EImR5pg+qBlA0q8EFMXOJxc8FXHd+9NDe62pAHSOqTWVsu335UQRdgy6jOQJ4I1nu08o1SD1C73I+Mw0auQgyulMrrupf5ls/DC3nLFFUDCy7uMKbFl2ka0arY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:078443a3-e900-427b-9db8-5b3b218865ab,IP:0,U RL:25,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:25 X-CID-META: VersionHash:39a5ff1,CLOUDID:b1dad5e1-2948-402a-a6e4-b5d31fe11eb7,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: f199d6c310164c3d9b4e5647c576ebe3-20221013 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from <johnson.wang@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2113262002; 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 <johnson.wang@mediatek.com> To: <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <angelogioacchino.delregno@collabora.com>, <sboyd@kernel.org> CC: <linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com>, <kuan-hsin.lee@mediatek.com>, <yu-chang.wang@mediatek.com>, Johnson Wang <johnson.wang@mediatek.com>, Edward-JW Yang <edward-jw.yang@mediatek.com> Subject: [PATCH v4 2/4] dt-bindings: arm: mediatek: Add new bindings of MediaTek frequency hopping Date: Thu, 13 Oct 2022 19:23:34 +0800 Message-ID: <20221013112336.15438-3-johnson.wang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221013112336.15438-1-johnson.wang@mediatek.com> References: <20221013112336.15438-1-johnson.wang@mediatek.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746571699922503071?= X-GMAIL-MSGID: =?utf-8?q?1746571699922503071?= |
Series |
Introduce MediaTek frequency hopping driver
|
|
Commit Message
Johnson Wang
Oct. 13, 2022, 11:23 a.m. UTC
Add the new binding documentation for MediaTek frequency hopping and spread spectrum clocking control. Co-developed-by: Edward-JW Yang <edward-jw.yang@mediatek.com> Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com> Signed-off-by: Johnson Wang <johnson.wang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Rob Herring <robh@kernel.org> --- .../arm/mediatek/mediatek,mt8186-fhctl.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml
Comments
Quoting Johnson Wang (2022-10-13 04:23:34) > Add the new binding documentation for MediaTek frequency hopping > and spread spectrum clocking control. > > Co-developed-by: Edward-JW Yang <edward-jw.yang@mediatek.com> > Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com> > Signed-off-by: Johnson Wang <johnson.wang@mediatek.com> > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > Reviewed-by: Rob Herring <robh@kernel.org> > --- > .../arm/mediatek/mediatek,mt8186-fhctl.yaml | 53 +++++++++++++++++++ > 1 file changed, 53 insertions(+) > create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml > > diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml > new file mode 100644 > index 000000000000..59111946966c > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt8186-fhctl.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MediaTek frequency hopping and spread spectrum clocking control The driver patch is in drivers/clk so why not put the binding in bindings/clock as well? > + > +maintainers: > + - Edward-JW Yang <edward-jw.yang@mediatek.com> > + [...] > + > +required: > + - compatible > + - reg > + - clocks > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/mt8186-clk.h> > + fhctl: fhctl@1000ce00 { Is it a clock-controller? 'fhctl' isn't a generic node name. > + compatible = "mediatek,mt8186-fhctl"; > + reg = <0x1000ce00 0x200>; > + clocks = <&apmixedsys CLK_APMIXED_MSDCPLL>; > + mediatek,hopping-ssc-percent = <3>;
On Fri, 2022-10-14 at 13:42 -0700, Stephen Boyd wrote: > Quoting Johnson Wang (2022-10-13 04:23:34) > > Add the new binding documentation for MediaTek frequency hopping > > and spread spectrum clocking control. > > > > Co-developed-by: Edward-JW Yang <edward-jw.yang@mediatek.com> > > Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com> > > Signed-off-by: Johnson Wang <johnson.wang@mediatek.com> > > Reviewed-by: AngeloGioacchino Del Regno < > > angelogioacchino.delregno@collabora.com> > > Reviewed-by: Rob Herring <robh@kernel.org> > > --- > > .../arm/mediatek/mediatek,mt8186-fhctl.yaml | 53 > > +++++++++++++++++++ > > 1 file changed, 53 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186- > > fhctl.yaml > > > > diff --git > > a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186- > > fhctl.yaml > > b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186- > > fhctl.yaml > > new file mode 100644 > > index 000000000000..59111946966c > > --- /dev/null > > +++ > > b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186- > > fhctl.yaml > > @@ -0,0 +1,53 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: > > https://urldefense.com/v3/__http://devicetree.org/schemas/arm/mediatek/mediatek,mt8186-fhctl.yaml*__;Iw!!CTRNKA9wMg0ARbw!yfDH4W14Pek7w3YBrdcBAGj3OSSWGlWk8av4DmHT69Ej4ax75zKqpy89ZvX1Z_aKDPzu$ > > > > +$schema: > > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!yfDH4W14Pek7w3YBrdcBAGj3OSSWGlWk8av4DmHT69Ej4ax75zKqpy89ZvX1Z9gRczPi$ > > > > + > > +title: MediaTek frequency hopping and spread spectrum clocking > > control > > The driver patch is in drivers/clk so why not put the binding in > bindings/clock as well? > Hi Stephen, Sure, I will move this binding in the next version. > > + > > +maintainers: > > + - Edward-JW Yang <edward-jw.yang@mediatek.com> > > + > > [...] > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/clock/mt8186-clk.h> > > + fhctl: fhctl@1000ce00 { > > Is it a clock-controller? 'fhctl' isn't a generic node name. > This node is used for determining if PLLs adopt "hopping" method to adjust their frequency. It doesn't provide any clock but actually change the behavior of some PLLs with new .set_rate callback. Do you think this node acts like one kind of clock-controller? BRs, Johnson Wang > > + compatible = "mediatek,mt8186-fhctl"; > > + reg = <0x1000ce00 0x200>; > > + clocks = <&apmixedsys CLK_APMIXED_MSDCPLL>; > > + mediatek,hopping-ssc-percent = <3>;
On Mon, 2022-10-17 at 12:04 -0700, Stephen Boyd wrote: > Quoting Johnson Wang (王聖鑫) (2022-10-17 05:55:09) > > On Fri, 2022-10-14 at 13:42 -0700, Stephen Boyd wrote: > > > Quoting Johnson Wang (2022-10-13 04:23:34) > > > > + - | > > > > + #include <dt-bindings/clock/mt8186-clk.h> > > > > + fhctl: fhctl@1000ce00 { > > > > > > Is it a clock-controller? 'fhctl' isn't a generic node name. > > > > > > > This node is used for determining if PLLs adopt "hopping" method to > > adjust their frequency. > > It doesn't provide any clock but actually change the behavior of > > some > > PLLs with new .set_rate callback. > > Do you think this node acts like one kind of clock-controller? > > Why can't we add the reg and properties to the node that implements > the > PLL? Hi Stephen, Now we use standard clocks property to get clock indices from apmixedsys node. If we integrate the reg and properties into apmixedsys node, we have to figure out another way to get indices... (I think one node shouldn't take itself as input?) There is an idea in my mind. Add these prperties into apmixedsys node. mediatek,hopping-clocks = <CLK_APMIXED_MAINPLL>, <CLK_APMIXED_MSDCPLL>; mediatek,ssc-percent = <2 3>; But I don't really know if this violates some rules. Could you please give us some suggestion? Thanks! BRs, Johnson Wang
On Fri, 2022-10-21 at 11:17 +0000, Johnson Wang (王聖鑫) wrote: > On Mon, 2022-10-17 at 12:04 -0700, Stephen Boyd wrote: > > Quoting Johnson Wang (王聖鑫) (2022-10-17 05:55:09) > > > On Fri, 2022-10-14 at 13:42 -0700, Stephen Boyd wrote: > > > > Quoting Johnson Wang (2022-10-13 04:23:34) > > > > > + - | > > > > > + #include <dt-bindings/clock/mt8186-clk.h> > > > > > + fhctl: fhctl@1000ce00 { > > > > > > > > Is it a clock-controller? 'fhctl' isn't a generic node name. > > > > > > > > > > This node is used for determining if PLLs adopt "hopping" method > > > to > > > adjust their frequency. > > > It doesn't provide any clock but actually change the behavior of > > > some > > > PLLs with new .set_rate callback. > > > Do you think this node acts like one kind of clock-controller? > > > > Why can't we add the reg and properties to the node that implements > > the > > PLL? > > Hi Stephen, > > Now we use standard clocks property to get clock indices from > apmixedsys node. > > If we integrate the reg and properties into apmixedsys node, we have > to > figure out another way to get indices... (I think one node shouldn't > take itself as input?) > > There is an idea in my mind. Add these prperties into apmixedsys > node. > > mediatek,hopping-clocks = <CLK_APMIXED_MAINPLL>, > <CLK_APMIXED_MSDCPLL>; > mediatek,ssc-percent = <2 3>; > > > But I don't really know if this violates some rules. > Could you please give us some suggestion? > Thanks! > > BRs, > Johnson Wang Hi Stephen, A gentle ping for this. Could you please give me some advices if you prefer intergrating these into one node? Thank you very much! BRs, Johnson Wang
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml new file mode 100644 index 000000000000..59111946966c --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8186-fhctl.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt8186-fhctl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek frequency hopping and spread spectrum clocking control + +maintainers: + - Edward-JW Yang <edward-jw.yang@mediatek.com> + +description: | + Frequency hopping control (FHCTL) is a piece of hardware that control + some PLLs to adopt "hopping" mechanism to adjust their frequency. + Spread spectrum clocking (SSC) is another function provided by this hardware. + +properties: + compatible: + const: mediatek,mt8186-fhctl + + reg: + maxItems: 1 + + clocks: + description: Phandles of the PLL with FHCTL hardware capability. + minItems: 1 + maxItems: 30 + + mediatek,hopping-ssc-percent: + description: The percentage of spread spectrum clocking for one PLL. + minItems: 1 + maxItems: 30 + items: + default: 0 + minimum: 0 + maximum: 8 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/mt8186-clk.h> + fhctl: fhctl@1000ce00 { + compatible = "mediatek,mt8186-fhctl"; + reg = <0x1000ce00 0x200>; + clocks = <&apmixedsys CLK_APMIXED_MSDCPLL>; + mediatek,hopping-ssc-percent = <3>; + };