From patchwork Sun Oct 23 17:02:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 8062 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp69938wru; Sun, 23 Oct 2022 10:08:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6NE4XrX7rHE+RTZmJZdM7KoQU1BJh0Mfor30nOyymjj9RBv+hVveq7oP7MhufPJ1mA3b+b X-Received: by 2002:a63:5d5b:0:b0:46e:f010:d0f7 with SMTP id o27-20020a635d5b000000b0046ef010d0f7mr4971315pgm.585.1666544931633; Sun, 23 Oct 2022 10:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666544931; cv=none; d=google.com; s=arc-20160816; b=gdvjpwh/P95KQz4GK+yr9jpxSsZpPVQVHHYpnLkfp5Pdz76l2jLmd367ZuEzU9524q XbK/WIl/ComfsvvWls+czXQgnpGYddeoNiPwEq63amVj7Dp/cM0GmWH9EJtuQ1FcT0K7 ZybQMYVhmBEPgOYmQHrxV2Zx/81SgHCRGmaTpUttHtgZKRS7v1dII5xLNNKx53HqINUd 8WF7ExeVuijmz6C7wRqsjDb10N5LlHns+RJLE9iRSAfpydu+UJqSvRb2e4KGdrL7PM7Z GAjbdhNitkg55QzQouiBEk5erfnLuwiu173SQFZEWDKmCtaTWc5eFuOX64AttnPOnY5J 7yIg== 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=rwFE1JpvVkZhLIb5aKidjKDQSmDh1ZnGM4I9BlBkkQ0=; b=nwLI95r7BbxaNfLTT22q8DTcTt7m3svIpoZFVDDLa7UoTo9v54DgxHFR6si4g+K5xq LLA91soJzRvOxvRUOECaM1PPBr1V0Jh2CpaEImxjqPBmfwTWyXwvs1qsSfMnXn1RSQEa t3CgQ0LK2RsrsUwD3AaX+vYbmdhU3ivzwe7nBt14YgIDThIJZCv8fcnqvNicvmxiOcEM lAqA94QuOJe+uyIui4I19KLti7AKKW23hCSJJ5zbHleJTOF44Xoj5WSxaPmpWaDH5aJp pkv7GTQ0OegFcUOQ2FO6408l0hiT7+Yuk5/EkwMD8UUU4EFoYa5/s5rCjtmMA3wn9nYg sFdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=alwcOCNk; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a170902860100b001868bdb66cfsi4664019plo.461.2022.10.23.10.08.37; Sun, 23 Oct 2022 10:08:51 -0700 (PDT) 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=alwcOCNk; 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 S230481AbiJWRC4 (ORCPT + 99 others); Sun, 23 Oct 2022 13:02:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbiJWRCv (ORCPT ); Sun, 23 Oct 2022 13:02:51 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C097767C92; Sun, 23 Oct 2022 10:02:49 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout3.routing.net (Postfix) with ESMTP id BBD56605C3; Sun, 23 Oct 2022 17:02:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666544567; 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=rwFE1JpvVkZhLIb5aKidjKDQSmDh1ZnGM4I9BlBkkQ0=; b=alwcOCNkQtKqt/7V445bxa60qOfa5UV59BT4a32jeGPRkwkcxDMqzhVGH0TVru4LLcAHAs MaTr24wkkSaITF6YXJ7xBs3Oqn76V6+n+ttD0T/KMEGxAsOID5BZntT9b7sDDY3D/W8kln E2DEQMSIJtv+QXa1uSd9sh17OE0EFL8= Received: from frank-G5.. (fttx-pool-80.245.79.234.bambit.de [80.245.79.234]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id ED33C100671; Sun, 23 Oct 2022 17:02:46 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Sam Shih , Steven Liu , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Sun, 23 Oct 2022 19:02:32 +0200 Message-Id: <20221023170234.83621-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221023170234.83621-1-linux@fw-web.de> References: <20221023170234.83621-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 7c9c4be7-094d-4990-85c5-a3a195e083f8 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747499018340288098?= X-GMAIL-MSGID: =?utf-8?q?1747499018340288098?= 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 --- .../bindings/pci/mediatek-pcie-gen3.yaml | 48 ++++++++++++++----- 1 file changed, 36 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..af0d2201746d 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,41 @@ required: - '#interrupt-cells' - interrupt-controller +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-mmc + 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: