From patchwork Sun Nov 27 11:41:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13056717 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EAB17C4321E for ; Sun, 27 Nov 2022 11:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WALMBuY7INShNtkqIsTso2pECzqOAjCdqYrA13JcDXw=; b=NKO691dQKLKYja JufDgHR1C5/Rkiy331p8nFEhc/xXR8phv6kOsDRGd13a0s4HTDu71GsBLA+u270ExzDNmV+YnlD4R s0tQEz/DJUZgvOAz2z6Otg7mSqphXJsmetKp/bB6MkMjFDJD4/b00WzVA4J1TxNaXVwFspHJu0cgv L6DPFLoQ9I5i7ZMEEqDYcmg9Ajiux0jmXsKBuma6vmKSTW4FJSjJIjrf30X1VddWWE104ClNBlpwB oz0pvJtLf1krp9DkZ0KEuBmWLV13cB4VHowqbO8447ippQyLBPJcAGoJOeDhhgzypSD3YKI5WVUwH euHHNvhtbgr6Fui3nC1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozG4M-00B635-G0; Sun, 27 Nov 2022 11:43:34 +0000 Received: from mxout4.routing.net ([2a03:2900:1:a::9]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozG2o-00B5JL-SL; Sun, 27 Nov 2022 11:42:01 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221127_034159_104947_78640416 X-CRM114-Status: UNSURE ( 8.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kishon Vijay Abraham I , Rob Herring , Ryder Lee , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Greg Kroah-Hartman , Lorenzo Pieralisi , linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Jianjun Wang , Chunfeng Yun , Vinod Koul , linux-usb@vger.kernel.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , linux-pci@vger.kernel.org, Bjorn Helgaas , devicetree@vger.kernel.org, AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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: