Compare commits

..

4 Commits

Author SHA1 Message Date
morgan 7dc57dc24e WRPLL firmware
satman main & si549: add WRPLL select_recovered_clock
satman main & si549: add helper si549 & interrupt setup
si549: add set_adpll for main & helper si549
si549: add freq counter to set BASE_ADPLL
si549: add tag collector to process gtx & main tags
si549: add main & helper PLL
IRQ & si549: add handler for gtx & main tags irq
IRQ: add docs for IRQ id
2024-01-04 15:46:59 +08:00
morgan 6a47c2fcf2 Si549 firmware
satman main: drive CLK_SEL to true when si549 is used
satman main: add main DCXO setup
io_expander: set CLK_SEL pin to output when si549 is used
si549: add bit bang i2c
si549: add si549 programming & main setup
2024-01-04 12:41:36 +08:00
morgan b9251c0b26 WRPLL gateware
kasli_soc satellite: add wrpll
kasli_soc satellite: add gtx & main tag IRQs for sateelite
ddmtd: add ddmtd and deglitcher
wrpll: add helper clockdomain
wrpll: add frequency counter
wrpll: add gtx_tag and main_tag csr
wrpll: add gtx & main tag collection
wrpll: add gtx & main tag eventmanager for shared peripheral interrupt
2024-01-04 12:38:01 +08:00
morgan c761958816 si549 gateware
kasli_soc: add option to select si5324 over si549 using --with-wrpll arg
kasli_soc: add main and helper si549 for satellite
kasli_soc: default to use si5435
si549: add i2c and adpll programming for si549
si549: add option to switch between bitbang and gateware i2c
2024-01-04 12:28:40 +08:00
1 changed files with 3 additions and 3 deletions

View File

@ -230,7 +230,7 @@ fn read(dcxo: i2c::DCXO, reg: u8, timer: &mut GlobalTimer) -> Result<u8, &'stati
Ok(val)
}
fn setup(dcxo: i2c::DCXO, hsdiv: u16, lsdiv: u8, fbdiv: u64, timer: &mut GlobalTimer) -> Result<(), &'static str> {
fn program(dcxo: i2c::DCXO, hsdiv: u16, lsdiv: u8, fbdiv: u64, timer: &mut GlobalTimer) -> Result<(), &'static str> {
i2c::init(dcxo, timer)?;
write(dcxo, 255, 0x00, timer)?; // PAGE
@ -272,7 +272,7 @@ pub fn main_setup(timer: &mut GlobalTimer) -> Result<(), &'static str> {
#[cfg(rtio_frequency = "125.0")]
let (m_hsdiv, m_lsdiv, m_fbdiv) = (0x058, 0, 0x04815791F25);
setup(i2c::DCXO::Main, m_hsdiv, m_lsdiv, m_fbdiv, timer)?;
program(i2c::DCXO::Main, m_hsdiv, m_lsdiv, m_fbdiv, timer)?;
// Si549 maximum settling time for large frequency change.
timer.delay_us(40_000);
@ -409,7 +409,7 @@ pub mod wrpll {
#[cfg(rtio_frequency = "125.0")]
let (h_hsdiv, h_lsdiv, h_fbdiv) = (0x058, 0, 0x0481458C94D); // 125Mhz*16383/16384
setup(i2c::DCXO::Helper, h_hsdiv, h_lsdiv, h_fbdiv, timer)?;
program(i2c::DCXO::Helper, h_hsdiv, h_lsdiv, h_fbdiv, timer)?;
// Si549 maximum settling time for large frequency change.
timer.delay_us(40_000);