Commit Graph

85698 Commits

Author SHA1 Message Date
Dhruva Gole e8889cb56a arm: dts: k3: binman: am62p: add support for signing FSSTUB images
Add support for signing, detection and loading of FSSTUB images for
for HSSE and HSFS AM62P devices. Based on the binman code for AM625
with updates to the filenames and load address.

Signed-off-by: Dhruva Gole <d-gole@ti.com>
Acked-by: Vishal Mahaveer <vishalm@ti.com>
2023-11-24 16:56:59 -06:00
Vishal Mahaveer eff76d94a3 board: ti: rm-cfg: Update to latest configuration
Update RM boardcfg to latest output from k3-resource-partitioning
tool for am62, am62ax and am62px devices.

Commit SHA of k3-resource-partitioning tool:
e8dcac2413f918aad02298fbe476891c71823c41

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Tested-by: Dhruva Gole <d-gole@ti.com> #am62px
2023-11-24 16:56:35 -06:00
Roger Quadros c0176ab8dd mtd: nand: omap_gpmc: Fix NAND in SPL for AM335x
AM335x uses a special driver "am335x_spl_bch.c" as SPL
NAND loader. This driver expects 1 sector at a time ECC
and doesn't work well with multi-sector ECC that was implemented
in commit 04fcd25873.

Switch back to 1 sector at a time read/ECC.

Fixes: 04fcd25873 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:54:00 -06:00
Roger Quadros 2d30da97ed environment: ti: k3_dfu_combined.env: add dfu_alt_info_ospi_nand
Copy this over from k3_dfu.env.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros 154ecd8648 environment: ti: k3_dfu_combined.env: add dfu_alt_info_nand
Copy this over from k3_dfu.env.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros bc8d0eb32d environment: ti: am64x: Fix mtdids and mtdparts
mtdids and mtdparts defined in nand.env are not suitable
for am64x-evm. Define its own here.

We deliberately don't define spi.nor partitions here as
it causes mtdparts and dfu to fail till user has done
"sf probe" command. This is because NOR flash is not
auto probed by u-boot.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros b8cf525335 configs/am64x_evm_a53_defconfig: Enable NAND DFU
Enable NAND support for DFU.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros ca69452f7a tools/fdtgrep: Include __symbols__ table
This is required for overlays to work at SPL.

Loading of symbol table depends on DT Overlay support in SPL
so make it compile-time dependent. Without this SPL fails to
boot some platforms where this feature is not enabled
(e.g. dra71-evm.)

Without including the <linux/kconfig.h> file, the symbol
CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY will not be visible and
we will never include the symbol table.

So include <linux/kconfig.h>

