Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1016862rwb; Fri, 18 Nov 2022 11:23:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf4wYXmPNhDhdKfwEA4LWXo42slmm6rSnzCh0xifksDwAiAm6W5OQNa8TEprX1er2KWg6HdF X-Received: by 2002:a05:6402:345:b0:458:fc30:f1ff with SMTP id r5-20020a056402034500b00458fc30f1ffmr7416052edw.132.1668799386535; Fri, 18 Nov 2022 11:23:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668799386; cv=none; d=google.com; s=arc-20160816; b=GcdEaj8rlP3i50UhBFTONtomBZwEJpAGtIkx3Rac0xe3VRvZgM9G9BLaG3y/hyiMJj h+NMvvJlQPb7Nm0ABDZgKufEo+ks1YYmtZMtmqMVV4/YGb7AmoJizAi/uwP2z6KFNofO BEJlJdbUpvN3Y5oU7Dom1BLLA2xMSW0/8JBJ8bf7jkCtBBaK757LjtWdMJyEUsBYzPK1 11yvjdsrKDyu9fe6Y2lWnveOA+BoDiyOTr8UE0ZQtuQ/0lvqX4ZSBeXqKeU5WLXGD5Mg yp+Y7K8kIoYh72yOudph43/2rouyLHGKrZV5Lf+uyd9igDwzeW9iAvmxMXjvEcZacs6k 2b2Q== 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=dgMnJrAKALYS/eu0mejHEd8SG4lBqFohwI9tx7/inPOUJPUes2fYh0lqKBCZCXfUTg 9hIP/8Uood2bI6CXO4RyGyzN5SduTD0LXzkZ+DseYeOIRUB4yPdU0Gc2yv5/dhe+2Ilb QjGiSOkiG7n1Vi0UsjaDWTMJnt9gN1DxXGXXvbeA5LmVxhH4MLMTP+1G/x1eZ/xJ+p89 0aLqD3njvAS1L+TkZaoZxvDkPK68hb7MqhEqEYwP3vjGm134drU8/3LhLgY9TapB6bh8 LBIkixC079C+Urh71dS336lSSeKuEXcJog4FNlUKUJO+yt5QfrEEox/iaUdeGM0hlpuS SvNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Bg8VOojR; 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 f13-20020a056402150d00b0046900e66a54si2608772edw.517.2022.11.18.11.22.43; Fri, 18 Nov 2022 11:23:06 -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=Bg8VOojR; 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 S242975AbiKRTDC (ORCPT + 90 others); Fri, 18 Nov 2022 14:03:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242957AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D7A21893; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 8838A100995; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798097; 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=Bg8VOojRqjXpMbnvcQ0BS7YLdq0qU/ixxmd4qWW8aTSiRMhNppN9n3ZX6yXL3D63iLfYKj RmsCghVZLHDx+vGs+y0zv+f0pci1vrv67b1npT/kLsrner+k1nETyiF2ELJfEXbvJPfkCH oS6CyKYn3XmZdV61b/HV8DvuS1oWzow= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 365341226BC; Fri, 18 Nov 2022 19:01: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 v6 04/11] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Fri, 18 Nov 2022 20:01:19 +0100 Message-Id: <20221118190126.100895-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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