Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13330556rwb; Sun, 27 Nov 2022 04:07:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf7JkV/F2cO0Ybzw/of6+bDtaoRUqlwKPkx4XVwN3MsXJWX5/WNL45++POfmniKIncfdjRhP X-Received: by 2002:aa7:cc8d:0:b0:461:15f0:a574 with SMTP id p13-20020aa7cc8d000000b0046115f0a574mr43791040edt.187.1669550825884; Sun, 27 Nov 2022 04:07:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669550825; cv=none; d=google.com; s=arc-20160816; b=eQnQ8+SfrIoLqUAUQIg+o0KH525fdcj3eP49+dzc8Bpppd5F6Rjhpu18kbnchd+GkU v9jILamIjm2jgOnYLIcWrKz+ar4c6egS0LOgik+H1oFdWgXXwgRwHVChYR80Pcb+bm3l uGHiSlp7KZ543jNkrYS2Das6MSw6oqASFpRSGNackL+Zrym9xIQSK/CD5Gz7B0HIHe51 oD/dy20S32Y8Q7qtcHfEfyHtQam1ATmjYDPJ9g29v1RX1k6gu9M+0TmekarIpNlNwAv8 iectlEpS3vSEUv4cICH2BKPHJuVx2WxnDuWETNRFqRmLlKswmwsDcbgjzd89xtjZ1AFK /8uw== 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=WALMBuY7INShNtkqIsTso2pECzqOAjCdqYrA13JcDXw=; b=QyaFFpL+tO3+bfAOoSccrg1gEgmXAnjzPbB9IgKLEIDsUW2yM8W5ATMdC/38CStTSA FLYkv9pskR0Egy90G6WwehKDcNytAXaN93nYlcoKsCjQxOIMORIMDWaIQun74InNFMz7 3rcE/+RSy/6sW5+NQdpU3NINSnF4fuSQtRyPwT8yAhzHjmJ0wpXmfDN2IsbuGfXx/84K exw8ILwP5YJLVDT/6rv4oBV+O9H3RNeP2BwVoeVEUCe+O+9xGRtO7L6VWqTGeulbgYem 5D2Kf6SYR6wU5h6p45kMTzQI3EUBDWjHFt8VTB/NpolcMwtfpDWpJcnhyw1/AH5fJD50 hYyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=XuxAvDBU; 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 i10-20020a0564020f0a00b00462e7873c10si7797865eda.337.2022.11.27.04.06.45; Sun, 27 Nov 2022 04:07:05 -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=XuxAvDBU; 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 S229680AbiK0LmB (ORCPT + 84 others); Sun, 27 Nov 2022 06:42:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbiK0Ll6 (ORCPT ); Sun, 27 Nov 2022 06:41:58 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42FC37663; Sun, 27 Nov 2022 03:41:56 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 695BB100816; Sun, 27 Nov 2022 11:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1669549314; 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=WALMBuY7INShNtkqIsTso2pECzqOAjCdqYrA13JcDXw=; b=XuxAvDBU/dA9L0XpYju7LNucCOGdJ3ucbio+7FpEIVQearil4yD1Va5Qy+9CRMZRPN4eoF 5xAj0+O7HKlGiDdfGpJ0NKVO+ZUiNvEQrWacd5tS6/V0uHKn6W696osxitDSeqgnXj9eds SAbjxoLduDVBLk+pbqX0YdMIpV/A7t8= Received: from frank-G5.. (fttx-pool-217.61.157.144.bambit.de [217.61.157.144]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 1C7EE122713; Sun, 27 Nov 2022 11:41:54 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Lorenzo Pieralisi , Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Krzysztof Kozlowski , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Greg Kroah-Hartman , Matthias Brugger , 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, AngeloGioacchino Del Regno Subject: [next v7 3/8] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Sun, 27 Nov 2022 12:41:37 +0100 Message-Id: <20221127114142.156573-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221127114142.156573-1-linux@fw-web.de> References: <20221127114142.156573-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 Reviewed-by: Matthias Brugger --- 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 bc90f0ec7bd9..ef5cc1fc4d10 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: @@ -90,15 +87,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 @@ -147,6 +136,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