Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2326979rwb; Thu, 17 Nov 2022 09:17:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf54vcW1r2WGj4+3RMqisW0bxEUsifKOIrT0TMPwu1ELrC4XWBUectaFZuubzBYxkaUdgxaR X-Received: by 2002:a17:906:9148:b0:78a:643e:6892 with SMTP id y8-20020a170906914800b0078a643e6892mr2904362ejw.662.1668705450445; Thu, 17 Nov 2022 09:17:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668705450; cv=none; d=google.com; s=arc-20160816; b=doNn0eKLw0Z2Fkken7p9vMYsbHeLxHIQoNojEDqQghN+O7ilWs94g5FFvkpzP5PQPA vFMKWBXYtVqVE59jTF5z/Se/j9ZJMUG/xQiR6Kvr36S3+WErNPPgFgZCdK7NUa/WJ8d+ etdJwWvo/juDL76chtS4vW9zIFbG7yTmBXAwR69V/nJxSZQ3VD/Lrg29//pXXfB/Lwa/ d6ODD0DAT+euxrgD/idCCNa2A0im4eJUP2lQhsHA7eQEfl653VZOGnd0EYluoYn53c/Z GrG36GhqGHdruuPAn2uxBpIm1uhaBEyZa8G8sC2jf3zHzh9Rxq3Eazu/gQ9F6JRuTH1F ereA== 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=6YDvN14LGzYl2jRSkK1fRlKatqJWzuwYk+eXtAY5bVg=; b=hdiOfhmu3NzuKIcs38pLSrSRbWHXG5lC303tKSd2DiRUv6l6cuj1rj9mRNCdg/S0Yh 3K9ZM7jtc4Tv1qMboQdLy+e+uyxGMBaxMzrFL1FRoXv8qFbezKQHeTTeKLCu+IvI560V 5J1njhZie8rqCHS6/dPco3M5xd+dQgF2TPl/H16HXt/hOI4OW4AjkWO1tkKCJX4GWeMt 1gmCvwtsFk3onTFp5n4fd+v9Upf7za/FFlQFutfFEdX38f+TjvFZtU/JupHjvCnddGWR di0mtiBGGfbkxvxl4HksgNBvOJQS4SNI9oVfgRTSTNL/I9v9LRaU3kk46s97Q5SlG3/A Elgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=FZJ8GRf6; 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 f17-20020a056402355100b00463a583166asi1408484edd.197.2022.11.17.09.17.07; Thu, 17 Nov 2022 09:17:30 -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=FZJ8GRf6; 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 S240624AbiKQQ26 (ORCPT + 92 others); Thu, 17 Nov 2022 11:28:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240441AbiKQQ1u (ORCPT ); Thu, 17 Nov 2022 11:27:50 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 634B17C034; Thu, 17 Nov 2022 08:27:40 -0800 (PST) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 7CE755FC7C; Thu, 17 Nov 2022 16:27:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668702458; 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=6YDvN14LGzYl2jRSkK1fRlKatqJWzuwYk+eXtAY5bVg=; b=FZJ8GRf6FgEFFkc1VVnq/EfBYEeG14ApCk1z41appnSUL2K6078ALn3TQ2WlneDbet25sZ ymPMhRU/8lTpCAmnfGpoRmSDvAXJNPjygfusRMP152Hng5ynUcYMUv28FbEKk+GOvbNcsR 0PLGVE9f1li4BxK5e9IvEZXUxPX/U7Q= Received: from frank-G5.. (fttx-pool-80.245.75.65.bambit.de [80.245.75.65]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 1FED6100767; Thu, 17 Nov 2022 16:27:37 +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 , AngeloGioacchino Del Regno Subject: [PATCH v5 04/11] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Thu, 17 Nov 2022 17:27:21 +0100 Message-Id: <20221117162728.20608-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221117162728.20608-1-linux@fw-web.de> References: <20221117162728.20608-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: b30333ce-cac8-435b-aa3e-e3dc0e1bf3bc 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 Acked-by: Jianjun Wang Reviewed-by: AngeloGioacchino Del Regno --- 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