1d6aed566Sopenharmony_ci/*
2d6aed566Sopenharmony_ci * Copyright (c) 2022-2022 Huawei Device Co., Ltd. All rights reserved.
3d6aed566Sopenharmony_ci *
4d6aed566Sopenharmony_ci * Redistribution and use in source and binary forms, with or without modification,
5d6aed566Sopenharmony_ci * are permitted provided that the following conditions are met:
6d6aed566Sopenharmony_ci *
7d6aed566Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright notice, this list of
8d6aed566Sopenharmony_ci *    conditions and the following disclaimer.
9d6aed566Sopenharmony_ci *
10d6aed566Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11d6aed566Sopenharmony_ci *    of conditions and the following disclaimer in the documentation and/or other materials
12d6aed566Sopenharmony_ci *    provided with the distribution.
13d6aed566Sopenharmony_ci *
14d6aed566Sopenharmony_ci * 3. Neither the name of the copyright holder nor the names of its contributors may be used
15d6aed566Sopenharmony_ci *    to endorse or promote products derived from this software without specific prior written
16d6aed566Sopenharmony_ci *    permission.
17d6aed566Sopenharmony_ci *
18d6aed566Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19d6aed566Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20d6aed566Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21d6aed566Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22d6aed566Sopenharmony_ci * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23d6aed566Sopenharmony_ci * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24d6aed566Sopenharmony_ci * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25d6aed566Sopenharmony_ci * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26d6aed566Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27d6aed566Sopenharmony_ci * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28d6aed566Sopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29d6aed566Sopenharmony_ci */
30d6aed566Sopenharmony_ci
31d6aed566Sopenharmony_ci#ifndef _SOC_H
32d6aed566Sopenharmony_ci#define _SOC_H
33d6aed566Sopenharmony_ci
34d6aed566Sopenharmony_ci#define IRQn_Type              int
35d6aed566Sopenharmony_ci
36d6aed566Sopenharmony_ci#define __CM55_REV             0x0001
37d6aed566Sopenharmony_ci#define __NVIC_PRIO_BITS       3
38d6aed566Sopenharmony_ci#define __Vendor_SysTickConfig 0
39d6aed566Sopenharmony_ci#define __VTOR_PRESET          1
40d6aed566Sopenharmony_ci#define __MPU_PRESENT          1
41d6aed566Sopenharmony_ci#define __FPU_PRESENT          1
42d6aed566Sopenharmony_ci#define __DSP_PRESENT          1
43d6aed566Sopenharmony_ci#define ARM_MATH_HELIUM
44d6aed566Sopenharmony_ci
45d6aed566Sopenharmony_ci#define SysTick_IRQn           (-1)
46d6aed566Sopenharmony_ci#define PendSV_IRQn            (-2)
47d6aed566Sopenharmony_ci#define NonMaskableInt_IRQn    (-14)
48d6aed566Sopenharmony_ci#define MemoryManagement_IRQn  (-12)
49d6aed566Sopenharmony_ci#define BusFault_IRQn          (-11)
50d6aed566Sopenharmony_ci#define UsageFault_IRQn        (-10)
51d6aed566Sopenharmony_ci#define SVCall_IRQn            (-5)
52d6aed566Sopenharmony_ci
53d6aed566Sopenharmony_ci#define UART0_RX_IRQn          43
54d6aed566Sopenharmony_ci
55d6aed566Sopenharmony_ci#define SYSCLK_FREQ    25000000
56d6aed566Sopenharmony_ci
57d6aed566Sopenharmony_ci#define UART0_BASE     0x49303000
58d6aed566Sopenharmony_ci#define UART1_BASE     0x49304000
59d6aed566Sopenharmony_ci#define UART2_BASE     0x49305000
60d6aed566Sopenharmony_ci
61d6aed566Sopenharmony_ci#define UART0_CLK_FREQ SYSCLK_FREQ
62d6aed566Sopenharmony_ci#define UART0_BAUDRAT  115200
63d6aed566Sopenharmony_ci
64d6aed566Sopenharmony_ci#include "core_cm55.h"
65d6aed566Sopenharmony_ci
66d6aed566Sopenharmony_ci#endif
67d6aed566Sopenharmony_ci
68