Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1270940rwb; Thu, 10 Nov 2022 13:45:54 -0800 (PST) X-Google-Smtp-Source: AMsMyM4POYKG47TMCPRiK4AxYr/Z0e+TyQxFxnadm+gLnz+LMr0a1oSMBF3tJl3qti149A52RlnC X-Received: by 2002:a17:906:9d14:b0:799:9ace:e868 with SMTP id fn20-20020a1709069d1400b007999acee868mr3829660ejc.451.1668116754197; Thu, 10 Nov 2022 13:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668116754; cv=none; d=google.com; s=arc-20160816; b=ry+3VOCebr0avVqK7ZVJsI29gv6h7sZknBbBkCparmlUScgDssSMHNlSaEE7hB38H4 YMMRNe4BKplleRQaowcR4msXA2NwT+Vr+KRKpXmNLwAnGG6RpmA1iy6z87t4KR/nXQ2N Rc0u83Ngeq6Egsnu3Ph0t8f32DUkhoLhGdJFA+AzM73sx8TD9gh4uidcfTOTXbEL7koG Et2v7dxLoneYGJ8E0NwEWkV/OQXqedSrGRa76WwZDLYwbhf0IbGrq/vXw6TRvxvx8RDR CGV5bUsa3gtbrYRSKgKp83AvZ4USUaewitx4v/1eyCylS0RQhhNAR8pP+APYMcb4epgm KnLQ== 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=FQYEV0yuvAFKXfXfXPWLe2h/Dtk7ZrvGn4iuEOi+yK4=; b=JI9qelu+OKFWpk9RQdaJA2cU3+BAcQWx0ddVfEulcLaFuavzN/hQPv+hcLAP8QF/jg vYXSeDKfKEkwl9dzR8IawxDH8K7rAekru1nKZ2pBq6SFib4OZ2ooL3G1ltiGNRnqXyoK KOp4U/UnGKX2fRP2ukSEViy5rotg+fa8kjy4ieb54KnW2+BoKEWLgO4v9xiMK/eI/vxW hJp4xofTUMUHODN8MEyzDb8xs6xYAbl4qqAMGH2Hnox1CtiaSZf+QhKnmyFg/yE/Icw1 9hvxRK7k3HZx6JidTss8/zR2gQf8kjF6ELgqsH0F1EmJH7vTSk7Q9TVzoYMXnQNEsb9W WafQ== 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 qk10-20020a1709077f8a00b007ac2daa0b49si445977ejc.367.2022.11.10.13.45.31; Thu, 10 Nov 2022 13:45:54 -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 S230285AbiKJVSl (ORCPT + 92 others); Thu, 10 Nov 2022 16:18:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbiKJVSk (ORCPT ); Thu, 10 Nov 2022 16:18:40 -0500 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C3EB18362; Thu, 10 Nov 2022 13:18:39 -0800 (PST) Received: by mail-ot1-f49.google.com with SMTP id cb2-20020a056830618200b00661b6e5dcd8so1831230otb.8; Thu, 10 Nov 2022 13:18:39 -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=FQYEV0yuvAFKXfXfXPWLe2h/Dtk7ZrvGn4iuEOi+yK4=; b=qJ3vxkfEjKoN5+Ke1toOxv7oILl4xI8yVf7U1oTLC3rk2Re3kgd17n7VarYLnMHlUZ RiioeOBID/jLZaWoouaJahqav3HIwxhAyov14wSG2St//FsAHymgYqDDT12RXJ3aW0BT J/kZpZQ7PSdD/Fd7hbMDzRspQOQghygyT+ZciyZWaygf7FUqro9WUzISLc07bEa2Q9st tPjDJWIRTElqlInW4Zqtmi/UxBs01IATs8nJkiktZ9lUKaGNlbK4s1hPcLDLWNvI49ln 1AI4ygcMatvTkZibysqGaqmFUqi+n4gP4DEKl3k8o2DaFZnW0kp81qFXOzulaNZBbFtO giHg== X-Gm-Message-State: ACrzQf2IYGhWr9F5m5oQ+FkHIsmiiLJCzn4+AQMZ8DhCgabSHCS8WiqE ejXWH11G+cGvVzD7XYqYGg== X-Received: by 2002:a9d:730c:0:b0:661:ab16:3623 with SMTP id e12-20020a9d730c000000b00661ab163623mr2151184otk.91.1668115118340; Thu, 10 Nov 2022 13:18:38 -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 ek24-20020a056870f61800b0013b1301ce42sm329233oab.47.2022.11.10.13.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 13:18:37 -0800 (PST) Received: (nullmailer pid 1062808 invoked by uid 1000); Thu, 10 Nov 2022 21:18:39 -0000 Date: Thu, 10 Nov 2022 15:18:39 -0600 From: Rob Herring To: Serge Semin Cc: Gustavo Pimentel , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Frank Li , linux-pci@vger.kernel.org, Alexey Malahov , linux-kernel@vger.kernel.org, Serge Semin , Rob Herring , caihuoqing , Cai Huoqing , Robin Murphy , Lorenzo Pieralisi , devicetree@vger.kernel.org, Vinod Koul , Manivannan Sadhasivam , Pavel Parkhomenko , Jingoo Han , Krzysztof Kozlowski , Bjorn Helgaas Subject: Re: [PATCH v6 09/20] dt-bindings: PCI: dwc: Add interrupts/interrupt-names common properties Message-ID: <166811511627.1062682.15955440634711266362.robh@kernel.org> References: <20221107204934.32655-1-Sergey.Semin@baikalelectronics.ru> <20221107204934.32655-10-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221107204934.32655-10-Sergey.Semin@baikalelectronics.ru> X-Spam-Status: No, score=-1.1 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_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT 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, 07 Nov 2022 23:49:23 +0300, Serge Semin wrote: > Currently the 'interrupts' and 'interrupt-names' properties are defined > being too generic to really describe any actual IRQ interface. Moreover > the DW PCIe End-point devices are left with no IRQ signals. All of that > can be fixed by adding the IRQ-related properties to the common DW PCIe > DT-schemas in accordance with the hardware reference manual. The DW PCIe > common DT-schema will contain the generic properties definitions with just > a number of entries per property, while the DW PCIe RP/EP-specific schemas > will have the particular number of items and the generic resource names > listed. > > Note since there are DW PCI-based vendor-specific DT-bindings with the > custom names assigned to the same IRQ resources we have no much choice but > to add them to the generic DT-schemas in order to have the schemas being > applicable for such devices. These names are marked as vendor-specific and > should be avoided being used in new bindings in favor of the generic > names. > > Signed-off-by: Serge Semin > > --- > > Note without the next dtschema tool fix > > --- a/lib.py 2022-09-29 15:17:13.100033810 +0300 > +++ b/lib.py 2022-09-29 15:19:54.886172794 +0300 > @@ -1307,7 +1307,7 @@ > def format_error(filename, error, prefix="", nodename=None, verbose=False): > src = prefix + os.path.abspath(filename) + ':' > > - if error.linecol[0] >= 0: > + if hasattr(error, 'linecol') and error.linecol[0] >= 0: > src = src + '%i:%i: ' % (error.linecol[0]+1, error.linecol[1]+1) > else: > src += ' ' > @@ -1342,10 +1342,10 @@ > else: > msg = error.message > > - if error.note: > + if hasattr(error, 'note') and error.note: > msg += '\n\t' + prefix + 'hint: ' + error.note > > - if error.schema_file: > + if hasattr(error, 'schema_file') and error.schema_file: > msg += '\n\t' + prefix + 'from schema $id: ' + error.schema_file > > return src + msg > > any DT-bindings error will cause the dt-schema script crash: > > Traceback (most recent call last): > File "/home/fancer/.local/bin/dt-validate", line 175, in > sg.check_trees(filename, testtree) > File "/home/fancer/.local/bin/dt-validate", line 122, in check_trees > self.check_subtree(dt, subtree, False, "/", "/", filename) > File "/home/fancer/.local/bin/dt-validate", line 111, in check_subtree > self.check_subtree(tree, value, disabled, name, fullname + name, filename) > File "/home/fancer/.local/bin/dt-validate", line 111, in check_subtree > self.check_subtree(tree, value, disabled, name, fullname + name, filename) > File "/home/fancer/.local/bin/dt-validate", line 106, in check_subtree > self.check_node(tree, subtree, disabled, nodename, fullname, filename) > File "/home/fancer/.local/bin/dt-validate", line 84, in check_node > print(dtschema.format_error(filename, error, nodename=nodename, verbose=verbose) + > File "/home/fancer/.local/lib/python3.8/site-packages/dtschema/lib.py", line 1332, in format_error > msg += '\n' + format_error(filename, suberror, prefix=prefix+"\t", nodename=nodename, verbose=verbose) > File "/home/fancer/.local/lib/python3.8/site-packages/dtschema/lib.py", line 1310, in format_error > if error.linecol[0] >= 0: > AttributeError: 'ValidationError' object has no attribute 'linecol' > > Changelog v3: > - This is a new patch unpinned from the next one: > https://lore.kernel.org/linux-pci/20220503214638.1895-2-Sergey.Semin@baikalelectronics.ru/ > by the Rob' request. (@Rob) > > Changelog v5: > - Add platform-specific interrupt names, but mark them as deprecated. > > Changelog v6: > - Move the common interrupt-names definitions to the RP/EP schemas. > Thus drop the 'definitions' property. (@Rob) > - Drop the 'deprecated' keywords from the vendor-specific names. (@Rob) > --- > .../bindings/pci/snps,dw-pcie-common.yaml | 19 ++++ > .../bindings/pci/snps,dw-pcie-ep.yaml | 52 +++++++++++ > .../devicetree/bindings/pci/snps,dw-pcie.yaml | 90 ++++++++++++++++++- > 3 files changed, 158 insertions(+), 3 deletions(-) > Reviewed-by: Rob Herring