Commit Graph

70368 Commits

Author SHA1 Message Date
Aswath Govindraju b070908a8a board: ti: am64x: Add support for fixing dr_mode while booting from USB
Fix the dr_mode in the U-Boot device tree blob, by reading the mode field
from the USB Boot Configuration fields. The dr_mode will only be fixed when
booting from USB.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-09-08 17:36:54 -05:00
Aswath Govindraju fc5aea9d32 usb: cdns3: gadget.c: Set fast access bit
When the device port is in a low power state [U3/L2/Not Connected],
accesses to usb device registers may take a long time. This could lead to
potential core hang when the controller registers are accessed after the
port is disabled by setting DEVDS field. Setting the fast register access
bit ensures that the PHY clock is keeping up in active state.

Therefore, set fast access bit to ensure the accesses to device registers
are quick even in low power states.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-09-08 17:36:14 -05:00
Roger Quadros 7a7db34da0 board: ti: am57xx-idk: Choose the right DTB based on detected LCD Panel
The board file sets the 'idk_lcd' environment variable based on
what LCD panel was detected. We just need to choose the right
DTB based on that.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-08 13:28:06 -05:00
Andreas Dannenberg 788d2a65d4 board: ti: Add support for the AM437x GP EVM mini board
This is not really a new board but rather a minimal bootloader solution
for the AM437x GP EVM. In terms of interfaces, it only supports booting
from MMC0 or UART0 and only activates a minimal set of drivers that are
that are necessary to run the device such as DDR, I2C, and PMIC.

The goal is to provide a bare minimum starting point to boot Linux for
basing custom board-ports on. The limited complexity of this solution
should make it easier to achieve a successful boot to U-Boot prompt vs.
trying to pair down the full-featured multi-platform AM437x U-Boot
available through am43xx_evm_defconfig.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
[Amjad: fix compile and checkpatch warnings]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-08 13:26:16 -05:00
Faiz Abbas eda200b1aa configs: am43xx_hs_evm: Add SPL_USB_STORAGE Support
Enable CONFIG_SPL_USB_STORAGE to support UBS MSC boot support.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-08 13:23:50 -05:00
Andreas Dannenberg 971a6ef0d5 board: ti: Add support for the AM335x GP EVM mini board
This is not really a new board but rather a minimal bootloader solution
for the AM335x GP EVM. In terms of interfaces, it only supports booting
from MMC0 or UART0 and only activates a minimal set of drivers that are
that are necessary to run the device such as DDR, I2C, and PMIC.

The goal is to provide a bare minimum starting point to boot Linux for
basing custom board-ports on. The limited complexity of this solution
should make it easier to achieve a successful boot to U-Boot prompt vs.
trying to pair down the full-featured multi-platform AM335x U-Boot
available through am335x_evm_defconfig.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
[Amjad: fix checkpatch and compile warnings]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-08 13:02:41 -05:00
Keerthy 9dbf780c16 dts: am57xx*: Add ipu early boot DT changes
Add support for ipu early boot.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:38 -05:00
Keerthy dcbd681188 arm: dts: dra7*/am57xx-idk-evm-u-boot: Add ipu early boot DT changes
Add support for ipu early boot.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:38 -05:00
Keerthy a6e7e52bec arm: dts: dra7: Add ipu and related nodes
Add ipu and the associated nodes.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:38 -05:00
Keerthy f44c55d03d dts: dra7-ipu-common-early-boot.dtsi: Add all the ipu early boot related nodes
Add all the ipu early boot related nodes

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:38 -05:00
Keerthy b337ee2436 remoteproc: ipu: Add driver to bring up ipu
The driver enables IPU support. Basically enables the clocks,
timers, watchdog timers and bare minimal MMU and supports
loading the firmware from mmc.

Signed-off-by: Keerthy <j-keerthy@ti.com>
[Amjad: fix compile warnings]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:38 -05:00
Keerthy c2784af18f remoteproc: uclass: Add remoteproc resource handling helpers
Add remoteproc resource handling helpers. These functions
are primarily to parse the resource table and to handle
different types of resources. Carveout, devmem, trace &
vring resources are handled.

Signed-off-by: Keerthy <j-keerthy@ti.com>
[Amjad: fix redefinition of "struct resource_table" and compile warnings ]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:38 -05:00
Keerthy 622e0bea7e linux: bitmap.h: Add find_next_zero_area function
Add find_next_zero_area to fetch the next zero area in the map.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:38 -05:00
Keerthy c66fec85c7 drivers: misc: Makefile: Enable fs_loader compilation at SPL Level
Enable fs_loader compilation at SPL Level.

Signed-off-by: Keerthy <j-keerthy@ti.com>
[Amjad: fix compilation failures for J721e platform]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:37 -05:00
Keerthy 278d596adc arm: mach-omap2: load/start remoteproc IPU1/IPU2
First check the presence of the ipu firmware in the boot partition.
If present enable the ipu and the related clocks & then move
on to load the firmware and eventually start remoteproc IPU1/IPU2.

do_enable_clocks by default puts the clock domains into auto
which does not work well with reset. Hence adding do_enable_ipu_clocks
function.

Signed-off-by: Keerthy <j-keerthy@ti.com>
[Amjad: fix IPU1_LOAD_ADDR and compile warnings]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-09-01 18:19:37 -05:00
Keerthy d77252021a reset: dra7: Add a reset driver
Add a reset driver to bring IPs out of reset.

Signed-off-by: Keerthy <j-keerthy@ti.com>
[Amjad: reset_ops structure member "free" has been renamed to "rfree",
use the latter instead]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-08-26 15:47:20 -05:00
Aswath Govindraju 5de4611481 environment: ti: k3_dfu: Increase the size allocated for bootloader images in dfu_alt_info_ram
The size of u-boot.img is above 1MB and that of tispl.bin is close to 1MB,
in case of j721e. Therefore, increase the sizes allocated for tispl.bin and
u-boot.img to 2 MB and 4 MB respectively, in dfu_alt_info_ram environment
variable.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-08-26 15:14:32 -05:00
Aswath Govindraju 666a69b749 arm: dts: k3-j721e-eaik-u-boot: Set dr_mode to peripheral for usb0 instance
Set the dr_mode of usb0 instance, to peripheral to support USB DFU boot
mode.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-08-26 15:14:32 -05:00
Aswath Govindraju 16fef23481 arm: dts: k3-j721e-r5-*.dts: Fix clock-names property in the usb0 instance
In the cdns3 usb driver, the clock name looked for is "ref". Therefore, fix
the clock-names property in usb0 instance for proper initialization of
cdns3 usb gadget driver.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-08-26 15:14:32 -05:00
Praneeth Bajjuri 53e79d0e89 defconfigs: am65x_hs_evm: Sync HS and non-HS defconfigs
Additions have been made to the non-HS defconfig without the same
being made to the HS defconfig, sync them.

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2021-07-21 13:14:50 -05:00
Andrew F. Davis f1dc3f7831 bootm: Store OS start and end info in images structure
Store the start and end of the OS image that is loaded in images
structure. This is similar to what we do in booti.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2021-07-21 13:14:44 -05:00
Tero Kristo 571719cb25 arm: mach-k3: security: do not check images with zero size
If DM image is not built-in to the fit, its size is going to be zero.
In this case, do not attempt to authenticate it.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2021-07-21 13:14:37 -05:00
Gowtham Tammana e335337914 configs: j7200_evm_r5_defconfig: Enable ESM modules
Enable ESM modules for both PMIC and SoC for watchdog error intterupt
handling on the board.

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
2021-07-15 14:51:30 -05:00
Gowtham Tammana cdbaa6f77b power: pmic: tps65491: Dont fail on master node
TPS65941 can have child only ESM nodes with no regulators, so dont fail
on regulator probe failure.

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
2021-07-15 14:51:30 -05:00
Gowtham Tammana c5348bd884 j721e_init: initialize ESM support for J7200 SOM
ESM and ESM PMIC support is available for J7200X-PM2-SOM board, as such
enable support for it.

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
2021-07-15 14:51:30 -05:00
Gowtham Tammana a2fe67e24a arm: dts: k3-j7200: Add ESM PMIC support for tps659413
On J7200 processor board MCU_SAFETY_ERROR signal is routed to PMIC for
ESM error handling. The PMIC resets the board on receipt of the signal.
Enable the support for the board by adding ESM PMIC node.

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
2021-07-15 14:51:30 -05:00
Gowtham Tammana 52c1d69d7d arm: dts: k3-j7200-r5-common: Add pmic node for esm
Add pmic tps659413 node needed for ESM error event handling.

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
2021-07-15 14:51:30 -05:00
Gowtham Tammana 0b7394f5c0 arm: dts: k3-j7200: Add Main domain ESM support
Main domain ESM support is needed to configure main domain watchdog
interrupts to generate ESM pin events. On J7200 boards ESM error pin
output is propagated to PMIC to generate reset.

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
2021-07-15 14:51:30 -05:00
Tero Kristo 722ec1cd68 arm: mach-k3: j721e_init: initialize ESM support
Initialize both ESM and ESM_PMIC support if available for the board.
If support is not available for either, a warning is printed out.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
2021-07-15 14:50:52 -05:00
Tero Kristo 821524ff09 configs: j721e_hs_evm_r5: sync up config with GP config
Sync up the high secure config against the latest general purpose
config. This re-enables booting up a j721e HS evm board.

Signed-off-by: Tero Kristo <kristo@kernel.org>
2021-07-13 13:35:37 -05:00
Kishon Vijay Abraham I 8c411b3cb9 phy: ti: j721e-wiz: Add missing "DM_FLAG_REMOVE_WITH_PD_ON"
"DM_FLAG_REMOVE_WITH_PD_ON" should be set in driver flags in order for
the SERDES configurations to be retained to the kernel without resetting
SERDES driver. Set "DM_FLAG_REMOVE_WITH_PD_ON" in j721e-wiz driver.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2021-07-13 13:34:51 -05:00
Amarnath MB 20e7036ac9 configs: j721e_evm: Enable configs to store env in MMC FAT partition
J721E EVM used to store env on eMMC, since EVM and EAIK uses same
defconfig and there is no eMMC on EAIK, we need to keep env in an
interface which available on both EVM and EAIK. So, save env in FAT
partition of MMC SD Card.

Enable defconfigs relevant for storing env on FAT partion of MMC.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 34c9540d1c configs: j721e_evm_a72: Align OSPI partitions on erase block boundary
S28HS512T on TI EAIK has sector size of 256KB, so update OSPI partition
to align on 256KB sector size. Since the sector size for MT35XU512ABA
on EVM is 128KB, partitions will remain aligned for EVM.

Also, now since the sector size is 256KB ospi.env.backup will collide
with ospi.sysfw, so move ospi.env.backup to the padding space (0x7C0000)
before ospi.rootfs partition.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 47122f82d7 include: configs: Update env for selecting right dtb
Now that single defconfig can be used for booting J721E EVM and
EAIK, default device tree will not work for selecting dtb for
kernel. Update the findfdt env to select right dtb based on
board_name env variable.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 62b2dec505 configs: j721e_evm_a72: Add EAIK dtb as part of DTB FIT
Add k3-j721e-eaik dtb along with other dtbs inside DTB FIT image.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB cfb212fadb configs: j721e_evm_r5: Enable support for building multiple dtbs into FIT
Enable configs for building multiple dtbs into a single fit image
and load the right dtb for next stage. This will help to use same
defconfig for both EVM and EAIK.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB e5f3d8a0e8 arm: dts: k3-j721e-r5-eaik: Add initial R5 specific dts support for j721e-eaik
Add R5 specific dts for J721E-EAIK

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB c02a23cff5 arm: dts: k3-j721e-eaik: Add initial A72 specific dts support
J721E EdgeAI Kit (EAIK) is a low cost, small form factor board designed
for TI’s J721E SoC. TI’s J721E SoC comprises of dual core A72, high
performance vision accelerators, video codec accelerators, latest C71x
and C66x DSP, high bandwidth real-time IPs for capture and display,
GPU, dedicated safety island and security accelerators. The SoC is
power optimized to provide best in class performance for perception,
sensor fusion, localization, path planning tasks in robotics,
industrial and automotive applications.

See J721E Technical Reference Manual (SPRUIL1B, REVISED DECEMBER 2020)
for more details about J721E SoC: http://www.ti.com/lit/pdf/spruil1

