summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorLorenzo Miori <memoryS60@gmail.com>2013-09-10 22:48:34 +0200
committerThomas Martitz <kugel@rockbox.org>2014-02-05 09:56:21 +0100
commite876f4df6d240bd2e319b1e63be95a625f049a97 (patch)
treece2fe1b24650e3be7a6cd2d346d29090a5422a8c /firmware/export
parentb828b9d99bff2acc0e1f543f3176fd4b632cba68 (diff)
downloadrockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.zip
rockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.tar.gz
rockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.tar.bz2
rockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.tar.xz
Samsung YP-R1 target port
This is the basic port to the new target Samsung YP-R1, which runs on a similar platform as YP-R0. Port is usable, although there are still some optimizations that have to be done. Change-Id: If83a8e386369e413581753780c159026d9e41f04
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config.h4
-rw-r--r--firmware/export/config/samsungypr1.h152
-rw-r--r--firmware/export/rbpaths.h6
3 files changed, 159 insertions, 3 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index b72aa33..d2e1f6b 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -152,6 +152,7 @@
#define CREATIVE_ZEN_PAD 58
#define SAMSUNG_YPZ5_PAD 59
#define IHIFI_PAD 60
+#define SAMSUNG_YPR1_PAD 61
/* CONFIG_REMOTE_KEYPAD */
#define H100_REMOTE 1
@@ -263,6 +264,7 @@
#define LCD_SAMSUNGYPZ5 59 /* as used by Samsung YP-Z5 */
#define LCD_IHIFI 60 /* as used by IHIFI 760/960 */
#define LCD_CREATIVEZENXFISTYLE 61 /* as used by Creative Zen X-Fi Style */
+#define LCD_SAMSUNGYPR1 62 /* as used by Samsung YP-R1 */
/* LCD_PIXELFORMAT */
#define HORIZONTAL_PACKING 1
@@ -559,6 +561,8 @@ Lyre prototype 1 */
#include "config/ihifi960.h"
#elif defined(CREATIVE_ZENXFISTYLE)
#include "config/creativezenxfistyle.h"
+#elif defined(SAMSUNG_YPR1)
+#include "config/samsungypr1.h"
#else
/* no known platform */
#endif
diff --git a/firmware/export/config/samsungypr1.h b/firmware/export/config/samsungypr1.h
new file mode 100644
index 0000000..a590dd5
--- /dev/null
+++ b/firmware/export/config/samsungypr1.h
@@ -0,0 +1,152 @@
+/*
+ * This config file is for the RockBox as application on the Samsung YP-R1 player.
+ * The target name for ifdefs is: SAMSUNG_YPR1; or CONFIG_PLATFORM & PLAFTORM_YPR1
+ */
+
+/* We don't run on hardware directly */
+/* YP-R1 need it too of course */
+#define CONFIG_PLATFORM (PLATFORM_HOSTED)
+
+/* For Rolo and boot loader */
+#define MODEL_NUMBER 101
+
+#define MODEL_NAME "Samsung YP-R1"
+
+#define USB_NONE
+
+/* define this if you have a bitmap LCD display */
+#define HAVE_LCD_BITMAP
+
+/* define this if you have a colour LCD */
+#define HAVE_LCD_COLOR
+
+/* Define this if the LCD can shut down */
+#define HAVE_LCD_SHUTDOWN
+
+/* define this if you have LCD enable function */
+#define HAVE_LCD_ENABLE
+
+/* define this if you want album art for this target */
+#define HAVE_ALBUMART
+
+/* define this to enable bitmap scaling */
+#define HAVE_BMP_SCALING
+
+/* define this to enable JPEG decoding */
+#define HAVE_JPEG
+
+/* define this if you have access to the quickscreen */
+#define HAVE_QUICKSCREEN
+
+/* define this if you would like tagcache to build on this target */
+#define HAVE_TAGCACHE
+
+/* We try to support both orientation, looking forward for a future dynamic switch */
+#define CONFIG_ORIENTATION SCREEN_PORTRAIT
+
+/* LCD dimensions */
+#if CONFIG_ORIENTATION == SCREEN_PORTRAIT
+#define LCD_WIDTH 240
+#define LCD_HEIGHT 400
+#else
+#define LCD_WIDTH 400
+#define LCD_HEIGHT 240
+#endif
+
+#define LCD_DEPTH 16
+/* Calculated value, important for touch sensor */
+#define LCD_DPI 180
+/* Check that but should not matter */
+#define LCD_PIXELFORMAT RGB565
+
+/* Capacitive touchscreen */
+#define HAVE_TOUCHSCREEN
+#define HAVE_BUTTON_DATA
+
+/* We have backlight to control */
+#define HAVE_BACKLIGHT
+
+/* Define this for LCD backlight brightness available */
+#define HAVE_BACKLIGHT_BRIGHTNESS
+
+/* Main LCD backlight brightness range and defaults */
+/* From 0 to 32. Default is 18, that is set by the bootloader
+ * We stay a little lower since OF makes a distinction between
+ * two LCD screens (there is no reason to go further than 25 in any case)
+ */
+#define MIN_BRIGHTNESS_SETTING 1
+#define MAX_BRIGHTNESS_SETTING 25
+#define DEFAULT_BRIGHTNESS_SETTING 18
+
+/* Which backlight fading type? */
+#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
+
+/* The number of bytes reserved for loadable codecs */
+#define CODEC_SIZE 0x80000
+
+/* The number of bytes reserved for loadable plugins */
+#define PLUGIN_BUFFER_SIZE 0x100000
+
+#define AB_REPEAT_ENABLE
+
+/* Define this if you do software codec */
+#define CONFIG_CODEC SWCODEC
+
+/* R1 KeyPad configuration for plugins */
+#define CONFIG_KEYPAD SAMSUNG_YPR1_PAD
+#define BUTTON_DRIVER_CLOSE
+
+/* We have WM1808, which so far is compatible with the following */
+#define HAVE_WM8978
+
+/* For the moment the only supported frequency is 44kHz,
+ * even if the codec supports more (see wmcodec-ypr1.c)
+ */
+#define HW_SAMPR_CAPS SAMPR_CAP_44
+
+/* define the bitmask of recording sample rates */
+#define REC_SAMPR_CAPS HW_SAMPR_CAPS /* Same as playback */
+
+/* We have the Si4709 */
+#define CONFIG_TUNER SI4700
+#define HAVE_TUNER_PWR_CTRL
+#define HAVE_RDS_CAP
+
+/* Define this for FM radio input available */
+#define HAVE_FMRADIO_IN
+#define INPUT_SRC_CAPS SRC_CAP_FMRADIO
+
+/* We have a GPIO pin that detects it */
+#define HAVE_HEADPHONE_DETECTION
+
+/* R1 has a standard linux RTC driver on /dev/rtc1 (->/dev/rtc)
+ * The RTC is S35392 A
+ */
+#define CONFIG_RTC APPLICATION
+
+#define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity */
+#define BATTERY_CAPACITY_MIN 600 /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 600 /* max. capacity selectable */
+#define BATTERY_CAPACITY_INC 0 /* capacity increment */
+#define BATTERY_TYPES_COUNT 1 /* only one type */
+
+/* Define current usage levels. */
+#define CURRENT_NORMAL 24 /* ~25h, on 600mAh that's about 24mA */
+#define CURRENT_BACKLIGHT 62 /* ~6,5h -> 92mA. Minus 24mA normal that gives us 68mA */
+
+/* R1's fuel gauge max17040 can supply both kind of values */
+#define CONFIG_BATTERY_MEASURE PERCENTAGE_MEASURE
+
+/* Hardware controls charging, we can monitor */
+#define CONFIG_CHARGING CHARGING_MONITOR
+
+#define CONFIG_LCD LCD_SAMSUNGYPR1
+
+/* Define this if you have a software controlled poweroff */
+#define HAVE_SW_POWEROFF
+
+/* define this if the target has volume keys which can be used in the lists */
+#define HAVE_VOLUME_IN_LIST
+
+/* This mount point resides in the rootfs, binded to /mnt/media0/.rockbox */
+#define BOOTDIR "/.rockbox"
diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h
index d50f66d..9fa1d32 100644
--- a/firmware/export/rbpaths.h
+++ b/firmware/export/rbpaths.h
@@ -40,9 +40,9 @@
#define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1)
#endif /* def __PCTOOL__ */
-#if !defined(APPLICATION) || defined(SAMSUNG_YPR0)
+#if !defined(APPLICATION) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1)
-#ifdef SAMSUNG_YPR0
+#if defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1)
#define HOME_DIR "/mnt/media0"
#else
#define HOME_DIR "/"
@@ -83,7 +83,7 @@ extern void paths_init(void);
#define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos"
#define VIEWERS_DIR PLUGIN_DIR "/viewers"
-#if defined(APPLICATION) && !defined(SAMSUNG_YPR0)
+#if defined(APPLICATION) && !(defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1))
#define PLUGIN_DATA_DIR ROCKBOX_DIR "/rocks.data"
#define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR
#define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR