platform/kernel/u-boot.git
8 years agopackaging: change the Version information to 2016.03 accepted/tizen/ivi/20160425.094023 accepted/tizen/mobile/20160425.094010 accepted/tizen/tv/20160425.093953 accepted/tizen/wearable/20160425.094017 submit/tizen/20160425.072005
Jaehoon Chung [Thu, 21 Apr 2016 10:38:38 +0000 (19:38 +0900)]
packaging: change the Version information to 2016.03

Change the Version information to 2016.03.
(Rebased on v2016.03.)

Change-Id: Ifc4c9af40c0df714b6307f00acc5c8f77412acee
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agopackaging: u-boot: change from u-boot.bin to u-boot-nodtb.bin for multi-dtb
Jaehoon Chung [Thu, 21 Apr 2016 09:53:34 +0000 (18:53 +0900)]
packaging: u-boot: change from u-boot.bin to u-boot-nodtb.bin for multi-dtb

Changed inptut file for multi-dtb.
(Use u-boot-nodtb.bin instead of u-boot.bin)

commit ad1ecd20 "fdt: Build a u-Boot binary without device tree"

Since applied it, u-boot.bin is included dt file by default.
(If OF_CONTROL is enabled..)

Change-Id: Id93d81ec6327e571da684a630f254c244bfecaf2
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoodroid xu3/xu4: add bootclone and ubootupgrade environment scripts
Przemyslaw Marczak [Fri, 4 Dec 2015 15:21:02 +0000 (16:21 +0100)]
odroid xu3/xu4: add bootclone and ubootupgrade environment scripts

Script ubootupgrade:
This script allows updating U-Boot from file u-boot-mmc.bin
existing on boot partition, e.g. with SD card reader.

This is useful for XU4, when U-Boot upgrade is needed,
then it can be delivered with 'boot.img' as regular file
and upgraded by running:
run ubootupgrade

Script bootclone:
This script allows cloning bootloader firmware including:
- bl1, bl2, U-Boot ,and TZSW
from bootable SD card to clean eMMC card using XU3/XU4 board.

This is useful, when user have SD card reader only and wants prepare
a bootable eMMC card.

The script expects that SD is bootable and can be run as follows:
run bootclone

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoexynos4-dt: update regulators opmode settings
Przemyslaw Marczak [Fri, 4 Dec 2015 13:21:00 +0000 (14:21 +0100)]
exynos4-dt: update regulators opmode settings

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agopmic: max77686: adjust operation mode names to match documentation
Przemyslaw Marczak [Fri, 7 Aug 2015 10:01:07 +0000 (12:01 +0200)]
pmic: max77686: adjust operation mode names to match documentation

The MAX77686 PMIC's operation modes defined in the header were
quite misleading, because in the defined STANDBY mode, the output
were off, instead of staying in low power mode.

This commit correct this issue, and now the operation modes
are consistent with the PMIC's documentation.

Rename results:
- MAX77686_LDO_MODE_STANDBY     -> MAX77686_LDO_MODE_ON_AUTO_OFF
- MAX77686_LDO_MODE_STANDBY_LPM -> MAX77686_LDO_MODE_ON_AUTO_LPM
- MAX77686_BUCK_MODE_STANDBY    -> MAX77686_BUCK_MODE_ON_AUTO_OFF

For both modes, the output state is controlled by PMIC's PWRREQ
external signal used by SoC. In normal operation mode, when PWRREQ
signal is HIGH, the output is ON, amd for LOW signal, the output
is OFF or LPM (Low Power Mode).

As a result, this commit updates the Trats2 regulator settings.

Change-Id: Ibcb86e0c1ed50530930fbabab88bc374eedc4161
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoTMP: odroid-xu3::add checkboard to use the same DTB for XU3/XU3L
Przemyslaw Marczak [Wed, 2 Dec 2015 12:42:12 +0000 (13:42 +0100)]
TMP: odroid-xu3::add checkboard to use the same DTB for XU3/XU3L

This U-Boot detects Odroid board's version (XU3/XU3L)
to load proper fdtfile based on this info.

But until tizen boot image doesn't include the FDT for XU3Lite,
the same file must be used for XU3 and XU3L.

This commit adds environment script 'checkboard', to set fdtfile name.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agobootstage: enable bootstage timing report to fdt
Przemyslaw Marczak [Wed, 2 Dec 2015 10:48:56 +0000 (11:48 +0100)]
bootstage: enable bootstage timing report to fdt

This commit enables boot stage time reporting for U-Boot
and appends it to device-tree, which can be seen in Linux.
The report is created as 'bootstage' fdt node with child
for each stage, like:
- main_loop (U-Boot prompt)
- start_kernel

fdt:
bootstage {
44 {
name = "start_kernel";
mark = <>;
};
...
};

This can be checked in linux with 'cat /proc/device-tree/bootstage/id/name'.

Note: The id's are not constant for each boot stage name. For safety
use in linux, it's better to find the proper one by it's name.

This feature is enabled for configs:
- odroid-xu3
- odroid-u3
- tizen

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoOdroid-xu3: set default bootcmd to autoboot
Przemyslaw Marczak [Thu, 19 Nov 2015 14:45:27 +0000 (15:45 +0100)]
Odroid-xu3: set default bootcmd to autoboot

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agof_thor: allow to download 4GB images
Przemyslaw Marczak [Tue, 10 Nov 2015 11:29:18 +0000 (12:29 +0100)]
f_thor: allow to download 4GB images

This commit fixes 2GB file size limit for thor downloader.

The application on host side sends the downloaded file size as 32-bit
unsigned value. But the thor implementation on U-Boot side interpreted
this as signed value. This caused an error for files with size greater
than 2GB.

This commit fixes the data types in code, which allows to send file
of size 4GB.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoOdroidXU3: add workaround for MFC crash issue
Marek Szyprowski [Thu, 17 Sep 2015 10:53:16 +0000 (12:53 +0200)]
OdroidXU3: add workaround for MFC crash issue

Most versions of MFC v8 firmware suffer from various hang and crash
issues. Most of those issues has been fixed in updated MFC v8 firmware
available for Exynos 5433, however using it on Odroid XU3 sometimes
causes random crashes. In our experiments it turned out that such
firmware works stable after increasing the MFC sclk rate from default
333MHz to 480MHz. This has been achieved by setting ACLK333 clock
divider to 1 (from 2) and setting CPLL rate to 480MHz (from 666MHz).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id38d914fddea7fa8fe7144e25cc47948184f9579

8 years agotools:mkimage_multidtb: Align less than PAD size
Inha Song [Wed, 5 Aug 2015 05:05:03 +0000 (14:05 +0900)]
tools:mkimage_multidtb: Align less than PAD size

This patch fix align error in mkimage_multidtb tools.
if DTB size is aigned to $PAD, $PAD_CNT should be zero not $PAD.

Change-Id: I2bf8343dae9b2bb71a70abf1df61bd215c2996f8
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agoOdroid-XU3: Add missing default mmcbootdev environment
Inha Song [Wed, 24 Jun 2015 01:56:00 +0000 (10:56 +0900)]
Odroid-XU3: Add missing default mmcbootdev environment

This patch add missing default "mmcbootdev" environment in Odroid-XU3
board configs.

Change-Id: If10c9650d1efef6246287d13690ec84ed1be4438
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agopackaging: u-boot-xu3.spec: modify the source file prefix name
Jaehoon Chung [Tue, 26 May 2015 09:50:54 +0000 (18:50 +0900)]
packaging: u-boot-xu3.spec: modify the source file prefix name

Modify the source file prefix name from u-boot-xu3 to u-boot.
When built with u-boot.spec and u-boot-xu3.spec, it needs to take same source
file.

Change-Id: I0f0d8fd5973b4e9cfc6337d9b9431598bedaa891
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agopackaging: fix %setup top directory name to match repo name
Inha Song [Tue, 26 May 2015 10:34:28 +0000 (19:34 +0900)]
packaging: fix %setup top directory name to match repo name

This pach fix %setup top directory name to match repo name.

Change-Id: I12ad129f9092bf111f6deb900d1b5cdb9cf4ccdb
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agopackaging: fix minifest and temp directory name for odroid xu3
Inha Song [Tue, 26 May 2015 05:26:03 +0000 (14:26 +0900)]
packaging: fix minifest and temp directory name for odroid xu3

This pach fix mainifest name to u_boot_xu3 from u_boot and also
fix temporary name for gbs to u-boot-xu3.

Change-Id: I307186ea75e1cb4ce4a588694aa081d318051158
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agoAdd dtc to u-boot-tools
Maciej Wereski [Thu, 19 Mar 2015 10:39:59 +0000 (11:39 +0100)]
Add dtc to u-boot-tools

Without dtc mkimage fails.

Change-Id: If66e67881a616dddcda88004ffe073795e010433
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
8 years agoOdroid-XU3: Change root partition name to rootfs
Inha Song [Thu, 21 May 2015 02:04:46 +0000 (11:04 +0900)]
Odroid-XU3: Change root partition name to rootfs

This patch root partition name to rootfs from platform.
The root partition name is changed to rootfs from platform since Tizen 3.0.

Change-Id: I111fd510e097b9354a7d5214b551ceb809069e24
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agopackaging: Add change spec for odroid-xu3 u-boot build
Inha Song [Tue, 17 Mar 2015 07:36:57 +0000 (16:36 +0900)]
packaging: Add change spec for odroid-xu3 u-boot build

This patch Add spec file for odroid-xu3 u-boot build by GBS.

Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agotool: mkimage_signed: Add odroid-xu3_defconfig support
Inha Song [Thu, 26 Feb 2015 01:08:21 +0000 (10:08 +0900)]
tool: mkimage_signed: Add odroid-xu3_defconfig support

This patch add odroid-xu3_defconfig for Odroid XU3 board.

Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agoexynos: common: increase malloc len to 128MiB
Przemyslaw Marczak [Tue, 17 Mar 2015 09:44:57 +0000 (10:44 +0100)]
exynos: common: increase malloc len to 128MiB

This change is required for thor command.
When malloc pool is increased, then thor doesn't
fail when allocates the data buffer few times.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoexynos4: dtsi: add include of gpio bindings
Przemyslaw Marczak [Tue, 27 Jan 2015 15:12:53 +0000 (16:12 +0100)]
exynos4: dtsi: add include of gpio bindings

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoOdroid-XU3: adjust to support Tizen requirements
Joonyoung Shim [Fri, 16 Jan 2015 07:59:04 +0000 (16:59 +0900)]
Odroid-XU3: adjust to support Tizen requirements

This patch includes changes required to boot Tizen,
by varoius authors:

arm: exynos5420: Adding support for board_usb_{init|cleanup}() functions
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
samsung: common: board: call dwc3_uboot_exit() for boards with DWC3
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
config: Odroid-XU3: Support DFU download
Signed-off-by: Inha Song <ideal.song@samsung.com>
smdk5420: Add dfu_alt_info settings interface for support DFU download
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
config: Odroid-XU3: Enable dwc3 usb gadget
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
config: Odroid-XU3: Add default dfu device environment
Signed-off-by: Inha Song <ideal.song@samsung.com>
usb: config: odroid XU3: Enable UMS (Mass Storage) gadget
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Odroid-XU3: Enable check board signature when download bootloader
Signed-off-by: Inha Song <ideal.song@samsung.com>
odroid-xu3: config: add platform autoboot command
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Odroid-XU3: Set rootfs device number to 0
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agosamsung: board: dram_init: return error if no mem
Przemyslaw Marczak [Fri, 28 Nov 2014 13:34:59 +0000 (14:34 +0100)]
samsung: board: dram_init: return error if no mem

Change-Id: Ic1bcce5bc90a38b751f32bef23cae79e24d5a443
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agopackaging: u-boot.spec: add tizen_defconfig support
Przemyslaw Marczak [Thu, 31 Jul 2014 14:31:55 +0000 (16:31 +0200)]
packaging: u-boot.spec: add tizen_defconfig support

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agotool:mkimage_signed: add tizen_defconfig support
Przemyslaw Marczak [Thu, 31 Jul 2014 14:26:45 +0000 (16:26 +0200)]
tool:mkimage_signed: add tizen_defconfig support

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotools:mkimage_multidtb: cat multi-plat bin with multiple dtbs
Przemyslaw Marczak [Thu, 31 Jul 2014 14:28:17 +0000 (16:28 +0200)]
tools:mkimage_multidtb: cat multi-plat bin with multiple dtbs

This script concatenates proper dtb files into
one multi.dtb with 4B padding after the u-boot-multi.bin.

Output: u-boot-mmc.bin:
| u-boot-multi.bin  | dtb 1 (4B padding) | dtb 2 (4b padding) | dtb x ...

Change-Id: I9b308fc58707917b89c3f59e65b414d02f5e8efb
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotizen: add tizen_defconfig
Przemyslaw Marczak [Tue, 8 Jul 2014 11:48:16 +0000 (13:48 +0200)]
tizen: add tizen_defconfig

Changes for v2015.10-rc5
- tizen.h: remove CONFIG_SYS_PROMPT
- tizen_defconfig: enable missing configs

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotizen: add Exynos4 common file
Przemyslaw Marczak [Tue, 8 Jul 2014 11:51:14 +0000 (13:51 +0200)]
tizen: add Exynos4 common file

Changes for v2015.10-rc5:
- exynos4-dt.c: add missing control of MAX77693 regulators
  for Trats2 in function s5pc210_phy_control()

Changed for v2016.03:
- Replaced from s3c_udc to dwc2_udc

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agothor:cmd: get the default command arguments from environment
Przemyslaw Marczak [Thu, 12 Jun 2014 08:20:59 +0000 (10:20 +0200)]
thor:cmd: get the default command arguments from environment

This change adds support to getting the default DFU cmd line
arguments from the environment.

DFU and THOR uses the same command line arguments,
so the DFU command environment setup can be used also with THOR.

Change-Id: I2e0984c909147c13191f6d6646d094c9f02c392a
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agodfu:cmd: get the default command arguments from environment
Przemyslaw Marczak [Thu, 7 Aug 2014 11:03:25 +0000 (13:03 +0200)]
dfu:cmd: get the default command arguments from environment

This change adds support to store the default DFU cmd line
arguments in the environment.

This is useful for users who usually use the same arguments
for dfu command and do the upgrade frequently.

DFU command use cases:
- dfu <usb ctrl> <if> <dev> [<list>] - use command line args
- dfu [<list>] - take the default command line args from env
And for both - optional list the initialized DFU entities.

To use the default dfu device configuration user should define:
- $dfu_usb_con - e.g. "0"
- $dfu_interface - e.g. "mmc"
- $dfu_device - e.g. "0"

Change-Id: I1c87677c0384a5f5a808ab9b7845d6da6f9ec980
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agodfu:mmc: support to get partition information by name
Joonyoung Shim [Wed, 6 Aug 2014 02:48:30 +0000 (11:48 +0900)]
dfu:mmc: support to get partition information by name

The partitions can have partition name like label. If partition name is
exist, first get partition information by name than by partition number,
so we can ignore hardcoding dependency of partition number.

Change-Id: Ibfb2521438ce366959814c2a87085e9f384de588
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
8 years agosamsung: misc_init_r: insert call to platform_setup()
Przemyslaw Marczak [Thu, 13 Nov 2014 10:40:02 +0000 (11:40 +0100)]
samsung: misc_init_r: insert call to platform_setup()

This change adds call of platform_setup() to check or set active
platform configuration.

Another change is setup environment variable: ${platname},
from board name in set_board_info().

Change-Id: I355736bf40f8fa3697ce0b4546f7702d2e54a0f9
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung: misc: add new feature for configure partitions layout at boot.
Przemyslaw Marczak [Wed, 5 Nov 2014 20:09:07 +0000 (21:09 +0100)]
samsung: misc: add new feature for configure partitions layout at boot.

This feature requires some platform configuration data
in the environment, which is:
-${platname}_setup_N_name       - name of this setup
-${platname}_setup_N_partitions - GPT partitions or NULL if MBR
-${platname}_setup_N_alt_system - dfu_alt_info with system entities
-${platname}_setup_N_bootpart   - boot partition number for this setup
-${platname}_setup_N_rootpart   - root partition number for this setup

And for at least one setup it requires:
-${platname}_setup_cnt    - number of ${platname} configs
-${platname}_setup_chosen - chosen plaform config
-${platname}_setup_active - active platform config (autoset)

Two environment variables are used to switch/check active setup:
-${platname}_setup_chosen - can be changed manually
-${platname}_setup_active - should be the same as chosen

If chosen setup is not set, then will be automatically set on boot
by setting proper env:
- $partitions                 := ${platname}_setup_N_partitions
- $dfu_alt_system_${platname} := ${platname}_setup_N_alt_system
- $mmcbootpart                := ${platname}_setup_N_bootpart
- $mmcrootpart                := ${platname}_setup_N_rootpart
- ${platname}_setup_active    := ${platname}_setup_chosen

If ${partitions} are:
- set, then gpt write is called
- unset, e.g. when using MBR - then partition table is unchanged

Config:
- CONFIG_PLATFORM_SETUP

Changed for v2016.03:
- Replaced from vsnprintf to vsprintf

Change-Id: Ib9f90415b92ec1d67a9bf6b84e7ab5d5deea8a7d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotizen: add new gpt version and add gpt version headers
Inha Song [Thu, 6 Nov 2014 02:37:36 +0000 (11:37 +0900)]
tizen: add new gpt version and add gpt version headers

This patch adds new gpt version and moves gpt data into
separated headers.
In order to be able to gpt version switch, make gpt_vxx.h
files that has the partition information.

- include/samsung/gpt_v08.h
- include/samsung/gpt_v13.h

Change-Id: I33870a54703a07468f17b0f0d7cf43e563409e65
Signed-off-by: Inha Song <ideal.song@samsung.com>
tizen: config: enable platform command and platform setup

This patch enables "platform" command and adds multiple
platform setups to tizen environment.
At this stage - there are available three setups:
- trats2 pit v8
- trats2 pit v13 - chosen
- odroidu3 Tizen v2.x - chosen
- odroidu3 Tizen v3.0 - chosen

The chosen setup - is the default for each platform,
and is set as an active after first boot.
This should be changed manually if another setup is required.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
samsung: gpt: fix CSA partition name
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
8 years agosamsung: define autoboot command in external header
Przemyslaw Marczak [Fri, 15 May 2015 14:26:15 +0000 (16:26 +0200)]
samsung: define autoboot command in external header

Change-Id: Ifb3f73392246b0585b486ffd9fd4ef43870d6d01
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung:board: check board type before init exynos fb
Przemyslaw Marczak [Thu, 18 Sep 2014 11:17:57 +0000 (13:17 +0200)]
samsung:board: check board type before init exynos fb

For CONFIG_OF_MULTI some boards doesn't use frame buffer,
so the board type is now checked before the fb configuration.

Change-Id: Ide9ba4893b89ccc84ea84482324dd39ed8fbd48c
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung:board: don't call set_board_type() for CONFIG_OF_MULTI
Przemyslaw Marczak [Thu, 18 Sep 2014 11:02:19 +0000 (13:02 +0200)]
samsung:board: don't call set_board_type() for CONFIG_OF_MULTI

For this config the set_board_type() is called much more earlier
- in the function setup_fdt(), so the second call in the board file
is unneeded.

Change-Id: I71037c593d00f7bde95a0880787e64d0d09ff173
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agothor: check board type before display for CONFIG_OF_MULTI.
Przemyslaw Marczak [Thu, 18 Sep 2014 13:27:59 +0000 (15:27 +0200)]
thor: check board type before display for CONFIG_OF_MULTI.

For multi platform binary, it is required to check
the board type because not every board supports display.

Change-Id: Ia4153d58f48846a0bec6e9dc90ea17d87d5da096
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoexynos_fb.c: lcd_ctrl_init(): check board before init lcd
Przemyslaw Marczak [Tue, 29 Jul 2014 12:38:04 +0000 (14:38 +0200)]
exynos_fb.c: lcd_ctrl_init(): check board before init lcd

Change-Id: Ie8219913e8501fc2180d5d96f19844d3e08a6326
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoexynos4-dt.h: enable generic file system commands
Przemyslaw Marczak [Tue, 29 Jul 2014 12:35:53 +0000 (14:35 +0200)]
exynos4-dt.h: enable generic file system commands

