oweals/u-boot.git
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Thu, 30 Apr 2020 17:00:20 +0000 (13:00 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- DM ACPI support (Part A)
- Improve support for chain-loading x86 U-Boot

4 years agoMerge tag 'xilinx-for-v2020.07-rc2' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Thu, 30 Apr 2020 15:31:33 +0000 (11:31 -0400)]
Merge tag 'xilinx-for-v2020.07-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2020.07-rc2

mmc:
- Fix dt property handling via generic function

clk:
- Fix versal watchdog clock setting

nand:
- Fix zynq nand command comparison

xilinx:
- Enable ubifs
- Sync board_late_init configurations with initrd_high setup
- Make custom distro boot more verbose

zynq:
- Kconfig alignments
- Fix nand cse configuration

zynqmp:
- Fix zcu104 low level qspi configuration
- Small DT updates

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Thu, 30 Apr 2020 14:06:54 +0000 (10:06 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- Add DM_ETH support for DPAA1, DPAA2 based RDB platforms: ls1046ardb,
  ls1043ardb, lx2160ardb, ls2088ardb, ls1088ardb.
- Add GICv3 support for ls1028a, ls2088a, ls1088a.
- Add lpuart support on ls1028aqds.
- Few bug fixes and updates on ls2088a, ls1012a, ls1046a, ls1021a based
  platforms.

4 years agox86: Add documentation for the chain-load feature
Simon Glass [Sun, 26 Apr 2020 15:13:01 +0000 (09:13 -0600)]
x86: Add documentation for the chain-load feature

Add a few notes about this feature, which is aimed for development.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: Use the existing stack when chain-loading
Simon Glass [Sun, 26 Apr 2020 15:13:00 +0000 (09:13 -0600)]
x86: Use the existing stack when chain-loading

With chromebook_coral we normally run TPL->SPL->U-Boot. This is the
'bare metal' case.

When running from coreboot we put u-boot.bin in the RW_LEGACY portion
of the image, e.g. with:

   cbfstool image-coral.serial.bin add-flat-binary -r RW_LEGACY \
-f /tmp/b/chromebook_coral/u-boot.bin -n altfw/u-boot \
-c lzma -l 0x1110000 -e 0x1110000

In this case U-Boot is run from coreboot (actually Depthcharge, its
payload) so we cannot access CAR. Use the existing stack instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: Add a way to detect running from coreboot
Simon Glass [Sun, 26 Apr 2020 15:12:59 +0000 (09:12 -0600)]
x86: Add a way to detect running from coreboot

If U-Boot is running from coreboot we need to skip low-level init. Add
an way to detect this and to set the gd flag.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: Move coreboot-table detection into common code
Simon Glass [Sun, 26 Apr 2020 15:12:58 +0000 (09:12 -0600)]
x86: Move coreboot-table detection into common code

To support detecting booting from coreboot, move the code which locates
the coreboot tables into a common place. Adjust the algorithm slightly to
use a word comparison instead of string, since it is faster.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: correct the comments to 960KB]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoboard: Add a gd flag for chain loading
Simon Glass [Sun, 26 Apr 2020 15:12:57 +0000 (09:12 -0600)]
board: Add a gd flag for chain loading

When U-Boot is run from another boot loader, much of the low-level init
needs to be skipped.

Add a flag for this and adjust ll_boot_init() to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: Avoid auto-config when chain loading
Simon Glass [Sun, 26 Apr 2020 15:12:56 +0000 (09:12 -0600)]
pci: Avoid auto-config when chain loading

When U-Boot is not the first-stage bootloader we don't want to
re-configure the PCI devices, since this has already been done. Add a
check to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: cpu: Skip init code when chain loading
Simon Glass [Sun, 26 Apr 2020 15:12:55 +0000 (09:12 -0600)]
x86: cpu: Skip init code when chain loading

When U-Boot is not the first-stage bootloader the interrupt and cache init
must be skipped, as well as init for various peripherals. Update the code
to add checks for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: apl: Skip init code when chain loading
Simon Glass [Sun, 26 Apr 2020 15:12:54 +0000 (09:12 -0600)]
x86: apl: Skip init code when chain loading

When U-Boot is not the first-stage bootloader the FSP-S init must be
skipped. Update it to add a check.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: fsp: Allow skipping init code when chain loading
Simon Glass [Sun, 26 Apr 2020 15:12:53 +0000 (09:12 -0600)]
x86: fsp: Allow skipping init code when chain loading

It is useful to be able to boot the same x86 image on a device with or
without a first-stage bootloader. For example, with chromebook_coral, it
is helpful for testing to be able to boot the same U-Boot (complete with
FSP) on bare metal and from coreboot. It allows checking of things like
CPU speed, comparing registers, ACPI tables and the like.

When U-Boot is not the first-stage bootloader much of this code is not
needed and can break booting. Add checks for this to the FSP code.

Rather than checking for the amount of available SDRAM, just use 1GB in
this situation, which should be safe. Using 2GB may run into a memory
hole on some SoCs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoacpi: Add an acpi command
Simon Glass [Sun, 26 Apr 2020 15:19:53 +0000 (09:19 -0600)]
acpi: Add an acpi command

It is useful to dump ACPI tables in U-Boot to see what has been generated.
Add a command to handle this.

To allow the command to find the tables, add a position into the global
data.

Support subcommands to list and dump the tables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agoacpi: Move the xsdt pointer to acpi_ctx
Simon Glass [Sun, 26 Apr 2020 15:19:52 +0000 (09:19 -0600)]
acpi: Move the xsdt pointer to acpi_ctx

Put this in the context along with the other important pointers.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agoacpi: Put table-setup code in its own function
Simon Glass [Sun, 26 Apr 2020 15:19:51 +0000 (09:19 -0600)]
acpi: Put table-setup code in its own function

We always write three basic tables to ACPI at the start. Move this into
its own function, along with acpi_fill_header(), so we can write a test
for this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoacpi: Move acpi_add_table() to generic code
Simon Glass [Sun, 26 Apr 2020 15:19:50 +0000 (09:19 -0600)]
acpi: Move acpi_add_table() to generic code

Move this code to a generic location so that we can test it with sandbox.
This requires adding a few new fields to acpi_ctx, so drop the local
variables used in the original code.

Also use mapmem to avoid pointer-to-address casts which don't work on
sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agoacpi: Drop code for missing XSDT from acpi_write_rsdp()
Simon Glass [Sun, 26 Apr 2020 15:19:49 +0000 (09:19 -0600)]
acpi: Drop code for missing XSDT from acpi_write_rsdp()

We don't actually support tables without an XSDT so we can drop this dead
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agox86: Allow devices to write ACPI tables
Simon Glass [Sun, 26 Apr 2020 15:19:48 +0000 (09:19 -0600)]
x86: Allow devices to write ACPI tables

Call the new core function to permit devices to write their own ACPI
tables. These tables will appear after all other tables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agoacpi: Convert part of acpi_table to use acpi_ctx
Simon Glass [Sun, 26 Apr 2020 15:19:47 +0000 (09:19 -0600)]
acpi: Convert part of acpi_table to use acpi_ctx

The current code uses an address but a pointer would result in fewer
casts. Also it repeats the alignment code in a lot of places so this would
be better done in a helper function.

Update write_acpi_tables() to make use of the new acpi_ctx structure,
adding a few helpers to clean things up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agoacpi: Add a method to write tables for a device
Simon Glass [Sun, 26 Apr 2020 15:19:46 +0000 (09:19 -0600)]
acpi: Add a method to write tables for a device

A device may want to write out ACPI tables to describe itself to Linux.
Add a method to permit this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
4 years agoacpi: Add a binding for ACPI settings in the device tree
Simon Glass [Sun, 26 Apr 2020 15:19:45 +0000 (09:19 -0600)]
acpi: Add a binding for ACPI settings in the device tree

Devices need to report various identifiers in the ACPI tables. Rather than
hard-coding these in drivers it is typically better to put them in the
device tree.

Add a binding file to describe this.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agox86: cbfs: Drop unwanted declaration
Simon Glass [Sun, 5 Apr 2020 23:22:38 +0000 (17:22 -0600)]
x86: cbfs: Drop unwanted declaration

The intention here is add a forward declaration, not actually declare a
variable. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Wed, 29 Apr 2020 14:39:18 +0000 (10:39 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sh

- rmobile gen2/gen3 DTS sync and defconfig consolidation

4 years agoconfigs: ls2088ardb: Correct DEFAULT_DEVICE_TREE value
Kuldeep Singh [Thu, 19 Mar 2020 10:04:16 +0000 (15:34 +0530)]
configs: ls2088ardb: Correct DEFAULT_DEVICE_TREE value

LS2088A-RDB has CONFIG_DEFAULT_DEVICE_TREE value correctly set as
"fsl-ls2088a-rdb-qspi" for QSPI secure/non-secure boot and TFA
non-secure boot mode.

Fix the value for TFA secure boot mode.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: enable DM_ETH support for LS1046ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:22 +0000 (16:25 +0300)]
configs: enable DM_ETH support for LS1046ARDB

Enable DM_ETH on all the defconfigs for the LS1046ARDB board.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: enable DM_ETH support for LS1043ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:21 +0000 (16:25 +0300)]
configs: enable DM_ETH support for LS1043ARDB

Enable DM_ETH on all the defconfigs for the LS1043ARDB board.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: add DM ETH support
Madalin Bucur [Thu, 23 Apr 2020 13:25:19 +0000 (16:25 +0300)]
driver: net: fm: add DM ETH support

