mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 21:25:03 +00:00
In this CL, we add the following changes to support the CHIP_VARIANT npcx7m6xb and npcx7m7w: 1. Define the code RAM, data RAM, BBRAM base address/size. 2. Initialize the wov.c file for WoV driver development. (It will be compiled only when CHIP_VARIANT=npcx7m7w in the build.mk and CONFIG_WAKE_ON_VOICE is defined in board.h) 3. Fix the the incorrect offset of PWDWN_CTRL7 register. BRANCH=none BUG=none TEST=No build errors for make buildall. TEST=Change CHIP_VARIANT to npcx7m7w/npcx7m6xb in board/npcx7_evb/build.mk; "BOARD=npcx7_evb make"; Check ec image can be built. Flash the image on EVB; make sure EVB bootup. Change-Id: I87bccb9097f8f0a6c67f96a8d90adf201ae9e773 Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/858637 Commit-Ready: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Randall Spangler <rspangler@chromium.org>
73 lines
2.5 KiB
C
73 lines
2.5 KiB
C
/* Copyright 2015 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_CONFIG_FLASH_LAYOUT_H
|
|
#define __CROS_EC_CONFIG_FLASH_LAYOUT_H
|
|
|
|
/*
|
|
* npcx flash layout:
|
|
* - Memory-mapped external SPI.
|
|
* - Image header at the beginning of protected region, followed by RO image.
|
|
* - RW image starts at the second half of flash.
|
|
*/
|
|
|
|
/* Memmapped, external SPI */
|
|
#define CONFIG_EXTERNAL_STORAGE
|
|
#define CONFIG_MAPPED_STORAGE
|
|
/* Storage is memory-mapped, but program runs from SRAM */
|
|
#define CONFIG_MAPPED_STORAGE_BASE 0x64000000
|
|
#undef CONFIG_FLASH_PSTATE
|
|
|
|
#if defined(CHIP_VARIANT_NPCX5M5G)
|
|
#define CONFIG_EC_PROTECTED_STORAGE_OFF 0
|
|
#define CONFIG_EC_PROTECTED_STORAGE_SIZE 0x20000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_OFF 0x20000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_SIZE 0x20000
|
|
#elif defined(CHIP_VARIANT_NPCX5M6G)
|
|
#define CONFIG_EC_PROTECTED_STORAGE_OFF 0
|
|
#define CONFIG_EC_PROTECTED_STORAGE_SIZE 0x40000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_OFF 0x40000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_SIZE 0x40000
|
|
#elif defined(CHIP_VARIANT_NPCX7M6F) || defined(CHIP_VARIANT_NPCX7M6G) || \
|
|
defined(CHIP_VARIANT_NPCX7M6XB)
|
|
#define CONFIG_EC_PROTECTED_STORAGE_OFF 0
|
|
#define CONFIG_EC_PROTECTED_STORAGE_SIZE 0x40000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_OFF 0x40000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_SIZE 0x40000
|
|
#elif defined(CHIP_VARIANT_NPCX7M7W)
|
|
#define CONFIG_EC_PROTECTED_STORAGE_OFF 0
|
|
#define CONFIG_EC_PROTECTED_STORAGE_SIZE 0x80000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_OFF 0x80000
|
|
#define CONFIG_EC_WRITABLE_STORAGE_SIZE 0x80000
|
|
#else
|
|
#error "Unsupported chip variant"
|
|
#endif
|
|
|
|
/* Header support which is used by booter to copy FW from flash to code ram */
|
|
#define NPCX_RO_HEADER
|
|
#define CONFIG_RO_HDR_MEM_OFF 0x0
|
|
#define CONFIG_RO_HDR_SIZE 0x40
|
|
|
|
#define CONFIG_WP_STORAGE_OFF CONFIG_EC_PROTECTED_STORAGE_OFF
|
|
#define CONFIG_WP_STORAGE_SIZE CONFIG_EC_PROTECTED_STORAGE_SIZE
|
|
|
|
/* RO firmware in program memory - use all of program memory */
|
|
#define CONFIG_RO_MEM_OFF 0
|
|
#define CONFIG_RO_SIZE NPCX_PROGRAM_MEMORY_SIZE
|
|
|
|
/*
|
|
* RW firmware in program memory - Identical to RO, only one image loaded at
|
|
* a time.
|
|
*/
|
|
#define CONFIG_RW_MEM_OFF CONFIG_RO_MEM_OFF
|
|
#define CONFIG_RW_SIZE CONFIG_RO_SIZE
|
|
|
|
/* RO image resides at start of protected region, right after header */
|
|
#define CONFIG_RO_STORAGE_OFF CONFIG_RO_HDR_SIZE
|
|
/* RW image resides at start of writable region */
|
|
#define CONFIG_RW_STORAGE_OFF 0
|
|
|
|
#endif /* __CROS_EC_CONFIG_FLASH_LAYOUT_H */
|