/*
 * This work is part of the White Rabbit project
 *
 * Released according to the GNU GPL, version 2 or any later version.
 */
#ifndef __BOARD_WRS_10G_H
#define __BOARD_WRS_10G_H


#ifndef CONFIG_ARCH_RISCV
    #error wrsv4 board requires CONFIG_ARCH_RISCV
#endif

#define DEV_BASE	0x100000

#define SI57X_I2C_ADDR 0x55

#define TICS_PER_SECOND 100000

#define CPU_CLOCK             62500000
#define REF_CLOCK_FREQ_HZ     62500000
#define NS_PER_CLOCK          16
#define REF_CLOCK_PERIOD_PS   16000


#define BOARD_CONSOLE_DEVICES 1
#define BOARD_USE_EVENTS 0


#define UART_BAUDRATE 115200

/* RT CPU Memory layout */
#define BASE_UART (DEV_BASE + 0x10000)
#define BASE_SOFTPLL (DEV_BASE + 0x10100)
#define BASE_SPI (DEV_BASE + 0x10200)
#define BASE_GPIO (DEV_BASE + 0x10300)
#define BASE_TIMER (DEV_BASE + 0x10400)
#define BASE_PPS_GEN (DEV_BASE + 0x10500)
#define BASE_SPI_LJD_BOARD (DEV_BASE + 0x10700)
#define BASE_SI57X_INTERFACE (DEV_BASE + 0x10800)

/* spll parameter that are board-specific */
#define BOARD_DIVIDE_DMTD_CLOCKS	0
#define BOARD_MAX_CHAN_REF		18
#define BOARD_MAX_CHAN_AUX		1
#define BOARD_MAX_PTRACKERS		18

#define CONSOLE_UART_BAUDRATE 115200
#define BOARD_MAX_CONSOLE_DEVICES 1

// fixme:
//#define CONFIG_WR_SWITCH_V4

#endif
