platform/kernel/u-boot.git
4 years agoarmv7m: cache: add mmu_set_region_dcache_behaviour() stub for compatibility
Giulio Benetti [Fri, 10 Jan 2020 14:46:52 +0000 (15:46 +0100)]
armv7m: cache: add mmu_set_region_dcache_behaviour() stub for compatibility

Since some driver requires this function add it as an empty stub
when DCACHE is OFF.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
4 years agospl: fix entry_point equal to load_addr
Giulio Benetti [Fri, 10 Jan 2020 14:46:51 +0000 (15:46 +0100)]
spl: fix entry_point equal to load_addr

At the moment entry_point is set to image_get_load(header) that sets it
to "load address" instead of "entry point", assuming entry_point is
equal to load_addr, but it's not true. Then load_addr is set to
"entry_point - header_size", but this is wrong too since load_addr is
not an entry point.

So use image_get_ep() for entry_point assignment and image_get_load()
for load_addr assignment.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
4 years agoimx: dts: imx8dx: add I2C IPG clock for bus 0 and 2
Anatolij Gustschin [Tue, 7 Jan 2020 13:03:04 +0000 (14:03 +0100)]
imx: dts: imx8dx: add I2C IPG clock for bus 0 and 2

IPG clock description is missing for I2C0 and I2C2 busses,
add it. Otherwise we see -ENODATA error when trying to get
I2C clock for these busses.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoclk: imx8qxp: extend to support getting I2C IPG clock
Anatolij Gustschin [Tue, 7 Jan 2020 13:03:03 +0000 (14:03 +0100)]
clk: imx8qxp: extend to support getting I2C IPG clock

Since commit d02be21d3004 ("i2c: imx_lpi2c: add ipg clk") getting
I2C clocks doesn't work. Add I2C IPG clock IDs to related switch
statements to fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoARM: dts: imx6ul-14x14-evk: Pass the "broken-cd" property
Fabio Estevam [Mon, 6 Jan 2020 23:11:28 +0000 (20:11 -0300)]
ARM: dts: imx6ul-14x14-evk: Pass the "broken-cd" property

imx6ul-14x14-evk does not have a GPIO dedicated for reading the card
detect pin on the eSDHC2 port. In such cases the "broken-cd" property
must be passed, otherwise the card cannot be detected.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
4 years agommc: fsl_esdhc_imx: Handle the "broken-cd" property
Fabio Estevam [Mon, 6 Jan 2020 23:11:27 +0000 (20:11 -0300)]
mmc: fsl_esdhc_imx: Handle the "broken-cd" property

When no GPIO is used to read the card detect status the following
error is seen:

MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... MMC: no card present
*** Warning - No block device, using default environment

Fix it by handling the "broken-cd" property in the same way
that drivers/mmc/sdhci.c does, which considers that the SD card
is present when the "broken-cd" property is passed.

Tested on a imx6ul-evk board.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
4 years agopico-imx7d: Convert to DM_ETH
Joris Offouga [Sun, 5 Jan 2020 23:22:09 +0000 (00:22 +0100)]
pico-imx7d: Convert to DM_ETH

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
4 years agopico-imx7d: Disable USB_ETHER support for bl33 defconfig
Joris Offouga [Sun, 5 Jan 2020 23:22:08 +0000 (00:22 +0100)]
pico-imx7d: Disable USB_ETHER support for bl33 defconfig

For DM_ETH support , it's require to disable this config.
When this config is enable, This generate a error with spl in linker script

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
4 years agomx6ul_14x14_evk: Fix SPL boot hang
Fabio Estevam [Mon, 6 Jan 2020 15:31:55 +0000 (12:31 -0300)]
mx6ul_14x14_evk: Fix SPL boot hang

Currently the following SPL hang is observed:

U-Boot SPL 2020.01-rc5-00079-g797eee36a1 (Jan 06 2020 - 11:24:09 -0300)
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Fix it by moving the eSDHC2 initialization to SPL.

While at it, since this board uses DM_MMC all the esdhc board
code can be removed to make the code simpler.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: imx8qxp_mek: update README
Peng Fan [Wed, 8 Jan 2020 01:33:31 +0000 (01:33 +0000)]
imx: imx8qxp_mek: update README

Update README to use 4.19.35_1.1.0 released firmware images.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agowandboard: Do not print error message when PMIC is absent
Fabio Estevam [Thu, 9 Jan 2020 01:05:05 +0000 (22:05 -0300)]
wandboard: Do not print error message when PMIC is absent

Only the wandboard revD1 boards have PMIC, so when running on a wandboard
of different revision the following error is always shown on every boot:

pmic_get() ret -19

Instead of printing this error message, move it to debug level instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8qxp_mek: Select CONFIG_NET_RANDOM_ETHADDR
Fabio Estevam [Thu, 9 Jan 2020 14:07:23 +0000 (11:07 -0300)]
imx8qxp_mek: Select CONFIG_NET_RANDOM_ETHADDR

Some i.MX8QXP MEK boards do not have MAC address stored
and hang during eth driver probe:

Error: ethernet@5b040000 address not set.

(Board hangs)

To fix this problem select CONFIG_NET_RANDOM_ETHADDR so that
a valid MAC address can be used in such case.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: add imx8x based deneb board
Anatolij Gustschin [Tue, 7 Jan 2020 15:37:43 +0000 (16:37 +0100)]
imx: add imx8x based deneb board

Add support for Capricorn Deneb SoM variant.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
4 years agoimx: add imx8x capricorn giedi board
Anatolij Gustschin [Tue, 7 Jan 2020 15:37:42 +0000 (16:37 +0100)]
imx: add imx8x capricorn giedi board

