Skip to contentSkip to conversation

Davinci: add support for the ea20 board

PATCH New Stefano Babic 4 participants 14 messages Nov 13, 2010 – Nov 16, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Davinci: add support for the ea20 board

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

---
 board/davinci/ea20/Makefile |   53 ++++++++++
 board/davinci/ea20/ea20.c   |  237 +++++++++++++++++++++++++++++++++++++++++++
 boards.cfg                  |    1 +
 include/configs/ea20.h      |  215 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 506 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/ea20/Makefile
 create mode 100644 board/davinci/ea20/ea20.c
 create mode 100644 include/configs/ea20.h
board/davinci/ea20/Makefile new file +53 -0
new file mode 100644
index 0000000..ddd2564
@@ -0,0 +1,53 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# Copyright (C) 2007 Sergey Kubushyn <[email protected]>
+#
+# 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., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).a
+
+COBJS-y	+= ea20.o
+
+COBJS   := $(COBJS-y)
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak *~ .depend
+
+#########################################################################
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/davinci/ea20/ea20.c new file +237 -0

237 lines not on this page · raw message

boards.cfg +1 -0
index 6c2a667..8dcc01c 100644
@@ -372,6 +372,7 @@ davinci_sffsdr	arm	arm926ejs	sffsdr		davinci		davinci
 davinci_sonata	arm	arm926ejs	sonata		davinci		davinci
 da830evm	arm	arm926ejs	da8xxevm	davinci		davinci
 da850evm	arm	arm926ejs	da8xxevm	davinci		davinci
+ea20		arm	arm926ejs	ea20		davinci		davinci
 guruplug	arm	arm926ejs	-		Marvell		kirkwood
 mv88f6281gtw_ge	arm	arm926ejs	-		Marvell		kirkwood
 openrd_base	arm	arm926ejs	-		Marvell		kirkwood
include/configs/ea20.h new file +215 -0

215 lines not on this page · raw message

Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 Davinci: add support for the ea20 board

Dear Stefano Babic,

Quoted 5 lines · In message <[email protected]> you wrote:

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

Quoted 9 lines
---
 board/davinci/ea20/Makefile |   53 ++++++++++
 board/davinci/ea20/ea20.c   |  237 +++++++++++++++++++++++++++++++++++++++++++
 boards.cfg                  |    1 +
 include/configs/ea20.h      |  215 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 506 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/ea20/Makefile
 create mode 100644 board/davinci/ea20/ea20.c
 create mode 100644 include/configs/ea20.h

Entry to MAINTAINERS missing.

Quoted 5 lines
include/configs/ea20.h new file +0 -0
new file mode 100644
index 0000000..595e1dc

...

Quoted 1 line

+#define DEF_BOOTM ""

What's that for? Seems unused...

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Where shall I begin, please your Majesty?" he asked. "Begin  at  the
beginning,"  the  King said, gravely, "and go on till you come to the
end: then stop."    - Alice's Adventures in Wonderland, Lewis Carroll
#2 lore raw

PATCH 1/1 Davinci: add support for the ea20 board

Quoted 2 lines · Wolfgang Denk

Entry to MAINTAINERS missing.

I forget always to update the MAINTAINERS file, thanks...

Quoted 1 line

What's that for? Seems unused...

You are right - dropped !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#3 lore raw

PATCH v2 1/1 Davinci: add support for the ea20 board

In reply to Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

---
Changes since V1:
- Add entry to MAINTAINERS file (Wolfgang Denk)
- Removed unused DEF_BOOTM in config file (Wolfgang Denk)

 MAINTAINERS                 |    1 +
 board/davinci/ea20/Makefile |   53 ++++++++++
 board/davinci/ea20/ea20.c   |  237 +++++++++++++++++++++++++++++++++++++++++++
 boards.cfg                  |    1 +
 include/configs/ea20.h      |  214 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 506 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/ea20/Makefile
 create mode 100644 board/davinci/ea20/ea20.c
 create mode 100644 include/configs/ea20.h
MAINTAINERS +1 -0
index 9258cb1..386a7b9 100644
@@ -551,6 +551,7 @@ Rowel Atienza <[email protected]>
 
 Stefano Babic <[email protected]>
 
+	ea20		davinci
 	polaris		xscale
 	trizepsiv	xscale
 	mx51evk		i.MX51
board/davinci/ea20/Makefile new file +53 -0

53 lines not on this page · raw message

board/davinci/ea20/ea20.c new file +237 -0

237 lines not on this page · raw message

boards.cfg +1 -0
index 6c2a667..8dcc01c 100644
@@ -372,6 +372,7 @@ davinci_sffsdr	arm	arm926ejs	sffsdr		davinci		davinci
 davinci_sonata	arm	arm926ejs	sonata		davinci		davinci
 da830evm	arm	arm926ejs	da8xxevm	davinci		davinci
 da850evm	arm	arm926ejs	da8xxevm	davinci		davinci
+ea20		arm	arm926ejs	ea20		davinci		davinci
 guruplug	arm	arm926ejs	-		Marvell		kirkwood
 mv88f6281gtw_ge	arm	arm926ejs	-		Marvell		kirkwood
 openrd_base	arm	arm926ejs	-		Marvell		kirkwood
include/configs/ea20.h new file +214 -0

214 lines not on this page · raw message

Signature · 1 line
1.7.1
#4 lore raw

PATCH v2 1/1 Davinci: add support for the ea20 board

hi Stefano,

Quoted 28 lines · Stefano Babic
board/davinci/ea20/ea20.c new file +22 -0
new file mode 100644
index 0000000..c75ea63
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Based on da830evm.c. Original Copyrights follow:
+ *
+ * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. <[email protected]>
+ * Copyright (C) 2007 Sergey Kubushyn <[email protected]>
+ *
+ * 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.
+ */

board/davinci/ea20/ea20.c line 32

Quoted 10 lines
board/davinci/ea20/ea20.c new file +10 -0
+
+#include <common.h>
+#include <i2c.h>
+#include <net.h>
+#include <netdev.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/emif_defs.h>
+#include <asm/arch/emac_defs.h>
+#include <asm/io.h>
+#include "../common/misc.h"

I had sent a patch some time back to move the misc.h under arm/include/asm/arch-davinci/davinci_misc.h. Should this patch be based off of that.

[PATCH 1/3 V5] Move and rename common headers from under board/davinci.

-sughosh

#5 lore raw

PATCH v2 1/1 Davinci: add support for the ea20 board

Quoted 2 lines · Sughosh Ganu

hi Stefano,

Hi,

Quoted 6 lines

I had sent a patch some time back to move the misc.h under arm/include/asm/arch-davinci/davinci_misc.h. Should this patch be based off of that.

[PATCH 1/3 V5] Move and rename common headers from under board/davinci.

Thanks, I have not seen your patch. I rebase mine on top of yours.

Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#6 lore raw

PATCH v3 1/1 Davinci: add support for the ea20 board

In reply to Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

---
Changes since V2:
- Rebased on the following patch(Sughosh Ganu):

Sughosh Ganu: Move and rename common headers from under board/davinci

This patch requires also the patch for RMII:

Ben Gardiner: da850evm: Add RMII support for EMAC

 MAINTAINERS                 |    1 +
 board/davinci/ea20/Makefile |   53 ++++++++++
 board/davinci/ea20/ea20.c   |  237 +++++++++++++++++++++++++++++++++++++++++++
 boards.cfg                  |    1 +
 include/configs/ea20.h      |  214 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 506 insertions(+), 0 deletions(-)
 create mode 100644 board/davinci/ea20/Makefile
 create mode 100644 board/davinci/ea20/ea20.c
 create mode 100644 include/configs/ea20.h
MAINTAINERS +1 -0
index 9258cb1..386a7b9 100644
@@ -551,6 +551,7 @@ Rowel Atienza <[email protected]>
 
 Stefano Babic <[email protected]>
 
+	ea20		davinci
 	polaris		xscale
 	trizepsiv	xscale
 	mx51evk		i.MX51
board/davinci/ea20/Makefile new file +53 -0

53 lines not on this page · raw message

board/davinci/ea20/ea20.c new file +237 -0

237 lines not on this page · raw message

boards.cfg +1 -0
index 6c2a667..8dcc01c 100644
@@ -372,6 +372,7 @@ davinci_sffsdr	arm	arm926ejs	sffsdr		davinci		davinci
 davinci_sonata	arm	arm926ejs	sonata		davinci		davinci
 da830evm	arm	arm926ejs	da8xxevm	davinci		davinci
 da850evm	arm	arm926ejs	da8xxevm	davinci		davinci
+ea20		arm	arm926ejs	ea20		davinci		davinci
 guruplug	arm	arm926ejs	-		Marvell		kirkwood
 mv88f6281gtw_ge	arm	arm926ejs	-		Marvell		kirkwood
 openrd_base	arm	arm926ejs	-		Marvell		kirkwood
include/configs/ea20.h new file +214 -0

214 lines not on this page · raw message

Signature · 1 line
1.7.1
#7 lore raw

PATCH v3 1/1 Davinci: add support for the ea20 board

Quoted 16 lines · Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

---
Changes since V2:
?- Rebased on the following patch(Sughosh Ganu):
[...]

board/davinci/ea20/ea20.c new file +0 -0
new file mode 100644
index 0000000..e3e07a3

board/davinci/ea20/ea20.c line 4

Quoted 4 lines
board/davinci/ea20/ea20.c new file +4 -0
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Based on da830evm.c. Original Copyrights follow:

It seems to me that this file is based off of da850evm.c; the da850ev.c file contains this comment which is where it likely came from. If it is based on da850evm.c then I think the file's comment should reflect this.

board/davinci/ea20/ea20.c

Quoted 13 lines

[...]

board/davinci/ea20/ea20.c new file +12 -0
+
+static void da850_emac_mii_mode_sel(int mode_sel)
+{
+ ? ? ? int val;
+
+ ? ? ? val = readl(&davinci_syscfg_regs->cfgchip3);
+ ? ? ? if (mode_sel == 0)
+ ? ? ? ? ? ? ? val &= ~(1 << 8);
+ ? ? ? else
+ ? ? ? ? ? ? ? val |= (1 << 8);
+ ? ? ? writel(val, &davinci_syscfg_regs->cfgchip3);
+}

This is a function common to any da850 board using RMII, could it be extracted to a shared .c file?

Quoted 6 lines

[...]

board/davinci/ea20/ea20.c new file +5 -0
+#ifdef CONFIG_NAND_DAVINCI
+ ? ? ? /*
+ ? ? ? ?* NAND CS setup - cycle counts based on da850evm NAND timings in the
+ ? ? ? ?* Linux kernel @ 25MHz EMIFA
+ ? ? ? ?*/

board/davinci/ea20/ea20.c

Quoted 10 lines
board/davinci/ea20/ea20.c new file +10 -0
+ ? ? ? writel((DAVINCI_ABCR_WSETUP(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_WSTROBE(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_WHOLD(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_RSETUP(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_RSTROBE(1) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_RHOLD(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_TA(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_ASIZE_8BIT),
+ ? ? ? ? ? ? ?&davinci_emif_regs->ab2cr); /* CS3 */
+#endif

This looks like it was copied from da850evm.c; note that these timings are based on the integer multiples of EMA_CLK periods that meet the timing specifications of the NAND chip found on the UI board. A different part could have different timings...

Also, from your description of the ea20: "It supports SPI Flash, Ethernet with RMII." -- there is no NAND support.

Quoted 8 lines

[...]

board/davinci/ea20/ea20.c new file +7 -0
+int board_eth_init(bd_t *bis)
+{
+ ? ? ? if (!davinci_emac_initialize()) {
+ ? ? ? ? ? ? ? printf("Error: Ethernet init failed!\n");
+ ? ? ? ? ? ? ? return -1;
+ ? ? ? }
+

board/davinci/ea20/ea20.c

Quoted 10 lines
board/davinci/ea20/ea20.c new file +10 -0
+ ? ? ? /*
+ ? ? ? ?* This board has a RMII PHY. However, the MDC line on the SOM
+ ? ? ? ?* must not be disabled (there is no MII PHY on the
+ ? ? ? ?* baseboard) via the GPIO2[6], because this pin
+ ? ? ? ?* disables at the same time the SPI flash.
+ ? ? ? ?*/
+
+ ? ? ? return 0;
+}
+#endif /* CONFIG_DRIVER_TI_EMAC */

Perhaps it would be prudent to _enable_ the MDC line via the GPIO2[6] pin instead of a no-op.

--
Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca

#8 lore raw

PATCH v3 1/1 Davinci: add support for the ea20 board

Quoted 9 lines · Ben Gardiner

board/davinci/ea20/ea20.c line 4

Quoted 7 lines
board/davinci/ea20/ea20.c new file +4 -0
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Based on da830evm.c. Original Copyrights follow:

It seems to me that this file is based off of da850evm.c;

Correct.

Quoted 4 lines

the
da850ev.c file contains this comment which is where it likely came from. If it is based on da850evm.c then I think the file's comment should reflect this.

This is part of the original copyright in the da850evm.c, and this is the reason why I have not changed it. Probably to be more correct I should add at the beginning another comment, inidicating where the file comes from.

Quoted 17 lines
Quoted 4 lines

[...]

board/davinci/ea20/ea20.c new file +2 -0
+
+static void da850_emac_mii_mode_sel(int mode_sel)

board/davinci/ea20/ea20.c line 150

Quoted 10 lines
board/davinci/ea20/ea20.c new file +10 -0
+{
+       int val;
+
+       val = readl(&davinci_syscfg_regs->cfgchip3);
+       if (mode_sel == 0)
+               val &= ~(1 << 8);
+       else
+               val |= (1 << 8);
+       writel(val, &davinci_syscfg_regs->cfgchip3);
+}

This is a function common to any da850 board using RMII, could it be extracted to a shared .c file?

Agree, the function is a good candidate to be moved into misc.c :-).

Quoted 14 lines
Quoted 14 lines

[...]

board/davinci/ea20/ea20.c new file +12 -0
+#ifdef CONFIG_NAND_DAVINCI
+       /*
+        * NAND CS setup - cycle counts based on da850evm NAND timings in the
+        * Linux kernel @ 25MHz EMIFA
+        */
+       writel((DAVINCI_ABCR_WSETUP(0) |
+               DAVINCI_ABCR_WSTROBE(0) |
+               DAVINCI_ABCR_WHOLD(0) |
+               DAVINCI_ABCR_RSETUP(0) |
+               DAVINCI_ABCR_RSTROBE(1) |
+               DAVINCI_ABCR_RHOLD(0) |
+               DAVINCI_ABCR_TA(0) |
Quoted 8 lines

board/davinci/ea20/ea20.c line 173

Quoted 3 lines
board/davinci/ea20/ea20.c new file +3 -0
+               DAVINCI_ABCR_ASIZE_8BIT),
+              &davinci_emif_regs->ab2cr); /* CS3 */
+#endif

This looks like it was copied from da850evm.c; note that these timings are based on the integer multiples of EMA_CLK periods that meet the timing specifications of the NAND chip found on the UI board. A different part could have different timings...

The ea20 board will support NAND, but not at the moment. There will be a future release with storage on board, I will drop these NAND definitions because they do not reflect the actual hardware.

Quoted 3 lines

Also, from your description of the ea20: "It supports SPI Flash, Ethernet with RMII." -- there is no NAND support.

No NAND support - defines are useless now ;-)

Quoted 2 lines

Perhaps it would be prudent to _enable_ the MDC line via the GPIO2[6] pin instead of a no-op.

It should be not necessary. U-Boot is stored on the SPI flash, and if the SPI is not enabled at reset by the HW, the board cannot boot. It seems to me it is already ensured that the buffer output is enabled and the code does not need to set it.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#9 lore raw

PATCH v4 1/1 Davinci: add support for the ea20 board

In reply to Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

---
Changes since V2:
- Make clear that the code is taken from da850evm.c and not da830evm.c (Ben Gardiner)
- factorize function to enable RMII (Ben Gardiner)

 MAINTAINERS                                      |    1 +
 arch/arm/include/asm/arch-davinci/davinci_misc.h |    2 +-
 board/davinci/common/misc.c                      |   15 ++
 board/davinci/ea20/Makefile                      |   53 +++++
 board/davinci/ea20/ea20.c                        |  230 ++++++++++++++++++++++
 boards.cfg                                       |    1 +
 include/configs/da850evm.h                       |    2 +-
 include/configs/ea20.h                           |  192 ++++++++++++++++++
 8 files changed, 494 insertions(+), 2 deletions(-)
 create mode 100644 board/davinci/ea20/Makefile
 create mode 100644 board/davinci/ea20/ea20.c
 create mode 100644 include/configs/ea20.h
MAINTAINERS +1 -0
index 9258cb1..386a7b9 100644
@@ -551,6 +551,7 @@ Rowel Atienza <[email protected]>
 
 Stefano Babic <[email protected]>
 
+	ea20		davinci
 	polaris		xscale
 	trizepsiv	xscale
 	mx51evk		i.MX51
arch/arm/include/asm/arch-davinci/davinci_misc.h +1 -1
index a6ac3b9..80b366c 100644
@@ -50,5 +50,5 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr);
 int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins);
 int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
 				    int n_items);
-
+void davinci_emac_mii_mode_sel(int mode_sel);
 #endif /* __MISC_H */
board/davinci/common/misc.c +15 -0
index a30047b..d6698c0 100644
@@ -170,3 +170,18 @@ int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
 
 	return 0;
 }
+
+/*
+ * Set the mii mode as MII or RMII
+ */
+void davinci_emac_mii_mode_sel(int mode_sel)
+{
+	int val;
+
+	val = readl(&davinci_syscfg_regs->cfgchip3);
+	if (mode_sel == 0)
+		val &= ~(1 << 8);
+	else
+		val |= (1 << 8);
+	writel(val, &davinci_syscfg_regs->cfgchip3);
+}
board/davinci/ea20/Makefile new file +53 -0

53 lines not on this page · raw message

board/davinci/ea20/ea20.c new file +230 -0

230 lines not on this page · raw message

boards.cfg +1 -0
index 08e531e..b4fe8f5 100644
@@ -372,6 +372,7 @@ davinci_sffsdr	arm	arm926ejs	sffsdr		davinci		davinci
 davinci_sonata	arm	arm926ejs	sonata		davinci		davinci
 da830evm	arm	arm926ejs	da8xxevm	davinci		davinci
 da850evm	arm	arm926ejs	da8xxevm	davinci		davinci
+ea20		arm	arm926ejs	ea20		davinci		davinci
 guruplug	arm	arm926ejs	-		Marvell		kirkwood
 mv88f6281gtw_ge	arm	arm926ejs	-		Marvell		kirkwood
 openrd_base	arm	arm926ejs	-		Marvell		kirkwood
include/configs/da850evm.h +1 -1
index e4ae6f3..00d946e 100644
@@ -133,7 +133,7 @@
 #undef CONFIG_ENV_IS_IN_FLASH
 #undef CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_IS_IN_SPI_FLASH
