]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
5 years agoapalis_imx6: revert fuse value set in mfgr_fuse
Max Krummenacher [Fri, 8 Feb 2019 17:12:22 +0000 (18:12 +0100)] 
apalis_imx6: revert fuse value set in mfgr_fuse

We have two commands to change the bootmode fuses:
mfgr_fuse which set fuse 0/5 and 0/6
and
updt_fuse which burns bit 4 of 0/5.

Before BSP 2.6 we fused in mfgr_fuse 0x5062, which boots
from the user partition of the eMMC.
To workaround certain hangs we moved to fastboot mode and
using the first bootpartition of the eMMC requiring a fuse
value of 0x5072 which could be achieved by the then added
updt_fuse command. At the same time the mfgr_fuse command
was changed to also fuse 0x5072, revert that second change
so that one can fuse both values, one with just mfgr_fuse
and the later with mfgr_fuse;updt_fuse.

Note that the mfgr_fuse command is only needed at module
production time, a customer might need to use updt_fuse
when upgrading an older module to be compatible with a
newer image. The command is integrated into the image
update scripts.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: disable ri and dcd irq in uarts
Max Krummenacher [Fri, 8 Feb 2019 17:12:21 +0000 (18:12 +0100)] 
apalis_imx6: disable ri and dcd irq in uarts

If the UART is used in DTE mode the RI and DCD bits in UCR3 become
irq enable bits. Both are set to enabled after reset and both likely
are pending.

Disable the bits also on UARTs not used in the boot loader to prevent
an interrupt storm when Linux enables the UART interrupts.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: pf0100: reorder and cleanup message printing
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:20 +0000 (18:12 +0100)] 
apalis_imx6: pf0100: reorder and cleanup message printing

Keep debug code at the end of the function.
Use a one line informational message for the PMIC only.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: unify sd/mmc drive strength with linux kernel settings
Max Krummenacher [Fri, 8 Feb 2019 17:12:19 +0000 (18:12 +0100)] 
apalis_imx6: unify sd/mmc drive strength with linux kernel settings

In the Linux device tree we use 40Ohm drive strength. So use the same
value in U-Boot.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: use both sd/mmc interfaces for setsdupdate
Max Krummenacher [Fri, 8 Feb 2019 17:12:18 +0000 (18:12 +0100)] 
apalis_imx6: use both sd/mmc interfaces for setsdupdate

During porting to 2016.11 the check of a SD (mmc2) interface
was dropped, this was unintended.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: add distroboot support
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:17 +0000 (18:12 +0100)] 
apalis_imx6: add distroboot support

Add support for distro boot. This is especially helpful for external
devices. There is a global boot command which scans a predefined
list of boot targets:
  run distro_bootcmd

As well as direct boot commands such as:
  run bootcmd_mmc1
  run bootcmd_mmc2
  run bootcmd_usb
  run bootcmd_dhcp
  ...

Refer to doc/README.distro for details.

While at it, remove the CONFIG_DRIVE_TYPES define which has not
been used and was meant to be used for multi device boot support
which is now provided by distroboot.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: drop CONFIG_OF_SYSTEM_SETUP
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:16 +0000 (18:12 +0100)] 
apalis_imx6: drop CONFIG_OF_SYSTEM_SETUP

This doesn't do anything anymore, probably never did.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: migrate usb to using driver model
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:15 +0000 (18:12 +0100)] 
apalis_imx6: migrate usb to using driver model

Migrate USB to using driver model.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: migrate mmc and sata to using driver model
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:14 +0000 (18:12 +0100)] 
apalis_imx6: migrate mmc and sata to using driver model

Migrate MMC and SATA to using driver model.

While at it also enable SCSI driver model.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: migrate pmic and regulator to using driver model
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:13 +0000 (18:12 +0100)] 
apalis_imx6: migrate pmic and regulator to using driver model

Migrate PMIC and regulator to using driver model.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: migrate i2c to using driver model
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:12 +0000 (18:12 +0100)] 
apalis_imx6: migrate i2c to using driver model

Migrate I2C to using driver model.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: enable pin control driver
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:11 +0000 (18:12 +0100)] 
apalis_imx6: enable pin control driver

Enable pin control driver as required for further driver model
migration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: clean-up and migrate gpios to using driver model
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:10 +0000 (18:12 +0100)] 
apalis_imx6: clean-up and migrate gpios to using driver model

Migrate GPIOs to using driver model, properly request backlight,
Ethernet PHY reset, MMC/SD card detect and USB power GPIOs and also
enable SION bit in pin muxing for Apalis, backlight, eMMC reset,
Ethernet PHY reset and USB power enable GPIOs.

While at it also update copyright year, clean-up/re-order includes,
add some comments clarifying ifdef scope and do some White-space
clean-up.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: migrate to using device tree
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:09 +0000 (18:12 +0100)] 
apalis_imx6: migrate to using device tree

Migrate to using device tree required for further driver model
integration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: remove obsolete USB_GADGET_MASS_STORAGE configuration
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:08 +0000 (18:12 +0100)] 
apalis_imx6: remove obsolete USB_GADGET_MASS_STORAGE configuration

Remove obsolete USB_GADGET_MASS_STORAGE configuration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoapalis_imx6: enable fit image, gpt, imx thermal, efi loader support
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:07 +0000 (18:12 +0100)] 
apalis_imx6: enable fit image, gpt, imx thermal, efi loader support

Enbale FIT image, GPT command, i.MX thermal and EFI loader support.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: move console in env from header file to defconfig
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:06 +0000 (18:12 +0100)] 
apalis_imx6: move console in env from header file to defconfig

Move console in env from header file to defconfig.

While at it also update copyright year and remove spurious comments and
new lines.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: use distro defaults
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:05 +0000 (18:12 +0100)] 
apalis_imx6: use distro defaults

Use distro defaults and minimise default configuration again using
savedefconfig.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoapalis_imx6: get rid of obsolete nospl configurations
Marcel Ziswiler [Fri, 8 Feb 2019 17:12:04 +0000 (18:12 +0100)] 
apalis_imx6: get rid of obsolete nospl configurations

Now with SPL long since being in place even for recovery using SDP
finally get rid of those nospl configurations.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agomx53ppd: fix unsupported set command
Ian Ray [Thu, 31 Jan 2019 14:21:22 +0000 (16:21 +0200)] 
mx53ppd: fix unsupported set command

Fix the NFS commands which used `set' to instead use `setenv'.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agomx53ppd: bring dock out of reset at boot
Ian Ray [Thu, 31 Jan 2019 14:21:21 +0000 (16:21 +0200)] 
mx53ppd: bring dock out of reset at boot

Configure GPIO BUFFERED_HOST_CONTROLLED_RESET_TO_DOCKING_CONNECTOR_N to
bring the dock out of reset at boot.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: bx50v3: Network booting of fitImage with nfs rootfs
Joonas Aijala [Thu, 31 Jan 2019 14:21:20 +0000 (16:21 +0200)] 
board: ge: bx50v3: Network booting of fitImage with nfs rootfs

New boot command introduced to automate network booting.

Signed-off-by: Joonas Aijala <joonas.aijala@ge.com>
Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: bx50v3: Specific ARP timeout removed
Joonas Aijala [Thu, 31 Jan 2019 14:21:19 +0000 (16:21 +0200)] 
board: ge: bx50v3: Specific ARP timeout removed

Specific ARP timeout sometimes causes ARP timeout during nfs loading
of the fitImage.

Signed-off-by: Joonas Aijala <joonas.aijala@ge.com>
Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: store version information in fdt
Ian Ray [Thu, 31 Jan 2019 14:21:18 +0000 (16:21 +0200)] 
board: ge: store version information in fdt

Add board-specific FDT function to store U-Boot version in device tree.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: ppd: Enable CONFIG_DM_MMC
Ian Ray [Thu, 31 Jan 2019 14:21:17 +0000 (16:21 +0200)] 
board: ge: ppd: Enable CONFIG_DM_MMC

Use MMC device model, and remove USDHC pin configuration code since the
pinctrl driver is used.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoarm: imx: Add esdhc3/4 nodes to imx53.dtsi
Ian Ray [Thu, 31 Jan 2019 14:21:16 +0000 (16:21 +0200)] 
arm: imx: Add esdhc3/4 nodes to imx53.dtsi

These nodes are required by mx53ppd when built with CONFIG_DM_MMC=y.
They are copied from Linux 4.20.5.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: ppd: Enable CONFIG_DM
Ian Ray [Thu, 31 Jan 2019 14:21:15 +0000 (16:21 +0200)] 
board: ge: ppd: Enable CONFIG_DM

Add simplified, generalised, ppd device tree and enable CONFIG_DM.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: bx50v3: Enable CONFIG_DM_SPI, CONFIG_DM_SPI_FLASH
Ian Ray [Thu, 31 Jan 2019 14:21:14 +0000 (16:21 +0200)] 
board: ge: bx50v3: Enable CONFIG_DM_SPI, CONFIG_DM_SPI_FLASH

Use SPI flash device model, and remove SPI pin configuration code since
the pinctrl driver is used.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: bx50v3: Enable CONFIG_DM_GPIO
Ian Ray [Thu, 31 Jan 2019 14:21:13 +0000 (16:21 +0200)] 
board: ge: bx50v3: Enable CONFIG_DM_GPIO

Enable CONFIG_DM_GPIO as a pre-requisite for enabling CONFIG_DM_SPI.

Add explicit gpio_requests.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: bx50v3: Enable CONFIG_DM_MMC
Ian Ray [Thu, 31 Jan 2019 14:21:12 +0000 (16:21 +0200)] 
board: ge: bx50v3: Enable CONFIG_DM_MMC

Use MMC device model, and remove USDHC pin configuration code since the
pinctrl driver is used.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agoboard: ge: bx50v3: Enable CONFIG_DM
Ian Ray [Thu, 31 Jan 2019 14:21:11 +0000 (16:21 +0200)] 
board: ge: bx50v3: Enable CONFIG_DM

Add simplified, generalised, bx50v3 device tree and enable CONFIG_DM.

Signed-off-by: Ian Ray <ian.ray@ge.com>
5 years agopcm052: bk4: Add board_phy_config() for BK4 to setup ksz8081 phy
Lukasz Majewski [Wed, 13 Feb 2019 21:46:59 +0000 (22:46 +0100)] 
pcm052: bk4: Add board_phy_config() for BK4 to setup ksz8081 phy

BK4 requires setup of 50MHz reference clock for its KSZ8081 PHY devices.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agopcm052: mac: Provide board specific imx_get_mac_from_fuse() function
Lukasz Majewski [Wed, 13 Feb 2019 21:46:58 +0000 (22:46 +0100)] 
pcm052: mac: Provide board specific imx_get_mac_from_fuse() function

This commit introduces the board specific function to read fused mac
address.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agopcm052: board: Add code to setup LED default states
Lukasz Majewski [Wed, 13 Feb 2019 21:46:57 +0000 (22:46 +0100)] 
pcm052: board: Add code to setup LED default states

As one has moved to DM based LEDs, this code is required to setup the
default state.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agopcm052: bk4: sdcard: Add support for SD card booting/recovery
Lukasz Majewski [Wed, 13 Feb 2019 21:46:56 +0000 (22:46 +0100)] 
pcm052: bk4: sdcard: Add support for SD card booting/recovery

This code allows reusing the default u-boot as in the late board init, the
default envs are restored and proper recovery scripts executed.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoconfig: bk4: Update u-boot envs to support NOR memories initial setup
Lukasz Majewski [Wed, 13 Feb 2019 21:46:55 +0000 (22:46 +0100)] 
config: bk4: Update u-boot envs to support NOR memories initial setup

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoconfig: bk4: Update u-boot script to support recovery via SD card
Lukasz Majewski [Wed, 13 Feb 2019 21:46:54 +0000 (22:46 +0100)] 
config: bk4: Update u-boot script to support recovery via SD card

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agopcm052: board: Remove in-board setup code (it is now replaced by DM setup)
Lukasz Majewski [Wed, 13 Feb 2019 21:46:53 +0000 (22:46 +0100)] 
pcm052: board: Remove in-board setup code (it is now replaced by DM setup)

This commit cleans up the pcm052.c file to remove dead code after moving to
DTS and DM.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoconfig: bk4: Update include/configs/bk4r1.h file
Lukasz Majewski [Wed, 13 Feb 2019 21:46:52 +0000 (22:46 +0100)] 
config: bk4: Update include/configs/bk4r1.h file

The BK4's config file has changed since its initial posting to main line.
This commit reflects those changes.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoconfig: pcm052: Use SZ_X{MK} from linux/sizes.h for include/configs/pcm052.h
Lukasz Majewski [Wed, 13 Feb 2019 21:46:51 +0000 (22:46 +0100)] 
config: pcm052: Use SZ_X{MK} from linux/sizes.h for include/configs/pcm052.h

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agodefconfig: bk4/pcm052: Update bk4r1|pcm052_defconfig to support DM/DT
Lukasz Majewski [Wed, 13 Feb 2019 21:46:50 +0000 (22:46 +0100)] 
defconfig: bk4/pcm052: Update bk4r1|pcm052_defconfig to support DM/DT

This commit updates BK4's and PCM052's config files to support as much
as possible device tree and model in u-boot.

Moreover, remove CONFIG_* from pcm052.h (as those are now in
bk4|pcm052_defconfig)

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: DTS: Provide vf610-bk4r1-u-boot.dtsi for U-Boot specific properties
Lukasz Majewski [Wed, 13 Feb 2019 21:46:49 +0000 (22:46 +0100)] 
ARM: DTS: Provide vf610-bk4r1-u-boot.dtsi for U-Boot specific properties

This commit brings a separate file in which the U-Boot specific
properties (like 'dm-pre-reloc') are provided.

Such approach allows easy sync with upstream Linux kernel in the
future.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoARM: DTS: Update pcm052 based dts files (bk4r1/pcm052)
Lukasz Majewski [Wed, 13 Feb 2019 21:46:48 +0000 (22:46 +0100)] 
ARM: DTS: Update pcm052 based dts files (bk4r1/pcm052)

This commit provides update and renames the bk4r1.dts to vf610-bk4r1.dts
file with more on SoC HW description.
The pcm052.dts has been renamed to vf610-pcm052.dts as well.

Moreover, a new vf610-pcm052.drsi file has been introduced
to reuse the common code between devices based on Phytec's
pcm052 modules.
Ported from Linux kernel - v4.20 (tag)

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agopcm052: board: cosmetic: Add copyright notice to pcm052.c
Lukasz Majewski [Wed, 13 Feb 2019 21:46:47 +0000 (22:46 +0100)] 
pcm052: board: cosmetic: Add copyright notice to pcm052.c

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: DTS: vybrid: Update vf.dtsi file to descibe more vf610 hardware
Lukasz Majewski [Wed, 13 Feb 2019 21:46:46 +0000 (22:46 +0100)] 
ARM: DTS: vybrid: Update vf.dtsi file to descibe more vf610 hardware

This patch allows moving vf610 based boards to a device tree and model.
Ported from Linux kernel - v4.20 (tag)

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agopcm052: board: vybrid: Update the board name for BK4 device
Lukasz Majewski [Wed, 13 Feb 2019 21:46:45 +0000 (22:46 +0100)] 
pcm052: board: vybrid: Update the board name for BK4 device

This commit provides distinction between PCM052 and BK4.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agopcm052: board: Remove "m4go" command as it is superseded by "bootaux"
Lukasz Majewski [Wed, 13 Feb 2019 21:46:44 +0000 (22:46 +0100)] 
pcm052: board: Remove "m4go" command as it is superseded by "bootaux"

The "m4go" provides exactly the same functionality as the IMX generic
"bootaux" command. Remove it to not duplicate the code.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agovybrid: Define the imx_get_mac_from_fuse() as a __weak function
Lukasz Majewski [Wed, 13 Feb 2019 21:46:43 +0000 (22:46 +0100)] 
vybrid: Define the imx_get_mac_from_fuse() as a __weak function

The proposed way of reading fused MAC in the imx_get_mac_from_fuse() may
be different for other boards.

This commit defines the imx_get_mac_from_fuse() as a weak function to allow
board file overriding it with customized function.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agopcm052: board: Do not enable I2C2 code in the board file
Lukasz Majewski [Wed, 13 Feb 2019 21:46:42 +0000 (22:46 +0100)] 
pcm052: board: Do not enable I2C2 code in the board file

As the I2C2 clock is now enabled in the generic clock code, we can remove
this code from a board file.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agovybrid: clock: Provide enable_i2c_clk() function for Vybrid
Lukasz Majewski [Wed, 13 Feb 2019 21:46:41 +0000 (22:46 +0100)] 
vybrid: clock: Provide enable_i2c_clk() function for Vybrid

Provide function to enable I2C clocks for vf610 - in the generic code.
This function overrides the default weak function implementation (which
only returns 1).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agovybrid: ddr: Extend vf610-pinfunc.h with DDR pads definitions
Lukasz Majewski [Wed, 13 Feb 2019 21:46:40 +0000 (22:46 +0100)] 
vybrid: ddr: Extend vf610-pinfunc.h with DDR pads definitions

This patch provides definitions necessary for VF610 DDR pad configurations.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agonet: Kconfig: FEC: Add dependency on VF610
Lukasz Majewski [Wed, 13 Feb 2019 21:46:39 +0000 (22:46 +0100)] 
net: Kconfig: FEC: Add dependency on VF610

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agonet: FEC: Add compatible for vybrid (vf610) to reuse fec_mxc.c driver
Lukasz Majewski [Wed, 13 Feb 2019 21:46:38 +0000 (22:46 +0100)] 
net: FEC: Add compatible for vybrid (vf610) to reuse fec_mxc.c driver

The NXP's FEC driver can be reused on vf610 device (with DM).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoMerge tag 'pull-12apr19' of git://git.denx.de/u-boot-dm
Tom Rini [Sat, 13 Apr 2019 12:27:35 +0000 (08:27 -0400)] 
Merge tag 'pull-12apr19' of git://git.denx.de/u-boot-dm

fdtdec tests and improvements for carve-outs
pinctrl race-condition fix
various other fixes in sandbox, sound, mkimage, etc.

5 years agoMerge tag 'mips-pull-2019-04-12' of git://git.denx.de/u-boot-mips
Tom Rini [Sat, 13 Apr 2019 12:27:26 +0000 (08:27 -0400)] 
Merge tag 'mips-pull-2019-04-12' of git://git.denx.de/u-boot-mips