J721E EAIK supports the following interfaces:
* 4 GB LPDDR4 RAM
* x1 Gigabit Ethernet interface
* x1 USB 3.0 Type-C port
* x3 USB 3.0 Type-A ports
* x1 UHS-1 capable µSD card slot
* x1 PCIe M.2 E Key with x1 USB2.0, x1 MCASP, x1 MMC, x1 UART
* x1 PCIe M.2 M Key
* 512 Mbit OSPI flash
* x4 UART through UART-USB bridge
* x4 CAN-FD interface
* x1 DP interface
* x1 HDMI interface
* x2 CSI2 Camera interface (RPi and TI Camera connector)
* 40-pin Raspberry Pi compatible GPIO header
* Compact TI 20-Pin connector for JTAG debug
* Interface for remote automation. Includes:
    * power measurement and reset control
    * boot mode change

Add A72 specific dts for J721E-EAIK.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 4d942d8283 arm: dts: k3-j721e-r5-common-proc-board: Do not use power-domains for I2C
Board ID I2C EEPROM will be probed before SYSFW is available.
So drop the power-domains property for wakup_i2c0 on which
board ID EEPROM is connected.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 48315c8867 arm: j721e: Add support for selecting DT based on EEPROM
Enable support for selecting DTB from FIT within SPL based on the
board name read from EEPROM. This will help to use single defconfig
for both EVM and EAIK.

Also print FDT model name and board name read from EEPROM on SPL debug
console. This is useful to verify that right dtb is loaded in each boot
stage.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 2bc1f536ba board: ti: j721e: Add support for detecting multiple device trees
Update the board_fit_config_name_match() to choose the right dtb
based on the board name read from EEPROM.

Also restrict multpile EEPROM reads by verifying if EEPROM is already
read.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 25665d10e0 board: ti: j721e: Disable probing of daughtercards
j721e-eaik doesn't have any daughter cards, so disable daughter
card probing inside board_late_init() and spl_board_init() for
j721e-eaik.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 01b5477356 board: ti: j721e: Add support to update board_name for j721e-eaik
Update setup_board_eeprom_env() to choose the right board name
for j721e-eaik.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 60f4579053 board: ti: j721e: Enable support for reading EEPROM at next alternate address
J721E EVM has EEPROM populated at 0x50. J721E EAIK has EEPROM populated at
next address 0x51 in order to be compatible with RBPi. So start looking
for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB fa78174f77 board: ti: j721e: Guard functions with right #ifdef to avoid build warnings
board_late_init(), setup_board_eeprom_env() and setup_serial() is
called only under CONFIG_BOARD_LATE_INIT, so guard these functions
with the same.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB 45e79ee9ee drivers: power: regulator: tps65941_regulator: Add support for 3Phase buck
Buck regulator 1, 2 and 3 of TPS6594132 on j721e-eaik is in 3 Phase
confguration, in-order to support this, add configuring 3 Phase buck
in tps65941 while driver probing.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB dd1a82de97 drivers: power: pmic: Add support for tps659412 PMIC
Since TPS659412 and TPS659413 are both software compatible,
add a compatible string for the same inside tps65941.c.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Amarnath MB fe0127f620 common: make: Support show_board_info() as part of SPL build
Enable support for show_board_info() in SPL build.

Signed-off-by: Amarnath MB <amarnath.mb@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: Lokesh Vutla <lokesjhvutla@ti.com>
2021-06-29 17:49:02 -05:00
Suman Anna 4bf1c4b9ad ram: k3-ddrss: Fix a dev_dbg build warning
The k3-ddrss RAM driver generates the following build warning due to a
missing printk argument specifier in a dev_dbg. Fix this by printing
the actual bypass frequency.

drivers/ram/k3-ddrss/k3-ddrss.c:279:4: warning: too many arguments for format [-Wformat-extra-args]
  279 |    "ddr freq0 not populated, using bypass frequency.\n",
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: d7ca60b875 ("ram: k3-ddrss: Allow use of dt provided initial frequency")
Signed-off-by: Suman Anna <s-anna@ti.com>
2021-06-28 18:54:52 -05:00
Aswath Govindraju c0abb51a28 arm: mach-k3: am642_init: Correct the length of the host string to 5 instead of 4
While calculating the length of the property value to be replaced with,
also include the "\0" character. This makes the length of the new property
value "host" to be 5 and not 4.

Fixes: d0d92256cb ("arm: mach-k3: am642_init: Fix the length of new property value in fdt_find_and_setprop()")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-06-28 18:51:30 -05:00