Skip to content

Commit 72998f0

Browse files
pabigotgalak
authored andcommitted
dts: mtd: refactor JESD216 support
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]>
1 parent e017441 commit 72998f0

File tree

2 files changed

+54
-25
lines changed

2 files changed

+54
-25
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright (c) 2018 Peter Bigot Consulting, LLC
2+
# Copyright (c) 2019-2020 Nordic Semiconductor ASA
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Common properties used by nodes describing serial flash devices that
6+
# are compatible with the JESD216 Serial Flash Discoverable Parameters
7+
# specification.
8+
#
9+
# This allows encoding the entire BFP block in devicetree to avoid
10+
# reading at runtime, while still allowing the driver to pull out extra
11+
# data of interest, such as erase sizes.
12+
#
13+
# Alternatively the BFP block can be absent, but critical fields like
14+
# size can be provided directly along with the JEDEC ID of the expected
15+
# device to verify its presence at runtime.
16+
#
17+
# Only properties supported by parameter tables documented in the
18+
# JESD216 standards should be listed in this binding include file.
19+
20+
properties:
21+
jedec-id:
22+
type: uint8-array
23+
required: false
24+
description: JEDEC ID as manufacturer ID, memory type, memory density
25+
26+
size:
27+
type: int
28+
required: false
29+
description: flash capacity in bits
30+
31+
sfdp-bfp:
32+
type: uint8-array
33+
required: false
34+
description: |
35+
Contains the 32-bit words in little-endian byte order from the
36+
JESD216 Serial Flash Discoverable Parameters Basic Flash
37+
Parameters table. This provides flash-specific configuration
38+
information in cases were runtime retrieval of SFDP data
39+
is not desired.
40+
41+
has-be32k:
42+
type: boolean
43+
required: false
44+
deprecated: true
45+
description: Not used after Zephyr 2.3.0

dts/bindings/mtd/jedec,spi-nor-common.yaml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,17 @@
33
# SPDX-License-Identifier: Apache-2.0
44

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

8-
properties:
9-
jedec-id:
10-
type: uint8-array
11-
required: false
12-
description: JEDEC ID as manufacturer ID, memory type, memory density
13-
14-
sfdp-bfp:
15-
type: uint8-array
16-
required: false
17-
description: |
18-
Contains the 32-bit words in little-endian byte order from the
19-
JESD216 Serial Flash Discoverable Parameters Basic Flash
20-
Parameters table. This provides flash-specific configuration
21-
information in cases were runtime configuration is not desired.
22-
23-
has-be32k:
24-
type: boolean
25-
required: false
26-
description: Not used after Zephyr 2.3.0
14+
include: "jedec,jesd216.yaml"
2715

16+
properties:
2817
requires-ulbpr:
2918
type: boolean
3019
required: false
@@ -89,8 +78,3 @@ properties:
8978
deep power down and be ready to receive additional commands.
9079
9180
If not provided the driver does not enforce a delay.
92-
93-
size:
94-
type: int
95-
required: false
96-
description: flash capacity in bits

0 commit comments

Comments
 (0)