xref: /linux/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml (revision 96d3af22f87c81f21bd4c79b257e205240157ae0)
13ff9ee2aSRob Herring# SPDX-License-Identifier: GPL-2.0-only
23ff9ee2aSRob Herring%YAML 1.2
33ff9ee2aSRob Herring---
43ff9ee2aSRob Herring$id: http://devicetree.org/schemas/mtd/jedec,spi-nor.yaml#
53ff9ee2aSRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
63ff9ee2aSRob Herring
73ff9ee2aSRob Herringtitle: SPI NOR flash ST M25Pxx (and similar) serial flash chips
83ff9ee2aSRob Herring
93ff9ee2aSRob Herringmaintainers:
103ff9ee2aSRob Herring  - Rob Herring <robh@kernel.org>
113ff9ee2aSRob Herring
12*96d3af22SMichael WalleallOf:
13*96d3af22SMichael Walle  - $ref: "mtd.yaml#"
14*96d3af22SMichael Walle
153ff9ee2aSRob Herringproperties:
163ff9ee2aSRob Herring  compatible:
173ff9ee2aSRob Herring    oneOf:
183ff9ee2aSRob Herring      - items:
193ff9ee2aSRob Herring          - pattern: "^((((micron|spansion|st),)?\
203ff9ee2aSRob Herring              (m25p(40|80|16|32|64|128)|\
213ff9ee2aSRob Herring              n25q(32b|064|128a11|128a13|256a|512a|164k)))|\
223ff9ee2aSRob Herring              atmel,at25df(321a|641|081a)|\
233ff9ee2aSRob Herring              everspin,mr25h(10|40|128|256)|\
243ff9ee2aSRob Herring              (mxicy|macronix),mx25l(4005a|1606e|6405d|8005|12805d|25635e)|\
253ff9ee2aSRob Herring              (mxicy|macronix),mx25u(4033|4035)|\
263ff9ee2aSRob Herring              (spansion,)?s25fl(128s|256s1|512s|008k|064k|164k)|\
273ff9ee2aSRob Herring              (sst|microchip),sst25vf(016b|032b|040b)|\
283ff9ee2aSRob Herring              (sst,)?sst26wf016b|\
293ff9ee2aSRob Herring              (sst,)?sst25wf(040b|080)|\
303ff9ee2aSRob Herring              winbond,w25x(80|32)|\
313ff9ee2aSRob Herring              (winbond,)?w25q(16|32(w|dw)?|64(dw)?|80bl|128(fw)?|256))$"
323ff9ee2aSRob Herring          - const: jedec,spi-nor
333ff9ee2aSRob Herring      - items:
343ff9ee2aSRob Herring          - enum:
353ff9ee2aSRob Herring              - issi,is25lp016d
363ff9ee2aSRob Herring              - micron,mt25qu02g
373ff9ee2aSRob Herring              - mxicy,mx25r1635f
383ff9ee2aSRob Herring              - mxicy,mx25u6435f
393ff9ee2aSRob Herring              - mxicy,mx25v8035f
403ff9ee2aSRob Herring              - spansion,s25sl12801
413ff9ee2aSRob Herring              - spansion,s25fs512s
423ff9ee2aSRob Herring          - const: jedec,spi-nor
433ff9ee2aSRob Herring      - const: jedec,spi-nor
443ff9ee2aSRob Herring    description:
453ff9ee2aSRob Herring      Must also include "jedec,spi-nor" for any SPI NOR flash that can be
463ff9ee2aSRob Herring      identified by the JEDEC READ ID opcode (0x9F).
473ff9ee2aSRob Herring
483ff9ee2aSRob Herring  reg:
493ff9ee2aSRob Herring    maxItems: 1
503ff9ee2aSRob Herring
513ff9ee2aSRob Herring  spi-max-frequency: true
523ff9ee2aSRob Herring  spi-rx-bus-width: true
533ff9ee2aSRob Herring  spi-tx-bus-width: true
543ff9ee2aSRob Herring
553ff9ee2aSRob Herring  m25p,fast-read:
563ff9ee2aSRob Herring    type: boolean
573ff9ee2aSRob Herring    description:
583ff9ee2aSRob Herring      Use the "fast read" opcode to read data from the chip instead of the usual
593ff9ee2aSRob Herring      "read" opcode. This opcode is not supported by all chips and support for
603ff9ee2aSRob Herring      it can not be detected at runtime. Refer to your chips' datasheet to check
613ff9ee2aSRob Herring      if this is supported by your chip.
623ff9ee2aSRob Herring
633ff9ee2aSRob Herring  broken-flash-reset:
643ff9ee2aSRob Herring    type: boolean
653ff9ee2aSRob Herring    description:
663ff9ee2aSRob Herring      Some flash devices utilize stateful addressing modes (e.g., for 32-bit
673ff9ee2aSRob Herring      addressing) which need to be managed carefully by a system. Because these
683ff9ee2aSRob Herring      sorts of flash don't have a standardized software reset command, and
693ff9ee2aSRob Herring      because some systems don't toggle the flash RESET# pin upon system reset
703ff9ee2aSRob Herring      (if the pin even exists at all), there are systems which cannot reboot
713ff9ee2aSRob Herring      properly if the flash is left in the "wrong" state. This boolean flag can
723ff9ee2aSRob Herring      be used on such systems, to denote the absence of a reliable reset
733ff9ee2aSRob Herring      mechanism.
743ff9ee2aSRob Herring
753ff9ee2aSRob Herring  label: true
763ff9ee2aSRob Herring
773ff9ee2aSRob Herring  partitions:
783ff9ee2aSRob Herring    type: object
793ff9ee2aSRob Herring
803ff9ee2aSRob Herring  '#address-cells': true
813ff9ee2aSRob Herring  '#size-cells': true
823ff9ee2aSRob Herring
833ff9ee2aSRob HerringpatternProperties:
843ff9ee2aSRob Herring  # Note: use 'partitions' node for new users
853ff9ee2aSRob Herring  '^partition@':
863ff9ee2aSRob Herring    type: object
873ff9ee2aSRob Herring
88*96d3af22SMichael Walle  "^otp(-[0-9]+)?$":
89*96d3af22SMichael Walle    type: object
90*96d3af22SMichael Walle
913ff9ee2aSRob HerringadditionalProperties: false
923ff9ee2aSRob Herring
933ff9ee2aSRob Herringexamples:
943ff9ee2aSRob Herring  - |
953ff9ee2aSRob Herring    spi {
963ff9ee2aSRob Herring        #address-cells = <1>;
973ff9ee2aSRob Herring        #size-cells = <0>;
983ff9ee2aSRob Herring
993ff9ee2aSRob Herring        flash@0 {
1003ff9ee2aSRob Herring            #address-cells = <1>;
1013ff9ee2aSRob Herring            #size-cells = <1>;
1023ff9ee2aSRob Herring            compatible = "spansion,m25p80", "jedec,spi-nor";
1033ff9ee2aSRob Herring            reg = <0>;
1043ff9ee2aSRob Herring            spi-max-frequency = <40000000>;
1053ff9ee2aSRob Herring            m25p,fast-read;
1063ff9ee2aSRob Herring        };
1073ff9ee2aSRob Herring    };
1083ff9ee2aSRob Herring...
109