Skip to contentSkip to conversation

ARM DaVinci DM365 Support

PATCH New s-paulraj at ti.com 3 participants 3 messages May 18, 2009 – May 26, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM DaVinci DM365 Support

This patch adds support for new TI DaVinci SOC DM365. Further details and user guides can be found at
http://focus.ti.com/docs/prod/folders/print/tms320dm365.html

The DM365 EVM is from Spectrum Digital and details are at
http://support.spectrumdigital.com/boards/evmdm365/revc/

This patch does NOT have
1) EMAC Support as the EMAC module is different from DM644x and i will have to submit updated patch to u-boot-net GIT
2) NAND is disabled as it will required David Brownell's NAND updates.

The resulting binary was tested on a DM365 EVM.

---
 Makefile                           |    3 +
 board/davinci/dm365evm/Makefile    |   52 +++++++++++
 board/davinci/dm365evm/config.mk   |    2 +
 board/davinci/dm365evm/dm365evm.c  |   67 ++++++++++++++
 cpu/arm926ejs/davinci/Makefile     |    1 +
 cpu/arm926ejs/davinci/dm365.c      |   38 ++++++++
 include/configs/davinci_dm365evm.h |  175 ++++++++++++++++++++++++++++++++++++
 7 files changed, 338 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/dm365evm/Makefile
 create mode 100644 board/davinci/dm365evm/config.mk
 create mode 100644 board/davinci/dm365evm/dm365evm.c
 create mode 100644 cpu/arm926ejs/davinci/dm365.c
 create mode 100644 include/configs/davinci_dm365evm.h
Makefile +3 -0
index 81a5cd0..69324cd 100644
@@ -2804,6 +2804,9 @@ davinci_sonata_config :	unconfig
 davinci_dm355evm_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs dm355evm davinci davinci
 
+davinci_dm365evm_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs dm365evm davinci davinci
+
 lpd7a400_config \
 lpd7a404_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
board/davinci/dm365evm/Makefile new file +52 -0

52 lines not on this page · raw message

board/davinci/dm365evm/config.mk new file +2 -0
new file mode 100644
index 0000000..ca801c2
@@ -0,0 +1,2 @@
+#Provide at least 16MB spacing between us and the Linux Kernel image
+TEXT_BASE = 0x81080000
board/davinci/dm365evm/dm365evm.c new file +67 -0

67 lines not on this page · raw message

cpu/arm926ejs/davinci/Makefile +1 -0
index 6eaa89c..c20e0e2 100644
@@ -29,6 +29,7 @@ LIB	= $(obj)lib$(SOC).a
 
 COBJS-y				+= cpu.o timer.o psc.o
 COBJS-$(CONFIG_SOC_DM355)	+= dm355.o
+COBJS-$(CONFIG_SOC_DM365)	+= dm365.o
 COBJS-$(CONFIG_SOC_DM644X)	+= dm644x.o
 COBJS-$(CONFIG_DRIVER_TI_EMAC)	+= ether.o lxt972.o dp83848.o
 
