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 6A6FFC6379F for ; Tue, 14 Feb 2023 14:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233405AbjBNOot (ORCPT ); Tue, 14 Feb 2023 09:44:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232231AbjBNOos (ORCPT ); Tue, 14 Feb 2023 09:44:48 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95DAC1D936; Tue, 14 Feb 2023 06:44:41 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id E976E40009; Tue, 14 Feb 2023 14:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1676385880; 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=spc8MwHpcjXgH4ztj2eiUqqTcn2TdRR+RZKvGct5U4M=; b=mLlalOBeJtNca5NZp/JfEJYC3gTbI74xNgXIKae64Y0pqN0RthdmJRJy92EjgKWDF2gIac 0EIOt2l9hAGg9qptE6DnUPSV64dZQ/L7+C2zJtMxiBk5FGFkA0pEUPd7tIuGXrN3TpcI9P RFaLVQa4/j4nhJAG2TRkr9alGESGvYb1bYBZNCyRgSyr4QzFv9Z9zjvpmuRwfM2QcCyDpu jdVQrefBvkt5NYZb6pTRrxSNLOxY5HWul5OZAFOzlEg0OIZ7NnK7W2MMoEfeMNiRnFBzdX tM/P2+9u2Cicj58KMvIslKfbEp0mR85LNh6SQqvEPrjPKeKkgxuhoU/BXW6Jsg== Date: Tue, 14 Feb 2023 15:44:33 +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: <20230214154433.6a421c51@xps-13> In-Reply-To: References: 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, Krzysztof, Rob, geert+renesas@glider.be wrote on Tue, 14 Feb 2023 15:26:43 +0100: > SPI EEPROMs typically support both SPI Mode 0 (CPOL=3DCPHA=3D0) and Mode 3 > (CPOL=3DCPHA=3D1). However, using the latter is currently flagged as an > error by "make dtbs_check", e.g.: >=20 > arch/arm/boot/dts/r8a7791-koelsch.dtb: flash@0: Unevaluated propertie= s are not allowed ('spi-cpha', 'spi-cpol' were unexpected) > From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml >=20 > Fix this by documenting support for CPOL=3DCPHA=3D1. >=20 > 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(+) >=20 > diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/D= ocumentation/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 does = not > make any difference. > =20 > + spi-cpol: true > + spi-cpha: true 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? > + > +dependencies: > + spi-cpol: [ spi-cpha ] > + spi-cpha: [ spi-cpol ] > + > unevaluatedProperties: false > =20 > examples: Thanks, Miqu=C3=A8l