]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
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>
3 years agoMerge branch '2021-01-22-tool-updates'
Tom Rini [Sat, 23 Jan 2021 14:55:35 +0000 (09:55 -0500)]
Merge branch '2021-01-22-tool-updates'

- Assorted updates to the tools/ code

3 years agoMerge branch '2021-01-22-doc-updates'
Tom Rini [Sat, 23 Jan 2021 14:54:02 +0000 (09:54 -0500)]
Merge branch '2021-01-22-doc-updates'

- Assorted documentation updates

3 years agodoc: move README.menu to HTML documentation
Heinrich Schuchardt [Mon, 18 Jan 2021 20:06:03 +0000 (21:06 +0100)]
doc: move README.menu to HTML documentation

Convert README.menu to reStructured text and add it to the HTML
documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: move test/py/README.md to HTML documentation
Heinrich Schuchardt [Mon, 18 Jan 2021 19:24:03 +0000 (20:24 +0100)]
doc: move test/py/README.md to HTML documentation

Convert test/py/README.md to restructured text and add it to the generated
HTML documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodoc: move test/README to HTML documentation
Heinrich Schuchardt [Mon, 18 Jan 2021 19:24:02 +0000 (20:24 +0100)]
doc: move test/README to HTML documentation

Move test/README to the 'Develop U-Boot' chapter of the HTML documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodoc: structure doc/develop/index.rst
Heinrich Schuchardt [Mon, 18 Jan 2021 19:24:01 +0000 (20:24 +0100)]
doc: structure doc/develop/index.rst

Provide sub-chapters for 'Develop U-Boot'

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodoc: update help message
Patrick Delaunay [Thu, 14 Jan 2021 11:04:04 +0000 (12:04 +0100)]
doc: update help message

Update the help message used for 'make help':

  Documentation targets:
    Linux kernel internal documentation in different formats from ReST:
=>
    U-Boot documentation in different formats from ReST:

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agodoc: update Kernel documentation build system
Heinrich Schuchardt [Fri, 1 Jan 2021 00:21:11 +0000 (01:21 +0100)]
doc: update Kernel documentation build system

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

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>
Reviewed-by: Simon Glass <sjg@chromium.org>
[Fix warning in b4860qds.rst about "Switch Settings"]
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoARM: imx: add i.MX8MN lpddr4 image cfg file
Marek Vasut [Sat, 16 Jan 2021 23:17:21 +0000 (00:17 +0100)]
ARM: imx: add i.MX8MN lpddr4 image cfg file

Add cfg file for i.MX8MN LPDDR4

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoimx: Add support for i.MX8MN Beacon EmbeddedWorks devkit.
Adam Ford [Fri, 11 Dec 2020 12:01:46 +0000 (06:01 -0600)]
imx: Add support for i.MX8MN Beacon EmbeddedWorks devkit.

Beacon EmbeddedWorks is releasing a devkit based on the i.MX8M
Nano SoC consisting of baseboard + SOM.

The kit is based on the same design as the Beacon dev kit with
the i.MX8M Mini.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoarm: dart6ul: fix ddr size macro
Marc Ferland [Mon, 4 Jan 2021 19:07:53 +0000 (14:07 -0500)]
arm: dart6ul: fix ddr size macro

The previous macro was off by one bit and so we were getting a ddr
size which was twice the real size. This commit refactors the macro so
it returns the right size in _bytes_ and modifies the printf call so the
size is still printed in MiB.

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
3 years agospi: imx: Use clock framework if enabled
Marek Vasut [Mon, 18 Jan 2021 23:58:33 +0000 (00:58 +0100)]
spi: imx: Use clock framework if enabled

In case the clock framework is enabled, enable the SPI controller clock
and obtain max frequency from the clock framework.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
3 years agospi: imx: Define register bits in the driver
Marek Vasut [Mon, 18 Jan 2021 23:58:32 +0000 (00:58 +0100)]
spi: imx: Define register bits in the driver

The CSPI/ECSPI register bits do not differ between newer SoCs, instead
of having multiple copies of the same thing for each iMX SoC, define
the bits in the driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoclk: imx: Add ECSPI to iMX8MN
Marek Vasut [Mon, 18 Jan 2021 23:58:31 +0000 (00:58 +0100)]
clk: imx: Add ECSPI to iMX8MN

Add ECSPI clock entries to iMX8MN clock driver. Only make those entries
available in case SPI support in U-Boot is enabled at all to conserve
space, esp. in SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoarm64: dts: imx8mm-beacon: Resync imx8mm-beacon-som with 5.11-rc4
Adam Ford [Mon, 18 Jan 2021 21:43:09 +0000 (15:43 -0600)]
arm64: dts: imx8mm-beacon: Resync imx8mm-beacon-som with 5.11-rc4

In order to support the QSPI chip on the SOM, the Flexspi bus
needs to be configured to talk with the SPI chip.
Resync the som device tree with 5.11-rc4

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx8mm_beacon: Enable QSPI Support
Adam Ford [Mon, 18 Jan 2021 21:43:08 +0000 (15:43 -0600)]
imx8mm_beacon: Enable QSPI Support

There is a QSPI chip connected to the FSPI.  Enable the defconfig
to support it.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agospi: nxp_fspi: Enable support for nxp,imx8mm-fspi
Adam Ford [Mon, 18 Jan 2021 21:32:50 +0000 (15:32 -0600)]
spi: nxp_fspi: Enable support for nxp,imx8mm-fspi

The i.MX8M Mini can use the FlexSPI driver.  Add support
for it to the driver.

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agommc: fsl_esdhc_imx.c: fix compiler warning
Heiko Schocher [Fri, 15 Jan 2021 09:37:09 +0000 (10:37 +0100)]
mmc: fsl_esdhc_imx.c: fix compiler warning

prevent unsued variable compiler warning if
DM_REGULATOR is not set.

Signed-off-by: Heiko Schocher <hs@denx.de>
3 years agoimx8mq: configs: add support for distro boot commands
Alice Guo [Thu, 14 Jan 2021 08:23:23 +0000 (16:23 +0800)]
imx8mq: configs: add support for distro boot commands

Supported boot device types in iMX8MQ: MMC, DHCP.

CONFIG_DISTRO_DEFAULTS is added for enabling the DISTRO_DEFAULTS option.

CONFIG_BOOTCOMMAND which is defined in include/configs/imx8mq_evk.h is
deleted because "run distro_bootcmd" is required to be the default boot
mode.

scriptaddr is the location in RAM where boot.scr.uimg/boot.scr will be
loaded to prior to execution.

kernel_addr_r is the location in RAM where the kernel will be loaded to.

Delete unnecessary environment variables because "run distro_bootcmd" is
set to be the default boot mode.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
3 years agoARM: imx6: dh-imx6: Move bootcounter to SNVS_LPGDR
Marek Vasut [Wed, 13 Jan 2021 23:21:22 +0000 (00:21 +0100)]
ARM: imx6: dh-imx6: Move bootcounter to SNVS_LPGDR

Move the bootcounter to SVNS_LPGDR to free up OCRAM for usage by the VPU.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoboard: phytec: imx8mp: Add PHYTEC phyCORE-i.MX8MP support
Teresa Remmet [Wed, 13 Jan 2021 15:28:09 +0000 (16:28 +0100)]
board: phytec: imx8mp: Add PHYTEC phyCORE-i.MX8MP support

Add initial support PHYTEC phyCORE-i.MX8MP SOM.

    Supported features:
     - 2GB LPDDR4 RAM
     - eMMC
     - external SD
     - debug UART2
     - watchdog

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
3 years agow1: mxc: fix build
Martin Fuzzey [Wed, 13 Jan 2021 10:21:03 +0000 (11:21 +0100)]
w1: mxc: fix build

Now that header files no longer include common.h it must be included
first.

Otherwise the build fails with errors like
include/asm/arch/clock.h:43:1: error: unknown type name 'u32'
 u32 imx_get_uartclk(void);

Fixes: c3dc39a2f85b ("arm: Don't include common.h in header files")
Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoarm: dart6ul: enable DM_ETH for the dart6ul
Marc Ferland [Mon, 4 Jan 2021 15:41:57 +0000 (10:41 -0500)]
arm: dart6ul: enable DM_ETH for the dart6ul

This patch converts the dart6ul ethernet support to DM_ETH and cleans
up the legacy ethernet code. The clean up, more specifically:

* moves the fec2 node and pin definition to the carrier board DTS
  since the phy associated with it is on the carrier board and not on
  the SoM;
* add the reset pin associated to each phy;
* separate the ethernet, mdio and reset pins of each fec so that they
  are easier to reference;
* add clock properties to the phy nodes since they are connected to the
  50Mhz ENET[12]_TX_CLK clock of the SoC;
* remove CONFIG_BOARD_EARLY_INIT_F since the function is now empty.

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
3 years agoimx: imx8mm-beacon: Remove relocation restrictions
Adam Ford [Wed, 30 Dec 2020 15:15:43 +0000 (09:15 -0600)]
imx: imx8mm-beacon: Remove relocation restrictions

The system is capable of relocating RAM disks and the kernel.
Remove these restrictions to prevent it.

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoimx8mm_beacon: Enable fixed regulator in SPL
Adam Ford [Wed, 30 Dec 2020 14:14:19 +0000 (08:14 -0600)]
imx8mm_beacon: Enable fixed regulator in SPL

Because SPL can support SD UHS, the fixed regulator needs to be
enabled in SPL to reset the SD card.

Fixes: 1a5d9c84b472 ("imx8mm_beacon: Enable HS400 on MMC controller")
Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agomx6ul(l)evk: Enable DM_ETH_PHY
Sean Anderson [Mon, 28 Dec 2020 19:58:30 +0000 (14:58 -0500)]
mx6ul(l)evk: Enable DM_ETH_PHY

This fixes eth0 not initializing properly. Both eth0 and eth1 use the
MDIO interface on eth1 to access their PHYs. However, without
DM_ETH_PHY, eth0 still tries to use its own MDIO interface to access its
phy. Before this patch, a boot log might contain lines like

Net:
Warning: ethernet@20b4000 using MAC address from ROM
eth1: ethernet@20b4000 [PRIME]Could not get PHY for FEC0: addr 2

After this patch they now look like

Net:
Warning: ethernet@20b4000 using MAC address from ROM
eth1: ethernet@20b4000 [PRIME]Get shared mii bus on ethernet@2188000

Warning: ethernet@2188000 using MAC address from ROM
, eth0: ethernet@2188000

As an alternative to DM_ETH_PHY, FEC_MXC_SHARE_MDIO could also have been
used to achieve the same effect.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 years agoboard: imx8mp: add boot.cmd for distro boot on iMX8MP
Alice Guo [Fri, 18 Dec 2020 07:19:27 +0000 (15:19 +0800)]
board: imx8mp: add boot.cmd for distro boot on iMX8MP

Distro Boot requires a U-Boot-specific script named boot.scr or
boot.scr.uimg which contains boot commands to boot the system. The
boot.cmd is such a file. Use mkimage to generate boot.scr or
boot.scr.uimg from boot.cmd, and the command is:
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Distro Boot Script" -d boot.cmd boot.scr.uimg

The boot.cmd file is an example script and can be modified based on
needs. bootargs is set in this script and root uses the default value
"/dev/mmcblk1p2 rootwait rw" which can be changed by overriding mmcroot.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
3 years agoimx8mp: configs: add support for distro boot commands
Alice Guo [Fri, 18 Dec 2020 07:19:26 +0000 (15:19 +0800)]
imx8mp: configs: add support for distro boot commands

