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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 687CCC433F5 for ; Wed, 17 Nov 2021 08:20:53 +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 3206661546 for ; Wed, 17 Nov 2021 08:20:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3206661546 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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:In-Reply-To:MIME-Version:References: 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=MUZwca2ABu1Lv+U9S+YaXMoYxO0NCLNE7miqjKBPAlo=; b=PTfgOoR/XITxhO RtNOP8Wu/j4LLWRSwnz2vXxCoe8Ipk7k09TFaBHh4dMwFCyKOFt6wy5t9GO/1NtQMyUbjO0aoM6xT 8LTzGtHjqW1arDo4owVI3PnJ8dN+veX9fQBAOp46N7K4VfrHyf2zTpRssPes+0wmhOgxzn06A14BK F9ZzXcqWKuzOgtlTcjIQJEXf6kqtQz1Ldn/mgp1Gc5d8w3oGy8Yt664UIS80GtuGqBBshgYnzHeVl CEKQxP0qI0ns0B9bl5P/PrpqAsSHpvFZ8K3F4ZFmRYK+f25JC7YebEpzT1LHZCUwEU6pHNufiFz6x J4yqjUP/bbuvQ0StgQqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnGAH-003vRA-U2; Wed, 17 Nov 2021 08:19:34 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnGAE-003vOX-0I for linux-arm-kernel@lists.infradead.org; Wed, 17 Nov 2021 08:19:31 +0000 Received: by mail-lj1-x232.google.com with SMTP id 207so4398528ljf.10 for ; Wed, 17 Nov 2021 00:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Bgs8iyUy89PkKvzl321W/UAXVH57vSKrzyQqzOIg/uo=; b=TnY11PkOecu9gptvsD5iv0+wmUGir99GjK9/k3tBZOwew4wfLpIG+zbAeVl5x4W7b1 Cpbedg//+UfgYiaDeyfO+0Zks+5y0YWrPFFTtbgV8Xr1x2HQ0ecKJDub0wCyWoKocNEN 38KH36jveNOf7cJQr7FIUMQV6YxDJ+MowxaWyWZ+1kWDMYhb8GIoCylopTPKHpj8iOya RTHhc4guieXR93jZ1lPD0xFXzcX4WQDsAj3jourJuWohtzFksx5r6ltkFVqhZyJVSvxB PZyvkTQX1jECPp//Z5ioTLZ5INdVutYbz5r+cw9Rtrjfp1q+MW15iVAlmWVLiIH+OCeB gl3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Bgs8iyUy89PkKvzl321W/UAXVH57vSKrzyQqzOIg/uo=; b=vVD9rggQDv09qsWLHVuQf9xOI7UulSgfq20exs+uu+5T0capYRljR/+qUyUbzLRP67 JnjI8JUcUGKsy/grPk487QDSE+v4FRYwGtDxWC2T+upBQgSQ0+rfQ+uWPWJZG4AlT8Lg AW1XQ3NhKqyqg4i4sTs8QAot2IlufoHBTKxXEf4dPG6DXUxVrVNsBF/f+ZRbjVoiHzmv i0HjYTBUqmqVKGpX0/0m+ogOGWqApsLTq5GDu2IGdqarqwfi8yOlzHcLBSmnZ4lesaC3 9XFnjIrMUDxpLYlOaHHbhhBa3TwBSpvgJJM+jbk0GNIDF5n2oGyAovUIe8JZVpCvEUrW otHQ== X-Gm-Message-State: AOAM533LSVcUcudQJSw89b/PXmSrxiYmeumblk184fPx/KmeVPMHMgrw env3GybDUk3iLoGlZhvIYps= X-Google-Smtp-Source: ABdhPJzXiZb7AbiLv4mX/n1uVupgxzrFrsNr8u0D38JXKOqnjBNQXe1nkF/X9hhJXvlEYO752Wd4PA== X-Received: by 2002:a05:651c:179b:: with SMTP id bn27mr3019354ljb.444.1637137165798; Wed, 17 Nov 2021 00:19:25 -0800 (PST) Received: from mobilestation ([95.79.188.236]) by smtp.gmail.com with ESMTPSA id c21sm2044020lfv.29.2021.11.17.00.19.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Nov 2021 00:19:25 -0800 (PST) Date: Wed, 17 Nov 2021 11:19:22 +0300 From: Serge Semin To: Brad Larson Cc: Rob Herring , Linux ARM , Arnd Bergmann , Linus Walleij , Bartosz Golaszewski , Mark Brown , Adrian Hunter , Ulf Hansson , Olof Johansson , "open list:GPIO SUBSYSTEM" , linux-spi , linux-mmc , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List Subject: Re: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings Message-ID: <20211117081922.nnqsr5zzzydurq5t@mobilestation> References: <20211025015156.33133-1-brad@pensando.io> <20211025015156.33133-6-brad@pensando.io> <20211028074945.rv2j5kgzk7yc2srr@mobilestation> <20211116112907.lbwdcz5pmgxqzv55@mobilestation> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211117_001930_082546_5B7DFE8F X-CRM114-Status: GOOD ( 38.14 ) 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 On Tue, Nov 16, 2021 at 03:11:53PM -0800, Brad Larson wrote: > Hi Sergey, > > On Tue, Nov 16, 2021 at 3:29 AM Serge Semin wrote: > > > > > > AFAICS from the driver-part of the patchset it's not enough. You've > > > > also got the syscon phandle, which needs to be reflected in the > > > > bindings. That also makes me thinking that you didn't perform the > > > > "dtbs_check" on the dts-files you were going to submit, but for some > > > > reason discarded from this series (btw why?). If you did you would > > > > have got an error of an unevaluated property detection. > > > > > > I ran the checks below and didn't get errors. Rob provided some info > > > and I found the server did not have yamllint installed (not flagged by > > > tool). Also dt-schema was not the latest. I'm re-doing this and > > > including "DT_CHECKER_FLAGS=-m" as that is new with v5.13. > > > > > > > > make ARCH=arm64 dtbs_check > > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml > > > make ARCH=arm64 dtbs_check > > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml > > > make ARCH=arm64 dtbs_check > > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > > > make ARCH=arm64 dtbs_check > > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/vendor-prefixes.yaml > > > make ARCH=arm64 dtbs_check > > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/pensando,elba.yaml > > > > Hmm, that's weird. Rob, does dtschema tool have the > > "unevaluatedProperties" property support? > > > > Brad, anyway you still need to add the syscon-property (pensando,*spics) > > requirement in the snps,dw-apb-ssi.yaml schema. See the way it's done there > > for instance for "baikal,bt1-sys-ssi" when it comes to the > > vendor-specific properties definition in the allOf composition block. > > You'll need to define a custom phandle property there in case if a > > DT-node is compatible with you SPI controller. > > Updating and adding only this bindings update to file > snps,dw-apb-ssi.yaml in 5.16.0-rc1 (next-20211116): > > diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > index d7e08b03e204..99deb587a47b 100644 > --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > @@ -37,6 +37,21 @@ allOf: > else: > required: > - interrupts > + - if: > + properties: > + compatible: > + contains: > + enum: > + - pensando,elba-spics I was wrong using that construction here (fixup patch would be very welcome) seeing the "snps,dw-apb-ssi" doesn't permit having a generic "snps,dw*" compatible string. So just const-compatible property should be enough: + compatible: + const: pensando,elba-spics > + then: > + properties: > + pensando,spics: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to the system control device node which provides access to > + the spics control register > + required: > + - pensando,spics Please note, I've asked to be more specific in this property naming. Something like this should be fine "pensando,elba-syscon-spics"/"pensando,syscon-spics". > > properties: > compatible: > @@ -73,6 +88,8 @@ properties: > - renesas,r9a06g032-spi # RZ/N1D > - renesas,r9a06g033-spi # RZ/N1S > - const: renesas,rzn1-spi # RZ/N1 > + - description: Pensando Elba SoC SPI Controller > + const: pensando,elba-spics > > reg: > minItems: 1 > > $ make ARCH=arm64 defconfig > ... > > $ make DT_CHECKER_FLAGS=-m dt_binding_check > DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml I am kind of surprised that this command is still evaluating all the schemas. Compiling only the depended DT-schemas would much better... Anyway that's why you are getting unrelated to the snps,dw-apb-ssi.yaml errors. > ... > DTEX Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dts > DTC Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml > CHECK Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml > Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.example.dt.yaml:0:0: > /example-0/spi@fff00000/flash@1: failed to match any schema with > compatible: ['spi-nand'] That means there is no bindings defined for the "spi-nand"-compatible node. AFAICS it doesn't make the tool to fail though. Anyway fixing this part would be a subject of additional patches (which would be very appreciated). That would concern converting the Documentation/devicetree/bindings/mtd/spi-nand.txt legacy bindings to the DT-schema. It's not enough though. Seeing that file lacks of the NAND Flash specific DT-property description, you'd need to detach ones (described by the "^nand@[a-f0-9]$"-pattern property) from the Documentation/devicetree/bindings/mtd/nand-controller.yaml schema and place them into a separate DT-schema file for generic nand-flashes Documentation/devicetree/bindings/mtd/nand-flash.yaml in a framework of a pre-requisite patch. Than in the legacy bindings conversion patch you'd need to use it to correctly evaluate a generic NAND flash node. Adding some example properties to the DT-schema would be also required. -Sergey > > The spi-nand schema match failure happens before I make any change. > The tool also throws errors for these files which are unrelated > > Documentation/devicetree/bindings/net/qcom,ipa.yaml: ignoring, error > in schema: properties: qcom,smem-state-names > Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml: > ignoring, error in schema: patternProperties: ^filter@[0-9]+$: > properties: st,adc-channel-names > Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml: > ignoring, error in schema: properties: qcom,bcm-voter-names > > Thanks, > Brad _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel