Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1275874rwb; Thu, 10 Nov 2022 13:51:00 -0800 (PST) X-Google-Smtp-Source: AMsMyM66/uUgCAZsbVE36UszkkKav4fwxPXA/V3bW3PgyO3G7uyYfmrriIajQSIsaDJKvhCxhKwE X-Received: by 2002:a17:90a:6742:b0:20a:f735:ab with SMTP id c2-20020a17090a674200b0020af73500abmr2159698pjm.100.1668117060528; Thu, 10 Nov 2022 13:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668117060; cv=none; d=google.com; s=arc-20160816; b=o6ArcR+fEps1SqULZZTzVM/JnaZDnjPheRkJf88ZmNj3HxUHZrw2uoyVXbSKe54YZO uavoIOEh8UVuUO5JV1Pv0WVOmklXFZB3tZNJSJOOsnDTXG02z91efBalyVCZCzchP0pG OYuCvYPmH1Y0RGpD3DWL4cS7T+KgdAcFuME5jOGdIceeQc6IHTl93q9ecOuBuZVngtB5 OpbWCKxYAxmZzbj82iVufOk6vMDyCWaYGIT1Y8DS7Z20RNLSwpONbYoVodQgwrD9IudQ rcoTE2E6DdizHi2egNr1whTBNlv7Qq+SOy8ik281QD6AOgVRZ7DmrzrvGj2rV9kckSco VDMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=IDqn8BDU2tLIVGpP/7JbZcQ8NuPGFYgE6/tTyJvpJB8=; b=swch3zIQCdcrieOGsPpkFp8UbtqD1TRvI+5PKkmIYMTBfHER0LqMZiawyh7Wvd4WEA llm/Aji5h22b3DiKSz5Az3346KUt2FsOG3gCUxfsWdD6WskazBJN/KJmId3Gjkr53WA1 hYiMqEB4aNhY9N2dt58lX+4zE5ysvaMZYJ+cv5QEcqGqLASB6do/UlgRbFLFzjVzcN1p eunHzmmejp6aodq2IpUpEd4IlUeeV8OKVHY9Q4WpKjrCoHqdybgCx5slWyiJvd3kub8D v4Y4hQaE/0gZ8qc9KH6Etj2ayLv/jClYUjkJLCrlXSCXw5+3tP3GJH0/KU0m0e5lp+9+ W5NA== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a17090332c200b0017cc894c78esi515356plr.447.2022.11.10.13.50.48; Thu, 10 Nov 2022 13:51:00 -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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbiKJVBI (ORCPT + 92 others); Thu, 10 Nov 2022 16:01:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbiKJVBF (ORCPT ); Thu, 10 Nov 2022 16:01:05 -0500 Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B155610E4; Thu, 10 Nov 2022 13:01:04 -0800 (PST) Received: by mail-oi1-f178.google.com with SMTP id l127so3123793oia.8; Thu, 10 Nov 2022 13:01:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IDqn8BDU2tLIVGpP/7JbZcQ8NuPGFYgE6/tTyJvpJB8=; b=CCWjmICdl7mpNZ4sAYxuhzGImSJXo86/z7jNU8gXJ1yoaG8maQYNI6pajt+yADZUlE z30NhFGt/lO1AAVdSBusR/3BgPCVAkjY6mznrL0cgXVGUAgzhPc6p89w86ezc0WupJuK vdHTsvSep+laQZkkfQQyBt50ijJXe/jAeEjmn3OS002hgJY3rytRf2C2cC7zGILNUxZq Y81vQDdGa7NIjVRVNrW+6InhE8SuUjmjQ8TD0IFnslqyyBX/RN80avW5W6JO1Xha+Ag8 dQ+gwr45gMtRg0dbZC3YIyHRWeyG3BYpLyzzOiI/B6ko/ht4u+GLlcfHUbnMUAb8aHqZ HarQ== X-Gm-Message-State: ACrzQf3HfDGCrLoP9XQKaKxd5WtEcl6ARMOd4/mtB5z8YzXXPUTK51qv ExJQR57CCteEP6x+kf2Mmw== X-Received: by 2002:aca:2105:0:b0:359:e9f6:e37d with SMTP id 5-20020aca2105000000b00359e9f6e37dmr2191361oiz.76.1668114063885; Thu, 10 Nov 2022 13:01:03 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id j18-20020a9d7392000000b0066c34486aa7sm243697otk.73.2022.11.10.13.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 13:01:03 -0800 (PST) Received: (nullmailer pid 975802 invoked by uid 1000); Thu, 10 Nov 2022 21:01:04 -0000 Date: Thu, 10 Nov 2022 15:01:04 -0600 From: Rob Herring To: Serge Semin Cc: 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 , Serge Semin , Alexey Malahov , Pavel Parkhomenko , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Frank Li , Manivannan Sadhasivam , caihuoqing , Vinod Koul , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Stein , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 01/20] dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq Message-ID: <20221110210104.GA963064-robh@kernel.org> References: <20221107204934.32655-1-Sergey.Semin@baikalelectronics.ru> <20221107204934.32655-2-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221107204934.32655-2-Sergey.Semin@baikalelectronics.ru> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Mon, Nov 07, 2022 at 11:49:15PM +0300, Serge Semin wrote: > 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 > > --- > > Changelog v5: > - This is a new patch added on the v5 release of the patchset. > --- > .../bindings/pci/fsl,imx6q-pcie.yaml | 47 +++++++++++++++++-- > 1 file changed, 42 insertions(+), 5 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml > index 376e739bcad4..ebfe75f1576e 100644 > --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml > +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml > @@ -16,6 +16,47 @@ description: |+ > > allOf: > - $ref: /schemas/pci/snps,dw-pcie.yaml# > + - if: > + properties: > + compatible: > + contains: > + const: fsl,imx6sx-pcie > + then: > + properties: > + clock-names: > + items: > + - const: pcie > + - const: pcie_bus > + - const: pcie_phy > + - const: pcie_inbound_axi > + - if: > + properties: > + compatible: > + contains: > + const: fsl,imx8mq-pcie > + then: > + properties: > + clock-names: > + items: > + - const: pcie > + - const: pcie_bus > + - const: pcie_phy > + - const: pcie_aux > + - if: > + properties: > + compatible: > + not: > + contains: > + enum: > + - fsl,imx6sx-pcie > + - fsl,imx8mq-pcie > + then: > + properties: > + clock-names: > + items: > + - const: pcie > + - const: pcie_bus > + - const: pcie_phy > > properties: > compatible: > @@ -57,11 +98,7 @@ properties: > > clock-names: > minItems: 3 > - items: > - - const: pcie > - - const: pcie_bus > - - const: pcie_phy > - - const: pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie This should have been just 'enum: [ pcie_inbound_axi, pcie_aux ]' And then do: - if: properties: compatible: contains: const: fsl,imx8mq-pcie then: properties: clock-names: items: - {} - {} - {} - const: pcie_aux And then another if/then with 'maxItems: 3'