Message ID | 20221025072837.16591-3-linux@fw-web.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp860741wru; Tue, 25 Oct 2022 00:36:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4npkLqSxHF7IPrClM4w/VsuyGuzxNosrwOVjszyVOq3VI6czFmWR3xIq00l6VaNaiSpmwm X-Received: by 2002:a63:2c13:0:b0:46b:274a:3e2b with SMTP id s19-20020a632c13000000b0046b274a3e2bmr30946921pgs.241.1666683378728; Tue, 25 Oct 2022 00:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666683378; cv=none; d=google.com; s=arc-20160816; b=ntS73F4mL9bS/Yp/5Uup+mgan/Mqa00OK6ooh4t701UmB2pOxhqXepqNQhmbEvru+N ZznefzuLo5KweOTY9LCNMgYEZiWvEejwqaHGiENdtavpvJ82Pj7HX+sTMI3Lyyf/DtXs FxzSp3+d6cuv24C06jxKKwQlctGOZSHlyDNB7vPw435aWqpmZJmGzJYuXPOxVigQrEgV EDiDUDUXrdpHfJw60gIrSu54w/N5Zo9yLddizAFt2EI+zQ/No7+5YoORkGZAIg4X/1tS naC9BPTZTm9kFRzHJQIhw/UUuGIpHrmtUybRSFbiNYuCDrhfvjsQy0ceia94AeMXuWei xbhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HPVeizzATY2/3fupWqlmWNMkG9wPo0ix3FxSgAWf9kk=; b=xjZ4LRvXcxYH8dibzNtd16r9d7ow/zsa/Zcbal4iMpXBuopTWNxl7LEL0PIRXr33Si Knybt+8Vdr01S4O03et8AW+fuBd3gAelPotHSUQ32J0Ey7+IQ+SNC1O1KsWib6HjLkGH dOYqNumgLz+pdYcqfEC5xmByplEUKO7CGogCz/CnixgwRPTYkjBLWprhx46aFNuHWVgH F5ykanzcthNeWg6Q1rf4nj2rbgySpnvYZyARIOmUZx54i+7sCR8SFbremxz+SZ9ki8ie h3sFKI0rlEFySLQr/fumcDR0eBlJIO5wSfTMKBh3I5XcinAnLakxLyDJdPJQ7WGNQ9nd kt8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=h76N3baN; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020a17090ad14600b00213225f68cdsi3820417pjw.162.2022.10.25.00.36.06; Tue, 25 Oct 2022 00:36:18 -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=@mailerdienst.de header.s=20200217 header.b=h76N3baN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231482AbiJYH3M (ORCPT <rfc822;lucius.rs.storz@gmail.com> + 99 others); Tue, 25 Oct 2022 03:29:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229877AbiJYH2v (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 03:28:51 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07CBD13A58D; Tue, 25 Oct 2022 00:28:49 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 19CB56049C; Tue, 25 Oct 2022 07:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666682928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HPVeizzATY2/3fupWqlmWNMkG9wPo0ix3FxSgAWf9kk=; b=h76N3baNUtUvaXUxVYss74lavlCCeF3PnHjld0LYwZZAcApw/+vTknRNDU2wL3i3sFawll SICgkmhU1lrDb+20cIzTx976FJpC0ZFgupwV72xQY2FZvXgi5e2fH4+cxDOr1vtsvuyWot Z/d9Vf3gFsFK9pRMI/hBzWVkWATQCdI= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 6AF6D1003DE; Tue, 25 Oct 2022 07:28:46 +0000 (UTC) From: Frank Wunderlich <linux@fw-web.de> To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich <frank-w@public-files.de>, Ryder Lee <ryder.lee@mediatek.com>, Jianjun Wang <jianjun.wang@mediatek.com>, Bjorn Helgaas <bhelgaas@google.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com>, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Date: Tue, 25 Oct 2022 09:28:37 +0200 Message-Id: <20221025072837.16591-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025072837.16591-1-linux@fw-web.de> References: <20221025072837.16591-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: 5f0ade24-ef7b-4264-afe6-cd693f90c8d0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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?1747644190610472122?= X-GMAIL-MSGID: =?utf-8?q?1747644190610472122?= |
Series |
rework mtk pcie-gen3 bindings and support mt7986
|
|
Commit Message
Frank Wunderlich
Oct. 25, 2022, 7:28 a.m. UTC
From: Frank Wunderlich <frank-w@public-files.de> Add compatible string and clock-definition for mt7986. It needs 4 clocks for PCIe, define them in binding. Signed-off-by: Frank Wunderlich <frank-w@public-files.de> --- v2: - squashed patch 2+3 (compatible and clock definition) --- .../bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
Comments
Il 25/10/22 09:28, Frank Wunderlich ha scritto: > From: Frank Wunderlich <frank-w@public-files.de> > > Add compatible string and clock-definition for mt7986. It needs 4 clocks > for PCIe, define them in binding. > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > --- > v2: > - squashed patch 2+3 (compatible and clock definition) > --- > .../bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > index 98d3f0f1cd76..57d0e84253e9 100644 > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > @@ -48,6 +48,7 @@ properties: > oneOf: > - items: > - enum: > + - mediatek,mt7986-pcie > - mediatek,mt8188-pcie > - mediatek,mt8195-pcie > - const: mediatek,mt8192-pcie > @@ -78,9 +79,11 @@ properties: > - const: mac > > clocks: > + minItems: 4 > maxItems: 6 I'm not sure that this is really correct. If you have a list of items (const or description, doesn't matter), you don't have to specify maxItems, as it is implicitly equal to the number of items. Also, specifying minItems means that you're "setting" one or more items as optional. It looks like you're specifying a specific and definite list of items for both clocks and clock-names... and for all of the supported SoCs, so, I don't think that having {min,max}Items globally specified on clocks, clock-names make any kind of sense. .....but I'd like for someone else to give an opinion on this as well. Krzysztof, please? Cheers, Angelo > > clock-names: > + minItems: 4 > maxItems: 6 > > assigned-clocks: > @@ -161,6 +164,20 @@ allOf: > - const: tl_32k > - const: peri_26m > - const: peri_mem > + - if: > + properties: > + compatible: > + contains: > + enum: > + - mediatek,mt7986-pcie > + then: > + properties: > + clock-names: > + items: > + - const: pl_250m > + - const: tl_26m > + - const: peri_26m > + - const: top_133m > > unevaluatedProperties: false > >
On Tue, Oct 25, 2022 at 01:10:56PM +0200, AngeloGioacchino Del Regno wrote: > Il 25/10/22 09:28, Frank Wunderlich ha scritto: > > From: Frank Wunderlich <frank-w@public-files.de> > > > > Add compatible string and clock-definition for mt7986. It needs 4 clocks > > for PCIe, define them in binding. > > > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > > --- > > v2: > > - squashed patch 2+3 (compatible and clock definition) > > --- > > .../bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > > index 98d3f0f1cd76..57d0e84253e9 100644 > > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > > @@ -48,6 +48,7 @@ properties: > > oneOf: > > - items: > > - enum: > > + - mediatek,mt7986-pcie > > - mediatek,mt8188-pcie > > - mediatek,mt8195-pcie > > - const: mediatek,mt8192-pcie > > @@ -78,9 +79,11 @@ properties: > > - const: mac > > clocks: > > + minItems: 4 > > maxItems: 6 > > I'm not sure that this is really correct. > If you have a list of items (const or description, doesn't matter), you don't have > to specify maxItems, as it is implicitly equal to the number of items. > Also, specifying minItems means that you're "setting" one or more items as > optional. > > It looks like you're specifying a specific and definite list of items for both > clocks and clock-names... and for all of the supported SoCs, so, I don't think > that having {min,max}Items globally specified on clocks, clock-names make any > kind of sense. > > .....but I'd like for someone else to give an opinion on this as well. It does make sense. Globally, we have the full range of possible clocks and then the if/then schemas further restrict it. Rob
On Tue, 25 Oct 2022 09:28:37 +0200, Frank Wunderlich wrote: > From: Frank Wunderlich <frank-w@public-files.de> > > Add compatible string and clock-definition for mt7986. It needs 4 clocks > for PCIe, define them in binding. > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > --- > v2: > - squashed patch 2+3 (compatible and clock definition) > --- > .../bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > Reviewed-by: Rob Herring <robh@kernel.org>
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index 98d3f0f1cd76..57d0e84253e9 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -48,6 +48,7 @@ properties: oneOf: - items: - enum: + - mediatek,mt7986-pcie - mediatek,mt8188-pcie - mediatek,mt8195-pcie - const: mediatek,mt8192-pcie @@ -78,9 +79,11 @@ properties: - const: mac clocks: + minItems: 4 maxItems: 6 clock-names: + minItems: 4 maxItems: 6 assigned-clocks: @@ -161,6 +164,20 @@ allOf: - const: tl_32k - const: peri_26m - const: peri_mem + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: peri_26m + - const: top_133m unevaluatedProperties: false