From 5cc5b901e6d319af18b8dc59537c503bbd3ca7f0 Mon Sep 17 00:00:00 2001 From: Jeffy Chen Date: Fri, 27 Nov 2015 12:07:16 +0800 Subject: Revert "rockchip: Add max spl size & spl header configs" This reverts commit 10b4615f9d7e177ec7fe644fbb2616e0e0956f6e Signed-off-by: Jeffy Chen Acked-by: Simon Glass --- arch/arm/mach-rockchip/Kconfig | 15 --------------- arch/arm/mach-rockchip/rk3036/Kconfig | 6 ------ arch/arm/mach-rockchip/rk3288/Kconfig | 6 ------ 3 files changed, 27 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index aef1a455ae0..d3bddb726af 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -17,21 +17,6 @@ config ROCKCHIP_RK3036 and video codec support. Peripherals include Gigabit Ethernet, USB2 host and OTG, SDIO, I2S, UART, SPI, I2C and PWMs. -config ROCKCHIP_SPL_HDR - string "Header of rockchip's spl loader" - help - Rockchip's bootrom requires the spl loader to start with a 4-bytes - header. The content of this header depends on the chip type. - -config ROCKCHIP_MAX_SPL_SIZE - hex "Max size of rockchip's spl loader" - help - Different chip may have different sram size. And if we want to jump - back to the bootrom after spl, we may need to reserve some sram space - for the bootrom. - The max spl loader size should be sram size minus reserved - size(if needed) - config SYS_MALLOC_F default y diff --git a/arch/arm/mach-rockchip/rk3036/Kconfig b/arch/arm/mach-rockchip/rk3036/Kconfig index 95fb2b94633..0fbc58eba28 100644 --- a/arch/arm/mach-rockchip/rk3036/Kconfig +++ b/arch/arm/mach-rockchip/rk3036/Kconfig @@ -9,12 +9,6 @@ config SYS_SOC config SYS_MALLOC_F_LEN default 0x400 -config ROCKCHIP_SPL_HDR - default "RK30" - -config ROCKCHIP_MAX_SPL_SIZE - default 0x1000 - config ROCKCHIP_COMMON bool "Support rk common fuction" diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig index 3de3878cd6e..d0a72767c88 100644 --- a/arch/arm/mach-rockchip/rk3288/Kconfig +++ b/arch/arm/mach-rockchip/rk3288/Kconfig @@ -16,12 +16,6 @@ config TARGET_CHROMEBOOK_JERRY WiFi. It includes a Chrome OS EC (Cortex-M3) to provide access to the keyboard and battery functions. -config ROCKCHIP_SPL_HDR - default "RK32" - -config ROCKCHIP_MAX_SPL_SIZE - default 0x8000 - config SYS_SOC default "rockchip" -- cgit v1.2.3 From e390680015c79c8ce390b5245646324eb6f9d9c6 Mon Sep 17 00:00:00 2001 From: huang lin Date: Mon, 7 Dec 2015 11:08:56 +0800 Subject: rockchip: rk3036 sdram setting cs1_row when rank larger than 1 only rank large than 1, we will use cs1_row, so check rank, when rank larger than 1, we set the cs1_row. Signed-off-by: Lin Huang Acked-by: Simon Glass --- arch/arm/mach-rockchip/rk3036/sdram_rk3036.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c index 7a05e310d73..e3ca8700742 100644 --- a/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c +++ b/arch/arm/mach-rockchip/rk3036/sdram_rk3036.c @@ -701,15 +701,19 @@ finish: static void sdram_all_config(struct rk3036_sdram_priv *priv) { u32 os_reg = 0; + u32 cs1_row = 0; struct rk3036_ddr_config config = priv->ddr_config; + if (config.rank > 1) + cs1_row = config.cs1_row - 13; + os_reg = config.ddr_type << DDR_TYPE_SHIFT | 0 << DDR_CHN_CNT_SHIFT | (config.rank - 1) << DDR_RANK_CNT_SHIFT | (config.col - 1) << DDR_COL_SHIFT | (config.bank == 3 ? 0 : 1) << DDR_BANK_SHIFT | (config.cs0_row - 13) << DDR_CS0_ROW_SHIFT | - (config.cs1_row - 13) << DDR_CS1_ROW_SHIFT | + cs1_row << DDR_CS1_ROW_SHIFT | 1 << DDR_BW_SHIFT | config.bw << DDR_DIE_BW_SHIFT; writel(os_reg, &priv->grf->os_reg[1]); } -- cgit v1.2.3 From 47b4c228b5ae72598dc38ca2764c11ea1c6693cc Mon Sep 17 00:00:00 2001 From: huang lin Date: Mon, 7 Dec 2015 11:08:57 +0800 Subject: rockchip: Add basic support for kylin board 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 Acked-by: Simon Glass --- arch/arm/mach-rockchip/rk3036/Kconfig | 4 +++ board/kylin/kylin_rk3036/Kconfig | 15 ++++++++++ board/kylin/kylin_rk3036/MAINTAINERS | 0 board/kylin/kylin_rk3036/Makefile | 7 +++++ board/kylin/kylin_rk3036/kylin_rk3036.c | 49 +++++++++++++++++++++++++++++++++ configs/kylin-rk3036_defconfig | 26 +++++++++++++++++ include/configs/kylin_rk3036.h | 12 ++++++++ 7 files changed, 113 insertions(+) create mode 100644 board/kylin/kylin_rk3036/Kconfig create mode 100644 board/kylin/kylin_rk3036/MAINTAINERS create mode 100644 board/kylin/kylin_rk3036/Makefile create mode 100644 board/kylin/kylin_rk3036/kylin_rk3036.c create mode 100644 configs/kylin-rk3036_defconfig create mode 100644 include/configs/kylin_rk3036.h (limited to 'arch/arm') diff --git a/arch/arm/mach-rockchip/rk3036/Kconfig b/arch/arm/mach-rockchip/rk3036/Kconfig index 0fbc58eba28..cc038088472 100644 --- a/arch/arm/mach-rockchip/rk3036/Kconfig +++ b/arch/arm/mach-rockchip/rk3036/Kconfig @@ -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 index 00000000000..5d75c1fc0f6 --- /dev/null +++ b/board/kylin/kylin_rk3036/Kconfig @@ -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 index 00000000000..e69de29bb2d diff --git a/board/kylin/kylin_rk3036/Makefile b/board/kylin/kylin_rk3036/Makefile new file mode 100644 index 00000000000..0663270506c --- /dev/null +++ b/board/kylin/kylin_rk3036/Makefile @@ -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 index 00000000000..40d6b521bc6 --- /dev/null +++ b/board/kylin/kylin_rk3036/kylin_rk3036.c @@ -0,0 +1,49 @@ +/* + * (C) Copyright 2015 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include + +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 index 00000000000..60cdebfc6c3 --- /dev/null +++ b/configs/kylin-rk3036_defconfig @@ -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 index 00000000000..aa07889ff22 --- /dev/null +++ b/include/configs/kylin_rk3036.h @@ -0,0 +1,12 @@ +/* + * (C) Copyright 2015 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#endif -- cgit v1.2.3