From patchwork Sun Nov 13 19:12:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 19415 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1801032wru; Sun, 13 Nov 2022 11:15:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf4AiB6zG202jCFVN9lQTU2qDIH+q+H0oUTGViVHQwkKk+MeEQxzBh6eSn6bhjsrv0uxWNn9 X-Received: by 2002:a17:906:8541:b0:7ae:c1af:89af with SMTP id h1-20020a170906854100b007aec1af89afmr8204865ejy.550.1668366953430; Sun, 13 Nov 2022 11:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668366953; cv=none; d=google.com; s=arc-20160816; b=0PTs+4g28M+DI/XG6Rj/Qkezrfe52lWHAIQ84SRon0itYU8GEfdhDcNy/VppzxlBtd sp3sGiQr0W89TEE5T9IV/7Dv797+0a0h6FPkwsPtEfl5NEyoim2AHft36d/Lpk+XDJPc NtXaXgZn88xeSbs6U94JiV6921YNJWVjvlFKwlh4n2QGx5gI00vYt4nthiFzE5YtK3yC o2opOTCpGDott/c4s6EoefpB2srwfFKQeenb5auScNZFlSrxel/RYPbNy6kSa/5cgfsp aNcvyrm5A6WvoxM4k5sS7IB8KtzK2XeTeAupC4Ep8bUQ+aidtLZrguidqBcpDEbSG05Z igYA== 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=HAbPpyQXjz8ylsqMTZ03ZjBo19Ye/nkDntALZaYQcTI=; b=aJPo/xo9jpawdc5GS+3F5PUeS7MhAEhgDOO3wcbkz1O/QlKjXfXOfsSVz3gyw2IVYx wOlfPAgBxT/gBXw0pooqVrTADCX2g1alj7Bine2crkCX+E5Ry+Mww3p3GiEV0876+q/A PSeUMQTXHUPh21hwLpATmHfG9B/RgWXq653nRBQY1kGU84JlQhxw6N6nL2LEu/V0EWnD rPJyYl3faHrUzCl0tWYSYg7UlKB6lvs8en9hXvf8o7u7To+J5JSXePlArRHAbLb79Op1 ss/m4+OBFrDX5a8n0VBKuH8md0Ml2t/Nm6sZgY7Hy4Al1DvWd0ppcHrCycF5hnNPUlZ0 M5gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b="MdsG/jrP"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a1709064a9800b007808f3f4cbcsi5686604eju.239.2022.11.13.11.15.28; Sun, 13 Nov 2022 11:15:53 -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=@baikalelectronics.ru header.s=post header.b="MdsG/jrP"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235599AbiKMTPF (ORCPT + 99 others); Sun, 13 Nov 2022 14:15:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235317AbiKMTOw (ORCPT ); Sun, 13 Nov 2022 14:14:52 -0500 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1639EDEC2; Sun, 13 Nov 2022 11:14:46 -0800 (PST) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id DC4D2E0EAA; Sun, 13 Nov 2022 22:14:44 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=HAbPpyQXjz8ylsqMTZ03ZjBo19Ye/nkDntALZaYQcTI=; b=MdsG/jrPr/Nh jgBXP9IN3550UJm78IBv4xU/Ne4mbJuQqwFTQufpJdA21N13fSKLcdjf1N5p50l9 cXZtuIAoKo++6UpdJ9RAgkysnOj1bhTMmdmNmFCoQ8VBf8OS+O4o5VhDzv26ZOMU cKsEuLvwG/fYvcglxlFeDNktNdcLPPA= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id C8416E0E6A; Sun, 13 Nov 2022 22:14:44 +0300 (MSK) Received: from localhost (192.168.168.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 13 Nov 2022 22:14:44 +0300 From: Serge Semin To: Rob Herring , Rob Herring , Krzysztof Kozlowski , Bjorn Helgaas , Lorenzo Pieralisi , Cai Huoqing , Robin Murphy , Jingoo Han , Gustavo Pimentel , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , =?utf-8?q?Krzys?= =?utf-8?q?ztof_Wilczy=C5=84ski?= , Frank Li , Manivannan Sadhasivam , caihuoqing , Vinod Koul , , , , Alexander Stein , Subject: [PATCH v7 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Date: Sun, 13 Nov 2022 22:12:42 +0300 Message-ID: <20221113191301.5526-2-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221113191301.5526-1-Sergey.Semin@baikalelectronics.ru> References: <20221113191301.5526-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [192.168.168.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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?1749409546207831029?= X-GMAIL-MSGID: =?utf-8?q?1749409546207831029?= Originally as it was defined the legacy bindings the pcie_inbound_axi and pcie_aux clock names were supposed to be used in the fsl,imx6sx-pcie and fsl,imx8mq-pcie devices respectively. But the bindings conversion has been incorrectly so now the fourth clock name is defined as "pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie", which is completely wrong. Let's fix that by conditionally apply the clock-names constraints based on the compatible string content. Fixes: 751ca492f131 ("dt-bindings: PCI: imx6: convert the imx pcie controller to dtschema") Signed-off-by: Serge Semin Acked-by: Alexander Stein Reviewed-by: Rob Herring --- Changelog v5: - This is a new patch added on the v5 release of the patchset. Changelog v7: - Move the allOf clause to the bottom of the bindings. (@Krzysztof) - Get back the names to the clock-names property and make sure the platform-specific name constraint is applied in the allOf clause. (@Rob) --- .../bindings/pci/fsl,imx6q-pcie.yaml | 46 +++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml index 376e739bcad4..49b4f7a32e71 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml @@ -14,9 +14,6 @@ description: |+ This PCIe host controller is based on the Synopsys DesignWare PCIe IP and thus inherits all the common properties defined in snps,dw-pcie.yaml. -allOf: - - $ref: /schemas/pci/snps,dw-pcie.yaml# - properties: compatible: enum: @@ -61,7 +58,7 @@ properties: - const: pcie - const: pcie_bus - const: pcie_phy - - const: pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie + - enum: [ pcie_inbound_axi, pcie_aux ] num-lanes: const: 1 @@ -175,6 +172,47 @@ required: - clocks - clock-names +allOf: + - $ref: /schemas/pci/snps,dw-pcie.yaml# + - if: + properties: + compatible: + contains: + const: fsl,imx6sx-pcie + then: + properties: + clock-names: + items: + - {} + - {} + - {} + - const: pcie_inbound_axi + - if: + properties: + compatible: + contains: + const: fsl,imx8mq-pcie + then: + properties: + clock-names: + items: + - {} + - {} + - {} + - const: pcie_aux + - if: + properties: + compatible: + not: + contains: + enum: + - fsl,imx6sx-pcie + - fsl,imx8mq-pcie + then: + properties: + clock-names: + maxItems: 3 + unevaluatedProperties: false examples: