xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunDevice tree bindings for OMAP general purpose memory controllers (GPMC)
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe actual devices are instantiated from the child nodes of a GPMC node.
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunRequired properties:
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun - compatible:		Should be set to one of the following:
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun			ti,omap2420-gpmc (omap2420)
10*4882a593Smuzhiyun			ti,omap2430-gpmc (omap2430)
11*4882a593Smuzhiyun			ti,omap3430-gpmc (omap3430 & omap3630)
12*4882a593Smuzhiyun			ti,omap4430-gpmc (omap4430 & omap4460 & omap543x)
13*4882a593Smuzhiyun			ti,am3352-gpmc   (am335x devices)
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun - reg:			A resource specifier for the register space
16*4882a593Smuzhiyun			(see the example below)
17*4882a593Smuzhiyun - ti,hwmods:		Should be set to "ti,gpmc" until the DT transition is
18*4882a593Smuzhiyun			completed.
19*4882a593Smuzhiyun - #address-cells:	Must be set to 2 to allow memory address translation
20*4882a593Smuzhiyun - #size-cells:		Must be set to 1 to allow CS address passing
21*4882a593Smuzhiyun - gpmc,num-cs:		The maximum number of chip-select lines that controller
22*4882a593Smuzhiyun			can support.
23*4882a593Smuzhiyun - gpmc,num-waitpins:	The maximum number of wait pins that controller can
24*4882a593Smuzhiyun			support.
25*4882a593Smuzhiyun - ranges:		Must be set up to reflect the memory layout with four
26*4882a593Smuzhiyun			integer values for each chip-select line in use:
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun			   <cs-number> 0 <physical address of mapping> <size>
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun			Currently, calculated values derived from the contents
31*4882a593Smuzhiyun			of the per-CS register GPMC_CONFIG7 (as set up by the
32*4882a593Smuzhiyun			bootloader) are used for the physical address decoding.
33*4882a593Smuzhiyun			As this will change in the future, filling correct
34*4882a593Smuzhiyun			values here is a requirement.
35*4882a593Smuzhiyun - interrupt-controller: The GPMC driver implements and interrupt controller for
36*4882a593Smuzhiyun			the NAND events "fifoevent" and "termcount" plus the
37*4882a593Smuzhiyun			rising/falling edges on the GPMC_WAIT pins.
38*4882a593Smuzhiyun			The interrupt number mapping is as follows
39*4882a593Smuzhiyun			0 - NAND_fifoevent
40*4882a593Smuzhiyun			1 - NAND_termcount
41*4882a593Smuzhiyun			2 - GPMC_WAIT0 pin edge
42*4882a593Smuzhiyun			3 - GPMC_WAIT1 pin edge, and so on.
43*4882a593Smuzhiyun - interrupt-cells:	Must be set to 2
44*4882a593Smuzhiyun - gpio-controller:	The GPMC driver implements a GPIO controller for the
45*4882a593Smuzhiyun			GPMC WAIT pins that can be used as general purpose inputs.
46*4882a593Smuzhiyun			0 maps to GPMC_WAIT0 pin.
47*4882a593Smuzhiyun - gpio-cells:		Must be set to 2
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunRequired properties when using NAND prefetch dma:
50*4882a593Smuzhiyun - dmas			GPMC NAND prefetch dma channel
51*4882a593Smuzhiyun - dma-names		Must be set to "rxtx"
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunTiming properties for child nodes. All are optional and default to 0.
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun - gpmc,sync-clk-ps:	Minimum clock period for synchronous mode, in picoseconds
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun Chip-select signal timings (in nanoseconds) corresponding to GPMC_CONFIG2:
58*4882a593Smuzhiyun - gpmc,cs-on-ns:	Assertion time
59*4882a593Smuzhiyun - gpmc,cs-rd-off-ns:	Read deassertion time
60*4882a593Smuzhiyun - gpmc,cs-wr-off-ns:	Write deassertion time
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun ADV signal timings (in nanoseconds) corresponding to GPMC_CONFIG3:
63*4882a593Smuzhiyun - gpmc,adv-on-ns:	Assertion time
64*4882a593Smuzhiyun - gpmc,adv-rd-off-ns:	Read deassertion time
65*4882a593Smuzhiyun - gpmc,adv-wr-off-ns:	Write deassertion time
66*4882a593Smuzhiyun - gpmc,adv-aad-mux-on-ns:	Assertion time for AAD
67*4882a593Smuzhiyun - gpmc,adv-aad-mux-rd-off-ns:	Read deassertion time for AAD
68*4882a593Smuzhiyun - gpmc,adv-aad-mux-wr-off-ns:	Write deassertion time for AAD
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun WE signals timings (in nanoseconds) corresponding to GPMC_CONFIG4:
71*4882a593Smuzhiyun - gpmc,we-on-ns	Assertion time
72*4882a593Smuzhiyun - gpmc,we-off-ns:	Deassertion time
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun OE signals timings (in nanoseconds) corresponding to GPMC_CONFIG4:
75*4882a593Smuzhiyun - gpmc,oe-on-ns:	Assertion time
76*4882a593Smuzhiyun - gpmc,oe-off-ns:	Deassertion time
77*4882a593Smuzhiyun - gpmc,oe-aad-mux-on-ns:	Assertion time for AAD
78*4882a593Smuzhiyun - gpmc,oe-aad-mux-off-ns:	Deassertion time for AAD
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun Access time and cycle time timings (in nanoseconds) corresponding to
81*4882a593Smuzhiyun GPMC_CONFIG5:
82*4882a593Smuzhiyun - gpmc,page-burst-access-ns: 	Multiple access word delay
83*4882a593Smuzhiyun - gpmc,access-ns:		Start-cycle to first data valid delay
84*4882a593Smuzhiyun - gpmc,rd-cycle-ns:		Total read cycle time
85*4882a593Smuzhiyun - gpmc,wr-cycle-ns:		Total write cycle time
86*4882a593Smuzhiyun - gpmc,bus-turnaround-ns:	Turn-around time between successive accesses
87*4882a593Smuzhiyun - gpmc,cycle2cycle-delay-ns:	Delay between chip-select pulses
88*4882a593Smuzhiyun - gpmc,clk-activation-ns: 	GPMC clock activation time
89*4882a593Smuzhiyun - gpmc,wait-monitoring-ns:	Start of wait monitoring with regard to valid
90*4882a593Smuzhiyun				data
91*4882a593Smuzhiyun
92*4882a593SmuzhiyunBoolean timing parameters. If property is present parameter enabled and
93*4882a593Smuzhiyundisabled if omitted:
94*4882a593Smuzhiyun - gpmc,adv-extra-delay:	ADV signal is delayed by half GPMC clock
95*4882a593Smuzhiyun - gpmc,cs-extra-delay:		CS signal is delayed by half GPMC clock
96*4882a593Smuzhiyun - gpmc,cycle2cycle-diffcsen:	Add "cycle2cycle-delay" between successive
97*4882a593Smuzhiyun				accesses to a different CS
98*4882a593Smuzhiyun - gpmc,cycle2cycle-samecsen:	Add "cycle2cycle-delay" between successive
99*4882a593Smuzhiyun				accesses to the same CS
100*4882a593Smuzhiyun - gpmc,oe-extra-delay:		OE signal is delayed by half GPMC clock
101*4882a593Smuzhiyun - gpmc,we-extra-delay:		WE signal is delayed by half GPMC clock
102*4882a593Smuzhiyun - gpmc,time-para-granularity:	Multiply all access times by 2
103*4882a593Smuzhiyun
104*4882a593SmuzhiyunThe following are only applicable to OMAP3+ and AM335x:
105*4882a593Smuzhiyun - gpmc,wr-access-ns:		In synchronous write mode, for single or
106*4882a593Smuzhiyun				burst accesses, defines the number of
107*4882a593Smuzhiyun				GPMC_FCLK cycles from start access time
108*4882a593Smuzhiyun				to the GPMC_CLK rising edge used by the
109*4882a593Smuzhiyun				memory device for the first data capture.
110*4882a593Smuzhiyun - gpmc,wr-data-mux-bus-ns:	In address-data multiplex mode, specifies
111*4882a593Smuzhiyun				the time when the first data is driven on
112*4882a593Smuzhiyun				the address-data bus.
113*4882a593Smuzhiyun
114*4882a593SmuzhiyunGPMC chip-select settings properties for child nodes. All are optional.
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun- gpmc,burst-length	Page/burst length. Must be 4, 8 or 16.
117*4882a593Smuzhiyun- gpmc,burst-wrap	Enables wrap bursting
118*4882a593Smuzhiyun- gpmc,burst-read	Enables read page/burst mode
119*4882a593Smuzhiyun- gpmc,burst-write	Enables write page/burst mode
120*4882a593Smuzhiyun- gpmc,device-width	Total width of device(s) connected to a GPMC
121*4882a593Smuzhiyun			chip-select in bytes. The GPMC supports 8-bit
122*4882a593Smuzhiyun			and 16-bit devices and so this property must be
123*4882a593Smuzhiyun			1 or 2.
124*4882a593Smuzhiyun- gpmc,mux-add-data	Address and data multiplexing configuration.
125*4882a593Smuzhiyun			Valid values are 1 for address-address-data
126*4882a593Smuzhiyun			multiplexing mode and 2 for address-data
127*4882a593Smuzhiyun			multiplexing mode.
128*4882a593Smuzhiyun- gpmc,sync-read	Enables synchronous read. Defaults to asynchronous
129*4882a593Smuzhiyun			is this is not set.
130*4882a593Smuzhiyun- gpmc,sync-write	Enables synchronous writes. Defaults to asynchronous
131*4882a593Smuzhiyun			is this is not set.
132*4882a593Smuzhiyun- gpmc,wait-pin		Wait-pin used by client. Must be less than
133*4882a593Smuzhiyun			"gpmc,num-waitpins".
134*4882a593Smuzhiyun- gpmc,wait-on-read	Enables wait monitoring on reads.
135*4882a593Smuzhiyun- gpmc,wait-on-write	Enables wait monitoring on writes.
136*4882a593Smuzhiyun
137*4882a593SmuzhiyunExample for an AM33xx board:
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun	gpmc: gpmc@50000000 {
140*4882a593Smuzhiyun		compatible = "ti,am3352-gpmc";
141*4882a593Smuzhiyun		ti,hwmods = "gpmc";
142*4882a593Smuzhiyun		reg = <0x50000000 0x2000>;
143*4882a593Smuzhiyun		interrupts = <100>;
144*4882a593Smuzhiyun		dmas = <&edma 52 0>;
145*4882a593Smuzhiyun		dma-names = "rxtx";
146*4882a593Smuzhiyun		gpmc,num-cs = <8>;
147*4882a593Smuzhiyun		gpmc,num-waitpins = <2>;
148*4882a593Smuzhiyun		#address-cells = <2>;
149*4882a593Smuzhiyun		#size-cells = <1>;
150*4882a593Smuzhiyun		ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */
151*4882a593Smuzhiyun		interrupt-controller;
152*4882a593Smuzhiyun		#interrupt-cells = <2>;
153*4882a593Smuzhiyun		gpio-controller;
154*4882a593Smuzhiyun		#gpio-cells = <2>;
155*4882a593Smuzhiyun
156*4882a593Smuzhiyun		/* child nodes go here */
157*4882a593Smuzhiyun	};
158