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: 13016352 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 1DC65ECAAA1 for ; Sun, 23 Oct 2022 17:03:12 +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=rwFE1JpvVkZhLIb5aKidjKDQSmDh1ZnGM4I9BlBkkQ0=; b=TuzQEf3L/HtoUu MTm2P2VnIu+hyo+soS9M1kiZh1pTgU+exeUZYMFDttkoio9ZasN6ygR3Q60SYqWcDxEgBp48d9o6M Ho3g/MgIoxz28Z/s5XTX/39sqLpTJbfTMG0bIORF2S0elMpfyHoLFlcwZueswknG6GQFfFY1aOv8J 8rz2F4uw6jlW+jU7pZkAOS6DUjUo64GO3zW047xJsTGwSOxCmPYKRjHfKelH4n7KymYYAhR4idZ/m T5o6fXo+Jfeq3SObV+y4kXhXeqAV46pDCnLEtUqYFv7ECTdyDt9JMAA628ESJEnS56ptrB89KZxqM 0tan1HVW1DFzgN2eIKpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omeNM-00FmNM-MM; Sun, 23 Oct 2022 17:03:04 +0000 Received: from mxout3.routing.net ([2a03:2900:1:a::8]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omeNB-00FmJE-Bs; Sun, 23 Oct 2022 17:02:54 +0000 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221023_100253_572327_CF7CADFC X-CRM114-Status: UNSURE ( 8.50 ) 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: devicetree@vger.kernel.org, Ryder Lee , Steven Liu , Sam Shih , linux-kernel@vger.kernel.org, Jianjun Wang , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-pci@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org 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 --- .../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: From patchwork Sun Oct 23 17:02:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13016354 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 AA17CC3A59D for ; Sun, 23 Oct 2022 17:03:28 +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=+/+qwOcJ+Ykv/tsQAvaNcC2RFDOgqrMsuP9mqjxWRnA=; b=Z9gz5Dg37I6lPm sCJhj4JLDizwLAU4jHqTSWrlp+0ANr9j8PqGWcBLJuupW78GdVb5nokqX+jC6Kop/0z6OH+6OhIBq wUTrheGiruFfYRrDfQmzoCfy1Z/zkDraBbB0FyHfaf8TJM3n7rVPWwjM/mzfY3xLLYrhRCKzvzjpa ycbgp5h2KK5ak0eMnA4RGedvjnEKPmXjeN5ceGPFOSk1xOgyTfZGd7OR8xywkfptzHX6RSIsscZvj DdJqWfXLgNglCXVhFDgXku7dIRUL9AlfKzjgh65rI/3PKKGHziKxsZIDoM5WXnL7eNm/lwaw/0Hzi NXPZ21AOcJl+DV9M2p4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omeNd-00FmQa-5w; Sun, 23 Oct 2022 17:03:21 +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 1omeNB-00FmJG-P6; Sun, 23 Oct 2022 17:02:55 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout4.routing.net (Postfix) with ESMTP id 895A710085C; Sun, 23 Oct 2022 17:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666544568; 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=+/+qwOcJ+Ykv/tsQAvaNcC2RFDOgqrMsuP9mqjxWRnA=; b=LVZpdg+qdJ8mDixU4po/b2W0QM58yN/XDmsrGJHfrBjdiWXN6UFnr/hVnILmrgliAOQ7KC uc1xHy3g40URxyRYBgMtTzX6EZvo5rYzXk1OCBPIwatL2+xtedyt/UNqmzFlsc9RHt6Pzh MQSAy4BKccYrLk2GW1OdKaRjcFqtKxE= Received: from frank-G5.. (fttx-pool-80.245.79.234.bambit.de [80.245.79.234]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id B2C9F100352; Sun, 23 Oct 2022 17:02:47 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH 2/3] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Date: Sun, 23 Oct 2022 19:02:33 +0200 Message-Id: <20221023170234.83621-3-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: faab5a44-dd36-424f-82ff-370abfa0d751 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221023_100253_980505_A2A1B95A X-CRM114-Status: UNSURE ( 8.12 ) 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: devicetree@vger.kernel.org, Ryder Lee , Steven Liu , Sam Shih , linux-kernel@vger.kernel.org, Jianjun Wang , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-pci@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Frank Wunderlich Add compatible string for mt7986. Signed-off-by: Frank Wunderlich --- Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index af0d2201746d..3662422b38ea 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -48,6 +48,7 @@ properties: oneOf: - items: - enum: + - mediatek,mt7986-pcie - mediatek,mt8188-pcie - mediatek,mt8195-pcie - const: mediatek,mt8192-pcie From patchwork Sun Oct 23 17:02:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13016355 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 F2E49C3A59D for ; Sun, 23 Oct 2022 17:03:36 +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=eWQAyMiyLzRjICRckdk9i8etw2ozKINbfjBDA1F++Do=; b=yCt20svIBkEb40 gl1ujOxmrRmNNc5t/+L9MCRRlP2XPV4mCvl9KrVO1omk6H47iLWkGAH5nfzkpbf2Upc5SzZXP8BFS q8rQg/QB6noqAAKgyFWHaEWIOz+XDt3mc93XKXlRAHFeg3xxxXf1dEOe9XrqcCkdBPJECy6du1B5H qS12cS4Fg1rRV/RlJeN530KgT/66cvrF+VsQ/RpmO4DAYUn91C/omxK1BUH5rO5j3987t3Lw0vsNE /vIEp4vp7SpEaznmuZXBp+TWQDmsd8ZBjX+nfFuoVRh2/hEZVdQpN9RoiBQgLEvdg+HJgx0O0zzdy SyQYUTZygyt8YgrmxOww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omeNm-00FmUo-UD; Sun, 23 Oct 2022 17:03:30 +0000 Received: from mxout1.routing.net ([2a03:2900:1:a::a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omeND-00FmJI-Ek; Sun, 23 Oct 2022 17:02:56 +0000 Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout1.routing.net (Postfix) with ESMTP id 5DE374026F; Sun, 23 Oct 2022 17:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666544569; 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=eWQAyMiyLzRjICRckdk9i8etw2ozKINbfjBDA1F++Do=; b=YpLBExZbOZiWWo4PCJib0wv7vZGXwRFeIvhqjrwDGbwI20KyvCqWOs+7KALnjuMK8YkkVf 0K2TX4DNbVQcNOevXi0BPkkYjbpfUZAc4kiuVklwwRuUsHVxPFJXYTEEUvBEj5k9Oxpbdi /QvL4Rx4b0p4KFzX+b+8sCOpI2Mazc8= Received: from frank-G5.. (fttx-pool-80.245.79.234.bambit.de [80.245.79.234]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 803AB100671; Sun, 23 Oct 2022 17:02:48 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH 3/3] dt-bindings: PCI: mediatek-gen3: add mt7986 clock config Date: Sun, 23 Oct 2022 19:02:34 +0200 Message-Id: <20221023170234.83621-4-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: 4dd0b3e8-60f4-4111-8ab6-3e4dc2df3d56 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221023_100255_654801_0CAA3279 X-CRM114-Status: UNSURE ( 7.20 ) 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: devicetree@vger.kernel.org, Ryder Lee , Steven Liu , Sam Shih , linux-kernel@vger.kernel.org, Jianjun Wang , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-pci@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Frank Wunderlich MT7986 needs 4 clocks for PCIe, define them in binding. Signed-off-by: Frank Wunderlich --- .../bindings/pci/mediatek-pcie-gen3.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index 3662422b38ea..e6020e684c00 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -79,9 +79,11 @@ properties: - const: mac clocks: + minItems: 4 maxItems: 6 clock-names: + minItems: 4 maxItems: 6 assigned-clocks: @@ -162,6 +164,20 @@ allOf: - const: tl_32k - const: peri_26m - const: peri_mem + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: peri_26m + - const: top_133m unevaluatedProperties: false