Due to some reason it needs to be included after
[#include "fdt_host.h"] otherwise it causes a build error.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros 2bf80af7a9 configs: am64x_evm: provide NAND configuration
Provide NAND device and NAND driver configuration for AM64x EVM.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros 1feeea360e configs: am64x_evm_a53_defconfig: Enable NAND
Enables configuration required for NAND in SPL and u-boot.

Enable MTD Driver model and MTD + UBI command line utilities.

Add mtdids/mtdparts for NAND as it is required for u-boot's
MTD subsystem commands to recognize NAND partitions.

Add u-boot partition location.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros b1ba64d9ba configs: am64x_evm_a53_defconfig: add SPL_LOAD_FIT_APPLY_OVERLAY
We want SPL to apply DTB overlays (e.g. NAND card overlay) so
enable SPL_LOAD_FIT_APPLY_OVERLAY.
Increase SPL_LOAD_FIT_APPLY_OVERLAY_BUF_SZ and
SPL_STACK_R_MALLOC_SIMPLE_LEN. Without this SPL hangs.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros 63c591d6f5 board: ti: am64: select NAND overlay if HSE card present
Since we are using overlay for A53 SPL and A53 u-boot the
SPL must select the NAND overlay from the FIT image if
HSE card is present.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros d507c6b2ba arm: dts: k3-am64x-binman: Add NAND overlay and configuration
Add NAND overlay and configuration to tispl and u-boot images.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros 40e776a36d arm: dts: k3-am642-evm: Add NAND support
Add NAND support for A53 SPL and u-boot.

For A53 SPL & u-boot we use NAND overlay to add NAND support.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros cc471479d3 arm: dts: k3-am642: main_i2c0 cleanup
move main_i2c0, main-i2c0-pins-default, and tca9554
definitions to where they belong i.e. k3-am642-evm.dts

k3-am642-r5-evm.dts is not cleaned up like in upstream
to include k3-am642-evm.dts so we have to add the
main-i2c0-pins-default and tca9554 nodes to it
as well.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Roger Quadros 189bd2cc06 arm: mach-k3: am642: Define NAND boot device
AM642 SoC supports booting from GPMC NAND device.
Define boot device for it.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24 16:53:29 -06:00
Udit Kumar 3c8e18effc remoteproc: k3-dsp: Avoid reloading of firmware
DSP core is going into abnormal state when load callback is called
after starting of DSP core.
Reload of firmware needs core to be stopped first, followed by
load.
So avoid loading of firmware, when core is started.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Apurva Nandan <a-nandan@ti.com>
2023-11-24 16:52:21 -06:00
Vignesh Raghavendra c97fa5cd4a mach-k3: am62p5_init: Add emmc boot support
Add spl_mmc_boot_mode() to help distinguish eMMC raw boot mode.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-11-24 16:50:51 -06:00
Vignesh Raghavendra 5e27b6be65 configs: am62px_evm_a53_defconfig: Enable PHY support of cadence-qspi
Enable support for using PHY mode in cadence-qspi driver for better data
rate.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-11-23 14:49:54 +05:30
Vignesh Raghavendra 4209cce84e arm: dts: k3-am62p5-sk: Enable OSPI PHY mode
Enable OSPI PHY mode for faster boot time as PHY mode supports upto
166MHz of OSPI bus freq.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-11-23 14:49:54 +05:30
Vignesh Raghavendra 66551ea574 arm: dts: k3-am62p5-r5-sk: Add 32bit OSPI DATA region
Add 32bit OSPI DATA region which enables R5 to access OSPI

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-11-23 14:49:54 +05:30
Vignesh Raghavendra 34e454793f arm: dts: am62p5-r5-sk: Add DMA support at R5 SPL
OSPI boot requires DMA for faster boot up at R5 SPL stage. Enable the
same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
2023-11-23 14:49:54 +05:30
Vignesh Raghavendra d65ac3de81 arm: dts: k3-am62p-r5-sk: Fix secproxy thread ID for DM2TIFS comm
Per [0] thread IDs should be 20 and 21. Update the same

[0] https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am62px/sec_proxy.html#secure-proxy-thread-allocation-for-dmass0-sec-proxy-0

Fixes: bc763e60eb ("arm: dts: introduce am62p5 uboot dts files")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-11-23 14:49:54 +05:30
Judith Mendez 057d19e56d environment: ti: k3_dfu_combined.env: Fix env offset for eMMC
The following shall be the eMMC layout for AM64x platform:

            boot0 partition
    0x0+----------------------------------+
       |     tiboot3.bin (1 MB)           |
  0x800+----------------------------------+
       |       tispl.bin (2 MB)           |
0x1800+-----------------------------------+
       |       u-boot.img (4 MB)          |
0x3800+-----------------------------------+
       |      environment (128 KB)        |
0x3900+-----------------------------------+

Move u-boot environment from 0x3400 to ox3800 since at 0x3400
it overlaps with u-boot.img.

Signed-off-by: Judith Mendez <jm@ti.com>
2023-11-22 20:37:55 +05:30
Judith Mendez a4f2cd532a configs: am64x_evm_r5/a53_defconfig: Fix eMMC raw boot offsets
EMMC boot is broken for AM64x platform. This is due to the size of
tiboot3.bin growing beyond the 500KB of memory allocated in eMMC.
There was effort to move the offsets and give more space to tiboot3.bin,
but the offsets in defconfig were not updated. Update offsets in
defconfig to load each binary from the correct adress in eMMC according
to the following eMMC layout:

            boot0/1 partition
    0x0+----------------------------------+
       |     tiboot3.bin (1 MB)           |
  0x800+----------------------------------+
       |       tispl.bin (2 MB)           |
0x1800+-----------------------------------+
       |       u-boot.img (4 MB)          |
0x3800+-----------------------------------+
       |      environment (128 KB)        |
0x3900+-----------------------------------+

Signed-off-by: Judith Mendez <jm@ti.com>
2023-11-22 20:37:32 +05:30
Mattijs Korpershoek 9ec80a1510 include: configs: am62x_evm_android: Add am62b_p1_skevm
am62b_p1_skevm eeprom has been introduced with
commit 09b2c79a8d ("board: ti: am62x: Add support to detect AM62B-P1 board")

Since this support, board_name is updated and we can no longer boot android
since we don't set the proper dtb_index.

Add am62b_p1_skevm and load the same dtb as for am62x_skevm.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Vishal Mahaveer <vishalm@ti.com>
2023-11-21 14:37:39 -06:00
Sinthu Raja 304eea858a configs: am57x: Increase the CB_SIZE to 2KB for AM57x
The u-boot environment variable emmc_android_boot total size increased
to more than 1KB. U-boot hangs when the emmc_android_boot variable is
reused in the u-boot prompt as the maximum size of the u-boot command 
line buffer is 1KB. Increase the CB_SIZE to 2KB for AM57x SoC family

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-11-20 21:33:51 +05:30
Judith Mendez 8c121e6e3c HACK: arm: dts: k3-am62p: add dll delay mapping for emmc
Add in the input and output delay values for the available speed modes
for the MMC controller for eMMC for the am62p5 allowing it to operate
that the highest speed modes available.

The patch is labeled as a HACK because the HS200 and HS400 values have
not been finalized as of yet even though they have been tested.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
2023-11-14 17:24:31 -06:00
Sinthu Raja 1186f94f42 board: ti: am57xx: Add board specific structures for ext_phy_regs
Beagle x15 phy_ctrl_const_regs structure is the common structure
for all AM57x platforms. Add board specific structure for
phy_ctrl_const_regs.

Update the emif_get_reg_dump() function to select phy_ctrl_const_regs
structure based on board name.

Signed-off-by: James Doublesin <doublesin@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-11-14 17:20:08 -06:00
Vignesh Raghavendra 09b2c79a8d board: ti: am62x: Add support to detect AM62B-P1 board
AM62B-P1 is PMIC variant of AM62B board. Add support to detect this
board based on EEPROM string. This will help in implementing handling
board specific DT fixups later on.

Schematics: https://www.ti.com/tool/SK-AM62B-P1

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2023-11-08 17:37:21 -06:00
Guillaume La Roque fabf3ae948 configs: am62px: add android support
Add Android bootflow support for AM62PX SoC.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-11-08 17:32:58 -06:00
Mattijs Korpershoek c5296d943c arm: dts: k3-am62p5-sk-u-boot: Add sysreset controller node
The AM62Px SoC uses a central Device Management and Security Controller
(DMSC) processor that manages all the low-level device controls
including the system-wide SoC reset. The system-wide reset is managed
through the system reset driver.

Add a sysreset controller node as a child of the dmsc node to enable
the "reset" command from U-Boot prompt for the K3 AM62p5 SK EVM.

This is based on commit a97ee92e4a ("arm: dts: k3-am642-evm: Add sysreset controller node")

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-11-08 17:32:17 -06:00
Bryan Brattlof e32f441ec8 configs: am62px: setup the 32k RTC crystal
The am62px utilizes the same 32k crystal for a more accurate RTC clock
source. Enable the configuration to set this up for Linux.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-11-07 17:55:03 -06:00
Bryan Brattlof dee6f6f1c2 board: ti: am62x: remove rtc setup from spl_board_init()
The am62xxx extended family uses the same 32k crystal for all of its
starter kits. Move this to the common board directory to avoid repeating
this everywhere.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-11-07 17:55:03 -06:00
Bryan Brattlof 851aa09d1e configs: am62x: move 32K RTC crystal to common
The am62x utilizes the same 32k crystal for a more accurate RTC clock
source. Enable the configuration to set this up for Linux.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-11-07 17:55:03 -06:00
Bryan Brattlof 5b41c7c481 configs: am62ax: setup the 32k RTC crystal
The am62ax utilizes the same 32k crystal for a more accurate RTC clock
source. Enable the configuration to set this up for Linux.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-11-07 17:55:03 -06:00
Bryan Brattlof d36ad81d25 board: ti: common: add rtc setup to common folder
All of the starter kit boards for the am62xxx extended family utilize
the same 32k crystal oscillator for a more accurate clock for the RTC
instance. Add the setup the clock mux and debounce configuration to the
common board directory so the entire am62xxx extended family can utilize
it.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-11-07 17:55:03 -06:00
Vibhore Vardhan 43d7c74e78 arm: dts: k3: binman: am62a: add support for signing FSSTUB images
Add support for signing, detection and loading of FSSTUB images for
for HSSE, HSFS and GP AM62a devices. Based on the binman code for AM625
with updates to the filenames and load address.

Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Tested-by: Vishal Mahaveer <vishalm@ti.com>
2023-11-07 15:29:16 -06:00
Ravi Gunasekaran 2e0e4ab05e configs: am62px_evm_r5_usbmsc_defconfig: Add USB MSC config
Add new R5 defconfig for USB MSC boot support based on usbdfu_defconfig

USB Host boot is supported only from USB0 port. By default USB0
is configured in peripheral mode to support DFU. Inorder to support
USB Host boot, "dr_mode" property needs to be changed from "peripheral"
to "host" in the device tree.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-11-03 17:40:06 -05:00
Ravi Gunasekaran 9ef062c26a configs: am62px_evm_r5_usbdfu_defconfig: Add USB DFU config
Add support for USB DFU bootmode by having a separate config
file.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-11-03 17:40:06 -05:00
Ravi Gunasekaran b052b27561 configs: am62px_evm_a53_defconfig: Enable USB wrapper
Add configs to enable AM62 USB wrapper.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-11-03 17:40:06 -05:00
Ravi Gunasekaran dbd581fff4 arm: dts: k3-am62p5-sk-u-boot: Configure USB0 in peripheral mode
Configure USB0 in peripheral mode so that USB DFU can be the
default USB boot mode supported.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-11-03 17:40:06 -05:00
Ravi Gunasekaran 0ec07d2146 HACK arm: dts: k3-am62p-wakeup: Update wkup_conf compatible to syscon, simple-mfd
ti,syscon-phy-pll-refclk property in the USB expects the wkup_conf to
be syscon compatible to setup the regmap. So update wkup_conf compatible
until the dependency of such nodes on wkup_conf are resolved.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-11-03 17:40:06 -05:00
Bryan Brattlof b0d868ee08 arm: dts: k3-am62p: sync with linux again
There are a few updates from TI's Linux mostly centered around
out-of-box remote core demo enablement and we added the bootph-all
property to sdchi0 to enable eMMC as a boot method.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-11-02 17:53:54 -05:00
Bryan Brattlof 6702f57e9e arm: dts: add am62p dtbs to makefile
Thanks to the CONFIG_DEFAULT_DEVICE_TREE option in the defconfig the
correct device tree blobs are being built for each uboot stage. However
rather than relying on this add a am62p5 target to the arm/dts/Makefile

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-31 17:41:50 -05:00
Nishanth Menon 1134dd5dfe arm: dts: Fix build of am62a7 dtbs
am62a7 should be built with CONFIG_SOC_K3_AM62A7 not CONFIG_SOC_K3_AM625

Fixes: 6bdfa69155 ("arm: dts: introduce am62a7 u-boot dtbs")
Cc: Bryan Brattlof <bb@ti.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Francesco Dolcini <francesco@dolcini.it>
Cc: Sjoerd Simons <sjoerd@collabora.com>
Cc: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2023-10-31 17:41:50 -05:00
Ravi Gunasekaran a8b5e02267 arm: dts: k3-am62p5-sk: Update cpsw3g_mdio node
Add the missing pinctrl info for cpsw3g_mdio and enable
the node.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-10-30 18:36:32 +05:30
Ravi Gunasekaran db0964fd6c arm: dts: k3-am62p5-sk-u-boot: Update main_pktdma node
Update reg list in main_pktdma node

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-10-30 18:36:32 +05:30
Vignesh Raghavendra a27a3fa7fa dma: ti: k3-udma: Add DMA PSIL mappings for AM62P
Add PSIL data for AM62P

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-10-30 18:36:32 +05:30
Jai Luthra 23446b4710 board: ti: am62p: Update to latest RM configs
Update to the latest RM (Resource Management) auto-generated YAMLs.

This fixes failures seen while requesting DMASS IRQs from the firmware,
which prevented use of many peripherals that rely on DMA like Audio
(McASP), Camera (CSI-RX) etc.

Fixes: 817bff8f64 ("board: ti: introduce basic board files for the am62px family")
Signed-off-by: Jai Luthra <j-luthra@ti.com>
2023-10-30 18:36:15 +05:30