-#define CONFIG_ENV_SIZE			(64 << 10)
+#define CONFIG_ENV_SIZE			(8 << 10)
 #define CONFIG_ENV_OFFSET		(256 << 10)
 #define CONFIG_ENV_SECT_SIZE		(64 << 10)
 #define CONFIG_SYS_NO_FLASH
include/configs/ea20.h new file +192 -0

192 lines not on this page · raw message

Signature · 1 line
1.7.1
#10 lore raw

PATCH v4 1/1 Davinci: add support for the ea20 board

Quoted 10 lines · Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

---
Changes since V2:
?- Make clear that the code is taken from da850evm.c ? and not da830evm.c (Ben Gardiner)
?- factorize function to enable RMII (Ben Gardiner)

previous versions were based on Sugosh's and my patches. Is that still true?

Quoted 31 lines
?MAINTAINERS ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?arch/arm/include/asm/arch-davinci/davinci_misc.h | ? ?2 +-
?board/davinci/common/misc.c ? ? ? ? ? ? ? ? ? ? ?| ? 15 ++
?board/davinci/ea20/Makefile ? ? ? ? ? ? ? ? ? ? ?| ? 53 +++++
?board/davinci/ea20/ea20.c ? ? ? ? ? ? ? ? ? ? ? ?| ?230 ++++++++++++++++++++++
?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 +
?include/configs/da850evm.h ? ? ? ? ? ? ? ? ? ? ? | ? ?2 +-
?include/configs/ea20.h ? ? ? ? ? ? ? ? ? ? ? ? ? | ?192 ++++++++++++++++++

?8 files changed, 494 insertions(+), 2 deletions(-) ?create mode 100644 board/davinci/ea20/Makefile ?create mode 100644 board/davinci/ea20/ea20.c ?create mode 100644 include/configs/ea20.h

MAINTAINERS +0 -0
index 9258cb1..386a7b9 100644
@@ -551,6 +551,7 @@ Rowel Atienza <[email protected]>
 

?Stefano Babic <[email protected]>

+ ? ? ? ea20 ? ? ? ? ? ?davinci
? ? ? ?polaris ? ? ? ? xscale
? ? ? ?trizepsiv ? ? ? xscale
? ? ? ?mx51evk ? ? ? ? i.MX51

arch/arm/include/asm/arch-davinci/davinci_misc.h +0 -0
index a6ac3b9..80b366c 100644

arch/arm/include/asm/arch-davinci/davinci_misc.h void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr); · line 53

Quoted 5 lines
arch/arm/include/asm/arch-davinci/davinci_misc.h +1 -1
@@ -50,5 +50,5 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr);
 ?int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins);
 ?int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int n_items);
-
+void davinci_emac_mii_mode_sel(int mode_sel);

I'm sorry I didn't mention this before -- I was just reviewing my pending RMII patch and noticed the following:

If this patch is based on the da850evm RMII support as previous version indicated then could this function prototype and the implementation below be wrapped in #if defined(CONFIG_DRIVER_TI_EMAC) and the corresponding declaration and implementations added to board/davinci/da8xxevm/common.{h,c} in the RMII patch be removed to minimize duplicate code?

Quoted 14 lines

?#endif /* __MISC_H */

board/davinci/common/misc.c +5 -0
index a30047b..d6698c0 100644
@@ -170,3 +170,18 @@ int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
 
 ? ? ? ?return 0;
 ?}
+
+/*
+ * Set the mii mode as MII or RMII
+ */
+void davinci_emac_mii_mode_sel(int mode_sel)

