platform/kernel/u-boot.git
2 years agodoc: Add man page for dumpimage
Sean Anderson [Sat, 25 Jun 2022 17:12:21 +0000 (13:12 -0400)]
doc: Add man page for dumpimage

This tool seems a bit underloved. Unfortunately, it seems to be missing
support for FIT images. Alas...

Add a man page documenting it. The example is taken from commit a804b5ce2d
("Add dumpimage, a tool to extract data from U-Boot images").

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Further document -o and -R
Sean Anderson [Sat, 25 Jun 2022 17:12:20 +0000 (13:12 -0400)]
doc: mkimage: Further document -o and -R

Despite the original description of these options, they are not always
image names, or even files. Some image types use these options to convey
configuration directly. Re-document these options as configuration options.

Additionally, add a new section documenting the format of the configuration
for each image type which uses it. In general, if configuration is used
directly (without a separate file) I have added documentation for it. If
the configuration points to a separate file, I have referenced that file's
documentation. Where there is no such documentation, I have added it.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agomkimage: Add long options
Sean Anderson [Sat, 25 Jun 2022 17:12:19 +0000 (13:12 -0400)]
mkimage: Add long options

The mkimage command has had many options added over the years.
Unfortunately, we are starting to run out of short options. Recent options
don't have any obvious relation to their meaning (e.g. -o/-g). Fortunately,
long options exist. Add long options for each current short option.

For the curious, the remaining short options are HIkLmMPQSuUwWXyYzZ.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Remove AUTHORS section
Sean Anderson [Sat, 25 Jun 2022 17:12:18 +0000 (13:12 -0400)]
doc: mkimage: Remove AUTHORS section

Per man-pages(7), "use of an AUTHORS section is strongly discouraged."
Remove it, and instead add some copyright notices and an SPDX. The default
license for U-Boot is GPL2, so that's what I put. The copyright dates are
based on the commit dates.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Add SEE ALSO section
Sean Anderson [Sat, 25 Jun 2022 17:12:17 +0000 (13:12 -0400)]
doc: mkimage: Add SEE ALSO section

This adds a SEE ALSO section to link to similar man pages, as well as to
the U-Boot documentation.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Add BUGS section
Sean Anderson [Sat, 25 Jun 2022 17:12:16 +0000 (13:12 -0400)]
doc: mkimage: Add BUGS section

In leiu of a non-standard HOMEPAGE section, add a BUGS section with a link
to the issue tracker.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Edit options for style and consistency
Sean Anderson [Sat, 25 Jun 2022 17:12:15 +0000 (13:12 -0400)]
doc: mkimage: Edit options for style and consistency

This makes a variety of changes for the options to make them
typographically consistent, clarify their meaning, and fix grammatical (or
other) errors. Many of the changes here are stylistic, though there are a
few fixes. The main changes I made across the board were:

- All options are bolded and parameters italicised
- All single quotes are properly matched (instead of using apostrophes)
- Minor background info has been added to clarify many underdocumented
  options
- Default values for options are documented

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use correct capitalization for NAME
Sean Anderson [Sat, 25 Jun 2022 17:12:14 +0000 (13:12 -0400)]
doc: mkimage: Use correct capitalization for NAME

The description in NAME should not be capitalized. Fix a grammatical error
as well.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Rearrange/remove some options
Sean Anderson [Sat, 25 Jun 2022 17:12:13 +0000 (13:12 -0400)]
doc: mkimage: Rearrange/remove some options

This moves some options which work in any mode to the general options
section. -p is moved to after -E/-B since those options are related. This
also adds documentation for -h and -V.

The -F, -l, and -G options are documented twice. Remove the second
documentation in each case. The synopsis for -l also suggests an implied
second uimage-file-name parameter. E.g.

mkimage [-l uimage-file-name] uimage-file-name

This is misleading, so remove it. Wrap a few lines to 80 characters as
well.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use subsection macro
Sean Anderson [Sat, 25 Jun 2022 17:12:12 +0000 (13:12 -0400)]
doc: mkimage: Use subsection macro

The options are divided up into several subsections. Use the appropriate
macro. While we're at it, rename the headings to better reflect the
contents of their sections.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Regularize option documentation
Sean Anderson [Sat, 25 Jun 2022 17:12:11 +0000 (13:12 -0400)]
doc: mkimage: Regularize option documentation

Square brackets are commonly used to denote optional parts of a command.
However, all option arguments are mandatory. Remove these brackets. This
also removes some unnecessary quotation marks, and uses hyphens to connect
words in option arguments. This is intended to just clean up the
formatting, leaving content corrections to later patches.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Reformat examples
Sean Anderson [Sat, 25 Jun 2022 17:12:10 +0000 (13:12 -0400)]
doc: mkimage: Reformat examples

This puts each example in a new paragraph and uses a hanging indent for
continued lines to increase clarity. We use tabs instead of .in or .RS for
the indent because it renders properly in both man and mandoc (which is
what many common HTML man pages use). The only nit is that the tab stops in
man default to something like 2", so reduce that to 1". We also escape
every "minus" as recommended by man-pages(7).

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use empty request instead of blank lines
Sean Anderson [Sat, 25 Jun 2022 17:12:09 +0000 (13:12 -0400)]
doc: mkimage: Use empty request instead of blank lines

Blank lines do not have well-defined semantics in fill mode (the default).
Instead, use empty requests (.) where vertical space is necessary for
readability. There are a few places where we use a paragraph instead.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agodoc: mkimage: Use standard style for synopsis
Sean Anderson [Sat, 25 Jun 2022 17:12:08 +0000 (13:12 -0400)]
doc: mkimage: Use standard style for synopsis

The synopsis section is a bit messy. As an example, "uimage file name" is
printed in italics, bold, and roman (depending on the line). This cleans
things up and converts the synopsis section to use standard style. The
.SY/.YS macros set up appropriate formatting for command synopsis sections
(such as disabling hyphenation and setting a hanging indent). All parts of
the synopsis now use the following style:

- Bold for parts of the command which should be typed in by the user (such
  as the program name and flags)
- Italic for parts which should be replaced (such as uimage-file-name)
- Roman for parts which should not be typed at all (such as brackets)

Multi-word variables now use hyphens to connect their words instead of
spaces. This makes it clearer that all the words are part of the same
variable. Additionally, "option ..." is used to denote where other options
may be specified, as this appears to be standard style.

In addition to the above style changes, this also makes some changes to
content. The use of the term "legacy" has been removed, since this simply
refers to any non-FIT image type. Additionally, wording like "uimage file
name" has been replaced with "image-file-name" to better reflect that
images may or may not be uImages. Lastly, the "auto" value for -f is
documented in the synopsis.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge branch 'next'
Tom Rini [Mon, 11 Jul 2022 14:18:13 +0000 (10:18 -0400)]
Merge branch 'next'

2 years agoPrepare v2022.07 v2022.07
Tom Rini [Mon, 11 Jul 2022 13:42:58 +0000 (09:42 -0400)]
Prepare v2022.07

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-07-08-Kconfig-migrations' into next
Tom Rini [Fri, 8 Jul 2022 21:57:39 +0000 (17:57 -0400)]
Merge branch '2022-07-08-Kconfig-migrations' into next

- Another small round of CONFIG migrations to Kconfig

2 years agopowerpc: Use the poison value of 0xdeadbeef directly in DDR init
Tom Rini [Mon, 27 Jun 2022 17:35:51 +0000 (13:35 -0400)]
powerpc: Use the poison value of 0xdeadbeef directly in DDR init

On p1_p2_rdb_pc platforms, we set ddr_data_init to the "poison" value of
0xdeadbeef rather than a real calculated / derived value.  Do this
directly and comment rather than via CONFIG.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoi2c: Remove non-DM_I2C support from davinci_i2c.c
Tom Rini [Mon, 27 Jun 2022 17:35:50 +0000 (13:35 -0400)]
i2c: Remove non-DM_I2C support from davinci_i2c.c

As the migration deadline has passed, and all platforms have been
migrated, remove the non-DM code here.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agolegoev3: Migrate to DM_I2C
Tom Rini [Mon, 27 Jun 2022 17:35:49 +0000 (13:35 -0400)]
legoev3: Migrate to DM_I2C

Perform a basic migration of the calls in setup_serial_number() to DM so
that we can switch to using DM_I2C on this platform.

Cc: David Lechner <david@lechnology.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: David Lechner <david@lechnology.com>
2 years agoomap3: emif4: More clearly hard-code cs0 size
Tom Rini [Mon, 27 Jun 2022 17:35:48 +0000 (13:35 -0400)]
omap3: emif4: More clearly hard-code cs0 size

We have a single platform that is both in the OMAP3 family of parts, but
has an EMIF4 memory controller.  Currently we hard-code the size of
chip select 0.  Make this more clear by putting the value in the
function rather than a CONFIG option.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove strongarm support
Tom Rini [Mon, 27 Jun 2022 17:35:47 +0000 (13:35 -0400)]
arm: Remove strongarm support

There are no platforms using this architecture anymore, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_CACHE_STASHING to Kconfig
Tom Rini [Mon, 27 Jun 2022 17:35:46 +0000 (13:35 -0400)]
Convert CONFIG_SYS_CACHE_STASHING to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_CACHE_STASHING

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agorequirements: Move to atomicwrites==1.4.1
Tom Rini [Fri, 8 Jul 2022 19:23:05 +0000 (15:23 -0400)]
requirements: Move to atomicwrites==1.4.1

As explained upstream:
https://github.com/untitaker/python-atomicwrites/issues/61 there is no
longer a 1.3.0 version but the API is unchanged.  Move to 1.4.1.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agorequirements: Move to atomicwrites==1.4.1
Tom Rini [Fri, 8 Jul 2022 19:23:05 +0000 (15:23 -0400)]
requirements: Move to atomicwrites==1.4.1

As explained upstream:
https://github.com/untitaker/python-atomicwrites/issues/61 there is no
longer a 1.3.0 version but the API is unchanged.  Move to 1.4.1.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'dm-pull-28jun22' of https://source.denx.de/u-boot/custodians/u-boot-dm...
Tom Rini [Fri, 8 Jul 2022 18:39:07 +0000 (14:39 -0400)]
Merge tag 'dm-pull-28jun22' of https://source.denx.de/u-boot/custodians/u-boot-dm into next

nman external-symbol improvements
Driver model memory-usage reporting
patman test-reporting improvements
Add bloblist design goals

2 years agoimx8mq_phanbell: Remove custom CONFIG_SYS_MALLOC_F_LEN
Fabio Estevam [Fri, 8 Jul 2022 17:24:52 +0000 (14:24 -0300)]
imx8mq_phanbell: Remove custom CONFIG_SYS_MALLOC_F_LEN

Currently, the imx8mq_phanbell board fails to boot.

Remove the custom CONFIG_SYS_MALLOC_F_LEN setting in favor of the
generic one done via the main Kconfig.

Since commit b598957206e5 ("Kconfig: Fix SYS_MALLOC_F_LEN for i.MX8MQ")
the default SYS_MALLOC_F_LEN value for i.MX8MQ is 0x2000.

With such default value, the board boots again.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoMerge branch '2022-07-08-assorted-updates' into next
Tom Rini [Fri, 8 Jul 2022 16:38:03 +0000 (12:38 -0400)]
Merge branch '2022-07-08-assorted-updates' into next

- Assorted bugfixes and improvements

2 years agoboard_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
Marek Vasut [Sat, 25 Jun 2022 17:58:24 +0000 (19:58 +0200)]
board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR

In case the MALLOC_F_ADDR is set to non-zero value, the early malloc area is
not going to be placed just below stack top, but elsewhere. Do not reserve
MALLOC_F bytes in this case, as that wastes stack space and may even cause
insufficient stack space in SPL.

This functionality is particularly useful on i.MX8M, where the insufficient
stack space can be triggered.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Tom Rini <trini@konsulko.com>
2 years agoregmap: fix some comments
Ralph Siemsen [Fri, 24 Jun 2022 15:19:15 +0000 (11:19 -0400)]
regmap: fix some comments

Correct spelling and copy/paste errors in comments.

Fixes 1c4db59d9b ("regmap: Add support for regmap fields")

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoserial: ns16550: Wait in debug_uart_init until tx buffer is empty
Pali Rohár [Thu, 23 Jun 2022 12:13:56 +0000 (14:13 +0200)]
serial: ns16550: Wait in debug_uart_init until tx buffer is empty

Commit d293759d55cc ("serial: ns16550: Add support for
SPL_DEBUG_UART_BASE") fixed support for setting correct early debug UART
base address in SPL.

But after this commit, output from Marvell A385 BootROM is truncated or
lost and not fully present on serial console.

Debugging this issue showed that BootROM just put bytes into UART HW output
buffer and does not wait until UART HW transmit all characters. U-Boot
ns16550 early debug is initialized very early and during its initialization
is resetting UART HW and flushing remaining transmit buffer (which still
contains BootROM output).

Fix this issue by waiting in init function prior resetting UART HW until
TxEmpty bit in UART Line Status Register is set. TxEmpty is set when all
remaining bytes from HW buffer are transmitted.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
[trini: Add comment, move ';' to new line per checkpatch.pl]
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoled: pwm: Use NOP uclass driver for top-level node
Stefan Herbrechtsmeier [Thu, 23 Jun 2022 09:25:29 +0000 (11:25 +0200)]
led: pwm: Use NOP uclass driver for top-level node

The top level DT node of pwm-leds is not a LED itself, bind NOP uclass
driver to it, and bind different LED uclass driver to its subnodes which
represent the actual LEDs. This change removes the top-level node from
the 'led list' command output and is based on the commit 01074697801b
("led: gpio: Use NOP uclass driver for top-level node").

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2 years agomtd: rawnand: Add support to dedicated function to set timings
Kory Maincent [Wed, 22 Jun 2022 09:11:45 +0000 (11:11 +0200)]
mtd: rawnand: Add support to dedicated function to set timings

With the current code if the board has an ONFI compliant NAND without
support to the get and set features, U-boot returns an ENOTSUP error when
trying to tune the timings which prevents the probe of the device.
Indeed onfi_set_features() return ENOTSUP error if set/get features is not
supported. In the case of timings we should not return ENOTSUP because we
can use the default timings. The NAND is already capable of listening at
its highest supported rate, so we assume in this case that it is fine to
skip the operation.

Fix it by adding an intermediate nand_onfi_set_timings() function which
does not error out if set/get feature is not supported.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2 years agofw_env: add fallback to Linux's NVMEM based access
Rafał Miłecki [Thu, 16 Jun 2022 18:59:03 +0000 (20:59 +0200)]
fw_env: add fallback to Linux's NVMEM based access

A new DT binding for describing environment data block has been added in
Linux's commit 5db1c2dbc04c ("dt-bindings: nvmem: add U-Boot environment
variables binding"). Once we get a proper Linux NVMEM driver it'll be
possible to use Linux's binary interface for user-space as documented
in the:
https://www.kernel.org/doc/html/latest/driver-api/nvmem.html

This commits makes fw_env fallback to looking for a compatible NVMEM
device in case config file isn't present. In a long term this may make
config files redundant and avoid code (info) duplication.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agoMakefile: respect CONFIG_CC_OPTIMIZE_FOR_DEBUG for host tools
Heinrich Schuchardt [Thu, 16 Jun 2022 11:43:50 +0000 (13:43 +0200)]
Makefile: respect CONFIG_CC_OPTIMIZE_FOR_DEBUG for host tools

If CONFIG_CC_OPTIMIZE_FOR_DEBUG=y, the host tools should be built with
debug symbols and with reduced optimization.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agosound: enable building DA7219 driver with ACPIGEN=n
Heinrich Schuchardt [Sun, 12 Jun 2022 13:15:34 +0000 (13:15 +0000)]
sound: enable building DA7219 driver with ACPIGEN=n

sandbox_defconfig builds the DA7219 driver. It should be possible to
build the sandbox without ACPI support.

ACPI support in the DA7219 driver is only needed when creating an ACPI
table. Fix building with ACPIGEN=n.

Fixes: 0324b7123e22 ("sound: Add an ACPI driver for Dialog Semicondutor da7219")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agosnd: enable building max98357a driver with ACPIGEN=n
Heinrich Schuchardt [Sun, 12 Jun 2022 13:13:05 +0000 (13:13 +0000)]
snd: enable building max98357a driver with ACPIGEN=n

sandbox_defconfig builds the max98357a driver. It should be possible to
build the sandbox without ACPI support.

ACPI support in the max98357a driver is only needed when creating an ACPI
table. Fix building with ACPIGEN=n.

Fixes: 54bcca29737f ("sound: Add an ACPI driver for Maxim MAX98357ac")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agotest: fix CONFIG_ACPIGEN dependencies
Heinrich Schuchardt [Sun, 12 Jun 2022 12:28:22 +0000 (12:28 +0000)]
test: fix CONFIG_ACPIGEN dependencies

Some tests cannot be built with CONFIG_ACPIGEN=n. Consider this in the
Makefile.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agodistroboot: Fix ubifs
Pali Rohár [Tue, 31 May 2022 08:32:36 +0000 (10:32 +0200)]
distroboot: Fix ubifs

Fix multiple issues in ubifs distroboot code:

U-Boot supports attaching only one MTD device as UBI at the time. So
always call 'ubifsmount ubi0:${bootubivol}' for mounting UBI volume
${bootubivol}. Usage of 'ubi${devnum}' is incorrect as 'ubi part'
command attach MTD device always as UBI device ubi0.

Set distroboot ${bootfstype} variable to ubifs in ubifs_boot command.
Distroboot scripts require ${bootfstype} variable to be properly set and it
is already set for all other boot types.

Set distroboot ${distro_bootpart} variable to ${bootubivol} value. UBI
device does not have partitions, but has volumes. Distroboot scripts
require something to be set in ${distro_bootpart} variable, so set it to
the UBI volume which is currently mounted by ubifs.

Set distroboot ${devnum} variable to fixed string "ubi0". ubifs code
differs from the other partition code that it requires "ubi" prefix before
number.

Explicitly unmount ubifs volume after loading all data from it. This allows
to detach UBI device from MTD device.

Move definition of MTD device with UBI and UBI volume with ubifs filesystem
from global env variables ${bootubipart} and ${bootubivol} into the
distroboot "func" macro, defined in board include config files. UBIFS
distroboot macros then set ${bootubipart} and ${bootubivol} local variables
for compatibility with existing distroboot scripts.

This last change allows to define more UBIFS target devices and make it
clear what is boot MTD/UBI device.

All board include config files are adjusted to use this new scheme of
specifying boot MTD/UBI device.

Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoubifs: Fix reference count leak in ubifsumount
Pali Rohár [Mon, 30 May 2022 09:09:11 +0000 (11:09 +0200)]
ubifs: Fix reference count leak in ubifsumount

Original ubifs code was designed that after ubifs_umount() call it is
required to also call ubi_close_volume() which closes underlying UBI
volume. But U-Boot ubifs modification have not implemented it properly
which caused that ubifsumount command contains resource leak. It can be
observed by calling simple sequence of commands:

  => ubi part mtd2
  ubi0: attaching mtd2
  ...
  => ubifsmount ubi0
  => ubifsumount
  Unmounting UBIFS volume rootfs!
  => ubi detach
  ubi0 error: ubi_detach_mtd_dev: ubi0 reference count 1, destroy anyway
  ubi0: detaching mtd2
  ubi0: mtd2 is detached

Fix this issue by calling ubi_close_volume() and mutex_unlock() in
directly in ubifs_umount() function before freeing U-Boot's global
ubifs_sb. And remove duplicate calls of these two functions in remaining
places. Note that when ubifs_umount() is not called then during error
handling is still needed to call ubi_close_volume() and mutex_unlock.

With this change ubifsumount command does not throw that error anymore:

  => ubi part rootfs
  ubi0: attaching mtd2
  ...
  => ubifsmount ubi0
  => ubifsumount
  Unmounting UBIFS volume rootfs!
  => ubi detach
  ubi0: detaching mtd2
  ubi0: mtd2 is detached

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoAdd SCSI scan for ENV in EXT4 or FAT
Rogier Stam [Wed, 11 May 2022 21:20:28 +0000 (23:20 +0200)]
Add SCSI scan for ENV in EXT4 or FAT

When having environment stored in EXT4 or FAT
and using an AHCI or SCSI device / partition
the scan would not be performed early enough
and hence the device would not be recognized.
This change adds the scan when the interface
is "scsi" in a similar way to mmc_initialize.

Signed-off-by: Rogier Stam <rogier@unrailed.org>
Reviewed-by: Pali Rohár <pali@kernel.org>
2 years agoMerge branch '2022-07-07-Kconfig-migrations-dead-code-removal' into next
Tom Rini [Thu, 7 Jul 2022 18:12:07 +0000 (14:12 -0400)]
Merge branch '2022-07-07-Kconfig-migrations-dead-code-removal' into next

- Migrate more CONFIG options to Kconfig and remove some unused code
  while we're at it.

2 years agoConvert CONFIG_SYS_BOOTM_LEN to Kconfig
Tom Rini [Sat, 25 Jun 2022 23:29:46 +0000 (19:29 -0400)]
Convert CONFIG_SYS_BOOTM_LEN to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_BOOTM_LEN

As part of this, rework error handling in boot/bootm.c so that we pass
the buffer size to handle_decomp_error as CONFIG_SYS_BOOTM_LEN will not
be available to host tools but we do know the size that we passed to
malloc().

Cc: Soeren Moch <smoch@web.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_BOOTCOUNT_LE et al to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:49 +0000 (11:02 -0400)]
Convert CONFIG_SYS_BOOTCOUNT_LE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_BOOTCOUNT_LE
   CONFIG_SYS_BOOTCOUNT_BE

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agokmcoge5ne: Move BFTIC3 CONFIG references to their usage
Tom Rini [Sat, 25 Jun 2022 15:02:48 +0000 (11:02 -0400)]
kmcoge5ne: Move BFTIC3 CONFIG references to their usage

We only reference CONFIG_SYS_BFTIC3_BASE in one location.  Move the
comment to where we reference it, and use the value directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Holger Brunck <holger.brunck@hitachienergy.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2 years agomx*sabresd: Reference CONFIG_SYS_AUXCORE_BOOTDATA value directly
Tom Rini [Sat, 25 Jun 2022 15:02:47 +0000 (11:02 -0400)]
mx*sabresd: Reference CONFIG_SYS_AUXCORE_BOOTDATA value directly

As this is used in the environment, reference it directly rather than as
a CONFIG value.

Cc: Fabio Estevam <festevam@gmail.com>
Cc: Adrian Alonso <adrian.alonso@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_BOOT_RAMDISK_HIGH to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:46 +0000 (11:02 -0400)]
Convert CONFIG_SYS_BOOT_RAMDISK_HIGH to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_BOOT_RAMDISK_HIGH

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_FSL_CPC et al to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:45 +0000 (11:02 -0400)]
Convert CONFIG_SYS_FSL_CPC et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_FSL_CPC
   CONFIG_SYS_CPC_REINIT_F

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_RAMBOOT to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:44 +0000 (11:02 -0400)]
Convert CONFIG_SYS_RAMBOOT to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_RAMBOOT

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_BOOK3E_HV to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:43 +0000 (11:02 -0400)]
Convert CONFIG_SYS_BOOK3E_HV to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_BOOK3E_HV

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Remove PXA architecture support
Tom Rini [Sat, 25 Jun 2022 15:02:42 +0000 (11:02 -0400)]
arm: Remove PXA architecture support

With the last platform for this architecture removed, remove the rest of
the architecture support as well.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoConvert CONFIG_SYS_83XX_DDR_USES_CS0 to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:41 +0000 (11:02 -0400)]
Convert CONFIG_SYS_83XX_DDR_USES_CS0 to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_83XX_DDR_USES_CS0

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agothunerx_88xx: Clean up config slightly.
Tom Rini [Sat, 25 Jun 2022 15:02:40 +0000 (11:02 -0400)]
thunerx_88xx: Clean up config slightly.

We don't use CONFIG_SYS_64BIT anywhere and can use
CONFIG_TARGET_THUNDERX_88XX to build the device trees.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_PALMAS_POWER to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:38 +0000 (11:02 -0400)]
Convert CONFIG_PALMAS_POWER to Kconfig

This converts the following to Kconfig:
   CONFIG_PALMAS_POWER

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS et al to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:37 +0000 (11:02 -0400)]
Convert CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
   CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION
   CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_DISCOVER_PHY to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:36 +0000 (11:02 -0400)]
Convert CONFIG_SYS_DISCOVER_PHY to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_DISCOVER_PHY

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_UNIFY_CACHE to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:35 +0000 (11:02 -0400)]
Convert CONFIG_SYS_UNIFY_CACHE to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_UNIFY_CACHE

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agolayerscape: Remove some unused CONFIG symbols
Tom Rini [Sat, 25 Jun 2022 15:02:34 +0000 (11:02 -0400)]
layerscape: Remove some unused CONFIG symbols

All of these symbols are not referenced anywhere else in the code, so
remove them.

Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agousb: Remove some unused CONFIG settings
Tom Rini [Sat, 25 Jun 2022 15:02:33 +0000 (11:02 -0400)]
usb: Remove some unused CONFIG settings

On platforms that use CONFIG_USB_OHCI_NEW we do not need to set
CONFIG_SYS_USB_OHCI_REGS_BASE nor CONFIG_SYS_USB_OHCI_SLOT_NAME.  Drop
these from platforms that we can.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agousb: ohci-hcd: Remove some unused legacy code
Tom Rini [Sat, 25 Jun 2022 15:02:32 +0000 (11:02 -0400)]
usb: ohci-hcd: Remove some unused legacy code

At this point, the only user of ohci-hcd that also uses PCI is using DM,
so we can drop CONFIG_PCI_OHCI* usage.  No platforms set either of
CONFIG_SYS_USB_OHCI_BOARD_INIT or CONFIG_SYS_USB_OHCI_CPU_INIT so those
hooks can be removed as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_USB_OHCI_NEW et al to Kconfig
Tom Rini [Sat, 25 Jun 2022 15:02:31 +0000 (11:02 -0400)]
Convert CONFIG_USB_OHCI_NEW et al to Kconfig

This converts the following to Kconfig:
    CONFIG_SYS_OHCI_SWAP_REG_ACCESS
    CONFIG_SYS_USB_OHCI_CPU_INIT
    CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS
    CONFIG_SYS_USB_OHCI_SLOT_NAME
    CONFIG_USB_ATMEL
    CONFIG_USB_ATMEL_CLK_SEL_PLLB
    CONFIG_USB_ATMEL_CLK_SEL_UPLL
    CONFIG_USB_OHCI_LPC32XX
    CONFIG_USB_OHCI_NEW

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agospl: Ensure all SPL symbols in Kconfig have some SPL dependency
Tom Rini [Sat, 11 Jun 2022 03:03:09 +0000 (23:03 -0400)]
spl: Ensure all SPL symbols in Kconfig have some SPL dependency

Tighten up symbol dependencies in a number of places.  Ensure that a SPL
specific option has at least a direct dependency on SPL.  In places
where it's clear that we depend on something more specific, use that
dependency instead.  This means in a very small number of places we can
drop redundant dependencies.

Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_USB_XHCI_EXYNOS et al to Kconfig
Tom Rini [Sat, 11 Jun 2022 03:03:00 +0000 (23:03 -0400)]
Convert CONFIG_USB_XHCI_EXYNOS et al to Kconfig

This converts the following to Kconfig:
   CONFIG_USB_XHCI_EXYNOS
   CONFIG_USB_EHCI_EXYNOS

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-07-06-platform-updates' into next
Tom Rini [Wed, 6 Jul 2022 22:54:29 +0000 (18:54 -0400)]
Merge branch '2022-07-06-platform-updates' into next

- Assorted updates for Toradex, TI, Aspeed and Nuvoton platforms

2 years agomisc: nuvoton: Add host interface configuration driver
Jim Liu [Fri, 24 Jun 2022 08:24:37 +0000 (16:24 +0800)]
misc: nuvoton: Add host interface configuration driver

add nuvoton BMC npcm750 host configuration driver

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2 years agoCI: Add Aspeed AST2600
Joel Stanley [Wed, 29 Jun 2022 07:05:25 +0000 (16:35 +0930)]
CI: Add Aspeed AST2600

The AST2600 has a Qemu model that allows testing. Create a SPI NOR image
containing the combined SPL and u-boot FIT image.

Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoaspeed/spl: Remove OVERLAY from linker script
Joel Stanley [Wed, 29 Jun 2022 07:05:24 +0000 (16:35 +0930)]
aspeed/spl: Remove OVERLAY from linker script

The generic arm linker script contains this section:

   .bss __rel_dyn_start (OVERLAY) : {
       ...
   }

The (OVERLAY) syntax in the description causes the .bss section to be
included in the NOR area of the image:

 $ objdump -t -j .bss spl/u-boot-spl
  SYMBOL TABLE:
  0000c61c l    d  .bss 00000000 .bss
  0000c640 l     O .bss 00000040 __value.0
  0000c68c g     O .bss 00000000 __bss_end
  0000c61c g     O .bss 00000000 __bss_start
  0000c680 g     O .bss 0000000c stdio_devices

This is what the custom linker script tries to avoid, as the NOR area is
read-only.

Remove the OVERLAY syntax to fix the BSS location:

 $ objdump -t -j .bss spl/u-boot-spl
  SYMBOL TABLE:
  83000000 l    d  .bss 00000000 .bss
  83000000 l     O .bss 00000040 __value.0
  0000c61c g     O .bss 00000000 __image_copy_end
  8300004c g     O .bss 00000000 __bss_end
  83000000 g     O .bss 00000000 __bss_start
  83000040 g     O .bss 0000000c stdio_devices

This restores the state of the linker script before the patch that fixed
the linker lists issue.

Fixes: f6810b749f2e ("aspeed/ast2600: Fix SPL linker script")
Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoast2600: Configure u-boot-with-spl.bin target
Joel Stanley [Wed, 29 Jun 2022 07:05:23 +0000 (16:35 +0930)]
ast2600: Configure u-boot-with-spl.bin target

The normal way of loading u-boot is as a FIT, so configure u-boot.img as
the SPL playload.

The u-boot-with-spl.bin target will add padding according to
CONFIG_SPL_MAX_SIZE which defaults to 64KB on the AST2600.

With this the following simple steps can be used to build and boot a
system:

  make u-boot-with-spl.bin
  truncate -s 64M u-boot-with-spl.bin
  qemu-system-arm -nographic -M ast2600-evb \
    -drive file=u-boot-with-spl.bin,if=mtd,format=raw

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agospl: Set SPL_MAX_SIZE default for AST2600
Joel Stanley [Wed, 29 Jun 2022 07:05:22 +0000 (16:35 +0930)]
spl: Set SPL_MAX_SIZE default for AST2600

The AST2600 bootrom has a max size of 64KB. This can be overridden if the
system is running the SPL from SPI NOR and not using secure boot.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoconfig/ast2600: Disable hash hardware accel
Joel Stanley [Wed, 29 Jun 2022 07:05:21 +0000 (16:35 +0930)]
config/ast2600: Disable hash hardware accel

The HACE driver lacks support for all the hash types, causing boot to
fail with the default FIT configuration which uses CRC32.

Additionally the Qemu model or the u-boot driver is unable to correctly
compute the SHA256 hash used in a FIT.

Disable HACE by default while the above issues are worked out to enable
boot testing in Qemu.

Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoconfig/ast2600: Make position independent
Joel Stanley [Wed, 29 Jun 2022 07:05:20 +0000 (16:35 +0930)]
config/ast2600: Make position independent

Allows loading one u-boot from another. Useful for testing on hardware.

Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoconfig/ast2600: Enable CRC32
Joel Stanley [Wed, 29 Jun 2022 07:05:19 +0000 (16:35 +0930)]
config/ast2600: Enable CRC32

