oweals/u-boot.git
4 years agodfu: Drop unused prototype of dfu_trigger_reset()
Andy Shevchenko [Wed, 27 Nov 2019 16:12:13 +0000 (18:12 +0200)]
dfu: Drop unused prototype of dfu_trigger_reset()

After the commit 1cc03c5c53c0 ("dfu: Provide means to find difference between
dfu-util -e and -R") the dangling ptototype appeared. Remove it here.

Fixes: 1cc03c5c53c0 ("dfu: Provide means to find difference between dfu-util -e and -R")
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
4 years agoMerge branch 'next'
Tom Rini [Mon, 6 Jan 2020 22:07:49 +0000 (17:07 -0500)]
Merge branch 'next'

Bring in the following merges:

commit 8fbbec12f7d2c18f8883f3371cfca74a98b5dd87
Merge: 87f69f467a83 63618e71e89b
Author: Tom Rini <trini@konsulko.com>
Date:   Fri Jan 3 09:48:47 2020 -0500

    Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next

    - updates and fixes on ls1028a, lx2, ls1046a, MC-DPSPARSER support

commit 87f69f467a8335b171c71bf217d2625d515acd7c
Merge: c0912f9bbfb2 4466b9970319
Author: Tom Rini <trini@konsulko.com>
Date:   Tue Dec 24 08:18:19 2019 -0500

    Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx into next

    - Enable DM driver on ppc/km boards
    - Enable DM_USB for some of NXP powerpc platforms: P5040, T4240, T208x,
      T104x, P4080, P2041, P2020, P1020, P3041
    - Some updates in mpc85xx-ddr driver, km boards

commit c0912f9bbfb26dd03d189953678691b799d35b6e
Merge: 533c9f5714bd a1d6dc3f8407
Author: Tom Rini <trini@konsulko.com>
Date:   Wed Dec 18 07:20:19 2019 -0500

    Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-x86 into next

    - Various x86 common codes updated for TPL/SPL
    - I2C designware driver updated for PCI
    - ICH SPI driver updated to support Apollo Lake
    - Add Intel FSP2 base support
    - Intel Apollo Lake platform specific drivers support
    - Add a new board Google Chromebook Coral

commit 533c9f5714bdba79dc6f2629284d4c1a08a611d1
Merge: 553cb0688782 033e18b47bd0
Author: Tom Rini <trini@konsulko.com>
Date:   Tue Dec 17 07:53:08 2019 -0500

    Merge tag '20191217-for-next' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c into next

    i2c: for next
    - misc: i2c_eeprom:
      Add partition support and add ability to query size
      of eeprom device and partitions
    - i2c common:
      add support for offset overflow in to address and add
      sandbox tests for it.

commit 553cb06887825314e74a9bdac337467c77d1db88
Merge: f39abbbc531e b4f98b3b16ec
Author: Tom Rini <trini@konsulko.com>
Date:   Thu Dec 12 08:18:59 2019 -0500

    Merge tag 'dm-next-13dec19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm into next

    buildman improvements including toolchain environment feature
    sandbox unicode support in serial

4 years agoPrepare v2020.01 v2020.01
Tom Rini [Mon, 6 Jan 2020 20:56:31 +0000 (15:56 -0500)]
Prepare v2020.01

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoRevert "mmc: davinci: drop struct davinci_mmc_plat"
Tom Rini [Fri, 3 Jan 2020 17:00:04 +0000 (12:00 -0500)]
Revert "mmc: davinci: drop struct davinci_mmc_plat"

Adam Ford reports that this change breaks booting on da850-evm and
Bartosz Golaszewski agrees that with the impending release we should
revert the change for now.  With that noted:

This reverts commit 21a4d80a710c79053ac1deaa65ff9b69e6c031d4.

Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next
Tom Rini [Fri, 3 Jan 2020 14:48:47 +0000 (09:48 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next

- updates and fixes on ls1028a, lx2, ls1046a, MC-DPSPARSER support

4 years agoMerge branch '2020-01-03-master-imports'
Tom Rini [Fri, 3 Jan 2020 14:47:22 +0000 (09:47 -0500)]
Merge branch '2020-01-03-master-imports'

- Fixes for host tools with musl C library
- Two fixes for TI K3 platforms

4 years agoarm: mach-k3: Enable WA for R5F deadlock
Lokesh Vutla [Tue, 31 Dec 2019 10:19:55 +0000 (15:49 +0530)]
arm: mach-k3: Enable WA for R5F deadlock

On K3 devices there are 2 conditions where R5F can deadlock:
1.When software is performing series of store operations to
  cacheable write back/write allocate memory region and later
  on software execute barrier operation (DSB or DMB). R5F may
  hang at the barrier instruction.
2.When software is performing a mix of load and store operations
  within a tight loop and store operations are all writing to
  cacheable write back/write allocates memory regions, R5F may
  hang at one of the load instruction.

To avoid the above two conditions disable linefill optimization
inside Cortex R5F which will make R5F to only issue up to 2 cache
line fills at any point of time.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarm: dts: k3-j721e: ddr: Update to 0.2 version of DDR config tool
Lokesh Vutla [Tue, 31 Dec 2019 10:18:48 +0000 (15:48 +0530)]
arm: dts: k3-j721e: ddr: Update to 0.2 version of DDR config tool

Update the ddr settings to use the DDR reg config tool rev 0.2.0.
This reduces the aging count(in DDRSS_CTL_274_DATA reg) to 15 in-order
to avoid DSS underflow errors.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Kevin Scholz <k-scholz@ti.com>
4 years agoinclude/u-boot/crc.h: pull 'uint' definition on musl targets
Sergei Trofimovich [Mon, 30 Dec 2019 15:53:42 +0000 (15:53 +0000)]
include/u-boot/crc.h: pull 'uint' definition on musl targets

The build failure was originally reported on arm64-musl
target at https://bugs.gentoo.org/703132. Here is the amd64-musl
variant:

```
$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig -j$(nproc)
$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all            -j$(nproc)
...
include/u-boot/crc.h:37:44: error: unknown type name 'uint'; did you mean 'int'?
   37 | void crc16_ccitt_wd_buf(const uint8_t *in, uint len,
      |                                            ^~~~
      |                                            int
```

Note: 'uint' is not defined there.

On glibc 'uint' comes from <sys/types.h> and happens to work on most .c files.

The change imports 'uint' declaration from '<compiler.h>'.

Bug: https://bugs.gentoo.org/703132
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
4 years agoinclude: fix 'ulong' definition on musl targets
Sergei Trofimovich [Mon, 30 Dec 2019 15:53:41 +0000 (15:53 +0000)]
include: fix 'ulong' definition on musl targets

The build failure was originally reported on arm64-musl
target at https://bugs.gentoo.org/703132. Here is the amd64-musl
variant:

```
$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig -j$(nproc)
$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all            -j$(nproc)
...
In file included from tools/env/../../env/flags.c:7,
                 from tools/env/env_flags.c:1:
include/env.h:159:1: error: unknown type name 'ulong'; did you mean 'long'?
  159 | ulong env_get_ulong(const char *name, int base, ulong default_val);
      | ^~~~~
      | long
```

Note: 'ulong' is not defined there.

On glibc 'ulong' comes from <sys/types.h>:

```c
/* Old compatibility names for C types.  */
typedef unsigned long int ulong;
```

On musl it comes from <sys/types.h> as well but from under different guards:

```c
typedef unsigned long u_long, ulong;
```

The change inlines 'ulong' define similar to 'uint' define.

Bug: https://bugs.gentoo.org/703132
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
4 years agoMerge tag 'fixes-v2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-video
Tom Rini [Thu, 2 Jan 2020 23:12:05 +0000 (18:12 -0500)]
Merge tag 'fixes-v2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix missing graphics output on some x86 boards
- avoid using #ifdef in video code
- add .gitignore for video font *.S files

4 years agovideo: add wrappers for ttf type files to .gitignore
Dario Binacchi [Tue, 31 Dec 2019 17:09:14 +0000 (18:09 +0100)]
video: add wrappers for ttf type files to .gitignore

The scripts/Makefile.lib generates an assembler file (*.S) to wrap the
font data for each file of type ttf defined in Kconfig.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agoMerge tag 'u-boot-rockchip-20191231' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Thu, 2 Jan 2020 15:28:26 +0000 (10:28 -0500)]
Merge tag 'u-boot-rockchip-20191231' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Fix latest mainline kernel for rk3308
- Update rk3288-evb config to suport OP-TEE
- Fix for firefly-px30 DEBUG_UART channel and make it standalone
- Script make_fit_atf add python3 support
- Fix rk3328 timer with correct COUNTER_FREQUENCY
- Fix rk3328 ATF support with enable spl-fifo-mode

4 years agoMerge branch '2020-01-02-master-imports'
Tom Rini [Thu, 2 Jan 2020 15:27:47 +0000 (10:27 -0500)]
Merge branch '2020-01-02-master-imports'

- Assorted test.py fixes
- Other minor changes

4 years agotest: Fix the boardspec for the SPL handoff test
Simon Glass [Fri, 27 Dec 2019 14:46:30 +0000 (07:46 -0700)]
test: Fix the boardspec for the SPL handoff test

This test currently does not run because it specifies the sandbox board
instead of sandbox_spl. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agomailmap: Update mail address for Igor Opaniuk
Igor Opaniuk [Tue, 17 Dec 2019 12:48:54 +0000 (14:48 +0200)]
mailmap: Update mail address for Igor Opaniuk

My address at Linaro doesn't exist anymore, so people
keep getting mail delivery error responses. Map this address
to the actual one.

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agotest_env: don't strip() printenv results
Stephen Warren [Wed, 18 Dec 2019 18:37:21 +0000 (11:37 -0700)]
test_env: don't strip() printenv results

get_env() was originally written to strip() the output of printenv to
isolate the test from any whitespace changes in printenv's output.
However, this throws away any whitespace in the variable value, which can
cause issues when test code expects to see that whitespace. In fact,
printenv never adds any whitespace at all, so there's no need to strip.

The strip causes a practical problem for test_env_echo_exists() if
state_test_env.get_existent_var() happens to choose a U-Boot variable that
contains trailing whitespace. This is true for variable boot_targets.

With Python 2, get_existent_var() never returned boot_targets so this
issue never caused a practical problem.

With Python 3, get_existent_var does sometimes return boot_targets, no
doubt due to Python 3's different dict hash key order implementation,
about 0.5-2% of the time, so this test appears intermittent. With the
strip removed, this intermittency is solved, since the test passes for all
possible U-Boot variables.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
4 years agoarch/arm/Kconfig: typo/grammar/punctuation fixes
Robert P. J. Day [Wed, 25 Dec 2019 11:34:07 +0000 (06:34 -0500)]
arch/arm/Kconfig: typo/grammar/punctuation fixes

Various (mostly minor) spelling, grammar and punctuation tweaks for
arch/arm/Kconfig.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
4 years ago.gitignore: ignore files generated by asn1 compiler
Dario Binacchi [Sun, 29 Dec 2019 12:47:32 +0000 (13:47 +0100)]
.gitignore: ignore files generated by asn1 compiler

As described in doc/README.asn1 document the tools/asn1_compiler is used
to "generate bytecode as a C file (*.asn1.[ch]) from *.asn1 file".

Signed-off-by: Dario Binacchi <dariobin@libero.it>
4 years agotools: .gitignore: add asn1_compiler
Dario Binacchi [Sun, 29 Dec 2019 12:44:18 +0000 (13:44 +0100)]
tools: .gitignore: add asn1_compiler

Add the tool to the ignore list to prevent being marked as unversioned.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agovideo: Avoid using #ifdef in video-uclass.c
Simon Glass [Sat, 21 Dec 2019 01:10:37 +0000 (18:10 -0700)]
video: Avoid using #ifdef in video-uclass.c

This code does not really need to use #ifdef. We can use if() instead and
gain build coverage without impacting code size.

Change the #ifdefs to use IS_ENABLED(), etc., instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agovideo: Avoid using #ifdef in vidconsole-uclass.c
Simon Glass [Sat, 21 Dec 2019 01:10:36 +0000 (18:10 -0700)]
video: Avoid using #ifdef in vidconsole-uclass.c

This code does not really need to use #ifdef. We can use if() instead and
gain build coverage without impacting code size.

Change the #ifdefs to use CONFIG_IS_ENABLED() instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agovideo: Avoid using #ifdef in console_rotate.c
Simon Glass [Sat, 21 Dec 2019 01:10:35 +0000 (18:10 -0700)]
video: Avoid using #ifdef in console_rotate.c

This code does not really need to use #ifdef. We can use if() instead and
gain build coverage without impacting code size.

Change the #ifdefs to use IS_ENABLED() instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agovideo: Avoid using #ifdef in video blitting code
Simon Glass [Sat, 21 Dec 2019 01:10:34 +0000 (18:10 -0700)]
video: Avoid using #ifdef in video blitting code

This code does not really need to use #ifdef. We can use if() instead and
gain build coverage without impacting code size.

Change the #ifdefs to use IS_ENABLED() instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agovideo: x86: Enable 32-bit graphics by default
Simon Glass [Sat, 21 Dec 2019 01:10:33 +0000 (18:10 -0700)]
video: x86: Enable 32-bit graphics by default

Most x86 boards that use video make use of 32bpp graphics. Enable this by
default. This fixes missing graphics output on some x86 boards.

Also remove the unnecessary 'default n' while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agopci: layerscape: Manage PCIe EP compatible string via Kconfig
Pankaj Bansal [Sat, 30 Nov 2019 13:14:10 +0000 (13:14 +0000)]
pci: layerscape: Manage PCIe EP compatible string via Kconfig

The ep node device tree name is governed by these bindings:
https://github.com/torvalds/linux/blob/master/Documentation/
devicetree/bindings/pci/layerscape-pci.txt#L24

As per above the ep compatible node contains platform name.
Therefore, define the ep node compatible as CONFIG to find the
pcie ep node in device tree during device tree fixup.

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopci: layerscape: move PCIE related CONFIG to PCI Kconfig
Pankaj Bansal [Sat, 30 Nov 2019 13:14:00 +0000 (13:14 +0000)]
pci: layerscape: move PCIE related CONFIG to PCI Kconfig

move the PCIE related config from arch Kconfig to PCI Kconfig.
As the PCI_LAYERSCAPE driver is being used in platform other than
fsl-layerscape platforms like ls102xa.

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agorockchip: evb-rk3328: Enable support ATF in SPL
Kever Yang [Tue, 31 Dec 2019 08:02:59 +0000 (16:02 +0800)]
rockchip: evb-rk3328: Enable support ATF in SPL

Enable the ATF in SPL and adjust the SPL STACK/HEAD at the same time to
support ATF entry at 0x40000.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3328: enable spl-fifo-mode for emmc and sdmmc
Kever Yang [Tue, 31 Dec 2019 07:57:55 +0000 (15:57 +0800)]
rockchip: rk3328: enable spl-fifo-mode for emmc and sdmmc

Since mmc to sram can't do dma, add patch to prevent aborts transfering
TF-A parts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3328: add COUNTER_FREQUENCY definition
Kever Yang [Tue, 31 Dec 2019 07:17:56 +0000 (15:17 +0800)]
rockchip: rk3328: add COUNTER_FREQUENCY definition

The arch timer needs COUNTER_FREQUENCY to get correct counter, add it to
make the timer works correct.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoMerge tag 'u-boot-imx-20191228' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Sat, 28 Dec 2019 13:07:16 +0000 (08:07 -0500)]
Merge tag 'u-boot-imx-20191228' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2020.01
-----------------
- Fixes for Nitrogen6x
- Fix corruption for mx51evk
- colibri i.MX6: fix broken ESDHC conversion
- mx6sxsabresd: fix broken mmcdev
- imx6q_logic: cleanup boot sequence
- update ATF for imx8mq_evk
- pfuze: fix pmic_get()

Travis CI: https://travis-ci.org/sbabic/u-boot-imx/builds/630007464

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Fri, 27 Dec 2019 21:46:38 +0000 (16:46 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi

- Orange Pi Zero Plus 2 support
- sunxi psci, prcm fixes

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-spi
Tom Rini [Fri, 27 Dec 2019 21:46:15 +0000 (16:46 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi

- rk spi transfer limit fix
- Gigadevice, gd25q128 support
- spi-nor-core warnings

4 years agoomap3_beagle: Change NAND ECC scheme back to OMAP_ECC_HAM1_CODE_HW
Patrik Dahlström [Sat, 21 Dec 2019 16:18:22 +0000 (17:18 +0100)]
omap3_beagle: Change NAND ECC scheme back to OMAP_ECC_HAM1_CODE_HW

The omap3_beagle NAND ECC scheme was changed in 4b37928d357 for unknown
reasons, leading to uncorrectible ecc errors. This commit changes it
back to what it was before.

Signed-off-by: Patrik Dahlström <risca@dalakolonin.se>
4 years agortc: rx8010js: add compatible string
Robert Beckett [Tue, 29 Oct 2019 19:07:03 +0000 (19:07 +0000)]
rtc: rx8010js: add compatible string

Add compatible string used by Linux.
Allows for simpler syncing of device trees.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agortc: s35392a: add compatible strings
Robert Beckett [Mon, 28 Oct 2019 19:10:10 +0000 (19:10 +0000)]
rtc: s35392a: add compatible strings

Add compatible strings used by Linux.
Allows for simpler syncing of device trees.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agortc: rx8010sj: fix DM initialization
Robert Beckett [Mon, 28 Oct 2019 18:49:15 +0000 (18:49 +0000)]
rtc: rx8010sj: fix DM initialization

pass the udevice by reference instead of double ref

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoARM: imx6q_logic: Cleanup boot sequence check
Adam Ford [Sun, 3 Nov 2019 13:58:40 +0000 (07:58 -0600)]
ARM: imx6q_logic: Cleanup boot sequence check

The board_boot_order() function currenly assumes that the boot source
is MMC/eMMC, but this isn't true for the NAND devices.

This patch cleans up board_boot_order() to check for NAND, SD, ESD,
MMC or EMMC.  Anything beyond these are not supported, so it will
default back to the serial downloader if any of those devices are not
available.

Fixes: 9fb50c68daa6 ("ARM: imx6q_logic: Fix MMC2 booting")

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: i.MX6: TARGET_NITROGEN6X: add 'select MX6QDL'
Troy Kisky [Mon, 4 Nov 2019 02:20:05 +0000 (18:20 -0800)]
ARM: i.MX6: TARGET_NITROGEN6X: add 'select MX6QDL'

This fixes commit <91435cd40d30> "ARM: i.MX6: exclude the ARM errata
 from i.MX6 UP system"

for nitrogen6x. The above commit removed the errata for the board
since MX6Q/MXDL/MX6S is selected via CONFIG_SYS_EXTRA_OPTIONS

This restores the errata configs.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agonitrogen6x: prepare for CONFIG_MX6QDL
Troy Kisky [Mon, 4 Nov 2019 02:20:04 +0000 (18:20 -0800)]
nitrogen6x: prepare for CONFIG_MX6QDL

The next patch adds CONFIG_MX6QDL so that
errata will be enabled again.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
4 years agospi: rk: Limit transfers to (64K - 1) bytes
Jagan Teki [Sat, 21 Dec 2019 07:54:30 +0000 (13:24 +0530)]
spi: rk: Limit transfers to (64K - 1) bytes

The Rockchip SPI controller's length register only supports 16-bits,
yielding a maximum length of 64KiB (the CTRLR1 register holds "length -
1"). Trying to transfer more than that (e.g., with a large SPI flash
read) will cause the driver to hang.

Now, it seems that while theoretically we should be able to program
CTRLR1 with 0xffff, and get a 64KiB transfer, but that also seems to
cause the core to choke, so stick with a maximum of 64K - 1 bytes --
i.e., 0xffff.

Note, that the size is further divided into 'minus 1' while writing
into CTRLR1.

This change fixed two different read issues,

1. sf read failure when with > 0x10000

2. Boot from SPI flash failed during spi_flash_read call in
   common/spl/spl_spi.c

Observed and Tested in
- Rockpro64 with Gigadevice flash
- ROC-RK3399-PC with Winbond flash

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agomtd: spi-nor-core: Fix static checker warnings
Vignesh Raghavendra [Sat, 9 Nov 2019 06:34:13 +0000 (12:04 +0530)]
mtd: spi-nor-core: Fix static checker warnings

Static checker warns 'ret' variable may be used uninitialized in
spi_nor_erase() and spi_nor_write() in case of zero length requests.
Fix these warnings by checking for zero length requests and returning
early.

Reported-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agotools/imximage: share DCD information via Kconfig
Jorge Ramirez-Ortiz [Wed, 11 Dec 2019 09:42:36 +0000 (10:42 +0100)]
tools/imximage: share DCD information via Kconfig

IMX based platforms can have the DCD table located on different
addresses due to differences in their memory maps (ie iMX7ULP).

This information is required by the user to sign the images for secure
boot so continue making it accessible via mkimage.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
4 years agoimx8mq_evk: Update the required ATF branch
Fabio Estevam [Wed, 11 Dec 2019 13:49:30 +0000 (10:49 -0300)]
imx8mq_evk: Update the required ATF branch

Following the README instructions leads to a non-booting
U-Boot:

U-Boot SPL 2020.01-rc3-00070-g9a0cbae22a (Nov 25 2019 - 13:08:24 -0300)
PMIC:  PFUZE100 ID=0x10
DDRINFO: start DRAM init
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC2

(It hangs here)

Use the "imx_4.19.35_1.0.0" ATF branch instead, which
fixes such problem and allow the boot to complete again.

Suggested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8m_evk: Remove unneeded earlycon string
Fabio Estevam [Wed, 11 Dec 2019 17:31:03 +0000 (14:31 -0300)]
imx8m_evk: Remove unneeded earlycon string

Passing earlycon string in the command line may be
useful during bring up, but not after such phase.

Remove the earlycon string to align with the other i.MX SoCs
command lines.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8m: ddr_init: Move ddr_init() messages to debug level
Fabio Estevam [Wed, 11 Dec 2019 20:37:09 +0000 (17:37 -0300)]
imx8m: ddr_init: Move ddr_init() messages to debug level

Currently inside ddr_init() there is a mix of printf() and debug()
level messages.

Since this type of information is useful for debug purposes,
convert all of them to debug level for consistency.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agomx51evk: Fix U-Boot corruption after saving the environment
Fabio Estevam [Thu, 19 Dec 2019 16:52:39 +0000 (13:52 -0300)]
mx51evk: Fix U-Boot corruption after saving the environment

U-Boot binary has grown in such a way that it goes beyond the reserved
area for the environment variables.

Running "saveenv" followed by a "reset" causes U-Boot to hang because
of this overlap.

Fix this problem by increasing the CONFIG_ENV_OFFSET size.

Also, in order to prevent this same problem to happen in the future,
use CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.

CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare
CONFIG_ENV_OFFSET with its direct value instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6sxsabresd: Adjust the mmcdev after DM conversion
Fabio Estevam [Thu, 19 Dec 2019 17:59:42 +0000 (14:59 -0300)]
mx6sxsabresd: Adjust the mmcdev after DM conversion

After the DM conversion the boot SD card is now device 3.

Adjust it so that we can boot the kernel again.

While at it avoid a hardcoded mmc dev inside the finduuid script.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agopfuze: Fix the pmic_get() parameter in the DM case
Fabio Estevam [Thu, 19 Dec 2019 17:59:41 +0000 (14:59 -0300)]
pfuze: Fix the pmic_get() parameter in the DM case

Currently the following hang is observed when booting a imx6sx-sdb
board:

U-Boot 2020.01-rc5-00004-g643366bcd5 (Dec 19 2019 - 14:56:23 -0300)

CPU:   Freescale i.MX6SX rev1.0 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 32C
Reset cause: POR
Model: Freescale i.MX6 SoloX SDB RevB Board
Board: MX6SX SABRE SDB revA
DRAM:  1 GiB
initcall sequence bffd8514 failed at call 87804cc0 (err=-19)
### ERROR ### Please RESET the board ###

When pmic_get() is used with DM the first parameter must be
the complete node name plus the unit address.

Fix the pmic_get() parameter to fix the boot regression.

Tested on a imx6sx-sdb and imx6q-sabresd boards.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx6: fix broken fsl_esdhc_imx conversion
Igor Opaniuk [Fri, 6 Dec 2019 16:24:16 +0000 (18:24 +0200)]
colibri_imx6: fix broken fsl_esdhc_imx conversion

Not all CONFIG_FSL_ESDHC defines were properly replaced with
CONFIG_FSL_ESDHC_IMX, which broke U-boot proper booting on
Colibri iMX6 SoMs.

U-boot is stuck after this message:
Commercial temperature grade DDR3 timings, 64bit bus width.
Trying to boot from MMC1

Fixes: e37ac717d7("Convert to use fsl_esdhc_imx for i.MX platforms")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agorockchip: mkimage: fix wrong range of rc4 encoding for boot image
Jeffy Chen [Thu, 5 Dec 2019 10:58:29 +0000 (18:58 +0800)]
rockchip: mkimage: fix wrong range of rc4 encoding for boot image

The rc4 encoding should cover spl header as well, and the file_size
contains spl header too.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agodoc: rockchip: document packing second level loader with mkimage
Jeffy Chen [Thu, 5 Dec 2019 10:58:28 +0000 (18:58 +0800)]
doc: rockchip: document packing second level loader with mkimage

Add documentation about packing optional second level boot-loader with
mkimage tool.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: mkimage: support packing optional second level boot-loader
Jeffy Chen [Fri, 27 Dec 2019 03:24:41 +0000 (11:24 +0800)]
rockchip: mkimage: support packing optional second level boot-loader

Support packing optional second level boot-loader:

$ ./tools/mkimage -n rk3399 -T rksd -d \
  rk3399_ddr_800MHz_v1.24.bin:rk3399_miniloader_v1.19.bin out -v
Adding Image rk3399_ddr_800MHz_v1.24.bin
Size 116492(pad to 116736)
Adding Image rk3399_miniloader_v1.19.bin
Size 88060(pad to 88064)
Image Type:   Rockchip RK33 (SD/MMC) boot image
Init Data Size: 116736 bytes
Boot Data Size: 88064 bytes

Mainly parse init file and boot file from datafile option, copy them to
the image with 2KB alignment.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agodoc: rockchip: Fix reference the wrong defconfig name of ROC-CC-RK3308
Andy Yan [Thu, 26 Dec 2019 07:20:34 +0000 (15:20 +0800)]
doc: rockchip: Fix reference the wrong defconfig name of ROC-CC-RK3308

The defconfig file for ROC-CC-RK3308 is roc-cc-rk3308_defconfig.

Fixes: 7f08bfb74f04 ("doc: rockchip: Add documentation for rk3308 based
boards")

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3308: allow loading larger kernel Image
Andy Yan [Thu, 26 Dec 2019 07:20:04 +0000 (15:20 +0800)]
rockchip: rk3308: allow loading larger kernel Image

When compile the curren mainline linux kernel(Linux 5.5-rc3)
with defconfig, the final Image is 29M, it's much
larger than Linux 5.4.

On the current u-boot side on rk3308, the gap between
kernel and fdt is 25M, the fdt will overwrite kernel
Image, so move ftd to a higher memory to give 34M
gab for them.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: add description for TPL_ROCKCHIP_COMMON_BOARD
Thomas Hebb [Sat, 21 Dec 2019 02:05:22 +0000 (18:05 -0800)]
rockchip: add description for TPL_ROCKCHIP_COMMON_BOARD

SPL_ROCKCHIP_COMMON_BOARD, an almost identical option, has a title but
this one doesn't for some reason. Add a description to make the menu
easier to read.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: px30-firefly add standalone dts
Kever Yang [Fri, 13 Dec 2019 09:41:17 +0000 (17:41 +0800)]
rockchip: px30-firefly add standalone dts

Firefly Core-PX30-JD4 use UART2M1 while PX30 evb using UART2M0, the U-Boot
proper will use the dts setting to do the IOMUX init, and a separate dts
is needed for px30-firefly.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: firefly-px30: Fix the MACRO for CONFIG_DEBUG_UART2_CHANNEL
Kever Yang [Fri, 13 Dec 2019 02:48:51 +0000 (10:48 +0800)]
rockchip: firefly-px30: Fix the MACRO for CONFIG_DEBUG_UART2_CHANNEL

The Macro has update without update the defconfig, update the defconfig
to make Mcaro correct.

Fixes: ec4fafdf1f ("rockchip: px30: Rename CONFIG_DEBUG_UART2_CHANNEL to...")
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: make_fit_atf: explicitly use python3
Jack Mitchell [Tue, 10 Dec 2019 13:07:21 +0000 (13:07 +0000)]
rockchip: make_fit_atf: explicitly use python3

On a distribution with no python2 installed and no
python->python3 symlink the script will fail to execute.
Specify python3 explicitly as it's already a requirement
to build u-boot.

Signed-off-by: Jack Mitchell <ml@embed.me.uk>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoMerge branch '2019-12-26-ti-imports'
Tom Rini [Thu, 26 Dec 2019 14:07:08 +0000 (09:07 -0500)]
Merge branch '2019-12-26-ti-imports'

- Update maintainer on omapl138_lcdk
- Match TRM sequence & settings in the TI pipe3 PHY

4 years agoboard: davinci: Update OMAPL138_LCDK maintainer
Lokesh Vutla [Fri, 20 Dec 2019 06:05:20 +0000 (11:35 +0530)]
board: davinci: Update OMAPL138_LCDK maintainer

As per the email discussion[0], add myself as a maintainer to
OMAPL138_LCDK and drop Peter's entry.

[0] http://u-boot.10912.n7.nabble.com/OMAP-L138-LCDK-giving-up-maintainership-td394211.html

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agophy: ti-pipe3: Fix SATA & USB PHY power up sequence
Roger Quadros [Wed, 6 Nov 2019 14:21:18 +0000 (16:21 +0200)]
phy: ti-pipe3: Fix SATA & USB PHY power up sequence

As per "Table 26-7. SATA PHY Subsystem Low-Level Programming Sequence"
in TRM [1] we need to turn on SATA_PHY_TX before SATA_PHY_RX.

[1] DRA75x, DRA74x TRM - http://www.ti.com/lit/ug/sprui30f/sprui30f.pdf

Signed-off-by: Roger Quadros <rogerq@ti.com>
4 years agophy: ti-pipe3: improve DPLL stability for SATA & USB
Roger Quadros [Wed, 6 Nov 2019 14:21:17 +0000 (16:21 +0200)]
phy: ti-pipe3: improve DPLL stability for SATA & USB

For increased DPLL stability use the settings recommended in
the TRM [1] for PHY_RX registers for SATA and USB.

For SATA we need to use spread spectrum settings even
though we don't have spread spectrum enabled. The
suggested non-spread spectrum settings don't work.

[1] DRA75x, DRA74x TRM - http://www.ti.com/lit/ug/sprui30f/sprui30f.pdf

Signed-off-by: Roger Quadros <rogerq@ti.com>
4 years agophy: ti-pipe3: Introduce mode property in driver data
Roger Quadros [Wed, 6 Nov 2019 14:21:16 +0000 (16:21 +0200)]
phy: ti-pipe3: Introduce mode property in driver data

Introduce a mode property in the driver data so that
we don't have to keep using "of_device_is_compatible()"
throughtout the driver.

No functional change.

Signed-off-by: Roger Quadros <rogerq@ti.com>
4 years agophy: ti-pipe3: Use TRM recommended settings for SATA DPLL
Roger Quadros [Wed, 6 Nov 2019 14:21:15 +0000 (16:21 +0200)]
phy: ti-pipe3: Use TRM recommended settings for SATA DPLL

The AM572x Technical Reference Manual, SPRUHZ6H,
Revised November 2016 [1], shows recommended settings for the
SATA DPLL in Table 26-8. DPLL CLKDCOLDO Recommended Settings.

Use those settings in the driver. The TRM does not show
a value for 20MHz SYS_CLK so we use something close to the
26MHz setting.

[1] - http://www.ti.com/lit/ug/spruhz6h/spruhz6h.pdf

Signed-off-by: Roger Quadros <rogerq@ti.com>
4 years agorockchip: rk3288-evb: update config to support OPTEE
Kever Yang [Thu, 5 Dec 2019 10:11:55 +0000 (18:11 +0800)]
rockchip: rk3288-evb: update config to support OPTEE

Upstream kernel and rockchip kernel has default enable PSCI which needs
OPTEE in trust word, enable OPTEE support for evb by default and SPL_FIT
option to pack OPTEE with U-Boot proper.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3288-evb: update CONFIG_NR_DRAM_BANKS to 2
Kever Yang [Thu, 5 Dec 2019 10:11:54 +0000 (18:11 +0800)]
rockchip: rk3288-evb: update CONFIG_NR_DRAM_BANKS to 2

The OPTEE will use the ram start at 0x8400000 which make the DRAM be two
banks.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3288-evb: update SPL_STACK/MALLOC_LEN config with rk3399
Kever Yang [Thu, 5 Dec 2019 10:11:53 +0000 (18:11 +0800)]
rockchip: rk3288-evb: update SPL_STACK/MALLOC_LEN config with rk3399

Update the SPL_STACK_R_MALLOC_SIMPLE_LEN which also including space for
STACK and the size may not enough when loding FIT image in SPL.

If the size is not enough, you can see log like this when loding FIT:

U-Boot TPL 2020.01-rc3-00082-g4b19b89ca4-dirty (Dec 05 2019 - 11:52:53)
Trying to boot from BOOTROM
Returning to boot ROM...
U-Boot SPL 2020.01-rc3-00082-g4b19b89ca4-dirty (Dec 05 2019 - 11:52:53 +0800)
Trying to boot from MMC2

And if enable the DEBUG for everyting in SPL, the log will hang at dwmmc
sending CMD16 for 'uboot' loadables binary because this step need a
large stack cost(about 0x2d00).

External data: dst=8400000, offset=72638, size=b3580
Image OS is Trusted Execution Environment
board_fit_config_name_match: rk3288-evb
Selecting config 'rk3288-evb'loadables: 'uboot'
blk_find_device: if_type=6, devnum=1: dwmmc@ff0c0000.blk, 6, 0
blk_find_device: if_type=6, devnum=1: dwmmc@ff0f0000.blk, 6, 1
Sending CMD16

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: fit_spl_optee: get text and optee base from build
Kever Yang [Thu, 5 Dec 2019 10:11:52 +0000 (18:11 +0800)]
rockchip: fit_spl_optee: get text and optee base from build

Instead of hardcode the base address, we can get them from the build
output, eg. get the SYS_TEXT_BASE from .config and get optee base from
DRAM_BASE.
We can use this script for SoCs with DRAM base not from 0x60000000(rk3229
and many other 32bit Rockchip SoCs), eg. rk3288 DRAM base is 0.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoarmv8: lx2160a: Add FSL_PEX_STREAM_ID_END for LX2160A
Wasim Khan [Fri, 15 Nov 2019 09:23:39 +0000 (09:23 +0000)]
armv8: lx2160a: Add FSL_PEX_STREAM_ID_END for LX2160A

Add FSL_PEX_STREAM_ID_END and remove FSL_PEX_STREAM_ID_NUM
for lx2160a.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopci: layerscape_gen4: Suffix API names with _ls_gen4
Wasim Khan [Fri, 15 Nov 2019 09:23:37 +0000 (09:23 +0000)]
pci: layerscape_gen4: Suffix API names with _ls_gen4

Update API names for layerscape gen4 fixup.
Suffix layerscape_gen4 fixup API names with _ls_gen4.
This is required to organize device tree fixup in common, layerscape
and layerscape_gen4 specific code.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopci: layerscape: Suffix API names with _ls
Wasim Khan [Fri, 15 Nov 2019 09:23:35 +0000 (09:23 +0000)]
pci: layerscape: Suffix API names with _ls

Suffix layerscape fixup API names with _ls.
This is required to organize device tree fixup in common,
layerscape and layerscape_gen4 specific code.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopci: layerscape: Add stream_id_cur field to ls_pcie structure
Wasim Khan [Fri, 15 Nov 2019 09:23:34 +0000 (09:23 +0000)]
pci: layerscape: Add stream_id_cur field to ls_pcie structure

Add stream_id_cur field to ls_pcie structure and initialize
it with 0 for all pcie controllers. This field will be used
for streamId calculation.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers/pci : enable pcie_layerscape code for lx2160a rev2
Wasim Khan [Fri, 15 Nov 2019 09:23:32 +0000 (09:23 +0000)]
drivers/pci : enable pcie_layerscape code for lx2160a rev2

lx2160a rev1 uses pcie_layerscape_gen4 driver and lx2160a rev2 uses
pcie_layerscape driver.
Enable pcie_layerscape code for CONFIG_PCIE_LAYERSCAPE_GEN4.
Based on SoC and revision pcie controller probe will be invoked.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028ardb: enable ugreen usb network card AX88179 and AX8817X drvier
Yinbo Zhu [Thu, 28 Nov 2019 03:40:38 +0000 (11:40 +0800)]
configs: ls1028ardb: enable ugreen usb network card AX88179 and AX8817X drvier

enable ls1028ardb ugreen usb network card AX88179 and AX8817X driver

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028ardb: enable usb net r8152_eth
Yinbo Zhu [Mon, 25 Nov 2019 01:54:22 +0000 (09:54 +0800)]
configs: ls1028ardb: enable usb net r8152_eth

Enable ls1028ardb usb net r8152_eth

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028ardb: enable DisplayPort Power support
Wen He [Mon, 18 Nov 2019 05:26:09 +0000 (13:26 +0800)]
armv8: ls1028ardb: enable DisplayPort Power support

Enable DP_PWR signal to power the DP to HDMI converter cable.

Signed-off-by: Wen He <wen.he_1@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: lx2160a: Enable FSPI_AHB_EN_4B config
Kuldeep Singh [Thu, 21 Nov 2019 11:45:19 +0000 (17:15 +0530)]
configs: lx2160a: Enable FSPI_AHB_EN_4B config

Enable 4-byte Fast Read command for Flexspi AHB mode

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028a: Enable FSPI_AHB_EN_4B config
Kuldeep Singh [Thu, 21 Nov 2019 11:45:18 +0000 (17:15 +0530)]
configs: ls1028a: Enable FSPI_AHB_EN_4B config

Enable 4-byte Fast Read command for Flexspi AHB mode

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-lsch3: soc: Enable AHB read support for Flexspi controller
Kuldeep Singh [Thu, 21 Nov 2019 11:45:17 +0000 (17:15 +0530)]
fsl-lsch3: soc: Enable AHB read support for Flexspi controller

Enable AHB support for Flexspi controller interface meaning
memory can be accessed via md command using absolute addresses

Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Rajat Srivastava <rajat.srivastava@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-lsch3: Add FlexSPI address space in immap_lsch3
Kuldeep Singh [Thu, 21 Nov 2019 11:45:16 +0000 (17:15 +0530)]
fsl-lsch3: Add FlexSPI address space in immap_lsch3

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Signed-off-by: Rajat Srivastava <rajat.srivastava@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
4 years agoarmv8: ls1046afrwy: Fix get_board_version implementation
Pramod Kumar [Thu, 19 Dec 2019 10:28:57 +0000 (10:28 +0000)]
armv8: ls1046afrwy: Fix get_board_version implementation

Current implementation to get board version through GPIO is
broken due to endianness issue hence it is not working for rev B
board.
Fix it to make it work for Rev A as well as Rev B boards

Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: Enable SPL_FSL_PBL for some LayerScape platforms
Alison Wang [Wed, 4 Dec 2019 06:21:55 +0000 (06:21 +0000)]
configs: Enable SPL_FSL_PBL for some LayerScape platforms

In commit <db4080d56dec>, SPL_FSL_PBL is removed from the configs of
some LayerScape platforms. Actually, SPL_FSL_PBL is needed for SD/NAND
boot on LS1021A/LS1043A/LS1046A to create boot binary having SPL binary
in PBI format concatenated with u-boot binary. SPL_FRAMEWORK is used on
these platforms too.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agols1028a: Configure stream IDs for integrated PCI and fix up Linux DT
Alex Marginean [Wed, 27 Nov 2019 15:19:32 +0000 (17:19 +0200)]
ls1028a: Configure stream IDs for integrated PCI and fix up Linux DT

Hardware comes out of reset with implicit values, but these are outside
the accepted range for Layerscape gen 3 chassis spec used on LS1028A.
Allocate different IDs and fix up Linux DT to use them.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm64: lx2160a: dts: Fix UART node status
Vabhav Sharma [Tue, 26 Nov 2019 11:30:51 +0000 (11:30 +0000)]
arm64: lx2160a: dts: Fix UART node status

LX2160A PL011 UART driver fetch IP block values using
platform data from board file instead of device tree.

Modified UART nodes in device tree to disable state.

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: Add workaround for USB erratum A-050106
Ran Wang [Tue, 26 Nov 2019 03:40:40 +0000 (11:40 +0800)]
armv8: Add workaround for USB erratum A-050106

USB3.0 Receiver needs to enable fixed equalization
for each of PHY instances in an SOC. This is similar
to erratum A-009007, but this one is for LX2160A,
and the register value is different.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: layerscape: fix SPL multi DTB loading
Michael Walle [Sun, 24 Nov 2019 20:13:21 +0000 (21:13 +0100)]
armv8: layerscape: fix SPL multi DTB loading

Mark board_fit_config_name_match() as weak so a board can overwrite the
empty function.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: fsl-layerscape: Increase mmc read size for secure-boot headers
Udit Agarwal [Wed, 20 Nov 2019 08:49:06 +0000 (08:49 +0000)]
armv8: fsl-layerscape: Increase mmc read size for secure-boot headers

Maximum size of secure boot header to be read from MMC is
12KB which spans across 0x20 blocks.

Hence increase the mmc read size for secure boot
headers from MMC to 0x20 blocks.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers/fsl-mc: Support DPSPARSER object and apply spb command
Florinel Iordache [Tue, 19 Nov 2019 10:28:17 +0000 (10:28 +0000)]
drivers/fsl-mc: Support DPSPARSER object and apply spb command

Add support for DPSPARSER object (create/destroy, open/close, apply spb)
which is required to configure Soft Parser by using MC.
Also add uboot command to apply Soft Parser Blob with command:
fsl_mc apply spb <spb_load_addr>

Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx into next
Tom Rini [Tue, 24 Dec 2019 13:18:19 +0000 (08:18 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx into next

- Enable DM driver on ppc/km boards
- Enable DM_USB for some of NXP powerpc platforms: P5040, T4240, T208x,
  T104x, P4080, P2041, P2020, P1020, P3041
- Some updates in mpc85xx-ddr driver, km boards

4 years agoppc/km: enable DM driver support in all defconfigs
Holger Brunck [Mon, 25 Nov 2019 09:04:34 +0000 (10:04 +0100)]
ppc/km: enable DM driver support in all defconfigs

This is the first step to use DM support for the KM powerpc boards.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
CC: Mario Six <mario.six@gdsys.cc>
CC: Wolfgang Denk <wd@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P5040: enable CONFIG_DM_USB support
Ran Wang [Thu, 12 Dec 2019 09:31:09 +0000 (17:31 +0800)]
configs: P5040: enable CONFIG_DM_USB support

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarch: powerpc: add usb nodes to P5040 dts
Ran Wang [Thu, 12 Dec 2019 09:31:08 +0000 (17:31 +0800)]
arch: powerpc: add usb nodes to P5040 dts

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T4240: enable CONFIG_DM_USB support
Ran Wang [Thu, 12 Dec 2019 09:31:07 +0000 (17:31 +0800)]
configs: T4240: enable CONFIG_DM_USB support

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarch: powerpc: add usb nodes to T4240 dts
Ran Wang [Thu, 12 Dec 2019 09:31:06 +0000 (17:31 +0800)]
arch: powerpc: add usb nodes to T4240 dts

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T208x: enable CONFIG_DM_USB support
Ran Wang [Thu, 12 Dec 2019 09:31:05 +0000 (17:31 +0800)]
configs: T208x: enable CONFIG_DM_USB support

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T104x: enable CONFIG_DM_USB support
Ran Wang [Thu, 12 Dec 2019 09:31:04 +0000 (17:31 +0800)]
configs: T104x: enable CONFIG_DM_USB support

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarch: powerpc: add usb nodes to T104x dts
Ran Wang [Thu, 12 Dec 2019 09:31:03 +0000 (17:31 +0800)]
arch: powerpc: add usb nodes to T104x dts

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T102x: enable CONFIG_DM_USB support
Ran Wang [Thu, 12 Dec 2019 09:31:02 +0000 (17:31 +0800)]
configs: T102x: enable CONFIG_DM_USB support

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopowerpc: add usb nodes to T102x dts
Ran Wang [Thu, 12 Dec 2019 09:31:01 +0000 (17:31 +0800)]
powerpc: add usb nodes to T102x dts

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>