platform/kernel/u-boot.git
2 years agoAdd option to use -Og
Sean Anderson [Tue, 22 Feb 2022 17:19:25 +0000 (12:19 -0500)]
Add option to use -Og

This adds support for using -Og when building U-Boot. According to the
gcc man page:

> -Og should be the optimization level of choice for the standard
> edit-compile-debug cycle, offering a reasonable level of optimization
> while maintaining fast compilation and a good debugging experience.

This optimization level is roughly -O1 minus a few additional
optimizations. It provides a noticably better debugging experience, with
many fewer variables <optimized out>.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoSplit CONFIG_CC_OPTIMIZE_FOR_SIZE into two configs
Sean Anderson [Tue, 22 Feb 2022 17:19:24 +0000 (12:19 -0500)]
Split CONFIG_CC_OPTIMIZE_FOR_SIZE into two configs

This adds a separate CONFIG_CC_OPTIMIZE_FOR_SPEED option in a choice,
in preparation for adding another optimization option. Also convert SH's
makefile to use this new option.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoCI: Pin pylint version to 2.12.2
Tom Rini [Fri, 25 Mar 2022 12:19:09 +0000 (08:19 -0400)]
CI: Pin pylint version to 2.12.2

For consistency in runs, we need to always use the same pylint version.
Pin to 2.12.2 as this is what we have been using so far.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-03-25-Kconfig-migrations' into next
Tom Rini [Fri, 25 Mar 2022 12:02:04 +0000 (08:02 -0400)]
Merge branch '2022-03-25-Kconfig-migrations' into next

- Merge a number of Kconfig migration patches

2 years agoConvert CONFIG_BACKSIDE_L2_CACHE to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:32 +0000 (08:38 -0400)]
Convert CONFIG_BACKSIDE_L2_CACHE to Kconfig

This converts the following to Kconfig:
   CONFIG_BACKSIDE_L2_CACHE

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agovinco: Remove CONFIG_ATMEL_SPI0
Tom Rini [Fri, 18 Mar 2022 12:38:31 +0000 (08:38 -0400)]
vinco: Remove CONFIG_ATMEL_SPI0

This is not referenced anywhere, remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agolcd: Remove LCD_TEST_PATTERN code
Tom Rini [Fri, 18 Mar 2022 12:38:30 +0000 (08:38 -0400)]
lcd: Remove LCD_TEST_PATTERN code

This is a legacy driver and the value is set in board config headers
without a CONFIG prefix.  Remove the code.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_LCD_INFO et al to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:29 +0000 (08:38 -0400)]
Convert CONFIG_LCD_INFO et al to Kconfig

This converts the following to Kconfig:
   CONFIG_LCD_INFO
   CONFIG_LCD_LOGO
   CONFIG_LCD_INFO_BELOW_LOGO
   CONFIG_LCD_IN_PSRAM

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_ATMEL_LCD et al to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:28 +0000 (08:38 -0400)]
Convert CONFIG_ATMEL_LCD et al to Kconfig

This converts the following to Kconfig:
   CONFIG_ATMEL_LCD
   CONFIG_ATMEL_LCD_BGR555
   CONFIG_ATMEL_LCD_RGB565
   CONFIG_GURNARD_SPLASH

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_MII_INIT to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:27 +0000 (08:38 -0400)]
Convert CONFIG_MII_INIT to Kconfig

This converts the following to Kconfig:
   CONFIG_MII_INIT

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_PHY_RESET_DELAY to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:26 +0000 (08:38 -0400)]
Convert CONFIG_PHY_RESET_DELAY to Kconfig

This converts the following to Kconfig:
   CONFIG_PHY_RESET_DELAY

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_RX_ETH_BUFFER to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:25 +0000 (08:38 -0400)]
Convert CONFIG_SYS_RX_ETH_BUFFER to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_RX_ETH_BUFFER

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_LPC32XX_ETH to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:24 +0000 (08:38 -0400)]
Convert CONFIG_LPC32XX_ETH to Kconfig

This converts the following to Kconfig:
   CONFIG_LPC32XX_ETH

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_TFTP_PORT to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:23 +0000 (08:38 -0400)]
Convert CONFIG_TFTP_PORT to Kconfig

This converts the following to Kconfig:
   CONFIG_TFTP_PORT

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_RMII to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:22 +0000 (08:38 -0400)]
Convert CONFIG_RMII to Kconfig

This converts the following to Kconfig:
   CONFIG_RMII

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_FAULT_ECHO_LINK_DOWN to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:21 +0000 (08:38 -0400)]
Convert CONFIG_SYS_FAULT_ECHO_LINK_DOWN to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_FAULT_ECHO_LINK_DOWN

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_RESET_PHY_R to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:20 +0000 (08:38 -0400)]
Convert CONFIG_RESET_PHY_R to Kconfig

This converts the following to Kconfig:
   CONFIG_RESET_PHY_R

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_AT91_WANTS_COMMON_PHY to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:19 +0000 (08:38 -0400)]
Convert CONFIG_AT91_WANTS_COMMON_PHY to Kconfig

This converts the following to Kconfig:
   CONFIG_AT91_WANTS_COMMON_PHY

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_AT91_LED to Kconfig
Tom Rini [Fri, 18 Mar 2022 12:38:18 +0000 (08:38 -0400)]
Convert CONFIG_AT91_LED to Kconfig

This converts the following to Kconfig:
   CONFIG_AT91_LED

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'dm-pull-18mar22' of https://source.denx.de/u-boot/custodians/u-boot-dm...
Tom Rini [Sat, 19 Mar 2022 13:09:58 +0000 (09:09 -0400)]
Merge tag 'dm-pull-18mar22' of https://source.denx.de/u-boot/custodians/u-boot-dm into next

binman FIT improvements
various minor sandbox improvements

2 years agobinman: Support splitting an ELF file into multiple nodes
Simon Glass [Sun, 6 Mar 2022 03:19:12 +0000 (20:19 -0700)]
binman: Support splitting an ELF file into multiple nodes

Some boards need to load an ELF file using the 'loadables' property, but
the file has segments at different memory addresses. This means that it
cannot be supplied as a flat binary.

Allow generating a separate node in the FIT for each segment in the ELF,
with a different load address for each.

Also add checks that the fit,xxx directives are valid.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Keep a separate list of entries for fit
Simon Glass [Sun, 6 Mar 2022 03:19:11 +0000 (20:19 -0700)]
binman: Keep a separate list of entries for fit

The current implementation sets up the FIT entries but then deletes the
'generator' ones so they don't appear in the final image.

This is a bit clumsy. We cannot build the image more than once, since the
generator entries are lost during the first build. Binman requires that
calling BuildSectionData() multiple times returns a valid result each
time.

Keep a separate, private list which includes the generator nodes and use
that where needed, to correct this problem. Ensure that the missing list
includes removed generator entries too.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Update fit to use node instead of subnode
Simon Glass [Sun, 6 Mar 2022 03:19:10 +0000 (20:19 -0700)]
binman: Update fit to use node instead of subnode

It doesn't make sense to use 'subnode' as a function parameter since it
is just a 'node' so far as the function is concerned. Update two functions
to use 'node' instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Add a consistent way to report errors with fit
Simon Glass [Sun, 6 Mar 2022 03:19:09 +0000 (20:19 -0700)]
binman: Add a consistent way to report errors with fit

Add a new function to handling reporting errors within a particular
subnode of the FIT description. This can be used to make the format of
these errors consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Fix some pylint warnings in fit
Simon Glass [Sun, 6 Mar 2022 03:19:08 +0000 (20:19 -0700)]
binman: Fix some pylint warnings in fit

Some warnings have crept in, so fix those that are easy to fix.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Update fit to move node reading into the ReadNode() method
Simon Glass [Sun, 6 Mar 2022 03:19:07 +0000 (20:19 -0700)]
binman: Update fit to move node reading into the ReadNode() method

This should not be done in the constructor. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Read the fit entries only once
Simon Glass [Sun, 6 Mar 2022 03:19:06 +0000 (20:19 -0700)]
binman: Read the fit entries only once

At present the entries are read twice, once by the entry_Section class
and once by the FIT implementation. This is harmless but can be confusing
when debugging. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Allow mkimage to use a non-zero fake-blob size
Simon Glass [Sun, 6 Mar 2022 03:19:05 +0000 (20:19 -0700)]
binman: Allow mkimage to use a non-zero fake-blob size

Unfortunately mkimage gets upset with zero-sized files. Update the
ObtainContents() method to support specifying the size, if a fake blob is
created.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Make fake blobs zero-sized by default
Simon Glass [Sun, 6 Mar 2022 03:19:04 +0000 (20:19 -0700)]
binman: Make fake blobs zero-sized by default

On x86 devices having even a small amount of data can cause an overlap
between regions. For example, bayleybay complains when the intel-vga
region overlaps with u-boot-ucode:

   ImagePos    Offset      Size  Name
   <none>    00000000  00800000  main-section
   <none>     ff800000  00000080  intel-descriptor
   <none>     ff800400  00000080  intel-me
   <none>     fff00000  00098f24  u-boot-with-ucode-ptr
   <none>     fff98f24  00001aa0  u-boot-dtb-with-ucode
   <none>     fff9a9d0  0002a000  u-boot-ucode
   <none>     fffb0000  00000080  intel-vga
   ...

It is safer to use an empty file in most cases. Add an option to set the
size for those uses that need it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Change how faked blobs are created
Simon Glass [Sun, 6 Mar 2022 03:19:03 +0000 (20:19 -0700)]
binman: Change how faked blobs are created

At present fake blobs are created but internally an empty blob is used.
Change it to use the contents of the faked file. Also return whether the
blob was faked, in case the caller needs to know that.

Add a TODO to put fake blobs in their own directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Rename tools parameter to btools
Simon Glass [Sun, 6 Mar 2022 03:19:02 +0000 (20:19 -0700)]
binman: Rename tools parameter to btools

This shadows the patman.tools library so rename it to avoid a pylint
warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Refactor fit to generate output at the end
Simon Glass [Sun, 6 Mar 2022 03:19:01 +0000 (20:19 -0700)]
binman: Refactor fit to generate output at the end

At present the fit implementation creates the output tree while
scanning the FIT description. Then it updates the tree later when the
data is known.

This works, but is a bit confusing, since it requires mixing the scanning
code with the generation code, with a fix-up step at the end.

It is actually possible to do this in two phases, one to scan everything
and the other to generate the FIT. Thus the FIT is generated in one pass,
when everything is known.

Update the code accordingly. The only functional change is that the 'data'
property for each node are now last instead of first, which is really a
more natural position. Update the affected test to deal with this.

One wrinkle is that the calculated properties (image-pos, size and offset)
are now added before the FIT is generated. so we must filter these out
when copying properties from the binman description to the FIT.

Most of the change here is splitting out some of the code from the
ReadEntries() implementation into _BuildInput(). So despite the large
diff, most of the code is the same. It is not feasible to split this patch
up, so far as I can tell.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Rename ExpandEntries to gen_entries
Simon Glass [Sun, 6 Mar 2022 03:19:00 +0000 (20:19 -0700)]
binman: Rename ExpandEntries to gen_entries

Leave the 'expand' term for use by entry types which have an expanded
version of themselves. Rename this method to indicate that it generates
subentries.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Rename ExpandToLimit to extend_to_limit
Simon Glass [Sun, 6 Mar 2022 03:18:59 +0000 (20:18 -0700)]
binman: Rename ExpandToLimit to extend_to_limit

The word 'expand' is used for entries which generate subentries. It is
also used for entries that can have an '_expanded' version which is used
to break out its contents.

Rather than talking about expanding an entry's size, use the term
'extending'. It is slightly more precise and avoids the above conflicts.

This change renders the old 'expand-size' property invalid, so add an
error check for that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agobinman: Tweak collect_contents_to_file() and docs
Simon Glass [Sun, 6 Mar 2022 03:18:58 +0000 (20:18 -0700)]
binman: Tweak collect_contents_to_file() and docs

Update the return value of this function, fix the 'create' typo and
update the documentation for clarity.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agoelf: Rename load_segments() and module failure
Simon Glass [Sun, 6 Mar 2022 03:18:57 +0000 (20:18 -0700)]
elf: Rename load_segments() and module failure

Rename this function to make it clear that it only reads loadable
segments. Also update the error for missing module to better match the
message emitted by Python.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agodtoc: Tidy up implementation of AddStringList()
Simon Glass [Sun, 6 Mar 2022 03:18:56 +0000 (20:18 -0700)]
dtoc: Tidy up implementation of AddStringList()

Refactor this to avoid a loop. Also add a test for an empty string.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agospl: Correct Kconfig help for TPL_BINMAN_SYMBOLS
Simon Glass [Sun, 6 Mar 2022 03:18:55 +0000 (20:18 -0700)]
spl: Correct Kconfig help for TPL_BINMAN_SYMBOLS

Fix the help which should refer to TPL, not SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agomoveconfig: Use re.fullmatch() to avoid extra check
Simon Glass [Sun, 6 Mar 2022 03:18:54 +0000 (20:18 -0700)]
moveconfig: Use re.fullmatch() to avoid extra check

Simplify the code by using the available function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agomoveconfig: Remove remove_defconfig()
Simon Glass [Sun, 6 Mar 2022 03:18:53 +0000 (20:18 -0700)]
moveconfig: Remove remove_defconfig()

This is not necessary if simpler code is used. Use the split function and
drop the unnecessary []

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agodtoc: Make GetArgs() more flexible
Simon Glass [Sun, 6 Mar 2022 03:18:52 +0000 (20:18 -0700)]
dtoc: Make GetArgs() more flexible

At present it is not possible to have arguments which include spaces.
Update the function to only split the args if the property is a single
string. This is a bit inconsistent, but might still be useful.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2 years agopatman: Define Commit.path in the constructor
Simon Glass [Thu, 3 Mar 2022 02:12:24 +0000 (19:12 -0700)]
patman: Define Commit.path in the constructor

It is good practice to init all variables in the constructor and pylint
sometimes checks this. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
2 years agosandbox: test: Tidy up spl_test_load() calls
Simon Glass [Mon, 28 Feb 2022 22:13:49 +0000 (15:13 -0700)]
sandbox: test: Tidy up spl_test_load() calls

Use the new sandbox_find_next_phase() function, which does what is needed
here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agosandbox: Slow down the LCD sync rate
Simon Glass [Mon, 28 Feb 2022 22:13:48 +0000 (15:13 -0700)]
sandbox: Slow down the LCD sync rate

There is seldom a need to refresh at 100Hz and it uses a lot of CPU.
Reduce the rate to 10Hz which seems to be adequate.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agosandbox: Open host file for read-only access if needed
Simon Glass [Mon, 28 Feb 2022 22:13:47 +0000 (15:13 -0700)]
sandbox: Open host file for read-only access if needed

Some files cannot be written but read-only access is still useful for
tests. Add a fallback to read-only access when needed.

This is useful in CI when opening a large data file provided by docker,
where read/write access would result in copying the file, thus needing
a lot of extra disk space.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agosandbox: Add the handoff header for spl
Simon Glass [Mon, 28 Feb 2022 22:13:46 +0000 (15:13 -0700)]
sandbox: Add the handoff header for spl

This defines a function declared in handoff.h so add the header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agosandbox: Show a message when writing out the ram buffer
Simon Glass [Mon, 28 Feb 2022 22:13:45 +0000 (15:13 -0700)]
sandbox: Show a message when writing out the ram buffer

If state is not being written, but RAM is, we should still show a message,
so it is clear that this is happening.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Include also subnodes in generator nodes
Jan Kiszka [Mon, 28 Feb 2022 16:06:20 +0000 (17:06 +0100)]
binman: Include also subnodes in generator nodes

This allows to prefill fdt and config nodes with hash and signature
subnodes. It's just important to place the child nodes last so that
hashes do not come before the data - would be disliked by mkimage.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotools: binman: main.py: add build-sandbox in sys.path
Philippe Reynes [Thu, 27 Jan 2022 14:03:13 +0000 (15:03 +0100)]
tools: binman: main.py: add build-sandbox in sys.path

Adds build-sandbox in sys.path to look for libfdt,
otherwise py_test can't use binman.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Complete elf test coverage
Simon Glass [Sat, 19 Mar 2022 01:19:49 +0000 (19:19 -0600)]
binman: Complete elf test coverage

Add coverage for the new elf functions needed for the event_dump.py
script.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agopatman: Define Commit.path in the constructor
Simon Glass [Thu, 3 Mar 2022 02:12:24 +0000 (19:12 -0700)]
patman: Define Commit.path in the constructor

It is good practice to init all variables in the constructor and pylint
sometimes checks this. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
2 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 18 Mar 2022 12:47:42 +0000 (12:47 +0000)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-03-18-Kconfig-migrations' into next
Tom Rini [Fri, 18 Mar 2022 16:48:23 +0000 (12:48 -0400)]
Merge branch '2022-03-18-Kconfig-migrations' into next

- A large number of Kconfig migrations.  This also includes a few
  convert-by-enable of DM_ETH on some i.MX platforms.

2 years agoConvert CONFIG_ATMEL_LEGACY to Kconfig
Tom Rini [Sat, 12 Mar 2022 04:07:36 +0000 (23:07 -0500)]
Convert CONFIG_ATMEL_LEGACY to Kconfig

This converts the following to Kconfig:
   CONFIG_ATMEL_LEGACY

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_AT91_GPIO_PULLUP to Kconfig
Tom Rini [Sat, 12 Mar 2022 04:07:35 +0000 (23:07 -0500)]
Convert CONFIG_AT91_GPIO_PULLUP to Kconfig

This converts the following to Kconfig:
   CONFIG_AT91_GPIO_PULLUP

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoatmel: Remove CONFIG_AT91SAM9G45_LCD_BASE
Tom Rini [Sat, 12 Mar 2022 04:07:34 +0000 (23:07 -0500)]
atmel: Remove CONFIG_AT91SAM9G45_LCD_BASE

This variable is used once and is noted as board-specific.  Use the
value directly with a comment.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoatmel: Remove CONFIG_AT91SAM9G45EKES
Tom Rini [Sat, 12 Mar 2022 04:07:33 +0000 (23:07 -0500)]
atmel: Remove CONFIG_AT91SAM9G45EKES

This symbol is used only once, and in comparison with an unset symbol,
so drop it.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_AT91SAM9G10EK et al to Kconfig
Tom Rini [Sat, 12 Mar 2022 04:07:32 +0000 (23:07 -0500)]
Convert CONFIG_AT91SAM9G10EK et al to Kconfig

This converts the following to Kconfig:
   CONFIG_AT91SAM9G10EK
   CONFIG_AT91SAM9261EK
   CONFIG_AT91SAM9G10

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_AT91SAM9G20EK et al to Kconfig
Tom Rini [Sat, 12 Mar 2022 04:07:31 +0000 (23:07 -0500)]
Convert CONFIG_AT91SAM9G20EK et al to Kconfig

