platform/kernel/u-boot.git
4 years agobdinfo: dm: Update fb_base when using driver model
Simon Glass [Sun, 10 May 2020 20:17:01 +0000 (14:17 -0600)]
bdinfo: dm: Update fb_base when using driver model

Update this value with the address of a video device so that it shows with
the 'bd' command.

It would be better to obtain the address from the uclass by looking in
struct video_uc_platdata for each device. We can move over to that once
DM_VIDEO migration is complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: Update the file comments
Simon Glass [Sun, 10 May 2020 20:17:00 +0000 (14:17 -0600)]
bdinfo: Update the file comments

Update the comment at the top of the file to indicate what this file does.
Also drop the line at the bottom and an unnecessary header include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: m68k: ppc: Move arch-specific code from bdinfo
Simon Glass [Sun, 10 May 2020 20:16:59 +0000 (14:16 -0600)]
bdinfo: m68k: ppc: Move arch-specific code from bdinfo

We don't have an easy way to share these three lines of code with two
architectures. We also want to make it clear that this code is actually
arch-specific.

So just duplicate it in each arch-specific file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agobdinfo: m68k: Move m68k-specific info into its own file
Simon Glass [Sun, 10 May 2020 20:16:58 +0000 (14:16 -0600)]
bdinfo: m68k: Move m68k-specific info into its own file

We don't really want to have m68k-specific code in a generic file. Create
a new arch-specific function to hold it, and move it into that.

Make the function weak so that any arch can implement it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Tested-by: Angelo Dureghello <angelo.dureghello@timesys.com>
4 years agobdinfo: ppc: Move PPC-specific info into its own file
Simon Glass [Sun, 10 May 2020 20:16:57 +0000 (14:16 -0600)]
bdinfo: ppc: Move PPC-specific info into its own file

We don't really want to have PPC-specific code in a generic file. Create
a new arch-specific function to hold it, and move it into that.

Make the function weak so that any arch can implement it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agobdinfo: arm: Move ARM-specific info into its own file
Simon Glass [Sun, 10 May 2020 20:16:56 +0000 (14:16 -0600)]
bdinfo: arm: Move ARM-specific info into its own file

We don't really want to have ARM-specific code in a generic file. Create
a new arch-specific function to hold it, and move it into that.

Make the function weak so that any arch can implement it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: Export some basic printing functions
Simon Glass [Sun, 10 May 2020 20:16:55 +0000 (14:16 -0600)]
bdinfo: Export some basic printing functions

At present the functions to print a number and a frequency are static. We
want to move some of the code in here to an arch-specific file. For
consistency that code should use these same functions. So export them with
an appropriate name.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: net: Inline print_eth_ip_addr()
Simon Glass [Sun, 10 May 2020 20:16:54 +0000 (14:16 -0600)]
bdinfo: net: Inline print_eth_ip_addr()

This function only has two lines of code now, so inline it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: net: Drop legacy ethernet bdinfo
Simon Glass [Sun, 10 May 2020 20:16:53 +0000 (14:16 -0600)]
bdinfo: net: Drop legacy ethernet bdinfo

This code pre-dates driver model and the migration date is nearly upon us.
Pare the print_eths() function down and enable it for driver model, since
it works correctly.

The IP address is already printed in print_eth_ip_addr() so we can remove
that.

Since this results in a one-line print_eths() function, inline it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: net: ppc: Drop prints for CONFIG_HAS_ETHn
Simon Glass [Sun, 10 May 2020 20:16:52 +0000 (14:16 -0600)]
bdinfo: net: ppc: Drop prints for CONFIG_HAS_ETHn

These config options have not been migrated to Kconfig. This should be
handled using driver model, iterating over the available Ethernet devices.
For now, remove the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agobdinfo: net: ppc: Drop bi_enet1addr and other similar info
Simon Glass [Sun, 10 May 2020 20:16:51 +0000 (14:16 -0600)]
bdinfo: net: ppc: Drop bi_enet1addr and other similar info

These values were 'old' in 2013 so it should be safe to remove them. They
are never set in U-Boot anyway, so the values will always be zero.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agobdinfo: Drop print_cpu_word_size()
Simon Glass [Sun, 10 May 2020 20:16:50 +0000 (14:16 -0600)]
bdinfo: Drop print_cpu_word_size()

This function only has one line of code in it so inline it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: Drop print_bi_flash()
Simon Glass [Sun, 10 May 2020 20:16:49 +0000 (14:16 -0600)]
bdinfo: Drop print_bi_flash()

This function only has three lines of code in it so inline it. This helps
to put all the code in one place for future partitioning.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: Drop print_bi_boot_params()
Simon Glass [Sun, 10 May 2020 20:16:48 +0000 (14:16 -0600)]
bdinfo: Drop print_bi_boot_params()

This function only has one line of code in it so inline it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: sh: arc: Drop arch-specific print_bi_mem()
Simon Glass [Sun, 10 May 2020 20:16:47 +0000 (14:16 -0600)]
bdinfo: sh: arc: Drop arch-specific print_bi_mem()

It isn't worth having arch-specific code for such minor output
differences. In fact it is better if all archs are consistent.

Drop the arch-specific code in print_bi_mem() and inline it to avoid a
two-line function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
4 years agobdinfo: ppc: Drop arch-specific print_baudrate()
Simon Glass [Sun, 10 May 2020 20:16:46 +0000 (14:16 -0600)]
bdinfo: ppc: Drop arch-specific print_baudrate()

This function outputs the same basic info. Since the baud rate is commonly
115200 these is often no difference. Drop the arch-specific code and
inline it to avoid a one-line function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agobdinfo: Drop print_std_bdinfo()
Simon Glass [Sun, 10 May 2020 20:16:45 +0000 (14:16 -0600)]
bdinfo: Drop print_std_bdinfo()

Everything in this function is standard now so it serves no purpose. Move
it into the generic do_bdinfo() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: Drop unnecessary inline on functions
Simon Glass [Sun, 10 May 2020 20:16:44 +0000 (14:16 -0600)]
bdinfo: Drop unnecessary inline on functions

This serves no purpose since the compiler will inline the functions
automatically. Drop use of inline in this file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: microblaze: sh: nios2: Drop arch-specific flash info
Simon Glass [Sun, 10 May 2020 20:16:43 +0000 (14:16 -0600)]
bdinfo: microblaze: sh: nios2: Drop arch-specific flash info

The differences these architectures have are minor and not worth the extra
code. Use the generic version always.

Tidy up the code style by removing unnecessary tabs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: Drop unused __maybe_unused
Simon Glass [Sun, 10 May 2020 20:16:42 +0000 (14:16 -0600)]
bdinfo: Drop unused __maybe_unused

Some of these are not needed now. Drop them to avoid cluttering the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: Drop the option to not use the generic 'bd' command
Simon Glass [Sun, 10 May 2020 20:16:41 +0000 (14:16 -0600)]
bdinfo: Drop the option to not use the generic 'bd' command

Now that all architectures are using the generic do_bdinfo(), drop the
option to not use it. When new architectures are added, they will get at
least some useful information from the generic implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: arc: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:40 +0000 (14:16 -0600)]
bdinfo: arc: Use the generic bd command

There is nothing new in the arc 'bd' command beyond what is already there.
Switch it over to use the generic code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: arm: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:39 +0000 (14:16 -0600)]
bdinfo: arm: Use the generic bd command

Unfortunately ARM has a lot of special stuff. Move it into the generic
function for now, so we can have it all in one place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: m68k: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:38 +0000 (14:16 -0600)]
bdinfo: m68k: Use the generic bd command

Unfortunately m68k has a lot of special stuff. Move it into the generic
function for now, so we can have it all in one place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: powerpc: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:37 +0000 (14:16 -0600)]
bdinfo: powerpc: Use the generic bd command

Unfortunately PowerPC has a lot of special stuff. Move it into the generic
function for now, so we can have it all in one place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: riscv: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:36 +0000 (14:16 -0600)]
bdinfo: riscv: Use the generic bd command

This arch has none of its own info to show. Move it over to use the
generic do_bdinfo().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: nds32: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:35 +0000 (14:16 -0600)]
bdinfo: nds32: Use the generic bd command

This arch has none of its own info to show. Move it over to use the
generic do_bdinfo().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: sandbox: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:34 +0000 (14:16 -0600)]
bdinfo: sandbox: Use the generic bd command

Sandbox has a printout of 'FB base' but this code is not used since
sandbox uses driver model for everything.

Move sandbox over to use the generic do_bdinfo().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: x86: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:33 +0000 (14:16 -0600)]
bdinfo: x86: Use the generic bd command

This arch shows 'ethspeed' info but only the freescale drivers use it, so
it can be dropped.

It also calls print_bi_dram() which is safe to call from any arch since it
has an #ifdef inside it. Add this to the generic do_bdinfo() and move x86
over to use it. Put it first since pytests rely on seeing it before
memstart in find_ram_base().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: sh: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:32 +0000 (14:16 -0600)]
bdinfo: sh: Use the generic bd command

This arch has no code that is not already in the generic function. Drop
the arch-specific function and change sh over to use the generic one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: microblaze: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:31 +0000 (14:16 -0600)]
bdinfo: microblaze: Use the generic bd command

Microblaze prints out ethernet and FDT information. This is useful to
most archs, so move it into the generic code and move microblaze over to
use it.

Note that FDT information is shown for all boards, since they should be
using device tree by now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: nios2: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:30 +0000 (14:16 -0600)]
bdinfo: nios2: Use the generic bd command

Nios2 currently has some code to output SRAM information which is behind
an #ifdef. No nios2 boards define this option, so the code can be removed.

Move Nios2 over to use the generic function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: mips: Use the generic bd command
Simon Glass [Sun, 10 May 2020 20:16:29 +0000 (14:16 -0600)]
bdinfo: mips: Use the generic bd command

MIPS currently has a few extra things which are generally useful. Add them
to the generic function and move MIPS over to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
4 years agobdinfo: xtensa: Create a generic do_bdinfo for xtensa
Simon Glass [Sun, 10 May 2020 20:16:28 +0000 (14:16 -0600)]
bdinfo: xtensa: Create a generic do_bdinfo for xtensa

This arch uses only the generic function. It would be nice if all the
archs did the same. As a first step, create a new generic function for the
'bd' command and make xtensa use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: m68k: Drop bd_info->bi_ipbfreq
Simon Glass [Sun, 10 May 2020 20:16:27 +0000 (14:16 -0600)]
bdinfo: m68k: Drop bd_info->bi_ipbfreq

This field is not used anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: riscv: Use generic bd_info
Simon Glass [Sun, 10 May 2020 20:16:26 +0000 (14:16 -0600)]
bdinfo: riscv: Use generic bd_info

At present riscv still uses its own private bd_info struct. Move it over
to use the generic one like other archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobdinfo: nds32: Use generic bd_info
Simon Glass [Sun, 10 May 2020 20:16:25 +0000 (14:16 -0600)]
bdinfo: nds32: Use generic bd_info

At present nds32 still uses its own private bd_info struct. Move it over
to use the generic one like other archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agotbs2910: Drop the 'bd' command
Simon Glass [Sun, 10 May 2020 20:16:24 +0000 (14:16 -0600)]
tbs2910: Drop the 'bd' command

This board is very close to its limit. Drop this command before the bd
refactoring, which increases the size slightly on one toolchain.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMerge tag 'xilinx-for-v2020.10' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 25 Jun 2020 13:33:39 +0000 (09:33 -0400)]
Merge tag 'xilinx-for-v2020.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2020.10

Versal:
- xspi bootmode fix
- Removing one clock from clk driver
- Align u-boot memory setting with OS by default
- Map TCM and OCM by default

ZynqMP:
- Minor DT improvements
- Reduce console buffer for mini configurations
- Add fix for AMS
- Add support for XDP platform

Zynq:
- Support for AES engine
- Enable bigger memory test by default
- Extend documentation for SD preparation
- Use different freq for Topic miami board

mmc:
- minor GD pointer removal

net:
- Support fixed-link cases by zynq gem
- Fix phy looking loop in axi enet driver

spi:
- Cleanup global macros for xilinx spi drivers

firmware:
- Add support for pmufw reloading

fpga:
- Improve error status reporting

common:
- Remove 4kB addition space for FDT allocation

4 years agocommon: fdt: Remove additional 4k space for fdt allocation
Ashok Reddy Soma [Mon, 6 Apr 2020 13:58:30 +0000 (07:58 -0600)]
common: fdt: Remove additional 4k space for fdt allocation

There is no technical reason to add additional 4k space for FDT. This space
is completely unused and just increase memory requirements. This is
problematic on systems with limited memory resources as Xilinx Zynq
CSE/ZynqMP mini and Versal mini configurations.

The patch is removing additional 4k space.

EFI code is using copy_fdt() which copy FDT to different location.
And all boot commands in case of using U-Boot's FDT pointed by
$fdtcontroladdr are copying FDT to different locations by
image_setup_libfdt().
That's why in proper flow none should modified DTB used by U-Boot that's
why there is no need for additional space.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
4 years agoxilinx: zynqmp: Enable pmufw config reloading
Michal Simek [Mon, 27 Apr 2020 09:26:31 +0000 (11:26 +0200)]
xilinx: zynqmp: Enable pmufw config reloading

PMU FW has functionality to accept and reload configuration object at run
time. The patch is adding support for doing it via u-boot prompt.

For example:
tftpboot 100000 pmu_obj.bin
zynqmp pmufw 100000 $filesize

The most of pmufw configurations don't allow config reloading.
Also official Xilinx PMUFW doens't support this feature properly but the
patch should open a way to call PMUFW with this request.

Here is example of PMUFW config fragment which enables config reloading.

/* SET CONFIG SECTION */
PM_CONFIG_SET_CONFIG_SECTION_ID,        /* Section ID */
PM_CONFIG_IPI_PSU_CORTEXA53_0_MASK | PM_CONFIG_IPI_PSU_CORTEXR5_0_MASK |
PM_CONFIG_IPI_PSU_CORTEXR5_1_MASK, /* Permissions to set config */

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Print multiboot reg in decimal
Michal Simek [Wed, 27 May 2020 10:50:33 +0000 (12:50 +0200)]
arm64: zynqmp: Print multiboot reg in decimal

