blob: d0542bdb4f04e4259603766323d0ae409c915733 [file] [log] [blame]
Harald Welted645d442020-12-14 19:20:38 +01001[[firmware]]
2== icE1usb Firmware
3
4The icE1usb _firmware_ is a small amount of bare-iron software running
5on the picoRISCV soft-core of the _gateware_.
6
7It mainly consists of drivers for the no2e1 E1 Framer IP core and the
8no2usb USB Device IP core which are part of the gateware described in
9<<gateware>>.
10
11=== Firmware Upgrade (DFU)
12
13icE1usb contains support for the USB DFU (Device Firmware Upgrade)
14standard.
15
16As such, you can use any USB DFU compliant utility to upgrade the
17firmware of the icE1usb device.
18
19DFU mode can be entered in two ways:
20
211. by performing a DFU detach from the normal application firmware
22 (obviously that requires a [still] working firmware present on the
23 device). To do so, please use `dfu-util -e`
24
251. by pushing the push-button (see <<hw-pushbutton>>) during power-up.
26 Simply disconnect the USB cable, then push that button and keep it
27 pushed while re-attaching the USB cable.
28
29The icE1usb boot loader enumerates as VID:PID `1d50:6145`, while the
30normal application firmware enumerates as `1d50:6144`,
31
32You can for example use `lsusb` to check the VID:PID:
33
34----
35$ lsusb -d 1d50:
36Bus 001 Device 042: ID 1d50:6145<1> OpenMoko, Inc. icE1usb
37$ sudo dfu-util -d 1d50:6145 -e <2>
38...
39$ lsusb -d 1d50:
40Bus 001 Device 043: ID 1d50:6144<3> OpenMoko, Inc. icE1usb (DFU)
41----
42<1> initially the device is in normal runtime mode
43<2> we use `dfu-util -e` to switch to DFU mode
44<3> we can see, the device is now in DFU mode
45
46==== Obtaining firmware upgrades
47
48The latest firmware can currently be found at the personal developer
49directory of tnt at https://people.osmocom.org/tnt/e1/
50
51A more official download location will be provided shortly.
52
53==== Upgrading the FPGA gateware
54
55Gateware files are called `icE1usb-*.bin`.
56
57The gateware can be upgraded by accessing the DFU _altsetting 0_ using `dfu-util` *`-a 0`*
58
59Assuming you already are in DFU mode, you would typically use a command
60like `dfu-util -d 1d50:6144 -a 0 -D icE1usb-202010-bd3999e96.bin -R` to perform the upgrade.
61
62NOTE: The `-R` will switch the device back to runtime mode after the
63upgrade. If you want to upgrade the firmware in the same session, skip
64the `-R` in the above command.
65
66==== Upgrading the picoRISCV firmware
67
68Firmware files are called `fw_app*.bin`.
69
70The firmware can be upgraded by accessing the DFU _altsetting 1_ using `dfu-util` *`-a 1`*
71
72Assuming you already are in DFU mode, you would typically use a command
73like `dfu-util -d 1d50:6144 -a 1 -D fw_app-202011-4d9a04e2.bin -R` to perform the upgrade.
74
75.Typical output during upgrade of the firmware
76----
77$ sudo dfu-util -d 1d50:6144 -a 1 -D ./fw_app.bin -R
78dfu-util 0.9
79
80Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
81Copyright 2010-2016 Tormod Volden and Stefan Schmidt
82This program is Free Software and has ABSOLUTELY NO WARRANTY
83Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
84
85dfu-util: Invalid DFU suffix signature
86dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
87Opening DFU capable USB device...
88ID 1d50:6144
89Run-time device DFU version 0101
90Claiming USB DFU Interface...
91Setting Alternate Setting #1 ...
92Determining device status: state = dfuIDLE, status = 0
93dfuIDLE, continuing
94DFU mode device DFU version 0101
95Device returned transfer size 4096
96Copying data from PC to DFU device
97Download [=========================] 100% 11256 bytes
98Download done.
99state(2) = dfuIDLE, status(0) = No error condition is present
100Done!
101Resetting USB to switch back to runtime mode
102----
103
104As the `-R` option was used, the device will reset and re-enumerate in
105the newly programmed firmware.
106
107You can verify this as follows:
108
109----
110$ lsusb -d 1d50:
111Bus 001 Device 042: ID 1d50:6145 OpenMoko, Inc. icE1usb
112----
113
114or alternatively:
115
116----
117$ dfu-util -l -d 1d50:
118dfu-util 0.9
119
120Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
121Copyright 2010-2016 Tormod Volden and Stefan Schmidt
122This program is Free Software and has ABSOLUTELY NO WARRANTY
123Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
124
125Found Runtime: [1d50:6145] ver=0003, devnum=44, cfg=1, intf=1, path="1-2", alt=0, name="DFU runtime", serial="dc697407e7881531"
126----
127
128
129=== Use of the E1 Interface LEDs
130
131Each E1 interface has two LEDs integrated into the RJ45 connector.
132
133FIXME: describe how they are used.
134
135=== Use of the Multi-Color RGB LED
136
137FIXME: describe how it is used.