Commit Graph

85675 Commits

Author SHA1 Message Date
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
Sinthu Raja 6f13db1901 environment: ti: Find DTB files in dtb directories for legacy platform
The dtb directory structure had been standardized by the TI arago
distribution. The TI legacy platform still using the default mmc
environment from the header file. Add the directory dtb/ to the DTB
search path.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-10-30 11:57:34 +05:30
Bryan Brattlof 4c358e4785 arm: dts: k3-am62p: sync with TI's v6.1 kernel
Copy over the DTBs for the am62p5-sk to enable more boot modes.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-26 17:04:09 -05:00
Sinthu Raja 4f20eb5e29 include: configs: omap5: Drop the prefix conf- for name_fit_config
For legacy platforms the packaging of fitimage doesn't prefix the "conf-"
in the DTB config section. So, drop the conf- prefix from the fdtfile name

Fixes: 1eaf714ce2 "include: configs: Override get_fit_config to get FIT config for AM57x"
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2023-10-25 19:45:20 -05:00
Bryan Brattlof d21ad2898f configs: introduce configs needed for the am62px
Introduce the initial configs needed to support the am62px SoC family

[bb@ti.com: rebased on TI's 2023.10 uboot]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:42 -05:00
Bryan Brattlof bc763e60eb arm: dts: introduce am62p5 uboot dts files
Include the uboot device tree files needed to boot the board.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:42 -05:00
Bryan Brattlof 5014368187 arm: dts: add am62p5 dtbs from linux
Pull in the device tree source files for TI's am62p5 SoCs needed to boot
the board from v6.6-rc5. These are an early release with only the
peripherals to boot the board via UART boot

[bb@ti.com: used DTBs from TI's v6.1 kernel]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:42 -05:00
Hari Nagalla 9fa86d1770 firmware: ti_sci_static_data: add static DMA channel data
Include the static DMA channel data for ti_sci

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
[bb@ti.com: rebased on TI's 2023.04 uboot]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:42 -05:00
Bryan Brattlof 817bff8f64 board: ti: introduce basic board files for the am62px family
Introduce the basic files needed to support the am62px family of SoCs

Co-developed-by: Hari Hagalla <hnagalla@ti.com>
Signed-off-by: Hari Hagalla <hnagalla@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:42 -05:00
Bryan Brattlof ca1c7e2b62 arch: mach-k3: introduce basic files to support the am62px SoC family
Introduce the basic functions and definitions needed to properly
initialize Ti's am62p family of SoCs

[bb@ti.com: rebased on TI's 2023.04 uboot]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:42 -05:00
Bryan Brattlof d08a421e0c arm: mach-k3: invert logic for split DM firmware config
Currently for the K3 generation of SoCs there are more SoCs that utilize
the split firmware approach than the combined DMSC firmware. Invert the
logic to avoid adding more and more SoCs to this list.

[bb@ti.com: rebased on TI's 2023.04 uboot]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:41 -05:00
Bryan Brattlof 73ae250bc5 ram: k3-ddrss: enable the am62ax's DDR controller for am62px
The am62px family of SoCs uses the same DDR controller as found on the
am62ax family. Enable this option when building for the am62px family

Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:41 -05:00
Bryan Brattlof 5baba95077 arm: mach-k3: am62px: introduce clock and device files for wkup spl
Include the clock and lpsc tree files needed for the wkup spl to
initialize the proper PLLs and power domains to boot the SoC.

[bb@ti.com: rebased to TI's 2023.04 uboot]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:41 -05:00
Bryan Brattlof 835854816d soc: add info to identify the am62p SoC family
Include the part number for TI's am62px family of SoCs so we can
properly identify it during boot

[bb@ti.com: rebased to TI's 2023.04 uboot]
Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24 15:35:41 -05:00
Vishal Mahaveer ded83c57a2 clk: ti: k3-pll: Add calibration support for non fractional mode
PLL calibration needs to be enabled when operating in non fractional
mode. Add the sequence to do a fast calibration when using PLL
in this mode.

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Tested-by: Neha Malcom Francis <n-francis@ti.com>
2023-10-24 15:35:41 -05:00
Prasanth Babu Mantena d74d0993e2 board: ti: common: board_detect: Fix EEPROM offset read for 1-byte
EEPROM detection logic in ti_i2c_eeprom_get() involves reading the total
size followed by reading 1-byte size with an offset 1. This commit fixes
the header matching issue in commit 9f393a2d7a ("board: ti: common:
board_detect: Fix EEPROM read quirk for 2-byte").

In the previous commit, the value with one offset is being read into
offset_test, but the pointer used to match was still ep. After reading
with an offset 1, the second byte of the header is compared with the 1-byte
data read from EEPROM. This is taken care by comparing proper first byte
value from the header.

Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Fixes: 9f393a2d7a (board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte)
2023-10-18 12:49:46 -05:00
Vignesh Raghavendra dd0c500c95 remoteproc: ti_k3_m4_rproc: Fix build warning
Fix below warning by including appropriate header file

drivers/remoteproc/ti_k3_m4_rproc.c: In function 'k3_m4_load':
drivers/remoteproc/ti_k3_m4_rproc.c:151:9: warning: implicit declaration of function 'ti_secure_image_post_process' [-Wimplicit-function-declaration]
  151 |         ti_secure_image_post_process(&image_addr, &size);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: cf4727c2f6 ("remoteproc: k3-m4: Introduce K3 remote proc driver for M4 subsystem")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-10-18 12:25:50 -05:00
Vignesh Raghavendra 5f8eb8ccc6 mach-k3: am62x: Fix BOOT_DEVICE_SPINAND index
BOOT_DEVICE_SPINAND and BOOT_DEVICE_UART have same index of 0x7, this
leads to attempting SPINAND boot during UART boot. Fix this by
allocating unique value to BOOT_DEVICE_SPINAND. While at that move it
out of unused list as SPINAND boot is very much supported on AM62x SoCs.

Fixes: 8c7827f522 ("arm: mack-k3: am62x: Add SPI NAND as a boot device")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-10-18 12:24:00 -05:00
Hari Nagalla 6db34d931e env: ti: am64x: set rproc_fw_binaries
Set remote proc FW binaries for u-boot loading of remote cores.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2023-10-18 12:19:58 -05:00
Hari Nagalla ae8a66efda configs: am64x_evm_a53_defconfig: Enable R5F remote proc support
Add support for R5F remote proc driver.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2023-10-18 12:19:58 -05:00
Hari Nagalla 7e600af984 remoteproc: k3-r5: Add support for R5F cores on AM64x SoCs
AM64x SoCs have two R5F clusters in the main power domain.
Extend support for R5F remote proc driver on AM64x with compatible
strings.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2023-10-18 12:19:58 -05:00
Vignesh Raghavendra 5350a860b9 configs: am65x_evm_a53_defconfig: Drop ENV_IS_IN_MMC
Similar to other K3 platforms, drop specifying source of env to avoid
picking up stale env. This enables proper FitImage boot on HS-SE
devices which used to fail due to stale env from older releases.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-10-18 09:35:24 -05:00
Vignesh Raghavendra 3978119ef8 board: ti: am62x: Reduce reserved memory region
For systems with 512MB DDR, reduce the top 64MB for firmwares instead of
current 256MB. This provides more useable memory for U-Boot during image
load.

Fixes: 64c0d9e010 ("board: ti: am62x: Avoid overwriting reserve mem for AM62 SIP")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2023-10-18 09:33:39 -05:00
Apurva Nandan 8ef4b6ee68 arm: dts: k3-j721e-r5-common-proc-board: Fix OSPI spi-tx-bus-width
spi-tx-bus-width is set as 8 in SoM dtsi, but set to 1 in R5 common
proc board dts, which seems wrong. SPI NOR requires a 8D reset before
probe starts using 0x66+0x99 op, but that will fail if the flash tx
width is set as 1.

Set spi-tx-bus-width to 8 in R5 common proc board dtsi also.

Signed-off-by: Apurva Nandan <a-nandan@ti.com>
Reviewed-by: Vaishnav Achath <vaishnav.a@ti.com>
2023-10-18 09:57:14 +05:30