]> git.baikalelectronics.ru Git - uboot.git/log
uboot.git
2 years agomtd: nand: raw: Add support for DT property nand-ecc-algo=bch
Pali Rohár [Mon, 4 Apr 2022 16:17:21 +0000 (18:17 +0200)]
mtd: nand: raw: Add support for DT property nand-ecc-algo=bch

According to Linux kernel DT schema nand-controller.yaml, using DT property
nand-ecc-algo=bch is the correct way for specifying BCH as ECC algorithm.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agomtd: rawnand: fsl_elbc: Use ECC configuration from device tree
Pali Rohár [Mon, 4 Apr 2022 16:17:20 +0000 (18:17 +0200)]
mtd: rawnand: fsl_elbc: Use ECC configuration from device tree

Initialize ECC configuration after nand_scan_ident() call and only in case
nand_scan_ident() have not done it. nand_scan_ident() fills ECC
configuration from device tree.

Fixes usage of NAND_ECC_SOFT_BCH when it is specified in device tree.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agomtd: rawnand: fsl_elbc: Add device tree support
Pali Rohár [Mon, 4 Apr 2022 16:17:19 +0000 (18:17 +0200)]
mtd: rawnand: fsl_elbc: Add device tree support

This allows boards to specify NAND settings via standard DT properties.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agomtd: rawnand: fsl_elbc: Implement RNDOUT command
Pali Rohár [Mon, 4 Apr 2022 16:17:18 +0000 (18:17 +0200)]
mtd: rawnand: fsl_elbc: Implement RNDOUT command

This is needed for SW ECC.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agopowerpc: dts: p2020: Add serial0 and serial1 via pq3-duart-0.dtsi
Pali Rohár [Sat, 2 Apr 2022 22:42:26 +0000 (00:42 +0200)]
powerpc: dts: p2020: Add serial0 and serial1 via pq3-duart-0.dtsi

Import pq3-duart-0.dtsi device tree include file from upstream Linux kernel
for P2020. This allows U-Boot to use P2020 device tree files from upstream
Linux kernel which reference serial0 or serial1 devices.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agopowerpc: dts: p2020: Add fsl/p2020si-pre.dtsi and fsl/p2020si-post.dtsi symlinks
Pali Rohár [Sat, 2 Apr 2022 22:42:25 +0000 (00:42 +0200)]
powerpc: dts: p2020: Add fsl/p2020si-pre.dtsi and fsl/p2020si-post.dtsi symlinks

P2020 DTS files in upstream Linux kernel use fsl/p2020si-pre.dtsi and
fsl/p2020si-post.dtsi include device tree files.

Add symlinks for these include device tree files into U-Boot powerpc
directory and points them to U-Boot inline device tree files p2020.dtsi and
p2020-post.dtsi.

This allows to use P2020 DTS files from upstream Linux kernel in U-Boot.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoboard: freescale: p1_p2_rdb_pc: Allow to compile it without env support
Pali Rohár [Sat, 2 Apr 2022 22:24:27 +0000 (00:24 +0200)]
board: freescale: p1_p2_rdb_pc: Allow to compile it without env support

When env support is disabled then usage of env_init() or env_relocate()
generates linker errors. So do not compile env_init() or env_relocate()
in SPL code when env support is disabled in SPL.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoddr: fsl: Allow to compile it without env support
Pali Rohár [Sat, 2 Apr 2022 22:24:26 +0000 (00:24 +0200)]
ddr: fsl: Allow to compile it without env support

When env support is disabled then usage of env_get_f() generates linker
errors. So do not compile env_get_f() when env support is disabled (for
example when disabled only in SPL).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agohwconfig: Allow to compile it without env support
Pali Rohár [Sat, 2 Apr 2022 22:24:25 +0000 (00:24 +0200)]
hwconfig: Allow to compile it without env support

When env support is disabled then usage of env_get() generates linker
errors. So do not compile env_get() when env support is disabled (for
example when disabled only in SPL).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agommc: mmc_mode_name() is used also when LOGLEVEL >= LOGL_DEBUG
Pali Rohár [Sat, 2 Apr 2022 22:20:10 +0000 (00:20 +0200)]
mmc: mmc_mode_name() is used also when LOGLEVEL >= LOGL_DEBUG

When CONFIG_LOGLEVEL is set to LOGL_DEBUG or higher then linker throws
error about undefined symbol mmc_mode_name(). So compile mmc_mode_name()
also when CONFIG_LOGLEVEL is set to LOGL_DEBUG or higher.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agommc: fsl_esdhc_spl: Call mmc_init() before booting from SD card
Pali Rohár [Sat, 2 Apr 2022 22:17:01 +0000 (00:17 +0200)]
mmc: fsl_esdhc_spl: Call mmc_init() before booting from SD card

If env is stored on SD card then U-Boot SPL automatically calls mmc_init()
before it is going to load proper U-Boot from SD card.

If env is not stored on SD card then U-Boot SPL fails to read proper U-Boot
from SD card due to missing mmc_init() call.

So add missing mmc_init() call into fsl_esdhc_spl's mmc_boot() function.
It fixes booting from SD card on P2020 boards without env support in SPL.

mmc_init() returns early if card was already initialized, so there is no
issue with calling this function more times.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agommc: fsl_esdhc_spl: pre-PBL: fix determining U-Boot size
Pali Rohár [Sat, 2 Apr 2022 22:17:00 +0000 (00:17 +0200)]
mmc: fsl_esdhc_spl: pre-PBL: fix determining U-Boot size

In pre-PBL header is stored size of code which BootROM copies from SD card
to L2/SRAM. This size has upper limit of L2 cache size. In most cases this
is size of U-Boot SPL or size of L2 cache.

Therefore this size in pre-PBL header cannot be used for determining size
of proper U-Boot.

So always use CONFIG_SYS_MMC_U_BOOT_SIZE for determining size of proper
U-Boot which stored on SD card.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agommc: fsl_esdhc_spl: pre-PBL: check for BOOT signature instead of MBR/DBR
Pali Rohár [Sat, 2 Apr 2022 22:16:59 +0000 (00:16 +0200)]
mmc: fsl_esdhc_spl: pre-PBL: check for BOOT signature instead of MBR/DBR

Pre-PBL BootROMs (MPC8536E, MPC8569E, P2020, P1011, P1012, P1013, P1020,
P1021, P1022) require custom BOOT signature on sector 0 and MBR/DBR
signature is not required at all.

So add check for BOOT signature and remove check for MBR/DBR.

This allows U-Boot SPL to load proper U-Boot on pre-PBL BootROMs platforms
also from SD cards which do not have MBR/DBR signature on sector 0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agopowerpc: mpc85xx: Show e500 core version
Pali Rohár [Sat, 2 Apr 2022 22:05:10 +0000 (00:05 +0200)]
powerpc: mpc85xx: Show e500 core version

Distinguish between e500v1 and e500v2.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agopowerpc: mpc85xx: Rename _start_e500 symbol to _start
Pali Rohár [Sat, 2 Apr 2022 22:05:09 +0000 (00:05 +0200)]
powerpc: mpc85xx: Rename _start_e500 symbol to _start

The real entry point is _start_e500. There is no _start symbol at all. So
rename _start_e500 to _start for convension that _start symbol is used as
entry point.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agopowerpc: mpc85xx: Drop _start symbol
Pali Rohár [Mon, 25 Apr 2022 03:59:08 +0000 (09:29 +0530)]
powerpc: mpc85xx: Drop _start symbol

_start symbol contains only 32-bit data number 0x27051956 despite it is
marked as text section. This magic number is IH_MAGIC which is used for
marking uboot image header.

mpc85xx start.S code does not define valid uboot image header, so IH_MAGIC
number in _start symbol is useless there.

Moreover this _start symbol is not used at all. Entry point is at symbol
_start_e500.

So because this _start symbol is not used for anything, completely remove
it with IH_MAGIC number. After _start symbol was _start_cont symbol, so
replace all relative address calculations by _start_cont.

Signed-off-by: Pali Rohár <pali@kernel.org>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarmv8/fsl-lsch3: Suppress spurious warning on Layerscape CPUs
Stephen Carlson [Tue, 29 Mar 2022 21:51:10 +0000 (14:51 -0700)]
armv8/fsl-lsch3: Suppress spurious warning on Layerscape CPUs

NXP/Freescale Layerscape CPUs support high-speed serial interfaces (SERDES)
that can be configured for the application. Interfaces not used by the
application can be set to protocol 0 to turn them off and save power, but
U-Boot would emit a warning that 0 was invalid for a SERDES protocol on
boot. Replace the warning text with a notice that the SERDES is disabled.

Signed-off-by: Stephen Carlson <stcarlso@linux.microsoft.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarmv8: layerscape: fix the function mismatch issue
Yuantian Tang [Wed, 9 Mar 2022 07:37:22 +0000 (15:37 +0800)]
armv8: layerscape: fix the function mismatch issue

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoboard: sl28: add basic PSCI implementation
Michael Walle [Mon, 25 Apr 2022 03:55:08 +0000 (09:25 +0530)]
board: sl28: add basic PSCI implementation

For now, this only provides reset and poweroff functions.

Signed-off-by: Michael Walle <michael@walle.cc>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarmv8: psci: add ARMV8_PSCI_RELOCATE Kconfig option
Michael Walle [Mon, 28 Feb 2022 12:48:40 +0000 (13:48 +0100)]
armv8: psci: add ARMV8_PSCI_RELOCATE Kconfig option

There is an user-selectable SYS_HAS_ARMV8_SECURE_BASE, which has the
same meaning but is just for the ls1043ardb board. As no in-tree config
uses this, drop it and replace it with something more sophiticated:
ARMV8_PSCI_RELOCATE. This option will then enable the ARMV8_SECURE_BASE
option which is used as the base to relocate the PSCI code (or any code
in the secure region, but that is only PSCI). A SoC (or board) can now
opt-in into having such a secure region by enabling
SYS_HAS_ARMV8_SECURE_BASE. Enable it for the LS1043A SoC, where it was
possible to relocate the PSCI code before as well as on the LS1028A SoC
where there will be PSCI support soon.

Additionally, make ARMV8_PSCI and SEC_FIRMWARE_ARMV8_PSCI exclusive.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarmv8: psci: skip setup code if we are not EL3
Michael Walle [Mon, 28 Feb 2022 12:48:39 +0000 (13:48 +0100)]
armv8: psci: skip setup code if we are not EL3

If we are running in EL2 skip PSCI implementation setup. This avoids an
exception if CONFIG_ARMV8_PSCI is set, but u-boot is started by TF-A.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarmv8: layerscape: get rid of smc_call()
Michael Walle [Fri, 22 Apr 2022 09:23:27 +0000 (14:53 +0530)]
armv8: layerscape: get rid of smc_call()

There are two different implementations to do a secure monitor call:
smc_call() and arm_smccc_smc(). The former is defined in fwcall.c and
seems to be an ad-hoc implementation. The latter is imported from linux.

smc_call() is also only available if CONFIG_ARMV8_PSCI is not defined.
This makes it impossible to have both PSCI calls and PSCI implementation
in one u-boot build. The layerscape SoC code decide at runtime via
check_psci() if there is a PSCI support. Therefore, this is a
prerequisite patch to add PSCI implementation support for the layerscape
SoCs.

Note, for the TFA part, this is only compile time tested with
(ls1028ardb_tfa_defconfig).

Signed-off-by: Michael Walle <michael@walle.cc>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarmv8: include psci_update_dt() unconditionally
Michael Walle [Mon, 28 Feb 2022 12:48:37 +0000 (13:48 +0100)]
armv8: include psci_update_dt() unconditionally

psci_update_dt() is also required if CONFIG_ARMV8_PSCI is set, that is,
if u-boot is the PSCI provider.
Guard the check which is intended to call into the PSCI implementation
in the secure firmware, by the proper macro SEC_FIRMWARE_ARMV8_PSCI.

Mark the function as weak because - unfortunately - there is already
a stub of the same function in arch/arm/mach-rmobile/psci-r8a779a0.c
which does not the same as the common one.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarm: layerscape: Disable erratum A009007 on LS1021A, LS1043A, and LS1046A
Sean Anderson [Fri, 22 Apr 2022 08:31:36 +0000 (14:01 +0530)]
arm: layerscape: Disable erratum A009007 on LS1021A, LS1043A, and LS1046A

This erratum is reported to cause problems on these processors [1-3].
The problem is usually with the clocking, which is supposed to be
configured by the RCW [4]. However, if it is not set, or if the default
clocking is not correct, then this erratum will cause an SError.
However, according to Ran Wang in [1]:
" ... this erratum is used to pass USB compliance test only, you could
 disable this workaround on your board if you don't any USB issue on
 normal use case, I think it's fine."

