From 97a65a38dbfdd41240b90b9e819bf5cff503a3d5 Mon Sep 17 00:00:00 2001 From: Evan Wilson Date: Fri, 31 Jan 2014 14:59:49 -0800 Subject: Updated memory configuration(NAND and DDR). Removed led.c from board init. Simplified bootcommand procedure --- board/olio/h1/Makefile | 1 - board/olio/h1/h1.c | 31 +++++------------- board/olio/h1/led.c | 73 ------------------------------------------- include/configs/omap3_h1.h | 78 +++++----------------------------------------- 4 files changed, 15 insertions(+), 168 deletions(-) delete mode 100644 board/olio/h1/led.c diff --git a/board/olio/h1/Makefile b/board/olio/h1/Makefile index 3018f6c63..9d360712c 100644 --- a/board/olio/h1/Makefile +++ b/board/olio/h1/Makefile @@ -10,7 +10,6 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o COBJS-y := $(BOARD).o -COBJS-$(CONFIG_STATUS_LED) += led.o COBJS := $(sort $(COBJS-y)) SRCS := $(COBJS:.o=.c) diff --git a/board/olio/h1/h1.c b/board/olio/h1/h1.c index be5d43064..defdf01e4 100644 --- a/board/olio/h1/h1.c +++ b/board/olio/h1/h1.c @@ -24,6 +24,7 @@ #include #include "h1.h" #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -60,19 +61,11 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) identify_nand_chip(&pop_mfr, &pop_id); timings->mr = MICRON_V_MR_165; - if (pop_mfr == 0) { - /* 256MB DDR */ - timings->mcfg = MICRON_V_MCFG_200(256 << 20); - timings->ctrla = MICRON_V_ACTIMA_200; - timings->ctrlb = MICRON_V_ACTIMB_200; - timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz; - } else { - /* Assume 128MB and Micron/165MHz timings to be safe */ - timings->mcfg = MICRON_V_MCFG_165(128 << 20); - timings->ctrla = MICRON_V_ACTIMA_165; - timings->ctrlb = MICRON_V_ACTIMB_165; - timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; - } + /* 128MB DDR */ + timings->mcfg = MICRON_V_MCFG_200(128 << 20); + timings->ctrla = MICRON_V_ACTIMA_200; + timings->ctrlb = MICRON_V_ACTIMB_200; + timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz; } #endif @@ -89,18 +82,8 @@ int misc_init_r(void) /* Enable i2c2 pullup resisters */ writel(~(PRG_I2C2_PULLUPRESX), &prog_io_base->io1); printf("Olio H1\n"); - MUX_BEAGLE_XM(); - - /* Set GPIO states before they are made outputs */ - writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, - &gpio6_base->setdataout); - writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | - GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); - /* Configure GPIOs to output */ - writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); - writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | - GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); + MUX_BEAGLE_XM(); dieid_num_r(); diff --git a/board/olio/h1/led.c b/board/olio/h1/led.c deleted file mode 100644 index 89b8dd3c3..000000000 --- a/board/olio/h1/led.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2010 Texas Instruments, Inc. - * Jason Kridner - * - * SPDX-License-Identifier: GPL-2.0+ - */ -#include -#include -#include -#include -#include -#include - -/* GPIO pins for the LEDs */ -#define BEAGLE_LED_USR0 150 -#define BEAGLE_LED_USR1 149 - -#ifdef STATUS_LED_GREEN -void green_led_off(void) -{ - __led_set (STATUS_LED_GREEN, 0); -} - -void green_led_on(void) -{ - __led_set (STATUS_LED_GREEN, 1); -} -#endif - -void __led_init (led_id_t mask, int state) -{ - __led_set (mask, state); -} - -void __led_toggle (led_id_t mask) -{ - int state, toggle_gpio = 0; -#ifdef STATUS_LED_BIT - if (!toggle_gpio && STATUS_LED_BIT & mask) - toggle_gpio = BEAGLE_LED_USR0; -#endif -#ifdef STATUS_LED_BIT1 - if (!toggle_gpio && STATUS_LED_BIT1 & mask) - toggle_gpio = BEAGLE_LED_USR1; -#endif - if (toggle_gpio) { - if (!gpio_request(toggle_gpio, "")) { - gpio_direction_output(toggle_gpio, 0); - state = gpio_get_value(toggle_gpio); - gpio_set_value(toggle_gpio, !state); - } - } -} - -void __led_set (led_id_t mask, int state) -{ -#ifdef STATUS_LED_BIT - if (STATUS_LED_BIT & mask) { - if (!gpio_request(BEAGLE_LED_USR0, "")) { - gpio_direction_output(BEAGLE_LED_USR0, 0); - gpio_set_value(BEAGLE_LED_USR0, state); - } - } -#endif -#ifdef STATUS_LED_BIT1 - if (STATUS_LED_BIT1 & mask) { - if (!gpio_request(BEAGLE_LED_USR1, "")) { - gpio_direction_output(BEAGLE_LED_USR1, 0); - gpio_set_value(BEAGLE_LED_USR1, state); - } - } -#endif -} diff --git a/include/configs/omap3_h1.h b/include/configs/omap3_h1.h index 83d006c91..145979315 100644 --- a/include/configs/omap3_h1.h +++ b/include/configs/omap3_h1.h @@ -86,6 +86,8 @@ /* Probe all devices */ #define CONFIG_SYS_I2C_NOPROBES {{0x0, 0x0}} +/* PMIC support */ +#define CONFIG_POWER_TPS65910 /* commands to include */ #include @@ -118,7 +120,7 @@ #define CONFIG_SYS_I2C_SLAVE 1 #define CONFIG_I2C_MULTI_BUS 1 #define CONFIG_DRIVER_OMAP34XX_I2C 1 -#define CONFIG_VIDEO_OMAP3 /* DSS Support */ +/*define CONFIG_VIDEO_OMAP3 DSS Support */ /* * Board NAND Info. @@ -150,9 +152,7 @@ "bootpart=0:2\0" \ "console=ttyO2,115200n8\0" \ "mpurate=auto\0" \ - "buddy=none\0" \ "optargs=\0" \ - "camera=none\0" \ "vram=12M\0" \ "dvimode=640x480MR-16@60\0" \ "defaultdisplay=dvi\0" \ @@ -163,16 +163,6 @@ "nandrootfstype=ubifs\0" \ "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M\0" \ "ramrootfstype=ext2\0" \ - "mmcargs=setenv bootargs console=${console} " \ - "${optargs} " \ - "mpurate=${mpurate} " \ - "buddy=${buddy} "\ - "camera=${camera} "\ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapdss.def_disp=${defaultdisplay} " \ - "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ "nandargs=setenv bootargs console=${console} " \ "${optargs} " \ "mpurate=${mpurate} " \ @@ -183,78 +173,25 @@ "omapdss.def_disp=${defaultdisplay} " \ "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \ - "findfdt=" \ - "if test $beaglerev = AxBx; then " \ - "setenv fdtfile omap3-beagle.dtb; fi; " \ - "if test $beaglerev = Cx; then " \ - "setenv fdtfile omap3-beagle.dtb; fi; " \ - "if test $beaglerev = xMAB; then " \ - "setenv fdtfile omap3-beagle-xm.dtb; fi; " \ - "if test $beaglerev = xMC; then " \ - "setenv fdtfile omap3-beagle-xm.dtb; fi; " \ - "if test $fdtfile = undefined; then " \ - "echo WARNING: Could not determine device tree to use; fi; \0" \ "bootenv=uEnv.txt\0" \ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ - "importbootenv=echo Importing environment from mmc ...; " \ - "env import -t $loadaddr $filesize\0" \ "ramargs=setenv bootargs console=${console} " \ "${optargs} " \ "mpurate=${mpurate} " \ - "buddy=${buddy} "\ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ "omapdss.def_disp=${defaultdisplay} " \ "root=${ramroot} " \ "rootfstype=${ramrootfstype}\0" \ - "loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \ - "loadimage=fatload mmc ${bootpart} ${loadaddr} ${bootfile}\0" \ - "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "bootm ${loadaddr}\0" \ - "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ - "run mmcargs; " \ - "bootz ${loadaddr} - ${fdtaddr}\0" \ "nandboot=echo Booting from nand ...; " \ "run nandargs; " \ "nand read ${loadaddr} 280000 400000; " \ "bootm ${loadaddr}\0" \ "ramboot=echo Booting from ramdisk ...; " \ "run ramargs; " \ - "bootm ${loadaddr}\0" \ - "userbutton=if gpio input 173; then run userbutton_xm; " \ - "else run userbutton_nonxm; fi;\0" \ - "userbutton_xm=gpio input 4;\0" \ - "userbutton_nonxm=gpio input 7;\0" -/* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */ + "bootm ${loadaddr}\0" #define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "mmc dev ${mmcdev}; if mmc rescan; then " \ - "if run userbutton; then " \ - "setenv bootenv uEnv.txt;" \ - "else " \ - "setenv bootenv user.txt;" \ - "fi;" \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ - "if run loadimage; then " \ - "run mmcboot;" \ - "fi;" \ - "fi;" \ - "run nandboot;" \ - "setenv bootfile zImage;" \ - "if run loadimage; then " \ - "run loadfdt;" \ - "run mmcbootz; " \ - "fi; " \ + "run nandboot;" #define CONFIG_AUTO_COMPLETE 1 /* @@ -336,6 +273,7 @@ #define CONFIG_SYS_CACHELINE_SIZE 64 /* Defines for SPL */ +#define CONFIG_SPL_DEBUG #define CONFIG_SPL #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_NAND_SIMPLE @@ -364,8 +302,8 @@ /* NAND boot config */ #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_PAGE_SIZE 1024 +#define CONFIG_SYS_NAND_OOBSIZE 32 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ -- cgit v1.2.3-70-g09d2