platform/kernel/u-boot.git
8 years agoOdroid-XU3: Remove the duplicated definition 94/39694/1 accepted/tizen/common/20150522.093834 accepted/tizen/mobile/20150526.000914 accepted/tizen/wearable/20150526.000906 submit/tizen/20150522.044923 submit/tizen/20150522.080348 submit/tizen/20150522.085304
Inha Song [Thu, 21 May 2015 02:15:02 +0000 (11:15 +0900)]
Odroid-XU3: Remove the duplicated definition

This patch remove the duplicated definition in odroid-xu3 config header.
These definitions are also defined in the same file.

Change-Id: I4d2c54d5309189225c9ba1c8e191d31142ec6bde
Signed-off-by: Inha Song <ideal.song@samsung.com>
8 years agoOdroid-XU3: Change root partition name to rootfs 93/39693/1
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>
9 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>
9 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>
9 years agousb: f_mass_storage: fix decrease the delays that for assure corret transmission...
Inha Song [Wed, 11 Mar 2015 04:11:26 +0000 (13:11 +0900)]
usb: f_mass_storage: fix decrease the delays that for assure corret transmission completion

This patch fix decrease the delays for assure corret transmision completion in UMS
to work CTRL+C with UMS on XU3.

Signed-off-by: Inha Song <ideal.song@samsung.com>
9 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>
9 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>
9 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>
9 years agosamsung: usb: phy: Support for DWC3 PHY
Lukasz Majewski [Tue, 3 Mar 2015 13:10:24 +0000 (14:10 +0100)]
samsung: usb: phy: Support for DWC3 PHY

New files, namely samsung_usb_phy.c and samsung-usb-phy-uboot.h have
been added to u-boot to provide proper PHY handling at Exynos5 SoCs.

This code is used thereafter in the board_usb_init() call.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agoarm: exynos: USB3 PHY base definition for Exynos5 SoCs
Lukasz Majewski [Tue, 3 Mar 2015 13:06:00 +0000 (14:06 +0100)]
arm: exynos: USB3 PHY base definition for Exynos5 SoCs

After that change it would be possible to call samsung_get_base_usb3_phy()
function to get proper base address

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
9 years agoARMv7: S5P: change output blank for clean output
Inha Song [Wed, 14 Jan 2015 02:26:29 +0000 (11:26 +0900)]
ARMv7: S5P: change output blank for clean output

This patch change output blank for more clean output.

Change-Id: Ibd9cde9da04608f9c8815d6eba7822da05e31e21
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 years agoExynos5422: Change cpu_id to 0x5422 from 0x5800
Inha Song [Wed, 14 Jan 2015 02:12:35 +0000 (11:12 +0900)]
Exynos5422: Change cpu_id to 0x5422 from 0x5800

This patch change s5p_cpu_id to 0x5422 from 0x5800.

Exynos 5800 processor is a variation product of Exynos 5422 processor.
So, Exynos 5800 also have 0x422 cpu_id.

Change-Id: Icdcde1c1b5357613bf5efd4cea762290fde4fadb
Signed-off-by: Inha Song <ideal.song@samsung.com>
9 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>
9 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>
9 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>
9 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>
9 years agotizen: add tizen_defconfig
Przemyslaw Marczak [Tue, 8 Jul 2014 11:48:16 +0000 (13:48 +0200)]
tizen: add tizen_defconfig

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>
9 years agotizen: add Exynos4 common file
Przemyslaw Marczak [Tue, 8 Jul 2014 11:51:14 +0000 (13:51 +0200)]
tizen: add Exynos4 common file

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>
9 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>
9 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>
9 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>
9 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.

Change-Id: I355736bf40f8fa3697ce0b4546f7702d2e54a0f9
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 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

Change-Id: Ib9f90415b92ec1d67a9bf6b84e7ab5d5deea8a7d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 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>
9 years agosamsung: common: add get_plat_name()/get_board_model()
Przemyslaw Marczak [Wed, 12 Nov 2014 13:49:35 +0000 (14:49 +0100)]
samsung: common: add get_plat_name()/get_board_model()

This patch introduce some cleanup in set_board_info(),
related to the listed code changes:
Change 1:
The name of function get_board_type() was unclear,
so now it is changed to get_board_model().

Change 2:
The previous version of get_board_name() was returning
the platform name - now it returns full boardname.

Change 3:
Add new function get_plat_name() - returns platform name.
This is useful for platform common usage like environment
settings.

Change 4:
Update odroid.c by change get_board_type() to get_board_model().

Change 5:
samsung: misc: set env ${platname} in set_board_info()

Change-Id: Iba16e917f9c88458e1af21892d84ded121aa12cf
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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.

Change-Id: I25a527b07b809b9105b6d4d8c29aa01e47224134
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 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>
9 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>
9 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>
9 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 common/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"

Change-Id: Ia5fe73250e2ac29d0868b80bcd867bae2aa8d5be
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>

9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoClean all defconfigs with savedefconfig
Joe Hershberger [Tue, 12 May 2015 19:46:24 +0000 (14:46 -0500)]
Clean all defconfigs with savedefconfig

In order to reduce merge conflicts and to maintain the simplest possible
defconfig files, we should be using the savedefconfig feature of Kconfig
every time a new feature is added. This keeps the defconfig settings to
a minimum (only those things not default) and keeps them in the same
order as the Kconfig options.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
9 years agoarch: Make board selection choices optional
Joe Hershberger [Tue, 12 May 2015 19:46:23 +0000 (14:46 -0500)]
arch: Make board selection choices optional

By making the board selections optional, every defconfig will include
the board selection when running savedefconfig so if a new board is
added to the top of the list of choices the former top's defconfig will
still be correct.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
9 years agoRevert "stm32f4: fix serial output"
Tom Rini [Sun, 10 May 2015 20:01:48 +0000 (16:01 -0400)]
Revert "stm32f4: fix serial output"

As per the author, we don't need this patch really since the other patch
"stm32f4: fix serial output" superseded it.

This reverts commit 85e5f5b7a7f8d889271f94791606cde62d81d53f.

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agokconfig: Move REGEX to Kconfig
Joe Hershberger [Tue, 21 Apr 2015 22:02:42 +0000 (17:02 -0500)]
kconfig: Move REGEX to Kconfig

Having this as a Kconfig allows it to be a dependent feature.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoppc4xx: Remove sc3 board
Stefan Roese [Thu, 7 May 2015 11:00:23 +0000 (13:00 +0200)]
ppc4xx: Remove sc3 board

As this board seems to be unmaintained for quite some time, and its
not moved to the generic board ingrastructure, lets remove it.

This will also enable us to remove the CONFIG_AUTOBOOT_DELAY_STR2
and CONFIG_AUTOBOOT_STOP_STR2 macros, as this sc3 board is the
only one using one of this macros. A removal patch will follow
soon.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Juergen Beisert <jbeisert@eurodsn.de>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agoserial: fdt: add device tree support for pl01x
Vikas Manocha [Wed, 6 May 2015 18:46:29 +0000 (11:46 -0700)]
serial: fdt: add device tree support for pl01x

This patch adds device tree support for arm pl010/pl011 driver.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoFix broken verify functionality in crc32 command
Joe Hershberger [Tue, 5 May 2015 17:23:53 +0000 (12:23 -0500)]
Fix broken verify functionality in crc32 command

Introduced in change d20a40de9db07de1f1f06a79a4da1cdda5379b75
"Roll crc32 into hash infrastructure"

The crc32 command with no -v expects an optional 3rd argument to be an
address to store the result in. With the -v switch, the last argument
is a crc, not an address. In the case where -v is set, we should set the
HASH_FLAG_ENV flag since that will first look for the value to be a
digest value, which matches the expected API for the crc32 command.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoFix inconsistency of VERIFY defines in cmd_mem
Joe Hershberger [Tue, 5 May 2015 17:23:52 +0000 (12:23 -0500)]
Fix inconsistency of VERIFY defines in cmd_mem

Introduced in change d20a40de9db07de1f1f06a79a4da1cdda5379b75
"Roll crc32 into hash infrastructure"

Use a consistent define to enable the verify feature in crc32 command.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMakefile: add a symbol link tags for ctags
Du Huanpeng [Mon, 4 May 2015 13:26:53 +0000 (06:26 -0700)]
Makefile: add a symbol link tags for ctags

Signed-off-by: Du Huanpeng <u74147@gmail.com>
9 years agostv0991: use fdt for serial port platform data
Vikas Manocha [Sun, 3 May 2015 21:10:35 +0000 (14:10 -0700)]
stv0991: use fdt for serial port platform data

This patch ignores the serial port static platform data at compilation time
in case of device tree control.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agostv0991: fdt: add stv0991 device tree
Vikas Manocha [Sun, 3 May 2015 21:10:34 +0000 (14:10 -0700)]
stv0991: fdt: add stv0991 device tree

This patch adds device tree for the ST Micro stv0991 board & enables
device tree control. Progressively device tree support for the drivers
being used will also be added.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoovero: Fix regression introduced in a6b541b
Arun Bharadwaj [Tue, 28 Apr 2015 23:55:30 +0000 (16:55 -0700)]
overo: Fix regression introduced in a6b541b

U-Boot has been broken on Overo boards since commit
a6b541b09022acb6f7c2754100ae26bd44eed1d9.

This is because the gd pointer is not set early enough anymore,
such that the i2c_set_bus_num in get_board_revision can safely
execute. This results in a console hang at SPL and the boot does
not proceed.

This piece of code is anyway necessary only for really old Overo
boards with revision numbers <= 2410 and not required for the newer
boards. For these older boards, u-boot v2014.10 still works fine.

Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
9 years agoovero: Split overo.c into spl.c, common.c and overo.c
Arun Bharadwaj [Tue, 28 Apr 2015 23:55:29 +0000 (16:55 -0700)]
overo: Split overo.c into spl.c, common.c and overo.c

This separates the SPL-specific code from the u-boot-specific code for
the Overo board following the discussion at
http://lists.denx.de/pipermail/u-boot/2015-April/211622.html

The code is split up into spl.c, overo.c and common.c (which
has the code common to both)

Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
9 years agoomap3: overo: Allow boot with kernel in UBI rootfs
Ash Charles [Tue, 28 Apr 2015 23:17:54 +0000 (16:17 -0700)]
omap3: overo: Allow boot with kernel in UBI rootfs

If regular NAND booting fails to find a valid uImage in the
kernel partition in NAND, try to boot using a zImage and dtb found
in a UBI volume in the rootfs partition.  This is the NAND analog
of mmc zImage booting for device-tree based kernels.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
9 years agoomap3: overo: Use software BCH8 ECC for NAND
Ash Charles [Tue, 28 Apr 2015 23:17:53 +0000 (16:17 -0700)]
omap3: overo: Use software BCH8 ECC for NAND

Overo COMs have NAND flash that requires 4-bit ECC or better except for
the first sector which can use 1-bit ECC.  The boot ROM expects to load
a payload from NAND written using 1-bit hardware-based ECC.  In short,
write SPL to NAND something like this (4 times for redundancy):
 #> nandecc hw
 #> nand write ${loadaddr} 0x0 ${filesize}
 #> nand write ${loadaddr} 0x20000 ${filesize}
 #> nand write ${loadaddr} 0x40000 ${filesize}
 #> nand write ${loadaddr} 0x60000 ${filesize}

Then, switch back to software-based BCH8 for everything else:
 #> nandecc sw bch8

After [1], enlarge the max size of the SPL so the BCH code can fit.

[1] https://www.mail-archive.com/u-boot@lists.denx.de/msg163912.html

Signed-off-by: Ash Charles <ashcharles@gmail.com>
9 years agoovero: Add support for Palo35 expansion board
Ash Charles [Tue, 28 Apr 2015 23:17:52 +0000 (16:17 -0700)]
overo: Add support for Palo35 expansion board

Signed-off-by: Ash Charles <ashcharles@gmail.com>
9 years agoomap3: overo: Add DTS support for TobiDuo expansion
Arun Bharadwaj [Tue, 28 Apr 2015 23:17:51 +0000 (16:17 -0700)]
omap3: overo: Add DTS support for TobiDuo expansion

Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
Signed-off-by: Ash Charles <ashcharles@gmail.com>
9 years agoomap3: overo: Set the Arbor43C 'expansionname'
Ash Charles [Tue, 28 Apr 2015 23:17:50 +0000 (16:17 -0700)]
omap3: overo: Set the Arbor43C 'expansionname'

The Gumstix Arbor43C expansion board [1] uses a customized device tree
file.  When this expansion board is detected, load this file.

[1] https://store.gumstix.com/index.php/products/635/

