summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2
AgeCommit message (Collapse)Author
2017-06-23ti816x: Add additional boot device detection logicTom Rini
It has been observed that between PG1.0 and PG2.0/2.1 depending on which device we boot from, we may see a different value here than is documented in the TRM. Update the values for NAND and MMC1 based on real life usage on each revision. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-16arm: mach-omap2: Generate MLO file from SD boot capable targetsAndrew F. Davis
Secure boot targets that can be loaded from an SD card FAT partition need to be called "MLO" on the filesystem, make a copy with this name to clarify the correct image for SD card booting. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-06-12omap: Add routine for setting fastboot variablesSemen Protsenko
This patch reuses new option, which allows us to expose variables from environment to "fastboot getvar" command. Those variables must be of "fastboot.%s" format. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-06-10arm: omap: Unify get_device_type() functionSemen Protsenko
Refactor OMAP3/4/5 code so that we have only one get_device_type() function for all platforms. Details: - Add ctrl variable for AM33xx and OMAP3 platforms (like it's done for OMAP4/5), so we can obtain status register in common way - For now ctrl structure for AM33xx/OMAP3 contains only status register address - Run hw_data_init() in order to assign ctrl to proper structure - Remove DEVICE_MASK and DEVICE_GP definitions as they are not used (DEVICE_TYPE_MASK and GP_DEVICE are used instead) - Guard structs in omap_common.h with #ifdefs, because otherwise including omap_common.h on non-omap4/5 board files breaks compilation Buildman script was run for all OMAP boards. Result output: arm: (for 38/616 boards) all +352.5 bss -1.4 data +3.5 rodata +300.0 spl/u-boot-spl:all +284.7 spl/u-boot-spl:data +2.2 spl/u-boot-spl:rodata +252.0 spl/u-boot-spl:text +30.5 text +50.4 (no errors to report) Tested on AM57x EVM and BeagleBoard xM. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> [trini: Rework the guards as to not break TI81xx] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-10am33xx: Finish migration of CONFIG_AM33XX/AM43XXTom Rini
Almost all users of CONFIG_AM33XX/AM43XX have been migrated. Finish moving the last few over to Kconfig, and put all of the boards under the appropriate Kconfig chocie now. This board choice is non-optional, so remove that keyword on am33xx. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-05arm: Include asm/setup.h explictlySimon Glass
Include this header where needed so we do not need to rely on common.h. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05t81xx: Migrate TI81XX/TI816X/TI814X symbols to KconfigTom Rini
The symbol CONFIG_TI81XX is used for the parts that are common to the TI816x and TI814x SoCs and are not part of CONFIG_ARCH_OMAP2PLUS nor CONFIG_AM33XX. It however has so few uses that we can just modify the code to check for both and drop the symbol. The symbols CONFIG_TI816X and CONFIG_TI814X are for the repective SoCs. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-05ti816x: Rework DDR initialization sequenceTom Rini
The ti816x/am389x SoC is the first generation in what U-Boot calls the "am33xx" family. In the first generation of this family the DDR initialization sequence is quite different from all of the subsequent generations. Whereas with ti814x (second generation) we can easily work the minor differenced between that and am33xx (third generation), our attempts to do this for ti816x weren't sufficient. Rather than add a large amount of #ifdef logic to make this different sequence work we add a new file, ti816x_emif4.c to handle the various required undocumented register writes and sequence and leverage what we can from arch/arm/mach-omap2/am33xx/ddr.c still. As DDR2 has similar problems today but I am unable to test it, we drop the DDR2 defines from the code rather than imply that it works by leaving it. We also remove a bunch of other untested code about changing the speed the DDR runs at. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15omap: Drop CONFIG_OMAP_VC_I2C_HS_MCODETom Rini
The symbol CONFIG_OMAP_VC_I2C_HS_MCODE always uses the default value. Restructure the comment and code such that if a need arises later to use another value we can address this then. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15omap3: Migrate CONFIG_OMAP3_GPIO_X to KconfigTom Rini
The symbols CONFIG_OMAP3_GPIO_X control if we enable the clocks for a given GPIO bank in U-Boot. select the required banks for each target. In some cases we need to also migrate from CONFIG_USB_EHCI (deprecated, in include/configs/) to CONFIG_USB_EHCI_HCD as we only require the GPIO bank to be enabled if USB is also enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15omap5: Migrate CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC to KconfigTom Rini
While in theory this value could be used in places outside of "omap5" (such as OMAP4), we only make use of it today in OMAP5, so place the Kconfig entry there. Given that Kconfig lets us provide a default, we drop CONFIG_DEFAULT_OMAP_RESET_TIME_MAX_USEC entirely. The contents of doc/README.omap-reset-time make a good help entry, so adjust them slightly and delete the file. Move the comment about range to where we use the value now, and have Kconfig enforce the upper bound. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-12arm: amx3xx: Add support for early debugLokesh Vutla
For early debug, the following configs needs to be enabled: CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_OMAP=y CONFIG_DEBUG_UART_BASE=0x44e09000 CONFIG_DEBUG_UART_CLOCK=48000000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_DEBUG_UART_ANNOUNCE=y Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-12arm: omap5+: Add support for early debugLokesh Vutla
For early debug, the following configs needs to be enabled: CONFIG_DEBUG_UART=y CONFIG_DEBUG_UART_OMAP=y CONFIG_DEBUG_UART_CLOCK=48000000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_DEBUG_UART_ANNOUNCE=y For DRA7xx: CONFIG_DEBUG_UART_BASE=0x4806a000 For AM57xx: CONFIG_DEBUG_UART_BASE=0x48020000 Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-12arm: am33xx: Add support for mulitiple PLL input frequenciesLokesh Vutla
am335x supports various sysclk frequencies which can be determined using sysboot pins. PLLs should be configures based on this sysclk frequency. Add PLL configurations for all supported frequencies. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-12arm: am33xx: Fix MPU opp selectionLokesh Vutla
Update MPU frequencies and voltages as per the latest DM[1] dated: OCT 2011 Revised APRIL 2016, Section 5.4. Below is the consolidated data: MPU values for PG 2.0 and later(Package ZCZ and ZCE): ------------------------------------------------------- | | ZCZ | ZCE | |-------------------------------------------------------| | | VDD[V] | ARM [MHz] | VDD[V] | ARM [MHz] | |-------|----------|------------|----------|------------| | NITRO | 1.325 | 1000 | NA | NA | |-------|----------|------------|----------|------------| | TURBO | 1.26 | 800 | NA | NA | |-------|----------|------------|----------|------------| |OPP120 | 1.20 | 720 | NA | NA | |-------|----------|------------|----------|------------| |OPP100 | 1.10 | 600 | 1.10 | 600 | |-------|----------|------------|----------|------------| | OPP50 | 0.95 | 300 | 0.95 | 300 | ------------------------------------------------------- There is no eFuse blown on PG1.0 Silicons due to which there is no way to detect the maximum frequencies supported. So default to OPP100 for which both frequency and voltages are common on both the packages. [1] http://www.ti.com/lit/ds/symlink/am3356.pdf Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-12configs: convert CONFIG_SYS_MPUCLK to KconfigLokesh Vutla
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-12arm: am335x: Enable tiny printf in SPLLokesh Vutla
am335x_evm SPL is very close to its limit in SRAM space. Switch to use tiny printf to reclaim some size. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-05-12configs: am335x_evm: Enable SPL_DMLokesh Vutla
Enable SPL_DM on all AM335x based TI platforms. http://patchwork.ozlabs.org/patch/751300/ Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-05-12configs: am335x_evm: Use omap2 generic spl load scriptLokesh Vutla
No reason to use a separate load script for am33xx than using omap-common load script. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-12arch: arm: omap: Declare size of ddr very earlyLokesh Vutla
Declare the size of ddr very early in spl, so that this can be used to enable cache. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Ravi Babu <ravibabu@ti.com>
2017-05-10power: twl4030: Move CONFIG_TWL4030_POWER to KconfigAdam Ford
As requested, I added the CONFIG_TWL4030_POWER to Kconfig and made it the implied default when selecting OMAP34XX as a platform. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-08igep003x: Add support for IGEP SMARC AM335xPau Pajuelo
The IGEP SMARC AM335x is an industrial processor module with following highlights: o AM3352 TI processor (Up to AM3359) o Cortex-A8 ARM CPU o SMARC form factor module o Up to 512 MB DDR3 SDRAM / 512 MB FLASH o WiFi a/b/g/n and Bluetooth v4.0 on-board o Ethernet 10/100/1000 Mbps and 10/100 Mbps controller on-board o JTAG debug connector available o Designed for industrial range purposes Signed-off-by: Pau Pajuelo <ppajuelo@iseebcn.com> Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Tested-by: Pau Pajuelo <ppajuel@gmail.com>
2017-05-08igep0033: Rename to igep003xLadislav Michl
Rename igep0033 to igep003x as IGEP SMARC AM335x module (igep0034) can use the same source files. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Tested-by: Pau Pajuelo <ppajuel@gmail.com>
2017-05-08arm: dra7xx: move CONFIG_DRA7XX to KconfigUri Mashiach
The symbol CONFIG_DRA7XX is needed for Kconfig conditions. Cc: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-27ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate KconfigMasahiro Yamada
In Linux, CONFIG_ARCH_OMAP2PLUS is used for OMAP2 or later SoCs. Rename CONFIG_ARCH_OMAP2 to CONFIG_ARCH_OMAP2PLUS to follow this naming. Move the OMAP2+ board/SoC choice down to mach-omap2/Kconfig to slim down the arch/arm/Kconfig level. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-27OMAP3: Correct name of omap34xx_gpios when using DM_GPIOAdam Ford
The name of the gpio bank under DM_GPIO appear to be a copy-paste error. This changes the name of the gpio bank from am33xx_gpios to omap34xx_gpios. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-18arm: omap-common: add missing va_end()xypron.glpk@gmx.de
Each call of va_start must be matched by a call of va_end. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-15arm: omap: sata: compile out board-level sata code when CONFIG_DM_SCSI is ↵Jean-Jacques Hiblot
defined When CONFIG_DM_SCSI is defined, the SATA initialization will be implemented in the scsi-uclass driver. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-15arm: omap: sata: move enable sata clocks to enable_basic_clocks()Mugunthan V N
All the clocks which has to be enabled has to be done in enable_basic_clocks(), so moving enable sata clock to common clocks enable function. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-09arm: mach-omap2: Add secure image name common to OMAP and keystoneMadan Srinivas
As K2 can directly boot U-Boot, add u-boot_HS_MLO as the secure image name for secure K2 devices, for all boot modes other than SPI flash. Signed-off-by: Madan Srinivas <madans@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-04-09arm: mach-omap2: Enable Kconfig support for K2 HS devicesVitaly Andrianov
Like the OMAP54xx, AM43xx, & AM33xx family SoCs, the keystone family of SoCs also have high security enabled models. Allow K2E devices to be built with HS Device Type Support. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Madan Srinivas <madans@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-04-09ti: clocks: Fix do_enable_clocks() to accept NULL pointers as input parametersLukasz Majewski
Up till this commit passing NULL as input parameter was allowed, but not handled properly. When one passed NULL to one of this function parameters, the code was executed causing data abort. However, what is more interesting, the abort was not caught because of code execution in HYP mode with masked CPSR A bit ("Imprecise Data Abort mask bit). The TI's AM57xx SoC switch to HYP mode with A bit masked in lowlevel_init.S due to SMC call. Such operation (by default) is performed in SoC ROM code. The problem would pop up when one: - Switch back to SVC mode after disabling LPAE support - Somebody enables A bit (by executing cpsie a asm instruction) and then the previously described exception would be caught. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-04-05board_f: Drop setup_dram_config() wrapperSimon Glass
By making dram_init_banksize() return an error code we can drop the wrapper. Adjust this and clean up all implementations. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-03-21ARM: AM43xx: Enable DM_I2C/SPI/ETHLokesh Vutla
Enable DM_I2C/SPI/ETH for all AM43XX based boards. Enable it using imply keyword so that a user can disable this when not needed. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-21ARM: OMAP2+: define _image_binary_end to fix SPL_OF_CONTROLLokesh Vutla
To make SPL_OF_CONTROL work on OMAP2+ SoCs, _image_binary_end must be defined in the linker script along with CONFIG_SPL_SEPARATE_BSS. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-20ARM: am43xx: fix SOC revision print outsTero Kristo
Currently, AM43xx just re-uses the version strings from AM33xx which is wrong; the actual values for AM43xx are different. Fix this by adding a separate version string array for AM43xx and use this instead. Signed-off-by: Tero Kristo <t-kristo@ti.com> Reported-by: Sekhar Nori <nsekhar@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20ti: boot: Register the MMC controllers in SPL in the same way as in u-bootJean-Jacques Hiblot
To keep a consistent MMC device mapping in SPL and in u-boot, let's register the MMC controllers the same way in u-boot and in the SPL. In terms of boot time, it doesn't hurt to register more controllers than needed because the MMC device is initialized only prior being accessed for the first time. Having the same device mapping in SPL and u-boot allows us to use the environment in SPL whatever the MMC boot device. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2017-03-15arm: omap3: Bring back ARM errata workaround 725233Siarhei Siamashka
The workaround for ARM errata 725233 had been lost since commit 45bf05854bc94e (armv7: adapt omap3 to the new cache maintenance framework). Bring it back in order to avoid very difficult to reproduce, but actually encountered in the wild CPU deadlocks when running software rendered X11 desktop on OMAP3530 hardware. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Migrate to Kconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-15arm: omap3: Compile clock.c with -marm option to unbreak OMAP3530Siarhei Siamashka
Boards with OMAP3530 SoC fail to boot since commit bd2c4522c26d5 ("ti: armv7: enable EXT support in SPL (using ti_armv7_common.h)") because it enabled the use of Thumb2 for the SPL. Experiments have shown that the deadlock happens in the prcm_init() function from 'arch/arm/mach-omap2/omap3/clock.c'. This patch enforces the compilation of clock.c source file in ARM mode and makes the deadlock disappear. We are yet to figure out the root cause of the problem. Still this is somewhat better than having non-bootable boards for years. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-12arm: omap-common: Fix typo in CONFIG_OMAP54XX guardMatthijs van Duin
Some initialization was unintentionally being skipped on omap5. Fixes: f5af0827f276 ("arm: omap-common: Guard some parts of the code with CONFIG_OMAP44XX/OMAP54XX") Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-12arm: OMAP2+: nandecc: propagate error to command return statusLadislav Michl
Currently nandecc returns zero even if underlaying omap_nand_switch_ecc function fails. Fix that by propagating error returned to command return value. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-10omap4: Migrate to using implyTom Rini
Move the default y options under arch/arm/mach-omap2/omap4/Kconfig to be using imply instead in arch/arm/Kconfig Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-10omap3: Migrate to using implyTom Rini
Move the default y options under arch/arm/mach-omap2/omap3/Kconfig to be using imply instead in arch/arm/Kconfig Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-10TI: Migrate board/ti/common/Kconfig to implyTom Rini
The option that we had set in board/ti/common/Kconfig as default y are best done with imply under the appropriate main Kconfig option instead. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-10am335x_evm: Switch to using imply keywordTom Rini
These particular SPL options are part of what the ROM provides, but for compatibility with how we have previously used them, move them to being implied by the board being selected. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-02-27arm: mach-omap2: Flush cache after FIT post-processing imageAndrew F. Davis
After we authenticate/decrypt an image we need to flush the caches as they may still contain bits of the encrypted image. This will cause failures if we attempt to jump to this image. Reported-by: Yogesh Siraswar<yogeshs@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-02-17arm: omap5: Fix generation of reserved-memory DT nodeAndrew F. Davis
When the node 'reserved-memory' is not defined in the DT we fail to add needed properties. We also fail to move 'offs' to point to the new node. Fix these here. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-01-28arm: omap3: Update cpuinfo for DM3730, DM3725, AM3715, and AM3703Adam Ford
The check for OMAP3630/3730 only checks for 800MHz 3630/3730, but anything else is lumped into 36XX/37XX with an assumed 1GHz speed. Based on the DM3730 TRM bit 9 shows the MPU Frequency (800MHz/1GHZ). This also adds the ability to distinguish between the DM3730, DM3725, AM3715, and AM3703 and correctly display their maximum speed. Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Ladislav Michl <ladis@linux-mips.org>
2017-01-28arm: omap3: Fix cpuinfo frequency spellingLadislav Michl
Frequency is measured in Hz. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-01-28board/chiliboard: Add support for chiliBoardMarcin Niestroj
chiliBoard is a development board which uses chiliSOM as its base. Hardware specification: * chiliSOM (TI AM335x, DRAM, NAND) * Ethernet PHY (id 0) * USB host (usb1) * MicroSD slot (mmc0) Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Reviewed-by: Tom Rini <trini@konsulko.com>