summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-11-18 20:07:02 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2013-11-18 21:44:06 +0000
commit977a6c3ce7a2ab960590e9d997388cca2e4c29ee (patch)
tree092ef21d5f2123fee784de7d1ee719270c30c6de /firmware
parenta8b816ae9cc00fe216e43d9bd9276b5d8cf12b25 (diff)
downloadrockbox-977a6c3ce7a2ab960590e9d997388cca2e4c29ee.tar.gz
rockbox-977a6c3ce7a2ab960590e9d997388cca2e4c29ee.zip
Initial commit for the Creative ZEN V
Change-Id: I3408cfdf742ea5995d5c87bf76653f436e1ec2b0
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES5
-rw-r--r--firmware/export/config.h3
-rw-r--r--firmware/export/config/creativezenv.h196
-rw-r--r--firmware/target/arm/imx233/creative-zen/backlight-zen.c6
-rw-r--r--firmware/target/arm/imx233/creative-zen/button-target.h6
-rw-r--r--firmware/target/arm/imx233/creative-zen/button-zen.c16
-rw-r--r--firmware/target/arm/imx233/creative-zen/power-zen.c12
-rw-r--r--firmware/target/arm/imx233/emi-imx233.c2
-rw-r--r--firmware/target/arm/imx233/power-imx233.c4
-rw-r--r--firmware/target/arm/imx233/power-imx233.h9
-rw-r--r--firmware/target/arm/imx233/powermgmt-imx233.c2
11 files changed, 256 insertions, 5 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index b96912e880..49a4edcc1d 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1163,13 +1163,16 @@ target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c
1163target/arm/tms320dm320/creative-zvm/usb-creativezvm.c 1163target/arm/tms320dm320/creative-zvm/usb-creativezvm.c
1164#endif /* CREATIVE_ZVx */ 1164#endif /* CREATIVE_ZVx */
1165 1165
1166#if defined(CREATIVE_ZEN) || defined(CREATIVE_ZENXFI) || defined(CREATIVE_ZENMOZAIC) 1166#if defined(CREATIVE_ZEN) || defined(CREATIVE_ZENXFI) || defined(CREATIVE_ZENMOZAIC) \
1167 || defined(CREATIVE_ZENV)
1167target/arm/imx233/creative-zen/fmradio-i2c-zen.c 1168target/arm/imx233/creative-zen/fmradio-i2c-zen.c
1168target/arm/imx233/creative-zen/backlight-zen.c 1169target/arm/imx233/creative-zen/backlight-zen.c
1169# if defined(CREATIVE_ZEN) || defined(CREATIVE_ZENXFI) 1170# if defined(CREATIVE_ZEN) || defined(CREATIVE_ZENXFI)
1170target/arm/imx233/creative-zen/lcd-zen.c 1171target/arm/imx233/creative-zen/lcd-zen.c
1171# elif defined(CREATIVE_ZENMOZAIC) 1172# elif defined(CREATIVE_ZENMOZAIC)
1172target/arm/imx233/creative-zen/lcd-zenmozaic.c 1173target/arm/imx233/creative-zen/lcd-zenmozaic.c
1174# elif defined(CREATIVE_ZENV)
1175target/arm/imx233/creative-zen/lcd-zenv.c
1173#endif 1176#endif
1174target/arm/imx233/creative-zen/button-zen.c 1177target/arm/imx233/creative-zen/button-zen.c
1175target/arm/imx233/creative-zen/debug-zen.c 1178target/arm/imx233/creative-zen/debug-zen.c
diff --git a/firmware/export/config.h b/firmware/export/config.h
index ffe34fb81b..3c4c72c054 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -257,6 +257,7 @@
257#define LCD_CREATIVEZEN 55 /* as used by the Creative ZEN (X-Fi) (LMS250GF03-001(S6D0139)) */ 257#define LCD_CREATIVEZEN 55 /* as used by the Creative ZEN (X-Fi) (LMS250GF03-001(S6D0139)) */
258#define LCD_CREATIVEZENMOZAIC 56 /* as used by the Creative ZEN Mozaic (FGD0801) */ 258#define LCD_CREATIVEZENMOZAIC 56 /* as used by the Creative ZEN Mozaic (FGD0801) */
259#define LCD_ILI9342C 57 /* another type of lcd used by HiFi E.T MA9/MA8 */ 259#define LCD_ILI9342C 57 /* another type of lcd used by HiFi E.T MA9/MA8 */
260#define LCD_CREATIVEZENV 58 /* as used by the Creativr Zen V (Plus) */
260 261
261/* LCD_PIXELFORMAT */ 262/* LCD_PIXELFORMAT */
262#define HORIZONTAL_PACKING 1 263#define HORIZONTAL_PACKING 1
@@ -531,6 +532,8 @@ Lyre prototype 1 */
531#include "config/creativezenmozaic.h" 532#include "config/creativezenmozaic.h"
532#elif defined(CREATIVE_ZEN) 533#elif defined(CREATIVE_ZEN)
533#include "config/creativezen.h" 534#include "config/creativezen.h"
535#elif defined(CREATIVE_ZENV)
536#include "config/creativezenv.h"
534#elif defined(MA9) 537#elif defined(MA9)
535#include "config/hifietma9.h" 538#include "config/hifietma9.h"
536#elif defined(MA9C) 539#elif defined(MA9C)
diff --git a/firmware/export/config/creativezenv.h b/firmware/export/config/creativezenv.h
new file mode 100644
index 0000000000..e1758488ec
--- /dev/null
+++ b/firmware/export/config/creativezenv.h
@@ -0,0 +1,196 @@
1/*
2 * This config file is for the Creative ZEN V
3 */
4#define IMX233_SUBTARGET 3600
5#define IMX233_PACKAGE IMX233_BGA169
6#define IMX233_PARTITIONS IMX233_CREATIVE
7
8/* For Rolo and boot loader */
9#define MODEL_NUMBER 85
10#define MODEL_NAME "Creative ZEN V"
11
12#define HW_SAMPR_CAPS SAMPR_CAP_ALL
13
14/* define this if you have recording possibility */
15#define HAVE_RECORDING
16
17#define REC_SAMPR_CAPS SAMPR_CAP_ALL
18
19/* Default recording levels */
20#define DEFAULT_REC_MIC_GAIN 23
21#define DEFAULT_REC_LEFT_GAIN 23
22#define DEFAULT_REC_RIGHT_GAIN 23
23
24/* Define bitmask of input sources - recordable bitmask can be defined
25 explicitly if different */
26#define INPUT_SRC_CAPS SRC_CAP_MIC
27
28/* define this if you have a bitmap LCD display */
29#define HAVE_LCD_BITMAP
30/* define this if you have a colour LCD */
31#define HAVE_LCD_COLOR
32
33#ifndef BOOTLOADER
34#define HAVE_ALBUMART
35
36/* define this to enable bitmap scaling */
37#define HAVE_BMP_SCALING
38
39/* define this to enable JPEG decoding */
40#define HAVE_JPEG
41
42/* Define this if a programmable hotkey is mapped */
43#define HAVE_HOTKEY
44
45/* define this if you have access to the quickscreen */
46#define HAVE_QUICKSCREEN
47
48/* define this if you would like tagcache to build on this target */
49#define HAVE_TAGCACHE
50
51/* define this if the target has volume keys which can be used in the lists */
52#define HAVE_VOLUME_IN_LIST
53
54/* define this if you have LCD enable function */
55//#define HAVE_LCD_ENABLE
56
57/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
58 should be defined as well.
59#define HAVE_LCD_SLEEP
60#define HAVE_LCD_SLEEP_SETTING
61*/
62
63/* define this if you can flip your LCD
64#define HAVE_LCD_FLIP
65*/
66
67/* define this if you can invert the colours on your LCD
68#define HAVE_LCD_INVERT
69*/
70
71/* define this if you have a real-time clock */
72#define CONFIG_RTC RTC_IMX233
73
74/* define this if you have a real-time clock with alarm facilities */
75#define HAVE_RTC_ALARM
76
77#endif /* !BOOTLOADER */
78
79/* define this if you have an i.MX23 codec */
80#define HAVE_IMX233_CODEC
81
82/* There is no hardware tone control */
83#define HAVE_SW_TONE_CONTROLS
84
85#define CONFIG_KEYPAD CREATIVE_ZEN_PAD
86
87/* Define this to enable morse code input */
88#define HAVE_MORSE_INPUT
89
90/* Define this if you do software codec */
91#define CONFIG_CODEC SWCODEC
92
93/* LCD dimensions */
94#define LCD_WIDTH 132
95#define LCD_HEIGHT 132
96#define LCD_DEPTH 16 /* 65536 colours */
97#define LCD_PIXELFORMAT RGB565 /* rgb565 */
98
99/* Define this if you have a software controlled poweroff */
100#define HAVE_SW_POWEROFF
101
102/* Some devices seem to be FAT16 formatted */
103#define HAVE_FAT16SUPPORT
104
105/* The number of bytes reserved for loadable codecs */
106#define CODEC_SIZE 0x100000
107
108/* The number of bytes reserved for loadable plugins */
109#define PLUGIN_BUFFER_SIZE 0x80000
110
111#define AB_REPEAT_ENABLE
112
113/* Define this for LCD backlight available */
114#define HAVE_BACKLIGHT
115#define HAVE_BACKLIGHT_BRIGHTNESS
116
117/* Main LCD backlight brightness range and defaults */
118#define MIN_BRIGHTNESS_SETTING 0
119#define MAX_BRIGHTNESS_SETTING 16
120#define DEFAULT_BRIGHTNESS_SETTING 10
121
122/* Which backlight fading type? */
123#define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING
124
125/* define this if you have a flash memory storage */
126#define HAVE_FLASH_STORAGE
127
128/* define this if the flash memory uses the SecureDigital Memory Card protocol */
129#define CONFIG_STORAGE STORAGE_ATA
130
131/* todo */
132#define BATTERY_CAPACITY_DEFAULT 550 /* default battery capacity */
133#define BATTERY_CAPACITY_MIN 550 /* min. capacity selectable */
134#define BATTERY_CAPACITY_MAX 550 /* max. capacity selectable */
135#define BATTERY_CAPACITY_INC 0 /* capacity increment */
136#define BATTERY_TYPES_COUNT 1 /* only one type */
137
138#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
139
140/* Charging implemented in a target-specific algorithm */
141//#warning FIXME change this to CHARGING_TARGET when powermgmt is ready
142#define CONFIG_CHARGING CHARGING_TARGET
143
144/* define this if the unit can be powered or charged via USB */
145#define HAVE_USB_POWER
146
147/* Define this if you have an IMX233*/
148#define CONFIG_CPU IMX233
149
150/* Define this if you want to use the IMX233 i2c interface */
151#define CONFIG_I2C I2C_IMX233
152
153/* define current usage levels (based on battery bench) */
154#define CURRENT_NORMAL 35
155#define CURRENT_BACKLIGHT 30
156#define CURRENT_RECORD CURRENT_NORMAL
157
158/* maximum charging current */
159#define CURRENT_MAX_CHG 200
160
161/* Define this to the CPU frequency */
162#define CPU_FREQ 454000000
163
164/* Type of LCD */
165#define CONFIG_LCD LCD_CREATIVEZENV
166
167/* Offset ( in the firmware file's header ) to the file CRC and data. These are
168 only used when loading the old format rockbox.e200 file */
169#define FIRMWARE_OFFSET_FILE_CRC 0x0
170#define FIRMWARE_OFFSET_FILE_DATA 0x8
171
172/* USB On-the-go */
173#define CONFIG_USBOTG USBOTG_ARC
174
175/* enable these for the experimental usb stack */
176#define HAVE_USBSTACK
177//#define USB_HANDLED_BY_OF
178#define USE_ROCKBOX_USB
179#define USB_VENDOR_ID 0x041e
180#define USB_PRODUCT_ID 0x4133
181#define HAVE_USB_HID_MOUSE
182#define HAVE_BOOTLOADER_USB_MODE
183
184/* Define this if you have adjustable CPU frequency */
185//#define HAVE_ADJUSTABLE_CPU_FREQ
186
187/* Virtual LED (icon) */
188#define CONFIG_LED LED_VIRTUAL
189
190#define BOOTFILE_EXT "creative"
191#define BOOTFILE "rockbox." BOOTFILE_EXT
192#define BOOTDIR "/.rockbox"
193
194#define INCLUDE_TIMEOUT_API
195
196
diff --git a/firmware/target/arm/imx233/creative-zen/backlight-zen.c b/firmware/target/arm/imx233/creative-zen/backlight-zen.c
index 0d223b52e9..74e1e91a49 100644
--- a/firmware/target/arm/imx233/creative-zen/backlight-zen.c
+++ b/firmware/target/arm/imx233/creative-zen/backlight-zen.c
@@ -29,6 +29,9 @@
29 29
30void _backlight_set_brightness(int level) 30void _backlight_set_brightness(int level)
31{ 31{
32#ifdef CREATIVE_ZENV
33 lcd_set_contrast(level);
34#else
32 unsigned val = (level + 200) * level / 1000; 35 unsigned val = (level + 200) * level / 1000;
33 if(level != 0) 36 if(level != 0)
34 { 37 {
@@ -39,14 +42,17 @@ void _backlight_set_brightness(int level)
39 } 42 }
40 else 43 else
41 imx233_pinctrl_set_gpio(1, 12, false); 44 imx233_pinctrl_set_gpio(1, 12, false);
45#endif
42} 46}
43 47
44bool _backlight_init(void) 48bool _backlight_init(void)
45{ 49{
50#ifndef CREATIVE_ZENV
46 imx233_pinctrl_acquire(1, 12, "backlight_enable"); 51 imx233_pinctrl_acquire(1, 12, "backlight_enable");
47 imx233_pinctrl_set_function(1, 12, PINCTRL_FUNCTION_GPIO); 52 imx233_pinctrl_set_function(1, 12, PINCTRL_FUNCTION_GPIO);
48 imx233_pinctrl_enable_gpio(1, 12, true); 53 imx233_pinctrl_enable_gpio(1, 12, true);
49 imx233_uartdbg_init(BAUD_38400); 54 imx233_uartdbg_init(BAUD_38400);
55#endif
50 return true; 56 return true;
51} 57}
52 58
diff --git a/firmware/target/arm/imx233/creative-zen/button-target.h b/firmware/target/arm/imx233/creative-zen/button-target.h
index cddff4d9cc..7974ae42ad 100644
--- a/firmware/target/arm/imx233/creative-zen/button-target.h
+++ b/firmware/target/arm/imx233/creative-zen/button-target.h
@@ -47,8 +47,12 @@ bool button_debug_screen(void);
47#define BUTTON_TOPLEFT 0x00001000 47#define BUTTON_TOPLEFT 0x00001000
48#define BUTTON_TOPRIGHT 0x00002000 48#define BUTTON_TOPRIGHT 0x00002000
49#endif 49#endif
50#ifdef CREATIVE_ZENV
51#define BUTTON_VOL_UP 0x00004000
52#define BUTTON_VOL_DOWN 0x00008000
53#endif
50 54
51#define BUTTON_MAIN 0x00003fff 55#define BUTTON_MAIN 0x0000ffff
52 56
53/* Software power-off */ 57/* Software power-off */
54#define POWEROFF_BUTTON BUTTON_POWER 58#define POWEROFF_BUTTON BUTTON_POWER
diff --git a/firmware/target/arm/imx233/creative-zen/button-zen.c b/firmware/target/arm/imx233/creative-zen/button-zen.c
index 1997f91357..8f20961a57 100644
--- a/firmware/target/arm/imx233/creative-zen/button-zen.c
+++ b/firmware/target/arm/imx233/creative-zen/button-zen.c
@@ -57,6 +57,20 @@ struct imx233_button_lradc_mapping_t imx233_button_lradc_mapping[] =
57 {2945, BUTTON_PLAYPAUSE}, 57 {2945, BUTTON_PLAYPAUSE},
58 {3400, 0}, 58 {3400, 0},
59 {0, IMX233_BUTTON_LRADC_END}, 59 {0, IMX233_BUTTON_LRADC_END},
60#elif defined(CREATIVE_ZENV)
61 {190, IMX233_BUTTON_LRADC_HOLD},
62 {250, BUTTON_PLAYPAUSE},
63 {530, BUTTON_BACK},
64 {785, BUTTON_VOL_UP},
65 {1040, BUTTON_VOL_DOWN},
66 {1295, BUTTON_MENU},
67 {1540, BUTTON_UP},
68 {1800, BUTTON_SELECT},
69 {2070, BUTTON_LEFT},
70 {2315, BUTTON_RIGHT},
71 {2550, BUTTON_DOWN},
72 {3450, 0},
73 {0, IMX233_BUTTON_LRADC_END},
60#elif defined(CREATIVE_ZENMOZAIC) 74#elif defined(CREATIVE_ZENMOZAIC)
61 {0, IMX233_BUTTON_LRADC_HOLD}, 75 {0, IMX233_BUTTON_LRADC_HOLD},
62 {200, BUTTON_MENU}, 76 {200, BUTTON_MENU},
@@ -100,7 +114,7 @@ bool headphones_inserted(void)
100int button_read_device(void) 114int button_read_device(void)
101{ 115{
102 int btn = 0; 116 int btn = 0;
103 if(BF_RD(POWER_STS, PSWITCH) == 1) 117 if(imx233_power_read_pswitch() == 1)
104 btn |= BUTTON_POWER; 118 btn |= BUTTON_POWER;
105 return imx233_button_lradc_read(btn); 119 return imx233_button_lradc_read(btn);
106} 120}
diff --git a/firmware/target/arm/imx233/creative-zen/power-zen.c b/firmware/target/arm/imx233/creative-zen/power-zen.c
index 2c68325432..c1ad5989c0 100644
--- a/firmware/target/arm/imx233/creative-zen/power-zen.c
+++ b/firmware/target/arm/imx233/creative-zen/power-zen.c
@@ -58,4 +58,14 @@ bool tuner_power(bool enable)
58bool tuner_powered(void) 58bool tuner_powered(void)
59{ 59{
60 return tuner_enable; 60 return tuner_enable;
61} \ No newline at end of file 61}
62
63void ide_power_enable(bool on)
64{
65 (void) on;
66}
67
68bool ide_powered(void)
69{
70 return true;
71}
diff --git a/firmware/target/arm/imx233/emi-imx233.c b/firmware/target/arm/imx233/emi-imx233.c
index 1ae6e22f48..259ada0e94 100644
--- a/firmware/target/arm/imx233/emi-imx233.c
+++ b/firmware/target/arm/imx233/emi-imx233.c
@@ -196,11 +196,13 @@ struct imx233_emi_info_t imx233_emi_get_info(void)
196{ 196{
197 struct imx233_emi_info_t info; 197 struct imx233_emi_info_t info;
198 memset(&info, 0, sizeof(info)); 198 memset(&info, 0, sizeof(info));
199#if IMX233_SUBTARGET >= 3700
199 info.rows = 13 - BF_RD(DRAM_CTL10, ADDR_PINS); 200 info.rows = 13 - BF_RD(DRAM_CTL10, ADDR_PINS);
200 info.columns = 12 - BF_RD(DRAM_CTL11, COLUMN_SIZE); 201 info.columns = 12 - BF_RD(DRAM_CTL11, COLUMN_SIZE);
201 info.cas = BF_RD(DRAM_CTL13, CASLAT_LIN); 202 info.cas = BF_RD(DRAM_CTL13, CASLAT_LIN);
202 info.banks = 4; 203 info.banks = 4;
203 info.chips = __builtin_popcount(BF_RD(DRAM_CTL14, CS_MAP)); 204 info.chips = __builtin_popcount(BF_RD(DRAM_CTL14, CS_MAP));
204 info.size = 2 * (1 << (info.rows + info.columns)) * info.chips * info.banks; 205 info.size = 2 * (1 << (info.rows + info.columns)) * info.chips * info.banks;
206#endif
205 return info; 207 return info;
206} \ No newline at end of file 208} \ No newline at end of file
diff --git a/firmware/target/arm/imx233/power-imx233.c b/firmware/target/arm/imx233/power-imx233.c
index b0e614afe7..af333dea59 100644
--- a/firmware/target/arm/imx233/power-imx233.c
+++ b/firmware/target/arm/imx233/power-imx233.c
@@ -124,7 +124,9 @@ void INT_VDD5V(void)
124 124
125void imx233_power_init(void) 125void imx233_power_init(void)
126{ 126{
127#if IMX233_SUBTARGET >= 3700
127 BF_CLR(POWER_MINPWR, HALF_FETS); 128 BF_CLR(POWER_MINPWR, HALF_FETS);
129#endif
128 /* setup vbusvalid parameters: set threshold to 4v and power up comparators */ 130 /* setup vbusvalid parameters: set threshold to 4v and power up comparators */
129 BF_CLR(POWER_5VCTRL, VBUSVALID_TRSH); 131 BF_CLR(POWER_5VCTRL, VBUSVALID_TRSH);
130 BF_SETV(POWER_5VCTRL, VBUSVALID_TRSH, 1); 132 BF_SETV(POWER_5VCTRL, VBUSVALID_TRSH, 1);
@@ -155,8 +157,10 @@ void imx233_power_init(void)
155 BF_SET(POWER_CTRL, POLARITY_VDD5V_GT_VDDIO); 157 BF_SET(POWER_CTRL, POLARITY_VDD5V_GT_VDDIO);
156 BF_SET(POWER_CTRL, ENIRQ_VDD5V_GT_VDDIO); 158 BF_SET(POWER_CTRL, ENIRQ_VDD5V_GT_VDDIO);
157 /* make the vbusvalid detection way is not enabled */ 159 /* make the vbusvalid detection way is not enabled */
160#if IMX233_SUBTARGET >= 3700
158 BF_CLR(POWER_CTRL, ENIRQ_VBUS_VALID); 161 BF_CLR(POWER_CTRL, ENIRQ_VBUS_VALID);
159#endif 162#endif
163#endif
160 /* the VDD5V IRQ is shared by several sources, disable them */ 164 /* the VDD5V IRQ is shared by several sources, disable them */
161#if IMX233_SUBTARGET >= 3700 165#if IMX233_SUBTARGET >= 3700
162 BF_CLR(POWER_CTRL, ENIRQ_PSWITCH); 166 BF_CLR(POWER_CTRL, ENIRQ_PSWITCH);
diff --git a/firmware/target/arm/imx233/power-imx233.h b/firmware/target/arm/imx233/power-imx233.h
index 59ffcd37a2..9888bebe1f 100644
--- a/firmware/target/arm/imx233/power-imx233.h
+++ b/firmware/target/arm/imx233/power-imx233.h
@@ -119,6 +119,15 @@ static inline void imx233_power_set_dcdc_freq(bool pll, unsigned freq)
119} 119}
120#endif 120#endif
121 121
122static inline unsigned imx233_power_read_pswitch(void)
123{
124#if IMX233_SUBTARGET >= 3700
125 return BF_RD(POWER_STS, PSWITCH);
126#else
127 return BF_RD(DIGCTL_STATUS, PSWITCH);
128#endif
129}
130
122#if IMX233_SUBTARGET < 3700 131#if IMX233_SUBTARGET < 3700
123/* return -1 on error */ 132/* return -1 on error */
124int imx233_power_sense_die_temperature(int *min, int *max); 133int imx233_power_sense_die_temperature(int *min, int *max);
diff --git a/firmware/target/arm/imx233/powermgmt-imx233.c b/firmware/target/arm/imx233/powermgmt-imx233.c
index 9819406974..895c91dda2 100644
--- a/firmware/target/arm/imx233/powermgmt-imx233.c
+++ b/firmware/target/arm/imx233/powermgmt-imx233.c
@@ -48,9 +48,9 @@ void imx233_powermgmt_init(void)
48{ 48{
49 imx233_power_set_charge_current(IMX233_CHARGE_CURRENT); 49 imx233_power_set_charge_current(IMX233_CHARGE_CURRENT);
50 imx233_power_set_stop_current(IMX233_STOP_CURRENT); 50 imx233_power_set_stop_current(IMX233_STOP_CURRENT);
51#if IMX233_SUBTARGET >= 3700
51 /* assume that adc_init was called and battery monitoring via LRADC setup */ 52 /* assume that adc_init was called and battery monitoring via LRADC setup */
52 BF_WR(POWER_BATTMONITOR, EN_BATADJ, 1); 53 BF_WR(POWER_BATTMONITOR, EN_BATADJ, 1);
53#if IMX233_SUBTARGET >= 3700
54 /* setup linear regulator offsets to 25 mV below to prevent contention between 54 /* setup linear regulator offsets to 25 mV below to prevent contention between
55 * linear regulators and DCDC */ 55 * linear regulators and DCDC */
56 BF_WR(POWER_VDDDCTRL, LINREG_OFFSET, 2); 56 BF_WR(POWER_VDDDCTRL, LINREG_OFFSET, 2);