]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
4 years agommc: fsl_esdhc: simplify 64bit check for SDMA transfers
Michael Walle [Wed, 23 Sep 2020 10:42:47 +0000 (12:42 +0200)]
mmc: fsl_esdhc: simplify 64bit check for SDMA transfers

SDMA can only do DMA with 32 bit addresses. This is true for all
architectures (just doesn't apply to 32 bit ones). Simplify the code and
remove unnecessary CONFIG_FSL_LAYERSCAPE.

Also make the error message more concise.

Signed-off-by: Michael Walle <michael@walle.cc>
4 years agommc: fsl_esdhc_imx: remove the 1ms delay before sending command
Haibo Chen [Tue, 22 Sep 2020 10:11:43 +0000 (18:11 +0800)]
mmc: fsl_esdhc_imx: remove the 1ms delay before sending command

This 1ms delay before sending command already exist from the beginning
of the fsl_esdhc driver added in year 2008. Now this driver has been
split for two files: fsl_esdhc.c and fsl_esdhc_imx.c. fsl_esdhc_imx.c
only for i.MX series. i.MX series esdhc/usdhc do not need this 1ms delay
before sending any command. So remove this 1ms, this will save a lot
time if handling a large mmc data.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
4 years agommc: do not send cmd13 if the parameter 'send_status' is 0 for __mmc_switch
Haibo Chen [Tue, 22 Sep 2020 10:11:42 +0000 (18:11 +0800)]
mmc: do not send cmd13 if the parameter 'send_status' is 0 for __mmc_switch

According to the code logic in __mmc_switch, if the parameter 'send_status'
is zero, no need to send cmd13, just wait the stated timeout time, then
can return directly.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoconfigs: lx2160ardb: enable eMMC HS400 mode support
Yangbo Lu [Tue, 1 Sep 2020 08:58:09 +0000 (16:58 +0800)]
configs: lx2160ardb: enable eMMC HS400 mode support

Enable eMMC HS400 mode support on LX2160ARDB.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agoarm: dts: lx2160ardb: support eMMC HS400 mode
Yangbo Lu [Tue, 1 Sep 2020 08:58:08 +0000 (16:58 +0800)]
arm: dts: lx2160ardb: support eMMC HS400 mode

Add properties related to eMMC HS400 mode.

mmc-hs400-1_8v;
bus-width = <8>;

They had been already in kernel dts file since the first
lx2160ardb dts patch.

b068890 arm64: dts: add LX2160ARDB board support

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: fix eMMC HS400 stability issue
Yangbo Lu [Tue, 1 Sep 2020 08:58:07 +0000 (16:58 +0800)]
mmc: fsl_esdhc: fix eMMC HS400 stability issue

There was a fix-up for eMMC HS400 stability issue in Linux.

Patch link:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/?id=58d0bf843b49fa99588ac9f85178bd8dfd651b53

Description:
Currently only LX2160A eSDHC supports eMMC HS400. According to
a large number of tests, eMMC HS400 failed to work at 150MHz,
and for a few boards failed to work at 175MHz. But eMMC HS400
worked fine on 200MHz. We hadn't found the root cause but
setting eSDHC_DLLCFG0[DLL_FREQ_SEL] = 0 using slow delay chain
seemed to resovle this issue. Let's use this as fixup for now.

Introduce the fix-up in u-boot since the issue could be reproduced
in u-boot too.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: fix mmc->clock with actual clock
Yangbo Lu [Tue, 1 Sep 2020 08:58:06 +0000 (16:58 +0800)]
mmc: fsl_esdhc: fix mmc->clock with actual clock

Fix mmc->clock with actual clock which is divided by the
controller, and record it with priv->clock which was removed
accidentally.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: support eMMC HS400 mode
Yangbo Lu [Tue, 1 Sep 2020 08:58:05 +0000 (16:58 +0800)]
mmc: fsl_esdhc: support eMMC HS400 mode

The process for eMMC HS400 mode for eSDHC is,

1. Perform the Tuning Process at the HS400 target operating frequency.
   Latched the clock division value.
2. if read transaction, then set the SDTIMNGCTL[FLW_CTL_BG].
3. Switch to High Speed mode and then set the card clock frequency to
   a value not greater than 52Mhz
4. Clear TBCTL[TB_EN],tuning block enable bit.
5. Change to 8 bit DDR Mode
6. Switch the card to HS400 mode.
7. Set TBCTL[TB_EN], tuning block enable bit.
8. Clear SYSCTL[SDCLKEN]
9. Wait for PRSSTAT[SDSTB] to be set
10. Change the clock division to latched value.Set TBCTL[HS 400 mode]
    and Set SDCLKCTL[CMD_CLK_CTRL]
11. Set SYSCTL[SDCLKEN]
12. Wait for PRSSTAT[SDSTB] to be set
13. Set DLLCFG0[DLL_ENABLE] and DLLCFG0[DLL_FREQ_SEL].
14. Wait for delay chain to lock.
15. Set TBCTL[HS400_WNDW_ADJUST]
16. Again clear SYSCTL[SDCLKEN]
17. Wait for PRSSTAT[SDSTB] to be set
18. Set ESDHCCTL[FAF]
19. Wait for ESDHCCTL[FAF] to be cleared
20. Set SYSCTL[SDCLKEN]
21. Wait for PRSSTAT[SDSTB] to be set.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: add a mmc_hs400_prepare_ddr() interface
Yangbo Lu [Tue, 1 Sep 2020 08:58:04 +0000 (16:58 +0800)]
mmc: add a mmc_hs400_prepare_ddr() interface

Add a mmc_hs400_prepare_ddr() interface for controllers
which needs preparation before switching to DDR mode for
HS400 mode.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: add a hs400_tuning flag
Yangbo Lu [Tue, 1 Sep 2020 08:58:03 +0000 (16:58 +0800)]
mmc: add a hs400_tuning flag

Some controllers may have difference between HS200 tuning
and HS400 tuning, such as different registers setting,
different procedure, or different errata.

This patch is to add a hs400_tuning flag to identify the
tuning for HS400 mode.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: clean TBCTL[TB_EN] manually during init
Yangbo Lu [Tue, 1 Sep 2020 08:58:02 +0000 (16:58 +0800)]
mmc: fsl_esdhc: clean TBCTL[TB_EN] manually during init

Clean TBCTL[TB_EN] manually during init since it is not able to
be reset by reset all operation.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: support tuning for eMMC HS200
Yangbo Lu [Tue, 1 Sep 2020 08:58:01 +0000 (16:58 +0800)]
mmc: fsl_esdhc: support tuning for eMMC HS200

Support tuning process for eMMC HS200 for eSDHC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agommc: fsl_esdhc: add a reinit() callback
Yangbo Lu [Tue, 1 Sep 2020 08:58:00 +0000 (16:58 +0800)]
mmc: fsl_esdhc: add a reinit() callback

Add a reinit() callback for mmc rescan.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: add a reinit() API
Yangbo Lu [Tue, 1 Sep 2020 08:57:59 +0000 (16:57 +0800)]
mmc: add a reinit() API

For DM_MMC, the controller re-initialization is needed to
clear old configuration for mmc rescan.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agoMerge branch '2020-10-10-log-improvements'
Tom Rini [Sun, 11 Oct 2020 19:22:05 +0000 (15:22 -0400)]
Merge branch '2020-10-10-log-improvements'

- Assorted improvements to our log functionality.

4 years agodoc: remove redundant doc/README.log
Heinrich Schuchardt [Mon, 14 Sep 2020 08:12:19 +0000 (10:12 +0200)]
doc: remove redundant doc/README.log

doc/README.log was already moved to doc/develop/logging.rst but has been
recreated by an incorrect merge.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agolog: syslog: Handle errors in net_init
Sean Anderson [Sat, 12 Sep 2020 21:45:44 +0000 (17:45 -0400)]
log: syslog: Handle errors in net_init

Since the previous patch, net_init now exposes some errors, so check for
them.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agonet: Expose some errors generated in net_init
Sean Anderson [Sat, 12 Sep 2020 21:45:43 +0000 (17:45 -0400)]
net: Expose some errors generated in net_init

net_init does not always succeed, and there is no existing mechanism to
discover errors. This patch allows callers of net_init (such as net_init)
to handle errors. The root issue is that eth_get_dev can fail, but
net_init_loop doesn't expose that. The ideal way to fix eth_get_dev would
be to return an error with ERR_PTR, but there are a lot of callers, and all
of them just check if it's NULL. Another approach would be to change the
signature to something like

int eth_get_dev(struct udevice **pdev)

but that would require rewriting all of the many callers.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agolog: Disable the syslog driver by default
Simon Glass [Sat, 12 Sep 2020 18:28:50 +0000 (12:28 -0600)]
log: Disable the syslog driver by default

This driver interferes with other sandbox tests since it causes log output
to be interspersed with "No ethernet found." messages. Disable this driver
by default.

Enable it for the syslog tests so that they still pass.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolog: Add a way to enable/disable a log device
Simon Glass [Sat, 12 Sep 2020 18:28:49 +0000 (12:28 -0600)]
log: Add a way to enable/disable a log device

At present all log devices are enabled by default. Add a function to allow
devices to be disabled or enabled at runtime.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolog: Drop #ifdef in log_test
Simon Glass [Sat, 12 Sep 2020 18:28:48 +0000 (12:28 -0600)]
log: Drop #ifdef in log_test

This is not needed as the Makefile only builds the file if CONFIG_LOG_TEST
is enabled. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolog: Add a flag to enable log drivers
Simon Glass [Sat, 12 Sep 2020 18:28:47 +0000 (12:28 -0600)]
log: Add a flag to enable log drivers

At present there is no way to disable a log driver. But the syslog driver
causes (attempted) network traffic in sandbox every time a log message
is printed, which is often.

Add a flag to enable a log driver. Adjust struct log_device to use a short
for next_filter_num so that no more memory is used for devices. Also fix
a missing line in the struct log_driver comment while here.

To maintain compatibility, enable it for all drivers for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agolib: Allow hexdump to be used in SPL
Simon Glass [Sat, 12 Sep 2020 17:13:35 +0000 (11:13 -0600)]
lib: Allow hexdump to be used in SPL

It is sometimes useful to output hex dumps in SPL. Add a config option to
allow this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agolog: Allow LOG_DEBUG to always enable log output
Simon Glass [Sat, 12 Sep 2020 17:13:34 +0000 (11:13 -0600)]
log: Allow LOG_DEBUG to always enable log output

At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file
(before log.h inclusion) causes _log() to be executed for every log()
call, regardless of the build- or run-time logging level.

However there is no guarantee that the log record will actually be
displayed. If the current log level is lower than LOGL_DEBUG then it will
not be.

Add a way to signal that the log record should always be displayed and
update log_passes_filters() to handle this.

With the new behaviour, log_debug() will always log if LOG_DEBUG is
enabled.

Move log_test_syslog_nodebug() into its own file since it cannot be made
to work where it is, with LOG_DEBUG defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch '2020-10-09-kconfig-reorg'
Tom Rini [Fri, 9 Oct 2020 22:10:24 +0000 (18:10 -0400)]
Merge branch '2020-10-09-kconfig-reorg'

- Re-organize a number of Kconfig related entries to be better organized
  for long term maintenance.

4 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 9 Oct 2020 16:22:06 +0000 (12:22 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoKconfig: Create a new tools menu
Simon Glass [Fri, 11 Sep 2020 02:21:27 +0000 (20:21 -0600)]
Kconfig: Create a new tools menu

At present MKIMAGE_DTC_PATH is in the devicetree menu but not within
'devicetree control' since it does not relate to that. As a result it
shows up in the top menu.

It actually relates to the mkimage tool, so create a new tools menu for it
and move it there.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move BOARD_TYPES under init options
Simon Glass [Fri, 11 Sep 2020 02:21:26 +0000 (20:21 -0600)]
Kconfig: Move BOARD_TYPES under init options

This actually relates to something displayed on start-up, so move it into
that menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move BOUNCE_BUFFER under driver options
Simon Glass [Fri, 11 Sep 2020 02:21:25 +0000 (20:21 -0600)]
Kconfig: Move BOUNCE_BUFFER under driver options

This option does not belong at the top level. Move it under generic
driver options.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move VERSION_VARIABLE under environment
Simon Glass [Fri, 11 Sep 2020 02:21:24 +0000 (20:21 -0600)]
Kconfig: Move VERSION_VARIABLE under environment

This relates to the environment so should not be at the top level. Move
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: MISC_INIT_R and BOARD_LATE_INIT -> start-up hooks
Simon Glass [Fri, 11 Sep 2020 02:21:23 +0000 (20:21 -0600)]
Kconfig: MISC_INIT_R and BOARD_LATE_INIT -> start-up hooks

These are start-up hooks so put them under that menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move startup hooks under init options
Simon Glass [Fri, 11 Sep 2020 02:21:22 +0000 (20:21 -0600)]
Kconfig: Move startup hooks under init options

These hooks relate to U-Boot init so move them under that menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Create a new 'init options' menu
Simon Glass [Fri, 11 Sep 2020 02:21:21 +0000 (20:21 -0600)]
Kconfig: Create a new 'init options' menu

There are quite a few options at the top level relating to U-Boot init.
Move them into their own menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move DEFAULT_FDT_FILE under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:20 +0000 (20:21 -0600)]
Kconfig: Move DEFAULT_FDT_FILE under boot options

This relates to booting since it is the default devicetree provided to
Linux. Move it under the 'boot options' menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move SUPPORT_RAW_INITRD under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:19 +0000 (20:21 -0600)]
Kconfig: Move SUPPORT_RAW_INITRD under boot options

This relates to booting, so move it under the 'boot images' menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move misc boot options under 'boot options'
Simon Glass [Fri, 11 Sep 2020 02:21:18 +0000 (20:21 -0600)]
Kconfig: Move misc boot options under 'boot options'

There are a number of miscellaneous boot images at the top level of the
kconfig menu. Move these into the 'boot options' menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move CONFIG_BOOTDELAY under autoboot options
Simon Glass [Fri, 11 Sep 2020 02:21:17 +0000 (20:21 -0600)]
Kconfig: Move CONFIG_BOOTDELAY under autoboot options

This option relates to autoboot, so move it there.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move autoboot options under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:16 +0000 (20:21 -0600)]
Kconfig: Move autoboot options under boot options

At present the autoboot options are in cmd/Kconfig but they don't really
relate to commands. They relate to booting, so move this menu under the
boot menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move boot media under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:15 +0000 (20:21 -0600)]
Kconfig: Move boot media under boot options

This relates to booting, so move it under the boot menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move boot timing under boot options
Simon Glass [Fri, 11 Sep 2020 02:21:14 +0000 (20:21 -0600)]
Kconfig: Move boot timing under boot options

This relates to booting, so move it under the boot menu.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Move boot menu into common/
Simon Glass [Fri, 11 Sep 2020 02:21:13 +0000 (20:21 -0600)]
Kconfig: Move boot menu into common/