So just disable this erratum by default for these processors.

[1] https://lore.kernel.org/all/761ddd61-05c1-d9b8-ac90-b8f425afde6c@denx.de/
[2] https://community.nxp.com/t5/Layerscape/LS1046A-U-BOOT-HALT-AT-ERRATUM-A0090078/m-p/742993
[3] https://community.nxp.com/t5/QorIQ/Why-does-the-LS1043A-U-Boot-hang-at-code-that-fixes-erratum/m-p/644412
[4] https://source.codeaurora.org/external/qoriq/qoriq-components/rcw/tree/ls1046ardb/usb_phy_freq.rcw

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Ran Wang <ran.wang_1@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoarmv8: fsl-layerscape: Respect Kconfig for erratum A009007
Sean Anderson [Tue, 22 Feb 2022 18:38:39 +0000 (13:38 -0500)]
armv8: fsl-layerscape: Respect Kconfig for erratum A009007

There is a Kconfig for this erratum, but it is ignored for armv8.
Respect it.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoconfigs: Layerscape: Remove the 'fdt_addr' env
Hou Zhiqiang [Fri, 22 Apr 2022 08:20:06 +0000 (13:50 +0530)]
configs: Layerscape: Remove the 'fdt_addr' env

On Layerscape platforms, the DTB is loaded from boot filesystem,
per the fdt_addr description in doc/README.distro, it must be
removed.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoMerge branch '2022-04-22-assorted-updates'
Tom Rini [Sat, 23 Apr 2022 12:06:28 +0000 (08:06 -0400)]
Merge branch '2022-04-22-assorted-updates'

- Add "-q" to fdt addr and use it in distro_bootcmd to make the user
  experience less scary reading in normal try/fail cases.
- Let the adc update an environment variable like many other commands do
- Fix TPL SEPARATE_BSS check when locating DTB
- Allow ":" in PXE file names again
- Two Apple M1 fixes

2 years agoarm: apple: Point stdout-path to framebuffer when keyboard present
Mark Kettenis [Tue, 19 Apr 2022 19:20:31 +0000 (21:20 +0200)]
arm: apple: Point stdout-path to framebuffer when keyboard present

Unless you have a spare Apple Silicon machine, getting access to
the serial port on Apple Silicon machines requires special
hardware. Given that most machines come with a built-in screen
the framebuffer is likely to be the most convenient output device
for most users. While U-Boot will output to both serial and
framebuffer, OSes might not. Therefore set stdout-path to point
at /chosen/framebuffer when a keyboard is connected to the machine.

This behaviour can be overridden by setting the "stdout" variable
in the U-Boot environment. I addition to that keep the serial
console as the default when running under the m1n1 hypervisor.
The m1n1 hypervisor virtualizes the serial port such that it
can be easily accessed from any other machine with a USB port.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Janne Grunau <j@jannau.net>
Tested-by: Janne Grunau <j@jannau.net>
2 years agoarm: apple: Don't clear framebuffer
Mark Kettenis [Tue, 19 Apr 2022 19:10:29 +0000 (21:10 +0200)]
arm: apple: Don't clear framebuffer

Enable CONFIG_NO_FB_CLEAR to preserve the Asahi logo. Since that
logo is drawn on a black background also enable
CONFIG_SYS_WHITE_ON_BLACK such that text printed by U-Boot is still
visible.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2 years agoAllow colon in PXE bootfile URLs
Lyle Franklin [Sat, 16 Apr 2022 15:36:43 +0000 (11:36 -0400)]
Allow colon in PXE bootfile URLs

- U-boot's PXE flow supports prefixing your bootfile name with an
  IP address to fetch from a server other than the DHCP server,
  e.g. `hostIPaddr:bootfilename`:
  https://github.com/u-boot/u-boot/commit/a93907c43f847f076dd0e34ee3b69b5e8e6d0d29
- However, this breaks bootfile paths which contain a colon, e.g.
  `f0:ad:4e:10:1b:87/7/pxelinux.cfg/default`
- This patch checks whether the `hostIPaddr` prefix is a valid
  IP address before overriding the serverIP otherwise the whole
  bootfile path is preserved

Signed-off-by: Lyle Franklin <lylejfranklin@gmail.com>
2 years agofdt: Add -q option to fdt addr for distro_bootcmd
Peter Hoyes [Thu, 31 Mar 2022 10:53:22 +0000 (11:53 +0100)]
fdt: Add -q option to fdt addr for distro_bootcmd

distro_bootcmd uses this construct a few times to test $fdt_addr_r,
and fall back on $fdtcontroladdr if not set/invalid:

    if fdt addr ${fdt_addr_r}; then
        ...
    else
        ...
    fi

If the `fdt addr` test fails, it prints the following  message on the
console, suggesting there is an error when there is not:

    libfdt fdt_check_header(): FDT_ERR_BADMAGIC

To remove this potentially confusing error message, this patch adds -q
as a 'quiet' option for fdt addr, and uses this flag in
config_distro_bootcmd.h

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
2 years agocmd: adc: Add support for storing ADC result in env variable
Marek Vasut [Thu, 14 Apr 2022 16:52:25 +0000 (18:52 +0200)]
cmd: adc: Add support for storing ADC result in env variable

Add the ability to save ADC conversion result in an environment
variable. This is useful for further arbitrary processing by the
U-Boot scripts.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agofdt: Fix TPL SEPARATE_BSS check when locating DTB
Andrew Abbott [Sat, 16 Apr 2022 00:12:31 +0000 (10:12 +1000)]
fdt: Fix TPL SEPARATE_BSS check when locating DTB

Commit 5064a35a96cd52352f182e3eba0b746c1fb7cbb1 changed this condition
from an explicit

IS_ENABLED(CONFIG_SPL_SEPARATE_BSS)

to

CONFIG_IS_ENABLED(SEPARATE_BSS)

The documentation for CONFIG_IS_ENABLED() in include/linux/kconfig.h
implies that we will get the correct behaviour, but the actual behaviour
differs such that this condition is now always false.

This stopped TPL being able to load the device tree blob at least on the
ROCKPro64 board (RK3399 SoC), since the wrong device tree location was
chosen.

The issues causing this behaviour with CONFIG_IS_ENABLED() are:

1. The documentation implies that CONFIG_SPL_BUILD =>
   CONFIG_SPL_<option> is considered before the TPL equivalent.

   Actually, the TPL options have higher priority - see definition of
   _CONFIG_PREFIX.

2. The documentation implies a fallthrough, eg. if CONFIG_SPL_BUILD is
   defined but the CONFIG_SPL_<option> is not, then it will proceed to
   check if CONFIG_TPL_BUILD

   Actually, if CONFIG_TPL_BUILD is defined, then it stops there
   and CONFIG_SPL_BUILD is not considered - see definition of
   _CONFIG_PREFIX.

   During TPL build, at least for the ROCKPro64, both CONFIG_TPL_BUILD
   and CONFIG_SPL_BUILD are defined, but because of the above, only TPL
   options are considered. Since there is no CONFIG_TPL_SEPARATE_BSS,
   this fails.

Fixes: 5064a35a96 ("fdt: Correct condition for SEPARATE_BSS")
Signed-off-by: Andrew Abbott <andrew@mirx.dev>
2 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-pmic
Tom Rini [Fri, 22 Apr 2022 15:06:38 +0000 (11:06 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-pmic

2 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Fri, 22 Apr 2022 15:06:31 +0000 (11:06 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb

2 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 22 Apr 2022 14:17:35 +0000 (10:17 -0400)]
configs: Resync with savedefconfig

Resync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agopower-domain: Fix use of uninitialized value in dev_power_domain_ctrl
Sean Anderson [Wed, 23 Mar 2022 18:26:09 +0000 (14:26 -0400)]
power-domain: Fix use of uninitialized value in dev_power_domain_ctrl

If dev_count_phandle_with_args returns 0 or another error, then pd will never
have been initialized by power_domain_get_by_index. Avoid comparing against
pd.dev in this situation.

Fixes: efbabe6645 ("power-domain: fix hang in endless loop on i.MX8")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-watchdog
Tom Rini [Fri, 22 Apr 2022 12:12:53 +0000 (08:12 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-watchdog

- device-tree-bindings: watchdog: document common properties (Philippe)
- nuvoton: Add support for Nuvoton (Jim)

2 years agoMerge tag 'u-boot-imx-20220422' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Fri, 22 Apr 2022 12:12:20 +0000 (08:12 -0400)]
Merge tag 'u-boot-imx-20220422' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

u-boot-imx-20220422
-------------------

- Switch to DM_SERIAL
- Drop MMCROOT
- several cleanup

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/11815

2 years agoAdd support for TP-Link UE200 dongle
Oleksii Titov [Wed, 20 Apr 2022 08:23:25 +0000 (11:23 +0300)]
Add support for TP-Link UE200 dongle

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Oleksii Titov <ootitov@gmail.com>
2 years agousb: dwc3: Add support for usb3-phy PHY configuration
Michal Simek [Wed, 9 Mar 2022 09:05:45 +0000 (10:05 +0100)]
usb: dwc3: Add support for usb3-phy PHY configuration

When usb3-phy label is found, PHY driver is called and serdes line is
initialized. This is preparation for serdes/psgtr driver to configure GT
lines based on description in DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agogeneric-phy: s/CONFIG_PHY/CONFIG_IS_ENABLED(PHY)/
Michal Simek [Wed, 9 Mar 2022 09:05:44 +0000 (10:05 +0100)]
generic-phy: s/CONFIG_PHY/CONFIG_IS_ENABLED(PHY)/

Allow to disable PHY driver in SPL because it checks the CONFIG_SPL_PHY
variable for SPL builds.

The same change was done for usb by commit 58f9688e55be ("usb:
s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/").

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agousb: gadget: ci: Make various ops const
Adam Ford [Fri, 4 Mar 2022 22:59:02 +0000 (16:59 -0600)]
usb: gadget: ci: Make various ops const

ci_udc_ops and ci_ep_ops do not change their operations.
Mark them as const.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agowdt: nuvoton: Add support for Nuvoton
Jim Liu [Fri, 1 Apr 2022 09:59:39 +0000 (17:59 +0800)]
wdt: nuvoton: Add support for Nuvoton

Add watchdog controller driver for NPCM7xx/npcm8xx

the wdt design of npcm750 and npcm845 is the same.
so the driver can work on npcm750 and npcm845.
about npcm845 wdt dtsi i will followed kernel dts name
to use nuvoton,npcm750-wdt.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: device-tree-bindings: watchdog: document common properties
Philippe Reynes [Wed, 9 Mar 2022 13:56:19 +0000 (14:56 +0100)]
doc: device-tree-bindings: watchdog: document common properties

Adds simple documentation about common properties for watchdog
in the device tree.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoMerge branch '2022-04-21-further-cleanups'
Tom Rini [Thu, 21 Apr 2022 23:55:38 +0000 (19:55 -0400)]
Merge branch '2022-04-21-further-cleanups'

- Fix SPL_SYS_MALLOC_SIMPLE and non-SPL_FRAMEWORK boards (a large number
  of PowerPC platforms)
- Remove duplication of crc16 functionality
- Migrate COUNTER_FREQUENCY to CONFIG_COUNTER_FREQUENCY and have it in
  Kconfig

2 years agoARM: imx: imx8mn-evk: change environment address variables
Heiko Thiery [Thu, 24 Feb 2022 20:07:14 +0000 (21:07 +0100)]
ARM: imx: imx8mn-evk: change environment address variables

Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB.
To have enough space to load kernel images bigger than 32MB change the
variables to a feasible value.

The new environment variables layout is based on the scheme from
"include/configs/ti_armv7_common.h".

The CONFIG_SYS_LOAD_ADDR value is set to 0x42000000. With that we have
the same value as for the kernel_addr_r.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: imx: drop IMX_FEC_BASE
Peng Fan [Fri, 15 Apr 2022 04:23:43 +0000 (12:23 +0800)]
configs: imx: drop IMX_FEC_BASE

IMX_FEC_BASE is not used in these boards, so drop it.

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8mm-cl-iot-gate: Remove redundant board_fix_fdt()
Ying-Chun Liu (PaulLiu) [Wed, 20 Apr 2022 15:37:07 +0000 (23:37 +0800)]
imx8mm-cl-iot-gate: Remove redundant board_fix_fdt()

In arch/arm/mach-imx/imx8m/soc.c there's an implementation of
board_fix_fdt() introduced by commit 3efdcc5fc335. Remove the
redundant one to avoid failed to build from source when enabling
CONFIG_OF_BOARD_FIXUP.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: uboot-imx <uboot-imx@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoarm: set cntfrq_el0 if CONFIG_COUNTER_FREQUENCY is valid
Peng Fan [Wed, 13 Apr 2022 09:47:22 +0000 (17:47 +0800)]
arm: set cntfrq_el0 if CONFIG_COUNTER_FREQUENCY is valid

Since COUNTER_FREQUENCY is obselete, so set cntfrq_el0 if
CONFIG_COUNTER_FREQUENCY is valid

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
2 years agoinclude/configs: drop COUNTER_FREQUENCY
Peng Fan [Wed, 13 Apr 2022 09:47:21 +0000 (17:47 +0800)]
include/configs: drop COUNTER_FREQUENCY

Since we have CONFIG_COUNTER_FREQUENCY enabled, no need COUNTER_FREQUENCY

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: set CONFIG_COUNTER_FREQUENCY
Peng Fan [Wed, 13 Apr 2022 09:47:20 +0000 (17:47 +0800)]
configs: set CONFIG_COUNTER_FREQUENCY

Set CONFIG_COUNTER_FREQUENCY according to COUNTER_FREQUENCY in
config header file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
[trini: Re-run migration]

2 years agoarch: arm: Kconfig: set default COUNTER_FREQUENCY
Peng Fan [Wed, 13 Apr 2022 09:47:19 +0000 (17:47 +0800)]
arch: arm: Kconfig: set default COUNTER_FREQUENCY

Set default COUNTER_FREQUENCY according to config header file
under include/configs/
i.MX6UL/ULL/7D/8QM/8QXP all has system counter frequency run at 8MHz,
so set default value for them.
SUNXI/EXYNOS/ROCKCHIP_RK3128/ROCKCHIP_RK3288/ROCKCHIP_RK322X/ROCKCHIP_RK3036
at 24MHz. ARCH_LX2160A at 25MHz
ARCH_ZYNQMP at 100MHz

2 years agoarch: arm: move COUNTER_FREQUENCY from versal to arm
Peng Fan [Wed, 13 Apr 2022 09:47:18 +0000 (17:47 +0800)]
arch: arm: move COUNTER_FREQUENCY from versal to arm

Make COUNTER_FREQUENCY usable to armv8 and armv7-a, not limited to
versal. And update help message.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoxilinx: versal: board: use CONFIG_COUNTER_FREQUENCY
Peng Fan [Wed, 13 Apr 2022 09:47:17 +0000 (17:47 +0800)]
xilinx: versal: board: use CONFIG_COUNTER_FREQUENCY

Since versal has CONFIG_COUNTER_FREQUENCY, so use it. And
COUNTER_FREQUENCY will be dropped.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
2 years agomisc: atsha204a: Remove duplicate CRC-16 implementation
Pali Rohár [Tue, 12 Apr 2022 09:20:44 +0000 (11:20 +0200)]
misc: atsha204a: Remove duplicate CRC-16 implementation

ATSHA204A uses bit-reversed checksum of standard CRC-16 with polynomial
x^16 + x^15 + x^2 + 1.

This ATSHA204A specific checksum can be calculated just by using common
U-Boot functions bitrev16() and crc16().

So replace custom driver CRC-16 implementation by common U-Boot functions.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agofs: ext4: Use CRC-16 implementation from linux/crc16.h
Pali Rohár [Tue, 12 Apr 2022 09:20:43 +0000 (11:20 +0200)]
fs: ext4: Use CRC-16 implementation from linux/crc16.h

Implementation in linux/crc16.h provides standard CRC-16 algorithm with
polynomial x^16 + x^15 + x^2 + 1. Use it and remove duplicate ext4 CRC-16
specific code.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agocrc16: Move standard CRC-16 implementation from ubifs to lib
Pali Rohár [Tue, 12 Apr 2022 09:20:42 +0000 (11:20 +0200)]
crc16: Move standard CRC-16 implementation from ubifs to lib

This implementation provides standard CRC-16 algorithm with polynomial
x^16 + x^15 + x^2 + 1.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agocrc16: Rename fs/ubifs/crc16.h to include/linux/crc16.h
Pali Rohár [Tue, 12 Apr 2022 09:20:41 +0000 (11:20 +0200)]
crc16: Rename fs/ubifs/crc16.h to include/linux/crc16.h

File fs/ubifs/crc16.h is standard linux's crc16.h include file. So move it
from fs/ubifs to include/linux where are also other linux include files.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agocrc16-ccitt: Rename file with CRC-16-CCITT implementation to crc16-ccitt.c
Pali Rohár [Tue, 12 Apr 2022 09:20:40 +0000 (11:20 +0200)]
crc16-ccitt: Rename file with CRC-16-CCITT implementation to crc16-ccitt.c

U-Boot CRC-16 implementation uses polynomial x^16 + x^12 + x^5 + 1 which is
not standard CRC-16 algorithm, but it is known as CRC-16-CCITT. Rename file
crc16.c to crc16-ccitt.c to reduce confusion.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoSPL: Do not enable SPL_SYS_MALLOC_SIMPLE without SPL_FRAMEWORK by default
Pali Rohár [Fri, 8 Apr 2022 08:28:05 +0000 (10:28 +0200)]
SPL: Do not enable SPL_SYS_MALLOC_SIMPLE without SPL_FRAMEWORK by default

On P2020 board is SPL malloc simple always failing with error and loops:

  SD boot...
  alloc space exhausted
  Bad trap at PC: f8f8b5f0, SR: 21200, vector=d00
  NIP: 00000000 XER: 00000000 LR: 00000000 REGS: f8f8b5f0 TRAP: 20000000 DAR: 00000000
  MSR: 00021200 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

  GPR00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  GPR08: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  GPR24: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  Call backtrace:
  Exception in kernel pc f8f8b5f0 signal 0

Inspection showed that gd->malloc_limit is zero. And it is because
generally SPL_FRAMEWORK initialize SPL's gd->malloc_limit. But when
SPL_FRAMEWORK is not enabled then in most cases nobody initialize
gd->malloc_limit and so SPL malloc simple does not work.

So disable SPL_SYS_MALLOC_SIMPLE by default when SPL_FRAMEWORK is not
enabled. SPL_SYS_MALLOC_SIMPLE can be disabled only by setting
SPL_SYS_MALLOC_F_LEN to zero. So do it.

This change fixes SPL error "alloc space exhausted" on P2020 board.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 21 Apr 2022 15:44:54 +0000 (11:44 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- mrvl_uart.sh: Remove script (Pali)
- Fix Espressobin build for configs where ENV is not in SPI (Rogier)
- mvebu: a37xx: Add support for reading OTP (Pali)
- mvebu: uDPU: Ethernet fixes and misc DT and defconfig changes (Robert)
- mvebu: Add support for reading LD0 and LD1 eFuse (Pali)
- kwboot: Replace fstat()+st_size by lseek()+SEEK_END (Pali)
- mvebu: turris_omnia: Enable CONFIG_CMD_FUSE (Pali)
- arm: Add CONFIG_SPL_SYS_NO_VECTOR_TABLE used on 32bit MVEBU (Pali)
- mvebu: a37xx: Add support for writing Security OTP values (Pali)
- mvebu: turris: Misc enhancements and cleanups / fixes (Pali)
- Sheevaplug : Use Marvell uclass mvgbe and PHY driver for Ethernet (Tony)

2 years agoMerge branch '2022-04-21-assorted-improvements'
Tom Rini [Thu, 21 Apr 2022 14:56:58 +0000 (10:56 -0400)]
Merge branch '2022-04-21-assorted-improvements'

- For the environment, add a arch_env_get_location hook and make use of
  it on some NXP platforms (so that boards can override SoCs).
- Remove some unused squashfs code from SPL
- Resync am335x beaglebone related DTS files
- Enable SPL_SEPARATE_BSS if SPL_BSS_START_ADDR is used

2 years agoimx: Fix build error
Ye Li [Tue, 19 Apr 2022 09:13:25 +0000 (14:43 +0530)]
imx: Fix build error

Fix wrong environment.h and remove DECLARE_GLOBAL_DATA_PTR

Fixes: e6c156b4b5 (imx: imx7 Support for Manufacturing Protection)
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
2 years agoimx: Update FSL_MFGPROT config for iMX8M
Ye Li [Tue, 19 Apr 2022 09:13:24 +0000 (14:43 +0530)]
imx: Update FSL_MFGPROT config for iMX8M

Update the Kconfig and Makefile to allow build for iMX8M and
restrict the build only in u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
2 years agocrypto/fsl: add invalidate_dcache_range for hash output buffer
Gaurav Jain [Tue, 19 Apr 2022 05:22:28 +0000 (10:52 +0530)]
crypto/fsl: add invalidate_dcache_range for hash output buffer

HW accelerated hash operations are giving incorrect hash output.
so invalidate cache lines to avoid cache overwriting in DDR memory region.

caam_hash()
 -moved address alignment check in the beginning of function.
 -added invalidate_dcache_range for pout buffer before running descriptor.

Fixes: b33dbb8714 (crypto/fsl: Fix HW accelerated hash commands)
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agodoc: imx8mn_evk: Do not export ATF_LOAD_ADDR
Fabio Estevam [Mon, 18 Apr 2022 17:15:08 +0000 (14:15 -0300)]
doc: imx8mn_evk: Do not export ATF_LOAD_ADDR

The imx8mn_evk target have been converted to use binman.

With the binman approach the ATF load address is described via
devicetree, so remove the now unneeded instruction of exporting
ATF_LOAD_ADDR.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8mn_evk: Enable cache in SPL
Fabio Estevam [Mon, 18 Apr 2022 17:15:07 +0000 (14:15 -0300)]
imx8mn_evk: Enable cache in SPL

There is no reason for disabling I-cache and D-cache
in SPL.

Remove the unneeded CONFIG_SPL_SYS_ICACHE_OFF and
CONFIG_SPL_SYS_DCACHE_OFF options.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoboard: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL
Michael Trimarchi [Mon, 18 Apr 2022 06:53:36 +0000 (08:53 +0200)]
board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL

Enable DM_SERIAL for both U_Boot and the SPL. The uart4 and its pinmux
are already marked with u-boot,dm-spl but we need to move the call to
preloader_console_init() after spl_init() to avoid a board hang
as dm can't be used until after spl_init().

Remove the manual config of the UART pinmux now that it is no longer
needed.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
2 years agoarm: dts: imx8mp: add of-list support to common imx8mp-u-boot.dtsi
Tim Harvey [Fri, 15 Apr 2022 20:41:54 +0000 (13:41 -0700)]
arm: dts: imx8mp: add of-list support to common imx8mp-u-boot.dtsi

Add support for OF-LIST to common imx8mp-u-boot.dtsi so that it can
be used with boards that have multiple DTB's.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Teresa Remmet <t.remmet@phytec.de>
Cc: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agocrypto/fsl: Clear the memory when blob decapsulation fails
Gaurav Jain [Fri, 15 Apr 2022 11:22:34 +0000 (16:52 +0530)]
crypto/fsl: Clear the memory when blob decapsulation fails

issue: blob decapsulation operation store the decrypted data
       in memory even if ICV check failed.

fix: clear the blob data output memory.

Fixes: c5de15cbc8 (crypto/fsl: Add command for encapsulating/decapsulating blobs)
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Reviewed-by: Kshitiz Varshney <kshitiz.varshney@nxp.com>
Tested-by: Kshitiz Varshney <kshitiz.varshney@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: imx8mq-evk: enable CONFIG_DM_SERIAL
Peng Fan [Fri, 15 Apr 2022 04:35:36 +0000 (12:35 +0800)]
imx: imx8mq-evk: enable CONFIG_DM_SERIAL

Marked related nodes as u-boot,dm-spl for serial driver model
Enable CONFIG_DM_SERIAL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mn_evk: enable CONFIG_DM_SERIAL
Peng Fan [Fri, 15 Apr 2022 04:35:35 +0000 (12:35 +0800)]
imx: imx8mn_evk: enable CONFIG_DM_SERIAL

Enable CONFIG_DM_SERIAL. uart2 and its pinmux was already
marked with u-boot,dm-spl.

move the preloader_console_init() call after spl_init() to
avoid board hang

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mm_evk: enable CONFIG_DM_SERIAL
Peng Fan [Fri, 15 Apr 2022 04:35:34 +0000 (12:35 +0800)]
imx: imx8mm_evk: enable CONFIG_DM_SERIAL

Enable CONFIG_DM_SERIAL. uart2 and its pinmux was already
marked with u-boot,dm-spl.

move the preloader_console_init() call after spl_early_init() to
avoid board hang

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mp_evk: enable CONFIG_DM_SERIAL
Peng Fan [Fri, 15 Apr 2022 04:35:33 +0000 (12:35 +0800)]
imx: imx8mp_evk: enable CONFIG_DM_SERIAL

Enable CONFIG_DM_SERIAL. uart2 and its pinmux was already
marked with u-boot,dm-spl.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoscripts: config_whitelist: drop CONFIG_MMCROOT
Peng Fan [Fri, 15 Apr 2022 04:23:42 +0000 (12:23 +0800)]
scripts: config_whitelist: drop CONFIG_MMCROOT

Drop CONFIG_MMCROOT, no users now.

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: drop CONFIG_MMCROOT
Peng Fan [Fri, 15 Apr 2022 04:23:41 +0000 (12:23 +0800)]
configs: drop CONFIG_MMCROOT

CONFIG_MMCROOT is only used to set mmcroot, no need a dedicated macro.

Script as below
"
 for i in `ls include/configs/*.h`
 do
 mmcroot=`sed -n '/define.*MMCROOT/ p' $i  | awk -F\" '{ print $2;}'`

 if [ ! -n "$mmcroot" ]; then
  continue
 fi

 sed -i '/define.*MMCROOT/ d' $i
 sed -i 's,\" CONFIG_MMCROOT \",'$mmcroot',g' $i

 done
"

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agotreewide: Enable SPL_SEPARATE_BSS if SPL_BSS_START_ADDR is used
Sean Anderson [Tue, 12 Apr 2022 14:59:04 +0000 (10:59 -0400)]
treewide: Enable SPL_SEPARATE_BSS if SPL_BSS_START_ADDR is used

If .bss does not immediately follow the end of the image, then
CONFIG_SPL_SEPARATE_BSS must be selected. Typically, the location of bss
is specified by using CONFIG_SPL_BSS_START_ADDR in a linker script. On
these arches, CONFIG_SPL_SEPARATE_BSS should be enabled. If there is an
option to use an alternate boot script (e.g. CONFIG_SPL_LDSCRIPT is just
a default), just imply. If there is not, select.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoboard: ti: am335x: Add support for BBE Extended WiFi
Paul Barker [Mon, 11 Apr 2022 15:42:01 +0000 (15:42 +0000)]
board: ti: am335x: Add support for BBE Extended WiFi

The Sancloud BeagleBone Enhanced Extended WiFi (BBE Extended WiFi) has
its own devicetree file and the board can be identified by the 2nd
letter of the config string within the common EEPROM.

Signed-off-by: Paul Barker <paul.barker@sancloud.com>
2 years agoboard: ti: am335x: Add BBE Lite support
Paul Barker [Mon, 11 Apr 2022 15:42:00 +0000 (15:42 +0000)]
board: ti: am335x: Add BBE Lite support

The Sancloud BeagleBone Enhanced Lite (BBE Lite) has its own devicetree
file and the board can be identified by the 2nd letter of the config
string within the common EEPROM.

Signed-off-by: Paul Barker <paul.barker@sancloud.com>
2 years agoarm: dts: Resync dts for BeagleBone and derivatives
Paul Barker [Mon, 11 Apr 2022 15:41:59 +0000 (15:41 +0000)]
arm: dts: Resync dts for BeagleBone and derivatives

Sync BeagleBone dts files & TPS dtsi files with Linux v5.17 and include
the SanCloud BBE Extended WiFi dts added in v5.18-rc1. Also pull in
changes to am33xx-l4.dtsi needed to support the BeagleBone Blue.

The change to use the cpsw switch driver (commit c477358e66a3 in Linux)
is excluded from the sync as u-boot does not recognise the new
compatible string.

Signed-off-by: Paul Barker <paul.barker@sancloud.com>
2 years agofs: Allow to compile FS_SQUASHFS only for proper U-Boot
Pali Rohár [Wed, 6 Apr 2022 21:34:00 +0000 (23:34 +0200)]
fs: Allow to compile FS_SQUASHFS only for proper U-Boot

CONFIG_SPL_FS_SQUASHFS cannot be disabled when CONFIG_FS_SQUASHFS is
enabled. Fix it.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoARM: imx: imx8m: env: Switch to arch_env_get_location()
Marek Vasut [Wed, 6 Apr 2022 00:21:34 +0000 (02:21 +0200)]
ARM: imx: imx8m: env: Switch to arch_env_get_location()

Implement arch_env_get_location() instead of env_get_location(), so that
the env_get_location() can be implemented on board level and override the
arch_env_get_location() architecture defaults.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Adam Ford <aford173@gmail.com>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Marek Behún <marek.behun@nic.cz>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
2 years agoarmv8: layerscape: env: Switch to arch_env_get_location()
Marek Vasut [Wed, 6 Apr 2022 00:21:33 +0000 (02:21 +0200)]
armv8: layerscape: env: Switch to arch_env_get_location()

Implement arch_env_get_location() instead of env_get_location(), so that
the env_get_location() can be implemented on board level and override the
arch_env_get_location() architecture defaults.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Adam Ford <aford173@gmail.com>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Marek Behún <marek.behun@nic.cz>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
2 years agoenv: Implement lower priority arch_env_get_location()
Marek Vasut [Wed, 6 Apr 2022 00:21:32 +0000 (02:21 +0200)]
env: Implement lower priority arch_env_get_location()

Currently there is only one way to override desired environment location,
by implementing env_get_location(). This is increasingly being conflated
both on board level and architecture level, which leads to a problem on
boards where this function is already implemented on architecture level,
since those boards have no way to override this environment location on
board level anymore.

Implement arch_env_get_location() function which is architecture specific
and should only ever be implemented in architecture code. This function
has lower priority than env_get_location(), which should only ever be
implemented in board code, and which overrides the arch_env_get_location()
architecture environment selection.

This way, architecture can define its default environment chooser, while
board can now override it as needed at all times.

There is no functional change, since env_get_location() simply returns
arch_env_get_location(), and arch_env_get_location() implements the
current env_get_location() default content.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Adam Ford <aford173@gmail.com>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Marek Behún <marek.behun@nic.cz>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
2 years agoconfigs: phycore_imx8mm/p: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:40 +0000 (12:23 +0800)]
configs: phycore_imx8mm/p: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 CONFIG_SYS_FSL_USDHC_NUM
 CONFIG_SYS_FSL_ESDHC_ADDR

Reviewed-by: Fabio Estevam <festevam@denx.de>
Acked-By: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: imx8mm/n_venice: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:39 +0000 (12:23 +0800)]
configs: imx8mm/n_venice: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 CONFIG_SYS_FSL_USDHC_NUM
 CONFIG_SYS_FSL_ESDHC_ADDR

Reviewed-by: Fabio Estevam <festevam@denx.de>
Acked-By: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: verdin-imx8m: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:38 +0000 (12:23 +0800)]
configs: verdin-imx8m: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 CONFIG_SYS_FSL_USDHC_NUM
 CONFIG_SYS_FSL_ESDHC_ADDR

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: imx8qm/qxp_evk: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:37 +0000 (12:23 +0800)]
configs: imx8qm/qxp_evk: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 CONFIG_SYS_FSL_USDHC_NUM
 CONFIG_SYS_FSL_ESDHC_ADDR

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: mx7dsabresd: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:36 +0000 (12:23 +0800)]
configs: mx7dsabresd: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 CONFIG_SYS_FSL_USDHC_NUM
 CONFIG_SYS_FSL_ESDHC_ADDR

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: mx6sxsabresd: drop CONFIG_SYS_FSL_USDHC_NUM
Peng Fan [Fri, 15 Apr 2022 04:23:35 +0000 (12:23 +0800)]
configs: mx6sxsabresd: drop CONFIG_SYS_FSL_USDHC_NUM

