]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 years agopci: Remove CONFIG_PCI_ENUM_ONLY as it's not used (any more)
Stefan Roese [Tue, 12 Jan 2021 11:03:43 +0000 (12:03 +0100)]
pci: Remove CONFIG_PCI_ENUM_ONLY as it's not used (any more)

This patch completely removes CONFIG_PCI_ENUM_ONLY from the PCI code as
it is not configured for any board (any more). With this removal, some
PCI related files get cleaned up a bit.

Additional, dm_pciauto_setup_device() is now static, as it's not
referenced from any code outside of this C file.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agocommon: fit-sig: Fix error message in fit_config_verify_sig()
Alexandru Gagniuc [Mon, 11 Jan 2021 14:46:58 +0000 (08:46 -0600)]
common: fit-sig: Fix error message in fit_config_verify_sig()

In fit_config_verify_sig(), when no 'signature*' subnode exists in
the configuration node, the fdt_for_each_subnode() loop is a no-op.
Therefore, no error flags are set, and 'err_,sg' is not populated
with an error string. This is incorrect behavior.

Populate err_msg to indicate that no 'signature' is found, before
entering the loop. The first call to fit_image_verify_sig() will
override clear err_msg, or set it to a more specific message.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosmccc: fix sign bit expansion
Volodymyr Babchuk [Tue, 5 Jan 2021 20:03:11 +0000 (20:03 +0000)]
smccc: fix sign bit expansion

Signed ARM_SMCCC_FAST_CALL value is shifted to 31'st bit. Then, it is expanded
to 64 bit value, which results in 1s in higher 32 bits.

This causes corrupted values in 64-bit SMC IDs and issues in buggy handlers of
32-bit calls.

We need to make ARM_SMCCC_FAST_CALL unsigned long, so it would work properly
on 32 bit architectures.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
3 years agobootcount: allow to use this feature on TPL
Philippe Reynes [Fri, 11 Dec 2020 18:56:47 +0000 (19:56 +0100)]
bootcount: allow to use this feature on TPL

This commit add an option TPL_BOOTCOUNT_LIMIT to
use bootcount on TPL.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoMakefile: Do not call useless command 'true'
Pali Rohár [Wed, 4 Nov 2020 14:33:44 +0000 (15:33 +0100)]
Makefile: Do not call useless command 'true'

Macro 'cmd_objcopy_uboot' currently does not work with passed empty command
expanded from 'cmd_static_rela' and therefore dummy command 'true' is set
in 'cmd_static_rela' to workaround this issue.

Eliminate it now by fixing 'cmd_objcopy_uboot' macro to work also with
empty 'cmd_static_rela' macro and remove useless invocation of command
'true'.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Wed, 27 Jan 2021 16:39:31 +0000 (11:39 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Espressobin: Disable slot when emmc is not present (Pali)
- DS414; config header cleanup (Phil)
- PCI: auto-config enhancement (Phil)
- pci_mvebu: Also map IO region (Phil)
- serial: a3720: Implement pending method for output direction (Pali)
- turris_mox: Enable a few commands (Marek)
- helios4 & ClearFog changes (Dennis)
- Plus some minor misc changes

3 years agoMerge tag 'doc-2021-04-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 27 Jan 2021 16:32:23 +0000 (11:32 -0500)]
Merge tag 'doc-2021-04-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for documentation tag doc-2021-04-rc1-3

Update the build system for the HTML documentation to allow using
Sphinx 3.

Man-page for exception command.

3 years agoMerge branch '2021-01-27-assorted-net-updates'
Tom Rini [Wed, 27 Jan 2021 16:30:31 +0000 (11:30 -0500)]
Merge branch '2021-01-27-assorted-net-updates'

- e1000 fixes for MIPS
- netconsole and ping fix
- cortina_ni driver
- micrel PHY fix
- Add fdtoverlays keyword to extlinux file parsing

3 years agocmd: pxe: add support for FDT overlays
Neil Armstrong [Wed, 20 Jan 2021 08:54:53 +0000 (09:54 +0100)]
cmd: pxe: add support for FDT overlays

This adds support for specifying FDT overlays in an extlinux/pxelinux
configuration file.

Without this, there is no simple way to apply overlays when the kernel
and fdt is loaded by the pxe command.

This change adds the 'fdtoverlays' keyword for a label, supporting multiple
overlay files to be applied on top of the fdt specified in the 'fdt' or
'devicetree' keyword.

Example:
  label linux
    kernel /Image
    fdt /soc-board.dtb
    fdtoverlays /soc-board-function.dtbo
    append console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait

This code makes usage of a new variable called fdtoverlay_addr_r used to load
the overlay files without overwritting anything important.

Cc: Tom Rini <trini@konsulko.com>
Cc: Andre Heider <a.heider@gmail.com>
Cc: Jernej Škrabec <jernej.skrabec@siol.net>
Cc: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Jernej Škrabec <jernej.skrabec@siol.net>
Reviewed-by: Jernej Škrabec <jernej.skrabec@siol.net>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
3 years agonet: phy: micrel: Try default PHY ofnode first
Marek Vasut [Sat, 16 Jan 2021 23:16:16 +0000 (00:16 +0100)]
net: phy: micrel: Try default PHY ofnode first

The phydev structure has a PHY OF node pointer in it, use that OF node
first when looking up PHY OF node properties, since that is likely the
correct PHY OF node pointer. If the pointer is not valid, which is the
case e.g. on legacy DTs, fall back to parsing MAC ethernet-phy subnode.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
3 years agoboard: presidio-asic: Add CAxxxx Ethernet support
Alex Nemirovsky [Thu, 14 Jan 2021 21:34:13 +0000 (13:34 -0800)]
board: presidio-asic: Add CAxxxx Ethernet support

Add CAxxxx Ethernet support for the Cortina Access
Presidio Engineering Board

Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
CC: Tom Rini <trini@konsulko.com>
3 years agonet: phy: ca_phy: Add driver for CAxxxx SoCs
Abbie Chang [Thu, 14 Jan 2021 21:34:12 +0000 (13:34 -0800)]
net: phy: ca_phy: Add driver for CAxxxx SoCs

Add phy driver support for MACs embedded inside Cortina Access SoCs

Signed-off-by: Abbie Chang <abbie.chang@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
CC: Tom Rini <trini@konsulko.com>
CC: Aaron Tseng <aaron.tseng@cortina-access.com>
Moved out PHY specific code out of Cortina NI Ethernet driver
and into a Cortina Access PHY interface driver

3 years agonet: cortina_ni: Add eth support for Cortina Access CAxxxx SoCs
Aaron Tseng [Thu, 14 Jan 2021 21:34:11 +0000 (13:34 -0800)]
net: cortina_ni: Add eth support for Cortina Access CAxxxx SoCs

Add Cortina Access Ethernet device driver for CAxxxx SoCs.
This driver supports both legacy and DM_ETH network models.

Signed-off-by: Aaron Tseng <aaron.tseng@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
Signed-off-by: Abbie Chang <abbie.chang@cortina-access.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
CC: Abbie Chang <abbie.chang@Cortina-Access.com>
CC: Tom Rini <trini@konsulko.com>
3 years agonet: fix ping in netconsole
Yang Liu [Mon, 21 Dec 2020 03:44:39 +0000 (14:44 +1100)]
net: fix ping in netconsole

Should not init eth device when doing ping in netconsole.

Signed-off-by: Yang Liu <yliu@cybertec.com.au>
Cc: Joe Hershberger <joe.hershberger@ni.com>
3 years agonet: e1000: Add missing address translations
Stefan Roese [Mon, 16 Nov 2020 17:02:30 +0000 (18:02 +0100)]
net: e1000: Add missing address translations

Add some missing address translations from virtual address in local DRAM
to physical address, which is needed for the DMA transactions to work
correctly.

This issue was detected while testing the e1000 driver on the MIPS
Octeon III platform, which needs address translation.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
3 years agonet: e1000: Use virt_to_phys() instead of pci_virt_to_mem()
Stefan Roese [Mon, 16 Nov 2020 17:02:29 +0000 (18:02 +0100)]
net: e1000: Use virt_to_phys() instead of pci_virt_to_mem()

Using (dm_)pci_virt_to_mem() is incorrect to translate the virtual
address in local DRAM to a physical address. The correct macro here
is virt_to_phys() so switch to using this macro.

As virt_to_bus() is now not used any more, this patch also removes
both definitions (DM and non-DM).

This issue was detected while testing the e1000 driver on the MIPS
Octeon III platform, which needs address translation.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
3 years agonet: e1000: Remove unused bus_to_phys() macro
Stefan Roese [Mon, 16 Nov 2020 17:02:28 +0000 (18:02 +0100)]
net: e1000: Remove unused bus_to_phys() macro

bus_to_phys() is defined but not referenced at all. This patch removes
it completely.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
3 years agoarm: mvebu: turris_mox: enable setexpr command in defconfig
Marek Behún [Tue, 19 Jan 2021 14:49:26 +0000 (15:49 +0100)]
arm: mvebu: turris_mox: enable setexpr command in defconfig

Enable setexpr command in defconfig for Turris MOX. We have found that
this is sometimes useful in U-Boot scripts and there is enough space in
NOR memory on MOX.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: enable wdt command in defconfig
Marek Behún [Tue, 19 Jan 2021 14:49:25 +0000 (15:49 +0100)]
arm: mvebu: turris_mox: enable wdt command in defconfig

Enable wdt command in defconfig for Turris MOX. This is useful when
doing debugging.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm64: a37xx: pci: Fix printing debug messages
Pali Rohár [Mon, 18 Jan 2021 11:09:33 +0000 (12:09 +0100)]
arm64: a37xx: pci: Fix printing debug messages

Value pcie->dev in function pcie_advk_probe() is not initialized yet
so use dev as argument for dev_dbg()/dev_warn().

Function pcie_advk_wait_pio() itself prints error message on failure
so do not print duplicate error message in caller.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoserial: a3720: Implement pending method for output direction
Pali Rohár [Thu, 14 Jan 2021 14:46:35 +0000 (15:46 +0100)]
serial: a3720: Implement pending method for output direction

To check if some output characters are waiting either in Transmitter
Holding Register or Transmitter Shift Register we need to look at
TX_EMPTY bit of UART Status Register.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agodoc: exception command
Heinrich Schuchardt [Tue, 26 Jan 2021 11:59:09 +0000 (12:59 +0100)]
doc: exception command

Create man-page for exception command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: update Kernel documentation build system
Heinrich Schuchardt [Thu, 31 Dec 2020 22:16:46 +0000 (23:16 +0100)]
doc: update Kernel documentation build system

Update the documentation build system according to Linux v5.11-rc1.

Deactive the automarkup.py extension module which on Gitlab CI is
incompatible with Unicode.

With this patch we can build the HTML documentation using either of
Sphinx 2 and Sphinx 3.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years ago.gitlab-ci: install doc/sphinx/requirements.txt
Heinrich Schuchardt [Mon, 25 Jan 2021 21:06:25 +0000 (22:06 +0100)]
.gitlab-ci: install doc/sphinx/requirements.txt

Install all requirements according to doc/sphinx/requirements.txt in the
virtual environment used for testing 'make htmldocs'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: fix doc/develop/logging.rst
Heinrich Schuchardt [Mon, 25 Jan 2021 20:06:57 +0000 (21:06 +0100)]
doc: fix doc/develop/logging.rst

Sphinx 3 builds fail due to doc/develop/logging.rst producing duplicate
labels.

Include logging.h only once in the API section and use cross-references for
the enums log_level_t and log_category_t.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: board: fix Microchip MPFS Icicle Kit doc
Heinrich Schuchardt [Mon, 25 Jan 2021 19:11:54 +0000 (20:11 +0100)]
doc: board: fix Microchip MPFS Icicle Kit doc

Two sibling headings (here eMMC) cannot have the same title.

Warning, treated as error:
doc/board/microchip/mpfs_icicle.rst:423:duplicate label
board/microchip/mpfs_icicle:emmc, other instance in
doc/board/microchip/mpfs_icicle.rst
make[1]: *** [doc/Makefile:69: htmldocs] Error 2

* Correct the heading levels.
* Add missing empty lines after headings.

Fixes: 9e550e18305f ("doc: board: Add Microchip MPFS Icicle Kit doc")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agopci: pci_mvebu: Define an IO region as well
Phil Sutter [Sun, 3 Jan 2021 22:06:46 +0000 (23:06 +0100)]
pci: pci_mvebu: Define an IO region as well

Configure an IO region and window for PNP identical to how MEM region is
set up. Linux does this only if the DT defines a pcie-io-aperture
property for the SOC, but since all supported boards do this should not
be needed.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agopci: Make auto-config code a little more robust
Phil Sutter [Sun, 3 Jan 2021 22:06:45 +0000 (23:06 +0100)]
pci: Make auto-config code a little more robust

On my DS414, some PCI devices return odd values when probing BAR sizes.
An obvious case is all-ones response, the Linux driver
(drivers/pci/probe.c) catches those explicitly and a comment explains
that either bit 0 or bit 1 must be clear (depending on MEM or IO type).
Other BARs return e.g. 0xfff0000f or 0xfff00004 and thus manage to break
size calculation due to the "middle" zeroes. Mitigate that copying more
or less what Linux does and do a "find least bit set".

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoarm: mvebu: ds414: Config header mini-review
Phil Sutter [Sun, 3 Jan 2021 22:06:44 +0000 (23:06 +0100)]
arm: mvebu: ds414: Config header mini-review

A few minor changes:

* Get rid of leftover comments, other commits removed the defines they
  referred to.

* CONFIG_SYS_NETA_INTERFACE_TYPE is not used anymore since commit
  e3b9c98a23ca9 ("net: mvneta: Convert to driver model").

* Drop CONFIG_USB_MAX_CONTROLLER_COUNT: it is per-HCI type, so XHCI and
  EHCI could still both work be used.

* Unconditionally define CONFIG_EHCI_IS_TDI: it has no effect on XHCI so
  that conditional doesn't make any sense.

* Define a larger PHY_ANEG_TIMEOUT: In my test bed, the NIC is directly
  connected to some RTL8111 and the default 8s timeout was often too
  short.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: Espressobin: Disable slot when emmc is not present
Pali Rohár [Mon, 21 Dec 2020 10:09:10 +0000 (11:09 +0100)]
arm: mvebu: Espressobin: Disable slot when emmc is not present

This change extends previous commit 061c6d1b238a ("arm: mvebu: Espressobin:
Detect presence of emmc at runtime") and when emmc is not present then emmc
is removed from U-Boot DM and corresponding slot is disabled. Therefore on
Espressobin board without soldered emmc, state of emmc hw should be same as
if emmc was disabled in DTS.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoARM: mvebu: ClearFog make sure that SATA and UART images are buildable
Dennis Gilmore [Wed, 9 Dec 2020 03:07:38 +0000 (21:07 -0600)]
ARM: mvebu: ClearFog make sure that SATA and UART images are buildable

SATA and UART ClearFog imaages are not buildable as ENV_SECT_SIZE is not defined
set values for both possible targets

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
3 years agoARM: mvebu: helios4 dts changes to enable SPI
Dennis Gilmore [Wed, 9 Dec 2020 03:07:37 +0000 (21:07 -0600)]
ARM: mvebu: helios4 dts changes to enable SPI

Move all aliases defintions into the main dts file
Add u-boot definiton to i2c0 based on clearfog
set spi1 status to okay

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
3 years agoARM: mvebu: helios4 adjust env sizes to enable SPI to work
Dennis Gilmore [Wed, 9 Dec 2020 03:07:36 +0000 (21:07 -0600)]
ARM: mvebu: helios4 adjust env sizes to enable SPI to work

mirror the clearfog setup to enable SPI to work

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
3 years agogpio: Add support for DM GPIO for Kirkwood
Harm Berntsen [Sun, 29 Nov 2020 10:08:02 +0000 (10:08 +0000)]
gpio: Add support for DM GPIO for Kirkwood

The Armada driver also works on Nedap's custom Kirkwood board with a
Marvell 88F6180 CPU. The original commit of that driver,
commit 704d9a645e17 ("gpio: Add DM GPIO driver for Marvell MVEBU"),
also mentions that this driver would be suitable for Kirkwood. This
does not completely replace the Kirkwood specific driver as there
are still boards depending on that driver.

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
CC: Stefan Roese <sr@denx.de>,
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoARM: Distro boot: document the need for fdtfile variable to be set
Dennis Gilmore [Fri, 11 Sep 2020 16:56:59 +0000 (11:56 -0500)]
ARM: Distro boot: document the need for fdtfile variable to be set

When testing builds provided in https://github.com/openwrt/openwrt/pull/3360
I discovered that fdtfile was not set and as a result the firmware was not
functional. So I am documenting what is needed.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Cc: Atish Patra <atish.patra@wdc.com>
Cc: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Vagrant Cascadian <vagrant@debian.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Karsten Merker <merker@debian.org>
3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Tue, 26 Jan 2021 00:46:02 +0000 (19:46 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi

- New Allwinner H616 SoC support (sans Ethernet & USB)
- H6 DT update
- Tanix TX6 TV box support
- OrangePi 3 support
- OrangePi Zero2 (H616) support

3 years agosunxi: Add support for OrangePi Zero2
Jernej Skrabec [Mon, 11 Jan 2021 20:11:53 +0000 (21:11 +0100)]
sunxi: Add support for OrangePi Zero2

OrangePi Zero2 is SBC based on Allwinner H616 with 1 GiB of RAM, SD card
support, gigabit ethernet, micro HDMI, WIFI, Bluetooth and 1 USB 2.0
port. It also has two GPIO headers which allows further peripherals to
be used.

The devicetree file is taken from v3 of the OrangePi Zero2 Linux
submission [1], which it's not yet merged.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2021-January/632084.html

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agoclk: sunxi: Add support for H616 clocks
Jernej Skrabec [Mon, 11 Jan 2021 20:11:52 +0000 (21:11 +0100)]
clk: sunxi: Add support for H616 clocks

This commit introduces DM H616 clock driver.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: gpio: introduce compatible for H616
Jernej Skrabec [Mon, 11 Jan 2021 20:11:51 +0000 (21:11 +0100)]
sunxi: gpio: introduce compatible for H616

H616 pinctrl is no different configuration wise than others, so just add
compatible for it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agoarm: sunxi: add initial H616 DTSI and headers
Jernej Skrabec [Mon, 11 Jan 2021 20:11:50 +0000 (21:11 +0100)]
arm: sunxi: add initial H616 DTSI and headers

This commit introduces H616 DTSI file and dt-bindings headers needed for
device tree files.

Files are taken from v3 Linux H616 support submission[1], as the
H616 .dtsi file is not merged upstream yet.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2021-January/632082.html

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Add H616 FEL support
Jernej Skrabec [Mon, 11 Jan 2021 20:11:48 +0000 (21:11 +0100)]
sunxi: Add H616 FEL support

H616 uses different address for reset. Add it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Add support for H616 SoC
Jernej Skrabec [Mon, 11 Jan 2021 20:11:46 +0000 (21:11 +0100)]
sunxi: Add support for H616 SoC

H616 is very similar to H6 so most of the infrastructure can be reused.
However, two big differences are that it doesn't have functional SRAM A2
which is usually used for TF-A and it doesn't have ARISC co-processor.
It also needs bigger SPL size - 48 KiB.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agommc: sunxi: Refactor mod clock register offset
Andre Przywara [Mon, 11 Jan 2021 20:11:44 +0000 (21:11 +0100)]
mmc: sunxi: Refactor mod clock register offset

So far the only difference between the various Allwinner MMC controller
we are concerned about is the mod clock register offset.
This is actually not directly related to the MMC controller IP, but an
integration choice, dependent on the SoC this appears in.

To avoid becoming trapped with some compatible fallback strings, let's
remove the whole struct sunxi_mmc_variant, and replace this with a SoC
based choice, which we can derive from the CONFIG_MACH_SUNx_y symbols.

This will later simplify H616 support.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agosunxi: Add H616 DRAM support
Jernej Skrabec [Mon, 11 Jan 2021 20:11:43 +0000 (21:11 +0100)]
sunxi: Add H616 DRAM support

Allwinner H616 supports many types of DRAM. Most notably it supports
LPDDR4. However, all commercially available boards at this time use
only DDR3, so this commit adds only DDR3 support.

Controller and MBUS are very similar to H6 but PHY is completely
unknown.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: add support for R_I2C on H616
Jernej Skrabec [Mon, 11 Jan 2021 20:11:42 +0000 (21:11 +0100)]
sunxi: add support for R_I2C on H616

This port is needed for communication with PMIC. SPL uses it to set DRAM
voltage on H616 boards.

Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: add support for H616 uart0
Jernej Skrabec [Mon, 11 Jan 2021 20:11:41 +0000 (21:11 +0100)]
sunxi: add support for H616 uart0

This port is used for debug terminal on all known H616 boards.

Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: introduce support for H616 clocks
Jernej Skrabec [Mon, 11 Jan 2021 20:11:40 +0000 (21:11 +0100)]
sunxi: introduce support for H616 clocks

H616 has mostly the same clocks as H6 with some small differences. Just
reuse H6 clocks for H616 and handle differences with macros.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: support loading with SPL > 32KB
Andre Przywara [Mon, 11 Jan 2021 20:11:39 +0000 (21:11 +0100)]
sunxi: support loading with SPL > 32KB

H616 supports and needs bigger SPL than 32 KiB, mostly due to big DRAM
driver and need for PMIC configuration, which pulls several drivers which
are not needed otherwise.

spl_mmc_get_uboot_raw_sector() will now compare pre-configured size with
that, reported in SPL header. If size in header is bigger, it will use
that value instead.

In the process of function rework, also add missing function argument.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
3 years agosunxi: Add support for I2C on H6 like SoCs
Jernej Skrabec [Mon, 11 Jan 2021 20:11:38 +0000 (21:11 +0100)]
sunxi: Add support for I2C on H6 like SoCs

I2C support, especially R_I2C port, will be needed in future. Upcoming
support for H616 will need R_I2C to adjust DRAM voltage.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: prcm: Add memory map for H6 like SoCs
Jernej Skrabec [Mon, 11 Jan 2021 20:11:37 +0000 (21:11 +0100)]
sunxi: prcm: Add memory map for H6 like SoCs

There was no need to have prcm definitions for H6 and similar SoCs till
now. However, support R_I2C will be needed soon in SPL.

Move old definitions to prcm_sun6i.h and add new ones in prcm_sun50i.h.
One of those files will be selected in common prcm.h based on defined
macros.

This commit doesn't do any functional change.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agoi2c: mvtwsi: sunxi: update macro
Jernej Skrabec [Mon, 11 Jan 2021 20:11:36 +0000 (21:11 +0100)]
i2c: mvtwsi: sunxi: update macro

While currently none of the newer Allwinner SoCs currently has I2C
support implemented in U-Boot, this will change soon. mvtwsi driver is
good as it is for them except one macro. Update it to be ready once I2C
support lands for those SoCs.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agommc: sunxi: Replace H6 ifdefs with H6 gen macro
Jernej Skrabec [Mon, 11 Jan 2021 20:11:35 +0000 (21:11 +0100)]
mmc: sunxi: Replace H6 ifdefs with H6 gen macro

It turns out that several SoCs share same mmc configuration as H6. In
order to lower ifdef clutter replace H6 specific macro with common one.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Introduce common symbol for H6 like SoCs
Jernej Skrabec [Mon, 11 Jan 2021 20:11:34 +0000 (21:11 +0100)]
sunxi: Introduce common symbol for H6 like SoCs

It turns out that there are at least 2 other SoCs which have basically
the same memory map, similar clocks and other features as H6. It's very
likely that we'll see more such SoCs in the future. In order to ease
porting to new SoCs and lower ifdef clutter, introduce common symbol for
them.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Add support for AXP305 PMIC
Jernej Skrabec [Mon, 11 Jan 2021 20:11:33 +0000 (21:11 +0100)]
sunxi: Add support for AXP305 PMIC

This PMIC can be found on H616 boards and it's very similar to AXP805
and AXP806.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Properly check for SATAPWR and MACPWR
Andre Przywara [Mon, 18 Jan 2021 23:23:59 +0000 (23:23 +0000)]
sunxi: Properly check for SATAPWR and MACPWR

The #ifdef CONFIG_xxxPWR conditionals were not working as expected, as
string Kconfig symbols are always "defined" from the preprocessor's
perspective. This lead to unnecessary calls to the GPIO routines, but
also always added a half a second delay to wait for a SATA disk to power
up. Many thanks to Peter for pointing this out!

Fix this by properly comparing the Kconfig symbols against the empty
string. strcmp() would be nicer for this, but GCC does not optimise this
away, probably due to our standalone compiler switches.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Samuel Holland <samuel@sholland.org> # Orange Pi WinPlus
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
3 years agosunxi: Add support for Orange Pi 3
Andre Heider [Fri, 1 Oct 2021 18:29:00 +0000 (19:29 +0100)]
sunxi: Add support for Orange Pi 3

dts file is taken from Linux 5.11-rc1 tag.

The Bluetooth controller of this device ships with a default address,
use the new CONFIG_FIXUP_BDADDR option to fix it up.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
[Updated OrangePi 3 DT, rebase and config update]
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agosunxi: Add support for Tanix TX6
Jernej Skrabec [Wed, 6 Jan 2021 17:02:57 +0000 (18:02 +0100)]
sunxi: Add support for Tanix TX6

This commit adds support for Tanix TX6 TV box, based on H6. It's low end
H6 board, with 3 GiB of RAM, eMMC, fast ethernet, USB, IR and other
peripherals.

DT file is taken from Linux 5.11-rc1 release.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agoARM: dts: sunxi: h6: Update DT files
Jernej Skrabec [Wed, 6 Jan 2021 17:02:56 +0000 (18:02 +0100)]
ARM: dts: sunxi: h6: Update DT files

Updated H6 DT files are based on Linux 5.11-rc1 release.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
3 years agonet: sun8i-emac: Allow all RGMII PHY modes
Andre Przywara [Sat, 14 Nov 2020 17:37:46 +0000 (17:37 +0000)]
net: sun8i-emac: Allow all RGMII PHY modes

So far all GBit users of the sun8i-emac driver were using the "rgmii"
PHY mode, even though this turns out to be wrong. It just worked because
the PHY driver doesn't do the proper setup (yet).
In fact for most boards the "rgmii-id" or "rgmii-txid" PHY modes are the
correct ones.

To allow the DTs to describe the phy-mode correctly, and to stay
compatible with Linux, at least allow those other RGMII modes in the
driver.

This avoids breakage if mainline DTs will be synced with U-Boot.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoMerge tag 'mips-pull-2021-01-24' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 25 Jan 2021 19:38:40 +0000 (14:38 -0500)]
Merge tag 'mips-pull-2021-01-24' of https://gitlab.denx.de/u-boot/custodians/u-boot-mips

- MIPS: add support for Mediatek MT7620 SoCs

3 years agoMerge tag 'u-boot-imx-20210125' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Mon, 25 Jan 2021 14:02:35 +0000 (09:02 -0500)]
Merge tag 'u-boot-imx-20210125' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Changes for 2020.04
-------------------

- new board:
Phytec phyCORE-i.MX8MP
i.MX8MN Beacon EmbeddedWorks devkit

- Fixes:
several nanbcb fixes
fix for imx8mm_beacon
- further switch to distro boot commands
- DM:
DM Ether for MX6UL

CI:

https://gitlab.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/6013

3 years agoMerge tag 'doc-2021-04-rc1-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 25 Jan 2021 14:02:06 +0000 (09:02 -0500)]
Merge tag 'doc-2021-04-rc1-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for documentation tag doc-2021-04-rc1 (2)

* Man-pages for sbi, exit, for, echo, loady, true, false, conitrace
* Adjust suppression of newline in echo command.
* Provide unit test for echo command.

3 years agoMerge tag 'u-boot-atmel-2021.04-b' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 25 Jan 2021 14:01:28 +0000 (09:01 -0500)]
Merge tag 'u-boot-atmel-2021.04-b' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

Second set of u-boot-atmel features for 2021.04 cycle

This feature set includes macb updates for all interfaces and new
sama7g5 variant support; micrel ksz9031 DLL support; a new board from
Giant based on Adafruit feather form factor which contains a SAMA5D27
SoC; several fixes regarding the NAND flash PMECC block; and pincontrol
drive strength support for pio4 controller.

3 years agodoc: describe command conitrace
Heinrich Schuchardt [Mon, 25 Jan 2021 00:11:47 +0000 (01:11 +0100)]
doc: describe command conitrace

Provide a man-page for the conitrace command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: describe the false command
Heinrich Schuchardt [Sun, 24 Jan 2021 21:11:55 +0000 (22:11 +0100)]
doc: describe the false command

Provide a man-page for the false command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodm: core: describe uclass_root_s
Heinrich Schuchardt [Sun, 24 Jan 2021 20:48:00 +0000 (21:48 +0100)]
dm: core: describe uclass_root_s

'make htmldocs' creates a warning:

./include/asm-generic/global_data.h:443:
warning: Function parameter or member 'uclass_root_s'
not described in 'global_data'

Correct the member descriptions.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: document true command
Heinrich Schuchardt [Fri, 22 Jan 2021 18:25:53 +0000 (19:25 +0100)]
doc: document true command

Create a man-page for the true command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: describe loady command
Heinrich Schuchardt [Fri, 22 Jan 2021 18:18:01 +0000 (19:18 +0100)]
doc: describe loady command

Create a man-page for the loady command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agocmd: correct long text loadb, loadx, loady
Heinrich Schuchardt [Fri, 22 Jan 2021 12:16:04 +0000 (13:16 +0100)]
cmd: correct long text loadb, loadx, loady

The first argument is the load address and not an offset.

The second argument cannot be entered without the first one.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodoc: document echo command
Heinrich Schuchardt [Thu, 21 Jan 2021 16:33:44 +0000 (17:33 +0100)]
doc: document echo command

Provide a man-page for the echo command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agotest: unit test for echo command
Heinrich Schuchardt [Thu, 21 Jan 2021 17:41:28 +0000 (18:41 +0100)]
test: unit test for echo command

Provide a unit test for the unit command

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agocmd: change suppress newline in echo command
Heinrich Schuchardt [Wed, 20 Jan 2021 11:13:30 +0000 (12:13 +0100)]
cmd: change suppress newline in echo command

By default the echo command emits its arguments followed by a line feed.

If any of the arguments contains the sub-string "\c", the line feed is
suppressed.

This does not match shells used in Linux and BSD where the first argument
has to be -n to suppress the line feed.

The hush shell interferes with the parsing of backslashes. E.g. in the
following command line quadruple backslashes are required for suppressing
the line feed:

for i in 1 2 3; do for j in 4 5; do echo \\\\c ${i}${j}; done; echo; done;

To avoid unexpected behavior the patch changes echo to use -n as first
argument to suppress the line feed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodoc: document for statement
Heinrich Schuchardt [Wed, 20 Jan 2021 17:09:30 +0000 (18:09 +0100)]
doc: document for statement

Create a man-page for the for statement.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: describe exit command
Heinrich Schuchardt [Wed, 20 Jan 2021 11:14:01 +0000 (12:14 +0100)]
doc: describe exit command

Man-page for exit shell command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: document sbi command
Heinrich Schuchardt [Tue, 19 Jan 2021 18:30:04 +0000 (19:30 +0100)]
doc: document sbi command

Add a man-page for the sbi command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoMAINTAINERS: add maintainer for MediaTek MIPS platform
Weijie Gao [Thu, 12 Nov 2020 08:37:19 +0000 (16:37 +0800)]
MAINTAINERS: add maintainer for MediaTek MIPS platform

Update maintainer for MediaTek MIPS platform

Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agoreset: reset-mtmips: add DM_FLAG_PRE_RELOC flag
Weijie Gao [Thu, 12 Nov 2020 08:37:14 +0000 (16:37 +0800)]
reset: reset-mtmips: add DM_FLAG_PRE_RELOC flag

