From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACB3AC07E95 for ; Tue, 13 Jul 2021 08:33:28 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 79B4D61279 for ; Tue, 13 Jul 2021 08:33:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79B4D61279 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+86A74ZDbs8p/Go5zy3BFvze5ZeQz71ENgvpnAp70SA=; b=dDsqAul8wxKrEn e8hx1RWGrqJsPl1SH9VhI9iVoXF0rI8Tynie9/23mtDSX1BQzFKjeo11W/+TolSWzlcs20RS1xXPK vOm88N+/uYPdRaEldENIGGKETMGhd97cWwUD+VcevbXY47VBF1rFjP43HwUWm3LnbMHYhwZGpnR2k 59kCFYL/NSfl7u3aRKjBJyZjEkrQQcTRt7absGSU7b3NebD/PQHBSyohtNeH6kOaFeWvnYy4dC2/J BZGMpQNbkaOXT1aERzNB315qc80B11WfSl5h/r2h9DSi1YefI2wFgwSrqJdDnjUky6WPyp5Joc6LF l0R91nVUE9D0YNrt6/SQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3DpS-009Rl0-9f; Tue, 13 Jul 2021 08:31:46 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3DpN-009Rcb-4h; Tue, 13 Jul 2021 08:31:42 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 108EE6127C; Tue, 13 Jul 2021 08:31:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626165100; bh=vCzKuNoKiBxSGIGRN6demDaGtX6onzKhSozcN6yvzxI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WTpIf7OCkrQI0Psl1TQDpx3ah/ff9bEvdnD8KZIITUb16hNuzoLtLaJkLz0Zgq78I voQW9beo0TC1xcjrumCclhy8bHBiVv27eGbKg31yKydTrD1DV7HzI2Q+NEev5je2AP fjfKpS3lHv0de56cycngELdDiVNqelcEwZIXctkIiRCE6k5j/BBDVh2DVZPgAJldJq D+p/nT9gLxqaLG76VvUN/2CgiSdy/v1WYe+ZJk9wsYJyTKEJHR/Q0Bke7fGB86ztxC Ik1mIgthNrw8SyAuJJWVt3DoKfiy3OMr7NnGjrlN6xLbXcejghwiIZYDzrkkQXRFUi SY8TbsdogwJJw== Date: Tue, 13 Jul 2021 10:31:27 +0200 From: Mauro Carvalho Chehab To: Rob Herring Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Andy Gross , Bjorn Andersson , Bjorn Helgaas , Fabio Estevam , Greentime Hu , Gustavo Pimentel , Jaehoon Chung , Jerome Brunet , Jesper Nilsson , Jingoo Han , Jonathan Chocron , Jonathan Hunter , Kevin Hilman , Kishon Vijay Abraham I , Krzysztof Kozlowski , Kunihiko Hayashi , Lucas Stach , Marek Szyprowski , Martin Blumenstingl , Masami Hiramatsu , NXP Linux Team , Neil Armstrong , Palmer Dabbelt , Paul Walmsley , Pengutronix Kernel Team , Richard Zhu , Sascha Hauer , Shawn Guo , Thierry Reding , Thomas Petazzoni , devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v3 1/2] dt-bindings: PCI: designware-pcie.txt: convert it to yaml Message-ID: <20210713103127.3891c8e9@coco.lan> In-Reply-To: <20210712174504.GA2158814@robh.at.kernel.org> References: <20210712174504.GA2158814@robh.at.kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_013141_278427_81E476EF X-CRM114-Status: GOOD ( 26.83 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Mon, 12 Jul 2021 11:45:04 -0600 Rob Herring escreveu: > On Fri, Jul 09, 2021 at 03:57:42PM +0200, Mauro Carvalho Chehab wrote: > > Convert the file to DT schema. > > > > Signed-off-by: Mauro Carvalho Chehab > > diff --git a/Documentation/devicetree/bindings/pci/samsung,exynos-pcie.yaml b/Documentation/devicetree/bindings/pci/samsung,exynos-pcie.yaml > > index 1810bf722350..3f49c8017c7a 100644 > > --- a/Documentation/devicetree/bindings/pci/samsung,exynos-pcie.yaml > > +++ b/Documentation/devicetree/bindings/pci/samsung,exynos-pcie.yaml > > + reg: > > + description: | > > + It should contain Data Bus Interface (dbi, dbi2) registers for all > > + versions. > > Not all versions have dbi2. > > > + For designware cores version < 4.80, contains the configuration > > + address space. For designware core version >= 4.80, > > + contains the configuration and ATU address space. > > config space should always be present. For a brief time (around 2014), > it was not required but has been since. For purposes of the schema, we > can say always required. > > ATU is optional in 4.80 or later. > > > + minItems: 2 > > + maxItems: 4 > > + > > + reg-names: > > + minItems: 2 > > + maxItems: 4 > > + items: > > + contains: > > Drop contains. > > > + enum: [dbi, dbi2, config, atu, addr_space] This actually generated a warning: /new_devel/v4l/hikey970/Documentation/devicetree/bindings/pci/intel-gw-pcie.example.dt.yaml: pcie@d0e00000: reg-names:2: 'app' is not one of ['dbi', 'dbi2', 'config', 'atu', 'addr_space'] I guess it needs to be changed to: enum: [dbi, dbi2, config, atu, addr_space, app] or intel-gw-pcie.yaml would require an extra change. That's said, I didn't find any DTS using compatible = "intel,lgm-pcie", but looking at drivers/pci/controller/dwc/pcie-intel-gw.c, it seems that this is a mandatory register on such hardware. > > + > > + num-lanes: > > + $ref: '/schemas/types.yaml#/definitions/uint32' > > + description: | > > + number of lanes to use (this property should be specified unless > > + the link is brought already up in BIOS) > > + maxItems: 1 > > Drop. Not an array. 'maximum: 16' is needed though pci-bus.yaml may > cover that already. It seems that num-lanes is not there at pci-bus.yaml - at least not at the version I'm using here (2021.7.dev1+ge5f58d415b1d). > > +patternProperties: > > + "pcie?_ep@[0-9a-f]+$": > > + type: object > > + properties: > > + compatible: > > + contains: > > + const: snps,dw-pcie-ep > > This doesn't make sense. This is defining a child node of the DW > controller with 'snps,dw-pcie-ep'. This was an attempt to silence those warnings: From schema: /new_devel/v4l/hikey970/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml /new_devel/v4l/hikey970/Documentation/devicetree/bindings/pci/intel-gw-pcie.example.dt.yaml: pcie@d0e00000: '#address-cells', '#interrupt-cells', '#size-cells', 'bus-range', 'clocks', 'device_type', 'interrupt-map', 'interrupt-map-mask', 'linux,pci-domain', 'max-link-speed', 'phy-names', 'phys', 'ranges', 'reset-assert-ms', 'resets' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: /new_devel/v4l/hikey970/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml /new_devel/v4l/hikey970/Documentation/devicetree/bindings/pci/snps,dw-pcie.example.dt.yaml: pcie@dfc00000: '#address-cells', '#interrupt-cells', '#size-cells', 'device_type', 'interrupts', 'ranges' do not match any of the regexes: 'pinctrl-[0-9]+' From schema: /new_devel/v4l/hikey970/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml Somehow, dtschema is only accepting 'pinctrl-[0-9]+' regex when parsing examples on this file. I've no idea how to fix it. As a reference, this is how the examples are now declared: examples: - | pcie@dfc00000 { compatible = "snps,dw-pcie"; reg = <0xdfc00000 0x0001000>, /* IP registers */ <0xd0000000 0x0002000>; /* Configuration space */ reg-names = "dbi", "config"; #address-cells = <3>; #size-cells = <2>; device_type = "pci"; ranges = <0x81000000 0 0x00000000 0xde000000 0 0x00010000>, <0x82000000 0 0xd0400000 0xd0400000 0 0x0d000000>; interrupts = <25>, <24>; #interrupt-cells = <1>; num-lanes = <1>; }; pcie-ep@dfd00000 { compatible = "snps,dw-pcie-ep"; reg = <0xdfc00000 0x0001000>, /* IP registers 1 */ <0xdfc01000 0x0001000>, /* IP registers 2 */ <0xd0000000 0x2000000>; /* Configuration space */ reg-names = "dbi", "dbi2", "addr_space"; }; Thanks, Mauro _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel