diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-05-23 17:30:58 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-07-13 22:01:33 +0100 |
commit | 4c60bc9e681865fcfc149775a1ed7ccd2613d5bf (patch) | |
tree | 99f8d91af2c171cf3843f0c14d41a20d9dc29c4f /firmware/export/config/shanlingq1.h | |
parent | 3abb7c5dd5be2ec6744bfc0a80967b20f1b59e30 (diff) | |
download | rockbox-4c60bc9e681865fcfc149775a1ed7ccd2613d5bf.tar.gz rockbox-4c60bc9e681865fcfc149775a1ed7ccd2613d5bf.zip |
New port: Shanling Q1 native
- Audio playback works
- Touchscreen and buttons work
- Bootloader works and is capable of dual boot
- Plugins are working
- Cabbiev2 theme has been ported
- Stable for general usage
Thanks to Marc Aarts for porting Cabbiev2 and plugin bitmaps.
There's a few minor known issues:
- Bootloader must be installed manually using 'usbboot' as there is
no support in jztool yet.
- Keymaps may be lacking, need further testing and feedback.
- Some plugins may not be fully adapted to the screen size and could
benefit from further tweaking.
- LCD shows abnormal effects under some circumstances: for example,
after viewing a mostly black screen an afterimage appears briefly
when going back to a brightly-lit screen. Sudden power-off without
proper shutdown of the backlight causes a "dissolving" effect.
- CW2015 battery reporting driver is buggy, and disabled for now.
Battery reporting is currently voltage-based using the AXP192.
Change-Id: I635e83f02a880192c5a82cb0861ad3a61c137c3a
Diffstat (limited to 'firmware/export/config/shanlingq1.h')
-rw-r--r-- | firmware/export/config/shanlingq1.h | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/firmware/export/config/shanlingq1.h b/firmware/export/config/shanlingq1.h new file mode 100644 index 0000000000..88175b9160 --- /dev/null +++ b/firmware/export/config/shanlingq1.h | |||
@@ -0,0 +1,119 @@ | |||
1 | /* RoLo-related defines */ | ||
2 | #define MODEL_NAME "Shanling Q1" | ||
3 | #define MODEL_NUMBER 115 | ||
4 | #define BOOTFILE_EXT "q1" | ||
5 | #define BOOTFILE "rockbox." BOOTFILE_EXT | ||
6 | #define BOOTDIR "/.rockbox" | ||
7 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
8 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
9 | |||
10 | /* CPU defines */ | ||
11 | #define CONFIG_CPU X1000 | ||
12 | #define X1000_EXCLK_FREQ 24000000 | ||
13 | #define CPU_FREQ 1008000000 | ||
14 | |||
15 | #ifndef SIMULATOR | ||
16 | #define TIMER_FREQ X1000_EXCLK_FREQ | ||
17 | #endif | ||
18 | |||
19 | /* Kernel defines */ | ||
20 | #define INCLUDE_TIMEOUT_API | ||
21 | #define HAVE_SEMAPHORE_OBJECTS | ||
22 | |||
23 | /* Drivers */ | ||
24 | #define HAVE_I2C_ASYNC | ||
25 | |||
26 | /* Buffer for plugins and codecs. */ | ||
27 | #define PLUGIN_BUFFER_SIZE 0x200000 /* 2 MiB */ | ||
28 | #define CODEC_SIZE 0x100000 /* 1 MiB */ | ||
29 | |||
30 | /* LCD defines */ | ||
31 | #define CONFIG_LCD LCD_SHANLING_Q1 | ||
32 | #define LCD_WIDTH 360 | ||
33 | #define LCD_HEIGHT 400 | ||
34 | #define LCD_DEPTH 16 | ||
35 | #define LCD_PIXELFORMAT RGB565 | ||
36 | #define LCD_DPI 200 | ||
37 | #define HAVE_LCD_COLOR | ||
38 | #define HAVE_LCD_BITMAP | ||
39 | #define HAVE_LCD_ENABLE | ||
40 | #define LCD_X1000_FASTSLEEP | ||
41 | #define LCD_X1000_DMA_WAIT_FOR_FRAME | ||
42 | |||
43 | /* Backlight defines */ | ||
44 | #define HAVE_BACKLIGHT | ||
45 | #define HAVE_BACKLIGHT_BRIGHTNESS | ||
46 | #define MIN_BRIGHTNESS_SETTING 1 | ||
47 | #define MAX_BRIGHTNESS_SETTING 100 | ||
48 | #define BRIGHTNESS_STEP 5 | ||
49 | #define DEFAULT_BRIGHTNESS_SETTING 70 | ||
50 | #define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING | ||
51 | |||
52 | /* Codec / audio hardware defines */ | ||
53 | #define HW_SAMPR_CAPS SAMPR_CAP_ALL_192 | ||
54 | #define HAVE_ES9218 | ||
55 | #define HAVE_SW_TONE_CONTROLS | ||
56 | |||
57 | /* Button defines */ | ||
58 | #define CONFIG_KEYPAD SHANLING_Q1_PAD | ||
59 | #define HAVE_TOUCHSCREEN | ||
60 | #define HAVE_BUTTON_DATA | ||
61 | #define HAVE_FT6x06 | ||
62 | #define HAVE_HEADPHONE_DETECTION | ||
63 | |||
64 | /* Storage defines */ | ||
65 | #define CONFIG_STORAGE STORAGE_SD | ||
66 | #define HAVE_HOTSWAP | ||
67 | #define HAVE_HOTSWAP_STORAGE_AS_MAIN | ||
68 | #define HAVE_MULTIDRIVE | ||
69 | #define NUM_DRIVES 1 | ||
70 | #define STORAGE_WANTS_ALIGN | ||
71 | #define STORAGE_NEEDS_BOUNCE_BUFFER | ||
72 | |||
73 | /* RTC settings */ | ||
74 | #define CONFIG_RTC RTC_X1000 | ||
75 | /* TODO: implement HAVE_RTC_ALARM */ | ||
76 | |||
77 | /* Power management */ | ||
78 | #define CONFIG_BATTERY_MEASURE (VOLTAGE_MEASURE) | ||
79 | #define CONFIG_CHARGING CHARGING_MONITOR | ||
80 | #define HAVE_SW_POWEROFF | ||
81 | |||
82 | #ifndef SIMULATOR | ||
83 | /* TODO: get the CW2015 driver working correctly */ | ||
84 | /* #define HAVE_CW2015 */ | ||
85 | #define HAVE_AXP_PMU 192 /* Presumed */ | ||
86 | #define HAVE_POWEROFF_WHILE_CHARGING | ||
87 | #endif | ||
88 | |||
89 | /* Only one battery type */ | ||
90 | #define BATTERY_CAPACITY_DEFAULT 1100 | ||
91 | #define BATTERY_CAPACITY_MIN 1100 | ||
92 | #define BATTERY_CAPACITY_MAX 1100 | ||
93 | #define BATTERY_CAPACITY_INC 0 | ||
94 | #define BATTERY_TYPES_COUNT 1 | ||
95 | |||
96 | /* USB support */ | ||
97 | #ifndef SIMULATOR | ||
98 | #define CONFIG_USBOTG USBOTG_DESIGNWARE | ||
99 | #define USB_DW_ARCH_SLAVE | ||
100 | #define USB_DW_TURNAROUND 5 | ||
101 | #define HAVE_USBSTACK | ||
102 | #define USB_VENDOR_ID 0x0525 /* Same as the xDuuo X3, for some reason. */ | ||
103 | #define USB_PRODUCT_ID 0xa4a5 /* Nb. DAC mode uses 20b1:301f 'XMOS Ltd' */ | ||
104 | #define USB_DEVBSS_ATTR __attribute__((aligned(32))) | ||
105 | #define HAVE_USB_POWER | ||
106 | #define HAVE_USB_CHARGING_ENABLE | ||
107 | #define HAVE_BOOTLOADER_USB_MODE | ||
108 | #endif | ||
109 | |||
110 | /* Rockbox capabilities */ | ||
111 | #define HAVE_FAT16SUPPORT | ||
112 | #define HAVE_ALBUMART | ||
113 | #define HAVE_BMP_SCALING | ||
114 | #define HAVE_JPEG | ||
115 | #define HAVE_TAGCACHE | ||
116 | #define HAVE_VOLUME_IN_LIST | ||
117 | #define HAVE_QUICKSCREEN | ||
118 | #define HAVE_HOTKEY | ||
119 | #define AB_REPEAT_ENABLE | ||