cpu/arm926ejs/davinci/dm365.c new file +38 -0
new file mode 100644
index 0000000..4e64c29
@@ -0,0 +1,38 @@
+/*
+ * SOC-specific code for TMS320DM365 and similar chips
+ *
+ * Copyright (C) 2009 Sandeep Paulraj
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <common.h>
+#include <asm/arch/hardware.h>
+
+
+void davinci_enable_uart0(void)
+{
+	lpsc_on(DAVINCI_LPSC_UART0);
+}
+
+#ifdef CONFIG_DRIVER_DAVINCI_I2C
+void davinci_enable_i2c(void)
+{
+	lpsc_on(DAVINCI_LPSC_I2C);
+}
+#endif
include/configs/davinci_dm365evm.h new file +175 -0

175 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 ARM DaVinci DM365 Support

Quoted 9 lines
board/davinci/dm365evm/dm365evm.c new file +9 -0
+
+#ifdef CONFIG_NAND_DAVINCI
+
+static void nand_dm365evm_select_chip(struct mtd_info *mtd, int chip)
+{
+	struct nand_chip	*this = mtd->priv;
+	u32			wbase = (u32) this->IO_ADDR_W;
+	u32			rbase = (u32) this->IO_ADDR_R;
+

board/davinci/dm365evm/dm365evm.c line 58

Quoted 10 lines
board/davinci/dm365evm/dm365evm.c new file +10 -0
+	if (chip == 1) {
+		__set_bit(14, &wbase);
+		__set_bit(14, &rbase);
+	} else {
+		__clear_bit(14, &wbase);
+		__clear_bit(14, &rbase);
+	}
+	this->IO_ADDR_W = (void *)wbase;
+	this->IO_ADDR_R = (void *)rbase;
+}

the 355 use the same it
did all davinci will use the same?

cpu/arm926ejs/davinci/dm365.c

Quoted 26 lines
board/davinci/dm365evm/dm365evm.c new file +9 -0
+
+int board_nand_init(struct nand_chip *nand)
+{
+	davinci_nand_init(nand);
+	nand->select_chip = nand_dm365evm_select_chip;
+	return 0;
+}
+
+#endif
cpu/arm926ejs/davinci/Makefile +1 -0
index 6eaa89c..c20e0e2 100644
@@ -29,6 +29,7 @@ LIB	= $(obj)lib$(SOC).a
 
 COBJS-y				+= cpu.o timer.o psc.o
 COBJS-$(CONFIG_SOC_DM355)	+= dm355.o
+COBJS-$(CONFIG_SOC_DM365)	+= dm365.o
 COBJS-$(CONFIG_SOC_DM644X)	+= dm644x.o
 COBJS-$(CONFIG_DRIVER_TI_EMAC)	+= ether.o lxt972.o dp83848.o
 
cpu/arm926ejs/davinci/dm365.c new file +0 -0
new file mode 100644
index 0000000..4e64c29

please do this in an other patch

Quoted 29 lines
cpu/arm926ejs/davinci/dm365.c new file +28 -0
@@ -0,0 +1,38 @@
+/*
+ * SOC-specific code for TMS320DM365 and similar chips
+ *
+ * Copyright (C) 2009 Sandeep Paulraj
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <common.h>
+#include <asm/arch/hardware.h>
+
+
+void davinci_enable_uart0(void)

cpu/arm926ejs/davinci/dm365.c line 38

Quoted 10 lines
cpu/arm926ejs/davinci/dm365.c new file +10 -0
+{
+	lpsc_on(DAVINCI_LPSC_UART0);
+}
+
+#ifdef CONFIG_DRIVER_DAVINCI_I2C
+void davinci_enable_i2c(void)
+{
+	lpsc_on(DAVINCI_LPSC_I2C);
+}
+#endif

Best Regards,
J.

#2 lore raw

PATCH 1/1 ARM DaVinci DM365 Support

Jean-Christophe,
please see inline

Quoted 22 lines

-----Original Message-----
From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagnioj at jcrosoft.com]
Sent: Friday, May 22, 2009 8:12 PM
To: Paulraj, Sandeep
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH][u-boot arm/next] ARM DaVinci DM365 Support

board/davinci/dm365evm/dm365evm.c

Quoted 4 lines
board/davinci/dm365evm/dm365evm.c new file +4 -0
+
+#ifdef CONFIG_NAND_DAVINCI
+
+static void nand_dm365evm_select_chip(struct mtd_info 

*mtd, int chip)

Quoted 9 lines
board/davinci/dm365evm/dm365evm.c new file +9 -0
+{
+	struct nand_chip	*this = mtd->priv;
+	u32			wbase = (u32) this->IO_ADDR_W;
+	u32			rbase = (u32) this->IO_ADDR_R;
+
+	if (chip == 1) {
+		__set_bit(14, &wbase);
+		__set_bit(14, &rbase);
+	} else {
Quoted 8 lines

board/davinci/dm365evm/dm365evm.c line 58

Quoted 6 lines
board/davinci/dm365evm/dm365evm.c new file +6 -0
+		__clear_bit(14, &wbase);
+		__clear_bit(14, &rbase);
+	}
+	this->IO_ADDR_W = (void *)wbase;
+	this->IO_ADDR_R = (void *)rbase;
+}

the 355 use the same it
did all davinci will use the same?

No All DaVinci's will not use the same.
Leopard which based on DM355 will not use this

Quoted 22 lines

Review

Quoted 10 lines
board/davinci/dm365evm/dm365evm.c new file +9 -0
+
+int board_nand_init(struct nand_chip *nand)
+{
+	davinci_nand_init(nand);
+	nand->select_chip = nand_dm365evm_select_chip;
+	return 0;
+}
+
+#endif
(quoted diff) +0 -0

b/cpu/arm926ejs/davinci/Makefile

Quoted 11 lines

index 6eaa89c..c20e0e2 100644

cpu/arm926ejs/davinci/Makefile +1 -0
@@ -29,6 +29,7 @@ LIB	= $(obj)lib$(SOC).a
 
 COBJS-y				+= cpu.o timer.o psc.o
 COBJS-$(CONFIG_SOC_DM355)	+= dm355.o
+COBJS-$(CONFIG_SOC_DM365)	+= dm365.o
 COBJS-$(CONFIG_SOC_DM644X)	+= dm644x.o
 COBJS-$(CONFIG_DRIVER_TI_EMAC)	+= ether.o lxt972.o dp83848.o
 
Quoted 7 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/cpu/arm926ejs/davinci/dm365.c

cpu/arm926ejs/davinci/dm365.c

Quoted 4 lines

new file mode 100644
index 0000000..4e64c29

cpu/arm926ejs/davinci/dm365.c new file +0 -0

please do this in an other patch

Will do.
Again this depends on whether my earlier patch is added to the tree I will need to include my new "devices.h" header file for this

Quoted 37 lines

cpu/arm926ejs/davinci/dm365.c line 9

Quoted 10 lines
cpu/arm926ejs/davinci/dm365.c new file +9 -0
@@ -0,0 +1,38 @@
+/*
+ * SOC-specific code for TMS320DM365 and similar chips
+ *
+ * Copyright (C) 2009 Sandeep Paulraj
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it 

and/or modify

cpu/arm926ejs/davinci/dm365.c line 10

Quoted 1 line
cpu/arm926ejs/davinci/dm365.c new file +1 -0
+ * it under the terms of the GNU General Public License as 

published by

cpu/arm926ejs/davinci/dm365.c line 11

Quoted 1 line
cpu/arm926ejs/davinci/dm365.c new file +1 -0
+ * the Free Software Foundation; either version 2 of the 

License, or

cpu/arm926ejs/davinci/dm365.c line 19

Quoted 8 lines
cpu/arm926ejs/davinci/dm365.c new file +8 -0
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General 

Public License

Quoted 13 lines
cpu/arm926ejs/davinci/dm365.c new file +13 -0
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <common.h>
+#include <asm/arch/hardware.h>
+
+
+void davinci_enable_uart0(void)
+{
+	lpsc_on(DAVINCI_LPSC_UART0);
+}
+
Quoted 10 lines

cpu/arm926ejs/davinci/dm365.c line 38

Quoted 6 lines
cpu/arm926ejs/davinci/dm365.c new file +6 -0
+#ifdef CONFIG_DRIVER_DAVINCI_I2C
+void davinci_enable_i2c(void)
+{
+	lpsc_on(DAVINCI_LPSC_I2C);
+}
+#endif

Best Regards,
J.

Thanks,
Sandeep