1 /****************************************************************************** 2 * Copyright 2019-2020 Microchip FPGA Embedded Systems Solutions. 3 * 4 * SPDX-License-Identifier: MIT 5 * 6 * Register bit offsets and masks definitions for PolarFire SoC MSS RTC Driver. 7 8 */ 9 #ifndef MSS_RTC_REG_H__ 10 #define MSS_RTC_REG_H__ 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 #include "mpfs_hal/mss_hal.h" 17 18 /******************************************************************************/ 19 /* Device Specific Peripheral registers structures */ 20 /******************************************************************************/ 21 typedef struct 22 { 23 volatile uint32_t CONTROL_REG ; 24 volatile uint32_t MODE_REG ; 25 volatile uint32_t PRESCALER_REG ; 26 volatile uint32_t ALARM_LOWER_REG ; 27 volatile uint32_t ALARM_UPPER_REG ; 28 volatile uint32_t COMPARE_LOWER_REG ; 29 volatile uint32_t COMPARE_UPPER_REG ; 30 uint32_t RESERVED0 ; 31 volatile uint32_t DATE_TIME_LOWER_REG ; 32 volatile uint32_t DATE_TIME_UPPER_REG ; 33 34 uint32_t RESERVED1[2] ; 35 volatile uint32_t SECONDS_REG ; 36 volatile uint32_t MINUTES_REG ; 37 volatile uint32_t HOURS_REG ; 38 volatile uint32_t DAY_REG ; 39 volatile uint32_t MONTH_REG ; 40 volatile uint32_t YEAR_REG ; 41 volatile uint32_t WEEKDAY_REG ; 42 volatile uint32_t WEEK_REG ; 43 44 volatile uint32_t SECONDS_CNT_REG ; 45 volatile uint32_t MINUTES_CNT_REG ; 46 volatile uint32_t HOURS_CNT_REG ; 47 volatile uint32_t DAY_CNT_REG ; 48 volatile uint32_t MONTH_CNT_REG ; 49 volatile uint32_t YEAR_CNT_REG ; 50 volatile uint32_t WEEKDAY_CNT_REG ; 51 volatile uint32_t WEEK_CNT_REG ; 52 } RTC_TypeDef; 53 54 /******************************************************************************/ 55 /* Peripheral declaration */ 56 /******************************************************************************/ 57 #define MSS_RTC_LO_ADDR 0x20124000u 58 #define MSS_RTC_HI_ADDR 0x28124000u 59 60 #define COMPARE_ALL_BITS 0xFFFFFFFFu 61 62 #ifdef __cplusplus 63 } 64 #endif 65 66 #endif /* MSS_RTC_REG_H__ */ 67 68