aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2013-11-16 13:36:22 -0500
committerTony Lindgren <tony@atomide.com>2013-11-25 18:38:09 -0500
commit218077a3c03d8c136691a0020424633525fcdc85 (patch)
treeb9a6da0db5120a69a4850c5dc49b65493c55be51 /arch
parentb05ef2159dd373034332151ff7341d0231fae799 (diff)
ARM: OMAP2+: dts: add n8x0 onenand
Convert onenand to DT on n8x0 boards. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/omap2420-n8x0-common.dtsi65
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c44
2 files changed, 65 insertions, 44 deletions
diff --git a/arch/arm/boot/dts/omap2420-n8x0-common.dtsi b/arch/arm/boot/dts/omap2420-n8x0-common.dtsi
index c5396933d026..89608b206519 100644
--- a/arch/arm/boot/dts/omap2420-n8x0-common.dtsi
+++ b/arch/arm/boot/dts/omap2420-n8x0-common.dtsi
@@ -32,3 +32,68 @@
32&i2c2 { 32&i2c2 {
33 clock-frequency = <400000>; 33 clock-frequency = <400000>;
34}; 34};
35
36&gpmc {
37 ranges = <0 0 0x04000000 0x10000000>;
38
39 /* gpio-irq for dma: 26 */
40
41 onenand@0,0 {
42 #address-cells = <1>;
43 #size-cells = <1>;
44 reg = <0 0 0x10000000>;
45
46 gpmc,sync-read;
47 gpmc,burst-length = <16>;
48 gpmc,burst-read;
49 gpmc,burst-wrap;
50 gpmc,device-width = <2>;
51 gpmc,mux-add-data = <2>;
52 gpmc,cs-on-ns = <0>;
53 gpmc,cs-rd-off-ns = <127>;
54 gpmc,cs-wr-off-ns = <109>;
55 gpmc,adv-on-ns = <0>;
56 gpmc,adv-rd-off-ns = <18>;
57 gpmc,adv-wr-off-ns = <18>;
58 gpmc,oe-on-ns = <27>;
59 gpmc,oe-off-ns = <127>;
60 gpmc,we-on-ns = <27>;
61 gpmc,we-off-ns = <72>;
62 gpmc,rd-cycle-ns = <145>;
63 gpmc,wr-cycle-ns = <136>;
64 gpmc,access-ns = <118>;
65 gpmc,page-burst-access-ns = <27>;
66 gpmc,bus-turnaround-ns = <0>;
67 gpmc,cycle2cycle-delay-ns = <0>;
68 gpmc,wait-monitoring-ns = <0>;
69 gpmc,clk-activation-ns = <9>;
70 gpmc,sync-clk-ps = <27000>;
71
72 /* MTD partition table corresponding to old board-n8x0 file. */
73 partition@0 {
74 label = "bootloader";
75 reg = <0x00000000 0x00020000>;
76 read-only;
77 };
78 partition@1 {
79 label = "config";
80 reg = <0x00020000 0x00060000>;
81 };
82 partition@2 {
83 label = "kernel";
84 reg = <0x00080000 0x00200000>;
85 };
86 partition@3 {
87 label = "initfs";
88 reg = <0x00280000 0x00400000>;
89 };
90 partition@4 {
91 label = "rootfs";
92 reg = <0x00680000 0x0f980000>;
93 };
94 partition@5 {
95 label = "omap2-onenand";
96 reg = <0x00000000 0x10000000>;
97 };
98 };
99};
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index d596571d7750..aead77a4bc6d 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -162,49 +162,6 @@ static struct spi_board_info n800_spi_board_info[] __initdata = {
162 }, 162 },
163}; 163};
164 164
165#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
166 defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
167
168static struct mtd_partition onenand_partitions[] = {
169 {
170 .name = "bootloader",
171 .offset = 0,
172 .size = 0x20000,
173 .mask_flags = MTD_WRITEABLE, /* Force read-only */
174 },
175 {
176 .name = "config",
177 .offset = MTDPART_OFS_APPEND,
178 .size = 0x60000,
179 },
180 {
181 .name = "kernel",
182 .offset = MTDPART_OFS_APPEND,
183 .size = 0x200000,
184 },
185 {
186 .name = "initfs",
187 .offset = MTDPART_OFS_APPEND,
188 .size = 0x400000,
189 },
190 {
191 .name = "rootfs",
192 .offset = MTDPART_OFS_APPEND,
193 .size = MTDPART_SIZ_FULL,
194 },
195};
196
197static struct omap_onenand_platform_data board_onenand_data[] = {
198 {
199 .cs = 0,
200 .gpio_irq = 26,
201 .parts = onenand_partitions,
202 .nr_parts = ARRAY_SIZE(onenand_partitions),
203 .flags = ONENAND_SYNC_READ,
204 }
205};
206#endif
207
208#if defined(CONFIG_MENELAUS) && \ 165#if defined(CONFIG_MENELAUS) && \
209 (defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)) 166 (defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE))
210 167
@@ -639,7 +596,6 @@ static int __init n8x0_late_initcall(void)
639 if (!board_caps) 596 if (!board_caps)
640 return -ENODEV; 597 return -ENODEV;
641 598
642 gpmc_onenand_init(board_onenand_data);
643 n8x0_mmc_init(); 599 n8x0_mmc_init();
644 n8x0_usb_init(); 600 n8x0_usb_init();
645 601