Probe the FMan MACs based on the device tree while
retaining the legacy code/functionality.
One notable change introduced here is that, for DM_ETH,
the name of the interfaces is corrected to the fmX-macY
format, that avoids the referral to the MAC block names
which were incorrect for FMan v3 devices (i.e. DTSEC,
TGEC) and had weird formatting (i.e. FM1@DTSEC6, FM1@TGEC1).
The legacy code is left unchanged in this respect.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: add DM MDIO support
Madalin Bucur [Thu, 23 Apr 2020 13:25:18 +0000 (16:25 +0300)]
driver: net: fm: add DM MDIO support

Allow the MDIO devices to be probed based on the device tree.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: separate receive buffer free code
Madalin Bucur [Thu, 23 Apr 2020 13:25:17 +0000 (16:25 +0300)]
driver: net: fm: separate receive buffer free code

Move the receive buffer free code in a separate function.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: change init_phy() param
Madalin Bucur [Thu, 23 Apr 2020 13:25:16 +0000 (16:25 +0300)]
driver: net: fm: change init_phy() param

Change the init_phy() parameter to simplify the code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 to LS1046ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:15 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 to LS1046ARDB

Introduce the QorIQ DPAA 1 Frame Manager nodes in the LS1046ARDB
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 for LS1046A
Madalin Bucur [Thu, 23 Apr 2020 13:25:14 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 for LS1046A

Add the QorIQ DPAA 1 Frame Manager v3 device tree nodes for the
LS1046A SoC. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 to LS1043ARDB
Madalin Bucur [Thu, 23 Apr 2020 13:25:13 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 to LS1043ARDB

Introduce the QorIQ DPAA 1 Frame Manager nodes in the LS1043ARDB
device tree. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 for LS1043A
Madalin Bucur [Thu, 23 Apr 2020 13:25:12 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 for LS1043A

Add the QorIQ DPAA 1 Frame Manager v3 device tree nodes for the
LS1043A SoC. The device tree fragments are copied over with little
modification from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: add QorIQ DPAA 1 FMan v3 device tree nodes
Madalin Bucur [Thu, 23 Apr 2020 13:25:11 +0000 (16:25 +0300)]
ARM: dts: add QorIQ DPAA 1 FMan v3 device tree nodes

Add the QorIQ DPAA Frame Manager v3 device tree nodes description.
The device tree fragments are copied over with little modification
from the Linux kernel source code.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012afrwy: drop env qspi_bootcmd
Biwen Li [Fri, 17 Apr 2020 09:37:01 +0000 (17:37 +0800)]
configs: ls1012afrwy: drop env qspi_bootcmd

Drop useless environment variable installer and qspi_bootcmd
for ls1012afrwy.
Only 2 MB nor flash in ls1012afrwy. So cannot get kernel(30 MB) from
the nor flash, then drop it.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1046aqds: support distro boot
Biwen Li [Mon, 20 Apr 2020 10:29:06 +0000 (18:29 +0800)]
configs: ls1046aqds: support distro boot

Add support of distro boot for ls1046aqds

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028aqds: add lpuart config
Yuantian Tang [Wed, 22 Apr 2020 03:34:39 +0000 (11:34 +0800)]
configs: ls1028aqds: add lpuart config

Add lpuart config to enable lpuart feature.

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>.
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1028aqds: add lpuart dts support
Yuantian Tang [Thu, 19 Mar 2020 08:48:25 +0000 (16:48 +0800)]
armv8: ls1028aqds: add lpuart dts support

Rename fsl-ls1028a-qds.dts to fsl-ls1028a-qds.dtsi so that
it can be used as common device tree for lpuart and duart.
Add lpuart device tree and duart device tree respectively
for qds which are used with duart and lpuart console.

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1028a: add lpuart nodes
Yuantian Tang [Thu, 19 Mar 2020 08:48:24 +0000 (16:48 +0800)]
arm: dts: ls1028a: add lpuart nodes

Add lpuart nodes to enable lpuart feature

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: freescale: ls1028a: mux changes for lpuart
Yuantian Tang [Thu, 19 Mar 2020 08:48:23 +0000 (16:48 +0800)]
board: freescale: ls1028a: mux changes for lpuart

mux changes in board file to enable lpuart1 and macro
define for lpuart1 used for mux changes in board configuation
register 13

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: lx2160ardb: enable CONFIG_DM_ETH and related
Ioana Ciornei [Wed, 18 Mar 2020 14:47:49 +0000 (16:47 +0200)]
configs: lx2160ardb: enable CONFIG_DM_ETH and related

Enable CONFIG_DM_ETH and CONFIG_DM_MDIO and related configs for the
LX2160ARDB board.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls2088ardb: enable CONFIG_DM_ETH and related
Ioana Ciornei [Wed, 18 Mar 2020 14:47:48 +0000 (16:47 +0200)]
configs: ls2088ardb: enable CONFIG_DM_ETH and related

Enable CONFIG_DM_ETH and CONFIG_DM_MDIO and related configs for the
LS2088ARDB board.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1088ardb: enable CONFIG_DM_ETH and related
Ioana Ciornei [Wed, 18 Mar 2020 14:47:47 +0000 (16:47 +0200)]
configs: ls1088ardb: enable CONFIG_DM_ETH and related

Enable CONFIG_DM_ETH and CONFIG_DM_MDIO and related configs for the
LS1088ARDB board.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1088ardb: add DPMAC and PHY nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:46 +0000 (16:47 +0200)]
arm: dts: ls1088ardb: add DPMAC and PHY nodes

In order to maintain compatibility with the Linux DTS, the entire fsl-mc
node is added but instead of being probed by a dedicated bus driver it
will be a simple-mfd.

Also, annotate the external MDIO nodes and describe the PHYs (8 x
VSC8514, AQR105). Also, add phy-handles for the dpmacs to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls2088ardb: add DPMAC and PHY nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:45 +0000 (16:47 +0200)]
arm: dts: ls2088ardb: add DPMAC and PHY nodes

In order to maintain compatibility with the Linux DTS, the entire fsl-mc
node is added but instead of being probed by a dedicated bus driver it
will be a simple-mfd.

Also, annotate the external MDIO nodes and describe the PHYs (4 x AQR405
and 4 x CS4340). Also, add phy-handles for the dpmacs to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160ardb: add DPMAC and PHY nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:44 +0000 (16:47 +0200)]
arm: dts: lx2160ardb: add DPMAC and PHY nodes

In order to maintain compatibility with the Linux DTS, the entire fsl-mc
node is added but instead of being probed by a dedicated bus driver it
will be a simple-mfd.

Also, annotate the EMDIO1 node and describe the 2 AR8035 RGMII PHYs and
the 2 AQR107 PHYs. Also, add phy-handles for the dpmacs to their
associated PHY.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1088a: add external MDIO nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:43 +0000 (16:47 +0200)]
arm: dts: ls1088a: add external MDIO nodes

Add the External MDIO1 device node found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls2088a: add external MDIO nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:42 +0000 (16:47 +0200)]
arm: dts: ls2088a: add external MDIO nodes

Add the External MDIO1 device node found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160a: add external MDIO nodes
Ioana Ciornei [Wed, 18 Mar 2020 14:47:41 +0000 (16:47 +0200)]
arm: dts: lx2160a: add external MDIO nodes

Add the External MDIO device nodes found in the WRIOP global memory
region. This is needed for management of external PHYs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: ls2088ardb: transition to DM_ETH
Ioana Ciornei [Wed, 18 Mar 2020 14:47:40 +0000 (16:47 +0200)]
board: ls2088ardb: transition to DM_ETH

In case CONFIG_DM_ETH is enabled, no hardcoding is necessary for
DPAA2 Ethernet devices. Compile out any unnecessary setup when
CONFIG_DM_ETH is activated.
Also, force the PCI devices to be enumerated at probe time.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: ls1088ardb: transition to DM_ETH
Ioana Ciornei [Wed, 18 Mar 2020 14:47:39 +0000 (16:47 +0200)]
board: ls1088ardb: transition to DM_ETH

In case CONFIG_DM_ETH is enabled, no hardcoding is necessary for
DPAA2 Ethernet devices. Compile out any unnecessary setup when
CONFIG_DM_ETH is activated.
Also, force the PCI devices to be enumerated at probe time.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: fsl-mc: add support for CONFIG_DM_ETH
Ioana Ciornei [Wed, 18 Mar 2020 14:47:38 +0000 (16:47 +0200)]
drivers: net: fsl-mc: add support for CONFIG_DM_ETH

Make any adjustments necessary in order to support DPAA2 devices probed
using CONFIG_DM_ETH. While at it, fixup some styling issues aroung the
switch-case statement.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: ldpaa: add DTS based probing support
Ioana Ciornei [Wed, 18 Mar 2020 14:47:37 +0000 (16:47 +0200)]
drivers: net: ldpaa: add DTS based probing support

When CONFIG_DM_ETH is enabled DPAA2 network interfaces will now probe
based on DTS nodes with the "fsl,qoriq-mc-dpmac" compatible.
In this case, transform the ldpaa_eth driver into a UCLASS_ETH driver
and reuse the _open()/_tx()/_stop() functions already inplemented.

For the moment, the ldpaa_eth driver will support both configurations:
with or without CONFIG_DM_ETH enabled. Any 'struct eth_device' occurrence
now has a matching 'struct udevice' made mutually exclusive based on the
state of CONFIG_DM_ETH.

Signed-off-by: Florin Laurentiu Chiculita <florinlaurentiu.chiculita@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: add Layerscape mEMAC MDIO driver
Ioana Ciornei [Wed, 18 Mar 2020 14:47:36 +0000 (16:47 +0200)]
drivers: net: add Layerscape mEMAC MDIO driver

Add a driver for the MDIO interface integrated in the mEMAC (Multi-rate
Ethernet Media Access Controller) and the Fman 10G Ethernet MACs.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoARM: dts: rmobile: Scrub unused DT nodes
Marek Vasut [Sun, 5 Apr 2020 16:08:58 +0000 (18:08 +0200)]
ARM: dts: rmobile: Scrub unused DT nodes

Remove DT nodes which are not used by U-Boot, like audio and video in/out
nodes. This saves about 35 kiB on the resulting U-Boot binary without any
impact on functionality.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoMerge branch 'migrate-various-PHY-options'
Tom Rini [Tue, 28 Apr 2020 20:41:00 +0000 (16:41 -0400)]
Merge branch 'migrate-various-PHY-options'

- Finish migration of CONFIG_PHYLIB and a number of related symbols to
  defconfig files.

4 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 28 Apr 2020 20:15:47 +0000 (16:15 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoConvert CONFIG_PHYLIB et al to Kconfig
Tom Rini [Fri, 24 Apr 2020 19:35:53 +0000 (15:35 -0400)]
Convert CONFIG_PHYLIB et al to Kconfig

This converts the following to Kconfig:
   CONFIG_PHYLIB
   CONFIG_BITBANGMII
   CONFIG_MV88E6352_SWITCH
   CONFIG_MV88E61XX_SWITCH
   CONFIG_PHYLIB_10G
   CONFIG_PHY_AQUANTIA
   CONFIG_PHY_ATHEROS
   CONFIG_PHY_BROADCOM
   CONFIG_PHY_CORTINA
   CONFIG_PHY_DAVICOM
   CONFIG_PHY_ET1011C
   CONFIG_PHY_LXT
   CONFIG_PHY_MARVELL
   CONFIG_PHY_MICREL
   CONFIG_PHY_NATSEMI
   CONFIG_PHY_REALTEK
   CONFIG_RTL8211X_PHY_FORCE_MASTER
   CONFIG_PHY_SMSC
   CONFIG_PHY_TERANETICS
   CONFIG_PHY_TI
   CONFIG_PHY_VITESSE
   CONFIG_PHY_XILINX

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agosunxi: Fix PHY regression on A20-OLinuXino-Lime2 and A20-Olimex-SOM-EVB
Tom Rini [Fri, 24 Apr 2020 16:30:45 +0000 (12:30 -0400)]
sunxi: Fix PHY regression on A20-OLinuXino-Lime2 and A20-Olimex-SOM-EVB

When moving the PHYLIB PHY drivers around in Kconfig we did not at the
same time perform a careful migration of the related drivers and
sub-options.  This lead to the case where previously Kconfig-enabled
driver choices were now disabled on some platforms.  Correct this by
enabling both the PHY driver and sub-option on the above referenced
platforms.

Fixes: af2cbfd6b982 ("drivers: net: Provide Kconfig menu for PHYLIB")
Fixes: 8728c97eff5b ("configs: Re-sync")
Reported-by: Dario <dario86@tutamail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoPrepare v2020.07-rc1 v2020.07-rc1
Tom Rini [Tue, 28 Apr 2020 19:55:57 +0000 (15:55 -0400)]
Prepare v2020.07-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agokbuild: SPL/TPL: generate separate asm-offsets.h for SPL and TPL
Masahiro Yamada [Fri, 17 Apr 2020 07:21:37 +0000 (16:21 +0900)]
kbuild: SPL/TPL: generate separate asm-offsets.h for SPL and TPL

Currently generic-asm-offsets.h and asm-offsets.h are generated based
on U-Boot proper config options. The same asm-offsets headers are used
for building U-Boot SPL/TPL, which causes potential offset mismatch if
U-Boot proper has different config options from U-Boot SPL/TPL.

This commit adds:
  spl/include/generated/(generic-)asm-offsets.h
  tpl/include/generated/(generic-)asm-offsets.h

spl/include/generated/(generic-)asm-offsets.h is generated if
CONFIG_SPL=y, and included when building SPL.

tpl/include/generated/(generic-)asm-offsets.h is generated if
CONFIG_TPL=y, and included when building TPL.

They are created before Kbuild descends into SPL/TPL object directories
and builds $(obj)/dts/dt-platdata.o because $(obj)/dts/dt-platdata.c
includes a bunch of headers.

Prepend -I$(obj)/include to $(UBOOTINCLUDE) so (generic-)asm-offsets.h
is searched in {spl,tpl}/include/generated/.

Requested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoARM: dts: rmobile: Synchronize Gen3 DTs with Linux 5.6.2
Marek Vasut [Sat, 4 Apr 2020 14:12:48 +0000 (16:12 +0200)]
ARM: dts: rmobile: Synchronize Gen3 DTs with Linux 5.6.2

Synchronize R-Car Gen3 device trees with Linux 5.6.2,
commit 9fbe5c87eaa9b72db08425c52c373eb5f6537a0a .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoARM: dts: rmobile: Synchronize Gen2 DTs with Linux 5.6.2
Marek Vasut [Sat, 4 Apr 2020 13:21:26 +0000 (15:21 +0200)]
ARM: dts: rmobile: Synchronize Gen2 DTs with Linux 5.6.2

Synchronize R-Car Gen2 device trees with Linux 5.6.2,
commit 9fbe5c87eaa9b72db08425c52c373eb5f6537a0a .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoARM: rmobile: Unify Gen3 Salvator-X(S) and ULCB defconfigs
Marek Vasut [Sun, 5 Apr 2020 16:17:42 +0000 (18:17 +0200)]
ARM: rmobile: Unify Gen3 Salvator-X(S) and ULCB defconfigs

The r8a779{5,6,65}_salvator-x and r8a779{5,6,65}_ulcb_defconfig were
building the same target, except for the default DT. The default DT is
however only a detail, as the actual DT to be used to configure U-Boot
is detected automatically based on the CPU ID, hence the default DT is
not meaningful. Unify each three defconfigs per board to reduce the
duplication.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoMerge tag 'u-boot-amlogic-20200428' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 28 Apr 2020 14:09:16 +0000 (10:09 -0400)]
Merge tag 'u-boot-amlogic-20200428' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- fix sd-emmc controller A init on G12A/G12B/SM1 SoCs
- add GXBB USB PHY driver
- enable access to SPI NOR Flash on VIM2 and VIM3/VIM3L boards
- fix USB PHYs Power-Up on on VIM3/VIM3L boards

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Tue, 28 Apr 2020 14:08:47 +0000 (10:08 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- DWC2/DWC3 improvements
- Assorted bugfixes

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Tue, 28 Apr 2020 14:08:20 +0000 (10:08 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

4 years agoMerge tag 'dm-pull-27apr20' of git://git.denx.de/u-boot-dm
Tom Rini [Tue, 28 Apr 2020 13:52:01 +0000 (09:52 -0400)]
Merge tag 'dm-pull-27apr20' of git://git.denx.de/u-boot-dm

Move Python tools to use absolute paths
Minor buildman fixes for new features
Make libfdt code more similar to upsteam

4 years agolx2160a : Update eMMC boot environment variable
Meenakshi Aggarwal [Mon, 27 Apr 2020 14:26:40 +0000 (19:56 +0530)]
lx2160a : Update eMMC boot environment variable

Update mcinitcmd and bootcmd environment variable for emmc boot.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls208xa: Enable GIC_V3_ITS config
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:35 +0000 (10:19 +0800)]
configs: ls208xa: Enable GIC_V3_ITS config

Enable GIC_V3_ITS config to initialize the GIC redistributor
tables.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028a: Enable GIC_V3_ITS config
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:34 +0000 (10:19 +0800)]
configs: ls1028a: Enable GIC_V3_ITS config

Enable GIC_V3_ITS config to initialize the GIC redistributor
tables.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1088a: Enable GIC_V3_ITS config
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:33 +0000 (10:19 +0800)]
configs: ls1088a: Enable GIC_V3_ITS config

Enable GIC_V3_ITS config to initialize the GIC redistributor
tables.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: Move GIC RD tables init to soc.c
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:32 +0000 (10:19 +0800)]
fsl-layerscape: Move GIC RD tables init to soc.c

Move GIC redistributor tables initialization to CPU setup function.

This patch introduces a GIC redistributor tables init function, and
moves the function of reserving memory for GIC redistributor tables
to soc.c and adds a argument for the memory size to reserve, BTW
rename the function so that it is more readable.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: Kconfig: Select RESV_RAM if GIC_V3_ITS
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:31 +0000 (10:19 +0800)]
fsl-layerscape: Kconfig: Select RESV_RAM if GIC_V3_ITS

The GIC redistributor tables initialization depends on RESV_RAM config,
so select RESV_RAM if GIC_V3_ITS is enabled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: lx2160a: Align RD tables address to 64KB
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:30 +0000 (10:19 +0800)]
board: lx2160a: Align RD tables address to 64KB

As the lower 16bit of the redistributor pending table is reserved
for describing the memory attributes, we must give a 64KB aligned
address to the GIC LPI initialization function.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: lx2160a: Add check in GIC RD tables init
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:29 +0000 (10:19 +0800)]
board: lx2160a: Add check in GIC RD tables init

Program the GIC redistributor tables only when succeeded to reserve memory
for them, otherwise kernel will lose the chance to program them using
allocated memory.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: Add RESV_RAM check in resv_ram addr
Hou Zhiqiang [Tue, 28 Apr 2020 02:19:28 +0000 (10:19 +0800)]
fsl-layerscape: Add RESV_RAM check in resv_ram addr

The initialization of gd->arch.resv_ram pointer should depend on if the
RESV_RAM config is enabled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Wasim Khan <wasim.khan@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1046ardb: update the DIMM WRLVL_START value
Yuantian Tang [Mon, 20 Apr 2020 04:52:54 +0000 (12:52 +0800)]
armv8: ls1046ardb: update the DIMM WRLVL_START value

