summaryrefslogtreecommitdiffstats
path: root/board/ti/ks2_evm
Commit message (Collapse)AuthorAgeFilesLines
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-0713-26/+13
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini2018-04-273-6/+0
| | | | | | | | We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
* env: Fix missed getenv_ulong to env_get_ulong conversionAndrew F. Davis2018-02-231-1/+1
| | | | | | | | | This seems to have been missed, possibly due to the inability to enable TI_SECURE_DEVICE on Keystone2 devices previously. Fixes: bfebc8c965e4 ("env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()") Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add pinmux data for QSPI on K2G ICEVignesh R2018-02-071-0/+9
| | | | | | Add pinmux for QSPI pins on K2G ICE board. Signed-off-by: Vignesh R <vigneshr@ti.com>
* board: ti: k2g: Make ddr3* declarations as staticLokesh Vutla2018-01-191-5/+5
| | | | | | | | All ddr3_emif declarations are not used outside ddr3_k2g.c file. So make all of them as static. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ti: K2G FC SoC 1GHz and DDR3 1066 MT/s supportRex Chang2018-01-194-10/+85
| | | | | | | | | | | | | | | | | | | | Added support for K2G EVM with FlipChip SoC of which ARM/DDR3 runs at 1GHz/1066 MT/s. The patch is also backward compatible with old revision EVM and EVM with WireBond SoC. Their ARM/DDR3 run at 600MHz/800 MT/s. The new SoC supports 2 different speeds at 1GHz and 600MHz. Modyfied the CPU Name to show which SoC is used in the EVM. Modified the DDR3 configuration to reflect New SoC supports 2 different CPU and DDR3 speeds, 1GHz/1066MT and 600MHz/800MT. Added new inline function board_it_k2g_g1() for the new FlipChip 1GHz, and set the u-boot env variable board_name accordingly. Modified findfdt script in u-boot environment variable to include new k2g board type. Signed-off-by: Rex Chang <rchang@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* dts: renamed FIT_EMBED to MULTI_DTB_FIT and moved it to the dts KconfigJean-Jacques Hiblot2017-10-054-4/+4
| | | | | | | | | | | CONFIG_FIT_EMBED might be confused with CONFIG_OF_EMBED, rename it MULTI_DTB_FIT as it is able to get a DTB from a FIT image containing multiple DTBs. Also move the option to the Kconfig dedicated to the DTS options and create a README for this feature. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: k2g: Add FIT image handler for PMMC firmwareAndrew F. Davis2017-09-121-0/+21
| | | | | | | | The PMMC firmware should be bundled into a FIT image on HS devices to allow authentication/decryption, add a handler to process this PMMC firmware. Signed-off-by: Andrew F. Davis <afd@ti.com>
* env: Rename getenv/_f() to env_get()Simon Glass2017-08-161-6/+6
| | | | | | | | | | | We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* env: Rename setenv() to env_set()Simon Glass2017-08-161-2/+2
| | | | | | | | We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* board: ks2: README: Update NAND wordingCooper Jr., Franklin2017-08-111-2/+2
| | | | | | | | | | Traditional KS2 devices supported NAND via the AEMIF peripheral. However, 66AK2G doesn't use the AEMIF but rather the GPMC for NAND. Therefore, clarify some statements to indicate only certain devices have AEMIF and in other places just say NAND instead of AEMIF NAND Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Acked-by: Roger Quadros <rogerq@ti.com>
* ARM: k2g: Add K2G ICE DTB to the list of possible DTBsCooper Jr., Franklin2017-07-101-0/+2
| | | | | | | | | K2G ICE evm will have its own dtb. Therefore, add it to the list of dtbs located in the appended U-boot dtb FIT image. Therefore, when swapping out dtbs K2G ICE boards can grab the correct one. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Update board_name u-boot env variable at runtimeCooper Jr., Franklin2017-07-101-0/+6
| | | | | | | | | | | Enable CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG to allow "board_name" to be set depending on the board it is being ran on. Update findfdt to use this new dynamic board_name value to determine which dtb should be used. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Use board detection to wrap K2G GP specific callsCooper Jr., Franklin2017-07-101-6/+10
| | | | | | | | | Certain peripherals used by K2G GP aren't used on K2G ICE evm. Or configuration is slightly different. Therefore, use board detection to deal with these variations. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ks2: Use board detection to wrap code not specific to K2G ICE evmCooper Jr., Franklin2017-07-101-5/+9
| | | | | | | | Some code doesn't apply to K2G ICE evm. Therefore, use board detection to wrap these calls. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Add DDR3 configuration for K2G ICE evmCooper Jr., Franklin2017-07-101-2/+60
| | | | | | | | Add configuration settings used by the K2G ICE evm. Also use board detection to determine which DDR3 configuration to use. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Add pinmux support for K2G ICE evmCooper Jr., Franklin2017-07-102-1/+46
| | | | | | | | | | | | | | Add basic pinmux data for new K2G ICE evm. Also add pinmuxing for a generic K2G evm which includes I2C 0 and 1 used for board detection purposes. Since multiple K2G boards are supported that means initially generic pinmuxing should be used when board detection hasn't ran. Once board detection runs the proper pinmuxing can be reran to match the board being ran on. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ks2_evm: Add EEPROM based board detection helper functionsCooper Jr., Franklin2017-07-101-0/+20
| | | | | | | | | Add a function that can be used to determine if the board being ran on is a K2G Industrial Communication Engine EVM or K2G General Purpose EVM based on values programmed on the EEPROM. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Program DDRPHY_DATX8 registers via mask and value variablesCooper Jr., Franklin2017-07-101-0/+14
| | | | | | | | | | Different K2G evms may need to program the various KS2_DDRPHY_DATX8_X_OFFSET registers in different ways. Therefore, use the mask and val registers for each KS2_DDRPHY_DATAX_X_OFFSET to properly program the register. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Program DDR PHY MR2 register with the default valueCooper Jr., Franklin2017-07-101-1/+1
| | | | | | | | | | | K2G GP doesn't require the MR2 register to be programed since the default is good enough. However, newer K2G boards do need to change this register value. Therefore, instead of not writing this register if ran on a K2G board just program the value to be written to match the default/reset value. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ks2_evm: Add EEPROM based board detectionCooper Jr., Franklin2017-07-102-21/+24
| | | | | | | | | | | | | Some K2G evms have their EEPROM programming while most do not. Therefore, add EEPROM board detection to be used as the default method and fall back to the alternative board detection when needed. Also reorder board configuration. Perform bare minimal configuration initially since board detection hasn't ran. Finish board configuration once the board has been identified. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: Define board_fit_config_name_match for Keystone 2 boardsCooper Jr., Franklin2017-07-104-0/+44
| | | | | | | | | Now with support for U-boot runtime dtb selection each board needs to define board_fit_config_name_match so U-boot can determine what the correct dtb is within the FIT blob. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Define embedded_dtb_select for runtime DTB selection in U-bootCooper Jr., Franklin2017-07-102-0/+45
| | | | | | | | | | | | | | | | For K2G, runtime DTB selection utilizes the embedded_dtb_select function. Therefore, define the function which will perform a EEPROM read and then retries selecting the correct dtb now that it can detect which board its on. For other Keystone devices use an empty function since they will still use the embedded FIT functionality but their FIT will only contain a single dtb. Most production K2G boards do not have their EEPROM programmed. Therefore, perform a test to verify a K2G GP is currently being used and if it is then set the values normally set by a EEPROM read. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Fix passing main pll info for higher speedsLokesh Vutla2017-06-051-8/+8
| | | | | | Main pll is marked as arm plls for higher speeds. Fix this. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* mmc: replace CONFIG_GENERIC_MMC with CONFIG_MMCMasahiro Yamada2017-05-151-1/+1
| | | | | | | | | | | Now CONFIG_GENERIC_MMC and CONFIG_MMC match for all defconfig. We do not need two options for the same feature. Deprecate the former. This commit was generated with the sed script 's/GENERIC_MMC/MMC/' and manual fixup of drivers/mmc/Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: keystone2: Add support for getting external clock dynamicallyLokesh Vutla2017-05-084-22/+110
| | | | | | | | | | One some keystone2 platforms like K2G ICE, there is an option to switch between 24MHz or 25MHz as sysclk. But the existing driver assumes it is always 24MHz. Add support for getting all reference clocks dynamically by reading boot pins. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: Add support for dynamic programming of PLL based on SYSCLKLokesh Vutla2017-05-081-21/+95
| | | | | | | | | | K2G supports various sysclk frequencies which can be determined using sysboot pins. PLLs should be configured based on this sysclock frequency. Add PLL configurations for all supported sysclk frequencies. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: k2g: setup PRU ethernet MAC addressesRoger Quadros2017-03-201-0/+19
| | | | | | | | | | PRU ethernet MAC address range is present in the board EEPROM. Parse it and setup eth?addr environment variables. Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: Use Kconfig for board EEPROM's I2C bus and chip addressRoger Quadros2017-03-201-0/+2
| | | | | | | | | In stead of defining the board EEPROM address in the board headers let's define them in the board config files and make them configurable by Kconfig. Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ti: boot: Register the MMC controllers in SPL in the same way as in u-bootJean-Jacques Hiblot2017-03-191-1/+1
| | | | | | | | | | | | 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>
* keystone2: Move target selection to KconfigAndrew F. Davis2016-11-281-9/+9
| | | | | | | | | The config option TARGET_K2x_EVM is set by the k2x defconfigs to pick a board target, but the header configs also set K2x_EVM. This config is redundant, remove it and use TARGET_K2x_EVM everywhere in its place. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Update PLL Multiplier and divider valuesLokesh Vutla2016-11-131-1/+1
| | | | | | | | | | | Only a certain set of PLLM/D values are recommended to configure the DDR at the required speeds for a given clock input frequency. Updating these values as specified in Data Sheet[1] Table 5-18 [1] http://www.ti.com/lit/ds/symlink/66ak2g02.pdf Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ks2: Enable ECC using detected DDR sizeLokesh Vutla2016-10-011-0/+3
| | | | | | | | | EEC is being enabled based on the ddr size populated by SPD data. But not all keystone platforms have SPD data to detect ddr3 size. So, enable ECC using the detected DDR size. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ks2: README: Update to add K2G supportLokesh Vutla2016-09-071-10/+30
| | | | | | | | | | | Update the README to add support for K2G EVM. Also - Add steps on how to use MMC boot - Fix load address when using CCS - Update build target to u-boot.bin from u-boot-dtb.bin as all ks2 platforms uses DT. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Configure reset mux to device resetLokesh Vutla2016-06-021-0/+16
| | | | | | | | | | | | | | | | | BOOTCFG_RSTMUX8 register controls the reset mux associated with the ARM. Timer5(dedicated to ARM) when used as WatchDog timer, the events it generates are routed to the above mux. Following are the 3 events that can controlled bt the reset mux: - Device Reset - An interrupt to the ARM_GIC - An interrupt to the ARM_GIC followed by a device reset. Right now to give a default watchdog behaviour "Device reset" is being selected. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Acked-by: Nishanth Menon <nm@ti.com>
* Delete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUPRobert P. J. Day2016-05-271-2/+2
| | | | | | | | | | | | | | | | Since CONFIG_OF_BOARD_SETUP depends on CONFIG_OF_LIBFDT: config OF_BOARD_SETUP bool "Set up board-specific details in device tree before boot" depends on OF_LIBFDT ... remove superfluous tests of CONFIG_OF_LIBFDT when testing for CONFIG_OF_BOARD_SETUP. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> [trini: Typo fix: s/ifdefi/ifdef/] Signed-off-by: Tom Rini <trini@konsulko.com>
* memory: Move TI_AEMIF config to KCONFIGLokesh Vutla2016-04-181-0/+5
| | | | | | | | | | Not all Keystone2 devices has AEMIF NAND controller. So adding Kconfig entry for CONFIG_TI_AEMIF and enabling it in respective defconfigs on platforms with AEMIF controller. Reported-by: Nishanth Menon <nm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ti: k2g: increase phy autoneg timeoutVitaly Andrianov2016-03-221-1/+1
| | | | | | | | After power cycle of a K2G EVM dhcp fails due to a auto-negotiation timeout. This commit increases the timeout to fix the issue. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: use detected ddr3a sizeVitaly Andrianov2016-03-141-3/+1
| | | | | | | | | | | | | | | | | | | Because KS2 u-boot works in 32 bit address space the existing ram_size global data field cannot be used. The maximum, which the get_ram_size() can detect is 2GB only. The ft_board_setup() needs the actual ddr3 size to fix up dtb. This commit introduces the ddr3_get_size() which uses SPD data to calculate the ddr3 size. This function replaces the "ddr3_size" environment variable, which was used to get the SODIMM size. For platforms, which don't have SODIMM with SPD and ddr3 is populated to a board a simple ddr3_get_size function that returns ddr3 size has to be implemented. See hardware-k2l.h Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: use SPD info to configure K2HK and K2E DDR3Vitaly Andrianov2016-03-145-260/+62
| | | | | | | | | | | | | | This commit replaces hard-coded EMIF and PHY DDR3 configurations for predefined SODIMMs to a calculated configuration. The SODIMM parameters are read from SODIMM's SPD and used to calculated the configuration. The current commit supports calculation for DDR3 with 1600MHz and 1333MHz only. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: K2G: Add support for different arm/device speedsLokesh Vutla2016-03-141-4/+46
| | | | | | | | | | The maximum device and arm speeds can be determined by reading EFUSE_BOOTROM register. As there is already a framework for reading this register, adding support for all possible speeds on k2g devices. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: keystone2: Allow for board specific speed definitionsLokesh Vutla2016-03-143-5/+5
| | | | | | | | | | Its not compulsory that speed definition should be same on EFUSE_BOOTROM register for all keystone 2 devices. So, allow for board specific speed definitions. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board: ti: ks2_evm: remove board_eth_init when CONFIG_DM_ETH is definedMugunthan V N2016-02-081-0/+2
| | | | | | | | remove board_eth_init when CONFIG_DM_ETH is defined Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* Use correct spelling of "U-Boot"Bin Meng2016-02-061-17/+17
| | | | | | | | | | Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
* ARM: k2g: Add config fileLokesh Vutla2015-10-221-0/+2
| | | | | | | | Add config file for k2g Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
* ARM: k2g: Enable SPI flashLokesh Vutla2015-10-221-0/+6
| | | | | | | GPIO1_9 controls SPI flash on k2g evm. So make GPIO1_9 as output pin, inorder to use SPI. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: add SD card and eMMC supportRoger Quadros2015-10-221-0/+16
| | | | | | | | Add MMC support for k2g Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
* ARM: k2g: Add Ethernet SupportVitaly Andrianov2015-10-222-0/+24
| | | | | | | | Add Ethernet support for tftp support Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* driver: net: keystone_net: fix phy mode configurationMugunthan V N2015-10-223-0/+16
| | | | | | | | | | Phy mode is a board property and it can be different between multiple board and ports, so it should not be hardcoded in driver to one specific mode. So adding a field in eth_priv_t structure to pass phy mode to driver. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ARM: k2g: Add pin mux dataVitaly Andrianov2015-10-222-0/+316
| | | | | | | Add pin mux data for k2g-evm Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>