With DM_MMC, CONFIG_SYS_FSL_USDHC_NUM is not needed.

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: imx8mn_evk: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:34 +0000 (12:23 +0800)]
configs: imx8mn_evk: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 #define CONFIG_SYS_FSL_USDHC_NUM       2
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: imx8mp_evk: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:33 +0000 (12:23 +0800)]
configs: imx8mp_evk: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 #define CONFIG_SYS_FSL_USDHC_NUM       2
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: imx8mm_evk: drop unused SDHC macro
Peng Fan [Fri, 15 Apr 2022 04:23:32 +0000 (12:23 +0800)]
configs: imx8mm_evk: drop unused SDHC macro

With SPL_DM_MMC and DM_MMC, the two macros not needed, drop it.
 #define CONFIG_SYS_FSL_USDHC_NUM       2
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: imx: imx8m: Fix board_get_usable_ram_top()
Marek Vasut [Thu, 14 Apr 2022 13:51:46 +0000 (15:51 +0200)]
ARM: imx: imx8m: Fix board_get_usable_ram_top()

The 4 GiB boundary is at 0xffffffff+1 , not at 0x80000000, fix this.

The PHYS_SDRAM of i.MX8M is at 0x40000000 , so to restrict ram_top
below 4 GiB, the ram_top has to be set to 0xffffffff as it is not
an offset from the start of PHYS_SDRAM, but rather a physical address
marking the topmost allowed DRAM address.

