/*******************************************************************************
 * DISCLAIMER
 * This software is supplied by Renesas Electronics Corporation and is only
 * intended for use with Renesas products. No other uses are authorized. This
 * software is owned by Renesas Electronics Corporation and is protected under
 * all applicable laws, including copyright laws.
 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 * Renesas reserves the right, without notice, to make changes to this software
 * and to discontinue the availability of this software. By using this software,
 * you agree to the additional terms and conditions found by accessing the
 * following link:
 * http://www.renesas.com/disclaimer
 * Copyright 2021-2023 Renesas Electronics Corporation All rights reserved.
 *******************************************************************************/

/*******************************************************************************
 * DESCRIPTION   : MCU register header
 ******************************************************************************/

#ifndef MCU_REGISTER_H_
#define MCU_REGISTER_H_

#include <remap_register.h>

/* The Base is remapped in the IPL, and the address is calculated and accessed
 * by adding the offset to the remapped address. */
#define MCU_BASE        (BASE_MCU_ADDR)

/* SCDS0 (0xD8F00800) */
#define MCU_ICUM_OPBT0          (MCU_BASE + 0x09C0U)
#define MCU_ICUM_OPBT1          (MCU_BASE + 0x09C4U)
#define MCU_ICUM_OPBT2          (MCU_BASE + 0x09C8U)
#define MCU_ICUM_OPBT4          (MCU_BASE + 0x09D0U)
#define MCU_ICUM_OPBT5          (MCU_BASE + 0x09D4U)
#define MCU_ICUM_OPBT6          (MCU_BASE + 0x09D8U)
#define MCU_ICUM_OPBT7          (MCU_BASE + 0x09DCU)
#define MCU_GREG120             (MCU_BASE + 0x09E0U)

/* SCDS2 (0xD8F00C00) */
#define MCU_RESET_VECTOR_PE0    (MCU_BASE + 0x0C00U)
#define MCU_RESET_VECTOR_PE1    (MCU_BASE + 0x0C04U)
#define MCU_OPBT0               (MCU_BASE + 0x0C20U)
#define MCU_OPBT1               (MCU_BASE + 0x0C24U)
#define MCU_OPBT2               (MCU_BASE + 0x0C28U)
#define MCU_OPBT3               (MCU_BASE + 0x0C2CU)
#define MCU_OPBT4               (MCU_BASE + 0x0C30U)
#define MCU_OPBT6               (MCU_BASE + 0x0C38U)
#define MCU_OPBT7               (MCU_BASE + 0x0C3CU)
#define MCU_OPBT8               (MCU_BASE + 0x0C40U)
#define MCU_OPBT9               (MCU_BASE + 0x0C44U)
#define MCU_OPBT96              (MCU_BASE + 0x0CA0U)

/* MCCR_SELB0 (0xD8F01000) */
#define MCU_OPBT_STAT           (MCU_BASE + 0x1000U)
#define MCU_OPBT_CTRL           (MCU_BASE + 0x1004U)
#define MCU_G4MH_BOOT_CTLR      (MCU_BASE + 0x1008U)
#define MCU_ICUMH_BOOT_CTLR     (MCU_BASE + 0x100CU)
#define MCU_BOOT_STAT           (MCU_BASE + 0x1024U)

/* MCCR_SELB1 (0xD8F02000) */

/* HBG (0xD8F12000) */
#define MCU_HBG_CS0_HBGPROT0     (MCU_BASE + 0x00012000U)
#define MCU_HBG_CS1_HBGPROT0     (MCU_BASE + 0x00012100U)
#define MCU_HBG_CS2_HBGPROT0     (MCU_BASE + 0x00012200U)
#define MCU_HBG_CS3_HBGPROT0     (MCU_BASE + 0x00012300U)
#define MCU_HBG_CS4_HBGPROT0     (MCU_BASE + 0x00012400U)
#define MCU_HBG_CS5_HBGPROT0     (MCU_BASE + 0x00012500U)
#define MCU_HBG_DS_HBGPROT0      (MCU_BASE + 0x00012600U)
#define MCU_HBG_PFS_HBGPROT0     (MCU_BASE + 0x00012700U)
#define MCU_HBG_SOCM_HBGPROT0    (MCU_BASE + 0x00012800U)
#define MCU_HBG_SOCS_HBGPROT0    (MCU_BASE + 0x00012900U)