Add DM_FLAG_PRE_RELOC flag for reset-mtmips to make sure this driver can
be probed before relocation even if u-boot,dm-pre-reloc is not present
in the dts.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agommc: mtk-sd: assign plat->cfg.f_max with a correct value
Weijie Gao [Thu, 12 Nov 2020 08:37:07 +0000 (16:37 +0800)]
mmc: mtk-sd: assign plat->cfg.f_max with a correct value

Currently this driver does not set the value of plat->cfg.f_max, which
results in that MMC framework will always run at the lowest frequency.

This patch sets plat->cfg.f_max to the maximum allowed frequency, which
equals to the source clock frequency.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agommc: mtk-sd: add pad control settings for MediaTek MT7620/MT76x8 SoCs
Weijie Gao [Thu, 12 Nov 2020 08:37:02 +0000 (16:37 +0800)]
mmc: mtk-sd: add pad control settings for MediaTek MT7620/MT76x8 SoCs

The driver is missing pad control settings (pad delay and pad conf) for
the mt7620 and mt76x8. Although mt76x8 still works well, mt7620 will
encounter CRC error on data transfers.

This patch adds default pad control settings for mt7620_compat.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agommc: mtk-sd: fix sclk cycles shift value
Weijie Gao [Thu, 12 Nov 2020 08:36:57 +0000 (16:36 +0800)]
mmc: mtk-sd: fix sclk cycles shift value

