Add a sysreset controller node as a child of the DMSC node to enable
the "reset" command from U-Boot prompt for the AM625 SK.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Since commit 75acccd29c ("soc: ti: k3-navss-ringacc: Initialize base
address of ring cfg registers") and commit 8dc8661ec1 ("dma: ti: k3-udma:
Add support for native configuration of chan/flow")' additional register
ranges are required for UDMA and ring drivers. This adds additional register
ranges and TIFS phandle to re enable BCDMA to probe in order for enable
OSPI mem to mem DMA
Without this OSPI boot is broken.
Fixes: 75acccd29c ("soc: ti: k3-navss-ringacc: Initialize base address of ring cfg registers")
Fixes: 8dc8661ec1 ("dma: ti: k3-udma: Add support for native configuration of chan/flow")'
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
These reserved ranges can be reused across boards hence switch to SOC
specific configs instead of board/EVM specific ones.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Add android boot flow support for AM62X board based on misc partition
to detect reboot reason and boot.img version 2 from android build
system.
Move on distrocmd and keep both boot (linux and android).
To move on android boot flow just launch 'set_android_boot' command
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
This feature does not quite fit within the A/B flow.
The intent of A/B is to provide an automatic rollback option for broken
OTAs. Once an OTA has been applied, the slot may not boot for a number
of reasons (power loss, broken package, etc), and it is important to
make consistent attempts to boot to the new slot rather than find *a*
bootable slot (otherwise, the update may not take).
Note that once a slot has been marked bootable, encryption keys are
upgraded, and old slots will not work. Trying to rotate between slots
is not likely to succeed.
Note that Android ensures that the active slot always has the
highest priority. In the current u-boot implementation, this affords no
possibility of rollback.
To match the expected A/B flow, this patch makes the following changes:
- When initializing the BCB, set the "_a" slot to have the highest
priority.
- Pick the highest priority slot that has been marked successful OR has
boot tries remaining.
- If no such slot exists, the system is not bootable.
Link: https://android-review.googlesource.com/c/platform/external/u-boot/+/1446442
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
The slot rollback system is intended for normal boot failures after an
OTA, and therefore, we should not attempt to change slots based on a
failure to boot to recovery (or any other non-normal boot sequence).
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Link: https://android-review.googlesource.com/c/platform/external/u-boot/+/1446441
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
enable Android commands and fastboot support
Signed-off-by: Nicolas Frayer <nfrayer@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Enable the configs required to add support for UHS modes in U-Boot and A53
SPL. Also, reorder the configs using savedefconfig.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
For enabling UHS speed modes in SPL, the following devices are required to
be enabled
-> voltage regulators
-> main_i2c1 and gpio expander connected to it
-> main_gpio0
Therefore, add u-boot,dm-spl tags in all the above mentioned dt nodes.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD, CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK and
CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC reserve memory from the
CONFIG_SPL_SIZE_LIMIT assuming that all of them are placed together in the
same SRAM. However, in case of AM62; stack, global data and malloc are
placed in the PSRAM and and not HSM SRAM. Therefore, remove the
corresponding configs.
Also, update the CONFIG_SPL_SIZE_LIMIT to match the maximum image size that
can be loaded by ROM, as it now only indicates the size of SPL image.
Given below is the Layout of the SRAMs in R5 SPL stage before relocation to
DDR.
HSM SRAM (256KB) PSRAM (64KB)
0x43c00000┌───────────────┐ ┌──────────────┐0x70000000
│ │ │ ▲ │
│ │ │ Stack │ │
│ SPL IMAGE │ │ │
│ MAX 204KB │ ├──────────────┤0x70006f1f
│(excluding BSS)│ │Global Data │
│ │ ├──────────────┤0x70006fff
│ │ │ Heap (36KB) │
0x43c33000├───────────────┤ └──────────────┘0x7000ffff
│ EMPTY (18KB) │
0x43c37800├───────────────┤
│ │
│ BSS (20KB max)│
0x43c3c800├───────────────┤
│ │
│ DM data(1.5KB)│
0x43c3cd82├───────────────┤
│ │
│ EMPTY (9KB) │
0x43c3f290├───────────────┤
│ ROM extended │
│ boot info │
│ (3.5KB) │
0x43c3ffff└───────────────┘
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Expectation of k3_ringacc_ring_reset_raw() is to reset the ring to
requested size and not to 0. Fix this.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Add configs for enabling ETHBOOT in R5SPL. Adding a separate config
to minimize the risk of going past the R5-SPL size limit for any
future config additions.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Add base addresses for "cfg", "tchan", "rchan", "rflow" in
main_pktdma required for native configuration in the absence of
DM services.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Call dram_init_banksize() from spl_board_init() otherwise TFTP download
fails with error "TFTP error: trying to overwrite reserved memory..."
due to lmb_get_free_size() not able to find unreserved region due
to lack of DRAM size info. Required to support Ethernet boot on AM62x.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
In absence of Device Manager (DM) services such as at R5 SPL stage,
driver will have to natively setup TCHAN/RCHAN/RFLOW cfg registers.
Existing UDMA driver performed the above mentioned configuration
for UDMA. Add similar configuration for PKTDMA here.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Initialize base address of ring config registers required to natively
setup ring cfg registers in the absence of Device Manager (DM) services
at R5 SPL stage.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
RX_FL_CFG message should not be forwarded to TIFS
and should be handled within R5 SPL (when DM services
are not available). Add a no-op function to not handle
RX_FL_CFG messages.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Add erratum i2327 work around for initialization for RTC
interrupt where interrupt is stuck for ever at startup. Unfortunately,
this workaround needs to be applied under 1 second of boot.
Signed-off-by: Nishanth Menon <nm@ti.com>
Currently we cannot save environment settings between resets, forcing us
to stop autoboot and override the same settings every boot
Disable the CONFIG_ENV_IS_NOWHERE option, allowing us to use the
'env save' command to save environment settings between resets
CC: Andrew Davis <afd@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
There are many configuration settings defined in the am64's and j721e's
defconfig files that are the same as their default values
Use the 'make savedefconfg' command to remove these duplicate
configuration settings
CC: Andrew Davis <afd@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
The Marcos used for USB MSC environemnt setting have AM642 instead of
AM625. Therefore, fix them.
Fixes: 842c6777d0 ("include: configs: am62x_evm: Add env variables for booting to kernel using USB MSC device")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
With this one can setting name_overlays at u-boot is sufficient to apply
required overlays at U-Boot prompt.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Set the USB PHY core voltage to 0.85V for both the instances. Also, enable
the SPL_BOARD_INIT config.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Enable DMA and OSPI related configs in R5 defconfig. Also enable SFDP in
A53 SPL and disable tiny SPI NOR.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
In the "legacy" way, partitions are listed directly under the flash
node. In the "new" way, there is a partitions node under the flash node,
and the partitions are listed under that node. Allow parsing both styles
of partitions for finding the PHY pattern location.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Add env variables for booting to kernel from USB MSC device. The second
partition in the USB MSC device needs to formatted as ext4 file system with
kernel and dtb images, present in the /boot folder.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Due size limitations on the R5 SPL image sizes, all the support for various
boot modes can not be added using a single defconfig file. Therefore,
create a new defconfig for USB DFU boot mode.
Also enable configs in A53 defconfig to add support for USB DFU in A53 SPL.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
CONFIG_SPL_USB_HOST_SUPPORT is used to enable host mode support in SPL.
Therefore, fix the error in the config's name in #ifdef's condition.
Fixes: fbbcbfbb87 ("drivers: usb: dwc3: Add support for AM62 USB wrapper driver")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Currently, the maximum size for both A53 and R5 SPL is limited to
CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE, this is set based in the maximum
size of image that ROM will be able to load. Therefore, this condition is
not true in case of A53 SPL, since R5 SPL should be able load images of any
size given the memory is allocated for it.
Also, on enabling support for additional boot media, all the required
support can no longer be accomodated in the same R5 SPL image given the size
restrictions on it and separate deconfigs will be defined for each boot
media. However, this need not be the case for A53 SPL as maximum size can
be increased.
Therefore, increase the maximum size for A53 SPL to 1MB.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Currently, in case of arm64 bootloader and U-Boot the stack pointer is
initialized at an offset of NON_SECURE_MSRAM_SIZE from arm64 SPL's text
base address. After jumping to arm64, execution is done out of DDR.
Therefore, having an offset corresponding to the size of MSRAM does not
have any significance. Stack overflow issues were observed in case of AM62
which has the smallest MSRAM of all the K3 SoCs, when additional configs
are enabled.
Instead, initialize the stack pointer after an offset of 4MB from the SPL
text base address. This helps in allocating larger memory for stack.
┌────────────────────┐0x80080000
│ │
│ arm64 SPL │
├────────────────────┤
│ ▲ │
│ │ │
│ STACK │
├────────────────────┤0x80480000
│ Memory for Load │
│ Buffer Allocation │
├────────────────────┤0x80800000
│ │
│ U-Boot Image │
│ │
└────────────────────┘
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Issues are seen while enabling UHS speed modes in U-Boot and this is
breaking MMC boot to kernel. Therefore, disable its corresponding
configs for now.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Tested-by: Bryan Brattlof <bb@ti.com>
The two instance of USB IP in AM62 SoC are brought out on the SK board. The
zeroth instance is brought out through a USB TYPE C port and the first
instance through a USB TYPE A port. As role switching is supported in
U-Boot and dfu support is required, fix the role of zeroth instance to
peripheral in the U-Boot dts file.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
The environment bootpart is used for MMC boot so we need to use
something different for NAND boot, else we break MMC boot.
Fixes: commit 7d0227061f ("configs: am64x_evm: Support u-boot environment in NAND")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Tested-by: Dave Gerlach <d-gerlach@ti.com>