Add support for i.MX8X based Capricorn Giedi SoM.

Supported interfaces: GPIO, ENET, eMMC, I2C, UART.

Console output:

  U-Boot SPL 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100)
  Trying to boot from MMC1
  Load image from MMC/SD 0x3e400

  U-Boot 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100) ##v01.07

  CPU:   NXP i.MX8QXP RevB A35 at 1200 MHz at 30C

  Model: Siemens Giedi
  Board: Capricorn
  Boot:  MMC0
  DRAM:  1022 MiB
  MMC:   FSL_SDHC: 0
  Loading Environment from MMC... OK
  In:    serial@5a080000
  Out:   serial@5a080000
  Err:   serial@5a080000
  Net:   eth1: ethernet@5b050000 [PRIME]
  Autobooting in 1 seconds, press "<Esc><Esc>" to stop

Signed-off-by: Anatolij Gustschin <agust@denx.de>
4 years agotegra: fdt: Add tegra186-u-boot.dtsi
Stephen Warren [Tue, 7 Jan 2020 18:17:54 +0000 (11:17 -0700)]
tegra: fdt: Add tegra186-u-boot.dtsi

All Tegra chips except Tegra186 have a tegraNNN-u-boot.dtsi. Duplicate
Tegra210's copy of this file for Tegra186. This ensures that a /binman node
exists in U-Boot's control DT. Subsequent to 3c10dc95bdd0 ("binman: Add a
library to access binman entries") this appears to be required. I haven't
really investigated why all this is necessary or how it works, but simply
observed the boot failure listed below, bisected it, noticed the
inconsistency in DT files, and found that fixing it resolved the boot
issue.

    U-Boot 2020.01-rc4-00256-g3c10dc95bdd0 (Jan 07 2020 - 10:25:00 -0700)

    SoC: tegra186
    Model: NVIDIA P2771-0000-500
    Board: NVIDIA P2771-0000
    DRAM:  7.8 GiB
    initcall sequence 00000000fffb7858 failed at call 00000000800955a8 (err=-22)
    ### ERROR ### Please RESET the board ###

Fixes: 3c10dc95bdd0 ("binman: Add a library to access binman entries")
Fixes: f2faffecb016 ("binman: tegra: Convert to use binman")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoarm64: versal: Enable board_late_init calling
Michal Simek [Tue, 17 Dec 2019 14:06:38 +0000 (15:06 +0100)]
arm64: versal: Enable board_late_init calling

Qemu v4.2.0 maps bootmode registers to address space which was the reason
why board_late_init() was disabled and accesses were failing.

With new Qemu board_late_init() can be called without any issue.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: dts: zynq: enablement of coresight topology
Zumeng Chen [Mon, 23 Sep 2019 09:47:09 +0000 (17:47 +0800)]
ARM: dts: zynq: enablement of coresight topology

This patch is to build the coresight topology structure of zynq-7000
series according to the docs of coresight and userguide of zynq-7000.

Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Sync gem clock nodes with mainline Linux
Michal Simek [Thu, 9 Jan 2020 13:15:07 +0000 (14:15 +0100)]
arm64: zynqmp: Sync gem clock nodes with mainline Linux

Just fixing indentation and update year in Copyright.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Sync gpio-controller name location
Michal Simek [Thu, 9 Jan 2020 12:10:59 +0000 (13:10 +0100)]
arm64: zynqmp: Sync gpio-controller name location

Sync location with mainline kernel.
Added by Linux kernel commit 75926f07baae
("arm64: dts: zynqmp: Add missing gpio-controller to ps gpio").

Fixes: 0b33e0b15600 ("arm64: zynqmp: Add missing gpio property to dtsi")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: dts: zynqmp: replace gpio-key,wakeup with wakeup-source property
Sudeep Holla [Wed, 24 Oct 2018 11:45:40 +0000 (12:45 +0100)]
arm64: dts: zynqmp: replace gpio-key,wakeup with wakeup-source property

Most of the legacy "gpio-key,wakeup" boolean property is already
replaced with "wakeup-source". However few occurrences of old property
has popped up again, probably from the remnants in downstream trees.

This patch replaces the legacy properties with the unified
"wakeup-source" property introduced by:
"Input: gpio_keys - switch to using generic device properties"
(sha1: 700a38b27eefc582099fdf69effacfad0ad738a4)

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: dts: zcu100-revC: Give wifi some time after power-on
Jan Kiszka [Thu, 24 Jan 2019 08:28:59 +0000 (09:28 +0100)]
arm64: dts: zcu100-revC: Give wifi some time after power-on

Somewhere along recent changes to power control of the wl1831, power-on
became very unreliable on the Ultra96, failing like this:

wl1271_sdio: probe of mmc2:0001:1 failed with error -16
wl1271_sdio: probe of mmc2:0001:2 failed with error -16

After playing with some dt parameters and comparing to other users of
this chip, it turned out we need some power-on delay to make things
stable again. In contrast to those other users which define 200 ms,
Ultra96 is already happy with 10 ms.

Fixes: 5869ba0653b9 ("arm64: zynqmp: Add support for Xilinx zcu100-revC")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: dts: zynqmp: Fix node names which contain "_"
Michal Simek [Thu, 8 Nov 2018 09:06:53 +0000 (10:06 +0100)]
arm64: dts: zynqmp: Fix node names which contain "_"

s/_/-/ for node names.

It fixes warnings like this:
... Warning (node_name_chars_strict): /cpu_opp_table:
Character '_' not recommended in node name ...

Issues reported by make dtbs W=12

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: dts: Remove inconsistent use of 'arm,armv8' compatible string
Rob Herring [Mon, 14 Jan 2019 17:45:33 +0000 (11:45 -0600)]
arm64: dts: Remove inconsistent use of 'arm,armv8' compatible string

The 'arm,armv8' compatible string is only for software models. It adds
little value otherwise and is inconsistently used as a fallback on some
platforms. Remove it from those platforms.

This fixes warnings generated by the DT schema.

Reported-by: Michal Simek <michal.simek@xilinx.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Acked-by: Antoine Tenart <antoine.tenart@bootlin.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Chanho Min <chanho.min@lge.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Scott Branden <scott.branden@broadcom.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
Acked-by: Robert Richter <rrichter@cavium.com>
Acked-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
4 years agoarm64: zynqmp: Remove incorrect phy from DT for zcu102-revB up
Michal Simek [Thu, 9 Jan 2020 12:01:07 +0000 (13:01 +0100)]
arm64: zynqmp: Remove incorrect phy from DT for zcu102-revB up

zcu102-revB/up are not removing phy from revA properly because of incorrect
name.

Fixes: 2975a42b42c5 ("arm64: zynqmp: Use ethernet-phy as node name for ethernet phys")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for zcu1285 revA board
Michal Simek [Thu, 9 Jan 2020 09:28:56 +0000 (10:28 +0100)]
arm64: zynqmp: Add support for zcu1285 revA board

zcu1285 is the same as zcu1275 but it is using Avnet FMC
http://www.ultrazed.org/product/network-fmc-module

Unfortunately not everything is connected now that's why this is only
describing system which Xilinx is using.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agonet: zynq: Add a note about RX_BUF macro
Michal Simek [Wed, 22 May 2019 12:12:20 +0000 (14:12 +0200)]
net: zynq: Add a note about RX_BUF macro

Record note about reducing number of BDs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Switch zcu100 revC to use firmware clock driver
Michal Simek [Tue, 7 Jan 2020 11:43:55 +0000 (12:43 +0100)]
arm64: zynqmp: Switch zcu100 revC to use firmware clock driver

There is no issue with using firmware based driver instead of fixed clock
one.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agozynqmp: dts: Cleanup no-1-8-v property from sdhci dt nodes
T Karthik Reddy [Wed, 7 Aug 2019 08:38:50 +0000 (14:08 +0530)]
zynqmp: dts: Cleanup no-1-8-v property from sdhci dt nodes

Removed no-1-8-v property from zynqmp sdhci devicetree nodes to
allow UHS-I capable SD cards to work in SD3.0 UHS modes.

Boards that does not have level shifter for SD, does not support 1.8v.
so no-1-8-v property to sdhci dt nodes should be present in zcu102 Rev-A,B,
zcu104 Rev-A,C, zcu100, zcu1275 Rev-B boards.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for zcu208
Michal Simek [Mon, 25 Nov 2019 07:38:25 +0000 (08:38 +0100)]
arm64: zynqmp: Add support for zcu208

The board is very similar to zcu216 with zu49dr device.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynq: Add missing nand/smcc nodes
Michal Simek [Tue, 7 Jan 2020 09:17:43 +0000 (10:17 +0100)]
ARM: zynq: Add missing nand/smcc nodes

Add missing nand/smcc description.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofirmware: Remove probe which is causing extra bind
Ashok Reddy Soma [Tue, 7 Jan 2020 09:26:00 +0000 (02:26 -0700)]
firmware: Remove probe which is causing extra bind

Remove probe function dm_scan_fdt_dev from zynqmp-firmware driver.
It is just binding its subnode zynqmp-clk.
As a result one extra node is showing up in dm tree.

This is not required, it is anyway bound from it's own zynqmp-clk driver.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Correct the type of eeprom for zcu216 boards
Raviteja Narayanam [Tue, 26 Nov 2019 12:52:50 +0000 (18:22 +0530)]
arm64: zynqmp: Correct the type of eeprom for zcu216 boards

Corrected the type of eeprom in device tree for zcu216 boards according
to schematic.

Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix ina226 shunt resistor value
Michal Simek [Mon, 25 Nov 2019 08:55:28 +0000 (09:55 +0100)]
arm64: zynqmp: Fix ina226 shunt resistor value

Fix shunt resistor value for ina226 vccint_ams and vccint_io_bram_ps.
2mOhm shunt was only in early board revision schematics but never got to
real revA board.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Move PANIC to Kconfig
Michal Simek [Tue, 17 Dec 2019 14:48:54 +0000 (15:48 +0100)]
arm64: zynqmp: Move PANIC to Kconfig

Convert another option Kconfig.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Use zynqmp_virt platform
Michal Simek [Fri, 6 Dec 2019 10:52:09 +0000 (11:52 +0100)]
arm64: zynqmp: Use zynqmp_virt platform

Decrease amount of the similar defconfigs and use generic one instead.
The change was declared by commit 4b37c13dc353
("arm64: zynqmp: Introduce virtual defconfig") and this patch removes
configs for the most of the boards.
Utra96/zcu100/zcu102/zcu102 and ZynqMP based System controllers *a2197*.
have been also boot tested to make sure that funcionality
remains the same.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add missing Kconfig options to zynqmp_virt platform
Michal Simek [Fri, 6 Dec 2019 10:51:13 +0000 (11:51 +0100)]
arm64: zynqmp: Add missing Kconfig options to zynqmp_virt platform

These options are taken from zcu102/104 platforms. Also use OF_SEPARATE
instead of OF_BOARD. Maybe at some point this option will be taken back but
as of now board detection is not ready.

