Message ID | 20221028094317.29270-2-tinghan.shen@mediatek.com |
---|---|
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 l7csp726997wru; Fri, 28 Oct 2022 02:49:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4vhJQ4CxPmulVynW7mwFk9j5emVs9Vkxs9Qy4bldxsG1b8TCUbcwdvJyXtqy51K5R312DR X-Received: by 2002:a05:6402:2319:b0:45c:4231:de18 with SMTP id l25-20020a056402231900b0045c4231de18mr50985919eda.383.1666950589609; Fri, 28 Oct 2022 02:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666950589; cv=none; d=google.com; s=arc-20160816; b=bkCy6/HNVwoj15/ihDY6OwaBNjo0aoPjixYwH3WHhofCIsvZvFfQO8dPqLSSjJqvG1 VFvFEIrdNTOj8CAcovhvQPF2eIsVyO+2Q0P0kagL3lmECb29WJNT+GxRP9lR6XVLGvTB 1wMlu+pN5dXM+h/EYLeZOzY2jpBhAjvysRVlWlxGpejN0kXflzRe1ED8rZH31GsZH78G CnXg+6o+HKjMIadggF/uvW43JQ8poW1ZzJtwNHokvkxGSzbquDGuBV7CcETmV1FpPPA+ AUrLQJhu/l1aVilzrYA06dWK5GTBQgEFrhqooW374M6WuTNQGhE0BuN4bAMRzQjO6Wj2 lKMA== 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=z8DFcu4Y0BNFTtsi7qLl27vlNLxGCpxNh+bimbHT58w=; b=adi0bmwkRy5B//6eqLydLWm1N/50JLsJaA9AVrSlVCsisKZknD8uMXt4tJFQA3TIZ/ utNc2MiMyhbFy11pdS4yxXzO97wF337h6oFdPYT0orlaMBOFmbla2yP9dEZ8sbWuOKDv 6RZq06es9on4NEpGcSGkH+DqDa0LbZoM9cSyNsr2Jfp/uUYI+WusWG4nHFxOxwV0Idll jyUKlJfzd/vmsPpXnlgQsskOtNb7oNm9pkgVwxBL+n85iV2+GMLBdgVEX086a7d6XXGq ErliKGlvFjnGTU9ifBC6WbeXXadkumAokEDNQWlvjRX/YXyDprySi3nV0YBkILE34Kwq G8mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=XjYz+XXC; 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 cs1-20020a0564020c4100b00460ff7dc801si4272825edb.445.2022.10.28.02.49.26; Fri, 28 Oct 2022 02:49:49 -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=XjYz+XXC; 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 S229746AbiJ1Jne (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 28 Oct 2022 05:43:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbiJ1Jna (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Oct 2022 05:43:30 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D621819046F; Fri, 28 Oct 2022 02:43:28 -0700 (PDT) X-UUID: 8d74354aaa0a4c4680368bb3202461b5-20221028 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=z8DFcu4Y0BNFTtsi7qLl27vlNLxGCpxNh+bimbHT58w=; b=XjYz+XXC20IYw5QbMMQkoBhceZFUtrrcx7Fc9xKVrBl4lr9M/S1QzyOaOtUx3ARHPdAPijJGUuWUr8094kfs4KBq4BMfUt+Cg5u9DHf5J/w7kMa82XRslVMKBJHFFhdpUTqFMaLbb7qLGEJgTFJlF0+ebOjAv+NdSQtcOBPcH20=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.12,REQID:4f40ab48-9e11-4a00-8eea-27b1c01592fe,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.12,REQID:4f40ab48-9e11-4a00-8eea-27b1c01592fe,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:62cd327,CLOUDID:57efe68f-1a78-4832-bd08-74b1519dcfbf,B ulkID:2210281728415RYLX1WJ,BulkQuantity:9,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:11|1,File:nil,Bulk:41,QS:nil,BEC:nil,COL:0 X-UUID: 8d74354aaa0a4c4680368bb3202461b5-20221028 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from <tinghan.shen@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1454139993; Fri, 28 Oct 2022 17:43:23 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.194) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 28 Oct 2022 17:43:22 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 28 Oct 2022 17:43:22 +0800 From: Tinghan Shen <tinghan.shen@mediatek.com> To: 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> CC: <linux-pci@vger.kernel.org>, <linux-mediatek@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com>, TingHan Shen <tinghan.shen@mediatek.com> Subject: [PATCH v4 1/3] dt-bindings: PCI: mediatek-gen3: Support mt8195 Date: Fri, 28 Oct 2022 17:43:15 +0800 Message-ID: <20221028094317.29270-2-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221028094317.29270-1-tinghan.shen@mediatek.com> References: <20221028094317.29270-1-tinghan.shen@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?1747924381447776889?= X-GMAIL-MSGID: =?utf-8?q?1747924381447776889?= |
Series |
Add driver nodes for MT8195 SoC
|
|
Commit Message
Tinghan Shen
Oct. 28, 2022, 9:43 a.m. UTC
From: Jianjun Wang <jianjun.wang@mediatek.com> In order to support mt8195 pcie node, update the yaml to support new properties of iommu and power-domain, and update the reset-names property to allow only one 'mac' name. Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com> Signed-off-by: TingHan Shen <tinghan.shen@mediatek.com> --- .../bindings/pci/mediatek-pcie-gen3.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
Comments
Il 28/10/22 11:43, Tinghan Shen ha scritto: > From: Jianjun Wang <jianjun.wang@mediatek.com> > > In order to support mt8195 pcie node, update the yaml to support new > properties of iommu and power-domain, and update the reset-names > property to allow only one 'mac' name. > > Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com> > Signed-off-by: TingHan Shen <tinghan.shen@mediatek.com> > --- > .../bindings/pci/mediatek-pcie-gen3.yaml | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > index c00be39af64e..a9013c10131a 100644 > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > @@ -70,14 +70,21 @@ properties: > minItems: 1 > maxItems: 8 > > + iommu-map: > + maxItems: 1 > + > + iommu-map-mask: > + const: 0 > + > resets: > minItems: 1 > maxItems: 2 > > reset-names: > - minItems: 1 > - items: > - - const: phy > + oneOf: > + - items: > + - const: phy > + - const: mac > - const: mac Sorry, this looks a bit messy. I can propose two solutions, either: reset-names: minItems: 1 items: - const: mac - const: phy ... and change the order in mt8192.dtsi; otherwise, something like allOf: - if: properties: compatible: contains: - const: mediatek,mt8195-pcie ... invert reset-names I think that the first solution makes a bit more sense though, as the PHY reset may be moved in a PCIE-PHY specific driver instead of being managed here in pci-mediatek-gen3. Regards, Angelo
On Mon, Oct 31, 2022 at 02:28:54PM +0100, AngeloGioacchino Del Regno wrote: > Il 28/10/22 11:43, Tinghan Shen ha scritto: > > From: Jianjun Wang <jianjun.wang@mediatek.com> > > > > In order to support mt8195 pcie node, update the yaml to support new > > properties of iommu and power-domain, and update the reset-names > > property to allow only one 'mac' name. > > > > Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com> > > Signed-off-by: TingHan Shen <tinghan.shen@mediatek.com> > > --- > > .../bindings/pci/mediatek-pcie-gen3.yaml | 16 +++++++++++++--- > > 1 file changed, 13 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > > index c00be39af64e..a9013c10131a 100644 > > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > > @@ -70,14 +70,21 @@ properties: > > minItems: 1 > > maxItems: 8 > > + iommu-map: > > + maxItems: 1 > > + > > + iommu-map-mask: > > + const: 0 > > + > > resets: > > minItems: 1 > > maxItems: 2 > > reset-names: > > - minItems: 1 > > - items: > > - - const: phy > > + oneOf: > > + - items: > > + - const: phy > > + - const: mac > > - const: mac > > Sorry, this looks a bit messy. > > I can propose two solutions, either: > > reset-names: > minItems: 1 > items: > - const: mac > - const: phy > ... and change the order in mt8192.dtsi; That doesn't work because originally 'phy' alone was allowed. You could do: minItems: 1 maxItems: 2 items: enum: [ phy, mac ] But for 2 items, either order would be allowed. Not great, but not a huge deal. > otherwise, something like > allOf: > - if: > properties: > compatible: > contains: > - const: mediatek,mt8195-pcie > ... invert reset-names > > I think that the first solution makes a bit more sense though, as the > PHY reset may be moved in a PCIE-PHY specific driver instead of being > managed here in pci-mediatek-gen3. That either makes sense or it doesn't. If it does, then you should go ahead and separate the phy rather than change the ABI twice. Rob
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index c00be39af64e..a9013c10131a 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -70,14 +70,21 @@ properties: minItems: 1 maxItems: 8 + iommu-map: + maxItems: 1 + + iommu-map-mask: + const: 0 + resets: minItems: 1 maxItems: 2 reset-names: - minItems: 1 - items: - - const: phy + oneOf: + - items: + - const: phy + - const: mac - const: mac clocks: @@ -107,6 +114,9 @@ properties: items: - const: pcie-phy + power-domains: + maxItems: 1 + '#interrupt-cells': const: 1