Most of the boot options are in common/Kconfig but that file is already
extremely large. Create a new Kconfig.boot to hold the boot options.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoKconfig: Add a 'Boot options' menu
Simon Glass [Fri, 11 Sep 2020 02:21:12 +0000 (20:21 -0600)]
Kconfig: Add a 'Boot options' menu

There are quite a few boot-related menu options at the top level. Create a
new menu to hold these and move 'Boot images' into it.

Signed-off-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch '2020-10-08-misc-board-improvements'
Tom Rini [Fri, 9 Oct 2020 12:58:56 +0000 (08:58 -0400)]
Merge branch '2020-10-08-misc-board-improvements'

- Move ASPEED ram driver, update.
- Exhance pinctrl/gpio support, update Kendryte K210 support
- Enhance qemu_arm64 support for a single binary to work with and
  without TF-A

4 years agoqemu-arm64: Enable POSITION_INDEPENDENT
Andre Przywara [Wed, 30 Sep 2020 16:39:18 +0000 (17:39 +0100)]
qemu-arm64: Enable POSITION_INDEPENDENT

Now that PIE works when U-Boot is started from ROM, let's enable
CONFIG_POSITION_INDEPENDENT, which allows to load U-Boot also via
ARM Trusted-Firmware's fip.bin to DRAM, without tweaking the
configuration.

To get a writable initial stack, we need to keep the fixed initial
stack pointer, which points to DRAM in our case.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
4 years agoqemu-arm: Drop ARCH_SUPPORT_TFABOOT
Andre Przywara [Wed, 30 Sep 2020 16:39:17 +0000 (17:39 +0100)]
qemu-arm: Drop ARCH_SUPPORT_TFABOOT

CONFIG_ARCH_SUPPORT_TFABOOT was used on the qemu-arm64 platform to
guard a tweak to the flash bank configuration. U-Boot now reads the
current flash setup from the devicetree, so there is no need for
this option anymore.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoqemu-arm: Remove need to specify flash banks
Andre Przywara [Wed, 30 Sep 2020 16:39:16 +0000 (17:39 +0100)]
qemu-arm: Remove need to specify flash banks

Currently we hard-code the number and initial addresses of QEMU's flash
banks, even though our code is perfectly able to gather the same
information from the DTB provided by QEMU.
This is especially annoying, since we have two slightly different
U-Boot configurations ("bare-metal" vs. loaded via Arm Trusted
Firmware), which need to be selected at build time.

Drop the two hard coded alternatives, and use
CONFIG_SYS_MAX_FLASH_BANKS_DETECT instead, which relies on the DTB to
figure out the actual flash configuration at runtime.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
4 years agoarm64: PIE: Allow fixed stack pointer
Andre Przywara [Wed, 30 Sep 2020 16:39:15 +0000 (17:39 +0100)]
arm64: PIE: Allow fixed stack pointer

Currently selecting CONFIG_POSITION_INDEPENDENT also forces us to use an
initial stack pointer relative to the beginning of the BSS section.
This makes some sense, because this should be writable memory anyway.

However the BSS section is not cleared or used until later in the
setup process (after relocation), so memory nearby might not be
available early enough to host the initial stack. This is an issue if
U-Boot is loaded from (Flash-)ROM, for instance.

Allow CONFIG_INIT_SP_RELATIVE to be turned off by a board's config, to
be able to select a fixed stack pointer, for instance in known good
DRAM.

This will help QEMU utilising PIE, when it's loaded to (Flash-)ROM.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
4 years agoarm64: PIE: Skip fixups if distance is zero
Andre Przywara [Wed, 30 Sep 2020 16:39:14 +0000 (17:39 +0100)]
arm64: PIE: Skip fixups if distance is zero

When the actual offset between link and runtime address is zero, there
is no need for patching up U-Boot early when running with
CONFIG_POSITION_INDEPENDENT.

Skip the whole routine when the distance is 0.

This helps when U-Boot is loaded into ROM, or in otherwise sensitive
memory locations.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
4 years agoarm64: PIE: Do not skip static relocation
Andre Przywara [Wed, 30 Sep 2020 16:39:13 +0000 (17:39 +0100)]
arm64: PIE: Do not skip static relocation

When we build an arm64 target and enable POSITION_INDEPENDENT, we were
skipping our build-time dynamic relocation fixup routine (STATIC_RELA).

This was probably done because we didn't need it in this case, as the
PIE fixup routine in start.S would take care of that at runtime.

However when we now skip this routine (upon detecting that the fixup
offset is 0), this might lead to uninitialised pointers.

Remove the exception, so that we always do the build-time relocation.

NOTE: GNU binutils starting with v2.27.1 do this build-time relocation
automatically, to be in-line with other architecures. So on newer
toolchains our manual fixup is actually not needed. It doesn't hurt to
have it, though, so that we keep compatibility with the popular Linaro
toolchains, which lack this feature.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
4 years agoarm: Kconfig: Explain TFABOOT
Andre Przywara [Wed, 30 Sep 2020 14:45:07 +0000 (15:45 +0100)]
arm: Kconfig: Explain TFABOOT

The CONFIG_TFABOOT option is more about what U-Boot DOES NOT need to do
than to support some features.

Explain a bit more in the Kconfig help text to avoid misunderstandings.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoexamples: make examples/ optional
Heinrich Schuchardt [Wed, 23 Sep 2020 17:09:51 +0000 (19:09 +0200)]
examples: make examples/ optional

Most users don't need the standalone API examples. Distributions like SUSE
do not supply libgcc for cross-compiling and we cannot do without on ARMv8
for building examples/.

Make examples selectable via symbol CONFIG_EXAMPLES. It defaults to
yes on ARCH_QEMU to ensure that we compile the API as part of our
continuous integration.

Cc: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
4 years agowdt: designware: fix timeout calculation due to expecting KHz
Jack Mitchell [Thu, 17 Sep 2020 09:30:40 +0000 (10:30 +0100)]
wdt: designware: fix timeout calculation due to expecting KHz

The timeout calculation is based on the clk being in KHz but
the clk api returns the clk value in Hz. Convert this to KHz
to calculate the correct timeout value.

Signed-off-by: Jack Mitchell <ml@embed.me.uk>
4 years agoriscv: Add FPIOA and GPIO support for Kendryte K210
Sean Anderson [Mon, 14 Sep 2020 15:02:06 +0000 (11:02 -0400)]
riscv: Add FPIOA and GPIO support for Kendryte K210

This patch adds the necessary configs and docs for FPIOA and GPIO support
on the K210.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
4 years agoriscv: add DT binding for BOOT button on Maix board
Heinrich Schuchardt [Mon, 14 Sep 2020 15:02:05 +0000 (11:02 -0400)]
riscv: add DT binding for BOOT button on Maix board

Add a device tree binding for the BOOT button on the Maix board.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
4 years agoriscv: Add pinmux and gpio bindings for Kendryte K210
Sean Anderson [Mon, 14 Sep 2020 15:02:04 +0000 (11:02 -0400)]
riscv: Add pinmux and gpio bindings for Kendryte K210

This patch adds the necessary device tree bindings.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Rick Chen <rick@andestech.com>
4 years agotest: dm: Test for default led naming
Sean Anderson [Mon, 14 Sep 2020 15:02:03 +0000 (11:02 -0400)]
test: dm: Test for default led naming

This modifies the existing led test to check for default led naming as
added in the previous patch.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoled: gpio: Default to using node name if label is absent
Sean Anderson [Mon, 14 Sep 2020 15:02:02 +0000 (11:02 -0400)]
led: gpio: Default to using node name if label is absent

This more closely mirrors Linux's behaviour, and will make it easier to
transition to using function+color in the future.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agogpio: dw: Return output value when direction is out
Sean Anderson [Mon, 14 Sep 2020 15:02:01 +0000 (11:02 -0400)]
gpio: dw: Return output value when direction is out

dm_gpio_ops.get_value can be called when the gpio is either input or
output. The current dw code always returns the input value, which is
invalid if the direction is set to out.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
4 years agogpio: dw: Add a trailing underscore to generated name
Sean Anderson [Mon, 14 Sep 2020 15:02:00 +0000 (11:02 -0400)]
gpio: dw: Add a trailing underscore to generated name

Previously, if there was no bank-name property, it was easy to have
confusing gpio names like "gpio1@08", instead of "gpio1@0_8". This patch
follows the example of the sifive gpio driver.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agogpio: dw: Fix warnings about casting int to pointer
Sean Anderson [Mon, 14 Sep 2020 15:01:59 +0000 (11:01 -0400)]
gpio: dw: Fix warnings about casting int to pointer

Change the type of gpio_dwabp_platdata.base from fdt_addr_t to a void
pointer, since we pass it to readl.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopinctrl: Add support for Kendryte K210 FPIOA
Sean Anderson [Mon, 14 Sep 2020 15:01:58 +0000 (11:01 -0400)]
pinctrl: Add support for Kendryte K210 FPIOA

The Fully-Programmable Input/Output Array (FPIOA) device controls pin
multiplexing on the K210. The FPIOA can remap any supported function to any
multifunctional IO pin. It can also perform basic GPIO functions, such as
reading the current value of a pin. However, GPIO functionality remains
largely unimplemented (in favor of the dedicated GPIO peripherals).

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agotest: pinmux: Add test for pin muxing
Sean Anderson [Mon, 14 Sep 2020 15:01:57 +0000 (11:01 -0400)]
test: pinmux: Add test for pin muxing

This extends the pinctrl-sandbox driver to support pin muxing, and adds a
test for that behaviour. The test is done in C and not python (like the
existing tests for the pinctrl uclass) because it needs to call
pinctrl_select_state.  Another option could be to add a command that
invokes pinctrl_select_state and then test everything in
test/py/tests/test_pinmux.py.

The pinctrl-sandbox driver now mimics the way that many pinmux devices
work.  There are two groups of pins which are muxed together, as well as
four pins which are muxed individually. I have tried to test all normal
paths. However, very few error cases are explicitly checked for.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopinctrl: Reformat documentation in dm/pinctrl.h
Sean Anderson [Mon, 14 Sep 2020 15:01:56 +0000 (11:01 -0400)]
pinctrl: Reformat documentation in dm/pinctrl.h

This normalizes the documentation to conform to kernel-doc style [1]. It
also moves the documentation for pinctrl_ops inline, and adds argument and
return-value documentation. I have kept the usual function style for these
comments. I could not find any existing examples of function documentation
inside structs.

[1] https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agopinctrl: Add pinmux property support to pinctrl-generic
Sean Anderson [Mon, 14 Sep 2020 15:01:55 +0000 (11:01 -0400)]
pinctrl: Add pinmux property support to pinctrl-generic

The pinmux property allows for smaller and more compact device trees,
especially when there are many pins which need to be assigned individually.
Instead of specifying an array of strings to be parsed as pins and a
function property, the pinmux property contains an array of integers
representing pinmux groups. A pinmux group consists of the pin identifier
and mux settings represented as a single integer or an array of integers.
Each individual pin controller driver specifies the exact format of a
pinmux group. As specified in the Linux documentation, a pinmux group may
be multiple integers long. However, no existing drivers use multi-integer
pinmux groups, so I have chosen to omit this feature. This makes the
implementation easier, since there is no need to allocate a buffer to do
endian conversions.

Support for the pinmux property is done differently than in Linux.  As far
as I can tell, inversion of control is used when implementing support for
the pins and groups properties to avoid allocating. This results in some
duplication of effort; every property in a config node is parsed once for
each pin in that node. This is not such an overhead with pins and groups
properties, since having multiple pins in one config node does not occur
especially often. However, the semantics of the pinmux property make such a
configuration much more appealing. A future patch could parse all config
properties at once and store them in an array. This would make it easier to
create drivers which do not function solely as callbacks from
pinctrl-generic.

This commit increases the size of the sandbox build by approximately 48
bytes.  However, it also decreases the size of the K210 device tree by 2
KiB from the previous version of this series.

The documentation has been updated from the last Linux commit before it was
split off into yaml files.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoram: add ddr4 dual x8 configuration
Dylan Hung [Mon, 7 Sep 2020 08:25:07 +0000 (16:25 +0800)]
ram: add ddr4 dual x8 configuration

the aspeed ddr sdram controller needs to know if the memory chip mounted on
the board is dual x8 die or not. Or it may get the wrong size of the
memory space.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
4 years agoram: move aspeed ram driver into drivers/ directory
Dylan Hung [Mon, 7 Sep 2020 08:25:06 +0000 (16:25 +0800)]
ram: move aspeed ram driver into drivers/ directory

