Skip to contentSkip to conversation

ARM DaVinci Adding DM357 Support

PATCH Superseded s-paulraj at ti.com 3 participants 3 messages May 8, 2009 – May 9, 2009 Kbuild

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 ARM DaVinci Adding DM357 Support

Patch adds Support for DaVinci DM357.
It boots of a small page NAND on the EVM. It does not have NOR support. This patch has been tested on the DM357 EVM.
The patch does not have Ethernet Support yet.
Ethernet Support will be added soon

---
 Makefile                            |    3 +
 board/davinci/dm357_evm/Makefile    |   50 ++++++++++++
 board/davinci/dm357_evm/config.mk   |   39 +++++++++
 board/davinci/dm357_evm/dm357_evm.c |   69 ++++++++++++++++
 include/configs/davinci_dm357_evm.h |  146 +++++++++++++++++++++++++++++++++++
 5 files changed, 307 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/dm357_evm/Makefile
 create mode 100644 board/davinci/dm357_evm/config.mk
 create mode 100644 board/davinci/dm357_evm/dm357_evm.c
 create mode 100644 include/configs/davinci_dm357_evm.h
Makefile +3 -0
index 137c88f..6ee0562 100644
@@ -2790,6 +2790,9 @@ davinci_sffsdr_config :	unconfig
 davinci_sonata_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
 
+davinci_dm357_evm_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs dm357_evm davinci davinci
+
 lpd7a400_config \
 lpd7a404_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
board/davinci/dm357_evm/Makefile new file +50 -0

50 lines not on this page · raw message

board/davinci/dm357_evm/config.mk new file +39 -0
new file mode 100644
index 0000000..aa89d0e
@@ -0,0 +1,39 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <[email protected]>
+# David Mueller, ELSOFT AG, <[email protected]>
+#
+# (C) Copyright 2003
+# Texas Instruments, <www.ti.com>
+# Swaminathan <[email protected]>
+#
+# Davinci EVM board (ARM925EJS) cpu
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# Davinci EVM has 1 bank of 256 MB DDR RAM
+# Physical Address:
+# 8000'0000 to 9000'0000
+#
+# Copyright (C) 2007 Sergey Kubushyn <[email protected]>
+#
+# Visioneering Corp. Sonata board (ARM926EJS) cpu
+#
+# Sonata board has 1 bank of 128 MB DDR RAM
+# Physical Address:
+# 8000'0000 to 8800'0000
+#
+# Razorstream, LLC. SCHMOOGIE board (ARM926EJS) cpu
+#
+# Schmoogie board has 1 bank of 128 MB DDR RAM
+# Physical Address:
+# 8000'0000 to 8800'0000
+#
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+#
+# we load ourself to 8108 '0000
+#
+#
+
+#Provide at least 16MB spacing between us and the Linux Kernel image
+TEXT_BASE = 0x81080000
board/davinci/dm357_evm/dm357_evm.c new file +69 -0

69 lines not on this page · raw message

include/configs/davinci_dm357_evm.h new file +146 -0

146 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#1 lore raw

PATCH v4 1/1 ARM DaVinci Adding DM357 Support

Quoted 7 lines
include/configs/davinci_dm357_evm.h new file +7 -0
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+#include <asm/sizes.h>
+
+/*
+ *

include/configs/davinci_dm357_evm.h line 35

Quoted 10 lines
include/configs/davinci_dm357_evm.h new file +10 -0
+ */
+#define DM357_EVM
+#define CONFIG_SYS_NAND_SMALLPAGE
+#define CONFIG_SYS_USE_NAND
+/*
+ * SoC Configuration
+ */
+#define CONFIG_ARM926EJS			/* arm926ejs CPU core */
+#define CONFIG_SYS_CLK_FREQ	270000000	/* Arm Clock frequency */
+#define CONFIG_SYS_TIMERBASE		0x01c21400	/* use timer 0 */

why not use a corresponfing macor?

Quoted 1 line