export DEVICE_TREE="zynqmp-zcu102-revA"
make xilinx_zynqmp_virt_defconfig
make -j

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for u-boot.itb generation with ATF
Michal Simek [Wed, 2 Oct 2019 13:55:57 +0000 (15:55 +0200)]
arm64: zynqmp: Add support for u-boot.itb generation with ATF

Follow i.MX, Sunxi, RISC-V and Rockchip to generate u-boot.itb which
includes U-Boot proper, ATF and DTBs in FIT format. ZynqMP supports FIT for
quite a long time but with using out of tree solution. The patch is filling
this gap.

Tested on zcu102, zcu104 and zcu100/Ultra96.

zcu100/Ultra96 v2.2 ATF build by:
make DEBUG=0 ZYNQMP_CONSOLE=cadence1 RESET_TO_BL31=1 PLAT=zynqmp bl31

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agotest/py: hush_if_test: Add tests to cover octal/hex values
Michal Simek [Thu, 10 Oct 2019 11:00:38 +0000 (13:00 +0200)]
test/py: hush_if_test: Add tests to cover octal/hex values

Extend test suite to cover also automatic octal/hex converstions which
haven't been implemented in past.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoARM: zynq: Remove unused QSPI and USB addresses
Michal Simek [Mon, 6 Jan 2020 09:33:20 +0000 (10:33 +0100)]
ARM: zynq: Remove unused QSPI and USB addresses

All drivers should be converted to DM already that's why these hardcoded
base addresses are not needed anymore.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agozynq: mtd: nand: Remove hardcoded base addresses
Ashok Reddy Soma [Fri, 27 Dec 2019 11:47:13 +0000 (04:47 -0700)]
zynq: mtd: nand: Remove hardcoded base addresses

Remove hardcoded base addresses of smc controller and nand controller.
Get those addresses from dt and replace wherever they are used.
Remove smc and nand base address from header file too.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agozynq: mtd: nand: Move zynq nand driver to driver model
Ashok Reddy Soma [Fri, 27 Dec 2019 11:47:12 +0000 (04:47 -0700)]
zynq: mtd: nand: Move zynq nand driver to driver model

Move the zynq nand driver to driver model. Select DM_MTD if
zynq nand controller (NAND_ZYNQ) is selected.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynq: Add jtag distro boot support
T Karthik Reddy [Thu, 14 Nov 2019 04:13:44 +0000 (21:13 -0700)]
ARM: zynq: Add jtag distro boot support

This patch adds new jtag distro boot command to look for bootscript
file in DDR and execute it first incase of jtag bootmode.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm: zynqmp: Wire SPL/ATF handoff structure properly
Michal Simek [Thu, 19 Dec 2019 17:16:16 +0000 (18:16 +0100)]
arm: zynqmp: Wire SPL/ATF handoff structure properly

handoff_setup() was used to generate fixed handoff structure for ATF on
ZynqMP platform.
Switching to bl2_plat_get_bl31_params() platform brings more flexibility
because information can be taken from fit image where /fit-images node is
created at run time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agospl: atf: Enable option to rewrite bl2_plat_get_bl31_params()
Michal Simek [Thu, 19 Dec 2019 17:13:31 +0000 (18:13 +0100)]
spl: atf: Enable option to rewrite bl2_plat_get_bl31_params()

Xilinx ZynqMP platform is passing information to ATF in private format and
ATF bl31 parameters are not used. That's why enable option to rewrite this
function by platform specific implementation.

The patch also move and update kernel-doc format with missing parameters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agospi: Fix manual relocation calling more times
Ashok Reddy Soma [Tue, 17 Sep 2019 06:11:02 +0000 (00:11 -0600)]
spi: Fix manual relocation calling more times

When two instances of AXI QSPI with flash are added and tested
simultaneously the spi driver operations are relocated twice.
As a result code is accessing addresses outside of RAM when
relocated second time which is causing a crash.

Tested on Microblaze.

Similar change was done in past by:
commit f238b3f0fbc9 ("watchdog: dm: Support manual relocation for watchdogs")
commit 2588f2ddfd60 ("dm: sf: Add support for all targets which requires MANUAL_RELOC")
commit 1b4c2aa25bdf ("gpio: dm: Support manual relocation for gpio")

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm: xilinx: Use device tree which can be passed on cmd line
Michal Simek [Fri, 6 Dec 2019 11:05:34 +0000 (12:05 +0100)]
arm: xilinx: Use device tree which can be passed on cmd line

DEVICE_TREE variable has been added by commit 6ab6b2afa091
("dts: re-write dts/Makefile more simply with Kbuild")
where DT can be specified on command line. If it is not then
CONFIG_DEFAULT_DEVICE_TREE is used to ensure backward compatibility.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix return value of board_fit_config_name_match
Michal Simek [Mon, 9 Dec 2019 07:39:19 +0000 (08:39 +0100)]
arm64: zynqmp: Fix return value of board_fit_config_name_match

Empty implementation should not return 0 (success) because that mean that
passed name matches the board configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add board_boot_order for MMC boot extension
Michal Simek [Mon, 9 Dec 2019 12:00:57 +0000 (13:00 +0100)]
arm64: zynqmp: Add board_boot_order for MMC boot extension

In past SPL_ZYNQMP_TWO_SDHCI symbol was introduced to handle boards with
two sdhci controllers. The problem was that U-Boot is registering
controllers based on aliases in DT but bootmode targets specific controller
ID. That's why on boards with one "second" sdhci controller bootmode was
pointing to second controller(MMC2) but alias was setup to mmc0 (the first
controller). And SPL requires to point to mmc0 in this case.

