]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Wed, 10 May 2017 19:50:21 +0000 (15:50 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

7 years agomips: bmips: enable bcm6328-power-domain driver for BCM6328 and BCM63268 boards
Álvaro Fernández Rojas [Sun, 7 May 2017 18:28:39 +0000 (20:28 +0200)]
mips: bmips: enable bcm6328-power-domain driver for BCM6328 and BCM63268 boards

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agomips: bmips: add bcm6328-power-domain driver support for BCM63268
Álvaro Fernández Rojas [Sun, 7 May 2017 18:28:38 +0000 (20:28 +0200)]
mips: bmips: add bcm6328-power-domain driver support for BCM63268

This driver can control up to 32 power domains.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agomips: bmips: add bcm6328-power-domain driver support for BCM6328
Álvaro Fernández Rojas [Sun, 7 May 2017 18:28:37 +0000 (20:28 +0200)]
mips: bmips: add bcm6328-power-domain driver support for BCM6328

This driver can control up to 32 power domains.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agodm: power: domain: add BCM6328 power domain driver
Álvaro Fernández Rojas [Sun, 7 May 2017 18:28:36 +0000 (20:28 +0200)]
dm: power: domain: add BCM6328 power domain driver

This allows controlling MISC IDDQ register on BCM6328 SoCs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agomips: bmips: enable bcm6345-reset driver for all BMIPS boards
Álvaro Fernández Rojas [Wed, 3 May 2017 13:10:25 +0000 (15:10 +0200)]
mips: bmips: enable bcm6345-reset driver for all BMIPS boards

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-rst driver support for BCM63268
Álvaro Fernández Rojas [Wed, 3 May 2017 13:10:24 +0000 (15:10 +0200)]
mips: bmips: add bcm6345-rst driver support for BCM63268

This driver can control up to 32 clocks.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-rst driver support for BCM6328
Álvaro Fernández Rojas [Wed, 3 May 2017 13:10:23 +0000 (15:10 +0200)]
mips: bmips: add bcm6345-rst driver support for BCM6328

This driver can control up to 32 clocks.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-rst driver support for BCM6358
Álvaro Fernández Rojas [Wed, 3 May 2017 13:10:22 +0000 (15:10 +0200)]
mips: bmips: add bcm6345-rst driver support for BCM6358

This driver can control up to 32 resets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: reset: add BCM6345 reset driver
Álvaro Fernández Rojas [Wed, 3 May 2017 13:10:21 +0000 (15:10 +0200)]
dm: reset: add BCM6345 reset driver

This is a simplified version of linux/arch/mips/bcm63xx/reset.c

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: enable bcm6345-clk driver for all BMIPS boards
Álvaro Fernández Rojas [Sun, 7 May 2017 18:13:05 +0000 (20:13 +0200)]
mips: bmips: enable bcm6345-clk driver for all BMIPS boards

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-clk driver support for BCM63268
Álvaro Fernández Rojas [Sun, 7 May 2017 18:13:04 +0000 (20:13 +0200)]
mips: bmips: add bcm6345-clk driver support for BCM63268

This driver can control up to 32 clocks.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-clk driver support for BCM6328
Álvaro Fernández Rojas [Sun, 7 May 2017 18:13:03 +0000 (20:13 +0200)]
mips: bmips: add bcm6345-clk driver support for BCM6328

This driver can control up to 32 clocks.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-clk driver support for BCM6358
Álvaro Fernández Rojas [Sun, 7 May 2017 18:13:02 +0000 (20:13 +0200)]
mips: bmips: add bcm6345-clk driver support for BCM6358

This driver can control up to 32 clocks.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: clk: add BCM6345 clock driver
Álvaro Fernández Rojas [Sun, 7 May 2017 18:13:01 +0000 (20:13 +0200)]
dm: clk: add BCM6345 clock driver

This is a simplified version of linux/arch/mips/bcm63xx/clk.c

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add NeufBox 4 (Sercomm) board
Álvaro Fernández Rojas [Sun, 7 May 2017 18:11:32 +0000 (20:11 +0200)]
mips: bmips: add NeufBox 4 (Sercomm) board

This serves as an example for bcm6358-leds.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6358-led driver support for BCM6358
Álvaro Fernández Rojas [Sun, 7 May 2017 18:11:31 +0000 (20:11 +0200)]
mips: bmips: add bcm6358-led driver support for BCM6358

This driver can control up to 32 serial leds.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: led: add BCM6358 led driver
Álvaro Fernández Rojas [Sun, 7 May 2017 18:11:30 +0000 (20:11 +0200)]
dm: led: add BCM6358 led driver

This driver is a simplified version of linux/drivers/leds/leds-bcm6358.c

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add Comtrend VR-3032u bcm6328-leds
Álvaro Fernández Rojas [Sun, 7 May 2017 18:10:28 +0000 (20:10 +0200)]
mips: bmips: add Comtrend VR-3032u bcm6328-leds

This board has several LEDs attached to its BCM6328 led controller.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add Comtrend AR-5387un bcm6328-leds
Álvaro Fernández Rojas [Sun, 7 May 2017 18:10:27 +0000 (20:10 +0200)]
mips: bmips: add Comtrend AR-5387un bcm6328-leds

This board has several LEDs attached to its BCM6328 led controller.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6328-led driver support for BCM63268
Álvaro Fernández Rojas [Sun, 7 May 2017 18:10:26 +0000 (20:10 +0200)]
mips: bmips: add bcm6328-led driver support for BCM63268

This driver can control up to 24 LEDs and supports HW blinking and serial leds.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6328-led driver support for BCM6328
Álvaro Fernández Rojas [Sun, 7 May 2017 18:10:25 +0000 (20:10 +0200)]
mips: bmips: add bcm6328-led driver support for BCM6328

This driver can control up to 24 LEDs and supports HW blinking and serial leds.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: led: add BCM6328 led driver
Álvaro Fernández Rojas [Sun, 7 May 2017 18:10:24 +0000 (20:10 +0200)]
dm: led: add BCM6328 led driver

This driver is a simplified version of linux/drivers/leds/leds-bcm6328.c,
simplified to remove HW leds and blink fallbacks.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add Huawei HG556a gpio-leds
Álvaro Fernández Rojas [Sun, 7 May 2017 18:09:34 +0000 (20:09 +0200)]
mips: bmips: add Huawei HG556a gpio-leds

This board has several LEDs attached to gpio0.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-gpio driver support for BCM63268
Álvaro Fernández Rojas [Sun, 7 May 2017 18:09:33 +0000 (20:09 +0200)]
mips: bmips: add bcm6345-gpio driver support for BCM63268

This SoC has one gpio bank divided into two 32 bit registers, with a total of
52 GPIOs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-gpio driver support for BCM6328
Álvaro Fernández Rojas [Sun, 7 May 2017 18:09:32 +0000 (20:09 +0200)]
mips: bmips: add bcm6345-gpio driver support for BCM6328

This SoC has one gpio bank with a total of 32 GPIOs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add bcm6345-gpio driver support for BCM6358
Álvaro Fernández Rojas [Sun, 7 May 2017 18:09:31 +0000 (20:09 +0200)]
mips: bmips: add bcm6345-gpio driver support for BCM6358

This SoC has one gpio bank divided into two 32 bit registers, with a total of
40 GPIOs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: gpio: add BCM6345 gpio driver
Álvaro Fernández Rojas [Sun, 7 May 2017 18:09:30 +0000 (20:09 +0200)]
dm: gpio: add BCM6345 gpio driver

This driver is based on linux/arch/mips/bcm63xx/gpio.c, simplified to allow
defining one or two independent banks for each Broadcom SoC.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add BMIPS Comtrend VR-3032u board
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:26 +0000 (00:39 +0200)]
MIPS: add BMIPS Comtrend VR-3032u board

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add support for Broadcom MIPS BCM63268 SoC family
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:25 +0000 (00:39 +0200)]
MIPS: add support for Broadcom MIPS BCM63268 SoC family

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add BMIPS Comtrend AR-5387un board
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:24 +0000 (00:39 +0200)]
MIPS: add BMIPS Comtrend AR-5387un board

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add support for Broadcom MIPS BCM6328 SoC family
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:23 +0000 (00:39 +0200)]
MIPS: add support for Broadcom MIPS BCM6328 SoC family

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add BMIPS Huawei HG556a board
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:22 +0000 (00:39 +0200)]
MIPS: add BMIPS Huawei HG556a board

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add support for Broadcom MIPS BCM6358 SoC family
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:21 +0000 (00:39 +0200)]
MIPS: add support for Broadcom MIPS BCM6358 SoC family

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: add initial infrastructure for Broadcom MIPS SoCs
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:20 +0000 (00:39 +0200)]
MIPS: add initial infrastructure for Broadcom MIPS SoCs

CFE checks CPU Thread in a different way (using register $22):
mfc0 t1, C0_BCM_CONFIG, 3 # $22
li t2, CP0_CMT_TPID # (1 << 31)
and t1, t2
bnez t1, 2f # if we are running on thread 1, skip init
nop

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoram: add RAM driver for Broadcom MIPS SoCs
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:19 +0000 (00:39 +0200)]
ram: add RAM driver for Broadcom MIPS SoCs

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocpu: add CPU driver for Broadcom MIPS SoCs
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:18 +0000 (00:39 +0200)]
cpu: add CPU driver for Broadcom MIPS SoCs

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocmd: cpu: refactor to ensure devices are probed and improve code style
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:17 +0000 (00:39 +0200)]
cmd: cpu: refactor to ensure devices are probed and improve code style

Use uclass_first_device and uclass_next_device in order to avoid exceptions
for drivers that aren't probed when cpu ops are requested.
Improve code style and fix indentations.
Fix incorrect line break when cpu info is not available.
Remove unneeded brackets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: add serial driver for BCM6345
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:16 +0000 (00:39 +0200)]
serial: add serial driver for BCM6345

It is based on linux/drivers/tty/serial/bcm63xx_uart.c

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: allow using generic sysreset drivers
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:15 +0000 (00:39 +0200)]
MIPS: allow using generic sysreset drivers

Avoid duplicating do_reset definition if SYSRESET is enabled for MIPS

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosysreset: add syscon-reboot driver
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:14 +0000 (00:39 +0200)]
sysreset: add syscon-reboot driver

Add a new sysreset driver based on linux/drivers/power/reset/syscon-reboot.c,
which provides a generic driver for platforms that only require writing a mask
to a regmap offset.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocmd: cpu: fix NULL cpu feature prints
Álvaro Fernández Rojas [Mon, 24 Apr 2017 22:39:13 +0000 (00:39 +0200)]
cmd: cpu: fix NULL cpu feature prints

Commit 740d5d3 added two new features but only one feature name,
which results in NULL prints when device_id feature is selected.

Before:
HG556a # cpu detail
 -1: cpu@0 BCM6358A1
ID = 0, freq = 300 MHz: L1 cache, MMU, NULL
Device ID 0x2a010
 -1: cpu@1 BCM6358A1
ID = 1, freq = 300 MHz: L1 cache, MMU, NULL
Device ID 0x2a010
After:
HG556a # cpu detail
 -1: cpu@0 BCM6358A1
ID = 0, freq = 300 MHz: L1 cache, MMU, Device ID
Device ID 0x2a010
 -1: cpu@1 BCM6358A1
ID = 1, freq = 300 MHz: L1 cache, MMU, Device ID
Device ID 0x2a010

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMIPS: call debug_uart_init right before board_init_f
Daniel Schwierzeck [Mon, 24 Apr 2017 17:03:34 +0000 (19:03 +0200)]
MIPS: call debug_uart_init right before board_init_f

All MIPS boards that support debug uart are calling debug_uart_init right at
the beginning of board_early_init_f.
Instead of doing that, let's provide a generic call to debug_uart_init right
before the call to board_init_f if debug uart is enabled for boards without
stack in SRAM.
On the other hand, boards with stack in SRAM can call earlier (right before
low level init).

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agoMIPS: tl-wdr4300: remove debug_uart_init call
Álvaro Fernández Rojas [Mon, 24 Apr 2017 17:03:33 +0000 (19:03 +0200)]
MIPS: tl-wdr4300: remove debug_uart_init call

In order to add a generic MIPS debug_uart_init call right before the call to
board_early_init_f, we need to remove all calls to debug_uart_init from every
MIPS boards.
WDR4300 doesn't provide a board_debug_uart_init and configures pinmux in
board_early_init_f instead. Since I have no idead of what's the needed uart
pinmux config, I copied the whole pinmux config to a new function that is
called from board_early_init_f if CONFIG_DEBUG_UART_BOARD_INIT is not enabled.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agoMIPS: QCA AP143: remove debug_uart_init call
Álvaro Fernández Rojas [Mon, 24 Apr 2017 17:03:32 +0000 (19:03 +0200)]
MIPS: QCA AP143: remove debug_uart_init call

