Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.o
*.Po
*.so*
*~
*.a
*.la
Expand Down
33 changes: 29 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,24 @@ case "$with_platform" in
AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
;;
suecreek*)

PLATFORM_LDSCRIPT="suecreek.x"
AC_SUBST(PLATFORM_LDSCRIPT)

PLATFORM="suecreek"
AC_SUBST(PLATFORM)

FW_NAME="sue"
AC_SUBST(FW_NAME)

XTENSA_CORE="hifi4_std"
AC_SUBST(XTENSA_CORE)

AC_DEFINE([CONFIG_SUECREEK], [1], [Configure for Suecreek])
AC_DEFINE([CONFIG_BOOT_LOADER], [1], [Configure Boot Loader])
AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
;;
icelake*)

PLATFORM_LDSCRIPT="icelake.x"
Expand Down Expand Up @@ -333,11 +351,12 @@ AM_CONDITIONAL(BUILD_HASWELL, test "$FW_NAME" = "hsw")
AM_CONDITIONAL(BUILD_BROADWELL, test "$FW_NAME" = "bdw")
AM_CONDITIONAL(BUILD_APOLLOLAKE, test "$FW_NAME" = "apl")
AM_CONDITIONAL(BUILD_CANNONLAKE, test "$FW_NAME" = "cnl")
AM_CONDITIONAL(BUILD_SUECREEK, test "$FW_NAME" = "sue")
AM_CONDITIONAL(BUILD_ICELAKE, test "$FW_NAME" = "icl")
AM_CONDITIONAL(BUILD_BOOTLOADER, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
AM_CONDITIONAL(BUILD_CAVS, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
AM_CONDITIONAL(BUILD_MODULE, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
AM_CONDITIONAL(BUILD_APL_SSP, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
AM_CONDITIONAL(BUILD_BOOTLOADER, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")
AM_CONDITIONAL(BUILD_CAVS, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")
AM_CONDITIONAL(BUILD_MODULE, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")
AM_CONDITIONAL(BUILD_APL_SSP, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")

# DSP core support (Optional)
AC_ARG_WITH([dsp-core],
Expand Down Expand Up @@ -533,6 +552,12 @@ AC_CONFIG_FILES([
src/platform/cannonlake/include/arch/xtensa/Makefile
src/platform/cannonlake/include/arch/xtensa/config/Makefile
src/platform/cannonlake/include/platform/Makefile
src/platform/suecreek/Makefile
src/platform/suecreek/include/Makefile
src/platform/suecreek/include/arch/Makefile
src/platform/suecreek/include/arch/xtensa/Makefile
src/platform/suecreek/include/arch/xtensa/config/Makefile
src/platform/suecreek/include/platform/Makefile
src/platform/icelake/Makefile
src/platform/icelake/include/Makefile
src/platform/icelake/include/arch/Makefile
Expand Down
21 changes: 21 additions & 0 deletions rimage/manifest.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,11 @@ static int man_write_fw_meu(struct image *image)
#define CNL_DSP_IMR_BASE_ENTRY 0xb0038000
#define CNL_DSP_HP_BASE_ENTRY 0xbe040000

#define ADSP_SUE_DSP_ROM_BASE 0xBEFE0000
#define ADSP_SUE_DSP_ROM_SIZE 0x00002000
#define SUE_DSP_IMR_BASE_ENTRY 0xb0038000
#define SUE_DSP_HP_BASE_ENTRY 0xbe000000

#define ADSP_ICL_DSP_ROM_BASE 0xBEFE0000
#define ADSP_ICL_DSP_ROM_SIZE 0x00002000
#define ICL_DSP_IMR_BASE_ENTRY 0xb0038000
Expand Down Expand Up @@ -879,3 +884,19 @@ const struct adsp machine_icl = {
.write_firmware_meu = man_write_fw_meu,
.man = &cnl_manifest, // use the same as CNL
};

const struct adsp machine_sue = {
.name = "sue",
.rom_base = ADSP_SUE_DSP_ROM_BASE,
.rom_size = ADSP_SUE_DSP_ROM_SIZE,
.imr_base = SUE_DSP_IMR_BASE_ENTRY,
.imr_size = 0x100000,
.sram_base = SUE_DSP_HP_BASE_ENTRY,
.sram_size = 0x100000,
.image_size = 0x100000,
.dram_offset = 0,
.machine_id = MACHINE_SUECREEK,
.write_firmware = man_write_fw,
.write_firmware_meu = man_write_fw_meu,
.man = &cnl_manifest,
};
1 change: 1 addition & 0 deletions rimage/rimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ static const struct adsp *machine[] = {
&machine_apl,
&machine_cnl,
&machine_icl,
&machine_sue,
};

static void usage(char *name)
Expand Down
2 changes: 2 additions & 0 deletions rimage/rimage.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enum machine_id {
MACHINE_APOLLOLAKE,
MACHINE_CANNONLAKE,
MACHINE_ICELAKE,
MACHINE_SUECREEK,
MACHINE_MAX
};

Expand Down Expand Up @@ -177,5 +178,6 @@ extern const struct adsp machine_bdw;
extern const struct adsp machine_apl;
extern const struct adsp machine_cnl;
extern const struct adsp machine_icl;
extern const struct adsp machine_sue;

#endif
10 changes: 9 additions & 1 deletion scripts/xtensa-build-all.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl icl)
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl sue icl)
if [ "$#" -eq 0 ]
then
PLATFORMS=${SUPPORTED_PLATFORMS[@]}
Expand Down Expand Up @@ -116,6 +116,14 @@ do
HOST="xtensa-cnl-elf"
XTENSA_TOOLS_VERSION="RF-2016.4-linux"
fi
if [ $j == "sue" ]
then
PLATFORM="suecreek"
XTENSA_CORE="X6H3CNL_2016_4_linux"
ROOT="$pwd/../xtensa-root/xtensa-cnl-elf"
HOST="xtensa-cnl-elf"
XTENSA_TOOLS_VERSION="RF-2016.4-linux"
fi
if [ $j == "icl" ]
then
PLATFORM="icelake"
Expand Down
4 changes: 4 additions & 0 deletions src/arch/xtensa/boot_entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ l2_cache_pref:
sof_stack_base:
.word SOF_STACK_BASE

#if !defined CONFIG_SUECREEK
wnd0_base:
.word DMWBA(0)

Expand All @@ -85,6 +86,7 @@ wnd0_status_address:

wnd0_error_address:
.word HP_SRAM_WIN0_BASE | 0x4
#endif

fw_loaded_status_value:
.word 0x00000005
Expand Down Expand Up @@ -112,6 +114,7 @@ boot_init:
l32r a3, sof_stack_base
mov sp, a3

#if !defined CONFIG_SUECREEK
/* set status register to 0x00000005 in wnd0 */
l32r a3, fw_loaded_status_value
l32r a5, wnd0_status_address
Expand All @@ -132,6 +135,7 @@ boot_init:
l32r a5, wnd0_base_val
s32i a5, a3, 0
memw
#endif

#if (XCHAL_DCACHE_IS_COHERENT || XCHAL_LOOP_BUFFER_SIZE) && \
XCHAL_HW_MIN_VERSION >= XTENSA_HWVERSION_RE_2012_0
Expand Down
11 changes: 9 additions & 2 deletions src/arch/xtensa/boot_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
#include <platform/platform.h>
#include <platform/memory.h>

#if defined CONFIG_SUECREEK
#define MANIFEST_BASE BOOT_LDR_MANIFEST_BASE
#else
#define MANIFEST_BASE IMR_BOOT_LDR_MANIFEST_BASE
#endif

/* entry point to main firmware */
extern void _ResetVector(void);

Expand Down Expand Up @@ -105,7 +111,7 @@ static void parse_module(struct sof_man_fw_header *hdr,
static void parse_manifest(void)
{
struct sof_man_fw_desc *desc =
(struct sof_man_fw_desc *)IMR_BOOT_LDR_MANIFEST_BASE;
(struct sof_man_fw_desc *)MANIFEST_BASE;
struct sof_man_fw_header *hdr = &desc->header;
struct sof_man_module *mod;
int i;
Expand All @@ -121,7 +127,8 @@ static void parse_manifest(void)
#endif

/* power on HPSRAM */
#if defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
#if defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE) \
|| defined(CONFIG_SUECREEK)
static int32_t hp_sram_init(void)
{
int delay_count = 256;
Expand Down
9 changes: 9 additions & 0 deletions src/arch/xtensa/smp/hal/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ PLATFORM_DEFS = \
$(CACHE_DEFS)
endif

if BUILD_SUECREEK
PLATFORM_DEFS = \
$(STATE_DEFS_CNL) \
$(DISASS_DEFS) \
$(MISC_DEFS) \
$(INTERRUPTS_DEFS) \
$(CACHE_DEFS)
endif

noinst_LIBRARIES = libhal.a

libhal_a_SOURCES = \
Expand Down
6 changes: 6 additions & 0 deletions src/arch/xtensa/smp/xtos/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ noinst_LIBRARIES += libxlevel6.a
VECTOR_DEFS += -D__SPLIT__level6
endif

if BUILD_SUECREEK
PLATFORM_DEFS = $(VECTOR_DEFS)
noinst_LIBRARIES += libxlevel6.a
VECTOR_DEFS += -D__SPLIT__level6
endif

LEVEL_SRC = \
int-handler.S \
int-vector.S \
Expand Down
10 changes: 10 additions & 0 deletions src/arch/xtensa/up/hal/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ PLATFORM_DEFS = \
$(CACHE_DEFS)
endif

if BUILD_SUECREEK
PLATFORM_DEFS = \
$(STATE_DEFS_CNL) \
$(DISASS_DEFS) \
$(MISC_DEFS) \
$(INTERRUPTS_DEFS) \
$(CACHE_DEFS)
endif


noinst_LIBRARIES = libhal.a

libhal_a_SOURCES = \
Expand Down
8 changes: 5 additions & 3 deletions src/drivers/intel/cavs/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ static const struct freq_table cpu_freq[] = {
{200000000, 200000, 0x1},
{400000000, 400000, 0x0}, /* default */
};
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE) \
|| defined(CONFIG_SUECREEK)
static const struct freq_table cpu_freq[] = {
{120000000, 120000, 0x0},
{400000000, 400000, 0x4},
Expand All @@ -93,7 +94,7 @@ static const struct freq_table ssp_freq[] = {
{19200000, 19200, }, /* default */
{24576000, 24576, },
};
#elif defined(CONFIG_CANNONLAKE)
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_SUECREEK)
static const struct freq_table ssp_freq[] = {
{19200000, 19200, },
{24000000, 24000, }, /* default */
Expand All @@ -108,7 +109,8 @@ static const struct freq_table ssp_freq[] = {
#if defined(CONFIG_APOLLOLAKE)
#define CPU_DEFAULT_IDX 2
#define SSP_DEFAULT_IDX 0
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE) \
|| defined(CONFIG_SUECREEK)
#define CPU_DEFAULT_IDX 1
#define SSP_DEFAULT_IDX 1
#endif
Expand Down
10 changes: 5 additions & 5 deletions src/drivers/intel/dw-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
#define DW_CFG_HIGH_DEF 0x0

#elif defined(CONFIG_APOLLOLAKE) || defined(CONFIG_CANNONLAKE) \
|| defined(CONFIG_ICELAKE)
|| defined(CONFIG_ICELAKE) || defined CONFIG_SUECREEK

/* CTL_LO */
#define DW_CTLL_S_GATH_EN (1 << 17)
Expand Down Expand Up @@ -245,7 +245,7 @@

/* HW Linked list support, only enabled for APL/CNL at the moment */
#if defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_ICELAKE
|| defined CONFIG_ICELAKE || defined CONFIG_SUECREEK
#define DW_USE_HW_LLI 1
#else
#define DW_USE_HW_LLI 0
Expand Down Expand Up @@ -803,7 +803,7 @@ static int dw_dma_set_config(struct dma *dma, int channel,
/* set transfer size of element */
#if defined CONFIG_BAYTRAIL || defined CONFIG_CHERRYTRAIL \
|| defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_ICELAKE
|| defined CONFIG_ICELAKE || defined CONFIG_SUECREEK
lli_desc->ctrl_hi = DW_CTLH_CLASS(p->class) |
(sg_elem->size & DW_CTLH_BLOCK_TS_MASK);
#elif defined CONFIG_BROADWELL || defined CONFIG_HASWELL
Expand Down Expand Up @@ -923,7 +923,7 @@ static inline void dw_dma_chan_reload_next(struct dma *dma, int channel,
/* set transfer size of element */
#if defined CONFIG_BAYTRAIL || defined CONFIG_CHERRYTRAIL \
|| defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_ICELAKE
|| defined CONFIG_ICELAKE || defined CONFIG_SUECREEK
lli->ctrl_hi = DW_CTLH_CLASS(p->class) |
(next->size & DW_CTLH_BLOCK_TS_MASK);
#elif defined CONFIG_BROADWELL || defined CONFIG_HASWELL
Expand Down Expand Up @@ -994,7 +994,7 @@ static void dw_dma_setup(struct dma *dma)
for (i = 0; i < DW_MAX_CHAN; i++) {
#if defined CONFIG_BAYTRAIL || defined CONFIG_CHERRYTRAIL \
|| defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_ICELAKE
|| defined CONFIG_ICELAKE || defined CONFIG_SUECREEK
dw_write(dma, DW_CTRL_HIGH(i),
DW_CTLH_CLASS(dp->chan[i].class));
#elif defined CONFIG_BROADWELL || defined CONFIG_HASWELL
Expand Down
2 changes: 1 addition & 1 deletion src/include/sof/dmic.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#define DMIC_HW_IOCLK 19200000
#endif

#if defined CONFIG_CANNONLAKE
#if defined CONFIG_CANNONLAKE || defined CONFIG_SUECREEK
#define DMIC_HW_VERSION 1
#define DMIC_HW_CONTROLLERS 2
#define DMIC_HW_IOCLK 24000000
Expand Down
7 changes: 4 additions & 3 deletions src/include/sof/ssp.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ extern const struct dai_ops ssp_ops;
#define SSCR2_ASRC_FRM_CNRT_EN BIT(10)
#define SSCR2_ASRC_INTR_MASK BIT(11)
#elif defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_ICELAKE \
|| defined CONFIG_ICELAKE || defined CONFIG_SUECREEK \
|| defined CONFIG_HASWELL || defined CONFIG_BROADWELL
#define SSCR2_TURM1 BIT(1)
#define SSCR2_PSPSRWFDFD BIT(3)
Expand Down Expand Up @@ -173,7 +173,7 @@ extern const struct dai_ops ssp_ops;
#define SSPSP2_FEP_MASK 0xff

#if defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_ICELAKE
|| defined CONFIG_ICELAKE || defined CONFIG_SUECREEK
#define SSCR3 0x48
#define SSIOC 0x4C

Expand Down Expand Up @@ -211,6 +211,7 @@ extern const struct dai_ops ssp_ops;
#define SFIFOL_RFL(x) ((x) >> 16)

#if defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_SUECREEK \
|| defined CONFIG_ICELAKE \
|| defined CONFIG_HASWELL || defined CONFIG_BROADWELL
#define SSTSA_TSEN BIT(8)
Expand All @@ -229,7 +230,7 @@ extern const struct dai_ops ssp_ops;
#endif

#if defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE \
|| defined CONFIG_ICELAKE
|| defined CONFIG_ICELAKE || defined CONFIG_SUECREEK
#define MNDSS(x) ((x) << 20)
#define MCDSS(x) ((x) << 16)
#endif
Expand Down
8 changes: 8 additions & 0 deletions src/ipc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ libsof_ipc_a_SOURCES = \
dma-copy.c
endif

if BUILD_SUECREEK
libsof_ipc_a_SOURCES = \
ipc.c \
handler.c \
sue-ipc.c \
dma-copy.c
endif

if BUILD_ICELAKE
libsof_ipc_a_SOURCES = \
ipc.c \
Expand Down
Loading