1
0
Fork 0
forked from len0rd/rockbox
Commit graph

634 commits

Author SHA1 Message Date
Sebastian Leonhardt
a7cf86e5c1 Creative ZEN: enable multiboot
defines redirect file name as "rockbox_main.zen"

Change-Id: Ieb0f10492ccf6edfa5652882ec031a7b4e862b04
2025-10-02 08:52:33 -04:00
Solomon Peachy
9644bb5d9d ipod6g: CE-ATA uses a 4K block size at minimum
Therefore, turn on MAX_VARIABLE_LOG_SECTOR so we can support 512B and 4K
sector sizes.  Additionally, correct the interpretation of identify info
word 106 in CE-ATA mode.

Change-Id: I24dc7dd4a8617fcb60ed87c0c1be98d00dbdfa30
2025-09-16 15:12:16 -04:00
Solomon Peachy
4960a3b753 ipod: Turn on SMART support for all PP502x-based iPods
Unless you've modded the device with modern CF or mSATA storage, it's
not likely to achieve anything.  the original hard drives (supposedly)
lack SMART support, and none of the SD adapters bother to emulate it.

Change-Id: Id3cbe717c64947faf4b23d8c84a04b822cfb35da
2025-09-16 10:59:57 -04:00
Solomon Peachy
14157860b9 rgnano: Shrink CODEC and PLUGIN buffer sizes to reasonable sizes
(From 4MB->2MB and 8MB->2MB, respectively)

This is a hosted platform with a decent amount of free RAM; however
plugins and codecs are dlopen() which doesn't count against those
buffers.  Furthermore, the rgnano uses musl libc which does NOT
implement dlclose() so plugins, codecs, etc stick around in RAM
indefinitely even if they are never used again.

By shrinking these buffers we free up a bit more headroom for dlopen()
to leak, and for the host OS to provide disk caches and whatnot.

Change-Id: Ie657bd3b9fc8bd2a1f4bbc07debe3b10538c41c3
2025-09-13 08:44:38 -04:00
Solomon Peachy
19ee9363d1 ibasso: Rejigger RAM and buffer sizes a little
Shrink audio buffer from ~256MB to ~192MB.  Increase plugin buffer size
to 2MB, not that it should matter given how much extra RAM this platform has.

This leaves plenty of room for the base OS to do what it needs to do.

Change-Id: I59ca235b9cf80cf86d406e4a144fee7d7784ed5d
2025-09-13 08:44:38 -04:00
Solomon Peachy
b497e71708 hibylinux: Shrink PLUGIN_BUFFER to 512K
Hosted platforms use dlopen() for plugin loading, and hibylinux is
relatively RAM constrained, so shrink this will free up more memory to
the OS for plugins to use.

Change-Id: I6b7cb17b964eaf5afc4958db242dfe4b82178e2e
2025-09-13 08:44:38 -04:00
Hairo R. Carela
268a282da6 rgnano: Proper keylock support
Can use the advanced keylock menu options now.

Change-Id: If59b16ef5649c328558a74dd0601bc2f272c37b7
2025-08-30 17:20:31 -04:00
Hairo R. Carela
6f107430f4 rgnano: Voltage and current measure support
Battery time estimation works now.

This commit also changes the mksquashfs path to FUNKEY_SDK_PATH.

Change-Id: Ic0aa4c40011b0716f1c36c014377eaccb486e841
2025-08-23 13:44:25 -04:00
Solomon Peachy
0456ec5630 IAP: First steps towards true multiport state
iap_reset_state() and iap_getc() are now passed the logical IAP port
(0 is dock/only connector, 1 is headphone connector)