Long time ago commit f101e4bd3703
("spl: add support for alternative boot device") added support for handling
multiple bootmodes in SPL. Use this functionality and setup second sdhci
controller as backup boot device.

Below is table with behavior:
HW/bootmode  bootorder
sd0/sd0      mmc0/mmc1 (mmc1 never called)
sd1/sd1      mmc1/mmc0 (mmc0 fails and mmc1 is called)
sd0+sd1/sd0  mmc0/mmc1 (mmc1 never called)
sd0+sd1/sd1  mmc1/mmc0 (mmc0 never called)

All other bootmodes are not affected but order can be extended to cover
advance boot flows.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix symlinks to SC psu_init* files
Michal Simek [Mon, 9 Dec 2019 10:07:26 +0000 (11:07 +0100)]
arm64: zynqmp: Fix symlinks to SC psu_init* files

Names have to match device tree file names. Also add missing one.

Fixes: 50d92833477e ("arm64: zynqmp: Sync names for SC with Versal")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Remove nand partition description from mini-nand
Michal Simek [Wed, 30 Jan 2019 07:59:38 +0000 (08:59 +0100)]
arm64: zynqmp: Remove nand partition description from mini-nand

There shouldn't be a need to use any partition description because it
can be used for writing data anywhere.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable bind/unbind commands for all boards
Michal Simek [Thu, 19 Sep 2019 13:53:40 +0000 (15:53 +0200)]
arm64: zynqmp: Enable bind/unbind commands for all boards

These commands are useful in connection to usb and other devices that's why
enable it by default.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm: zynq: Remove low level UART setting
Michal Simek [Fri, 6 Dec 2019 08:33:25 +0000 (09:33 +0100)]
arm: zynq: Remove low level UART setting

There is no reason to do serial initializationin low level code. Uart
driver does it already based on DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Remove low level UART setting
Michal Simek [Fri, 6 Dec 2019 08:12:26 +0000 (09:12 +0100)]
arm64: zynqmp: Remove low level UART setting

There is no reason to do serial initialization. Uart driver does it already
based on DT. Good effect is that it is clear which interface is console.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Do not assing MIO34 that early on zcu100
Michal Simek [Tue, 3 Dec 2019 14:02:50 +0000 (15:02 +0100)]
arm64: zynqmp: Do not assing MIO34 that early on zcu100

MIO34 is connected to POWER_KILL signal. When MIO configuration is done in
psu_init() and this pin is assigned to PMU but PMU configuration is not
loaded yet. PMU gpio output is high that means board is powered off
immediately.
The patch is fixing this sequence that MIO34 stays assing to ps gpio IP.
PMU config is loaded in SPL and then pin assigned to PMU through
psu_post_config_data().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for OF_SEPARATE with board DTB
Michal Simek [Thu, 19 Dec 2019 16:45:15 +0000 (17:45 +0100)]
arm64: zynqmp: Add support for OF_SEPARATE with board DTB

OF_BOARD and OF_SEPARATE can use board specific board_fdt_blob_setup().

OF_BOARD option is mostly used for picking up DTB from certain location.

OF_SEPARATE option is used when DTB is appended after u-boot binary.

This board specific function is aligned with current version in
lib/fdtdec.c with checking CONFIG_XILINX_OF_BOARD_DTB_ADDR address first.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Rename fw_dtb variable to fdt_blob
Michal Simek [Thu, 19 Dec 2019 16:43:07 +0000 (17:43 +0100)]
arm64: zynqmp: Rename fw_dtb variable to fdt_blob

The reason for this change is just get in sync with board_fdt_blob_setup()
available at lib/fdtdec.c.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: Enable INIT_SP_RELATIVE by default when POC is enabled
Michal Simek [Fri, 20 Dec 2019 10:35:52 +0000 (11:35 +0100)]
arm64: Enable INIT_SP_RELATIVE by default when POC is enabled

When position-independent pre-relocation code is enable there is also
necessary to enable relative early stack pointer not to use origin location
pointed by CONFIG_SYS_INIT_SP_ADDR macro.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Do not call bss init and board_init_r from board_init_f
Michal Simek [Thu, 19 Dec 2019 12:56:33 +0000 (13:56 +0100)]
arm64: zynqmp: Do not call bss init and board_init_r from board_init_f

There is no reason to clear bss and call board_init_r() from board_init_f()
beca it can be called directly from crt0_64.S with also support for SPL
stack relocation to SDRAM.
For more information please take a look at arch/arm/lib/crt0_64.S

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agospl: atf: Add missing ndepth initialization
Michal Simek [Thu, 19 Dec 2019 14:42:13 +0000 (15:42 +0100)]
spl: atf: Add missing ndepth initialization

ndepth needs to be initialized before it is used in fdt_next_node().
Uninitialized value is causing that node is found and depth increase but
won't pass condition below because initial state wasn't setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoboard: xilinx: Add support for user configurable boot script offset
T Karthik Reddy [Wed, 18 Dec 2019 10:34:41 +0000 (03:34 -0700)]
board: xilinx: Add support for user configurable boot script offset

Currently "script_offset_f" env variable is hardcoded, this variable
specifies from which offset of the flash boot.scr should be read/write.
As flashes are of different sizes having a fixed offset makes it
difficult to load other images into the flash which may overwrite the
boot script or cannot utilize the full memory. This current fix
creates a new config "CONFIG_BOOT_SCRIPT_OFFSET" which holds the
offset address, overwrites the "script_offset_f" variable.
Also removed existing variable with default values, as the default
values are held by CONFIG_BOOT_SCRIPT_OFFSET

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 emmc boot mode boot_target sequence
T Karthik Reddy [Tue, 17 Dec 2019 13:41:42 +0000 (06:41 -0700)]
arm64: zynqmp: Fix emmc boot mode boot_target sequence

