Commit graph

74529 commits

Author SHA1 Message Date
Tim Harvey
2d02586028 imx: ventana: use dt for hwmon
Use dt-bindings for GSC hwmon devices.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
49b4efe621 imx: ventana: remove hard-coded flexcan standby pin
Flexcan pinmux is configured in kernel dt.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
395f17d0ea imx: ventana: remove hard-coded analog video codec enable
Analog video codec enable is configured in kernel dt.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
a194e6ed45 imx: ventana: remove hard-coded USB OTG pinmux
pinmux is now done via dt. Add missing OTG_OC pinmux for boards that
use it.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
aa85d251db imx: ventana: remove hard-coded PCI reset
PCIe reset configuration is handled via dt now.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
dd79c97b92 imx: ventana: fix UMS support
The Gateworks Ventana boards have always had usb0=usbh1 and usb1=usbotg
because OTG is often subloaded on these boards and a bit in the EEPROM
which flagging that OTG is subloaded is used to remove the dt node via the
alias.

U-Boot DM_USB UMS requires the usb0 alias be assigned to the usbotg
so fix the usb0 alias in order for UMS to work.

Fixes 72c46327f0: ("imx: ventana: enable dm support for USB")

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
034105a8f7 imx: ventana: remove hard-coded USB HUBRST# gpio config
The USB HUB reset is handled via dt now.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
92309aacda imx: ventana: replace hard-coded LED config with dt based config
Use device-tree LED config instead of hard-coded board-specific config.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
706d910bbc imx: ventana: remove nand field from common ventana struct
NAND fdt fixups can be performed without knowing if NAND is present.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
45c902c434 imx: ventana: move wdog/uhs-i board/revision dt fixups
Move board/revision specific dt fixups for WDOG and UHS-I features
so that we can call them early for U-Boot control dt as well.

Additionally drop a deprected non-mainline dt-prop fixup regarding
HDMI input format.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Tim Harvey
36de64f2eb imx: ventana: ignore EEPROM config when checking for NAND support
EEPROM bits no longer indicate support for NAND so instead use
hard-coded value from board config struct.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-09 14:46:50 +02:00
Oleksandr Suvorov
d9275ebbff board: colibri_vf: fix compiling warning
This patch fixes the following compiler warning:
=============
board/toradex/colibri_vf/colibri_vf.c: In function 'ft_board_setup':
board/toradex/colibri_vf/colibri_vf.c:436:6: warning: unused variable 'ret' [-Wunused-variable]
=============

Fixes: be3f1a56bf ("video: fsl_dcu_fb: add DM_VIDEO support")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-08-09 13:09:29 +02:00
Ming Liu
87421ab644 board: colibri_imx6: add board_fit_config_name_match to support FIT in SPL
Only one dtb is currently supported, so match with imx6-colibri.

Signed-off-by: Ming Liu <ming.liu@toradex.com>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-08-09 13:09:29 +02:00
Oleksandr Suvorov
6150295061 board: colibri-imx8x: update building documentation
Update the documentation on how to build the u-boot image for
Colibri iMX8QXP, adding support of V1.0D revision of the module.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-08-09 13:09:29 +02:00
Stefan Agner
421440f70d board: toradex: make USB PID from config block optional
If config block support is enabled, USB gadget modes unconditionally
use Toradex Product ID as USB PID. Some applications might prefer a
different and/or static USB PID. Add a Kconfig configuration option
to descide whether to use USB PID from config block or the fallback
config option CONFIG_G_DNL_PRODUCT_NUM.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-08-09 13:09:29 +02:00
Stefan Agner
46307ef01e board: colibri_imx7: use SDP if USB serial downloader has been used
In case USB serial downloader has been used to load U-Boot start the
serial download protocol (SDP) emulation. This allows to download
complete images such as Toradex Easy Installer over USB SDP as well.
This code uses the boot ROM provided boot information to reliably
detect USB serial downloader.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2021-08-09 13:09:29 +02:00
Fabio Estevam
5d236df9a0 mx6cuboxi: Fix the console variable
Do not pass the console baudrate to the 'console' variable
to avoid the baudrate being passed twice when extlinux.conf
contains the standard: console=${console},${baudrate} format.

cat /proc/cmdline
root=PARTUUID=00000000-01 rootwait rw console=ttymxc0,115200,115200

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2021-08-09 13:09:29 +02:00
Fabio Estevam
22e9e0dc17 mx6cuboxi: Fix the mmc device for the rootfs
After the conversion to DM_MMC, the rootfs becomes mmc 1, so
adjust it accordingly.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2021-08-09 13:09:29 +02:00
Fabio Estevam
3f24bd329b imx28-evk: Import devicetree file from Linux
Import the imx28-evk devicetree files from Linux kernel
version 5.11-rc7.

This is in preparation for converting the mx28evk_defconfig
target to driver model.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2021-08-06 13:26:08 +02:00
Tom Rini
ab97eb341c Merge branch '2021-08-04-assorted-minor-fixes'
- Assorted fixes
2021-08-04 21:18:33 -04:00
Adarsh Babu Kalepalli
1fdafebdfc cmd:(cosmetic)Mentioned in 'chpart' command HELP text that it is for MTD devices
Modified the help text of 'chpart' command ,mentioning that it is
for MTD devices.

Signed-off-by: Adarsh Babu Kalepalli <opensource.kab@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-04 15:58:31 -04:00
Adarsh Babu Kalepalli
f86eba03fa cmd:Elaborate 'blkcache' cmd HELP statement
HELP description is provided for ‘configure’ sub-command
of ‘blkcache’.

Signed-off-by: Adarsh Babu Kalepalli <opensource.kab@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-04 15:58:31 -04:00
Heinrich Schuchardt
e02c082287 config: MPC8548CDS: eliminate symbol CONFIG_SYS_ID_EEPROM
Symbol CONFIG_SYS_ID_EEPROM is defined in include/configs/MPC8548CDS.h
but never used. Remove it here and from the whitelist.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-08-04 15:58:31 -04:00
Tom Rini
08e8bc8a7f doc: Add basic information about running CI tests
Start out by documenting general expectations on when CI is run, how
anyone can run Azure pipelines, and how GitLab CI pipelines can be run.

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-04 15:58:31 -04:00
Campbell Suter
a1ff2cb4d4 fs/squashfs: Fix some hardlinks reading the wrong inode
In SquashFS, the contents of a directory is stored by
squashfs_directory_entry structures which contain the file's name, inode
and position within the filesystem.

The inode number is not stored directly; instead each directory has one
or more headers which set a base inode number, and files store the
offset from that to the file's inode number.

In mksquashfs, each inode is allocated a number in the same order as
they are written to the directory table; thus the offset from the
header's base inode number to the file's inode number is usually
positive.

Hardlinks are simply stored with two directory entries referencing the
same file. This means the second entry will thus have an inode number
much lower than the surrounding files. Since the header's base inode
number comes from the first entry that uses the header, this delta will
usually be negative.

Previously, U-Boot's squashfs_directory_entry.inode_offset field was
declared as an unsigned value. Thus when a negative value was found, it
would either resolve to an invalid inode number or to that of an
unrelated file.

A squashfs image to test this can be created like so:

    echo hi > sqfs_test_files/001-root-file
    mkdir     sqfs_test_files/002-subdir
    touch     sqfs_test_files/002-subdir/003-file
    ln        sqfs_test_files/{001-root-file,002-subdir/004-link}
    mksquashfs sqfs_test_files/ test.sqfs -noappend

Note that squashfs sorts the files ASCIIbetacally, so we can use the
names to control the order they appear in. The ordering is important -
the first reference to the file must have a lower inode number than the
directory in which the second reference resides, and the second
reference cannot be the first file in the directory.

Listing this sample image in U-Boot results in:

=> sqfsls virtio 2 002-subdir
         0   003-file
Inode not found.
         0   004-link

Signed-off-by: Campbell Suter <campbell@snapit.group>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2021-08-04 15:58:31 -04:00
John Keeping
8edecd3110 fit: Fix verification of images with external data
The "-E" option to mkimage generates a FIT with external data using the
data-size and data-offset properties which must both be ignored when
verifying a signature.

Add "data-offset" to the list of excluded properties for signature
verification; since the line is now too long, re-format the list to
one-per-line and make it static since the data is constant.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-04 15:57:13 -04:00
Tom Rini
66217225f7 CI: Update to LLVM-12
The current stable release of LLVM is 12, update to that.  While at it,
fix that we had not correctly upgraded to LLVM 11 previously.

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-04 11:30:46 -04:00
Tom Rini
a0953b34d9 Merge https://source.denx.de/u-boot/custodians/u-boot-spi
- SPI-NOR fix (Big Meng)
- XMC XM25QH64C flash (Reto Schneider)
2021-08-03 14:06:41 -04:00
Tom Rini
b91c704333 Merge https://source.denx.de/u-boot/custodians/u-boot-samsung 2021-08-03 09:07:01 -04:00
Bin Meng
d008190920 mtd: spi-nor: Mask out fast read if not requested in DT
The DT bindings of "jedec,spi-nor" [1] defines "m25p,fast-read" property
to indicate that "fast read" opcode can be used to read data from the
chip instead of the usual "read" opcode.

If this property is not present in DT, mask out fast read in
spi_nor_init_params(). This change mirrors the same logic in
spi_nor_info_init_params() in drivers/mtd/spi-nor/core.c in
the Linux kernel v5.14-rc3.

[1] Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml in the kernel tree

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-08-03 11:56:25 +05:30
Bin Meng
87e7219f9c mtd: spi-nor: Respect flash's hwcaps in spi_nor_adjust_hwcaps()
The smart spi_nor_adjust_hwcaps() does not respect the SPI flash's
hwcaps, and only looks to the controller on what can be supported.

The flash's hwcaps needs to be AND'ed before checking.

Fixes: 71025f013c ("mtd: spi-nor-core: Rework hwcaps selection")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-08-03 11:53:16 +05:30
Bin Meng
cb42425aa1 spi: spi-mem-nodm: Fix read data size issue
When slave drivers don't set the max_read_size, the spi-mem should
directly use data.nbytes and not limit to any size. But current
logic will limit to the max_write_size.

This commit mirrors the same changes in the dm version done in
commit 535b1fdb8e ("spi: spi-mem: Fix read data size issue").

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-08-03 11:50:37 +05:30
Reto Schneider
9102cce7f4 mtd: spi-nor-ids: Add support for XMC XM25QH64C
This chip has been (briefly) tested on the MediaTek MT7688 based GARDENA
smart gateway.

Datasheet: http://xmcwh.com/Uploads/2020-12-17/XM25QH64C_Ver1.1.pdf
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-08-03 11:46:13 +05:30
Tom Rini
3b64774323 Merge https://source.denx.de/u-boot/custodians/u-boot-x86
- Fixed broken ICH SPI driver in software sequencer mode
- Added "m25p,fast-read" to SPI flash node for x86 boards
- Drop ROM_NEEDS_BLOBS and BUILD_ROM for x86 ROM builds
- Define a default TSC timer frequency for all x86 boards
- x86 MTRR MSR programming codes bug fixes
- x86 "hob" command bug fixes
- Don't program MTRR for DRAM for FSP1
- Move INIT_PHASE_END_FIRMWARE to FSP2
- Use external graphics card by default on Intel Crown Bay
- tangier: Fix DMA controller IRQ polarity in CSRT
2021-08-02 21:35:50 -04:00
Tom Rini
51aef40555 Merge branch '2021-08-02-numeric-input-cleanups'
- Merge in a series that cleans up and makes more consistent how we deal
  with numeric input on the CLI.  This saves a few bytes in a lot of
  places.