/* HBGSLVER (0xD8F19000) */
#define MCU_HBGSLVER_CS0_HBGKCPROT      (MCU_BASE + 0x00019018U)
#define MCU_HBGSLVER_CS1_HBGKCPROT      (MCU_BASE + 0x00019118U)
#define MCU_HBGSLVER_CS2_HBGKCPROT      (MCU_BASE + 0x00019218U)
#define MCU_HBGSLVER_CS3_HBGKCPROT      (MCU_BASE + 0x00019318U)
#define MCU_HBGSLVER_CS4_HBGKCPROT      (MCU_BASE + 0x00019418U)
#define MCU_HBGSLVER_CS5_HBGKCPROT      (MCU_BASE + 0x00019518U)
#define MCU_HBGSLVER_DS_HBGKCPROT       (MCU_BASE + 0x00019618U)
#define MCU_HBGSLVER_PFS_HBGKCPROT      (MCU_BASE + 0x00019718U)
#define MCU_HBGSLVER_SOCM_HBGKCPROT     (MCU_BASE + 0x00019818U)
#define MCU_HBGSLVER_SOCS_HBGKCPROT     (MCU_BASE + 0x00019918U)

/* PBG (0xD8F01800) */
#define MCUAXI_PBG_PBGPROT0_0       (MCU_BASE + 0x1800U)
#define MCUAXI_PBG_PBGPROT0_1       (MCU_BASE + 0x1808U)
#define MCUAXI_PBG_PBGPROT0_2       (MCU_BASE + 0x1810U)
#define MCUAXI_PBG_PBGPROT0_3       (MCU_BASE + 0x1818U)
#define MCUAXI_PBG_PBGPROT0_4       (MCU_BASE + 0x1820U)
#define MCUAXI_PBG_PBGPROT0_5       (MCU_BASE + 0x1828U)
#define MCUAXI_PBG_PBGPROT0_6       (MCU_BASE + 0x1830U)
#define MCUAXI_PBG_ERRSLV_PBGKCPROT (MCU_BASE + 0x00018118U)


/* CSRM (0xD8F10000) */
#define MCU_CSRM0ECCCTL     (MCU_BASE + 0x00010000U)
#define MCU_CSRM1ECCCTL     (MCU_BASE + 0x00010100U)
#define MCU_CSRM2ECCCTL     (MCU_BASE + 0x00010200U)
#define MCU_CSRM3ECCCTL     (MCU_BASE + 0x00010300U)
#define MCU_CSRM4ECCCTL     (MCU_BASE + 0x00010400U)
#define MCU_CSRM5ECCCTL     (MCU_BASE + 0x00010500U)
#define MCU_CSRM0APCTL      (MCU_BASE + 0x00010050U)
#define MCU_CSRM1APCTL      (MCU_BASE + 0x00010150U)
#define MCU_CSRM2APCTL      (MCU_BASE + 0x00010250U)
#define MCU_CSRM3APCTL      (MCU_BASE + 0x00010350U)
#define MCU_CSRM4APCTL      (MCU_BASE + 0x00010450U)
#define MCU_CSRM5APCTL      (MCU_BASE + 0x00010550U)
#define MCU_CSRM0CSIFCODE   (MCU_BASE + 0x00010080U)
#define MCU_CSRM1CSIFCODE   (MCU_BASE + 0x00010180U)
#define MCU_CSRM2CSIFCODE   (MCU_BASE + 0x00010280U)
#define MCU_CSRM3CSIFCODE   (MCU_BASE + 0x00010380U)
#define MCU_CSRM4CSIFCODE   (MCU_BASE + 0x00010480U)
#define MCU_CSRM5CSIFCODE   (MCU_BASE + 0x00010580U)

#endif /* MCU_REGISTER_H_ */
