Commit Graph

84999 Commits

Author SHA1 Message Date
Judith Mendez 560bb2cb15 board: ti: am64x: Add support for AM64B SK
The AM64x SR2.0 SK board uses "AM64B-SKEVM" as the EEPROM identifier.
This board is similar to the AM64x SKEVM except that it has a new
PMIC that will be enabled in the future and consequently could use a
different device tree file in the future.

For now we treat the board same as an AM64x SK.

Signed-off-by: Judith Mendez <jm@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-04-06 10:25:24 -05:00
Nitin Yadav 4ba5f22ce6 arm: mach-k3: Workaround errata ID i2331
Errata doc: https://www.ti.com/lit/pdf/sprz457
Errata ID i2331 CPSW: Device lockup when reading CPSW registers

Details: A device lockup can occur during the second read of any CPSW
subsystem register after any MAIN domain power on reset (POR). A MAIN
domain POR occurs using the hardware MCU_PORz signal, or via software
using CTRLMMR_RST_CTRL.SW_MAIN_POR or CTRLMMR_MCU_RST_CTRL.SW_MAIN_POR.
After these resets, the processor and internal bus structures may get
into a state which is only recoverable with full device reset using
MCU_PORz.
Due to this errata, Ethernet boot should not be used on this device.

Workaround(s): To avoid the lockup, a warm reset should be issued after
a MAIN domain POR and before any access to the CPSW registers. The warm
reset realigns internal clocks and prevents the lockup from happening.
Workaround above errata by calling do_reset() in case of cold boot in
order to trigger warm reset. This needs enabling SYSRESET driver in R5
SPL to enable TI SCI reset driver.

Signed-off-by: Nitin Yadav <n-yadav@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-04-06 10:24:35 -05:00
Praneeth Bajjuri 729ff7d079 configs: am62x: enable secure device configs by default
Enable the CONFIG_TI_SECURE_DEVICE by default

Non-HS devices will continue to boot due to runtime device type detection.

TI's security enforcing SoCs will authenticate each binary it loads by
comparing it's signature with keys etched into the SoC during the boot
up process. The am62x family of SoCs by default will have some level of
security enforcement checking. To keep things as simple as possible,
enable the CONFIG_TI_SECURE_DEVICE options by default so all levels of
secure SoCs will work out of the box

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-04-05 17:42:34 -05:00
Safae Ouajih ae5755f3b8 Dockerfile: add mkbootimg tool
commit f4449397551a82f0c1d9714d648f1efb90d56962 upstream.

mkbootimg tool is part of the Android project and it is
used to pack Android boot images such as boot image
and vendor_boot image.

Use the following command to run mkbootimg:
$ python3 -m mkbootimg

Add mkbootimg to the docker file

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:43:39 -05:00
Safae Ouajih 0335bdbf9f test/py: android: extend abootimg test
commit 83d48a3c8bfbbbc2a8ad951b211081f72fc268b6 upstream.

test_abootimg is extended to include the testing of boot images
version 4. For this, boot.img and vendor_boot.img have been
generated using mkbootimg tool with setting the header
version to 4.

This tests:
- Getting the header version using abootimg
- Extracting the load address of the dtb
- Extracting the dtb start address in RAM

Running test:
$ ./test/py/test.py --bd sandbox --build -k test_abootimg

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:43:08 -05:00
Safae Ouajih c8eeb1fc0e doc: android: add documentation for v3, v4 boot image header
commit 3e7b71c7286b8e12891c4fd954c21ed8be018de7 upstream.

Update the Android documentation to describe version 3 and 4 of boot
image header.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:42:47 -05:00
Safae Ouajih 9522ed4684 android: boot: support bootconfig
commit 57e405e1f4745cdca49a4a6b260afe68592b1d5c upstream.

Support Bootconfig feature.
- The bootconfig feature replaces the androidboot.*
  kernel cmdline options.

This was adapted from downstream [1] commit : 7af0a0506d4d ("cuttlefish:
support bootconfig parameters").

Link:[1] https://android.googlesource.com/platform/external/u-boot/

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:42:10 -05:00
Safae Ouajih 5456cac6ea android: boot: support boot image header version 3 and 4
commit 636da2039aea4ea3a638b14da0a9ec258897a10c upstream.

Enable the support for boot image header version 3 and 4
using abootimg command.

In order to use version 3 or 4:

1- Vendor boot image address should be given to abootimg cmd.

	abootimg addr $1 $vendor_boot_load_addr

2- "ramdisk_addr_r" env variable (ramdisk address) should be set to host
the ramdisk : generic ramdisk + vendor ramdisk

Replace "struct andr_boot_img_hdr_v0*" by "void *" in
some functions since v3 and v4 are now supported as well.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:41:11 -05:00
Safae Ouajih 0349ecf2f5 drivers: fastboot: zImage flashing is not supported for v3, v4
commit bc6413bdd9a4a7ab8a62232aa4791cc26a0ef215 upstream.

With vendor boot image introduced in version 3 and 4 of boot
image header, boot information is located in both boot image
and vendor boot image.

Flashing zImage is not supported for version 3 and 4 since this
requires updating vendor boot image and/or generating a new image.

Print an error message when the boot image header version is
greater than 2.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:40:37 -05:00
Safae Ouajih e34920ca61 android: boot: update android_image_get_dtb_img_addr to support v3, v4
commit 2d0da1972ded075ba783f3ea705662349e77fa61 upstream.

Add support for boot image version 3 and 4 in
android_image_get_dtb_img_addr().
Since the dtb is now included in vendor_boot image
instead of boot image, extract the dtb address from
vendor_boot image when a v3 or v4 is used.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:40:12 -05:00
Safae Ouajih 01f7be0dbb android: boot: support extra command line
commit b36b227b6a37695ab39306341c3a977cf9b081b6 upstream.

In version 3 and 4 of boot image header, the vendor specific
command line are located in vendor boot image. Thus, use
extra command line to add those cmd to bootargs.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:39:41 -05:00
Safae Ouajih 50fada27e2 android: boot: ramdisk: support vendor ramdisk
commit c79a2e6823d5a3a2813f66d03023c0a192c27e7e upstream.

Version 3 and 4 of boot image header introduced
vendor boot ramdisk: Please check include/android_image.h
for details.

The ramdisk is now split into a generic ramdisk in boot image
and a vendor ramdisk in vendor boot image.

Support the new vendor ramdisk.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:38:58 -05:00
Safae Ouajih 25cef193f3 android: boot: update android_image_get_data to support v3, v4
commit 1115027d2f75ade805f0d4d44a6a2c21e74ea6b2 upstream.

Since boot image header version 3 and 4 introduced vendor boot image,
use the following functions to fill the generic android
structure : andr_image_data:

 - android_boot_image_v3_v4_parse_hdr()
 - android_vendor_boot_image_v3_v4_parse_hdr()

Update android_image_get_data() to support v3 and v4

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:38:38 -05:00
Safae Ouajih 3023e73cde android: boot: add vendor boot image to prepare for v3, v4 support
commit e058176be32b09ca4f787442fd99d29e44079519 upstream.

Introduce vendor boot image for version 3 and 4 of boot image header.
The vendor boot image will hold extra information about kernel, dtb
and ramdisk.

This is done to prepare for boot image version 3 and 4 support.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:38:05 -05:00
Safae Ouajih 17cde859b8 android: boot: boot image header v3, v4 do not support recovery DTBO
commit 447240e27b892ab2ccc1ada03a260abbb562484e upstream.

android_image_get_dtbo() is used to get recovery DTBO via abootimg cmd.
This is not supported in boot image header v3 and v4. Thus, print an
error message when v1,v2 header version are not used.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:37:37 -05:00
Safae Ouajih a630f86007 android: boot: content print is not supported for v3, v4 header version
commit bb5d692732ca02511f2f491af1e680c87373fd35 upstream.

Content print is not supported for version 3 and 4 of boot image header.
Thus, only print that content when v2 is used.

Update android_print_contents() to print an error message
when trying to print boot image header version 3 or 4 content.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:37:00 -05:00
Safae Ouajih 920344f968 android: boot: move to andr_image_data structure
commit 607b07554e23ff58d245f16765d831253a4210de upstream.

Move from andr_boot_img_hdr_v0 to andr_image_data
structure to prepare for boot image header
version 3 and 4.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:35:15 -05:00
Safae Ouajih fc493b5427 android: boot: kcomp: support andr_image_data
commit f48efa0edb6f65b2c382209871df7c9b61a905e2 upstream.

andr_image_data structure is used as a global representation of
boot image header structure. Introduce this new structure to
support all boot header versions : v0,v1.v2.v3.v4 and to support
v3 and v4 while maitaining support for v0,v1,v2.
The need of using andr_image_data comes from the change of header
structure in both version 3 and 4.

Rework android_image_get_kcomp()  to support this new struct.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:33:52 -05:00
Safae Ouajih f1f26ae5c4 android: boot: add boot image header v3 and v4 structures
commit fbb645e7d9bc1a0da05fff8421d398c8aa43a331 upstream.

Add support for v3/v4 boot image format by adding
the following structures:

- andr_boot_img_hdr_v3 : describes boot image header
- andr_vnd_boot_img_hdr : describes vendor boot image header

These definitions have been copied over from the AOSP documentation at
[1] and [2]

Boot arg sizes are taken from [3]:
commit: 35fb6262bc3f (ANDROID: Support for vendor boot)

This also adds documentation for boot image header v3/v4 structure
that was imported from [4], file: include/bootimg/bootimg.h
commit: 8d0922bfb932 (Adding GKI signature in boot.img v4)

Link:[1] https://source.android.com/docs/core/architecture/bootloader/boot-image-header
Link:[2] https://source.android.com/docs/core/architecture/bootloader/partitions/vendor-boot-partitions#vendor-boot-header
Link:[3] https://android.googlesource.com/platform/external/u-boot
Link:[4] https://android.googlesource.com/platform/system/tools/mkbootimg

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:33:30 -05:00
Safae Ouajih 94dfef61a7 android: boot: replace android_image_check_header
commit 734cb47d6de16d2e3b52a03bce5daab40e5bb29d upstream.

With the new vendor boot image introduced in versions 3 and 4
of boot image header, the header check must be done for both boot
image and vendor boot image. Thus, replace android_image_check_header()
by is_android_boot_image_header() to only refer to boot image header check.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:32:28 -05:00
Safae Ouajih 2df42cde90 android: boot: support vendor boot image in abootimg
commit 86b62947eb237daddc7014a6b3b5545d1848b02c upstream.

Vendor boot image is introduced in boot image header
version 3 and 4. Please check [1] for more details.

To prepare for boot image v3/v4 support, allow the abootimg command
to store the vendor_boot image address.

Full support for this new format will be done in a future patch.

Link:[1] https://source.android.com/docs/core/architecture/bootloader/partitions/vendor-boot-partitions

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:31:49 -05:00
Safae Ouajih 8d18fe9e04 android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0
commit d71a732af45e2d3acef92649f4f7986a83175cf4 upstream.

Android introduced boot header version 3 or 4.
The header structure change with version 3 and 4 to support
the new updates such as:
- Introducing Vendor boot image: with a vendor ramdisk
- Bootconfig feature (v4)

Change andr_img_hdr struct name to maintain support for version v0,
v1 and v2 while introducing version 3 and 4.

Signed-off-by: Safae Ouajih <souajih@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-05 11:31:04 -05:00
Devarsh Thakkar c9cf7e6068 am62a7: dts: Enable full 4GB LPDDR4
commit 885198536dcb33e15be8259a326161e5e04a832c upstream.

AM62A7-SK board has 4GB LPDDR4 Micron MT53E2G32D4DE-046 AUT:B part
but only 2GB was enabled early.

Enable full 4GB memory by updating the latter 2GB memory region
which gets mapped to 0x0880000000 i.e. DDR16SS0_SDRAM as referred in
Table 2-1. AM62A Common SoC Memory of AM62Ax TRM [1].

[1] : https://www.ti.com/lit/zip/spruj16
Logs: https://gist.github.com/devarsht/e85b6af89c01ddadb3a62f3e5f196af8

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
[bb@ti.com: rebased to TI's 2023.04 branch]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-04-04 17:52:59 -05:00
Bryan Brattlof b9c97f35f2 configs: am62ax: enable secure device configs by default
commit 411faba7c733cde947d1a61a1d503d39fe7129b2 upstream.

TI's security enforcing SoCs will authenticate each binary it loads by
comparing it's signature with keys etched into the SoC during the boot
up process. The am62ax family of SoCs by default will have some level of
security enforcement checking. To keep things as simple as possible,
enable the CONFIG_TI_SECURE_DEVICE options by default so all levels of
secure SoCs will work out of the box

Enable the CONFIG_TI_SECURE_DEVICE by default

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kamlesh Gurudasani <kamlesh@ti.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:27:14 -05:00
Nikhil M Jain 8f2bebd106 include: configs: am65x_evm: Change to using .env
commit 10e5fe32f0f54cac1a62c8b964839318d7aa7f1d upstream.

Move to using .env file for setting up environment variables for am65x.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:26:02 -05:00
Nikhil M Jain 2bdc7dfc9e board: ti: am62x: am62x: Include K3 common .env files
commit 36bc171a6856179b81633e10700d99910cf1925b upstream.

Include ti_armv7_common.env and ti/mmc.env, which includes' K3  common
environment variables used across different K3 boards.

This patch depends on
https://lore.kernel.org/all/20230315052745.110502-1-n-francis@ti.com/

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:25:25 -05:00
Nikhil M Jain dc2520dd7a include: configs: am62ax: Change to using .env
commit 25d29a83762af3d1744c3918e1e5125160787773 upstream.

Move to using .env file for setting up environment variables for am62ax.

This patch depends on
https://lore.kernel.org/all/20230315052745.110502-1-n-francis@ti.com/

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:24:34 -05:00
Neha Malcom Francis 87021075db include: configs: j721e_evm: Change to using .env
commit fce062d91ab5de832b1120787a4ff7730c73b47d upstream.

Move to using .env file for setting up environment variables for J721E
and J7200.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:23:42 -05:00
Neha Malcom Francis 5cb61b2993 include: configs: j721s2_evm: Change to using .env
commit 7e55dd25c38450db1625d5cb35f6f8af965c744e upstream.

Move to using .env file for setting up environment variables for J721S2.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:22:59 -05:00
Neha Malcom Francis 3e85631db7 include: environment: ti: Use .env for environment variables
commit d69783cc4caff68eea616a9021fdf6c5186dd6a5 upstream.

Add K3 common environment variables to .env. We retain the old-style C
environment .h files to maintain compatibility with other K3 boards that
have not moved to using .env yet.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:22:14 -05:00
Sinthu Raja e9fc3d4f62 phy: ti: j721e-wiz: Add support to enable LN23 Type-C swap
commit 3d0f2e37c57b0d2f60e0b985d7006220d94bd9b0 upstream.

The WIZ acts as a wrapper for SerDes and has Lanes 0 and 2 reserved
for USB for type-C lane swap if Lane 1 and Lane 3 are linked to the
USB PHY that is integrated into the SerDes IP. The WIZ control register
has to be configured to support this lane swap feature.

The support for swapping lanes 2 and 3 is missing and therefore
add support to configure the control register to swap between
lanes 2 and 3 if PHY type is USB.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-04-04 17:05:44 -05:00
Sinthu Raja 0937ed1b00 phy: ti: j721e-wiz: Manage TypeC lane swap if typec-dir-gpios not specified
commit 75b6cd97dd41b11c212fccf545e346c38248f8a2 upstream.

It's possible that the Type-C plug orientation on the DIR line will be
implemented through hardware design. In that situation, there won't be
an external GPIO line available, but the driver still needs to address
this since the DT won't use the typec-dir-gpios property.

Add code to handle LN10 Type-C swap if typec-dir-gpios property is not
specified in DT.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:04:49 -05:00
Neha Malcom Francis b18ebbe325 board: ti: Kconfig: Correct invalid Kconfig syntax
commit 54ff4eeb59dd7f1b4141cdfdc1126d85fb03751f upstream.

Kconfig does not support using 'select' to select a 'choice'. A choice
can be configured by either setting the choice symbol to 'y' in a
configuration file or by setting a 'default' of the choice.

In board/ti/*/Kconfig the SOC_K3_* choice is already set to 'y' in their
corresponding configs/*_defconfig file. So remove selecting it.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 17:03:36 -05:00
Manorit Chawdhry cda25979e4 configs: j7200: Merge HS and non-HS defconfigs
commit e352e1061f4c9a8adb70b6ff819890c42e5b3ef7 upstream.

K3 devices have runtime type board detection. Make the default defconfig
include the secure configuration. Then remove the HS specific config.

Non-HS devices will continue to boot due to runtime device type detection.
If TI_SECURE_DEV_PKG is not set the build will emit warnings, for non-HS
devices these can be ignored.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
[praneeth@ti.com: cherry-pick and resolve merge conflict from upstream next]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 16:59:49 -05:00
Manorit Chawdhry 5b596ab3cc configs: j721s2: merge HS and non-HS defconfigs
commit c714045cc3c0c36bc836c909e74db3273a7dd390 upstream.

K3 devices have runtime type board detection. Make the default defconfig
include the secure configuration. Then remove the HS specific config.

Non-HS devices will continue to boot due to runtime device type detection.
If TI_SECURE_DEV_PKG is not set the build will emit warnings, for non-HS
devices these can be ignored.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
[praneeth@ti.com: cherry-pick and resolve merge conflict from upstream next]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-04-04 16:53:20 -05:00
Tom Rini fd4ed6b7e8 Prepare v2023.04
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-04-03 16:38:50 -04:00
Sinthu Raja 1f77f9176e arm: dts: k3-j721e-sk-u-boot: fix boot on j721e SK
J721e SK has been broken since at least March 2022.

The main-navss and mcu-navss nodes were renamed and this caused the
A72 SPL to fail early in the boot even before the serial port was
enabled. Fix this.

A later patch series between v2022.07 and v2022.10 additionally broke
boot on this board by introducing hbmc nodes which are not present on
this board. The right fix is to disable these by default in the SOC
dtsi file, but for now we can also disable them in the u-boot dtsi.

With both these fixed, we can now boot the j721e SK board fully from
mainline u-boot.

Fixes: 58d61fb5a7 ("arm: dts: k3-j721e-sk: Add initial A72 specific dts support")
Fixes: 297daac43a ("arm: dts: k3-j721e-mcu-wakeup: Add HyperBus Controller node")
Reported-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
[gadiyar@ti.com: update commit description]
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Brattlof <bb@ti.com>
2023-04-03 14:54:16 -04:00
Fabio Estevam 8b6de0545f pico-imx6: Pass the mmc alias to fix boot regression
Originally, the mmc aliases node was present in imx6qdl-pico.dtsi.

After the sync with Linux in commit d0399a46e7 ("imx6dl/imx6qdl:
synchronise device trees with linux"), the aliases node is gone as
the upstream version does not have it.

This causes a boot regression in which the eMMC card cannot be found anymore.

Fix it by passing the alias node in the u-boot.dtsi file to
restore the original behaviour where the eMMC (esdhc3) was
mapped to mmc0.

Fixes: d0399a46e7 ("imx6dl/imx6qdl: synchronise device trees with linux")
Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-04-03 10:14:34 -04:00
Tom Rini cfb4c33e89 Fixes for 2023.04
------------------
 
 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/15831
 
 - fix for imx8mn_bsh_smm_s2
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQS2TmnA27QKhpKSZe309WXkmmjvpgUCZCrCRw8cc2JhYmljQGRl
 bnguZGUACgkQ9PVl5Jpo76ZNGQCfQhul9Qfy0jVXZl/vXDxPJrfv4hQAnjVsNLV9
 SNhV4PXn8+eTt4igrx8e
 =AMYS
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-imx-20230403' of https://source.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2023.04
------------------

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/15831

- fix for imx8mn_bsh_smm_s2
2023-04-03 10:13:36 -04:00
David Sebek 86169cdcb0 rockchip: Fix incorrect constant name in RAM init code
A condition in the rk3399 RAM initialization code used the old
CONFIG_RAM_RK3399_LPDDR4 constant name. This commit changes the
condition to use the correct CONFIG_RAM_ROCKCHIP_LPDDR4 constant.

Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-02 12:57:12 -04:00
Tom Rini 6c617e082d Pull request for efi-2023-04-rc6
Documentation:
 
 * describe skipping triggering a pipeline in Gitlab
 
 UEFI:
 
 * correct shortening of device-paths for boot options
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmQoFXUACgkQxIHbvCwF
 GsT+Kg/+J77C3UXUhd9xc1zDf1UXpWZ62gMatngK4p3dmu2kuN9e0E4k97wHDQpw
 6L56Re95P9gBZCjLHo7Fx4zo07znv6cQfl2ps28u+j7cd8OJcmxpdS+r00wlGu+y
 y5zNW9abW0U7neyc3FIDRWFwNRw4i+uSQ3k4184rPrSlJamAp7PkIb2uctcZhAmw
 G2/esIcSzzlhjMfLhUjAG9ibJSuBzcm+8DvS2my4qoiHFAXS3S3D0Clzmw9+nLYT
 PWRRRB8I/rOKMpwa6g8OvzB4XPiWH54LeEmTPUd1M5jZCKq6t1wbw3bwhrJA+IX8
 q0Bj9fpRGMK3WFMfhwK7DpxuBKUocEXj0a9pw1RJZvKKDRPpnQ9nOOo+zGinycQ1
 4+aA9sJML8Gr/91XvEwkKbNty1EJqq6RBk/+4/bfWZAFfWfzD4PyxRz9iY951D43
 LPqk00Z+qKToskHOjeKNrAv4ZNW3ass1fIAoSuiZ3oV5RO/ize/aCWHEMnlA9UL3
 4IaxhKZ2mpSV3PkUeaAbNyeusZyP+3aSijEGT7tqFqS/6EaWq3zkdHL/hpgwy/HD
 ylx/Co8+MycoGlRafISyZWm2RvFAQTxV7GAAAfgBu52JdIYmer28yigDQ4wjvkhG
 Q4f+rAgZNjQT8BTrS+CKfyWpUZXz8cgABVi2d7/4NWYlJQ+XkmU=
 =sS2b
 -----END PGP SIGNATURE-----

Merge tag 'efi-2023-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-04-rc6

Documentation:

* describe skipping triggering a pipeline in Gitlab

UEFI:

* correct shortening of device-paths for boot options
2023-04-01 10:55:06 -04:00
Heinrich Schuchardt dfd4288173 efi_loader: remove duplicate assignment
Assigning the value of a variable to itself should be avoided.

Addresses-Coverity-ID: 451089 ("Evaluation order violation")
Fixes: 180b7118be ("efi_loader: fix device-path for USB devices")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-04-01 10:11:50 +02:00
Heinrich Schuchardt a9203b0fef efi_loader: correct shortening of device-paths
We use short device-paths in boot options so that a file on a block device
can be found independent of the port into which the device is plugged.

Usb() device-path nodes only contain port and interface information and
therefore cannot identify a block device.
UsbWwi() device-path nodes contain the serial number of USB devices.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-04-01 10:11:50 +02:00
Heinrich Schuchardt ffc1cfb8f4 doc: describe skipping triggering a pipeline in Gitlab
'git push -o ci.skip' can be used to push to Gitlab without triggering a
pipeline.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-01 10:11:50 +02:00
Heinrich Schuchardt 854aaf9024 scsi: typo supporedt
%s/supporedt/supported/

Fixes: edca8cf721 ("Convert CONFIG_SCSI_AHCI_PLAT et al to Kconfig")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-04-01 10:11:50 +02:00
Tom Rini 897d634a98 Fixes for buildman and sysreset
-----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmQl/ucRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreaN+Af9E7rh1oM0fbZbEqwnIAT2RIDj3VEOTKf8
 UpNO+v86KPkChvHLnZKIW5Aa5rf6Goi4rppN59HdFUM6++13V7Gdp/cshu9b7j7R
 4NoOqI/k4/PPe6W5pU3f1GzV820LdV6NTKb3UPHz9FTAAjlY/KX41vNf5+kKdse7
 rxlr3i5L05/68ZPMjH3lLfn2pSh0ZizbImbqHZpxTTvAA9iG1cz0Pftpfzu6zXpg
 gqLeRk2d5dQUgQ0L216/e/L2OMnxMsDTBrhPFR+fK9rtb6b7sUCBajHTE/Lthj1R
 4IEinNS4MYJeTQ3MM5RQFajbpcmroU7a39IDOrjn/2owgzyQiub8AQ==
 =4ef+
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-31mar23' of https://source.denx.de/u-boot/custodians/u-boot-dm

Fixes for buildman and sysreset
2023-03-31 12:02:41 -04:00
Dario Binacchi d8aba36d74 configs: imx8mn_bsh_smm_s2: remove console from bootargs
The Linux kernel device tree already specifies the device to be used for
boot console output with a stdout-path property under /chosen.

Commit 36b661dc91 ("Merge branch 'next'") re-added the console
setting that commit bede82f750 ("configs: imx8mn_bsh_smm_s2: remove
console from bootargs") had previously removed.

Fixes: 36b661dc91 ("Merge branch 'next'")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-03-31 10:51:14 +02:00
Jonathan Liu a47164dfc1 sysreset: gpio: fix gpio_reboot_request return value
It should return -EINPROGRESS if successful otherwise sysreset-uclass
will continue to the next sysreset device.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-31 08:32:52 +13:00
Simon Glass 49d8cc4cbe buildman: Correct overwriting of settings file
The toolchain test causes the settings file to be overwritten, which is
annoying for local development. Fix it by passing None as the filename.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-31 08:32:52 +13:00
Fabio Estevam 565681e596 imx6sx-udoo-neo-basic: Introduce the u-boot.dtsi
After the conversion to DM_SERIAL in commit 01f372d8d6 ("udoo_neo:
Select DM_SERIAL and drop iomux board level init") the SPL log is gone
and the U-Boot proper log becomes incomplete:

Core:  80 devices, 18 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial@2020000
Out:   serial@2020000
Err:   serial@2020000
Net:   eth0: ethernet@2188000
Hit any key to stop autoboot:  0

Introduce the u-boot.dtsi file that passes the u-boot,dm-pre-reloc
properties to the relevant nodes so that UART can be used early in SPL.

With this change, the complete SPL and U-Boot messages are seen again.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-03-28 10:58:16 -04:00