It is better to print multiboot value in decimal because boot images are
also composed in decimal not in hex.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agotopic: zynqmp: Add support for zynqmp-xilinx-xdp platform
Mike Looijmans [Thu, 6 Jun 2019 07:47:41 +0000 (09:47 +0200)]
topic: zynqmp: Add support for zynqmp-xilinx-xdp platform

XDP - Xilinx Drone Platform is a board for drones or other UAV.

Pinmux the SD card by default, and if the SD card detect line is high
(inactive) then pinmux the SD1 interface to EMIO instead. SD is placed on
extension card and shares connection with on board wife. That means that
when SD card is present in the board wifi can't be used.

There seems to be an issue with DDR access from PL at 2400MT/s, after
updating the PMU and ATF firmware this is causing extremely slow DDR
access. Reducing the DDR speed from 2400 to 2133 appears to solve that
issue, even though the hardware has proven to be 2400 capable.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoboard: zynqmp: Fix for wrong AMS setting by ROM
Mike Looijmans [Fri, 18 Oct 2019 05:34:13 +0000 (07:34 +0200)]
board: zynqmp: Fix for wrong AMS setting by ROM

A bug in the ZynqMP bootrom sets the PS_SYSMON_ANALOG_BUS register
at 0xFFA50914 to the wrong value 0x3201. This causes the AMS to
exchange the PS supply voltages 0 and 1. On Xilinx boards this is
not noticeable since these are tied together, it's only really
noticeable if banks 500 and 501 have different supplies. Xilinx' tech
support reported this undocumented register to be the cause, and
this patch applies a fix for all boards by programming the correct
value.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoboard: topic-miami: Set FCLK1 to 150MHz
Mike Looijmans [Wed, 22 Apr 2020 14:27:19 +0000 (16:27 +0200)]
board: topic-miami: Set FCLK1 to 150MHz

In all reference designs the FCLK1 runs at 150MHz, but the bootloader
doesn't set it up like that. Set the divider to 8 to generate the
correct clock. Fixes (a.o.) the DMA speed being too slow.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agonet: xilinx: axi_emac: Fix endless loop when no PHYs are connected
Patrick van Gelder [Wed, 3 Jun 2020 12:18:04 +0000 (14:18 +0200)]
net: xilinx: axi_emac: Fix endless loop when no PHYs are connected

The index used to iterate over the possible PHYs in axiemac_phy_init was an
unsigned int and decremented. Therefor it was always >= 0 and never exited
the loop.

Signed-off-by: Patrick van Gelder <patrick.vangelder@nl.bosch.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agodoc: board: xilinx: zynq.rst: add description how to flash a SD card
Johannes Krottmayer [Wed, 3 Jun 2020 09:50:06 +0000 (11:50 +0200)]
doc: board: xilinx: zynq.rst: add description how to flash a SD card

Add a short description in the ZYNQ documentation how to prepare a SD card and
copy the related images to SD card.

Signed-off-by: Johannes Krottmayer <krjdev@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: xilinx: Print fpga error value in hex
T Karthik Reddy [Thu, 14 May 2020 13:49:36 +0000 (07:49 -0600)]
arm64: xilinx: Print fpga error value in hex

Fpga returns error value when fails, error status should be
printed in hex format.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agospi: zynq_[q]spi: Convert config's to macro's
Ashok Reddy Soma [Mon, 18 May 2020 07:11:00 +0000 (01:11 -0600)]
spi: zynq_[q]spi: Convert config's to macro's

Remove below config options and convert them to macros. They have never
been configured to different values than default one. And also it makes
sense to reduce the config_whitelist.
CONFIG_SYS_ZYNQ_SPI_WAIT
CONFIG_SYS_ZYNQ_QSPI_WAIT
CONFIG_XILINX_SPI_IDLE_VAL

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agonet: gem: Disable PCS autonegotiation in case of fixed-link
Michal Simek [Wed, 13 May 2020 14:05:01 +0000 (08:05 -0600)]
net: gem: Disable PCS autonegotiation in case of fixed-link

Disable PCS autonegotiation if fixed-link node is present in device tree.
This way systems with multiple GEM instances with a combination of
SGMII-fixed and SGMII-PHY will work.

Reported-by: Goran Marinkovic <goran.marinkovic@psi.ch>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Change spi-max-frequency for qspi mini
T Karthik Reddy [Tue, 5 May 2020 14:14:30 +0000 (08:14 -0600)]
arm64: zynqmp: Change spi-max-frequency for qspi mini

Change mini u-boot qspi spi-max-frequency to 108Mhz, make the
frequency similar to full u-boot qspi flash spi-max-frequency.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix si570 clock output names and references
Saeed Nowshadi [Wed, 4 Mar 2020 18:21:34 +0000 (10:21 -0800)]
arm64: zynqmp: Fix si570 clock output names and references

Align clock output names with node references.

Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Reduce console buffer size
T Karthik Reddy [Tue, 5 May 2020 14:14:28 +0000 (08:14 -0600)]
arm64: zynqmp: Reduce console buffer size

Reduce console buffer size to 1kbyte to accommodate memory
allocations in mini u-boot for zynqmp.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Enable config to map TCM and OCM
Ashok Reddy Soma [Fri, 1 May 2020 05:44:22 +0000 (23:44 -0600)]
arm64: versal: Enable config to map TCM and OCM

Enable CONFIG_DEFINE_TCM_OCM_MMAP to map TCM and OCM memory.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm: zynq: Enable alternative memory test
Ashok Reddy Soma [Fri, 1 May 2020 05:44:23 +0000 (23:44 -0600)]
arm: zynq: Enable alternative memory test

Enable alternative memory test for zynq platforms.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofpga: zynqpl: Add zynq aes load & loadp commands
T Karthik Reddy [Tue, 12 Mar 2019 14:50:22 +0000 (20:20 +0530)]
fpga: zynqpl: Add zynq aes load & loadp commands

Added support for zynq aes load & loadp commands.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofpga: zynqpl: Flush dcache only for non-bitstream data
T Karthik Reddy [Tue, 12 Mar 2019 14:50:23 +0000 (20:20 +0530)]
fpga: zynqpl: Flush dcache only for non-bitstream data

In case of aes decryption destination address range must be flushed
before transferring decrypted data to destination.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofpga: zynqpl: Check if aes engine is enabled
Ibai Erkiaga [Thu, 5 Apr 2018 12:19:27 +0000 (05:19 -0700)]
fpga: zynqpl: Check if aes engine is enabled

AES engine cannot be used if has not been enabled at boot time
with an encrypted boot image.

Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofpga: zynqpl: Check fpga config completion
T Karthik Reddy [Tue, 12 Mar 2019 14:50:20 +0000 (20:20 +0530)]
fpga: zynqpl: Check fpga config completion

This patch checks fpga config completion when a bitstream is loaded
into PL.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofpga: zynqpl: Correct PL bitstream loading sequence for zynqaes
Siva Durga Prasad Paladugu [Wed, 9 Dec 2015 13:16:43 +0000 (18:46 +0530)]
fpga: zynqpl: Correct PL bitstream loading sequence for zynqaes

Correct the PL bitstream loading sequence for zynqaes command by
clearing the loaded PL bitstream before loading the new encrypted
bitstream using the zynq aes command. This was done by setting
the PROG_B same as in case of fpgaload commands.
This patch fixes the issue of loading the encrypted PL bitstream
onto the PL in which a bitstream has already been loaded
successfully.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofirmware: zynqmp: Change panic logic in zynqmp_pmufw_load_config_object()
Michal Simek [Mon, 27 Apr 2020 09:51:40 +0000 (11:51 +0200)]
firmware: zynqmp: Change panic logic in zynqmp_pmufw_load_config_object()

There is no need to panic all the time when pmufw config object loading
failed. The patch improves function logic to report permission deny case
and also panic only for SPL case.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
4 years agoclk: versal: Remove alt_ref_clk from clock sources
Rajan Vaja [Tue, 5 May 2020 05:53:56 +0000 (22:53 -0700)]
clk: versal: Remove alt_ref_clk from clock sources

alt_ref_clk is applicable only for PS extended version.
For PS base version there is no separate alt_ref_clk.
It is tied with ref_clk, so remove it from driver.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Let U-Boot to update memory node by default
Michal Simek [Tue, 5 May 2020 14:17:57 +0000 (16:17 +0200)]
arm64: versal: Let U-Boot to update memory node by default

There is no reason not to let U-Boot to update memory node by default. In
past this was disabled by purpose to be able to test different memory
configurations from one U-Boot instance.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agommc: zynq_sdhci: Remove global pointer
Michal Simek [Thu, 16 Apr 2020 12:48:44 +0000 (14:48 +0200)]
mmc: zynq_sdhci: Remove global pointer

Driver is not calling gd anywhere that's why there is not need to define
it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm: versal: Fix xspi0 boot mode
Michal Simek [Thu, 16 Apr 2020 16:04:43 +0000 (18:04 +0200)]
arm: versal: Fix xspi0 boot mode

Use proper number to be aligned with xspi0 boot mode.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoMerge tag 'u-boot-imx-20200623' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Tue, 23 Jun 2020 12:20:55 +0000 (08:20 -0400)]
Merge tag 'u-boot-imx-20200623' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2020.07
-----------------

Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/701059103

- Fixes for atheros and cubox
- Toradex: mostly environment
- i.MX7: DDR fixes
- switch to DM
- sabrelite : fix MMC access

4 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 23 Jun 2020 12:20:07 +0000 (08:20 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoPrepare v2020.07-rc5
Tom Rini [Tue, 23 Jun 2020 00:49:04 +0000 (20:49 -0400)]
Prepare v2020.07-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agomx6cuboxi: remove unused code
Walter Lozano [Tue, 19 May 2020 18:24:24 +0000 (15:24 -0300)]
mx6cuboxi: remove unused code

After enabling SPL_OF_CONTROL, SPL_DM and SPL_DM_MMC the MMC
initialization code is not longer needed.

This patch removes the unused code.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
4 years agomx6cuboxi: enable OF_CONTROL and DM in SPL
Walter Lozano [Tue, 19 May 2020 18:24:23 +0000 (15:24 -0300)]
mx6cuboxi: enable OF_CONTROL and DM in SPL

In order to take the beneficts of DT and DM in SPL, like reusing the code
and avoid redundancy, enable SPL_OF_CONTROL, SPL_DM and SPL_DM_MMC.

With this new configuration SPL image is 50 KB, higher than the
38 KB from the previous version, but it still under the 68 KB limit.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
4 years agomx6cuboxi: customize board_boot_order to access eMMC
Walter Lozano [Tue, 19 May 2020 18:24:22 +0000 (15:24 -0300)]
mx6cuboxi: customize board_boot_order to access eMMC

In SPL legacy code only one MMC device is created, based on BOOT_CFG
register, which can be either SD or eMMC. In this context
board_boot_order return always MMC1 when configure to boot from
SD/eMMC. After switching to DM both SD and eMMC devices are created
based on the information available on DT, but as board_boot_order
only returns MMC1 is not possible to boot from eMMC.

This patch customizes board_boot_order taking into account BOOT_CFG
register to point to correct MMC1 / MMC2 device. Additionally, handle
IO mux for the desired boot device.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
4 years agomx6cuboxi: enable MMC and eMMC in DT for SPL
Walter Lozano [Tue, 19 May 2020 18:24:21 +0000 (15:24 -0300)]
mx6cuboxi: enable MMC and eMMC in DT for SPL

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
4 years agomx6ull_14x14_evk_plugin: Convert to DM_ETH
Fabio Estevam [Tue, 9 Jun 2020 13:44:00 +0000 (10:44 -0300)]
mx6ull_14x14_evk_plugin: Convert to DM_ETH

Convert to DM_ETH to avoid board removal from the project.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6slevk_spl: Convert to DM_ETH
Fabio Estevam [Tue, 9 Jun 2020 13:43:59 +0000 (10:43 -0300)]
mx6slevk_spl: Convert to DM_ETH

Convert to DM_ETH to avoid board removal from the project.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6slevk_spinor: Convert to DM_ETH
Fabio Estevam [Tue, 9 Jun 2020 13:43:58 +0000 (10:43 -0300)]
mx6slevk_spinor: Convert to DM_ETH

Convert to DM_ETH to avoid board removal from the project.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoarm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases
Ye Li [Wed, 10 Jun 2020 03:28:03 +0000 (20:28 -0700)]
arm: dts: imx: fsl-imx8qm.dtsi: fix gpio aliases

Current aliases missed gpio0 node, and this node shoud be
aliased to gpio index 0 to align with i.MX8QXP. Otherwise, we
will get below message when running "gpio status" command, and
see the reason by "dm uclass".

=> gpio status
Device 'gpio@5d090000': seq 0 is in use by 'gpio@5d080000'
Device 'gpio@5d0a0000': seq 1 is in use by 'gpio@5d090000'
Device 'gpio@5d0b0000': seq 2 is in use by 'gpio@5d0a0000'

=> dm uclass
uclass 36: gpio
0   * gpio@5d080000 @ fbaefb90, seq 0, (req -1)
1   * gpio@5d090000 @ fbaefc70, seq 1, (req 0)
2   * gpio@5d0a0000 @ fbaefd50, seq 2, (req 1)
3   * gpio@5d0b0000 @ fbaefe30, seq 5, (req 2)
4   * gpio@5d0c0000 @ fbaeff10, seq 3, (req 3)
5   * gpio@5d0d0000 @ fbaefff0, seq 4, (req 4)
6   * gpio@5d0e0000 @ fbaf00d0, seq 6, (req 5)
7   * gpio@5d0f0000 @ fbaf01b0, seq 7, (req 6)

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agogpio: mxc_gpio: change gpio index for i.MX8
Ye Li [Wed, 10 Jun 2020 03:28:02 +0000 (20:28 -0700)]
gpio: mxc_gpio: change gpio index for i.MX8

Since the i.MX8 GPIO banks are indexed from 0 not 1 on other i.MX
platforms, so we have to adjust the index accordingly.

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agomx6ul_14x14_evk: Avoid overlap of environment over U-Boot proper
Otavio Salvador [Tue, 9 Jun 2020 16:22:50 +0000 (13:22 -0300)]
mx6ul_14x14_evk: Avoid overlap of environment over U-Boot proper

We need to change the environment offset to avoid corrupting the U-Boot
binary when saving it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6ul_14x14_evk: Enable SPL USB and SDP support
Otavio Salvador [Tue, 9 Jun 2020 16:22:49 +0000 (13:22 -0300)]
mx6ul_14x14_evk: Enable SPL USB and SDP support

This fixes the boot from USB loader, which is critical to easy the
manufacture process.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoARM: imx: soc: Select default TEXT_BASE for MX7
Marek Vasut [Thu, 21 May 2020 23:13:54 +0000 (01:13 +0200)]
ARM: imx: soc: Select default TEXT_BASE for MX7

Select default U-Boot and SPL text base for the MX7 SoC. The U-Boot
text base is picked as the one used by various MX7 boards. The SPL
text base however is different.

The SPL text base is set to 0x912000 instead of the usual 0x911000,
that is because the 0x911000 value cannot work. Using 0x911000 as a
SPL text base will result in the DCD header being placed below the
0x911000 address, which is a reserved SRAM area which must not be
used. This will actually trigger eMMC boot failure on MX7D at least.
Hence the increment.

Update all boards affected by this SPL problem to the new SPL_TEXT_BASE.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: soc: Switch BOARD_EARLY_INIT_F to imply on MX7
Marek Vasut [Thu, 21 May 2020 23:13:00 +0000 (01:13 +0200)]
ARM: imx: soc: Switch BOARD_EARLY_INIT_F to imply on MX7

There are systems where board_early_init_f() is plain empty. Switch
the config option from "select" to "imply", to permit user to unset
the BOARD_EARLY_INIT_F if it were to be empty.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: ddr: Fill in missing DDRC ZQCTLx on i.MX7
Marek Vasut [Thu, 21 May 2020 23:12:39 +0000 (01:12 +0200)]
ARM: imx: ddr: Fill in missing DDRC ZQCTLx on i.MX7

The iMX7 defines further DDRC ZQCTLx registers, however those were
thus far missing from the list of registers and not programmed. On
systems with LPDDR2 or DDR3, those registers must be programmed with
correct values, otherwise the DRAM may not work. However, existing
systems which worked without programming these registers before are
now setting those registers to 0, which is the default value, so no
functional change there.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoimx: imx8qm_rom7720_a1: update README
Oliver Graute [Wed, 20 May 2020 11:47:06 +0000 (13:47 +0200)]
imx: imx8qm_rom7720_a1: update README

Update README to extract firmware from scripts

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
4 years agoARM: imx6: Fetch MAC address in board_init_late() on DH iMX6 PDK2
Marek Vasut [Thu, 14 May 2020 16:49:10 +0000 (18:49 +0200)]
ARM: imx6: Fetch MAC address in board_init_late() on DH iMX6 PDK2

This is needed to obtain the MAC from EEPROM/OTP only after the final
env is populated, otherwise the ethaddr might be overriden.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Claudius Heine <ch@denx.de>
Cc: Harald Seiler <hws@denx.de>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoarm: wandboard: move CONFIG_MXC_UART to defconfig
Heinrich Schuchardt [Sun, 7 Jun 2020 23:43:47 +0000 (01:43 +0200)]
arm: wandboard: move CONFIG_MXC_UART to defconfig

For using a debug UART on the Wandboard CONFIG_MXC_UART=y must be set in
the .config file.

To avoid duplicate definitions move the setting from
include/configs/wandboard.h to configs/wandboard_defconfig.

Document the debug UART settings in the README.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoFix MMC access on Sabrelite
Martyn Welch [Thu, 11 Jun 2020 17:53:50 +0000 (18:53 +0100)]
Fix MMC access on Sabrelite

It appears that MMC access on the Sabrelite has been broken since
cdcaee9518:

Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment

Remove the board_mmc_init() and related entries now that we should be
using DM_MMC, add PINCTRL so that things work as expected.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
4 years agocolibri_imx6: boot env configuration updates
Igor Opaniuk [Tue, 16 Jun 2020 19:20:11 +0000 (22:20 +0300)]
colibri_imx6: boot env configuration updates

1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU defines

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx7: boot env configuration updates
Igor Opaniuk [Tue, 16 Jun 2020 19:20:10 +0000 (22:20 +0300)]
colibri_imx7: boot env configuration updates

1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU defines

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoapalis_imx6: boot env configuration updates
Igor Opaniuk [Tue, 16 Jun 2020 19:20:09 +0000 (22:20 +0300)]
apalis_imx6: boot env configuration updates

1. Drop legacy emmcboot wrapper from env.
2. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP
3. Drop DFU defines

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agotoradex: imx: enable BOOTCOUNT feature
Igor Opaniuk [Tue, 16 Jun 2020 19:20:08 +0000 (22:20 +0300)]
toradex: imx: enable BOOTCOUNT feature

This introduces automatic boot counter that increases after every
reset.After a power-on reset, it will be initialized with 1,
and each reboot will increment the value by 1. By default it's
disabled if bootlimit isn't set.

To enable this feature you have set bootcount limit ("bootlimit"),
alternate boot action ("altbootcmd") that will be performed if
the new value of bootcount exceeds the value of bootlimit, and
"upgrade_available" to let U-Boot automatically increase and save
the counter value after every reset:

> setenv bootlimit 5
> setenv upgrade_available 1
> setenv altbootcmd "bootm ..."

In case the bootlimit exceeds, the message will be shown and
albootcmd executed:
Warning: Bootlimit (5) exceeded. Using altbootcmd.

To reset bootcount run:
> bootcount reset

Print current value:
> bootcount print

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoapalis-tk1: fix setting fdtfile value
Igor Opaniuk [Tue, 16 Jun 2020 19:20:07 +0000 (22:20 +0300)]
apalis-tk1: fix setting fdtfile value

s/fdt-module/fdt_module/g, as we don't use dash in fdt_file anymore.

Fixes: 4c63a601("apalis-tk1: support v1.2 hardware revision")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoapalis-tk1: enable distroboot
Igor Opaniuk [Tue, 16 Jun 2020 19:20:06 +0000 (22:20 +0300)]
apalis-tk1: enable distroboot

1. Use distro_bootcmd as default boot command instead of
legacy emmcboot wrapper.
2. Drop emmcboot and sdboot wrappers.
3. Provide proper boot order for Distro Boot.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoconfigs/colibri_vf.h: drop sdboot in favour of distro_bootcmd
Max Krummenacher [Tue, 16 Jun 2020 19:20:05 +0000 (22:20 +0300)]
configs/colibri_vf.h: drop sdboot in favour of distro_bootcmd

The distro bootscript uses kernel_image to get the file name of
the kernel, so change that variable name.
UBI boot has precedence in the default boot command. If one wants
to boot from SD with a working NAND installation stop in U-Boot
and enter:

setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agocolibri_vf_defconfig: enable part cmd
Max Krummenacher [Tue, 16 Jun 2020 19:20:04 +0000 (22:20 +0300)]
colibri_vf_defconfig: enable part cmd

This allows to boot from SD/USB with passing the rootfs partition via UUID.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agocolibri-imx6ull/imx7: define bootubipart for distro boot
Stefan Agner [Tue, 16 Jun 2020 19:20:03 +0000 (22:20 +0300)]
colibri-imx6ull/imx7: define bootubipart for distro boot

When using distro boot to boot from UBI volumes the boot partition
has been hardcoded to "UBI" (capital letters). However, our default
MTD layout uses "ubi" (lower case letter). Define "ubi" as the
default UBI partition for distro boot for Toradex. This allows to
use distro boot without having to redefine the MTD partition layout
which is useful for TorizonCore.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
4 years agocolibri_imx7: add addresses required for distro boot
Stefan Agner [Tue, 16 Jun 2020 19:20:02 +0000 (22:20 +0300)]
colibri_imx7: add addresses required for distro boot

Define addresses required for full distro boot support.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
4 years agocolibri-imx8x: declare consoleargs
Oleksandr Suvorov [Tue, 16 Jun 2020 19:20:01 +0000 (22:20 +0300)]
colibri-imx8x: declare consoleargs

Store all console-related kernel parameters
in dedicated variable.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agoapalis/colibri-imx8: re-enable CONFIG_IMX_SCU_THERMAL
Max Krummenacher [Tue, 16 Jun 2020 19:20:00 +0000 (22:20 +0300)]
apalis/colibri-imx8: re-enable CONFIG_IMX_SCU_THERMAL

This got dropped by a global 'make savedefconfig' resync as
required patches are still in flight.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoapalis-imx8: enable of_system_setup
Marcel Ziswiler [Tue, 16 Jun 2020 19:19:59 +0000 (22:19 +0300)]
apalis-imx8: enable of_system_setup

Enable CONFIG_OF_SYSTEM_DEFAULT for Apalis iMX8.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
4 years agoARM: dts: imx6qdl-sabresd: Fix AR8031 phy-mode
Fabio Estevam [Wed, 17 Jun 2020 17:33:16 +0000 (14:33 -0300)]
ARM: dts: imx6qdl-sabresd: Fix AR8031 phy-mode

As per kernel commit 0672d22a1924 ("ARM: dts: imx: Fix the AR803X phy-mode)
the correct phy-mode should be "rgmii-id", so fix it accordingly
to fix the Ethernet regression.

This problem has been exposed by commit:

commit 13114f38e2ccea9386726d8b9831dfc310589548
Author: Vladimir Oltean <vladimir.oltean@nxp.com>
Date:   Thu May 7 00:11:51 2020 +0200

    phy: atheros: Explicitly disable RGMII delays

    To eliminate any doubts about the out-of-reset value of the PHY, that
    the driver previously relied on.

    If bisecting shows that this commit breaks your board you probably have
    a wrong PHY interface mode. You probably want the
    PHY_INTERFACE_MODE_RGMII_RXID or PHY_INTERFACE_MODE_RGMII_ID mode.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>