Skip to content

Commit

Permalink
dt-bindings: mtd: jedec,spi-nor: Document CPOL/CPHA support
Browse files Browse the repository at this point in the history
SPI EEPROMs typically support both SPI Mode 0 (CPOL=CPHA=0) and Mode 3
(CPOL=CPHA=1).  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 properties are not allowed ('spi-cpha', 'spi-cpol' were unexpected)
	    From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml

Fix this by documenting support for CPOL=CPHA=1.

Fixes: 233363a ("spi/panel: dt-bindings: drop CPHA and CPOL from common properties")
Cc: stable@vger.kernel.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/afe470603028db9374930b0c57464b1f6d52bdd3.1676384304.git.geert+renesas@glider.be
  • Loading branch information
Geert Uytterhoeven authored and Miquel Raynal committed Mar 22, 2023
1 parent 75dce6a commit a56cde4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ properties:
If "broken-flash-reset" is present then having this property does not
make any difference.

spi-cpol: true
spi-cpha: true

dependencies:
spi-cpol: [ spi-cpha ]
spi-cpha: [ spi-cpol ]

unevaluatedProperties: false

examples:
Expand Down

0 comments on commit a56cde4

Please sign in to comment.