The WRLVL_START values are optimized for old DDR MTA18ASF1G72AZ.
Update DDR struct to set new WRLVL_START values so that the new DIMM
MTA18ADF2G72AZ get optimized and the old DIMM still works.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1021a: Append CMA configuration to bootargs
Alison Wang [Thu, 23 Apr 2020 14:37:34 +0000 (22:37 +0800)]
configs: ls1021a: Append CMA configuration to bootargs

The default reserved memory for CMA is high memory. If LPAE is enabled,
highmem pages are non-remapped and can not be used with
dma_alloc_coherent. Reserving low memory for CMA is needed for LS1021A.
This patch appends the related CMA configuration to bootargs.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoinclude/configs: ls1012afrwy: support dhcp boot
Biwen Li [Wed, 22 Apr 2020 10:06:58 +0000 (18:06 +0800)]
include/configs: ls1012afrwy: support dhcp boot

Add support of dhcp boot for ls1012afrwy

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agousb: host: dwc3-sti-glue: Use UCLASS_NOP instead of UCLASS_MISC
Patrice Chotard [Tue, 28 Apr 2020 11:49:50 +0000 (13:49 +0200)]
usb: host: dwc3-sti-glue: Use UCLASS_NOP instead of UCLASS_MISC

dwc3-sti-glue has been broken since MISC uclass has been
modified to scan DT sub-nodes after bind.
Fixing it by a using the no-op uclass.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
4 years agousb: host: dwc2: add trace to have clean usb start
Patrick Delaunay [Mon, 27 Apr 2020 13:30:01 +0000 (15:30 +0200)]
usb: host: dwc2: add trace to have clean usb start

Solve issue for the display of "usb start" command on stm32mp1
because one carriage return is missing in DWC2 probe.

Before the patch:

STM32MP> usb start
starting USB...
Bus usb-otg@49000000:    Bus usbh-ehci@5800d000:   USB EHCI 1.00

after the patch:

STM32MP> usb start
starting USB...
Bus usb-otg@49000000: USB DWC2
Bus usbh-ehci@5800d000: USB EHCI 1.00

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agousb: host: dwc2: force reset assert
Patrick Delaunay [Mon, 27 Apr 2020 13:30:00 +0000 (15:30 +0200)]
usb: host: dwc2: force reset assert

Assert reset before deassert in dwc2_reset;
this patch solve issues when the DWC2 registers are already
initialized with value incompatible with host mode.

Force a hardware reset of the IP reset all the DWC2 registers at
default value, the host driver start with a clean state
(Core Soft reset doen in dwc_otg_core_reset is not enought
 to reset all register).

The error can occurs in U-Boot when DWC2 device gadget driver
force device mode (called by ums or dfu command, before to execute
the usb start command).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agousb: host: dwc2: add clk support
Patrick Delaunay [Mon, 27 Apr 2020 13:29:59 +0000 (15:29 +0200)]
usb: host: dwc2: add clk support

Add support for clock with driver model.

This patch don't added dependency because when CONFIG_CLK
is not activated the clk function are stubbed.

Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agousb: host: dwc2: add phy support
Patrick Delaunay [Mon, 27 Apr 2020 13:29:58 +0000 (15:29 +0200)]
usb: host: dwc2: add phy support

Use generic phy to initialize the PHY associated to the
DWC2 device and available in the device tree.

This patch don't added dependency because when CONFIG_PHY
is not activated, the generic PHY function are stubbed.

Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agodm: clk: add stub when CONFIG_CLK is deactivated
Patrick Delaunay [Mon, 27 Apr 2020 13:29:57 +0000 (15:29 +0200)]
dm: clk: add stub when CONFIG_CLK is deactivated

Add stub for functions clk_...() when CONFIG_CLK is deactivated.

