1 /* 2 * Copyright (c) 2019-2021, Arm Limited. All rights reserved. 3 * Copyright (c) 2020, Cypress Semiconductor Corporation. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 * 7 */ 8 9 #ifndef __TFM_PERIPHERALS_DEF_H__ 10 #define __TFM_PERIPHERALS_DEF_H__ 11 12 #include "platform_irq.h" 13 #include "target_cfg.h" 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 /* 20 * Quantized default IRQ priority, the value is: 21 * (Number of configurable priority) / 4: (1UL << __NVIC_PRIO_BITS) / 4 22 */ 23 #define DEFAULT_IRQ_PRIORITY (1UL << (__NVIC_PRIO_BITS - 2)) 24 25 #define TFM_TIMER0_IRQ (TIMER0_IRQn) 26 27 extern struct platform_data_t tfm_peripheral_gpio0; 28 extern struct platform_data_t tfm_peripheral_gpio1; 29 extern struct platform_data_t tfm_peripheral_gpio2; 30 extern struct platform_data_t tfm_peripheral_gpio3; 31 extern struct platform_data_t tfm_peripheral_dma1; 32 extern struct platform_data_t tfm_peripheral_dma2; 33 extern struct platform_data_t tfm_peripheral_dma3; 34 extern struct platform_data_t tfm_peripheral_ethernet; 35 extern struct platform_data_t tfm_peripheral_usb; 36 extern struct platform_data_t tfm_peripheral_timer0; 37 extern struct platform_data_t tfm_peripheral_timer1; 38 extern struct platform_data_t tfm_peripheral_timer2; 39 extern struct platform_data_t tfm_peripheral_timer3; 40 extern struct platform_data_t tfm_peripheral_slowclk; 41 extern struct platform_data_t tfm_peripheral_touch_i2c; 42 extern struct platform_data_t tfm_peripheral_audio_i2c; 43 extern struct platform_data_t tfm_peripheral_adc_spi; 44 extern struct platform_data_t tfm_peripheral_shield0_spi; 45 extern struct platform_data_t tfm_peripheral_shield1_spi; 46 extern struct platform_data_t tfm_peripheral_shield0_i2c; 47 extern struct platform_data_t tfm_peripheral_shield1_i2c; 48 extern struct platform_data_t tfm_peripheral_ddr4_eeprom_i2c; 49 extern struct platform_data_t tfm_peripheral_fpga_scc; 50 extern struct platform_data_t tfm_peripheral_fpga_i2s; 51 extern struct platform_data_t tfm_peripheral_fpga_io; 52 extern struct platform_data_t tfm_peripheral_std_uart; 53 extern struct platform_data_t tfm_peripheral_uart1; 54 extern struct platform_data_t tfm_peripheral_uart2; 55 extern struct platform_data_t tfm_peripheral_uart3; 56 extern struct platform_data_t tfm_peripheral_uart4; 57 extern struct platform_data_t tfm_peripheral_uart5; 58 extern struct platform_data_t tfm_peripheral_clcd; 59 extern struct platform_data_t tfm_peripheral_rtc; 60 61 #define TFM_PERIPHERAL_GPIO0 (&tfm_peripheral_gpio0) 62 #define TFM_PERIPHERAL_GPIO1 (&tfm_peripheral_gpio1) 63 #define TFM_PERIPHERAL_GPIO2 (&tfm_peripheral_gpio2) 64 #define TFM_PERIPHERAL_GPIO3 (&tfm_peripheral_gpio3) 65 #define TFM_PERIPHERAL_DMA1 (&tfm_peripheral_dma1) 66 #define TFM_PERIPHERAL_DMA2 (&tfm_peripheral_dma2) 67 #define TFM_PERIPHERAL_DMA3 (&tfm_peripheral_dma3) 68 #define TFM_PERIPHERAL_ETHERNET (&tfm_peripheral_ethernet) 69 #define TFM_PERIPHERAL_USB (&tfm_peripheral_usb) 70 #define TFM_PERIPHERAL_TIMER0 (&tfm_peripheral_timer0) 71 #define TFM_PERIPHERAL_TIMER1 (&tfm_peripheral_timer1) 72 #define TFM_PERIPHERAL_TIMER2 (&tfm_peripheral_timer2) 73 #define TFM_PERIPHERAL_TIMER3 (&tfm_peripheral_timer3) 74 #define TFM_PERIPHERAL_SLOWCLK (&tfm_peripheral_slowclk) 75 #define TFM_PERIPHERAL_TOUCH_I2C (&tfm_peripheral_touch_i2c) 76 #define TFM_PERIPHERAL_AUDIO_I2C (&tfm_peripheral_audio_i2c) 77 #define TFM_PERIPHERAL_ADC_SPI (&tfm_peripheral_adc_spi) 78 #define TFM_PERIPHERAL_SHIELD0_SPI (&tfm_peripheral_shield0_spi) 79 #define TFM_PERIPHERAL_SHIELD1_SPI (&tfm_peripheral_shield1_spi) 80 #define TFM_PERIPHERAL_SHIELD0_I2C (&tfm_peripheral_shield0_i2c) 81 #define TFM_PERIPHERAL_SHIELD1_I2C (&tfm_peripheral_shield1_i2c) 82 #define TFM_PERIPHERAL_DDR4_EEPROM_I2C (&tfm_peripheral_ddr4_eeprom_i2c) 83 #define TFM_PERIPHERAL_FPGA_SCC (&tfm_peripheral_fpga_scc) 84 #define TFM_PERIPHERAL_FPGA_I2S (&tfm_peripheral_fpga_i2s) 85 #define TFM_PERIPHERAL_FPGA_IO (&tfm_peripheral_fpga_io) 86 #define TFM_PERIPHERAL_STD_UART (&tfm_peripheral_std_uart) 87 #define TFM_PERIPHERAL_UART1 (&tfm_peripheral_uart1) 88 #define TFM_PERIPHERAL_UART2 (&tfm_peripheral_uart2) 89 #define TFM_PERIPHERAL_UART3 (&tfm_peripheral_uart3) 90 #define TFM_PERIPHERAL_UART4 (&tfm_peripheral_uart4) 91 #define TFM_PERIPHERAL_UART5 (&tfm_peripheral_uart5) 92 #define TFM_PERIPHERAL_CLCD (&tfm_peripheral_clcd) 93 #define TFM_PERIPHERAL_RTC (&tfm_peripheral_rtc) 94 95 #ifdef __cplusplus 96 } 97 #endif 98 99 #endif /* __TFM_PERIPHERALS_DEF_H__ */ 100