Commit bb106390 authored by Peter Bigot's avatar Peter Bigot Committed by Carles Cufi
Browse files

dts: bindings: generalize JEDEC SPI NOR descriptions



Currently most SPI NOR serial flash devices are accessed through the
spi-nor flash driver, but there are pending enhancements that will
access these devices through other driver implementations.  Several of
the descriptive properties of the flash memories are common regardless
of the interface selected.  Pull those out to a separate yaml file to
be included into the bindings for interface-specific node descriptions.

Also revise the documentation to note that the jedec,spi-nor
compatible depends on a commands set compatible with the Micron M25P80
serial nor flash; there is no JEDEC standard for these commands.
These devices do generally provide descriptive structures defined by
JESD216, but currently Zephyr doesn't make use of these structures.
The JEDEC CFI standard previously referenced in the description is not
relevant to these devices.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent bd593976
Loading
Loading
Loading
Loading
+87 −0
Original line number Diff line number Diff line
# Copyright (c) 2018 Peter Bigot Consulting, LLC
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

# Common properties used by nodes describing M25P80-compatible SPI NOR
# serial flash devices.

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

  has-be32k:
    type: boolean
    required: false
    description: Indicates the device supports the BE32K (0xD8) command

  requires-ulbpr:
    type: boolean
    required: false
    description: |
      Indicates the device requires the ULBPR (0x98) command.

      Some flash chips such as the Microchip SST26VF series have a block
      protection register that initializes to write-protected.  Use this
      property to indicate that the BPR must be unlocked before write
      operations can proceed.

  has-dpd:
    type: boolean
    required: false
    description: |
      Indicates the device supports the DPD (0xB9) command.

      Use this property to indicate the flash chip supports the Deep
      Power-Down mode that is entered by command 0xB9 to reduce power
      consumption below normal standby levels.  Use of this property
      implies that the RDPD (0xAB) Release from Deep Power Down command
      is also supported.  (On some chips this command functions as Read
      Electronic Signature; see t-enter-dpd).

  dpd-wakeup-sequence:
    type: array
    required: false
    description: |
      Specifies wakeup durations for devices without RDPD.

      Some devices (Macronix MX25R in particular) wake from deep power
      down by a timed sequence of CSn toggles rather than the RDPD
      command.  This property specifies three durations measured in
      nanoseconds, in this order:
      (1) tDPDD (Delay Time for Release from Deep Power-Down Mode)
      (2) tCDRP (CSn Toggling Time before Release from Deep Power-Down Mode)
      (3) tRDP (Recovery Time for Release from Deep Power-Down Mode)

      Absence of this property indicates that the RDPD command should be
      used to wake the chip from Deep Power-Down mode.

  t-enter-dpd:
    type: int
    required: false
    description: |
      Duration required to complete the DPD command.

      This provides the duration, in nanoseconds, that CSn must be
      remain deasserted after issuing DPD before the chip will enter
      deep power down.

      If not provided the driver does not enforce a delay.

  t-exit-dpd:
    type: int
    required: false
    description: |
      Duration required to complete the RDPD command.

      This provides the duration, in nanoseconds, that CSn must be
      remain deasserted after issuing RDPD before the chip will exit
      deep power down and be ready to receive additional commands.

      If not provided the driver does not enforce a delay.

  size:
    type: int
    required: true
    description: flash capacity in bits
+6 −82
Original line number Diff line number Diff line
# Copyright (c) 2018 Peter Bigot Consulting, LLC
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

description: SPI NOR flash that supports the JEDEC CFI interface
description: |
  Properties supporting Zephyr spi-nor flash driver (over the Zephyr SPI
  API) control of serial flash memories using the standard M25P80-based
  command set.

compatible: "jedec,spi-nor"

include: spi-device.yaml
include: [spi-device.yaml, "jedec,spi-nor-common.yaml"]

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

  has-be32k:
    type: boolean
    required: false
    description: Indicates the device supports the BE32K (0xD8) command

  requires-ulbpr:
    type: boolean
    required: false
    description: |
      Indicates the device requires the ULBPR (0x98) command.

      Some flash chips such as the Microchip SST26VF series have a block
      protection register that initializes to write-protected.  Use this
      property to indicate that the BPR must be unlocked before write
      operations can proceed.

  has-dpd:
    type: boolean
    required: false
    description: |
      Indicates the device supports the DPD (0xB9) command.

      Use this property to indicate the flash chip supports the Deep
      Power-Down mode that is entered by command 0xB9 to reduce power
      consumption below normal standby levels.  Use of this property
      implies that the RDPD (0xAB) Release from Deep Power Down command
      is also supported.  (On some chips this command functions as Read
      Electronic Signature; see t-enter-dpd).

  dpd-wakeup-sequence:
    type: array
    required: false
    description: |
      Specifies wakeup durations for devices without RDPD.

      Some devices (Macronix MX25R in particular) wake from deep power
      down by a timed sequence of CSn toggles rather than the RDPD
      command.  This property specifies three durations measured in
      nanoseconds, in this order:
      (1) tDPDD (Delay Time for Release from Deep Power-Down Mode)
      (2) tCDRP (CSn Toggling Time before Release from Deep Power-Down Mode)
      (3) tRDP (Recovery Time for Release from Deep Power-Down Mode)

      Absence of this property indicates that the RDPD command should be
      used to wake the chip from Deep Power-Down mode.

  t-enter-dpd:
    type: int
    required: false
    description: |
      Duration required to complete the DPD command.

      This provides the duration, in nanoseconds, that CSn must be
      remain deasserted after issuing DPD before the chip will enter
      deep power down.

      If not provided the driver does not enforce a delay.

  t-exit-dpd:
    type: int
    required: false
    description: |
      Duration required to complete the RDPD command.

      This provides the duration, in nanoseconds, that CSn must be
      remain deasserted after issuing RDPD before the chip will exit
      deep power down and be ready to receive additional commands.

      If not provided the driver does not enforce a delay.

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

  wp-gpios:
    type: phandle-array
    required: false