Emmc boot devcie is mounted to mmc@ff160000 controller on zynqmp.
Detect mmc alias at run time for setting up proper boot_targets
sequence instead of setting boot_targets manually.
Removed setting "modeboot" variable as it not longer need as we
switched to distro boot.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Fix emmc boot mode boot_target issue
T Karthik Reddy [Mon, 16 Dec 2019 11:44:26 +0000 (04:44 -0700)]
arm64: versal: Fix emmc boot mode boot_target issue

Emmc boot devcie is mounted to sdhci@f1050000 controller on versal, while
in emmc boot mode, boot tragets are set to mmc0. So removed mmc0 and using
the dev seq number from the sdhci@f1050000 controller.
Dev seq number is setup based on DT aliases that's why needs to be setup at
run time.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agomtd: nand: Remove hardcoded base address of nand
Ashok Reddy Soma [Thu, 19 Dec 2019 09:27:43 +0000 (02:27 -0700)]
mtd: nand: Remove hardcoded base address of nand

Remove hardcoded base address of nand and replace it with the
value taken from device tree. Remove base address from header
file too.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agomtd: nand: Move arasan nand driver to driver model
Ashok Reddy Soma [Thu, 19 Dec 2019 09:27:42 +0000 (02:27 -0700)]
mtd: nand: Move arasan nand driver to driver model

Make changes to arasan nand driver to move it to driver model.
Select DM_MTD if arasan nand driver is selected.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agotravis: Switch to QEMU v4.2.0 globally
Tom Rini [Sat, 11 Jan 2020 13:07:03 +0000 (08:07 -0500)]
travis: Switch to QEMU v4.2.0 globally

Given our tests in GitLab / Azure we can use QEMU v4.2.0 for all
platforms now.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agogitlab/azure: Update to latest container
Tom Rini [Fri, 10 Jan 2020 22:07:27 +0000 (17:07 -0500)]
gitlab/azure: Update to latest container

- Updated base snapshot
- QEMU v4.2.0

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch '2020-01-10-master-imports'
Tom Rini [Fri, 10 Jan 2020 21:38:40 +0000 (16:38 -0500)]
Merge branch '2020-01-10-master-imports'

- Android image support enhancements
- Assorted ARM fixes and enhancements
- m68k update

4 years agocmd: adtimg: Refactor usage style
Eugeniu Rosca [Tue, 24 Dec 2019 16:51:08 +0000 (17:51 +0100)]
cmd: adtimg: Refactor usage style

Trying to extend 'adtimg' functionality [1], we've been severely hit
by a major limitation in the command's usage scheme. Specifically, the
command's user interface appears to be too centric to getting the
DTB/DTBO entry [3] based on the index of the desired DT in the image,
which makes it really difficult retrieving the DT entry based on
alternative criteria (e.g. filtering by id/rev fields), the
latter being demanded by real life customer use-cases [1].

This went to the point of receiving below feedback from Sam [2]:

 -- snip --
 As for 'dtimg' command: after giving it some thought, I think not much
 people using it yet. So in this particular case I don't have some
 strong preference, and if you think the 'dtimg' interface is ugly, and
 it overcomes "don't break interfaces" rule, maybe now is a good time
 to rework it (before it gets widely used).
 -- snip --

Given the above, rework the usage pattern from [4] to [5], in order to
allow an intuitive enablement of "by id|rev" DT search [6].

[1] https://patchwork.ozlabs.org/cover/1202575/
    ("cmd: dtimg: Enhance with --id and --rev options (take #1)")
[2] https://patchwork.ozlabs.org/patch/1182207/#2317020
[3] https://source.android.com/devices/architecture/dto/partitions
[4] Old usage
adtimg dump <addr>                    - Print image contents
adtimg start <addr> <index> <varname> - Get DT address by index
adtimg size <addr> <index> <varname>  - Get DT size by index

[5] New usage
adtimg addr <addr>                      - Set image location to <addr>
adtimg dump                             - Print out image contents
adtimg get dt --index=<i> [avar [svar]] - Get DT address and size by index

[6] Soon-to-be-provided "by id|rev" add-on functionality
adtimg get dt --id=<id> --rev=<rev> [avar [svar [ivar]]]
 - Get DT address/size/index by id|rev fields

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
4 years agocmd: adtimg: Rename internal symbols
Eugeniu Rosca [Tue, 24 Dec 2019 16:51:07 +0000 (17:51 +0100)]
cmd: adtimg: Rename internal symbols

With 'dtimg.c' renamed to 'adtimg.c', now ensure the naming
consistency in the internal implementation of 'adtimg.c'.

No functional change intended.

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodtimg/am57xx_evm_defconfig: Rename dtimg to adtimg
Eugeniu Rosca [Tue, 24 Dec 2019 16:51:06 +0000 (17:51 +0100)]
dtimg/am57xx_evm_defconfig: Rename dtimg to adtimg

Rename the existing 'dtimg' command to 'adtimg', in order to:
 - Suggest the Android origins and scope
 - Be consistent with the upcoming 'abootimg' command (naming
   suggested by Simon [*])

The change in _not_ backward compatible, but its benefits outweigh its
downsides, given that we don't expect active users of 'dtimg' today.

Perform the rename in several steps:
 1. Rename *.c file and Kconfig symbol. This should allow
    'git log --follow' to properly track the history of 'adtimg.c'
 2. 's/dtimg/adtimg/g' in the internal namespace of 'adtimg.c'

ELF comparison [**] before and after shows no functional change.

[*] https://patchwork.ozlabs.org/patch/1182212/#2291600
[**] diff -u <(objdump -d cmd/dtimg.o) <(objdump -d cmd/adtimg.o)

Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Simon Glass<sjg@chromium.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
4 years agovirtio: fix typo devicd
Heinrich Schuchardt [Tue, 24 Dec 2019 11:21:09 +0000 (12:21 +0100)]
virtio: fix typo devicd

%s/devicd/device

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoarm: cpu: armv8: add support for arm psci reset2.
Rajesh Ravi [Fri, 22 Nov 2019 22:50:01 +0000 (14:50 -0800)]
arm: cpu: armv8: add support for arm psci reset2.

Current U-Boot has only support for psci reset.
Adding support for arm psci reset2 allows passing of reset level
and other platform sepcific parameters like strap settings
to lowlevel psci implementation.

Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
4 years agoarch: arm: Program GIC LPI configuration table
Bharat Kumar Reddy Gooty [Mon, 16 Dec 2019 17:09:43 +0000 (09:09 -0800)]
arch: arm: Program GIC LPI configuration table

Programs the following:
1. Redistributor PROCBASER configuration table (which
is common for all redistributors)
2. Redistributor pending table (PENDBASER), for all the
available redistributors.

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
4 years agomkimage: simplify fit_check_params()
Heinrich Schuchardt [Wed, 11 Dec 2019 12:51:38 +0000 (13:51 +0100)]
mkimage: simplify fit_check_params()

fit_check_params() wants at least two of dflag, fflag, and lflag set.

Simplify the logical constraint checking this.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocmd/eeprom.c: prepend 0x to hex numbers in output message format
Klaus H. Sorensen [Wed, 11 Dec 2019 11:18:29 +0000 (11:18 +0000)]
cmd/eeprom.c: prepend 0x to hex numbers in output message format

If the numbers do not happen to contain any digits from [a-f], it's
not clear that they are base 16.

Signed-off-by: Klaus H. Sorensen <khso@prevas.dk>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agotest/cmd_ut.c: fix cmd_ut_category
Philippe Reynes [Thu, 9 Jan 2020 16:34:02 +0000 (17:34 +0100)]
test/cmd_ut.c: fix cmd_ut_category

In the function cmd_ut_category, the prefix is used with
the function strncmp to know if the prefix should be
removed from the test name, even if the prefix is NULL.

To avoid this issue, we consider that a prefix NULL
mean no prefix. So we only try to remove the prefix
from the test_name if the prefix is not NULL, then
we avoid to call the function strncmp with a NULL
prefix.

Reported-by: Coverity CID 281110
Fixes: 4ad4edfe ("cmd_ut: add a parameter prefix to the function cmd_ut_category")
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agogcc-9: silence 'address-of-packed-member' warning
Andy Shevchenko [Fri, 29 Nov 2019 17:47:59 +0000 (19:47 +0200)]
gcc-9: silence 'address-of-packed-member' warning

GCC 9.x starts complaining about potential misalignment of the pointer to
the array (in this case alignment=2) in the packed (alignment=1) structures.

Repeating Linus' Torvalds commit 6f303d60534c in the Linux kernel.

Original commit message:

  We already did this for clang, but now gcc has that warning too.
  Yes, yes, the address may be unaligned.  And that's kind of the point.

This in particular hides the warnings like

drivers/usb/gadget/composite.c:545:23: warning: taking address of packed member of ‘struct usb_string_descriptor’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  545 |    collect_langs(sp, s->wData);

drivers/usb/gadget/composite.c:550:24: warning: taking address of packed member of ‘struct usb_string_descriptor’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  550 |     collect_langs(sp, s->wData);

drivers/usb/gadget/composite.c:555:25: warning: taking address of packed member of ‘struct usb_string_descriptor’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  555 |      collect_langs(sp, s->wData);

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
4 years agoboards/km_arm: enable support for Macronix SPI NOR flash
Holger Brunck [Mon, 25 Nov 2019 16:24:16 +0000 (17:24 +0100)]
boards/km_arm: enable support for Macronix SPI NOR flash

The M25P80 and M25P32 SPI flashes from Numonix/Micron
will be replaced by Marconix MX25L80 and MX25L32 flashes.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm/km: remove board KMCOGE3UN
Holger Brunck [Mon, 25 Nov 2019 16:24:15 +0000 (17:24 +0100)]
arm/km: remove board KMCOGE3UN

This target is out of maintenance and can be removed.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agokm/boards: add MAC address offset as argument to ivm_populate_env
Holger Brunck [Mon, 25 Nov 2019 16:24:14 +0000 (17:24 +0100)]
km/boards: add MAC address offset as argument to ivm_populate_env

For upcoming SECU board we have different MAC address offsets depending
on which functional unit we are running. In this case we need to pass
this value to the ivm_populate_env function instead of using the hard
coded config option there.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Marek Vasut <marex@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agokm/boards: fix typo for MAC address offset config option
Holger Brunck [Mon, 25 Nov 2019 16:24:13 +0000 (17:24 +0100)]
km/boards: fix typo for MAC address offset config option

This patch only fixes a typo.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agopoweroff: add poweroff for mt6323 pmic
Frank Wunderlich [Fri, 22 Nov 2019 14:32:24 +0000 (15:32 +0100)]
poweroff: add poweroff for mt6323 pmic

this adds poweroff to bananapi r2 / mt7623 / mt6323 pmic

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
4 years agortc: add support for DS3232 device
Han Nandor [Tue, 12 Nov 2019 08:39:38 +0000 (08:39 +0000)]
rtc: add support for DS3232 device

DS3232 is an i2c RTC with 236 bytes of battery-backed SRAM.

Add an RTC driver for DS3232 device, which provides time and
date support. Also read and write functions are provided,
which can be used to access the SRAM memory.

Signed-off-by: Nandor Han <nandor.han@vaisala.com>
4 years agospl: fix stack usage check if gd is not initialized
Simon Goldschmidt [Mon, 11 Nov 2019 21:30:46 +0000 (22:30 +0100)]
spl: fix stack usage check if gd is not initialized

Most platforms do not set up gd->start_addr_sp in SPL. Since this is
required for CONFIG_SPL_SYS_REPORT_SACK_F_USAGE to work correctly, set
up gd->start_addr_sp in SPL to the value passed to
board_init_f_init_reserve if it is not set yet.

Fixes: d8c0332031 ("spl: implement stack usage check")
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agom68k: Drop CONFIG_MCFPIT support
Tom Rini [Mon, 11 Nov 2019 14:39:11 +0000 (09:39 -0500)]
m68k: Drop CONFIG_MCFPIT support

All platforms currently use the "MCFTMR" DMA timer rather than the PIT
timer, so drop the MCFPIT code.

Cc: Huan Wang <alison.wang@nxp.com>
Cc: Angelo Dureghello <angelo@sysam.it>
Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com>
Cc: Wolfgang Wegner <w.wegner@astro-kom.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Angelo Dureghello <angelo@sysam.it>
4 years agobootcount: add a DM i2c eeprom backing store for bootcount
Robert Beckett [Mon, 28 Oct 2019 18:44:06 +0000 (18:44 +0000)]
bootcount: add a DM i2c eeprom backing store for bootcount

This driver allows the use of i2c eeprom device or partition as backing
store for boot counter values with DM enabled.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agodrivers: mcfmii: add dm support
Angelo Durgehello [Fri, 15 Nov 2019 22:54:20 +0000 (23:54 +0100)]
drivers: mcfmii: add dm support

Add specific dm code, but maintaining this driver as is, so more in the
shape of a mii library. Can be moved to dm in a further step.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agodrivers: fsl_mcdmafec: conversion to dm
Angelo Durgehello [Fri, 15 Nov 2019 22:54:19 +0000 (23:54 +0100)]
drivers: fsl_mcdmafec: conversion to dm

Full conversion to dm for all boards, legacy code removed.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agodrivers: mcffec: conversion to dm
Angelo Durgehello [Fri, 15 Nov 2019 22:54:18 +0000 (23:54 +0100)]
drivers: mcffec: conversion to dm

Full conversion to dm for all boards, legacy code removed.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agodrivers: net: add mcf fec dm Kconfig support
Angelo Durgehello [Fri, 15 Nov 2019 22:54:17 +0000 (23:54 +0100)]
drivers: net: add mcf fec dm Kconfig support

Add ColdFire fec to Kconfig.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agom68k: add dm fec support
Angelo Durgehello [Fri, 15 Nov 2019 22:54:16 +0000 (23:54 +0100)]
m68k: add dm fec support

Add architecture-related code for dm fec support.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agoconfigs: purge unneeded fec defines
Angelo Durgehello [Fri, 15 Nov 2019 22:54:15 +0000 (23:54 +0100)]
configs: purge unneeded fec defines

Remove unneeded fec-related defines after fec moved as dm.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agoconfigs: add eth dm support for all ColdFire boards
Angelo Durgehello [Fri, 15 Nov 2019 22:54:14 +0000 (23:54 +0100)]
configs: add eth dm support for all ColdFire boards

Add dm eth config options for all involved ColdFire-based boards.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agom68k: add fec fdt overrides to all boards
Angelo Durgehello [Fri, 15 Nov 2019 22:54:13 +0000 (23:54 +0100)]
m68k: add fec fdt overrides to all boards

Add ethernet controller overrides for all involved boards.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agom68k: add fec base node to devicetrees
Angelo Durgehello [Fri, 15 Nov 2019 22:54:12 +0000 (23:54 +0100)]
m68k: add fec base node to devicetrees

Add basic ethernet controller devicetree nodes for all ColdFire
families.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
4 years agoMerge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-mpc83xx
Tom Rini [Thu, 9 Jan 2020 18:42:43 +0000 (13:42 -0500)]
Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-mpc83xx

- A small PR with MC8309 fixes from Rasmus.

4 years agoMerge tag 'dm-pull-8jan20' of git://git.denx.de/u-boot-dm
Tom Rini [Thu, 9 Jan 2020 13:52:21 +0000 (08:52 -0500)]
Merge tag 'dm-pull-8jan20' of git://git.denx.de/u-boot-dm

dm: Increased separation of ofdata_to_platdata() and probe methods

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Thu, 9 Jan 2020 13:51:57 +0000 (08:51 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- DFU updates

4 years agoMerge tag 'efi-2020-04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 8 Jan 2020 23:57:11 +0000 (18:57 -0500)]
Merge tag 'efi-2020-04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc1

This pull request provides:

* support for FIT images for UEFI binaries
* drivers for hardware random number generators
* an implementation of the EFI_RNG_PROTOCOL
* a sub-command for efidebug to display configuration tables

4 years agoMerge tag 'uniphier-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Wed, 8 Jan 2020 20:25:13 +0000 (15:25 -0500)]
Merge tag 'uniphier-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier

UniPhier SoC updates for v2020.04

- add pinmux nodes for I2C ch5, ch6

- enable SPI driver and command