In order to add a generic MIPS debug_uart_init call right before the call to
board_early_init_f, we need to remove all calls to debug_uart_init from every
MIPS boards.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agoMIPS: QCA AP121: remove debug_uart_init call
Álvaro Fernández Rojas [Mon, 24 Apr 2017 17:03:31 +0000 (19:03 +0200)]
MIPS: QCA AP121: remove debug_uart_init call

In order to add a generic MIPS debug_uart_init call right before the call to
board_early_init_f, we need to remove all calls to debug_uart_init from every
MIPS boards.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agou-boot.elf: add quiet_cmd_u-boot-elf and cmd_u-boot-elf
Álvaro Fernández Rojas [Thu, 20 Apr 2017 18:36:28 +0000 (20:36 +0200)]
u-boot.elf: add quiet_cmd_u-boot-elf and cmd_u-boot-elf

This way we can see output about u-boot.elf being built or not.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMIPS: add support for generating u-boot.elf
Álvaro Fernández Rojas [Thu, 20 Apr 2017 18:36:27 +0000 (20:36 +0200)]
MIPS: add support for generating u-boot.elf

Define PLATFORM_ELFFLAGS for MIPS in order to be able to generate u-boot.elf

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agou-boot.elf: allow overriding entry symbol
Álvaro Fernández Rojas [Thu, 20 Apr 2017 18:36:26 +0000 (20:36 +0200)]
u-boot.elf: allow overriding entry symbol

LD gives the following warning when trying to process u-boot-elf.o
warning: cannot find entry symbol __start; defaulting to 0000000080010000
According to gnu-libc the entry symbol for mips is __start and not _start:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/mips/dl-machine.h;h=ed47513ccc1d23d23d32ee640053d2f351f3990b;hb=HEAD#l258

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agou-boot.elf: remove hard-coded arm64 flags
Álvaro Fernández Rojas [Thu, 20 Apr 2017 18:36:25 +0000 (20:36 +0200)]
u-boot.elf: remove hard-coded arm64 flags

This is needed in order to allow building it for other archs.
Move relocation comment to a better place.
Remove no longer needed dts FIXME.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agopower: twl4030: Remove CONFIG_TWL4030_POWER from include/configs
Adam Ford [Wed, 26 Apr 2017 18:41:32 +0000 (13:41 -0500)]
power: twl4030: Remove CONFIG_TWL4030_POWER from include/configs

With the addition of Kconfig now having CONFIG_TWL4030_POWER and
with that being the default when OMAP34XX is selected, this
is no longer needed in include/configs and can be removed from the
whitelist.

This has only been tested on logic PD DM3730 using ti_omap3_common.h

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: twl4030: Move CONFIG_TWL4030_POWER to Kconfig
Adam Ford [Wed, 26 Apr 2017 18:41:31 +0000 (13:41 -0500)]
power: twl4030: Move CONFIG_TWL4030_POWER to Kconfig

As requested, I added the CONFIG_TWL4030_POWER to Kconfig and made it
the implied default when selecting OMAP34XX as a platform.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: twl4030: Add CONFIG_CMD_POWEROFF support
Adam Ford [Mon, 24 Apr 2017 18:34:43 +0000 (13:34 -0500)]
power: twl4030: Add CONFIG_CMD_POWEROFF support

With the addition of twl4030_power_off(), let's allow the 'poweroff' command
to run this function when CONFIG_CMD_POWEROFF is enabled.

Tested on a DM3730 with twl4030 PMIC.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoomap3_logic: Add Device Tree Support and more DM drivers
Adam Ford [Mon, 17 Apr 2017 13:09:45 +0000 (08:09 -0500)]
omap3_logic: Add Device Tree Support and more DM drivers

This patch also removes all the excessive code for NS16550 intiailization
as the device tree can do that now.  This also adds DM_I2C and DM_MMC
since the overlying drivers have the built-in support already.  The
corresponding include/config/omap3_logic.h also reduced in size
due to the new device tree support.

