mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-26 14:55:16 +00:00
Merge changes I80316689,I23cac4fb,If911e7de,I169ff358,I4e040cd5, ... into integration
* changes: ddr: a80x0: add DDR 32-bit ECC mode support ble: ap807: improve PLL configuration sequence ble: ap807: clean-up PLL configuration sequence ddr: a80x0: add DDR 32-bit mode support plat: marvell: mci: perform mci link tuning for all mci interfaces plat: marvell: mci: use more meaningful name for mci link tuning plat: marvell: a8k: remove wrong or unnecessary comments plat: marvell: ap807: enable snoop filter for ap807 plat: marvell: ap807: update configuration space of each CP plat: marvell: ap807: use correct address for MCIx4 register plat: marvell: add support for PLL 2.2GHz mode plat: marvell: armada: make a8k_common.mk and mss_common.mk more generic marvell: armada: add extra level in marvell platform hierarchy
This commit is contained in:
commit
9935047b20
117 changed files with 192 additions and 88 deletions
docs/plat/marvell
drivers/marvell
include
drivers/marvell
plat/marvell/armada
plat/marvell/armada
a3700
a3700
common
a8k
a70x0
a70x0_amc
a80x0
a80x0_mcbin
common
common
|
@ -84,7 +84,7 @@ There are several build options:
|
|||
- BLE_PATH
|
||||
|
||||
Points to BLE (Binary ROM extension) sources folder. Only required for A8K builds.
|
||||
The parameter is optional, its default value is ``plat/marvell/a8k/common/ble``.
|
||||
The parameter is optional, its default value is ``plat/marvell/armada/a8k/common/ble``.
|
||||
|
||||
- MV_DDR_PATH
|
||||
|
||||
|
@ -192,7 +192,11 @@ Special Build Flags
|
|||
In order to build UART recovery image this operation should be disabled for
|
||||
a70x0 and a80x0 because of hardware limitation (boot from secondary image
|
||||
can interrupt UART recovery process). This MACRO definition is set in
|
||||
``plat/marvell/a8k/common/include/platform_def.h`` file.
|
||||
``plat/marvell/armada/a8k/common/include/platform_def.h`` file.
|
||||
|
||||
- DDR32
|
||||
In order to work in 32bit DDR, instead of the default 64bit ECC DDR,
|
||||
this flag should be set to 1.
|
||||
|
||||
For more information about build options, please refer to the
|
||||
:ref:`Build Options` document.
|
|
@ -8,13 +8,13 @@ SoC being used is already supported in TF-A.
|
|||
Source Code Structure
|
||||
---------------------
|
||||
|
||||
- The customer platform specific code shall reside under ``plat/marvell/<soc family>/<soc>_cust``
|
||||
(e.g. 'plat/marvell/a8k/a7040_cust').
|
||||
- The customer platform specific code shall reside under ``plat/marvell/armada/<soc family>/<soc>_cust``
|
||||
(e.g. 'plat/marvell/armada/a8k/a7040_cust').
|
||||
- The platform name for build purposes is called ``<soc>_cust`` (e.g. ``a7040_cust``).
|
||||
- The build system will reuse all files from within the soc directory, and take only the porting
|
||||
files from the customer platform directory.
|
||||
|
||||
Files that require porting are located at ``plat/marvell/<soc family>/<soc>_cust`` directory.
|
||||
Files that require porting are located at ``plat/marvell/armada/<soc family>/<soc>_cust`` directory.
|
||||
|
||||
|
||||
Armada-70x0/Armada-80x0 Porting
|
||||
|
@ -64,7 +64,7 @@ boot loader recovery (marvell_plat_config.c)
|
|||
- Example:
|
||||
|
||||
In A7040-DB specific implementation
|
||||
(``plat/marvell/a8k/a70x0/board/marvell_plat_config.c``), the image skip is
|
||||
(``plat/marvell/armada/a8k/a70x0/board/marvell_plat_config.c``), the image skip is
|
||||
implemented using GPIO: mpp 33 (SW5).
|
||||
|
||||
Before resetting the board make sure there is a valid image on the next flash
|
||||
|
@ -91,7 +91,7 @@ The BLE and consequently, the DDR init code is executed at the early stage of
|
|||
the boot process.
|
||||
|
||||
Each supported platform of the TF-A has its own DDR porting file called
|
||||
dram_port.c located at ``atf/plat/marvell/a8k/<platform>/board`` directory.
|
||||
dram_port.c located at ``atf/plat/marvell/armada/a8k/<platform>/board`` directory.
|
||||
|
||||
Please refer to '<path_to_mv_ddr_sources>/doc/porting_guide.txt' for detailed
|
||||
porting description.
|
||||
|
@ -128,7 +128,7 @@ Comphy Porting (phy-porting-layer.h or phy-default-porting-layer.h)
|
|||
The porting layer for PHY was introduced in TF-A. There is one file
|
||||
``drivers/marvell/comphy/phy-default-porting-layer.h`` which contains the
|
||||
defaults. Those default parameters are used only if there is no appropriate
|
||||
phy-porting-layer.h file under: ``plat/marvell/<soc
|
||||
phy-porting-layer.h file under: ``plat/marvell/armada/<soc
|
||||
family>/<platform>/board/phy-porting-layer.h``. If the phy-porting-layer.h
|
||||
exists, the phy-default-porting-layer.h is not going to be included.
|
||||
|
||||
|
@ -140,7 +140,7 @@ Comphy Porting (phy-porting-layer.h or phy-default-porting-layer.h)
|
|||
The easiest way to prepare the PHY porting layer for custom board is to copy
|
||||
existing example to a new platform:
|
||||
|
||||
- cp ``plat/marvell/a8k/a80x0/board/phy-porting-layer.h`` "plat/marvell/<soc family>/<platform>/board/phy-porting-layer.h"
|
||||
- cp ``plat/marvell/armada/a8k/a80x0/board/phy-porting-layer.h`` "plat/marvell/armada/<soc family>/<platform>/board/phy-porting-layer.h"
|
||||
- adjust relevant parameters or
|
||||
- if different comphy index is used for specific feature, move it to proper table entry and then adjust.
|
||||
|
||||
|
@ -150,7 +150,7 @@ Comphy Porting (phy-porting-layer.h or phy-default-porting-layer.h)
|
|||
|
||||
- Example:
|
||||
Example porting layer for armada-8040-db is under:
|
||||
``plat/marvell/a8k/a80x0/board/phy-porting-layer.h``
|
||||
``plat/marvell/armada/a8k/a80x0/board/phy-porting-layer.h``
|
||||
|
||||
.. note::
|
||||
If there is no PHY porting layer for new platform (missing
|
|
@ -5,10 +5,10 @@ Marvell
|
|||
:maxdepth: 1
|
||||
:caption: Contents
|
||||
|
||||
build
|
||||
porting
|
||||
misc/mvebu-a8k-addr-map
|
||||
misc/mvebu-amb
|
||||
misc/mvebu-ccu
|
||||
misc/mvebu-io-win
|
||||
misc/mvebu-iob
|
||||
armada/build
|
||||
armada/porting
|
||||
armada/misc/mvebu-a8k-addr-map
|
||||
armada/misc/mvebu-amb
|
||||
armada/misc/mvebu-ccu
|
||||
armada/misc/mvebu-io-win
|
||||
armada/misc/mvebu-iob
|
||||
|
|
|
@ -39,19 +39,29 @@
|
|||
#define AP807_CPU_PLL_PARAM(cluster) AP807_CPU_PLL_CTRL(cluster)
|
||||
#define AP807_CPU_PLL_CFG(cluster) (AP807_CPU_PLL_CTRL(cluster) + 0x4)
|
||||
#define AP807_CPU_PLL_CFG_BYPASS_MODE (0x1)
|
||||
#define AP807_CPU_PLL_FRC_DSCHG (0x2)
|
||||
#define AP807_CPU_PLL_CFG_USE_REG_FILE (0x1 << 9)
|
||||
|
||||
static void pll_set_freq(unsigned int freq_val)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (freq_val != PLL_FREQ_2200)
|
||||
return;
|
||||
|
||||
for (i = 0 ; i < AP807_CLUSTER_NUM ; i++) {
|
||||
mmio_write_32(AP807_CPU_PLL_CFG(i),
|
||||
AP807_CPU_PLL_CFG_USE_REG_FILE);
|
||||
mmio_write_32(AP807_CPU_PLL_CFG(i),
|
||||
AP807_CPU_PLL_CFG_USE_REG_FILE |
|
||||
AP807_CPU_PLL_CFG_BYPASS_MODE);
|
||||
/* Set parameter of cluster i PLL to 2.2GHz */
|
||||
mmio_write_32(AP807_CPU_PLL_PARAM(i), freq_val);
|
||||
/* Set apll_lpf_frc_dschg - Control
|
||||
* voltage of internal VCO is discharged
|
||||
*/
|
||||
mmio_write_32(AP807_CPU_PLL_CFG(i),
|
||||
AP807_CPU_PLL_FRC_DSCHG);
|
||||
/* Set use_rf_conf load PLL parameter from register */
|
||||
mmio_write_32(AP807_CPU_PLL_CFG(i),
|
||||
AP807_CPU_PLL_FRC_DSCHG |
|
||||
AP807_CPU_PLL_CFG_USE_REG_FILE);
|
||||
/* Un-set apll_lpf_frc_dschg */
|
||||
mmio_write_32(AP807_CPU_PLL_CFG(i),
|
||||
AP807_CPU_PLL_CFG_USE_REG_FILE);
|
||||
}
|
||||
|
@ -84,19 +94,16 @@ static void aro_to_pll(void)
|
|||
*/
|
||||
void ap807_clocks_init(unsigned int freq_option)
|
||||
{
|
||||
/* Switch from ARO to PLL */
|
||||
aro_to_pll();
|
||||
|
||||
/* Modifications in frequency table:
|
||||
* 0x0: 764x: change to 2000 MHz.
|
||||
* 0x2: 744x change to 1800 MHz, 764x change to 2200/2400.
|
||||
* 0x3: 3900/744x/764x change to 1200 MHz.
|
||||
*/
|
||||
switch (freq_option) {
|
||||
case CPU_2000_DDR_1200_RCLK_1200:
|
||||
pll_set_freq(PLL_FREQ_2000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (freq_option == CPU_2200_DDR_1200_RCLK_1200)
|
||||
pll_set_freq(PLL_FREQ_2200);
|
||||
|
||||
/* Switch from ARO to PLL */
|
||||
aro_to_pll();
|
||||
|
||||
}
|
||||
|
|
|
@ -2236,7 +2236,7 @@ int mvebu_cp110_comphy_xfi_rx_training(uint64_t comphy_base,
|
|||
|
||||
printf("########################################################\n");
|
||||
printf("# To use trained values update the ATF sources:\n");
|
||||
printf("# plat/marvell/a8k/<board_type>/board/phy-porting-layer.h ");
|
||||
printf("# plat/marvell/armada/a8k/<board_type>/board/phy-porting-layer.h ");
|
||||
printf("file\n# with new values as below (for appropriate AP nr %d",
|
||||
ap_nr);
|
||||
printf("and CP nr: %d comphy_index %d\n\n",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
/* Those are parameters for xfi mode, which need to be tune for each board type.
|
||||
* For known DB boards the parameters was already calibrated and placed under
|
||||
* the plat/marvell/a8k/<board_type>/board/phy-porting-layer.h
|
||||
* the plat/marvell/armada/a8k/<board_type>/board/phy-porting-layer.h
|
||||
*/
|
||||
struct xfi_params {
|
||||
uint8_t g1_ffe_res_sel;
|
||||
|
|
|
@ -571,21 +571,21 @@ static int mci_enable_simultaneous_transactions(int mci_index)
|
|||
|
||||
debug_enter();
|
||||
/* ID assignment (assigning global ID offset to CP) */
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(0),
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(mci_index),
|
||||
MCI_DID_GLOBAL_ASSIGN_REQ_MCI_LOCAL_ID(2) |
|
||||
MCI_DID_GLOBAL_ASSIGN_REQ_MCI_COUNT(2) |
|
||||
MCI_DID_GLOBAL_ASSIGN_REQ_HOPS_NUM(2));
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(0),
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(mci_index),
|
||||
MCI_INDIRECT_REG_CTRL_ADDR(
|
||||
MCI_DID_GLOBAL_ASSIGNMENT_REQUEST_REG) |
|
||||
MCI_INDIRECT_CTRL_ASSIGN_CMD);
|
||||
ret |= mci_poll_command_completion(mci_index, MCI_CMD_WRITE);
|
||||
|
||||
/* Assigning dest. ID=3 to all transactions entering from AXI at AP */
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(0),
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(mci_index),
|
||||
MCI_HB_CTRL_WIN0_DEST_VALID_FLAG(1) |
|
||||
MCI_HB_CTRL_WIN0_DEST_ID(3));
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(0),
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(mci_index),
|
||||
MCI_INDIRECT_REG_CTRL_ADDR(
|
||||
MCI_HB_CTRL_WIN0_DESTINATION_REG_NUM) |
|
||||
MCI_INDIRECT_CTRL_HOPID(GID_AXI_HB) |
|
||||
|
@ -593,10 +593,10 @@ static int mci_enable_simultaneous_transactions(int mci_index)
|
|||
ret |= mci_poll_command_completion(mci_index, MCI_CMD_WRITE);
|
||||
|
||||
/* Assigning dest. ID=1 to all transactions entering from AXI at CP */
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(0),
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(mci_index),
|
||||
MCI_HB_CTRL_WIN0_DEST_VALID_FLAG(1) |
|
||||
MCI_HB_CTRL_WIN0_DEST_ID(1));
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(0),
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(mci_index),
|
||||
MCI_INDIRECT_REG_CTRL_ADDR(
|
||||
MCI_HB_CTRL_WIN0_DESTINATION_REG_NUM) |
|
||||
MCI_INDIRECT_CTRL_HOPID(GID_IHB_EXT) |
|
||||
|
@ -607,8 +607,8 @@ static int mci_enable_simultaneous_transactions(int mci_index)
|
|||
* This will lead to get match for any AXI address
|
||||
* and receive destination ID=3
|
||||
*/
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(0), 0xffffffff);
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(0),
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(mci_index), 0xffffffff);
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(mci_index),
|
||||
MCI_INDIRECT_REG_CTRL_ADDR(
|
||||
MCI_HB_CTRL_WIN0_ADDRESS_MASK_REG_NUM) |
|
||||
MCI_INDIRECT_CTRL_HOPID(GID_AXI_HB) |
|
||||
|
@ -619,8 +619,8 @@ static int mci_enable_simultaneous_transactions(int mci_index)
|
|||
* This will lead to get match for any AXI address
|
||||
* and receive destination ID=1
|
||||
*/
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(0), 0xffffffff);
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(0),
|
||||
mci_mmio_write_32(MCI_WRITE_READ_DATA_REG(mci_index), 0xffffffff);
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(mci_index),
|
||||
MCI_INDIRECT_REG_CTRL_ADDR(
|
||||
MCI_HB_CTRL_WIN0_ADDRESS_MASK_REG_NUM) |
|
||||
MCI_INDIRECT_CTRL_HOPID(GID_IHB_EXT) |
|
||||
|
@ -653,7 +653,7 @@ static _Bool mci_simulatenous_trans_missing(int mci_index)
|
|||
* performed by BootROM.
|
||||
*/
|
||||
debug_enter();
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(0),
|
||||
mci_mmio_write_32(MCI_ACCESS_CMD_REG(mci_index),
|
||||
MCI_INDIRECT_REG_CTRL_ADDR(
|
||||
MCI_HB_CTRL_WIN0_DESTINATION_REG_NUM) |
|
||||
MCI_INDIRECT_CTRL_HOPID(GID_AXI_HB) |
|
||||
|
@ -697,7 +697,8 @@ int mci_configure(int mci_index)
|
|||
* wasn't already enabled in bootrom.
|
||||
*/
|
||||
if (mci_simulatenous_trans_missing(mci_index)) {
|
||||
VERBOSE("Enabling MCI simultaneous transaction\n");
|
||||
VERBOSE("Enabling MCI simultaneous transaction for mci%d\n",
|
||||
mci_index);
|
||||
/* set MCI to support read/write transactions
|
||||
* to arrive at the same time
|
||||
*/
|
||||
|
@ -819,7 +820,7 @@ void mci_turn_link_on(void)
|
|||
}
|
||||
|
||||
/* Initialize MCI for performance improvements */
|
||||
int mci_initialize(int mci_index)
|
||||
int mci_link_tune(int mci_index)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <drivers/marvell/cache_llc.h>
|
||||
#include <drivers/marvell/ccu.h>
|
||||
#include <drivers/marvell/io_win.h>
|
||||
#include <drivers/marvell/iob.h>
|
||||
#include <drivers/marvell/mci.h>
|
||||
#include <drivers/marvell/mochi/ap_setup.h>
|
||||
#include <lib/mmio.h>
|
||||
|
@ -31,6 +32,11 @@
|
|||
#define DSS_CR0 (MVEBU_RFU_BASE + 0x100)
|
||||
#define DVM_48BIT_VA_ENABLE (1 << 21)
|
||||
|
||||
|
||||
/* SoC RFU / IHBx4 Control */
|
||||
#define MCIX4_807_REG_START_ADDR_REG(unit_id) (MVEBU_RFU_BASE + \
|
||||
0x4258 + (unit_id * 0x4))
|
||||
|
||||
/* Secure MoChi incoming access */
|
||||
#define SEC_MOCHI_IN_ACC_REG (MVEBU_RFU_BASE + 0x4738)
|
||||
#define SEC_MOCHI_IN_ACC_IHB0_EN (1)
|
||||
|
@ -124,7 +130,7 @@ static void mci_remap_indirect_access_base(void)
|
|||
uint32_t mci;
|
||||
|
||||
for (mci = 0; mci < MCI_MAX_UNIT_ID; mci++)
|
||||
mmio_write_32(MCIX4_REG_START_ADDRESS_REG(mci),
|
||||
mmio_write_32(MCIX4_807_REG_START_ADDR_REG(mci),
|
||||
MVEBU_MCI_REG_BASE_REMAP(mci) >>
|
||||
MCI_REMAP_OFF_SHIFT);
|
||||
}
|
||||
|
@ -186,6 +192,38 @@ static void misc_soc_configurations(void)
|
|||
mmio_write_32(MVEBU_SYSRST_OUT_CONFIG_REG, reg);
|
||||
}
|
||||
|
||||
/*
|
||||
* By default all external CPs start with configuration address space set to
|
||||
* 0xf200_0000. To overcome this issue, go in the loop and initialize the
|
||||
* CP one by one, using temporary window configuration which allows to access
|
||||
* each CP and update its configuration space according to decoding
|
||||
* windows scheme defined for each platform.
|
||||
*/
|
||||
void update_cp110_default_win(int cp_id)
|
||||
{
|
||||
int mci_id = cp_id - 1;
|
||||
uintptr_t cp110_base, cp110_temp_base;
|
||||
|
||||
/* CP110 default configuration address space */
|
||||
cp110_temp_base = MVEBU_AP_IO_BASE(MVEBU_AP0);
|
||||
|
||||
struct addr_map_win iowin_temp_win = {
|
||||
.base_addr = cp110_temp_base,
|
||||
.win_size = MVEBU_CP_OFFSET,
|
||||
};
|
||||
|
||||
iowin_temp_win.target_id = mci_id;
|
||||
iow_temp_win_insert(0, &iowin_temp_win, 1);
|
||||
|
||||
/* Calculate the new CP110 - base address */
|
||||
cp110_base = MVEBU_CP_REGS_BASE(cp_id);
|
||||
/* Go and update the CP110 configuration address space */
|
||||
iob_cfg_space_update(0, cp_id, cp110_temp_base, cp110_base);
|
||||
|
||||
/* Remove the temporary IO-WIN window */
|
||||
iow_temp_win_remove(0, &iowin_temp_win, 1);
|
||||
}
|
||||
|
||||
void ap_init(void)
|
||||
{
|
||||
/* Setup Aurora2. */
|
||||
|
|
|
@ -250,3 +250,6 @@ int ap_get_count(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void update_cp110_default_win(int cp_id)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -21,11 +21,13 @@ enum hws_freq {
|
|||
DDR_FREQ_SAR
|
||||
};
|
||||
|
||||
#include <mvebu_def.h>
|
||||
|
||||
enum cpu_clock_freq_mode {
|
||||
CPU_2000_DDR_1200_RCLK_1200 = 0x0,
|
||||
CPU_2000_DDR_1050_RCLK_1050 = 0x1,
|
||||
CPU_1600_DDR_800_RCLK_800 = 0x4,
|
||||
CPU_1800_DDR_1200_RCLK_1200 = 0x6,
|
||||
CPU_2200_DDR_1200_RCLK_1200 = 0x6,
|
||||
CPU_1800_DDR_1050_RCLK_1050 = 0x7,
|
||||
CPU_1600_DDR_900_RCLK_900 = 0x0B,
|
||||
CPU_1600_DDR_1050_RCLK_1050 = 0x0D,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef MCI_H
|
||||
#define MCI_H
|
||||
|
||||
int mci_initialize(int mci_index);
|
||||
int mci_link_tune(int mci_index);
|
||||
void mci_turn_link_down(void);
|
||||
void mci_turn_link_on(void);
|
||||
int mci_get_link_status(void);
|
||||
|
|
|
@ -13,5 +13,6 @@
|
|||
void ap_init(void);
|
||||
void ap_ble_init(void);
|
||||
int ap_get_count(void);
|
||||
void update_cp110_default_win(int cp_id);
|
||||
|
||||
#endif /* AP_SETUP_H */
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
# https://spdx.org/licenses
|
||||
#
|
||||
|
||||
include plat/marvell/a3700/common/a3700_common.mk
|
||||
include plat/marvell/armada/a3700/common/a3700_common.mk
|
||||
|
||||
include plat/marvell/common/marvell_common.mk
|
||||
include plat/marvell/armada/common/marvell_common.mk
|
|
@ -5,8 +5,8 @@
|
|||
# https://spdx.org/licenses
|
||||
#
|
||||
|
||||
MARVELL_PLAT_BASE := plat/marvell
|
||||
MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell
|
||||
MARVELL_PLAT_BASE := plat/marvell/armada
|
||||
MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell/armada
|
||||
PLAT_FAMILY := a3700
|
||||
PLAT_FAMILY_BASE := $(MARVELL_PLAT_BASE)/$(PLAT_FAMILY)
|
||||
PLAT_INCLUDE_BASE := $(MARVELL_PLAT_INCLUDE_BASE)/$(PLAT_FAMILY)
|
||||
|
@ -15,7 +15,7 @@ MARVELL_DRV_BASE := drivers/marvell
|
|||
MARVELL_COMMON_BASE := $(MARVELL_PLAT_BASE)/common
|
||||
HANDLE_EA_EL3_FIRST := 1
|
||||
|
||||
include $(MARVELL_PLAT_BASE)/marvell.mk
|
||||
include plat/marvell/marvell.mk
|
||||
|
||||
#*********** A3700 *************
|
||||
DOIMAGEPATH := $(WTP)
|
|
@ -14,6 +14,7 @@ DOIMAGE_SEC := tools/doimage/secure/sec_img_7K.cfg
|
|||
|
||||
MARVELL_MOCHI_DRV := drivers/marvell/mochi/apn806_setup.c
|
||||
|
||||
include plat/marvell/a8k/common/a8k_common.mk
|
||||
BOARD_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
|
||||
include plat/marvell/armada/a8k/common/a8k_common.mk
|
||||
|
||||
include plat/marvell/common/marvell_common.mk
|
||||
include plat/marvell/armada/common/marvell_common.mk
|
|
@ -14,6 +14,7 @@ DOIMAGE_SEC := tools/doimage/secure/sec_img_7K.cfg
|
|||
|
||||
MARVELL_MOCHI_DRV := drivers/marvell/mochi/apn806_setup.c
|
||||
|
||||
include plat/marvell/a8k/common/a8k_common.mk
|
||||
BOARD_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
|
||||
include plat/marvell/armada/a8k/common/a8k_common.mk
|
||||
|
||||
include plat/marvell/common/marvell_common.mk
|
||||
include plat/marvell/armada/common/marvell_common.mk
|
|
@ -52,7 +52,11 @@ static struct mv_ddr_topology_map board_topology_map = {
|
|||
MV_DDR_FREQ_SAR, /* frequency */
|
||||
0, 0, /* cas_l, cas_wl */
|
||||
MV_DDR_TEMP_LOW} }, /* temperature */
|
||||
#if DDR32
|
||||
MV_DDR_32BIT_ECC_PUP8_BUS_MASK, /* subphys mask */
|
||||
#else
|
||||
MV_DDR_64BIT_ECC_PUP8_BUS_MASK, /* subphys mask */
|
||||
#endif
|
||||
MV_DDR_CFG_SPD, /* ddr configuration data source */
|
||||
{ {0} }, /* raw spd data */
|
||||
{0}, /* timing parameters */
|
|
@ -14,6 +14,7 @@ DOIMAGE_SEC := tools/doimage/secure/sec_img_8K.cfg
|
|||
|
||||
MARVELL_MOCHI_DRV := drivers/marvell/mochi/apn806_setup.c
|
||||
|
||||
include plat/marvell/a8k/common/a8k_common.mk
|
||||
BOARD_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
|
||||
include plat/marvell/armada/a8k/common/a8k_common.mk
|
||||
|
||||
include plat/marvell/common/marvell_common.mk
|
||||
include plat/marvell/armada/common/marvell_common.mk
|
|
@ -14,7 +14,7 @@ DOIMAGE_SEC := tools/doimage/secure/sec_img_8K.cfg
|
|||
|
||||
MARVELL_MOCHI_DRV := drivers/marvell/mochi/apn806_setup.c
|
||||
|
||||
include plat/marvell/a8k/common/a8k_common.mk
|
||||
BOARD_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
|
||||
include plat/marvell/armada/a8k/common/a8k_common.mk
|
||||
|
||||
include plat/marvell/common/marvell_common.mk
|
||||
PLAT_INCLUDES += -Iplat/marvell/a8k/a80x0/board
|
||||
include plat/marvell/armada/common/marvell_common.mk
|
|
@ -7,11 +7,10 @@
|
|||
include tools/marvell/doimage/doimage.mk
|
||||
|
||||
PLAT_FAMILY := a8k
|
||||
PLAT_FAMILY_BASE := plat/marvell/$(PLAT_FAMILY)
|
||||
PLAT_INCLUDE_BASE := include/plat/marvell/$(PLAT_FAMILY)
|
||||
PLAT_COMMON_BASE := $(PLAT_FAMILY_BASE)/common
|
||||
PLAT_INCLUDE_BASE := include/plat/marvell/armada/$(PLAT_FAMILY)
|
||||
PLAT_COMMON_BASE := plat/marvell/armada/a8k/common
|
||||
MARVELL_DRV_BASE := drivers/marvell
|
||||
MARVELL_COMMON_BASE := plat/marvell/common
|
||||
MARVELL_COMMON_BASE := plat/marvell/armada/common
|
||||
|
||||
MARVELL_SVC_TEST := 0
|
||||
$(eval $(call add_define,MARVELL_SVC_TEST))
|
||||
|
@ -52,15 +51,15 @@ MARVELL_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
|
|||
drivers/arm/gic/v2/gicv2_helpers.c \
|
||||
plat/common/plat_gicv2.c
|
||||
|
||||
PLAT_INCLUDES := -I$(PLAT_FAMILY_BASE)/$(PLAT) \
|
||||
PLAT_INCLUDES := -I$(BOARD_DIR) \
|
||||
-I$(PLAT_COMMON_BASE)/include \
|
||||
-I$(PLAT_INCLUDE_BASE)/common
|
||||
|
||||
PLAT_BL_COMMON_SOURCES := $(PLAT_COMMON_BASE)/aarch64/a8k_common.c \
|
||||
drivers/ti/uart/aarch64/16550_console.S
|
||||
|
||||
BLE_PORTING_SOURCES := $(PLAT_FAMILY_BASE)/$(PLAT)/board/dram_port.c \
|
||||
$(PLAT_FAMILY_BASE)/$(PLAT)/board/marvell_plat_config.c
|
||||
BLE_PORTING_SOURCES := $(BOARD_DIR)/board/dram_port.c \
|
||||
$(BOARD_DIR)/board/marvell_plat_config.c
|
||||
|
||||
MARVELL_MOCHI_DRV += $(MARVELL_DRV_BASE)/mochi/cp110_setup.c
|
||||
|
||||
|
@ -87,7 +86,7 @@ MARVELL_DRV := $(MARVELL_DRV_BASE)/io_win.c \
|
|||
$(MARVELL_DRV_BASE)/comphy/phy-comphy-cp110.c \
|
||||
$(MARVELL_DRV_BASE)/mc_trustzone/mc_trustzone.c
|
||||
|
||||
BL31_PORTING_SOURCES := $(PLAT_FAMILY_BASE)/$(PLAT)/board/marvell_plat_config.c
|
||||
BL31_PORTING_SOURCES := $(BOARD_DIR)/board/marvell_plat_config.c
|
||||
|
||||
ifeq ($(SYSTEM_POWER_SUPPORT),1)
|
||||
BL31_PORTING_SOURCES += $(PLAT_FAMILY_BASE)/$(PLAT)/board/system_power.c
|
|
@ -13,7 +13,21 @@
|
|||
|
||||
#define CCU_HTC_ASET (MVEBU_CCU_BASE(MVEBU_AP0) + 0x264)
|
||||
#define MVEBU_IO_AFFINITY (0xF00)
|
||||
#define MVEBU_SF_REG (MVEBU_REGS_BASE + 0x40)
|
||||
#define MVEBU_SF_EN BIT(8)
|
||||
|
||||
#ifdef MVEBU_SOC_AP807
|
||||
static void plat_enable_snoop_filter(void)
|
||||
{
|
||||
int cpu_id = plat_my_core_pos();
|
||||
|
||||
/* Snoop filter needs to be enabled once per cluster */
|
||||
if (cpu_id % 2)
|
||||
return;
|
||||
|
||||
mmio_setbits_32(MVEBU_SF_REG, MVEBU_SF_EN);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void plat_enable_affinity(void)
|
||||
{
|
||||
|
@ -42,4 +56,8 @@ void marvell_psci_arch_init(int die_index)
|
|||
|
||||
/* Enable Affinity */
|
||||
plat_enable_affinity();
|
||||
|
||||
#ifdef MVEBU_SOC_AP807
|
||||
plat_enable_snoop_filter();
|
||||
#endif
|
||||
}
|
|
@ -8,7 +8,7 @@ MV_DDR_PATH ?= drivers/marvell/mv_ddr
|
|||
MV_DDR_LIB = $(CURDIR)/$(BUILD_PLAT)/ble/mv_ddr_lib.a
|
||||
LIBC_LIB = $(CURDIR)/$(BUILD_PLAT)/lib/libc.a
|
||||
BLE_LIBS = $(MV_DDR_LIB) $(LIBC_LIB)
|
||||
PLAT_MARVELL = plat/marvell
|
||||
PLAT_MARVELL = plat/marvell/armada
|
||||
|
||||
BLE_SOURCES += $(BLE_PATH)/ble_main.c \
|
||||
$(BLE_PATH)/ble_mem.S \
|
|
@ -5,7 +5,7 @@
|
|||
# https://spdx.org/licenses
|
||||
#
|
||||
|
||||
PLAT_MARVELL := plat/marvell
|
||||
PLAT_MARVELL := plat/marvell/armada
|
||||
A8K_MSS_SOURCE := $(PLAT_MARVELL)/a8k/common/mss
|
||||
|
||||
BL2_SOURCES += $(A8K_MSS_SOURCE)/mss_bl2_setup.c \
|
|
@ -116,18 +116,24 @@ void bl31_plat_arch_setup(void)
|
|||
marvell_bl31_plat_arch_setup();
|
||||
|
||||
for (cp = 0; cp < CP_COUNT; cp++) {
|
||||
/* configure cp110 for CP0*/
|
||||
if (cp == 1)
|
||||
mci_initialize(MVEBU_MCI0);
|
||||
if (cp >= 1)
|
||||
update_cp110_default_win(cp);
|
||||
|
||||
/* initialize MCI & CP1 */
|
||||
cp110_init(MVEBU_CP_REGS_BASE(cp),
|
||||
STREAM_ID_BASE + (cp * MAX_STREAM_ID_PER_CP));
|
||||
|
||||
/* Should be called only after setting IOB windows */
|
||||
marvell_bl31_mpp_init(cp);
|
||||
}
|
||||
|
||||
/*
|
||||
* There is need to configure IO_WIN windows again to overwrite
|
||||
* temporary configuration done during update_cp110_default_win
|
||||
*/
|
||||
init_io_win(MVEBU_AP0);
|
||||
|
||||
for (cp = 1; cp < CP_COUNT; cp++)
|
||||
mci_link_tune(cp - 1);
|
||||
|
||||
/* initialize IPC between MSS and ATF */
|
||||
if (mailbox[MBOX_IDX_MAGIC] != MVEBU_MAILBOX_MAGIC_NUM ||
|
||||
mailbox[MBOX_IDX_SUSPEND_MAGIC] != MVEBU_MAILBOX_SUSPEND_STATE)
|
|
@ -89,6 +89,12 @@
|
|||
(0x1 << AVS_SOFT_RESET_OFFSET) | \
|
||||
(0x1 << AVS_ENABLE_OFFSET))
|
||||
|
||||
#define AVS_CN9130_HIGH_CLK_VALUE ((0x80 << 24) | \
|
||||
(0x2dc << 13) | \
|
||||
(0x2dc << 3) | \
|
||||
(0x1 << AVS_SOFT_RESET_OFFSET) | \
|
||||
(0x1 << AVS_ENABLE_OFFSET))
|
||||
|
||||
#define MVEBU_AP_EFUSE_SRV_CTRL_REG (MVEBU_AP_GEN_MGMT_BASE + 0x8)
|
||||
#define EFUSE_SRV_CTRL_LD_SELECT_OFFS 6
|
||||
#define EFUSE_SRV_CTRL_LD_SEL_USER_MASK (1 << EFUSE_SRV_CTRL_LD_SELECT_OFFS)
|
||||
|
@ -224,10 +230,19 @@ static void ble_plat_avs_config(void)
|
|||
/* Check which SoC is running and act accordingly */
|
||||
if (ble_get_ap_type() == CHIP_ID_AP807) {
|
||||
/* Increase CPU voltage for higher CPU clock */
|
||||
if (freq_mode == CPU_2000_DDR_1200_RCLK_1200)
|
||||
switch (freq_mode) {
|
||||
case CPU_2000_DDR_1200_RCLK_1200:
|
||||
avs_val = AVS_A3900_HIGH_CLK_VALUE;
|
||||
else
|
||||
break;
|
||||
#ifdef MVEBU_SOC_AP807
|
||||
case CPU_2200_DDR_1200_RCLK_1200:
|
||||
avs_val = AVS_CN9130_HIGH_CLK_VALUE;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
avs_val = AVS_A3900_CLK_VALUE;
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Check which SoC is running and act accordingly */
|
||||
device_id = cp110_device_id_get(MVEBU_CP_REGS_BASE(0));
|
||||
|
@ -463,7 +478,6 @@ static void ble_plat_svc_config(void)
|
|||
NOTICE("SVC: DEV ID: %s, FREQ Mode: 0x%x\n",
|
||||
single_cluster == 0 ? "8040" : "8020", freq_pidi_mode);
|
||||
switch (freq_pidi_mode) {
|
||||
case CPU_1800_DDR_1200_RCLK_1200:
|
||||
case CPU_1800_DDR_1050_RCLK_1050:
|
||||
if (perr[1])
|
||||
goto perror;
|
|
@ -3,11 +3,11 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://spdx.org/licenses
|
||||
|
||||
MARVELL_PLAT_BASE := plat/marvell
|
||||
MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell
|
||||
MARVELL_PLAT_BASE := plat/marvell/armada
|
||||
MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell/armada
|
||||
|
||||
include $(MARVELL_PLAT_BASE)/version.mk
|
||||
include $(MARVELL_PLAT_BASE)/marvell.mk
|
||||
include plat/marvell/version.mk
|
||||
include plat/marvell/marvell.mk
|
||||
|
||||
VERSION_STRING +=(Marvell-${SUBVERSION})
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue