From patchwork Sat Oct 29 17:58:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13024750 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 BD3F3C38A02 for ; Sat, 29 Oct 2022 17:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VAuXvxjmiECf3GjA+Gjblg+YrVE2ohyDilOUvtUxJGI=; b=uBytmhIquBsr3Z /ZHkuFoLqq0iSvnBejFqHStWoQWFpnCqlFIMoXfRNoL2tjn7iL3Vpm7DMUpLACaxc5Xz2up+usDhX X65yS4dEcnNUDDoQy7aBWDM2AzJ2qCe2qxiwmj3Oc3j0P26jaPrG4uWoSOTZdnwBZepHL7iWT2pWx yTrKo7wG5iQP1IpfDjqHuWekFrC1wAksbxAFrO1J7qkEUPL1xSqweRnYAmFNNHgHWoBK2GPWO3SI3 ztP2EnqkIDf9OXYJlTb1axWZ6q5iO2djWAZA1JLnPVqFu/lFmse3MIXcpIfaGsNQPtvuJz5aLvu/Y dLHOYUCyM+G6iVbPaztQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooq66-007lg0-Dy; Sat, 29 Oct 2022 17:58:18 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooq63-007lXC-Cs; Sat, 29 Oct 2022 17:58:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=public-files.de; s=s31663417; t=1667066289; bh=/287IqXU2M48jGY5dOJDRNgS48sMz8IqBXXdIAdLiD0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OEZ7vXKHFGYr5iTatp0Mwf0R/6aU69uMFAJ5ju25G6w4WNCPHeP5if4FQOOfzEtuI d8jZaYQ2TmMQI+mrwx5TJtNU09L6frWZy/lcvgHfb0yZEs1qbI9LSoNBYOa6OxPkQA toR9N3hdSMgptBhWiNZzHsJoKCllTBxDac92atC7eAm6ytGiP+hEAy7Nk8rtjPkn/E ycg7248ChumOo8rJv4BmNrEtxTWCoNicRgJx0pRup5M4MCL1E5FnKZtfGC7CM94Dwx sRuUKZlKGdcOBVGUuuJRnPC7zas7EE7FWMvv9b/q/Z+C1NrHE9HqgB8PvoS2lyXO92 TPnvvxdJNsg8g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from frank-G5 ([217.61.156.178]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N4hvb-1pES5G0Iq7-011fuP; Sat, 29 Oct 2022 19:58:09 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , 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 v3 1/2] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Sat, 29 Oct 2022 19:58:05 +0200 Message-Id: <20221029175806.14899-2-frank-w@public-files.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221029175806.14899-1-frank-w@public-files.de> References: <20221029175806.14899-1-frank-w@public-files.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:zso9H8enCAQo27e7CXSDU6tiEbUwr+oh4l121T5GOU6gypCw1bz obMOVr7UT7T61f1vuFU5NEB1PwDhAtl0hbJdW4KHDYjifaLfIG1sDYsJywK/UBTsA4ZazSv XuJpMUVxI+IEMFS7IctXkKz8U+ROOYwbFec9rcuQcvdiUppU9PyDASeZjjUnfjVbzt70TVu D+DPgSZXHbiK7s2Qcv0bw== UI-OutboundReport: notjunk:1;M01:P0:eBhfvPLFTQo=;FLS16h8ZKYNCa1REsLbs4YmgLXd BxyznKfkvOrtHJ+EB/5UNKypilJICWAr5ddekbECiCLagVYLE/Sjq6nHifwKlN6gdAxExgFLu svW/r88bAvcTLu/Lmp/4dRce0QLr8wQufXUh7hb3RnZHwJ3R1wJnOygUDEZjgHnKWF6mgvBHm /xQNZu3wcRjAS0OnAOovAuARG0MYUMq4QL56mGK5SgvedV/ol1vSonm5uhLy5pPQS71BFC15g +A57rZRTTTJn0+YQbyN0hifyuxEA9MOcZir3vM0HJXtj6or3fNWFpK4cJOldbYw7LpvnKBFty CcX6Pmi4N53+kj8KYwytJQkffETIP5S6hfVKy/rTpJawAmnaHCs5c55Gfx+KRGqw85yC57ncj yINgUV4TAIE8Afm+3sL8LcikYIpxFLnKiNzQBnR2kc+DOshJBFVZZF4ELmTcmQN6NAwix557I ITI1eNc7n7HEK3XKeGx5QH0pBwM4BXJa6q+9XG9nY0pgegLCtsa5EW1zX9Ta1FKKs7qqIp/DK qvPSBUgxWHdlZ0kaBB1XJMDV3Db5Cg2SZ3JKy/ylx8cUKMBZhrEgMwrlc40qwL1fnhtefauI1 lP71wjygV/9RNgrCGS54SN2t68nO1Jd5pcwcHfbTz68K+DhQzVf2rzP2hEuqdWyghHfuhuAv5 /pqE+hRGwHlZO8Es22jmqz3IZeNrqQBxiOuFiYg4pR+NwJ07m571HSLYGMbtJ+9RfgCfZgbVf YECdfS/46oTaacI2q1IfuGZby8f8lELP9NyfGG9+Lmq2ssWrYQlrOMZzpdWJv6UEx6B3JER1J 5FjfRjnOxrPHIwEhnI/emJJaRQEATY8MZsPXQMJyo8qWVsZNioOJGgOn/Fnhng1IcSLTy1u/U VuLUo90OVhBeEpTRSXuLZ6UtZD3tXRb3vtoeKs1g+SRE44tRwsYkY+CdyctMjA0Hib1UdtUsA 6TGArqpqdfe6BElLVc/rBQJEo5E= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221029_105815_741876_CF3001B7 X-CRM114-Status: GOOD ( 10.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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(-) -- 2.34.1 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: From patchwork Sat Oct 29 17:58:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13024751 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 F2C6CC433FE for ; Sat, 29 Oct 2022 17:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MVVwDg1Tz+exXA5l4x7fhPTohIKRORGzhgc0efCIzTM=; b=oaqlTRx+kttQIk sfEGS6OfPjdBrY4CTHDq0OneysG3u943D45OpGHsrpxHLC2TvC/diveR66Iw5UoEzrM4a03X4Z1/P hb5aTZenX9OvxQh6S+VZOMKCo3k4hsuzIXTD42AHSd+k1GgX3vleowys9vXL5NaCGraTyzxZ4H+Mb O1BuK4IB/3EkRjqu07rQF1DoPL5/2WJF568HDTrexZmFrB4/u5SHHdEWXe8aUJ4UxkDLFhkwWqGIq zC9FerO0uZ6uZm3xkfz3cKJj3bZF0i/X06NjVI+v4npdDo2S0Km1PJaMQZ6xpCMmXMHTQrZopr0Oo Iz+FEjtoiUWfoJyxTteQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooq6K-007luY-3n; Sat, 29 Oct 2022 17:58:32 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooq64-007lZo-EK; Sat, 29 Oct 2022 17:58:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=public-files.de; s=s31663417; t=1667066289; bh=gbLUknNhYDzToI8QX7zIFAAM+RoOhWqq4U9N2tWYqrY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=J05y90sHfOuBW1dagMH1QWKbygXKo3NM4skXufIWKzOJ50SGhdfo0k3Qvs99hOT9N Ig0ftYRsTbhyrnlOI0x/6JsqTxYqbAVGdZ7XeE6pq+Cyh5fC19AgDDbevyRcyitnFg aOpdgdFJzazkN3qB8tmRb0pE7zLiPVYA3WE8zdImrOn+uxMZqRRqMzEEQWLUQc+Dss zaZ0tXiLE15RohZqms/Kj7p0vOVQlA4HJETmLIYrp3wE/CJyIWtWc22uuQ1V10fpD5 5YdTGBi9fDRX7kCCDYirdRn1eCAgb46eTW3v1wclgy0YmczgTg0rq1vq6C8XAQN70w 3COzWQo/bgSPQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from frank-G5 ([217.61.156.178]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MDywu-1owVan1VqO-009zKI; Sat, 29 Oct 2022 19:58:09 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , 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 v3 2/2] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Date: Sat, 29 Oct 2022 19:58:06 +0200 Message-Id: <20221029175806.14899-3-frank-w@public-files.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221029175806.14899-1-frank-w@public-files.de> References: <20221029175806.14899-1-frank-w@public-files.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:M/8pyPHZeBy0oSZJMA11WuM41/YmWM8SAUTdo0nAh26A+VhWuFN VUrLwFwRtVtMl8Lb05bPaTo6Ly7GqelfUJIRpUtyiGaeczpB914xJ1gKujlpp9R4hjAyqtz c66xvAbooTVN5TZQc+zo8C9BSplX8Rf0GxzI16qRaIaye2irKh7FWdHy/Oz/bzjaJAJf+Q3 q769wPKHXM4npSkXp1F9A== UI-OutboundReport: notjunk:1;M01:P0:sEB2PEL8bqg=;ekmgBYoYBWf9sUt1XO4Psf+cuK5 2lyAB5EiVbpwX2rCsOIEuIY14q/9synZZ38f6UWvsLJXML4H/tjrvgZNnnDwnad5F1N1jlBum sW+G9WnUTgc/BtUoGuogvnH07Og0csQ10MCThKItQbD5v9sZ+oHz4WaqfXeip6L2uP/+q8bw/ 2nblADu9rtaNLkZuKOZzCJ6c7mDHmn84+BBGy79SjVImXJW20pNF0GUOy7TGVqPAWN/NWv/3A NYILctiWtjbHixqQSpho/XP4TNh4vSAHDQ67fuvAEal1lxrtvvCCgEOK8CS6Hq+ByKKYC8iMR gM4TTwEpJ/boYXmc6x+JiiewGajvO1HMT5iaQ6zOTPsARkbe9EGpeFj+RH7Mxupne32v+DGXE vPhpSx+WJk28T69aSzaX7WUsZ0NIdtSOYUNlocALIaR6RZwy66a35KEAvadckHtxo+y97rR1Z 0MrKFEnHCykWPA78jKMlA4I/bPSo0TjInvq7ogGom7NuOYj/ITF/U/4tgeCMBZ124PW7lpk2P PptZDy1U19aLRaFg/qTz7raHccn2SaBoujH/JLtam9CPPho27gCnvclgr6j0Td0NYQcyxBuX+ 225OXpzDKElNn1w5Y1ZpQVhTgFaUPyKOKHc0lqwODdOwvu+MZ6YfVsI/16zX5714dG/AoJLT3 YJlSMDnpw7ytqn/OyhDP8ynurM0LmPmxHbZ7xIUMv8BTQDwUWov7yAO1fhOa9ZoeKBSVIiQun LUcPwvFhL+jpbc5cijskbDTIBUtp+V36njUwydMdXAcKkvjOpqDAOwxXIVNSV/nZCy4tWz5Oz 7S0lqWIWBSavjXpAxSmlzVcOg3E14e8Lcq61l4p9RXF+kimQ4knSSItoayZrCV7xj3b9t48Dm DV6tIHcdMYAovyj78trKZglcgWVqYTOmwz9oXoQ+PUpcc+WFd4jAuBjr5Ma0ZBtL1kG0lp83E ndS3I6yjgflfUOjGWeEjSnk927w= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221029_105816_785475_D75F9A07 X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add compatible string and clock-definition for mt7986. It needs 4 clocks for PCIe, define them in binding. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Acked-by: Jianjun Wang --- v2: - squashed patch 2+3 (compatible and clock definition) --- .../bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.34.1 diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index 5d7369debff2..f7a02019daea 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 @@ -78,9 +79,11 @@ properties: - const: mac clocks: + minItems: 4 maxItems: 6 clock-names: + minItems: 4 maxItems: 6 assigned-clocks: @@ -160,6 +163,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