keystone-linux/u-boot.git
4 years agovsprintf.c: Always enable CONFIG_SYS_VSNPRINTF master
Tom Rini [Thu, 14 Jan 2016 18:02:03 +0000 (13:02 -0500)]
vsprintf.c: Always enable CONFIG_SYS_VSNPRINTF

Enabling this function always removes some class of string saftey issues.
The size change here in general is about 400 bytes and this seems a reasonable
trade-off.

Cc: Peng Fan <peng.fan@nxp.com>
Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Adrian Alonso <aalonso@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michael Scherban <m-scherban@ti.com>
4 years agokeystone2: enable glitchless bypass for K2L devices
Michael Scherban [Mon, 3 Oct 2016 14:33:33 +0000 (09:33 -0500)]
keystone2: enable glitchless bypass for K2L devices

Enable the glitchless bypass mux for K2L devices.

The field has relocated between devices.

Signed-off-by: Michael Scherban <m-scherban@ti.com>
4 years agokeystone2: enable ARM glitchless bypass before programming PLL
Michael Scherban [Fri, 22 Jul 2016 15:24:42 +0000 (10:24 -0500)]
keystone2: enable ARM glitchless bypass before programming PLL

Revision to the ARM PLL programming sequence to enable the glitch-free
bypass clock mux before bypass is enabled, and to disable it after
bypass is released.

Additional update to the comments and style to match the MAIN and other
PLL sequences.

Signed-off-by: Michael Scherban <m-scherban@ti.com>
4 years agokeystone: net: Force poweroff of NetCP domains
Michael Scherban [Wed, 1 Jun 2016 21:47:00 +0000 (17:47 -0400)]
keystone: net: Force poweroff of NetCP domains

It has been observed on Ethernet primary boots that the PA can become
stuck in a transitional state when attempting to power down in U-boot.
This will cause a device lock-up on a following register access to the
NetCP.

The bad state is possibly due to traffic not being stopped before
the channel is torn down in the RBL. This could cause a partial packet
caught in the PA to keep it alive and prevent the PSC state machine
from shutting it down.

Since the NetCP domains are being shut down in this section of U-boot,
set the FORCE bit of the PSC and disable reset isolation so they will
unconditionally shutdown. This will ensure a partial packet cannot hold
the PA domain in a transitional state.

In other cases where the channel tear down sequencing is correct this
error is not observed. The kernel contains the proper ordering.

Signed-off-by: Michael Scherban <m-scherban@ti.com>
4 years agokeystone2: fix typo in divider programming sequence
Michael Scherban [Thu, 23 Jun 2016 21:12:00 +0000 (17:12 -0400)]
keystone2: fix typo in divider programming sequence

This fixes a typo in the PLL initialization sequence that causes PLLDIV5
to be disabled due to the setting of bit 19 instead of bit 15.
PLLDIV5 is required for normal operation.

Signed-off-by: Michael Scherban <m-scherban@ti.com>
5 years agoks2: remove global variables from ddr3 initialization K2_UBOOT_2013_01_15.07_01
Vitaly Andrianov [Mon, 13 Jul 2015 14:21:36 +0000 (10:21 -0400)]
ks2: remove global variables from ddr3 initialization

The ddr3 spd initialization API uses several global variables. This
variables are used before u-boot relocated to DDR3, which may corrupt
dynamic symbol relocation table.

This patch replaced the global variables by local ones.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
5 years agok2e: fix get_ddr_seg_num function K2_UBOOT_2013_01_15.07
Vitaly Andrianov [Wed, 8 Jul 2015 14:45:43 +0000 (10:45 -0400)]
k2e: fix get_ddr_seg_num function

The get_ddr_seg_num() has to return the number of 4KB segments of the
entire DDR3 memory installed to the board. Instead it returned the constant
number of segments for the default 2GB SODIMM. That causes that not entire
DDR3 memory is erased during ECC initialization.

This patch fixes the issue.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
5 years agokeystone2: set uinitrd_fixup env variable by default
Vitaly Andrianov [Wed, 10 Jun 2015 12:03:40 +0000 (08:03 -0400)]
keystone2: set uinitrd_fixup env variable by default

This variable was added for newer kernels that do not require the dt fixup.
Since our releases are based on older kernels this is a required variable.

Set this environment variable by default.

Signed-off-by: Michael Scherban <m-scherban@ti.com>
Acked-By: Murali Karicheri <m-karicheri2@ti.com>
5 years agokeystone: net: workaround to resolve a PA RX path issue
Vitaly Andrianov [Fri, 5 Jun 2015 13:47:36 +0000 (09:47 -0400)]
keystone: net: workaround to resolve a PA RX path issue

The workaround fixes a PA related RX path issue in the Ethernet boot mode
by turning off the PA/CPGMAC/CRYPTO clock domains and enabling the clock
domains again. streaming switch and PA pkt DMA channels need to be reset
before turning off the clock domains.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Conflicts:
drivers/net/keystone_net.c

6 years agoks2: use ddr3a_size variable to limit detected ddr3a size
Vitaly Andrianov [Wed, 25 Mar 2015 12:28:51 +0000 (08:28 -0400)]
ks2: use ddr3a_size variable to limit detected ddr3a size

This commit allows to limit detected 8GB DDR3A size to 4GB and upper 4GB
not visible for Linux. The limit works only if detected size is 8GB and
ddr3a_size environment variable set to 4.

This commit is not for upstream.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agoRevert "k2hk: enable CONFIG_MCAST_TFTP for k2hk evm" K2_UBOOT_2013_01_15.02_02
Murali Karicheri [Wed, 11 Mar 2015 19:14:07 +0000 (15:14 -0400)]
Revert "k2hk: enable CONFIG_MCAST_TFTP for k2hk evm"

This reverts commit c94f4e4cc6ce4b4204da0f2929e08a5ddfe41e4a.

Conflicts:

include/configs/k2hk_evm.h

6 years agoks2: post: add delay to starting POST
WingMan Kwok [Tue, 10 Mar 2015 18:31:43 +0000 (14:31 -0400)]
ks2: post: add delay to starting POST

Adds 3 secs delay to the starting of POST.  Hit any
key to stop POST within these 3 secs will stop POST
from starting even when POST is enabled in u-boot env.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agoks2: post: only initialize sgmii for 1G ports in loopback test
WingMan Kwok [Mon, 9 Mar 2015 12:29:01 +0000 (08:29 -0400)]
ks2: post: only initialize sgmii for 1G ports in loopback test

POST does not perform loopback test on 10G ports.  Hence initialize sgmii
for 1G ports only in loopback test.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone2: restore previous i2c bus number
WingMan Kwok [Fri, 6 Mar 2015 21:49:28 +0000 (16:49 -0500)]
keystone2: restore previous i2c bus number

After checking over i2c bus whether 10G break-out-card
exists or not, restore the previous i2c bus number as
a courtesy.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agoks2: post: fix eeprom test hang issue K2_UBOOT_2013_01_15.02_01
Vitaly Andrianov [Fri, 6 Mar 2015 16:40:31 +0000 (11:40 -0500)]
ks2: post: fix eeprom test hang issue

The post_test_eeprom uses common eeprom_read(), which doesn't support
multibus I2C API. It assumes that bus is always 0. If someone previously
set I2C bus to not 0, it causes the test to hang.

This patch sets the I2C bus to 0.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agok2e: use SPD data to configure K2E DDR3 K2_UBOOT_2013_01_15.02
Vitaly Andrianov [Thu, 29 Jan 2015 18:50:49 +0000 (13:50 -0500)]
k2e: use SPD data to configure K2E DDR3

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: use SPD info to configure K2HK DDR3A
Vitaly Andrianov [Thu, 29 Jan 2015 15:34:00 +0000 (10:34 -0500)]
keystone2: use SPD info to configure K2HK DDR3A

This commit replaces hard-coded EMIF and PHY DDR3A 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>
6 years agokeystone2: use detected ddr3a size
Vitaly Andrianov [Thu, 29 Jan 2015 18:28:31 +0000 (13:28 -0500)]
keystone2: use detected ddr3a size

When u-boot configures ddr3a controller it sets the global data
ddr3_size variable. This patch uses this variable instead of the
ddr3a_size environment variable.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone: srss: add env variable to support SRSS VCNTL interface mode
Hao Zhang [Mon, 2 Feb 2015 21:25:50 +0000 (16:25 -0500)]
keystone: srss: add env variable to support SRSS VCNTL interface mode

This patch adds an environment variable "srss_vcntl" to support the SRSS
temperature compensation control via the SRSS VCNTL interface. By default
VCNTL interface is disabled.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agok2e: srss: enable Smart Reflex Class 0 with Temp Compensation
Hao Zhang [Thu, 15 Jan 2015 21:34:03 +0000 (16:34 -0500)]
k2e: srss: enable Smart Reflex Class 0 with Temp Compensation

This patch enables Smart Reflex Class 0 with temperature compensation
for TI Keystone II K2E device. CONFIG_SRSS_I2C_BUS and
CONFIG_PC_I2C_SLAVE are passed to the initialization function of the
external power controller to send the initial VOUT_COMMAND PMBus command
to Top Avatar via a generic SoC I2C bus.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone: usb: add support of second usb host controller
WingMan Kwok [Thu, 18 Dec 2014 20:48:43 +0000 (15:48 -0500)]
keystone: usb: add support of second usb host controller

Different TI Keystone2 SOCs support different number of
USB controllers.  K2E supports 2 while K2H or K2L support
only one.

This patch adds simultaneous support of 2nd usb controller
in host mode on K2E.  Number of usb controllers present is
defined by CONFIG_USB_MAX_CONTROLLER_COUNT found in respective
platform evm header file.

Since the usb connector on K2E EVM for the 2nd controller
is an USB3.0 micro AB connector, an adapter is needed in
order to use the 2nd controller in host mode.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agok2l: srss: disable SRSS C0 if default e-fuse values are not programmed
Hao Zhang [Thu, 4 Dec 2014 15:44:00 +0000 (10:44 -0500)]
k2l: srss: disable SRSS C0 if default e-fuse values are not programmed

SRSS related default configurations are programmed in the e-fuse
registers, if these values are not programmed in the device (e.g.
pre-production device), SRSS Class 0 feature should be disabled.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: fix k2e compilation error K2_UBOOT_2013_01_14.12_02
Vitaly Andrianov [Tue, 2 Dec 2014 15:47:56 +0000 (10:47 -0500)]
keystone2: fix k2e compilation error

The "keystone2: use correct EFUSE_BOOTROM filed to configure speed"
broke k2e build.

This commit fixes the error.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agok2l: srss: enable Smart Reflex Class0 driver K2_UBOOT_2013_01_14.12_01
Hao Zhang [Mon, 1 Dec 2014 20:54:46 +0000 (15:54 -0500)]
k2l: srss: enable Smart Reflex Class0 driver

Enable Smart Reflex Class 0 driver in miscellaneous init.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agok2l: srss: Smart Reflex Class 0 driver with TC
Hao Zhang [Mon, 1 Dec 2014 20:53:50 +0000 (15:53 -0500)]
k2l: srss: Smart Reflex Class 0 driver with TC

This patch adds the driver to initialize SRSS Class 0 with Temperature
Compensation (if enabled) for K2L device. The initial VDD min
voltage is sent to the exteranl power controller via a generic I2C
interface with PMBus commands.

The patch provides a build option (CONFIG_SRSS_C0) to enable or disable
this feature, by default it is always enabled. There is also an
environment variable (no_src0_tc) that user can set to disable
TC. By default TC is always enabled.

It is assumed that VCNTL/SRSS I2C interface are disconnected between
SoC and the external power controller (Top Avatar). Only a generic I2C
is connected between SoC and TA.

The temperature compensation is handled by user space application which
will monitor the temperature threshold points events and change the
voltage by sending the VOUT_COMMAND PMBus command via I2C interface.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: use correct EFUSE_BOOTROM filed to configure speed K2_UBOOT_2013_01_14.12
Vitaly Andrianov [Mon, 1 Dec 2014 15:57:00 +0000 (10:57 -0500)]
keystone2: use correct EFUSE_BOOTROM filed to configure speed

The get_max_arm_speed() and get_max_dev_speed() used wrong register
fields to get the maximum speeds. This commit fixes the bug.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: net: fix compile error
WingMan Kwok [Sun, 30 Nov 2014 21:24:25 +0000 (16:24 -0500)]
keystone2: net: fix compile error

This patch fixes the following compile error:

keystone_net.c: In function 'keystone2_emac_initialize':
keystone_net.c:1065:26: error: 'KS2_LPSC_XGE' undeclared (first use in this function)

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone2: add support of 10G ethernet on k2e
WingMan Kwok [Tue, 11 Nov 2014 14:59:15 +0000 (09:59 -0500)]
keystone2: add support of 10G ethernet on k2e

This patch adds the support of 10G ethernet on
TI's Keystone2 K2E platform.  The 10G ethernet
switch on such platform is a 3 port switch
(1 host port and 2 slave ports).

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone2: add support of 10G ethernet on k2hk
WingMan Kwok [Tue, 11 Nov 2014 14:58:39 +0000 (09:58 -0500)]
keystone2: add support of 10G ethernet on k2hk

This patch adds the support of 10G ethernet on
TI's Keystone2 K2HK platform.  The 10G ethernet
switch on such platform is a 3 port switch
(1 host port and 2 slave ports).

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone: net: add 10G network interface API
WingMan Kwok [Fri, 14 Nov 2014 22:06:38 +0000 (17:06 -0500)]
keystone: net: add 10G network interface API

This patch adds the 10G network interface API
for TI's Keystone2 K2HK and K2E platforms.

This implementation supports only the 10G ethernet
connections found on TI's Rear Transition Module-
Break Out Card with Dual Retimers.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone: net: introduce 10G ethernet switch serdes configuration
WingMan Kwok [Mon, 17 Nov 2014 15:29:42 +0000 (10:29 -0500)]
keystone: net: introduce 10G ethernet switch serdes configuration

This patch introduces the configurations of the serdes module
in the 10G ethernet switch found on the Keystone2 K2HK and K2E
platforms.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone: net: add 10G ethernet switch packet DMA configuration
WingMan Kwok [Fri, 14 Nov 2014 21:59:14 +0000 (16:59 -0500)]
keystone: net: add 10G ethernet switch packet DMA configuration

This patch adds the configurations of the 10G ethernet switch
packet DMA module found on Keystone2 K2HK and K2E platforms.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone: net: add second queue manager configuration
WingMan Kwok [Mon, 17 Nov 2014 15:27:32 +0000 (10:27 -0500)]
keystone: net: add second queue manager configuration

QMSS in Keystone2 K2HK has 2 physical queue managers.
This patch adds the configuration of the second queue
manager found in the QMSS on the K2HK platform.
Calling function of the new APIs is assumed to make sure
that the second queue manager exists before calling
them.  Notice that the same descriptors are used when
configuring the 2nd queue manager, i.e. it is assumed
that only one of the 2 queue managers is active at any
time.  This is the case in u-boot because u-boot closes one
ethernet interface and the corresponding queue manager
before it opens another one when trying to find a connected
ethernet port for boot up purpose.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone: net: update queue manager and pkt dma configuration api
WingMan Kwok [Fri, 14 Nov 2014 21:34:49 +0000 (16:34 -0500)]
keystone: net: update queue manager and pkt dma configuration api

Prior to this patch, queue manager and pkt dma configuration APIs
are designed for the configuration of one queue manager and the
1G cpsw pkt dma only.  This patch updates the APIs by allowing the
passing in of additional parameters.  The updates facilitate the
reuse of existing code to configure another queue manager that may
exist on some keystone2 platforms.  It also makes it more flexible
to configure other peripheral's pkt dma on such platforms.  Some
minor code cleanup is also added.

Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
6 years agokeystone2: use appropriate HD field for destination port
Vitaly Andrianov [Fri, 14 Nov 2014 17:43:34 +0000 (12:43 -0500)]
keystone2: use appropriate HD field for destination port

K2L and L2E have different from K2HK EthSS version, which uses tag_info
field for destination slave port. This commit adds the dest_port_info field
to the struct pktdma_cfg, to configure which HD filed tag_info or pkt_info
shall be used to configure descriptor.

Before that commit the swinfo[2] was used for that purpose. Even if that
worked on K2HK devices, the correct field for K2HK is the pkt_info.

The netcp_send() configure appropriate HD info field depending on the
direct_info of the currently using netcp.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Murali Karicheri <m-karicheri2@ti.com>
6 years agok2hk: enable CONFIG_MCAST_TFTP for k2hk evm
Vitaly Andrianov [Mon, 6 Oct 2014 12:26:50 +0000 (08:26 -0400)]
k2hk: enable CONFIG_MCAST_TFTP for k2hk evm

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: add mcast function to keyston2 Ethernet driver
Vitaly Andrianov [Wed, 1 Oct 2014 18:06:49 +0000 (14:06 -0400)]
keystone2: add mcast function to keyston2 Ethernet driver

The MCAST_TFTP support requires that network drivers has mcast functon
implemented. This commit adds dummy keystone2_eth_bcast_addr() to meet
the requirement. As far as the driver doesn't use ALE and doesn't filter
any incoming packets, the function is empty.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agoarm: implement find_next_zero_bit function
Vitaly Andrianov [Wed, 1 Oct 2014 17:59:06 +0000 (13:59 -0400)]
arm: implement find_next_zero_bit function

This commit copies implementation of the find_next_zero_bit() from
git://git.denx.de/u-boot.git/arch/mips/include/asm/bitops.h. v2014.07

The function is required to enable MCAST_TFTP support for ARM platforms.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone: add default env for boot with rootfs on hard disk for K2E EVM K2_UBOOT_2013_01_14.09
Murali Karicheri [Tue, 2 Sep 2014 20:55:01 +0000 (16:55 -0400)]
keystone: add default env for boot with rootfs on hard disk for K2E EVM

K2E EVM has SATA controller on PCIe port 1 and can be used to hold the
rootfs. To allow this, add a new boot option "hdd" and update the env
to support this boot mode.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
6 years agokeystone: restructure handling of default env settings
Murali Karicheri [Tue, 2 Sep 2014 20:52:22 +0000 (16:52 -0400)]
keystone: restructure handling of default env settings

Currently to customize env for various ks2 boards, individual
variables such as NAME_FS etc are defined and included in the
common config.h to define CONFIG_EXTRA_ENV_SETTINGS. This
doesn't scale well if a variable is not applicable on a
specific board. Using this scheme, we have to define variables
with empty value and is ugly.  Instead to allow board specific
customization of default env variable, define a common
CONFIG_EXTRA_ENV_KS2_SETTINGS for all common variables and define
board specific variables in individual board specifc config.h
using CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS. Use the common and board
specific variables to define CONFIG_EXTRA_ENV_SETTINGS. This way
more variables can be added in future for individual boards
without affecting the other config.h files.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
6 years agokeystone: i2c cmd: add i2c write2 command
Hao Zhang [Tue, 26 Aug 2014 18:30:49 +0000 (14:30 -0400)]
keystone: i2c cmd: add i2c write2 command

This patch adds a new i2c write_block command to write a block of data to
a particular address on an I2C device. This command enables SoC
to communicate with PMBus compliant device via I2C bus.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: change default boot mode to ubi
Murali Karicheri [Tue, 26 Aug 2014 18:21:14 +0000 (14:21 -0400)]
keystone2: change default boot mode to ubi