Signed-off-by: Adam Ford <aford173@gmail.com>
Changes in V2:
  Retain Auto-detect ability between SOM-LV and Torpedo
  Split this off from the device sub submissions

7 years agoARM: DTS: Add Logic PD DM3730 Torpedo Device Tree
Adam Ford [Mon, 17 Apr 2017 13:09:44 +0000 (08:09 -0500)]
ARM: DTS: Add Logic PD DM3730 Torpedo Device Tree

Previous commit has this combined with SOM-LV.  This commit has only
the Torpedo Device Tree.

The device trees were sync'd with 4.9.y stable with two changes:
disable mmc2 and stdout-path = &uart1.  Both of those two changes
will be submitted to the linux-omap list

Signed-off-by: Adam Ford <aford173@gmail.com>
Changes in V2:
  Split device tree from other board

7 years agoARM: DTS: Add Logic PD DM3730 SOM-LV initial support
Adam Ford [Mon, 17 Apr 2017 13:09:43 +0000 (08:09 -0500)]
ARM: DTS: Add Logic PD DM3730 SOM-LV initial support

This adds the device tree.  Previous commit added both boards at the
same time.

Signed-off-by: Adam Ford <aford173@gmail.com>
Changes in V2:
  Split the SOM-LV from Torpedo

7 years agoOMAP3: Add SMSC9221 device tree for omap devices connected on GPMC.
Adam Ford [Mon, 17 Apr 2017 13:09:42 +0000 (08:09 -0500)]
OMAP3: Add SMSC9221 device tree for omap devices connected on GPMC.

Some OMAP3 devices support an SMSC ethernet PHY connected to the GPMC bus.
This copies this device tree from Linux 4.9.y stable

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoomap3: Copy twl4030 device tree from Linux 4.9.y stable
Adam Ford [Mon, 17 Apr 2017 13:09:41 +0000 (08:09 -0500)]
omap3: Copy twl4030 device tree from Linux 4.9.y stable

Many OMAP3 boards use a TWL4030 PMIC.  This brings in the related
device tree information for common TWL4030 and TWL4030 with OMAP3.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoARM: OMAP: I2C: Support New read, write and probe functions for OMAP3
Adam Ford [Mon, 17 Apr 2017 13:09:40 +0000 (08:09 -0500)]
ARM: OMAP: I2C: Support New read, write and probe functions for OMAP3

New i2c_read, i2c_write and i2c_probe functions, tested on OMAP4
(4430/60/70), OMAP5 (5430) and AM335X (3359) were added in 960187ffa125(
"ARM: OMAP: I2C: New read, write and probe functions") but not tested
on OMAP3.  This patch will allow the updated drivers using device tree and
DM_I2C to operate on OMAP3.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoomap3630: Copy Device tree from Linux 4.9.y stable
Adam Ford [Mon, 17 Apr 2017 13:09:39 +0000 (08:09 -0500)]
omap3630: Copy Device tree from Linux 4.9.y stable

Add device tree support to allow for CONFIG_OF_CONTROL in OMAP3630 boards.
DM3730 can use this same device tree.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoomap3: Copy Device tree from Linux 4.9.y stable
Adam Ford [Mon, 17 Apr 2017 13:09:38 +0000 (08:09 -0500)]
omap3: Copy Device tree from Linux 4.9.y stable

Add device tree support to allow for CONFIG_OF_CONTROL in OMAP3 boards.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoomap_hsmmc: update struct hsmmc to accommodate omap3 from DT
Adam Ford [Mon, 17 Apr 2017 13:09:37 +0000 (08:09 -0500)]
omap_hsmmc: update struct hsmmc to accommodate omap3 from DT

This patch changes the way DM_MMC calculates offset to the base register of
MMC. Previously this was through an #ifdef but that wasn't necessary for OMAP3.

This patch will now add in the offset to the base address based on the
.compatible flags.

Signed-off-by: Adam Ford <aford173@gmail.com>
V2: Remove ifdef completely and reference offset from the omap_hsmmc_ids table.

V1: Change ifdef to ignore OMAP3
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoAllow boards to initialize the DT at runtime.
Alex Deymo [Sun, 2 Apr 2017 08:25:20 +0000 (01:25 -0700)]
Allow boards to initialize the DT at runtime.

