From 43900da88638b98344fcbe9f5695e60df6dcb17f Mon Sep 17 00:00:00 2001 From: Hyungwon Hwang Date: Fri, 12 Dec 2014 14:45:44 +0900 Subject: config: exynos5420: move non common configs to specific board files The media for boot and environment is a board-specific feature, not a processor-specific. This is same to console port number and some other addresses. This patch moves the that kinds of configs to each board-specific files from the common config file for Exynos5420. Signed-off-by: Hyungwon Hwang Acked-by: Simon Glass Tested-by: Kevin Hilman Signed-off-by: Minkyu Kang diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index ef6e155..7322f336 100644 --- a/include/configs/exynos5420-common.h +++ b/include/configs/exynos5420-common.h @@ -13,13 +13,6 @@ /* A variant of Exynos5420 (Exynos5 Family) */ #define CONFIG_EXYNOS5800 -#define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_SPI_FLASH -#define CONFIG_ENV_SPI_BASE 0x12D30000 -#define FLASH_SIZE (0x4 << 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING - #include #define CONFIG_ARCH_EARLY_INIT_R @@ -29,8 +22,6 @@ #define CONFIG_VAR_SIZE_SPL -#define CONFIG_SYS_SDRAM_BASE 0x20000000 -#define CONFIG_SYS_TEXT_BASE 0x23E00000 #ifdef CONFIG_VAR_SIZE_SPL #define CONFIG_SPL_TEXT_BASE 0x02024410 #else @@ -49,13 +40,4 @@ #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 -/* - * Put the initial stack pointer 1KB below this to allow room for the - * SPL marker. This value is arbitrary, but gd_t is placed starting here. - */ -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_IRAM_TOP - 0x800) - -/* Miscellaneous configurable options */ -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" - #endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h index 8a82402..a1c980d 100644 --- a/include/configs/peach-pi.h +++ b/include/configs/peach-pi.h @@ -14,14 +14,20 @@ #define CONFIG_ENV_SPI_BASE 0x12D30000 #define FLASH_SIZE (0x4 << 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include #include #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x20000000 +#define CONFIG_SYS_TEXT_BASE 0x23E00000 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_IRAM_TOP - 0x800) + /* select serial console configuration */ #define CONFIG_SERIAL3 /* use SERIAL 3 */ +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" #define CONFIG_SYS_PROMPT "Peach-Pi # " #define CONFIG_IDENT_STRING " for Peach-Pi" diff --git a/include/configs/peach-pit.h b/include/configs/peach-pit.h index ad5db57..6516a72 100644 --- a/include/configs/peach-pit.h +++ b/include/configs/peach-pit.h @@ -14,14 +14,20 @@ #define CONFIG_ENV_SPI_BASE 0x12D30000 #define FLASH_SIZE (0x4 << 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include #include #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x20000000 +#define CONFIG_SYS_TEXT_BASE 0x23E00000 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_IRAM_TOP - 0x800) + /* select serial console configuration */ #define CONFIG_SERIAL3 /* use SERIAL 3 */ +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" #define CONFIG_SYS_PROMPT "Peach-Pit # " #define CONFIG_IDENT_STRING " for Peach-Pit" diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index 5c9a3c0..6b45948 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -9,15 +9,26 @@ #ifndef __CONFIG_SMDK5420_H #define __CONFIG_SMDK5420_H +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_SPI_FLASH +#define CONFIG_ENV_SPI_BASE 0x12D30000 +#define FLASH_SIZE (0x4 << 20) +#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING + #include #define CONFIG_BOARD_COMMON #define CONFIG_SMDK5420 /* which is in a SMDK5420 */ +#define CONFIG_SYS_SDRAM_BASE 0x20000000 +#define CONFIG_SYS_TEXT_BASE 0x23E00000 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_IRAM_TOP - 0x800) /* select serial console configuration */ #define CONFIG_SERIAL3 /* use SERIAL 3 */ +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" #define CONFIG_SYS_PROMPT "SMDK5420 # " #define CONFIG_IDENT_STRING " for SMDK5420" -- cgit v0.10.2 From 6207604f9cae9d74cd2b9daaeac3f076d797e17d Mon Sep 17 00:00:00 2001 From: Hyungwon Hwang Date: Fri, 12 Dec 2014 14:45:45 +0900 Subject: Odroid-XU3: Add support for Odroid-XU3 This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang Reviewed-by: Sjoerd Simons Tested-by: Sjoerd Simons Acked-by: Simon Glass Tested-by: Kevin Hilman Signed-off-by: Minkyu Kang diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index f3eadb4..7fcb5d2 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -24,6 +24,10 @@ config TARGET_TRATS2 config TARGET_ODROID bool "Exynos4412 Odroid board" +config TARGET_ODROID_XU3 + bool "Exynos5422 Odroid board" + select OF_CONTROL + config TARGET_ARNDALE bool "Exynos5250 Arndale board" select CPU_V7_HAS_NONSEC diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index e6a495c..fac16cc 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -13,7 +13,8 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-smdk5250.dtb \ exynos5420-smdk5420.dtb \ exynos5420-peach-pit.dtb \ - exynos5800-peach-pi.dtb + exynos5800-peach-pi.dtb \ + exynos5422-odroidxu3.dtb dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-medcom-wide.dtb \ tegra20-paz00.dtb \ diff --git a/arch/arm/dts/exynos5422-odroidxu3.dts b/arch/arm/dts/exynos5422-odroidxu3.dts new file mode 100644 index 0000000..cff32a9 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,45 @@ +/* + * Odroid XU3 device tree source + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +#include "exynos54xx.dtsi" + +/ { + model = "Odroid XU3 based on EXYNOS5422"; + compatible = "samsung,odroidxu3", "samsung,exynos5"; + + aliases { + serial0 = "/serial@12C00000"; + console = "/serial@12C20000"; + }; + + memory { + device_type = "memory"; + reg = <0x40000000 0x10000000 + 0x50000000 0x10000000 + 0x60000000 0x10000000 + 0x70000000 0x10000000 + 0x80000000 0x10000000 + 0x90000000 0x10000000 + 0xa0000000 0x10000000 + 0xb0000000 0xea00000>; + }; + + serial@12C20000 { + status="okay"; + }; + + mmc@12200000 { + fifoth_val = <0x201f0020>; + }; + + mmc@12220000 { + fifoth_val = <0x201f0020>; + }; +}; diff --git a/board/samsung/smdk5420/Kconfig b/board/samsung/smdk5420/Kconfig index e7aafe5..ff28b1d 100644 --- a/board/samsung/smdk5420/Kconfig +++ b/board/samsung/smdk5420/Kconfig @@ -1,3 +1,16 @@ +if TARGET_ODROID_XU3 + +config SYS_BOARD + default "smdk5420" + +config SYS_VENDOR + default "samsung" + +config SYS_CONFIG_NAME + default "odroid_xu3" + +endif + if TARGET_PEACH_PI config SYS_BOARD diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig new file mode 100644 index 0000000..74aa0cf --- /dev/null +++ b/configs/odroid-xu3_defconfig @@ -0,0 +1,4 @@ +CONFIG_ARM=y +CONFIG_ARCH_EXYNOS=y +CONFIG_TARGET_ODROID_XU3=y +CONFIG_DEFAULT_DEVICE_TREE="exynos5422-odroidxu3" diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h new file mode 100644 index 0000000..a92b5cc --- /dev/null +++ b/include/configs/odroid_xu3.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2013 Samsung Electronics + * Hyungwon Hwang + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_ODROID_XU3_H +#define __CONFIG_ODROID_XU3_H + +#include "exynos5420-common.h" + +#define CONFIG_SYS_PROMPT "ODROID-XU3 # " +#define CONFIG_IDENT_STRING " for ODROID-XU3" + +#define CONFIG_BOARD_COMMON + +#define CONFIG_SYS_SDRAM_BASE 0x40000000 +#define CONFIG_SYS_TEXT_BASE 0x43E00000 + +/* select serial console configuration */ +#define CONFIG_SERIAL2 /* use SERIAL 2 */ + +#define TZPC_BASE_OFFSET 0x10000 + +#define CONFIG_CMD_MMC + +/* + * FIXME: The number of bank is actually 8. But there is no way to reserve the + * last 16 Mib in the last bank now. So I just excluded the last bank + * temporally. + */ +#define CONFIG_NR_DRAM_BANKS 7 +#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */ + +#define CONFIG_ENV_IS_IN_MMC + +#undef CONFIG_ENV_SIZE +#undef CONFIG_ENV_OFFSET +#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_OFFSET (SZ_1K * 1280) /* 1.25 MiB offset */ + +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000) + +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" + +/* FIXME: MUST BE REMOVED AFTER TMU IS TURNED ON */ +#undef CONFIG_EXYNOS_TMU +#undef CONFIG_TMU_CMD_DTT + +#endif /* __CONFIG_H */ -- cgit v0.10.2 From d10e953137f546d27de21838632ae2fb15335d48 Mon Sep 17 00:00:00 2001 From: Hyungwon Hwang Date: Fri, 12 Dec 2014 14:45:46 +0900 Subject: Odroid-XU3: Add documentation for Odroid-XU3 This patch adds documentation for Odroid-XU3. This documentation is based on that of Odroid (doc/README-odroid) made by Przemyslaw Marczak. The documentation includes basic information about boot media layout, environment, partition layout, and the instruction to burn the u-boot image to boot media. Signed-off-by: Hyungwon Hwang Acked-by: Simon Glass Tested-by: Kevin Hilman Signed-off-by: Minkyu Kang diff --git a/doc/README.odroid b/doc/README.odroid index 25b962b..8a004ca 100644 --- a/doc/README.odroid +++ b/doc/README.odroid @@ -1,28 +1,39 @@ - U-boot for Odroid X2/U3 + U-boot for Odroid X2/U3/XU3 ======================== 1. Summary ========== -This is a quick instruction for setup Odroid boards based on Exynos4412. -Board config: odroid_config +This is a quick instruction for setup Odroid boards. +Board config: odroid_config for X2/U3 +Board config: odroid-xu3_config for XU3 2. Supported devices ==================== -This U-BOOT config can be used on two boards: +This U-BOOT config can be used on three boards: - Odroid U3 - Odroid X2 with CPU Exynos 4412 rev 2.0 and 2GB of RAM +- Odroid XU3 +with CPU Exynos5422 and 2GB of RAM 3. Boot sequence ================ iROM->BL1->(BL2 + TrustZone)->U-BOOT -This version of U-BOOT doesn't implement SPL but it is required(BL2) -and can be found in "boot.tar.gz" from here: +This version of U-BOOT doesn't implement SPL. So, BL1, BL2, and TrustZone +binaries are needed to boot up. + +<< X2/U3 >> +It can be found in "boot.tar.gz" from here: http://dev.odroid.com/projects/4412boot/wiki/FrontPage?action=download&value=boot.tar.gz or here: http://odroid.in/guides/ubuntu-lfs/boot.tar.gz +<< XU3 >> +It can be downloaded from: +https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel + + 4. Boot media layout ==================== The table below shows SD/eMMC cards layout for U-boot. @@ -35,18 +46,20 @@ The block offset is starting from 0 and the block size is 512B. | Bl2 | 31 | 30 | 1 (boot) | | U-boot | 63 | 62 | 1 (boot) | | Tzsw | 2111 | 2110 | 1 (boot) | -| Uboot Env | 2500 | 2500 | 0 (user) | +| Uboot Env | 2560 | 2560 | 0 (user) | ------------------------------------- 5. Prepare the SD boot card - with SD card reader ================================================= To prepare bootable media you need boot binaries provided by hardkernel. -File "boot.tar.gz" (link in point 3.) contains: -- E4412_S.bl1.HardKernel.bin -- E4412_S.tzsw.signed.bin -- bl2.signed.bin +From the downloaded files, You can find: +- bl1.bin +- tzsw.bin +- bl2.bin - sd_fusing.sh - u-boot.bin +(The file names can be slightly different, but you can distinguish what they are +without problem) This is all you need to boot this board. But if you want to use your custom u-boot then you need to change u-boot.bin with your own u-boot binary* @@ -56,7 +69,7 @@ and run the script "sd_fusing.sh" - this script is valid only for SD card. The proper binary file of current U-boot is u-boot-dtb.bin. quick steps for Linux: -- extract boot.tar.gz +- Download all files from the link at point 3 and extract it if needed. - put any SD card into the SD reader - check the device with "dmesg" - run ./sd_fusing.sh /dev/sdX - where X is SD card device (but not a partition) @@ -66,7 +79,7 @@ Check if Hardkernel U-boot is booting, and next do the same with your U-boot. with a eMMC card reader (boot from eMMC card slot) ===================================================== To boot the device from the eMMC slot you should use a special card reader -which supports eMMC partiion switch. All of the boot binaries are stored +which supports eMMC partition switch. All of the boot binaries are stored on the eMMC boot partition which is normally hidden. The "sd_fusing.sh" script can be used after updating offsets of binaries @@ -81,8 +94,8 @@ But then the device can boot only from the SD card slot. 8. Prepare the boot media using Hardkernel U-boot ================================================= -You can update the U-boot to the custom one if you have an working bootloader -delivered with the board on a eMMC/SD card. Then follow the steps: +You can update the U-boot to the custom one if you have a working bootloader +delivered with the board on the eMMC/SD card. Then follow the steps: - install the android fastboot tool - connect a micro usb cable to the board - on the U-boot prompt, run command: fastboot (as a root) @@ -91,7 +104,7 @@ delivered with the board on a eMMC/SD card. Then follow the steps: 9. Partition layout ==================== -Default U-boot environment is setup for fixed partiion layout. +Default U-boot environment is setup for fixed partition layout. Partition table: MSDOS. Disk layout and files as listed in the table below. ----- ------ ------ ------ -------- --------------------------------- @@ -106,6 +119,7 @@ Partition table: MSDOS. Disk layout and files as listed in the table below. Supported fdt files are: - exynos4412-odroidx2.dtb - exynos4412-odroidu3.dtb +- exynos5422-odroidxu3.dtb Supported kernel files are: - Image.itb @@ -144,6 +158,7 @@ And the boot sequence is: 11. USB host support ==================== +NOTE: This section is only for Odroid X2/U3. The ethernet can be accessed after starting the USB subsystem in U-Boot. The adapter does not come with a preconfigured MAC address, and hence it needs -- cgit v0.10.2 From 307e90e6179e46197e701e216767408c8ef6d010 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 5 Dec 2014 18:12:21 +0100 Subject: Exynos5800: The Peach-Pi board does not have a Parade video bridge Unlike the Peach-Pit board, there is no parade edp to lvds bridge on the Pi. So drop it from device-tree Signed-off-by: Sjoerd Simons Acked-by: Simon Glass Tested-by: Simon Glass Signed-off-by: Minkyu Kang diff --git a/arch/arm/dts/exynos5800-peach-pi.dts b/arch/arm/dts/exynos5800-peach-pi.dts index 8aedf8e..2f9d2db 100644 --- a/arch/arm/dts/exynos5800-peach-pi.dts +++ b/arch/arm/dts/exynos5800-peach-pi.dts @@ -63,11 +63,6 @@ reg = <0x20>; compatible = "maxim,max98090-codec"; }; - - edp-lvds-bridge@48 { - compatible = "parade,ps8625"; - reg = <0x48>; - }; }; sound@3830000 { -- cgit v0.10.2 From a7b99204a09c9451d661e0d94cdafa4677a229de Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 5 Dec 2014 18:12:22 +0100 Subject: exynos5420: fix compilation without parade video Not all exynos 5420 based devices with an LCD also have a parade LVDS bridge. So make sure compilation doesn't break if CONFIG_LCD is enabled and CONFIG_VIDEO_PARADE is not. As a side-effect move the parade functions from the exynos system header file to its own file. Signed-off-by: Sjoerd Simons Signed-off-by: Minkyu Kang diff --git a/arch/arm/include/asm/arch-exynos/system.h b/arch/arm/include/asm/arch-exynos/system.h index 320763f..4968d3d 100644 --- a/arch/arm/include/asm/arch-exynos/system.h +++ b/arch/arm/include/asm/arch-exynos/system.h @@ -41,7 +41,4 @@ void set_usbhost_mode(unsigned int mode); void set_system_display_ctrl(void); int exynos_lcd_early_init(const void *blob); -/* Initialize the Parade dP<->LVDS bridge if present */ -int parade_init(const void *blob); - #endif /* _EXYNOS4_SYSTEM_H */ diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c index a691222..55f0ea2 100644 --- a/board/samsung/smdk5420/smdk5420.c +++ b/board/samsung/smdk5420/smdk5420.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/include/parade.h b/include/parade.h new file mode 100644 index 0000000..887f56d --- /dev/null +++ b/include/parade.h @@ -0,0 +1,18 @@ +/* + * (C) Copyright 2012 Samsung Electronics + * Donghwa Lee + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __PARADE_H__ +#define __PARADE_H__ + +/* Initialize the Parade dP<->LVDS bridge if present */ +#ifdef CONFIG_VIDEO_PARADE +int parade_init(const void *blob); +#else +static inline int parade_init(const void *blob) { return -1; } +#endif + +#endif /* __PARADE_H__ */ -- cgit v0.10.2 From ce88a25cc28a5ad76826c3ed0270d274bbd84de9 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 5 Dec 2014 21:26:10 +0100 Subject: odroid-XU3: Add entry for DTS EHCI GPIO Add samsung,vbus-gpio information for the XU3. This allows the usage of the EHCI controller on the XU3, which is connected to the SMSC LAN9514 chip (usb hub + network). Signed-off-by: Sjoerd Simons Signed-off-by: Minkyu Kang diff --git a/arch/arm/dts/exynos5422-odroidxu3.dts b/arch/arm/dts/exynos5422-odroidxu3.dts index cff32a9..79a7acd 100644 --- a/arch/arm/dts/exynos5422-odroidxu3.dts +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -31,6 +31,10 @@ 0xb0000000 0xea00000>; }; + ehci@12110000 { + samsung,vbus-gpio = <&gpio 0x66 0>; /* X26 */ + }; + serial@12C20000 { status="okay"; }; diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index a92b5cc..9fa8660 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -44,6 +44,10 @@ #define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" +/* USB */ +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_EXYNOS + /* FIXME: MUST BE REMOVED AFTER TMU IS TURNED ON */ #undef CONFIG_EXYNOS_TMU #undef CONFIG_TMU_CMD_DTT -- cgit v0.10.2 From 68904c83226d8bd519d7937958df578b26719ce2 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 5 Dec 2014 21:46:41 +0100 Subject: ARM: exynos5420: Leave VBUS GPIO configuration up to common code Since commit 4a271cb1b4ffdf330 (exynos: usb: Switch USB VBUS GPIOs to be device tree configured) it's not needed for the board specific files to turn on the VBUS GPIO by hand as that gets done based on device tree. So drop the redundant code from the SMDK5420 board file. Signed-off-by: Sjoerd Simons Acked-by: Simon Glass Tested-by: Simon Glass Signed-off-by: Minkyu Kang diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c index 55f0ea2..1aca9fa 100644 --- a/board/samsung/smdk5420/smdk5420.c +++ b/board/samsung/smdk5420/smdk5420.c @@ -22,24 +22,8 @@ DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_USB_EHCI_EXYNOS -static int board_usb_vbus_init(void) -{ - /* Enable VBUS power switch */ - gpio_direction_output(EXYNOS5420_GPIO_X26, 1); - - /* VBUS turn ON time */ - mdelay(3); - - return 0; -} -#endif - int exynos_init(void) { -#ifdef CONFIG_USB_EHCI_EXYNOS - board_usb_vbus_init(); -#endif return 0; } -- cgit v0.10.2 From fb56435f504b401e3a4e66fc98098f1de447c789 Mon Sep 17 00:00:00 2001 From: Joonyoung Shim Date: Mon, 22 Dec 2014 19:46:30 +0900 Subject: arm: exynos: clock: support SPLL as mmc source clock for exynos5420 MMC of exynos5420 can select SPLL as source clock, so add to support SPLL in exynos5420_get_mmc_clk(). It was tested on Odroid-XU3 board. Signed-off-by: Joonyoung Shim Acked-by: Jaehoon Chung Signed-off-by: Minkyu Kang diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c index 8fab135..b31c13b 100644 --- a/arch/arm/cpu/armv7/exynos/clock.c +++ b/arch/arm/cpu/armv7/exynos/clock.c @@ -848,6 +848,8 @@ static unsigned long exynos5420_get_mmc_clk(int dev_index) if (sel == 0x3) sclk = get_pll_clk(MPLL); + else if (sel == 0x4) + sclk = get_pll_clk(SPLL); else if (sel == 0x6) sclk = get_pll_clk(EPLL); else -- cgit v0.10.2 From 66223787869e2059560ac583431e9968ac4cf26f Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Mon, 29 Dec 2014 22:17:10 +0100 Subject: Exynos: Move down common USB configuration USB is a pretty common feature on exynos 5 board, so it seems sensible to configure it directly from exynos5-common. As a side-effect this makes USB available from u-boot on exynos 5420 based boards. While there enable support for common USB ethernet cards to make it more likely the default config allows booting for network and enable XHCI on SMDK5420 which has it defined in the dts but not in its config. Signed-off-by: Sjoerd Simons Acked-by: Simon Glass Signed-off-by: Minkyu Kang diff --git a/include/configs/arndale.h b/include/configs/arndale.h index 81e8a7c..6bd27a2 100644 --- a/include/configs/arndale.h +++ b/include/configs/arndale.h @@ -24,10 +24,6 @@ #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_EXYNOS -#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 -#define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_ASIX - /* MMC SPL */ #define CONFIG_EXYNOS_SPL diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index 8f9b780..ad63f3c 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -174,6 +174,16 @@ #define CONFIG_CMD_GPIO +/* USB */ +#define CONFIG_CMD_USB +#define CONFIG_USB_STORAGE +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 +#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 + +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_ASIX +#define CONFIG_USB_ETHER_SMSC95XX + /* USB boot mode */ #define CONFIG_USB_BOOTING #define EXYNOS_COPY_USB_FNPTR_ADDR 0x02020070 diff --git a/include/configs/exynos5250-common.h b/include/configs/exynos5250-common.h index a0107e8..6714313 100644 --- a/include/configs/exynos5250-common.h +++ b/include/configs/exynos5250-common.h @@ -22,11 +22,6 @@ #define CONFIG_SPL_MAX_FOOTPRINT (14 * 1024) -/* USB */ -#define CONFIG_CMD_USB -#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 -#define CONFIG_USB_STORAGE - #define CONFIG_SPL_TEXT_BASE 0x02023400 #define CONFIG_IRAM_STACK 0x02050000 diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index 7322f336..fe72bd0 100644 --- a/include/configs/exynos5420-common.h +++ b/include/configs/exynos5420-common.h @@ -38,6 +38,4 @@ #define CONFIG_BOARD_REV_GPIO_COUNT 2 -#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 - #endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index 6b45948..61f582f 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -34,6 +34,10 @@ #define CONFIG_IDENT_STRING " for SMDK5420" #define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" +/* USB */ +#define CONFIG_USB_XHCI +#define CONFIG_USB_XHCI_EXYNOS + /* DRAM Memory Banks */ #define CONFIG_NR_DRAM_BANKS 7 #define SDRAM_BANK_SIZE (512UL << 20UL) /* 512 MB */ -- cgit v0.10.2