This patch avoids compilation issues for driver using these API
without protection (#if CONFIG_IS_ENABLED(CLK))

For example, before this patch we have undefined reference to
`clk_disable_bulk') for code:
  clk_disable_bulk(&priv->clks);
  clk_release_bulk(&priv->clks);

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agousb: ether: avoid NULL check before free()
Heinrich Schuchardt [Sun, 19 Apr 2020 10:11:12 +0000 (12:11 +0200)]
usb: ether: avoid NULL check before free()

free() checks if its argument is NULL. Do not duplicate this check.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agousb: avoid NULL check before free
Heinrich Schuchardt [Sun, 19 Apr 2020 10:02:28 +0000 (12:02 +0200)]
usb: avoid NULL check before free

The free() function checks if the argument is NULL.
Do not duplicate this check.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agousb: dwc3-meson-g12a: add power-on/off of the PHYs
Neil Armstrong [Tue, 21 Apr 2020 08:17:42 +0000 (10:17 +0200)]
usb: dwc3-meson-g12a: add power-on/off of the PHYs

Power on/off the PHYs to enable power to the USB ports, fixing USB support
on Khadas VIM3/VIM3L boards.

The G12A USB complex has at least 2 USB2 PHYs, but one is muxed between the
DWC2 and DWC3 controller and the other one directly connected to the DWC3
controller. The USB3+PCIe combo PHY is muxed between the DWC3 controller
and a DW-PCIE controller.
All PHYs are optional, but it's type (usb2/usb3) and position are important
to determine it's capabilities, thus they are stored in a fixed size
array and the phy-name determines it's position, it's position determining
it's type and functionnalities.
This is why we need to loop over the array to power on all the DT provided
PHYs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Marek Vasut <marex@denx.de>
4 years agoconfigs: khadas-vim3: enable support for SPI NOR flash
Neil Armstrong [Mon, 20 Apr 2020 13:44:45 +0000 (15:44 +0200)]
configs: khadas-vim3: enable support for SPI NOR flash

Enable the necessary configs to make usage of the SPI NOR Flash.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoarm: dts: meson-khadas-vim3: enable SPI NOR flash
Neil Armstrong [Mon, 20 Apr 2020 13:44:44 +0000 (15:44 +0200)]
arm: dts: meson-khadas-vim3: enable SPI NOR flash

Enable the SPI flash controller and reduce the usable eMMC data pins to 4
to permit using the on-board SPI NOR Flash.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoconfigs: khadas-vim2: enable support for SPI NOR flash
Neil Armstrong [Mon, 20 Apr 2020 13:44:43 +0000 (15:44 +0200)]
configs: khadas-vim2: enable support for SPI NOR flash

Add the necessary configs to use the SPI NOR flash.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoarm: dts: meson-gxm-khadas-vim2-u-boot: enable SPI NOR flash
Neil Armstrong [Mon, 20 Apr 2020 13:44:42 +0000 (15:44 +0200)]
arm: dts: meson-gxm-khadas-vim2-u-boot: enable SPI NOR flash

Activate the on-board SPI NOR Flash by enabling the SPI controller and
disabling the DS eMMC pin in the VIM2 u-boot.dtsi file.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoarm64: dts: meson: sync dt and bindings from v5.7-rc1
Neil Armstrong [Mon, 20 Apr 2020 13:44:41 +0000 (15:44 +0200)]
arm64: dts: meson: sync dt and bindings from v5.7-rc1

Sync the device tree and dt-bindings from Linux v5.7-rc1 8f3d9f354286
("Linux 5.7-rc1").

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agophy: meson: add GXBB PHY driver
Beniamino Galvani [Sun, 18 Aug 2019 13:42:54 +0000 (15:42 +0200)]
phy: meson: add GXBB PHY driver

This adds support for the USB PHY found on Amlogic GXBB SoCs.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoclk: meson: g12a: add missing SD_EMMC_A controller gates
Neil Armstrong [Mon, 20 Apr 2020 13:46:30 +0000 (15:46 +0200)]
clk: meson: g12a: add missing SD_EMMC_A controller gates

Add missing SD_EMMC_A controller gates needed for probe of the A
controller, otherwise leading to a freeze of the SoC after b3d69aa596.

Fixes: b3d69aa596 ("clk: meson: reset mmc clock on probe")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoMerge branch '2020-04-27-master-imports'
Tom Rini [Mon, 27 Apr 2020 21:50:43 +0000 (17:50 -0400)]
Merge branch '2020-04-27-master-imports'

- Assorted bugfixes.
- Documentation improvements including support for https://u-boot.readthedocs.io/

4 years agoMerge tag 'mips-pull-2020-04-27' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 27 Apr 2020 21:50:35 +0000 (17:50 -0400)]
Merge tag 'mips-pull-2020-04-27' of https://gitlab.denx.de/u-boot/custodians/u-boot-mips

- brcmnand: fix missing code path from Linux driver
- bmips: fix build error when disabling USB
- mips: add option to restore original exception vector base
- mips: fix off-by-one error when clearing gd_data
- mips: minor fixes for compatibility with generic SPL framework
- spl: refactor legacy image loading
- spl: add LZMA decompression support for legacy images
- Makefile: add target to build LZMA compressed U-Boot images
- mtmips: refactor and rewrite low-level init code
- mtmips: add and enable SPL support with LZMA
- mtmips: add support for MT7628 reference board
- mtmips: add support for VoCore/VoCore2 board

4 years agoMerge tag 'arc-more-fixes-for-2020.07-rc1' of https://gitlab.denx.de/u-boot/custodian...
Tom Rini [Mon, 27 Apr 2020 21:50:11 +0000 (17:50 -0400)]
Merge tag 'arc-more-fixes-for-2020.07-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-arc

Here we introduce new development platfrom for ARC: HSDK 4xD.
That's pretty much the same base-board as in HSDK but with
very recent quad-core ARC HS47D in the ASIC.

Thus we try to re-use existing code as much as possible while
inevitably add some pieces needed for the new ASIC.

Also we drop selection of bounce buffers on AXS10x
as there's no use of them any longer.