xref: /freebsd-src/sys/contrib/device-tree/Bindings/memory-controllers/arm,pl172.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Device tree bindings for ARM PL172/PL175/PL176 MultiPort Memory Controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel Vadot- compatible:		Must be "arm,primecell" and exactly one from
6*c66ec88fSEmmanuel Vadot			"arm,pl172", "arm,pl175" or "arm,pl176".
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel Vadot- reg:			Must contains offset/length value for controller.
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel Vadot- #address-cells:	Must be 2. The partition number has to be encoded in the
11*c66ec88fSEmmanuel Vadot			first address cell and it may accept values 0..N-1
12*c66ec88fSEmmanuel Vadot			(N - total number of partitions). The second cell is the
13*c66ec88fSEmmanuel Vadot			offset into the partition.
14*c66ec88fSEmmanuel Vadot
15*c66ec88fSEmmanuel Vadot- #size-cells:		Must be set to 1.
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel Vadot- ranges:		Must contain one or more chip select memory regions.
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel Vadot- clocks:		Must contain references to controller clocks.
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel Vadot- clock-names:		Must contain "mpmcclk" and "apb_pclk".
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadot- clock-ranges:		Empty property indicating that child nodes can inherit
24*c66ec88fSEmmanuel Vadot			named clocks. Required only if clock tree data present
25*c66ec88fSEmmanuel Vadot			in device tree.
26*c66ec88fSEmmanuel Vadot			See clock-bindings.txt
27*c66ec88fSEmmanuel Vadot
28*c66ec88fSEmmanuel VadotChild chip-select (cs) nodes contain the memory devices nodes connected to
29*c66ec88fSEmmanuel Vadotsuch as NOR (e.g. cfi-flash) and NAND.
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel VadotRequired child cs node properties:
32*c66ec88fSEmmanuel Vadot
33*c66ec88fSEmmanuel Vadot- #address-cells:	Must be 2.
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel Vadot- #size-cells:		Must be 1.
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadot- ranges:		Empty property indicating that child nodes can inherit
38*c66ec88fSEmmanuel Vadot			memory layout.
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel Vadot- clock-ranges:		Empty property indicating that child nodes can inherit
41*c66ec88fSEmmanuel Vadot			named clocks. Required only if clock tree data present
42*c66ec88fSEmmanuel Vadot			in device tree.
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel Vadot- mpmc,cs:		Chip select number. Indicates to the pl0172 driver
45*c66ec88fSEmmanuel Vadot			which chipselect is used for accessing the memory.
46*c66ec88fSEmmanuel Vadot
47*c66ec88fSEmmanuel Vadot- mpmc,memory-width:	Width of the chip select memory. Must be equal to
48*c66ec88fSEmmanuel Vadot			either 8, 16 or 32.
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel VadotOptional child cs node config properties:
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel Vadot- mpmc,async-page-mode:	Enable asynchronous page mode.
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadot- mpmc,cs-active-high:	Set chip select polarity to active high.
55*c66ec88fSEmmanuel Vadot
56*c66ec88fSEmmanuel Vadot- mpmc,byte-lane-low:	Set byte lane state to low.
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel Vadot- mpmc,extended-wait:	Enable extended wait.
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot- mpmc,buffer-enable:	Enable write buffer, option is not supported by
61*c66ec88fSEmmanuel Vadot			PL175 and PL176 controllers.
62*c66ec88fSEmmanuel Vadot
63*c66ec88fSEmmanuel Vadot- mpmc,write-protect:	Enable write protect.
64*c66ec88fSEmmanuel Vadot
65*c66ec88fSEmmanuel VadotOptional child cs node timing properties:
66*c66ec88fSEmmanuel Vadot
67*c66ec88fSEmmanuel Vadot- mpmc,write-enable-delay:	Delay from chip select assertion to write
68*c66ec88fSEmmanuel Vadot				enable (WE signal) in nano seconds.
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel Vadot- mpmc,output-enable-delay:	Delay from chip select assertion to output
71*c66ec88fSEmmanuel Vadot				enable (OE signal) in nano seconds.
72*c66ec88fSEmmanuel Vadot
73*c66ec88fSEmmanuel Vadot- mpmc,write-access-delay:	Delay from chip select assertion to write
74*c66ec88fSEmmanuel Vadot				access in nano seconds.
75*c66ec88fSEmmanuel Vadot
76*c66ec88fSEmmanuel Vadot- mpmc,read-access-delay:	Delay from chip select assertion to read
77*c66ec88fSEmmanuel Vadot				access in nano seconds.
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadot- mpmc,page-mode-read-delay:	Delay for asynchronous page mode sequential
80*c66ec88fSEmmanuel Vadot				accesses in nano seconds.
81*c66ec88fSEmmanuel Vadot
82*c66ec88fSEmmanuel Vadot- mpmc,turn-round-delay:	Delay between access to memory banks in nano
83*c66ec88fSEmmanuel Vadot				seconds.
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel VadotIf any of the above timing parameters are absent, current parameter value will
86*c66ec88fSEmmanuel Vadotbe taken from the corresponding HW reg.
87*c66ec88fSEmmanuel Vadot
88*c66ec88fSEmmanuel VadotExample for pl172 with nor flash on chip select 0 shown below.
89*c66ec88fSEmmanuel Vadot
90*c66ec88fSEmmanuel Vadotemc: memory-controller@40005000 {
91*c66ec88fSEmmanuel Vadot	compatible = "arm,pl172", "arm,primecell";
92*c66ec88fSEmmanuel Vadot	reg = <0x40005000 0x1000>;
93*c66ec88fSEmmanuel Vadot	clocks = <&ccu1 CLK_CPU_EMCDIV>, <&ccu1 CLK_CPU_EMC>;
94*c66ec88fSEmmanuel Vadot	clock-names = "mpmcclk", "apb_pclk";
95*c66ec88fSEmmanuel Vadot	#address-cells = <2>;
96*c66ec88fSEmmanuel Vadot	#size-cells = <1>;
97*c66ec88fSEmmanuel Vadot	ranges = <0 0 0x1c000000 0x1000000
98*c66ec88fSEmmanuel Vadot		  1 0 0x1d000000 0x1000000
99*c66ec88fSEmmanuel Vadot		  2 0 0x1e000000 0x1000000
100*c66ec88fSEmmanuel Vadot		  3 0 0x1f000000 0x1000000>;
101*c66ec88fSEmmanuel Vadot
102*c66ec88fSEmmanuel Vadot	cs0 {
103*c66ec88fSEmmanuel Vadot		#address-cells = <2>;
104*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
105*c66ec88fSEmmanuel Vadot		ranges;
106*c66ec88fSEmmanuel Vadot
107*c66ec88fSEmmanuel Vadot		mpmc,cs = <0>;
108*c66ec88fSEmmanuel Vadot		mpmc,memory-width = <16>;
109*c66ec88fSEmmanuel Vadot		mpmc,byte-lane-low;
110*c66ec88fSEmmanuel Vadot		mpmc,write-enable-delay = <0>;
111*c66ec88fSEmmanuel Vadot		mpmc,output-enable-delay = <0>;
112*c66ec88fSEmmanuel Vadot		mpmc,read-enable-delay = <70>;
113*c66ec88fSEmmanuel Vadot		mpmc,page-mode-read-delay = <70>;
114*c66ec88fSEmmanuel Vadot
115*c66ec88fSEmmanuel Vadot		flash@0,0 {
116*c66ec88fSEmmanuel Vadot			compatible = "sst,sst39vf320", "cfi-flash";
117*c66ec88fSEmmanuel Vadot			reg = <0 0 0x400000>;
118*c66ec88fSEmmanuel Vadot			bank-width = <2>;
119*c66ec88fSEmmanuel Vadot			#address-cells = <1>;
120*c66ec88fSEmmanuel Vadot			#size-cells = <1>;
121*c66ec88fSEmmanuel Vadot			partition@0 {
122*c66ec88fSEmmanuel Vadot				label = "data";
123*c66ec88fSEmmanuel Vadot				reg = <0 0x400000>;
124*c66ec88fSEmmanuel Vadot			};
125*c66ec88fSEmmanuel Vadot		};
126*c66ec88fSEmmanuel Vadot	};
127*c66ec88fSEmmanuel Vadot};
128