diff mbox

[U-Boot,v9,0/3] Adds support for Exynos5422 odroid xu3 board

Message ID 1417094496-28740-1-git-send-email-human.hwang@samsung.com
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Commit Message

Hyungwon Hwang Nov. 27, 2014, 1:21 p.m. UTC
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.



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/README.odroid                     |  46 ++++++++----
 include/configs/odroid.h              |   5 --
 include/configs/odroid_xu3.h          | 133 ++++++++++++++++++++++++++++++++++
 12 files changed, 473 insertions(+), 22 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

Comments

Sjoerd Simons Dec. 1, 2014, 12:34 p.m. UTC | #1
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
Hyungwon Hwang Dec. 2, 2014, 1:56 a.m. UTC | #2
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.simons@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
Joonyoung Shim Jan. 7, 2015, 8:31 a.m. UTC | #3
Hi,

On 12/02/2014 10:56 AM, Hyungwon Hwang wrote:
> 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.simons@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

I need to support odroid xu3 specific gpio setting e.g. to reset emmc
for reset command support. Also there are specific gpio setting codes
for only smdk5420 board on board/samsung/smdk5420/smdk5420.c and they
are not related with odroid xu3 board.

So, i think that need to split them.

First, split board file. It's easiest way to make separate board 
directory.

Second, we can make just board file for odroid xu3 in same directory and
we should distinguish them from Makefile but i don't know this is
general way.

Third, using same board file like now but we will need any way to
distinguish boards on runtime.

Any ideas?

Thanks.

>>   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
>
Sjoerd Simons Jan. 7, 2015, 9:25 a.m. UTC | #4
On Wed, 2015-01-07 at 17:31 +0900, Joonyoung Shim wrote:
> Hi,
> 
> On 12/02/2014 10:56 AM, Hyungwon Hwang wrote:
> > 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.simons@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
> 
> I need to support odroid xu3 specific gpio setting e.g. to reset emmc
> for reset command support. Also there are specific gpio setting codes
> for only smdk5420 board on board/samsung/smdk5420/smdk5420.c and they
> are not related with odroid xu3 board.
> 
> So i think that need to split them.

For the gpio specific to the smdk5420 are you referring to the usb vbus
gpio ? (For which i've dropped the code in a later, merged commit as
it's handled by common code).

> First, split board file. It's easiest way to make separate board 
> directory.
> 
> Second, we can make just board file for odroid xu3 in same directory and
> we should distinguish them from Makefile but i don't know this is
> general way.
> 
> Third, using same board file like now but we will need any way to
> distinguish boards on runtime.

To distinguish boards at runtime you should use the information from the
DT file of the board rather then hardcoding it in a board file.
Joonyoung Shim Jan. 7, 2015, 11:49 a.m. UTC | #5
Hi Sjoerd,

On 01/07/2015 06:25 PM, Sjoerd Simons wrote:
> On Wed, 2015-01-07 at 17:31 +0900, Joonyoung Shim wrote:
>> Hi,
>>
>> On 12/02/2014 10:56 AM, Hyungwon Hwang wrote:
>>> 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.simons@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
>>
>> I need to support odroid xu3 specific gpio setting e.g. to reset emmc
>> for reset command support. Also there are specific gpio setting codes
>> for only smdk5420 board on board/samsung/smdk5420/smdk5420.c and they
>> are not related with odroid xu3 board.
>>
>> So i think that need to split them.
> 
> For the gpio specific to the smdk5420 are you referring to the usb vbus
> gpio ? (For which i've dropped the code in a later, merged commit as
> it's handled by common code).

I just mean current remaining - lcd and pwm codes, but maybe can move
them to device tree.

> 
>> First, split board file. It's easiest way to make separate board 
>> directory.
>>
>> Second, we can make just board file for odroid xu3 in same directory and
>> we should distinguish them from Makefile but i don't know this is
>> general way.
>>
>> Third, using same board file like now but we will need any way to
>> distinguish boards on runtime.
> 
> To distinguish boards at runtime you should use the information from the
> DT file of the board rather then hardcoding it in a board file.
> 

OK, let's try to use device tree.

Thanks for guide.
diff mbox

Patch

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_BASE        0x00000000
 
-#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" \