Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3225196rwb; Sat, 12 Nov 2022 01:20:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf64jXrPzRO4H6RfCwNb3Bbz1Bb1jfCfnUjTAt8zewymh75JOL6KADfI23hOuvdvWaHG+zj0 X-Received: by 2002:a63:d0b:0:b0:438:a750:99b7 with SMTP id c11-20020a630d0b000000b00438a75099b7mr4682497pgl.605.1668244857716; Sat, 12 Nov 2022 01:20:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668244857; cv=none; d=google.com; s=arc-20160816; b=yI8SsdhNLEnPyNnBnIOwlmSs79eehrvcmJzCgwLPrZsh1DJiinngGBxnTl1H/xFuDy p6WLKuckdPUURX7PLCagu2AjefdWCQdLWKbXjPZZQ9wUhQUKN1Yf9MI5uc/+o0PrCHRP ihPllCGg1y1qb80LrxFbrqUBKiGN1NL+cNCbsfxtBtsRT+QroXNkD4Y3Qk2vjEIkQm1s WQ7bgW1Jd8mjhDv//jAORNdveeKAuSBOz53mvtQac7s3zD/sHQ46SxSlEWBmgvHa3htn 6nm4aJzTBCvTukMLfsFL+Q2ibzw9Pul7Oaz2hAEUqabofnRA08rOFyf/Myffu5SOZ5n0 da6g== 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=OaWf3qjjR7qXqnVUdNYm0fg2Fkt2lXEHVHwEltIrxBA=; b=dRX44mnCBf3ZpQC7iSZHibivKneWr9am2UXJxtXhSol0vdX4jiqBQlb5+n2AnIZFXu HSvWIh5kV7/kBZXofY05FiaCQEquc1r/Thl25FDMom2UJbNq00YaL0iI4emVJ5viYKBx ubghTs25/2uEItJqaaRH9IBrCtrUYFZamGrX2M/MAkSpcqt18nDaFQC2ScwgcK8/32kw LssU+YIaK35WmvzuaMBMq56lbPYGtkOX5zcKHLD4C21xt3aTgkwWMbqz8oLl+YtVFWtq y8CUBaEZGrroSU0G3bw8M0WEPfL0dbVV8GJi2vDP5aX8e+zaHLVLIFFqCCr6L9nUV+u+ VxzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=vpRZ03LY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a63f741000000b00439ae52c996si4545096pgk.71.2022.11.12.01.20.45; Sat, 12 Nov 2022 01:20:57 -0800 (PST) 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=vpRZ03LY; 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 S234809AbiKLJPv (ORCPT + 91 others); Sat, 12 Nov 2022 04:15:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234267AbiKLJPl (ORCPT ); Sat, 12 Nov 2022 04:15:41 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B68E615FF5; Sat, 12 Nov 2022 01:15:39 -0800 (PST) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id EDC9E4049F; Sat, 12 Nov 2022 09:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668244538; 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=OaWf3qjjR7qXqnVUdNYm0fg2Fkt2lXEHVHwEltIrxBA=; b=vpRZ03LYG+i3I6+Min23afHPEBbMWy7Wz8iiDaYybbM08KY+aGpddbRH5IFTPL/QyusYuQ fUV5sc89N////scmAyRiXllnJ+35VZwlcJ08sxqAf1ZmVBn1erI3EKg8UeDcSMl8RVkykY lKKK8aZXjKtfwPFrYig38gPq9JYlfdg= Received: from frank-G5.. (fttx-pool-157.180.227.41.bambit.de [157.180.227.41]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id D6583360217; Sat, 12 Nov 2022 09:15:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Rob Herring Subject: [PATCH v4 04/11] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Sat, 12 Nov 2022 10:15:11 +0100 Message-Id: <20221112091518.7846-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221112091518.7846-1-linux@fw-web.de> References: <20221112091518.7846-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: 9d62bb0d-11b4-4200-84cf-08d93f4e105f 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 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 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 v3: - remove contains to match only if compatible is no fallback tested with series "Add driver nodes for MT8195 SoC" and mt7986 pcie-nodes, dtbs_check is now clean --- .../bindings/pci/mediatek-pcie-gen3.yaml | 47 ++++++++++++++----- 1 file changed, 35 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..5d7369debff2 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,40 @@ required: - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - if: + properties: + compatible: + 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: -- 2.34.1