1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 15:08:12 +00:00

feat(core): support powering up optiga on T3T1 rev. G and T3B1 rev. C PCBs

[no changelog]
This commit is contained in:
tychovrahe 2024-11-20 10:49:02 +01:00 committed by TychoVrahe
parent 97b430709c
commit 70b9746dc5
3 changed files with 8 additions and 1 deletions

View File

@ -53,6 +53,9 @@
#define OPTIGA_RST_PORT GPIOE #define OPTIGA_RST_PORT GPIOE
#define OPTIGA_RST_PIN GPIO_PIN_13 #define OPTIGA_RST_PIN GPIO_PIN_13
#define OPTIGA_RST_CLK_EN __HAL_RCC_GPIOE_CLK_ENABLE #define OPTIGA_RST_CLK_EN __HAL_RCC_GPIOE_CLK_ENABLE
#define OPTIGA_PWR_PORT GPIOF
#define OPTIGA_PWR_PIN GPIO_PIN_13
#define OPTIGA_PWR_CLK_EN __HAL_RCC_GPIOF_CLK_ENABLE
#define SBU_1_PIN GPIO_PIN_2 #define SBU_1_PIN GPIO_PIN_2
#define SBU_1_PORT GPIOA #define SBU_1_PORT GPIOA

View File

@ -98,6 +98,9 @@
#define OPTIGA_RST_PORT GPIOB #define OPTIGA_RST_PORT GPIOB
#define OPTIGA_RST_PIN GPIO_PIN_1 #define OPTIGA_RST_PIN GPIO_PIN_1
#define OPTIGA_RST_CLK_EN __HAL_RCC_GPIOB_CLK_ENABLE #define OPTIGA_RST_CLK_EN __HAL_RCC_GPIOB_CLK_ENABLE
#define OPTIGA_PWR_PORT GPIOF
#define OPTIGA_PWR_PIN GPIO_PIN_13
#define OPTIGA_PWR_CLK_EN __HAL_RCC_GPIOF_CLK_ENABLE
#define SD_DETECT_PORT GPIOC #define SD_DETECT_PORT GPIOC
#define SD_DETECT_PIN GPIO_PIN_13 #define SD_DETECT_PIN GPIO_PIN_13

View File

@ -19,7 +19,8 @@ void optiga_hal_init(void) {
HAL_GPIO_Init(OPTIGA_RST_PORT, &GPIO_InitStructure); HAL_GPIO_Init(OPTIGA_RST_PORT, &GPIO_InitStructure);
#ifdef OPTIGA_PWR_PIN #ifdef OPTIGA_PWR_PIN
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; OPTIGA_PWR_CLK_EN();
GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_OD;
GPIO_InitStructure.Pull = GPIO_NOPULL; GPIO_InitStructure.Pull = GPIO_NOPULL;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStructure.Alternate = 0; GPIO_InitStructure.Alternate = 0;