Signed-off-by: Ash Charles <ashcharles@gmail.com>
9 years agodavinci: restore CONFIG_SPL=y to configs/omapl138_lcdk_defconfig
Peter Howard [Tue, 28 Apr 2015 23:05:57 +0000 (09:05 +1000)]
davinci: restore CONFIG_SPL=y to configs/omapl138_lcdk_defconfig

Signed-off-by: Peter Howard <phoward@gme.net.au>
9 years agocmd_part: fix usage text
maxin.john@enea.com [Mon, 27 Apr 2015 23:44:58 +0000 (01:44 +0200)]
cmd_part: fix usage text

Fix the usage info from:
part part uuid <interface> <dev>:<part>
to
part uuid <interface> <dev>:<part>

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Reviewed-By: Sjoerd Simons <sjoerd.simons@collabora.co.uk
9 years agostm32f4: add serial print port
kunhuahuang [Mon, 27 Apr 2015 19:01:19 +0000 (03:01 +0800)]
stm32f4: add serial print port

Add the stm32F4 board's serial ports support.
User can use it easily.
The user only need to edit the number of the usart.
The patch also fix the serial print out.

Last, this version of patch fix the first patch checkpatch.pl error.
Thanks to Kamil Lulko.

Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
9 years agostm32f4: fix serial output
kunhuahuang [Mon, 27 Apr 2015 18:25:45 +0000 (02:25 +0800)]
stm32f4: fix serial output

This patch fix the serial output.
The source is from Kamil Lulko's "stm32f429-discovery board support"

Thanks, Varcain. I learned a lot.

Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
9 years agospl: spl_mmc: Partition raw boot mode for eMMC
Paul Kocialkowski [Mon, 27 Apr 2015 08:20:23 +0000 (10:20 +0200)]
spl: spl_mmc: Partition raw boot mode for eMMC

This adds support for providing a partition number instead of a sector for eMMC.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
9 years agospl: spl_mmc: Clearer structure in spl_mmc_load_image and cosmetics
Paul Kocialkowski [Mon, 27 Apr 2015 08:20:22 +0000 (10:20 +0200)]
spl: spl_mmc: Clearer structure in spl_mmc_load_image and cosmetics

This refactors spl_mmc_load_image to use a switch/case structure and easier
to understand spl_start_uboot checks. This also introduces some more automatic
fallback on the next mmc boot mode as long as it keeps failing.

Lines that go beyond 80 chars are also reduced by reducing the number of tabs.
Debug and error strings are refctored to match a common style.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
[trini: Fix a thinko in the SPL_EXT_SUPPORT + SPL_OS conversion, make part be
 __maybe_unused]
Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agogpio: stm32_gpio: Use clrsetbits_le32() at appropriate places
Axel Lin [Sun, 26 Apr 2015 02:32:36 +0000 (10:32 +0800)]
gpio: stm32_gpio: Use clrsetbits_le32() at appropriate places

Use clrsetbits_le32() to replace clrbits_le32() + setbits_le32().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
9 years agoboard/BuR/common: rename "usbupdate" environment to "usbscript"
Hannes Petermaier [Fri, 24 Apr 2015 12:49:39 +0000 (14:49 +0200)]
board/BuR/common: rename "usbupdate" environment to "usbscript"

usbupdate in real does allways load some script from usb-storage and execute
it, on all B&R targets.

So we do following 2 things:
- rename it to what it really does
- move it from boards to common environment

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/common: remove BMP_DISPLAY from tseries board
Hannes Petermaier [Fri, 24 Apr 2015 12:49:38 +0000 (14:49 +0200)]
board/BuR/common: remove BMP_DISPLAY from tseries board

Since we display in future the splash screen out of linux-os, we don't need
this support anymore within the common section.

But kwb-target is still using BMP_DISPLAY feature, so we move the related
from the common section into the target-specific.

Also the default environment of tseries will be adapted to this.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/tseries: Add simplefb support
Hannes Petermaier [Fri, 24 Apr 2015 12:49:37 +0000 (14:49 +0200)]
board/BuR/tseries: Add simplefb support

Since the used AM3352 SoC doesn't have GPU it isn't allways necessary to build
in complete drm-stuff into linux kernel. In very small applications only we use
the simple-framebuffer.

So we have 2 use-cases:
- device operating on drm-driver (let simplefb node disabled)
- device operating on simplefb-driver (activate simplefb node and reserve mem)

