1# Copyright (c) 2020 Nordic Semiconductor ASA
2# SPDX-License-Identifier: Apache-2.0
3
4description: Atmel AT45 (or compatible) SPI flash
5
6compatible: "atmel,at45"
7
8include: [spi-device.yaml]
9
10properties:
11  jedec-id:
12    type: uint8-array
13    required: true
14    description: JEDEC ID as manufacturer ID (1 byte) and device ID (2 bytes).
15
16  size:
17    type: int
18    required: true
19    description: Flash capacity in bits.
20
21  sector-size:
22    type: int
23    required: true
24    description: Flash sector size in bytes.
25
26  sector-0a-pages:
27    type: int
28    default: 8
29    description: |
30      Most available AT45 flash chips have their first two sectors shorter
31      than the consecutive ones. Usually, the first sector is marked as 0a
32      and has its size equal to eight pages (one block) and the second one
33      (usually 0b) is the complement to the size of a regular sector.
34      This property allows specifying the size (in pages) of that first sector
35      and defaults to the commonly used value of eight pages.
36      Value of zero means that the flash chip has all sectors of equal size.
37
38  block-size:
39    type: int
40    required: true
41    description: Flash block size in bytes.
42
43  page-size:
44    type: int
45    required: true
46    description: Flash page size in bytes.
47
48  no-chip-erase:
49    type: boolean
50    description: |
51      If set, indicates that the chip does not support the chip erase command.
52
53  no-sector-erase:
54    type: boolean
55    description: |
56      If set, indicates that the chip does not support the sector erase command.
57
58  use-udpd:
59    type: boolean
60    description: |
61      When set, the driver will use the Ultra-Deep Power-Down command instead
62      of the default Deep Power-Down one to put the chip into low power mode.
63
64      From the driver perspective, as it does not rely on the contents of the
65      SRAM buffers in the chip, the difference between the Deep and Ultra-Deep
66      Power-Down modes is that the chip consumes far less power in the latter
67      but needs some more time to enter this mode and to exit from it.
68
69  enter-dpd-delay:
70    type: int
71    default: 0
72    description: |
73      Time, in nanoseconds, needed by the chip to enter the Deep Power-Down
74      mode (or Ultra-Deep Power-Down mode when the "use-udpd" property is set)
75      after the corresponding command is issued.
76
77  exit-dpd-delay:
78    type: int
79    default: 0
80    description: |
81      Time, in nanoseconds, needed by the chip to exit from the Deep Power-Down
82      mode (or Ultra-Deep Power-Down mode when the "use-udpd" property is set)
83      after the corresponding command is issued.
84
85  reset-gpios:
86    type: phandle-array
87    description: |
88      The RESET pin of AT45 is active low.
89      If connected directly the MCU pin should be configured
90      as active low.
91
92  wp-gpios:
93    type: phandle-array
94    description: |
95      The WP pin of AT45 is active low.
96      If connected directly the MCU pin should be configured
97      as active low.
98