- mt76xx: add USB support, small fixes
- ath79: small fixes, add support for QCA9563 SoC and AP152 reference board
- mscc: small fixes, add network support for JR2 and ServalT SoCs
- bmips: small fixes, enable more drivers for ARM specific BCM6858 and BCM63158 SoCs
- MIPS: fix redundant relocation of initrd images

5 years agoefi_selftest: expect boot services data for fdt
Heinrich Schuchardt [Fri, 12 Apr 2019 20:09:09 +0000 (22:09 +0200)] 
efi_selftest: expect boot services data for fdt

In a previous patch the memory type used for the FDT has been changed to
boot services data. We have to adjust the test.

Correct an incorrect comment. The tested services are boot services.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoChange FDT memory type from runtime data to boot services data
Ilias Apalodimas [Fri, 12 Apr 2019 18:26:28 +0000 (21:26 +0300)] 
Change FDT memory type from runtime data to boot services data

Following Ard's suggestion:
Runtime data sections are intended for data that is used by the runtime
services implementation.
Let's change the type to EFI_BOOT_SERVICES_DATA.

This also fixes booting of armv7 using efi and fdtcontroladdr.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: simplify protocol installation
Heinrich Schuchardt [Fri, 12 Apr 2019 05:14:43 +0000 (07:14 +0200)] 
efi_loader: simplify protocol installation

By using InstallMultipleProtocolInterfaces() the coding for installing
protocol interfaces on the root node can be simplified.

Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: export efi_install_multiple_protocol_interfaces
Heinrich Schuchardt [Fri, 12 Apr 2019 04:59:49 +0000 (06:59 +0200)] 
efi_loader: export efi_install_multiple_protocol_interfaces

Export function efi_install_multiple_protocol_interfaces() so that we can
call it in others parts of the UEFI subsystem.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_selftest: physical and virtual addresses must match
Heinrich Schuchardt [Thu, 11 Apr 2019 17:59:31 +0000 (19:59 +0200)] 
efi_selftest: physical and virtual addresses must match

At boottime physical and virtual addresses must match. Add a corresponding
check to the memory unit test.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: update virtual address in efi_mem_carve_out
Heinrich Schuchardt [Thu, 11 Apr 2019 18:08:54 +0000 (20:08 +0200)] 
efi_loader: update virtual address in efi_mem_carve_out

Handle virtual address in efi_mem_carve_out() function
when a new region is created to avoid issue in EFI memory map.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
At boottime physical and virtual addressed have to be the same.
This allowed to simplify the proposed logic.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: add protection for block_dev
Patrick Delaunay [Wed, 10 Apr 2019 09:02:58 +0000 (11:02 +0200)] 
efi_loader: add protection for block_dev

Check the value of block_dev before to use this pointer.

This patch solves problem for the command "load" when ubifs
is previously mounted: in this case the function
blk_get_device_part_str("ubi 0") don't return error but return
block_dev = NULL and then data abort.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: fix setting PlatformLang
Heinrich Schuchardt [Thu, 11 Apr 2019 05:34:24 +0000 (07:34 +0200)] 
efi_loader: fix setting PlatformLang

The UEFI variables PlatformLang and PlatformLangCodes specify the current
firmware language and the list of all available languages.

Currently their values are hard coded. With the patch a new configuration
variable EFI_PLATFORM_LANG_CODES is provided.

When initializing the UEFI subsystem this configuration variable is used to
initialize PlatformLangCodes. The value of variable PlatformLang is read.
If it is not set, the first language specified in EFI_PLATFORM_LANG_CODES
is used to initialize PlatformLang.

Suggested-by: Takahiro Akashi <takahiro.akashi@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: the development target should be the EBBR
Heinrich Schuchardt [Wed, 10 Apr 2019 06:04:38 +0000 (08:04 +0200)] 
efi_loader: the development target should be the EBBR

Two subsets of the UEFI specifications have been defined. The one for
servers is "Server Base Boot Requirements System Software on ARM
Platforms" (SBBR), the one for embedded systems is the "Embedded Base Boot
Requirements (EBBR) Specification". Reaching compliance with thei EBBR is a
more realistic development target than reaching complicance with the SBBR.

Suggested-by: Alexander Graf <agraf@csgraf.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi: fix memory calculation overflow on 32-bit systems
Patrick Wildt [Tue, 9 Apr 2019 20:58:30 +0000 (22:58 +0200)] 
efi: fix memory calculation overflow on 32-bit systems