This converts the following to Kconfig:
   CONFIG_AT91SAM9G20EK
   CONFIG_AT91SAM9260EK
   CONFIG_AT91SAM9G20EK_2MMC

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_AT91SAM9260 et al to Kconfig
Tom Rini [Sat, 12 Mar 2022 04:07:30 +0000 (23:07 -0500)]
Convert CONFIG_AT91SAM9260 et al to Kconfig

This converts the following to Kconfig:
   CONFIG_AT91SAM9260
   CONFIG_AT91SAM9G20
   CONFIG_AT91SAM9XE
   CONFIG_AT91SAM9261
   CONFIG_AT91SAM9263
   CONFIG_AT91SAM9G45
   CONFIG_AT91SAM9M10G45
   CONFIG_AT91SAM9N12
   CONFIG_AT91SAM9RL
   CONFIG_AT91SAM9X5
   CONFIG_SAM9X60
   CONFIG_SAMA7G5
   CONFIG_SAMA5D2
   CONFIG_SAMA5D3
   CONFIG_SAMA5D4

These options are already select'd as needed, so we're just cleaning up
files here.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_AM335X_USB0 et al to Kconfig
Tom Rini [Sat, 12 Mar 2022 04:07:29 +0000 (23:07 -0500)]
Convert CONFIG_AM335X_USB0 et al to Kconfig

This converts the following to Kconfig:
   CONFIG_AM335X_USB0
   CONFIG_AM335X_USB0_MODE
   CONFIG_AM335X_USB1
   CONFIG_AM335X_USB1_MODE

We do this by introducing specific options for static configuration of
USB0/USB1 in SPL rather than defining CONFIG_AM335X_USBx_MODE to the
enum value being used.  Furthermore, with how the code is used now we do
not need to have OTG mode exposed as an option here, so remove that.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: fec_mxc: Drop CONFIG_FEC_XCV_TYPE
Tom Rini [Fri, 11 Mar 2022 14:12:10 +0000 (09:12 -0500)]
net: fec_mxc: Drop CONFIG_FEC_XCV_TYPE

With all boards now using DM_ETH we determine the value for
CONFIG_FEC_XCV_TYPE at run time, except in the case of the default
fall-back.  Set the fallback directly now.

Cc: Fabio Estevam <festevam@gmail.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: fec_mxc: Remove non-DM_ETH code
Tom Rini [Fri, 11 Mar 2022 14:12:09 +0000 (09:12 -0500)]
net: fec_mxc: Remove non-DM_ETH code

Now that all boards have been converted, remove the non-DM_ETH code.

Cc: Fabio Estevam <festevam@gmail.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoimx: Convert some boards to DM_ETH
Tom Rini [Fri, 11 Mar 2022 14:12:08 +0000 (09:12 -0500)]
imx: Convert some boards to DM_ETH

A small number of i.MX6/7 and vf610 boards have not enabled DM_ETH yet.
Given the state of the rest of the platform, enable DM_ETH.

Cc: Alison Wang <alison.wang@nxp.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Richard Hu <richard.hu@technexion.com>
Cc: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Uri Mashiach <uri.mashiach@compulab.co.il>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_ETHPRIME to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:12:07 +0000 (09:12 -0500)]
Convert CONFIG_ETHPRIME to Kconfig

This converts the following to Kconfig:
   CONFIG_ETHPRIME

This is also done by adding a gating Kconfig option, CONFIG_USE_ETHPRIME
similar to other options that are not always set and control environment
variables.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoRemove CONFIG_HAS_ETH0 et al symbols
Tom Rini [Fri, 11 Mar 2022 14:12:06 +0000 (09:12 -0500)]
Remove CONFIG_HAS_ETH0 et al symbols

This converts removes the following symbols:
   CONFIG_HAS_ETH0
   CONFIG_HAS_ETH1
   CONFIG_HAS_ETH2
   CONFIG_HAS_ETH3

This is because at this point, only the ids8313 platform was using the
code which was controlled by these symbols.  In turn, this code already
performs error checking on being able to perform the device tree fixup.
Rather than convert these to Kconfig for a single platform, update the
code to not need these checks and remove them from all the platforms
they were unused on.

Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_NFS_TIMEOUT to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:12:05 +0000 (09:12 -0500)]
Convert CONFIG_NFS_TIMEOUT to Kconfig

This converts the following to Kconfig:
   CONFIG_NFS_TIMEOUT

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_BOOT_RETRY_TIME et al to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:12:04 +0000 (09:12 -0500)]
Convert CONFIG_BOOT_RETRY_TIME et al to Kconfig

This converts the following to Kconfig:
   CONFIG_BOOT_RETRY_TIME
   CONFIG_BOOT_RETRY_MIN
   CONFIG_RESET_TO_RETRY

We also introduce CONFIG_BOOT_RETRY to gate these options, and clean up
the associated Makefile entry and C code for picking default values of
CONFIG_BOOT_RETRY_MIN.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agopowerpc: Move CONFIG_BPTR_VIRT_ADDR out of CONFIG namespace
Tom Rini [Fri, 11 Mar 2022 14:12:03 +0000 (09:12 -0500)]
powerpc: Move CONFIG_BPTR_VIRT_ADDR out of CONFIG namespace

This is only used in one file, and is never overridden.  Move this out
of CONFIG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_NET_RETRY_COUNT to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:12:02 +0000 (09:12 -0500)]
Convert CONFIG_NET_RETRY_COUNT to Kconfig

This converts the following to Kconfig:
   CONFIG_NET_RETRY_COUNT

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_ARP_TIMEOUT to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:12:01 +0000 (09:12 -0500)]
Convert CONFIG_ARP_TIMEOUT to Kconfig

This converts the following to Kconfig:
   CONFIG_ARP_TIMEOUT

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_A008044_WORKAROUND to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:12:00 +0000 (09:12 -0500)]
Convert CONFIG_A008044_WORKAROUND to Kconfig

This converts the following to Kconfig:
   CONFIG_A008044_WORKAROUND

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_A003399_NOR_WORKAROUND to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:11:59 +0000 (09:11 -0500)]
Convert CONFIG_A003399_NOR_WORKAROUND to Kconfig

This converts the following to Kconfig:
   CONFIG_A003399_NOR_WORKAROUND

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_ARMV8_SWITCH_TO_EL1 to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:11:58 +0000 (09:11 -0500)]
Convert CONFIG_ARMV8_SWITCH_TO_EL1 to Kconfig

This converts the following to Kconfig:
   CONFIG_ARMV8_SWITCH_TO_EL1

Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
2 years agoConvert CONFIG_ARMV7_SECURE_BASE et al to Kconfig
Tom Rini [Fri, 11 Mar 2022 14:11:56 +0000 (09:11 -0500)]
Convert CONFIG_ARMV7_SECURE_BASE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_ARMV7_SECURE_BASE
   CONFIG_ARMV7_SECURE_MAX_SIZE
   CONFIG_ARMV7_SECURE_RESERVE_SIZE

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoconfigs: Re-run migrations
Tom Rini [Fri, 11 Mar 2022 12:12:48 +0000 (07:12 -0500)]
configs: Re-run migrations

As the CI test for stopping platforms from being merged that were
defining symbols that had Kconfig entries, a small number of symbols
needed to be migrated again.  Do so, and catch two cases the README
should also have been updated but was not.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoRevert "efi: Allow easy selection of serial-only operation"
Tom Rini [Fri, 11 Mar 2022 12:12:47 +0000 (07:12 -0500)]
Revert "efi: Allow easy selection of serial-only operation"

This commit re-introduced a migrated CONFIG symbol to the board header
file.  These changes should likely be handled via documentation instead,
as well.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agosunxi: Do not define CONFIG_SPL_STACK_ADDR_R
Tom Rini [Fri, 11 Mar 2022 12:12:46 +0000 (07:12 -0500)]
sunxi: Do not define CONFIG_SPL_STACK_ADDR_R

We cannot define a CONFIG value here to ensure that the Kconfig value
isn't set wrong.

Fixes: 2c699fe0d34d ("configs: sunxi: Add common SUNIV header")
Cc: Icenowy Zheng <icenowy@aosc.io>
Cc: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoCI: Fix unmigrated symbol test
Tom Rini [Fri, 11 Mar 2022 12:12:45 +0000 (07:12 -0500)]
CI: Fix unmigrated symbol test

When calling comm to compare the CONFIG symbols a defconfig uses with
the symbols that have been migrated, we need to suppress all output as
the summary line will have everything we need.  Failure to do this leads
to the test blowing up, but in non-fatal ways.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'xilinx-for-v2022.07-rc1' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Wed, 16 Mar 2022 16:52:02 +0000 (12:52 -0400)]
Merge tag 'xilinx-for-v2022.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2022.07-rc1

microblaze:
- Add support for reserved memory

xilinx:
- Update FRU code with MAC reading

zynqmp:
- Remove double AMS setting
- DT updates (mostly for SOMs)
- Add support for zcu106 rev 1.0

zynq:
- Update nand binding

nand:
- Aligned zynq_nand to upstream DT binding

net:
- Add support for ethernet-phy-id

mmc:
- Workaround CD in zynq_sdhci driver also for ZynqMP
- Add support for dynamic/run-time SD config for SOMs

gpio:
- Add driver for slg7xl45106

firmware:
- Add support for dynamic SD config

power-domain:
- Update zynqmp driver with the latest firmware

video:
- Add skeleton driver for DP and DPDMA

i2c:
- Fix i2c to work with QEMU

pinctrl:
- Add driver for zynqmp pinctrl driver

2 years agoarm64: zynqmp: Add pinctrl emmc description to SM-K26
Michal Simek [Mon, 14 Mar 2022 14:26:11 +0000 (15:26 +0100)]
arm64: zynqmp: Add pinctrl emmc description to SM-K26

Production SOM has emmc on it and make sense to describe pin description to
be able use EMMC if it is not configured via psu_init.
(Still some regs are not handled but this is one step in that direction)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/3545a0f08d342de98efc82b78f5725eda091555a.1647267969.git.michal.simek@xilinx.com
2 years agoMerge branch '2022-03-15-add-erofs-support' into next
Tom Rini [Wed, 16 Mar 2022 12:09:12 +0000 (08:09 -0400)]
Merge branch '2022-03-15-add-erofs-support' into next

- Add erofs support

2 years agotest/py: Add tests for the erofs
Huang Jianan [Sat, 26 Feb 2022 07:05:51 +0000 (15:05 +0800)]
test/py: Add tests for the erofs

Add Python scripts to test 'ls' and 'load' commands, as well as
test related filesystem functions.

Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
2 years agofs/erofs: add filesystem commands
Huang Jianan [Sat, 26 Feb 2022 07:05:50 +0000 (15:05 +0800)]
fs/erofs: add filesystem commands

Add 'ls' and 'load' commands.

Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
2 years agofs/erofs: add lz4 decompression support
Huang Jianan [Sat, 26 Feb 2022 07:05:49 +0000 (15:05 +0800)]
fs/erofs: add lz4 decompression support

Support EROFS lz4 compressed files.

Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
2 years agolib/lz4: update LZ4 decompressor module
Huang Jianan [Sat, 26 Feb 2022 07:05:48 +0000 (15:05 +0800)]
lib/lz4: update LZ4 decompressor module

Update the LZ4 compression module based on LZ4 v1.8.3 in order to
use the newest LZ4_decompress_safe_partial() which can now decode
exactly the nb of bytes requested.

Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
2 years agofs/erofs: add erofs filesystem support
Huang Jianan [Sat, 26 Feb 2022 07:05:47 +0000 (15:05 +0800)]
fs/erofs: add erofs filesystem support

This patch mainly deals with uncompressed files.

Signed-off-by: Huang Jianan <jnhuang95@gmail.com>
2 years agoCI, Docker: Update to latest focal tag
Tom Rini [Tue, 15 Mar 2022 20:18:16 +0000 (16:18 -0400)]
CI, Docker: Update to latest focal tag

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'v2022.04-rc4' into next
Tom Rini [Mon, 14 Mar 2022 21:40:36 +0000 (17:40 -0400)]
Merge tag 'v2022.04-rc4' into next

Prepare v2022.04-rc4

2 years agoPrepare v2022.04-rc4
Tom Rini [Mon, 14 Mar 2022 20:39:08 +0000 (16:39 -0400)]
Prepare v2022.04-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-03-14-regression-fixes'
Tom Rini [Mon, 14 Mar 2022 18:04:55 +0000 (14:04 -0400)]
Merge branch '2022-03-14-regression-fixes'

- Regression fixes for RK3399 eMMC, j721e Sierra SerDes driver,
  vexpress64 autoboot and tbs2910 image size

2 years agoboard: tbs2910: Enable Link Time Optimizations in defconfig
Soeren Moch [Mon, 14 Mar 2022 08:26:25 +0000 (09:26 +0100)]
board: tbs2910: Enable Link Time Optimizations in defconfig

This saves about 12 kBytes image size and helps to stay within the
size limit.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Soeren Moch <smoch@web.de>
2 years agovexpress64: fvp: Fix automatic boot
Andre Przywara [Fri, 4 Mar 2022 16:30:08 +0000 (16:30 +0000)]
vexpress64: fvp: Fix automatic boot

Commit 90f262a6951f ("vexpress64: Clean up BASE_FVP boot configuration")
cleaned up the usage of default address variables, but missed to update
the address for the kernel in the FVP's bootcmd definition.

Change ${kernel_addr} to read ${kernel_addr_r} to bring back the
automated boot for the fastmodel.
Also use "setenv" instead of the potentially ambiguous "set" on the way.

Fixes: 90f262a6951f ("vexpress64: Clean up BASE_FVP boot configuration")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoboard: ti: j721e: evm.c: Fix the probing of in Sierra SerDes0
Aswath Govindraju [Fri, 4 Mar 2022 12:15:26 +0000 (17:45 +0530)]
board: ti: j721e: evm.c: Fix the probing of in Sierra SerDes0

Initialization and power on operations of links have been moved under the
link device in the Sierra SerDes driver. Also, the UCLASS of
sierra_phy_provider has been changed to UCLASS_MISC.

Therefore, fix the probing of SerDes0 instance accordingly.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Georgi Vlaev <g-vlaev@ti.com>
2 years agophy: cadence: Sierra: Move the link operations from serdes phy to link device
Aswath Govindraju [Fri, 4 Mar 2022 12:15:25 +0000 (17:45 +0530)]
phy: cadence: Sierra: Move the link operations from serdes phy to link device