Change-Id: Ibfd834403381d18f27825a19807517ad06097146
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung:board: run lcd menu only on trats2 for CONFIG_OF_MULTI
Przemyslaw Marczak [Tue, 29 Jul 2014 12:32:03 +0000 (14:32 +0200)]
samsung:board: run lcd menu only on trats2 for CONFIG_OF_MULTI

Change-Id: I02baeb60125f695e30c138b7311910731f5d9f40
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung:misc: add call to get_board_name() for CONFIG_OF_MULTI
Przemyslaw Marczak [Wed, 30 Jul 2014 12:17:54 +0000 (14:17 +0200)]
samsung:misc: add call to get_board_name() for CONFIG_OF_MULTI

Change-Id: I236f5d23122f02ef759d7e79354a9af788627968
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung:board: dram_init(): alloc memory to store fdt dram info
Przemyslaw Marczak [Thu, 18 Sep 2014 14:20:29 +0000 (16:20 +0200)]
samsung:board: dram_init(): alloc memory to store fdt dram info

For CONFIG_OF_MULTI the dram_init() function gets memory information
from the device tree blob by the call to fdtdec_decode_memory().
The same is done second time in dram_init_banksize() - this was the
simplest because board info structure is not initialized at dram_init()
stage.

This change uses malloc and gd->priv pointer to store the memory banks
parameters and next uses it in dram_init_banksize().

Thanks to this change, the boot time decreases, because, the function
fdtdec_decode_memory() is called only once.

Change-Id: I8f357c6a641d4440f32d2fe24d7e1e2dc5bc4a3d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agou-boot:global data: add new field 'void *priv' for CONFIG_OF_MULTI
Przemyslaw Marczak [Thu, 18 Sep 2014 14:15:13 +0000 (16:15 +0200)]
u-boot:global data: add new field 'void *priv' for CONFIG_OF_MULTI

This field is required for storing detected platform info
before the relocation or "bd_t" initialization.

Change-Id: Idbe987252079e5bf863adbec4fd5fc5edc2d8829
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung:board: init dram info based on memory node in fdt
Przemyslaw Marczak [Mon, 28 Jul 2014 15:43:23 +0000 (17:43 +0200)]
samsung:board: init dram info based on memory node in fdt

Change-Id: I3677f0ab0b4aed264de8af37e87b081f66a36b97
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agofdtdec: add function: fdtdec_decode_memory()
Przemyslaw Marczak [Mon, 28 Jul 2014 09:16:47 +0000 (11:16 +0200)]
fdtdec: add function: fdtdec_decode_memory()

This function can be used for decode memory node from device tree file.
Currently supports decoding of a single memory node with a multiple ranges
specified by the reg property with size of address and size cells specified
in a root node.

Function parameters:
- blob: ptr to device tree
- start: ptr to banks start address array
- size: ptr to banks size array
- max_banks: max number of banks to fill

Two of args: start or size can be NULL e.g. if only each bank size is needed.

Sample use case:
memory {
device_type = "memory";
reg = <0x40000000 ... 0x10000000 ...
       0x50000000 ... 0x10000000 ...
       ...        ... ...        ...>;
      };

Change-Id: I2f3defb89cf62d81377fb7882dbbae79b4472af2
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agofdt_support: remove type static in fdt_read_prop()
Przemyslaw Marczak [Mon, 28 Jul 2014 09:00:34 +0000 (11:00 +0200)]
fdt_support: remove type static in fdt_read_prop()

Change-Id: Iaff9eff27dba6fc6f13d031a96f310361648acfd
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoarch:arm:dts: odroid/trats2: add memory device type
Przemyslaw Marczak [Wed, 23 Jul 2014 09:41:41 +0000 (11:41 +0200)]
arch:arm:dts: odroid/trats2: add memory device type

Change-Id: I80c42c8c390ccba1e748671b7f85d5b71371bbe9
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agocommon:board_f:setup_fdt: set fdt addr by get_board_fdt() for CONFIG_OF_MULTI
Przemyslaw Marczak [Tue, 8 Jul 2014 10:47:25 +0000 (12:47 +0200)]
common:board_f:setup_fdt: set fdt addr by get_board_fdt() for CONFIG_OF_MULTI

Change-Id: I47039ce703c6bd8be18dc932ca67936f1ca5946b
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung: misc: menu: new option: battery charge level
Przemyslaw Marczak [Mon, 7 Apr 2014 15:21:13 +0000 (17:21 +0200)]
samsung: misc: menu: new option: battery charge level

This change adds new option to lcd menu which allows
check battery state. In case if battery level is greater
than boot level threshold (20%), battery screen is not
displayed. So this menu option is useful in such situations.

Change-Id: I13e7e57516766fea787855b914d2884343cc33a5
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotrats2: enable command battery of interactive charger
Przemyslaw Marczak [Tue, 25 Mar 2014 11:32:22 +0000 (12:32 +0100)]
trats2: enable command battery of interactive charger

This change adds two features on trats2 device:
- show battery charge level by displaying battery screen
- manually start interactive charger if needed

Usage:
command: "battery"
options: "state" or "charge"

Change-Id: Ie000edfc2fb6f2938ddf1e17611fdc5045169830
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotrats2: add support to interactive charger
Przemyslaw Marczak [Mon, 24 Mar 2014 09:40:12 +0000 (10:40 +0100)]
trats2: add support to interactive charger

This commit adds support to interactive charger api which means an
implementation of listed functions:
- charger_enable()  - enable the charger.Charger can be enabled
      automatically if the device power on state
      is triggered by USB cable connection.

- charger_type()    - this function returns device type connected
      to usb port of device. For charger api matters
      only positive value.

- battery_present() - check if battery is connected (DETBAT pin)

- battery_state()   - check battery charge level. Returns percent value.

- low_power_mode()  - switch SOC into low power mode which covers:
      - disable cores: 1, 2, 3,
      - disable SOC unused power domains,
      - decrease CPU clock to 200 MHz

After low_power_mode() function call, device should be restarted,
which is implemented in interactive charger.

Change-Id: I7e664fab29c45c2d29dc57a2faa887d88530d8f3
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung: misc: new command: battery and config CONFIG_CMD_BATTERY
Przemyslaw Marczak [Tue, 25 Mar 2014 11:27:05 +0000 (12:27 +0100)]
samsung: misc: new command: battery and config CONFIG_CMD_BATTERY

This feature allows to enable interactive charger by command line
or use interactive charger for display battery charge level.

Usage:
- battery [<state>] [<charge>]

Option "state" will display battery screen for 2 seconds.
Option "charge" will start interactive charger mode.

Interactive charger mode can be stopped by:
- pressing CTRL+C keys combination,
or device reset by:
- pressing PWR key for 5 seconds (only if SOC > 20% - one grey bar),
- pressing PWR key for 10 seconds, which is PMIC reset.

Change-Id: I622830198f6cba4f0fa30798b02aa003c55332bb
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung: misc: new feature: common interactive charger
Przemyslaw Marczak [Fri, 21 Mar 2014 15:15:50 +0000 (16:15 +0100)]
samsung: misc: new feature: common interactive charger

This change adds common interactive charger feature with
display support.

New config: CONFIG_INTERACTIVE_CHARGER

New functions:
- battery() - which takes one of commands parameter:
    BOOT_CHECK: check battery present, low power mode;
check battery charge level, draw battery screen
    STATE:      display battery screen with current state of charge
this is for command line use
    CHARGE:     start interactive charger for every battery charge level
this is also for command line use

- interactive_charger() - loop function for charge the battery and do:
  - update of battery screen,
  - update charge animation,
  - check for exit condition (if charge level >= 20%)
  - clear screen after 10 seconds animation
  - draw battery on clean screen if any key pressed

There are few constants defined for this feature:
- CHARGE_TRESHOLD_BOOT:         20 (20 percent of charge)
- CHARGE_DISPLAY_TIMEOUT_SEC:   10 (time for animation display)
- CONNECT_CHARGER_TIMEOUT_SEC:  5 (time for connect charger animation)
- CHARGE_PWR_KEY_RESET_TIMEOUT: 3 (time for PWR key press to reset device)

Battery charge level cases:
 - 0-20 % - don't allow to boot and then:
    - enable charger if connected and start charge animation
      or if no charger:
    - display 5 sec charger animation and turn off the device

- > 20 %  - don't display battery screen and boot device

Charge mode can be break by keys VOLUP + VOLDOWN. If charge level > 20%
then device can be enabled by pressing PWR key for a time defined in
CHARGE_PWR_KEY_RESET_TIMEOUT.

Change-Id: I15066a4b86c89f1f0124b072a0aeb7246b29b279
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agolib: tizen: add battery interactive charger screens
Przemyslaw Marczak [Mon, 24 Mar 2014 14:26:10 +0000 (15:26 +0100)]
lib: tizen: add battery interactive charger screens

New images:
- battery frame: 200x380px, 16bpp,
  batery level area in frame: 170x300px
- battery bar: 160x50px, 16bpp, grey and red,
  (for 5 bars in battery frame with 8px interelement gap)
- charge screen; charge screen clean images: 128x120px, 16bpp
- charge screen indicator; vertical and horizontal
  indicator clean images: 8x8px, 16bpp

Library functions:

For battery screen:
- draw_battery_screen()   - draw empty battery frame
- draw_battery_state()    - fill battery frame with charge bars
                            to a given percent
For charge animation:
- draw_charge_screen()    - draw a small phone connected to a cable
                            (under the battery)
- clean_charge_screen()   - cleans above screen
- draw_charge_animation() - display an animation with
                            a point running on a cable
                            (on a charge screen)

For low battery state and no charger connected:
- draw_connect_charger_animation() - draw and clean charge
                                     screen respectively

Library is ready to use gzipped images
but this commit adds only bmp images.

Changes for v2015.10-rc5:
- correct usage of removed typedef 'bmp_image_t'

Change-Id: I25a527b07b809b9105b6d4d8c29aa01e47224134
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotrats2: add implementation of board_poweroff() and CONFIG_CMD_POWEROFF
Przemyslaw Marczak [Fri, 21 Mar 2014 10:48:54 +0000 (11:48 +0100)]
trats2: add implementation of board_poweroff() and CONFIG_CMD_POWEROFF

This change adds implementation of function board_poweroff() which
turns off the device off by setting PSHOLD gpio to low state which
is a power off signal for main PMIC.

Change-Id: Iae97fb81d7e7e243079ac18d03f4fd917c50b62e
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoarch:arch:exynos: add exynos ps hold control output setting
Przemyslaw Marczak [Wed, 23 Apr 2014 12:57:19 +0000 (14:57 +0200)]
arch:arch:exynos: add exynos ps hold control output setting

Change-Id: I4ee074278c55198030aa5092f36e61e3c6efc487
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agoarch:arm:exynos: power.h define exynos4x12 power subsystem structure
Przemyslaw Marczak [Wed, 26 Mar 2014 15:00:54 +0000 (16:00 +0100)]
arch:arm:exynos: power.h define exynos4x12 power subsystem structure

Change-Id: Icf6cb80529f3fb5511e440f572e0870359e6e37c
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agocommon: add command power off - to switch off the device by command
Przemyslaw Marczak [Mon, 9 Jun 2014 06:25:09 +0000 (08:25 +0200)]
common: add command power off - to switch off the device by command

This change introduces new config:
- CONFIG_CMD_POWEROFF - which enables cmd/poweroff.c

This requires implementation of function board_poweroff() which
is yet declared in include/common.h

Implementation of board_poweroff() should:
1.a. turn off the device
     or
1.b. print info to user about turn off ability
2.   never back to caller

Usage is simple: "power off"

Changed for v2016.03:
- Relocated from common directory to cmd directory
- Renamed from cmd_poweroff to poweroff

Change-Id: Ia5fe73250e2ac29d0868b80bcd867bae2aa8d5be
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agopackaging: Adding .spec file for u-boot project
Chanho Park [Fri, 10 Jan 2014 01:48:52 +0000 (10:48 +0900)]
packaging: Adding .spec file for u-boot project

Change-Id: I5dd90f728a9f0f951afda5634f2509cbb3eccc95
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Jacek Pielaszkiewicz <j.pielaszkie@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
8 years agotools: dtc: Add source to build the dtc compiler
Lukasz Majewski [Tue, 25 Mar 2014 16:33:34 +0000 (17:33 +0100)]
tools: dtc: Add source to build the dtc compiler

Newest u-boot (v2014.04) requires device tree compiler (DTC) version
at least 1.4.

Change-Id: Ie62778e3391cbf3b586221839cf53362c5f8cdff
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agotrats/trats2: enable bootloader signature
Inha Song [Fri, 21 Feb 2014 17:55:15 +0000 (18:55 +0100)]
trats/trats2: enable bootloader signature

Enable of this config will now require making binary signature.
From now, manually build sequence should looks like this:
 CROSS_COMPILE=...
 make mrproper
 make trats2_config
 make
 ./tools/mkimage_signed.sh u-boot-dtb.bin trats2_config

The output signed binary is: u-boot-mmc.bin

Change-Id: I9a2c86d2f24a050ff3738adb9dbd7d5914ff16d8
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agogadged: thor: add board signature check when download 'u-boot-mmc.bin'
Inha Song [Mon, 28 Oct 2013 06:52:53 +0000 (15:52 +0900)]
gadged: thor: add board signature check when download 'u-boot-mmc.bin'

This patch adds checking the special signature of downloaded U-Boot binary.
The new function check_board_signature() is called before do dfu_write()
in thor gadged code.

The board signature is checked for:
- the running U-Boot
- downloaded 'u-boot-mmc.bin'
at offset of binary start defined by:
- (CONFIG_SIGN_IMAGE_SIZE - HDR_SIZE)

The download can succeed when signatures are equal.

The default U-Boot image size defined by CONFIG_SIGN_IMAGE_SIZE is 1MB.

Other changes:
- print info about running/downloading U-Boot signature
- print info about wrong image signature/size
- don't allow downloading unsigned or signed wrong U-Boot image
- allow download any image if no signature found at running U-Boot

The first version added by:
Signed-off-by: Inha Song <ideal.song@samsung.com>
Upgrade:
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agotools: add script: mkimage_signed.sh for sign u-boot binary
Przemyslaw Marczak [Thu, 10 Apr 2014 13:03:40 +0000 (15:03 +0200)]
tools: add script: mkimage_signed.sh for sign u-boot binary

This script appends given binary image by signature header.
Script takes two arguments:
- @arg1: binary name
- @arg2: config name

Script usage:
./mkimage_signed.sh binary.img config_name
e.g.:
./mkimage_signed.sh u-boot-dtb.bin trats2_config

Sign header is stored on last 512 bytes of input binary.
Maximum imput binary size is 1MB - 512 Bytes = 1048064 Bytes.

The maximum size is limited by first bootloader (s-boot).
Now it is configured to load exactly 2048 blocks (1MB).
Current u-boot-dtb.bin size for trats2 is less than 600 KBytes,
so the size limit should not be an issue.

Change-Id: Ia7472be693df8d4135312971d963d27f2ea20f0f
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agolib: tizen: thor screen update
Przemyslaw Marczak [Wed, 2 Apr 2014 14:13:59 +0000 (16:13 +0200)]
lib: tizen: thor screen update

Now cable connection message is displayed on thor screen.
When cable is connected then only unneeded lcd console lines are overwritten.

Main changes:
- add new function: draw_thor_connected()
- update function draw_thor_screen()
- usb: gadget: thor:
  - move call to draw_thor_screen(),
  - add call to draw_thor_connected()

other change:
- remove draw_thor_init_screen() function

Changes for v2015.04-rc1:
- Replace <lcd.h> to <lcd_console.h>

Changes for v2015.10-rc5
- correct usage of removed typedef 'bmp_image_t'

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agousb: thor: add screen support
Inha Song [Fri, 11 Oct 2013 08:50:24 +0000 (17:50 +0900)]
usb: thor: add screen support

cmd_thordown.c:
- add libtizen header
- change error handling for thor init
- add call to draw_thor_fail_screen() on error

f_thor.c:
- thor_init(): return -EINTR on ctrl+c or if power key was pressed 3 times
- thor_rx_data(): return -EINTR when pressed ctrl+c on data receiving
- add display simple info screen before cable is not connected
- add display download screen when connection is established
- update download progress bar if data receiving

Change-Id: Ia89ef48c6c2faa5eda5dda5c5b3951e675eec03b
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agosamsung: misc: check_keys(), key_pressed() - remove type static.
Przemyslaw Marczak [Mon, 10 Feb 2014 15:28:30 +0000 (16:28 +0100)]
samsung: misc: check_keys(), key_pressed() - remove type static.

This patch removes type "static" from those functions declaration.

Change-Id: I2244ca3568b73251401e5102f26cc113ea69c1a4
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agolibtizen: add download logo and download progress bar
Przemyslaw Marczak [Fri, 7 Feb 2014 14:03:41 +0000 (15:03 +0100)]
libtizen: add download logo and download progress bar

Added features:
- add screen with exit info if no cable is connected
- download logo with progress bar after after THOR init
- downlaod failure screen on error
- PIT version, U-boot version on download screen
- function for update progess bar when downloading is going on

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agocommon: lcd: extend lcd api by function lcd_get_position_cursor()
Lukasz Majewski [Mon, 16 Feb 2015 16:40:25 +0000 (17:40 +0100)]
common: lcd: extend lcd api by function lcd_get_position_cursor()

Changes for v2015.04-rc1:
- Moving lcd console related code to lcd_console.c

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
8 years agoTrats: Setup: CLK_GATE_BLOCK - enable all clocks
Przemyslaw Marczak [Wed, 26 Feb 2014 08:17:45 +0000 (09:17 +0100)]
Trats: Setup: CLK_GATE_BLOCK - enable all clocks

This change allows boot kernel 3.10 on trats

Change-Id: Ic7f1672d9300a32fed9fa6d8f6fc30f118326a83
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agovideo:lcd:s6e8ax0: increase screen gamma.
Hyungwon Hwang [Fri, 15 Nov 2013 07:10:42 +0000 (16:10 +0900)]
video:lcd:s6e8ax0: increase screen gamma.

Change gamma table to increase the brightness of s6e8ax0 panel.

Change-Id: I6b21022fb90bbb14160c0426a776d73c9590345b
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
8 years agoPrepare v2016.03 v2016.03
Tom Rini [Mon, 14 Mar 2016 14:20:21 +0000 (10:20 -0400)]
Prepare v2016.03

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agomx6slevk: Fix the power up of the Ethernet PHY
Fabio Estevam [Fri, 11 Mar 2016 13:50:22 +0000 (10:50 -0300)]
mx6slevk: Fix the power up of the Ethernet PHY

GPIO4_21 is the LAN8720 power pin, not the LAN8720 reset pin.

Fix that, so that we can have Ethernet functional again.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agosf: Correct data types in stm_is_locked_sr()
Marek Vasut [Fri, 11 Mar 2016 02:20:16 +0000 (03:20 +0100)]
sf: Correct data types in stm_is_locked_sr()

The stm_is_locked_sr() function is picked from Linux kernel. For reason
unknown, the 64bit data types used by the function and present in Linux
were replaced with 32bit unsigned ones, which causes trouble.

The testcase performed was done using ST M25P80 chip.
The command used was:
 => sf protect unlock 0 0x10000

The call chain starts in stm_unlock(), which calls stm_is_locked_sr()
with negative ofs argument. This works fine in Linux, where the "ofs"
is loff_t, which is signed long long, while this fails in U-Boot, where
"ofs" is u32 (unsigned int). Because of this signedness problem, the
expression past the return statement to be incorrectly evaluated to 1,
which in turn propagates back to stm_unlock() and results in -EINVAL.

The correction is very simple, just use the correctly sized data types
with correct signedness in the function to make it work as intended.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agodm: ti_qspi: Fix conversion of address to a pointer
Lokesh Vutla [Sat, 5 Mar 2016 11:13:06 +0000 (16:43 +0530)]
dm: ti_qspi: Fix conversion of address to a pointer

