Compare commits

..

4 Commits

Author SHA1 Message Date
morgan 2f57ccf617 WRPLL firmware
satman main & si549: add WRPLL select_recovered_clock
satman main & si549: add helper si549 & interrupt setup
si549: add tag collector to process gtx & main tags
si549: add frequency counter to set BASE_ADPLL
si549: add set_adpll for main & helper PLL
si549: add main & helper PLL
IRQ & si549: add handler for gtx & main tags irq
IRQ: add docs for IRQ id
2024-01-08 13:12:36 +08:00
morgan 05f80b579f Si549 firmware
io_expander: set CLK_SEL pin to output when si549 is used
satman main: drive CLK_SEL to true when si549 is used
satman main & si549: add main DCXO setup
si549: add bit bang i2c
si549: add si549 programming & main setup
2024-01-08 13:10:34 +08:00
morgan dbfb420212 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 & main tag collection
wrpll: add gtx & main tag eventmanager for shared peripheral interrupt
2024-01-08 13:02:37 +08:00
morgan d13800dca8 si549 gateware
kasli_soc: add --with-wrpll arg to switch from si5324 to si549
kasli_soc: default to use si5435
kasli_soc: add main and helper si549 for satellite
si549: add i2c and adpll programmer
2024-01-08 13:00:44 +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 program(dcxo: i2c::DCXO, hsdiv: u16, lsdiv: u8, fbdiv: u64, timer: &mut GlobalTimer) -> Result<(), &'static str> {
fn setup(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);
program(i2c::DCXO::Main, m_hsdiv, m_lsdiv, m_fbdiv, timer)?;
setup(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
program(i2c::DCXO::Helper, h_hsdiv, h_lsdiv, h_fbdiv, timer)?;
setup(i2c::DCXO::Helper, h_hsdiv, h_lsdiv, h_fbdiv, timer)?;
// Si549 maximum settling time for large frequency change.
timer.delay_us(40_000);