From 2a4e31e3fde9bced8a150d338aa397a0362df191 Mon Sep 17 00:00:00 2001 From: Dongjin Kim Date: Wed, 7 Oct 2020 13:51:25 +0900 Subject: ODROID-C4: add new VDD_EE voltage table Signed-off-by: Dongjin Kim Change-Id: Ibf162516a1005df528830fc48acbc9aec982c570 --- .../odroidc4/firmware/scp_task/pwm_ctrl.h | 39 +++++--------------- board/hardkernel/odroidc4/firmware/timing.c | 43 ++++++++++++---------- include/configs/odroidc4.h | 3 ++ 3 files changed, 36 insertions(+), 49 deletions(-) diff --git a/board/hardkernel/odroidc4/firmware/scp_task/pwm_ctrl.h b/board/hardkernel/odroidc4/firmware/scp_task/pwm_ctrl.h index 11dc06b99b..65c689f4ce 100644 --- a/board/hardkernel/odroidc4/firmware/scp_task/pwm_ctrl.h +++ b/board/hardkernel/odroidc4/firmware/scp_task/pwm_ctrl.h @@ -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__ diff --git a/board/hardkernel/odroidc4/firmware/timing.c b/board/hardkernel/odroidc4/firmware/timing.c index 35e452577b..80524e01db 100644 --- a/board/hardkernel/odroidc4/firmware/timing.c +++ b/board/hardkernel/odroidc4/firmware/timing.c @@ -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 diff --git a/include/configs/odroidc4.h b/include/configs/odroidc4.h index 3336abe762..866c4f6d6b 100644 --- a/include/configs/odroidc4.h +++ b/include/configs/odroidc4.h @@ -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 -- cgit v1.2.1