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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A154CC6379F for ; Tue, 14 Feb 2023 15:56:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231151AbjBNP4n (ORCPT ); Tue, 14 Feb 2023 10:56:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbjBNP4n (ORCPT ); Tue, 14 Feb 2023 10:56:43 -0500 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49AF2252BD; Tue, 14 Feb 2023 07:56:41 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 8F2A52000A; Tue, 14 Feb 2023 15:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1676390200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vNKGSGMg8f++uU4wWjyIvzgyGnDvNR/WlS+2/U80G8U=; b=Ejr7sNtEtXRqpXUU+WCTcDwLrHnimWJPzCRHYgSteerTTDCqasSDuy0z7imGZIbDP+qrap 03llLZoGdnzSzOHE75z7OC7a/uDELmhZLByqKufP6q1JsgmEOwjEdxwYGPd+MEybsI2m9y 1CUSy9Y+2T3mqLk6EOCqlBP1/piLzDIm8LqCb9fQKPpCtJyBgG/ixmugcsvrFRcUwqzmg8 8tKYN704Yar6jK56J2RuNaBe8hCSt1cU8mrEDGvoDD2LhK64AuS9IIOMi4C4VKcFMq8BfD uV07gry0AztsNvAV7VPn8IgSQpXyCjIqh/gd8W3PrBDTlybL5KdfFfFFWNYUVQ== Date: Tue, 14 Feb 2023 16:56:37 +0100 From: Miquel Raynal To: Geert Uytterhoeven Cc: Tudor Ambarus , Pratyush Yadav , Michael Walle , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Mark Brown , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH] dt-bindings: mtd: jedec,spi-nor: Document CPOL/CPHA support Message-ID: <20230214165637.56102b18@xps-13> In-Reply-To: References: <20230214154433.6a421c51@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Geert, geert@linux-m68k.org wrote on Tue, 14 Feb 2023 16:22:15 +0100: > Hi Miquel, >=20 > On Tue, Feb 14, 2023 at 3:44 PM Miquel Raynal = wrote: > > geert+renesas@glider.be wrote on Tue, 14 Feb 2023 15:26:43 +0100: =20 > > > SPI EEPROMs typically support both SPI Mode 0 (CPOL=3DCPHA=3D0) and M= ode 3 > > > (CPOL=3DCPHA=3D1). However, using the latter is currently flagged as= an > > > error by "make dtbs_check", e.g.: > > > > > > arch/arm/boot/dts/r8a7791-koelsch.dtb: flash@0: Unevaluated prope= rties are not allowed ('spi-cpha', 'spi-cpol' were unexpected) > > > From schema: Documentation/devicetree/bindings/mtd/jedec,sp= i-nor.yaml > > > > > > Fix this by documenting support for CPOL=3DCPHA=3D1. > > > > > > Fixes: 233363aba72ac638 ("spi/panel: dt-bindings: drop CPHA and CPOL = from common properties") > > > Signed-off-by: Geert Uytterhoeven > > > --- > > > Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml= b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml > > > index f86255ce13af0871..bb62ac4585822982 100644 > > > --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml > > > +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml > > > @@ -76,6 +76,13 @@ properties: > > > If "broken-flash-reset" is present then having this property d= oes not > > > make any difference. > > > > > > + spi-cpol: true > > > + spi-cpha: true =20 > > > > I see that spi-cpol and spi-cpha are described in spi-controller.yaml > > which references spi-peripheral-props.yaml, but jedec,spi-nor.yaml > > only references spi-peripheral-props.yaml leading to spi-cpol and > > spi-cpha not being recognized as valid properties. > > > > Wouldn't it be cleaner to to have these two properties defined in > > spi-peripheral-props.yaml instead? =20 >=20 > They were moved out of that file by the commit referenced in the > Fixes: tag above, because they are not supported by all SPI targets. > It's the responsibility of the SPI target bindings to list what is suppor= ted. Oops, I overlooked that line. I actually see no point in constraining device trees on that regard, but, well, Krzysztof is the author, I believe he knows his stuff, so let's go for it. Reviewed-by: Miquel Raynal Thanks, Miqu=C3=A8l