board/davinci/common/misc.c int davinci_configure_pin_mux_items(const struct pinmux_resource *item, · line 187

Quoted 10 lines
board/davinci/common/misc.c +10 -0
+{
+ ? ? ? int val;
+
+ ? ? ? val = readl(&davinci_syscfg_regs->cfgchip3);
+ ? ? ? if (mode_sel == 0)
+ ? ? ? ? ? ? ? val &= ~(1 << 8);
+ ? ? ? else
+ ? ? ? ? ? ? ? val |= (1 << 8);
+ ? ? ? writel(val, &davinci_syscfg_regs->cfgchip3);
+}

(this one)

Quoted 12 lines

[...]

board/davinci/ea20/ea20.c new file +5 -0
new file mode 100644
index 0000000..c1e1be2
[...]
+#ifdef CONFIG_NAND_DAVINCI
+ ? ? ? /*
+ ? ? ? ?* NAND CS setup - cycle counts based on da850evm NAND timings in the
+ ? ? ? ?* Linux kernel @ 25MHz EMIFA
+ ? ? ? ?*/

board/davinci/ea20/ea20.c

Quoted 10 lines
board/davinci/ea20/ea20.c new file +10 -0
+ ? ? ? writel((DAVINCI_ABCR_WSETUP(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_WSTROBE(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_WHOLD(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_RSETUP(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_RSTROBE(1) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_RHOLD(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_TA(0) |
+ ? ? ? ? ? ? ? DAVINCI_ABCR_ASIZE_8BIT),
+ ? ? ? ? ? ? ?&davinci_emif_regs->ab2cr); /* CS3 */
+#endif

You said you were going to remove this NAND stuff. It sounds like the ea20 will support NAND, so I've no qualms about keeping it around; just wondering if you forgot to remove it or forgot to mention that you weren't going to remove it?

include/configs/da850evm.h

Quoted 4 lines
include/configs/da850evm.h +0 -0
index e4ae6f3..00d946e 100644

I think some da850evm.h changes creeped in by accident.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca

#11 lore raw

PATCH v4 1/1 Davinci: add support for the ea20 board

Quoted 5 lines · Ben Gardiner
Quoted 4 lines · Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

Quoted 8 lines
Quoted 6 lines

---
Changes since V2:
- Make clear that the code is taken from da850evm.c and not da830evm.c (Ben Gardiner)
- factorize function to enable RMII (Ben Gardiner)

previous versions were based on Sugosh's and my patches. Is that still true?

Yes, it is not changed.

Quoted 10 lines
Quoted 1 line

+void davinci_emac_mii_mode_sel(int mode_sel);

I'm sorry I didn't mention this before -- I was just reviewing my pending RMII patch and noticed the following:

If this patch is based on the da850evm RMII support as previous version indicated then could this function prototype and the implementation below be wrapped in #if defined(CONFIG_DRIVER_TI_EMAC) and the corresponding declaration and implementations added to board/davinci/da8xxevm/common.{h,c} in the RMII patch be removed to minimize duplicate code?

I will protect prototype and implementation, but I prefer to not move the code in da8xxevm/common.x. The ea20 board has its own directory, and the place to share code among all davinci boards is under davinci/common instead of under da8xxevm. And probably it should be better to protect the function with CONFIG_SOC_DA8XX, too.

Quoted 5 lines

You said you were going to remove this NAND stuff. It sounds like the ea20 will support NAND, so I've no qualms about keeping it around; just wondering if you forgot to remove it or forgot to mention that you weren't going to remove it?

The main reason is that I cannot test at the moment the NAND. I think the best way to do is that I will provide another patch only when I will get a new release of the board and I can test the NAND functionalities. At the moment, this is dead code.

Quoted 6 lines

include/configs/da850evm.h

Quoted 4 lines
include/configs/da850evm.h +0 -0
index e4ae6f3..00d946e 100644

I think some da850evm.h changes creeped in by accident.

Yes, I noted too late, email was already sent ;-)

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#12 lore raw

PATCH v4 1/1 Davinci: add support for the ea20 board

In reply to Ben Gardiner
Quoted 4 lines · Ben Gardiner
Quoted 3 lines · Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

Hi Ben,

Quoted 6 lines

If this patch is based on the da850evm RMII support as previous version indicated then could this function prototype and the implementation below be wrapped in #if defined(CONFIG_DRIVER_TI_EMAC) and the corresponding declaration and implementations added to board/davinci/da8xxevm/common.{h,c} in the RMII patch be removed to minimize duplicate code?

Sorry, In my previous e-mail I misunderstood what you meant. You are right, we have to drop the function from da8xxevm/common.{h,c}, or we duplicate the code. I will send a patch for that.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#13 lore raw

PATCH v5 1/1 Davinci: add support for the ea20 board

In reply to Stefano Babic

This board uses the OMAP-L138 SOM stacked on a
custom baseboard. It supports SPI Flash, Ethernet
with RMII.

---
Changes since V4:
- It was not my intention to modify the da850evm.h file.
Please ignore V4.

Changes since V3:
- Make clear that the code is taken from da850evm.c and not da830evm.c (Ben Gardiner)
- factorize function to enable RMII (Ben Gardiner)

 MAINTAINERS                                      |    1 +
 arch/arm/include/asm/arch-davinci/davinci_misc.h |    2 +-
 board/davinci/common/misc.c                      |   15 ++
 board/davinci/ea20/Makefile                      |   53 +++++
 board/davinci/ea20/ea20.c                        |  230 ++++++++++++++++++++++
 boards.cfg                                       |    1 +
 include/configs/ea20.h                           |  192 ++++++++++++++++++
 7 files changed, 493 insertions(+), 1 deletions(-)
 create mode 100644 board/davinci/ea20/Makefile
 create mode 100644 board/davinci/ea20/ea20.c
 create mode 100644 include/configs/ea20.h
MAINTAINERS +1 -0
index 9258cb1..386a7b9 100644
@@ -551,6 +551,7 @@ Rowel Atienza <[email protected]>
 
 Stefano Babic <[email protected]>
 
+	ea20		davinci
 	polaris		xscale
 	trizepsiv	xscale
 	mx51evk		i.MX51
arch/arm/include/asm/arch-davinci/davinci_misc.h +1 -1
index a6ac3b9..80b366c 100644
@@ -50,5 +50,5 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr);
 int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins);
 int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
 				    int n_items);
-
+void davinci_emac_mii_mode_sel(int mode_sel);
 #endif /* __MISC_H */
board/davinci/common/misc.c +15 -0
index a30047b..d6698c0 100644
@@ -170,3 +170,18 @@ int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
 
 	return 0;
 }
+
+/*
+ * Set the mii mode as MII or RMII
+ */
+void davinci_emac_mii_mode_sel(int mode_sel)
+{
+	int val;
+
+	val = readl(&davinci_syscfg_regs->cfgchip3);
+	if (mode_sel == 0)
+		val &= ~(1 << 8);
+	else
+		val |= (1 << 8);
+	writel(val, &davinci_syscfg_regs->cfgchip3);
+}
board/davinci/ea20/Makefile new file +53 -0

53 lines not on this page · raw message

board/davinci/ea20/ea20.c new file +230 -0

230 lines not on this page · raw message

boards.cfg +1 -0
index 08e531e..b4fe8f5 100644
@@ -372,6 +372,7 @@ davinci_sffsdr	arm	arm926ejs	sffsdr		davinci		davinci
 davinci_sonata	arm	arm926ejs	sonata		davinci		davinci
 da830evm	arm	arm926ejs	da8xxevm	davinci		davinci
 da850evm	arm	arm926ejs	da8xxevm	davinci		davinci
+ea20		arm	arm926ejs	ea20		davinci		davinci
 guruplug	arm	arm926ejs	-		Marvell		kirkwood
 mv88f6281gtw_ge	arm	arm926ejs	-		Marvell		kirkwood
 openrd_base	arm	arm926ejs	-		Marvell		kirkwood
include/configs/ea20.h new file +192 -0

192 lines not on this page · raw message

Signature · 1 line
1.7.1