Lines Matching +full:3 +full:- +full:c45
1 // SPDX-License-Identifier: GPL-2.0
8 //! and firmware can be downloaded on the EN-9320SFP+ support site.
10 //! The QT2025 PHY integrates an Intel 8051 micro-controller.
17 reg::{Mmd, C45},
32 firmware: ["qt2025-2.0.3.3.fw"],
42 fn probe(dev: &mut phy::Device) -> Result<()> { in probe()
45 let hw_rev = dev.read(C45::new(Mmd::PMAPMD, 0xd001))?; in probe()
50 // `MICRO_RESETN`: hold the micro-controller in reset while configuring. in probe()
51 dev.write(C45::new(Mmd::PMAPMD, 0xc300), 0x0000)?; in probe()
52 // `SREFCLK_FREQ`: configure clock frequency of the micro-controller. in probe()
53 dev.write(C45::new(Mmd::PMAPMD, 0xc302), 0x0004)?; in probe()
55 dev.write(C45::new(Mmd::PMAPMD, 0xc319), 0x0038)?; in probe()
57 dev.write(C45::new(Mmd::PMAPMD, 0xc31a), 0x0098)?; in probe()
59 // 3.41 5/10/25GBASE-R PCS test pattern seed B) for something else. in probe()
61 dev.write(C45::new(Mmd::PCS, 0x0026), 0x0e00)?; in probe()
62 dev.write(C45::new(Mmd::PCS, 0x0027), 0x0893)?; in probe()
63 dev.write(C45::new(Mmd::PCS, 0x0028), 0xa528)?; in probe()
64 dev.write(C45::new(Mmd::PCS, 0x0029), 0x0003)?; in probe()
66 dev.write(C45::new(Mmd::PMAPMD, 0xa30a), 0x06e1)?; in probe()
67 // `MICRO_RESETN`: release the micro-controller from the reset state. in probe()
68 dev.write(C45::new(Mmd::PMAPMD, 0xc300), 0x0002)?; in probe()
69 // The micro-controller will start running from the boot ROM. in probe()
70 dev.write(C45::new(Mmd::PCS, 0xe854), 0x00c0)?; in probe()
72 let fw = Firmware::request(c_str!("qt2025-2.0.3.3.fw"), dev.as_ref())?; in probe()
78 // The first 16kB of memory is located in the address range 3.8000h - 3.BFFFh. in probe()
79 // The next 8kB of memory is located at 4.8000h - 4.9FFFh. in probe()
89 dev.write(C45::new(dst_mmd, 0x8000 + dst_offset), (*val).into())?; in probe()
93 // The micro-controller will start running from SRAM. in probe()
94 dev.write(C45::new(Mmd::PCS, 0xe854), 0x0040)?; in probe()
100 fn read_status(dev: &mut phy::Device) -> Result<u16> { in read_status()
101 dev.genphy_read_status::<C45>() in read_status()