Useful for testing images with the default hash type.

Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoconfig/ast2600: Enable eMMC related boot options
Joel Stanley [Thu, 23 Jun 2022 09:05:36 +0000 (18:35 +0930)]
config/ast2600: Enable eMMC related boot options

Allow booting zImage from ext4 devices with DOS or UEFI partition
layouts.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agommc/aspeed: Enable controller clocks
Joel Stanley [Thu, 23 Jun 2022 09:05:35 +0000 (18:35 +0930)]
mmc/aspeed: Enable controller clocks

Request and enable the controller level clocks.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agommc/aspeed: Probe from controller
Joel Stanley [Thu, 23 Jun 2022 09:05:34 +0000 (18:35 +0930)]
mmc/aspeed: Probe from controller

The Aspeed SDHCI controller is arranged with some shared control
registers, followed by one or two sets of actual SDHCI registers.

Adjust the driver to probe this controller device first. The driver then
wants to iterate over the child nodes to probe the SDHCI proper:

    ofnode node;

    dev_for_each_subnode(node, parent) {
     struct udevice *dev;
     int ret;

     ret = device_bind_driver_to_node(parent, "aspeed_sdhci",
      ofnode_get_name(node),
      node, &dev);
     if (ret)
     return ret;
    }

However if we did this the sdhci driver would probe twice; once
"naturally" from the device tree and a second time due to this code.

Instead of doing this we can rely on the probe order, where the
controller will be set up before the sdhci devices. A better solution is
preferred.

Select MISC as the controller driver is implemented as a misc device.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agommc/aspeed: Add debuging for clock probe failures
Joel Stanley [Thu, 23 Jun 2022 09:05:33 +0000 (18:35 +0930)]
mmc/aspeed: Add debuging for clock probe failures

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoclk/ast2500: Add SD clock
Joel Stanley [Thu, 23 Jun 2022 09:05:32 +0000 (18:35 +0930)]
clk/ast2500: Add SD clock

In order to use the clock from the sdhci driver, add the SD clock.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoclk/ast2600: Adjust eMMC clock names
Joel Stanley [Thu, 23 Jun 2022 09:05:31 +0000 (18:35 +0930)]
clk/ast2600: Adjust eMMC clock names

Adjust clock to stay compatible with those used by the Linux kernel
device tree.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoclk/aspeed: Add debug message when clock fails
Joel Stanley [Thu, 23 Jun 2022 09:05:30 +0000 (18:35 +0930)]
clk/aspeed: Add debug message when clock fails

A common message across platforms that prints the clock number.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoARM: dts: ast2500: Update SDHCI nodes
Joel Stanley [Thu, 23 Jun 2022 09:05:29 +0000 (18:35 +0930)]
ARM: dts: ast2500: Update SDHCI nodes

Match the description used by the Linux kernel, except use scu instead
of syscon as the phandle.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoARM: dts: ast2600: Update SDHCI nodes
Joel Stanley [Thu, 23 Jun 2022 09:05:28 +0000 (18:35 +0930)]
ARM: dts: ast2600: Update SDHCI nodes

Match the description used by the Linux kernel, except use scu instead
of syscon as the phandle.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoconfig/aspeed: Enable EEPROM options
Joel Stanley [Thu, 23 Jun 2022 05:10:41 +0000 (14:40 +0930)]
config/aspeed: Enable EEPROM options

To allow testing of the I2C driver, enable the eprom command and the
misc driver.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoconfig/ast2600: Enable I2C driver
Joel Stanley [Thu, 23 Jun 2022 05:10:40 +0000 (14:40 +0930)]
config/ast2600: Enable I2C driver

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoi2c/aspeed: Add AST2600 compatible
Joel Stanley [Thu, 23 Jun 2022 05:10:39 +0000 (14:40 +0930)]
i2c/aspeed: Add AST2600 compatible

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 years agoi2c/aspeed: Fix reset control
Joel Stanley [Thu, 23 Jun 2022 05:10:38 +0000 (14:40 +0930)]
i2c/aspeed: Fix reset control

The reset control was written for the ast2500 and directly programs the
clocking register.

So we can share the code with other SoC generations use the reset device
to deassert the I2C reset line.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 years agoreset/aspeed: Implement status callback
Joel Stanley [Thu, 23 Jun 2022 05:10:37 +0000 (14:40 +0930)]
reset/aspeed: Implement status callback

The I2C driver shares a reset line between buses, so allow it to test
the state of the reset line before resetting it.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 years agoARM: dts: ast2600-evb: Add I2C devices
Joel Stanley [Thu, 23 Jun 2022 05:10:36 +0000 (14:40 +0930)]
ARM: dts: ast2600-evb: Add I2C devices

The EVB has an EEPROM and ADT8490 temp sensor/fan controller on bus 7,
and a LM75 temp sensor on bus 8.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoARM: dts: ast2500-evb: Add I2C devices
Joel Stanley [Thu, 23 Jun 2022 05:10:35 +0000 (14:40 +0930)]
ARM: dts: ast2500-evb: Add I2C devices

The EVB has an EEPROM on bus 3 and a LM75 temp sensor on bus 7. Enable
those busses we can test the I2C driver.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 years agoARM: dts: ast2600-evb: Remove redundant pinctrl
Joel Stanley [Thu, 23 Jun 2022 05:10:34 +0000 (14:40 +0930)]
ARM: dts: ast2600-evb: Remove redundant pinctrl