Fixes: 3dedf85a11b ("imx8m: Restrict usable memory to space below 4G boundary")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoconfigs: ge_bx50v3: remove CONFIG_PCIE_IMX_POWER_GPIO
Ian Ray [Thu, 14 Apr 2022 11:05:46 +0000 (14:05 +0300)]
configs: ge_bx50v3: remove CONFIG_PCIE_IMX_POWER_GPIO

This GPIO is actually an input "Q7_3V3_PCIE_WAKE#_IN" not an output, so
remove the misleaading and incorrect definition.

Cc: Tim Harvey <tharvey@gateworks.com> (re: pci: imx: use vpcie-supply if defined by device-tree)
Signed-off-by: Ian Ray <ian.ray@ge.com>
2 years agopci: imx: remove weak overrides no longer used
Tim Harvey [Wed, 13 Apr 2022 22:57:37 +0000 (15:57 -0700)]
pci: imx: remove weak overrides no longer used

There are no users of the imx6_pcie_toggle_power and imx6_pcie_toggle_reset
weak overrides and as these functions are able to be handled now via dt
properties lets remove these.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agopci: imx: use vpcie-supply if defined by device-tree
Tim Harvey [Wed, 13 Apr 2022 22:54:37 +0000 (15:54 -0700)]
pci: imx: use vpcie-supply if defined by device-tree