Change-Id: I97421146a8cab032b90c9b4eb55b50aa00d73312
2025-08-20 07:56:43 -04:00
Hairo R. Carela
69f27d4c66 rgnano: Use proper lcd depth and pixelformat
According to screen driver this device screen is actually 16 bit RGB565 (https://github.com/DrUm78/linux/blob/FunKey_S/drivers/staging/fbtft/fb_st7789v.c#L137).

This also fixes the color banding issues we had before and boomshine doesn't segfault anymore. Also building rockpaint now that's possible.

Change-Id: Icee49c347fbfabc79e0040314ec148cb77ca6325
2025-08-18 21:43:13 -04:00
Hairo R. Carela
7b0f408c71 rgnano: UI simulator support
Change-Id: Id488d16e01ef49a9d1b57641bc1c22ed2fef4931
2025-08-05 08:30:30 -04:00
Hairo R. Carela
48392bab94 New port: Anbernic RG Nano
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
2025-07-29 21:01:53 -04:00
Solomon Peachy
08a6f804ce ibasso: Use correct API to query power input and charging state
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
2025-05-22 07:15:15 -04:00
Solomon Peachy
0ebfab36ba surfansf28: More fixes:
* Use 16-bit audio output
 * More audio tweaks (mute on startup, working volume control)
 * Treat the rotary input as a scroll wheel (works now)

To-dos:

 * Better global keymap (incorporate touchscreen)
 * Turn on plugins and define the approximately eight bajillion keymaps
 * Still have some audible pops when we turn on, need to figure out why
 * Default Cabbiev2 comes off as rather crappy on this device

...I don't know how much work I will do on this thing, as the limited
number of physical controls (and a lack of a line-out) mean I'd never
want to use this thing myself.

Change-Id: I37229d92766495219ee989d9ae48b5ed79bd45f5
2025-05-06 09:56:03 -04:00
Solomon Peachy
95f970076e surfansf28: Major improvements:
* Add a crude keymap
 * Use native "hardware mute" for audiohw_mute()
 * Properly handle touchscreen inputs
 * Can now play back music, with some warts..

Broken:

 * rotary wheel still doesn't work
 * audio garbled/distorted a bit
 * no volume control

Change-Id: I040217035a7bf3983b0e269fca3408eedd972cd0
2025-05-05 20:38:18 -04:00
Solomon Peachy
82f3d0c18f WIP hosted port to the Surfans F28
* 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
2025-05-04 18:34:22 -04:00
Solomon Peachy
de74b8738b nano4g: Make real bootloader fit in limited IRAM
...Trim support for alpha-blended bitmaps and stack trace.

Change-Id: I2d10af6c8bcb261cdbfb3f17ed81b6ee9bb0cc4b
2025-04-24 20:35:27 -04:00
Aidan MacDonald
83950bf233 New WIP port: Echo R1
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
2025-04-22 20:08:08 -04:00
Vencislav Atanasov
545506c923 New port: iPod Nano 4G
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
2025-04-18 20:40:49 -04:00
Vencislav Atanasov
d6cd237f80 New port: iPod Nano 3G
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
2025-04-18 20:10:29 -04:00
Aidan MacDonald
b71337f1fd x1000: remove LCD fast sleep define
All the X1000 targets use "fast" sleep, as opposed to the normal
HAVE_LCD_SLEEP define which creates a user-configurable option.
Remove the ifdefs to make the code a bit easier to read.

Change-Id: Ibb80c92a8e23191651fee61fc8cf6f4e4fac8750
2025-04-18 10:35:49 -04:00
William Wilgus
4f3bbeaffc Remove BATTERY_TYPES
Change-Id: I4fa03a10d0032fd6f92722bbe1d4b7eec0b95cb4
2025-03-11 02:26:38 -04:00
Dana Conrad
96463d855f erosqnative: hw4 units prefer egauge battery percentage
Use AXP2101's egauge battery percent level if available (hw4 units).
If not available (_battery_level() will return -1 on hw1-hw3 units),
fall back to voltage battery level.

Also fix logic in axp2101_battery_status()

Change-Id: Ic300418532dae6f7772fff8bf5e2b32516f3b973
2025-01-19 17:30:21 -05:00
Solomon Peachy
9417ece0ea imx233: Make bootloader compile, fix up remanining warnings
Change-Id: Ie87d178c56455b93364dffa656ebbee9cd7a4bad
2025-01-08 09:14:20 -05:00
Christian Soffke
18aa0f6278 Creative Zen Vision: fix config file (?!)
If I'm interpreting the git history correctly,
the config file for Zen Vision was at some point
inadvertently replaced with one for the
Zen Vision:M.

This deletes the currently unused creativezv.h,
and moves its contents into zenvision.h.

The config files appear to be identical except for
CREATIVE_ZV vs CREATIVE_ZVM define, different
keypads (CREATIVEZVM_PAD vs CREATIVEZV_PAD) and
BOOTFILE_EXT (zv vs zvm), a different model name
and number, as well as different LCD dimensions
and DPI.

The buttonmap still seems to require adjustment.

Change-Id: I9a5e65df750db21be5f5a1ed7a80a50706237781
2025-01-08 08:06:45 -05:00
Solomon Peachy
a76ecf1725 erosqnative: Fix operation in a simulator environment
Real hardware needs 24-bit PCM data supplied, but simulator
is still 16bit only.

Change-Id: I20b88a7cb27105829fe5c9e9c434f559a6dbbb60
2024-12-07 14:05:23 -05:00
Solomon Peachy
127b583a4d ipod6g: Turn on STORAGE_NEEDS_BOUNCE_BUFFER
The s5l8702's ATA controller can only DMA in/out of cacheline-
aligned buffers.  The more general buffering code already ensures
its buffers are aligned, but this covers the rest of the
users of the general I/O path.

Change-Id: Iae54d98797efb61756cb73e3901308775a0c5e52
2024-11-26 08:20:02 -05:00
Vencislav Atanasov
f4bbddb044 ipod6g: Fix config
- NOR flash size is 1MB, not 10MB
- BOOTFILE_EXT2 is not used, the Rockbox binary is always unencrypted on iPod 6G. This looks like a leftover from ipodnano2g config

Change-Id: Iea76c1e87f27e25b3d59924ef02e22d91448e39d
2024-11-23 17:19:18 -05:00
Dana Conrad
253eb79db3 erosqnative: hw4 support
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
2024-11-22 17:01:39 -05:00
Vencislav Atanasov
1c7fddad5b Add the remaining iPod Nano SoCs to config
Currently only S5L8701 (Nano 2G) and S5L8702 (Classic/6G, Nano 3G) are defined. This change adds the remaining to CONFIG_CPU, as a preparation for porting to these platforms. It also defines the RTC types for Nano 3G and Nano 4G.

New CONFIG_CPU options:
S5L8720 - iPod Nano 4G
S5L8730 - iPod Nano 5G
S5L8723 - iPod Nano 6G
S5L8760 - iPod Nano 7G

Change-Id: I4e9e00163c0d0d5a5303f9eee428f9be47a48359
2024-11-21 20:03:32 -05:00
Solomon Peachy
120906dc8b ata: Ensure that the bounce buffer is minimum 32-bit aligned
Basically, if STORAGE_ALIGN_ATTR isn't defined, define it to be
sizeof(uint32_t) in the ATA code.

Change-Id: I13de61788cb71e3e8d3a956ab5f2e251471ce76d
2024-11-15 07:24:08 -05:00
Solomon Peachy
d6e2b5d3cf Enable use of ATA DMA on Philips GoGear HDD1630 and HDD6630
These are PP502x-based devices shipped with ATA drives.  However,
PIO is flaky when used with the various ATA/CF<->SD adapters, so
turn it in across the board.

Change-Id: I65384d95e2e4498eb03f43ac990b01e0c6d060c5
2024-11-11 16:29:56 -05:00
Solomon Peachy
c8e1da8e90 ipod5g/6g: support DEFAULT_VIRT_SECTOR_SIZE
This way if there's no valid partition/filesystem we still report the
"correct" sector size out via USB.

Update the ipod5g/6g bootloaders so they do the right thing too.

Change-Id: I0d93ae7e6664f1591d8edf1c0252c586e329cd4b
2024-11-09 17:48:09 -05:00
Solomon Peachy
c61ad40812 storage: Wrap runtime variable sector size with MAX_VARIABLE_LOG_SECTOR
When enabled this allows 512n and 4Kn drives to be used with a single build.
(So far all ATA SSDs use 512 byte logical sectors)

Change-Id: I902d2318ca8abb581699c0bca68d6e3ec227d064
2024-11-09 16:34:06 -05:00
Solomon Peachy
bc6c189dcb storage: rename MAX_LOG_SECTOR_SIZE to MAX_VIRT_SECTOR_SIZE
Change-Id: I34f00748c1b0935d65af5f0fc6bdd13356ff31e1
2024-11-09 16:32:40 -05:00
Solomon Peachy
42b63daebb ipod6g: Swap STORAGE_NEEDS_BOUNCE_BUFFER for STORAGE_WANTS_ALIGN
Change-Id: Ie34ffe0e022c8416ec9b2d4c39733a15c205eb3d
2024-11-07 21:08:15 -05:00
Solomon Peachy
9dd2781b87 ipod6g: Use storage bounce buffer for ipod6g
Change-Id: I987357bd6795b988802997f92b6d64f36cd24f43
2024-11-07 16:44:25 -05:00
Solomon Peachy
2824bd5f16 ipod6g: Support MAX_PHYS_SECTOR_SIZE of 4K
This lets us *natively* handle varying physical sector sizes
without playing games and lying about the logical sector size.

(The original drives use 4K _physical_ sectors with 512B logical
 sectors, but you have to access everything in 4K blocks...)

Achieve this by splitting the MAX_PHYS_SECTOR_SIZE code out
of the main ATA driver and re-using it.

Change-Id: I0bc615ab4562f1e3e83171a8633c74fb60c7da1f
2024-11-04 07:33:26 -05:00
Solomon Peachy
563da70139 ipod6g: Reworking the bespoke ATA driver
ipod6g was configured with SECTOR_SIZE of 4096, but this ATA driver
unconditionally translated these to 512B operations on the actual
storage device.

Rockbox's storage layer already has robust support for "logical sectors
larger than physical storage sectors" through use of
MAX_LOG_SECTOR_SIZE.  So switch to that mechanism, allowing the ipod6g
ATA driver to be simplified.

If we want to support drives with physical sector sizes > 512B, then
we need to port the MAX_PHYS_SECTOR_SIZE logic from the primary ATA driver.

Additional changes:

 * Simplify MWDMA/UDMA selection logic
 * Report CE-ATA mode in debug menu
 * Use LBA48 commands only if drive is over 128GiB.
 * Drop default sleep/poweroff time from 20s to 7s (matching main ATA driver)

Finally, the bulk of the changes are the first phase of a badly needed
style cleanup that made reading this driver a lot harder than it should
be. I intend to split this into a separate patch.

Change-Id: I2feca9fd319c8d6cfb3c2610208970428d2fa947
2024-10-17 20:30:37 -04:00
Solomon Peachy
edbcf0b0f4 erosq: Initial PM support for "hw4" variant
(They renamed the battery from 'battery' to 'axp_battery')

Change-Id: Ic42c31e1d5c01eafc3fe01b144d9f22d88933e04
2024-10-10 10:12:29 -04:00
Dana Conrad
a7cfee640d erosqnative: only check for EROSQN_VER if bootloader build
Change-Id: If1dea2414b5c55d54dfd48aa9b24d29bdd49001a
2024-09-08 17:10:04 -04:00
Dana Conrad
a5462d6192 erosqnative: Give erosqnative_v3 its own target ID and modelname
This is needed so "make clean; make reconf" will work correctly.

Change-Id: Ife13e59ac6054f04f7095aa2263ec64595eeb3a2
2024-09-08 12:29:03 -04:00
Dana Conrad
878e29396c ErosQNative: Add v3 LCD support, conditional on bootloader
bootloader passes the player version to rockbox for LCD init changes

Credit ZappBranigan2972 on forums for original changes
Credit Bilgus for devicedata additions

Change-Id: Ia2ca493edef49b7457e84dc19b05397dc915fa5a
2024-09-02 13:29:43 -04:00
William Wilgus
a2cc7546d8 Add DeviceData to bootloaders
same vein as bootdata but for devices that need to pass info back to a
running firmware

Change-Id: I0cdcdc0475804dfbbee415ab487104ae8fc8ac69
2024-09-02 13:29:43 -04:00
Solomon Peachy
1528b44349 More red fixes
Change-Id: If22cdb286edac47b08b158bee6910ba7a539b041
2024-07-07 14:47:07 -04:00
Solomon Peachy
f37b5a8349 Fix the remaining red in red from ea80d1cc9ca
Notably:

  * double-paste in ihifi760 config.h
  * jz4740 ATA & SD drivers used MULTIVOLUME instead of MULTIDRIVE
  * Simulators implicitly rely on HAVE_HOTSWAP

Change-Id: I44fc7f98f0f6df366f016567c330f87e9f3ca6a6
2024-07-07 12:29:19 -04:00
Solomon Peachy
181fe7530a Fix most of the (extensive) red in ea80d1cc9ca
Change-Id: Ie494df80caa222423a52977031920d54bd058c3c
2024-07-07 12:05:18 -04:00
Solomon Peachy
ea80d1cc9c config: Change default HAVE_MULTIVOLUME settings
* HAVE_MULTIDRIVE implies HAVE_MULTIVOLUME as the latter is always
   removeable storage
 * SD storage implies MULTIVOLUME
 * ATA storage (with HAVE_LBA48) implies MULTIVOLUME
 * Replace HAVE_MULTIDRIVE && NUM_DRIVES == 1 with HAVE_MULTIVOLUME

Since SD and ATA can exceed 2TB, we need multiple volumes to fully
utilize available storage with FAT32.

In practice I believe this only affects the ipod devices.

Change-Id: Ia597770948b0e2b47630f7264ad34f225a33a640
2024-07-07 11:35:04 -04:00
Solomon Peachy
e2fb4ecd5c xduoox3: Completely strip USB support out of the bootloader.
Change-Id: I7167e051a56a3be3c285c209b1c8fca7de251b09
2024-07-03 16:51:58 -04:00
Szymon Dziok
f7a3b4dfa3 Radio support and detection for Samsung YH92X [FOR TESTING].
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
2024-06-23 20:11:59 -04:00