summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/audiohw.h2
-rw-r--r--firmware/export/config.h3
-rw-r--r--firmware/export/config/erosqnative.h125
-rw-r--r--firmware/export/eros_qn_codec.h35
4 files changed, 165 insertions, 0 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index 5b2815149d..5a706da3b8 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -210,6 +210,8 @@ struct sound_settings_info
210#include "df1704.h" 210#include "df1704.h"
211#elif defined(HAVE_PCM1792_CODEC) 211#elif defined(HAVE_PCM1792_CODEC)
212#include "pcm1792.h" 212#include "pcm1792.h"
213#elif defined(HAVE_EROS_QN_CODEC)
214#include "eros_qn_codec.h"
213#elif defined(HAVE_NWZ_LINUX_CODEC) 215#elif defined(HAVE_NWZ_LINUX_CODEC)
214#include "nwzlinux_codec.h" 216#include "nwzlinux_codec.h"
215#elif defined(HAVE_CS4398) 217#elif defined(HAVE_CS4398)
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 5e7b2be6e4..702b821856 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -276,6 +276,7 @@
276#define LCD_IHIFI800 68 /* as used by IHIFI 800 */ 276#define LCD_IHIFI800 68 /* as used by IHIFI 800 */
277#define LCD_FIIOM3K 69 /* as used by the FiiO M3K */ 277#define LCD_FIIOM3K 69 /* as used by the FiiO M3K */
278#define LCD_SHANLING_Q1 70 /* as used by the Shanling Q1 */ 278#define LCD_SHANLING_Q1 70 /* as used by the Shanling Q1 */
279#define LCD_EROSQ 71 /* as used by the ErosQ (native) */
279 280
280/* LCD_PIXELFORMAT */ 281/* LCD_PIXELFORMAT */
281#define HORIZONTAL_PACKING 1 282#define HORIZONTAL_PACKING 1
@@ -596,6 +597,8 @@ Lyre prototype 1 */
596#include "config/aigoerosq.h" 597#include "config/aigoerosq.h"
597#elif defined(SHANLING_Q1) 598#elif defined(SHANLING_Q1)
598#include "config/shanlingq1.h" 599#include "config/shanlingq1.h"
600#elif defined(EROS_QN)
601#include "config/erosqnative.h"
599#else 602#else
600//#error "unknown hwardware platform!" 603//#error "unknown hwardware platform!"
601#endif 604#endif
diff --git a/firmware/export/config/erosqnative.h b/firmware/export/config/erosqnative.h
new file mode 100644
index 0000000000..1b37b6042a
--- /dev/null
+++ b/firmware/export/config/erosqnative.h
@@ -0,0 +1,125 @@
1/*
2 * This config file is for the AIGO EROS Q / EROS K (and its clones)
3 */
4
5/* For Rolo and boot loader */
6#define MODEL_NAME "AIGO Eros Q Native"
7#define MODEL_NUMBER 116
8#define BOOTFILE_EXT "erosq"
9#define BOOTFILE "rockbox." BOOTFILE_EXT
10#define BOOTDIR "/.rockbox"
11#define FIRMWARE_OFFSET_FILE_CRC 0
12#define FIRMWARE_OFFSET_FILE_DATA 8
13
14/* CPU defines */
15#define CONFIG_CPU X1000
16#define X1000_EXCLK_FREQ 24000000
17#define CPU_FREQ 1008000000
18#define HAVE_FPU
19
20#ifndef SIMULATOR
21#define TIMER_FREQ X1000_EXCLK_FREQ
22#endif
23
24/* kernel defines */
25#define INCLUDE_TIMEOUT_API
26#define HAVE_SEMAPHORE_OBJECTS
27
28/* drivers */
29#define HAVE_I2C_ASYNC
30
31/* Buffers for plugsins and codecs */
32#define PLUGIN_BUFFER_SIZE 0x200000 /* 2 MiB */
33#define CODEC_SIZE 0x100000 /* 1 MiB */
34
35/* LCD defines */
36#define CONFIG_LCD LCD_EROSQ
37#define LCD_WIDTH 320
38#define LCD_HEIGHT 240
39#define LCD_DEPTH 16 /* Future Improvement: 18 or 24 bpp if display supports it */
40#define LCD_PIXELFORMAT RGB565
41/* sqrt(240^2 + 320^2) / 2.0 = 200 */
42#define LCD_DPI 200
43#define HAVE_LCD_COLOR
44#define HAVE_LCD_BITMAP
45#define HAVE_LCD_ENABLE
46#define HAVE_LCD_SHUTDOWN
47#define LCD_X1000_FASTSLEEP
48//#define LCD_X1000_DMA_WAITFORFRAME
49
50#define HAVE_BACKLIGHT
51#define HAVE_BACKLIGHT_BRIGHTNESS
52#define MIN_BRIGHTNESS_SETTING 1
53#define MAX_BRIGHTNESS_SETTING 255
54#define BRIGHTNESS_STEP 5
55#define DEFAULT_BRIGHTNESS_SETTING 70
56#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
57
58/* RTC settings */
59#define CONFIG_RTC RTC_X1000
60
61/* Codec / audio hardware defines */
62#define HW_SAMPR_CAPS SAMPR_CAP_ALL_192
63#define HAVE_EROS_QN_CODEC
64#define HAVE_SW_TONE_CONTROLS
65#define HAVE_SW_VOLUME_CONTROL
66
67/* Button defines */
68#define CONFIG_KEYPAD EROSQ_PAD
69#define HAVE_SCROLLWHEEL
70#define HAVE_HEADPHONE_DETECTION
71#define HAVE_LINEOUT_DETECTION
72
73/* Storage defines */
74#define CONFIG_STORAGE STORAGE_SD
75#define HAVE_HOTSWAP
76#define HAVE_HOTSWAP_STORAGE_AS_MAIN
77#define HAVE_MULTIDRIVE
78#define NUM_DRIVES 1
79#define STORAGE_WANTS_ALIGN
80#define STORAGE_NEEDS_BOUNCE_BUFFER
81
82/* Power management */
83#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
84#define CONFIG_CHARGING CHARGING_MONITOR
85#define HAVE_SW_POWEROFF
86
87#ifndef SIMULATOR
88#define HAVE_AXP_PMU 192
89#define HAVE_POWEROFF_WHILE_CHARGING
90#endif
91
92/* Battery */
93#define BATTERY_TYPES_COUNT 1
94#define BATTERY_CAPACITY_DEFAULT 1300 /* default battery capacity */
95#define BATTERY_CAPACITY_MIN 1300 /* min. capacity selectable */
96#define BATTERY_CAPACITY_MAX 1300 /* max. capacity selectable */
97#define BATTERY_CAPACITY_INC 0 /* capacity increment */
98
99#define CURRENT_NORMAL 100 // 1.7mA * 60s
100#define CURRENT_BACKLIGHT 180
101#define CURRENT_MAX_CHG 500 // bursts higher if needed
102
103/* USB support */
104#ifndef SIMULATOR
105#define CONFIG_USBOTG USBOTG_DESIGNWARE
106#define USB_DW_ARCH_SLAVE
107#define USB_DW_TURNAROUND 5
108#define HAVE_USBSTACK
109#define USB_VENDOR_ID 0xc502
110#define USB_PRODUCT_ID 0x0023
111#define USB_DEVBSS_ATTR __attribute__((aligned(32)))
112#define HAVE_USB_POWER
113#define HAVE_USB_CHARGING_ENABLE
114#define HAVE_BOOTLOADER_USB_MODE
115#endif
116
117/* Rockbox capabilities */
118#define HAVE_VOLUME_IN_LIST
119#define HAVE_FAT16SUPPORT
120#define HAVE_ALBUMART
121#define HAVE_BMP_SCALING
122#define HAVE_JPEG
123#define HAVE_TAGCACHE
124#define HAVE_QUICKSCREEN
125#define HAVE_HOTKEY
diff --git a/firmware/export/eros_qn_codec.h b/firmware/export/eros_qn_codec.h
new file mode 100644
index 0000000000..15c745c04b
--- /dev/null
+++ b/firmware/export/eros_qn_codec.h
@@ -0,0 +1,35 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 *
11 * Copyright (c) 2021 Andrew Ryabinin, Dana Conrad
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22
23#ifndef _EROS_QN_CODEC_H
24#define _EROS_QN_CODEC_H
25
26#define PCM5102A_VOLUME_MIN -740
27#define PCM5102A_VOLUME_MAX 0
28
29AUDIOHW_SETTING(VOLUME, "dB", 0, 1, PCM5102A_VOLUME_MIN/10, PCM5102A_VOLUME_MAX/10, 0)
30
31/* this just calls audiohw_set_volume() with the last (locally) known volume,
32 * used for switching to/from fixed line out volume. */
33void pcm5102_set_outputs(void);
34
35#endif