18c2ecf20Sopenharmony_ci* Device tree bindings for ARM PL172/PL175/PL176 MultiPort Memory Controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci- compatible:		Must be "arm,primecell" and exactly one from
68c2ecf20Sopenharmony_ci			"arm,pl172", "arm,pl175" or "arm,pl176".
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci- reg:			Must contains offset/length value for controller.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci- #address-cells:	Must be 2. The partition number has to be encoded in the
118c2ecf20Sopenharmony_ci			first address cell and it may accept values 0..N-1
128c2ecf20Sopenharmony_ci			(N - total number of partitions). The second cell is the
138c2ecf20Sopenharmony_ci			offset into the partition.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci- #size-cells:		Must be set to 1.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci- ranges:		Must contain one or more chip select memory regions.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci- clocks:		Must contain references to controller clocks.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci- clock-names:		Must contain "mpmcclk" and "apb_pclk".
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci- clock-ranges:		Empty property indicating that child nodes can inherit
248c2ecf20Sopenharmony_ci			named clocks. Required only if clock tree data present
258c2ecf20Sopenharmony_ci			in device tree.
268c2ecf20Sopenharmony_ci			See clock-bindings.txt
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciChild chip-select (cs) nodes contain the memory devices nodes connected to
298c2ecf20Sopenharmony_cisuch as NOR (e.g. cfi-flash) and NAND.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciRequired child cs node properties:
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci- #address-cells:	Must be 2.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci- #size-cells:		Must be 1.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci- ranges:		Empty property indicating that child nodes can inherit
388c2ecf20Sopenharmony_ci			memory layout.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci- clock-ranges:		Empty property indicating that child nodes can inherit
418c2ecf20Sopenharmony_ci			named clocks. Required only if clock tree data present
428c2ecf20Sopenharmony_ci			in device tree.
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci- mpmc,cs:		Chip select number. Indicates to the pl0172 driver
458c2ecf20Sopenharmony_ci			which chipselect is used for accessing the memory.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci- mpmc,memory-width:	Width of the chip select memory. Must be equal to
488c2ecf20Sopenharmony_ci			either 8, 16 or 32.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciOptional child cs node config properties:
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci- mpmc,async-page-mode:	Enable asynchronous page mode.
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci- mpmc,cs-active-high:	Set chip select polarity to active high.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci- mpmc,byte-lane-low:	Set byte lane state to low.
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci- mpmc,extended-wait:	Enable extended wait.
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci- mpmc,buffer-enable:	Enable write buffer, option is not supported by
618c2ecf20Sopenharmony_ci			PL175 and PL176 controllers.
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci- mpmc,write-protect:	Enable write protect.
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciOptional child cs node timing properties:
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci- mpmc,write-enable-delay:	Delay from chip select assertion to write
688c2ecf20Sopenharmony_ci				enable (WE signal) in nano seconds.
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci- mpmc,output-enable-delay:	Delay from chip select assertion to output
718c2ecf20Sopenharmony_ci				enable (OE signal) in nano seconds.
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci- mpmc,write-access-delay:	Delay from chip select assertion to write
748c2ecf20Sopenharmony_ci				access in nano seconds.
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci- mpmc,read-access-delay:	Delay from chip select assertion to read
778c2ecf20Sopenharmony_ci				access in nano seconds.
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci- mpmc,page-mode-read-delay:	Delay for asynchronous page mode sequential
808c2ecf20Sopenharmony_ci				accesses in nano seconds.
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci- mpmc,turn-round-delay:	Delay between access to memory banks in nano
838c2ecf20Sopenharmony_ci				seconds.
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ciIf any of the above timing parameters are absent, current parameter value will
868c2ecf20Sopenharmony_cibe taken from the corresponding HW reg.
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ciExample for pl172 with nor flash on chip select 0 shown below.
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ciemc: memory-controller@40005000 {
918c2ecf20Sopenharmony_ci	compatible = "arm,pl172", "arm,primecell";
928c2ecf20Sopenharmony_ci	reg = <0x40005000 0x1000>;
938c2ecf20Sopenharmony_ci	clocks = <&ccu1 CLK_CPU_EMCDIV>, <&ccu1 CLK_CPU_EMC>;
948c2ecf20Sopenharmony_ci	clock-names = "mpmcclk", "apb_pclk";
958c2ecf20Sopenharmony_ci	#address-cells = <2>;
968c2ecf20Sopenharmony_ci	#size-cells = <1>;
978c2ecf20Sopenharmony_ci	ranges = <0 0 0x1c000000 0x1000000
988c2ecf20Sopenharmony_ci		  1 0 0x1d000000 0x1000000
998c2ecf20Sopenharmony_ci		  2 0 0x1e000000 0x1000000
1008c2ecf20Sopenharmony_ci		  3 0 0x1f000000 0x1000000>;
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci	cs0 {
1038c2ecf20Sopenharmony_ci		#address-cells = <2>;
1048c2ecf20Sopenharmony_ci		#size-cells = <1>;
1058c2ecf20Sopenharmony_ci		ranges;
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci		mpmc,cs = <0>;
1088c2ecf20Sopenharmony_ci		mpmc,memory-width = <16>;
1098c2ecf20Sopenharmony_ci		mpmc,byte-lane-low;
1108c2ecf20Sopenharmony_ci		mpmc,write-enable-delay = <0>;
1118c2ecf20Sopenharmony_ci		mpmc,output-enable-delay = <0>;
1128c2ecf20Sopenharmony_ci		mpmc,read-enable-delay = <70>;
1138c2ecf20Sopenharmony_ci		mpmc,page-mode-read-delay = <70>;
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci		flash@0,0 {
1168c2ecf20Sopenharmony_ci			compatible = "sst,sst39vf320", "cfi-flash";
1178c2ecf20Sopenharmony_ci			reg = <0 0 0x400000>;
1188c2ecf20Sopenharmony_ci			bank-width = <2>;
1198c2ecf20Sopenharmony_ci			#address-cells = <1>;
1208c2ecf20Sopenharmony_ci			#size-cells = <1>;
1218c2ecf20Sopenharmony_ci			partition@0 {
1228c2ecf20Sopenharmony_ci				label = "data";
1238c2ecf20Sopenharmony_ci				reg = <0 0x400000>;
1248c2ecf20Sopenharmony_ci			};
1258c2ecf20Sopenharmony_ci		};
1268c2ecf20Sopenharmony_ci	};
1278c2ecf20Sopenharmony_ci};
128