It turns out that the sclk cycles used by mt7620/mt7628 is the same as
other chips (20 bits, 1048576), not 65536.

This patch removes sclk_cycle_shift from dev_comp, and uses a macro with
a value 20 instead.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agonet: add ethernet driver for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:53 +0000 (16:36 +0800)]
net: add ethernet driver for MediaTek MT7620 SoC

This patch adds  ethernet driver for MediaTek MT7620 SoC.

The MT7620 SoC has a built-in ethernet (Frame Engine) and a built-in
7-port switch and two xMII interfaces (can be MII/RMII/RGMII).

The port 0-3 of the switch connects to intergrited FE PHYs. Port 4 can be
configured to connect to either the intergrited FE PHY, or the xMII.
Port 5 always connects to the xMII. Port 6 is the CPU port.

This driver supports MT7530 giga switch connects to port 5.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agophy: add USB PHY driver for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:48 +0000 (16:36 +0800)]
phy: add USB PHY driver for MediaTek MT7620 SoC

This patch adds USB PHY driver for MediaTek MT7620 SoC

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agospi: add spi controller support for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:42 +0000 (16:36 +0800)]
spi: add spi controller support for MediaTek MT7620 SoC

This patch adds spi controller support for MediaTek MT7620 SoC.

The SPI controller supports two chip selects. These two chip selects are
implemented as two separate register groups, but they share the same bus
(DI/DO/CLK), only CS pins are dedicated for each register group.
Appearently these two register groups cannot operates simulataneously so
they are implemented as one controller.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agogpio: add GPIO controller driver for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:33 +0000 (16:36 +0800)]
gpio: add GPIO controller driver for MediaTek MT7620 SoC

This patch adds GPIO controller driver for MediaTek MT7620 SoC

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agowatchdog: add watchdog driver for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:28 +0000 (16:36 +0800)]
watchdog: add watchdog driver for MediaTek MT7620 SoC

This patch adds watchdog support for the Mediatek MT7620 SoC

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agopinctrl: mtmips: add support for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:24 +0000 (16:36 +0800)]
pinctrl: mtmips: add support for MediaTek MT7620 SoC

This patch adds pinctrl support for MediaTek MT7620 SoC.
The MT7620 SoC supports only pinmux.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agoreset: mtmips: add reset controller support for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:19 +0000 (16:36 +0800)]
reset: mtmips: add reset controller support for MediaTek MT7620 SoC

This patch adds reset controller bits definition header file for MediaTek
MT7620 SoC

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agoclk: add clock driver for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:10 +0000 (16:36 +0800)]
clk: add clock driver for MediaTek MT7620 SoC

This patch adds a clock driver for MediaTek MT7620 SoC.
This driver provides clock gate control as well as getting clock frequency
for CPU/SYS/XTAL and some peripherals.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agoserial: add uart driver for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:36:05 +0000 (16:36 +0800)]
serial: add uart driver for MediaTek MT7620 SoC

This patch adds uart support for MediaTek MT7620 and earlier SoCs.

The UART used by MT7620 is incompatible with the ns16550a driver.
All registers of this UART have different addresses. A special 16-bit
register for Divisor Latch is used to set the baudrate instead of the
original two 8-bit registers (DLL and DLM).

The driver supports of-platdata which is useful for tiny SPL.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agoconfigs: mtmips: refresh for mt7628 based boards
Weijie Gao [Thu, 12 Nov 2020 08:36:00 +0000 (16:36 +0800)]
configs: mtmips: refresh for mt7628 based boards

Since mt7620 is added into Kconfig, the CONFIG_SOC_MT7628=y which is
omitted by default must be added back, otherwise make xxx_defconfig for
these boards will be configured for mt7620 platform.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: mtmips: add two reference boards for mt7620
Weijie Gao [Thu, 12 Nov 2020 08:35:56 +0000 (16:35 +0800)]
mips: mtmips: add two reference boards for mt7620

The mt7620_rfb board supports integrated 10/100M PHYs plus two external
giga PHYs. It also has 8MB SPI-NOR, mini PCI-e x1 slot, SDHC and USB.

The mt7620_mt7530_rfb boards supports an external MT7530 giga switch and a
16MB SPI-NOR flash.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: mtmips: add support for MediaTek MT7620 SoC
Weijie Gao [Thu, 12 Nov 2020 08:35:52 +0000 (16:35 +0800)]
mips: mtmips: add support for MediaTek MT7620 SoC

This patch adds support for MediaTek MT7620 SoC.
All files are dedicated for u-boot.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: mtmips: add support to initialize SDRAM
Weijie Gao [Thu, 12 Nov 2020 08:35:43 +0000 (16:35 +0800)]
mips: mtmips: add support to initialize SDRAM

This patch adds support for mtmips SoCs to initialize the SDRAM.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: enable _machine_restart for spl
Weijie Gao [Thu, 12 Nov 2020 08:35:38 +0000 (16:35 +0800)]
mips: enable _machine_restart for spl

The sysreset driver has a config CONFIG_SPL_SYSRESET for the spl stage.
Change CONFIG_SYSRESET to CONFIG_IS_ENABLED(SYSRESET) will give spl a
chance to use _machine_restart instead of the sysreset driver.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: mtmips: fix dram size detection in dram_init
Weijie Gao [Thu, 12 Nov 2020 08:35:33 +0000 (16:35 +0800)]
mips: mtmips: fix dram size detection in dram_init

CONFIG_SYS_SDRAM_BASE points to cached memory, i.e. KSEG0, which is not
suitable for detecting memory size.

Replace CONFIG_SYS_SDRAM_BASE with KSEG1, and make dram_init() always do
memory size detection in any stage.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: mtmips: select SYSRESET for mt7628 only
Weijie Gao [Thu, 12 Nov 2020 08:35:28 +0000 (16:35 +0800)]
mips: mtmips: select SYSRESET for mt7628 only

Currently only mt7628 needs the sysreset driver, do not select it for
mt7620.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: mtmips: move mt7628 related Kconfig into mt7628 subdirectory
Weijie Gao [Thu, 12 Nov 2020 08:35:23 +0000 (16:35 +0800)]
mips: mtmips: move mt7628 related Kconfig into mt7628 subdirectory

This patch is a preparation for add a new soc fot mtmips.

Move all mt7628 related Kconfig (boards and UART selection) into mt7628
subdirectory and make sure the top directory of mtmips contains only
selection for SoCs.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agomips: dts: switch to board defines for dtb for mtmips
Weijie Gao [Thu, 12 Nov 2020 08:35:17 +0000 (16:35 +0800)]
mips: dts: switch to board defines for dtb for mtmips

Previous the dts files for gardena-smart-gateway-mt7688 and
linkit-smart-7688 are set to be built when mtmips is selected.

This can lead to a compilation error if another soc is added to this arch
with different dtsi files.

So it's better to build the dtb only if their board is selected.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
3 years agoMerge tag 'efi-2021-04-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 24 Jan 2021 00:07:00 +0000 (19:07 -0500)]
Merge tag 'efi-2021-04-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2021-04-rc1-3

Bug fixes for UEFI sub-system:

* correct value of  EFI_BLOCK_IO_PROTOCOL.Media.LastBlock
* correct GUID when closing of EFI_LOAD_FILE_PROTOCOL
* error handling in mkeficapsule tool

Bug fixes for FAT file system:

* consistent error handling for flush dir()

3 years agoRevert "doc: update Kernel documentation build system"
Tom Rini [Sat, 23 Jan 2021 17:51:37 +0000 (12:51 -0500)]
Revert "doc: update Kernel documentation build system"

Unfortunately we now see a number of now-fatal warnings about duplicate
labels.  It is often unclear how best to re-write the document in
question to not duplicate these otherwise logical headings.

This reverts commit 10a1df3cd43ba2fe893d5dd1aeb2e7109ef0007f.

Signed-off-by: Tom Rini <trini@konsulko.com>