to improve the maintainability.  It is more easier to modify and add
configurations of the driver in the centralized ram driver directory.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-cfi-flash
Tom Rini [Thu, 8 Oct 2020 14:20:53 +0000 (10:20 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-cfi-flash

- Fix devicetree address determination seen on QEMU ARM64
- Use DMA for reads is available

4 years agocfi_flash: Fix devicetree address determination
Andre Przywara [Wed, 23 Sep 2020 23:22:04 +0000 (00:22 +0100)]
cfi_flash: Fix devicetree address determination

The cfi-flash driver uses an open-coded version of the generic
algorithm to decode and translate multiple frames of a "reg" property.

This starts off the wrong foot by using the address-cells and size-cells
properties of *this* very node, and not of the parent. This somewhat
happened to work back when we were using a wrong default size of 2,
but broke about a year ago with commit 0ba41ce1b781 ("libfdt: return
correct value if #size-cells property is not present").

Instead of fixing the reinvented wheel, just use the generic function
that does all of this properly.

This fixes U-Boot on QEMU (-arm64), which was crashing due to decoding
a wrong flash base address:
DRAM:  1 GiB
Flash: "Synchronous Abort" handler, esr 0x96000044
elr: 00000000000211dc lr : 00000000000211b0 (reloc)
elr: 000000007ff5e1dc lr : 000000007ff5e1b0
x0 : 00000000000000f0 x1 : 000000007ff5e1d8
x2 : 000000007edfbc48 x3 : 0000000000000000
x4 : 0000000000000000 x5 : 00000000000000f0
x6 : 000000007edfbc2c x7 : 0000000000000000
x8 : 000000007ffd8d70 x9 : 000000000000000c
x10: 0400000000000003 x11: 0000000000000055
     ^^^^^^^^^^^^^^^^

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agomtd: cfi_mtd: Use DMA for reads
Vignesh Raghavendra [Thu, 17 Sep 2020 11:23:08 +0000 (16:53 +0530)]
mtd: cfi_mtd: Use DMA for reads

When possible use DMA for reading from CFI flash, this provides upto 5x
improvement in read performance with high speed CFI compliant flashes
like HyperFlash.

Code will gracefully fallback to CPU copy when DMA is unavailable.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agodma: Reduce error level when DMA channel type does not exist
Vignesh Raghavendra [Thu, 17 Sep 2020 11:23:07 +0000 (16:53 +0530)]
dma: Reduce error level when DMA channel type does not exist

Caller would need gracefully handle failures of dma_get_device(),
therefore reduce pr_err() to pr_debug() when DMA device is not found.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoMerge tag 'mips-pull-2020-10-07' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Wed, 7 Oct 2020 21:25:25 +0000 (17:25 -0400)]
Merge tag 'mips-pull-2020-10-07' of https://gitlab.denx.de/u-boot/custodians/u-boot-mips

- mips: octeon: add support for DDR4 memory controller
- mips: octeon: add support for DWC3 USB
- mips: octeon: add support for booting Linux

4 years agomips: octeon: octeon_common.h: Increase CONFIG_SYS_BOOTM_LEN
Stefan Roese [Thu, 20 Aug 2020 05:22:04 +0000 (07:22 +0200)]
mips: octeon: octeon_common.h: Increase CONFIG_SYS_BOOTM_LEN

Increase CONFIG_SYS_BOOTM_LEN to 64MiB for Linux kernel booting.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add bootoctlinux command
Aaron Williams [Thu, 20 Aug 2020 05:22:03 +0000 (07:22 +0200)]
mips: octeon: Add bootoctlinux command

Octeon needs a platform specific cmd to boot the Linux kernel, as
specific parameters need to be passed and special handling for the
multiple cores (SMP) is needed.

Co-developed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
[use gd->ram_base instead of gd->bd->bi_memstart]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
4 years agomips: octeon: Add bootmem support
Aaron Williams [Thu, 20 Aug 2020 05:22:02 +0000 (07:22 +0200)]
mips: octeon: Add bootmem support

This is needed for Linux booting, as the memory infos need to be passed
in this bootmem format to the Linux kernel.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add coremask support
Aaron Williams [Thu, 20 Aug 2020 05:22:01 +0000 (07:22 +0200)]
mips: octeon: Add coremask support

This patch adds the coremask handling functions.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add header cvmx-bootinfo.h
Aaron Williams [Thu, 20 Aug 2020 05:22:00 +0000 (07:22 +0200)]
mips: octeon: Add header cvmx-bootinfo.h

Add header to handle bootinfo support, needed for Octeon Linux kernel
booting.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add header cvmx-fuse.h
Aaron Williams [Thu, 20 Aug 2020 05:21:59 +0000 (07:21 +0200)]
mips: octeon: Add header cvmx-fuse.h

Add header to handle Octeon fuse access.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add header octeon-feature.h
Aaron Williams [Thu, 20 Aug 2020 05:21:58 +0000 (07:21 +0200)]
mips: octeon: Add header octeon-feature.h

This header includes the Octeon feature detection used in many Octeon
drivers.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add header cvmx-regs.h
Aaron Williams [Thu, 20 Aug 2020 05:21:57 +0000 (07:21 +0200)]
mips: octeon: Add header cvmx-regs.h

This header includes common register defines and accessor functions.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: lowlevel_init.S: Add NMI handling code for SMP Linux booting
Stefan Roese [Thu, 20 Aug 2020 05:21:56 +0000 (07:21 +0200)]
mips: octeon: lowlevel_init.S: Add NMI handling code for SMP Linux booting

This patch adds the necessary lowlevel init code, to enable SMP Linux
booting. This code will be used with the platform specific Octeon Linux
boot command "bootoctlinux", which starts a configurable number of cores
into Linux.

Additionally some erratas and lowlevel register initializations are
copied from the original Cavium / Marvell U-Boot source code, enabling
booting into the Linux kernel.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: octeon-model.h: Enable inclusion from assembler files
Stefan Roese [Thu, 20 Aug 2020 05:21:55 +0000 (07:21 +0200)]
mips: octeon: octeon-model.h: Enable inclusion from assembler files

Add the #ifdef __ASSEMBLY__ checks to enable inclusion of this header
from assembler files.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: octeon_ebb7304_defconfig: Enable USB support
Stefan Roese [Mon, 24 Aug 2020 11:04:43 +0000 (13:04 +0200)]
mips: octeon: octeon_ebb7304_defconfig: Enable USB support

This patch enables USB support with some helpful commands, like fs
support.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add USB DT nodes
Stefan Roese [Mon, 24 Aug 2020 11:04:42 +0000 (13:04 +0200)]
mips: octeon: Add USB DT nodes

Add the USB device tree nodes to the Octeon dts/dtsi files.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agomips: octeon: cache.c: Flush all pending writes in flush_dcache_range()
Stefan Roese [Mon, 24 Aug 2020 11:04:41 +0000 (13:04 +0200)]
mips: octeon: cache.c: Flush all pending writes in flush_dcache_range()

As noticed while working on the USB xHCI support, Octeon needs to flush
all pending writes so that the values are present in the memory. Add
this "syncw" instruction (twice) to flush_dcache_range().

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add mangle-port.h
Stefan Roese [Mon, 24 Aug 2020 11:04:40 +0000 (13:04 +0200)]
mips: octeon: Add mangle-port.h

Import platform specific mangle-port.h header, allowing a area specific
swapping, which is needed on Octeon for USB & PCI areas.

Imported from Linux v5.7.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: cpu.c: Add table for selective swapping
Stefan Roese [Mon, 24 Aug 2020 11:04:39 +0000 (13:04 +0200)]
mips: octeon: cpu.c: Add table for selective swapping

Import octeon_should_swizzle_table[] which is needed for the area
specific swapping. It will be used by the platform specific
mangle-port.h header.

Imported from Linux v5.7.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agousb: xhci: octeon: Add DWC3 glue layer for Octeon
Stefan Roese [Mon, 24 Aug 2020 11:04:38 +0000 (13:04 +0200)]
usb: xhci: octeon: Add DWC3 glue layer for Octeon

This patch adds the glue layer for the MIPS Octeon SoCs. It's ported
mainly from the Linux code.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
4 years agousb: xhci: xhci_bulk_tx: Don't "BUG" when comparing addresses
Stefan Roese [Mon, 24 Aug 2020 11:04:37 +0000 (13:04 +0200)]
usb: xhci: xhci_bulk_tx: Don't "BUG" when comparing addresses

Octeon uses mapped addresses for virtual and physical memory. It's not
that easy to calculate the resulting addresses here. So let's remove
this BUG_ON() completely, as it's not really helpful.

Please also note, that BUG_ON() is not recommended any more in the Linux
kernel.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
4 years agousb: xhci: xhci-dwc3.c: Use dev_remap_addr() instead of dev_get_addr()
Stefan Roese [Mon, 24 Aug 2020 11:04:36 +0000 (13:04 +0200)]
usb: xhci: xhci-dwc3.c: Use dev_remap_addr() instead of dev_get_addr()

On MIPS platforms, mapping of the base address is needed. This patch
switches from dev_get_addr() to dev_remap_addr() to get the mapped base
address of the xHCI controller.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
4 years agomips: octeon: octeon_ebb7304: Add DDR4 support
Stefan Roese [Wed, 2 Sep 2020 06:29:10 +0000 (08:29 +0200)]
mips: octeon: octeon_ebb7304: Add DDR4 support

This patch adds the board specific configuration (struct) for the
Octeon 3 EBB7304 EVK. This struct is ported from the 2013er Cavium /
Marvell U-Boot repository. Also, the Octeon RAM driver is enabled in
the board defconfig for its usage.

Tested with one and two DIMMs on the EBB7304 EVK (8 & 16 GiB).

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: dram.c: Add RAM driver support
Stefan Roese [Wed, 2 Sep 2020 06:29:09 +0000 (08:29 +0200)]
mips: octeon: dram.c: Add RAM driver support

This patch adds the initialization call for the Octeon RAM driver to
the Octeon platforms code. So if enabled via Kconfig, the DDR driver
will be called and the RAM will be configured and used. If the RAM
driver is not enabled, the L2 cache is still used as RAM.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agoram: octeon: Add MIPS Octeon3 DDR4 support (part 3/3)
Aaron Williams [Wed, 2 Sep 2020 06:29:08 +0000 (08:29 +0200)]
ram: octeon: Add MIPS Octeon3 DDR4 support (part 3/3)

This Octeon 3 DDR driver is ported from the 2013 Cavium / Marvell U-Boot
repository. It currently supports DDR4 on Octeon 3. It can be later
extended to support also DDR3 and Octeon 2 platforms.

Part 3 includes the DIMM SPD handling code and the Kconfig / Makefile
integration.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agoram: octeon: Add MIPS Octeon3 DDR4 support (part 2/3)
Aaron Williams [Wed, 2 Sep 2020 06:29:07 +0000 (08:29 +0200)]
ram: octeon: Add MIPS Octeon3 DDR4 support (part 2/3)

This Octeon 3 DDR driver is ported from the 2013 Cavium / Marvell U-Boot
repository. It currently supports DDR4 on Octeon 3. It can be later
extended to support also DDR3 and Octeon 2 platforms.

Part 2 includes the very complex Octeon 3 DDR4 configuration

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agoram: octeon: Add MIPS Octeon3 DDR4 support (part 1/3)
Aaron Williams [Wed, 2 Sep 2020 06:29:06 +0000 (08:29 +0200)]
ram: octeon: Add MIPS Octeon3 DDR4 support (part 1/3)

This Octeon 3 DDR driver is ported from the 2013 Cavium / Marvell U-Boot
repository. It currently supports DDR4 on Octeon 3. It can be later
extended to support also DDR3 and Octeon 2 platforms.

Part 1 adds the base U-Boot RAM driver, which will be instantiated by
the DT based probing.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add octeon_ddr.h header
Aaron Williams [Wed, 2 Sep 2020 06:29:05 +0000 (08:29 +0200)]
mips: octeon: Add octeon_ddr.h header

This header will be used by the DDR driver (lmc). Its ported from the
2013 Cavium / Marvell U-Boot repository.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon Add cvmx/cvmx-lmcx-defs.h header
Aaron Williams [Wed, 2 Sep 2020 06:29:04 +0000 (08:29 +0200)]
mips: octeon Add cvmx/cvmx-lmcx-defs.h header

This header will be used by the DDR driver (lmc). Its ported from the
2013 Cavium / Marvell U-Boot repository.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: Add octeon-model.h header
Aaron Williams [Wed, 2 Sep 2020 06:29:03 +0000 (08:29 +0200)]
mips: octeon: Add octeon-model.h header

This header is used by the upcoming DDR driver and potentially by other
drivers ported from the 2013 Cavium / Marvell U-Boot repository.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
4 years agomips: octeon: dts: mrvl, cn73xx.dtsi: Add memory controller DT node
Stefan Roese [Wed, 2 Sep 2020 06:29:02 +0000 (08:29 +0200)]
mips: octeon: dts: mrvl, cn73xx.dtsi: Add memory controller DT node

This patch adds the memory controller (LMC) DT node to the Octeon 3 dtsi
file. It also adds the L2C DT node, as this is referenced by the DDR
driver.

Signed-off-by: Stefan Roese <sr@denx.de>
4 years agoMerge tag 'dm-pull-6oct20' of git://git.denx.de/u-boot-dm
Tom Rini [Tue, 6 Oct 2020 17:59:01 +0000 (13:59 -0400)]
Merge tag 'dm-pull-6oct20' of git://git.denx.de/u-boot-dm

bloblist enhancement for alignment
Update ofnode/dev_read phandle function
sandbox keyboard enhancements and fixes

4 years agosandbox: avoid duplicate backslash input
Heinrich Schuchardt [Tue, 29 Sep 2020 01:56:20 +0000 (03:56 +0200)]
sandbox: avoid duplicate backslash input

When using SDL for input the SDL key codes are first converted to Linux key
codes and then to matrix entries of the cross wired keyboard.

We must not map any key code to two different places on the keyboard. So
comment out one backslash position.

Update the rest of the file from Linux 5.7.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>