Billy Tsai [Tue, 8 Mar 2022 03:04:07 +0000 (11:04 +0800)]
ARM: dts: ast2600: Add PWM to device tree
Add the PWM node and enable it for AST2600 EVB
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Billy Tsai [Tue, 8 Mar 2022 03:04:06 +0000 (11:04 +0800)]
pinctrl: Add the pinctrl setting for PWM.
This patchs add the signal description array for PWM pinctrl settings.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Billy Tsai [Tue, 8 Mar 2022 03:04:05 +0000 (11:04 +0800)]
pwm: Add Aspeed ast2600 PWM support
This patch add the support of PWM controller which can be found at aspeed
ast2600 soc. The pwm supoorts up to 16 channels and it's part function
of multi-function device "pwm-tach controller".
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Pali Rohár [Fri, 18 Feb 2022 12:16:19 +0000 (13:16 +0100)]
pci: Remove duplicate PCI_CLASS_CODE_* and PCI_CLASS_SUB_CODE_* macros
Macros PCI_CLASS_CODE_* and PCI_CLASS_SUB_CODE_* are unused and are
duplication of PCI_CLASS_* macros defined in pci_ids.h header file.
So remove them.
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár [Fri, 18 Feb 2022 12:16:18 +0000 (13:16 +0100)]
sandbox: video: Replace PCI_CLASS_* macros by one from pci_ids.h
Replace old macros PCI_CLASS_CODE_COMM and PCI_CLASS_SUB_CODE_COMM_SERIAL
by new macros defined in pci_ids.h. Old macros would be deleted in followup
commit.
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
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>
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>
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>
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>
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>
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>
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>
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:
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>
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>
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>
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>
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.
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.
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.
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>
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.
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>
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>
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.
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>
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.
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>
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.
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>
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.
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)
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.