If vpcie-supply is defined by device-tree use that if
CONFIG_PCIE_IMX_POWER_GPIO is not defined.

Note that after this the following boards which define
CONFIG_PCIE_IMX_POWER_GPIO in their board header file as well as their
device-tree should be able to remove CONFIG_PCIE_IMX_PERST_GPIO without
consequence:
 - mx6sabresd
 - mx6sxsabresd
 - novena

Note that the ge_bx50v3 board uses CONFIG_PCIE_IMX_POWER_GPIO and does
not have vpcie-supply defined in it's pcie node in the dt thus removing
CONFIG_PCIE_IMX_POWER_GPIO globally can't be done until that board adds
vpcie-supply.

Cc: Ian Ray <ian.ray@ge.com> (maintainer:GE BX50V3 BOARD)
Cc: Sebastian Reichel <sebastian.reichel@collabora.com> (maintainer:GE BX50V3 BOARD)
Cc: Fabio Estevam <festevam@gmail.com> (maintainer:MX6SABRESD BOARD)
Cc: Marek Vasut <marex@denx.de> (maintainer:NOVENA BOARD)
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoarm: kirkwood: Sheevaplug : Use Marvell uclass mvgbe and PHY driver for Ethernet
Tony Dinh [Sun, 17 Apr 2022 23:42:32 +0000 (16:42 -0700)]
arm: kirkwood: Sheevaplug : Use Marvell uclass mvgbe and PHY driver for Ethernet

The Globalscale Technologies Sheevaplug board has the network chip
Marvell 88E1116R. Use uclass mvgbe and the compatible driver M88E1310
driver to bring up Ethernet.

- Remove CONFIG_RESET_PHY_R symbol from all board files
- Use uclass mvgbe to bring up the network. And remove ad-hoc code.
- Enable CONFIG_PHY_MARVELL to properly configure the network.
- Miscellaneous changes: Move constants to .c file and remove header file
board/Marvell/sheevaplug/sheevaplug.h, use BIT macro, and add/cleanup
comments.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2 years agoarm: mvebu: turris_omnia: Enable CONFIG_CMD_FUSE
Pali Rohár [Wed, 6 Apr 2022 13:26:35 +0000 (15:26 +0200)]
arm: mvebu: turris_omnia: Enable CONFIG_CMD_FUSE

This allows to read eFuse on Turris Omnia.

Signed-off-by: Pali Rohár <pali@kernel.org>