From patchwork Tue Oct 25 07:28:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10554 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp860397wru; Tue, 25 Oct 2022 00:35:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4xj5Zn1IdF3otIk5r9Xw4EgW+xVh1iUqgfVzKNzoQh5fpMJ5np7lK4d8ZqbcRWdvIYrfvH X-Received: by 2002:a63:5950:0:b0:459:35df:3014 with SMTP id j16-20020a635950000000b0045935df3014mr31289630pgm.325.1666683316594; Tue, 25 Oct 2022 00:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666683316; cv=none; d=google.com; s=arc-20160816; b=CeNWsJWBbo44yTpAtCK45IG4HU5jEorIUhSzWJi0HKz2JdBzX85K3LejSzWSyXMEV9 huhoJv11TVzHfxLB9zZzLCKVcXB31f/5/GFlBzFInvd8VxL8NJDCTVyhv409SFJO5LMp 60Np+FK8JRkMmdFn31OH6Hs46sHg8bq7uUtSJzXkumXsDaHYFWKSAukQ9RNkIt/8Bsl7 P62Z8j2Ed/SnE5FgcAQgWofGbbTv2UTY87ZfQp97aOqKF2zbW5fcfyAjkPWteVo0+CLl VdJFhtSwcpFFHDB/7T4qXER4KlRc5pk7qTpfBhvo/Ib1XlkueEqc/xutU5W2ctmiKjMv cZww== 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=+kRaqG6/0b8n/dJhItF3var/jK1C82waL6qs7ymv9gY=; b=pNqeFAznmsH+XW6KJW1QXBmt3oFiSI1gJANAyEWmW5LsF234V11eZCAkFK6HzTGMwu ZbGY26i9D3eEVo8ya5oqPJsCbrzGn/JoJjWipE7Jx17rsV/E3lgGAF6Vp7JFRaa7hAXy 4C+RvZuCH9nlCBPgevOClCkGkcMCZeJWll4n8IZJX5rV6sGNR/OsbqwdZe5ikPnMBr2V W0Yzymk+A1TiFmFScnOCwHVmAGp3Ry0xZiQvZYHivINSpNfn4J577faMtCJDnAqYaIOE gGY0YndANyUNL347I/QEbgxcpE54gna5oK5+n5k9C9/UXRQbxbczqW24j4LDt4XwvQDR cOvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=L3q9XlMI; 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 y2-20020aa78f22000000b0056783062eaasi2044363pfr.23.2022.10.25.00.35.03; Tue, 25 Oct 2022 00:35:16 -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=L3q9XlMI; 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 S231484AbiJYH2w (ORCPT + 99 others); Tue, 25 Oct 2022 03:28:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbiJYH2u (ORCPT ); Tue, 25 Oct 2022 03:28:50 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7986013738C; Tue, 25 Oct 2022 00:28:48 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout3.routing.net (Postfix) with ESMTP id 7D6FD621A8; Tue, 25 Oct 2022 07:28:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666682926; 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=+kRaqG6/0b8n/dJhItF3var/jK1C82waL6qs7ymv9gY=; b=L3q9XlMIEzQfBzcMd2h96nZTMH3hhJJrPl0iGtcPZb3115pXKUd1ZA0WXl7DYeJOpOcNmS +KzZX4DuulBV8s5eLxIzFA0TXOSxvTrj0VRzW6nZeZnDe8MdM+C2bp3wcw4tiltyFHXhDR 56iPd0aGK1ofd/2HxTpDCaI27GV80qc= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id C4ADB10086A; Tue, 25 Oct 2022 07:28:44 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring Subject: [PATCH v2 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Tue, 25 Oct 2022 09:28:36 +0200 Message-Id: <20221025072837.16591-2-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 X-Mail-ID: 2b71bb53-df56-407c-9358-af34211c4bf2 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747644125267337639?= X-GMAIL-MSGID: =?utf-8?q?1747644125267337639?= From: Frank Wunderlich The PCIe driver covers different SOC which needing different clock configs. Define them based on compatible. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring --- v2: - fix typo in mediatek,mt8192-pcie --- .../bindings/pci/mediatek-pcie-gen3.yaml | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index c00be39af64e..98d3f0f1cd76 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -43,9 +43,6 @@ description: |+ each set has its own address for MSI message, and supports 32 MSI vectors to generate interrupt. -allOf: - - $ref: /schemas/pci/pci-bus.yaml# - properties: compatible: oneOf: @@ -84,15 +81,7 @@ properties: maxItems: 6 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - enum: - - top_133m # for MT8192 - - peri_mem # for MT8188/MT8195 + maxItems: 6 assigned-clocks: maxItems: 1 @@ -138,6 +127,41 @@ required: - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8188-pcie + - mediatek,mt8195-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: peri_mem + unevaluatedProperties: false examples: