Skip to content

Commit

Permalink
dts: mtd: refactor JESD216 support
Browse files Browse the repository at this point in the history
jedec,jesd216.yaml has properties for any memory device that conforms
to the JESD216 specification.  This file at a minimum should be
included in the binding for any driver that interacts with such a
device.

jedec,spi-nor-common.yaml extends jedec,jesd216 with additional
parameters useful for memory devices that are not available from
standard JESD216 parameter tables.  This file may be included instead
of jedec,jesd216.yaml if a driver is able to support additional
functionality related to the extended description.

jedec,spi-nor.yaml remains the binding for the Zephyr SPI_NOR driver
alone.

Signed-off-by: Peter Bigot <[email protected]>
  • Loading branch information
pabigot authored and galak committed Jan 13, 2021
1 parent e017441 commit 72998f0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 25 deletions.
45 changes: 45 additions & 0 deletions dts/bindings/mtd/jedec,jesd216.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (c) 2018 Peter Bigot Consulting, LLC
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

# Common properties used by nodes describing serial flash devices that
# are compatible with the JESD216 Serial Flash Discoverable Parameters
# specification.
#
# This allows encoding the entire BFP block in devicetree to avoid
# reading at runtime, while still allowing the driver to pull out extra
# data of interest, such as erase sizes.
#
# Alternatively the BFP block can be absent, but critical fields like
# size can be provided directly along with the JEDEC ID of the expected
# device to verify its presence at runtime.
#
# Only properties supported by parameter tables documented in the
# JESD216 standards should be listed in this binding include file.

properties:
jedec-id:
type: uint8-array
required: false
description: JEDEC ID as manufacturer ID, memory type, memory density

size:
type: int
required: false
description: flash capacity in bits

sfdp-bfp:
type: uint8-array
required: false
description: |
Contains the 32-bit words in little-endian byte order from the
JESD216 Serial Flash Discoverable Parameters Basic Flash
Parameters table. This provides flash-specific configuration
information in cases were runtime retrieval of SFDP data
is not desired.
has-be32k:
type: boolean
required: false
deprecated: true
description: Not used after Zephyr 2.3.0
34 changes: 9 additions & 25 deletions dts/bindings/mtd/jedec,spi-nor-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,17 @@
# SPDX-License-Identifier: Apache-2.0

# Common properties used by nodes describing M25P80-compatible SPI NOR
# serial flash devices.
# serial flash devices, regardless of which Zephyr driver is being used.
#
# This extends JESD216-defined features with additional functionality
# that may be specific to the vendor of a M25P80-compatible device and
# only supported in certain drivers. Any information that can be
# obtained from standardized SFDP parameter blocks should be in
# jedec,jesd216.yaml instead.

properties:
jedec-id:
type: uint8-array
required: false
description: JEDEC ID as manufacturer ID, memory type, memory density

sfdp-bfp:
type: uint8-array
required: false
description: |
Contains the 32-bit words in little-endian byte order from the
JESD216 Serial Flash Discoverable Parameters Basic Flash
Parameters table. This provides flash-specific configuration
information in cases were runtime configuration is not desired.
has-be32k:
type: boolean
required: false
description: Not used after Zephyr 2.3.0
include: "jedec,jesd216.yaml"

properties:
requires-ulbpr:
type: boolean
required: false
Expand Down Expand Up @@ -89,8 +78,3 @@ properties:
deep power down and be ready to receive additional commands.
If not provided the driver does not enforce a delay.
size:
type: int
required: false
description: flash capacity in bits

0 comments on commit 72998f0

Please sign in to comment.