+#define CONFIG_SYS_HZ_CLOCK 27000000 /* timer frequency */

please use CONFIG_SYS_CLK_FREQ

include/configs/davinci_dm357_evm.h line 49

Quoted 13 lines
include/configs/davinci_dm357_evm.h new file +13 -0
+#define CONFIG_SYS_HZ			1000
+#define CONFIG_SOC_DM644X
+/*
+ * definitions for EEPROM on DM357 EVM
+ */
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		2
+#define CONFIG_SYS_I2C_EEPROM_ADDR		0x50
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	6
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	20
+/*
+ * Memory Info
+ */
+#define CONFIG_SYS_MALLOC_LEN		(0x10000 + 128 * 1024)

??
why not 192 * 1024?

include/configs/davinci_dm357_evm.h line 55

Quoted 6 lines
include/configs/davinci_dm357_evm.h new file +6 -0
+#define CONFIG_SYS_GBL_DATA_SIZE	128
+#define CONFIG_SYS_MEMTEST_START	0x80000000	/* memtest start */
+#define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */
+#define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */
+#define CONFIG_STACKSIZE	(256 * 1024)	/* regular stack */
+#define PHYS_SDRAM_1		0x80000000	/* DDR Start */

any macro availlable?

include/configs/davinci_dm357_evm.h line 65

Quoted 10 lines
include/configs/davinci_dm357_evm.h new file +10 -0
+#define PHYS_SDRAM_1_SIZE	0x10000000	/* DDR size 256MB */
+#define DDR_8BANKS				/* 8-bank DDR2 (256MB) */
+/*
+ * Serial Driver info
+ */
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE	-4
+#define CONFIG_SYS_NS16550_COM1	0x01c20000	/* Base address of UART0 */
+#define CONFIG_SYS_NS16550_CLK		27000000	/* Input clock */

please use CONFIG_SYS_CLK_FREQ

Quoted 13 lines
include/configs/davinci_dm357_evm.h new file +13 -0
+#define CONFIG_CONS_INDEX	1		/* use UART0 for console */
+#define CONFIG_BAUDRATE		115200		/* Default baud rate */
+#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
+/*
+ * I2C Configuration
+ */
+#define CONFIG_HARD_I2C
+#define CONFIG_DRIVER_DAVINCI_I2C
+#define CONFIG_SYS_I2C_SPEED		80000
+#define CONFIG_SYS_I2C_SLAVE		10
+/*
+ * Flash & Environment
+ */

<snip>

include/configs/davinci_dm357_evm.h line 93

Quoted 3 lines
include/configs/davinci_dm357_evm.h new file +3 -0
+#define CONFIG_SKIP_LOWLEVEL_INIT	/* U-Boot is loaded by a bootloader */
+#define CONFIG_SKIP_RELOCATE_UBOOT	/* to a proper address, init done */
+#define CONFIG_SYS_NAND_BASE		0x02000000

any macro availlable?

Quoted 14 lines
include/configs/davinci_dm357_evm.h new file +14 -0
+#define CONFIG_SYS_NAND_HW_ECC
+#define CONFIG_SYS_MAX_NAND_DEVICE	1
+#define CONFIG_ENV_OFFSET		0x0
+#endif
+/*
+ * U-Boot general configuration
+ */
+#undef	CONFIG_USE_IRQ			/* No IRQ/FIQ in U-Boot */
+#define CONFIG_MISC_INIT_R
+#undef CONFIG_BOOTDELAY
+#define CONFIG_BOOTFILE			"uImage"	/* Boot file name */
+#define CONFIG_SYS_PROMPT		"DM357 EVM > "	/* Command Prompt */
+#define CONFIG_SYS_CBSIZE		1024
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \

include/configs/davinci_dm357_evm.h line 117

