18c2ecf20Sopenharmony_ci* NXP SPI Flash Interface (SPIFI)
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciNXP SPIFI is a specialized SPI interface for serial Flash devices.
48c2ecf20Sopenharmony_ciIt supports one Flash device with 1-, 2- and 4-bits width in SPI
58c2ecf20Sopenharmony_cimode 0 or 3. The controller operates in either command or memory
68c2ecf20Sopenharmony_cimode. In memory mode the Flash is accessible from the CPU as
78c2ecf20Sopenharmony_cinormal memory.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciRequired properties:
108c2ecf20Sopenharmony_ci  - compatible : Should be "nxp,lpc1773-spifi"
118c2ecf20Sopenharmony_ci  - reg : the first contains the register location and length,
128c2ecf20Sopenharmony_ci          the second contains the memory mapping address and length
138c2ecf20Sopenharmony_ci  - reg-names: Should contain the reg names "spifi" and "flash"
148c2ecf20Sopenharmony_ci  - interrupts : Should contain the interrupt for the device
158c2ecf20Sopenharmony_ci  - clocks : The clocks needed by the SPIFI controller
168c2ecf20Sopenharmony_ci  - clock-names : Should contain the clock names "spifi" and "reg"
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciOptional properties:
198c2ecf20Sopenharmony_ci - resets : phandle + reset specifier
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciThe SPI Flash must be a child of the SPIFI node and must have a
228c2ecf20Sopenharmony_cicompatible property as specified in bindings/mtd/jedec,spi-nor.txt
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciOptionally it can also contain the following properties.
258c2ecf20Sopenharmony_ci - spi-cpol : Controller only supports mode 0 and 3 so either
268c2ecf20Sopenharmony_ci              both spi-cpol and spi-cpha should be present or
278c2ecf20Sopenharmony_ci              none of them
288c2ecf20Sopenharmony_ci - spi-cpha : See above
298c2ecf20Sopenharmony_ci - spi-rx-bus-width : Used to select how many pins that are used
308c2ecf20Sopenharmony_ci                      for input on the controller
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciSee bindings/spi/spi-bus.txt for more information.
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciExample:
358c2ecf20Sopenharmony_cispifi: spifi@40003000 {
368c2ecf20Sopenharmony_ci	compatible = "nxp,lpc1773-spifi";
378c2ecf20Sopenharmony_ci	reg = <0x40003000 0x1000>, <0x14000000 0x4000000>;
388c2ecf20Sopenharmony_ci	reg-names = "spifi", "flash";
398c2ecf20Sopenharmony_ci	interrupts = <30>;
408c2ecf20Sopenharmony_ci	clocks = <&ccu1 CLK_SPIFI>, <&ccu1 CLK_CPU_SPIFI>;
418c2ecf20Sopenharmony_ci	clock-names = "spifi", "reg";
428c2ecf20Sopenharmony_ci	resets = <&rgu 53>;
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci	flash@0 {
458c2ecf20Sopenharmony_ci		compatible = "jedec,spi-nor";
468c2ecf20Sopenharmony_ci		spi-cpol;
478c2ecf20Sopenharmony_ci		spi-cpha;
488c2ecf20Sopenharmony_ci		spi-rx-bus-width = <4>;
498c2ecf20Sopenharmony_ci		#address-cells = <1>;
508c2ecf20Sopenharmony_ci		#size-cells = <1>;
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci		partition@0 {
538c2ecf20Sopenharmony_ci			label = "data";
548c2ecf20Sopenharmony_ci			reg = <0 0x200000>;
558c2ecf20Sopenharmony_ci		};
568c2ecf20Sopenharmony_ci	};
578c2ecf20Sopenharmony_ci};
588c2ecf20Sopenharmony_ci
59