-
-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T3W1 PCB bring-up #4350
base: main
Are you sure you want to change the base?
T3W1 PCB bring-up #4350
Conversation
|
|
6c5b0e5
to
58a77d7
Compare
019f66d
to
8c143a2
Compare
8c143a2
to
1dcc256
Compare
f4bba1f
to
9e700bf
Compare
1dcc256
to
35f7a9e
Compare
9e700bf
to
5d9e2c6
Compare
[no changelog]
[no changelog]
[no changelog]
[no changelog]
[no changelog]
…roperly [no changelog]
[no changelog]
[no changelog]
[no changelog]
[no changelog]
[no changelog]
35f7a9e
to
6aad200
Compare
@@ -369,7 +369,7 @@ int bootloader_main(void) { | |||
#ifdef USE_TOUCH | |||
secbool touch_initialized = secfalse; | |||
secbool allow_touchless_mode = secfalse; | |||
#ifdef TREZOR_MODEL_T3T1 | |||
#if defined TREZOR_MODEL_T3T1 || defined TREZOR_MODEL_T3W1 | |||
// on T3T1, tester needs to run without touch, so making an exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add T3W1 to the comment too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed c927e91
[no changelog]
@@ -41,8 +41,7 @@ uint8_t physical_frame_buffer_1[PHYSICAL_FRAME_BUFFER_SIZE]; | |||
|
|||
// The current frame buffer selector at fixed memory address | |||
// It's shared between bootloaders and the firmware | |||
__attribute__((section(".framebuffer_select"))) uint32_t current_frame_buffer = | |||
0; | |||
uint32_t current_frame_buffer = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the current_frame_buffer
is no longer persistent, we can move it to the driver state structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 10e3635
drv->active_fb_addr = (uint32_t)addr; | ||
drv->active_fb_size = size; | ||
|
||
mpu_reconfig(drv->mode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be better to add some synchronization here since drv->active_fb_xxx
can be now potentially used in the interrupt context.
irq_key_t irq_key = irq_lock();
drv->active_fb_addr = ..;
drv->active_fb_size = ..;
irq_unlock(irq_key);
mpu_reconfig(drv->mode);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 6b3babc
@@ -208,12 +210,15 @@ static void copy_fb_to_display(uint8_t index) { | |||
uint16_t *fb = (uint16_t *)get_fb_ptr(index); | |||
|
|||
if (fb != NULL) { | |||
mpu_set_active_fb(fb, PHYSICAL_FRAME_BUFFER_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By adding this, the copy_fb_to_display
function now has the side effect of disabling the frame buffer (for both privileged and unprivileged modes). This slightly impacts the display API behavior - after calling display_set_orientation
, the acquired frame buffer is no longer accessible. I believe we don’t need to fix this, but it’s important to be aware of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed in person, lets postpone fixing this until needed
This PR adds RGB LED driver for T3W1. Syscall is added to enable driving from app.
Old RGB LED driver is removed, as it is no longer needed after ditching old boards.
Power button configuration is added to rev A board.
There was an error in setting the U5 clock with 32MHz HSE, so i fixed it here too. Some unused clock-configuration stuff is removed from startup_init.
Another HSE implications are for systick calculation, which need proper value set in stm32u5xx_hal_conf.h, so i replaced the HSE_xxMHz with native HSE_VALUE=xxx and move it to global.
USB driver was adjusted to work with 32MHz HSE too.
SBU pins are configured for T3W1. I removed "sbu" from features wanted in firmware, kernel and unix, its only needed for prodtest.
Another MPU bugfix: kernel SRAM setting was off, as SRAM1 now contains framebuffe on U5G.
The mock display driver was modified a bit so it doesn't crash when someone tries some rendering - one framebuffer is allocated for that purpose.