Now that these are in the dtsi we don't need them in the EVB device
tree.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agoARM: dts: ast2600: Disable I2C nodes by default
Joel Stanley [Thu, 23 Jun 2022 05:10:33 +0000 (14:40 +0930)]
ARM: dts: ast2600: Disable I2C nodes by default

Allow boards to enable the buses they use.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 years agoARM: dts: ast2600: Add I2C reset properties
Joel Stanley [Thu, 23 Jun 2022 05:10:32 +0000 (14:40 +0930)]
ARM: dts: ast2600: Add I2C reset properties

The same as the upstream Linux device tree, each i2c bus has a property
specifying the reset line.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2 years agoARM: dts: ast2600: Add I2C pinctrl
Eddie James [Thu, 23 Jun 2022 05:10:31 +0000 (14:40 +0930)]
ARM: dts: ast2600: Add I2C pinctrl

Set the pinctrl groups for each I2C bus. These are essential to
I2C operating correctly.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
2 years agosoc: soc_ti_k3: identify j7200 SR2.0 SoCs
Bryan Brattlof [Tue, 21 Jun 2022 21:36:03 +0000 (16:36 -0500)]
soc: soc_ti_k3: identify j7200 SR2.0 SoCs

Anytime a new revision of a chip is produced, Texas Instruments
will increment the 4 bit VARIANT section of the CTRLMMR_WKUP_JTAGID
register by one. Typically this will be decoded as SR1.0 -> SR2.0 ...
however a few TI SoCs do not follow this convention.

Rather than defining a revision string array for each SoC, use a
default revision string array for all TI SoCs that continue to follow
the typical 1.0 -> 2.0 revision scheme.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2 years agophy: nuvoton: add NPCM7xx phy control driver
Jim Liu [Tue, 21 Jun 2022 09:03:38 +0000 (17:03 +0800)]
phy: nuvoton: add NPCM7xx phy control driver

add BMC NPCM750 phy control driver

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2 years agotoradex: tdx-cfg-block: add new toradex oui range
Philippe Schenker [Mon, 20 Jun 2022 14:57:45 +0000 (16:57 +0200)]
toradex: tdx-cfg-block: add new toradex oui range

Add new Toradex MAC OUI (8c:06:cb), to the config block. With this change
we extend the possible serial-numbers as follows:

For serial-numbers 00000000-16777215 OUI 00:14:2d is taken
For serial-numbers 16777216-33554431 OUI 8c:06:cb is taken

Lower 24-bit of the serial number are used in the NIC part of the
MAC address, the complete serial number can be calculated using the OUI.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoboard: ti: common: board_detect: Do 1byte address checks first.
Nishanth Menon [Fri, 17 Jun 2022 18:26:12 +0000 (13:26 -0500)]
board: ti: common: board_detect: Do 1byte address checks first.

Do 1 byte address checks first prior to doing 2 byte address checks.
When performing 2 byte addressing on 1 byte addressing eeprom, the
second byte is taken in as a write operation and ends up erasing the
eeprom region we want to preserve.

While we could have theoretically handled this by ensuring the write
protect of the eeproms are properly managed, this is not true in case
where board are updated with 1 byte eeproms to handle supply status.

Flipping the checks by checking for 1 byte addressing prior to 2 byte
addressing check prevents this problem at the minor cost of additional
overhead for boards with 2 byte addressing eeproms.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoboard: ti: common: Handle the legacy eeprom address width properly
Nishanth Menon [Fri, 17 Jun 2022 18:26:11 +0000 (13:26 -0500)]
board: ti: common: Handle the legacy eeprom address width properly

Due to supply chain issues, we are starting to see a mixture of eeprom
usage including the smaller 7-bit addressing eeproms such as 24c04
used for eeproms.

These eeproms don't respond well to 2 byte addressing and fail the
read operation. We do have a check to ensure that we are reading the
alternate addressing size, however the valid failure prevents us
from checking at 1 byte anymore.

Rectify the same by falling through and depend on header data comparison
to ensure that we have valid data.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoboard: ti: common: Optimize boot when detecting consecutive bad records
Nishanth Menon [Fri, 17 Jun 2022 18:26:10 +0000 (13:26 -0500)]
board: ti: common: Optimize boot when detecting consecutive bad records

The eeprom data area is much bigger than the data we intend to store,
however, with bad programming, we might end up reading bad records over
and over till we run out of eeprom space. instead just exit when 10
consecutive records are read.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agofirmware: ti_sci_static_data: Make file board agnostic
Vignesh Raghavendra [Wed, 15 Jun 2022 14:03:05 +0000 (19:33 +0530)]
firmware: ti_sci_static_data: Make file board agnostic

Static DMA channel data for R5 SPL is mostly board agnostic so use SOC
configs instead of EVM specific config to ease adding new board support.

Drop J7200 EVM specific settings as its same as J721e

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
2 years agoconfigs: am62x_evm_r5: Add CONFIG_NR_DRAM_BANKS as done in a53 defconfig
Georgi Vlaev [Tue, 14 Jun 2022 14:45:34 +0000 (17:45 +0300)]
configs: am62x_evm_r5: Add CONFIG_NR_DRAM_BANKS as done in a53 defconfig

Add CONFIG_NR_DRAM_BANKS from am62x_evm_a53_defconfig as this is
needed to calculate the size of DDR that is available.

Signed-off-by: Georgi Vlaev <g-vlaev@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>