From 01a78e4474c4238b724f4a01ecfc07cb0a714104 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 5 Oct 2025 17:12:40 +0800 Subject: [PATCH] fixup app region start and add freq/voltage configs for board targets this is the agnostic version of all of the board targets, which allows the boot1 to lookup based on the current configuration which configurations to apply. I think I've talked myself into giving away $0.20 of parts with every dabao board so that everyone can run at full frequency. Originally I thought I'd limit to the minimal configuration with low frequency operation but since this is the main developer platform all the benchmarks and first impressions will come through this board. Crippling it with a slower clock frequency by omitting the supplementary digital regulator seems short-sighted, even if it means up slightly subsidizing things with this extra cost. --- libs/bao1x-api/src/offsets/baosec.rs | 4 ++++ libs/bao1x-api/src/offsets/dabao.rs | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/bao1x-api/src/offsets/baosec.rs b/libs/bao1x-api/src/offsets/baosec.rs index f2d556b8c..c19c665b7 100644 --- a/libs/bao1x-api/src/offsets/baosec.rs +++ b/libs/bao1x-api/src/offsets/baosec.rs @@ -36,3 +36,7 @@ pub const PDDB_LEN: usize = SPI_FLASH_LEN - PDDB_ORIGIN; // Location of on-chip application segment, as offset from RRAM start pub const APP_RRAM_OFFSET: usize = 0; pub const APP_RRAM_LEN: usize = 0; + +// Regulator voltage target at boot +pub const CPU_VDD_LDO_BOOT_MV: u32 = 900; +pub const DEFAULT_FCLK_FREQUENCY: u32 = 800_000_000; diff --git a/libs/bao1x-api/src/offsets/dabao.rs b/libs/bao1x-api/src/offsets/dabao.rs index 1df794854..96cbff1de 100644 --- a/libs/bao1x-api/src/offsets/dabao.rs +++ b/libs/bao1x-api/src/offsets/dabao.rs @@ -21,4 +21,9 @@ pub const PDDB_LEN: usize = 0; // Location of on-chip application segment, as offset from RRAM start pub const APP_RRAM_OFFSET: usize = 0x30_0000; -pub const APP_RRAM_LEN: usize = 0xD_A000; +pub const APP_RRAM_START: usize = 0x6000_0000 + APP_RRAM_OFFSET - crate::signatures::SIGBLOCK_LEN; +pub const APP_RRAM_LEN: usize = 0xD_A000 + crate::signatures::SIGBLOCK_LEN; + +// Regulator voltage target at boot +pub const CPU_VDD_LDO_BOOT_MV: u32 = 900; +pub const DEFAULT_FCLK_FREQUENCY: u32 = 800_000_000;