1 /*
2  * Copyright (c) 2021 Microchip Technology Inc. and its subsidiaries.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef MEC172X_DEFS_H
8 #define MEC172X_DEFS_H
9 
10 #include <stddef.h>
11 #include <stdint.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*
18  * Delay register address. Write n to delay for n + 1 microseconds where
19  * 0 <= n <= 31.
20  * Implementation stalls the CPU fetching instructions including blocking
21  * interrupts.
22  */
23 #define MCHP_DELAY_US_ADDR		0x08000000u
24 
25 /* ARM Cortex-M4 input clock from PLL */
26 #define MCHP_EC_CLOCK_INPUT_HZ		96000000u
27 
28 #define MCHP_ACMP_INSTANCES		1
29 #define MCHP_ACPI_EC_INSTANCES		5
30 #define MCHP_ACPI_PM1_INSTANCES		1
31 #define MCHP_ADC_INSTANCES		1
32 #define MCHP_BCL_INSTANCES		1
33 #define MCHP_BTMR16_INSTANCES		4
34 #define MCHP_BTMR32_INSTANCES		2
35 #define MCHP_CCT_INSTANCES		1
36 #define MCHP_CTMR_INSTANCES		4
37 #define MCHP_DMA_INSTANCES		1
38 #define MCHP_ECIA_INSTANCES		1
39 #define MCHP_EMI_INSTANCES		3
40 #define MCHP_HTMR_INSTANCES		2
41 #define MCHP_I2C_INSTANCES		0
42 #define MCHP_I2C_SMB_INSTANCES		5
43 #define MCHP_LED_INSTANCES		4
44 #define MCHP_MBOX_INSTANCES		1
45 #define MCHP_OTP_INSTANCES		1
46 #define MCHP_P80BD_INSTANCES		1
47 #define MCHP_PECI_INSTANCES		1
48 #define MCHP_PROCHOT_INSTANCES		1
49 #define MCHP_PS2_INSTANCES		1
50 #define MCHP_PWM_INSTANCES		9
51 #define MCHP_QMSPI_INSTANCES		1
52 #define MCHP_RCID_INSTANCES		3
53 #define MCHP_RPMFAN_INSTANCES		2
54 #define MCHP_RTC_INSTANCES		1
55 #define MCHP_RTMR_INSTANCES		1
56 #define MCHP_SPIP_INSTANCES		1
57 #define MCHP_TACH_INSTANCES		4
58 #define MCHP_TFDP_INSTANCES		1
59 #define MCHP_UART_INSTANCES		2
60 #define MCHP_WDT_INSTANCES		1
61 #define MCHP_WKTMR_INSTANCES		1
62 
63 #define MCHP_ACMP_CHANNELS		2
64 #define MCHP_ADC_CHANNELS		8
65 #define MCHP_BGPO_GPIO_PINS		2
66 #define MCHP_DMA_CHANNELS		16
67 #define MCHP_ESPI_SAF_TAGMAP_MAX	3
68 #define MCHP_GIRQS			19
69 #define MCHP_GPIO_PINS			123
70 #define MCHP_GPIO_PORTS			6
71 #define MCHP_GPTP_PORTS			6
72 #define MCHP_I2C_SMB_PORTS		15
73 #define MCHP_I2C_PORTMAP		0xf7ffu
74 #define MCHP_QMSPI_PORTS		3
75 #define MCHP_PS2_PORTS			2
76 #define MCHP_VCI_IN_PINS		4
77 #define MCHP_VCI_OUT_PINS		1
78 #define MCHP_VCI_OVRD_IN_PINS		1
79 
80 #define SHLU32(v, n)			((uint32_t)(v) << (n))
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 #endif /* MEC172X_DEFS_H */
86