Created
January 27, 2015 18:04
-
-
Save adam-lee/84ad4ebe5db4d4788d89 to your computer and use it in GitHub Desktop.
Gumstix Overo NAND Boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From e83e315af0f7d94f1375cdfab801b17aaec6ae62 Mon Sep 17 00:00:00 2001 | |
From: Adam YH Lee <adam.yh.lee@gmail.com> | |
Date: Wed, 21 Jan 2015 14:57:02 -0800 | |
Subject: [PATCH] Add NAND support to Overo Device Tree | |
This adds the support for PoP style Micron MT29C4G96MAZ 512MB NAND, which is | |
used in many, but not all, Gumstix Overo COMs. | |
--- | |
arch/arm/boot/dts/omap3-overo-base.dtsi | 48 +++++++++++++++++++++++++++++++++ | |
1 file changed, 48 insertions(+) | |
diff --git a/arch/arm/boot/dts/omap3-overo-base.dtsi b/arch/arm/boot/dts/omap3-overo-base.dtsi | |
index b6ee8e7..89053da 100644 | |
--- a/arch/arm/boot/dts/omap3-overo-base.dtsi | |
+++ b/arch/arm/boot/dts/omap3-overo-base.dtsi | |
@@ -228,3 +228,51 @@ | |
status = "okay"; | |
}; | |
+&gpmc { | |
+ ranges = <0 0 0x00000000 0x20000000>; | |
+ | |
+ nand@0,0 { | |
+ reg = <0 0 0>; | |
+ nand-bus-width = <16>; | |
+ gpmc,device-width = <2>; | |
+ | |
+ gpmc,sync-clk-ps = <0>; | |
+ gpmc,cs-on-ns = <0>; | |
+ gpmc,cs-rd-off-ns = <44>; | |
+ gpmc,cs-wr-off-ns = <44>; | |
+ gpmc,adv-on-ns = <6>; | |
+ gpmc,adv-rd-off-ns = <34>; | |
+ gpmc,adv-wr-off-ns = <44>; | |
+ gpmc,we-off-ns = <40>; | |
+ gpmc,oe-off-ns = <54>; | |
+ gpmc,access-ns = <64>; | |
+ gpmc,rd-cycle-ns = <82>; | |
+ gpmc,wr-cycle-ns = <82>; | |
+ gpmc,wr-access-ns = <40>; | |
+ gpmc,wr-data-mux-bus-ns = <0>; | |
+ | |
+ #address-cells = <1>; | |
+ #size-cells = <1>; | |
+ | |
+ partition@0 { | |
+ label = "SPL"; | |
+ reg = <0 0x80000>; /* 512KiB */ | |
+ }; | |
+ partition@80000 { | |
+ label = "U-Boot"; | |
+ reg = <0x80000 0x1C0000>; /* 1792KiB */ | |
+ }; | |
+ partition@1c0000 { | |
+ label = "Environment"; | |
+ reg = <0x240000 0x40000>; /* 256KiB */ | |
+ }; | |
+ partition@280000 { | |
+ label = "Kernel"; | |
+ reg = <0x280000 0x800000>; /* 8192KiB */ | |
+ }; | |
+ partition@780000 { | |
+ label = "Filesystem"; | |
+ reg = <0xA80000 0x1f980000>; /* 500MB */ | |
+ }; | |
+ }; | |
+}; | |
-- | |
1.9.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From f27c9b678f5f688521928eb80e83fe03676aed1c Mon Sep 17 00:00:00 2001 | |
From: Adam YH Lee <adam.yh.lee@gmail.com> | |
Date: Fri, 23 Jan 2015 12:29:44 -0800 | |
Subject: [PATCH 1/2] WIP BCH8-NAND-BOOT | |
--- | |
include/configs/omap3_overo.h | 15 +++++++++++---- | |
include/configs/ti_omap3_common.h | 2 +- | |
2 files changed, 12 insertions(+), 5 deletions(-) | |
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h | |
index b17e495..49a7a81 100644 | |
--- a/include/configs/omap3_overo.h | |
+++ b/include/configs/omap3_overo.h | |
@@ -12,6 +12,8 @@ | |
#include <configs/ti_omap3_common.h> | |
+#define CONFIG_BCH | |
+ | |
/* Display CPU and Board information */ | |
#define CONFIG_DISPLAY_CPUINFO | |
#define CONFIG_DISPLAY_BOARDINFO | |
@@ -203,17 +205,22 @@ | |
/* NAND boot config */ | |
#define CONFIG_SYS_NAND_BUSWIDTH_16BIT 16 | |
+#define CONFIG_SYS_NAND_MAX_ECCPOS 56 | |
#define CONFIG_SYS_NAND_5_ADDR_CYCLE | |
#define CONFIG_SYS_NAND_PAGE_COUNT 64 | |
#define CONFIG_SYS_NAND_PAGE_SIZE 2048 | |
#define CONFIG_SYS_NAND_OOBSIZE 64 | |
#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | |
#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | |
-#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ | |
- 10, 11, 12, 13} | |
+#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \ | |
+ 13, 14, 16, 17, 18, 19, 20, 21, 22, \ | |
+ 23, 24, 25, 26, 27, 28, 30, 31, 32, \ | |
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, \ | |
+ 42, 44, 45, 46, 47, 48, 49, 50, 51, \ | |
+ 52, 53, 54, 55, 56} | |
#define CONFIG_SYS_NAND_ECCSIZE 512 | |
-#define CONFIG_SYS_NAND_ECCBYTES 3 | |
-#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW | |
+#define CONFIG_SYS_NAND_ECCBYTES 13 | |
+#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW | |
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | |
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | |
/* NAND: SPL falcon mode configs */ | |
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h | |
index 3b19d3d..6788d16 100644 | |
--- a/include/configs/ti_omap3_common.h | |
+++ b/include/configs/ti_omap3_common.h | |
@@ -57,7 +57,7 @@ | |
/* SPL */ | |
#define CONFIG_SPL_TEXT_BASE 0x40200800 | |
-#define CONFIG_SPL_MAX_SIZE (54 * 1024) | |
+#define CONFIG_SPL_MAX_SIZE (58 * 1024) | |
#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | |
#define CONFIG_SPL_POWER_SUPPORT | |
#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ | |
-- | |
1.9.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment