A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.
This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.
Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade
Instead of using the generic hosted sysfs code, which expects
a full path, the ibasso code's sysfs code uses an enumeration.
Unfortunatley the generic power input/charging code used the former
API but linked with the latter. oops.
Correct this by placing a private copy of these functions in
the ibasso-specific port, and removing the generic version from
that build.
(A "proper" fix would be to rework all 17 of the ibasso sysfs calls
to use the generic sysfs API)
Change-Id: Ic13adc9782d85560f0c74d77f60a629619d38668
* Only bootloader builds
* Plugins disabled
* No keymaps to anything else
* No simulator
* Touchscreen not wired up yet
* Audio still untested
Bugs:
* rotary encoder does nothing in bootloader
(might be bootloader bug, might be something else)
Other stuff pulled in:
* Unify all of the (identical!) hibyos makefiles
* Rename the "bootloader" to more generic name
Change-Id: I6d8a3b58de726db8e89cf193c90960a070a575c2
The Echo R1 is a new open-hardware music player design, based
on the STM32H743 microcontroller. Schematics and hardware
documentation for it can be found here:
- https://github.com/amachronic/echoplayer
This is an incomplete port. The bootloader can be loaded using
OpenOCD and it can draw to the LCD using SPI. SDRAM is working
but hasn't been extensively tested.
Change-Id: Ifd2bee15c49868fbc989683d3ca14dce48bf3e18
To keep the code size small, this hardcodes the D-Cache line
size and set/way information (which is defined by the target
and should be fixed for a given CPU) and assumes there is only
one level of cache.
Change-Id: Ia6d0e6a87b5dbfc6c39bda83b58461ed8767edf6
Currently, only the development bootloader can be built successfully.
This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.
Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I74ea0da999ddb1d8ce5d0f5434141b3f0b5f7448
Currently, only a bootloader can be built successfully. The development bootloader is functional, it enables further progress on the port.
This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.
Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Idf85e42334b0e0ae36f9ed273e2940d5d7736e34
M-profile cores manage interrupts differently from classic cores
and lack the FIQ. Split the interrupt management parts out into
separate headers but keep the endian swapping routines (which are
not profile-dependent) in the common system-arm header.
The initial part of the vector table is common to all Cortex-M
CPUs and is intended to be included by the target linker script,
with the vendor-specific part of the vector table appended to it.
Change-Id: Ib2ad5b9dc41db27940e39033cfef4308923db66d
No need to create a new texture for every
rendered frame, unless the scaling method
has been adjusted.
We also don't need to upload the (unchanged)
player interface to GPU memory repeatedly.
+ Remove unused lcd_display_redraw &
having_new_lcd variables
Change-Id: I5bff6aa2d54347a3f2c3afba8d8d7eb9e39f77f7
This driver decouples the LCD interface from the target-specific LCD parameters. It makes it possible to reuse most of the ipod6g driver code on ipodnano3g and ipodnano4g.
No difference in the produced binaries for ipodnano2g (normal and bootloader).
Tested on ipod6g (normal and bootloader).
This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.
Change-Id: I7ce198ed3d5a8b58759951e2d67788cbf9781dc8
Since the SPI NOR flash is only used for the bootloader, rename the files accordingly, This is a preparation for the nandboot driver will be introduced, since S5L8720+ don't have an SPI NOR flash anymore.
This is a part of the large iPod Nano 4G and iPod Touch 2G support patch.
Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Iea835fd2029470bfe9f813631ad4f3db711facc3
This is a part of the large iPod Nano 4G and iPod Touch 2G support patch.
Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Ica1e2b8e82ea162ebab01cf119f5da2f8877bc05
Check for the ES9018K2M dac in the bootloader for
hw1/hw2 devices. Assume that all devices newer than
hw2 have ES9018K2M DAC unconditionally.
All devices will now report the correct hw revision
in the debug menu under Device Data.
Add devicedata.version field, current version 0.
Rename device_data.lcd_version to device_data.hw_rev.
hw2 devices with older bootloaders which ID as hw1 are special-
cased to keep using hwvol on them. They should still upgrade though.
Change-Id: If0fd5ce3bc6e85e511047721ec18e42fb89312e7
Support hw4 units with AXP2101 PMU
Bootloader successfully compiles and loads onto device.
The LCD appears to be identical to hw3 units.
Scroll wheel and buttons work
Audio output works, including volume.
HP/LO detect works
Rockbox build is generic
GPIO gating logic seems to be working as intended now.
- Added new GPIO definitions - some significant overlaps with pins
from previous hardware revisions...
- Added some GPIO definitions for older players we didn't know about
- Add register definitions for AXP2101 from datasheet
(these are very different from AXP192!)
- Add AXP2101 regulator definitions, need to support multiple step
sizes per regulator.
- Verify AXP2101 voltage set multi-range logic
- Verify AXP2101 voltage get multi-range logic
- Make AXP2101 its own driver
- AXP2101 driver should be "minimally viable", though I think
there is some extra functionality that could be implemented.
- Disabling the coulomb counter stuff - we could maybe make
the E-Gauge work for the same purpose, but it only appears to
be used on the debug screen at the moment so it doesn't seem
like it's worth the effort.
- Found new button GPIOs
- Found error in my GPIO setting logic, blue light works now!
- Set LDO/DCDC output voltages to OF's settings, as far as
I can tell.
- Determined we probably want TCS1421_CFG1:0 to be 0x00,
for UFP behavior
- Tested this rb build with both old and new bootloaders on hw1.5,
hw2, hw4 in as many configurations as I can think of, works across
the board.
- Bootloader can install itself on hw4, so nand chip isn't novel
- Uninstallation file can be made by patcher script, works on hw4
- Installation file can be made by patcher script, works on hw4
- Added HW4 to rbutil, manual
Change-Id: I5b75782273e81c2c6f2b9c79501c8b7cbf88391f
This is a driver for the UART controller on the S5L87xx series of SoCs, which is named after the SoC family.
Since S5L8720 is confirmed to have the same interface and the newer models probably also have it, the driver is renamed to reflect this.
Change-Id: I974c002924372e860db0e49235d108dab87f8831
This is a preparation to introduce support for the following SoC models: S5L8720 (iPod Nano 4G, iPod Touch 2G), S5L8730 (iPod Nano 5G), S5L8723 (iPod Nano 6G) and S5L8740 (iPod Nano 7G)
The whole family consists of SoCs which are similar, running ARMv6 and Thumb2 instructions, but some peripherals are located at a different address.
No functional change is to be expected so far.
Change-Id: If1f7669c49cf110ccc52c5234cc42ffd6f2b4e80
Status:
- tested on:
Samsung YH920 - it uses this detection too, it always should have
the radio.
Samsung YH925 with the radio.
- untested on:
Samsung YH925 without the radio.
Change-Id: I68b39c09d6b7e26a4c373fbd8bf9401a97e86123
Instead of verifying the CRC before every access of the boot data,
verify the CRC once at startup and set a flag to indicate the boot
data is valid.
Also add a framework to support multiple boot protocol versions.
Firmware declares the maximum supported protocol version using a
version byte in the boot data header. The bootloader chooses the
highest version supported by it and the firmware when deciding
what boot protocol to use.
Change-Id: I810194625dc0833f026d2a23b8d64ed467fa6aca
Basically the namespace code _never_ actually linked properly on hosted
targets, but nobody noticed as there were no users, causing the symbols
to be dropped with no fuss.
The tagcache namespace awareness stuff pulled in the namespace code,
which made things go kaboom due to it relying on native FAT parsing
code.
Change-Id: Idef5f44b026c875022436809ca1f5015eece714a
Add HW volume control via ES9018K2M, and reorganize
eros_qn_codec.c/.h, audiohw-erosqnative.c.
This automatically detects the presence of the new DAC and
uses its hardware volume scaling. If not present, use same
SWVOL we have been using so far.
Add debug menu readout of SWVOL/I2C result.
Break out es9018k2m stuff into its own file so that
maybe it can be useful to other ports.
Note that we may need to get smarter about detecting the DAC
type if/when another model emerges.
Change-Id: I586a1cf7f150dd6b4e221157859825952840af56
In my opinion this API is just not very useful - design is kind
of questionable. There are hidden limits on the struct size and
bugs on 64-bit platforms due to assuming sizeof(long) == 4.
At the end of the day, the only major user was the tagcache and
it's actually less code size to do endian swapping manually.
Change-Id: I451c7f1a10cf3e28744c32c0f1f39a710d5cc100
This is intended for improving the effectiveness of tools like
ASAN when debugging memory errors in the sim. It's not meant to
be a serious allocator for hosted targets.
Enable it by changing the buflib backend in config.h.
Change-Id: I0cf23cefa47ee35dede7b49e0e5b72dac60e8d3e
chunk_alloc allows arrays (or any data) to be allocated in smaller chunks
you have to save the indices..
variable data will have variable indices you need to
store these as [chunk_alloc] doesn't keep track
if you have a fixed size for each
alloc you can do indice / sizeof(data)
or index * sizeof(data) to convert
Lots of debug stuff still in and it needs optimization
User provides chunk_size and max_chunks
max_chunks * struct chunk will be allocated at start
with (1) chunk_size allocation initially
alloc_chunk() with size = 0 shrinks the last allocation to the size of the data used
add OOM checks on buflib_alloc -- oops
move bytes available to the header -- less memory per chunk & better alignment
keep track of the current in use chunk index -- should speed things up a bit
Now allows:
realloc chunk header
larger allocations than chunk size
reallocs smaller than existing will shrink the current array
rather than alloc a new and copy data
Comments welcome :)
Change-Id: I8ed170eef73da95da19430a80b32e5debf0c8276
replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation
in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base
Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
Not sure if this is worth the added bin size yet but I will
see where I can use it to try and make it worth it
Change-Id: Icc299d3986172ff224a14be48da3bf065d728a66
splits on spaces also considers \r\n\f\v\t as mandatory breaks
I'm still working on the strptokspn function
my goal is to use it directly rather than storing the matched char
and modifying the source string with \0 in order to tokenize the output
--Done
Change-Id: I7f378b5b9c4df8f10899b9a55a98950afb3931dc
Merge the x1000 and jz47xx exception handling code since they use
the same exception vectors and handlers. The interrupt handler is
now called from the common exception vector, but remains separate
for each board since they have different IRQ layouts.
The new exception handler can provide a stack traceback from the
interrupted code, rather than the (uninteresting) caller traceback
displayed by panicf. This allows you to see what led up to a null
pointer deref or division by zero, which makes it _much_ easier to
track down errors that occur in common leaf functions like strcmp.
Change-Id: I59a0ebb5e40fcb36505c3bfdb47f8cac2f9936b1
Instead of putting "#ifdef LCD_STRIDEFORMAT" at every usage of the
macro it's simpler to have config.h define LCD_STRIDEFORMAT to the
default of horizontal stride when the target leaves it unspecified.
Change-Id: Ib187012aad65ac678dbd837b1464a83bad722411
The implementation of write_bootdata() and get_redirect_dir() was
copied verbatim in two different places, obviously a bad thing for
maintainability. This moves them to a new file multiboot.c as they
are only used for multiboot.
Change-Id: Id0279216e4dd019f8bf612a81d3835eff010e506
Adds a loader for the legacy uImage format that is commonly used on
embedded Linux systems. It verifies checksums and supports uncompressed
and gzipped images. Supports arbitrary reader functions to allow the
images to be streamed off any storage device, for optimal RAM use.
Change-Id: I93c35f9a6f323999a22a07300e05627fabfcbd2c