There are Cubox-i machines out there with nearly 4 GiB of RAM.  The
RAM starts at 0x10000000 with a size of 0xf0000000.  Thus the end
of RAM is at 0x100000000.  This overflows a 32-bit integer, which
should be fine since in the EFI memory code the variables used are
all 64-bit with a fixed size.  Unfortunately EFI_PAGE_MASK, which is
used in the EFI memory code to remove the lower bits, is based on
the EFI_PAGE_SIZE macro which, uses 1UL with a shift.  This means
the resulting mask is UL, which is only 32-bit on ARMv7.  Use ULL to
make sure that even on 32-bit platforms we use a 64-bit long mask.
Without this there will be no memory available in the EFI memory map
and bootefi will fail allocating pages.

Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoarm: print information about loaded UEFI images
Heinrich Schuchardt [Thu, 4 Apr 2019 20:06:25 +0000 (22:06 +0200)] 
arm: print information about loaded UEFI images

If an exception occurs in a UEFI loaded image we need the start address of
the image to determine the relocation offset.

This patch adds the necessary lines after the registers in the crash dump
for armv8. A possible output would be:

UEFI image [0x00000000bffe6000:0x00000000bffe631f] pc=0x138 '/\snp.efi'

With the offset 0x138 we can now find the relevant instruction in the
disassembled 'snp.efi' binary.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: move efi_save_gd() call to board_r.c
Heinrich Schuchardt [Tue, 9 Apr 2019 22:32:07 +0000 (00:32 +0200)] 
efi_loader: move efi_save_gd() call to board_r.c

The first functions of the UEFI sub-system are invoked before reaching the
U-Boot shell, e.g. efi_set_bootdev(), efi_dp_from_name(),
efi_dp_from_file(). We should be able to print out device paths for
debugging purposes here.

When printing device paths via printf("%pD\n", dp) this invokes functions
defined as EFIAPI. So efi_save_gd() must be called beforehand.

So let's move the efi_save_gd() call to function initr_reloc_global_data(()
in board_r.c.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: remove stray #define LOG_CATEGORY LOGL_ERR
Heinrich Schuchardt [Tue, 9 Apr 2019 21:22:13 +0000 (23:22 +0200)] 
efi_loader: remove stray #define LOG_CATEGORY LOGL_ERR

The statement '#define LOG_CATEGORY LOGL_ERR' makes not sense. LOGL_ERR is
not a LOG_CATEGORY. Remove the statement.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: enable HII protocols by default
Heinrich Schuchardt [Sun, 7 Apr 2019 21:58:50 +0000 (23:58 +0200)] 
efi_loader: enable HII protocols by default

As the UEFI shell requires the HII protocols let's enable them by default.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: assign HII protocols to root node
Heinrich Schuchardt [Sun, 7 Apr 2019 21:53:53 +0000 (23:53 +0200)] 
efi_loader: assign HII protocols to root node

We should not install the HII protocols on every loaded image. It is
sufficient to install them once on the root node.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge tag 'u-boot-stm32-20190412' of https://github.com/patrickdelaunay/u-boot
Tom Rini [Fri, 12 Apr 2019 19:43:19 +0000 (15:43 -0400)] 
Merge tag 'u-boot-stm32-20190412' of https://github.com/patrickdelaunay/u-boot

stm32 patches for v2019.07-rc1
- Add trusted boot with TF-A for stm32mp1
- stm32mp1 dts files sync'ed with Linux version
- add STM32MP1 Discovery boards (DK1 and DK2)
- add STMFX gpio expander driver
- misc improvement for stm3mp1 supports
- rename stpmu1 to stpmic1 (official name)
- stm32_qspi: move to exec_op (spi nor driver for stm32 mpu and mcu)
- add STM32 FMC2 NAND flash controller driver

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Fri, 12 Apr 2019 19:43:08 +0000 (15:43 -0400)] 
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Fri, 12 Apr 2019 19:43:04 +0000 (15:43 -0400)] 
Merge branch 'master' of git://git.denx.de/u-boot-i2c

5 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Fri, 12 Apr 2019 16:34:44 +0000 (12:34 -0400)] 
Merge git://git.denx.de/u-boot-marvell

- Misc dts files sync'ed with Linux version (Chris)
- Orion watchdog fix (Chris)
- kwbimage changed to also support Marvell bin_hdr binary (Chris)
- Add DM support to enable CONFIG_BLK for sata_mv (Stefan)
- Enable BLK on multiple platforms (Stefan)
- Misc minor fixes to AXP theadorable board (Stefan)
- Correct logic for DM_SCSI + unconverted drivers check (stefan)
- Misc changes to kirkwood to enable DM_USB here (Chris)
- Change ahci_mvebu to enable usage on A38x (Baruch)
- Update the kirkwood entry in git-mailrc (Baruch)
- Misc minor improvements (turris, documentation) (Baruch)
- Enhance sata_mv to support Kirkwood as well (Michael)
- Add wdt command (Michael)
- Add Marvell integrated CPUs (MSYS) support with DB-XC3-24G4XG
  board support (Chris)

5 years agoMerge branch '2019-04-11-ti-master-imports'
Tom Rini [Fri, 12 Apr 2019 16:22:43 +0000 (12:22 -0400)] 
Merge branch '2019-04-11-ti-master-imports'

- Improve Keystone 3 SoC support (DMA, TI SCI)
- Improve Keystone 2 SoC support (PHY fixes on various platforms)
- Improve am335x families (new platforms, more boot mode options in SPL
  via DM).
- General DaVinci, OMAP5 fixes.

5 years agomips: mt76xx: linkit-smart-7688: Enable USB and FS support
Stefan Roese [Fri, 5 Apr 2019 11:44:44 +0000 (13:44 +0200)] 
mips: mt76xx: linkit-smart-7688: Enable USB and FS support

This patch enables USB and file-system support on the LinkIt smart
MT7688 module for both, the normal and the RAM default config.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agophy: Add USB PHY driver for the MT76x8 (7628/7688) SoC
Stefan Roese [Fri, 5 Apr 2019 11:44:43 +0000 (13:44 +0200)] 
phy: Add USB PHY driver for the MT76x8 (7628/7688) SoC

This driver is derived from this Linux driver:
linux/drivers/phy/ralink/phy-ralink-usb.c

The driver sets up power and host mode, but also needs to configure PHY
registers for the MT7628 and MT7688.

I removed the reset controller handling for the USB host and device, as
it does not seem to be necessary right now. The soft reset bits for both
devices are enabled by default and testing has shown (with hackish
reset handling added), that USB related commands work identical with
or without the reset handling.

Please note that the resulting USB support is tested only very minimal.
I was able to detect one of my 3 currently available USB sticks.
Perhaps some further work is needed to fully support the EHCI controller
integrated in the MT76x8 SoC.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agoconfigs: mscc_servalt: Add network support
Horatiu Vultur [Mon, 8 Apr 2019 08:31:38 +0000 (10:31 +0200)] 
configs: mscc_servalt: Add network support

Update default config to use network driver for ServalT SoCs.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
5 years agonet: mscc: servalt: Add ethernet nodes for ServalT
Horatiu Vultur [Mon, 8 Apr 2019 08:31:37 +0000 (10:31 +0200)] 
net: mscc: servalt: Add ethernet nodes for ServalT

Add ethernet nodes for ServalT SoCs family. Currently there is only one
pcb(pcb116) in this family.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
5 years agonet: Add MSCC ServalT network driver.
Horatiu Vultur [Mon, 8 Apr 2019 08:31:36 +0000 (10:31 +0200)] 
net: Add MSCC ServalT network driver.

Add network driver for Microsemi Ethernet switch.
It is present on ServalT SoCs.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agoconfigs: vcoreiii: Change CONFIG_ENV_SIZE
Horatiu Vultur [Mon, 8 Apr 2019 11:32:18 +0000 (13:32 +0200)] 
configs: vcoreiii: Change CONFIG_ENV_SIZE

Shrink the environment size for 3 reasons:

 - reading the environment it is slow, therefore having a smaller env
   improves the speed.
 - usually in the environment there are only few variables, therefore
   the enviromnent is almost empty.
 - because the same image can run on different boards which may have
   different flashes with different page sizes, the CONFIG_ENV_SECT_SIZE
   can't be change, it is set to least common multiple of the page sizes.

Adding this change improves the boot time. Before update for reading the
entire environment it took ~850 msec, after the change it takes ~40 msecs.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
5 years agoconfigs: mscc_jr2: Add network support
Horatiu Vultur [Wed, 3 Apr 2019 17:54:48 +0000 (19:54 +0200)] 
configs: mscc_jr2: Add network support

Update default confing to use network driver for Jaguar2 SoCs.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
5 years agonet: mscc: jaguar2: Add ethenet nodes for Jaguar2.
Horatiu Vultur [Wed, 3 Apr 2019 17:54:47 +0000 (19:54 +0200)] 
net: mscc: jaguar2: Add ethenet nodes for Jaguar2.

Add ethernet nodes for Jaguar2 SoCs family. There are 3 pcb in this
family: pcb110, pcb111 and pcb112.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
5 years agoboard: mscc: jr2: Update MSCC Jaguar2 boards
Horatiu Vultur [Wed, 3 Apr 2019 17:54:46 +0000 (19:54 +0200)] 
board: mscc: jr2: Update MSCC Jaguar2 boards

In Jaguar2 SoC family there are 3 different pcb. Each of this needs
to configure the phys in different ways. Therefore implement the
function board_phy_config and based on pcb configure them accordingly.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
5 years agonet: Add MSCC Jaguar2 network driver.
Horatiu Vultur [Wed, 3 Apr 2019 17:54:45 +0000 (19:54 +0200)] 
net: Add MSCC Jaguar2 network driver.

Add network driver for Microsemi Ethernet switch.
It is present on Jaguar2 SoCs.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
5 years agobcm963158: enable gpio support
Philippe Reynes [Thu, 7 Mar 2019 10:36:44 +0000 (11:36 +0100)] 
bcm963158: enable gpio support

Enable the gpio support (driver and command)
in the configuration of the board bcm963158.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm963158: enable gpio controller
Philippe Reynes [Thu, 7 Mar 2019 10:36:43 +0000 (11:36 +0100)] 
dt: bcm963158: enable gpio controller

Enable all the gpio controllers in the device tree
of the board bcm963158.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm63158: add gpio controller
Philippe Reynes [Thu, 7 Mar 2019 10:36:42 +0000 (11:36 +0100)] 
dt: bcm63158: add gpio controller

Add 8 gpio controllers in the bcm63158 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agogpio: do not include <asm/arch/gpio.h> on ARCH_BCM63158
Philippe Reynes [Thu, 7 Mar 2019 10:36:41 +0000 (11:36 +0100)] 
gpio: do not include <asm/arch/gpio.h> on ARCH_BCM63158

As no gpio.h is defined for this architecture, to avoid
a compilation failure, do not include <asm/arch/gpio.h>
for arch bcm63158.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agogpio: bcm6345: allow this driver on ARCH_BCM63158
Philippe Reynes [Thu, 7 Mar 2019 10:36:40 +0000 (11:36 +0100)] 
gpio: bcm6345: allow this driver on ARCH_BCM63158

This IP is also used on some arm SoC, so we allow
to use this driver on arch bcm63158.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm968580xref: enable gpio support
Philippe Reynes [Thu, 7 Mar 2019 10:36:39 +0000 (11:36 +0100)] 
bcm968580xref: enable gpio support

Enable the gpio support (driver and command)
in the configuration of the board bcm968580xref.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm968580xref: enable gpio controller
Philippe Reynes [Thu, 7 Mar 2019 10:36:38 +0000 (11:36 +0100)] 
dt: bcm968580xref: enable gpio controller

Enable all the gpio controllers in the device tree
of the board bcm968580xref.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm6858: add gpio controller
Philippe Reynes [Thu, 7 Mar 2019 10:36:37 +0000 (11:36 +0100)] 
dt: bcm6858: add gpio controller

Add 8 gpio controllers in the bcm6858 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agogpio: do not include <asm/arch/gpio.h> on ARCH_BCM6858
Philippe Reynes [Thu, 7 Mar 2019 10:36:36 +0000 (11:36 +0100)] 
gpio: do not include <asm/arch/gpio.h> on ARCH_BCM6858

As no gpio.h is defined for this architecture, to avoid
compilation failure, do not include <asm/arch/gpio.h> for
arch bcm6858.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agogpio: bcm6345: allow this driver on ARCH_BCM6858
Philippe Reynes [Thu, 7 Mar 2019 10:36:35 +0000 (11:36 +0100)] 
gpio: bcm6345: allow this driver on ARCH_BCM6858

This IP is also used on some arm SoC, so we allow
to use this driver on arch bcm6858.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agobcm968380gerg: enable gpio support
Philippe Reynes [Thu, 7 Mar 2019 10:36:34 +0000 (11:36 +0100)] 
bcm968380gerg: enable gpio support

Enable the gpio support (driver and command)
in the configuration of the board bcm968380gerg

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agodt: bcm968380gerg: enable gpio controller
Philippe Reynes [Thu, 7 Mar 2019 10:36:33 +0000 (11:36 +0100)] 
dt: bcm968380gerg: enable gpio controller

Enable the gpio controllers in the device tree
of the board bcm968380gerg.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agodt: bcm6838: add gpio controller
Philippe Reynes [Thu, 7 Mar 2019 10:36:32 +0000 (11:36 +0100)] 
dt: bcm6838: add gpio controller

Add gpio controllers in bcm6838 device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agogpio: bcm6345: switch to raw I/O functions
Philippe Reynes [Thu, 7 Mar 2019 10:36:31 +0000 (11:36 +0100)] 
gpio: bcm6345: switch to raw I/O functions

This driver is used on several big endian mips board.
So we could use raw I/O function instead of forcing
big endian access.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 years agoag7xxx: add initial support for s17
Rosy Song [Sat, 16 Mar 2019 01:24:50 +0000 (09:24 +0800)] 
ag7xxx: add initial support for s17

S17 ethernet support is for QCA8337N, which used on
AP152 (QCA9563) board. It is a 7 ports GbE switch.

Signed-off-by: Rosy Song <rosysong@rosinson.com>
Changes for v2-v3:
   - add more commit message for s17

Changes for v4-v5:
   - coding style cleanup