diff options
| -rw-r--r-- | Documentation/devicetree/bindings/mtd/fsmc-nand.txt | 2 | ||||
| -rw-r--r-- | arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 38 | ||||
| -rw-r--r-- | arch/arm/mach-nomadik/cpu-8815.c | 15 | ||||
| -rw-r--r-- | drivers/mtd/nand/fsmc_nand.c | 1 |
4 files changed, 55 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt index e3ea32e7de3e..2240ac09f6ba 100644 --- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt +++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | * FSMC NAND | 1 | * FSMC NAND |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible : "st,spear600-fsmc-nand" | 4 | - compatible : "st,spear600-fsmc-nand", "stericsson,fsmc-nand" |
| 5 | - reg : Address range of the mtd chip | 5 | - reg : Address range of the mtd chip |
| 6 | - reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd" | 6 | - reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd" |
| 7 | 7 | ||
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi index 88fb98f910cf..c73df370373b 100644 --- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | |||
| @@ -35,6 +35,44 @@ | |||
| 35 | interrupts = <5>; | 35 | interrupts = <5>; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | /* A NAND flash of 128 MiB */ | ||
| 39 | fsmc: flash@40000000 { | ||
| 40 | compatible = "stericsson,fsmc-nand"; | ||
| 41 | #address-cells = <1>; | ||
| 42 | #size-cells = <1>; | ||
| 43 | reg = <0x10100000 0x1000>, /* FSMC Register*/ | ||
| 44 | <0x40000000 0x2000>, /* NAND Base DATA */ | ||
| 45 | <0x41000000 0x2000>, /* NAND Base ADDR */ | ||
| 46 | <0x40800000 0x2000>; /* NAND Base CMD */ | ||
| 47 | reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd"; | ||
| 48 | status = "okay"; | ||
| 49 | |||
| 50 | partition@0 { | ||
| 51 | label = "X-Loader(NAND)"; | ||
| 52 | reg = <0x0 0x40000>; | ||
| 53 | }; | ||
| 54 | partition@40000 { | ||
| 55 | label = "MemInit(NAND)"; | ||
| 56 | reg = <0x40000 0x40000>; | ||
| 57 | }; | ||
| 58 | partition@80000 { | ||
| 59 | label = "BootLoader(NAND)"; | ||
| 60 | reg = <0x80000 0x200000>; | ||
| 61 | }; | ||
| 62 | partition@280000 { | ||
| 63 | label = "Kernel zImage(NAND)"; | ||
| 64 | reg = <0x280000 0x300000>; | ||
| 65 | }; | ||
| 66 | partition@580000 { | ||
| 67 | label = "Root Filesystem(NAND)"; | ||
| 68 | reg = <0x580000 0x1600000>; | ||
| 69 | }; | ||
| 70 | partition@1b80000 { | ||
| 71 | label = "User Filesystem(NAND)"; | ||
| 72 | reg = <0x1b80000 0x6480000>; | ||
| 73 | }; | ||
| 74 | }; | ||
| 75 | |||
| 38 | amba { | 76 | amba { |
| 39 | compatible = "arm,amba-bus"; | 77 | compatible = "arm,amba-bus"; |
| 40 | #address-cells = <1>; | 78 | #address-cells = <1>; |
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 8d071d2769b5..a3894ca45bb8 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/of_irq.h> | 33 | #include <linux/of_irq.h> |
| 34 | #include <linux/of_address.h> | 34 | #include <linux/of_address.h> |
| 35 | #include <linux/of_platform.h> | 35 | #include <linux/of_platform.h> |
| 36 | #include <linux/mtd/fsmc.h> | ||
| 36 | 37 | ||
| 37 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
| 38 | #include <mach/irqs.h> | 39 | #include <mach/irqs.h> |
| @@ -249,6 +250,17 @@ static void __init cpu8815_timer_init_of(void) | |||
| 249 | nmdk_timer_init(base, irq); | 250 | nmdk_timer_init(base, irq); |
| 250 | } | 251 | } |
| 251 | 252 | ||
| 253 | static struct fsmc_nand_timings cpu8815_nand_timings = { | ||
| 254 | .thiz = 0, | ||
| 255 | .thold = 0x10, | ||
| 256 | .twait = 0x0A, | ||
| 257 | .tset = 0, | ||
| 258 | }; | ||
| 259 | |||
| 260 | static struct fsmc_nand_platform_data cpu8815_nand_data = { | ||
| 261 | .nand_timings = &cpu8815_nand_timings, | ||
| 262 | }; | ||
| 263 | |||
| 252 | /* These are mostly to get the right device names for the clock lookups */ | 264 | /* These are mostly to get the right device names for the clock lookups */ |
| 253 | static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { | 265 | static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { |
| 254 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART0_BASE, | 266 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_UART0_BASE, |
| @@ -259,6 +271,9 @@ static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { | |||
| 259 | "rng", NULL), | 271 | "rng", NULL), |
| 260 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_RTC_BASE, | 272 | OF_DEV_AUXDATA("arm,primecell", NOMADIK_RTC_BASE, |
| 261 | "rtc-pl031", NULL), | 273 | "rtc-pl031", NULL), |
| 274 | OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE, | ||
| 275 | "fsmc-nand", &cpu8815_nand_data), | ||
| 276 | |||
| 262 | { /* sentinel */ }, | 277 | { /* sentinel */ }, |
| 263 | }; | 278 | }; |
| 264 | 279 | ||
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 67e62d3d495c..61043a92c007 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c | |||
| @@ -1218,6 +1218,7 @@ static SIMPLE_DEV_PM_OPS(fsmc_nand_pm_ops, fsmc_nand_suspend, fsmc_nand_resume); | |||
| 1218 | #ifdef CONFIG_OF | 1218 | #ifdef CONFIG_OF |
| 1219 | static const struct of_device_id fsmc_nand_id_table[] = { | 1219 | static const struct of_device_id fsmc_nand_id_table[] = { |
| 1220 | { .compatible = "st,spear600-fsmc-nand" }, | 1220 | { .compatible = "st,spear600-fsmc-nand" }, |
| 1221 | { .compatible = "stericsson,fsmc-nand" }, | ||
| 1221 | {} | 1222 | {} |
| 1222 | }; | 1223 | }; |
| 1223 | MODULE_DEVICE_TABLE(of, fsmc_nand_id_table); | 1224 | MODULE_DEVICE_TABLE(of, fsmc_nand_id_table); |