2021-08-02 13:32:20 -04:00
Simon Glass
e6951139c0 lib: Allow using 0x when a decimal value is requested
U-Boot mostly uses hex for value input, largely because addresses are much
easier to understand in hex.

But in some cases a decimal value is requested, such as where the value is
small or hex does not make sense in the context. In these cases it is
sometimes useful to be able to provide a hex value in any case, if only to
resolve any ambiguity.

Add this functionality, for increased flexibility.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
5f4b356121 doc: Add a note about number representation
Mention the default base of U-Boot in the command-line section. Add
examples for decimal and octal.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
7a4ff7c41b doc: Convert command-line info to rST
Take this part of the README and put it into rST format.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
5a94546e1c lib: Move common digit-parsing code into a function
The code to convert a character into a digit is repeated twice in this
file. Factor it out into a separate function. This also makes the code a
little easier to read.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
ab833ef60a lib: Add octal tests for simple_strtoul/l()
This function support decoding octal but no tests are included yet.
Add some.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
4d3177d367 lib: Add tests for simple_strtoull()
Add some tests that check the behaviour of this function. These are the
same as for simple_strtoul() but with a few longer values.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
96b23440c1 lib: Drop unnecessary check for hex digit
If we see 0x then we can assume this is the start of a hex value. It
does not seem necessary to check for a hex digit after that since it will
happen when parsing the value anyway.

Drop this check to simplify the code and reduce size. Add a few more test
cases for when a 0x prefix is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
18546f2982 lib: Comment the base parameter with simple_strtoul/l()
This parameter is not documented properly since it does not cover the
meaning when the base is 0. Update this in both functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
0b1284eb52 global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
7e5f460ec4 global: Convert simple_strtoul() with hex to hextoul()
It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.

Add a proper comment to simple_strtoul() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Simon Glass
031725f8cd hash: Ensure verification hex pairs are terminated
This function seems to assume that the chr[] variable contains zeros at
the start, which is not always true. Use strlcpy() to be safe.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:31:32 -04:00
Bin Meng
9feb5bdcc0 x86: crownbay: Use external graphics card by default
The board routes the Integrated Graphics Device (IGD) to an LVDS
panel, which is less popular than a PCIe based graphics card.

Disable the IGD so that it does not show up in the PCI configuration
space as a VGA display controller, so we can use an external PCIe
graphics card with whatever cable we have.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-03 00:03:14 +08:00
Bin Meng
c71d5fb717 x86: queensbay: Return directly if IGD / SDVO were already disabled
Initialize 'igd' and 'sdvo' to NULL so that we just need to test
them against NULL later, to be compatible with that case that IGD
and SDVO devices were already in disabled state.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-03 00:03:14 +08:00
Bin Meng
33e4ab31a9 x86: fsp: Only FSP2 has INIT_PHASE_END_FIRMWARE
For FSP1, there is no such INIT_PHASE_END_FIRMWARE.

Move board_final_cleanup() to fsp2 directory.

Fixes: 7c73cea442 ("x86: Notify the FSP of the 'end firmware' event")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax
Tested-by: Simon Glass <sjg@chromium.org>
2021-08-03 00:01:38 +08:00
Bin Meng
02541601cb x86: fsp: Don't program MTRR for DRAM for FSP1
There are several outstanding issues as to why this does not apply
to FSP1:

* For FSP1, the system memory and reserved memory used by FSP are
  already programmed in the MTRR by FSP.
* The 'mtrr_top' mistakenly includes TSEG memory range that has the
  same RES_MEM_RESERVED resource type. Its address is programmed
  and reported by FSP to be near the top of 4 GiB space, which is
  not what we want for SDRAM.
* The call to mtrr_add_request() is not guaranteed to have its size
  to be exactly the power of 2. This causes reserved bits of the
  IA32_MTRR_PHYSMASK register to be written which generates #GP.

For FSP2, it seems this is necessary as without this, U-Boot boot
process on Chromebook Coral goes very slowly.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax
Tested-by: Simon Glass <sjg@chromium.org>
2021-08-03 00:01:29 +08:00