]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: Add basic support for kylin board
authorhuang lin <hl@rock-chips.com>
Mon, 7 Dec 2015 03:08:57 +0000 (11:08 +0800)
committerSimon Glass <sjg@chromium.org>
Mon, 14 Dec 2015 03:51:50 +0000 (20:51 -0700)
kylin board use rk3036 SOC, 512M sdram, 8G emmc.
This add some basic files required to allow the board
to output serial message and can run command(mmc info etc).

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/arm/mach-rockchip/rk3036/Kconfig
board/kylin/kylin_rk3036/Kconfig [new file with mode: 0644]
board/kylin/kylin_rk3036/MAINTAINERS [new file with mode: 0644]
board/kylin/kylin_rk3036/Makefile [new file with mode: 0644]
board/kylin/kylin_rk3036/kylin_rk3036.c [new file with mode: 0644]
configs/kylin-rk3036_defconfig [new file with mode: 0644]
include/configs/kylin_rk3036.h [new file with mode: 0644]

index 0fbc58eba2894a3e54ddfba599840bb2fbe5c344..cc0380884729bd69be6ad0fb53180da49d6a10ff 100644 (file)
@@ -3,6 +3,9 @@ if ROCKCHIP_RK3036
 config TARGET_EVB_RK3036
        bool "EVB_RK3036"
 
+config TARGET_KYLIN_RK3036
+       bool "KYLIN_RK3036"
+
 config SYS_SOC
        default "rockchip"
 
@@ -13,5 +16,6 @@ config ROCKCHIP_COMMON
        bool "Support rk common fuction"
 
 source "board/evb_rk3036/evb_rk3036/Kconfig"
+source "board/kylin/kylin_rk3036/Kconfig"
 
 endif
diff --git a/board/kylin/kylin_rk3036/Kconfig b/board/kylin/kylin_rk3036/Kconfig
new file mode 100644 (file)
index 0000000..5d75c1f
--- /dev/null
@@ -0,0 +1,15 @@
+if TARGET_KYLIN_RK3036
+
+config SYS_BOARD
+       default "kylin_rk3036"
+
+config SYS_VENDOR
+       default "kylin"
+
+config SYS_CONFIG_NAME
+       default "kylin_rk3036"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+       def_bool y
+
+endif
diff --git a/board/kylin/kylin_rk3036/MAINTAINERS b/board/kylin/kylin_rk3036/MAINTAINERS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/board/kylin/kylin_rk3036/Makefile b/board/kylin/kylin_rk3036/Makefile
new file mode 100644 (file)
index 0000000..0663270
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2015 Google, Inc
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  += kylin_rk3036.o
diff --git a/board/kylin/kylin_rk3036/kylin_rk3036.c b/board/kylin/kylin_rk3036/kylin_rk3036.c
new file mode 100644 (file)
index 0000000..40d6b52
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * (C) Copyright 2015 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <asm/io.h>
+#include <asm/arch/uart.h>
+#include <asm/arch/sdram_rk3036.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void get_ddr_config(struct rk3036_ddr_config *config)
+{
+       /* K4B4G1646Q config */
+       config->ddr_type = 3;
+       config->rank = 1;
+       config->cs0_row = 15;
+       config->cs1_row = 15;
+
+       /* 8bank */
+       config->bank = 3;
+       config->col = 10;
+
+       /* 16bit bw */
+       config->bw = 1;
+}
+
+int board_init(void)
+{
+       return 0;
+}
+
+int dram_init(void)
+{
+       gd->ram_size = sdram_size();
+
+       return 0;
+}
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+void enable_caches(void)
+{
+       /* Enable D-cache. I-cache is already enabled in start.S */
+       dcache_enable();
+}
+#endif
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
new file mode 100644 (file)
index 0000000..60cdebf
--- /dev/null
@@ -0,0 +1,26 @@
+CONFIG_ARM=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ROCKCHIP_RK3036=y
+CONFIG_TARGET_KYLIN_RK3036=y
+CONFIG_DEFAULT_DEVICE_TREE="rk3036-sdk"
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_ADDR=0x80000
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_PMIC=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CLK=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_RESET=y
+CONFIG_LED=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_PINCTRL=y
+CONFIG_ROCKCHIP_DWMMC=y
+CONFIG_ROCKCHIP_3036_PINCTRL=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_RAM=y
+CONFIG_DM_MMC=y
+CONFIG_USE_PRIVATE_LIBGCC=y
+CONFIG_CMD_DHRYSTONE=y
+CONFIG_ERRNO_STR=y
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
new file mode 100644 (file)
index 0000000..aa07889
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * (C) Copyright 2015 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <configs/rk3036_common.h>
+
+#endif