2 * (C) Copyright 2015 Rockchip Electronics Co., Ltd
4 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/uart.h>
11 #include <asm/arch/sdram_rk3036.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 void get_ddr_config(struct rk3036_ddr_config *config)
18 /* K4B4G1646Q config */
32 #define FASTBOOT_KEY_GPIO 93
34 int fastboot_key_pressed(void)
36 gpio_request(FASTBOOT_KEY_GPIO, "fastboot_key");
37 gpio_direction_input(FASTBOOT_KEY_GPIO);
38 return !gpio_get_value(FASTBOOT_KEY_GPIO);
41 #define ROCKCHIP_BOOT_MODE_FASTBOOT 0x5242C309
43 int rk_board_late_init(void)
45 if (fastboot_key_pressed()) {
46 printf("enter fastboot!\n");
47 env_set("preboot", "setenv preboot; fastboot usb0");