In some boards like the Raspberry Pi the initial bootloader will pass
a DT to the kernel. When using U-Boot as such kernel, the board code in
U-Boot should be able to provide U-Boot with this, already assembled
device tree blob.

This patch introduces a new config option CONFIG_OF_BOARD to use instead
of CONFIG_OF_EMBED or CONFIG_OF_SEPARATE which will initialize the DT
from a board-specific funtion instead of bundling one with U-Boot or as
a separated file. This allows boards like the Raspberry Pi to reuse the
device tree passed from the bootcode.bin and start.elf firmware
files, including the run-time selected device tree overlays.

Signed-off-by: Alex Deymo <deymo@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agobcm2835_wdt: support for the BCM2835/2836 watchdog
Paolo Pisati [Fri, 10 Feb 2017 16:28:05 +0000 (17:28 +0100)]
bcm2835_wdt: support for the BCM2835/2836 watchdog

Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
7 years agoarm: rpi: Add a TODO to move all messages into the msg handler
Simon Glass [Wed, 5 Apr 2017 22:23:45 +0000 (16:23 -0600)]
arm: rpi: Add a TODO to move all messages into the msg handler

The board code should all move into msg.c for consistency. Add a TODO for
this.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: video: arm: rpi: Convert to use driver model for video
Simon Glass [Wed, 5 Apr 2017 22:23:44 +0000 (16:23 -0600)]
dm: video: arm: rpi: Convert to use driver model for video

Adjust the video driver to work with driver model and move over existing
baords. There is no need to keep the old code.

We can also drop setting of CONFIG_FB_ADDR since driver model doesn't have
this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
7 years agodm: video: Add driver-model support to lcd_simplefb
Simon Glass [Wed, 5 Apr 2017 22:23:43 +0000 (16:23 -0600)]
dm: video: Add driver-model support to lcd_simplefb

Allow this to work with CONFIG_DM_VIDEO enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
7 years agodm: video: Refactor lcd_simplefb to prepare for driver model
Simon Glass [Wed, 5 Apr 2017 22:23:42 +0000 (16:23 -0600)]
dm: video: Refactor lcd_simplefb to prepare for driver model

Adjust this function so that we can convert it to support CONFIG_DM_VIDEO
without a lot of code duplication.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
7 years agovideo: arm: rpi: Move the video settings out of the driver
Simon Glass [Wed, 5 Apr 2017 22:23:41 +0000 (16:23 -0600)]
video: arm: rpi: Move the video settings out of the driver

Add a function to set the video parameters to the msg handler and remove
it from the video driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
7 years agovideo: arm: rpi: Move the video query out of the driver
Simon Glass [Wed, 5 Apr 2017 22:23:40 +0000 (16:23 -0600)]
video: arm: rpi: Move the video query out of the driver

Add a function to get the video size to the msg handler and remove it from
the video driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
7 years agodm: arm: rpi: Drop CONFIG_OF_EMBED
Simon Glass [Wed, 5 Apr 2017 22:23:39 +0000 (16:23 -0600)]
dm: arm: rpi: Drop CONFIG_OF_EMBED

We should not use an embedded device tree on a production board. There
does not seem to be any reason for it in commit 7670909. So drop this.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: mmc: rpi: Convert Raspberry Pi to driver model for MMC
Simon Glass [Wed, 5 Apr 2017 22:23:38 +0000 (16:23 -0600)]
dm: mmc: rpi: Convert Raspberry Pi to driver model for MMC

Convert the bcm2835 SDHCI driver over to support CONFIG_DM_MMC and move
all boards over. There is no need to keep the old code since there are no
other users.

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: rpi: Add a function to obtain the MMC clock
Simon Glass [Wed, 5 Apr 2017 22:23:37 +0000 (16:23 -0600)]
arm: rpi: Add a function to obtain the MMC clock

Move this code into the new message handler file.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: rpi: Add a file to handle messages
Simon Glass [Wed, 5 Apr 2017 22:23:36 +0000 (16:23 -0600)]
arm: rpi: Add a file to handle messages

The bcm283x chips provide a way for the ARM core to communicate with the
graphics processor, which is in charge of many things. This is handled by
way of a message prototcol.

At present the code for sending message (and receiving a reply) is spread
around U-Boot, primarily in the board file. This means that sending a
message from a driver requires duplicating the code.

Create a new message implementation with a function to support powering on
a subsystem as a starting point.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: arm: rpi: Use driver model for Ethernet
Simon Glass [Wed, 5 Apr 2017 22:23:35 +0000 (16:23 -0600)]
dm: arm: rpi: Use driver model for Ethernet

Enable CONFIG_DM_ETH so that driver model is used for the USB Ethernet
device.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: arm: rpi: Move to driver model for USB
Simon Glass [Wed, 5 Apr 2017 22:23:34 +0000 (16:23 -0600)]
dm: arm: rpi: Move to driver model for USB

Start using driver model for USB on the Raspberry Pi. The dwc2 supports
this now so this is just a config change.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: rpi: Drop CONFIG_CONS_INDEX
Simon Glass [Wed, 5 Apr 2017 22:23:33 +0000 (16:23 -0600)]
arm: rpi: Drop CONFIG_CONS_INDEX

This is not needed now that serial uses driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: rpi: Drop the GPIO device addresses
Simon Glass [Wed, 5 Apr 2017 22:23:32 +0000 (16:23 -0600)]
arm: rpi: Drop the GPIO device addresses

We can rely on the device tree to provide this information.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agostring: Use memcpy() within memmove() when we can
Simon Glass [Wed, 5 Apr 2017 22:23:31 +0000 (16:23 -0600)]
string: Use memcpy() within memmove() when we can

A common use of memmove() can be handled by memcpy(). Also memcpy()
includes an optimisation for large sizes: it copies a word at a time. So
we can get a speed-up by calling memcpy() to handle our move in this case.

Update memmove() to call memcpy() if the destination is before the source.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agonet: smsc95xx: Correct free_pkt() implementation
Simon Glass [Wed, 5 Apr 2017 22:23:28 +0000 (16:23 -0600)]
net: smsc95xx: Correct free_pkt() implementation

On further review this returns the wrong packet length from the driver.
It may not be noticed since protocols will take care of it. Fix it by
subtracting the header length from the packet length returned.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 9 May 2017 20:11:36 +0000 (16:11 -0400)]
Merge git://git.denx.de/u-boot-dm

7 years agoMerge git://www.denx.de/git/u-boot-marvell
Tom Rini [Tue, 9 May 2017 19:48:09 +0000 (15:48 -0400)]
Merge git://www.denx.de/git/u-boot-marvell

7 years agodefconfig: dra7xx_evm: enable CONFIG_BLK and disk driver model for SCSI
Jean-Jacques Hiblot [Mon, 24 Apr 2017 09:51:32 +0000 (11:51 +0200)]
defconfig: dra7xx_evm: enable CONFIG_BLK and disk driver model for SCSI

Enable disk driver model for dra7xx_evm as dwc_ahci supports
driver model. As a consequence we must also enable CONFIG_BLK and
CONFIG_DM_USB.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dropped CONFIG_SPL_PHY=y in sandbox_spl to fix build error:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodrivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device
Jean-Jacques Hiblot [Mon, 24 Apr 2017 09:51:31 +0000 (11:51 +0200)]
drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device

Implement a sata driver for Synopsys DWC sata device based on
U-boot driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodra7: dtsi: mark ocp2scp bus compatible with "simple-bus"
Jean-Jacques Hiblot [Mon, 24 Apr 2017 09:51:30 +0000 (11:51 +0200)]
dra7: dtsi: mark ocp2scp bus compatible with "simple-bus"

This is needed to probe devices under that bus such as the SATA PHY.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodrivers: phy: add PIPE3 phy driver
Jean-Jacques Hiblot [Mon, 24 Apr 2017 09:51:29 +0000 (11:51 +0200)]
drivers: phy: add PIPE3 phy driver

This phy is found on omap platforms with sata capabilities.
Except for the part related to the DM and the PHY framework, the code is
basically a copy paste from arch/arm/mach-omap2/pipe3-phy.c

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: test: Add tests for the generic PHY uclass
Jean-Jacques Hiblot [Mon, 24 Apr 2017 09:51:28 +0000 (11:51 +0200)]
dm: test: Add tests for the generic PHY uclass

