summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/hardkernel/odroidc4/firmware/scp_task/pwm_ctrl.h39
-rw-r--r--board/hardkernel/odroidc4/firmware/timing.c43
-rw-r--r--drivers/usb/gadget/g_dnl.c2
-rw-r--r--include/configs/odroid-g12-common.h12
-rw-r--r--include/configs/odroidc4.h3
-rwxr-xr-xsd_fuse/sd_fusing.sh17
6 files changed, 55 insertions, 61 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/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index 6c10170fea..d3f3d99812 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -79,7 +79,7 @@ static struct usb_device_descriptor device_desc = {
.bDeviceSubClass = 0x02, /*0x02:CDC-modem , 0x00:CDC-serial*/
.idVendor = 0x18d1,
- .idProduct = 0x0002,
+ .idProduct = 0x0d02,
.iProduct = STRING_PRODUCT,
.iSerialNumber = STRING_SERIAL,
.bNumConfigurations = 1,
diff --git a/include/configs/odroid-g12-common.h b/include/configs/odroid-g12-common.h
index b53d390c96..7daf932df8 100644
--- a/include/configs/odroid-g12-common.h
+++ b/include/configs/odroid-g12-common.h
@@ -198,12 +198,14 @@
"androidboot.hardware=" CONFIG_DEVICE_PRODUCT " "\
"recovery_part=recovery recovery_offset=0; "\
"movi read dtbs 0 ${cramfsaddr}; " \
- "cramfsload ${dtb_mem_addr} meson64_" CONFIG_DEVICE_PRODUCT "_android.dtb;" \
- "if test ${variant} != c4; then " \
+ "if test " CONFIG_DEVICE_PRODUCT " = odroidn2; then " \
+ "cramfsload ${dtb_mem_addr} meson64_" CONFIG_DEVICE_PRODUCT "_android.dtb;" \
"cramfsload ${loadaddr} odroid${variant}-opp.dtbo;" \
"fdt addr ${dtb_mem_addr};" \
"fdt resize 8192;" \
"fdt apply ${loadaddr};" \
+ "else " \
+ "cramfsload ${dtb_mem_addr} meson64_odroid${variant}_android.dtb;" \
"fi;" \
"movi read recovery 0 ${loadaddr}; " \
"booti ${loadaddr} - ${dtb_mem_addr}; " \
@@ -215,12 +217,14 @@
"androidboot.selinux=permissive androidboot.firstboot=${firstboot} jtag=disable " \
"androidboot.hardware=" CONFIG_DEVICE_PRODUCT "; " \
"movi read dtbs 0 ${cramfsaddr}; " \
- "cramfsload ${dtb_mem_addr} meson64_" CONFIG_DEVICE_PRODUCT "_android.dtb;" \
- "if test ${variant} != c4; then " \
+ "if test " CONFIG_DEVICE_PRODUCT " = odroidn2; then " \
+ "cramfsload ${dtb_mem_addr} meson64_" CONFIG_DEVICE_PRODUCT "_android.dtb;" \
"cramfsload ${loadaddr} odroid${variant}-opp.dtbo;" \
"fdt addr ${dtb_mem_addr};" \
"fdt resize 8192;" \
"fdt apply ${loadaddr};" \
+ "else " \
+ "cramfsload ${dtb_mem_addr} meson64_odroid${variant}_android.dtb;" \
"fi;" \
"movi read boot 0 ${loadaddr}; " \
"booti ${loadaddr} - ${dtb_mem_addr}; " \
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
diff --git a/sd_fuse/sd_fusing.sh b/sd_fuse/sd_fusing.sh
index 451013f119..8698294127 100755
--- a/sd_fuse/sd_fusing.sh
+++ b/sd_fuse/sd_fusing.sh
@@ -7,17 +7,20 @@
#
abort() {
- echo $1
+ echo "$1"
exit 1
}
-[ -z $1 ] && abort "usage: $0 <your/memory/card/device>"
-[ -z ${UBOOT} ] && UBOOT=${PWD}/u-boot.bin
-[ ! -f ${UBOOT} ] && abort "error: ${UBOOT} is not exist"
+[ -z "$1" ] && abort "usage: $0 <your/memory/card/device>"
+[ -z "$UBOOT" ] && UBOOT="${PWD}/u-boot.bin"
+if [ ! -f "$UBOOT" ] ; then
+ UBOOT="$(echo "$0" | perl -pe 's/[^\/]*$//g')u-boot.bin"
+fi
+[ ! -f "$UBOOT" ] && abort "error: $UBOOT is not exist"
-sudo dd if=$UBOOT of=$1 conv=fsync,notrunc bs=512 seek=1
+sudo dd if="$UBOOT" of="$1" conv=fsync,notrunc bs=512 seek=1
sync
-sudo eject $1
-echo Finished.
+sudo eject "$1"
+echo "Finished."