From 08bcbc4ae7616c9b9a6f76fbcae55e2e807b300b Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Tue, 6 Aug 2013 20:57:03 +0900 Subject: arm: smdkc100: remove config.mk file Since config.mk is deprecated, remove this file, and move CONFIG_SYS_TEXT_BASE define to config file. Signed-off-by: Minkyu Kang Cc: Wolfgang Denk --- board/samsung/smdkc100/config.mk | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 board/samsung/smdkc100/config.mk (limited to 'board') diff --git a/board/samsung/smdkc100/config.mk b/board/samsung/smdkc100/config.mk deleted file mode 100644 index 3a08bb17a5..0000000000 --- a/board/samsung/smdkc100/config.mk +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright (C) 2008 # Samsung Elecgtronics -# Kyungmin Park -# - -# On S5PC100 we use the 128 MiB OneDRAM bank at -# -# 0x30000000 to 0x35000000 (80MiB) -# 0x38000000 to 0x40000000 (128MiB) -# -# On S5PC110 we use the 128 MiB OneDRAM bank at -# -# 0x30000000 to 0x35000000 (80MiB) -# 0x40000000 to 0x48000000 (128MiB) -# -CONFIG_SYS_TEXT_BASE = 0x34800000 -- cgit v1.2.3 From 35bea619779f95fb450b18b1d996c95442807fbc Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Tue, 6 Aug 2013 20:57:53 +0900 Subject: arm: goni: remove config.mk file Since config.mk is deprecated, remove this file, and move CONFIG_SYS_TEXT_BASE define to config file. Signed-off-by: Minkyu Kang --- board/samsung/goni/config.mk | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 board/samsung/goni/config.mk (limited to 'board') diff --git a/board/samsung/goni/config.mk b/board/samsung/goni/config.mk deleted file mode 100644 index e1cadbceed..0000000000 --- a/board/samsung/goni/config.mk +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2010 Samsung Electronics -# Kyungmin Park -# -# SPDX-License-Identifier: GPL-2.0+ -# - -# On S5PC100 we use the 128 MiB OneDRAM bank at -# -# 0x30000000 to 0x35000000 (80MiB) -# 0x38000000 to 0x40000000 (128MiB) -# -# On S5PC110 we use the 128 MiB OneDRAM bank at -# -# 0x30000000 to 0x35000000 (80MiB) -# 0x40000000 to 0x50000000 (256MiB) -# -CONFIG_SYS_TEXT_BASE = 0x34800000 -- cgit v1.2.3 From a2ac68fb2b35e57cd483e7d6fb30b9d9331acc01 Mon Sep 17 00:00:00 2001 From: Chander Kashyap Date: Wed, 21 Aug 2013 10:38:56 +0530 Subject: exynos5250: Add arndale board support Arndale board is based on samsung's exynos5250 soc. Signed-off-by: Inderpal Singh Signed-off-by: Chander Kashyap Signed-off-by: Minkyu Kang --- board/samsung/arndale/Makefile | 34 +++++++++++++ board/samsung/arndale/arndale.c | 87 ++++++++++++++++++++++++++++++++ board/samsung/arndale/arndale_spl.c | 50 ++++++++++++++++++ board/samsung/dts/exynos5250-arndale.dts | 21 ++++++++ 4 files changed, 192 insertions(+) create mode 100644 board/samsung/arndale/Makefile create mode 100644 board/samsung/arndale/arndale.c create mode 100644 board/samsung/arndale/arndale_spl.c create mode 100644 board/samsung/dts/exynos5250-arndale.dts (limited to 'board') diff --git a/board/samsung/arndale/Makefile b/board/samsung/arndale/Makefile new file mode 100644 index 0000000000..afd8db3cee --- /dev/null +++ b/board/samsung/arndale/Makefile @@ -0,0 +1,34 @@ +# +# Copyright (C) 2013 Samsung Electronics +# +# SPDX-License-Identifier: GPL-2.0+ +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS += arndale_spl.o + +ifndef CONFIG_SPL_BUILD +COBJS += arndale.o +endif + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) + +ALL := $(obj).depend $(LIB) + +all: $(ALL) + +$(LIB): $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c new file mode 100644 index 0000000000..84d8f19c1d --- /dev/null +++ b/board/samsung/arndale/arndale.c @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2013 Samsung Electronics + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); + return 0; +} + +int dram_init(void) +{ + int i; + u32 addr; + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); + gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE); + } + return 0; +} + +int power_init_board(void) +{ + set_ps_hold_ctrl(); + return 0; +} + +void dram_init_banksize(void) +{ + int i; + u32 addr, size; + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); + size = get_ram_size((long *)addr, SDRAM_BANK_SIZE); + + gd->bd->bi_dram[i].start = addr; + gd->bd->bi_dram[i].size = size; + } +} + +static int board_uart_init(void) +{ + int err = 0, uart_id; + + for (uart_id = PERIPH_ID_UART0; uart_id <= PERIPH_ID_UART3; uart_id++) { + err = exynos_pinmux_config(uart_id, PINMUX_FLAG_NONE); + if (err) { + debug("UART%d not configured\n", + (uart_id - PERIPH_ID_UART0)); + return err; + } + } + return err; +} + +#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f(void) +{ + int err; + + err = board_uart_init(); + if (err) { + debug("UART init failed\n"); + return err; + } + return err; +} +#endif + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard(void) +{ + printf("\nBoard: Arndale\n"); + + return 0; +} +#endif diff --git a/board/samsung/arndale/arndale_spl.c b/board/samsung/arndale/arndale_spl.c new file mode 100644 index 0000000000..2949c0828d --- /dev/null +++ b/board/samsung/arndale/arndale_spl.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2012 The Chromium OS Authors. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +#define SIGNATURE 0xdeadbeef + +/* Parameters of early board initialization in SPL */ +static struct spl_machine_param machine_param + __attribute__((section(".machine_param"))) = { + .signature = SIGNATURE, + .version = 1, + .params = "vmubfasirM", + .size = sizeof(machine_param), + + .mem_iv_size = 0x1f, + .mem_type = DDR_MODE_DDR3, + + /* + * Set uboot_size to 0x100000 bytes. + * + * This is an overly conservative value chosen to accommodate all + * possible U-Boot image. You are advised to set this value to a + * smaller realistic size via scripts that modifies the .machine_param + * section of output U-Boot image. + */ + .uboot_size = 0x100000, + + .boot_source = BOOT_MODE_OM, + .frequency_mhz = 800, + .arm_freq_mhz = 1000, + .serial_base = 0x12c30000, + .i2c_base = 0x12c60000, + .mem_manuf = MEM_MANUF_SAMSUNG, +}; + +struct spl_machine_param *spl_get_machine_params(void) +{ + if (machine_param.signature != SIGNATURE) { + /* Will hang if SIGNATURE dont match */ + while (1) + ; + } + + return &machine_param; +} diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts new file mode 100644 index 0000000000..d3c05273db --- /dev/null +++ b/board/samsung/dts/exynos5250-arndale.dts @@ -0,0 +1,21 @@ +/* + * SAMSUNG Arndale board device tree source + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ +*/ + +/dts-v1/; +/include/ ARCH_CPU_DTS + +/ { + model = "SAMSUNG Arndale board based on EXYNOS5250"; + compatible = "samsung,arndale", "samsung,exynos5250"; + + aliases { + serial0 = "/serial@12C20000"; + console = "/serial@12C20000"; + }; +}; -- cgit v1.2.3 From cc2b1012cbdb0422fc96d6e6c813baed0722f373 Mon Sep 17 00:00:00 2001 From: Inderpal Singh Date: Wed, 21 Aug 2013 10:38:57 +0530 Subject: exynos5250: arndale: Add mmc support This patch adds mmc support to the arndale board. Signed-off-by: Inderpal Singh Signed-off-by: Minkyu Kang --- board/samsung/arndale/arndale.c | 14 ++++++++++++++ board/samsung/dts/exynos5250-arndale.dts | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) (limited to 'board') diff --git a/board/samsung/arndale/arndale.c b/board/samsung/arndale/arndale.c index 84d8f19c1d..052fecdd5b 100644 --- a/board/samsung/arndale/arndale.c +++ b/board/samsung/arndale/arndale.c @@ -6,6 +6,7 @@ #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -48,6 +49,19 @@ void dram_init_banksize(void) } } +#ifdef CONFIG_GENERIC_MMC +int board_mmc_init(bd_t *bis) +{ + int ret; + /* dwmmc initializattion for available channels */ + ret = exynos_dwmmc_init(gd->fdt_blob); + if (ret) + debug("dwmmc init failed\n"); + + return ret; +} +#endif + static int board_uart_init(void) { int err = 0, uart_id; diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts index d3c05273db..c700e45536 100644 --- a/board/samsung/dts/exynos5250-arndale.dts +++ b/board/samsung/dts/exynos5250-arndale.dts @@ -18,4 +18,22 @@ serial0 = "/serial@12C20000"; console = "/serial@12C20000"; }; + + mmc@12200000 { + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + }; + + mmc@12210000 { + status = "disabled"; + }; + + mmc@12220000 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + }; + + mmc@12230000 { + status = "disabled"; + }; }; -- cgit v1.2.3 From 1affd4d4a3fe512050e1ad1636d9360c670da531 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 1 Sep 2013 15:04:27 +0900 Subject: cam_enc_4xx: Move CONFIG_SPL_PAD_TO to a config header For most boards which define CONFIG_SPL_PAD_TO, it is defined in config header files. Currently, there exists only one exception, cam_enc_4xx board. This patch moves CONFIG_SPL_PAD_TO definition from board/ait/cam_enc_4xx/config.mk to include/configs/cam_enc_4xx.h. With this modification, we can delete a glue code in the top level config.mk: ifneq ($(CONFIG_SPL_PAD_TO),) CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO) endif Signed-off-by: Masahiro Yamada Cc: Heiko Schocher --- board/ait/cam_enc_4xx/config.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'board') diff --git a/board/ait/cam_enc_4xx/config.mk b/board/ait/cam_enc_4xx/config.mk index c280029a36..d7e7894831 100644 --- a/board/ait/cam_enc_4xx/config.mk +++ b/board/ait/cam_enc_4xx/config.mk @@ -7,8 +7,6 @@ # (mem base + reserved) # -#Provide at least 16MB spacing between us and the Linux Kernel image -CONFIG_SPL_PAD_TO := 12320 UBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/ublimage.cfg ifndef CONFIG_SPL_BUILD ALL-y += $(obj)u-boot.ubl -- cgit v1.2.3 From 9055f66c2dfb637d0f30372a7e79cca854e45bae Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 26 Aug 2013 12:08:48 +0200 Subject: ppc4xx: Fix GPIO handling in lwmon5 and lcd4_lwmon5 BSP LCD4 needs a slightly different GPIO configuration than the original LWMON5 variant. GPIO49 needs to be configured to a default output value of 0 (permanent voltage supply). Additionally lcd4 also needs to enable the LSB transmitter. Signed-off-by: Stefan Roese --- board/lwmon5/lwmon5.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'board') diff --git a/board/lwmon5/lwmon5.c b/board/lwmon5/lwmon5.c index 4e4a5944de..e9aa0b77de 100644 --- a/board/lwmon5/lwmon5.c +++ b/board/lwmon5/lwmon5.c @@ -527,6 +527,9 @@ void spl_board_init(void) */ board_early_init_f(); + /* enable the LSB transmitter */ + gpio_write_bit(CONFIG_SYS_GPIO_LSB_ENABLE, 1); + /* * Clear resets */ -- cgit v1.2.3 From 81b867aa4451e745b9706b00e53793df6b52f42a Mon Sep 17 00:00:00 2001 From: Ying Zhang Date: Wed, 4 Sep 2013 17:03:45 +0800 Subject: SPL: P1022DS: switch to new multibus/multiadapter support - Added section "u_boot_list" in arch/powerpc/cpu/mpc85xx/u-boot-spl.lds - Use the function i2c_init_all instead of i2c_init Signed-off-by: Ying Zhang --- board/freescale/p1022ds/spl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'board') diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c index b9dbf81b3f..7f151e38cf 100644 --- a/board/freescale/p1022ds/spl.c +++ b/board/freescale/p1022ds/spl.c @@ -102,7 +102,11 @@ void board_init_r(gd_t *gd, ulong dest_addr) env_relocate(); #endif - i2c_init(CONFIG_SYS_FSL_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#ifdef CONFIG_SYS_I2C + i2c_init_all(); +#else + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#endif gd->ram_size = initdram(0); #ifdef CONFIG_SPL_NAND_BOOT -- cgit v1.2.3 From e2238328f7e21585f8583389359469359efd0463 Mon Sep 17 00:00:00 2001 From: Chander Kashyap Date: Tue, 10 Sep 2013 13:41:36 +0530 Subject: dts: samsung: arndale: Fix include path As per new convention ARCH_CPU_DTS is not defined in "dtc/Makefile". Hence Arndale comilation is failing. Fix this by adding proper include file in "board/samsung/dts/exynos5250-arndale.dts". Signed-off-by: Chander Kashyap Signed-off-by: Minkyu Kang --- board/samsung/dts/exynos5250-arndale.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/samsung/dts/exynos5250-arndale.dts b/board/samsung/dts/exynos5250-arndale.dts index c700e45536..202f2ea6ed 100644 --- a/board/samsung/dts/exynos5250-arndale.dts +++ b/board/samsung/dts/exynos5250-arndale.dts @@ -8,7 +8,7 @@ */ /dts-v1/; -/include/ ARCH_CPU_DTS +#include "exynos5250.dtsi" / { model = "SAMSUNG Arndale board based on EXYNOS5250"; -- cgit v1.2.3 From 5c18a1cf3e56e0177388258696be4a17a672e9d0 Mon Sep 17 00:00:00 2001 From: Przemyslaw Marczak Date: Tue, 10 Sep 2013 11:34:49 +0200 Subject: arm:goni:mmc: Add sd card detection and initialization. This change allow to use sd card on Goni the same like mmc 0. SD card is mmc dev 1, so it can be used like this: "fatls mmc 1:2". SD card is inited even if eMMC initialization fails. Signed-off-by: Przemyslaw Marczak Signed-off-by: Kyungmin Park CC: Minkyu Kang Acked-by: Jaehoon Chung Signed-off-by: Minkyu Kang --- board/samsung/goni/goni.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index c05801d3fe..4ddff04f41 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -68,7 +68,7 @@ int checkboard(void) #ifdef CONFIG_GENERIC_MMC int board_mmc_init(bd_t *bis) { - int i; + int i, ret, ret_sd = 0; /* MASSMEMORY_EN: XMSMDATA7: GPJ2[7] output high */ s5p_gpio_direction_output(&s5pc110_gpio->j2, 7, 1); @@ -91,7 +91,36 @@ int board_mmc_init(bd_t *bis) s5p_gpio_set_drv(&s5pc110_gpio->g0, i, GPIO_DRV_4X); } - return s5p_mmc_init(0, 4); + ret = s5p_mmc_init(0, 4); + if (ret) + error("MMC: Failed to init MMC:0.\n"); + + /* + * SD card (T_FLASH) detect and init + * T_FLASH_DETECT: EINT28: GPH3[4] input mode + */ + s5p_gpio_cfg_pin(&s5pc110_gpio->h3, 4, GPIO_INPUT); + s5p_gpio_set_pull(&s5pc110_gpio->h3, 4, GPIO_PULL_UP); + + if (!s5p_gpio_get_value(&s5pc110_gpio->h3, 4)) { + for (i = 0; i < 7; i++) { + if (i == 2) + continue; + + /* GPG2[0:6] special function 2 */ + s5p_gpio_cfg_pin(&s5pc110_gpio->g2, i, 0x2); + /* GPG2[0:6] pull disable */ + s5p_gpio_set_pull(&s5pc110_gpio->g2, i, GPIO_PULL_NONE); + /* GPG2[0:6] drv 4x */ + s5p_gpio_set_drv(&s5pc110_gpio->g2, i, GPIO_DRV_4X); + } + + ret_sd = s5p_mmc_init(2, 4); + if (ret_sd) + error("MMC: Failed to init SD card (MMC:2).\n"); + } + + return ret & ret_sd; } #endif -- cgit v1.2.3