18c2ecf20Sopenharmony_ciIntegrated Flash Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciProperties:
48c2ecf20Sopenharmony_ci- name : Should be ifc
58c2ecf20Sopenharmony_ci- compatible : should contain "fsl,ifc". The version of the integrated
68c2ecf20Sopenharmony_ci               flash controller can be found in the IFC_REV register at
78c2ecf20Sopenharmony_ci               offset zero.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci- #address-cells : Should be either two or three.  The first cell is the
108c2ecf20Sopenharmony_ci                   chipselect number, and the remaining cells are the
118c2ecf20Sopenharmony_ci                   offset into the chipselect.
128c2ecf20Sopenharmony_ci- #size-cells : Either one or two, depending on how large each chipselect
138c2ecf20Sopenharmony_ci                can be.
148c2ecf20Sopenharmony_ci- reg : Offset and length of the register set for the device
158c2ecf20Sopenharmony_ci- interrupts: IFC may have one or two interrupts.  If two interrupt
168c2ecf20Sopenharmony_ci              specifiers are present, the first is the "common"
178c2ecf20Sopenharmony_ci              interrupt (CM_EVTER_STAT), and the second is the NAND
188c2ecf20Sopenharmony_ci              interrupt (NAND_EVTER_STAT).  If there is only one,
198c2ecf20Sopenharmony_ci              that interrupt reports both types of event.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci- little-endian : If this property is absent, the big-endian mode will
228c2ecf20Sopenharmony_ci                  be in use as default for registers.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci- ranges : Each range corresponds to a single chipselect, and covers
258c2ecf20Sopenharmony_ci           the entire access window as configured.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciChild device nodes describe the devices connected to IFC such as NOR (e.g.
288c2ecf20Sopenharmony_cicfi-flash) and NAND (fsl,ifc-nand). There might be board specific devices
298c2ecf20Sopenharmony_cilike FPGAs, CPLDs, etc.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciExample:
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci	ifc@ffe1e000 {
348c2ecf20Sopenharmony_ci		compatible = "fsl,ifc", "simple-bus";
358c2ecf20Sopenharmony_ci		#address-cells = <2>;
368c2ecf20Sopenharmony_ci		#size-cells = <1>;
378c2ecf20Sopenharmony_ci		reg = <0x0 0xffe1e000 0 0x2000>;
388c2ecf20Sopenharmony_ci		interrupts = <16 2 19 2>;
398c2ecf20Sopenharmony_ci		little-endian;
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci		/* NOR, NAND Flashes and CPLD on board */
428c2ecf20Sopenharmony_ci		ranges = <0x0 0x0 0x0 0xee000000 0x02000000
438c2ecf20Sopenharmony_ci			  0x1 0x0 0x0 0xffa00000 0x00010000
448c2ecf20Sopenharmony_ci			  0x3 0x0 0x0 0xffb00000 0x00020000>;
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci		flash@0,0 {
478c2ecf20Sopenharmony_ci			#address-cells = <1>;
488c2ecf20Sopenharmony_ci			#size-cells = <1>;
498c2ecf20Sopenharmony_ci			compatible = "cfi-flash";
508c2ecf20Sopenharmony_ci			reg = <0x0 0x0 0x2000000>;
518c2ecf20Sopenharmony_ci			bank-width = <2>;
528c2ecf20Sopenharmony_ci			device-width = <1>;
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci			partition@0 {
558c2ecf20Sopenharmony_ci				/* 32MB for user data */
568c2ecf20Sopenharmony_ci				reg = <0x0 0x02000000>;
578c2ecf20Sopenharmony_ci				label = "NOR Data";
588c2ecf20Sopenharmony_ci			};
598c2ecf20Sopenharmony_ci		};
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci		flash@1,0 {
628c2ecf20Sopenharmony_ci			#address-cells = <1>;
638c2ecf20Sopenharmony_ci			#size-cells = <1>;
648c2ecf20Sopenharmony_ci			compatible = "fsl,ifc-nand";
658c2ecf20Sopenharmony_ci			reg = <0x1 0x0 0x10000>;
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci			partition@0 {
688c2ecf20Sopenharmony_ci				/* This location must not be altered  */
698c2ecf20Sopenharmony_ci				/* 1MB for u-boot Bootloader Image */
708c2ecf20Sopenharmony_ci				reg = <0x0 0x00100000>;
718c2ecf20Sopenharmony_ci				label = "NAND U-Boot Image";
728c2ecf20Sopenharmony_ci				read-only;
738c2ecf20Sopenharmony_ci			};
748c2ecf20Sopenharmony_ci		};
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci		cpld@3,0 {
778c2ecf20Sopenharmony_ci			#address-cells = <1>;
788c2ecf20Sopenharmony_ci			#size-cells = <1>;
798c2ecf20Sopenharmony_ci			compatible = "fsl,p1010rdb-cpld";
808c2ecf20Sopenharmony_ci			reg = <0x3 0x0 0x000001f>;
818c2ecf20Sopenharmony_ci		};
828c2ecf20Sopenharmony_ci	};
83