TI QSPI driver directly typecasts fdt_addr_t to a pointer. This is
not strictly correct, as it gives a build warning when fdt_addr_t is u64.
So, use map_physmem for a proper typecasts.

This is inspired by commit 167efe01bc5a9 ("dm: ns16550: Use an address
instead of a pointer for the uart base")

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agoexynos5: common: Enable CONFIG_USB_ETHER_RTL8152 ethernet support
Anand Moon [Sat, 5 Mar 2016 09:08:23 +0000 (19:38 +1030)]
exynos5: common: Enable CONFIG_USB_ETHER_RTL8152 ethernet support

Enable CONFIG_USB_ETHER_RTL8152 support for Odroid XU4 which
has support for RTL8153-CG gigabit Ethernet adapter,
connected over USB 3.0.

commit 9dc8ba19c50fc0b1623c654bcfe6caa903a4c36c added support
for Realtek 8152/8153 driver.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Thu, 10 Mar 2016 15:55:06 +0000 (10:55 -0500)]
Merge git://git.denx.de/u-boot-rockchip

8 years agorockchip: rk3288: correct sdram setting
Chris Zhong [Mon, 7 Mar 2016 06:51:13 +0000 (14:51 +0800)]
rockchip: rk3288: correct sdram setting

The DMC driver in v3.14 kernel[0] get the ddr setting from PMU_SYS_REG2,
and it expects uboot to store the value using a same protocol. But now
the ddr setting value is different with DMC, so if you enable the DMC,
system would crash in kernel. Correct the sdram setting here, according
to the requirements of kernel.

[0]
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/
chromeos-3.14/drivers/clk/rockchip/clk-rk3288-dmc.c

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: make configure_emmc() empty for Firefly-RK3288
FUKAUMI Naoki [Sat, 5 Mar 2016 13:32:02 +0000 (13:32 +0000)]
rockchip: make configure_emmc() empty for Firefly-RK3288

on v2016.03-rc3, size of SPL image compiled by gcc 5.3.0 is too large for
Firefly-RK3288. (it's fine for Rock2)

$ gcc --version
gcc (Ubuntu/Linaro 5.3.0-3ubuntu1~14.04) 5.3.0 20151204
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ./tools/mkimage -n rk3288 -T rksd -d spl/u-boot-spl-dtb.bin u-boot-spl-dtb.img
Warning: SPL image is too large (size 0x80d0) and will not boot

to reduce size of SPL image, this patch makes configure_emmc() empty for
Firefly-RK3288 as same as Rock2.

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-By: Vagrant Cascadian <vagrant@debian.org>
8 years agorockchip: rk3036: change ddr frequency to 400M
Lin Huang [Wed, 17 Feb 2016 07:55:05 +0000 (15:55 +0800)]
rockchip: rk3036: change ddr frequency to 400M

emac may use dpll as clock parent, and it request the clock frequency
multiples of 50, so change ddr frequency to 400M.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoMIPS: pic32mzdask: use CONFIG_USE_PRIVATE_LIBGCC=y
Daniel Schwierzeck [Wed, 9 Mar 2016 10:30:00 +0000 (11:30 +0100)]
MIPS: pic32mzdask: use CONFIG_USE_PRIVATE_LIBGCC=y

MIPS EL boards should define CONFIG_USE_PRIVATE_LIBGCC=y to work
with EB-only toolchains like the one from kernel.org. If one do
not globally set CONFIG_USE_PRIVATE_LIBGCC=y, the build fails with:

/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o): compiled for a big endian system and target is little endian
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o): endianness incompatible with that of the selected emulation
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: failed to merge target specific data of file /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_lshrdi3.o)
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o): compiled for a big endian system and target is little endian
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o): endianness incompatible with that of the selected emulation
/opt/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-ld.bfd: failed to merge target specific data of file /opt/gcc-4.9.0-nolibc/mips-linux/bin/../lib/gcc/mips-linux/4.9.0/libgcc.a(_ashldi3.o)
/work/git-trees/u-boot-mips/Makefile:1171: recipe for target 'u-boot' failed

One example for a failing build is Travis CI.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Purna Chandra Mandal <purna.mandal@microchip.com>
8 years agoMIPS: fix mips_cache fallback without __builtin_mips_cache
Matthias Schiffer [Sat, 5 Mar 2016 03:15:40 +0000 (04:15 +0100)]
MIPS: fix mips_cache fallback without __builtin_mips_cache

The "R" constraint supplies the address of an variable in a register. Use
"r" instead and adjust asm to supply the content of addr in a register
instead.

Fixes: 2b8bcc5a ("MIPS: avoid .set ISA for cache operations")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomalloc: remove !gd handling
Stephen Warren [Sat, 5 Mar 2016 17:30:53 +0000 (10:30 -0700)]
malloc: remove !gd handling

Following the previous patch, malloc() is never called before gd is set,
so we can remove the special-case check for this condition.

This reverts commit 854d2b9753e4 "dlmalloc: ensure gd is set for early
alloc".

Cc: Rabin Vincent <rabin@rab.in>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agomalloc: use hidden visibility
Stephen Warren [Sat, 5 Mar 2016 17:30:52 +0000 (10:30 -0700)]
malloc: use hidden visibility

When running sandbox, the following phases occur, each with different
malloc implementations or behaviors:

1) Dynamic linker execution, using the dynamic linker's own malloc()
implementation. This is fully functional.

2) After U-Boot's malloc symbol has been hooked into the GOT, but before
any U-Boot code has run. This phase is entirely non-functional, since
U-Boot's gd symbol is NULL and U-Boot's initf_malloc() and
mem_malloc_init() have not been called.

At least on Ubuntu Xenial, the dynamic linker does make both malloc() and
free() calls during this phase. Currently these free() calls crash since
they dereference gd, which is NULL.

U-Boot itself makes no use of malloc() during this phase.

3) U-Boot execution after gd is set and initf_malloc() has been called.
This is fully functional, albeit via a very simple malloc()
implementation.

4) U-Boot execution after mem_malloc_init() has been called. This is fully
functional with a complete malloc() implementation.

Furthermore, if code that called malloc() during phase 1 calls free() in
phase 3 or later, it is likely that heap corruption will occur, since
U-Boot's malloc implementation will assume the pointer is part of its own
heap, although it isn't. I have not actively observed this happening.

To prevent phase 2 from happening, this patch makes all of U-Boot's malloc
library public symbols have hidden visibility. This prevents them from
being hooked into the GOT, so only code in the U-Boot binary itself
actually calls them; any other code will call into the standard C library
malloc(). This also avoids the "furthermore" issue mentioned above.

I have seen references to this GCC pragma in blog posts from 2008, and
RHEL5's ancient gcc appears to accept it fine, so I believe it's quite
safe to use it without checking gcc version.

Cc: Rabin Vincent <rabin@rab.in>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: Fix building with LLVM
Tom Rini [Sat, 5 Mar 2016 19:07:44 +0000 (14:07 -0500)]
sandbox: Fix building with LLVM

