oweals/u-boot.git
6 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Thu, 11 Jan 2018 16:18:49 +0000 (11:18 -0500)]
Merge git://git.denx.de/u-boot-fsl-qoriq

6 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 11 Jan 2018 16:18:41 +0000 (11:18 -0500)]
Merge git://git.denx.de/u-boot-socfpga

6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Thu, 11 Jan 2018 16:18:29 +0000 (11:18 -0500)]
Merge git://git.denx.de/u-boot-usb

6 years agols1088ardb: Add SD Secure boot target support
Sumit Garg [Sat, 6 Jan 2018 03:34:25 +0000 (09:04 +0530)]
ls1088ardb: Add SD Secure boot target support

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
[YS: run moveconfig.py -s]
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls1088a: SPL size reduction
Sumit Garg [Sat, 6 Jan 2018 03:34:24 +0000 (09:04 +0530)]
armv8: ls1088a: SPL size reduction

Using changes in this patch we were able to reduce approx 8k
size of u-boot-spl.bin image. Following is breif description of
changes to reduce SPL size:
1. Changes in board/freescale/ls1088a/Makefile to remove
   compilation of eth.c and cpld.c in case of SPL build.
2. Changes in board/freescale/ls1088a/ls1088a.c to keep
   board_early_init_f funcations in case of SPL build.
3. Changes in ls1088a_common.h & ls1088ardb.h to remove driver
   specific macros due to which static data was being compiled in
   case of SPL build.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: fsl-layerscape: SPL size reduction
Sumit Garg [Sat, 6 Jan 2018 03:34:23 +0000 (09:04 +0530)]
armv8: fsl-layerscape: SPL size reduction

Compile-off mp.c and libfdt.c in case of SPL build. SPL size reduces
by approx 2k.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoPowerpc: T208xQDS: Modify the comment of the CONFIG_FSL_PCIE_RESET macro
Bao Xiaowei [Tue, 19 Dec 2017 02:32:44 +0000 (10:32 +0800)]
Powerpc: T208xQDS: Modify the comment of the CONFIG_FSL_PCIE_RESET macro

Remove duplicate macro CONFIG_FSL_PCIE_RESET and update its comment.
It enables PCIe reset to fix link width 2x - 4x.

Signed-off-by: Bao Xiaowei <xiaowei.bao@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: Implement workaround for Cortex-A53 erratum 855873
Alison Wang [Thu, 28 Dec 2017 05:00:55 +0000 (13:00 +0800)]
armv8: Implement workaround for Cortex-A53 erratum 855873

855873: An eviction might overtake a cache clean operation
Workaround: The erratum can be avoided by upgrading cache clean by
address operations to cache clean and invalidate operations. For
Cortex-A53 r0p3 and later release, this can be achieved by setting
CPUACTLR.ENDCCASCI to 1.

This patch is to implement the workaround for this erratum.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoconfigs: Move SYS_DPAA_QBMAN to Kconfig
Ahmed Mansour [Fri, 15 Dec 2017 21:01:01 +0000 (16:01 -0500)]
configs: Move SYS_DPAA_QBMAN to Kconfig

The CONFIG_SYS_DPAA_QBMAN define is used by DPAA1 freescale SOCs to
add device tree fixups that allow deep sleep in Linux. The define was
placed in header files included by a number of boards, but was not
explicitly documented in any of the Kconfigs. A description was added
to the drivers/networking menuconfig and default selection for
current SOCs that have this part

Signed-off-by: Ahmed Mansour <ahmed.mansour@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agodrivers/misc: Share qbman init between archs
Ahmed Mansour [Fri, 15 Dec 2017 21:01:00 +0000 (16:01 -0500)]
drivers/misc: Share qbman init between archs

This patch adds changes necessary to move functionality present in
PowerPC folders with ARM architectures that have DPAA1 QBMan hardware

- Create new board/freescale/common/fsl_portals.c to house shared
  device tree fixups for DPAA1 devices with ARM and PowerPC cores
- Add new header file to top includes directory to allow files in
  both architectures to grab the function prototypes
- Port inhibit_portals() from PowerPC to ARM. This function is used in
  setup to disable interrupts on all QMan and BMan portals. It is
  needed because the interrupts are enabled by default for all portals
  including unused/uninitialised portals. When the kernel attempts to
  go to deep sleep the unused portals prevent it from doing so

Signed-off-by: Ahmed Mansour <ahmed.mansour@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: layerscape: sata: refine port register configuration
Yuantian Tang [Mon, 11 Dec 2017 05:12:09 +0000 (13:12 +0800)]
armv8: layerscape: sata: refine port register configuration

Sata registers PP2C and PP3C are used to control the configuration
of the PHY control OOB timing for the COMINIT/COMWAKE parameters
respectively. Calculate those parameters from port clock frequency.
Overwrite those registers with calculated values to get better OOB
timing.

Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls1088 : MC alignment should always be fixed to 512MB
Ashish Kumar [Fri, 8 Dec 2017 05:40:40 +0000 (11:10 +0530)]
armv8: ls1088 : MC alignment should always be fixed to 512MB

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Wed, 10 Jan 2018 13:05:57 +0000 (08:05 -0500)]
Merge git://git.denx.de/u-boot-marvell

6 years agobuild: Drop CONFIG_SPL_BUILD guards in some cases
Tom Rini [Fri, 22 Dec 2017 03:13:22 +0000 (22:13 -0500)]
build: Drop CONFIG_SPL_BUILD guards in some cases

Given gcc-6.1 and later we can now safely have strings discarded when
the functions are unused.  This lets us drop certain cases of not
building something so that we don't have the strings brought in when the
code was discarded.  Simplify the code now by dropping guards we don't
need now.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Chander Kashyap <k.chander@samsung.com>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Wenyou Yang <wenyou.yang@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agofat write: Fixed a problem with the case of file names when writing files
Jean-Jacques Hiblot [Thu, 21 Dec 2017 11:49:47 +0000 (12:49 +0100)]
fat write: Fixed a problem with the case of file names when writing files

commit 21a24c3bf35b ("fs/fat: fix case for FAT shortnames") made it
possible that get_name() returns file names with some upper cases.
find_directory_entry() must be updated to take this account, and use
case-insensitive functions to compare file names.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agolinux/kernel.h: Add ALIGN_DOWN macro
Masahiro Yamada [Thu, 21 Dec 2017 04:51:46 +0000 (13:51 +0900)]
linux/kernel.h: Add ALIGN_DOWN macro

Follow Linux commit ed067d4a859f ("linux/kernel.h: Add ALIGN_DOWN
macro").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agosh: Drop unreferenced CONFIG_* defines
Tuomas Tynkkynen [Thu, 21 Dec 2017 01:58:54 +0000 (03:58 +0200)]
sh: Drop unreferenced CONFIG_* defines

The following config symbols are only defined once and never referenced
anywhere else:

CONFIG_AP325RXA
CONFIG_AP_SH4A_4A
CONFIG_CPU_SH_TYPE_R
CONFIG_ECOVEC
CONFIG_ESPT
CONFIG_MIGO_R
CONFIG_MPR2
CONFIG_MS7720SE
CONFIG_MS7722SE
CONFIG_MS7750SE
CONFIG_R0P7734
CONFIG_R2DPLUS
CONFIG_RSK7203
CONFIG_RSK7264
CONFIG_RSK7269
CONFIG_SH7752EVB
CONFIG_SH7753EVB
CONFIG_SH7757LCR
CONFIG_SH7763RDP
CONFIG_SH7785LCR

Most of them are config symbols named after the respective boards which
seems to have been a standard practice at some point.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoARM: Drop unreferenced CONFIG_MACH_* defines
Tuomas Tynkkynen [Thu, 21 Dec 2017 01:58:53 +0000 (03:58 +0200)]
ARM: Drop unreferenced CONFIG_MACH_* defines

These macros are all defined once and never checked or used anywhere:

CONFIG_MACH_ASPENITE
CONFIG_MACH_DAVINCI_CALIMAIN
CONFIG_MACH_DOCKSTAR
CONFIG_MACH_EDMINIV2
CONFIG_MACH_GOFLEXHOME
CONFIG_MACH_GONI
CONFIG_MACH_GURUPLUG
CONFIG_MACH_KM_KIRKWOOD
CONFIG_MACH_OPENRD_BASE
CONFIG_MACH_SHEEVAPLUG

Almost all of them were only used for the mach_is_foo() logic in
arch/arm/asm/mach-types.h that were dropped in
commit f9dadaef8b75fa ("arm: Re-sync asm/mach-types.h with
Linux Kernel v4.9")

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoconfigs: am57xx_evm: fix ethernet phy configuration
Sekhar Nori [Wed, 20 Dec 2017 15:09:14 +0000 (20:39 +0530)]
configs: am57xx_evm: fix ethernet phy configuration

Configure AM57xx EVMs for the exact PHY part that is
present on the various boards. This makes U-Boot apply
configurations needed for this PHY like centering the
FLP timing.

For configurations to take effect, DM_ETH needs to be
enabled. Do that too.

Tested on BeagleBoard x15 and AM571x IDK.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
6 years agoTravis-CI: Split 't208xrdb t4qds t102*'-job into separate jobs
Philipp Tomsich [Wed, 20 Dec 2017 10:06:31 +0000 (11:06 +0100)]
Travis-CI: Split 't208xrdb t4qds t102*'-job into separate jobs

The 't208xrdb t4qds t102*' job is close to the time limit and
sometimes fails, so this splits it into 3 separate jobs.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoPCI: Drop CONFIG_TSI108_PCI
Tuomas Tynkkynen [Mon, 18 Dec 2017 22:28:42 +0000 (00:28 +0200)]
PCI: Drop CONFIG_TSI108_PCI

Last user of this option went away in 2015 in commit:
d928664f41 ("powerpc: 74xx_7xx: remove 74xx_7xx cpu support")

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoBCM283x ALT5 function for JTAG pins
Henry Zhang [Mon, 18 Dec 2017 08:13:30 +0000 (00:13 -0800)]
BCM283x ALT5 function for JTAG pins

BCM2835 ARM Peripherals doc shows gpio pins 4, 5, 6, 12 and 13 carry altenate
function, ALT5 for ARM JTAG

Signed-off-by: Henry Zhang <henryzhang62@yahoo.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoconfigs: stm32f746-disco: enable MMC related flags
Patrice Chotard [Tue, 12 Dec 2017 09:15:00 +0000 (10:15 +0100)]
configs: stm32f746-disco: enable MMC related flags

STM32F469-disco embeds an arm_pl180 mmc IP, so
enable CMD_MMC, DM_MMC and ARM_PL180_MMCI flags.

Also enables all filesystem command related flags :
  _ CMD_EXT2
  _ CMD_EXT4
  _ CMD_FAT
  _ CMD_FS_GENERIC
  _ CMD_GPT
  _ CMD_BOOTZ

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: DTS: stm32: add MMC nodes for stm32f746-disco and stm32f769-disco
Patrice Chotard [Tue, 12 Dec 2017 09:14:59 +0000 (10:14 +0100)]
ARM: DTS: stm32: add MMC nodes for stm32f746-disco and stm32f769-disco

Add DT nodes to enable ARM_PL180_MMCI IP support for STM32F746
and STM32F769 discovery boards

There is a hardware issue on these boards, it misses a pullup on the GPIO line
used as card detect to allow correct SD card detection.
As workaround, cd-gpios property is not present in DT.
So SD card is always considered present in the slot.

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: DTS: stm32: add SDIO controller support for stm32f469-disco
Patrice Chotard [Tue, 12 Dec 2017 08:49:45 +0000 (09:49 +0100)]
ARM: DTS: stm32: add SDIO controller support for stm32f469-disco

STM32F469 SoC uses an arm_pl180_mmci SDIO controller.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoboard: stm32: add stm32f469-discovery board support
Patrice Chotard [Tue, 12 Dec 2017 08:49:44 +0000 (09:49 +0100)]
board: stm32: add stm32f469-discovery board support

This board offers :

 _ STM32F469NIH6 microcontroller featuring 2 Mbytes of Flash memory
   and 324 Kbytes of RAM in BGA216 package
 _ On-board ST-LINK/V2-1 SWD debugger, supporting USB reenumeration capability:
     _ Mbed-enabled (mbed.org)
     _ USB functions: USB virtual COM port, mass storage, debug port
 _ 4 inches 800x480 pixel TFT color LCD with MIPI DSI interface and capacitive
   touch screen
 _ SAI Audio DAC, with a stereo headphone output jack
 _ 3 MEMS microphones
 _ MicroSD card connector
 _ I2C extension connector
 _ 4Mx32bit SDRAM
 _ 128-Mbit Quad-SPI NOR Flash
 _ Reset and wake-up buttons
 _ 4 color user LEDs
 _ USB OTG FS with Micro-AB connector
 _ Three power supply options:
 _ Expansion connectors and Arduino™ UNO V3 connectors

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: DTS: stm32: add stm32f469-disco-u-boot dts file
Patrice Chotard [Tue, 12 Dec 2017 08:49:43 +0000 (09:49 +0100)]
ARM: DTS: stm32: add stm32f469-disco-u-boot dts file

  _ Add gpio compatible and aliases for stm32f469

  _ Add FMC sdram node

  _ Add "u-boot,dm-pre-reloc" for rcc, fmc, fixed-clock, pinctrl,
    pwrcfg and gpio nodes.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: DTS: add STM32F469 Discovery board support
Patrice Chotard [Tue, 12 Dec 2017 08:49:42 +0000 (09:49 +0100)]
ARM: DTS: add STM32F469 Discovery board support

This DT file comes from kernel v4.15-rc1

stm32f469-pinctrl.dtsi header has been updated with correct
STMicroelectronics Copyright.

Remove the paragraph about writing to the Free Software
Foundation's mailing address as requested by checkpatch.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoram: stm32: add memory mapping selection support
Patrice Chotard [Tue, 12 Dec 2017 08:49:41 +0000 (09:49 +0100)]
ram: stm32: add memory mapping selection support

This allows to controls the memory internal mapping at
address 0x0000 0000.
We can either map at 0x0000 0000 :
  _ main flash memory
  _ system flash memory
  _ FMC bank1 (NOR/PSRAM 1 and 2)
  _ embedded SRAM
  _ FMC/SDRAM bank1

This is needed for future STM32F469-disco board

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoboard: stm32f429-disco: switch to DM STM32 pinctrl and gpio driver
Patrice Chotard [Tue, 12 Dec 2017 08:49:40 +0000 (09:49 +0100)]
board: stm32f429-disco: switch to DM STM32 pinctrl and gpio driver

Use available DM stm32f7_gpio.c and pinctrl_stm32.c drivers
instead of board GPIO initialization.

Remove stm32_gpio.c which is no more used and migrate
structs stm32_gpio_regs and stm32_gpio_priv into
arch-stm32f4/gpio.h to not break compilation.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoboard: stm32f429-disco: switch to DM STM32 clock driver
Patrice Chotard [Tue, 12 Dec 2017 08:49:39 +0000 (09:49 +0100)]
board: stm32f429-disco: switch to DM STM32 clock driver

Use available DM clk_stm32f.c driver instead of dedicated
mach-stm32/stm32f4/clock.c.

Migrate periph_clock defines from stm32_periph.h directly in
CLK driver. These periph_clock defines will be removed when STMMAC,
TIMER2 and SYSCFG drivers will support DM CLK.

Enable also CLK flag.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agomach-stm32: stmf32f4: timer: remove clock_get() call
Patrice Chotard [Tue, 12 Dec 2017 08:49:38 +0000 (09:49 +0100)]
mach-stm32: stmf32f4: timer: remove clock_get() call

In order to use common clock driver between STM32F4 and
STM32F7, remove clock_get() call
As APB_PSC is always set to 2, only case when
clock_get(CLOCK_AHB) != clock_get(CLOCK_APB1) is kept

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoboard: stm32f429-disco: switch to DM STM32 serial driver
Patrice Chotard [Tue, 12 Dec 2017 08:49:37 +0000 (09:49 +0100)]
board: stm32f429-disco: switch to DM STM32 serial driver

Remove serial_stm32.c driver and uart init from board file,
use available DM serial_stm32x7.c driver compatible for
STM32F4/F7 and H7 SoCs.

The serial_stm32x7.c driver will be renamed later with a more
generic name as it's shared with all STM32 Socs.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoconfigs: stm32f429-disco: enable MISC, STM32_RCC, DM_RESET and STM32_RESET
Patrice Chotard [Tue, 12 Dec 2017 08:49:36 +0000 (09:49 +0100)]
configs: stm32f429-disco: enable MISC, STM32_RCC, DM_RESET and STM32_RESET

This allows to support rcc MFD driver.
By enabling all these flags, we need to increase malloc area to avoid
crash during early stage.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agopinctrl: stm32: add stm32f4 pinctrl compatible strings
Patrice Chotard [Tue, 12 Dec 2017 08:49:35 +0000 (09:49 +0100)]
pinctrl: stm32: add stm32f4 pinctrl compatible strings

STM32F4 SoCs uses the same pinctrl block as found into
STM32F7 and H7 SoCs.
We can add "st,stm32f429-pinctrl" and "st,stm32f469-pinctrl"
compatible string into pinctrl_stm32.c.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoboard: stm32f429-discovery: switch to DM STM32 sdram driver
Patrice Chotard [Tue, 12 Dec 2017 08:49:34 +0000 (09:49 +0100)]
board: stm32f429-discovery: switch to DM STM32 sdram driver

Use available DM stm32_sdram.c driver instead of board
SDRAM initialization.
For that, enable OF_CONTROL, OF_EMBED and STM32_SDRAM flags.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: DTS: stm32: add stm32f429-disco-u-boot dts file
Patrice Chotard [Tue, 12 Dec 2017 08:49:33 +0000 (09:49 +0100)]
ARM: DTS: stm32: add stm32f429-disco-u-boot dts file

_ Add gpio compatible and aliases for stm32f429

_ Add FMC sdram node with associated new bindings value to
  manage second bank (ie bank 1).

_ Add "u-boot,dm-pre-reloc" for rcc, fmc, fixed-clock, pinctrl,
  pwrcfg and gpio nodes.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: DTS: stm32: add STM32F429 SoC and its Discovery board support
Patrice Chotard [Tue, 12 Dec 2017 08:49:32 +0000 (09:49 +0100)]
ARM: DTS: stm32: add STM32F429 SoC and its Discovery board support

All these files comes from kernel v4.15-rc1.

Update some header with correct STMicroelectronics Copyright.

Remove the paragraph about writing to the Free Software
Foundation's mailing address as requested by checkpatch.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoARM: mvebu: correct reference for "ethernet1" on DB-88F6820-AMC
Chris Packham [Mon, 8 Jan 2018 03:17:12 +0000 (16:17 +1300)]
ARM: mvebu: correct reference for "ethernet1" on DB-88F6820-AMC

The DB-88F6820-AMC connects ethernet@34000 and ethernet@70000 which are
labeled as eth2 and eth0 in armada-38x.dts. The ethernet@30000 (eth1) is
not used on the AMC board.

This eliminates the following bootup message

  Device 'ethernet@70000': seq 0 is in use by 'ethernet@34000'

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agorockchip: rk3288: enable rockusb support on rk3288 based device
Eddie Cai [Fri, 15 Dec 2017 00:17:13 +0000 (08:17 +0800)]
rockchip: rk3288: enable rockusb support on rk3288 based device

this patch enable rockusb support on rk3288 based device.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agorockchip:usb: add a simple readme for rockusb
Eddie Cai [Fri, 15 Dec 2017 00:17:12 +0000 (08:17 +0800)]
rockchip:usb: add a simple readme for rockusb

add a simple readme to introduce rockusb and tell people how to use it

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agousb: rockchip: add rockusb command
Eddie Cai [Fri, 15 Dec 2017 00:17:11 +0000 (08:17 +0800)]
usb: rockchip: add rockusb command

this patch add rockusb command. the usage is
rockusb <USB_controller> <devtype> <dev[:part]>
e.g. rockusb 0 mmc 0

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agousb: rockchip: add the rockusb gadget
Eddie Cai [Fri, 15 Dec 2017 00:17:10 +0000 (08:17 +0800)]
usb: rockchip: add the rockusb gadget

this patch implement rockusb protocol on the device side. this is based on
USB download gadget infrastructure. the rockusb function implements the rd,
wl, rid commands. it can work with rkdeveloptool

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agomusb: sunxi: Use base address from device tree
Chen-Yu Tsai [Sat, 30 Dec 2017 12:44:07 +0000 (20:44 +0800)]
musb: sunxi: Use base address from device tree

Now that the musb sunxi glue driver is completely device model / device
tree driven, we should use the base address from the device tree,
instead of hard-coding it in the source code.

Fixes: 3a61b080acee ("musb: sunxi: switch to the device model")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
6 years agoarm: Exercise v7_arch_cp15_set_acr even without errata fixups
Siarhei Siamashka [Sun, 13 Aug 2017 02:25:20 +0000 (05:25 +0300)]
arm: Exercise v7_arch_cp15_set_acr even without errata fixups

By applying this patch, we are ensuring that the code paths
responsible for applying errata workarounds are also exercised
on CPU revisions, which actually don't need these workarounds.

Only CONFIG_ARM_ERRATA_621766, CONFIG_ARM_ERRATA_454179,
CONFIG_ARM_ERRATA_725233 and CONFIG_ARM_ERRATA_430973 are
covered by this patch (Cortex-A8).

This improves code coverage when testing U-Boot builds
on newer hardware. In particular, the problematic commit
00bbe96ebabb ("arm: omap: Unify get_device_type() function")
would break both BeageBoard and BeagleBoard XM rather than
just older BeagleBoard.

As an additional bonus, we need fewer instructins and the SPL
size is reduced.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Tue, 9 Jan 2018 18:28:51 +0000 (13:28 -0500)]
Merge git://git.denx.de/u-boot-rockchip

6 years agopinctrl: mvebu: Make drivers depend on the pinctrl framework
Miquel Raynal [Fri, 29 Dec 2017 14:31:56 +0000 (15:31 +0100)]
pinctrl: mvebu: Make drivers depend on the pinctrl framework

Armada pinctrl drivers shall not be compiled without the entire pinctrl
framework and thus lack a "depends on" condition, otherwise the driver
will simply not be probed.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoARM: mvebu: Allow MVNETA to be selected with Armada 3700 SoCs
Miquel Raynal [Thu, 28 Dec 2017 14:43:09 +0000 (15:43 +0100)]
ARM: mvebu: Allow MVNETA to be selected with Armada 3700 SoCs

Until now, Armada 3700 SoCs could not enable the mvneta driver, and thus
did not benefit from Ethernet support. Add ARMADA_3700 in the
"depends on" list of the MVNETA Kconfig entry.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm: mvebu: ClearFog: document boot selection switches, update UART
Florian Klink [Sat, 23 Dec 2017 00:42:48 +0000 (01:42 +0100)]
arm: mvebu: ClearFog: document boot selection switches, update UART

Signed-off-by: Florian Klink <flokli@flokli.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm64: a37xx: use distro bootcmd
Andre Heider [Sat, 2 Dec 2017 09:46:37 +0000 (10:46 +0100)]
arm64: a37xx: use distro bootcmd

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm64: a37xx: defconfigs: enable CONFIG_DISTRO_DEFAULTS
Andre Heider [Sat, 2 Dec 2017 09:46:36 +0000 (10:46 +0100)]
arm64: a37xx: defconfigs: enable CONFIG_DISTRO_DEFAULTS

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm64: a37xx: add distro compatible env vars
Andre Heider [Sat, 2 Dec 2017 09:46:35 +0000 (10:46 +0100)]
arm64: a37xx: add distro compatible env vars

the values of dt_addr_r/kernel_addr_r/ramdisk_addr_r are taken from
the downstream 'u-boot-2017.03-armada-17.10' release.

the chosen values of scriptaddr and pxefile_addr_r are below fdt_addr_r,
in 1MB steps.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm64: a37xx: use disto defaults
Andre Heider [Sat, 2 Dec 2017 09:46:34 +0000 (10:46 +0100)]
arm64: a37xx: use disto defaults

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agotools: Add Marvell recovery image download script
Konstantin Porotchkin [Thu, 30 Nov 2017 14:10:09 +0000 (16:10 +0200)]
tools: Add Marvell recovery image download script

Introduce the recovery image download script for usage with
Marvell Armada SoC families (excepting 37xx family).
Since Marvell BootROM uses a sliding window in UART buffer
for detecting escape sequence during the boot, it's easier
to interrupt the normal boot flow by sending a long stream
of chained escape sequences to the serial port instead of
periodically sending a single escape sequence as it is done
by kwboot utility.
Additional benefit of using this script is the ability to
adjust the escape sequence stream length withoiut need for
compilation.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Igal Liberman <igall@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoMerge git://git.denx.de/u-boot-uniphier
Tom Rini [Tue, 9 Jan 2018 13:45:02 +0000 (08:45 -0500)]
Merge git://git.denx.de/u-boot-uniphier

6 years agoARM: uniphier: hide memory top by platform hook instead of CONFIG
Masahiro Yamada [Sat, 6 Jan 2018 13:59:26 +0000 (22:59 +0900)]
ARM: uniphier: hide memory top by platform hook instead of CONFIG

I do not see a good reason to do this by a CONFIG option that affects
all SoCs.  The ram_size can be adjusted by dram_init() at run-time.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: enable CONFIG_MMC_SDHCI_SDMA for ARMv8 SoCs
Masahiro Yamada [Sat, 6 Jan 2018 13:59:25 +0000 (22:59 +0900)]
ARM: uniphier: enable CONFIG_MMC_SDHCI_SDMA for ARMv8 SoCs

I did not enable SDMA when I added sdhci-cadence support because LD20
boards are equipped with a large amount memory beyond 32 bit address
range, but SDMA does not support the 64bit address.  U-Boot relocates
itself to the end of effectively available RAM.  This would make the
MMC enumeration fail because the buffer for EXT_CSD allocated in the
stack would go too high, then SDMA would fail to transfer data.

Recent SDHCI-compatible controllers support ADMA, but unfortunately
U-Boot does not support ADMA.

In the previous commit, I hided the DRAM area that exceeds the 32 bit
address range.  Now, I can enable CONFIG_MMC_SDHCI_SDMA.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: do not use RAM that exceeds 32 bit address range
Masahiro Yamada [Sat, 6 Jan 2018 13:59:24 +0000 (22:59 +0900)]
ARM: uniphier: do not use RAM that exceeds 32 bit address range

LD20 / PXs3 boards are equipped with a large amount of memory beyond
the 32 bit address range.  U-Boot relocates itself to the end of the
available RAM.

This is a problem for DMA engines that only support 32 bit physical
address, like the SDMA of SDHCI controllers.

In fact, U-Boot does not need to run at the very end of RAM.  It is
rather troublesome for drivers with DMA engines because U-Boot does
not have API like dma_set_mask(), so DMA silently fails, making the
driver debugging difficult.

Hide the memory region that exceeds the 32 bit address range.  It can
be done by simply carving out gd->ram_size.  It would also possible to
override get_effective_memsize() or to define CONFIG_MAX_MEM_MAPPED,
but dram_init() is a good enough place to do this job.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoarm: socfpga: Guard commands with CONFIG_SPL_BUILD tests
Tom Rini [Fri, 22 Dec 2017 17:19:22 +0000 (12:19 -0500)]
arm: socfpga: Guard commands with CONFIG_SPL_BUILD tests

In order for these commands to not be included in SPL we need to guard
compilation with CONFIG_SPL_BUILD checks.  Reorganize some sections of
code slightly in order to avoid new warnings and mark the command
functions as static as they should have been before.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoARM: socfpga: Enable part command for socfpga platform
Andrey Zhizhikin [Mon, 18 Dec 2017 13:04:57 +0000 (14:04 +0100)]
ARM: socfpga: Enable part command for socfpga platform

Enable CONFIG_CMD_PART item, as default environment requires it
and complains this command in unknown.

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
6 years agoarm64: layerscape: Move CONFIG_HAS_FSL_DR_USB to Kconfig
Ran Wang [Wed, 20 Dec 2017 02:34:20 +0000 (10:34 +0800)]
arm64: layerscape: Move CONFIG_HAS_FSL_DR_USB to Kconfig

Rename to USB_EHCI_FSL, use Kconfig to select ehci accordingly.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
6 years agousb: ehci: fsl: Fix some compile warnings.
Ran Wang [Wed, 20 Dec 2017 02:34:19 +0000 (10:34 +0800)]
usb: ehci: fsl: Fix some compile warnings.

When enable CONFIG_HAS_FSL_DR_USB, we might encounter below compile
warning, apply this patch can fix it:

drivers/usb/host/ehci-fsl.c:109:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   ((u32)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
    ^
drivers/usb/host/ehci-fsl.c:108:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  hcor = (struct ehci_hcor *)
         ^
drivers/usb/host/ehci-fsl.c:115:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        (u32)hccr, (u32)hcor,
        ^
include/log.h:131:26: note: in definition of macro 'debug_cond'
    printf(pr_fmt(fmt), ##args); \
                          ^~~~
drivers/usb/host/ehci-fsl.c:114:2: note: in expansion of macro 'debug'
  debug("ehci-fsl: init hccr %x and hcor %x hc_length %d\n",
  ^~~~~
drivers/usb/host/ehci-fsl.c:115:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        (u32)hccr, (u32)hcor,
                   ^
include/log.h:131:26: note: in definition of macro 'debug_cond'
    printf(pr_fmt(fmt), ##args); \
                          ^~~~
drivers/usb/host/ehci-fsl.c:114:2: note: in expansion of macro 'debug'
  debug("ehci-fsl: init hccr %x and hcor %x hc_length %d\n",
  ^~~~~

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
6 years agoarmv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board
Ran Wang [Wed, 20 Dec 2017 02:34:18 +0000 (10:34 +0800)]
armv8: ls1012a: Add USB 2.0 controller phy type for ls1012aqds board

Without this propertiy, U-Boot will pop warning of 'USB phy type not
defined' when select CONFIG_HAS_FSL_DR_USB.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
6 years agorockchip: clk: bind reset driver
Elaine Zhang [Tue, 19 Dec 2017 10:22:38 +0000 (18:22 +0800)]
rockchip: clk: bind reset driver

Bind rockchip reset to clock-controller with rockchip_reset_bind().

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: reset: support a (common) rockchip reset drivers
Elaine Zhang [Tue, 19 Dec 2017 10:22:37 +0000 (18:22 +0800)]
rockchip: reset: support a (common) rockchip reset drivers

Create driver to support the soft reset (i.e. peripheral)
of all Rockchip SoCs.

Example of usage:
i2c driver:
ret = reset_get_by_name(dev, "i2c", &reset_ctl);
if (ret) {
error("reset_get_by_name() failed: %d\n", ret);
}

reset_assert(&reset_ctl);
udelay(50);
reset_deassert(&reset_ctl);

i2c dts node:
resets = <&cru SRST_P_I2C1>, <&cru SRST_I2C1>;
reset-names = "p_i2c", "i2c";

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Fixed commit tag:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoPrepare v2018.01 v2018.01
Tom Rini [Tue, 9 Jan 2018 01:25:29 +0000 (20:25 -0500)]
Prepare v2018.01

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-imx
Tom Rini [Mon, 8 Jan 2018 17:51:47 +0000 (12:51 -0500)]
Merge git://git.denx.de/u-boot-imx

6 years agomtd: nand: mxs_nand_spl: Remove nand size print
Jagan Teki [Fri, 5 Jan 2018 07:04:23 +0000 (12:34 +0530)]
mtd: nand: mxs_nand_spl: Remove nand size print

It is not much needed to print nand size in SPL during nand boot,
and most of nand spl drivers doesn't print the same.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoboard: engicam: Fix to remove legacy board/icorem6_rqs
Jagan Teki [Fri, 5 Jan 2018 07:04:21 +0000 (12:34 +0530)]
board: engicam: Fix to remove legacy board/icorem6_rqs

board/icorem6_rqs/ is forgot to remove while moving
common board files together in
(sha1: 52aaddd6f415397bb2eae0d68a8cc1c5c4a98bb3)
"i..MX6: engicam: Add imx6q/imx6ul boards for existing boards"

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agoimx: initialize and use generic timer on i.MX 6UL/ULL
Stefan Agner [Fri, 5 Jan 2018 14:08:19 +0000 (15:08 +0100)]
imx: initialize and use generic timer on i.MX 6UL/ULL

The i.MX 6UL/ULL feature a Cortex-A7 CPU which suppor the ARM
generic timer. This change makes use of the ARM generic timer in
U-Boot.

This is crucial to make the ARM generic timers usable in Linux since
timer_init() initalizes the system counter module, which is necessary
to use the generic timers CP15 registers.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: introduce CONFIG_GPT_TIMER
Stefan Agner [Fri, 5 Jan 2018 14:08:18 +0000 (15:08 +0100)]
imx: introduce CONFIG_GPT_TIMER

Introduce a new config symbol to select the i.MX
General Purpose Timer (GPT).

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: move CONFIG_SYSCOUNTER_TIMER to Kconfig
Stefan Agner [Fri, 5 Jan 2018 14:08:17 +0000 (15:08 +0100)]
imx: move CONFIG_SYSCOUNTER_TIMER to Kconfig

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Mon, 8 Jan 2018 13:26:46 +0000 (08:26 -0500)]
Merge git://git.denx.de/u-boot-x86

6 years agocrypto/fsl: fix BLOB encapsulation and decapsulation
Clemens Gruber [Sun, 7 Jan 2018 19:26:29 +0000 (20:26 +0100)]
crypto/fsl: fix BLOB encapsulation and decapsulation

The blob_encap and blob_decap functions were not flushing the dcache
before passing data to CAAM/DMA and not invalidating the dcache when
getting data back.
Therefore, blob encapsulation and decapsulation failed with errors like
the following due to data cache incoherency:
"40000006: DECO: desc idx 0: Invalid KEY command"

To ensure coherency, we require the key_mod, src and dst buffers to be
aligned to the cache line size and flush/invalidate the memory regions.
The same requirements apply to the job descriptor.

Tested on an i.MX6Q board.

Reviewed-by: Sumit Garg <sumit.garg@nxp.com>
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
6 years agox86: tangier: Add Bluetooth to ACPI table
Andy Shevchenko [Thu, 4 Jan 2018 16:40:13 +0000 (18:40 +0200)]
x86: tangier: Add Bluetooth to ACPI table

As defined on reference board followed by Intel Edison a Bluetooth
device is attached to HSU0, i.e. PCI 0000:04.1.

Describe it in ACPI accordingly.

Note, we use BCM2E95 ID here as one most suitable for such device based
on the description in commit message of commit 89ab37b489d1
("Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96")
in the Linux kernel source tree.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agox86: tangier: Use actual GPIO hardware numbers
Andy Shevchenko [Thu, 4 Jan 2018 16:40:12 +0000 (18:40 +0200)]
x86: tangier: Use actual GPIO hardware numbers

The recent commit 03c4749dd6c7
  ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation")
in the Linux kernel reveals the issue we have in ACPI tables here,
i.e. we must use hardware numbers for GPIO resources and,
taking into consideration that GPIO and pin control are *different* IPs
on Intel Tangier, we need to supply numbers properly.

Besides that, it improves user experience since the official documentation
for Intel Edison board is referring to GPIO hardware numbering scheme.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agox86: Move commands from under arch/x86 to cmd/x86/
Tom Rini [Wed, 3 Jan 2018 13:54:27 +0000 (08:54 -0500)]
x86: Move commands from under arch/x86 to cmd/x86/

We only need to compile and link these files when building for full
U-Boot.  Move them to under cmd/x86/ to make sure they aren't linked in
and undiscarded due to u_boot_list_2_cmd_* being included).

Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agomx6ull: Handle the CONFIG_MX6ULL cases correctly
Fabio Estevam [Wed, 3 Jan 2018 14:33:05 +0000 (12:33 -0200)]
mx6ull: Handle the CONFIG_MX6ULL cases correctly

Since commit 051ba9e082f7 ("Kconfig: mx6ull: Deselect MX6UL from
CONFIG_MX6ULL") CONFIG_MX6ULL does not select CONFIG_MX6UL anymore, so
take this into consideration in all the checks for CONFIG_MX6UL.

This fixes a boot regression.

Reported-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Tested-by: Breno Lima <breno.lima@nxp.com>
Tested-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Tested-by: Jörg Krause <joerg.krause@embedded.rocks>
6 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Wed, 3 Jan 2018 17:27:12 +0000 (12:27 -0500)]
Merge git://git.denx.de/u-boot-rockchip

6 years agoARM: imx: cm_fx6: env: don't run boot scripts twice
Christopher Spinrath [Sat, 9 Dec 2017 15:37:43 +0000 (16:37 +0100)]
ARM: imx: cm_fx6: env: don't run boot scripts twice

Boot scripts located in the root directory of the first partition of
USB, mmc, and SATA drives are executed twice: first by the distro boot
command and then by the legacy boot command. This may have weird side
effects if those scripts only change or extend the environment
(including parts of the boot command itself).

Removing the script execution from the legacy boot command has its own
caveats. For instance, the distro boot command may execute the boot.scr
on the mmc drive, then the boot.scr on the SATA drive, before the
legacy boot command actually boots from the mmc drive. However, the
current behavior would only execute the boot.scr once more before the
actual boot, but it does not prevent the script located on the SATA
drive from being executed, and thus, both scripts from being mixed up.

Considering that the legacy boot command is only in place to boot old
(standard) installations, let's go with the resolution having less
custom code and remove the script execution from the legacy boot
command.

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoARM: imx: cm_fx6: env: support distro boot command
Christopher Spinrath [Sat, 9 Dec 2017 15:37:42 +0000 (16:37 +0100)]
ARM: imx: cm_fx6: env: support distro boot command

The current default environment of the cm_fx6 is not suitable for
booting modern distributions.

Instead of extending the custom environment, let's use the distro
boot command, which has been developed for precisely this use case.

If the distro boot command fails, fall back to the old behavior
(except for USB drives where the old behaviour is completely covered
by the distro boot command). That way it is still possible to create
"rescue SD cards" for old installations (e.g. if one messes up the
on-flash environment).

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoARM: imx: cm_fx6: env: use standard variables
Christopher Spinrath [Sat, 9 Dec 2017 15:37:41 +0000 (16:37 +0100)]
ARM: imx: cm_fx6: env: use standard variables

In preparation for supporting the distro boot command, introduce the
standard variables for specifying load addresses, which are documented
in README and doc/README.distro, and replace the custom variables
used so far with them.

Since the current address layout disregards an address for an initramfs,
also switch to the load addresses used and proven by other imx6 boards
(e.g. the wandboard and nitrogen6x), instead of going on with our own
way.

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agorockchip: firefly-rk3399: enable SPL_ATF_NO_PLATFORM_PARAM
Philipp Tomsich [Tue, 2 Jan 2018 20:16:44 +0000 (21:16 +0100)]
rockchip: firefly-rk3399: enable SPL_ATF_NO_PLATFORM_PARAM

The Rockchip-released ATF for the Firefly apparently (i.e. Kever
reported this) does not tolerate a FDT being passed as the platform
parameter and will run into a hard stop.

To work around this limitation in the ATF parameter handling, we
enable SPL_ATF_NO_PLATFORM_PARAM (which will force passing NULL for
the platform parameters).

Note that this only affects this platform, as the ATF releases for the
RK3368 and RK3399 have always either ignored the platform parameter
(i.e. before the FDT-based parameters were supported) or support
receiving a pointer to a FDT.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 years agospl: atf: add SPL_ATF_NO_PLATFORM_PARAM option
Philipp Tomsich [Tue, 2 Jan 2018 20:16:43 +0000 (21:16 +0100)]
spl: atf: add SPL_ATF_NO_PLATFORM_PARAM option

While we expect to call a pointer to a valid FDT (or NULL) as the
platform parameter to an ATF, some ATF versions are not U-Boot aware
and have an insufficiently robust (or an overzealour) parameter
validation: either way, this may cause a hard-stop with uncooperative
ATF versions.

This change adds the option to suppress passing a platform parameter
and will always pass NULL.

Debug output from ATF w/ this option disabled (i.e. default):
      INFO:    plat_param_from_bl2: 0x291450
Debug output from ATF w/ this option enabled:
      INFO:    plat_param_from_bl2: 0

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 years agoimx: spl: Fix NAND bootmode detection
Eran Matityahu [Thu, 14 Dec 2017 18:20:02 +0000 (20:20 +0200)]
imx: spl: Fix NAND bootmode detection

commit 20f14714169 ("imx: spl: Update NAND bootmode detection bit")
broke the NAND bootmode detection by checking if
BOOT_CFG1[7:4] == 0x8 for NAND boot mode.
This commit essentially reverts it, while using the IMX6_BMODE_*
macros that were introduced since.

Tables 8-7 & 8-10 from IMX6DQRM say the NAND boot mode selection
is done when BOOT_CFG1[7] is 1, but BOOT_CFG1[6:4] is not
necessarily 0x0 in this case.
Actually, NAND boot mode is when 0x8 <= BOOT_CFG1[7:4] <= 0xf,
like it was in the code before.

Signed-off-by: Eran Matityahu <eran.m@variscite.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Jagan Teki <jagan@openedev.com>
Cc: Tim Harvey <tharvey@gateworks.com>
6 years agomx6: Add board mx6memcal for use in validating DDR
Eric Nelson [Mon, 11 Dec 2017 15:52:11 +0000 (13:52 -0200)]
mx6: Add board mx6memcal for use in validating DDR

This is a virtual "board" that uses configuration files and
Kconfig to define the memory layout used by a real board during
the board bring-up process.

It generates an SPL image that can be loaded using imx_usb or
SB_LOADER.exe.

When run, it will generate a set of calibration constants for
use in either or both a DCD configuration file for boards that
use u-boot.imx or struct mx6_mmdc_calibration for boards that
boot via SPL.

In essence, it is a configurable, open-source variant of the
Freescale ddr-stress tool.

https://community.nxp.com/docs/DOC-105652

File mx6memcal_defconfig configures the board for use with
mx6sabresd or mx6qsabreauto.

Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agovideo: Support multiple lines version string display
Peng Fan [Tue, 2 Jan 2018 07:25:37 +0000 (15:25 +0800)]
video: Support multiple lines version string display

The calculation of left space for version string is not correct, should
use VIDEO_COLS not VIDEO_LINE_LEN / 2, otherwise we will get larger space
than actual have and cause string to overlay logo picture.

Also current version string display only supports two lines words at max.
This also causes overlay when the LCD pixel column size is not enough.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Anatolij Gustschin <agust@denx.de>
6 years agovideo: ipu: Fix dereferencing NULL pointer problem
Peng Fan [Tue, 2 Jan 2018 07:25:36 +0000 (15:25 +0800)]
video: ipu: Fix dereferencing NULL pointer problem

The clk_set_rate function dereferences the clk pointer without
checking whether it is NULL. This may cause problem when clk is NULL.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
6 years agorockchip: board: lion-rk3368: reduce env-size default to 8KiB
Philipp Tomsich [Tue, 2 Jan 2018 17:43:37 +0000 (18:43 +0100)]
rockchip: board: lion-rk3368: reduce env-size default to 8KiB

We want to have the same configuration defaults for the RK3368-uQ7
as for the RK3399-Q7: this change reduces the default env-size to
8KiB to ensure that it does not overlap the boot-payload on SD/MMC
configurations.

References: commit fe529e6597c0 ("rockchip: rk3399-puma: reduce env size to 8kiB")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoboards: amlogic: khadas-vim: Typo fixup
Neil Armstrong [Tue, 2 Jan 2018 12:34:59 +0000 (13:34 +0100)]
boards: amlogic: khadas-vim: Typo fixup

Khadas VIM is an Open Source DIY Box manufactured by Shenzhen Wesion NOT 'Tomato'

The fix was provided by Khadas Team member 'numbqq'.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoPrepare v2018.01-rc3 v2018.01-rc3
Tom Rini [Tue, 2 Jan 2018 00:46:43 +0000 (19:46 -0500)]
Prepare v2018.01-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-rockchip
Tom Rini [Mon, 1 Jan 2018 14:04:35 +0000 (09:04 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-rockchip

6 years agopower: tps65910: replace error() by pr_err()
Felix Brack [Mon, 18 Dec 2017 14:38:28 +0000 (15:38 +0100)]
power: tps65910: replace error() by pr_err()

The patch replaces the former error() by the new pr_err().
This makes the TPS65910 driver conform to Masahiro's patch
'treewide:replace with error() with pr_err()' introduced
October 2017.

Signed-off-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoconfigs: am335x_boneblack: Bring back missed bootcmd
Sam Protsenko [Thu, 28 Dec 2017 21:03:25 +0000 (23:03 +0200)]
configs: am335x_boneblack: Bring back missed bootcmd

Commit b6251db8c3f0 ("Kconfig: Introduce USE_BOOTCOMMAND and migrate
BOOTCOMMAND") removed CONFIG_BOOTCOMMAND option from
include/configs/am335x_evm.h file. But that option wasn't added to
defconfig files for BeagleBone Black board.

Because of this we can't boot Linux from SD card using just
"run bootcmd", getting next error:

    ** File not found /boot/undefined **

That's because "fdtfile" variable has "undefined" value by default, and
"bootcmd" doesn't call "run findfdt" command, which assigns "fdtfile" to
correct device tree file for current board name (obtained from EEPROM).

So we are forced to either call "run findfdt" command manually, or
assign manually "fdtfile=am335x-boneblack.dtb" (e.g. in uEnv.txt file).

Bring back CONFIG_BOOTCOMMAND to BBB defconfigs so that we can boot
Linux rootfs from SD card automatically without any addition actions.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
6 years agodm: core: remove orphaned parameter description in platdata.h
Heinrich Schuchardt [Sun, 24 Dec 2017 12:14:12 +0000 (13:14 +0100)]
dm: core: remove orphaned parameter description in platdata.h

struct driver_info has no field 'flags'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: omap3: evm: Refactor 'board_eth_init'
Derald D. Woods [Sat, 16 Dec 2017 20:14:50 +0000 (14:14 -0600)]
ARM: omap3: evm: Refactor 'board_eth_init'

This commit clears 'ethaddr' before calling 'smc911x_initialize' to
allow the SROM MAC address to be assigned properly.

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
6 years agoARM: dts: omap3-evm: Enable DM and devicetree for TMDSEVM{3530, 3730}
Derald D. Woods [Wed, 27 Dec 2017 15:40:16 +0000 (09:40 -0600)]
ARM: dts: omap3-evm: Enable DM and devicetree for TMDSEVM{3530, 3730}

This commit updates the configuration files needed to support OF_CONTROL
on the OMAP3 EVM baseboard.

Additionally:
- CONFIG_SYS_THUMB_BUILD is enabled
- CONFIG_SPL_ENV_SUPPORT is enabled

Tested using GCC 7.2.0 [--with-float=hard --with-mode=thumb].

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
6 years agoARM: dts: omap3-evm: Add support for TMDSEVM{3530, 3730}
Derald D. Woods [Sat, 16 Dec 2017 20:14:48 +0000 (14:14 -0600)]
ARM: dts: omap3-evm: Add support for TMDSEVM{3530, 3730}

This commit adds OMAP3 EVM devicetree files from Linux v4.15-rc3. Note
that this is the first addition of OMAP34XX devicetree files.

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
6 years agoARM: omap3: evm: Do not relocate FDT address
Derald D. Woods [Thu, 28 Dec 2017 07:25:43 +0000 (01:25 -0600)]
ARM: omap3: evm: Do not relocate FDT address

This commit keeps the 'fdtaddr' as provided by DEFAULT_LINUX_BOOT_ENV.

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
6 years agorockchip: dts: rk3399-evb: support boot from sd-card
Kever Yang [Wed, 20 Dec 2017 02:40:40 +0000 (10:40 +0800)]
rockchip: dts: rk3399-evb: support boot from sd-card

Enable sdmmc node in SPL and add it to boot order.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Fixed commit tags:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>