[U-Boot] [RESEND][PATCH v11 1/3] 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 human.hw...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested-by: Kevin Hilman khil...@linaro.org Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v10: - Newly added Changes for v11: - Move the include point of exynos5420-common.h after CONFIG_ENV_IS_IN_SPI_FLASH in smdk5420.h include/configs/exynos5420-common.h | 18 -- include/configs/peach-pi.h | 6 ++ include/configs/peach-pit.h | 6 ++ include/configs/smdk5420.h | 11 +++ 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index ef6e155..7322f33 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_BASE0x12D3 -#define FLASH_SIZE (0x4 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING - #include configs/exynos5-common.h #define CONFIG_ARCH_EARLY_INIT_R @@ -29,8 +22,6 @@ #define CONFIG_VAR_SIZE_SPL -#define CONFIG_SYS_SDRAM_BASE 0x2000 -#define CONFIG_SYS_TEXT_BASE 0x23E0 #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_BASE0x12D3 #define FLASH_SIZE (0x4 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include configs/exynos5420-common.h #include configs/exynos5-dt-common.h #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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_BASE0x12D3 #define FLASH_SIZE (0x4 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include configs/exynos5420-common.h #include configs/exynos5-dt-common.h #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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_BASE0x12D3 +#define FLASH_SIZE (0x4 20) +#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING + #include configs/exynos5420-common.h #define CONFIG_BOARD_COMMON #define CONFIG_SMDK5420/* which is in a SMDK5420 */ +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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
[U-Boot] [RESEND][PATCH v11 0/3] Adds support for Exynos5422 odroid xu3 board
This is v11 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ v7: https://patchwork.ozlabs.org/patch/410204/ v8: https://patchwork.ozlabs.org/patch/410709/ v9: https://patchwork.ozlabs.org/patch/415514/ v10: https://patchwork.ozlabs.org/patch/416720/ The patchset by Akshay Saraswat is already merged into u-boot-samsung. Please ignore the instruction about the additional patchset in v8. How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. Apply this patchset 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 5. Now you can use u-boot-dtb.bin for your downloading WARNING: (update in V10) It was impossible to make the u-boot image smaller than 335872 bytes, and also I did not want to waste my time to make it fit for that restriction, because the discussion about this issue is in progress in malining list. I used BL2 by Suriyan Ramasami suriya...@gmail.com which the restriction is removed for testing. If you need the BL2 for testing, please contact me or Suriyan. Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. Thanks for Sjoerd Simons. Not only did he comment my patchset, but he also made real patch for me. I squashed some part of that patchset, and included the remainings into my patchset. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove the first patch which change GPIO entries order. It became useless, after DT support is added - Remove useless variables in the default environment - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 - Remove the detailed information in the header file, and leave the reference to the documentation Changes for v10: - Move the non common configs in Exynos5420 config file to each board file - Remove the config unsets which are added to make the result image small This is needless now, because the image is not small enough even though these unsets are added. - Remove redundant DT node and properties - Remove the odroid-xu3 board file and make odroid-xu3 a variant of smdk5420 - Fix some errata in documentation - Include the patch by Sjoerd Simons as 4th patch Changes for v11: - Move the include point of exynos5420-common.h after CONFIG_ENV_IS_IN_SPI_FLASH in smdk5420.h - Remove duplicated CONFIG_CMD_EXT2/EXT4/FAT from odroid_xu3.h - Fix the typo in the comment, which is found in odroid_xu3.h - Add a comment to specify not available networking yet - Remove the patch abou EHCI Hyungwon Hwang (3): config: exynos5420: move non common configs to specific board files Odroid-XU3: Add support for Odroid-XU3 Odroid-XU3: Add documentation for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 4 +++ arch/arm/dts/Makefile | 3 ++- arch/arm/dts/exynos5422-odroidxu3
[U-Boot] [RESEND][PATCH v11 2/3] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Reviewed-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk Tested-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk Acked-by: Simon Glass s...@chromium.org Tested-by: Kevin Hilman khil...@linaro.org Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove useless variables in the default environment - Replace the detailed information to the reference to the documentation Changes for v10: - Remove the config unsets which are added to make the result image small This is needless now, because the image is not small enough even though these unsets are added. - Remove redundant DT node and properties - Remove the odroid-xu3 board file and make odroid-xu3 a variant of smdk5420 Changes for v11: - Remove duplicated CONFIG_CMD_EXT2/EXT4/FAT from odroid_xu3.h - Fix the typo in the comment, which is found in odroid_xu3.h arch/arm/cpu/armv7/exynos/Kconfig | 4 +++ arch/arm/dts/Makefile | 3 ++- arch/arm/dts/exynos5422-odroidxu3.dts | 45 +++ board/samsung/smdk5420/Kconfig| 13 + configs/odroid-xu3_defconfig | 4 +++ include/configs/odroid_xu3.h | 51 +++ 6 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h 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 e5846ea..a811b1b 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 000..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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + fifoth_val = 0x201f0020; + }; + + mmc@1222 { + fifoth_val = 0x201f0020
[U-Boot] [RESEND][PATCH v11 3/3] 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 human.hw...@samsung.com Acked-by: Simon Glass s...@chromium.org Tested-by: Kevin Hilman khil...@linaro.org Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v6: - Newly added Changes for v7: - Fix several errata in the documentation Changes for v8: - None Changes for v9: - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 Changes for v10: - Fix a erratum Changes for v11: - Add a comment to specify not available networking yet doc/README.odroid | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) doc/README.odroid | 47 +++ 1 file changed, 31 insertions(+), 16 deletions(-) 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=downloadvalue=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
Re: [U-Boot] [PATCH v9 2/2] Odroid-XU3: Add documentation for Odroid-XU3
Dear Kevin, On Wed, 10 Dec 2014 11:20:43 -0800 Kevin Hilman khil...@kernel.org wrote: Simon Glass s...@chromium.org writes: [...] OK, thanks. Any pointers on how to get this building with mainline u-boot? Just adding CONFIG_SPL to odroid_xu3.h doesn't seem to work (compile errors.) I'm quite comfortable in the kernel, but I'm not very familiar with u-boot, especially SPL. It's normally automatic unless some special disabling was done - see spl/u-boot-spl.bin in the output. You need to sign it though :-( Right, I'm used to finding it there, but there's nothing there when buildling using odroid-xu3_config with $SUBJECT series. CONFIG_SPL_BUILD must be turn on for that(You can find the detailesin doc/README.SPL). But neither common exynos config files nor odroid xu3 specific config file contain the config option. Before I turned on that option, but not work at the moment. Some work should be done by someone. I am sorry to say, but I cannot assure I can do that immediately. Kevin Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v11 0/3] Adds support for Exynos5422 odroid xu3 board
On Wed, 10 Dec 2014 11:23:08 -0800 Kevin Hilman khil...@kernel.org wrote: Hyungwon Hwang human.hw...@samsung.com writes: Dear Kevin, On Tue, 09 Dec 2014 15:36:00 -0800 Kevin Hilman khil...@kernel.org wrote: Hyungwon Hwang human.hw...@samsung.com writes: This is v11 of the patchset adding support Odroud XU3 board. I finally got around to testing this on top of v2015.01-rc3 on my XU3. As I mentioned earlier, I had to enable the USB and networking options so I could dhcp/tftp but after that it works for me. Feel free to add: Tested-by: Kevin Hilman khil...@linaro.org Thanks for yout review. Sjoerd is waiting for his patch merged (title: Exynos: Move down common USB configuration). So the features related USB and networking will be enabled after this patchset and his patch are merged. OK, good. [...] Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. FYI, with or without your MMC ID patch, I wasn't able to save the environment to the SD card I'm booting from: ODROID-XU3 # saveenv Saving Environment to MMC... dwmci_send_cmd: Timeout. MMC init failed Actually I just tested it again. But it works for me. Saving Environment to MMC... Writing to MMC(1)... done I applied my patchset and MMC ID patch to commit 38cd8c4253013ccdd4052ee021f6066fe9a52551 in http://git.denx.de/u-boot-samsung.git (branch: master). I don't know why it does't work for you. Please feel free to need my help for this, if you need. Curious wh you're using u-boot-samsung.git and not mainline. Can you test this using mainline u-boot v2015.01-rc3? Kevin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v11 0/3] Adds support for Exynos5422 odroid xu3 board
Dear Kevin, On Wed, 10 Dec 2014 11:23:08 -0800 Kevin Hilman khil...@kernel.org wrote: Hyungwon Hwang human.hw...@samsung.com writes: Dear Kevin, On Tue, 09 Dec 2014 15:36:00 -0800 Kevin Hilman khil...@kernel.org wrote: Hyungwon Hwang human.hw...@samsung.com writes: This is v11 of the patchset adding support Odroud XU3 board. I finally got around to testing this on top of v2015.01-rc3 on my XU3. As I mentioned earlier, I had to enable the USB and networking options so I could dhcp/tftp but after that it works for me. Feel free to add: Tested-by: Kevin Hilman khil...@linaro.org Thanks for yout review. Sjoerd is waiting for his patch merged (title: Exynos: Move down common USB configuration). So the features related USB and networking will be enabled after this patchset and his patch are merged. OK, good. [...] Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. FYI, with or without your MMC ID patch, I wasn't able to save the environment to the SD card I'm booting from: ODROID-XU3 # saveenv Saving Environment to MMC... dwmci_send_cmd: Timeout. MMC init failed Actually I just tested it again. But it works for me. Saving Environment to MMC... Writing to MMC(1)... done I applied my patchset and MMC ID patch to commit 38cd8c4253013ccdd4052ee021f6066fe9a52551 in http://git.denx.de/u-boot-samsung.git (branch: master). I don't know why it does't work for you. Please feel free to need my help for this, if you need. Curious wh you're using u-boot-samsung.git and not mainline. Can you test this using mainline u-boot v2015.01-rc3? I am sorry for the previous email. It was sent mistakenly by the bug of pressing ctrl in my multi-screen program. As I know, basically the merge is done by Minkyu Kang who manages the u-boot-samsung, and he send pull request to mainline. So I have done this work based on u-boot-samsung. How about use u-boot-samsung until it is merged to mainline, even though there is a explicit bug (You can fix it with https://patchwork.ozlabs.org/patch/415635/)? Also, I tested saveenv in the mainline u-boot(http://git.denx.de/u-boot.git). But it works. Which compiler do you use? I use gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4). Can you tell me what you use or test it using another compiler? Kevin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v11 0/3] Adds support for Exynos5422 odroid xu3 board
Dear Kevin, On Tue, 09 Dec 2014 15:36:00 -0800 Kevin Hilman khil...@kernel.org wrote: Hyungwon Hwang human.hw...@samsung.com writes: This is v11 of the patchset adding support Odroud XU3 board. I finally got around to testing this on top of v2015.01-rc3 on my XU3. As I mentioned earlier, I had to enable the USB and networking options so I could dhcp/tftp but after that it works for me. Feel free to add: Tested-by: Kevin Hilman khil...@linaro.org Thanks for yout review. Sjoerd is waiting for his patch merged (title: Exynos: Move down common USB configuration). So the features related USB and networking will be enabled after this patchset and his patch are merged. [...] Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. FYI, with or without your MMC ID patch, I wasn't able to save the environment to the SD card I'm booting from: ODROID-XU3 # saveenv Saving Environment to MMC... dwmci_send_cmd: Timeout. MMC init failed Actually I just tested it again. But it works for me. Saving Environment to MMC... Writing to MMC(1)... done I applied my patchset and MMC ID patch to commit 38cd8c4253013ccdd4052ee021f6066fe9a52551 in http://git.denx.de/u-boot-samsung.git (branch: master). I don't know why it does't work for you. Please feel free to need my help for this, if you need. Kevin Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v11 0/3] Adds support for Exynos5422 odroid xu3 board
Dear Suriyan, On Tue, 09 Dec 2014 18:29:56 -0800 Suriyan Ramasami suriya...@gmail.com wrote: Hello Hyungwon Hwang, On Tue, Dec 9, 2014 at 4:58 PM, Hyungwon Hwang human.hw...@samsung.com wrote: Dear Kevin, On Tue, 09 Dec 2014 15:36:00 -0800 Kevin Hilman khil...@kernel.org wrote: Hyungwon Hwang human.hw...@samsung.com writes: This is v11 of the patchset adding support Odroud XU3 board. I finally got around to testing this on top of v2015.01-rc3 on my XU3. As I mentioned earlier, I had to enable the USB and networking options so I could dhcp/tftp but after that it works for me. Feel free to add: Tested-by: Kevin Hilman khil...@linaro.org Thanks for yout review. Sjoerd is waiting for his patch merged (title: Exynos: Move down common USB configuration). So the features related USB and networking will be enabled after this patchset and his patch are merged. [...] Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. FYI, with or without your MMC ID patch, I wasn't able to save the environment to the SD card I'm booting from: ODROID-XU3 # saveenv Saving Environment to MMC... dwmci_send_cmd: Timeout. MMC init failed Actually I just tested it again. But it works for me. Saving Environment to MMC... Writing to MMC(1)... done I applied my patchset and MMC ID patch to commit 38cd8c4253013ccdd4052ee021f6066fe9a52551 in http://git.denx.de/u-boot-samsung.git (branch: master). I don't know why it does't work for you. Please feel free to need my help for this, if you need. Just like Kevin, I have to say that mmc is erratic. For example, if you let the boot process go all along (and not interrupt it), and let it fail in the pxe load commands. Then if you do a, ls mmc 1:1 / it will give a timeout error (Assuming you do have a valid 1st partition) But, if you interrupt the boot during the count down, and issue the same, it will work. I had mentioned this before, that if you enable *MMC_TRACE, it again stops working. Also, I found if you do a couple of mmc 1:1 commands, and do some other commands (say mmc rescan etc), and retry it will fail. I tested all sinarios that you told me. But in all cases, it works for me. That's awkward. You are using Micro SD card. Right? Regards - Suriyan Kevin Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v10 2/4] Odroid-XU3: Add support for Odroid-XU3
Dear Sjoerd, On Fri, 05 Dec 2014 20:31:25 +0100 Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: On Tue, 2014-12-02 at 16:07 +0900, Hyungwon Hwang wrote: This patch adds support for Odroid-XU3. diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig new file mode 100644 index 000..74aa0cf --- /dev/null +++ b/configs/odroid-xu3_defconfig @@ -0,0 +1,4 @@ + +#define CONFIG_CMD_MMC +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_FAT These four are already defined in include/config_distro_defaults.h which is included by the exynos headers I will remove CONFIG_CMD_EXT2, CONFIG_CMD_EXT4, and CONFIG_CMD_FAT which defined needlessly from next version. Thanks. Other then that Reviewed-By: Sjoerd Simons sjoerd.sim...@collabora.co.uk Tested-By: Sjoerd Simons sjoerd.sim...@collabora.co.uk Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v10 3/4] Odroid-XU3: Add documentation for Odroid-XU3
Dear Simon, On Tue, 02 Dec 2014 10:22:55 -0700 Simon Glass s...@chromium.org wrote: Hi, On 2 December 2014 at 00:07, Hyungwon Hwang human.hw...@samsung.com wrote: 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 human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v6: - Newly added Changes for v7: - Fix several errata in the documentation Changes for v8: - None Changes for v9: - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 Acked-by: Simon Glass s...@chromium.org Should you mention that networking is not available? Probably not that important. Sorry for late reply. I will add comment for not available networking to the documentation. Thanks for your review. Regards, Simon Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v11 2/3] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Reviewed-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk Tested-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk Acked-by: Simon Glass s...@chromium.org Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove useless variables in the default environment - Replace the detailed information to the reference to the documentation Changes for v10: - Remove the config unsets which are added to make the result image small This is needless now, because the image is not small enough even though these unsets are added. - Remove redundant DT node and properties - Remove the odroid-xu3 board file and make odroid-xu3 a variant of smdk5420 Changes for v11: - Remove duplicated CONFIG_CMD_EXT2/EXT4/FAT from odroid_xu3.h - Fix the typo in the comment, which is found in odroid_xu3.h arch/arm/cpu/armv7/exynos/Kconfig | 4 +++ arch/arm/dts/Makefile | 3 ++- arch/arm/dts/exynos5422-odroidxu3.dts | 45 +++ board/samsung/smdk5420/Kconfig| 13 + configs/odroid-xu3_defconfig | 4 +++ include/configs/odroid_xu3.h | 51 +++ 6 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h 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 e5846ea..a811b1b 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 000..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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + fifoth_val = 0x201f0020; + }; + + mmc@1222 { + fifoth_val = 0x201f0020; + }; +}; diff --git a/board/samsung/smdk5420/Kconfig
[U-Boot] [PATCH v11 0/3] Adds support for Exynos5422 odroid xu3 board
This is v11 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ v7: https://patchwork.ozlabs.org/patch/410204/ v8: https://patchwork.ozlabs.org/patch/410709/ v9: https://patchwork.ozlabs.org/patch/415514/ v10: https://patchwork.ozlabs.org/patch/416720/ The patchset by Akshay Saraswat is already merged into u-boot-samsung. Please ignore the instruction about the additional patchset in v8. How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. Apply this patchset 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 5. Now you can use u-boot-dtb.bin for your downloading WARNING: (update in V10) It was impossible to make the u-boot image smaller than 335872 bytes, and also I did not want to waste my time to make it fit for that restriction, because the discussion about this issue is in progress in malining list. I used BL2 by Suriyan Ramasami suriya...@gmail.com which the restriction is removed for testing. If you need the BL2 for testing, please contact me or Suriyan. Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. Thanks for Sjoerd Simons. Not only did he comment my patchset, but he also made real patch for me. I squashed some part of that patchset, and included the remainings into my patchset. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove the first patch which change GPIO entries order. It became useless, after DT support is added - Remove useless variables in the default environment - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 - Remove the detailed information in the header file, and leave the reference to the documentation Changes for v10: - Move the non common configs in Exynos5420 config file to each board file - Remove the config unsets which are added to make the result image small This is needless now, because the image is not small enough even though these unsets are added. - Remove redundant DT node and properties - Remove the odroid-xu3 board file and make odroid-xu3 a variant of smdk5420 - Fix some errata in documentation - Include the patch by Sjoerd Simons as 4th patch Changes for v11: - Move the include point of exynos5420-common.h after CONFIG_ENV_IS_IN_SPI_FLASH in smdk5420.h - Remove duplicated CONFIG_CMD_EXT2/EXT4/FAT from odroid_xu3.h - Fix the typo in the comment, which is found in odroid_xu3.h - Add a comment to specify not available networking yet - Remove the patch abou EHCI Hyungwon Hwang (3): config: exynos5420: move non common configs to specific board files Odroid-XU3: Add support for Odroid-XU3 Odroid-XU3: Add documentation for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 4 +++ arch/arm/dts/Makefile | 3 ++- arch/arm/dts/exynos5422-odroidxu3
[U-Boot] [PATCH v11 3/3] 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 human.hw...@samsung.com Acked-by: Simon Glass s...@chromium.org Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v6: - Newly added Changes for v7: - Fix several errata in the documentation Changes for v8: - None Changes for v9: - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 Changes for v10: - Fix a erratum Changes for v11: - Add a comment to specify not available networking yet doc/README.odroid | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) doc/README.odroid | 47 +++ 1 file changed, 31 insertions(+), 16 deletions(-) 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=downloadvalue=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
[U-Boot] [PATCH v11 1/3] 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 human.hw...@samsung.com Acked-by: Simon Glass s...@chromium.org Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v10: - Newly added Changes for v11: - Move the include point of exynos5420-common.h after CONFIG_ENV_IS_IN_SPI_FLASH in smdk5420.h include/configs/exynos5420-common.h | 18 -- include/configs/peach-pi.h | 6 ++ include/configs/peach-pit.h | 6 ++ include/configs/smdk5420.h | 11 +++ 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index ef6e155..7322f33 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_BASE0x12D3 -#define FLASH_SIZE (0x4 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING - #include configs/exynos5-common.h #define CONFIG_ARCH_EARLY_INIT_R @@ -29,8 +22,6 @@ #define CONFIG_VAR_SIZE_SPL -#define CONFIG_SYS_SDRAM_BASE 0x2000 -#define CONFIG_SYS_TEXT_BASE 0x23E0 #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_BASE0x12D3 #define FLASH_SIZE (0x4 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include configs/exynos5420-common.h #include configs/exynos5-dt-common.h #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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_BASE0x12D3 #define FLASH_SIZE (0x4 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include configs/exynos5420-common.h #include configs/exynos5-dt-common.h #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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_BASE0x12D3 +#define FLASH_SIZE (0x4 20) +#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING + #include configs/exynos5420-common.h #define CONFIG_BOARD_COMMON #define CONFIG_SMDK5420/* which is in a SMDK5420 */ +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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
Re: [U-Boot] [PATCH v2] odroid-XU3: Add entry for DTS EHCI GPIO
Dear Sjoerd, On Fri, 05 Dec 2014 21:26:10 +0100 Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: 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 sjoerd.sim...@collabora.co.uk --- Changes since v1: + Correct gpio number + Add USB configuration in the odroid XU3 default config Hyungwon could you add this one to your XU3 patchset if you send a next version (assuming it looks good)? Does it work only with this patch? I applied this patch on top of my patchset, and connected the ethernet cable to the device. But it seemed not working. Is there anything else that I should do for test? For usb storage/network support this patch should be combined with the exynos configuration tweaks patch i submited earlier to the list: Exynos: Move down common USB configuration arch/arm/dts/exynos5422-odroidxu3.dts | 4 include/configs/odroid_xu3.h | 4 2 files changed, 8 insertions(+) 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 @@ 0xb000 0xea0; }; + ehci@1211 { + samsung,vbus-gpio = gpio 0x66 0; /* X26 */ + }; + serial@12C2 { status=okay; }; diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 88bb98d..aa0c142 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -47,6 +47,10 @@ #define CONFIG_DEFAULT_CONSOLEconsole=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 Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] odroid-XU3: Add entry for DTS EHCI GPIO
Dear all, On Mon, 08 Dec 2014 19:36:46 -0800 Suriyan Ramasami suriya...@gmail.com wrote: Hello Hyungwon Hwang, On Mon, Dec 8, 2014 at 7:01 PM, Hyungwon Hwang human.hw...@samsung.com wrote: Dear Sjoerd, On Fri, 05 Dec 2014 21:26:10 +0100 Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: 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 sjoerd.sim...@collabora.co.uk --- Changes since v1: + Correct gpio number + Add USB configuration in the odroid XU3 default config Hyungwon could you add this one to your XU3 patchset if you send a next version (assuming it looks good)? Does it work only with this patch? I applied this patch on top of my patchset, and connected the ethernet cable to the device. But it seemed not working. Is there anything else that I should do for test? For usb storage/network support this patch should be combined with the exynos configuration tweaks patch i submited earlier to the list: Exynos: Move down common USB configuration arch/arm/dts/exynos5422-odroidxu3.dts | 4 include/configs/odroid_xu3.h | 4 2 files changed, 8 insertions(+) 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 @@ 0xb000 0xea0; }; + ehci@1211 { + samsung,vbus-gpio = gpio 0x66 0; /* X26 */ + }; + serial@12C2 { status=okay; }; diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 88bb98d..aa0c142 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -47,6 +47,10 @@ #define CONFIG_DEFAULT_CONSOLEconsole=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 In odroid_xu3.h you might want to add the below as well (for LAN + USB storage) +/* Enable USB */ +#define CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_EXYNOS +#define CONFIG_USB_STORAGE +#define CONFIG_CMD_DHCP +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX Thanks for your reply. It works after above configs added. It seems all configs which Suriyan specified are needed. Even though DHCP can be useless depending on the network situation. Sjoerd, How about add above configs for odroid_xu3.h? Also, I think it is better to commit this patch separately with my patchset, because it took too long from when the first patch submitted, and I really want to make it merged with at least minimum functionalities. Thanks - Suriyan Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v10 0/4] Adds support for Exynos5422 odroid xu3 board
Dear all, On Wed, 03 Dec 2014 09:31:44 -0800 Simon Glass s...@chromium.org wrote: On 3 December 2014 at 09:08, Przemyslaw Marczak p.marc...@samsung.com wrote: Hello, On 12/03/2014 05:28 PM, Simon Glass wrote: Hi, On 3 December 2014 at 05:46, Przemyslaw Marczak p.marc...@samsung.com wrote: Hello all, On 12/02/2014 08:07 AM, Hyungwon Hwang wrote: This is v10 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ v7: https://patchwork.ozlabs.org/patch/410204/ v8: https://patchwork.ozlabs.org/patch/410709/ v9: https://patchwork.ozlabs.org/patch/415514/ The patchset by Akshay Saraswat is already merged into u-boot-samsung. Please ignore the instruction about the additional patchset in v8. How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. Apply this patchset 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 5. Now you can use u-boot-dtb.bin for your downloading WARNING: (update in V10) It was impossible to make the u-boot image smaller than 335872 bytes, and also I did not want to waste my time to make it fit for that restriction, because the discussion about this issue is in progress in malining list. I used BL2 by Suriyan Ramasami suriya...@gmail.com which the restriction is removed for testing. If you need the BL2 for testing, please contact me or Suriyan. Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. Thanks for Sjoerd Simons. Not only did he comment my patchset, but he also made real patch for me. I squashed some part of that patchset, and included the remainings into my patchset. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove the first patch which change GPIO entries order. It became useless, after DT support is added - Remove useless variables in the default environment - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 - Remove the detailed information in the header file, and leave the reference to the documentation Changes for v10: - Move the non common configs in Exynos5420 config file to each board file - Remove the config unsets which are added to make the result image small This is needless now, because the image is not small enough even though these unsets are added. - Remove redundant DT node and properties - Remove the odroid-xu3 board file and make odroid-xu3 a variant of smdk5420 - Fix some errata in documentation - Include the patch by Sjoerd Simons as 4th patch Hyungwon Hwang (3): config: exynos5420: move
Re: [U-Boot] [PATCH v10 0/4] Adds support for Exynos5422 odroid xu3 board
Dear all, On Thu, 04 Dec 2014 10:27:04 +0900 Inha Song ideal.s...@samsung.com wrote: Hi All, In Tizen mainline u-boot, CONFIG_ENV_OFFSET have already been fixed to SZ_1K * 3136 from SZ_1K * 1280. It looks good to change CONFIG_ENV_OFFSET also in u-boot mainline to use the same offset with Tizen u-boot. How about your opinion? As I see the other boards' config files, there is no one principle to designate the environment offset, right? Then blk# 3136 seems reasonable for me. As Suriyan said, it must be bigger than blk# 2623. Can it be 256.5 Kbyte will be wasted, if blk# 3136 will be used for environment offset. Is it serious? If it is, I think blk# 2623 can be a good option for this. Best Regards, Inha Song. 2014년 12월 04일 01:15, Suriyan Ramasami 쓴 글: Hello all, On Wed, Dec 3, 2014 at 4:46 AM, Przemyslaw Marczak p.marc...@samsung.com wrote: Hello all, On 12/02/2014 08:07 AM, Hyungwon Hwang wrote: This is v10 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ v7: https://patchwork.ozlabs.org/patch/410204/ v8: https://patchwork.ozlabs.org/patch/410709/ v9: https://patchwork.ozlabs.org/patch/415514/ The patchset by Akshay Saraswat is already merged into u-boot-samsung. Please ignore the instruction about the additional patchset in v8. How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. Apply this patchset 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 5. Now you can use u-boot-dtb.bin for your downloading WARNING: (update in V10) It was impossible to make the u-boot image smaller than 335872 bytes, and also I did not want to waste my time to make it fit for that restriction, because the discussion about this issue is in progress in malining list. I used BL2 by Suriyan Ramasami suriya...@gmail.com which the restriction is removed for testing. If you need the BL2 for testing, please contact me or Suriyan. Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. Thanks for Sjoerd Simons. Not only did he comment my patchset, but he also made real patch for me. I squashed some part of that patchset, and included the remainings into my patchset. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove the first patch which change GPIO entries order. It became useless, after DT support is added - Remove useless variables in the default environment - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 - Remove the detailed information in the header file, and leave the reference to the documentation
Re: [U-Boot] [PATCH v9 1/2] Odroid-XU3: Add support for Odroid-XU3
On Mon, 01 Dec 2014 10:30:15 -0700 Simon Glass s...@chromium.org wrote: Hi, On 27 November 2014 at 06:21, Hyungwon Hwang human.hw...@samsung.com wrote: This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove useless variables in the default environment - Replace the detailed information to the reference to the documentation Great to see this series. I wanted to test it earlier but had problems with it not being reliable. I tracked this down to a uSD card (which works fine on other boards but boots reliably only to SPL on XU3). arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 +++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 +++ board/samsung/odroid-xu3/setup.h | 95 configs/odroid-xu3_defconfig | 4 + include/configs/odroid.h | 5 -- include/configs/odroid_xu3.h | 133 ++ 11 files changed, 443 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..16c9a0e 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 SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index e5846ea..a811b1b 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 Is it 5422 or 45800? Is there any difference really? Actually the processor in XU3 is Exynos5422. Exynos5800 is a variant of Exynos5422 for Chromebook. You can find the information about it from: http://www.samsung.com/global/business/semiconductor/minisite/Exynos/w/solution.html#?v=octa_5422 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 000..533d88e --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,57 @@ +/* + * Odroid XU3 device tree source
Re: [U-Boot] [PATCH 0/4] Odroid XU3 support additions
Dear Sjoerd, Thanks for this work. I think it is better to squash patch #1, #3, #4 into my patchs, because these patches remove the code which needlessly being added by my patches. I will include patch #2 also from next version. On Mon, 01 Dec 2014 13:34:16 +0100 Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: Hey Hyungwon, The following are some of the patches i had locally on top of your v9 Odroid. Feel free to merge them into your patchset (or squash them into your existing patches) if they look good to you. Sjoerd Simons (4): Odroid-XU3: Drop redundant fields Odroid-XU3: Add entry for DTS EHCI GPIO ODROID-XU3: Make odroid-xu3 an smdk5420 variant ODROID-XU3: drop overriding the boot environment arch/arm/cpu/armv7/exynos/Kconfig | 1 - arch/arm/dts/exynos5422-odroidxu3.dts | 16 ++--- board/samsung/odroid-xu3/Kconfig | 12 board/samsung/odroid-xu3/MAINTAINERS | 6 -- board/samsung/odroid-xu3/Makefile | 7 -- board/samsung/odroid-xu3/odroid-xu3.c | 122 -- board/samsung/odroid-xu3/setup.h | 95 -- board/samsung/smdk5420/Kconfig| 13 include/configs/odroid_xu3.h | 72 9 files changed, 17 insertions(+), 327 deletions(-) delete mode 100644 board/samsung/odroid-xu3/Kconfig delete mode 100644 board/samsung/odroid-xu3/MAINTAINERS delete mode 100644 board/samsung/odroid-xu3/Makefile delete mode 100644 board/samsung/odroid-xu3/odroid-xu3.c delete mode 100644 board/samsung/odroid-xu3/setup.h Best regards, Hyungwon Hwang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v10 1/4] 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 human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v10: - Newly added include/configs/exynos5420-common.h | 18 -- include/configs/peach-pi.h | 6 ++ include/configs/peach-pit.h | 6 ++ include/configs/smdk5420.h | 11 +++ 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index ef6e155..7322f33 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_BASE0x12D3 -#define FLASH_SIZE (0x4 20) -#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) -#define CONFIG_SPI_BOOTING - #include configs/exynos5-common.h #define CONFIG_ARCH_EARLY_INIT_R @@ -29,8 +22,6 @@ #define CONFIG_VAR_SIZE_SPL -#define CONFIG_SYS_SDRAM_BASE 0x2000 -#define CONFIG_SYS_TEXT_BASE 0x23E0 #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_BASE0x12D3 #define FLASH_SIZE (0x4 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include configs/exynos5420-common.h #include configs/exynos5-dt-common.h #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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_BASE0x12D3 #define FLASH_SIZE (0x4 20) #define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING #include configs/exynos5420-common.h #include configs/exynos5-dt-common.h #define CONFIG_BOARD_COMMON +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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..9742427 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -11,13 +11,24 @@ #include configs/exynos5420-common.h +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_SPI_FLASH +#define CONFIG_ENV_SPI_BASE0x12D3 +#define FLASH_SIZE (0x4 20) +#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) +#define CONFIG_SPI_BOOTING + #define CONFIG_BOARD_COMMON #define CONFIG_SMDK5420/* which is in a SMDK5420 */ +#define CONFIG_SYS_SDRAM_BASE 0x2000 +#define CONFIG_SYS_TEXT_BASE 0x23E0 +#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 -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v10 4/4] Odroid-XU3: Add entry for DTS EHCI GPIO
From: Sjoerd Simons sjoerd.sim...@collabora.co.uk 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). Note that this patch doesn't enable support for USB/USB networking in the default config as makes the u-boot binary too big for the current odroid setup. Signed-off-by: Sjoerd Simons sjoerd.sim...@collabora.co.uk Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v10: - Newly added arch/arm/dts/exynos5422-odroidxu3.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/exynos5422-odroidxu3.dts b/arch/arm/dts/exynos5422-odroidxu3.dts index cff32a9..be20f1b 100644 --- a/arch/arm/dts/exynos5422-odroidxu3.dts +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -31,6 +31,10 @@ 0xb000 0xea0; }; + ehci@1211 { + samsung,vbus-gpio = gpio 0x316 0; /* X26 */ + }; + serial@12C2 { status=okay; }; -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v10 0/4] Adds support for Exynos5422 odroid xu3 board
This is v10 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ v7: https://patchwork.ozlabs.org/patch/410204/ v8: https://patchwork.ozlabs.org/patch/410709/ v9: https://patchwork.ozlabs.org/patch/415514/ The patchset by Akshay Saraswat is already merged into u-boot-samsung. Please ignore the instruction about the additional patchset in v8. How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. Apply this patchset 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 5. Now you can use u-boot-dtb.bin for your downloading WARNING: (update in V10) It was impossible to make the u-boot image smaller than 335872 bytes, and also I did not want to waste my time to make it fit for that restriction, because the discussion about this issue is in progress in malining list. I used BL2 by Suriyan Ramasami suriya...@gmail.com which the restriction is removed for testing. If you need the BL2 for testing, please contact me or Suriyan. Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. Thanks for Sjoerd Simons. Not only did he comment my patchset, but he also made real patch for me. I squashed some part of that patchset, and included the remainings into my patchset. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove the first patch which change GPIO entries order. It became useless, after DT support is added - Remove useless variables in the default environment - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 - Remove the detailed information in the header file, and leave the reference to the documentation Changes for v10: - Move the non common configs in Exynos5420 config file to each board file - Remove the config unsets which are added to make the result image small This is needless now, because the image is not small enough even though these unsets are added. - Remove redundant DT node and properties - Remove the odroid-xu3 board file and make odroid-xu3 a variant of smdk5420 - Fix some errata in documentation - Include the patch by Sjoerd Simons as 4th patch Hyungwon Hwang (3): config: exynos5420: move non common configs to specific board files Odroid-XU3: Add support for Odroid-XU3 Odroid-XU3: Add documentation for Odroid-XU3 Sjoerd Simons (1): Odroid-XU3: Add entry for DTS EHCI GPIO arch/arm/cpu/armv7/exynos/Kconfig | 4 +++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 49 +++ board/samsung/smdk5420/Kconfig| 13 + configs/odroid-xu3_defconfig | 4 +++ doc/README.odroid | 46 ++--- include/configs/exynos5420-common.h | 18 include/configs/odroid_xu3.h
[U-Boot] [PATCH v10 3/4] 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 human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v6: - Newly added Changes for v7: - Fix several errata in the documentation Changes for v8: - None Changes for v9: - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 Changes for v10: - Fix a erratum doc/README.odroid | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/doc/README.odroid b/doc/README.odroid index 25b962b..2e8dd27 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=downloadvalue=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
[U-Boot] [PATCH v10 2/4] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com Cc: Sjoerd Simons sjoerd.sim...@collabora.co.uk Cc: Javier Martinez Canillas jav...@dowhile0.org Cc: Simon Glass s...@chromium.org --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove useless variables in the default environment - Replace the detailed information to the reference to the documentation Changes for v10: - Remove the config unsets which are added to make the result image small This is needless now, because the image is not small enough even though these unsets are added. - Remove redundant DT node and properties - Remove the odroid-xu3 board file and make odroid-xu3 a variant of smdk5420 arch/arm/cpu/armv7/exynos/Kconfig | 4 +++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 45 + board/samsung/smdk5420/Kconfig| 13 + configs/odroid-xu3_defconfig | 4 +++ include/configs/odroid_xu3.h | 54 +++ 6 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h 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 e5846ea..a811b1b 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 000..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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + fifoth_val = 0x201f0020; + }; + + mmc@1222 { + 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
[U-Boot] [PATCH v9 0/3] Adds support for Exynos5422 odroid xu3 board
This is v9 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ v7: https://patchwork.ozlabs.org/patch/410204/ v8: https://patchwork.ozlabs.org/patch/410709/ The patchset by Akshay Saraswat is already merged into u-boot-samsung. Please ignore the instruction about the additional patchset in v8. How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. Apply this patchset 3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 4. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 5. Now you can use u-boot-dtb.bin for your downloading WANRNING: The u-boot-dtb.bin must not be bigger than 335872 bytes. Depending on your compiler, it can be. Try another one if you get a problem. I use 'gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4)' on Ubuntu 64-bit machine. Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index cda4f26..b46ccad 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -110,15 +110,15 @@ run kernel_args; \ bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0 \ autoboot= \ - if test -e mmc 0 Image.itb; then; \ + if test -e mmc 1 Image.itb; then; \ run boot_fit; \ - elif test -e mmc 0 zImage; then; \ + elif test -e mmc 1 zImage; then; \ run boot_zimg; \ - elif test -e mmc 0 uImage; then; \ + elif test -e mmc 1 uImage; then; \ run boot_uimg; \ fi;\0 \ console= CONFIG_DEFAULT_CONSOLE \ - mmcbootdev=0\0 \ + mmcbootdev=1\0 \ mmcbootpart=1\0 \ mmcrootdev=0\0 \ mmcrootpart=2\0 \ Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove the first patch which change GPIO entries order. It became useless, after DT support is added - Remove useless variables in the default environment - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 - Remove the detailed information in the header file, and leave the reference to the documentation Hyungwon Hwang (2): Odroid-XU3: Add support for Odroid-XU3 Odroid-XU3: Add documentation for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 +++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 +++ board/samsung/odroid-xu3/setup.h | 95 configs/odroid-xu3_defconfig | 4 + doc
[U-Boot] [PATCH v9 1/2] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove useless variables in the default environment - Replace the detailed information to the reference to the documentation arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 +++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 +++ board/samsung/odroid-xu3/setup.h | 95 configs/odroid-xu3_defconfig | 4 + include/configs/odroid.h | 5 -- include/configs/odroid_xu3.h | 133 ++ 11 files changed, 443 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..16c9a0e 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 SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index e5846ea..a811b1b 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 000..533d88e --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,57 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2
[U-Boot] [PATCH v9 2/2] 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 human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v6: - Newly added Changes for v7: - Fix several errata in the documentation Changes for v8: - None Changes for v9: - Add the new contents to the documentation of Odroid X2/U2, instead of making new document for Odorid XU3 doc/README.odroid | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/doc/README.odroid b/doc/README.odroid index 25b962b..99693d4 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=downloadvalue=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
Re: [U-Boot] [PATCH v9 1/2] Odroid-XU3: Add support for Odroid-XU3
On Fri, 28 Nov 2014 00:16:15 +0900 Jaehoon Chung jh80.ch...@samsung.com wrote: On 11/27/2014 10:21 PM, Hyungwon Hwang wrote: This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Changes for v9: - Remove useless variables in the default environment - Replace the detailed information to the reference to the documentation arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 +++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 +++ board/samsung/odroid-xu3/setup.h | 95 configs/odroid-xu3_defconfig | 4 + include/configs/odroid.h | 5 -- include/configs/odroid_xu3.h | 133 ++ 11 files changed, 443 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..16c9a0e 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 SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index e5846ea..a811b1b 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 000..533d88e --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,57 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000
Re: [U-Boot] [PATCH v9 1/2] Odroid-XU3: Add support for Odroid-XU3
On Thu, 27 Nov 2014 22:45:18 +0100 Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: On Thu, 2014-11-27 at 22:21 +0900, Hyungwon Hwang wrote: This patch adds support for Odroid-XU3. I can't seem to access the EMMC with this patch, is that expected? Yes. EMMC is not supported yet. Actually even I did not test whether it works or not. EMMC support will be done soon. --- /dev/null +++ b/board/samsung/odroid-xu3/Kconfig @@ -0,0 +1,12 @@ +if TARGET_ODROID_XU3 + +config SYS_BOARD + default odroid-xu3 + +config SYS_VENDOR + default samsung + +config SYS_CONFIG_NAME + default odroid_xu3 + +endif I was studying the different between the peach-pi and the XU3 hardware enablement a bit. I was wondering whta's the rationale for the XU3 having it's own board file and reconfiguring various clocks? Does the hardkernel SPL/bl2 not setup things correctly? Hmm. It is my first time to make codes to add support for new board, and I am not sure what is right. Is it needless to set clocks for the cases when SPL/BL2 is expected to set clocks already? diff --git a/board/samsung/odroid-xu3/odroid-xu3.c b/board/samsung/odroid-xu3/odroid-xu3.c new file mode 100644 index 000..8c54842 --- /dev/null +++ b/board/samsung/odroid-xu3/odroid-xu3.c @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2014 Samsung Electronics + * Hyungwon Hwang human.hw...@samsung.com + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#include common.h +#include asm/arch/clock.h +#include setup.h + +DECLARE_GLOBAL_DATA_PTR; + +unsigned int get_board_rev(void) +{ + return 0; +} + +int exynos_init(void) +{ + return 0; +} + +#ifdef CONFIG_BOARD_EARLY_INIT_F +static int board_clock_init(void) +{ + unsigned int set, clr, clr_src_cpu, clr_pll_con0; + struct exynos5420_clock *clk = (struct exynos5420_clock *) + samsung_get_base_clock(); + /* +* CMU_CPU clocks src to MPLL +* Bit values: 0 ; 1 +* MUX_APLL_SEL:FIN_PLL ; FOUT_APLL +* MUX_CORE_SEL:MOUT_APLL ; SCLK_MPLL +* MUX_HPM_SEL: MOUT_APLL ; SCLK_MPLL_USER_C +* MUX_MPLL_USER_SEL_C: FIN_PLL ; SCLK_MPLL + */ + + /* Set CMU_CPU clocks src to OSCCLK */ + clr_src_cpu = MUX_APLL_SEL(1) | MUX_CORE_SEL(1); + set = MUX_APLL_SEL(0) | MUX_CORE_SEL(1); + + clrsetbits_le32(clk-src_cpu, clr_src_cpu, set); + + while (MUX_STAT_CPU_CHANGING(readl(clk-mux_stat_cpu))) + continue; + + /* Set APLL to 1200MHz */ + clr_pll_con0 = SDIV(7) | PDIV(63) | MDIV(1023) | FSEL(1) | + PLL_ENABLE(1); + set = SDIV(0) | PDIV(2) | MDIV(100) | PLL_ENABLE(1); + + clrsetbits_le32(clk-apll_con0, clr_pll_con0, set); + + while (!(readl(clk-apll_con0) PLL_LOCKED_BIT)) + continue; + + /* Set CMU_CPU clocks src to APLL */ + set = MUX_APLL_SEL(1) | MUX_CORE_SEL(0); + clrsetbits_le32(clk-src_cpu, clr_src_cpu, set); + + while (MUX_STAT_CPU_CHANGING(readl(clk-mux_stat_cpu))) + continue; + + clr = ARM_RATIO(7) | CPUD_RATIO(7) | ATB_RATIO(7) | + PCLK_DBG_RATIO(7) | APLL_RATIO(7) | ARM2_RATIO(7); + set = ARM_RATIO(0) | CPUD_RATIO(2) | ATB_RATIO(5) | + PCLK_DBG_RATIO(5) | APLL_RATIO(0) | ARM2_RATIO(0); + + clrsetbits_le32(clk-div_cpu0, clr, set); + + while (readl(clk-div_stat_cpu0) DIV_STAT_CPU0_CHANGING) + continue; + + /* Set MPLL to 800MHz */ + set = SDIV(1) | PDIV(3) | MDIV(200) | PLL_ENABLE(1); + + clrsetbits_le32(clk-mpll_con0, clr_pll_con0, set); + + while (!(readl(clk-mpll_con0) PLL_LOCKED_BIT)) + continue; + + /* Set CLKMUX_UART src to MPLL */ + clr = UART0_SEL(7) | UART1_SEL(7) | UART2_SEL(7) | UART3_SEL(7); + set = UART0_SEL(3) | UART1_SEL(3) | UART2_SEL(3) | UART3_SEL(3); + + clrsetbits_le32(clk-src_peric0, clr, set); + + /* Set SCLK_UART to 400 MHz (MPLL / 2) */ + clr = UART0_RATIO(15) | UART1_RATIO(15) | UART2_RATIO(15) | + UART3_RATIO(15); + set = UART0_RATIO(1) | UART1_RATIO(1) | UART2_RATIO(1) | + UART3_RATIO(1); + + clrsetbits_le32(clk-div_peric0, clr, set); + + while (readl(clk-div_stat_peric0) DIV_STAT_PERIC0_CHANGING) + continue; + + /* Set CLKMUX_MMC src to MPLL */ + clr = MUX_MMC0_SEL(7) | MUX_MMC1_SEL(7) | MUX_MMC2_SEL(7); + set = MUX_MMC0_SEL(3) | MUX_MMC1_SEL(3) | MUX_MMC2_SEL(3); + + clrsetbits_le32(clk-src_fsys, clr, set); + + clr = MMC0_RATIO(0x3ff) | MMC1_RATIO(0x3ff) | MMC2_RATIO(0x3ff); + set = MMC0_RATIO(0) | MMC1_RATIO(0) | MMC2_RATIO(0); + + clrsetbits_le32(clk-div_fsys1, clr, set); + + /* Wait for divider ready status */ + while (readl(clk-div_stat_fsys1) DIV_STAT_FSYS1_CHANGING) + continue; + + return 0; +} + +int exynos_early_init_f(void
Re: [U-Boot] [PATCH v9 2/2] Odroid-XU3: Add documentation for Odroid-XU3
On Thu, 27 Nov 2014 15:33:05 +0100 Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: On Thu, 2014-11-27 at 22:21 +0900, Hyungwon Hwang wrote: 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. 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) | - Where the previous values incorrect? Also this doesn't seem to match the hardkerel script which has: This boot media layout is for x2/u3. I will update it in next version. But the env offset is #define CONFIG_ENV_OFFSET (SZ_1K * 1280) /* 1.25 MiB offset */ as you can see in odroid.h and odroid_xu3.h. CONFIG_ENV_OFFSET / 512 = 2560, not 2500. signed_bl1_position=1 bl2_position=31 uboot_position=63 tzsw_position=719 env_position=1231 for the various locations.. Which also explains the limit 335872 bytes in your initial mail.. Awkward one though. Wonder if that's an SoC issue or something hardkernel could fix by having a different bl1/bl2? (719 - 63) * 512 = 335876 bytes. The limitation is needed not to overwrite tzsw. Are you saying that the limitation can be removed? Yes, with different bl1/bl2. But I do not think that another bl1/bl2 will be released to relieve the limitation. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v9 1/2] Odroid-XU3: Add support for Odroid-XU3
On Thu, 27 Nov 2014 17:35:05 +0100 Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote: Would be nice if config_distro_defaults.h config_distro_bootcmd.h could be used instead an odroid XU3 specific default environment settings.. You have the peach-pi board. Right? Does it boot without typing something to boot linux kernel withour modification? I explored the source code, but could not find the point where makes the peach-pi board boot automatically with the configuration. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 2/3] Odroid-XU3: Add support for Odroid-XU3
Dear Jaehoon Chung, On Thu, 20 Nov 2014 21:08:30 +0900 Jaehoon Chung jh80.ch...@samsung.com wrote: Hi, CPU:Exynos5800@1200MHz Board: Odroid XU3 based on EXYNOS5422 Exynos5800? is it right? Exynos5800 is a variant of Exynos5422 for chromebook, so they are almost same. The support for this SOC is merged earlier than Exynos5422. At that time, they used 5800 as its name instead of 5422. It does not make any difference in behavior, at least until now. On 11/14/2014 03:25 PM, Hyungwon Hwang wrote: This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 ++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 board/samsung/odroid-xu3/setup.h | 95 ++ configs/odroid-xu3_defconfig | 4 + include/configs/odroid_xu3.h | 144 ++ 10 files changed, 454 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..16c9a0e 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 SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2b9bd93..d984f34 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..533d88e --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,57 @@ +/* + * 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@12C0; + console = /serial@12C2
Re: [U-Boot] [PATCH v8 2/3] Odroid-XU3: Add support for Odroid-XU3
Dear Przemyslaw Marczak, +/* + * FIXME: The number of bank is actually 8. But there is no way to reserver the + * last 16 Mib in the last bank now. So I just excluded the last bank + * temporally. + */ It's not prober solution, since non-dt kernel could get wrong DRAM size. Please look at board/samsung/odroid/odroid.c - into function exynos_init(). The Odroid U3 has reserved the last 1MB of the last DRAM bank. I agree. It is a temporary solution, and it must be fixed soon. I see the exynos_init() function and adapt the method to fix the problem in Odroid XU3. But it did not work. Figuring out what is wrong, I found that the 2 lines of code in the exynos_init() to reserve the last 1MB does not affect the behavior of Odroid U3. Even after I commented out the codes, it works well. Is it a effective solution to reserve the memory? Is there anything else which I am missing? I really appreciate for your comment. Thanks. Best regards, Hyungwon Hwang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 1/3] exynos5: fix GPIO information of exynos5420
Thanks for your reviews. I did not know that the code from Simon Glass is merged. I will remove this patch will be removed from the next version. Thanks. Best regards, Hyungwon Hwang On Mon, 17 Nov 2014 10:51:21 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: Hello, Hyungwon, please check my last changes added to those files: - arch/arm/include/asm/arch-exynos/gpio.h (Exynos4x12 gpio enum and exynos4x12_gpio_data.) - arch/arm/include/asm/arch-exynos/cpu.h (Exynos4x12 gpio base sub parts) There was an issue with gaps between some of gpio banks, so I added sub parts definition and it was adequate to *pinctrl.dts and *pinctrl-uboot.dts description. First problem is, that device-tree description has some specified order - and this is the init order (and next real gpio numbering order). So if we have dts nodes like this: - pinctrl@1340 { } - pinctrl@1341 { } - pinctrl@1400 { } - ... then it means, that gpio init should start from base 1340 - which is gpy70 tor the E5422... But there is one thing, which should be taken into account - #include exynos54xx-pinctrl-uboot.dtsi, and actually the included file [...]uboot.dts, will define the gpio init order as: - pinctrl@1401 - gpa00, gpa10, ..., gph00 - pinctrl@1340 - gpy70, gpx00, ..., gpx30 (gpx0-reg=0xc00) - pinctrl@1341 - gpc00, ..., gpy60 - pinctrl@1400 - gpe00, ..., gpj40 - pinctrl@0386 - gpz00 So, the above gpioXX bind order, should be equal to the enum exynos5420_gpio_pin { }. This is important, because if you type: ODROID-XU3 # gpio toggle gpy00 then you will get the a result: gpio: pin gpy00 (gpio 160) value is 0 Take a notice that gpy00 == gpio 160, but you defined it as 0 in your enum! So any call to the gpio inside the code, like this one: gpio_set_value(EXYNOS5420_GPIO_Y70, 0); like the pinmux do - will pass wrong gpio number to the function. And if you are lucky - some gpio numbers could work fine:) On 11/17/2014 08:45 AM, Simon Glass wrote: Hi Hyungwon, On 14 November 2014 06:25, Hyungwon Hwang human.hw...@samsung.com wrote: This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v4: - None Changes for v5: - None Changes for v6: - None Changes for v7: - None Changes for v8: - None arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 29674ad..48936de 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -148,7 +148,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -170,11 +170,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 9699954..aef897d 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1042,83 +1042,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ Why does this order need to change? I think you might be trying to remove the device tree work-around that we currently have. See arch/arm/dts/exynos54xx-pinctrl-uboot.dtsi: /* * Replicate the ordering of arch/arm/include/asm/arch-exynos/gpio.h * TODO(s...@chromium.org): This ordering ceases to matter
Re: [U-Boot] [PATCH v8 3/3] Odroid-XU3: Add documentation for Odroid-XU3
Dear Marczak, On Mon, 17 Nov 2014 10:58:21 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: Hello Hyungwon, Now we will have some ambiguous naming: doc/README.odroid and doc/README.odroid-xu3 Please update the first name to Odroid U3 or make it as a common for both Odroids, since the documentation you add is at most word by word the same - maybe better is to add U3 and XU3 sections. I agree that mering two files would be better. I will do that in next version. Thanks. Best regards, Hyungwon Hwang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v8 2/3] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 ++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 board/samsung/odroid-xu3/setup.h | 95 ++ configs/odroid-xu3_defconfig | 4 + include/configs/odroid_xu3.h | 144 ++ 10 files changed, 454 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..16c9a0e 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 SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2b9bd93..d984f34 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..533d88e --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,57 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + fifoth_val = 0x200f0020
[U-Boot] [PATCH v8 0/3] Adds support for Exynos5422 odroid xu3 board
This is v8 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ v7: https://patchwork.ozlabs.org/patch/410204/ This patchset fixes GPIO information of Exynos5420 which is needed to support Exynos5422 Odroid XU3 board. On the base of the fixes, this patchset adds support for Exynos5422 Odroid XU3 board. I have done this work on the master branch in http://git.denx.de/u-boot-samsung.git (sha1: 26f195c71252e98aebfffd5cfa994a4475559370) with patches by Akshay Saraswat. link: https://patchwork.ozlabs.org/patch/405246/ (updated) How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. git reset --hard 26f195c71252e98aebfffd5cfa994a4475559370 3. Get and apply the patchset of Akshay Saraswat https://patchwork.ozlabs.org/patch/405246/ https://patchwork.ozlabs.org/patch/405247/ https://patchwork.ozlabs.org/patch/405248/ https://patchwork.ozlabs.org/patch/405249/ https://patchwork.ozlabs.org/patch/405250/ https://patchwork.ozlabs.org/patch/405251/ https://patchwork.ozlabs.org/patch/405252/ 4. Apply this patchset 5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 6. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 7. Now you can use u-boot-dtb.bin for your downloading Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index cda4f26..b46ccad 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -110,15 +110,15 @@ run kernel_args; \ bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0 \ autoboot= \ - if test -e mmc 0 Image.itb; then; \ + if test -e mmc 1 Image.itb; then; \ run boot_fit; \ - elif test -e mmc 0 zImage; then; \ + elif test -e mmc 1 zImage; then; \ run boot_zimg; \ - elif test -e mmc 0 uImage; then; \ + elif test -e mmc 1 uImage; then; \ run boot_uimg; \ fi;\0 \ console= CONFIG_DEFAULT_CONSOLE \ - mmcbootdev=0\0 \ + mmcbootdev=1\0 \ mmcbootpart=1\0 \ mmcrootdev=0\0 \ mmcrootpart=2\0 \ Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Changes for v8: - Remove unnecessary properties in DT mmc node Hyungwon Hwang (3): exynos5: fix GPIO information of exynos5420 Odroid-XU3: Add support for Odroid-XU3 Odroid-XU3: Add documentation for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 5 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 57 arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3
[U-Boot] [PATCH v8 3/3] 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 human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v6: - Newly added Changes for v7: - Fix several errata in the documentation Changes for v8: - None doc/README.odroid-xu3 | 134 ++ 1 file changed, 134 insertions(+) create mode 100644 doc/README.odroid-xu3 diff --git a/doc/README.odroid-xu3 b/doc/README.odroid-xu3 new file mode 100644 index 000..7171435 --- /dev/null +++ b/doc/README.odroid-xu3 @@ -0,0 +1,134 @@ + U-boot for Odroid XU3 + + +1. Summary +== +This is a quick instruction for setup Odroid boards based on Exynos5422. +Exynos5422 is almost the same with Exynos5800 which is a variant of Exynos5422 +for Chromebook. + +Board config: odroid-xu3_config + +2. Supported devices + +This U-BOOT config can be used on the board: +- Odroid XU3 +with CPU Exynos 5422 and 2GB of RAM + +3. Boot sequence + +iROM-BL1-(BL2 + TrustZone)-U-BOOT + +To boot up, this version of U-BOOT needs BL1, BL2, and TrustZone binary. +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. +The block offset is starting from 0 and the block size is 512B. + - +| Binary | Block offset| part type | +| name| SD | eMMC |(eMMC only)| + - +| Bl1 | 1| 0| 1 (boot) | +| Bl2 | 31 | 30 | 1 (boot) | +| U-boot| 63 | 62 | 1 (boot) | +| Tzsw | 2111 | 2110 | 1 (boot) | +| 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. +The files from the link in point 3. +- bl1.bin.hardkernel +- bl2.bin.hardkernel +- tzsw.bin.hardkernel +- u-boot.bin.hardkernel + +This is all you need to boot this board. You can write the binaries to SD card +just by executing sd_fusing.sh. You cannot use this script to write binaries to +eMMC card.It is valid only for SD card. + +*note +You cannot access the eMMC protected part (the first 8MB roughly) using an +ordinary eMMC reader. + +*note: +If you build u-boot by yourself, you will find u-boot.bin and u-boot-dtb.bin +as the build result. You have to use u-boot-dtb.bin instead of u-boot.bin. + +quick steps for Linux: +- Download all files from the link at point 3. +- 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) +Check if Hardkernel U-boot is booting, and next do the same with your U-boot. + +6. Prepare the eMMC boot card + 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 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 +according to the table from point 4. Be sure that you are working on the right +eMMC partition - its size is usually very small, about 1-4 MiB. + +7. Prepare the eMMC boot card + with a SD card reader (boot from SD card slot) += +If you have an eMMC-microSD adapter you can prepare the card as in point 5. +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 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) +- on the host, run command: fastboot flash bootloader u-boot-dtb.bin +- the custom U-boot should start after the board resets. + +9. Partition layout + +Default U-boot environment is setup for fixed partition layout. + +Partition table: MSDOS. Disk layout and files as listed in the table below. + - -- -- -- - +| Num | Name | FS | Size | Offset | Reguired files
[U-Boot] [PATCH v8 1/3] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v4: - None Changes for v5: - None Changes for v6: - None Changes for v7: - None Changes for v8: - None arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 29674ad..48936de 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -148,7 +148,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -170,11 +170,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 9699954..aef897d 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1042,83 +1042,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1126,10 +1050,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75
[U-Boot] [PATCH v7 0/3] Adds support for Exynos5422 odroid xu3 board
This is v7 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ v6: https://patchwork.ozlabs.org/patch/408647/ This patchset fixes GPIO information of Exynos5420 which is needed to support Exynos5422 Odroid XU3 board. On the base of the fixes, this patchset adds support for Exynos5422 Odroid XU3 board. I have done this work on the master branch in http://git.denx.de/u-boot-samsung.git (sha1: 26f195c71252e98aebfffd5cfa994a4475559370) with patches by Akshay Saraswat. link: https://patchwork.ozlabs.org/patch/405246/ (updated) How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. git reset --hard 26f195c71252e98aebfffd5cfa994a4475559370 3. Get and apply the patchset of Akshay Saraswat https://patchwork.ozlabs.org/patch/405246/ https://patchwork.ozlabs.org/patch/405247/ https://patchwork.ozlabs.org/patch/405248/ https://patchwork.ozlabs.org/patch/405249/ https://patchwork.ozlabs.org/patch/405250/ https://patchwork.ozlabs.org/patch/405251/ https://patchwork.ozlabs.org/patch/405252/ 4. Apply this patchset 5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 6. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 7. Now you can use u-boot-dtb.bin for your downloading Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index cda4f26..b46ccad 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -110,15 +110,15 @@ run kernel_args; \ bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0 \ autoboot= \ - if test -e mmc 0 Image.itb; then; \ + if test -e mmc 1 Image.itb; then; \ run boot_fit; \ - elif test -e mmc 0 zImage; then; \ + elif test -e mmc 1 zImage; then; \ run boot_zimg; \ - elif test -e mmc 0 uImage; then; \ + elif test -e mmc 1 uImage; then; \ run boot_uimg; \ fi;\0 \ console= CONFIG_DEFAULT_CONSOLE \ - mmcbootdev=0\0 \ + mmcbootdev=1\0 \ mmcbootpart=1\0 \ mmcrootdev=0\0 \ mmcrootpart=2\0 \ Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Fix several errata in the documentation - Remove OF_CONTROL dependency from !SPL_BUILD Hyungwon Hwang (3): exynos5: fix GPIO information of exynos5420 Odroid-XU3: Add support for Odroid-XU3 Odroid-XU3: Add documentation for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 5 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 + arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3/MAINTAINERS| 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 122
[U-Boot] [PATCH v7 3/3] 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 human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v6: - Newly added Changes for v7: - Fix several errata in the documentation doc/README.odroid-xu3 | 134 ++ 1 file changed, 134 insertions(+) create mode 100644 doc/README.odroid-xu3 diff --git a/doc/README.odroid-xu3 b/doc/README.odroid-xu3 new file mode 100644 index 000..7171435 --- /dev/null +++ b/doc/README.odroid-xu3 @@ -0,0 +1,134 @@ + U-boot for Odroid XU3 + + +1. Summary +== +This is a quick instruction for setup Odroid boards based on Exynos5422. +Exynos5422 is almost the same with Exynos5800 which is a variant of Exynos5422 +for Chromebook. + +Board config: odroid-xu3_config + +2. Supported devices + +This U-BOOT config can be used on the board: +- Odroid XU3 +with CPU Exynos 5422 and 2GB of RAM + +3. Boot sequence + +iROM-BL1-(BL2 + TrustZone)-U-BOOT + +To boot up, this version of U-BOOT needs BL1, BL2, and TrustZone binary. +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. +The block offset is starting from 0 and the block size is 512B. + - +| Binary | Block offset| part type | +| name| SD | eMMC |(eMMC only)| + - +| Bl1 | 1| 0| 1 (boot) | +| Bl2 | 31 | 30 | 1 (boot) | +| U-boot| 63 | 62 | 1 (boot) | +| Tzsw | 2111 | 2110 | 1 (boot) | +| 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. +The files from the link in point 3. +- bl1.bin.hardkernel +- bl2.bin.hardkernel +- tzsw.bin.hardkernel +- u-boot.bin.hardkernel + +This is all you need to boot this board. You can write the binaries to SD card +just by executing sd_fusing.sh. You cannot use this script to write binaries to +eMMC card.It is valid only for SD card. + +*note +You cannot access the eMMC protected part (the first 8MB roughly) using an +ordinary eMMC reader. + +*note: +If you build u-boot by yourself, you will find u-boot.bin and u-boot-dtb.bin +as the build result. You have to use u-boot-dtb.bin instead of u-boot.bin. + +quick steps for Linux: +- Download all files from the link at point 3. +- 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) +Check if Hardkernel U-boot is booting, and next do the same with your U-boot. + +6. Prepare the eMMC boot card + 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 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 +according to the table from point 4. Be sure that you are working on the right +eMMC partition - its size is usually very small, about 1-4 MiB. + +7. Prepare the eMMC boot card + with a SD card reader (boot from SD card slot) += +If you have an eMMC-microSD adapter you can prepare the card as in point 5. +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 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) +- on the host, run command: fastboot flash bootloader u-boot-dtb.bin +- the custom U-boot should start after the board resets. + +9. Partition layout + +Default U-boot environment is setup for fixed partition layout. + +Partition table: MSDOS. Disk layout and files as listed in the table below. + - -- -- -- - +| Num | Name | FS | Size | Offset | Reguired files
[U-Boot] [PATCH v7 1/3] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v4: - None Changes for v5: - None Changes for v6: - None Changes for v7: - None arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 29674ad..48936de 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -148,7 +148,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -170,11 +170,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 9699954..aef897d 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1042,83 +1042,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1126,10 +1050,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76
[U-Boot] [PATCH v7 2/3] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Tested-by: Lukasz Majewski l.majew...@samsung.com Acked-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Changes for v7: - Remove OF_CONTROL dependency from !SPL_BUILD arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 ++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 board/samsung/odroid-xu3/setup.h | 95 ++ configs/odroid-xu3_defconfig | 4 + include/configs/odroid_xu3.h | 144 ++ 10 files changed, 457 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..16c9a0e 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 SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2b9bd93..d984f34 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..52199d9 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,60 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + fifoth_val = 0x200f0020
Re: [U-Boot] [PATCH v6 0/3] Adds support for Exynos5422 odroid xu3 board
Dear Minkyu Kang, On Tue, 11 Nov 2014 21:53:35 +0900 Minkyu Kang proms...@gmail.com wrote: On 10 November 2014 10:41, Hyungwon Hwang human.hw...@samsung.com wrote: This is v6 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ This patchset fixes GPIO information of Exynos5420 which is needed to support Exynos5422 Odroid XU3 board. On the base of the fixes, this patchset adds support for Exynos5422 Odroid XU3 board. I have done this work on the master branch in http://git.denx.de/u-boot-samsung.git (sha1: 26f195c71252e98aebfffd5cfa994a4475559370) with patches by Akshay Saraswat. link: https://patchwork.ozlabs.org/patch/405246/ (updated) How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. git reset --hard 26f195c71252e98aebfffd5cfa994a4475559370 3. Get and apply the patchset of Akshay Saraswat https://patchwork.ozlabs.org/patch/405246/ https://patchwork.ozlabs.org/patch/405247/ https://patchwork.ozlabs.org/patch/405248/ https://patchwork.ozlabs.org/patch/405249/ https://patchwork.ozlabs.org/patch/405250/ https://patchwork.ozlabs.org/patch/405251/ https://patchwork.ozlabs.org/patch/405252/ 4. Apply this patchset 5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 6. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 7. Now you can use u-boot-dtb.bin for your downloading Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index cda4f26..b46ccad 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -110,15 +110,15 @@ run kernel_args; \ bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0 \ autoboot= \ - if test -e mmc 0 Image.itb; then; \ + if test -e mmc 1 Image.itb; then; \ run boot_fit; \ - elif test -e mmc 0 zImage; then; \ + elif test -e mmc 1 zImage; then; \ run boot_zimg; \ - elif test -e mmc 0 uImage; then; \ + elif test -e mmc 1 uImage; then; \ run boot_uimg; \ fi;\0 \ console= CONFIG_DEFAULT_CONSOLE \ - mmcbootdev=0\0 \ + mmcbootdev=1\0 \ mmcbootpart=1\0 \ mmcrootdev=0\0 \ mmcrootpart=2\0 \ I think you can make it selectable as env value. How you think? We can use ${mmcbootdev} to select the boot media simply with small changes. But the problem is in CONFIG_SYS_MMC_ENV_DEV. Even though we can change the bootable media through ${mmcbootdev}, we cannot save this environment to MMC or SD card, and have to set the variable again after reboot. So I think that this should be solved in another way. Thanks, Minkyu Kang. Best regards, Hyungwon Hwang -- Hyungwon Hwang S/W Platform Team, Software Center Samsung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 3/3] 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 human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v6: - Newly added doc/README.odroid-xu3 | 134 ++ 1 file changed, 134 insertions(+) create mode 100644 doc/README.odroid-xu3 diff --git a/doc/README.odroid-xu3 b/doc/README.odroid-xu3 new file mode 100644 index 000..8e1f333 --- /dev/null +++ b/doc/README.odroid-xu3 @@ -0,0 +1,134 @@ + U-boot for Odroid XU3 + + +1. Summary +== +This is a quick instruction for setup Odroid boards based on Exynos5422. +Exynos5422 is almost same with Exynos5800 which is a variant of Exynos5422 for +Chromebook. + +Board config: odroid-xu3_config + +2. Supported devices + +This U-BOOT config can be used on the board: +- Odroid XU3 +with CPU Exynos 5422 and 2GB of RAM + +3. Boot sequence + +iROM-BL1-(BL2 + TrustZone)-U-BOOT + +To boot up, this version of U-BOOT needs BL1, BL2, and TrustZone binary. +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. +The block offset is starting from 0 and the block size is 512B. + - +| Binary | Block offset| part type | +| name| SD | eMMC |(eMMC only)| + - +| Bl1 | 1| 0| 1 (boot) | +| Bl2 | 31 | 30 | 1 (boot) | +| U-boot| 63 | 62 | 1 (boot) | +| Tzsw | 2111 | 2110 | 1 (boot) | +| Uboot Env | 2500 | 2500 | 0 (user) | + - + +5. Prepare the SD boot card - with SD card reader += +To prepare bootable media you need boot binaries provided by hardkernel. +The files from the link in point 3. +- bl1.bin.hardkernel +- bl2.bin.hardkernel +- tzsw.bin.hardkernel +- u-boot.bin.hardkernel + +This is all you need to boot this board. You can write the binaries to SD card +just by executiog sd_fusing.sh. You cannot use this script to write binaries to +eMMC card.It is valid only for SD card. + +*note +You cannot access the eMMC protected part (the first 8MB roughly) using an +ordinary eMMC reader. + +*note: +If you build u-boot by yourself, you will find u-boot.bin and u-boot-dtb.bin +as the build result. You have to use u-boot-dtb.bin instead of u-boot.bin. + +quick steps for Linux: +- Download all files from the link at point 3. +- 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) +Check if Hardkernel U-boot is booting, and next do the same with your U-boot. + +6. Prepare the eMMC boot card + 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 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 +according to the table from point 4. Be sure that you are working on the right +eMMC partition - its size is usually very small, about 1-4 MiB. + +7. Prepare the eMMC boot card + with a SD card reader (boot from SD card slot) += +If you have an eMMC-microSD adapter you can prepare the card as in point 5. +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: +- install the android fastboot tool +- connect a micro usb cable to the board +- on the U-boot prompt, run command: fastboot (as a root) +- on the host, run command: fastboot flash bootloader u-boot-dtb.bin +- the custom U-boot should start after the board resets. + +9. Partition layout + +Default U-boot environment is setup for fixed partition layout. + +Partition table: MSDOS. Disk layout and files as listed in the table below. + - -- -- -- - +| Num | Name | FS | Size | Offset | Reguired files | +| | | Type | MiB | MiB | | + - -- -- -- - +| 1 | BOOT | fat | 100 | 2
[U-Boot] [PATCH v6 0/3] Adds support for Exynos5422 odroid xu3 board
This is v6 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ v5: https://patchwork.ozlabs.org/patch/407941/ This patchset fixes GPIO information of Exynos5420 which is needed to support Exynos5422 Odroid XU3 board. On the base of the fixes, this patchset adds support for Exynos5422 Odroid XU3 board. I have done this work on the master branch in http://git.denx.de/u-boot-samsung.git (sha1: 26f195c71252e98aebfffd5cfa994a4475559370) with patches by Akshay Saraswat. link: https://patchwork.ozlabs.org/patch/405246/ (updated) How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. git reset --hard 26f195c71252e98aebfffd5cfa994a4475559370 3. Get and apply the patchset of Akshay Saraswat https://patchwork.ozlabs.org/patch/405246/ https://patchwork.ozlabs.org/patch/405247/ https://patchwork.ozlabs.org/patch/405248/ https://patchwork.ozlabs.org/patch/405249/ https://patchwork.ozlabs.org/patch/405250/ https://patchwork.ozlabs.org/patch/405251/ https://patchwork.ozlabs.org/patch/405252/ 4. Apply this patchset 5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 6. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 7. Now you can use u-boot-dtb.bin for your downloading Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index cda4f26..b46ccad 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -110,15 +110,15 @@ run kernel_args; \ bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0 \ autoboot= \ - if test -e mmc 0 Image.itb; then; \ + if test -e mmc 1 Image.itb; then; \ run boot_fit; \ - elif test -e mmc 0 zImage; then; \ + elif test -e mmc 1 zImage; then; \ run boot_zimg; \ - elif test -e mmc 0 uImage; then; \ + elif test -e mmc 1 uImage; then; \ run boot_uimg; \ fi;\0 \ console= CONFIG_DEFAULT_CONSOLE \ - mmcbootdev=0\0 \ + mmcbootdev=1\0 \ mmcbootpart=1\0 \ mmcrootdev=0\0 \ mmcrootpart=2\0 \ Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Chagnes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusuib from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined Hyungwon Hwang (3): exynos5: fix GPIO information of exynos5420 Odroid-XU3: Add support for Odroid-XU3 Odroid-XU3: Add documentation for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 5 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 + arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3/MAINTAINERS| 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 122 + board/samsung/odroid-xu3/setup.h| 95 + configs/odroid-xu3_defconfig| 4 + doc/README.odroid-xu3
[U-Boot] [PATCH v6 1/3] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v4: - None Changes for v5: - None Changes for v6: - None arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 29674ad..48936de 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -148,7 +148,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -170,11 +170,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 9699954..aef897d 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1042,83 +1042,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1126,10 +1050,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76, EXYNOS5420_GPIO_Y77, - - /* GPIO PART 3 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50
[U-Boot] [PATCH v6 2/3] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file Changes for v6: - Separate out the documentation to new commit - Remove unnecessary header file inclusions from the board-specific setup file - Make the function board_clock_init be declared, only when CONFIG_BOARD_EARLY_INIT_F is defined arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 ++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 122 board/samsung/odroid-xu3/setup.h | 95 ++ configs/odroid-xu3_defconfig | 4 + include/configs/odroid_xu3.h | 144 ++ 10 files changed, 457 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..8fe530c 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 if !SPL_BUILD + config TARGET_ARNDALE bool Exynos5250 Arndale board select SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2b9bd93..d984f34 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..52199d9 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,60 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + fifoth_val = 0x200f0020; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4
[U-Boot] [PATCH v4 0/2] Adds support for Exynos5422 odroid xu3 board
This is v4 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html This patchset fixes GPIO information of Exynos5420 which is needed to support Exynos5422 Odroid XU3 board. On the base of the fixes, this patchset adds support for Exynos5422 Odroid XU3 board. I have done this work on the master branch in http://git.denx.de/u-boot-samsung.git with patches by Akshay Saraswat. link: https://patchwork.ozlabs.org/patch/400043/ Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Hyungwon Hwang (2): exynos5: fix GPIO information of exynos5420 Odroid-XU3: Add support for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 5 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 + arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3/MAINTAINERS| 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 131 ++ board/samsung/odroid-xu3/setup.h| 95 + configs/odroid-xu3_defconfig| 4 + doc/README.odroid-xu3 | 134 ++ include/configs/odroid_xu3.h| 144 13 files changed, 717 insertions(+), 127 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 doc/README.odroid-xu3 create mode 100644 include/configs/odroid_xu3.h -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/2] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v4: - None arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 7c5c4ff..da4ac6b 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -139,7 +139,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -161,11 +161,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 32e045a..431ae3a 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1028,83 +1028,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1112,10 +1036,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76, EXYNOS5420_GPIO_Y77, - - /* GPIO PART 3 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */ - EXYNOS5420_GPIO_X00 = EXYNOS5420_GPIO_MAX_PORT_PART_2
[U-Boot] [PATCH v4 2/2] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 ++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 131 +++ board/samsung/odroid-xu3/setup.h | 95 ++ configs/odroid-xu3_defconfig | 4 + doc/README.odroid-xu3 | 134 +++ include/configs/odroid_xu3.h | 144 ++ 11 files changed, 600 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 doc/README.odroid-xu3 create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 3a25fee..d0530f0 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -22,6 +22,10 @@ config TARGET_TRATS2 config TARGET_ODROID bool Exynos4412 Odroid board +config TARGET_ODROID_XU3 + bool Exynos5422 Odroid board + select OF_CONTROL if !SPL_BUILD + config TARGET_ARNDALE bool Exynos5250 Arndale board select OF_CONTROL if !SPL_BUILD @@ -60,6 +64,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2dcfcc0..66191f9 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..21c0023 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,60 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + fifoth_val = 0x200f0020; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3; + samsung,removable = 1
[U-Boot] [PATCH v5 0/2] Adds support for Exynos5422 odroid xu3 board
This is v5 of the patchset adding support Odroud XU3 board. link to the previous version: v2: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html v3: https://www.mail-archive.com/u-boot%40lists.denx.de/msg152677.html v4: https://patchwork.ozlabs.org/patch/407411/ This patchset fixes GPIO information of Exynos5420 which is needed to support Exynos5422 Odroid XU3 board. On the base of the fixes, this patchset adds support for Exynos5422 Odroid XU3 board. I have done this work on the master branch in http://git.denx.de/u-boot-samsung.git (sha1: 26f195c71252e98aebfffd5cfa994a4475559370) with patches by Akshay Saraswat. link: https://patchwork.ozlabs.org/patch/405246/ (updated) How to test this patch: 1. git clone http://git.denx.de/u-boot-samsung.git 2. git reset --hard 26f195c71252e98aebfffd5cfa994a4475559370 3. Get and apply the patchset of Akshay Saraswat https://patchwork.ozlabs.org/patch/405246/ https://patchwork.ozlabs.org/patch/405247/ https://patchwork.ozlabs.org/patch/405248/ https://patchwork.ozlabs.org/patch/405249/ https://patchwork.ozlabs.org/patch/405250/ https://patchwork.ozlabs.org/patch/405251/ https://patchwork.ozlabs.org/patch/405252/ 4. Apply this patchset 5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- odroid-xu3_config 6. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8 7. Now you can use u-boot-dtb.bin for your downloading Note: If you use micro SD card for your test you have to apply the below patch additionally. This patch is needed, because micro sd card is recognized as MMC1 instead of MMC0. Additional work is needed to make it work regardless of device id. diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index ba591e7..437eaae 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MONITOR_BASE0x -#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SECURE_BL1_ONLY diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index cda4f26..b46ccad 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -110,15 +110,15 @@ run kernel_args; \ bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0 \ autoboot= \ - if test -e mmc 0 Image.itb; then; \ + if test -e mmc 1 Image.itb; then; \ run boot_fit; \ - elif test -e mmc 0 zImage; then; \ + elif test -e mmc 1 zImage; then; \ run boot_zimg; \ - elif test -e mmc 0 uImage; then; \ + elif test -e mmc 1 uImage; then; \ run boot_uimg; \ fi;\0 \ console= CONFIG_DEFAULT_CONSOLE \ - mmcbootdev=0\0 \ + mmcbootdev=1\0 \ mmcbootpart=1\0 \ mmcrootdev=0\0 \ mmcrootpart=2\0 \ Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Add the specific build instruction - Update the information of patchset by Akshay Saraswat - Convert /include/ to #include in DT file Hyungwon Hwang (2): exynos5: fix GPIO information of exynos5420 Odroid-XU3: Add support for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 5 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 + arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3/MAINTAINERS| 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 131 ++ board/samsung/odroid-xu3/setup.h| 95 + configs/odroid-xu3_defconfig| 4 + doc/README.odroid-xu3 | 134 ++ include/configs/odroid_xu3.h| 144 13 files changed, 717 insertions(+), 127 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS
[U-Boot] [PATCH v5 1/2] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v4: - None Changes for v5: - None arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 29674ad..48936de 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -148,7 +148,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -170,11 +170,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 9699954..aef897d 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1042,83 +1042,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1126,10 +1050,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76, EXYNOS5420_GPIO_Y77, - - /* GPIO PART 3 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */ - EXYNOS5420_GPIO_X00
[U-Boot] [PATCH v5 2/2] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments Changes for v4: - Add MMC FIFO buffer's configuration to DT file - Make CONFIG_OF_CONTROL be set by the target information - Add basic document to doc/README.odroid-xu3 - Add CONFIG_CMD_EXT4 to config file - Add environment size and offset to config file - Add extra default environment to make bootable without modification - Remove unnecessary features from config file Changes for v5: - Convert /include/ to #include in DT file arch/arm/cpu/armv7/exynos/Kconfig | 5 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 60 ++ board/samsung/odroid-xu3/Kconfig | 12 +++ board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 131 +++ board/samsung/odroid-xu3/setup.h | 95 ++ configs/odroid-xu3_defconfig | 4 + doc/README.odroid-xu3 | 134 +++ include/configs/odroid_xu3.h | 144 ++ 11 files changed, 600 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 doc/README.odroid-xu3 create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 13dbd95..8fe530c 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 if !SPL_BUILD + config TARGET_ARNDALE bool Exynos5250 Arndale board select SUPPORT_SPL @@ -65,6 +69,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2b9bd93..d984f34 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..52199d9 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,60 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + fifoth_val = 0x200f0020; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3
Re: [U-Boot] [PATCH v3 2/2] Odroid-XU3: Add support for Odroid-XU3
Dear Lukasz Majewski, On Wed, 05 Nov 2014 11:29:53 +0100 Lukasz Majewski l.majew...@samsung.com wrote: +#undef CONFIG_EXYNOS_SPL +#undef CONFIG_SILENT_CONSOLE +#undef CONFIG_CROS_EC +#undef CONFIG_CROS_EC_SPI +#undef CONFIG_CROS_EC_I2C +#undef CONFIG_CROS_EC_KEYB +#undef CONFIG_CMD_CROS_EC +#undef CONFIG_KEYBOARD +#undef CONFIG_SPI_BOOTING +#undef CONFIG_ENV_IS_IN_SPI_FLASH +#undef CONFIG_SPI_FLASH +#undef CONFIG_EXYNOS_SPI +#undef CONFIG_CMD_SF +#undef CONFIG_CMD_SPI +#undef CONFIG_SPI_FLASH_WINBOND +#undef CONFIG_SPI_FLASH_GIGADEVICE +#undef CONFIG_OF_SPI +#undef CONFIG_FIT_BEST_MATCH +#undef CONFIG_USB_BOOTING +#undef CONFIG_CMD_NET +#undef CONFIG_SMC911X +#undef CONFIG_CMD_PXE +#undef CONFIG_MENU +#undef CONFIG_ENV_IS_IN_SPI_FLASH Cannot we just remove those CONFIG_* , instead of using #undef? We can remove all of them without harm or at least no error in operation except for CONFIG_CMD_NET. Some boards including chromebook uses common config file with Odroid XU3. I don't know whether they need ethernet driver for their work or not. I have no device. Will it be good to remove the config from exynos5-common.h and add them to the config file which inherit exynos5-common.h? Best regards, Hyungwon Hwang -- Hyungwon Hwang S/W Platform Team, Software Center Samsung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/2] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 7c5c4ff..da4ac6b 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -139,7 +139,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -161,11 +161,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 32e045a..431ae3a 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1028,83 +1028,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1112,10 +1036,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76, EXYNOS5420_GPIO_Y77, - - /* GPIO PART 3 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */ - EXYNOS5420_GPIO_X00 = EXYNOS5420_GPIO_MAX_PORT_PART_2, + EXYNOS5420_GPIO_X00
[U-Boot] [PATCH v3 2/2] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com Cc: Lukasz Majewski l.majew...@samsung.com --- Changes for v3: - Remove unnecessary node from DT file - Remove unnecessary features from config file - Remove unnecessary macros from board-specific header file - Fix some trivial typos in comments arch/arm/cpu/armv7/exynos/Kconfig | 4 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 58 +++ board/samsung/odroid-xu3/Kconfig | 12 board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 131 ++ board/samsung/odroid-xu3/setup.h | 95 configs/odroid-xu3_defconfig | 4 ++ include/configs/odroid_xu3.h | 74 +++ 10 files changed, 393 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 3a25fee..a47cb34 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -22,6 +22,9 @@ config TARGET_TRATS2 config TARGET_ODROID bool Exynos4412 Odroid board +config TARGET_ODROID_XU3 + bool Exynos5422 Odroid board + config TARGET_ARNDALE bool Exynos5250 Arndale board select OF_CONTROL if !SPL_BUILD @@ -60,6 +63,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2dcfcc0..66191f9 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..2cca27b --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,58 @@ +/* + * 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@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3; + samsung,removable = 1; + }; + + mmc@1223 { + status = disabled; + }; +}; diff --git a/board/samsung/odroid-xu3/Kconfig b/board/samsung/odroid-xu3/Kconfig new file mode 100644 index 000..6159692 --- /dev/null +++ b/board/samsung/odroid-xu3/Kconfig @@ -0,0 +1,12 @@ +if TARGET_ODROID_XU3 + +config SYS_BOARD + default odroid-xu3 + +config SYS_VENDOR + default samsung + +config SYS_CONFIG_NAME + default odroid_xu3 + +endif diff --git a/board/samsung/odroid-xu3/MAINTAINERS b/board/samsung/odroid-xu3/MAINTAINERS new file mode 100644 index 000..50cf928 --- /dev/null +++ b/board/samsung/odroid-xu3/MAINTAINERS
[U-Boot] [PATCH v3 0/2] Adds support for Exynos5422 odroid xu3 board
This is v3 of the patchset adding support Odroud XU3 board. link to the previous version: https://www.mail-archive.com/u-boot@lists.denx.de/msg152275.html This patchset fixes GPIO information of Exynos5420 which is needed to support Exynos5422 Odroid XU3 board. On the base of the fixes, this patchset adds support for Exynos5422 Odroid XU3 board. I have done this work on the patchset submitted by Akshay Saraswat. link: https://patchwork.ozlabs.org/patch/400043/ Changes for v2: - Add a patch to add new common setup header file for Odroid X2/U3 and Odroid XU3 Changes for v3: - Remove the patch which adds new common setup header file from v2 - Remove the wrong patch to fix GPIO information of Exynos 5800 - Remove unnecessary node from DT file - Remove unnecessary features from config file - Fix some trivial typos in comments Hyungwon Hwang (2): exynos5: fix GPIO information of exynos5420 Odroid-XU3: Add support for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 4 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 58 arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3/MAINTAINERS| 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 131 ++ board/samsung/odroid-xu3/setup.h| 95 + configs/odroid-xu3_defconfig| 4 + include/configs/odroid_xu3.h| 74 ++ 12 files changed, 510 insertions(+), 127 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] Exynos5800: Add support for Exynos5800
Dear Lukasz, On Mon, 03 Nov 2014 09:34:12 +0100 Lukasz Majewski l.majew...@samsung.com wrote: Hi Hyungwon, The gpios of Exynos5800 are different from that of Exynos5420. This patch adds the gpio information and table of Exynos5800. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/gpio.h | 31 +-- drivers/gpio/s5p_gpio.c | 4 +++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 431ae3a..8f82ef0 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1368,11 +1368,21 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = { { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT }, }; +#define EXYNOS5800_GPIO_NUM_PARTS 4 +static struct gpio_info exynos5800_gpio_data[EXYNOS5800_GPIO_NUM_PARTS] = { + { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 }, + { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 }, + { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 }, + { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 }, +}; + static inline struct gpio_info *get_gpio_data(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return exynos5420_gpio_data; + else if (proid_is_exynos5800()) + return exynos5800_gpio_data; else return exynos5_gpio_data; } else if (cpu_is_exynos4()) { @@ -1388,8 +1398,10 @@ static inline struct gpio_info *get_gpio_data(void) static inline unsigned int get_bank_num(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return EXYNOS5420_GPIO_NUM_PARTS; + if (proid_is_exynos5800()) + return EXYNOS5800_GPIO_NUM_PARTS; I'm just wondering if Exynos5800 and Exynos5420 are not GPIO compatible? Yes. You're right. I thought I miss the last page of GPIO specification of Exynos5800. This patch will be removed from Version 3. else return EXYNOS5_GPIO_NUM_PARTS; } else if (cpu_is_exynos4()) { @@ -1493,6 +1505,21 @@ static const struct gpio_name_num_table exynos5420_gpio_table[] = { { 0 } }; +static const struct gpio_name_num_table exynos5800_gpio_table[] = { + GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0), + GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0), + GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 0), + GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0), + GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0), + GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0), + GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0), + GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_A00, 0), + GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0), + GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0), + GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Z0, 0), + { 0 } +}; + void gpio_cfg_pin(int gpio, int cfg); void gpio_set_pull(int gpio, int mode); void gpio_set_drv(int gpio, int mode); diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index bcf44eb..bed7cd7 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -57,11 +57,13 @@ static inline int s5p_name_to_gpio(const char *name) */ #if defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) { + if (proid_is_exynos5420()) { tabp = exynos5420_gpio_table; irregular_bank_name = 'y'; irregular_set_number = '7'; irregular_bank_base = EXYNOS5420_GPIO_Y70; + } else if (proid_is_exynos5800()) { + tabp = exynos5800_gpio_table; } else { tabp = exynos5_gpio_table; irregular_bank_name = 'c'; Best regards, Hyungwon Hwang -- Hyungwon Hwang S/W Platform Team, Software Center Samsung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] odroid: make some macros common
On Mon, 03 Nov 2014 09:51:25 +0100 Lukasz Majewski l.majew...@samsung.com wrote: Hi Hyungwon, Some macros are used commonly for odroid series boards. This patch makes a common header file to congregate that kinds of macros. Even though there are more macros which can be common, they are not become common. Because they are a part of a register, the readability is better when they are defined at a place. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- board/samsung/odroid/odroid.c | 1 + board/samsung/odroid/setup.h | 8 2 files changed, 1 insertion(+), 8 deletions(-) I suspect that you have not added the new file to git repository - since you only removed lines from board/samsung/odroid/setup.h I also guess that odroid U3 will not build anymore. That is a very good use case for buildman script. Oh. It is my mistake. I will include the common header in next version. diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index 5edb250..ccbb3a0 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -18,6 +18,7 @@ #include usb.h #include usb/s3c_udc.h #include samsung/misc.h +#include ../setup.h Relative path is not a good idea IMHO. It would be better to place it at ./include/samsung/ with a self explanatory name (like exynos4-pll.h or/and exynos4-{other excluded defines for an IP blocks}). In this way other boards could use those defines too. I think that your idea is better than mine. #include setup.h DECLARE_GLOBAL_DATA_PTR; diff --git a/board/samsung/odroid/setup.h b/board/samsung/odroid/setup.h index 3e48dad..35f7af5 100644 --- a/board/samsung/odroid/setup.h +++ b/board/samsung/odroid/setup.h @@ -8,14 +8,6 @@ #ifndef __ODROIDU3_SETUP__ #define __ODROIDU3_SETUP__ -/* A/M PLL_CON0 */ -#define SDIV(x) ((x) 0x7) -#define PDIV(x) (((x) 0x3f) 8) -#define MDIV(x) (((x) 0x3ff) 16) -#define FSEL(x) (((x) 0x1) 27) -#define PLL_LOCKED_BIT (0x1 29) -#define PLL_ENABLE(x) (((x) 0x1) 31) - The above data is common for Exynos U3 and XU3, but is it the only one? Aren't there any more defines to be extracted? /* CLK_SRC_CPU */ #define MUX_APLL_SEL(x) ((x) 0x1) #define MUX_CORE_SEL(x) (((x) 0x1) 16) You're right. I found some other common macros more now. I will reflect it in next version. But I have a doubt about MUX_APLL_SEL or something else which consist of a register with different macros in different processors. They can be extracted to common file. But is it good to do it? For example, MUX_APLL_SEL exists both in Exynos4 and Exynos5's CLK_SRC_CPU. Exynos 4412 /* CLK_SRC_CPU */ #define MUX_APLL_SEL(x) ((x) 0x1) #define MUX_CORE_SEL(x) (((x) 0x1) 16) Exynos 5800 /* CLK_SRC_CPU */ #define MUX_APLL_SEL(x) ((x) 0x1) #define MUX_CORE_SEL(x) (((x) 0x1) #define MUX_HPM_SEL(x) (((x) 0x1) 20) #define MUX_MPLL_USER_SEL_C(x) (((x) 0x1) 24) If MUX_APLL_SEL and MUX_CORE_SEL are extracted to the common file, it will be harder to see what consist of CLK_SRC_CPU at a glance. Isn't it? This situation is worse in the case of APLL_RATIO. (Please see the below.) I want to hear your opinion about it. Exynos 4412 /* CLK_DIV_CPU0 */ #define ARM_RATIO(x) ((x) 0x7) #define CPUD_RATIO(x) (((x) 0x7) 4) #define ATB_RATIO(x) (((x) 0x7) 16) #define PCLK_DBG_RATIO(x) (((x) 0x7) 20) #define APLL_RATIO(x) (((x) 0x7) 24) #define ARM2_RATIO(x) (((x) 0x7) 28) Exynos 5800 /* CLK_DIV_CPU0 */ #define CORE_RATIO(x) ((x) 0x7) #define COREM0_RATIO(x) (((x) 0x7) 4) #define COREM1_RATIO(x) (((x) 0x7) 8) #define PERIPH_RATIO(x) (((x) 0x7) 12) #define ATB_RATIO(x)(((x) 0x7) 16) #define PCLK_DBG_RATIO(x) (((x) 0x7) 20) #define APLL_RATIO(x) (((x) 0x7) 24) #define CORE2_RATIO(x) (((x) 0x7) 28) Thanks. Best regards, Hyungwon Hwang -- Hyungwon Hwang S/W Platform Team, Software Center Samsung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] Exynos5800: Add support for Exynos5800
Dear Jaehoon Chung, On Tue, 04 Nov 2014 13:56:00 +0900 Jaehoon Chung jh80.ch...@samsung.com wrote: On 10/31/2014 09:08 PM, Hyungwon Hwang wrote: The gpios of Exynos5800 are different from that of Exynos5420. This patch adds the gpio information and table of Exynos5800. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/gpio.h | 31 +-- drivers/gpio/s5p_gpio.c | 4 +++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 431ae3a..8f82ef0 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1368,11 +1368,21 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = { { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT }, }; +#define EXYNOS5800_GPIO_NUM_PARTS 4 +static struct gpio_info exynos5800_gpio_data[EXYNOS5800_GPIO_NUM_PARTS] = { + { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 }, + { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 }, + { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 }, + { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 }, you refer to other gpio_data. You mentioned different from that of exynos5420, but used EXYNOS5420_GPIO_XXX. It's strange. You're right. This patch is wrong. This one will be removed from next version. +}; + static inline struct gpio_info *get_gpio_data(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return exynos5420_gpio_data; + else if (proid_is_exynos5800()) + return exynos5800_gpio_data; else return exynos5_gpio_data; } else if (cpu_is_exynos4()) { @@ -1388,8 +1398,10 @@ static inline struct gpio_info *get_gpio_data(void) static inline unsigned int get_bank_num(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return EXYNOS5420_GPIO_NUM_PARTS; + if (proid_is_exynos5800()) else if (prod_is_exynos5800()) Best Regard, Jaehoon Chung + return EXYNOS5800_GPIO_NUM_PARTS; else return EXYNOS5_GPIO_NUM_PARTS; } else if (cpu_is_exynos4()) { @@ -1493,6 +1505,21 @@ static const struct gpio_name_num_table exynos5420_gpio_table[] = { { 0 } }; +static const struct gpio_name_num_table exynos5800_gpio_table[] = { + GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0), + GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0), + GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 0), + GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0), + GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0), + GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0), + GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0), + GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_A00, 0), + GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0), + GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0), + GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Z0, 0), + { 0 } +}; + void gpio_cfg_pin(int gpio, int cfg); void gpio_set_pull(int gpio, int mode); void gpio_set_drv(int gpio, int mode); diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index bcf44eb..bed7cd7 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -57,11 +57,13 @@ static inline int s5p_name_to_gpio(const char *name) */ #if defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) { + if (proid_is_exynos5420()) { tabp = exynos5420_gpio_table; irregular_bank_name = 'y'; irregular_set_number = '7'; irregular_bank_base = EXYNOS5420_GPIO_Y70; + } else if (proid_is_exynos5800()) { + tabp = exynos5800_gpio_table; } else { tabp = exynos5_gpio_table; irregular_bank_name = 'c'; Best regards, Hyungwon Hwang -- Hyungwon Hwang S/W Platform Team, Software Center Samsung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] exynos5: fix GPIO information of exynos5420
Dear Jaehoon Chung, On Tue, 04 Nov 2014 13:51:04 +0900 Jaehoon Chung jh80.ch...@samsung.com wrote: On 10/31/2014 09:08 PM, Hyungwon Hwang wrote: This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 7c5c4ff..da4ac6b 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -139,7 +139,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -161,11 +161,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B What's wrong? It's sorted from A to Z.(GPA ~ GPZ) As I analyzed the code (gpio_set_value() in drivers/gpio/s5p_gpio.c) the GPIO must not be sorted by alphabetically, but be done by the address of them. Isn't it? Best Regards, Jaehoon Chung diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 32e045a..431ae3a 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1028,83 +1028,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1112,10 +1036,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76
[U-Boot] [PATCH 3/3] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Change-Id: Ia45d119a62b126f2328684485b8c372ba6acbe00 Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/cpu/armv7/exynos/Kconfig | 4 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 72 ++ board/samsung/odroid-xu3/Kconfig | 12 ++ board/samsung/odroid-xu3/MAINTAINERS | 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 132 ++ board/samsung/odroid-xu3/setup.h | 123 + configs/odroid-xu3_defconfig | 4 + include/configs/odroid_xu3.h | 243 ++ 10 files changed, 605 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 3a25fee..a47cb34 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -22,6 +22,9 @@ config TARGET_TRATS2 config TARGET_ODROID bool Exynos4412 Odroid board +config TARGET_ODROID_XU3 + bool Exynos5422 Odroid board + config TARGET_ARNDALE bool Exynos5250 Arndale board select OF_CONTROL if !SPL_BUILD @@ -60,6 +63,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2dcfcc0..66191f9 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..34f52c6 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,72 @@ +/* + * 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; + + config { + hwid = smdk5420 TEST A-A 9382; + }; + + aliases { + serial0 = /serial@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + /* s2mps11 is on i2c bus 4 */ + i2c@12ca { + #address-cells = 1; + #size-cells = 0; + pmic@66 { + reg = 0x66; + compatible = samsung,s2mps11-pmic; + }; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3; + samsung,removable = 1; + }; + + mmc@1223 { + status = disabled; + }; +}; diff --git a/board/samsung/odroid-xu3/Kconfig b/board/samsung/odroid-xu3/Kconfig new file mode 100644 index 000..6159692 --- /dev/null +++ b/board/samsung/odroid-xu3/Kconfig @@ -0,0 +1,12 @@ +if TARGET_ODROID_XU3 + +config SYS_BOARD + default odroid-xu3 + +config SYS_VENDOR + default samsung + +config SYS_CONFIG_NAME + default odroid_xu3 + +endif diff --git a/board/samsung/odroid-xu3/MAINTAINERS b/board/samsung/odroid-xu3/MAINTAINERS new file mode 100644
[U-Boot] [PATCH 1/3] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. I have done this work on the patchset submitted by Akshay Saraswat. https://patchwork.ozlabs.org/patch/400043/ Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 7c5c4ff..da4ac6b 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -139,7 +139,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -161,11 +161,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 32e045a..431ae3a 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1028,83 +1028,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1112,10 +1036,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76, EXYNOS5420_GPIO_Y77, - - /* GPIO PART 3 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */ - EXYNOS5420_GPIO_X00 = EXYNOS5420_GPIO_MAX_PORT_PART_2
[U-Boot] [PATCH 2/3] Exynos5800: Add support for Exynos5800
The gpios of Exynos5800 are different from that of Exynos5420. This patch adds the gpio information and table of Exynos5800. Change-Id: Ic609973ab531e2b6ee9a68cfec0b6b9571f203a8 Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/gpio.h | 31 +-- drivers/gpio/s5p_gpio.c | 4 +++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 431ae3a..8f82ef0 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1368,11 +1368,21 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = { { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT }, }; +#define EXYNOS5800_GPIO_NUM_PARTS 4 +static struct gpio_info exynos5800_gpio_data[EXYNOS5800_GPIO_NUM_PARTS] = { + { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 }, + { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 }, + { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 }, + { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 }, +}; + static inline struct gpio_info *get_gpio_data(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return exynos5420_gpio_data; + else if (proid_is_exynos5800()) + return exynos5800_gpio_data; else return exynos5_gpio_data; } else if (cpu_is_exynos4()) { @@ -1388,8 +1398,10 @@ static inline struct gpio_info *get_gpio_data(void) static inline unsigned int get_bank_num(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return EXYNOS5420_GPIO_NUM_PARTS; + if (proid_is_exynos5800()) + return EXYNOS5800_GPIO_NUM_PARTS; else return EXYNOS5_GPIO_NUM_PARTS; } else if (cpu_is_exynos4()) { @@ -1493,6 +1505,21 @@ static const struct gpio_name_num_table exynos5420_gpio_table[] = { { 0 } }; +static const struct gpio_name_num_table exynos5800_gpio_table[] = { + GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0), + GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0), + GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 0), + GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0), + GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0), + GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0), + GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0), + GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_A00, 0), + GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0), + GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0), + GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Z0, 0), + { 0 } +}; + void gpio_cfg_pin(int gpio, int cfg); void gpio_set_pull(int gpio, int mode); void gpio_set_drv(int gpio, int mode); diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index bcf44eb..bed7cd7 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -57,11 +57,13 @@ static inline int s5p_name_to_gpio(const char *name) */ #if defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) { + if (proid_is_exynos5420()) { tabp = exynos5420_gpio_table; irregular_bank_name = 'y'; irregular_set_number = '7'; irregular_bank_base = EXYNOS5420_GPIO_Y70; + } else if (proid_is_exynos5800()) { + tabp = exynos5800_gpio_table; } else { tabp = exynos5_gpio_table; irregular_bank_name = 'c'; -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] Exynos5422: Add support for Exynos5422
Hi, On Fri, 31 Oct 2014 10:08:34 +0100 Lukasz Majewski l.majew...@samsung.com wrote: Hi Hyungwon, This patch adds support for Exynos5422 including GPIO, clock, pinmux, and cpu id. Change-Id: Ic609973ab531e2b6ee9a68cfec0b6b9571f203a8 Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/gpio.h | 31 +-- drivers/gpio/s5p_gpio.c | 4 +++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 431ae3a..8f82ef0 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1368,11 +1368,21 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = { { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT }, }; +#define EXYNOS5800_GPIO_NUM_PARTS 4 +static struct gpio_info exynos5800_gpio_data[EXYNOS5800_GPIO_NUM_PARTS] = { + { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 }, + { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 }, + { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 }, + { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 }, +}; + static inline struct gpio_info *get_gpio_data(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return exynos5420_gpio_data; + else if (proid_is_exynos5800()) + return exynos5800_gpio_data; else return exynos5_gpio_data; } else if (cpu_is_exynos4()) { @@ -1388,8 +1398,10 @@ static inline struct gpio_info *get_gpio_data(void) static inline unsigned int get_bank_num(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return EXYNOS5420_GPIO_NUM_PARTS; + if (proid_is_exynos5800()) + return EXYNOS5800_GPIO_NUM_PARTS; else return EXYNOS5_GPIO_NUM_PARTS; } else if (cpu_is_exynos4()) { @@ -1493,6 +1505,21 @@ static const struct gpio_name_num_table exynos5420_gpio_table[] = { { 0 } }; +static const struct gpio_name_num_table exynos5800_gpio_table[] = { + GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0), + GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0), + GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 0), + GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0), + GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0), + GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0), + GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0), + GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_A00, 0), + GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0), + GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0), + GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Z0, 0), + { 0 } +}; + void gpio_cfg_pin(int gpio, int cfg); void gpio_set_pull(int gpio, int mode); void gpio_set_drv(int gpio, int mode); diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index bcf44eb..bed7cd7 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -57,11 +57,13 @@ static inline int s5p_name_to_gpio(const char *name) */ #if defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) { + if (proid_is_exynos5420()) { tabp = exynos5420_gpio_table; irregular_bank_name = 'y'; irregular_set_number = '7'; irregular_bank_base = EXYNOS5420_GPIO_Y70; + } else if (proid_is_exynos5800()) { + tabp = exynos5800_gpio_table; } else { tabp = exynos5_gpio_table; irregular_bank_name = 'c'; I'm a bit confused here. We already support exynos5420 in the mainline. It only slightly differs from Exynos5422. Additionally there is Exynos5800 which is a different HW revision of Exynos5422. Yes. You're right. I was not in the subscriber list when I send this mail. So when I sent this mail, I received an auto-replied mail which I can cancel this email. I canceled this mail. But the mail sent to your and Minkyu Kang was not. Sorry for the confusion. Please refer the latest mail. In the message topic you stated that you add support for Exynos5422. Maybe we could use Exynos5800 name also for Exynos5422 (with a big, fat note about those two chips compliance added to ./doc directory)? @ Akshay, Minkyu: What do you
[U-Boot] [PATCH 0/4] Adds support for Exynos5422 odroid xu3 board
This patchset adds support for Exynos5422 odroid xu3 board. I have done this work on the patchset submitted by Akshay Saraswat. https://patchwork.ozlabs.org/patch/400043/ Hyungwon Hwang (4): exynos5: fix GPIO information of exynos5420 Exynos5800: Add support for Exynos5800 odroid: make some macros common Odroid-XU3: Add support for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 4 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 72 + arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 261 +--- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3/MAINTAINERS| 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 132 board/samsung/odroid-xu3/setup.h| 115 ++ board/samsung/odroid/odroid.c | 1 + board/samsung/odroid/setup.h| 8 - configs/odroid-xu3_defconfig| 4 + drivers/gpio/s5p_gpio.c | 4 +- include/configs/odroid_xu3.h| 73 + 15 files changed, 576 insertions(+), 137 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] odroid: make some macros common
Some macros are used commonly for odroid series boards. This patch makes a common header file to congregate that kinds of macros. Even though there are more macros which can be common, they are not become common. Because they are a part of a register, the readability is better when they are defined at a place. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- board/samsung/odroid/odroid.c | 1 + board/samsung/odroid/setup.h | 8 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index 5edb250..ccbb3a0 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -18,6 +18,7 @@ #include usb.h #include usb/s3c_udc.h #include samsung/misc.h +#include ../setup.h #include setup.h DECLARE_GLOBAL_DATA_PTR; diff --git a/board/samsung/odroid/setup.h b/board/samsung/odroid/setup.h index 3e48dad..35f7af5 100644 --- a/board/samsung/odroid/setup.h +++ b/board/samsung/odroid/setup.h @@ -8,14 +8,6 @@ #ifndef __ODROIDU3_SETUP__ #define __ODROIDU3_SETUP__ -/* A/M PLL_CON0 */ -#define SDIV(x) ((x) 0x7) -#define PDIV(x) (((x) 0x3f) 8) -#define MDIV(x) (((x) 0x3ff) 16) -#define FSEL(x) (((x) 0x1) 27) -#define PLL_LOCKED_BIT (0x1 29) -#define PLL_ENABLE(x) (((x) 0x1) 31) - /* CLK_SRC_CPU */ #define MUX_APLL_SEL(x) ((x) 0x1) #define MUX_CORE_SEL(x) (((x) 0x1) 16) -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 7c5c4ff..da4ac6b 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -139,7 +139,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -161,11 +161,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 32e045a..431ae3a 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1028,83 +1028,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1112,10 +1036,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76, EXYNOS5420_GPIO_Y77, - - /* GPIO PART 3 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */ - EXYNOS5420_GPIO_X00 = EXYNOS5420_GPIO_MAX_PORT_PART_2, + EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_X01, EXYNOS5420_GPIO_X02, EXYNOS5420_GPIO_X03
[U-Boot] [PATCH 2/4] Exynos5800: Add support for Exynos5800
The gpios of Exynos5800 are different from that of Exynos5420. This patch adds the gpio information and table of Exynos5800. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/gpio.h | 31 +-- drivers/gpio/s5p_gpio.c | 4 +++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 431ae3a..8f82ef0 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1368,11 +1368,21 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = { { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT }, }; +#define EXYNOS5800_GPIO_NUM_PARTS 4 +static struct gpio_info exynos5800_gpio_data[EXYNOS5800_GPIO_NUM_PARTS] = { + { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 }, + { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 }, + { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 }, + { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 }, +}; + static inline struct gpio_info *get_gpio_data(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return exynos5420_gpio_data; + else if (proid_is_exynos5800()) + return exynos5800_gpio_data; else return exynos5_gpio_data; } else if (cpu_is_exynos4()) { @@ -1388,8 +1398,10 @@ static inline struct gpio_info *get_gpio_data(void) static inline unsigned int get_bank_num(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return EXYNOS5420_GPIO_NUM_PARTS; + if (proid_is_exynos5800()) + return EXYNOS5800_GPIO_NUM_PARTS; else return EXYNOS5_GPIO_NUM_PARTS; } else if (cpu_is_exynos4()) { @@ -1493,6 +1505,21 @@ static const struct gpio_name_num_table exynos5420_gpio_table[] = { { 0 } }; +static const struct gpio_name_num_table exynos5800_gpio_table[] = { + GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0), + GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0), + GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 0), + GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0), + GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0), + GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0), + GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0), + GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_A00, 0), + GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0), + GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0), + GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Z0, 0), + { 0 } +}; + void gpio_cfg_pin(int gpio, int cfg); void gpio_set_pull(int gpio, int mode); void gpio_set_drv(int gpio, int mode); diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index bcf44eb..bed7cd7 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -57,11 +57,13 @@ static inline int s5p_name_to_gpio(const char *name) */ #if defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) { + if (proid_is_exynos5420()) { tabp = exynos5420_gpio_table; irregular_bank_name = 'y'; irregular_set_number = '7'; irregular_bank_base = EXYNOS5420_GPIO_Y70; + } else if (proid_is_exynos5800()) { + tabp = exynos5800_gpio_table; } else { tabp = exynos5_gpio_table; irregular_bank_name = 'c'; -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/cpu/armv7/exynos/Kconfig | 4 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 72 +++ board/samsung/odroid-xu3/Kconfig | 12 board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 132 ++ board/samsung/odroid-xu3/setup.h | 115 + configs/odroid-xu3_defconfig | 4 ++ include/configs/odroid_xu3.h | 73 +++ 10 files changed, 427 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 3a25fee..a47cb34 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -22,6 +22,9 @@ config TARGET_TRATS2 config TARGET_ODROID bool Exynos4412 Odroid board +config TARGET_ODROID_XU3 + bool Exynos5422 Odroid board + config TARGET_ARNDALE bool Exynos5250 Arndale board select OF_CONTROL if !SPL_BUILD @@ -60,6 +63,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2dcfcc0..66191f9 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..34f52c6 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,72 @@ +/* + * 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; + + config { + hwid = smdk5420 TEST A-A 9382; + }; + + aliases { + serial0 = /serial@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + /* s2mps11 is on i2c bus 4 */ + i2c@12ca { + #address-cells = 1; + #size-cells = 0; + pmic@66 { + reg = 0x66; + compatible = samsung,s2mps11-pmic; + }; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3; + samsung,removable = 1; + }; + + mmc@1223 { + status = disabled; + }; +}; diff --git a/board/samsung/odroid-xu3/Kconfig b/board/samsung/odroid-xu3/Kconfig new file mode 100644 index 000..6159692 --- /dev/null +++ b/board/samsung/odroid-xu3/Kconfig @@ -0,0 +1,12 @@ +if TARGET_ODROID_XU3 + +config SYS_BOARD + default odroid-xu3 + +config SYS_VENDOR + default samsung + +config SYS_CONFIG_NAME + default odroid_xu3 + +endif diff --git a/board/samsung/odroid-xu3/MAINTAINERS b/board/samsung/odroid-xu3/MAINTAINERS new file mode 100644 index 000..50cf928
[U-Boot] [PATCH v2 0/4] Adds support for Exynos5422 odroid xu3 board
This patchset adds support for Exynos5422 odroid xu3 board. I have done this work on the patchset submitted by Akshay Saraswat. https://patchwork.ozlabs.org/patch/400043/ Hyungwon Hwang (4): exynos5: fix GPIO information of exynos5420 Exynos5800: Add support for Exynos5800 odroid: make some macros common Odroid-XU3: Add support for Odroid-XU3 arch/arm/cpu/armv7/exynos/Kconfig | 4 + arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 72 + arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 261 +--- board/samsung/odroid-xu3/Kconfig| 12 ++ board/samsung/odroid-xu3/MAINTAINERS| 6 + board/samsung/odroid-xu3/Makefile | 7 + board/samsung/odroid-xu3/odroid-xu3.c | 132 board/samsung/odroid-xu3/setup.h| 115 ++ board/samsung/odroid/odroid.c | 1 + board/samsung/odroid/setup.h| 8 - configs/odroid-xu3_defconfig| 4 + drivers/gpio/s5p_gpio.c | 4 +- include/configs/odroid_xu3.h| 73 + 15 files changed, 576 insertions(+), 137 deletions(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/4] Exynos5800: Add support for Exynos5800
The gpios of Exynos5800 are different from that of Exynos5420. This patch adds the gpio information and table of Exynos5800. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/gpio.h | 31 +-- drivers/gpio/s5p_gpio.c | 4 +++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 431ae3a..8f82ef0 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1368,11 +1368,21 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = { { EXYNOS5420_GPIO_PART5_BASE, EXYNOS5420_GPIO_MAX_PORT }, }; +#define EXYNOS5800_GPIO_NUM_PARTS 4 +static struct gpio_info exynos5800_gpio_data[EXYNOS5800_GPIO_NUM_PARTS] = { + { EXYNOS5420_GPIO_PART1_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_1 }, + { EXYNOS5420_GPIO_PART2_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_2 }, + { EXYNOS5420_GPIO_PART3_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_3 }, + { EXYNOS5420_GPIO_PART4_BASE, EXYNOS5420_GPIO_MAX_PORT_PART_4 }, +}; + static inline struct gpio_info *get_gpio_data(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return exynos5420_gpio_data; + else if (proid_is_exynos5800()) + return exynos5800_gpio_data; else return exynos5_gpio_data; } else if (cpu_is_exynos4()) { @@ -1388,8 +1398,10 @@ static inline struct gpio_info *get_gpio_data(void) static inline unsigned int get_bank_num(void) { if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) + if (proid_is_exynos5420()) return EXYNOS5420_GPIO_NUM_PARTS; + if (proid_is_exynos5800()) + return EXYNOS5800_GPIO_NUM_PARTS; else return EXYNOS5_GPIO_NUM_PARTS; } else if (cpu_is_exynos4()) { @@ -1493,6 +1505,21 @@ static const struct gpio_name_num_table exynos5420_gpio_table[] = { { 0 } }; +static const struct gpio_name_num_table exynos5800_gpio_table[] = { + GPIO_ENTRY('x', EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_C00, 0), + GPIO_ENTRY('c', EXYNOS5420_GPIO_C00, EXYNOS5420_GPIO_D10, 0), + GPIO_ENTRY('d', EXYNOS5420_GPIO_D10, EXYNOS5420_GPIO_Y00, 0), + GPIO_ENTRY('y', EXYNOS5420_GPIO_Y00, EXYNOS5420_GPIO_E00, 0), + GPIO_ENTRY('e', EXYNOS5420_GPIO_E00, EXYNOS5420_GPIO_F00, 0), + GPIO_ENTRY('f', EXYNOS5420_GPIO_F00, EXYNOS5420_GPIO_G00, 0), + GPIO_ENTRY('g', EXYNOS5420_GPIO_G00, EXYNOS5420_GPIO_J40, 0), + GPIO_ENTRY('j', EXYNOS5420_GPIO_J40, EXYNOS5420_GPIO_A00, 0), + GPIO_ENTRY('a', EXYNOS5420_GPIO_A00, EXYNOS5420_GPIO_B00, 0), + GPIO_ENTRY('b', EXYNOS5420_GPIO_B00, EXYNOS5420_GPIO_H00, 0), + GPIO_ENTRY('h', EXYNOS5420_GPIO_H00, EXYNOS5420_GPIO_Z0, 0), + { 0 } +}; + void gpio_cfg_pin(int gpio, int cfg); void gpio_set_pull(int gpio, int mode); void gpio_set_drv(int gpio, int mode); diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index bcf44eb..bed7cd7 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -57,11 +57,13 @@ static inline int s5p_name_to_gpio(const char *name) */ #if defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) if (cpu_is_exynos5()) { - if (proid_is_exynos5420() || proid_is_exynos5800()) { + if (proid_is_exynos5420()) { tabp = exynos5420_gpio_table; irregular_bank_name = 'y'; irregular_set_number = '7'; irregular_bank_base = EXYNOS5420_GPIO_Y70; + } else if (proid_is_exynos5800()) { + tabp = exynos5800_gpio_table; } else { tabp = exynos5_gpio_table; irregular_bank_name = 'c'; -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/4] exynos5: fix GPIO information of exynos5420
This patch fixes wrong GPIO information such as GPIO bank, table which is used to convert GPIO name to index, bank base address, and etc. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/include/asm/arch-exynos/cpu.h | 11 +- arch/arm/include/asm/arch-exynos/gpio.h | 232 +++- 2 files changed, 117 insertions(+), 126 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 7c5c4ff..da4ac6b 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -139,7 +139,7 @@ /* EXYNOS5420 */ #define EXYNOS5420_AUDIOSS_BASE0x0381 -#define EXYNOS5420_GPIO_PART6_BASE 0x0386 +#define EXYNOS5420_GPIO_PART5_BASE 0x0386 #define EXYNOS5420_PRO_ID 0x1000 #define EXYNOS5420_CLOCK_BASE 0x1001 #define EXYNOS5420_POWER_BASE 0x1004 @@ -161,11 +161,10 @@ #define EXYNOS5420_I2S_BASE0x12D6 #define EXYNOS5420_PWMTIMER_BASE 0x12DD #define EXYNOS5420_SPI_ISP_BASE0x131A -#define EXYNOS5420_GPIO_PART2_BASE 0x1340 -#define EXYNOS5420_GPIO_PART3_BASE 0x13400C00 -#define EXYNOS5420_GPIO_PART4_BASE 0x1341 -#define EXYNOS5420_GPIO_PART5_BASE 0x1400 -#define EXYNOS5420_GPIO_PART1_BASE 0x1401 +#define EXYNOS5420_GPIO_PART1_BASE 0x1340 +#define EXYNOS5420_GPIO_PART2_BASE 0x1341 +#define EXYNOS5420_GPIO_PART3_BASE 0x1400 +#define EXYNOS5420_GPIO_PART4_BASE 0x1401 #define EXYNOS5420_MIPI_DSIM_BASE 0x1450 #define EXYNOS5420_DP_BASE 0x145B diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 32e045a..431ae3a 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -1028,83 +1028,7 @@ enum exynos5_gpio_pin { }; enum exynos5420_gpio_pin { - /* GPIO_PART1_STARTS */ - EXYNOS5420_GPIO_A00,/* 0 */ - EXYNOS5420_GPIO_A01, - EXYNOS5420_GPIO_A02, - EXYNOS5420_GPIO_A03, - EXYNOS5420_GPIO_A04, - EXYNOS5420_GPIO_A05, - EXYNOS5420_GPIO_A06, - EXYNOS5420_GPIO_A07, - EXYNOS5420_GPIO_A10,/* 8 */ - EXYNOS5420_GPIO_A11, - EXYNOS5420_GPIO_A12, - EXYNOS5420_GPIO_A13, - EXYNOS5420_GPIO_A14, - EXYNOS5420_GPIO_A15, - EXYNOS5420_GPIO_A16, - EXYNOS5420_GPIO_A17, - EXYNOS5420_GPIO_A20,/* 16 0x10 */ - EXYNOS5420_GPIO_A21, - EXYNOS5420_GPIO_A22, - EXYNOS5420_GPIO_A23, - EXYNOS5420_GPIO_A24, - EXYNOS5420_GPIO_A25, - EXYNOS5420_GPIO_A26, - EXYNOS5420_GPIO_A27, - EXYNOS5420_GPIO_B00,/* 24 0x18 */ - EXYNOS5420_GPIO_B01, - EXYNOS5420_GPIO_B02, - EXYNOS5420_GPIO_B03, - EXYNOS5420_GPIO_B04, - EXYNOS5420_GPIO_B05, - EXYNOS5420_GPIO_B06, - EXYNOS5420_GPIO_B07, - EXYNOS5420_GPIO_B10,/* 32 0x20 */ - EXYNOS5420_GPIO_B11, - EXYNOS5420_GPIO_B12, - EXYNOS5420_GPIO_B13, - EXYNOS5420_GPIO_B14, - EXYNOS5420_GPIO_B15, - EXYNOS5420_GPIO_B16, - EXYNOS5420_GPIO_B17, - EXYNOS5420_GPIO_B20,/* 40 0x28 */ - EXYNOS5420_GPIO_B21, - EXYNOS5420_GPIO_B22, - EXYNOS5420_GPIO_B23, - EXYNOS5420_GPIO_B24, - EXYNOS5420_GPIO_B25, - EXYNOS5420_GPIO_B26, - EXYNOS5420_GPIO_B27, - EXYNOS5420_GPIO_B30,/* 48 0x30 */ - EXYNOS5420_GPIO_B31, - EXYNOS5420_GPIO_B32, - EXYNOS5420_GPIO_B33, - EXYNOS5420_GPIO_B34, - EXYNOS5420_GPIO_B35, - EXYNOS5420_GPIO_B36, - EXYNOS5420_GPIO_B37, - EXYNOS5420_GPIO_B40,/* 56 0x38 */ - EXYNOS5420_GPIO_B41, - EXYNOS5420_GPIO_B42, - EXYNOS5420_GPIO_B43, - EXYNOS5420_GPIO_B44, - EXYNOS5420_GPIO_B45, - EXYNOS5420_GPIO_B46, - EXYNOS5420_GPIO_B47, - EXYNOS5420_GPIO_H00,/* 64 0x40 */ - EXYNOS5420_GPIO_H01, - EXYNOS5420_GPIO_H02, - EXYNOS5420_GPIO_H03, - EXYNOS5420_GPIO_H04, - EXYNOS5420_GPIO_H05, - EXYNOS5420_GPIO_H06, - EXYNOS5420_GPIO_H07, - - /* GPIO PART 2 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_1,/* 72 0x48 */ - EXYNOS5420_GPIO_Y70 = EXYNOS5420_GPIO_MAX_PORT_PART_1, + EXYNOS5420_GPIO_Y70, EXYNOS5420_GPIO_Y71, EXYNOS5420_GPIO_Y72, EXYNOS5420_GPIO_Y73, @@ -1112,10 +1036,7 @@ enum exynos5420_gpio_pin { EXYNOS5420_GPIO_Y75, EXYNOS5420_GPIO_Y76, EXYNOS5420_GPIO_Y77, - - /* GPIO PART 3 STARTS*/ - EXYNOS5420_GPIO_MAX_PORT_PART_2,/* 80 0x50 */ - EXYNOS5420_GPIO_X00 = EXYNOS5420_GPIO_MAX_PORT_PART_2, + EXYNOS5420_GPIO_X00, EXYNOS5420_GPIO_X01, EXYNOS5420_GPIO_X02, EXYNOS5420_GPIO_X03
[U-Boot] [PATCH v2 4/4] Odroid-XU3: Add support for Odroid-XU3
This patch adds support for Odroid-XU3. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- arch/arm/cpu/armv7/exynos/Kconfig | 4 ++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/exynos5422-odroidxu3.dts | 72 +++ board/samsung/odroid-xu3/Kconfig | 12 board/samsung/odroid-xu3/MAINTAINERS | 6 ++ board/samsung/odroid-xu3/Makefile | 7 ++ board/samsung/odroid-xu3/odroid-xu3.c | 132 ++ board/samsung/odroid-xu3/setup.h | 115 + configs/odroid-xu3_defconfig | 4 ++ include/configs/odroid_xu3.h | 73 +++ 10 files changed, 427 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5422-odroidxu3.dts create mode 100644 board/samsung/odroid-xu3/Kconfig create mode 100644 board/samsung/odroid-xu3/MAINTAINERS create mode 100644 board/samsung/odroid-xu3/Makefile create mode 100644 board/samsung/odroid-xu3/odroid-xu3.c create mode 100644 board/samsung/odroid-xu3/setup.h create mode 100644 configs/odroid-xu3_defconfig create mode 100644 include/configs/odroid_xu3.h diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 3a25fee..a47cb34 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -22,6 +22,9 @@ config TARGET_TRATS2 config TARGET_ODROID bool Exynos4412 Odroid board +config TARGET_ODROID_XU3 + bool Exynos5422 Odroid board + config TARGET_ARNDALE bool Exynos5250 Arndale board select OF_CONTROL if !SPL_BUILD @@ -60,6 +63,7 @@ source board/samsung/universal_c210/Kconfig source board/samsung/origen/Kconfig source board/samsung/trats2/Kconfig source board/samsung/odroid/Kconfig +source board/samsung/odroid-xu3/Kconfig source board/samsung/arndale/Kconfig source board/samsung/smdk5250/Kconfig source board/samsung/smdk5420/Kconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2dcfcc0..66191f9 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -12,7 +12,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 000..34f52c6 --- /dev/null +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -0,0 +1,72 @@ +/* + * 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; + + config { + hwid = smdk5420 TEST A-A 9382; + }; + + aliases { + serial0 = /serial@12C0; + console = /serial@12C2; + }; + + memory { + device_type = memory; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000 + 0x8000 0x1000 + 0x9000 0x1000 + 0xa000 0x1000 + 0xb000 0xea0; + }; + + serial@12C2 { + status=okay; + }; + + /* s2mps11 is on i2c bus 4 */ + i2c@12ca { + #address-cells = 1; + #size-cells = 0; + pmic@66 { + reg = 0x66; + compatible = samsung,s2mps11-pmic; + }; + }; + + mmc@1220 { + samsung,bus-width = 8; + samsung,timing = 1 3 3; + samsung,removable = 0; + samsung,pre-init; + }; + + mmc@1221 { + status = disabled; + }; + + mmc@1222 { + samsung,bus-width = 4; + samsung,timing = 1 2 3; + samsung,removable = 1; + }; + + mmc@1223 { + status = disabled; + }; +}; diff --git a/board/samsung/odroid-xu3/Kconfig b/board/samsung/odroid-xu3/Kconfig new file mode 100644 index 000..6159692 --- /dev/null +++ b/board/samsung/odroid-xu3/Kconfig @@ -0,0 +1,12 @@ +if TARGET_ODROID_XU3 + +config SYS_BOARD + default odroid-xu3 + +config SYS_VENDOR + default samsung + +config SYS_CONFIG_NAME + default odroid_xu3 + +endif diff --git a/board/samsung/odroid-xu3/MAINTAINERS b/board/samsung/odroid-xu3/MAINTAINERS new file mode 100644 index 000..50cf928
[U-Boot] [PATCH v2 3/4] odroid: make some macros common
Some macros are used commonly for odroid series boards. This patch makes a common header file to congregate that kinds of macros. Even though there are more macros which can be common, they are not become common. Because they are a part of a register, the readability is better when they are defined at a place. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com --- board/samsung/odroid/odroid.c | 1 + board/samsung/odroid/setup.h | 8 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index 5edb250..ccbb3a0 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -18,6 +18,7 @@ #include usb.h #include usb/s3c_udc.h #include samsung/misc.h +#include ../setup.h #include setup.h DECLARE_GLOBAL_DATA_PTR; diff --git a/board/samsung/odroid/setup.h b/board/samsung/odroid/setup.h index 3e48dad..35f7af5 100644 --- a/board/samsung/odroid/setup.h +++ b/board/samsung/odroid/setup.h @@ -8,14 +8,6 @@ #ifndef __ODROIDU3_SETUP__ #define __ODROIDU3_SETUP__ -/* A/M PLL_CON0 */ -#define SDIV(x) ((x) 0x7) -#define PDIV(x) (((x) 0x3f) 8) -#define MDIV(x) (((x) 0x3ff) 16) -#define FSEL(x) (((x) 0x1) 27) -#define PLL_LOCKED_BIT (0x1 29) -#define PLL_ENABLE(x) (((x) 0x1) 31) - /* CLK_SRC_CPU */ #define MUX_APLL_SEL(x) ((x) 0x1) #define MUX_CORE_SEL(x) (((x) 0x1) 16) -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 06/12] lib: tizen: change Tizen logo with the new one.
Hi, Marczak On Thu, 09 Jan 2014 12:23:10 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: This is big size patch. Please follow the link: http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0006-lib-tizen-change-Tizen-logo-with-the-new-one.patch I tested it on M0 board, and the image shows center-aligned in high quality. Thank you. Best regards, Hyungwon Hwang Tested-by: Hyungwon Hwang human.hw...@samsung.com -- Hyungwon Hwang S/W Platform Team, Software Center Samsung Electronics. human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 00/12] Introduce Samsung misc file and LCD menu.
Hi Marczak, On Thu, 09 Jan 2014 12:23:04 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: This patch set includes changes required to: - properly use of all gpios - introduce common file for Samsung misc code - keys support (PWR, VOL:UP,DOWN) - console support on LCD - 16bpp logo support - introduce LCD menu on Samsung devices Each version changes are described in each patch commit msg. Przemyslaw Marczak (12): s5p: gpio: change gpio coding method for s5p gpio. trats2: Code cleanup. samsung: common: Add misc file and common function misc_init_r(). samsung: misc: move display logo function to misc.c file. common: lcd.c: fix data abort exception when try to access bmp header lib: tizen: change Tizen logo with the new one. video: exynos: fimd: add support for various display color modes samsung: boards: update display configs with 16bpp mode. samsung: misc: Add LCD download menu. Trats: add LCD download menu support trats2: add LCD download menu support universal: add LCD download menu support arch/arm/include/asm/arch-exynos/gpio.h | 245 +- arch/arm/include/asm/arch-s5pc1xx/gpio.h | 47 +- board/samsung/common/Makefile|1 + board/samsung/common/misc.c | 407 ++ board/samsung/common/misc.h | 18 + board/samsung/trats/trats.c |5 +- board/samsung/trats2/trats2.c| 33 +- board/samsung/universal_c210/universal.c |6 +- common/lcd.c | 27 +- drivers/gpio/s5p_gpio.c | 15 +- drivers/power/battery/bat_trats2.c |2 +- drivers/video/exynos_fb.c| 28 - drivers/video/exynos_fimd.c | 15 +- include/configs/s5p_goni.h |4 +- include/configs/s5pc210_universal.h | 41 +- include/configs/trats.h | 33 +- include/configs/trats2.h | 31 +- include/lcd.h|2 + include/power/max77686_pmic.h|2 + include/power/pmic.h |1 - lib/tizen/tizen.c| 21 +- lib/tizen/tizen_hd_logo.h| 5057 --- lib/tizen/tizen_hd_logo_data.h | 15 - lib/tizen/tizen_logo_16bpp.h |10025 ++ lib/tizen/tizen_logo_16bpp_gzip.h| 727 +++ 25 files changed, 11437 insertions(+), 5371 deletions(-) create mode 100644 board/samsung/common/misc.c create mode 100644 board/samsung/common/misc.h delete mode 100644 lib/tizen/tizen_hd_logo.h delete mode 100644 lib/tizen/tizen_hd_logo_data.h create mode 100644 lib/tizen/tizen_logo_16bpp.h create mode 100644 lib/tizen/tizen_logo_16bpp_gzip.h I downloaded the newest version of u-boot-samsung, applied all patches you sent, build it, and write it on M0 board. Logo image doesn't appear. On the console, I found the below error message. Error: 16 bit/pixel mode, but BMP has 32 bit/pixel Is there anything wrong I did? or should something be changed in your code? Thanks, --- Hyungwon Hwang Samsung SWC S/W Platform Team Smasung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 00/12] Introduce Samsung misc file and LCD menu.
On Fri, 10 Jan 2014 15:45:52 +0900 Hyungwon Hwang human.hw...@samsung.com wrote: Hi Marczak, Hi Marczak, On Thu, 09 Jan 2014 12:23:04 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: This patch set includes changes required to: - properly use of all gpios - introduce common file for Samsung misc code - keys support (PWR, VOL:UP,DOWN) - console support on LCD - 16bpp logo support - introduce LCD menu on Samsung devices Each version changes are described in each patch commit msg. Przemyslaw Marczak (12): s5p: gpio: change gpio coding method for s5p gpio. trats2: Code cleanup. samsung: common: Add misc file and common function misc_init_r(). samsung: misc: move display logo function to misc.c file. common: lcd.c: fix data abort exception when try to access bmp header lib: tizen: change Tizen logo with the new one. video: exynos: fimd: add support for various display color modes samsung: boards: update display configs with 16bpp mode. samsung: misc: Add LCD download menu. Trats: add LCD download menu support trats2: add LCD download menu support universal: add LCD download menu support arch/arm/include/asm/arch-exynos/gpio.h | 245 +- arch/arm/include/asm/arch-s5pc1xx/gpio.h | 47 +- board/samsung/common/Makefile|1 + board/samsung/common/misc.c | 407 ++ board/samsung/common/misc.h | 18 + board/samsung/trats/trats.c |5 +- board/samsung/trats2/trats2.c| 33 +- board/samsung/universal_c210/universal.c |6 +- common/lcd.c | 27 +- drivers/gpio/s5p_gpio.c | 15 +- drivers/power/battery/bat_trats2.c |2 +- drivers/video/exynos_fb.c| 28 - drivers/video/exynos_fimd.c | 15 +- include/configs/s5p_goni.h |4 +- include/configs/s5pc210_universal.h | 41 +- include/configs/trats.h | 33 +- include/configs/trats2.h | 31 +- include/lcd.h|2 + include/power/max77686_pmic.h|2 + include/power/pmic.h |1 - lib/tizen/tizen.c| 21 +- lib/tizen/tizen_hd_logo.h| 5057 --- lib/tizen/tizen_hd_logo_data.h | 15 - lib/tizen/tizen_logo_16bpp.h |10025 ++ lib/tizen/tizen_logo_16bpp_gzip.h| 727 +++ 25 files changed, 11437 insertions(+), 5371 deletions(-) create mode 100644 board/samsung/common/misc.c create mode 100644 board/samsung/common/misc.h delete mode 100644 lib/tizen/tizen_hd_logo.h delete mode 100644 lib/tizen/tizen_hd_logo_data.h create mode 100644 lib/tizen/tizen_logo_16bpp.h create mode 100644 lib/tizen/tizen_logo_16bpp_gzip.h I downloaded the newest version of u-boot-samsung, applied all patches you sent, build it, and write it on M0 board. Logo image doesn't appear. On the console, I found the below error message. Error: 16 bit/pixel mode, but BMP has 32 bit/pixel Is there anything wrong I did? or should something be changed in your code? I made a mistake. Just ignore it. Sorry. Thanks, --- Hyungwon Hwang Samsung SWC S/W Platform Team Smasung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Thanks, --- Hyungwon Hwang S/W Platform Team, Software center Samsung Electronics. human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 06/12] lib: tizen: change Tizen logo with the new one.
Hi, Marczak On Thu, 09 Jan 2014 12:23:10 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: This is big size patch. Please follow the link: http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0006-lib-tizen-change-Tizen-logo-with-the-new-one.patch I tested it on M0 board, and the image shows center-aligned in high quality. Thank you. Best regards, Hyungwon Hwang -- Hyungwon Hwang S/W Platform Team, Software center Samsung Electronics. human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/13] lib: tizen: change Tizen logo with the new one.
Dear Marczak, On Fri, 20 Dec 2013 12:50:11 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: Dear Hyungwon, On 12/20/2013 06:07 AM, Hyungwon Hwang wrote: Hi, Marczak On Thu, 19 Dec 2013 11:40:26 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: Hello Hyungwon, On 12/19/2013 06:40 AM, 황형원 wrote: Hi, Marczak. Is this logo image what I sent you before? It's a little different what we use, and also the logo image is not aligned center horizontally. Best regards, Hyungwon Hwang This is not a logo which you sent me. Your logo has 24BPP and actually it has displayed correctly because of fimd 24bpp mode. When I tried to convert it to 16bpp with gimp, it was not displayed correctly in 16bpp mode, there was some lines shift on display so I took logo from tizen.org and resized it to 500x160 - now it's looking good. This is the logo location: https://download.tizen.org/misc/Tizen-Brand/01-Primary-Assets/Lockup/On-Dark/01-RGB/Tizen-Lockup-On-Dark-RGB.png I can add some x and y offsets to make word TIZEN aligned center. If this logo is really bad, then can you share logo in PNG format? Or BMP 16bpp? The logo file is OK. Could you adjust alignment? Also, I think that anti-aliasing is needed. We can see stair-stepping appearance in diagonal lines. Can you fix it? Regards. --- Hyungwon Hwang Samsung SWC S/W Platform Team Smasung Electronics human.hw...@samsung.com You're right the picture size scalling method which I have chosen was not good enough. I fixed it and now logo quality is much better. I also introduced logo x and y offset in struct vidinfo, so function get logo will be looking like this: file: lib/tizen/tizen.c void get_tizen_logo_info(vidinfo_t *vid) { - switch (vid-resolution) { - case HD_RESOLUTION: - vid-logo_width = TIZEN_HD_LOGO_WIDTH; - vid-logo_height = TIZEN_HD_LOGO_HEIGHT; - vid-logo_addr = (ulong)tizen_hd_logo; + switch (vid-vl_bpix) { + case 4: + vid-logo_width = TIZEN_LOGO_16BPP_WIDTH; + vid-logo_height = TIZEN_LOGO_16BPP_HEIGHT; + vid-logo_x_offset = TIZEN_LOGO_16BPP_X_OFFSET; + vid-logo_y_offset = TIZEN_LOGO_16BPP_Y_OFFSET; +#if defined(CONFIG_VIDEO_BMP_GZIP) + vid-logo_addr = (ulong)tizen_logo_16bpp_gzip; +#else + vid-logo_addr = (ulong)tizen_logo_16bpp; +#endif break; default: + vid-logo_addr = 0; break; } } and set logo position before display: file: board/samsung/common/misc.c x = ((panel_info.vl_width - panel_info.logo_width) 1); + x += panel_info.logo_x_offset; /* For X center align */ y = ((panel_info.vl_height - panel_info.logo_height) 1); + y += panel_info.logo_y_offset; /* For Y center align */ So every new logo in future could be simply center-aligned. Is it ok? Regards, Can you send the patch? I think that the code above omit the added variable declaration. So I can't test it. Thank you. Best regards, Hyungwon Hwang --- Hyungwon Hwang Samsung SWC S/W Platform Team Smasung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/13] lib: tizen: change Tizen logo with the new one.
Hi, Marczak On Thu, 19 Dec 2013 11:40:26 +0100 Przemyslaw Marczak p.marc...@samsung.com wrote: Hello Hyungwon, On 12/19/2013 06:40 AM, 황형원 wrote: Hi, Marczak. Is this logo image what I sent you before? It's a little different what we use, and also the logo image is not aligned center horizontally. Best regards, Hyungwon Hwang This is not a logo which you sent me. Your logo has 24BPP and actually it has displayed correctly because of fimd 24bpp mode. When I tried to convert it to 16bpp with gimp, it was not displayed correctly in 16bpp mode, there was some lines shift on display so I took logo from tizen.org and resized it to 500x160 - now it's looking good. This is the logo location: https://download.tizen.org/misc/Tizen-Brand/01-Primary-Assets/Lockup/On-Dark/01-RGB/Tizen-Lockup-On-Dark-RGB.png I can add some x and y offsets to make word TIZEN aligned center. If this logo is really bad, then can you share logo in PNG format? Or BMP 16bpp? The logo file is OK. Could you adjust alignment? Also, I think that anti-aliasing is needed. We can see stair-stepping appearance in diagonal lines. Can you fix it? Regards. --- Hyungwon Hwang Samsung SWC S/W Platform Team Smasung Electronics human.hw...@samsung.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] video: add L5F31188 TFT-LCD panel driver
Hello, Heiko. I think that function l5f31188_display_enable() is needed to wrap up function l5f31188_display_on(). Function l5f31188_display_enable() is used as an interface to external side, especially to MIPI DSI driver. But function l5f31188_display_on() is used as an internal function in this driver. Moreover, because they have different input argument types, it cannot be simply replacable. Thank you for your reply. Best regards, Hyungwon Hwang On Wed, 31 Jul 2013 08:03:28 +0200 Heiko Schocher h...@denx.de wrote: Hello Hyungwon Am 31.07.2013 03:38, schrieb Hyungwon Hwang: This is u-boot driver for L5F31188 panel. I've tested it in the board based on MIPI DSI with EXYNOS4 series, and it worked well. Thanks, Hyungwon Hwang Signed-off-by: Hyungwon Hwanghuman.hw...@samsung.com Signed-off-by: Donghwa Leedw09@samsung.com --- drivers/video/Makefile |1 + drivers/video/l5f31188.c | 201 ++ 2 files changed, 202 insertions(+) create mode 100644 drivers/video/l5f31188.c diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 68ff34b..997d041 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -38,6 +38,7 @@ COBJS-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o COBJS-$(CONFIG_MPC8XX_LCD) += mpc8xx_lcd.o COBJS-$(CONFIG_PXA_LCD) += pxa_lcd.o COBJS-$(CONFIG_S6E8AX0) += s6e8ax0.o +COBJS-$(CONFIG_L5F31188) += l5f31188.o COBJS-$(CONFIG_S6E63D6) += s6e63d6.o COBJS-$(CONFIG_LD9040) += ld9040.o COBJS-$(CONFIG_SED156X) += sed156x.o diff --git a/drivers/video/l5f31188.c b/drivers/video/l5f31188.c new file mode 100644 index 000..a13be0b --- /dev/null +++ b/drivers/video/l5f31188.c @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved. + * Hyungwon Hwanghuman.hw...@samsung.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. Please use for new files SPDX-License-Identifier, thanks. + * + */ + +#includecommon.h +#includeasm/arch/mipi_dsim.h + +#define SCAN_FROM_LEFT_TO_RIGHT 0 +#define SCAN_FROM_RIGHT_TO_LEFT 1 +#define SCAN_FROM_TOP_TO_BOTTOM 0 +#define SCAN_FROM_BOTTOM_TO_TOP 1 [...] +static void l5f31188_display_enable(struct mipi_dsim_device *dev) +{ + struct mipi_dsim_master_ops *ops = dev-master_ops; + l5f31188_display_on(dev, ops); +} empty function? + +static struct mipi_dsim_lcd_driver l5f31188_dsim_ddi_driver = { + .name = l5f31188, + .id = -1, + + .mipi_panel_init = l5f31188_panel_init, + .mipi_display_on = l5f31188_display_enable, +}; + +void l5f31188_init(void) +{ + exynos_mipi_dsi_register_lcd_driver(l5f31188_dsim_ddi_driver); +} bye, Heiko ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] video: add L5F31188 TFT-LCD panel driver
This is u-boot driver for L5F31188 panel. I tested it in the board based on MIPI DSI with EXYNOS4 series, and it worked well. Changes in V2: - Replaced license header by SPDX-License-Identifier. Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Signed-off-by: Donghwa Lee dw09@samsung.com --- drivers/video/Makefile |1 + drivers/video/l5f31188.c | 192 ++ 2 files changed, 193 insertions(+) create mode 100644 drivers/video/l5f31188.c diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 68ff34b..997d041 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -38,6 +38,7 @@ COBJS-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o COBJS-$(CONFIG_MPC8XX_LCD) += mpc8xx_lcd.o COBJS-$(CONFIG_PXA_LCD) += pxa_lcd.o COBJS-$(CONFIG_S6E8AX0) += s6e8ax0.o +COBJS-$(CONFIG_L5F31188) += l5f31188.o COBJS-$(CONFIG_S6E63D6) += s6e63d6.o COBJS-$(CONFIG_LD9040) += ld9040.o COBJS-$(CONFIG_SED156X) += sed156x.o diff --git a/drivers/video/l5f31188.c b/drivers/video/l5f31188.c new file mode 100644 index 000..3312dcf --- /dev/null +++ b/drivers/video/l5f31188.c @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved. + * Hyungwon Hwang human.hw...@samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include common.h +#include asm/arch/mipi_dsim.h + +#define SCAN_FROM_LEFT_TO_RIGHT 0 +#define SCAN_FROM_RIGHT_TO_LEFT 1 +#define SCAN_FROM_TOP_TO_BOTTOM 0 +#define SCAN_FROM_BOTTOM_TO_TOP 1 + +static void l5f31188_sleep_in(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x10, 0x00); +} + +static void l5f31188_sleep_out(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x11, 0x00); +} + +static void l5f31188_set_gamma(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x26, 0x00); +} + +static void l5f31188_display_off(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x28, 0x00); +} + +static void l5f31188_display_on(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x29, 0x00); +} + +static void l5f31188_ctl_memory_access(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, + int h_direction, int v_direction) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x36, + (((h_direction 0x1) 1) | (v_direction 0x1))); +} + +static void l5f31188_set_pixel_format(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x3A, 0x70); +} + +static void l5f31188_write_disbv(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, unsigned int brightness) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x51, brightness); +} + +static void l5f31188_write_ctrld(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x53, 0x2C); +} + +static void l5f31188_write_cabc(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, + unsigned int wm_mode) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x55, wm_mode); +} + +static void l5f31188_write_cabcmb(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, unsigned int min_brightness) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x5E, + min_brightness); +} + +static void l5f31188_set_extension(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + const unsigned char data_to_send[] = { + 0xB9, 0xFF, 0x83, 0x94 + }; + + ops-cmd_write(dev, MIPI_DSI_DCS_LONG_WRITE, + (unsigned int)data_to_send, ARRAY_SIZE(data_to_send)); +} + +static void l5f31188_set_dgc_lut(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + const unsigned char data_to_send[] = { + 0xC1, 0x01, 0x00, 0x04, 0x0E, 0x18, 0x1E, 0x26, + 0x2F, 0x36, 0x3E, 0x47, 0x4E, 0x56, 0x5D, 0x65, + 0x6D, 0x75, 0x7D, 0x84, 0x8C, 0x94, 0x9C, 0xA4, + 0xAD, 0xB5, 0xBD, 0xC5, 0xCC, 0xD4, 0xDE, 0xE5, + 0xEE, 0xF7, 0xFF, 0x3F, 0x9A, 0xCE, 0xD4, 0x21, + 0xA1, 0x26, 0x54, 0x00, 0x00, 0x04, 0x0E, 0x19, + 0x1F, 0x27, 0x30, 0x37, 0x40, 0x48, 0x50, 0x58, + 0x60, 0x67, 0x6F, 0x77, 0x7F, 0x87, 0x8F, 0x97, + 0x9F, 0xA7, 0xB0, 0xB8, 0xC0, 0xC8, 0xCE
Re: [U-Boot] [PATCH] video: add L5F31188 TFT-LCD panel driver
To heiko and minkyu, I'm very sorry. It was my first time to contribute my code to open-source community, and it was my mistake not to be familiar with the convention in this community. I read the article in the link which minkyu sent me. It was very helpful. Thank you. I'll be more careful next time. I wanna say thank you for our replies from all of you, again. Sincerely, Hyungwon Hwang On Wed, 31 Jul 2013 19:26:04 +0900 Minkyu Kang mk7.k...@samsung.com wrote: Dear Hyungwon Hwang. On 31/07/13 17:25, Hyungwon Hwang wrote: Hello, Heiko. I think that function l5f31188_display_enable() is needed to wrap up function l5f31188_display_on(). Function l5f31188_display_enable() is used as an interface to external side, especially to MIPI DSI driver. But function l5f31188_display_on() is used as an internal function in this driver. Moreover, because they have different input argument types, it cannot be simply replacable. Thank you for your reply. please don't top posting. I think you need this link. (http://www.denx.de/wiki/U-Boot/Patches) please read it carefully. welcome to join us. Thanks, Minkyu Kang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] video: add L5F31188 TFT-LCD panel driver
This is u-boot driver for L5F31188 panel. I've tested it in the board based on MIPI DSI with EXYNOS4 series, and it worked well. Thanks, Hyungwon Hwang Signed-off-by: Hyungwon Hwang human.hw...@samsung.com Signed-off-by: Donghwa Lee dw09@samsung.com --- drivers/video/Makefile |1 + drivers/video/l5f31188.c | 201 ++ 2 files changed, 202 insertions(+) create mode 100644 drivers/video/l5f31188.c diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 68ff34b..997d041 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -38,6 +38,7 @@ COBJS-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o COBJS-$(CONFIG_MPC8XX_LCD) += mpc8xx_lcd.o COBJS-$(CONFIG_PXA_LCD) += pxa_lcd.o COBJS-$(CONFIG_S6E8AX0) += s6e8ax0.o +COBJS-$(CONFIG_L5F31188) += l5f31188.o COBJS-$(CONFIG_S6E63D6) += s6e63d6.o COBJS-$(CONFIG_LD9040) += ld9040.o COBJS-$(CONFIG_SED156X) += sed156x.o diff --git a/drivers/video/l5f31188.c b/drivers/video/l5f31188.c new file mode 100644 index 000..a13be0b --- /dev/null +++ b/drivers/video/l5f31188.c @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved. + * Hyungwon Hwang human.hw...@samsung.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include common.h +#include asm/arch/mipi_dsim.h + +#define SCAN_FROM_LEFT_TO_RIGHT 0 +#define SCAN_FROM_RIGHT_TO_LEFT 1 +#define SCAN_FROM_TOP_TO_BOTTOM 0 +#define SCAN_FROM_BOTTOM_TO_TOP 1 + +static void l5f31188_sleep_in(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x10, 0x00); +} + +static void l5f31188_sleep_out(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x11, 0x00); +} + +static void l5f31188_set_gamma(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x26, 0x00); +} + +static void l5f31188_display_off(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x28, 0x00); +} + +static void l5f31188_display_on(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE, 0x29, 0x00); +} + +static void l5f31188_ctl_memory_access(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, + int h_direction, int v_direction) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x36, + (((h_direction 0x1) 1) | (v_direction 0x1))); +} + +static void l5f31188_set_pixel_format(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x3A, 0x70); +} + +static void l5f31188_write_disbv(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, unsigned int brightness) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x51, brightness); +} + +static void l5f31188_write_ctrld(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x53, 0x2C); +} + +static void l5f31188_write_cabc(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, + unsigned int wm_mode) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x55, wm_mode); +} + +static void l5f31188_write_cabcmb(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops, unsigned int min_brightness) +{ + ops-cmd_write(dev, MIPI_DSI_DCS_SHORT_WRITE_PARAM, 0x5E, + min_brightness); +} + +static void l5f31188_set_extension(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + const unsigned char data_to_send[] = { + 0xB9, 0xFF, 0x83, 0x94 + }; + + ops-cmd_write(dev, MIPI_DSI_DCS_LONG_WRITE, + (unsigned int)data_to_send, ARRAY_SIZE(data_to_send)); +} + +static void l5f31188_set_dgc_lut(struct mipi_dsim_device *dev, + struct mipi_dsim_master_ops *ops) +{ + const unsigned char data_to_send[] = { + 0xC1, 0x01, 0x00, 0x04, 0x0E, 0x18, 0x1E, 0x26, + 0x2F, 0x36, 0x3E, 0x47, 0x4E, 0x56, 0x5D, 0x65, + 0x6D