To allow out of box demo, change default boot mode to ubi
boot now that NAND is functional in latest EVMs.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
6 years agokeystone2: fix error in dev_speeds table for k2hk/k2l devices
Vitaly Andrianov [Fri, 25 Jul 2014 11:39:28 +0000 (07:39 -0400)]
keystone2: fix error in dev_speeds table for k2hk/k2l devices

The table had incorrect values. This commit fixes that.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone: configs: change NAME_FS and NAME_UBI env variables K2_UBOOT_2013_01_14.07
Hao Zhang [Tue, 15 Jul 2014 15:19:04 +0000 (11:19 -0400)]
keystone: configs: change NAME_FS and NAME_UBI env variables

Change NAME_FS and NAME_UBI env variables to Keystone II platform
specific names to match with nightly build output file names.

6 years agokeystone2: Add secure key copy for ubi boot mode
Murali Karicheri [Tue, 1 Jul 2014 16:20:34 +0000 (12:20 -0400)]
keystone2: Add secure key copy for ubi boot mode

this is a duplicate of the commit below as this change got lost
during the code restructure. Only change is it is now applicable for
all devices.

commit 0b9b4be2f3097b5bdc3b0ea7aa5e8f465097e365
Author: Sam Nelson <sam.nelson@ti.com>
Date:   Wed Mar 19 13:41:46 2014 -0400

    tci6638: Add secure key copy for ubi boot mode

    - The secure key is used for secure storage feature
    - added script to copy key from nand to msmc

Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
6 years agokeystone2: enable OSR clock domain for K2L SoC
Hao Zhang [Tue, 1 Jul 2014 15:31:26 +0000 (11:31 -0400)]
keystone2: enable OSR clock domain for K2L SoC

This patches enables the On-chip Shared Ram clock domwin for K2L
SoC.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone: ddr3: move K2L DDR3 configurations to a common file
Hao Zhang [Thu, 26 Jun 2014 19:32:04 +0000 (15:32 -0400)]
keystone: ddr3: move K2L DDR3 configurations to a common file

This patch moves K2L DDR3 PHY and EMIF configuration data to the common
ddr3_cfg.c, which supports DDR3 rate of 1600M and 2GB size.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone: ddr3: move K2E DDR3 configuration to a common file
Hao Zhang [Thu, 26 Jun 2014 19:27:44 +0000 (15:27 -0400)]
keystone: ddr3: move K2E DDR3 configuration to a common file

This patch moves K2E DDR3 PHY and EMIF configuration data to the common
ddr3_cfg.c, K2E supports SODIMM with both 4GB and 8GB size.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone: ddr3: move K2HK DDR3 configuration to a common file
Hao Zhang [Fri, 27 Jun 2014 17:58:52 +0000 (13:58 -0400)]
keystone: ddr3: move K2HK DDR3 configuration to a common file

This patch moves K2HK DDR3 PHY and EMIF configuration data with different
rates and memory size to a common ddr3_cfg.c file.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: use EFUSE_BOOTROM information to configure PLLs
Vitaly Andrianov [Tue, 10 Jun 2014 11:48:05 +0000 (07:48 -0400)]
keystone2: use EFUSE_BOOTROM information to configure PLLs

This patch reads EFUSE_BOOTROM register to see the maximum supported
clock for CORE and TETRIS PLLs and configure them accordingly.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: add wfi in to the core_spin loop
Vitaly Andrianov [Thu, 22 May 2014 17:16:37 +0000 (13:16 -0400)]
keystone2: add wfi in to the core_spin loop

When core A turning of core B, via tetris DPSC it places the core
B DPSC into transitional state. The core B has to execute wfi instruction
to to move its DPSC to the OFF state. This patch add such instruction.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: remove earlyprintk from default env variable
Murali Karicheri [Tue, 13 May 2014 14:26:25 +0000 (10:26 -0400)]
keystone2: remove earlyprintk from default env variable

User may add earlyprintk for debug as needed. Usually puts it in
args_all variable and that results in double instance of earlyprint
in the bootargs. This causes earlyprintk code to go in a infinite
loop in earlyprintk code with prints showing something like this.

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Booting Linux on physical CPU 0x0

So remove this from default.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
6 years agokeystone: net: fix K2L/K2E EMAC loopback test.
Hao Zhang [Tue, 17 Jun 2014 21:27:09 +0000 (17:27 -0400)]
keystone: net: fix K2L/K2E EMAC loopback test.

6 years agokeystone: configs: fixes ubifs size problem in mtdparts env
Hao Zhang [Fri, 13 Jun 2014 21:08:18 +0000 (17:08 -0400)]
keystone: configs: fixes ubifs size problem in mtdparts env

This patch changes the hardcoded ubifs size to a dynamically detected
size in the mtdparts environment variable, so that U-boot will support
support differnt ubifs partiton size depending on the NAND device size.

6 years agokeystone: net: fix the K2L/K2E EMAC port link down issue
Hao Zhang [Thu, 12 Jun 2014 20:55:49 +0000 (16:55 -0400)]
keystone: net: fix the K2L/K2E EMAC port link down issue

This patch fixes the link down issue when an EMAC port is first
opened for K2L and K2E EVMs, the new Marvel PHY (88E1512) used on
K2L/K2E EVM requires longer time to auto negotiate with SoC's
SGMII port, a longer delay is introduce to check the SoC's SGMII
link/auto neg status and Marvel PHY's link status.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: remove redundant code from keystone_net.c
Vitaly Andrianov [Fri, 13 Jun 2014 13:43:33 +0000 (09:43 -0400)]
keystone2: remove redundant code from keystone_net.c

This patch removes duplicated get_link_status() call from the
keystone2_eth_send_packet()

The emac_gigabit_enable() is called at opening Ethernet and there is no
need to enable it on sending each packet. The patch removes that call
from as well keystone2_eth_send_packet();

Also the patch removes unused tx_send_loop variable.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: config: change K2l name_mon env to skern-k2l-evm.bin K2_UBOOT_2013_01_14.06
Hao Zhang [Wed, 11 Jun 2014 18:07:16 +0000 (14:07 -0400)]
keystone2: config: change K2l name_mon env to skern-k2l-evm.bin

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: config: change K2E name_mon env to skern-k2e-evm.bin
Hao Zhang [Wed, 11 Jun 2014 18:06:45 +0000 (14:06 -0400)]
keystone2: config: change K2E name_mon env to skern-k2e-evm.bin

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: config: change K2HK name_mon env to skern-k2hk-evm.bin
Hao Zhang [Wed, 11 Jun 2014 18:05:21 +0000 (14:05 -0400)]
keystone2: config: change K2HK name_mon env to skern-k2hk-evm.bin

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: set core pll to 1.198 GHz
Vitaly Andrianov [Wed, 11 Jun 2014 17:49:39 +0000 (13:49 -0400)]
keystone2: set core pll to 1.198 GHz

This patch sets the core pll for k2hk and k2l to 1.198GHz, which is
the most close to 1.2GHz.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: increase MDIO clock frequency
Vitaly Andrianov [Wed, 11 Jun 2014 17:43:03 +0000 (13:43 -0400)]
keystone2: increase MDIO clock frequency

With MAC_PHY sgmii configuration, u-boot checks PHY link status before
sending each packet. Increasing MDIO frequency increases overall tftp
speed. We set it to maximum 2.5MHz.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agokeystone2: add env option to do unitrd dt fixup K2_UBOOT_2013_01_14.05
Murali Karicheri [Tue, 13 May 2014 16:54:40 +0000 (12:54 -0400)]
keystone2: add env option to do unitrd dt fixup

With latest v3.13 kernel, unitrd dt fixup is not needed. However for
older kernel versions such as v3.8/v3.10, it is needed. So to work
with both, add a u-boot env variable that can be set to do dt fixup
for older kernels.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
6 years agokeystone2: config: change the name_uboot and name_ubi envs
Hao Zhang [Fri, 9 May 2014 17:16:57 +0000 (13:16 -0400)]
keystone2: config: change the name_uboot and name_ubi envs

This patch changes the name of the environment variables "name_uboot"
and "name_ubi" for proper names.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: net: create a separate SGMII SerDes driver
Hao Zhang [Thu, 8 May 2014 19:57:54 +0000 (15:57 -0400)]
keystone2: net: create a separate SGMII SerDes driver

This patch split the Keystone II SGMII SerDes related code from
Ethernet driver and create a separate SGMII SerDes driver. The
SerDes driver provides common API's that can also be extended
for other peripherals SerDes configurations.

The SGMII SerDes driver supports up to 8 SGMII ports for K2E device
and 4 SGMII ports for K2HK/K2L device.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: ecc: fix the hard coded DDR3 memory size for K2E EVM
Hao Zhang [Mon, 5 May 2014 18:36:09 +0000 (14:36 -0400)]
keystone2: ecc: fix the hard coded DDR3 memory size for K2E EVM

This patch reads the SPD data from so-dimm to decide the actual
size of the DDR3 memory.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: ecc: fix the hard coded DDR3 memory size on K2HK EVM
Hao Zhang [Fri, 25 Apr 2014 19:03:28 +0000 (15:03 -0400)]
keystone2: ecc: fix the hard coded DDR3 memory size on K2HK EVM

The physical DDR3 memory size was hard coded to 8GB for DDR3 ECC
initialization. This patch reads the SPD data from so-dimm to
decide the actual size of the DDR3 memory usable.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: tmp: workaround to fix the MAC ID efuse register
Hao Zhang [Thu, 24 Apr 2014 20:22:50 +0000 (16:22 -0400)]
keystone2: tmp: workaround to fix the MAC ID efuse register
swapping issue.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: ddr: add DDR3 reset PHY to K2L and K2E EVM
Hao Zhang [Wed, 23 Apr 2014 17:32:55 +0000 (13:32 -0400)]
keystone2: ddr: add DDR3 reset PHY to K2L and K2E EVM

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: ddr: add DDR3 PHY reset for K2HK EVM
Hao Zhang [Thu, 24 Apr 2014 20:17:23 +0000 (16:17 -0400)]
keystone2: ddr: add DDR3 PHY reset for K2HK EVM

