Commit Graph

17 Commits

Author SHA1 Message Date
Sylvain Munaut 9b3f2c4a6b icE1usb fw: Limit dfuprog to proper USB IDs
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Iaf96565b4068c2d6aa46d8bedac1fad618130a26
2022-10-04 16:16:20 +02:00
Sylvain Munaut db0b81065c icE1usb fw: Add support for building 1 channel version
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I147bb90fca3cead8db776ecfd60c23b4b8bafe2d
2022-10-04 16:16:20 +02:00
Harald Welte cac342af6b icE1usb: Move GPS-DO USB control to separate USB interface
doing so significantly simplifies the development of a Linux kernel
driver, as the GPS-DO only exists once (not twice, like the per-E1-line
interface), and Linux kernel USB drivers typically are for an interface.

There is an option to write a usb_device_driver, but doing so will
exclude the per-interface drivers from still being probed in their usual
fashion.

While we introduce this new USB Interface for the GPS-DO, we also
move the related control endpoint requests from the device level to the
interface level.

Finally, some naming inconsistency between "enum
ice1usb_gpsdo_antenna_state" vs. the member name antenna_status is
resolved.

Change-Id: Icd6555a14896c38626fb147b78af44ff719f2254
2022-02-01 17:57:12 +01:00
Sylvain Munaut e76b643298 icE1usb fw: Add GPSDO VCXO trimming loop
Rather basic and not super well tested, use with caution

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I5f9ce6621492be967d6a44d31f270e107f3ef686
2022-01-13 13:21:29 +01:00
Sylvain Munaut 70c10f05cf icE1usb fw: Expose the GPS NMEA data as a CDC ACM
Note that this is read-only. We drop all data from the host
because we can't have the host reconfigure the module ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ieb6a653ece882c5f90ab27da1bca04c94184dc5a
2022-01-13 13:21:29 +01:00
Sylvain Munaut ef5fe385fe icE1usb fw: Import GPS module driver code
This only initializes the GPS module and keeps track of the
antenna and fix status

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I24811f872fafefc7f8dfaa3028c4288001a87d2f
2022-01-13 13:21:29 +01:00
Sylvain Munaut 2c33f6d5bb icE1usb fw: Add support for the ICE1USB_DEV_GET_FW_BUILD control request
This was already defined but not implemented

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Id65734153c92ef87bc9ecf967447e9bf11804f24
2022-01-13 13:21:29 +01:00
Sylvain Munaut caf8cf94e1 icE1usb fw: Move handling of device-wide request in usb_dev.c
We have upcoming ones not related to the E1 interface, so really
it make more sense to not have those in usb_e1.c

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I686916bb2b2cb90e94ac9c595deab19f189fcd49
2022-01-13 13:21:29 +01:00
Sylvain Munaut 51122af10f icE1usb fw: Add missing ice1usb_proto.h to dependency list
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I63af9839f79dbb0ce40e6582c86076a6cb213b39
2022-01-13 13:21:25 +01:00
Sylvain Munaut 9c213e6ca7 icE1usb fw: Add missing usb_e1.h in the Makefile header list
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I2088700c0fc99dbb2940956dd9066ea098ef3eb6
2022-01-13 13:19:06 +01:00
Sylvain Munaut 5e3fbfe217 icE1usb fw: Warn in case of unused variables
Helps spot left overs from cleanups

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ib5a0b24bace3b9566d974382c90f4153734fc3f3
2022-01-09 19:27:55 +01:00
Sylvain Munaut 8a5a9d4dfb icE1usb fw: Use #define's in descriptors for interface/endpoints ID
This way they can be used in other parts of the code more easily.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I565d9a43bc26b99bc385b46522e7da6a207b2412
2022-01-09 17:21:04 +01:00
Harald Welte 3255b74187 firmware: Build firmware files with auto-generated version numbers
This resembles what we do for other firmware targets, such as simtrace2,
osmo-ccid-firmware, etc.

As we have multiple different firmware, hardware, gateware projects in
this repository, and they each may have separate tags, we now require
that there are project specific tags.  So for example, tags with a
prefix of icE1usb-fw for the firmware versions.

symlinks for easy use by scripts etc. are generated, always pointing to
the last-built versioned filename.

Change-Id: Ia308587e36a79c27fdb285e369a9c921ee65995f
2020-12-17 13:20:51 +01:00
Harald Welte ae2c89e19e firmware: Rename fw_app.bin to icE1usb-fw.bin / e1_tracer-fw.bin
This is clearly much more descriptive, and avoids mixing up firmware
files for different boards

Change-Id: I319edb76dd74be6904395692ab1599fb8f1f9065
2020-12-17 13:20:51 +01:00
Sylvain Munaut 4d9a04e265 firmware/ice40-riscv: Enable more build warnings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I99fad45e3aa9accbacaf020b1f5f93aa4b1d4950
2020-10-29 13:27:19 +01:00
Sylvain Munaut 5e86047024 fw/icE1usb: Update to support production hardware
Also default build to it since very few people would want to build
firmware targetted to the prototypes ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-15 22:20:21 +02:00
Sylvain Munaut bc9f5c4219 fw/icE1usb: Import firmware for the icE1usb and icE1usb-proto boards
Currently only the icE1usb-proto is supported. Adaptation for the
final production hardware is yet to be done.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-09-14 10:56:49 +02:00