Those tests check:
- the ability for a phy-user to get a phy based on its name or its index
- the ability of a phy device (provider) to manage multiple ports
- the ability to perform operations on the phy (init,deinit,on,off)
- the behavior of the uclass when optional operations are not implemented

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodrivers: phy: add generic PHY framework
Jean-Jacques Hiblot [Mon, 24 Apr 2017 09:51:27 +0000 (11:51 +0200)]
drivers: phy: add generic PHY framework

The PHY framework provides a set of APIs to control a PHY. This API is
derived from the linux version of the generic PHY framework.
Currently the API supports init(), deinit(), power_on, power_off() and
reset(). The framework provides a way to get a reference to a phy from the
device-tree.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoscsi: dm: split scsi_scan()
Jean-Jacques Hiblot [Mon, 24 Apr 2017 09:51:26 +0000 (11:51 +0200)]
scsi: dm: split scsi_scan()

The DM version of scsi_scan() is becoming a bit long, it can be split:
scsi_scan() iterates over the IDs and LUNs and for each id/lun pair calls
do_scsi_scan_one() to do the work of:
 - detecting an attached drive
 - creating the associated block device if a drive is found.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9263ek: Enable early debug UART
Wenyou Yang [Tue, 18 Apr 2017 07:31:02 +0000 (15:31 +0800)]
board: at91sam9263ek: Enable early debug UART

Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9263ek: Clean up code
Wenyou Yang [Tue, 18 Apr 2017 07:31:01 +0000 (15:31 +0800)]
board: at91sam9263ek: Clean up code

Because the introduction of the pinctrl and clk drivers and the
device tree files, remove unneeded hard coded related code from
the board file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoconfigs: at91sam9263ek: Update for DT and DM support
Wenyou Yang [Tue, 18 Apr 2017 07:31:00 +0000 (15:31 +0800)]
configs: at91sam9263ek: Update for DT and DM support

Update the configuration files to support the device tree and driver
model. The device clock and pins configuration are handled by the
clock and the pinctrl drivers respectively.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9rlek: Enable early debug UART
Wenyou Yang [Tue, 18 Apr 2017 07:28:29 +0000 (15:28 +0800)]
board: at91sam9rlek: Enable early debug UART

Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9rlek: Clean up code
Wenyou Yang [Tue, 18 Apr 2017 07:28:28 +0000 (15:28 +0800)]
board: at91sam9rlek: Clean up code

Since the introduction of the pinctrl and clk drivers and the
device tree files, remove unneeded hard coded related code from
the board file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoconfigs: at91sam9rlek: Update for DT and DM support
Wenyou Yang [Tue, 18 Apr 2017 07:28:27 +0000 (15:28 +0800)]
configs: at91sam9rlek: Update for DT and DM support

Update the configuration files to support the device tree and driver
model. The device clock and pins configuration are handled by the
clock and the pinctrl drivers respectively.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9260ek/9g20ek: Enable early debug UART
Wenyou Yang [Tue, 18 Apr 2017 07:18:49 +0000 (15:18 +0800)]
board: at91sam9260ek/9g20ek: Enable early debug UART

Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9260ek: Clean up code
Wenyou Yang [Tue, 18 Apr 2017 07:18:48 +0000 (15:18 +0800)]
board: at91sam9260ek: Clean up code

Since the introduction of the pinctrl and clk drivers and the
device tree files, remove unneeded hard coded related code from
the board file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoconfigs: at91sam9260ek/9g20ek: Update for DT and DM
Wenyou Yang [Tue, 18 Apr 2017 07:18:47 +0000 (15:18 +0800)]
configs: at91sam9260ek/9g20ek: Update for DT and DM

Update the configuration files to support the device tree and driver
model. The device clock and pins configuration are handled by the
clock and the pinctrl drivers respectively.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9m10g45ek: Enable early debug UART
Wenyou Yang [Tue, 18 Apr 2017 07:15:50 +0000 (15:15 +0800)]
board: at91sam9m10g45ek: Enable early debug UART

Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: at91sam9m10g45ek: Clean up code
Wenyou Yang [Tue, 18 Apr 2017 07:15:49 +0000 (15:15 +0800)]
board: at91sam9m10g45ek: Clean up code

Since the introduction of the pinctrl and clk drivers and the
device tree files, remove unneeded hard coded related code from
the board file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>