This patch adds the DDR3A PHY reset code for K2HK PG 2.0 device.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Conflicts:

arch/arm/include/asm/arch-keystone/hardware.h

6 years agokeystone2: serial: add serial driver support for TI K2L and K2E
Hao Zhang [Wed, 23 Apr 2014 14:52:12 +0000 (10:52 -0400)]
keystone2: serial: add serial driver support for TI K2L and K2E

This patch adds the serail ns16550 driver support for TI Keystone II
K2L and K2E EVM.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: net: add ethernet function support for k2l EVM.
Hao Zhang [Fri, 25 Apr 2014 21:00:35 +0000 (17:00 -0400)]
keystone2: net: add ethernet function support for k2l EVM.

This patch adds the Ethernet function support for the new
Network Sub-system designed for Keystone II K2L SoC, the NSS
supports up to 4 EMAC ports and 1 Host port.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: net: add ethernet function support for K2E evm
Hao Zhang [Fri, 2 May 2014 22:56:18 +0000 (18:56 -0400)]
keystone2: net: add ethernet function support for K2E evm

This patch adds a new Ethernet definition file and uses the same
Ethernet driver to support a new Network Sub-System designed for K2E
which has up to 8 EMAC ports and 1 Host port.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: net: remove soc specific emac_regs structure
Hao Zhang [Tue, 22 Apr 2014 18:19:41 +0000 (14:19 -0400)]
keystone2: net: remove soc specific emac_regs structure

This patch removes K2HK SOC specifc emac_regs structure, it uses
soc specific register offset to keep the network driver common across
all the Keystone II EVMs.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: net: remove hardcoded QM base address from multicore nav
Hao Zhang [Tue, 22 Apr 2014 18:04:06 +0000 (14:04 -0400)]
keystone2: net: remove hardcoded QM base address from multicore nav

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: net: remove soc_type in keystone multicore navigator
Hao Zhang [Tue, 22 Apr 2014 17:58:03 +0000 (13:58 -0400)]
keystone2: net: remove soc_type in keystone multicore navigator

This patch removes hardcoded soc_type in keystone multicore navigator,
it reads JTAG id register to determine the soc type.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: net: add K2HK specific Ethernet definition header
Hao Zhang [Fri, 25 Apr 2014 19:09:22 +0000 (15:09 -0400)]
keystone2: net: add K2HK specific Ethernet definition header

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add K2L board support
Hao Zhang [Mon, 5 May 2014 18:32:40 +0000 (14:32 -0400)]
keystone2: add K2L board support

This patch adds Keystone II K2L EVM board support which includes
PLL and DDR intialization configuration.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agoKeystone2: add NAND 4KB page size support for K2L EVM
Hao Zhang [Mon, 21 Apr 2014 20:18:35 +0000 (16:18 -0400)]
Keystone2: add NAND 4KB page size support for K2L EVM

This patch adds 4KB page size support in TI davinci nand driver

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add K2L support for Keystone II arch Makefile
Hao Zhang [Mon, 21 Apr 2014 20:17:24 +0000 (16:17 -0400)]
keystone2: add K2L support for Keystone II arch Makefile

This patch adds K2L SOC specific support for Keystone II
architecture Makefile.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add MSMC cache coherency support for K2L SOC
Hao Zhang [Mon, 21 Apr 2014 20:00:53 +0000 (16:00 -0400)]
keystone2: add MSMC cache coherency support for K2L SOC

This patch adds Keystone II K2L SOC specific definitions
to support MSMC cache coherency.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agoKeystone2: add Keystone II K2L clock definitions and commands
Hao Zhang [Thu, 24 Apr 2014 19:57:51 +0000 (15:57 -0400)]
Keystone2: add Keystone II K2L clock definitions and commands

This patch adds clock definitions and commands to support Keystone II
K2L SOC.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add Keystone II K2L device hardware definitions
Hao Zhang [Mon, 21 Apr 2014 19:45:43 +0000 (15:45 -0400)]
keystone2: add Keystone II K2L device hardware definitions

This patch adds hardware definitions specific to Keystone II
K2L device.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add K2E board support
Hao Zhang [Mon, 5 May 2014 18:29:27 +0000 (14:29 -0400)]
keystone2: add K2E board support

This patch adds Keystone II K2E EVM board support which includes
PLL and DDR3 initialization configuration.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: evm_config: create common Keystone II EVM config file
Hao Zhang [Thu, 1 May 2014 21:45:26 +0000 (17:45 -0400)]
keystone2: evm_config: create common Keystone II EVM config file

Some EVM configurations in K2HK EVM config file are common across all
Keystone II platforms, and are moved to a common Keystone II EVM
configuration file.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: move K2HK POST to common Keystone II POST
Hao Zhang [Mon, 5 May 2014 18:21:45 +0000 (14:21 -0400)]
keystone2: move K2HK POST to common Keystone II POST

Power On Self Test functions are common across all the Keystone II
platforms and are moved to common Keystone II POST.

Signed-off-by: Hao Zhang <hzhang@ti.com>
Conflicts:

board/ti/ks2_evm/Makefile

6 years agokeystone2: post: fix style problems in K2HK POST files
Hao Zhang [Mon, 21 Apr 2014 18:31:46 +0000 (14:31 -0400)]
keystone2: post: fix style problems in K2HK POST files

6 years agokeystone2: move K2HK board files to common ks2 board directory
Hao Zhang [Mon, 5 May 2014 18:20:06 +0000 (14:20 -0400)]
keystone2: move K2HK board files to common ks2 board directory

This patch moves K2HK board directory to a common Keystone II board
directory. The SoC related common functions in board.c are moved to
a common keystone arch file, and board related common functions are
moved to a common keystone board file.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: usb: xhci: add K2E support
Hao Zhang [Mon, 21 Apr 2014 18:19:46 +0000 (14:19 -0400)]
keystone2: usb: xhci: add K2E support

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add K2E support for Keystone II arch Makefile
Hao Zhang [Mon, 21 Apr 2014 18:14:31 +0000 (14:14 -0400)]
keystone2: add K2E support for Keystone II arch Makefile

This patch adds K2E SOC specific support for Keystone II
architecture Makefile.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add MSMC cache coherency support for K2E SOC
Hao Zhang [Mon, 21 Apr 2014 18:10:27 +0000 (14:10 -0400)]
keystone2: add MSMC cache coherency support for K2E SOC

This patch adds Keystone II K2E SOC specific definitions
to support MSMC cache coherency.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add async EMIF configuration support for K2E
Hao Zhang [Mon, 21 Apr 2014 18:10:12 +0000 (14:10 -0400)]
keystone2: add async EMIF configuration support for K2E

This patch adds Keystone II K2E SOC specific definitions to
configure asynchronous EMIF.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add K2E PSC definitions
Hao Zhang [Mon, 21 Apr 2014 18:09:59 +0000 (14:09 -0400)]
keystone2: add K2E PSC definitions

This patch adds Power Saving Controller definitions for TI
Keystone II K2E device.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add K2E clock support
Hao Zhang [Thu, 24 Apr 2014 19:53:17 +0000 (15:53 -0400)]
keystone2: add K2E clock support

This patch adds the clock definitions and functions for
Keystone II K2E device.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: add K2E device hardware definitions
Hao Zhang [Thu, 24 Apr 2014 19:48:08 +0000 (15:48 -0400)]
keystone2: add K2E device hardware definitions

This patch adds hardware definitions specific to TI Keystone II
K2E device.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: remove k2hk_evm test commands
Hao Zhang [Mon, 21 Apr 2014 18:09:35 +0000 (14:09 -0400)]
keystone2: remove k2hk_evm test commands

Removes TI Keystone II K2HK EVM specific test commands, oob format
and factory image test commands are not used any more, all the new
commands should be added in the common Keystone II test command.

Signed-off-by: Hao Zhang <hzhang@ti.com>
6 years agokeystone2: fix code style errors in msmc.c
Vitaly Andrianov [Thu, 3 Apr 2014 17:08:38 +0000 (13:08 -0400)]
keystone2: fix code style errors in msmc.c

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
6 years agoMerge branch 'master' into next
Vitaly Andrianov [Tue, 6 May 2014 14:29:44 +0000 (10:29 -0400)]
Merge branch 'master' into next

7 years agoserial: nsl16550: add hw flow control support
Murali Karicheri [Wed, 9 Apr 2014 20:06:17 +0000 (16:06 -0400)]
serial: nsl16550: add hw flow control support

keystone serial hw support hw flow control. This patch
enables hw flow control for keystone EVMs as an optional
feature based on CONFIG_HWFLOW

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
7 years agokeystone2: fix bug in hatoi function
Vitaly Andrianov [Thu, 3 Apr 2014 17:17:10 +0000 (13:17 -0400)]
keystone2: fix bug in hatoi function

This patch fixes a bug in the hatoi().

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
7 years agokeystone2: remove has_mdio environment variable
Vitaly Andrianov [Thu, 3 Apr 2014 17:12:54 +0000 (13:12 -0400)]
keystone2: remove has_mdio environment variable

There was a bug of using has_mdio environment variable. If that variable
set to "1" the keystone network drivers always uses mdio to configure a
port even if a particular port dosn't have a phy connected. Also depending
on the variable it incorrectly overrided sgmii_link_type.

This patch removes the has_mdio environment variable. Depending on
sgmii_link_type the keytone2_eth_open sets the local sys_has_mdio for the
currently opening port.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>