- The macro __BIGGEST_ALIGNMENT__ is gcc-specific.  If it is not defined
  we'll just assume 16.  This is correct for at least the common cases
  and LLVM does not provide an equivalent macro.
- When linking U-Boot we're passing -T to the linker, and while gcc will
  just pass this along with LLVM we need to be specific.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoomap3: Use raw SPL by default for mmc1
Alexander Graf [Tue, 1 Mar 2016 08:56:34 +0000 (09:56 +0100)]
omap3: Use raw SPL by default for mmc1

Now that we fall back to the FS code path when we don't find u-boot
at the raw sector offset, there is no good reason to not default to
raw boot.

With this patch, I can successfully boot u-boot from a raw sector
offset on beagle-xm.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoapi: Export API structure address as an environment variable
Stanislav Galabov [Tue, 1 Mar 2016 12:19:04 +0000 (14:19 +0200)]
api: Export API structure address as an environment variable

This patch makes the U-Boot api export its structure address as an environment
variable, so it can be used to directly hint FreeBSD's loader of api's location.

The relevant FreeBSD loader change is currently under review at:
https://reviews.freebsd.org/D5492

Signed-off-by: Stanislav Galabov <sgalabov@gmail.com>
8 years agoOMAP3: am3517_evm: Add NAND MTD partitions with UBI/UBIFS support
Derald D. Woods [Sat, 5 Mar 2016 19:19:59 +0000 (13:19 -0600)]
OMAP3: am3517_evm: Add NAND MTD partitions with UBI/UBIFS support

- Add required UBI/UBIFS config definitions
- Add reasonable MTD partition layout
- Remove JFFS2 config definitions
- Drop some CFI verbage and definitions
- Make comment 'one-liners' truly one line
- Improve readability and content arrangement

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoOMAP3: am3517_evm: Use BCH8 ECC for NAND
Derald D. Woods [Sat, 5 Mar 2016 19:19:58 +0000 (13:19 -0600)]
OMAP3: am3517_evm: Use BCH8 ECC for NAND

Select 8-bit BCH ecc-scheme with s/w based error correction
- OMAP_ECC_BCH8_CODE_HW_DETECTION_SW

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: uniphier: allow debug_ll_init() to do nothing for unknown SoCs
Masahiro Yamada [Mon, 7 Mar 2016 11:29:41 +0000 (20:29 +0900)]
ARM: uniphier: allow debug_ll_init() to do nothing for unknown SoCs

This function should just return for unknown SoCs rather than writing
unexpected values to registers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER
Masahiro Yamada [Fri, 4 Mar 2016 06:56:31 +0000 (15:56 +0900)]
pinctrl: uniphier: guard uniphier directory with CONFIG_PINCTRL_UNIPHIER

CONFIG_PINCTRL_UNIPHIER is more suitable than CONFIG_ARCH_UNIPHIER
to guard the drivers/pinctrl/uniphier directory.

The current CONFIG_PINCTRL_UNIPHIER_CORE is a bit long, so rename it
into CONFIG_PINCTRL_UNIPHIER.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: set input-enable before pin-muxing
Masahiro Yamada [Fri, 4 Mar 2016 06:56:16 +0000 (15:56 +0900)]
pinctrl: uniphier: set input-enable before pin-muxing

While IECTRL is disabled, input signals are pulled-down internally.
If pin-muxing is set up first, glitch signals (Low to High transition)
might be input to hardware blocks.

Bad case scenario:
[1] The hardware block is already running before pinctrl is handled.
   (the reset is de-asserted by default or by a firmware, for example)
[2] The pin-muxing is set up.  The input signals to hardware block
   are pulled-down by the chip-internal biasing.
[3] The pins are input-enabled.  The signals from the board reach the
    hardware block.

Actually, one invalid character is input to the UART blocks for such
SoCs as PH1-LD4, PH1-sLD8, where UART devices start to run at the
power on reset.

To avoid such problems, pins should be input-enabled before muxing.

[ ported from Linux commit bac7f4c1bf5e7c6ccd5bb71edc015b26c77f7460 ]

Fixes: 5dc626f83619 ("pinctrl: uniphier: add UniPhier pinctrl core support")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: fix build error when CONFIG_CMD_DDRMPHY_DUMP=y
Masahiro Yamada [Fri, 4 Mar 2016 06:54:29 +0000 (15:54 +0900)]
ARM: uniphier: fix build error when CONFIG_CMD_DDRMPHY_DUMP=y

The build fails if compiled with CONFIG_CMD_DDRMPHY_DUMP=y since commit
46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data").

Fixes: 46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: document how-to-build for Ace and Sanji boards
Masahiro Yamada [Tue, 1 Mar 2016 04:10:37 +0000 (13:10 +0900)]
ARM: uniphier: document how-to-build for Ace and Sanji boards

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sat, 5 Mar 2016 01:53:50 +0000 (20:53 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

8 years agousb: dwc2: disable erroneous overcurrent condition
Dinh Nguyen [Sat, 5 Mar 2016 00:57:04 +0000 (18:57 -0600)]
usb: dwc2: disable erroneous overcurrent condition

For the case where an external VBUS is used, we should enable the external
VBUS comparator in the driver. This would prevent an unnecessary overcurrent
error which would then disable the host port.

The overcurrent condition was happening on the SoCFPGA Cyclone5 devkit, thus
USB was not working on the devkit. This patch fixes that problem.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
8 years agoboard: tbs2910: Fix eMMC BOOTCFG value
Soeren Moch [Tue, 9 Feb 2016 15:53:27 +0000 (16:53 +0100)]
board: tbs2910: Fix eMMC BOOTCFG value

Fix the BOOTCFG value for eMMC in the same way as commit
  214c3f0f9921250eb336c7effadcc16158ea9df5
  [imx: MX6DQ{P}/DL:SABRESD Fix bmode eMMC failure]
did for sabresd.

Signed-off-by: Soeren Moch <smoch@web.de>
8 years agomx53ard: Move to booting zImage
Fabio Estevam [Tue, 23 Feb 2016 18:18:54 +0000 (15:18 -0300)]
mx53ard: Move to booting zImage

Move to booting a zImage kernel by default to align with the other
i.MX boards.

While at it, adjust the fdt_addr so that we can boot a standard
mainline kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agomx6qarm2: Update maintainer's emails
Fabio Estevam [Mon, 22 Feb 2016 17:52:55 +0000 (14:52 -0300)]
mx6qarm2: Update maintainer's emails

Use the new NXP emails.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoMAINTAINERS: Update Peng Fan's email address
Fabio Estevam [Sun, 21 Feb 2016 12:57:23 +0000 (09:57 -0300)]
MAINTAINERS: Update Peng Fan's email address

Use Peng Fan's new NXP email address in MAINTAINERS files.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>