File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 55### Check PD state
66
77Example on Framework 13 AMD Ryzen AI 300
8+
89```
910> sudo framework_tool.exe --pd-info
1011Left / Ports 01
1112 Silicon ID: 0x3580
1213 Mode: MainFw
1314 Flash Row Size: 256 B
15+ Ports Enabled: 0, 1
1416 Bootloader Version: Base: 3.6.0.009, App: 0.0.01
1517 FW1 (Backup) Version: Base: 3.7.0.197, App: 0.0.0B
1618 FW2 (Main) Version: Base: 3.7.0.197, App: 0.0.0B
1719Right / Ports 23
1820 Silicon ID: 0x3580
1921 Mode: MainFw
2022 Flash Row Size: 256 B
23+ Ports Enabled: 0, 1
2124 Bootloader Version: Base: 3.6.0.009, App: 0.0.01
2225 FW1 (Backup) Version: Base: 3.7.0.197, App: 0.0.0B
2326 FW2 (Main) Version: Base: 3.7.0.197, App: 0.0.0B
Original file line number Diff line number Diff line change @@ -372,4 +372,10 @@ impl PdController {
372372 self . ccgx_write ( ControlRegisters :: PdPortsEnable , & [ mask] ) ?;
373373 Ok ( ( ) )
374374 }
375+
376+ pub fn get_port_status ( & self ) -> EcResult < u8 > {
377+ let data = self . ccgx_read ( ControlRegisters :: PdPortsEnable , 1 ) ?;
378+ assert_win_len ( data. len ( ) , 1 ) ;
379+ Ok ( data[ 0 ] )
380+ }
375381}
Original file line number Diff line number Diff line change @@ -227,6 +227,17 @@ fn print_single_pd_details(pd: &PdController) {
227227 } else {
228228 println ! ( " Failed to device info" ) ;
229229 }
230+ if let Ok ( port_mask) = pd. get_port_status ( ) {
231+ let ports = match port_mask {
232+ 1 => "0" ,
233+ 2 => "1" ,
234+ 3 => "0, 1" ,
235+ _ => "None" ,
236+ } ;
237+ println ! ( " Ports Enabled: {}" , ports) ;
238+ } else {
239+ println ! ( " Ports Enabled: Unknown" ) ;
240+ }
230241 pd. print_fw_info ( ) ;
231242}
232243
You can’t perform that action at this time.
0 commit comments