2021-08-17 17:11:59 +02:00
|
|
|
#ifndef BSP_Q7S_BOARDCONFIG_BUSCONF_H_
|
|
|
|
#define BSP_Q7S_BOARDCONFIG_BUSCONF_H_
|
|
|
|
|
|
|
|
namespace q7s {
|
|
|
|
|
2021-08-17 19:50:48 +02:00
|
|
|
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spidev2.0";
|
|
|
|
static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0";
|
2021-08-17 17:11:59 +02:00
|
|
|
|
2021-08-17 19:50:48 +02:00
|
|
|
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1";
|
2021-08-17 17:48:51 +02:00
|
|
|
|
|
|
|
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL3";
|
2021-08-17 19:50:48 +02:00
|
|
|
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL4";
|
2021-09-02 20:04:41 +02:00
|
|
|
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL5";
|
2021-08-17 19:50:48 +02:00
|
|
|
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8";
|
|
|
|
|
2021-08-20 14:08:11 +02:00
|
|
|
static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0";
|
|
|
|
static constexpr char UART_GNSS_1_DEV[] = "/dev/ttyUL2";
|
|
|
|
|
2021-09-02 20:04:41 +02:00
|
|
|
/**************************************************************/
|
|
|
|
/** OBC1E */
|
|
|
|
/**************************************************************/
|
2021-09-20 17:47:29 +02:00
|
|
|
static constexpr char GPIO_MULTIPURPOSE_1V8_OBC1D[] = "/amba_pl/gpio@42020000";
|
|
|
|
static const char* const GPIO_GYRO_ADIS_LABEL = GPIO_MULTIPURPOSE_1V8_OBC1D;
|
2021-09-02 20:04:41 +02:00
|
|
|
static constexpr uint32_t GPIO_GYRO_0_ADIS_CS = 0; // Package Pin: W20
|
|
|
|
static constexpr uint32_t GPIO_GYRO_2_ADIS_CS = 2; // AA22
|
|
|
|
|
|
|
|
/**************************************************************/
|
|
|
|
/** OBC1F B0 */
|
|
|
|
/**************************************************************/
|
2021-09-20 17:47:29 +02:00
|
|
|
static constexpr char GPIO_FLEX_OBC1F_B0[] = "/amba_pl/gpio@42030000";
|
2021-09-21 19:28:22 +02:00
|
|
|
static constexpr uint32_t GPIO_FLEX_OBC1F_B0_WIDTH = 20;
|
2021-09-20 17:47:29 +02:00
|
|
|
static const char* const GPIO_ACS_BOARD_DEFAULT_LABEL = GPIO_FLEX_OBC1F_B0;
|
|
|
|
static const char* const GPIO_RW_DEFAULT_LABEL = GPIO_FLEX_OBC1F_B0;
|
|
|
|
static const char* const GPIO_RAD_SENSOR_LABEL = GPIO_FLEX_OBC1F_B0;
|
2021-09-02 20:04:41 +02:00
|
|
|
|
2021-09-21 19:28:22 +02:00
|
|
|
|
2021-09-02 20:04:41 +02:00
|
|
|
static constexpr uint32_t GPIO_RW_0_CS = 7; // B20
|
2021-09-13 11:48:11 +02:00
|
|
|
static constexpr uint32_t GPIO_RW_1_CS = 3; // G22
|
|
|
|
static constexpr uint32_t GPIO_RW_2_CS = 11; // E18
|
|
|
|
static constexpr uint32_t GPIO_RW_3_CS = 6; // B19
|
2021-08-17 19:50:48 +02:00
|
|
|
|
2021-09-13 11:48:11 +02:00
|
|
|
static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 18; // N22
|
|
|
|
static constexpr uint32_t GPIO_GYRO_3_L3G_CS = 1; // M21
|
|
|
|
static constexpr uint32_t GPIO_MGM_0_LIS3_CS = 5; // C18
|
|
|
|
static constexpr uint32_t GPIO_MGM_1_RM3100_CS = 16; // A16
|
|
|
|
static constexpr uint32_t GPIO_MGM_3_RM3100_CS = 10; // C17
|
2021-09-02 20:04:41 +02:00
|
|
|
|
2021-09-13 11:48:11 +02:00
|
|
|
// Active low enable pin (needs to be driven low for regular operations)
|
|
|
|
static constexpr uint32_t GPIO_GYRO_0_ENABLE = 2; // H22
|
|
|
|
|
|
|
|
// Active low reset pin (needs to be driven high for regular operations)
|
2021-09-08 19:27:49 +02:00
|
|
|
static constexpr uint32_t GPIO_RESET_GNSS_0 = 9; // C22
|
2021-09-02 20:04:41 +02:00
|
|
|
static constexpr uint32_t GPIO_RESET_GNSS_1 = 12; // B21
|
2021-08-17 19:50:48 +02:00
|
|
|
|
2021-09-02 20:04:41 +02:00
|
|
|
static constexpr uint32_t GPIO_RAD_SENSOR_CS = 19; // R18
|
2021-08-17 19:50:48 +02:00
|
|
|
|
2021-09-02 20:04:41 +02:00
|
|
|
/**************************************************************/
|
|
|
|
/** OBC1F B1 */
|
|
|
|
/**************************************************************/
|
2021-09-20 17:47:29 +02:00
|
|
|
static constexpr char GPIO_FLEX_OBC1F_B1[] = "/amba_pl/gpio@42030000";
|
2021-09-21 19:28:22 +02:00
|
|
|
// Need to use chip name here for now because the label name is the name for
|
|
|
|
// gpiochip 5 and gpiochip6
|
|
|
|
static constexpr char GPIO_FLEX_OBC1F_B1_CHIP[] = "gpiochip6";
|
|
|
|
static const char* const GPIO_MGM2_LIS3_LABEL = GPIO_FLEX_OBC1F_B1_CHIP;
|
2021-09-13 18:07:07 +02:00
|
|
|
static constexpr uint32_t GPIO_MGM_2_LIS3_CS = 0; // D18
|
2021-08-17 19:50:48 +02:00
|
|
|
|
2021-09-02 20:04:41 +02:00
|
|
|
/**************************************************************/
|
|
|
|
/** OBC1C */
|
|
|
|
/**************************************************************/
|
2021-09-20 17:47:29 +02:00
|
|
|
static constexpr char GPIO_3V3_OBC1C[] = "/amba_pl/gpio@42040000";
|
|
|
|
static const char* const GPIO_HEATER_LABEL = GPIO_3V3_OBC1C;
|
|
|
|
static const char* const GPIO_SOLAR_ARR_DEPL_LABEL = GPIO_3V3_OBC1C;
|
2021-08-17 19:50:48 +02:00
|
|
|
static constexpr uint32_t GPIO_HEATER_0_PIN = 6;
|
|
|
|
static constexpr uint32_t GPIO_HEATER_1_PIN = 12;
|
|
|
|
static constexpr uint32_t GPIO_HEATER_2_PIN = 7;
|
|
|
|
static constexpr uint32_t GPIO_HEATER_3_PIN = 5;
|
|
|
|
static constexpr uint32_t GPIO_HEATER_4_PIN = 3;
|
|
|
|
static constexpr uint32_t GPIO_HEATER_5_PIN = 0;
|
|
|
|
static constexpr uint32_t GPIO_HEATER_6_PIN = 1;
|
|
|
|
static constexpr uint32_t GPIO_HEATER_7_PIN = 11;
|
2021-09-13 18:07:07 +02:00
|
|
|
static constexpr uint32_t GPIO_GYRO_2_ENABLE = 18; // F22
|
2021-08-17 19:50:48 +02:00
|
|
|
|
|
|
|
static constexpr uint32_t GPIO_SOL_DEPL_SA_0_PIN = 4;
|
|
|
|
static constexpr uint32_t GPIO_SOL_DEPL_SA_1_PIN = 2;
|
|
|
|
|
2021-09-20 17:47:29 +02:00
|
|
|
static constexpr char GPIO_RW_SPI_MUX_LABEL[] = "zynq_gpio";
|
2021-09-16 11:11:25 +02:00
|
|
|
// Uses EMIO interface to PL, starts at 54
|
|
|
|
static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 54;
|
2021-09-02 20:04:41 +02:00
|
|
|
|
2021-09-20 17:47:29 +02:00
|
|
|
static constexpr uint32_t SPI_MUX_BIT_1 = 13;
|
|
|
|
static constexpr uint32_t SPI_MUX_BIT_2 = 14;
|
|
|
|
static constexpr uint32_t SPI_MUX_BIT_3 = 15;
|
|
|
|
static constexpr uint32_t SPI_MUX_BIT_4 = 16;
|
|
|
|
static constexpr uint32_t SPI_MUX_BIT_5 = 17;
|
|
|
|
static constexpr uint32_t SPI_MUX_BIT_6 = 9;
|
|
|
|
static constexpr uint32_t EN_RW_CS = 17;
|
|
|
|
|
2021-09-25 10:49:03 +02:00
|
|
|
namespace gpioNames {
|
|
|
|
static constexpr char GYRO_0_ADIS_CS[] = "gyro_0_adis_chip_select";
|
|
|
|
static constexpr char GYRO_1_L3G_CS[] = "gyro_1_l3g_chip_select";
|
|
|
|
static constexpr char GYRO_2_ADIS_CS[] = "gyro_2_adis_chip_select";
|
|
|
|
static constexpr char GYRO_3_L3G_CS[] = "gyro_3_l3g_chip_select";
|
|
|
|
static constexpr char MGM_0_CS[] = "mgm_0_lis3_chip_select";
|
|
|
|
static constexpr char MGM_1_CS[] = "mgm_1_rm3100_chip_select";
|
|
|
|
static constexpr char MGM_2_CS[] = "mgm_2_lis3_chip_select";
|
|
|
|
static constexpr char MGM_3_CS[] = "mgm_3_rm3100_chip_select";
|
|
|
|
static constexpr char RESET_GNSS_0[] = "reset_gnss_0";
|
|
|
|
static constexpr char RESET_GNSS_1[] = "reset_gnss_1";
|
|
|
|
static constexpr char GYRO_0_ENABLE[] = "gyro_0_enable";
|
|
|
|
static constexpr char GYRO_2_ENABLE[] = "gyro_2_enable";
|
|
|
|
static constexpr char HEATER_0[] = "heater0";
|
|
|
|
static constexpr char HEATER_1[] = "heater1";
|
|
|
|
static constexpr char HEATER_2[] = "heater2";
|
|
|
|
static constexpr char HEATER_3[] = "heater3";
|
|
|
|
static constexpr char HEATER_4[] = "heater4";
|
|
|
|
static constexpr char HEATER_5[] = "heater5";
|
|
|
|
static constexpr char HEATER_6[] = "heater6";
|
|
|
|
static constexpr char HEATER_7[] = "heater7";
|
|
|
|
static constexpr char SA_DPL_PIN_0[] = "sa_dpl_0";
|
|
|
|
static constexpr char SA_DPL_PIN_1[] = "sa_dpl_1";
|
|
|
|
static constexpr char SPI_MUX_BIT_1_PIN[] = "spi_mux_bit_1";
|
|
|
|
static constexpr char SPI_MUX_BIT_2_PIN[] = "spi_mux_bit_2";
|
|
|
|
static constexpr char SPI_MUX_BIT_3_PIN[] = "spi_mux_bit_3";
|
|
|
|
static constexpr char SPI_MUX_BIT_4_PIN[] = "spi_mux_bit_4";
|
|
|
|
static constexpr char SPI_MUX_BIT_5_PIN[] = "spi_mux_bit_5";
|
|
|
|
static constexpr char SPI_MUX_BIT_6_PIN[] = "spi_mux_bit_6";
|
|
|
|
static constexpr char EN_RW_CS[] = "en_rw_cs";
|
|
|
|
static constexpr char EN_RW_1[] = "enable_rw_1";
|
|
|
|
static constexpr char EN_RW_2[] = "enable_rw_2";
|
|
|
|
static constexpr char EN_RW_3[] = "enable_rw_3";
|
|
|
|
static constexpr char EN_RW_4[] = "enable_rw_4";
|
|
|
|
static constexpr char SPI_MUX_SELECT[] = "spi_mux_select";
|
|
|
|
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
|
|
|
}
|
2021-08-17 17:11:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */
|