Commit Graph

7 Commits

Author SHA1 Message Date
Sylvain Munaut 00b57625bc icE1usb fw: Add access functions for the 'time' hardware
The hardware has a tick counter (constantly incremented every
cycle) and a pps counter (which is the tick counter captured
at the pps edge).

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I2122ea3d636c8a430c6eb945b0c11e26e02fee43
2022-01-13 13:21:29 +01:00
Sylvain Munaut be5a53a4fe icE1usb fw: Add GPIO access functions
The 32 bit register is split in different fields to speed up
access to the 'in' field. The oe/out fields can't be split because
all writes are 32 bit wide (i.e. no support for byte enable in the
gateware)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ic25377bb777e5d25939f0e8cfe6b7c6ef8641f6d
2022-01-13 13:21:29 +01:00
Sylvain Munaut 394748ab86 icE1usb fw: Add function to enable/disable E1 led runner
Also don't force enable the runner in the e1_platform_led_set
callback.

Due to GPIO shortage, the E1 leds control are multiplexed with
SPI so this adds a method to temporarely stop the runner so SPI
can be used.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ie671daab5ee5e0b5f58de9d4fef1f0ca7d6d02b6
2022-01-13 13:21:29 +01:00
Sylvain Munaut 436b775e03 icE1usb fw: Expose the ticks from multiple E1 ports in misc.{c,h}
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I4dfdeecb6d3a25025095cd017ebbf74aee41c8b2
2022-01-09 17:21:04 +01:00
Sylvain Munaut 46d6b412f5 firmware/ice40-riscv: Create a reboot() function
instead of direct access to registers.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Iaee092c5ef651f0350b3f46386ed79fdbe06afcb
2020-10-29 13:19:05 +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