xref: /linux/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml (revision 3ff9ee2a8890552245530e0d8b8c5ca7f2998219)
1*3ff9ee2aSRob Herring# SPDX-License-Identifier: GPL-2.0-only
2*3ff9ee2aSRob Herring%YAML 1.2
3*3ff9ee2aSRob Herring---
4*3ff9ee2aSRob Herring$id: http://devicetree.org/schemas/mtd/jedec,spi-nor.yaml#
5*3ff9ee2aSRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
6*3ff9ee2aSRob Herring
7*3ff9ee2aSRob Herringtitle: SPI NOR flash ST M25Pxx (and similar) serial flash chips
8*3ff9ee2aSRob Herring
9*3ff9ee2aSRob Herringmaintainers:
10*3ff9ee2aSRob Herring  - Rob Herring <robh@kernel.org>
11*3ff9ee2aSRob Herring
12*3ff9ee2aSRob Herringproperties:
13*3ff9ee2aSRob Herring  compatible:
14*3ff9ee2aSRob Herring    oneOf:
15*3ff9ee2aSRob Herring      - items:
16*3ff9ee2aSRob Herring          - pattern: "^((((micron|spansion|st),)?\
17*3ff9ee2aSRob Herring              (m25p(40|80|16|32|64|128)|\
18*3ff9ee2aSRob Herring              n25q(32b|064|128a11|128a13|256a|512a|164k)))|\
19*3ff9ee2aSRob Herring              atmel,at25df(321a|641|081a)|\
20*3ff9ee2aSRob Herring              everspin,mr25h(10|40|128|256)|\
21*3ff9ee2aSRob Herring              (mxicy|macronix),mx25l(4005a|1606e|6405d|8005|12805d|25635e)|\
22*3ff9ee2aSRob Herring              (mxicy|macronix),mx25u(4033|4035)|\
23*3ff9ee2aSRob Herring              (spansion,)?s25fl(128s|256s1|512s|008k|064k|164k)|\
24*3ff9ee2aSRob Herring              (sst|microchip),sst25vf(016b|032b|040b)|\
25*3ff9ee2aSRob Herring              (sst,)?sst26wf016b|\
26*3ff9ee2aSRob Herring              (sst,)?sst25wf(040b|080)|\
27*3ff9ee2aSRob Herring              winbond,w25x(80|32)|\
28*3ff9ee2aSRob Herring              (winbond,)?w25q(16|32(w|dw)?|64(dw)?|80bl|128(fw)?|256))$"
29*3ff9ee2aSRob Herring          - const: jedec,spi-nor
30*3ff9ee2aSRob Herring      - items:
31*3ff9ee2aSRob Herring          - enum:
32*3ff9ee2aSRob Herring              - issi,is25lp016d
33*3ff9ee2aSRob Herring              - micron,mt25qu02g
34*3ff9ee2aSRob Herring              - mxicy,mx25r1635f
35*3ff9ee2aSRob Herring              - mxicy,mx25u6435f
36*3ff9ee2aSRob Herring              - mxicy,mx25v8035f
37*3ff9ee2aSRob Herring              - spansion,s25sl12801
38*3ff9ee2aSRob Herring              - spansion,s25fs512s
39*3ff9ee2aSRob Herring          - const: jedec,spi-nor
40*3ff9ee2aSRob Herring      - const: jedec,spi-nor
41*3ff9ee2aSRob Herring    description:
42*3ff9ee2aSRob Herring      Must also include "jedec,spi-nor" for any SPI NOR flash that can be
43*3ff9ee2aSRob Herring      identified by the JEDEC READ ID opcode (0x9F).
44*3ff9ee2aSRob Herring
45*3ff9ee2aSRob Herring  reg:
46*3ff9ee2aSRob Herring    maxItems: 1
47*3ff9ee2aSRob Herring
48*3ff9ee2aSRob Herring  spi-max-frequency: true
49*3ff9ee2aSRob Herring  spi-rx-bus-width: true
50*3ff9ee2aSRob Herring  spi-tx-bus-width: true
51*3ff9ee2aSRob Herring
52*3ff9ee2aSRob Herring  m25p,fast-read:
53*3ff9ee2aSRob Herring    type: boolean
54*3ff9ee2aSRob Herring    description:
55*3ff9ee2aSRob Herring      Use the "fast read" opcode to read data from the chip instead of the usual
56*3ff9ee2aSRob Herring      "read" opcode. This opcode is not supported by all chips and support for
57*3ff9ee2aSRob Herring      it can not be detected at runtime. Refer to your chips' datasheet to check
58*3ff9ee2aSRob Herring      if this is supported by your chip.
59*3ff9ee2aSRob Herring
60*3ff9ee2aSRob Herring  broken-flash-reset:
61*3ff9ee2aSRob Herring    type: boolean
62*3ff9ee2aSRob Herring    description:
63*3ff9ee2aSRob Herring      Some flash devices utilize stateful addressing modes (e.g., for 32-bit
64*3ff9ee2aSRob Herring      addressing) which need to be managed carefully by a system. Because these
65*3ff9ee2aSRob Herring      sorts of flash don't have a standardized software reset command, and
66*3ff9ee2aSRob Herring      because some systems don't toggle the flash RESET# pin upon system reset
67*3ff9ee2aSRob Herring      (if the pin even exists at all), there are systems which cannot reboot
68*3ff9ee2aSRob Herring      properly if the flash is left in the "wrong" state. This boolean flag can
69*3ff9ee2aSRob Herring      be used on such systems, to denote the absence of a reliable reset
70*3ff9ee2aSRob Herring      mechanism.
71*3ff9ee2aSRob Herring
72*3ff9ee2aSRob Herring  label: true
73*3ff9ee2aSRob Herring
74*3ff9ee2aSRob Herring  partitions:
75*3ff9ee2aSRob Herring    type: object
76*3ff9ee2aSRob Herring
77*3ff9ee2aSRob Herring  '#address-cells': true
78*3ff9ee2aSRob Herring  '#size-cells': true
79*3ff9ee2aSRob Herring
80*3ff9ee2aSRob HerringpatternProperties:
81*3ff9ee2aSRob Herring  # Note: use 'partitions' node for new users
82*3ff9ee2aSRob Herring  '^partition@':
83*3ff9ee2aSRob Herring    type: object
84*3ff9ee2aSRob Herring
85*3ff9ee2aSRob HerringadditionalProperties: false
86*3ff9ee2aSRob Herring
87*3ff9ee2aSRob Herringexamples:
88*3ff9ee2aSRob Herring  - |
89*3ff9ee2aSRob Herring    spi {
90*3ff9ee2aSRob Herring        #address-cells = <1>;
91*3ff9ee2aSRob Herring        #size-cells = <0>;
92*3ff9ee2aSRob Herring
93*3ff9ee2aSRob Herring        flash@0 {
94*3ff9ee2aSRob Herring            #address-cells = <1>;
95*3ff9ee2aSRob Herring            #size-cells = <1>;
96*3ff9ee2aSRob Herring            compatible = "spansion,m25p80", "jedec,spi-nor";
97*3ff9ee2aSRob Herring            reg = <0>;
98*3ff9ee2aSRob Herring            spi-max-frequency = <40000000>;
99*3ff9ee2aSRob Herring            m25p,fast-read;
100*3ff9ee2aSRob Herring        };
101*3ff9ee2aSRob Herring    };
102*3ff9ee2aSRob Herring...
103