summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoy Cho <joy.cho@hardkernel.com>2020-07-13 08:40:36 +0300
committerJoy Cho <joy.cho@hardkernel.com>2020-12-02 10:26:13 +0300
commitb7afc64c09ee4b3de3ebd293d783ae2a5e81cfa3 (patch)
tree0e5c7dae0b48f9d01025665c742ea36180759db2
parent8a7bc854b52a073c80ed835dec517a506084c3df (diff)
downloadu-boot-b7afc64c09ee4b3de3ebd293d783ae2a5e81cfa3.tar.xz
ODROID-GO3: Support recovery logic with spi flash
Change-Id: I04bb231b46501fce356831390da54e59a53a1c07
-rw-r--r--arch/arm/dts/Makefile3
-rw-r--r--arch/arm/dts/odroidgo3-kernel.dts994
-rw-r--r--arch/arm/mach-rockchip/board.c9
-rw-r--r--board/rockchip/odroidgo3/Makefile2
-rw-r--r--board/rockchip/odroidgo3/odroidgo3.c39
-rw-r--r--board/rockchip/odroidgo3/odroidgo3_recovery.c16
-rw-r--r--board/rockchip/odroidgo3/odroidgo3_status.c112
-rw-r--r--board/rockchip/odroidgo3/odroidgo3_status.h28
-rwxr-xr-xbuild_recovery.sh28
-rw-r--r--cmd/booti.c4
-rw-r--r--configs/odroidgo3-spi_defconfig1363
-rw-r--r--tools/images/hardkernel/logo_hardkernel_b.bmpbin0 -> 1229814 bytes
-rw-r--r--tools/images/hardkernel/low_battery_b.bmpbin0 -> 1229814 bytes
-rw-r--r--tools/images/hardkernel/no_sdcard_b.bmpbin0 -> 1229814 bytes
-rw-r--r--tools/images/hardkernel/recovery_b.bmpbin0 -> 1229814 bytes
-rw-r--r--tools/images/hardkernel/system_error_b.bmpbin0 -> 1229814 bytes
16 files changed, 2580 insertions, 18 deletions
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index e29603b649..a7bcfe2526 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -58,7 +58,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
rk3399-puma-ddr1866.dtb \
rv1108-evb.dtb \
odroidgo2-kernel.dtb \
- odroidgo2-kernel-v11.dtb
+ odroidgo2-kernel-v11.dtb \
+ odroidgo3-kernel.dtb
dtb-$(CONFIG_ARCH_MESON) += \
meson-gxbb-odroidc2.dtb
dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
diff --git a/arch/arm/dts/odroidgo3-kernel.dts b/arch/arm/dts/odroidgo3-kernel.dts
new file mode 100644
index 0000000000..c84572cf78
--- /dev/null
+++ b/arch/arm/dts/odroidgo3-kernel.dts
@@ -0,0 +1,994 @@
+/*
+ * (C) Copyright 2020 Hardkernel Co., Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+/dts-v1/;
+#include <dt-bindings/display/drm_mipi_dsi.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "px30.dtsi"
+#include "rk3326.dtsi"
+#include "rk3326-linux.dtsi"
+
+/ {
+ model = "ODROID-GO3 for linux based on Rockchip rk3326";
+ compatible = "rockchip,rk3326-odroidgo3-linux", "rockchip,rk3326";
+
+ chosen {
+ bootargs = "";
+ };
+
+ fiq-debugger {
+ compatible = "rockchip,fiq-debugger";
+ rockchip,serial-id = <2>;
+ rockchip,wake-irq = <0>;
+ /* If enable uart uses irq instead of fiq */
+ rockchip,irq-mode-enable = <0>;
+ rockchip,baudrate = <115200>; /* Only 115200 and 1500000 */
+ interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2m1_xfer>;
+ status = "okay";
+ };
+
+ keys: gpio-keys {
+ compatible = "gpio-keys";
+ status = "okay";
+
+ sw1 {
+ gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-UP";
+ linux,code = <BTN_DPAD_UP>;
+ };
+ sw2 {
+ gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-DOWN";
+ linux,code = <BTN_DPAD_DOWN>;
+ };
+ sw3 {
+ gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-LEFT";
+ linux,code = <BTN_DPAD_LEFT>;
+ };
+ sw4 {
+ gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-RIGHT";
+ linux,code = <BTN_DPAD_RIGHT>;
+ };
+ sw5 {
+ gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "GPIO KEY BTN-A";
+ linux,code = <BTN_EAST>;
+ };
+ sw6 {
+ gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-B";
+ linux,code = <BTN_SOUTH>;
+ };
+ sw7 {
+ gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-Y";
+ linux,code = <BTN_WEST>;
+ };
+ sw8 {
+ gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-X";
+ linux,code = <BTN_NORTH>;
+ };
+ sw9 {
+ gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-VOLUP";
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ sw10 {
+ gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-VOLDN";
+ linux,code = <KEY_VOLUMEDOWN>;
+ };
+ sw11 {
+ gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
+ label = "GPIO F3";
+ linux,code = <BTN_TRIGGER_HAPPY3>;
+ };
+ sw12 {
+ gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
+ label = "GPIO F4";
+ linux,code = <BTN_TRIGGER_HAPPY4>;
+ };
+ sw13 {
+ gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
+ label = "GPIO F5";
+ linux,code = <BTN_TRIGGER_HAPPY5>;
+ };
+ sw14 {
+ gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
+ label = "GPIO F6";
+ linux,code = <BTN_TRIGGER_HAPPY6>;
+ };
+ sw15 {
+ gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-LEFT";
+ linux,code = <BTN_TL>;
+ };
+ sw16 {
+ gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-RIGHT";
+ linux,code = <BTN_TR>;
+ };
+ sw19 {
+ gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
+ label = "GPIO F1";
+ linux,code = <BTN_TRIGGER_HAPPY1>;
+ };
+ sw20 {
+ gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-RIGHT2";
+ linux,code = <BTN_TR2>;
+ };
+ sw21 {
+ gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+ label = "GPIO TOP-LEFT2";
+ linux,code = <BTN_TL2>;
+ };
+ sw22 {
+ gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
+ label = "GPIO F2";
+ linux,code = <BTN_TRIGGER_HAPPY2>;
+ };
+ };
+
+ leds: gpio_leds {
+ compatible = "gpio-leds";
+ status = "okay";
+
+ heartbeat {
+ label = "blue:heartbeat";
+ gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ battery {
+ label = "battery_full";
+ gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm1 0 40000 0>;
+ brightness-levels = <
+ 0 1 2 3 4 5 6 7
+ 8 9 10 11 12 13 14 15
+ 16 17 18 19 20 21 22 23
+ 24 25 26 27 28 29 30 31
+ 32 33 34 35 36 37 38 39
+ 40 41 42 43 44 45 46 47
+ 48 49 50 51 52 53 54 55
+ 56 57 58 59 60 61 62 63
+ 64 65 66 67 68 69 70 71
+ 72 73 74 75 76 77 78 79
+ 80 81 82 83 84 85 86 87
+ 88 89 90 91 92 93 94 95
+ 96 97 98 99 100 101 102 103
+ 104 105 106 107 108 109 110 111
+ 112 113 114 115 116 117 118 119
+ 120 121 122 123 124 125 126 127
+ 128 129 130 131 132 133 134 135
+ 136 137 138 139 140 141 142 143
+ 144 145 146 147 148 149 150 151
+ 152 153 154 155 156 157 158 159
+ 160 161 162 163 164 165 166 167
+ 168 169 170 171 172 173 174 175
+ 176 177 178 179 180 181 182 183
+ 184 185 186 187 188 189 190 191
+ 192 193 194 195 196 197 198 199
+ 200 201 202 203 204 205 206 207
+ 208 209 210 211 212 213 214 215
+ 216 217 218 219 220 221 222 223
+ 224 225 226 227 228 229 230 231
+ 232 233 234 235 236 237 238 239
+ 240 241 242 243 244 245 246 247
+ 248 249 250 251 252 253 254 255>;
+ default-brightness-level = <200>;
+ };
+
+ rk817-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "rockchip,rk817-codec";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,widgets =
+ "Microphone", "Mic Jack",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "MIC_IN", "Mic Jack",
+ /*"IN1P", "Mic Jack",*/
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+ simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
+ simple-audio-card,codec-hp-det = <1>;
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1_2ch>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&rk817_codec>;
+ };
+ };
+
+ vccsys: vccsys {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v8_sys";
+ regulator-always-on;
+ regulator-min-microvolt = <3800000>;
+ regulator-max-microvolt = <3800000>;
+ };
+
+ vcc_host: vcc_host {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_host";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+
+ gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-always-on;
+ vin-supply = <&vccsys>;
+ };
+
+ ext_cam_clk: external-camera-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <25000000>;
+ clock-output-names = "CLK_CAMERA_25MHZ";
+ #clock-cells = <0>;
+ };
+
+ charge-animation {
+ compatible = "rockchip,uboot-charge";
+ status = "okay";
+
+ rockchip,uboot-charge-on = <1>;
+ rockchip,android-charge-on = <0>;
+ rockchip,uboot-exit-charge-level = <5>;
+ rockchip,uboot-exit-charge-voltage = <3650>;
+ rockchip,screen-on-voltage = <3400>;
+ rockchip,uboot-low-power-voltage = <3350>;
+ /* turn off screen only, no suspend */
+ rockchip,system-suspend = <0>;
+ /* auto screen-off in 10 seconds */
+ rockchip,auto-off-screen-interval = <10>;
+ /* no auto wake-up */
+ rockchip,auto-wakeup-interval = <0>;
+ rockchip,auto-wakeup-screen-invert = <1>;
+ };
+};
+
+
+&bus_apll {
+ bus-supply = <&vdd_logic>;
+ status = "okay";
+};
+
+&cpu0 {
+ cpu-supply = <&vdd_arm>;
+};
+
+&cpu0_opp_table {
+ rockchip,avs = <1>;
+
+ /* bin scaling clock 1.296MHz */
+ rockchip,bin-scaling-sel = <
+ 0 13
+ 1 13
+ >;
+
+ /delete-node/ opp-1416000000;
+ /delete-node/ opp-1512000000;
+};
+
+&display_subsystem {
+ status = "okay";
+};
+
+&dsi {
+ status = "okay";
+
+ panel@0 {
+ compatible = "elida,kd50t048a", "simple-panel-dsi";
+ reg = <0>;
+
+ /* pwm1 backlight */
+ backlight = <&backlight>;
+
+ /* RK817 LDO8 */
+ power-supply = <&vcc_lcd>;
+
+ /* LCD reset gpio GPIO3.C0 */
+ reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
+
+ prepare-delay-ms = <2>;
+ reset-delay-ms = <20>;
+ init-delay-ms = <10>;
+ enable-delay-ms = <10>;
+ disable-delay-ms = <10>;
+ unprepare-delay-ms = <10>;
+
+ /* LCD size */
+ width-mm = <69>;
+ height-mm = <139>;
+
+ dsi,flags = <(MIPI_DSI_MODE_VIDEO |
+ MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_MODE_EOT_PACKET)>;
+
+ dsi,format = <MIPI_DSI_FMT_RGB888>;
+ dsi,lanes = <2>;
+
+ /*
+ - panel-init-sequence data description -
+ mipi_cmd, delay(ms), len, lcd_cmd, lcd_data...
+
+ - mipi_cmd description -
+ 05 : MIPI_DSI_SHORT_WRITE
+ 15 : MIPI_DSI_SHORT_WRITE_PARAM
+ 39 : MIPI_DSI_LONG_WRITE
+
+ - ST7710S (Initialize sequence) -
+ 01: Soft reset
+ 11: Sleep out & 250ms wait
+ FF: Bank select CMD
+ C0: CMD2 Bank0 LNESET
+ C1: CMD2 Bank0 PORCTRL
+ C2: CMD2 Bank0 INVSEL
+ CC: ???
+ B0: CMD2 Bank0 PVGAMCTRL
+ B1: CMD2 Bank0 NVGAMCTRL
+ B0: CMD2 Bank1 VRHS
+ B1: CMD2 Bank1 VCOMS
+ B2: CMD2 Bank1 VGHSS
+ B3: CMD2 Bank1 TESTCMD
+ B5: CMD2 Bank1 VGLS
+ B7: CMD2 Bank1 PWRCTRL1
+ B8: CMD2 Bank1 PWRCTRL2
+ B9: CMD2 Bank1 PWRCTRL3
+ C1: CMD2 Bank1 PDR1
+ C2: CMD2 Bank1 PDR2
+ D0: CMD2 Bank1 MIPISET1
+ E0 ~ EF : GIP Setting
+ 3A: Normal CMD COLMOD
+ 53: Normal CMD WRCTRLD
+ 55: Normal CMD WRCABC
+ 5E: Normal CMD WRCABCMB
+ 29: DisplayOn & 50ms wait
+ */
+
+ panel-init-sequence = [
+ 05 05 01 01
+ 05 FA 01 11
+ 39 00 06 FF 77 01 00 00 10
+ 15 00 03 C0 E9 03
+ 15 00 03 C1 11 02
+ 15 00 03 C2 31 08
+ 15 00 02 CC 10
+ 39 00 11 B0 00 0D 14 0D 10 05 02 08
+ 08 1E 05 13 11 A3 29 18
+ 39 00 11 B1 00 0C 14 0C 10 05 03 08
+ 07 20 05 13 11 A4 29 18
+ 39 00 06 FF 77 01 00 00 11
+ 15 00 02 B0 6C
+ 15 00 02 B1 43
+ 15 00 02 B2 07
+ 15 00 02 B3 80
+ 15 00 02 B5 47
+ 15 00 02 B7 85
+ 15 00 02 B8 20
+ 15 00 02 B9 10
+ 15 00 02 C1 78
+ 15 00 02 C3 78
+ 15 FA 02 D0 88
+ 39 00 04 E0 00 00 02
+ 39 00 0C E1 08 00 0A 00 07 00 09 00 00 33 33
+ 39 00 0F E2 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 39 00 05 E3 00 00 33 33
+ 15 00 03 E4 44 44
+ 39 00 11 E5 0E 60 A0 A0 10 60 A0 A0
+ 0A 60 A0 A0 0C 60 A0 A0
+ 39 00 05 E6 00 00 33 33
+ 15 00 03 E7 44 44
+ 39 00 11 E8 0D 60 A0 A0 0F 60 A0 A0
+ 09 60 A0 A0 0B 60 A0 A0
+ 39 00 08 EB 02 01 E4 E4 44 00 40
+ 15 00 03 EC 02 01
+ 39 00 11 ED AB 89 76 54 01 FF FF FF
+ FF FF FF 10 45 67 98 BA
+ 39 00 06 FF 77 01 00 00 00
+ 15 00 02 3A 70
+ 15 00 02 53 EC
+ 15 00 02 55 B3
+ 15 00 02 5E FF
+ 05 32 01 29
+ ];
+
+ /* 28: DisplayOff */
+ /* 10: SleepIn */
+ panel-exit-sequence = [
+ 05 00 01 28
+ 05 00 01 10
+ ];
+
+ display-timings {
+ native-mode = <&timing0>;
+
+ timing0: timing0 {
+ clock-frequency = <27500000>;
+ hactive = <480>;
+ vactive = <854>;
+
+ hfront-porch = <10>;
+ hsync-len = <10>;
+ hback-porch = <5>;
+ vfront-porch = <12>;
+ vsync-len = <2>;
+ vback-porch = <60>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <0>;
+ pixelclk-active = <0>;
+ };
+ };
+ };
+};
+
+&dsi_in_vopb {
+ status = "okay";
+};
+
+&route_dsi {
+ connect = <&vopb_out_dsi>;
+ status = "okay";
+};
+
+&dfi {
+ status = "okay";
+};
+
+&dmc {
+ center-supply = <&vdd_logic>;
+ status = "okay";
+};
+
+&emmc {
+ status = "disabled";
+};
+
+
+&sfc {
+ status = "disabled";
+};
+
+&gpu {
+ mali-supply = <&vdd_logic>;
+ status = "okay";
+};
+
+&i2c0 {
+ status = "okay";
+ clock-frequency = <400000>;
+ i2c-scl-rising-time-ns = <280>;
+ i2c-scl-falling-time-ns = <16>;
+
+ rk817: pmic@20 {
+ compatible = "rockchip,rk817";
+ reg = <0x20>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default", "pmic-sleep",
+ "pmic-power-off", "pmic-reset";
+ pinctrl-0 = <&pmic_int>;
+ pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>;
+ pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>;
+ pinctrl-3 = <&soc_slppin_rst>, <&rk817_slppin_rst>;
+ rockchip,system-power-controller;
+ wakeup-source;
+ #clock-cells = <1>;
+ clock-output-names = "rk808-clkout1", "rk808-clkout2";
+ //fb-inner-reg-idxs = <2>;
+
+ /* 1: rst regs (default in codes), 0: rst the pmic */
+ pmic-reset-func = <1>;
+
+ vcc1-supply = <&vccsys>;
+ vcc2-supply = <&vccsys>;
+ vcc3-supply = <&vccsys>;
+ vcc4-supply = <&vccsys>;
+ vcc5-supply = <&vccsys>;
+ vcc6-supply = <&vccsys>;
+ vcc7-supply = <&vccsys>;
+ vcc8-supply = <&vccsys>;
+ vcc9-supply = <&dcdc_boost>;
+
+ pwrkey {
+ status = "okay";
+ };
+
+ pinctrl_rk8xx: pinctrl_rk8xx {
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk817_ts_gpio1: rk817_ts_gpio1 {
+ pins = "gpio_ts";
+ function = "pin_fun1";
+ /* output-low; */
+ /* input-enable; */
+ };
+
+ rk817_gt_gpio2: rk817_gt_gpio2 {
+ pins = "gpio_gt";
+ function = "pin_fun1";
+ };
+
+ rk817_pin_ts: rk817_pin_ts {
+ pins = "gpio_ts";
+ function = "pin_fun0";
+ };
+
+ rk817_pin_gt: rk817_pin_gt {
+ pins = "gpio_gt";
+ function = "pin_fun0";
+ };
+
+ rk817_slppin_null: rk817_slppin_null {
+ pins = "gpio_slp";
+ function = "pin_fun0";
+ };
+
+ rk817_slppin_slp: rk817_slppin_slp {
+ pins = "gpio_slp";
+ function = "pin_fun1";
+ };
+
+ rk817_slppin_pwrdn: rk817_slppin_pwrdn {
+ pins = "gpio_slp";
+ function = "pin_fun2";
+ };
+
+ rk817_slppin_rst: rk817_slppin_rst {
+ pins = "gpio_slp";
+ function = "pin_fun3";
+ };
+ };
+
+ regulators {
+ vdd_logic: DCDC_REG1 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_logic";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <950000>;
+ };
+ };
+
+ vdd_arm: DCDC_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-ramp-delay = <6001>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vdd_arm";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <950000>;
+ };
+ };
+
+ vcc_ddr: DCDC_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_ddr";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_3v3: DCDC_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-initial-mode = <0x2>;
+ regulator-name = "vcc_3v3";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ /* Not Used */
+ vcc_1v0: LDO_REG1 {
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-name = "vcc_1v0";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1000000>;
+ };
+ };
+
+ vcc1v8_soc: LDO_REG2 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-name = "vcc1v8_soc";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd1v0_soc: LDO_REG3 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
+
+ regulator-name = "vcc1v0_soc";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1000000>;
+ };
+ };
+
+ vcc3v3_pmu: LDO_REG4 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-name = "vcc3v3_pmu";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+
+ };
+ };
+
+ vccio_sd: LDO_REG5 {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-name = "vccio_sd";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vcc_sd: LDO_REG6 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+
+ regulator-name = "vcc_sd";
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+
+ };
+ };
+
+ /* NOT Used, default 2.8V OFF */
+ vcc_nc: LDO_REG7 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-name = "vcc_nc";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <2800000>;
+ };
+ };
+
+ /* LCD IO Power */
+ vcc_lcd: LDO_REG8 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc_lcd";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ /* WIFI Power */
+ vcc_wifi: LDO_REG9 {
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-name = "vcc_wifi";
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ dcdc_boost: BOOST {
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5400000>;
+ regulator-name = "boost";
+ };
+
+ otg_switch: OTG_SWITCH {
+ regulator-boot-on;
+ regulator-name = "otg_switch";
+ };
+ };
+
+ battery {
+ compatible = "rk817_fg";
+ ocv_table = <3500 3625 3685 3697 3718 3735 3748
+ 3760 3774 3788 3802 3816 3834 3853
+ 3877 3908 3946 3975 4018 4071 4106>;
+
+ /* KPL605475 Battery Spec */
+ /*
+ Capacity : 3.7V 3000mA
+ Normal Voltage = 3.7V
+ Cut-Off Voltage : 3.1V
+ Internal Impedance : 180 mOhm
+ Charging Voltage : 4.2V
+ Charging Voltage Max : 4.25V
+ Sample resister : 10 mohm
+ */
+ design_capacity = <3000>;
+ design_qmax = <3000>;
+ bat_res = <180>;
+ sleep_enter_current = <300>;
+ sleep_exit_current = <300>;
+ sleep_filter_current = <100>;
+ power_off_thresd = <3500>;
+ zero_algorithm_vol = <3700>;
+ max_soc_offset = <60>;
+ monitor_sec = <5>;
+ virtual_power = <0>;
+ sample_res = <10>;
+ };
+
+ charger {
+ compatible = "rk817,charger";
+ min_input_voltage = <4500>;
+ max_input_current = <1500>;
+ max_chrg_current = <2000>;
+ max_chrg_voltage = <4200>;
+ chrg_term_mode = <0>;
+ chrg_finish_cur = <300>;
+ virtual_power = <0>;
+ sample_res = <10>;
+
+ /* P.C.B rev0.2 DC Detect & Charger Status LED GPIO */
+ dc_det_gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
+
+ extcon = <&u2phy>;
+ };
+
+ rk817_codec: codec {
+ #sound-dai-cells = <0>;
+ compatible = "rockchip,rk817-codec";
+ clocks = <&cru SCLK_I2S1_OUT>;
+ clock-names = "mclk";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s1_2ch_mclk>;
+ hp-volume = <20>;
+ spk-volume = <3>;
+ status = "okay";
+ };
+ };
+};
+
+&i2c1 {
+ status = "disabled";
+};
+
+&i2c2 {
+ status = "disabled";
+};
+
+/* I2S 1 Channel Used */
+&i2s1_2ch {
+ status = "okay";
+ #sound-dai-cells = <0>;
+};
+
+&io_domains {
+ /* GRF Register Voltage select control */
+ status = "okay";
+
+ /* SDIO I/O Voltage */
+ vccio1-supply = <&vcc_3v3>;
+ /* SDMMC I/O Voltage */
+ vccio2-supply = <&vccio_sd>;
+ /* CAM I/O Voltage */
+ vccio3-supply = <&vcc_3v3>;
+ /* LVDS/LCDC I/O Voltage */
+ vccio4-supply = <&vcc_3v3>;
+ /* I2S I/O Voltage */
+ vccio5-supply = <&vcc_3v3>;
+ /* eMMC I/O Voltage */
+ vccio6-supply = <&vcc_3v3>;
+};
+
+&isp_mmu {
+ status = "okay";
+};
+
+&mipi_dphy_rx0 {
+ status = "okay";
+};
+
+&rkisp1 {
+ status = "okay";
+};
+
+&spi0 {
+ status = "disabled";
+};
+
+&pmu_io_domains {
+ /* PMU GRF Register Voltage select control */
+ status = "okay";
+
+ /* PMU I/O Voltage */
+ pmuio1-supply = <&vcc3v3_pmu>;
+ /* GPIO0_B/GPIO0_C, Flash */
+ pmuio2-supply = <&vcc3v3_pmu>;
+};
+
+&pwm1 {
+ status = "okay";
+};
+
+&rk_rga {
+ status = "okay";
+};
+
+&saradc {
+ status = "okay";
+ vref-supply = <&vcc1v8_soc>;
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ supports-sd;
+ card-detect-delay = <800>;
+ ignore-pm-notify;
+ cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ vqmmc-supply = <&vccio_sd>;
+ vmmc-supply = <&vcc_sd>;
+ status = "okay";
+};
+
+&sdio {
+ status = "disabled";
+};
+
+&tsadc {
+ pinctrl-names = "gpio", "otpout";
+ pinctrl-0 = <&tsadc_otp_gpio>;
+ pinctrl-1 = <&tsadc_otp_out>;
+ status = "okay";
+};
+
+&u2phy {
+ status = "okay";
+
+ u2phy_host: host-port {
+ status = "okay";
+ };
+
+ u2phy_otg: otg-port {
+ status = "disabled";
+ };
+};
+
+&usb20_otg {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&vip_mmu {
+ status = "okay";
+};
+
+&vopb {
+ status = "okay";
+};
+
+&vopb_mmu {
+ status = "okay";
+};
+
+&vpu_combo {
+ status = "okay";
+};
+
+&pinctrl {
+ pmic {
+ pmic_int: pmic_int {
+ rockchip,pins =
+ <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ soc_slppin_gpio: soc_slppin_gpio {
+ rockchip,pins =
+ <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
+ };
+
+ soc_slppin_slp: soc_slppin_slp {
+ rockchip,pins =
+ <0 RK_PA4 RK_FUNC_1 &pcfg_pull_none>;
+ };
+
+ soc_slppin_rst: soc_slppin_rst {
+ rockchip,pins =
+ <0 RK_PA4 RK_FUNC_2 &pcfg_pull_none>;
+ };
+ };
+
+ leds {
+ led_pins: led-pins {
+ rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+ btns {
+ btn_pins: btn-pins {
+ rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
+
+ <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
+ <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
+ <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+};
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index e724ccab3d..ba0659d1e0 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -37,10 +37,8 @@
#include <asm/arch/resource_img.h>
#include <asm/arch/rk_atags.h>
#include <asm/arch/vendor.h>
-#ifdef CONFIG_TARGET_ODROIDGO2
#include <odroidgo2_status.h>
extern int recovery_check_mandatory_files(void);
-#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -327,7 +325,6 @@ int init_kernel_dtb(void)
ret = rockchip_read_dtb_file((void *)fdt_addr);
if (ret < 0) {
#ifdef CONFIG_PLATFORM_ODROID_GOADV
-#ifdef CONFIG_TARGET_ODROIDGO2
/* skip spi flash in case of recovery boot */
if (recovery_check_mandatory_files()) {
printf("dtb in resource read fail, try dtb in spi flash\n");
@@ -337,24 +334,20 @@ int init_kernel_dtb(void)
if (ret == CMD_RET_SUCCESS)
ret = check_fdt_header(fdt_addr);
}
-#endif
+
if (ret != CMD_RET_SUCCESS) {
printf("dtb in spi flash fail, try dtb in fat\n");
ret = run_command("fatload mmc 1:1 ${fdt_addr_r} ${dtb_name}", 0);
if (ret != CMD_RET_SUCCESS) {
printf("%s dtb in fat fs fail\n", __func__);
-#ifdef CONFIG_TARGET_ODROIDGO2
odroid_drop_errorlog("dtb load fail", 13);
odroid_alert_leds();
-#endif
return 0;
} else {
if (CMD_RET_SUCCESS != check_fdt_header(fdt_addr)) {
printf("%s dtb in fat fs fail\n", __func__);
-#ifdef CONFIG_TARGET_ODROIDGO2
odroid_drop_errorlog("dtb load fail", 13);
odroid_alert_leds();
-#endif
return 0;
}
}
diff --git a/board/rockchip/odroidgo3/Makefile b/board/rockchip/odroidgo3/Makefile
index 106f53a31f..72c527602d 100644
--- a/board/rockchip/odroidgo3/Makefile
+++ b/board/rockchip/odroidgo3/Makefile
@@ -4,4 +4,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-obj-y += odroidgo3.o odroidgo3_power.o
+obj-y += odroidgo3.o odroidgo3_power.o odroidgo3_recovery.o odroidgo3_status.o
diff --git a/board/rockchip/odroidgo3/odroidgo3.c b/board/rockchip/odroidgo3/odroidgo3.c
index 9fc965946d..696bed93c3 100644
--- a/board/rockchip/odroidgo3/odroidgo3.c
+++ b/board/rockchip/odroidgo3/odroidgo3.c
@@ -15,9 +15,12 @@
#include <version.h>
#include <rockchip_display_cmds.h>
+#include "odroidgo3_status.h"
DECLARE_GLOBAL_DATA_PTR;
+extern int board_check_recovery(void);
+extern void board_odroid_recovery(void);
extern int board_check_power(void);
#define ALIVE_LED_GPIO 17 /* GPIO0_C1 */
@@ -102,6 +105,30 @@ void board_init_switch_gpio(void)
rk_clrsetreg(&grf->gpio3b_p, 0xC030, 0x4010);
}
+void board_check_mandatory_files(void)
+{
+ /* check sd card existence */
+ if (CMD_RET_SUCCESS != run_command("mmc dev 1", 0)) {
+ if(CMD_RET_SUCCESS != run_command("mmc dev 1", 0)) {
+ odroid_display_status(LOGO_MODE_NO_SDCARD,
+ LOGO_STORAGE_ANYWHERE, NULL);
+ goto err;
+ }
+ }
+
+ /* check launcher in ext4 fs of sd card */
+ if (file_exists("mmc", "1:2", "/usr/local/bin/emulationstation/emulationstation",
+ FS_TYPE_EXT)) {
+ lcd_setfg_color("white");
+ lcd_printf(0, 0, 1, "[ GO Advanced EMULATION Image ]");
+ }
+
+ return;
+
+err:
+ odroid_wait_pwrkey();
+}
+
int rk_board_late_init(void)
{
/* turn on blue led */
@@ -120,11 +147,21 @@ int rk_board_late_init(void)
if(board_check_power())
return 0;
- /* show boot logo and version : drivers/video/drm/rockchip_display_cmds.c */
+ /* check recovery */
+ if (!board_check_recovery()) {
+ printf("Now start recovery mode\n");
+ board_odroid_recovery();
+ /* never get here */
+ }
+
+ /* show boot logo and version */
lcd_show_logo();
lcd_setfg_color("white");
lcd_printf(0, 27, 1, " %s", U_BOOT_VERSION);
lcd_printf(0, 28, 1, " %s %s", U_BOOT_DATE, U_BOOT_TIME);
+ /* check sd card and es launcher */
+ board_check_mandatory_files();
+
return 0;
}
diff --git a/board/rockchip/odroidgo3/odroidgo3_recovery.c b/board/rockchip/odroidgo3/odroidgo3_recovery.c
index 603416e324..24786022f7 100644
--- a/board/rockchip/odroidgo3/odroidgo3_recovery.c
+++ b/board/rockchip/odroidgo3/odroidgo3_recovery.c
@@ -7,6 +7,8 @@
#include <common.h>
#include <rksfc.h>
#include <fs.h>
+#include <rockchip_display_cmds.h>
+#include "odroidgo3_status.h"
int recovery_check_mandatory_files(void)
{
@@ -30,7 +32,7 @@ int board_check_recovery(void)
if (recovery_check_mandatory_files())
return -1;
- printf("%s - Now start recovery!\n", __func__);
+ odroid_display_status(LOGO_MODE_RECOVERY, LOGO_STORAGE_ANYWHERE, NULL);
return 0;
}
@@ -53,6 +55,8 @@ void board_odroid_recovery(void)
/* check spi flash */
if (rksfc_scan_namespace()) {
printf("spi flash probe fail!\n");
+ odroid_display_status(LOGO_MODE_SYSTEM_ERR, LOGO_STORAGE_ANYWHERE,
+ "spi flash probe fail");
odroid_wait_pwrkey();
}
@@ -77,7 +81,7 @@ void board_odroid_recovery(void)
percentage = progress * 100 / filesize;
sprintf(str, "recovery progress :%3d %%", (int) percentage);
- lcd_printf(0, 18, 1, "%s", str);
+ lcd_printf(0, 27, 1, "%s", str);
offs += unit;
addr += unit * 512;
@@ -85,7 +89,7 @@ void board_odroid_recovery(void)
}
sprintf(str, "recovery progress :%3d %%", (int) percentage);
- lcd_printf(0, 18, 1, "%s", str);
+ lcd_printf(0, 27, 1, "%s", str);
/* readback & calculate md5sum */
run_command("rksfc read $loadaddr 0x0 $sz_total", 0);
@@ -99,6 +103,8 @@ void board_odroid_recovery(void)
ret = strncmp(md5sum_org, md5sum_readback, 32);
if (ret) {
printf("checksum fail! ret %d\n", ret);
+ odroid_display_status(LOGO_MODE_SYSTEM_ERR, LOGO_STORAGE_ANYWHERE,
+ "checksum fail!");
odroid_wait_pwrkey();
}
@@ -118,7 +124,9 @@ void board_odroid_recovery(void)
/* recovery done */
loop = 3;
while (loop) {
- printf("Recovery Done! system %s in %d sec\n", cmd, loop);
+ sprintf(str, "recovery done! system %s in %d sec", cmd, loop);
+ /* there is no vfat mbr in sd card now */
+ odroid_display_status(LOGO_MODE_RECOVERY, LOGO_STORAGE_ANYWHERE, str);
mdelay(1000);
loop--;
};
diff --git a/board/rockchip/odroidgo3/odroidgo3_status.c b/board/rockchip/odroidgo3/odroidgo3_status.c
index d96ab34d1e..e2177b19ab 100644
--- a/board/rockchip/odroidgo3/odroidgo3_status.c
+++ b/board/rockchip/odroidgo3/odroidgo3_status.c
@@ -8,16 +8,37 @@
#include <key.h>
#include <dm.h>
#include <console.h>
+#include <rockchip_display_cmds.h>
#include <asm/io.h>
#include <asm/arch/grf_px30.h>
#include <asm/arch/hardware.h>
#include <version.h>
+#include "odroidgo3_status.h"
#define POWERDOWN_WAIT_TIME 10000
#define LOOP_DELAY 25
#define PMUGRF_BASE 0xFF010000
+static const char *st_logo_modes[] = {
+ "st_logo_hardkernel",
+ "st_logo_lowbatt",
+ "st_logo_recovery",
+ "st_logo_err",
+ "st_logo_nosdcard",
+};
+
+static const char *logo_bmp_names[] = {
+ "logo.bmp",
+ "low_battery.bmp",
+ "recovery.bmp",
+ "system_error.bmp",
+ "no_sdcard.bmp",
+};
+
+unsigned long bmp_mem;
+unsigned long bmp_copy;
+
/*
* When normal fdt logic doesn't work, this fnctio will show error leds
* and shutdown system. In this case, only low level interface is available
@@ -82,7 +103,98 @@ void odroid_wait_pwrkey(void)
delay -= LOOP_DELAY;
}
+ if (show_bmp(bmp_mem))
+ printf("[%s] show_bmp Fail!\n", __func__);
+
printf("power key long pressed...\n");
+ lcd_printf(0, 27, 1, "%s", "power off...");
mdelay(500);
run_command("poweroff", 0);
}
+
+int odroid_display_status(int logo_mode, int logo_storage, const char *str)
+{
+ char cmd[128];
+
+ if (lcd_init()) {
+ printf("odroid lcd init fail!\n");
+ odroid_drop_errorlog("lcd init fail, check dtb file", 29);
+ odroid_alert_leds();
+ return -1;
+ }
+
+ /* draw logo bmp */
+ if (!bmp_mem) {
+ bmp_mem = lcd_get_mem();
+ bmp_copy = bmp_mem + LCD_LOGO_SIZE;
+ }
+
+ switch (logo_storage) {
+ case LOGO_STORAGE_SPIFLASH:
+ sprintf(cmd, "rksfc read %p %s %s", (void *)bmp_copy,
+ env_get(st_logo_modes[logo_mode]),
+ env_get("sz_logo"));
+ run_command(cmd, 0);
+
+ sprintf(cmd, "unzip %p %p", (void *)bmp_copy, (void *)bmp_mem);
+ run_command(cmd, 0);
+
+ if (show_bmp(bmp_mem))
+ printf("[%s] show_bmp Fail!\n", __func__);
+ break;
+ case LOGO_STORAGE_SDCARD:
+ sprintf(cmd, "fatload mmc 1:1 %p %s", (void *)bmp_mem,
+ logo_bmp_names[logo_mode]);
+ run_command(cmd, 0);
+
+ if (show_bmp(bmp_mem))
+ printf("[%s] show_bmp Fail!\n", __func__);
+ break;
+ case LOGO_STORAGE_ANYWHERE:
+ default:
+ /* try spi flash first */
+ sprintf(cmd, "rksfc read %p %s %s", (void *)bmp_copy,
+ env_get(st_logo_modes[logo_mode]),
+ env_get("sz_logo"));
+ run_command(cmd, 0);
+
+ sprintf(cmd, "unzip %p %p", (void *)bmp_copy, (void *)bmp_mem);
+ run_command(cmd, 0);
+
+ if (show_bmp(bmp_mem)) {
+ /* then, check sd card */
+ sprintf(cmd, "fatload mmc 1:1 %p %s", (void *)bmp_mem,
+ logo_bmp_names[logo_mode]);
+ run_command(cmd, 0);
+
+ if (show_bmp(bmp_mem))
+ printf("[%s] show_bmp Fail!\n", __func__);
+ }
+ break;
+ }
+
+ switch (logo_mode) {
+ case LOGO_MODE_SYSTEM_ERR:
+ lcd_setfg_color("white");
+ lcd_setbg_color("black");
+ break;
+ case LOGO_MODE_NO_SDCARD:
+ lcd_setfg_color("grey");
+ lcd_setbg_color("white");
+ lcd_printf(0, 28, 1, "U-BOOT (spinor) : %s %s", U_BOOT_DATE, U_BOOT_TIME);
+ lcd_setfg_color("black");
+ break;
+ case LOGO_MODE_LOW_BATT:
+ case LOGO_MODE_RECOVERY:
+ default:
+ lcd_setfg_color("black");
+ lcd_setbg_color("white");
+ break;
+ }
+
+ /* draw text */
+ if (str)
+ lcd_printf(0, 27, 1, "%s", str);
+
+ return 0;
+}
diff --git a/board/rockchip/odroidgo3/odroidgo3_status.h b/board/rockchip/odroidgo3/odroidgo3_status.h
new file mode 100644
index 0000000000..b1e6cdaadc
--- /dev/null
+++ b/board/rockchip/odroidgo3/odroidgo3_status.h
@@ -0,0 +1,28 @@
+/*
+ * (C) Copyright 2020 Hardkernel Co., Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+#ifndef _ODROIDGO3_STATUS_H_
+#define _ODROIDGO3_STATUS_H_
+
+enum logo_storage {
+ LOGO_STORAGE_SPIFLASH = 0,
+ LOGO_STORAGE_SDCARD,
+ LOGO_STORAGE_ANYWHERE,
+};
+
+enum logo_mode {
+ LOGO_MODE_HARDKERNEL = 0,
+ LOGO_MODE_LOW_BATT,
+ LOGO_MODE_RECOVERY,
+ LOGO_MODE_SYSTEM_ERR,
+ LOGO_MODE_NO_SDCARD,
+};
+
+int odroid_display_status(int logo_mode, int logo_storage, const char *str);
+void odroid_wait_pwrkey(void);
+void odroid_alert_leds(void);
+void odroid_drop_errorlog(const char *err, unsigned int size);
+
+#endif /* _ODROIDGO3_STATUS_H_ */
diff --git a/build_recovery.sh b/build_recovery.sh
index c233d46529..0ecf1d4233 100755
--- a/build_recovery.sh
+++ b/build_recovery.sh
@@ -9,6 +9,12 @@ PWD=$(pwd)
IMAGES=./tools/images/hardkernel
OUT=./sd_fuse
MNT=${PWD}/sd_fuse/mnt
+BOARD=$1
+
+if [ -z $1 ]; then
+ echo "Usage ./build_recovery.sh <board_name>"
+ exit 1
+fi
pack_spi_full_image()
{
@@ -17,14 +23,26 @@ pack_spi_full_image()
dd if=${OUT}/rk3326_header_miniloader_spiboot.img of=${OUT}/spi_recovery.img bs=512 seek=0 count=2048 conv=fsync,notrunc
dd if=${OUT}/uboot_spi.img of=${OUT}/spi_recovery.img bs=512 seek=2048 count=2048 conv=fsync,notrunc
dd if=${OUT}/trust_spi.img of=${OUT}/spi_recovery.img bs=512 seek=4096 count=4096 conv=fsync,notrunc
- dd if=./arch/arm/dts/odroidgo2-kernel-v11.dtb of=${OUT}/spi_recovery.img bs=512 seek=8192 count=200 conv=fsync,notrunc
+if [ ${BOARD} = "odroidgo3" ]; then
+ dd if=./arch/arm/dts/odroidgo3-kernel.dtb of=${OUT}/spi_recovery.img bs=512 seek=8192 count=200 conv=fsync,notrunc
+else
+ dd if=./arch/arm/dts/odroidgo2-kernel-v11.dtb of=${OUT}/spi_recovery.img bs=512 seek=8192 count=200 conv=fsync,notrunc
+fi
gzip -k -f ${IMAGES}/*.bmp
+if [ ${BOARD} = "odroidgo3" ]; then
+ dd if=${IMAGES}/logo_hardkernel_b.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=8392 conv=fsync,notrunc
+ dd if=${IMAGES}/low_battery_b.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=8792 conv=fsync,notrunc
+ dd if=${IMAGES}/recovery_b.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=9192 conv=fsync,notrunc
+ dd if=${IMAGES}/system_error_b.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=9592 conv=fsync,notrunc
+ dd if=${IMAGES}/no_sdcard_b.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=9992 conv=fsync,notrunc
+else
dd if=${IMAGES}/logo_hardkernel.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=8392 conv=fsync,notrunc
dd if=${IMAGES}/low_battery.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=8792 conv=fsync,notrunc
dd if=${IMAGES}/recovery.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=9192 conv=fsync,notrunc
dd if=${IMAGES}/system_error.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=9592 conv=fsync,notrunc
dd if=${IMAGES}/no_sdcard.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=9992 conv=fsync,notrunc
+fi
dd if=${IMAGES}/battery_0.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=10392 conv=fsync,notrunc
dd if=${IMAGES}/battery_1.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=10792 conv=fsync,notrunc
dd if=${IMAGES}/battery_2.bmp.gz of=${OUT}/spi_recovery.img bs=512 seek=11192 conv=fsync,notrunc
@@ -46,12 +64,20 @@ pack_recovery_sdcard_img()
sudo mount ${OUT}/vfat.fs ${MNT}
sudo cp ${OUT}/spi_recovery.img* ${MNT}
+if [ ${BOARD} = "odroidgo3" ]; then
+ sudo cp ${IMAGES}/recovery_b.bmp ${MNT}/recovery.bmp
+ sudo cp ${IMAGES}/system_error_b.bmp ${MNT}/system_error.bmp
+ sudo cp ${IMAGES}/no_sdcard_b.bmp ${MNT}/no_sdcard.bmp
+ sudo cp ${IMAGES}/low_battery_b.bmp ${MNT}/low_battery.bmp
+ sudo cp ./arch/arm/dts/odroidgo3-kernel.dtb ${MNT}/rk3326-odroidgo3-linux-v10.dtb
+else
sudo cp ${IMAGES}/recovery.bmp ${MNT}
sudo cp ${IMAGES}/system_error.bmp ${MNT}
sudo cp ${IMAGES}/no_sdcard.bmp ${MNT}
sudo cp ${IMAGES}/low_battery.bmp ${MNT}
sudo cp ./arch/arm/dts/odroidgo2-kernel.dtb ${MNT}/rk3326-odroidgo2-linux.dtb
sudo cp ./arch/arm/dts/odroidgo2-kernel-v11.dtb ${MNT}/rk3326-odroidgo2-linux-v11.dtb
+fi
sync
sudo umount ${MNT}
diff --git a/cmd/booti.c b/cmd/booti.c
index 41c537f6a6..ef457c89d2 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -13,7 +13,7 @@
#include <mapmem.h>
#include <linux/kernel.h>
#include <linux/sizes.h>
-#ifdef CONFIG_TARGET_ODROIDGO2
+#ifdef CONFIG_PLATFORM_ODROID_GOADV
#include <odroidgo2_status.h>
#endif
@@ -141,7 +141,7 @@ int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
argc--; argv++;
if (booti_start(cmdtp, flag, argc, argv, &images))
-#ifdef CONFIG_TARGET_ODROIDGO2
+#ifdef CONFIG_PLATFORM_ODROID_GOADV
{
odroid_display_status(LOGO_MODE_SYSTEM_ERR, LOGO_STORAGE_SPIFLASH,
"booting fail! check kernel and dtb images!");
diff --git a/configs/odroidgo3-spi_defconfig b/configs/odroidgo3-spi_defconfig
new file mode 100644
index 0000000000..cd12fec482
--- /dev/null
+++ b/configs/odroidgo3-spi_defconfig
@@ -0,0 +1,1363 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# U-Boot 2017.09 Configuration
+#
+CONFIG_CREATE_ARCH_SYMLINK=y
+# CONFIG_ARC is not set
+CONFIG_ARM=y
+# CONFIG_M68K is not set
+# CONFIG_MICROBLAZE is not set
+# CONFIG_MIPS is not set
+# CONFIG_NDS32 is not set
+# CONFIG_NIOS2 is not set
+# CONFIG_PPC is not set
+# CONFIG_SANDBOX is not set
+# CONFIG_SH is not set
+# CONFIG_X86 is not set
+# CONFIG_XTENSA is not set
+CONFIG_SYS_ARCH="arm"
+CONFIG_SYS_CPU="armv8"
+CONFIG_SYS_SOC="rockchip"
+CONFIG_SYS_VENDOR="rockchip"
+CONFIG_SYS_BOARD="odroidgo3"
+CONFIG_SYS_CONFIG_NAME="odroidgo3"
+
+#
+# ARM architecture
+#
+CONFIG_ARM64=y
+# CONFIG_POSITION_INDEPENDENT is not set
+CONFIG_STATIC_RELA=y
+CONFIG_DMA_ADDR_T_64BIT=y
+CONFIG_ARM_ASM_UNIFIED=y
+CONFIG_SYS_ARM_ARCH=8
+CONFIG_SYS_CACHE_SHIFT_6=y
+CONFIG_SYS_CACHELINE_SIZE=64
+CONFIG_ARM_SMCCC=y
+CONFIG_ARM_CPU_SUSPEND=y
+# CONFIG_SEMIHOSTING is not set
+# CONFIG_SYS_L2CACHE_OFF is not set
+CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
+# CONFIG_ARM_CORTEX_CPU_IS_UP is not set
+CONFIG_ARM64_SUPPORT_AARCH32=y
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_TARGET_EDB93XX is not set
+# CONFIG_TARGET_ASPENITE is not set
+# CONFIG_TARGET_GPLUGD is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_KIRKWOOD is not set
+# CONFIG_ARCH_MVEBU is not set
+# CONFIG_TARGET_DEVKIT3250 is not set
+# CONFIG_TARGET_WORK_92105 is not set
+# CONFIG_TARGET_MX25PDK is not set
+# CONFIG_TARGET_ZMX25 is not set
+# CONFIG_TARGET_APF27 is not set
+# CONFIG_TARGET_APX4DEVKIT is not set
+# CONFIG_TARGET_XFI3 is not set
+# CONFIG_TARGET_M28EVK is not set
+# CONFIG_TARGET_MX23EVK is not set
+# CONFIG_TARGET_MX28EVK is not set
+# CONFIG_TARGET_MX23_OLINUXINO is not set
+# CONFIG_TARGET_BG0900 is not set
+# CONFIG_TARGET_SANSA_FUZE_PLUS is not set
+# CONFIG_TARGET_SC_SPS_1 is not set
+# CONFIG_ORION5X is not set
+# CONFIG_TARGET_SPEAR300 is not set
+# CONFIG_TARGET_SPEAR310 is not set
+# CONFIG_TARGET_SPEAR320 is not set
+# CONFIG_TARGET_SPEAR600 is not set
+# CONFIG_TARGET_STV0991 is not set
+# CONFIG_TARGET_X600 is not set
+# CONFIG_TARGET_IMX31_PHYCORE is not set
+# CONFIG_TARGET_IMX31_PHYCORE_EET is not set
+# CONFIG_TARGET_MX31ADS is not set
+# CONFIG_TARGET_MX31PDK is not set
+# CONFIG_TARGET_WOODBURN is not set
+# CONFIG_TARGET_WOODBURN_SD is not set
+# CONFIG_TARGET_FLEA3 is not set
+# CONFIG_TARGET_MX35PDK is not set
+# CONFIG_ARCH_BCM283X is not set
+# CONFIG_TARGET_VEXPRESS_CA15_TC2 is not set
+# CONFIG_TARGET_VEXPRESS_CA5X2 is not set
+# CONFIG_TARGET_VEXPRESS_CA9X4 is not set
+# CONFIG_TARGET_BCM23550_W1D is not set
+# CONFIG_TARGET_BCM28155_AP is not set
+# CONFIG_TARGET_BCMCYGNUS is not set
+# CONFIG_TARGET_BCMNSP is not set
+# CONFIG_TARGET_BCMNS2 is not set
+# CONFIG_ARCH_EXYNOS is not set
+# CONFIG_ARCH_S5PC1XX is not set
+# CONFIG_ARCH_HIGHBANK is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_KEYSTONE is not set
+# CONFIG_ARCH_OMAP2PLUS is not set
+# CONFIG_ARCH_MESON is not set
+# CONFIG_ARCH_MX7ULP is not set
+# CONFIG_ARCH_MX7 is not set
+# CONFIG_ARCH_MX6 is not set
+CONFIG_SPL_LDSCRIPT="arch/arm/cpu/armv8/u-boot-spl.lds"
+# CONFIG_ARCH_MX5 is not set
+# CONFIG_ARCH_RMOBILE is not set
+# CONFIG_TARGET_S32V234EVB is not set
+# CONFIG_ARCH_SNAPDRAGON is not set
+# CONFIG_ARCH_SOCFPGA is not set
+# CONFIG_ARCH_SUNXI is not set
+# CONFIG_TARGET_TS4600 is not set
+# CONFIG_ARCH_VF610 is not set
+# CONFIG_ARCH_ZYNQ is not set
+# CONFIG_ARCH_ZYNQMP is not set
+# CONFIG_TEGRA is not set
+# CONFIG_TARGET_VEXPRESS64_AEMV8A is not set
+# CONFIG_TARGET_VEXPRESS64_BASE_FVP is not set
+# CONFIG_TARGET_VEXPRESS64_BASE_FVP_DRAM is not set
+# CONFIG_TARGET_VEXPRESS64_JUNO is not set
+# CONFIG_TARGET_LS2080A_EMU is not set
+# CONFIG_TARGET_LS2080A_SIMU is not set
+# CONFIG_TARGET_LS2080AQDS is not set
+# CONFIG_TARGET_LS2080ARDB is not set
+# CONFIG_TARGET_LS2081ARDB is not set
+# CONFIG_TARGET_HIKEY is not set
+# CONFIG_TARGET_POPLAR is not set
+# CONFIG_TARGET_LS1012AQDS is not set
+# CONFIG_TARGET_LS1012ARDB is not set
+# CONFIG_TARGET_LS1012AFRDM is not set
+# CONFIG_TARGET_LS1021AQDS is not set
+# CONFIG_TARGET_LS1021ATWR is not set
+# CONFIG_TARGET_LS1021AIOT is not set
+# CONFIG_TARGET_LS1043AQDS is not set
+# CONFIG_TARGET_LS1043ARDB is not set
+# CONFIG_TARGET_LS1046AQDS is not set
+# CONFIG_TARGET_LS1046ARDB is not set
+# CONFIG_TARGET_H2200 is not set
+# CONFIG_TARGET_ZIPITZ2 is not set
+# CONFIG_TARGET_COLIBRI_PXA270 is not set
+# CONFIG_ARCH_UNIPHIER is not set
+# CONFIG_STM32 is not set
+# CONFIG_ARCH_STI is not set
+CONFIG_ARCH_ROCKCHIP=y
+# CONFIG_TARGET_THUNDERX_88XX is not set
+# CONFIG_ARCH_ASPEED is not set
+# CONFIG_SPL_GPIO_SUPPORT is not set
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_ROCKCHIP_PX30=y
+CONFIG_TPL_LDSCRIPT="arch/arm/mach-rockchip/u-boot-tpl-v8.lds"
+CONFIG_TPL_TEXT_BASE=0xff0e1000
+CONFIG_TPL_MAX_SIZE=10240
+CONFIG_ROCKCHIP_RK3326=y
+# CONFIG_ROCKCHIP_RK3036 is not set
+# CONFIG_ROCKCHIP_RK3128 is not set
+# CONFIG_ROCKCHIP_RK3066 is not set
+# CONFIG_ROCKCHIP_RK3188 is not set
+# CONFIG_ROCKCHIP_RK322X is not set
+# CONFIG_ROCKCHIP_RK3288 is not set
+CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py"
+# CONFIG_ROCKCHIP_RK3308 is not set
+# CONFIG_ROCKCHIP_RK3328 is not set
+# CONFIG_ROCKCHIP_RK3368 is not set
+# CONFIG_ROCKCHIP_RK3399 is not set
+# CONFIG_ROCKCHIP_RK1808 is not set
+# CONFIG_ROCKCHIP_RV1108 is not set
+# CONFIG_SPL_ROCKCHIP_BACK_TO_BROM is not set
+CONFIG_TPL_ROCKCHIP_BACK_TO_BROM=y
+# CONFIG_ARM64_BOOT_AARCH32 is not set
+CONFIG_ROCKCHIP_BOOT_MODE_REG=0xff010200
+CONFIG_ROCKCHIP_STIMER_BASE=0xff220020
+CONFIG_ROCKCHIP_IRAM_START_ADDR=0xff0e0000
+CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x0
+CONFIG_ROCKCHIP_BROM_HELPER=y
+# CONFIG_SPL_ROCKCHIP_EARLYRETURN_TO_BROM is not set
+# CONFIG_TPL_ROCKCHIP_EARLYRETURN_TO_BROM is not set
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_RKIMG_BOOTLOADER=y
+# CONFIG_RKIMG_ANDROID_BOOTMODE_LEGACY is not set
+CONFIG_ROCKCHIP_RESOURCE_IMAGE=y
+# CONFIG_ROCKCHIP_EARLY_DISTRO_DTB is not set
+CONFIG_ROCKCHIP_VENDOR_PARTITION=y
+CONFIG_USING_KERNEL_DTB=y
+# CONFIG_ROCKCHIP_CRC is not set
+CONFIG_ROCKCHIP_SMCCC=y
+# CONFIG_ROCKCHIP_DEBUGGER is not set
+# CONFIG_ROCKCHIP_CRASH_DUMP is not set
+CONFIG_ROCKCHIP_PRELOADER_ATAGS=y
+CONFIG_ROCKCHIP_PRELOADER_SERIAL=y
+CONFIG_GICV2=y
+# CONFIG_GICV3 is not set
+# CONFIG_TARGET_EVB_PX30 is not set
+CONFIG_PLATFORM_ODROID_GOADV=y
+# CONFIG_TARGET_ODROIDGO2 is not set
+CONFIG_TARGET_ODROIDGO3=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_BOARD_SPECIFIC_OPTIONS=y
+# CONFIG_TPL_LIBCOMMON_SUPPORT is not set
+# CONFIG_TPL_LIBGENERIC_SUPPORT is not set
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_ENV_SIZE=0x8000
+CONFIG_ENV_OFFSET=0x3f8000
+# CONFIG_SPL_LIBDISK_SUPPORT is not set
+# CONFIG_SPL_NAND_SUPPORT is not set
+# CONFIG_SPL_SPI_FLASH_SUPPORT is not set
+# CONFIG_SPL_SPI_SUPPORT is not set
+# CONFIG_SPL_WATCHDOG_SUPPORT is not set
+CONFIG_IDENT_STRING=""
+CONFIG_SPL_STACK_R_ADDR=0x600000
+# CONFIG_SPL_FAT_SUPPORT is not set
+# CONFIG_ARMV8_MULTIENTRY is not set
+# CONFIG_ARMV8_SET_SMPEN is not set
+
+#
+# ARMv8 secure monitor firmware
+#
+# CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT is not set
+# CONFIG_SPL_ARMV8_SEC_FIRMWARE_SUPPORT is not set
+CONFIG_PSCI_RESET=y
+# CONFIG_ARMV8_PSCI is not set
+# CONFIG_CMD_DEKBLOB is not set
+# CONFIG_CMD_HDMIDETECT is not set
+
+#
+# ARM debug
+#
+CONFIG_DEFAULT_DEVICE_TREE="odroidgo3"
+CONFIG_SMBIOS_PRODUCT_NAME="odroidgo3"
+CONFIG_DEBUG_UART=y
+# CONFIG_AHCI is not set
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_SYS_MALLOC_F=y
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x600
+CONFIG_EXPERT=y
+CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y
+# CONFIG_TOOLS_DEBUG is not set
+CONFIG_PHYS_64BIT=y
+
+#
+# Boot images
+#
+# CONFIG_ANDROID_BOOT_IMAGE is not set
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+# CONFIG_FIT_SIGNATURE is not set
+CONFIG_FIT_VERBOSE=y
+# CONFIG_FIT_BEST_MATCH is not set
+CONFIG_SPL_FIT=y
+# CONFIG_SPL_FIT_SIGNATURE is not set
+CONFIG_SPL_LOAD_FIT=y
+# CONFIG_SPL_FIT_IMAGE_POST_PROCESS is not set
+CONFIG_SPL_FIT_SOURCE=""
+# CONFIG_OF_BOARD_SETUP is not set
+# CONFIG_OF_SYSTEM_SETUP is not set
+# CONFIG_OF_STDOUT_VIA_ALIAS is not set
+CONFIG_SYS_EXTRA_OPTIONS=""
+CONFIG_ARCH_FIXUP_FDT_MEMORY=y
+
+#
+# API
+#
+# CONFIG_API is not set
+
+#
+# Boot timing
+#
+# CONFIG_BOOTSTAGE is not set
+CONFIG_BOOTSTAGE_USER_COUNT=20
+CONFIG_BOOTSTAGE_RECORD_COUNT=30
+CONFIG_BOOTSTAGE_STASH_ADDR=0
+CONFIG_BOOTSTAGE_STASH_SIZE=0x1000
+# CONFIG_BOOTSTAGE_PRINTF_TIMESTAMP is not set
+
+#
+# Boot media
+#
+# CONFIG_NAND_BOOT is not set
+# CONFIG_ONENAND_BOOT is not set
+# CONFIG_QSPI_BOOT is not set
+# CONFIG_SATA_BOOT is not set
+# CONFIG_SD_BOOT is not set
+CONFIG_SPI_BOOT=y
+CONFIG_PASS_DEVICE_SERIAL_BY_FDT=y
+CONFIG_BOOTDELAY=0
+# CONFIG_USE_BOOTARGS is not set
+
+#
+# Console
+#
+CONFIG_MENU=y
+# CONFIG_CONSOLE_RECORD is not set
+# CONFIG_CONSOLE_DISABLE_CTRLC is not set
+# CONFIG_DISABLE_CONSOLE is not set
+CONFIG_LOGLEVEL=4
+CONFIG_SPL_LOGLEVEL=4
+# CONFIG_SILENT_CONSOLE is not set
+# CONFIG_PRE_CONSOLE_BUFFER is not set
+CONFIG_CONSOLE_MUX=y
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set
+# CONFIG_SYS_CONSOLE_ENV_OVERWRITE is not set
+# CONFIG_SYS_CONSOLE_INFO_QUIET is not set
+# CONFIG_SYS_STDIO_DEREGISTER is not set
+
+#
+# Logging
+#
+# CONFIG_LOG is not set
+# CONFIG_SPL_LOG is not set
+CONFIG_DEFAULT_FDT_FILE=""
+# CONFIG_VERSION_VARIABLE is not set
+CONFIG_BOARD_LATE_INIT=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_DISPLAY_BOARDINFO=y
+
+#
+# Start-up hooks
+#
+# CONFIG_ARCH_EARLY_INIT_R is not set
+# CONFIG_ARCH_MISC_INIT is not set
+# CONFIG_BOARD_EARLY_INIT_F is not set
+# CONFIG_BOARD_EARLY_INIT_R is not set
+# CONFIG_ANDROID_AB is not set
+CONFIG_ANDROID_WRITE_KEYBOX=y
+# CONFIG_ANDROID_AVB is not set
+CONFIG_ANDROID_KEYMASTER_CA=y
+# CONFIG_SKIP_RELOCATE_UBOOT is not set
+
+#
+# Security support
+#
+CONFIG_HASH=y
+
+#
+# SPL / TPL
+#
+CONFIG_SUPPORT_SPL=y
+CONFIG_SUPPORT_TPL=y
+CONFIG_SPL=y
+# CONFIG_SPL_BOARD_INIT is not set
+# CONFIG_SPL_BOOTROM_SUPPORT is not set
+CONFIG_SPL_RAW_IMAGE_SUPPORT=y
+CONFIG_SPL_LEGACY_IMAGE_SUPPORT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+# CONFIG_TPL_SYS_MALLOC_SIMPLE is not set
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x100000
+# CONFIG_SPL_SEPARATE_BSS is not set
+# CONFIG_SPL_DISPLAY_PRINT is not set
+CONFIG_SPL_SKIP_RELOCATE=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x4000
+# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION is not set
+# CONFIG_SPL_CRC32_SUPPORT is not set
+# CONFIG_SPL_MD5_SUPPORT is not set
+# CONFIG_SPL_SHA1_SUPPORT is not set
+# CONFIG_SPL_SHA256_SUPPORT is not set
+# CONFIG_SPL_FIT_IMAGE_TINY is not set
+# CONFIG_SPL_CPU_SUPPORT is not set
+# CONFIG_SPL_CRYPTO_SUPPORT is not set
+# CONFIG_SPL_HASH_SUPPORT is not set
+# CONFIG_SPL_DMA_SUPPORT is not set
+# CONFIG_SPL_ENV_SUPPORT is not set
+# CONFIG_SPL_EXT_SUPPORT is not set
+# CONFIG_SPL_FPGA_SUPPORT is not set
+# CONFIG_SPL_I2C_SUPPORT is not set
+# CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT is not set
+# CONFIG_SPL_MTD_SUPPORT is not set
+# CONFIG_SPL_MUSB_NEW_SUPPORT is not set
+# CONFIG_SPL_NET_SUPPORT is not set
+# CONFIG_SPL_NO_CPU_SUPPORT is not set
+# CONFIG_SPL_NOR_SUPPORT is not set
+# CONFIG_SPL_XIP_SUPPORT is not set
+# CONFIG_SPL_ONENAND_SUPPORT is not set
+# CONFIG_SPL_OS_BOOT is not set
+# CONFIG_SPL_PCI_SUPPORT is not set
+# CONFIG_SPL_PCH_SUPPORT is not set
+# CONFIG_SPL_POST_MEM_SUPPORT is not set
+# CONFIG_SPL_POWER_SUPPORT is not set
+# CONFIG_SPL_RAM_SUPPORT is not set
+# CONFIG_SPL_RTC_SUPPORT is not set
+# CONFIG_SPL_SATA_SUPPORT is not set
+# CONFIG_SPL_USB_HOST_SUPPORT is not set
+# CONFIG_SPL_USB_GADGET_SUPPORT is not set
+# CONFIG_SPL_YMODEM_SUPPORT is not set
+CONFIG_SPL_ATF=y
+# CONFIG_SPL_OPTEE_SUPPORT is not set
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
+# CONFIG_SPL_OPTEE is not set
+# CONFIG_SPL_AB is not set
+# CONFIG_SPL_LOAD_RKFW is not set
+CONFIG_TPL=y
+# CONFIG_TPL_BOARD_INIT is not set
+# CONFIG_TPL_NEEDS_SEPARATE_TEXT_BASE is not set
+# CONFIG_TPL_NEEDS_SEPARATE_STACK is not set
+# CONFIG_TPL_BOOTROM_SUPPORT is not set
+# CONFIG_TPL_DRIVERS_MISC_SUPPORT is not set
+# CONFIG_TPL_ENV_SUPPORT is not set
+# CONFIG_TPL_I2C_SUPPORT is not set
+CONFIG_TPL_TINY_FRAMEWORK=y
+# CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT is not set
+# CONFIG_TPL_MMC_SUPPORT is not set
+# CONFIG_TPL_NAND_SUPPORT is not set
+CONFIG_TPL_SERIAL_SUPPORT=y
+# CONFIG_TPL_SPI_FLASH_SUPPORT is not set
+# CONFIG_TPL_SPI_SUPPORT is not set
+
+#
+# Command line interface
+#
+CONFIG_CMDLINE=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="=> "
+
+#
+# Autoboot options
+#
+CONFIG_AUTOBOOT=y
+# CONFIG_AUTOBOOT_KEYED is not set
+
+#
+# FASTBOOT
+#
+# CONFIG_FASTBOOT is not set
+
+#
+# Commands
+#
+
+#
+# Info commands
+#
+CONFIG_CMD_BDI=y
+# CONFIG_CMD_CONFIG is not set
+CONFIG_CMD_CONSOLE=y
+# CONFIG_CMD_CPU is not set
+# CONFIG_CMD_LICENSE is not set
+
+#
+# Boot commands
+#
+CONFIG_CMD_BOOTD=y
+CONFIG_CMD_BOOTM=y
+# CONFIG_CMD_BOOTZ is not set
+CONFIG_CMD_BOOTI=y
+CONFIG_CMD_BOOTEFI=y
+CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y
+# CONFIG_CMD_BOOTEFI_HELLO is not set
+# CONFIG_CMD_BOOTMENU is not set
+# CONFIG_CMD_DTIMG is not set
+CONFIG_CMD_ELF=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_RUN=y
+CONFIG_CMD_IMI=y
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_XIMG=y
+CONFIG_CMD_POWEROFF=y
+# CONFIG_CMD_SPL is not set
+# CONFIG_CMD_THOR_DOWNLOAD is not set
+# CONFIG_CMD_ZBOOT is not set
+
+#
+# Environment commands
+#
+# CONFIG_CMD_ASKENV is not set
+CONFIG_CMD_EXPORTENV=y
+CONFIG_CMD_IMPORTENV=y
+CONFIG_CMD_EDITENV=y
+# CONFIG_CMD_GREPENV is not set
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_ENV_EXISTS=y
+# CONFIG_CMD_ENV_CALLBACK is not set
+# CONFIG_CMD_ENV_FLAGS is not set
+
+#
+# Memory commands
+#
+CONFIG_CMD_CRC32=y
+# CONFIG_CRC32_VERIFY is not set
+# CONFIG_CMD_EEPROM is not set
+# CONFIG_LOOPW is not set
+CONFIG_CMD_MD5SUM=y
+CONFIG_MD5SUM_VERIFY=y
+# CONFIG_CMD_MEMINFO is not set
+CONFIG_CMD_MEMORY=y
+# CONFIG_CMD_MEMTEST is not set
+# CONFIG_CMD_MX_CYCLIC is not set
+# CONFIG_CMD_SHA1SUM is not set
+# CONFIG_CMD_STRINGS is not set
+
+#
+# Compression commands
+#
+CONFIG_CMD_LZMADEC=y
+CONFIG_CMD_UNZIP=y
+# CONFIG_CMD_ZIP is not set
+
+#
+# Device access commands
+#
+# CONFIG_CMD_ARMFLASH is not set
+CONFIG_CMD_CLK=y
+# CONFIG_CMD_DEMO is not set
+# CONFIG_CMD_DFU is not set
+CONFIG_CMD_DM=y
+# CONFIG_CMD_FDC is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_FPGAD is not set
+# CONFIG_CMD_FUSE is not set
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_RANDOM_UUID=y
+# CONFIG_CMD_GPT_RENAME is not set
+# CONFIG_CMD_IDE is not set
+# CONFIG_CMD_IO is not set
+# CONFIG_CMD_IOTRACE is not set
+CONFIG_CMD_I2C=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_LOADS=y
+CONFIG_CMD_BOOT_ROCKCHIP=y
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_MTD is not set
+# CONFIG_CMD_NAND is not set
+# CONFIG_CMD_MMC_SPI is not set
+# CONFIG_CMD_ONENAND is not set
+CONFIG_CMD_PART=y
+# CONFIG_CMD_PCI is not set
+# CONFIG_CMD_PCMCIA is not set
+# CONFIG_CMD_READ is not set
+CONFIG_CMD_ROCKUSB=y
+# CONFIG_CMD_RKNAND is not set
+CONFIG_CMD_RKSFC=y
+# CONFIG_CMD_RK_SECURE_STORAGE is not set
+# CONFIG_CMD_SATA is not set
+# CONFIG_CMD_SAVES is not set
+# CONFIG_CMD_SDRAM is not set
+CONFIG_CMD_SF=y
+# CONFIG_CMD_SF_TEST is not set
+CONFIG_CMD_SPI=y
+# CONFIG_CMD_TSI148 is not set
+# CONFIG_CMD_UNIVERSE is not set
+CONFIG_CMD_USB=y
+# CONFIG_CMD_USB_SDP is not set
+CONFIG_CMD_USB_MASS_STORAGE=y
+
+#
+# Shell scripting commands
+#
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_SETEXPR=y
+
+#
+# Network commands
+#
+CONFIG_CMD_NET=y
+# CONFIG_CMD_TFTPPUT is not set
+# CONFIG_CMD_TFTPSRV is not set
+# CONFIG_CMD_RARP is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_NFS=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_ETHSW=y
+CONFIG_CMD_MEMTESTER=y
+# CONFIG_CMD_DDR_TEST_TOOL is not set
+
+#
+# Misc commands
+#
+CONFIG_CMD_BMP=y
+# CONFIG_CMD_BSP is not set
+# CONFIG_CMD_BKOPS_ENABLE is not set
+# CONFIG_CMD_CACHE is not set
+# CONFIG_CMD_DISPLAY is not set
+CONFIG_CMD_LED=y
+# CONFIG_CMD_DATE is not set
+# CONFIG_CMD_TIME is not set
+# CONFIG_CMD_GETTIME is not set
+CONFIG_CMD_MISC=y
+CONFIG_CMD_TIMER=y
+# CONFIG_CMD_QFW is not set
+# CONFIG_CMD_TERMINAL is not set
+# CONFIG_CMD_UUID is not set
+
+#
+# Power commands
+#
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_CHARGE_DISPLAY=y
+
+#
+# Security commands
+#
+# CONFIG_CMD_AES is not set
+# CONFIG_CMD_BLOB is not set
+# CONFIG_CMD_HASH is not set
+
+#
+# Firmware commands
+#
+
+#
+# Filesystem commands
+#
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+# CONFIG_CMD_FS_UUID is not set
+# CONFIG_CMD_JFFS2 is not set
+# CONFIG_CMD_MTDPARTS is not set
+# CONFIG_CMD_MTD_BLK is not set
+# CONFIG_CMD_REISER is not set
+# CONFIG_CMD_SCSI is not set
+# CONFIG_CMD_ZFS is not set
+
+#
+# Debug commands
+#
+# CONFIG_CMD_BEDBUG is not set
+# CONFIG_CMD_DIAG is not set
+# CONFIG_CMD_KGDB is not set
+# CONFIG_CMD_LOG is not set
+# CONFIG_CMD_TRACE is not set
+# CONFIG_CMD_UBI is not set
+
+#
+# ODROID commands
+#
+CONFIG_CMD_ODROID_ADC=y
+CONFIG_CMD_ODROID_CFGLOAD=y
+CONFIG_CMD_ODROID_BATTERY=y
+# CONFIG_CMD_ODROID_TEST is not set
+CONFIG_CMD_ODROID_HWREV=y
+
+#
+# Partition Types
+#
+CONFIG_PARTITIONS=y
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_SPL_MAC_PARTITION is not set
+CONFIG_DOS_PARTITION=y
+CONFIG_SPL_DOS_PARTITION=y
+CONFIG_ISO_PARTITION=y
+CONFIG_SPL_ISO_PARTITION=y
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_SPL_AMIGA_PARTITION is not set
+CONFIG_EFI_PARTITION=y
+CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=128
+CONFIG_EFI_PARTITION_ENTRIES_OFF=0
+CONFIG_SPL_EFI_PARTITION=y
+CONFIG_PARTITION_UUIDS=y
+CONFIG_SPL_PARTITION_UUIDS=y
+# CONFIG_PARTITION_TYPE_GUID is not set
+CONFIG_RKPARM_PARTITION=y
+# CONFIG_SPL_ROCKCHIP_PARTITION is not set
+CONFIG_SUPPORT_OF_CONTROL=y
+CONFIG_DTC=y
+
+#
+# Device Tree Control
+#
+CONFIG_OF_CONTROL=y
+# CONFIG_OF_BOARD_FIXUP is not set
+CONFIG_SPL_OF_CONTROL=y
+# CONFIG_TPL_OF_CONTROL is not set
+CONFIG_OF_LIVE=y
+CONFIG_OF_SEPARATE=y
+# CONFIG_OF_EMBED is not set
+# CONFIG_OF_BOARD is not set
+CONFIG_OF_LIST="odroidgo3"
+# CONFIG_MULTI_DTB_FIT is not set
+# CONFIG_SPL_MULTI_DTB_FIT is not set
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
+# CONFIG_SPL_OF_PLATDATA is not set
+CONFIG_MKIMAGE_DTC_PATH="dtc"
+
+#
+# Environment
+#
+# CONFIG_ENV_IS_NOWHERE is not set
+# CONFIG_ENV_IS_IN_EEPROM is not set
+# CONFIG_ENV_IS_IN_FAT is not set
+# CONFIG_ENV_IS_IN_FLASH is not set
+# CONFIG_ENV_IS_IN_MMC is not set
+# CONFIG_ENV_IS_IN_NAND is not set
+# CONFIG_ENV_IS_IN_NVRAM is not set
+# CONFIG_ENV_IS_IN_ONENAND is not set
+# CONFIG_ENV_IS_IN_REMOTE is not set
+# CONFIG_ENV_IS_IN_SPI_FLASH is not set
+# CONFIG_ENV_IS_IN_UBI is not set
+CONFIG_ENV_IS_IN_BLK_DEV=y
+# CONFIG_ENV_AES is not set
+CONFIG_NET=y
+# CONFIG_NET_RANDOM_ETHADDR is not set
+# CONFIG_NETCONSOLE is not set
+CONFIG_NET_TFTP_VARS=y
+CONFIG_BOOTP_PXE_CLIENTARCH=0x16
+CONFIG_BOOTP_VCI_STRING="U-Boot.armv8"
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_DM=y
+CONFIG_SPL_DM=y
+# CONFIG_TPL_DM is not set
+CONFIG_DM_WARN=y
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_DEVICE_REMOVE=y
+CONFIG_DM_STDIO=y
+CONFIG_DM_SEQ_ALIAS=y
+# CONFIG_SPL_DM_SEQ_ALIAS is not set
+CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
+# CONFIG_DEVRES is not set
+CONFIG_SIMPLE_BUS=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_OF_TRANSLATE=y
+# CONFIG_SPL_OF_TRANSLATE is not set
+CONFIG_ADC=y
+# CONFIG_ADC_EXYNOS is not set
+# CONFIG_ADC_SANDBOX is not set
+CONFIG_SARADC_ROCKCHIP=y
+# CONFIG_SATA is not set
+
+#
+# SATA/SCSI device support
+#
+CONFIG_BLK=y
+CONFIG_SPL_BLK=y
+# CONFIG_BLOCK_CACHE is not set
+# CONFIG_IDE is not set
+
+#
+# Boot count support
+#
+# CONFIG_BOOTCOUNT is not set
+
+#
+# Clock
+#
+CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+# CONFIG_CLK_AT91 is not set
+# CONFIG_CPU is not set
+# CONFIG_AMP is not set
+
+#
+# Hardware crypto devices
+#
+# CONFIG_DM_CRYPTO is not set
+# CONFIG_SPL_DM_CRYPTO is not set
+# CONFIG_FSL_CAAM is not set
+# CONFIG_SYS_FSL_SEC_BE is not set
+# CONFIG_SYS_FSL_SEC_LE is not set
+
+#
+# Demo for driver model
+#
+# CONFIG_DM_DEMO is not set
+
+#
+# DFU support
+#
+
+#
+# DMA Support
+#
+# CONFIG_DMA is not set
+# CONFIG_TI_EDMA3 is not set
+CONFIG_FIRMWARE=y
+CONFIG_ARM_PSCI_FW=y
+
+#
+# FPGA support
+#
+# CONFIG_FPGA_ALTERA is not set
+# CONFIG_FPGA_SOCFPGA is not set
+# CONFIG_FPGA_XILINX is not set
+
+#
+# GPIO Support
+#
+CONFIG_DM_GPIO=y
+# CONFIG_ALTERA_PIO is not set
+# CONFIG_DWAPB_GPIO is not set
+# CONFIG_AT91_GPIO is not set
+# CONFIG_ATMEL_PIO4 is not set
+# CONFIG_INTEL_BROADWELL_GPIO is not set
+# CONFIG_INTEL_ICH6_GPIO is not set
+# CONFIG_IMX_RGPIO2P is not set
+# CONFIG_LPC32XX_GPIO is not set
+# CONFIG_MSM_GPIO is not set
+# CONFIG_CMD_PCA953X is not set
+# CONFIG_PCF8575_GPIO is not set
+CONFIG_ROCKCHIP_GPIO=y
+# CONFIG_CMD_TCA642X is not set
+# CONFIG_TEGRA_GPIO is not set
+# CONFIG_TEGRA186_GPIO is not set
+# CONFIG_VYBRID_GPIO is not set
+# CONFIG_DM_74X164 is not set
+# CONFIG_DM_PCA953X is not set
+# CONFIG_MPC85XX_GPIO is not set
+
+#
+# I2C support
+#
+CONFIG_DM_I2C=y
+# CONFIG_DM_I2C_COMPAT is not set
+# CONFIG_I2C_SET_DEFAULT_BUS_NUM is not set
+# CONFIG_DM_I2C_GPIO is not set
+# CONFIG_SYS_I2C_FSL is not set
+# CONFIG_SYS_I2C_CADENCE is not set
+# CONFIG_SYS_I2C_DW is not set
+# CONFIG_SYS_I2C_INTEL is not set
+# CONFIG_SYS_I2C_IMX_LPI2C is not set
+CONFIG_SYS_I2C_ROCKCHIP=y
+# CONFIG_SYS_I2C_MVTWSI is not set
+# CONFIG_I2C_MUX is not set
+# CONFIG_DM_KEYBOARD is not set
+CONFIG_DM_KEY=y
+# CONFIG_DM_RC is not set
+# CONFIG_CROS_EC_KEYB is not set
+CONFIG_RK8XX_PWRKEY=y
+CONFIG_ADC_KEY=y
+CONFIG_GPIO_KEY=y
+CONFIG_RK_KEY=y
+CONFIG_PWRKEY_DNL_TRIGGER_NUM=0
+
+#
+# LED Support
+#
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+# CONFIG_SPL_LED is not set
+CONFIG_LED_GPIO=y
+# CONFIG_LED_STATUS is not set
+
+#
+# Mailbox Controller Support
+#
+# CONFIG_DM_MAILBOX is not set
+
+#
+# Memory Controller drivers
+#
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MISC is not set
+# CONFIG_SPL_MISC is not set
+# CONFIG_CROS_EC is not set
+# CONFIG_DS4510 is not set
+# CONFIG_FSL_SEC_MON is not set
+# CONFIG_MXC_OCOTP is not set
+# CONFIG_NUVOTON_NCT6102D is not set
+# CONFIG_PWRSEQ is not set
+# CONFIG_PCA9551_LED is not set
+# CONFIG_WINBOND_W83627 is not set
+
+#
+# MMC Host controller Support
+#
+CONFIG_MMC=y
+CONFIG_DM_MMC=y
+CONFIG_SPL_DM_MMC=y
+# CONFIG_SPL_MMC_TINY is not set
+CONFIG_MMC_DW=y
+# CONFIG_MMC_DW_K3 is not set
+CONFIG_MMC_DW_ROCKCHIP=y
+# CONFIG_MMC_MXC is not set
+# CONFIG_MMC_PCI is not set
+# CONFIG_MMC_OMAP_HS is not set
+# CONFIG_MMC_SDHCI is not set
+
+#
+# MTD Support
+#
+# CONFIG_MTD is not set
+# CONFIG_MTD_NOR_FLASH is not set
+# CONFIG_MTD_DEVICE is not set
+# CONFIG_FLASH_CFI_DRIVER is not set
+# CONFIG_NAND is not set
+
+#
+# SPI Flash Support
+#
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SF_DEFAULT_BUS=0
+CONFIG_SF_DEFAULT_CS=0
+CONFIG_SF_DEFAULT_MODE=3
+CONFIG_SF_DEFAULT_SPEED=1000000
+# CONFIG_SPI_FLASH_SFDP_SUPPORT is not set
+# CONFIG_SPI_FLASH_BAR is not set
+# CONFIG_SF_DUAL_FLASH is not set
+# CONFIG_SPI_FLASH_ATMEL is not set
+# CONFIG_SPI_FLASH_EON is not set
+# CONFIG_SPI_FLASH_GIGADEVICE is not set
+# CONFIG_SPI_FLASH_ISSI is not set
+# CONFIG_SPI_FLASH_MACRONIX is not set
+# CONFIG_SPI_FLASH_SPANSION is not set
+# CONFIG_SPI_FLASH_STMICRO is not set
+# CONFIG_SPI_FLASH_SST is not set
+# CONFIG_SPI_FLASH_WINBOND is not set
+# CONFIG_SPI_FLASH_XMC is not set
+CONFIG_SPI_FLASH_XTX=y
+CONFIG_SPI_FLASH_USE_4K_SECTORS=y
+# CONFIG_SPI_FLASH_DATAFLASH is not set
+# CONFIG_SPI_FLASH_MTD is not set
+
+#
+# UBI support
+#
+# CONFIG_CONFIG_UBI_SILENCE_MSG is not set
+# CONFIG_MTD_UBI is not set
+# CONFIG_BITBANGMII is not set
+# CONFIG_MV88E6352_SWITCH is not set
+# CONFIG_PHYLIB is not set
+# CONFIG_DM_ETH is not set
+# CONFIG_NETDEVICES is not set
+# CONFIG_PCI is not set
+
+#
+# PHY Subsystem
+#
+CONFIG_PHY=y
+# CONFIG_SPL_PHY is not set
+# CONFIG_NOP_PHY is not set
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+# CONFIG_MVEBU_COMPHY_SUPPORT is not set
+
+#
+# Pin controllers
+#
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_FULL=y
+CONFIG_PINCTRL_GENERIC=y
+CONFIG_PINMUX=y
+# CONFIG_PINCONF is not set
+# CONFIG_SPL_PINCTRL is not set
+# CONFIG_PINCTRL_AT91 is not set
+# CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_PINCTRL_ROCKCHIP=y
+# CONFIG_PINCTRL_SINGLE is not set
+# CONFIG_PINCTRL_STM32 is not set
+
+#
+# Power
+#
+
+#
+# Power Domain Support
+#
+# CONFIG_POWER_DOMAIN is not set
+CONFIG_DM_FUEL_GAUGE=y
+# CONFIG_POWER_FG_CW201X is not set
+# CONFIG_POWER_FG_RK818 is not set
+CONFIG_POWER_FG_RK817=y
+# CONFIG_POWER_FG_RK816 is not set
+
+#
+# IO Domain Support
+#
+# CONFIG_IO_DOMAIN is not set
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_CHILDREN=y
+CONFIG_SPL_PMIC_CHILDREN=y
+# CONFIG_PMIC_ACT8846 is not set
+# CONFIG_PMIC_AS3722 is not set
+# CONFIG_DM_PMIC_PFUZE100 is not set
+# CONFIG_DM_PMIC_MAX77686 is not set
+# CONFIG_DM_PMIC_MAX8998 is not set
+# CONFIG_PMIC_MAX8997 is not set
+# CONFIG_PMIC_PM8916 is not set
+CONFIG_PMIC_RK8XX=y
+# CONFIG_PMIC_S2MPS11 is not set
+# CONFIG_DM_PMIC_SANDBOX is not set
+# CONFIG_PMIC_S5M8767 is not set
+# CONFIG_PMIC_RN5T567 is not set
+# CONFIG_PMIC_TPS65090 is not set
+# CONFIG_PMIC_PALMAS is not set
+# CONFIG_PMIC_LP873X is not set
+# CONFIG_PMIC_LP87565 is not set
+# CONFIG_POWER_MC34VR500 is not set
+CONFIG_DM_REGULATOR=y
+# CONFIG_SPL_DM_REGULATOR is not set
+# CONFIG_REGULATOR_FAN53555 is not set
+CONFIG_REGULATOR_PWM=y
+CONFIG_DM_REGULATOR_FIXED=y
+# CONFIG_SPL_DM_REGULATOR_FIXED is not set
+# CONFIG_DM_REGULATOR_GPIO is not set
+CONFIG_REGULATOR_RK8XX=y
+# CONFIG_DM_DVFS is not set
+# CONFIG_CHARGER_BQ25700 is not set
+CONFIG_DM_CHARGE_DISPLAY=y
+CONFIG_CHARGE_ANIMATION=y
+CONFIG_ROCKCHIP_PM=y
+CONFIG_DM_PWM=y
+# CONFIG_PWM_EXYNOS is not set
+CONFIG_PWM_ROCKCHIP=y
+# CONFIG_PWM_SANDBOX is not set
+# CONFIG_PWM_TEGRA is not set
+CONFIG_RAM=y
+CONFIG_SPL_RAM=y
+CONFIG_TPL_RAM=y
+# CONFIG_STM32_SDRAM is not set
+# CONFIG_DM_RAMDISK is not set
+# CONFIG_ROCKCHIP_DMC is not set
+CONFIG_ROCKCHIP_SDRAM_COMMON=y
+CONFIG_SDRAM_COMMON_CAP_DETECT=y
+CONFIG_SDRAM_COMMON_OSREG=y
+# CONFIG_SDRAM_COMMON_MSCH_RK3399 is not set
+CONFIG_SDRAM_COMMON_MSCH_PX30=y
+
+#
+# Remote Processor drivers
+#
+
+#
+# Reset Controller Support
+#
+CONFIG_DM_RESET=y
+CONFIG_RESET_ROCKCHIP=y
+CONFIG_RKNAND=y
+CONFIG_ZFTL=y
+CONFIG_RKFLASH=y
+
+#
+# Rockchip Flash Devices
+#
+CONFIG_RKSFC_NOR=y
+
+#
+# Real Time Clock
+#
+# CONFIG_DM_RTC is not set
+# CONFIG_SCSI is not set
+# CONFIG_DM_SCSI is not set
+
+#
+# Serial drivers
+#
+CONFIG_BAUDRATE=115200
+CONFIG_REQUIRE_SERIAL_CONSOLE=y
+CONFIG_SERIAL_PRESENT=y
+CONFIG_SPL_SERIAL_PRESENT=y
+CONFIG_DM_SERIAL=y
+# CONFIG_SERIAL_RX_BUFFER is not set
+CONFIG_SPL_DM_SERIAL=y
+CONFIG_TPL_DM_SERIAL=y
+# CONFIG_DEBUG_UART_ALTERA_JTAGUART is not set
+# CONFIG_DEBUG_UART_ALTERA_UART is not set
+# CONFIG_DEBUG_UART_ATMEL is not set
+CONFIG_DEBUG_UART_NS16550=y
+# CONFIG_DEBUG_UART_S5P is not set
+# CONFIG_DEBUG_UART_UARTLITE is not set
+# CONFIG_DEBUG_UART_ARM_DCC is not set
+# CONFIG_DEBUG_MVEBU_A3700_UART is not set
+# CONFIG_DEBUG_UART_ZYNQ is not set
+# CONFIG_DEBUG_UART_PL010 is not set
+# CONFIG_DEBUG_UART_PL011 is not set
+# CONFIG_DEBUG_UART_OMAP is not set
+CONFIG_DEBUG_UART_BASE=0xFF160000
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_DEBUG_UART_BOARD_INIT=y
+# CONFIG_DEBUG_UART_ANNOUNCE is not set
+# CONFIG_DEBUG_UART_SKIP_INIT is not set
+# CONFIG_ALTERA_JTAG_UART is not set
+# CONFIG_ALTERA_UART is not set
+# CONFIG_ATMEL_USART is not set
+# CONFIG_FSL_LPUART is not set
+# CONFIG_MVEBU_A3700_UART is not set
+CONFIG_SYS_NS16550=y
+# CONFIG_MSM_SERIAL is not set
+# CONFIG_PXA_SERIAL is not set
+
+#
+# Sound support
+#
+# CONFIG_SOUND is not set
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_SPI_MEM=y
+# CONFIG_ALTERA_SPI is not set
+# CONFIG_ATCSPI200_SPI is not set
+# CONFIG_ATMEL_SPI is not set
+# CONFIG_CADENCE_QSPI is not set
+# CONFIG_DESIGNWARE_SPI is not set
+# CONFIG_EXYNOS_SPI is not set
+# CONFIG_FSL_DSPI is not set
+# CONFIG_ICH_SPI is not set
+# CONFIG_MVEBU_A3700_SPI is not set
+CONFIG_ROCKCHIP_SPI=y
+# CONFIG_ROCKCHIP_SFC is not set
+# CONFIG_TEGRA114_SPI is not set
+# CONFIG_TEGRA20_SFLASH is not set
+# CONFIG_TEGRA20_SLINK is not set
+# CONFIG_TEGRA210_QSPI is not set
+# CONFIG_XILINX_SPI is not set
+# CONFIG_SOFT_SPI is not set
+# CONFIG_CF_SPI is not set
+# CONFIG_FSL_ESPI is not set
+# CONFIG_FSL_QSPI is not set
+# CONFIG_SH_SPI is not set
+# CONFIG_SH_QSPI is not set
+# CONFIG_TI_QSPI is not set
+# CONFIG_KIRKWOOD_SPI is not set
+# CONFIG_LPC32XX_SSP is not set
+# CONFIG_MPC8XXX_SPI is not set
+# CONFIG_MXC_SPI is not set
+# CONFIG_MXS_SPI is not set
+# CONFIG_OMAP3_SPI is not set
+
+#
+# SPMI support
+#
+# CONFIG_SPMI is not set
+
+#
+# System reset device drivers
+#
+CONFIG_SYSRESET=y
+CONFIG_SPL_SYSRESET=y
+CONFIG_SYSRESET_PSCI=y
+# CONFIG_SYSRESET_SYSCON is not set
+# CONFIG_SYSRESET_WATCHDOG is not set
+# CONFIG_DM_THERMAL is not set
+
+#
+# Timer Support
+#
+# CONFIG_TIMER is not set
+
+#
+# TPM support
+#
+CONFIG_USB=y
+CONFIG_DM_USB=y
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_HOST=y
+# CONFIG_USB_XHCI_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_MSM is not set
+# CONFIG_USB_EHCI_PCI is not set
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_GENERIC=y
+# CONFIG_USB_UHCI_HCD is not set
+CONFIG_USB_DWC2=y
+# CONFIG_USB_DWC3 is not set
+
+#
+# MUSB Controller Driver
+#
+# CONFIG_USB_MUSB_HOST is not set
+# CONFIG_USB_MUSB_GADGET is not set
+# CONFIG_USB_MUSB_TI is not set
+
+#
+# ULPI drivers
+#
+
+#
+# USB peripherals
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_KEYBOARD is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_BCM_UDC_OTG_PHY is not set
+CONFIG_USB_GADGET_DWC2_OTG=y
+# CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 is not set
+# CONFIG_CI_UDC is not set
+CONFIG_USB_GADGET_VBUS_DRAW=2
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+# CONFIG_USB_FUNCTION_SDP is not set
+CONFIG_G_DNL_MANUFACTURER="Rockchip"
+CONFIG_G_DNL_VENDOR_NUM=0x2207
+CONFIG_G_DNL_PRODUCT_NUM=0x330d
+CONFIG_USBNET_DEVADDR="de:ad:be:ef:00:01"
+CONFIG_USB_HOST_ETHER=y
+CONFIG_USB_ETHER_ASIX=y
+CONFIG_USB_ETHER_ASIX88179=y
+# CONFIG_USB_ETHER_LAN75XX is not set
+# CONFIG_USB_ETHER_LAN78XX is not set
+# CONFIG_USB_ETHER_MCS7830 is not set
+CONFIG_USB_ETHER_RTL8152=y
+CONFIG_USB_ETHER_SMSC95XX=y
+
+#
+# Graphics support
+#
+CONFIG_DM_VIDEO=y
+CONFIG_BACKLIGHT_PWM=y
+# CONFIG_BACKLIGHT_GPIO is not set
+CONFIG_VIDEO_BPP8=y
+CONFIG_VIDEO_BPP16=y
+CONFIG_VIDEO_BPP32=y
+CONFIG_CONSOLE_NORMAL=y
+CONFIG_CONSOLE_ROTATION=y
+# CONFIG_CONSOLE_TRUETYPE is not set
+CONFIG_SYS_WHITE_ON_BLACK=y
+
+#
+# TrueType Fonts
+#
+# CONFIG_VIDCONSOLE_AS_LCD is not set
+# CONFIG_VIDEO_VESA is not set
+# CONFIG_VIDEO_LCD_ANX9804 is not set
+# CONFIG_VIDEO_LCD_SSD2828 is not set
+# CONFIG_VIDEO_MVEBU is not set
+CONFIG_I2C_EDID=y
+CONFIG_DISPLAY=y
+# CONFIG_ATMEL_HLCD is not set
+# CONFIG_VIDEO_ROCKCHIP is not set
+CONFIG_DRM_ROCKCHIP=y
+CONFIG_DRM_ROCKCHIP_PANEL=y
+# CONFIG_DRM_ROCKCHIP_DW_HDMI is not set
+# CONFIG_ROCKCHIP_INNO_HDMI_PHY is not set
+# CONFIG_DRM_ROCKCHIP_INNO_MIPI_PHY is not set
+# CONFIG_DRM_ROCKCHIP_INNO_VIDEO_PHY is not set
+CONFIG_DRM_ROCKCHIP_INNO_VIDEO_COMBO_PHY=y
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_ROCKCHIP_DW_MIPI_DSI=y
+# CONFIG_DRM_ROCKCHIP_ANALOGIX_DP is not set
+# CONFIG_DRM_ROCKCHIP_LVDS is not set
+# CONFIG_DRM_ROCKCHIP_RGB is not set
+# CONFIG_DRM_ROCKCHIP_RK618 is not set
+# CONFIG_ROCKCHIP_DRM_TVE is not set
+# CONFIG_VIDEO_TEGRA20 is not set
+# CONFIG_VIDEO_TEGRA124 is not set
+CONFIG_VIDEO_BRIDGE=y
+# CONFIG_VIDEO_BRIDGE_PARADE_PS862X is not set
+# CONFIG_VIDEO_BRIDGE_NXP_PTN3460 is not set
+# CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345 is not set
+CONFIG_CONSOLE_SCROLL_LINES=1
+# CONFIG_LCD is not set
+
+#
+# Watchdog Timer Support
+#
+# CONFIG_BCM2835_WDT is not set
+# CONFIG_ULP_WATCHDOG is not set
+# CONFIG_WDT is not set
+CONFIG_IRQ=y
+# CONFIG_PHYS_TO_BUS is not set
+
+#
+# File systems
+#
+# CONFIG_FS_CBFS is not set
+CONFIG_FS_FAT=y
+CONFIG_FAT_WRITE=y
+CONFIG_FS_FAT_MAX_CLUSTSIZE=65536
+# CONFIG_FS_JFFS2 is not set
+# CONFIG_FS_CRAMFS is not set
+# CONFIG_YAFFS2 is not set
+
+#
+# Library routines
+#
+# CONFIG_BCH is not set
+# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set
+CONFIG_SYS_HZ=1000
+CONFIG_SYS_STACK_SIZE=0x200000
+CONFIG_USE_TINY_PRINTF=y
+# CONFIG_PANIC_HANG is not set
+CONFIG_REGEX=y
+# CONFIG_LIB_RAND is not set
+CONFIG_SPL_TINY_MEMSET=y
+# CONFIG_TPL_TINY_MEMSET is not set
+CONFIG_SYSMEM=y
+CONFIG_BIDRAM=y
+# CONFIG_CMD_DHRYSTONE is not set
+
+#
+# Security support
+#
+# CONFIG_AES is not set
+# CONFIG_RSA is not set
+# CONFIG_TPM is not set
+
+#
+# Hashing Support
+#
+CONFIG_SHA1=y
+CONFIG_SHA256=y
+# CONFIG_SHA512 is not set
+# CONFIG_SHA_HW_ACCEL is not set
+CONFIG_MD5=y
+
+#
+# Compression Support
+#
+CONFIG_LZ4=y
+CONFIG_LZMA=y
+CONFIG_LZO=y
+# CONFIG_SPL_LZO is not set
+# CONFIG_SPL_GZIP is not set
+CONFIG_ERRNO_STR=y
+# CONFIG_HEXDUMP is not set
+CONFIG_OF_LIBFDT=y
+# CONFIG_OF_LIBFDT_OVERLAY is not set
+CONFIG_SPL_OF_LIBFDT=y
+# CONFIG_TPL_OF_LIBFDT is not set
+# CONFIG_FDT_FIXUP_PARTITIONS is not set
+
+#
+# System tables
+#
+CONFIG_GENERATE_SMBIOS_TABLE=y
+CONFIG_SMBIOS_MANUFACTURER="rockchip"
+CONFIG_EFI_LOADER=y
+# CONFIG_EFI_LOADER_BOUNCE_BUFFER is not set
+# CONFIG_AVB_LIBAVB is not set
+# CONFIG_SPL_AVB_LIBAVB is not set
+# CONFIG_TPL_AVB_LIBAVB is not set
+# CONFIG_AVB_LIBAVB_AB is not set
+# CONFIG_SPL_AVB_LIBAVB_AB is not set
+# CONFIG_TPL_AVB_LIBAVB_AB is not set
+# CONFIG_AVB_LIBAVB_ATX is not set
+# CONFIG_SPL_AVB_LIBAVB_ATX is not set
+# CONFIG_TPL_AVB_LIBAVB_ATX is not set
+# CONFIG_AVB_LIBAVB_USER is not set
+# CONFIG_SPL_AVB_LIBAVB_USER is not set
+# CONFIG_TPL_AVB_LIBAVB_USER is not set
+# CONFIG_RK_AVB_LIBAVB_USER is not set
+# CONFIG_SPL_RK_AVB_LIBAVB_USER is not set
+# CONFIG_TPL_RK_AVB_LIBAVB_USER is not set
+CONFIG_OPTEE_CLIENT=y
+# CONFIG_OPTEE_V1 is not set
+CONFIG_OPTEE_V2=y
+CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION=y
+# CONFIG_UNIT_TEST is not set
+CONFIG_TEST_ROCKCHIP=y
+# CONFIG_LAVA_INFO is not set
diff --git a/tools/images/hardkernel/logo_hardkernel_b.bmp b/tools/images/hardkernel/logo_hardkernel_b.bmp
new file mode 100644
index 0000000000..41d238bed0
--- /dev/null
+++ b/tools/images/hardkernel/logo_hardkernel_b.bmp
Binary files differ
diff --git a/tools/images/hardkernel/low_battery_b.bmp b/tools/images/hardkernel/low_battery_b.bmp
new file mode 100644
index 0000000000..a8d5304d21
--- /dev/null
+++ b/tools/images/hardkernel/low_battery_b.bmp
Binary files differ
diff --git a/tools/images/hardkernel/no_sdcard_b.bmp b/tools/images/hardkernel/no_sdcard_b.bmp
new file mode 100644
index 0000000000..b6c4ed4e53
--- /dev/null
+++ b/tools/images/hardkernel/no_sdcard_b.bmp
Binary files differ
diff --git a/tools/images/hardkernel/recovery_b.bmp b/tools/images/hardkernel/recovery_b.bmp
new file mode 100644
index 0000000000..e01fff89ec
--- /dev/null
+++ b/tools/images/hardkernel/recovery_b.bmp
Binary files differ
diff --git a/tools/images/hardkernel/system_error_b.bmp b/tools/images/hardkernel/system_error_b.bmp
new file mode 100644
index 0000000000..8e66c7d5ac
--- /dev/null
+++ b/tools/images/hardkernel/system_error_b.bmp
Binary files differ