Quoted 10 lines
include/configs/davinci_dm357_evm.h new file +10 -0
+						sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS		16
+#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_LOAD_ADDR		0x80700000
+#define CONFIG_VERSION_VARIABLE
+#define CONFIG_CMDLINE_EDITING
+/*
+ * Linux Information
+ */
+#define LINUX_BOOT_PARAM_ADDR	0x80000100

why?

Quoted 18 lines
include/configs/davinci_dm357_evm.h new file +18 -0
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+/*
+ * U-Boot commands
+ */
+#include <config_cmd_default.h>
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SAVES
+#define CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_FLASH

include/configs/davinci_dm357_evm.h line 145

Quoted 10 lines
include/configs/davinci_dm357_evm.h new file +10 -0
+#undef CONFIG_CMD_IMLS
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_JFFS2
+/*
+ * KGDB support (if any)
+ */
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_KGDB_BAUDRATE	115200	/* speed to run kgdb serial port */
+#define CONFIG_KGDB_SER_INDEX	1	/* which serial port to use */
+#endif

please remove the kgdb as it's not supported

Best Regards,
J.

#2 lore raw

PATCH v4 1/1 ARM DaVinci Adding DM357 Support

Jean-Christophe,
Please see inline

Quoted 17 lines

-----Original Message-----
From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagnioj at jcrosoft.com]
Sent: Saturday, May 09, 2009 10:08 AM
To: Paulraj, Sandeep
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH v4] ARM DaVinci Adding DM357 Support

Quoted 10 lines
include/configs/davinci_dm357_evm.h new file +10 -0
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+#include <asm/sizes.h>
+
+/*
+ *
+ */
+#define DM357_EVM
+#define CONFIG_SYS_NAND_SMALLPAGE
Quoted 8 lines

include/configs/davinci_dm357_evm.h line 35

Quoted 7 lines
include/configs/davinci_dm357_evm.h new file +7 -0
+#define CONFIG_SYS_USE_NAND
+/*
+ * SoC Configuration
+ */
+#define CONFIG_ARM926EJS			/* arm926ejs CPU core */
+#define CONFIG_SYS_CLK_FREQ	270000000	/* Arm Clock frequency */
+#define CONFIG_SYS_TIMERBASE		0x01c21400	/* use timer 0 */

why not use a corresponfing macor?

[Sandeep] will do in next patch

Quoted 3 lines
Quoted 1 line

+#define CONFIG_SYS_HZ_CLOCK 27000000 /* timer frequency

*/
please use CONFIG_SYS_CLK_FREQ

[Sandeep] no ARM frequency is 270 MHz, timer frequency is 27Mhz

Quoted 7 lines
Quoted 7 lines
include/configs/davinci_dm357_evm.h new file +7 -0
+#define CONFIG_SYS_HZ			1000
+#define CONFIG_SOC_DM644X
+/*
+ * definitions for EEPROM on DM357 EVM
+ */
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		2
+#define CONFIG_SYS_I2C_EEPROM_ADDR		0x50
Quoted 8 lines

include/configs/davinci_dm357_evm.h line 49

Quoted 6 lines
include/configs/davinci_dm357_evm.h new file +6 -0
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	6
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	20
+/*
+ * Memory Info
+ */
+#define CONFIG_SYS_MALLOC_LEN		(0x10000 + 128 * 1024)

??
why not 192 * 1024?

[Sandeep] will do

Quoted 8 lines

include/configs/davinci_dm357_evm.h

Quoted 4 lines
include/configs/davinci_dm357_evm.h new file +4 -0
+#define CONFIG_SYS_GBL_DATA_SIZE	128
+#define CONFIG_SYS_MEMTEST_START	0x80000000	/* memtest start */
+#define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */
+#define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM

*/

include/configs/davinci_dm357_evm.h line 55

Quoted 2 lines
include/configs/davinci_dm357_evm.h new file +2 -0
+#define CONFIG_STACKSIZE	(256 * 1024)	/* regular stack */
+#define PHYS_SDRAM_1		0x80000000	/* DDR Start */

any macro availlable?

[Sandeep] yes. Address in next patch

Quoted 10 lines

include/configs/davinci_dm357_evm.h

Quoted 9 lines
include/configs/davinci_dm357_evm.h new file +9 -0
+#define PHYS_SDRAM_1_SIZE	0x10000000	/* DDR size 256MB */
+#define DDR_8BANKS				/* 8-bank DDR2 (256MB) */
+/*
+ * Serial Driver info
+ */
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE	-4
+#define CONFIG_SYS_NS16550_COM1	0x01c20000	/* Base address of UART0

*/

Quoted 2 lines
Quoted 1 line

+#define CONFIG_SYS_NS16550_CLK 27000000 /* Input clock */

please use CONFIG_SYS_CLK_FREQ

[Sandeep] no it is 27 Mhz so use CONFIG_SYS_HZ_CLOCK. I will address it in next patch

Quoted 39 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+#define CONFIG_CONS_INDEX	1		/* use UART0 for console */
+#define CONFIG_BAUDRATE		115200		/* Default baud rate

*/

Quoted 1 line

+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600,

115200 }

Quoted 10 lines
include/configs/davinci_dm357_evm.h new file +10 -0
+/*
+ * I2C Configuration
+ */
+#define CONFIG_HARD_I2C
+#define CONFIG_DRIVER_DAVINCI_I2C
+#define CONFIG_SYS_I2C_SPEED		80000
+#define CONFIG_SYS_I2C_SLAVE		10
+/*
+ * Flash & Environment
+ */

<snip>

Quoted 1 line

+#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a

bootloader */

Quoted 1 line

+#define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init

done */

Quoted 1 line

+#define CONFIG_SYS_NAND_BASE 0x02000000

any macro availlable?

Quoted 17 lines
include/configs/davinci_dm357_evm.h new file +17 -0
+#define CONFIG_SYS_NAND_HW_ECC
+#define CONFIG_SYS_MAX_NAND_DEVICE	1
+#define CONFIG_ENV_OFFSET		0x0
+#endif
+/*
+ * U-Boot general configuration
+ */
+#undef	CONFIG_USE_IRQ			/* No IRQ/FIQ in U-Boot */
+#define CONFIG_MISC_INIT_R
+#undef CONFIG_BOOTDELAY
+#define CONFIG_BOOTFILE			"uImage"	/* Boot file name */
+#define CONFIG_SYS_PROMPT		"DM357 EVM > "	/* Command Prompt */
+#define CONFIG_SYS_CBSIZE		1024
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
+						sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS		16
+#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
Quoted 8 lines

include/configs/davinci_dm357_evm.h line 117

Quoted 7 lines
include/configs/davinci_dm357_evm.h new file +7 -0
+#define CONFIG_SYS_LOAD_ADDR		0x80700000
+#define CONFIG_VERSION_VARIABLE
+#define CONFIG_CMDLINE_EDITING
+/*
+ * Linux Information
+ */
+#define LINUX_BOOT_PARAM_ADDR	0x80000100

why?

[Sandeep] I will get rid of this

Quoted 28 lines
Quoted 17 lines
include/configs/davinci_dm357_evm.h new file +16 -0
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+/*
+ * U-Boot commands
+ */
+#include <config_cmd_default.h>
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SAVES
+#define CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_FPGA

include/configs/davinci_dm357_evm.h

Quoted 10 lines
include/configs/davinci_dm357_evm.h new file +10 -0
+#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_JFFS2
+/*
+ * KGDB support (if any)
+ */
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_KGDB_BAUDRATE	115200	/* speed to run kgdb

serial port */

Quoted 3 lines

include/configs/davinci_dm357_evm.h line 145

Quoted 2 lines
include/configs/davinci_dm357_evm.h new file +2 -0
+#define CONFIG_KGDB_SER_INDEX	1	/* which serial port to use */
+#endif

please remove the kgdb as it's not supported

[Sandeep] OK

Quoted 3 lines

Best Regards,
J.

Thanks,
Sandeep