Skip to content

Commit 2a4e31e

Browse files
committed
ODROID-C4: add new VDD_EE voltage table
Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: Ibf162516a1005df528830fc48acbc9aec982c570
1 parent f686110 commit 2a4e31e

3 files changed

Lines changed: 36 additions & 49 deletions

File tree

board/hardkernel/odroidc4/firmware/scp_task/pwm_ctrl.h

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,16 @@
66
#define __PWM_CTRL_H__
77

88
static int pwm_voltage_table_ee[][2] = {
9-
{ 0x1c0000, 681},
10-
{ 0x1b0001, 691},
11-
{ 0x1a0002, 701},
12-
{ 0x190003, 711},
13-
{ 0x180004, 721},
14-
{ 0x170005, 731},
15-
{ 0x160006, 741},
16-
{ 0x150007, 751},
17-
{ 0x140008, 761},
18-
{ 0x130009, 772},
19-
{ 0x12000a, 782},
20-
{ 0x11000b, 792},
21-
{ 0x10000c, 802},
22-
{ 0x0f000d, 812},
23-
{ 0x0e000e, 822},
24-
{ 0x0d000f, 832},
25-
{ 0x0c0010, 842},
26-
{ 0x0b0011, 852},
27-
{ 0x0a0012, 862},
28-
{ 0x090013, 872},
29-
{ 0x080014, 882},
30-
{ 0x070015, 892},
31-
{ 0x060016, 902},
32-
{ 0x050017, 912},
33-
{ 0x040018, 922},
34-
{ 0x030019, 932},
35-
{ 0x02001a, 942},
36-
{ 0x01001b, 952},
37-
{ 0x00001c, 962}
9+
{ 0x090007, 800},
10+
{ 0x080008, 810},
11+
{ 0x070009, 820},
12+
{ 0x06000a, 830},
13+
{ 0x05000b, 840},
14+
{ 0x04000c, 850},
15+
{ 0x03000d, 860},
16+
{ 0x02000e, 870},
17+
{ 0x01000f, 880},
18+
{ 0x000010, 890},
3819
};
3920

4021
#endif //__PWM_CTRL_H__

board/hardkernel/odroidc4/firmware/timing.c

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -268,35 +268,38 @@ ddr_reg_t __ddr_reg[] = {
268268
#error "VCCK val out of range\n"
269269
#endif
270270

271-
/* VDDEE_VAL_REG0: VDDEE PWM table 0.67v-0.97v*/
272-
/* VDDEE_VAL_REG1: VDDEE PWM table 0.69v-0.89v*/
271+
/* VDDEE_VAL_REG0: VDDEE PWM table 0.69v-0.862v*/
272+
/* VDDEE_VAL_REG1: VDDEE PWM table 0.69v-0.863v*/
273273
#if (VDDEE_VAL == 800)
274-
#define VDDEE_VAL_REG0 0x0010000c
275-
#define VDDEE_VAL_REG1 0x0008000a
274+
#define VDDEE_VAL_REG0 0x00090007
275+
#define VDDEE_VAL_REG1 0x00090007
276276
#elif (VDDEE_VAL == 810)
277-
#define VDDEE_VAL_REG0 0x000f000d
278-
#define VDDEE_VAL_REG1 0x0007000b
277+
#define VDDEE_VAL_REG0 0x00080008
278+
#define VDDEE_VAL_REG1 0x00080008
279279
#elif (VDDEE_VAL == 820)
280-
#define VDDEE_VAL_REG0 0x000e000e
281-
#define VDDEE_VAL_REG1 0x0006000c
280+
#define VDDEE_VAL_REG0 0x00070009
281+
#define VDDEE_VAL_REG1 0x00070009
282282
#elif (VDDEE_VAL == 830)
283-
#define VDDEE_VAL_REG0 0x000d000f
284-
#define VDDEE_VAL_REG1 0x0005000d
283+
#define VDDEE_VAL_REG0 0x0006000a
284+
#define VDDEE_VAL_REG1 0x0006000a
285285
#elif (VDDEE_VAL == 840)
286-
#define VDDEE_VAL_REG0 0x000c0010
287-
#define VDDEE_VAL_REG1 0x0004000e
286+
#define VDDEE_VAL_REG0 0x0005000b
287+
#define VDDEE_VAL_REG1 0x0005000b
288288
#elif (VDDEE_VAL == 850)
289-
#define VDDEE_VAL_REG0 0x000b0011
290-
#define VDDEE_VAL_REG1 0x0003000f
289+
#define VDDEE_VAL_REG0 0x0004000c
290+
#define VDDEE_VAL_REG1 0x0004000c
291291
#elif (VDDEE_VAL == 860)
292-
#define VDDEE_VAL_REG0 0x000a0012
293-
#define VDDEE_VAL_REG1 0x00020010
292+
#define VDDEE_VAL_REG0 0x0003000d
293+
#define VDDEE_VAL_REG1 0x0003000d
294294
#elif (VDDEE_VAL == 870)
295-
#define VDDEE_VAL_REG0 0x00090013
296-
#define VDDEE_VAL_REG1 0x00010011
295+
#define VDDEE_VAL_REG0 0x0002000e
296+
#define VDDEE_VAL_REG1 0x0002000e
297297
#elif (VDDEE_VAL == 880)
298-
#define VDDEE_VAL_REG0 0x00080014
299-
#define VDDEE_VAL_REG1 0x00000012
298+
#define VDDEE_VAL_REG0 0x0001000f
299+
#define VDDEE_VAL_REG1 0x0001000f
300+
#elif (VDDEE_VAL == 890)
301+
#define VDDEE_VAL_REG0 0x00000010
302+
#define VDDEE_VAL_REG1 0x00000010
300303
#else
301304
#error "VDDEE val out of range\n"
302305
#endif

include/configs/odroidc4.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@
2424
#define CONFIG_USB_GPIO_PWR_NAME "GPIOAO_2"
2525
#endif
2626

27+
#undef CONFIG_VDDEE_INIT_VOLTAGE
28+
#define CONFIG_VDDEE_INIT_VOLTAGE 880 /* VDDEE power up voltage */
29+
2730
#endif

0 commit comments

Comments
 (0)