Supported boot device types in iMX8MP: MMC.

CONFIG_CMD_PART is added for command part and CONFIG_CMD_FS_GENERIC is
for command fstype.

scriptaddr is the location in RAM where boot.scr.uimg/boot.scr will be
loaded to prior to execution. kernel_addr_r is the location in RAM where
the kernel will be loaded to. Delete unnecessary environment variables
because "run distro_bootcmd" is set to be the default boot mode.

On the iMX8MP platform I used, "mmc1" represents SD card and "mmc2"
represents eMMC.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
3 years agoboard: imx8mm: add boot.cmd for distro boot on iMX8MM
Alice Guo [Fri, 18 Dec 2020 06:50:08 +0000 (14:50 +0800)]
board: imx8mm: add boot.cmd for distro boot on iMX8MM

Distro Boot requires a U-Boot-specific script named boot.scr or
boot.scr.uimg which contains boot commands to boot the system. The
boot.cmd is such a file. Use mkimage to generate boot.scr or
boot.scr.uimg from boot.cmd, and the command is:
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Distro Boot Script" -d boot.cmd boot.scr.uimg

The boot.cmd file is an example script and can be modified based on
needs. bootargs is set in this script and root uses the default value "
/dev/mmcblk1p2 rootwait rw" which can be changed by overriding mmcroot.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
3 years agoimx8mm: configs: add support for distro boot commands
Alice Guo [Fri, 18 Dec 2020 06:50:07 +0000 (14:50 +0800)]
imx8mm: configs: add support for distro boot commands

Supported boot device types in iMX8MM: MMC, DHCP.

CONFIG_CMD_PART is added for command part and CONFIG_CMD_FS_GENERIC is
for command fstype.

CONFIG_BOOTCOMMAND which is defined in include/configs/imx8mm_evk.h is
deleted because "run distro_bootcmd" is required to be the default boot
mode.

scriptaddr is the location in RAM where boot.scr.uimg/boot.scr will be
loaded to prior to execution.

kernel_addr_r is the location in RAM where the kernel will be loaded to.

Delete unnecessary environment variables.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
3 years agoimx: timer: Modify GPT timer driver for mx7
Ye Li [Fri, 23 Mar 2018 06:45:26 +0000 (23:45 -0700)]
imx: timer: Modify GPT timer driver for mx7

Modify the GPT common platform driver for mx7 which only use 24Mhz
OSC as clock source.

Note: at default, the mx7d will use system counter as timer. The GPT
is disabled.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx8m: add QSPI boot dev
Peng Fan [Thu, 17 May 2018 07:15:59 +0000 (15:15 +0800)]
imx8m: add QSPI boot dev

When boot type could not be detected from rom sw info,
read sbmr1 to detect, here we only use it to detect FLEXSPI
boot, because ROM not update it in rom sw info.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx6: Remove AHCI device before boot OS
Ye Li [Tue, 23 Jul 2019 03:51:25 +0000 (20:51 -0700)]
imx6: Remove AHCI device before boot OS

Since we remove SATA device before boot OS, when AHCI is enabled, update
the codes to remove AHCI device.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoimx: Fix market segment fuse offset on iMX8MP
Ye Li [Tue, 10 Mar 2020 06:11:54 +0000 (23:11 -0700)]
imx: Fix market segment fuse offset on iMX8MP

iMX8MP has shifted market segment fuse one bit from 0x440 [7:6] to [6:5],
correct it in imx common codes.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agonandbcb: nand support for i.MX8MP
Han Xu [Sat, 10 Oct 2020 13:48:49 +0000 (08:48 -0500)]
nandbcb: nand support for i.MX8MP

Add NAND boot support for i.MX8MP by adding i.MX8MP in nandbcb support
list, reading boot_search_count from fuse.

i.MX8MN NAND boot is same as i.MX8MP, fix some issues as well.

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>