The decision is made by means of "simplefb" environment variable.

simplefb = 0
we don't enable the (maybe) existing simplefb node and all the rest around
display is up to the linux-kernel. We just disable the backlight, beceause we
do not want see the flicker during take over of drm-driver.

simplefb = 1
we enable the (maybe) existing simplefb node and reserve framebuffers size
in memory.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/tseries: remove unnary CONFIG_LCD_NOSTDOUT
Hannes Petermaier [Fri, 24 Apr 2015 12:49:36 +0000 (14:49 +0200)]
board/BuR/tseries: remove unnary CONFIG_LCD_NOSTDOUT

the CONFIG_LCD_NOSTDOUT feature never had become mainline in uboot due to the
fact that the problem of "not writing out whole console to lcd" can be solved
with another way.

So we remove this unnary define.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/tseries: take usage of CONFIG_LCD_ROTATION
Hannes Petermaier [Fri, 24 Apr 2015 12:49:35 +0000 (14:49 +0200)]
board/BuR/tseries: take usage of CONFIG_LCD_ROTATION

We take use of the new LCD_ROTATION feature.
The information about how the display is rotated is taken from B&R specific
(/factory-settings/rotation) information in the devicetree.

The information there is stored as string (cw, ud, ccw, none) since starting
support of this devices and cannot be changed, so we have to convert it into

none = 0
cw   = 1
ud   = 2
ccw  = 3

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoimage: android: handle default kernel address
Maxime Ripard [Fri, 24 Apr 2015 10:53:12 +0000 (12:53 +0200)]
image: android: handle default kernel address

The two tools that create android boot images, mkbootimg and the fastboot
client, set the kernel address by default to 0x10008000.

U-boot always honors this field, and will try to relocate the kernel to
whatever value is set in the header, which won't be mapped to the actual RAM on
most platforms, resulting in the kernel obviously not booting.

All the targets in U-Boot right now will download the android boot image to
CONFIG_SYS_LOAD_ADDR, which means that it will already have been downloaded to
some location that is suitable for execution.

In order to have the kernel booting even with the default boot image kernel
address, if that address is used, just execute the kernel where it is.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
9 years agoRemove non-working address from MAINTAINER
Pavel Machek [Thu, 23 Apr 2015 07:10:36 +0000 (09:10 +0200)]
Remove non-working address from MAINTAINER

I checked with Detlev, and sadly removing that maintainers entry is
right thing to do.

Signed-off-by: Pavel Machek <pavel@denx.de>
9 years agoFix musl build
Jörg Krause [Wed, 22 Apr 2015 19:36:22 +0000 (21:36 +0200)]
Fix musl build

This patch fixes cross-compiling U-Boot tools with the musl C library:
  * including <sys/types.h> is needed for ulong
  * defining _GNU_SOURCE is needed for loff_t

Tested for target at91sam9261ek_dataflash_cs3.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Tom Rini <trini@konsulko.com>
9 years agomisc: led: Add PCA9551 LED driver
Stefan Roese [Thu, 12 Mar 2015 10:22:46 +0000 (11:22 +0100)]
misc: led: Add PCA9551 LED driver

This patch adds a driver for the PCA9551 LED controller.

Originated-by: Timo Herbrecher <t.herbrecher@gateware.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Cc: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoREADME: fix typo in 'currently'
Fabio Estevam [Sat, 25 Apr 2015 21:53:10 +0000 (18:53 -0300)]
README: fix typo in 'currently'

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoti: am335x/am437x/omap5 devices: Unify network environment variables
Cooper Jr., Franklin [Tue, 21 Apr 2015 12:51:04 +0000 (07:51 -0500)]
ti: am335x/am437x/omap5 devices: Unify network environment variables

Across several devices network environment variables are duplicated.
Move these variables to a common include file which insures the environment
variables are reused and insures devices across product lines share the same
values.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Fri, 8 May 2015 14:46:59 +0000 (10:46 -0400)]
Merge git://git.denx.de/u-boot-dm

9 years agogit-mailrc: add Dinh Nguyen as a contact for SoCFPGA
Dinh Nguyen [Thu, 7 May 2015 22:37:12 +0000 (17:37 -0500)]
git-mailrc: add Dinh Nguyen as a contact for SoCFPGA

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>