Explorar o código

usb: fix descriptor regeneration; add name strings to individual ports

Make sure to update the USB descriptors when iodevs.conf changes; add
description strings to individual ACM interfaces.

Don't advertise as accepting AT commands since we don't...
H. Peter Anvin %!s(int64=3) %!d(string=hai) anos
pai
achega
4d4291d637

+ 2 - 1
fpga/Makefile

@@ -85,7 +85,8 @@ $(outdir)/%/variant.stamp: mif/%.mif \
 	-rm -rf var/$* $(outdir)/$*
 	mkdir -p var/$* var/$*/mif $(outdir)/$*
 	( cd $(outdir)/$* && ln -sf ../*.asm.rpt ../*.fit.rpt . )
-	cp -alf Makefile *.deps *.qpf *.qsf db incremental_db var/$*/
+	cp -alf Makefile *.deps *.qpf *.qsf *.pins scripts \
+		db incremental_db var/$*/
 	ln -f $< var/$*/mif/sram.mif
 	( cd var/$* && ln -sf ../../$(outdir)/$* ./output )
 	$(MAKE) -C var/$* $(REVISIONS:=.vtargets)

+ 2 - 2
fpga/max80.qpf

@@ -19,12 +19,12 @@
 #
 # Quartus Prime
 # Version 21.1.0 Build 842 10/21/2021 SJ Lite Edition
-# Date created = 00:38:40  February 28, 2022
+# Date created = 10:16:03  February 28, 2022
 #
 # -------------------------------------------------------------------------- #
 
 QUARTUS_VERSION = "21.1"
-DATE = "00:38:40  February 28, 2022"
+DATE = "10:16:03  February 28, 2022"
 
 # Revisions
 

BIN=BIN
fpga/output/jtagupd/v1.rbf.gz


BIN=BIN
fpga/output/jtagupd/v1.sof


BIN=BIN
fpga/output/jtagupd/v1.svf.gz


BIN=BIN
fpga/output/jtagupd/v2.rbf.gz


BIN=BIN
fpga/output/jtagupd/v2.sof


BIN=BIN
fpga/output/jtagupd/v2.svf.gz


BIN=BIN
fpga/output/v1.fw


BIN=BIN
fpga/output/v1.jic


BIN=BIN
fpga/output/v1.rbf.gz


BIN=BIN
fpga/output/v1.rpd.gz


BIN=BIN
fpga/output/v1.sof


BIN=BIN
fpga/output/v1.svf.gz


BIN=BIN
fpga/output/v1.update.svf.gz


BIN=BIN
fpga/output/v1.update.xsvf.gz


BIN=BIN
fpga/output/v1.xsvf.gz


BIN=BIN
fpga/output/v2.fw


BIN=BIN
fpga/output/v2.jic


BIN=BIN
fpga/output/v2.rbf.gz


BIN=BIN
fpga/output/v2.rpd.gz


BIN=BIN
fpga/output/v2.sof


BIN=BIN
fpga/output/v2.svf.gz


BIN=BIN
fpga/output/v2.update.svf.gz


BIN=BIN
fpga/output/v2.update.xsvf.gz


BIN=BIN
fpga/output/v2.xsvf.gz


+ 4 - 2
fpga/usb/Makefile

@@ -6,12 +6,14 @@ PERLOPT = -I$(PERLINC)
 TARGETS = usb_desc.v
 ALSO    = usb_desc.bin
 
+includes = ../../iodevs.conf
+
 all: $(TARGETS) $(ALSO)
 
-%.v: %.conf $(TOOLS)/usbdescgen.pl
+%.v: %.conf $(TOOLS)/usbdescgen.pl $(includes)
 	$(PERL) $(PERLOPT) $(TOOLS)/usbdescgen.pl v $< $@
 
-%.bin: %.conf $(TOOLS)/usbdescgen.pl
+%.bin: %.conf $(TOOLS)/usbdescgen.pl $(includes)
 	$(PERL) $(PERLOPT) $(TOOLS)/usbdescgen.pl bin $< $@
 
 clean:

+ 12 - 7
fpga/usb/usb_desc.conf

@@ -15,8 +15,8 @@ my $serial       = usb_serial('SerialNumberHere'); # 16 characters
 my $manufacturer = usb_string(''   => 'Peter & Per');
 my $product      = usb_string(''   => 'MAX80 I/O card for ABC');
 
-sub acm_channels($$) {
-    my($channel_count,$ep_base) = @_;
+sub acm_channels($$@) {
+    my($channel_count,$ep_base,@names) = @_;
     my @d;
 
     for (my $c = 0; $c < $channel_count; $c++) {
@@ -26,14 +26,16 @@ sub acm_channels($$) {
 	my $mgmt_if;
 	my $data_if;
 
+	my $name = defined($names[$c]) ? $names[$c] : usb_string();
+
 	push(@d,
 		# Interface association descriptor
 		usb_desc('interface_association',
 			 byte(\$mgmt_if), # First interface index
 			 byte(2),	  # Interface count
 			 # USB spec says to copy the first interface class
-			 usb_class('cdc','acm','v25ter'),
-			 usb_string()),
+			 usb_class('cdc','acm','none'),
+			 $name),
 
 		# Management interface
 		usb_dset {
@@ -41,8 +43,8 @@ sub acm_channels($$) {
 			     byte($mgmt_if = usb_index),
 			     byte(0),	# No alternate settings
 			     byte(1),	# Endpoint count
-			     usb_class('cdc','acm','v25ter'),
-			     usb_string()),
+			     usb_class('cdc','acm','none'),
+			     $name),
 
 			usb_desc('cs_interface.header',
 				 word(0x120)), # CDC spec version 1.20
@@ -119,7 +121,10 @@ usb_device {
 		     byte(500 >> 1)),	 # Up to 500 mA
 
 		# Descriptors for each ACM channel, starting at endpoint 1
-		acm_channels($consts{'TTY_CHANNELS'},1)
+		acm_channels($consts{'TTY_CHANNELS'}, 1,
+			     # Names of ACM channels
+			     usb_string('' => 'MAX80 console'),
+			     usb_string('' => 'PUN80 network'))
     },
 };
 

+ 155 - 227
fpga/usb/usb_desc.v

@@ -72,9 +72,9 @@ module usb_desc_rom (
 		rom[9'h033] = 8'h01;
 		rom[9'h034] = 8'h09;
 		rom[9'h035] = 8'h02;
-		rom[9'h036] = 8'h11;
-		rom[9'h037] = 8'h01;
-		rom[9'h038] = 8'h08;
+		rom[9'h036] = 8'h8d;
+		rom[9'h037] = 8'h00;
+		rom[9'h038] = 8'h04;
 		rom[9'h039] = 8'h01;
 		rom[9'h03a] = 8'h04;
 		rom[9'h03b] = 8'hc0;
@@ -85,8 +85,8 @@ module usb_desc_rom (
 		rom[9'h040] = 8'h02;
 		rom[9'h041] = 8'h02;
 		rom[9'h042] = 8'h02;
-		rom[9'h043] = 8'h01;
-		rom[9'h044] = 8'h04;
+		rom[9'h043] = 8'h00;
+		rom[9'h044] = 8'h05;
 		rom[9'h045] = 8'h09;
 		rom[9'h046] = 8'h04;
 		rom[9'h047] = 8'h00;
@@ -94,8 +94,8 @@ module usb_desc_rom (
 		rom[9'h049] = 8'h01;
 		rom[9'h04a] = 8'h02;
 		rom[9'h04b] = 8'h02;
-		rom[9'h04c] = 8'h01;
-		rom[9'h04d] = 8'h04;
+		rom[9'h04c] = 8'h00;
+		rom[9'h04d] = 8'h05;
 		rom[9'h04e] = 8'h05;
 		rom[9'h04f] = 8'h24;
 		rom[9'h050] = 8'h00;
@@ -151,8 +151,8 @@ module usb_desc_rom (
 		rom[9'h082] = 8'h02;
 		rom[9'h083] = 8'h02;
 		rom[9'h084] = 8'h02;
-		rom[9'h085] = 8'h01;
-		rom[9'h086] = 8'h04;
+		rom[9'h085] = 8'h00;
+		rom[9'h086] = 8'h06;
 		rom[9'h087] = 8'h09;
 		rom[9'h088] = 8'h04;
 		rom[9'h089] = 8'h02;
@@ -160,8 +160,8 @@ module usb_desc_rom (
 		rom[9'h08b] = 8'h01;
 		rom[9'h08c] = 8'h02;
 		rom[9'h08d] = 8'h02;
-		rom[9'h08e] = 8'h01;
-		rom[9'h08f] = 8'h04;
+		rom[9'h08e] = 8'h00;
+		rom[9'h08f] = 8'h06;
 		rom[9'h090] = 8'h05;
 		rom[9'h091] = 8'h24;
 		rom[9'h092] = 8'h00;
@@ -211,223 +211,147 @@ module usb_desc_rom (
 		rom[9'h0be] = 8'h40;
 		rom[9'h0bf] = 8'h00;
 		rom[9'h0c0] = 8'h00;
-		rom[9'h0c1] = 8'h08;
-		rom[9'h0c2] = 8'h0b;
-		rom[9'h0c3] = 8'h04;
-		rom[9'h0c4] = 8'h02;
-		rom[9'h0c5] = 8'h02;
-		rom[9'h0c6] = 8'h02;
-		rom[9'h0c7] = 8'h01;
-		rom[9'h0c8] = 8'h04;
-		rom[9'h0c9] = 8'h09;
-		rom[9'h0ca] = 8'h04;
-		rom[9'h0cb] = 8'h04;
+		rom[9'h0c1] = 8'h06;
+		rom[9'h0c2] = 8'h03;
+		rom[9'h0c3] = 8'h09;
+		rom[9'h0c4] = 8'h04;
+		rom[9'h0c5] = 8'h1d;
+		rom[9'h0c6] = 8'h04;
+		rom[9'h0c7] = 8'h18;
+		rom[9'h0c8] = 8'h03;
+		rom[9'h0c9] = 8'h50;
+		rom[9'h0ca] = 8'h00;
+		rom[9'h0cb] = 8'h65;
 		rom[9'h0cc] = 8'h00;
-		rom[9'h0cd] = 8'h01;
-		rom[9'h0ce] = 8'h02;
-		rom[9'h0cf] = 8'h02;
-		rom[9'h0d0] = 8'h01;
-		rom[9'h0d1] = 8'h04;
-		rom[9'h0d2] = 8'h05;
-		rom[9'h0d3] = 8'h24;
+		rom[9'h0cd] = 8'h74;
+		rom[9'h0ce] = 8'h00;
+		rom[9'h0cf] = 8'h65;
+		rom[9'h0d0] = 8'h00;
+		rom[9'h0d1] = 8'h72;
+		rom[9'h0d2] = 8'h00;
+		rom[9'h0d3] = 8'h20;
 		rom[9'h0d4] = 8'h00;
-		rom[9'h0d5] = 8'h20;
-		rom[9'h0d6] = 8'h01;
-		rom[9'h0d7] = 8'h05;
-		rom[9'h0d8] = 8'h24;
-		rom[9'h0d9] = 8'h01;
-		rom[9'h0da] = 8'h03;
-		rom[9'h0db] = 8'h05;
-		rom[9'h0dc] = 8'h04;
-		rom[9'h0dd] = 8'h24;
-		rom[9'h0de] = 8'h02;
-		rom[9'h0df] = 8'h06;
-		rom[9'h0e0] = 8'h05;
-		rom[9'h0e1] = 8'h24;
-		rom[9'h0e2] = 8'h06;
-		rom[9'h0e3] = 8'h04;
-		rom[9'h0e4] = 8'h05;
-		rom[9'h0e5] = 8'h07;
-		rom[9'h0e6] = 8'h05;
-		rom[9'h0e7] = 8'h86;
-		rom[9'h0e8] = 8'h03;
-		rom[9'h0e9] = 8'h40;
+		rom[9'h0d5] = 8'h26;
+		rom[9'h0d6] = 8'h00;
+		rom[9'h0d7] = 8'h20;
+		rom[9'h0d8] = 8'h00;
+		rom[9'h0d9] = 8'h50;
+		rom[9'h0da] = 8'h00;
+		rom[9'h0db] = 8'h65;
+		rom[9'h0dc] = 8'h00;
+		rom[9'h0dd] = 8'h72;
+		rom[9'h0de] = 8'h00;
+		rom[9'h0df] = 8'h2e;
+		rom[9'h0e0] = 8'h03;
+		rom[9'h0e1] = 8'h4d;
+		rom[9'h0e2] = 8'h00;
+		rom[9'h0e3] = 8'h41;
+		rom[9'h0e4] = 8'h00;
+		rom[9'h0e5] = 8'h58;
+		rom[9'h0e6] = 8'h00;
+		rom[9'h0e7] = 8'h38;
+		rom[9'h0e8] = 8'h00;
+		rom[9'h0e9] = 8'h30;
 		rom[9'h0ea] = 8'h00;
-		rom[9'h0eb] = 8'h02;
-		rom[9'h0ec] = 8'h09;
-		rom[9'h0ed] = 8'h04;
-		rom[9'h0ee] = 8'h05;
-		rom[9'h0ef] = 8'h00;
-		rom[9'h0f0] = 8'h02;
-		rom[9'h0f1] = 8'h0a;
+		rom[9'h0eb] = 8'h20;
+		rom[9'h0ec] = 8'h00;
+		rom[9'h0ed] = 8'h49;
+		rom[9'h0ee] = 8'h00;
+		rom[9'h0ef] = 8'h2f;
+		rom[9'h0f0] = 8'h00;
+		rom[9'h0f1] = 8'h4f;
 		rom[9'h0f2] = 8'h00;
-		rom[9'h0f3] = 8'h00;
-		rom[9'h0f4] = 8'h04;
-		rom[9'h0f5] = 8'h07;
-		rom[9'h0f6] = 8'h05;
-		rom[9'h0f7] = 8'h85;
-		rom[9'h0f8] = 8'h02;
-		rom[9'h0f9] = 8'h40;
+		rom[9'h0f3] = 8'h20;
+		rom[9'h0f4] = 8'h00;
+		rom[9'h0f5] = 8'h63;
+		rom[9'h0f6] = 8'h00;
+		rom[9'h0f7] = 8'h61;
+		rom[9'h0f8] = 8'h00;
+		rom[9'h0f9] = 8'h72;
 		rom[9'h0fa] = 8'h00;
-		rom[9'h0fb] = 8'h00;
-		rom[9'h0fc] = 8'h07;
-		rom[9'h0fd] = 8'h05;
-		rom[9'h0fe] = 8'h05;
-		rom[9'h0ff] = 8'h02;
-		rom[9'h100] = 8'h40;
-		rom[9'h101] = 8'h00;
+		rom[9'h0fb] = 8'h64;
+		rom[9'h0fc] = 8'h00;
+		rom[9'h0fd] = 8'h20;
+		rom[9'h0fe] = 8'h00;
+		rom[9'h0ff] = 8'h66;
+		rom[9'h100] = 8'h00;
+		rom[9'h101] = 8'h6f;
 		rom[9'h102] = 8'h00;
-		rom[9'h103] = 8'h08;
-		rom[9'h104] = 8'h0b;
-		rom[9'h105] = 8'h06;
-		rom[9'h106] = 8'h02;
-		rom[9'h107] = 8'h02;
-		rom[9'h108] = 8'h02;
-		rom[9'h109] = 8'h01;
-		rom[9'h10a] = 8'h04;
-		rom[9'h10b] = 8'h09;
-		rom[9'h10c] = 8'h04;
-		rom[9'h10d] = 8'h06;
-		rom[9'h10e] = 8'h00;
-		rom[9'h10f] = 8'h01;
-		rom[9'h110] = 8'h02;
-		rom[9'h111] = 8'h02;
-		rom[9'h112] = 8'h01;
-		rom[9'h113] = 8'h04;
-		rom[9'h114] = 8'h05;
-		rom[9'h115] = 8'h24;
+		rom[9'h103] = 8'h72;
+		rom[9'h104] = 8'h00;
+		rom[9'h105] = 8'h20;
+		rom[9'h106] = 8'h00;
+		rom[9'h107] = 8'h41;
+		rom[9'h108] = 8'h00;
+		rom[9'h109] = 8'h42;
+		rom[9'h10a] = 8'h00;
+		rom[9'h10b] = 8'h43;
+		rom[9'h10c] = 8'h00;
+		rom[9'h10d] = 8'h02;
+		rom[9'h10e] = 8'h03;
+		rom[9'h10f] = 8'h1c;
+		rom[9'h110] = 8'h03;
+		rom[9'h111] = 8'h4d;
+		rom[9'h112] = 8'h00;
+		rom[9'h113] = 8'h41;
+		rom[9'h114] = 8'h00;
+		rom[9'h115] = 8'h58;
 		rom[9'h116] = 8'h00;
-		rom[9'h117] = 8'h20;
-		rom[9'h118] = 8'h01;
-		rom[9'h119] = 8'h05;
-		rom[9'h11a] = 8'h24;
-		rom[9'h11b] = 8'h01;
-		rom[9'h11c] = 8'h03;
-		rom[9'h11d] = 8'h07;
-		rom[9'h11e] = 8'h04;
-		rom[9'h11f] = 8'h24;
-		rom[9'h120] = 8'h02;
-		rom[9'h121] = 8'h06;
-		rom[9'h122] = 8'h05;
-		rom[9'h123] = 8'h24;
-		rom[9'h124] = 8'h06;
-		rom[9'h125] = 8'h06;
-		rom[9'h126] = 8'h07;
-		rom[9'h127] = 8'h07;
-		rom[9'h128] = 8'h05;
-		rom[9'h129] = 8'h88;
-		rom[9'h12a] = 8'h03;
-		rom[9'h12b] = 8'h40;
-		rom[9'h12c] = 8'h00;
-		rom[9'h12d] = 8'h02;
-		rom[9'h12e] = 8'h09;
-		rom[9'h12f] = 8'h04;
-		rom[9'h130] = 8'h07;
-		rom[9'h131] = 8'h00;
-		rom[9'h132] = 8'h02;
-		rom[9'h133] = 8'h0a;
+		rom[9'h117] = 8'h38;
+		rom[9'h118] = 8'h00;
+		rom[9'h119] = 8'h30;
+		rom[9'h11a] = 8'h00;
+		rom[9'h11b] = 8'h20;
+		rom[9'h11c] = 8'h00;
+		rom[9'h11d] = 8'h63;
+		rom[9'h11e] = 8'h00;
+		rom[9'h11f] = 8'h6f;
+		rom[9'h120] = 8'h00;
+		rom[9'h121] = 8'h6e;
+		rom[9'h122] = 8'h00;
+		rom[9'h123] = 8'h73;
+		rom[9'h124] = 8'h00;
+		rom[9'h125] = 8'h6f;
+		rom[9'h126] = 8'h00;
+		rom[9'h127] = 8'h6c;
+		rom[9'h128] = 8'h00;
+		rom[9'h129] = 8'h65;
+		rom[9'h12a] = 8'h00;
+		rom[9'h12b] = 8'h1c;
+		rom[9'h12c] = 8'h03;
+		rom[9'h12d] = 8'h50;
+		rom[9'h12e] = 8'h00;
+		rom[9'h12f] = 8'h55;
+		rom[9'h130] = 8'h00;
+		rom[9'h131] = 8'h4e;
+		rom[9'h132] = 8'h00;
+		rom[9'h133] = 8'h38;
 		rom[9'h134] = 8'h00;
-		rom[9'h135] = 8'h00;
-		rom[9'h136] = 8'h04;
-		rom[9'h137] = 8'h07;
-		rom[9'h138] = 8'h05;
-		rom[9'h139] = 8'h87;
-		rom[9'h13a] = 8'h02;
-		rom[9'h13b] = 8'h40;
+		rom[9'h135] = 8'h30;
+		rom[9'h136] = 8'h00;
+		rom[9'h137] = 8'h20;
+		rom[9'h138] = 8'h00;
+		rom[9'h139] = 8'h6e;
+		rom[9'h13a] = 8'h00;
+		rom[9'h13b] = 8'h65;
 		rom[9'h13c] = 8'h00;
-		rom[9'h13d] = 8'h00;
-		rom[9'h13e] = 8'h07;
-		rom[9'h13f] = 8'h05;
-		rom[9'h140] = 8'h07;
-		rom[9'h141] = 8'h02;
-		rom[9'h142] = 8'h40;
-		rom[9'h143] = 8'h00;
+		rom[9'h13d] = 8'h74;
+		rom[9'h13e] = 8'h00;
+		rom[9'h13f] = 8'h77;
+		rom[9'h140] = 8'h00;
+		rom[9'h141] = 8'h6f;
+		rom[9'h142] = 8'h00;
+		rom[9'h143] = 8'h72;
 		rom[9'h144] = 8'h00;
-		rom[9'h145] = 8'h06;
-		rom[9'h146] = 8'h03;
-		rom[9'h147] = 8'h09;
-		rom[9'h148] = 8'h04;
-		rom[9'h149] = 8'h1d;
-		rom[9'h14a] = 8'h04;
-		rom[9'h14b] = 8'h18;
-		rom[9'h14c] = 8'h03;
-		rom[9'h14d] = 8'h50;
-		rom[9'h14e] = 8'h00;
-		rom[9'h14f] = 8'h65;
-		rom[9'h150] = 8'h00;
-		rom[9'h151] = 8'h74;
-		rom[9'h152] = 8'h00;
-		rom[9'h153] = 8'h65;
-		rom[9'h154] = 8'h00;
-		rom[9'h155] = 8'h72;
-		rom[9'h156] = 8'h00;
-		rom[9'h157] = 8'h20;
-		rom[9'h158] = 8'h00;
-		rom[9'h159] = 8'h26;
-		rom[9'h15a] = 8'h00;
-		rom[9'h15b] = 8'h20;
-		rom[9'h15c] = 8'h00;
-		rom[9'h15d] = 8'h50;
-		rom[9'h15e] = 8'h00;
-		rom[9'h15f] = 8'h65;
-		rom[9'h160] = 8'h00;
-		rom[9'h161] = 8'h72;
-		rom[9'h162] = 8'h00;
-		rom[9'h163] = 8'h2e;
-		rom[9'h164] = 8'h03;
-		rom[9'h165] = 8'h4d;
-		rom[9'h166] = 8'h00;
-		rom[9'h167] = 8'h41;
-		rom[9'h168] = 8'h00;
-		rom[9'h169] = 8'h58;
-		rom[9'h16a] = 8'h00;
-		rom[9'h16b] = 8'h38;
-		rom[9'h16c] = 8'h00;
-		rom[9'h16d] = 8'h30;
-		rom[9'h16e] = 8'h00;
-		rom[9'h16f] = 8'h20;
-		rom[9'h170] = 8'h00;
-		rom[9'h171] = 8'h49;
-		rom[9'h172] = 8'h00;
-		rom[9'h173] = 8'h2f;
-		rom[9'h174] = 8'h00;
-		rom[9'h175] = 8'h4f;
-		rom[9'h176] = 8'h00;
-		rom[9'h177] = 8'h20;
-		rom[9'h178] = 8'h00;
-		rom[9'h179] = 8'h63;
-		rom[9'h17a] = 8'h00;
-		rom[9'h17b] = 8'h61;
-		rom[9'h17c] = 8'h00;
-		rom[9'h17d] = 8'h72;
-		rom[9'h17e] = 8'h00;
-		rom[9'h17f] = 8'h64;
-		rom[9'h180] = 8'h00;
-		rom[9'h181] = 8'h20;
-		rom[9'h182] = 8'h00;
-		rom[9'h183] = 8'h66;
-		rom[9'h184] = 8'h00;
-		rom[9'h185] = 8'h6f;
-		rom[9'h186] = 8'h00;
-		rom[9'h187] = 8'h72;
-		rom[9'h188] = 8'h00;
-		rom[9'h189] = 8'h20;
-		rom[9'h18a] = 8'h00;
-		rom[9'h18b] = 8'h41;
-		rom[9'h18c] = 8'h00;
-		rom[9'h18d] = 8'h42;
-		rom[9'h18e] = 8'h00;
-		rom[9'h18f] = 8'h43;
-		rom[9'h190] = 8'h00;
-		rom[9'h191] = 8'h02;
-		rom[9'h192] = 8'h03;
-		rom[9'h193] = 8'h00;
-		rom[9'h194] = 8'h96;
-		rom[9'h195] = 8'h00;
-		rom[9'h196] = 8'h00;
-		rom[9'h197] = 8'h00;
-		rom[9'h198] = 8'h00;
-		rom[9'h199] = 8'h08;
+		rom[9'h145] = 8'h6b;
+		rom[9'h146] = 8'h00;
+		rom[9'h147] = 8'h00;
+		rom[9'h148] = 8'h96;
+		rom[9'h149] = 8'h00;
+		rom[9'h14a] = 8'h00;
+		rom[9'h14b] = 8'h00;
+		rom[9'h14c] = 8'h00;
+		rom[9'h14d] = 8'h08;
 	end
 
 	always @(posedge clk) begin
@@ -453,17 +377,21 @@ module usb_desc_index (
 
 	always @(*)
        	if (additional)
-		{addr,len} = {9'h193,9'h007};
+		{addr,len} = {9'h147,9'h007};
 	else priority casez ({windex,dindex,dtype})
-		32'b??????00_00011101_00000010_00000011: {addr,len} = {9'h14b,9'h018};
-		32'b??????00_00011101_00000011_00000011: {addr,len} = {9'h163,9'h02e};
-		32'b??????00_00011101_00000100_00000011: {addr,len} = {9'h191,9'h002};
-		32'b????????_????????_00000000_00000010: {addr,len} = {9'h034,9'h111};
-		32'b????????_????????_00000000_00000011: {addr,len} = {9'h145,9'h006};
+		32'b??????00_00011101_00000010_00000011: {addr,len} = {9'h0c7,9'h018};
+		32'b??????00_00011101_00000011_00000011: {addr,len} = {9'h0df,9'h02e};
+		32'b??????00_00011101_00000100_00000011: {addr,len} = {9'h10d,9'h002};
+		32'b??????00_00011101_00000101_00000011: {addr,len} = {9'h10f,9'h01c};
+		32'b??????00_00011101_00000110_00000011: {addr,len} = {9'h12b,9'h01c};
+		32'b????????_????????_00000000_00000010: {addr,len} = {9'h034,9'h08d};
+		32'b????????_????????_00000000_00000011: {addr,len} = {9'h0c1,9'h006};
 		32'b????????_????????_00000001_00000011: {addr,len} = {9'h000,9'h022};
-		32'b????????_????????_00000010_00000011: {addr,len} = {9'h14b,9'h018};
-		32'b????????_????????_00000011_00000011: {addr,len} = {9'h163,9'h02e};
-		32'b????????_????????_00000100_00000011: {addr,len} = {9'h191,9'h002};
+		32'b????????_????????_00000010_00000011: {addr,len} = {9'h0c7,9'h018};
+		32'b????????_????????_00000011_00000011: {addr,len} = {9'h0df,9'h02e};
+		32'b????????_????????_00000100_00000011: {addr,len} = {9'h10d,9'h002};
+		32'b????????_????????_00000101_00000011: {addr,len} = {9'h10f,9'h01c};
+		32'b????????_????????_00000110_00000011: {addr,len} = {9'h12b,9'h01c};
 		32'b????????_????????_????????_00000001: {addr,len} = {9'h022,9'h012};
 		32'b????????_????????_????????_????????: {addr,len} = {9'hxxx,9'h000};
 	endcase