diff options
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-tuna-emif.c | 107 | ||||
-rwxr-xr-x | arch/arm/mach-omap2/board-tuna.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-tuna.h | 1 |
4 files changed, 112 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 880205a..be6213e 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -258,8 +258,8 @@ obj-$(CONFIG_MACH_TUNA) += board-tuna-nfc.o obj-$(CONFIG_MACH_TUNA) += board-tuna-power.o obj-$(CONFIG_MACH_TUNA) += board-tuna-sensors.o obj-$(CONFIG_MACH_TUNA) += board-tuna-wifi.o -obj-$(CONFIG_MACH_TUNA) += board-tuna-bluetooth.o - +obj-$(CONFIG_MACH_TUNA) += board-tuna-bluetooth.o \ + board-tuna-emif.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \ omap_phy_internal.o \ diff --git a/arch/arm/mach-omap2/board-tuna-emif.c b/arch/arm/mach-omap2/board-tuna-emif.c new file mode 100644 index 0000000..f7050ae --- /dev/null +++ b/arch/arm/mach-omap2/board-tuna-emif.c @@ -0,0 +1,107 @@ +/* + * LPDDR2 data as per SAMSUNG data sheet + * + * Copyright (C) 2011 Texas Instruments, Inc. + * + * Santosh Shilimkar <santosh.shilimkar@ti.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <linux/init.h> + +#include <mach/emif.h> +#include "board-tuna.h" + +const struct lpddr2_timings lpddr2_samsung_timings_400_mhz = { + .max_freq = 400000000, + .RL = 6, + .tRPab = 21, + .tRCD = 18, + .tWR = 15, + .tRASmin = 42, + .tRRD = 10, + .tWTRx2 = 15, + .tXSR = 140, + .tXPx2 = 15, + .tRFCab = 130, + .tRTPx2 = 15, + .tCKE = 3, + .tCKESR = 15, + .tZQCS = 90, + .tZQCL = 360, + .tZQINIT = 1000, + .tDQSCKMAXx2 = 11, + .tRASmax = 70, + .tFAW = 50 +}; + +const struct lpddr2_timings lpddr2_samsung_timings_200_mhz = { + .max_freq = 200000000, + .RL = 3, + .tRPab = 21, + .tRCD = 18, + .tWR = 15, + .tRASmin = 42, + .tRRD = 10, + .tWTRx2 = 20, + .tXSR = 140, + .tXPx2 = 15, + .tRFCab = 130, + .tRTPx2 = 15, + .tCKE = 3, + .tCKESR = 15, + .tZQCS = 90, + .tZQCL = 360, + .tZQINIT = 1000, + .tDQSCKMAXx2 = 11, + .tRASmax = 70, + .tFAW = 50 +}; + +const struct lpddr2_min_tck lpddr2_samsung_min_tck = { + .tRL = 3, + .tRP_AB = 3, + .tRCD = 3, + .tWR = 3, + .tRAS_MIN = 3, + .tRRD = 2, + .tWTR = 2, + .tXP = 2, + .tRTP = 2, + .tCKE = 3, + .tCKESR = 3, + .tFAW = 8 +}; + +struct lpddr2_device_info lpddr2_samsung_4G_S4_dev = { + .device_timings = { + &lpddr2_samsung_timings_200_mhz, + &lpddr2_samsung_timings_400_mhz + }, + .min_tck = &lpddr2_samsung_min_tck, + .type = LPDDR2_TYPE_S4, + .density = LPDDR2_DENSITY_4Gb, + .io_width = LPDDR2_IO_WIDTH_32 +}; + +/* + * LPDDR2 Configuration Data: + * The memory organisation is as below : + * EMIF1 - CS0 - 4 Gb + * EMIF2 - CS0 - 4 Gb + * -------------------- + * TOTAL - 8 Gb + * + * Same devices installed on EMIF1 and EMIF2 + */ +static __initdata struct emif_device_details emif_devices = { + .cs0_device = &lpddr2_samsung_4G_S4_dev, +}; + +void __init omap4_tuna_emif_init(void) +{ + omap_emif_setup_device_details(&emif_devices, &emif_devices); +} diff --git a/arch/arm/mach-omap2/board-tuna.c b/arch/arm/mach-omap2/board-tuna.c index b3918d2..05fab2a 100755 --- a/arch/arm/mach-omap2/board-tuna.c +++ b/arch/arm/mach-omap2/board-tuna.c @@ -748,6 +748,8 @@ static void __init tuna_init(void) omap4_tuna_init_hw_rev(); + omap4_tuna_emif_init(); + register_reboot_notifier(&tuna_reboot_notifier); if (omap4_tuna_final_gpios()) { diff --git a/arch/arm/mach-omap2/board-tuna.h b/arch/arm/mach-omap2/board-tuna.h index 9e04b53..f1e604a 100644 --- a/arch/arm/mach-omap2/board-tuna.h +++ b/arch/arm/mach-omap2/board-tuna.h @@ -32,6 +32,7 @@ void omap4_tuna_power_init(void); void omap4_tuna_sensors_init(void); int tuna_wlan_init(void); int omap_hsi_init(void); +void omap4_tuna_emif_init(void); extern struct mmc_platform_data tuna_wifi_data; |