Skip to content

Commit

Permalink
ODROID-C4: add new VDD_EE voltage table
Browse files Browse the repository at this point in the history
Signed-off-by: Dongjin Kim <[email protected]>
Change-Id: Ibf162516a1005df528830fc48acbc9aec982c570
  • Loading branch information
tobetter committed Oct 13, 2020
1 parent f686110 commit 2a4e31e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 49 deletions.
39 changes: 10 additions & 29 deletions board/hardkernel/odroidc4/firmware/scp_task/pwm_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,16 @@
#define __PWM_CTRL_H__

static int pwm_voltage_table_ee[][2] = {
{ 0x1c0000, 681},
{ 0x1b0001, 691},
{ 0x1a0002, 701},
{ 0x190003, 711},
{ 0x180004, 721},
{ 0x170005, 731},
{ 0x160006, 741},
{ 0x150007, 751},
{ 0x140008, 761},
{ 0x130009, 772},
{ 0x12000a, 782},
{ 0x11000b, 792},
{ 0x10000c, 802},
{ 0x0f000d, 812},
{ 0x0e000e, 822},
{ 0x0d000f, 832},
{ 0x0c0010, 842},
{ 0x0b0011, 852},
{ 0x0a0012, 862},
{ 0x090013, 872},
{ 0x080014, 882},
{ 0x070015, 892},
{ 0x060016, 902},
{ 0x050017, 912},
{ 0x040018, 922},
{ 0x030019, 932},
{ 0x02001a, 942},
{ 0x01001b, 952},
{ 0x00001c, 962}
{ 0x090007, 800},
{ 0x080008, 810},
{ 0x070009, 820},
{ 0x06000a, 830},
{ 0x05000b, 840},
{ 0x04000c, 850},
{ 0x03000d, 860},
{ 0x02000e, 870},
{ 0x01000f, 880},
{ 0x000010, 890},
};

#endif //__PWM_CTRL_H__
43 changes: 23 additions & 20 deletions board/hardkernel/odroidc4/firmware/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,35 +268,38 @@ ddr_reg_t __ddr_reg[] = {
#error "VCCK val out of range\n"
#endif

/* VDDEE_VAL_REG0: VDDEE PWM table 0.67v-0.97v*/
/* VDDEE_VAL_REG1: VDDEE PWM table 0.69v-0.89v*/
/* VDDEE_VAL_REG0: VDDEE PWM table 0.69v-0.862v*/
/* VDDEE_VAL_REG1: VDDEE PWM table 0.69v-0.863v*/
#if (VDDEE_VAL == 800)
#define VDDEE_VAL_REG0 0x0010000c
#define VDDEE_VAL_REG1 0x0008000a
#define VDDEE_VAL_REG0 0x00090007
#define VDDEE_VAL_REG1 0x00090007
#elif (VDDEE_VAL == 810)
#define VDDEE_VAL_REG0 0x000f000d
#define VDDEE_VAL_REG1 0x0007000b
#define VDDEE_VAL_REG0 0x00080008
#define VDDEE_VAL_REG1 0x00080008
#elif (VDDEE_VAL == 820)
#define VDDEE_VAL_REG0 0x000e000e
#define VDDEE_VAL_REG1 0x0006000c
#define VDDEE_VAL_REG0 0x00070009
#define VDDEE_VAL_REG1 0x00070009
#elif (VDDEE_VAL == 830)
#define VDDEE_VAL_REG0 0x000d000f
#define VDDEE_VAL_REG1 0x0005000d
#define VDDEE_VAL_REG0 0x0006000a
#define VDDEE_VAL_REG1 0x0006000a
#elif (VDDEE_VAL == 840)
#define VDDEE_VAL_REG0 0x000c0010
#define VDDEE_VAL_REG1 0x0004000e
#define VDDEE_VAL_REG0 0x0005000b
#define VDDEE_VAL_REG1 0x0005000b
#elif (VDDEE_VAL == 850)
#define VDDEE_VAL_REG0 0x000b0011
#define VDDEE_VAL_REG1 0x0003000f
#define VDDEE_VAL_REG0 0x0004000c
#define VDDEE_VAL_REG1 0x0004000c
#elif (VDDEE_VAL == 860)
#define VDDEE_VAL_REG0 0x000a0012
#define VDDEE_VAL_REG1 0x00020010
#define VDDEE_VAL_REG0 0x0003000d
#define VDDEE_VAL_REG1 0x0003000d
#elif (VDDEE_VAL == 870)
#define VDDEE_VAL_REG0 0x00090013
#define VDDEE_VAL_REG1 0x00010011
#define VDDEE_VAL_REG0 0x0002000e
#define VDDEE_VAL_REG1 0x0002000e
#elif (VDDEE_VAL == 880)
#define VDDEE_VAL_REG0 0x00080014
#define VDDEE_VAL_REG1 0x00000012
#define VDDEE_VAL_REG0 0x0001000f
#define VDDEE_VAL_REG1 0x0001000f
#elif (VDDEE_VAL == 890)
#define VDDEE_VAL_REG0 0x00000010
#define VDDEE_VAL_REG1 0x00000010
#else
#error "VDDEE val out of range\n"
#endif
Expand Down
3 changes: 3 additions & 0 deletions include/configs/odroidc4.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@
#define CONFIG_USB_GPIO_PWR_NAME "GPIOAO_2"
#endif

#undef CONFIG_VDDEE_INIT_VOLTAGE
#define CONFIG_VDDEE_INIT_VOLTAGE 880 /* VDDEE power up voltage */

#endif

0 comments on commit 2a4e31e

Please sign in to comment.