aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2012-12-14 05:36:44 -0500
committerTony Lindgren <tony@atomide.com>2013-01-15 17:50:15 -0500
commitbc6b1e7b86f5d8e4a6fc1c0189e64bba4077efe0 (patch)
treeddf01fdfc247be244e453139a10af05c7b50b602 /Documentation/devicetree
parentf50a0380897d2a5e61b251b07c50ee48fa298cfd (diff)
ARM: OMAP: gpmc: add DT bindings for GPMC timings and NAND
This patch adds basic DT bindings for OMAP GPMC. The actual peripherals are instantiated from child nodes within the GPMC node, and the only type of device that is currently supported is NAND. Code was added to parse the generic GPMC timing parameters and some documentation with examples on how to use them. Successfully tested on an AM33xx board. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> [tony@atomide.com: updated to apply] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r--Documentation/devicetree/bindings/bus/ti-gpmc.txt84
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt76
2 files changed, 160 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
new file mode 100644
index 000000000000..5ddb2e9efaaa
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
@@ -0,0 +1,84 @@
1Device tree bindings for OMAP general purpose memory controllers (GPMC)
2
3The actual devices are instantiated from the child nodes of a GPMC node.
4
5Required properties:
6
7 - compatible: Should be set to one of the following:
8
9 ti,omap2420-gpmc (omap2420)
10 ti,omap2430-gpmc (omap2430)
11 ti,omap3430-gpmc (omap3430 & omap3630)
12 ti,omap4430-gpmc (omap4430 & omap4460 & omap543x)
13 ti,am3352-gpmc (am335x devices)
14
15 - reg: A resource specifier for the register space
16 (see the example below)
17 - ti,hwmods: Should be set to "ti,gpmc" until the DT transition is
18 completed.
19 - #address-cells: Must be set to 2 to allow memory address translation
20 - #size-cells: Must be set to 1 to allow CS address passing
21 - gpmc,num-cs: The maximum number of chip-select lines that controller
22 can support.
23 - gpmc,num-waitpins: The maximum number of wait pins that controller can
24 support.
25 - ranges: Must be set up to reflect the memory layout with four
26 integer values for each chip-select line in use:
27
28 <cs-number> 0 <physical address of mapping> <size>
29
30 Currently, calculated values derived from the contents
31 of the per-CS register GPMC_CONFIG7 (as set up by the
32 bootloader) are used for the physical address decoding.
33 As this will change in the future, filling correct
34 values here is a requirement.
35
36Timing properties for child nodes. All are optional and default to 0.
37
38 - gpmc,sync-clk: Minimum clock period for synchronous mode, in picoseconds
39
40 Chip-select signal timings corresponding to GPMC_CONFIG2:
41 - gpmc,cs-on: Assertion time
42 - gpmc,cs-rd-off: Read deassertion time
43 - gpmc,cs-wr-off: Write deassertion time
44
45 ADV signal timings corresponding to GPMC_CONFIG3:
46 - gpmc,adv-on: Assertion time
47 - gpmc,adv-rd-off: Read deassertion time
48 - gpmc,adv-wr-off: Write deassertion time
49
50 WE signals timings corresponding to GPMC_CONFIG4:
51 - gpmc,we-on: Assertion time
52 - gpmc,we-off: Deassertion time
53
54 OE signals timings corresponding to GPMC_CONFIG4:
55 - gpmc,oe-on: Assertion time
56 - gpmc,oe-off: Deassertion time
57
58 Access time and cycle time timings corresponding to GPMC_CONFIG5:
59 - gpmc,page-burst-access: Multiple access word delay
60 - gpmc,access: Start-cycle to first data valid delay
61 - gpmc,rd-cycle: Total read cycle time
62 - gpmc,wr-cycle: Total write cycle time
63
64The following are only applicable to OMAP3+ and AM335x:
65 - gpmc,wr-access
66 - gpmc,wr-data-mux-bus
67
68
69Example for an AM33xx board:
70
71 gpmc: gpmc@50000000 {
72 compatible = "ti,am3352-gpmc";
73 ti,hwmods = "gpmc";
74 reg = <0x50000000 0x2000>;
75 interrupts = <100>;
76
77 gpmc,num-cs = <8>;
78 gpmc,num-waitpins = <2>;
79 #address-cells = <2>;
80 #size-cells = <1>;
81 ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */
82
83 /* child nodes go here */
84 };
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
new file mode 100644
index 000000000000..9f464f906ffb
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -0,0 +1,76 @@
1Device tree bindings for GPMC connected NANDs
2
3GPMC connected NAND (found on OMAP boards) are represented as child nodes of
4the GPMC controller with a name of "nand".
5
6All timing relevant properties as well as generic gpmc child properties are
7explained in a separate documents - please refer to
8Documentation/devicetree/bindings/bus/ti-gpmc.txt
9
10For NAND specific properties such as ECC modes or bus width, please refer to
11Documentation/devicetree/bindings/mtd/nand.txt
12
13
14Required properties:
15
16 - reg: The CS line the peripheral is connected to
17
18Optional properties:
19
20 - nand-bus-width: Set this numeric value to 16 if the hardware
21 is wired that way. If not specified, a bus
22 width of 8 is assumed.
23
24 - ti,nand-ecc-opt: A string setting the ECC layout to use. One of:
25
26 "sw" Software method (default)
27 "hw" Hardware method
28 "hw-romcode" gpmc hamming mode method & romcode layout
29 "bch4" 4-bit BCH ecc code
30 "bch8" 8-bit BCH ecc code
31
32For inline partiton table parsing (optional):
33
34 - #address-cells: should be set to 1
35 - #size-cells: should be set to 1
36
37Example for an AM33xx board:
38
39 gpmc: gpmc@50000000 {
40 compatible = "ti,am3352-gpmc";
41 ti,hwmods = "gpmc";
42 reg = <0x50000000 0x1000000>;
43 interrupts = <100>;
44 gpmc,num-cs = <8>;
45 gpmc,num-waitpins = <2>;
46 #address-cells = <2>;
47 #size-cells = <1>;
48 ranges = <0 0 0x08000000 0x2000>; /* CS0: NAND */
49
50 nand@0,0 {
51 reg = <0 0 0>; /* CS0, offset 0 */
52 nand-bus-width = <16>;
53 ti,nand-ecc-opt = "bch8";
54
55 gpmc,sync-clk = <0>;
56 gpmc,cs-on = <0>;
57 gpmc,cs-rd-off = <44>;
58 gpmc,cs-wr-off = <44>;
59 gpmc,adv-on = <6>;
60 gpmc,adv-rd-off = <34>;
61 gpmc,adv-wr-off = <44>;
62 gpmc,we-off = <40>;
63 gpmc,oe-off = <54>;
64 gpmc,access = <64>;
65 gpmc,rd-cycle = <82>;
66 gpmc,wr-cycle = <82>;
67 gpmc,wr-access = <40>;
68 gpmc,wr-data-mux-bus = <0>;
69
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 /* partitions go here */
74 };
75 };
76