In commit 6f46c7441a9f ("phy: cadence: Sierra: Add a UCLASS_PHY device for
links"), a separate udevice of type UCLASS_PHY was created for each link.
Therefore, move the corresponding link operations under the link device.

Also, change the uclass of sierra phy to UCLASS_MISC as it is no longer the
phy device.

Fixes: 6f46c7441a9f ("phy: cadence: Sierra: Add a UCLASS_PHY device for links")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Georgi Vlaev <g-vlaev@ti.com>
2 years agorockchip: sdhci: Fix RK3399 eMMC PHY power cycling
Alper Nebi Yasak [Fri, 28 Jan 2022 22:42:37 +0000 (01:42 +0300)]
rockchip: sdhci: Fix RK3399 eMMC PHY power cycling

The Rockchip RK3399 eMMC PHY has to be power-cycled while changing its
clock speed to some higher speeds. This is dependent on the desired
SDHCI clock speed, and it looks like the PHY should be powered off while
setting the SDHCI clock in these cases.

Commit ac804143cfd1 ("mmc: rockchip_sdhci: add phy and clock config for
rk3399") attempts to do this in the set_ios_post() hook by setting the
SDHCI clock once more while the PHY is turned off/on as necessary, as
the SDHCI framework does not provide a way to override how it sets its
clock. However, the commit breaks reinitializing the eMMC on a few
boards including chromebook_kevin and reportedly ROCKPro64.

This patch reworks the power cycling to utilize the SDHCI framework
slightly better (using the set_control_reg() hook to power off the PHY
and set_ios_post() hook to power it back on) which happens to fix the
issue, at least on a chromebook_kevin.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 14 Mar 2022 15:24:20 +0000 (11:24 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- kwboot: Misc minor improvement and fixes, e.g. mix of arguments (Pali)
- PCI: a37xx: Remap IO space to bus address 0x0 (Pali)

2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Mon, 14 Mar 2022 14:57:15 +0000 (10:57 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-x86

- Trivial fixes for x86

2 years agoarm64: zynqmp: Fix i2c addresses for zynqmp-p-a2197
Michal Simek [Mon, 7 Mar 2022 07:53:38 +0000 (08:53 +0100)]
arm64: zynqmp: Fix i2c addresses for zynqmp-p-a2197

After double checking some i2c addresses are not correct. It is visible
from i2c dump

ZynqMP> i2c bus
Bus 3: i2c@ff020000
   74: i2c-mux@74, offset len 1, flags 0
Bus 5: i2c@ff020000->i2c-mux@74->i2c@0
Bus 6: i2c@ff020000->i2c-mux@74->i2c@2
Bus 7: i2c@ff020000->i2c-mux@74->i2c@1
Bus 8: i2c@ff020000->i2c-mux@74->i2c@3
Bus 4: i2c@ff030000  (active 4)
   74: i2c-mux@74, offset len 1, flags 0
Bus 9: i2c@ff030000->i2c-mux@74->i2c@0
Bus 10: i2c@ff030000->i2c-mux@74->i2c@3
Bus 11: i2c@ff030000->i2c-mux@74->i2c@4
Bus 12: i2c@ff030000->i2c-mux@74->i2c@5  (active 12)
   51: generic_51, offset len 1, flags 0
   60: generic_60, offset len 1, flags 0
   74: generic_74, offset len 1, flags 0
Bus 13: i2c@ff030000->i2c-mux@74->i2c@6  (active 13)
   51: generic_51, offset len 1, flags 0
   5d: generic_5d, offset len 1, flags 0
   74: generic_74, offset len 1, flags 0
ZynqMP> i2c dev 4
Setting bus to 4
ZynqMP> i2c mw 74 0 18
ZynqMP> i2c probe
Valid chip addresses: 18 36 37 50 51 60 74
ZynqMP> i2c mw 74 0 20
ZynqMP> i2c probe
Valid chip addresses: 51 60 74

where it is clear that si570 (u5) is at 0x60 address and 8t49n240 (u39) is
also at address 0x60 based on log above.
i2c address 0x74 is i2c mux and 0x51 is eeprom.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/0a198e9d993411e41473d130d5a5c20b6dc83458.1646639616.git.michal.simek@xilinx.com
2 years agopinctrl: zynqmp: Add pinctrl driver
Ashok Reddy Soma [Wed, 23 Feb 2022 14:23:05 +0000 (15:23 +0100)]
pinctrl: zynqmp: Add pinctrl driver

Add pinctrl driver for Xilinx ZynqMP SOC. This driver is compatible with
linux device tree parameters for configuring pinmux and pinconf.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/2d7eefa83c8c0129f7243a25de56a289e948f6c6.1645626183.git.michal.simek@xilinx.com