summaryrefslogtreecommitdiff
path: root/board/ti
AgeCommit message (Collapse)AuthorFilesLines
2022-12-23global: Migrate CONFIG_MAX_RAM_BANK_SIZE to CFGTom Rini1-1/+1
Perform a simple rename of CONFIG_MAX_RAM_BANK_SIZE to CFG_MAX_RAM_BANK_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_MAX_MEM_MAPPED to CFGTom Rini1-7/+7
Perform a simple rename of CONFIG_MAX_MEM_MAPPED to CFG_MAX_MEM_MAPPED Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-12arm: mach-omap2: Move common image process functions out of board filesAndrew Davis4-60/+0
The functions board_fit_image_post_process() and board_tee_image_process() are not actually board specific (despite their names). Any board using the OMAP2 family can use these functions. Move them to boot-common.c. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-12-09board: ti: introduce the basic files needed to support the am62aBryan Brattlof4-0/+99
Introduce the bare minimum SD and UART support for the am62a sk. Signed-off-by: Bryan Brattlof <bb@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-12-06global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini2-5/+5
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-06global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini9-17/+17
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-02treewide: Remove the unnecessary space before semicolonBin Meng1-1/+1
%s/return ;/return; Signed-off-by: Bin Meng <bmeng@tinylab.org>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass1-1/+1
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-03Merge branch 'next'Tom Rini4-5/+5
2022-09-29treewide: Drop image_header_t typedefSimon Glass1-2/+2
This is not needed and we should avoid typedefs. Use the struct instead and rename it to indicate that it really is a legacy struct. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29board: ti: common: board_detect: Fix EEPROM read quirk for AM6 style dataNishanth Menon1-0/+10
The situation is similar to commit bf6376642fe8 ("board: ti: common: board_detect: Fix EEPROM read quirk"). This is seen on a variant of eeproms seen on some BeagleBone-AI64 which now has a mix of both 1 byte addressing and 2 byte addressing eeproms. Unlike the am335x (ti_i2c_eeprom_am_get) and dra7 (ti_i2c_eeprom_dra7_get) which use constant data structure which allows us to do a complete read of the data, the am6(ti_i2c_eeprom_am6_get) eeprom parse operation is dynamic. This removes the option of being able to read the complete eeprom data in one single shot. Fortunately, on the I2C bus, we do see the following behavior: In 1 byte mode, if we attempt to read the first header data yet again, the misbehaving 2 byte addressing device acts in constant addressing mode which results in the header not matching up and follow on attempt at 2 byte addressing scheme grabs the correct data. This costs us an extra ~3 milliseconds, which is a minor penalty compared to the consistent image support we need to have. Reported-by: Jason Kridner <jkridner@beagleboard.org> Fixes: a58147c2dbbf ("board: ti: common: board_detect: Do 1byte address checks first.") Signed-off-by: Nishanth Menon <nm@ti.com>
2022-09-23board_f: Fix types for board_get_usable_ram_top()Pali Rohár3-3/+3
Commit 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") changed type of ram_top member from ulong to phys_addr_t but did not changed types in board_get_usable_ram_top() function which returns value for ram_top. So change ulong to phys_addr_t type also in board_get_usable_ram_top() signature and implementations. Fixes: 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-31board: ti: common: board_detect: Fix EEPROM read quirkMatwey V. Kornilov1-18/+8
There are three different kinds of EEPROM possibly present on boards. 1. 1byte address. For those we should avoid 2byte address in order not to rewrite the data. Second byte of the address can potentially be interpreted as the data to write. 2. 2byte address with defined behaviour. When we try to use 1byte address they just return "FF FF FF FF ... FF" 3. 2byte address with undefined behaviour (for instance, 24LC32AI). When we try to use 1byte address, then their internal read pointer is changed to some value. Subsequential reads may be broken. To gracefully handle both case #1 and case #3 we read all required data from EEPROM at once (about 80 bytes). So either all the data is valid or we fallback to 2byte address. Cc: Nishanth Menon <nm@ti.com> Fixes: a58147c2dbbf ("board: ti: common: board_detect: Do 1byte address checks first.") Reference: https://lore.kernel.org/all/CAJs94Ebdd4foOjhGFu9Bop0v=B1US9neDLxfhgcY23ukgLzFOQ@mail.gmail.com/ Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> Acked-by: Nishanth Menon <nm@ti.com>
2022-07-25arm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654Andrew Davis1-2/+2
The first AM6x device was the AM654x, but being the first we named it just AM6, since more devices have come out with this same prefix we should switch it to the normal convention of using the full name of the first compatibility device the series. This makes what device we are talking about more clear and matches all the K3 devices added since. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-25board: ti: am65x: Do not disable SA2UL in DTAndrew Davis1-10/+0
This is no longer needed as the SA2UL can now be shared with Linux. Leave the SA2UL DT node enabled. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-25board: ti: am335x: Use correct dtbs for SanCloud boardsPaul Barker1-4/+14
We have different dtbs for the Lite and Extended WiFi variants of the SanCloud BBE. Signed-off-by: Paul Barker <paul.barker@sancloud.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-25board: ti: am335x: Enable spi0 bus on SanCloud BBE LitePaul Barker1-0/+5
The SanCloud BBE Lite has a Micron Authenta flash device connected to the spi0 bus. Signed-off-by: Paul Barker <paul.barker@sancloud.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-06board: ti: common: board_detect: Do 1byte address checks first.Nishanth Menon1-10/+10
Do 1 byte address checks first prior to doing 2 byte address checks. When performing 2 byte addressing on 1 byte addressing eeprom, the second byte is taken in as a write operation and ends up erasing the eeprom region we want to preserve. While we could have theoretically handled this by ensuring the write protect of the eeproms are properly managed, this is not true in case where board are updated with 1 byte eeproms to handle supply status. Flipping the checks by checking for 1 byte addressing prior to 2 byte addressing check prevents this problem at the minor cost of additional overhead for boards with 2 byte addressing eeproms. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-06board: ti: common: Handle the legacy eeprom address width properlyNishanth Menon1-7/+15
Due to supply chain issues, we are starting to see a mixture of eeprom usage including the smaller 7-bit addressing eeproms such as 24c04 used for eeproms. These eeproms don't respond well to 2 byte addressing and fail the read operation. We do have a check to ensure that we are reading the alternate addressing size, however the valid failure prevents us from checking at 1 byte anymore. Rectify the same by falling through and depend on header data comparison to ensure that we have valid data. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-06board: ti: common: Optimize boot when detecting consecutive bad recordsNishanth Menon1-1/+4
The eeprom data area is much bigger than the data we intend to store, however, with bad programming, we might end up reading bad records over and over till we run out of eeprom space. instead just exit when 10 consecutive records are read. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-06board: ti: am62x: Account for DDR size fixups if ECC is enabledGeorgi Vlaev1-0/+53
Call into k3-ddrss driver to fixup device tree and resize the available amount of DDR if ECC is enabled. A second fixup is required from A53 SPL to take the fixup as done from R5 SPL and apply it to DT passed to A53 U-boot, which in turn passes this to the OS. Signed-off-by: Georgi Vlaev <g-vlaev@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-06board: ti: am62x: Use fdt functions for ram and bank initGeorgi Vlaev1-9/+2
Use the appropriate fdtdec_setup_mem_size_base() call in dram_init() and fdtdec_setup_bank_size() in dram_bank_init() to pull these values from DT, where they are already available, instead of hardcoding them. Signed-off-by: Georgi Vlaev <g-vlaev@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-07-06board: ti: j721e: Return if there is an error while configuring SerDesAswath Govindraju1-10/+22
While configuring SerDes, errors could be encountered, in these cases, return instead of going ahead. This is will help in booting even if configuration of SerDes fails. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-06-29spl: Move SPL_LDSCRIPT defaults to one placeTom Rini4-15/+0
We want to keep all of the default values for SPL_LDSCRIPT in the same place both for overall clarity as well as not polluting unrelated config files. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-23linker_lists: Rename sections to remove . prefixAndrew Scull1-2/+2
Rename the sections used to implement linker lists so they begin with '__u_boot_list' rather than '.u_boot_list'. The double underscore at the start is still distinct from the single underscore used by the symbol names. Having a '.' in the section names conflicts with clang's ASAN instrumentation which tries to add redzones between the linker list elements, causing expected accesses to fail. However, clang doesn't try to add redzones to user sections, which are names with all alphanumeric and underscore characters. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-06-20Merge branch 'master' into nextTom Rini1-1/+1
Merge in v2022.07-rc5.
2022-06-16board: ti: am335x: eth_cpsw should depend on CONFIG_NETCorentin LABBE1-1/+1
The origin of this patch is the breaking of am335x-hs boot due to commit e41651fffda7 ("dm: Support parent devices with of-platdata") HS boards have less SRAM for SPL and so this commit increased memory usage beyond am335x limit. This commit added 10 driver binding pass and am335x boot only if one pass is done. SPL try to do more than one pass due to eth_cpsw failing. Since HS SPL does not need network (and NET is already disabled in config), the easiest fix is to "remove" eth_cpsw from SPL by testing if NET is enabled. Signed-off-by: Corentin LABBE <clabbe@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Andrew Davis <afd@ti.com>
2022-06-10configs: Add configs for AM62x SKVignesh Raghavendra1-0/+8
Add am62x_evm_r5_defconfig for R5 SPL and am62x_evm_a53_defconfig for A53 SPL and U-Boot support. To keep the changes to minimum. Only UART And SD boot related configs are included. This should serve as good starting point for new board bringup with AM62x. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> [trini: Migrate a number of CONFIG symbols, have re-tested] Tested-by: Georgi Vlaev <g-vlaev@ti.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-10board: ti: Introduce the basic files to support AM62 SK boardSuman Anna3-0/+106
Add basic support for AM62 SK. This has 2GB DDR. Note that stack for R5 SPL is in OCRAM @ 0x7000ffff so that is away from BSS and does not step on BSS section Add only the bare minimum required to support UART and SD. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-06-10ARM: omap3: evm: Power on MMC when setting up PMICDerald D. Woods1-7/+1
This commit copies the related code changes from the BeagleBoard. Reference: - https://source.denx.de/u-boot/u-boot/-/commit/848cfe098f59c47a2542385513fb554430b874d6 Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2022-06-10ti: j721e: enable hyperflash spl fixup for j721eVaishnav Achath1-3/+54
On j721e, its not possible to use OSPI0 and HBMC simultaneously as they are muxed within the Flash Subsystem hence disable HBMC by default and keep OSPI enabled. Bootloader will fixup DT when it detects HyperFlash mux selection instead of OSPI. Also updated detect_enable_hyperflash to use correct GPIO when checking hypermux selection state: * J7200 - hypermux sel connected to WKUP_GPIO0_6 * J721E - hypermux·sel·connected·to·WKUP_GPIO0_8 Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
2022-06-03board: ti: am64x: Update MAINTAINERSDave Gerlach1-1/+1
Move maintainership of TI AM64x boards to Vignesh. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2022-04-21board: ti: am335x: Add support for BBE Extended WiFiPaul Barker1-2/+8
The Sancloud BeagleBone Enhanced Extended WiFi (BBE Extended WiFi) has its own devicetree file and the board can be identified by the 2nd letter of the config string within the common EEPROM. Signed-off-by: Paul Barker <paul.barker@sancloud.com>
2022-04-21board: ti: am335x: Add BBE Lite supportPaul Barker1-2/+8
The Sancloud BeagleBone Enhanced Lite (BBE Lite) has its own devicetree file and the board can be identified by the 2nd letter of the config string within the common EEPROM. Signed-off-by: Paul Barker <paul.barker@sancloud.com>
2022-04-05board: ti: am64x: Account for DDR size fixups if ECC is enabledDave Gerlach1-2/+53
Call into k3-ddrss driver to fixup device tree and resize the available amount of DDR if ECC is enabled. A second fixup is required from A53 SPL to take the fixup as done from R5 SPL and apply it to DT passed to A53 U-boot, which in turn passes this to the OS. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2022-04-05board: ti: am64x: Use fdt functions for ram and bank initDave Gerlach1-7/+12
Use the appropriate fdtdec_setup_mem_size_base and fdtdec_setup_bank_size calls in dram_init and dram_bank_init to pull these values from DT, where they are already available, instead of hardcoding them. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2022-03-15Merge tag 'v2022.04-rc4' into nextTom Rini2-26/+28
Prepare v2022.04-rc4
2022-03-14board: ti: j721e: evm.c: Fix the probing of in Sierra SerDes0Aswath Govindraju1-15/+13
Initialization and power on operations of links have been moved under the link device in the Sierra SerDes driver. Also, the UCLASS of sierra_phy_provider has been changed to UCLASS_MISC. Therefore, fix the probing of SerDes0 instance accordingly. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Reviewed-by: Georgi Vlaev <g-vlaev@ti.com>
2022-03-10ARM: omap3_beagle: Power on MMC when setting up PMICRomain Naour1-7/+2
The PMIC enables power to the MMC card by default, but depending on the state it was left when restarted, it's possible the MMC may be powered down. This patch patch explicitly tells the twl4030 to power the MMC. Based on commits [1][2]. [1] 64fd2d26140aa72b43428d079974f7c0e7f88353 [2] 27b653449178e80b333e7bc5a81eed3bd1bd6861 Signed-off-by: Romain Naour <romain.naour@gmail.com>
2022-03-10ARM: omap3_beagle: Remove non-DM initializationRomain Naour1-7/+0
With DM_MMC working for both SPL and U-Boot, this patch removes the legacy style of initializing the MMC driver. Based on omap3_logic: 42140dd0962bc134c0aad27524d0f4cc3955f255. Signed-off-by: Romain Naour <romain.naour@gmail.com>
2022-03-04arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECTChristian Gmeiner1-11/+15
We only want to call do_board_detect() if CONFIG_TI_I2C_BOARD_DETECT is set. Same as done for am64. This makes it possible to add a custom am65 based board design to U-Boot that does not use this board detection mechanism. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2022-02-16board: ti: j721e: Add support for detecting multiple device treesSinthu Raja1-2/+14
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: Sinthu Raja <sinthu.raja@ti.com>
2022-02-16board: ti: j721e: Disable probing of daughtercardsSinthu Raja1-3/+6
j721e-sk doesn't have any daughter cards, so disable daughter card probing inside board_late_init() and spl_board_init() for j721e-sk. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2022-02-16board: ti: j721e: Add support to update board_name for j721e-skSinthu Raja1-0/+5
Update setup_board_eeprom_env() to choose the right board name for j721e-sk. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2022-02-16board: ti: j721e: Enable support for reading EEPROM at next alternate addressSinthu Raja1-3/+9
J721E EVM has EEPROM populated at 0x50. J721E SK has EEPROM populated at next address 0x51 in order to be compatible with RPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51. Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2022-02-16board: ti: j721e: Guard functions with right #ifdef to avoid build warningsSinthu Raja1-39/+41
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. Also, reorder these functions to place it under single #ifdef Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
2022-02-08board: ti: j721e: evm.c: Add support for probing SerDes0Aswath Govindraju1-0/+37
Add support for probing, initializing and powering, SerDes0 instance. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-08board: ti: j721s2: Add board support for J721S2David Huang4-0/+267
Add board support for J721S2 SoC. Signed-off-by: David Huang <d-huang@ti.com> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-01-19doc: replace @return by Return:Heinrich Schuchardt4-8/+8
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-16board: ti: am335x: Choose CPSW or PRUSS configuration based on jumper settingAmjad Ouled-Ameur1-0/+18
The am335x-ice-v2 board's Ethernet ports can be configured in 'MII' or 'RMII' mode to be connected to 'PRUSS' or 'CPSW' Ethernet subsystems. This patch sets the environment variable 'ice_mii' to 'mii' or 'rmii' accordingly. Based on that we choose the appropriate board devicetree i.e. 'am335x-ice-v2.dtb' or 'am335x-ice-v2-prueth.dtb'. Since there are 2 Ethernet ports with 2 modes, there can be 4 configurations but for now we consider both ports in different modes to be an invalid configuration and prevent boot in that case. Signed-off-by: Roger Quadros <rogerq@ti.com> [Amjad: use overlay instead of using new am335x-ice-v2-prueth.dtb] Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Make prueth_is_mii be marked __maybe_unused] Signed-off-by: Tom Rini <trini@konsulko.com>