Skip to content

Commit f85d96e

Browse files
Use 16-channel virtual mux on Cosmo (#2154)
Right now, the Cosmo FPGAs (main and front) both pretend to contain a set of PCA9545 muxes. This PR switches to a **single** virtual 16-channel mux, which reduces writes (since we no longer need to deactivate virtual mux _N_ before activating virtual mux _M_). Having a single mux also makes it more logically consistent to have a single reset pin, see oxidecomputer/hardware-cosmo#619 Finally, it gives us a place to put the delay required by the physical switches' timing that _doesn't_ mess with our existing driver. --------- Co-authored-by: Nathanael Huffman <[email protected]>
1 parent 0056474 commit f85d96e

File tree

13 files changed

+322
-149
lines changed

13 files changed

+322
-149
lines changed

app/cosmo/base.toml

Lines changed: 73 additions & 134 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
FPGA images and collateral are generated from:
2-
[this sha](https://github.com/oxidecomputer/quartz/commit/ac70329388b36815bc405b58b5260a060bbfa953)
3-
[release](https://api.github.com/repos/oxidecomputer/quartz/releases/226010645)
2+
[this sha](https://github.com/oxidecomputer/quartz/commit/0d094c19ea381fdf4aa8f0b0fc7e5f2a33a37506)
3+
[release](https://api.github.com/repos/oxidecomputer/quartz/releases/234047862)
-6.42 KB
Binary file not shown.

drv/i2c-types/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,4 +224,12 @@ pub enum Segment {
224224
S6 = 6,
225225
S7 = 7,
226226
S8 = 8,
227+
S9 = 9,
228+
S10 = 10,
229+
S11 = 11,
230+
S12 = 12,
231+
S13 = 13,
232+
S14 = 14,
233+
S15 = 15,
234+
S16 = 16,
227235
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
FPGA images and collateral are generated from:
2-
[this sha](https://github.com/oxidecomputer/quartz/commit/1c58def4fc932e2f42f74573494678a056925da9)
3-
[release](https://api.github.com/repos/oxidecomputer/quartz/releases/231238503)
2+
[this sha](https://github.com/oxidecomputer/quartz/commit/0d094c19ea381fdf4aa8f0b0fc7e5f2a33a37506)
3+
[release](https://api.github.com/repos/oxidecomputer/quartz/releases/234047771)
-10.6 KB
Binary file not shown.

drv/spartan7-loader/cosmo-seq/cosmo_seq_top.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
{
3333
"type": "addrmap",
34-
"addr_span_bytes": 84,
34+
"addr_span_bytes": 88,
3535
"inst_name": "sequencer",
3636
"orig_type_name": "sequencer_regs",
3737
"addr_offset": 768,

drv/spartan7-loader/cosmo-seq/debug_regs.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,18 @@
324324
{
325325
"name": "t6_sequencer",
326326
"value": 11
327+
},
328+
{
329+
"name": "mux1_sel",
330+
"value": 12
331+
},
332+
{
333+
"name": "mux2_sel",
334+
"value": 13
335+
},
336+
{
337+
"name": "mux3_sel",
338+
"value": 14
327339
}
328340
]
329341
},
@@ -385,6 +397,18 @@
385397
{
386398
"name": "t6_sequencer",
387399
"value": 11
400+
},
401+
{
402+
"name": "mux1_sel",
403+
"value": 12
404+
},
405+
{
406+
"name": "mux2_sel",
407+
"value": 13
408+
},
409+
{
410+
"name": "mux3_sel",
411+
"value": 14
388412
}
389413
]
390414
},
@@ -446,6 +470,18 @@
446470
{
447471
"name": "t6_sequencer",
448472
"value": 11
473+
},
474+
{
475+
"name": "mux1_sel",
476+
"value": 12
477+
},
478+
{
479+
"name": "mux2_sel",
480+
"value": 13
481+
},
482+
{
483+
"name": "mux3_sel",
484+
"value": 14
449485
}
450486
]
451487
},
@@ -507,6 +543,18 @@
507543
{
508544
"name": "t6_sequencer",
509545
"value": 11
546+
},
547+
{
548+
"name": "mux1_sel",
549+
"value": 12
550+
},
551+
{
552+
"name": "mux2_sel",
553+
"value": 13
554+
},
555+
{
556+
"name": "mux3_sel",
557+
"value": 14
510558
}
511559
]
512560
}

drv/spartan7-loader/cosmo-seq/sequencer_regs.json

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"type": "addrmap",
3-
"addr_span_bytes": 84,
3+
"addr_span_bytes": 88,
44
"inst_name": "sequencer_regs",
55
"addr_offset": 0,
66
"children": [
@@ -559,10 +559,30 @@
559559
},
560560
{
561561
"type": "reg",
562-
"inst_name": "rail_enables",
562+
"inst_name": "amd_pwgdout_fedges",
563563
"addr_offset": 48,
564564
"regwidth": 32,
565565
"min_accesswidth": 32,
566+
"children": [
567+
{
568+
"type": "field",
569+
"inst_name": "counts",
570+
"lsb": 0,
571+
"msb": 7,
572+
"reset": 0,
573+
"sw_access": "rw",
574+
"se_onread": null,
575+
"se_onwrite": "wclr",
576+
"desc": "Falling edge counter of AMD's PowerGDOUT output while in A0/A0HP. Saturates at 255. Cleared by any write or starting a new power up"
577+
}
578+
]
579+
},
580+
{
581+
"type": "reg",
582+
"inst_name": "rail_enables",
583+
"addr_offset": 52,
584+
"regwidth": 32,
585+
"min_accesswidth": 32,
566586
"children": [
567587
{
568588
"type": "field",
@@ -767,7 +787,7 @@
767787
{
768788
"type": "reg",
769789
"inst_name": "rail_pgs",
770-
"addr_offset": 52,
790+
"addr_offset": 56,
771791
"regwidth": 32,
772792
"min_accesswidth": 32,
773793
"children": [
@@ -974,7 +994,7 @@
974994
{
975995
"type": "reg",
976996
"inst_name": "rail_pgs_max_hold",
977-
"addr_offset": 56,
997+
"addr_offset": 60,
978998
"regwidth": 32,
979999
"min_accesswidth": 32,
9801000
"children": [
@@ -1181,7 +1201,7 @@
11811201
{
11821202
"type": "reg",
11831203
"inst_name": "sp5_readbacks",
1184-
"addr_offset": 60,
1204+
"addr_offset": 64,
11851205
"regwidth": 32,
11861206
"min_accesswidth": 32,
11871207
"children": [
@@ -1283,13 +1303,24 @@
12831303
"se_onread": null,
12841304
"se_onwrite": null,
12851305
"desc": "pwr_btn_l live status, (From FPGA to SP5)"
1306+
},
1307+
{
1308+
"type": "field",
1309+
"inst_name": "pwrgd_out",
1310+
"lsb": 9,
1311+
"msb": 9,
1312+
"reset": null,
1313+
"sw_access": "r",
1314+
"se_onread": null,
1315+
"se_onwrite": null,
1316+
"desc": "pwrgd_out live status, (From SP5 to FPGA)"
12861317
}
12871318
]
12881319
},
12891320
{
12901321
"type": "reg",
12911322
"inst_name": "nic_readbacks",
1292-
"addr_offset": 64,
1323+
"addr_offset": 68,
12931324
"regwidth": 32,
12941325
"min_accesswidth": 32,
12951326
"children": [
@@ -1397,7 +1428,7 @@
13971428
{
13981429
"type": "reg",
13991430
"inst_name": "debug_enables",
1400-
"addr_offset": 68,
1431+
"addr_offset": 72,
14011432
"regwidth": 32,
14021433
"min_accesswidth": 32,
14031434
"children": [
@@ -1450,7 +1481,7 @@
14501481
{
14511482
"type": "reg",
14521483
"inst_name": "nic_overrides",
1453-
"addr_offset": 72,
1484+
"addr_offset": 76,
14541485
"regwidth": 32,
14551486
"min_accesswidth": 32,
14561487
"children": [
@@ -1536,7 +1567,7 @@
15361567
{
15371568
"type": "reg",
15381569
"inst_name": "ignition_control",
1539-
"addr_offset": 76,
1570+
"addr_offset": 80,
15401571
"regwidth": 32,
15411572
"min_accesswidth": 32,
15421573
"children": [
@@ -1567,7 +1598,7 @@
15671598
{
15681599
"type": "reg",
15691600
"inst_name": "pcie_clk_ctrl",
1570-
"addr_offset": 80,
1601+
"addr_offset": 84,
15711602
"regwidth": 32,
15721603
"min_accesswidth": 32,
15731604
"children": [

drv/stm32xx-i2c/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pub type Isr = device::i2c1::isr::R;
3737

3838
pub mod ltc4306;
3939
pub mod max7358;
40+
pub mod oximux16;
4041
pub mod pca9545;
4142
pub mod pca9548;
4243

0 commit comments

Comments
 (0)