Skip to contentSkip to conversation

Add support for pengwyn board

RFC PATCH New micro1183 3 participants 4 messages Jan 24, 2014 – Jan 27, 2014 Arm (32-bit)

lore
Share & tools
lore

micro1183

author
#0 lore raw

RFC PATCH 1/1 Add support for pengwyn board

This patch adds support for the silica pengwyn board with AM335x SoC

---
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |   16 ++
 board/silica/pengwyn/Makefile               |   13 +
 board/silica/pengwyn/board.c                |  245 +++++++++++++++++++
 board/silica/pengwyn/board.h                |   22 ++
 board/silica/pengwyn/mux.c                  |  109 +++++++++
 boards.cfg                                  |    1 +
 include/configs/pengwyn.h                   |  340
+++++++++++++++++++++++++++
 7 files changed, 746 insertions(+)
(quoted diff) +0 -0

b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
index c1777df..60cb098 100644

arch/arm/include/asm/arch-am33xx/ddr_defs.h +16 -0
@@ -58,6 +58,22 @@
 #define MT41J128MJT125_PHY_FIFO_WE		0x100
 #define MT41J128MJT125_IOCTRL_VALUE		0x18B
 
+/* Micron MT41K128M16JT-187E */
+#define MT41K128MJT187E_EMIF_READ_LATENCY	0x06
+#define MT41K128MJT187E_EMIF_TIM1		0x0888B3DB
+#define MT41K128MJT187E_EMIF_TIM2		0x36337FDA
+#define MT41K128MJT187E_EMIF_TIM3		0x501F830F
+#define MT41K128MJT187E_EMIF_SDCFG		0x61C04AB2
+#define MT41K128MJT187E_EMIF_SDREF		0x0000093B
+#define MT41K128MJT187E_ZQ_CFG			0x50074BE4
+#define MT41K128MJT187E_RATIO			0x40
+#define MT41K128MJT187E_INVERT_CLKOUT		0x1
+#define MT41K128MJT187E_RD_DQS			0x3B
+#define MT41K128MJT187E_WR_DQS			0x85
+#define MT41K128MJT187E_PHY_WR_DATA		0xC1
+#define MT41K128MJT187E_PHY_FIFO_WE		0x100
+#define MT41K128MJT187E_IOCTRL_VALUE		0x18B
+
 /* Micron MT41J64M16JT-125 */
 #define MT41J64MJT125_EMIF_SDCFG		0x61C04A32
 
board/silica/pengwyn/Makefile new file +13 -0
new file mode 100644
index 0000000..c8b4f9a
@@ -0,0 +1,13 @@
+#
+# Makefile
+#
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_NOR_BOOT),y)
+obj-y	:= mux.o
+endif
+
+obj-y	+= board.o
board/silica/pengwyn/board.c new file +245 -0

245 lines not on this page · raw message

board/silica/pengwyn/board.h new file +22 -0
new file mode 100644
index 0000000..0a44218
@@ -0,0 +1,22 @@
+/*
+ * board.h
+ *
+ * Copyright (C) 2013 Lothar Felten <[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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _BOARD_H_
+#define _BOARD_H_
+
+void enable_uart0_pin_mux(void);
+void enable_board_pin_mux(void);
+
+#endif
board/silica/pengwyn/mux.c new file +109 -0

109 lines not on this page · raw message

boards.cfg +0 -0
index 07ae05b..fc09fe1 100644
@@ -254,6 +254,7 @@ Active  arm         armv7          am33xx

phytec pcm051
Active arm armv7 am33xx siemens dxr2
dxr2 -

Roger Meier <[email protected]>
Active arm armv7 am33xx siemens pxm2
pxm2 -

Roger Meier <[email protected]>
Active arm armv7 am33xx siemens rut
rut -

Roger Meier <[email protected]>
+Active arm armv7 am33xx silica pengwyn
pengwyn -

Lothar Felten <[email protected]>
Active arm armv7 am33xx ti am335x
am335x_boneblack
am335x_evm:SERIAL1,CONS_INDEX=1,EMMC_BOOT
Tom Rini
<[email protected]>
Active arm armv7 am33xx ti am335x

            am335x_evm

am335x_evm:SERIAL1,CONS_INDEX=1,NAND
Tom Rini
<[email protected]>
Active arm armv7 am33xx ti am335x

            am335x_evm_nor

am335x_evm:SERIAL1,CONS_INDEX=1,NAND,NOR
Tom Rini
<[email protected]>

include/configs/pengwyn.h new file +340 -0

340 lines not on this page · raw message

#1 lore raw

RFC PATCH 1/1 Add support for pengwyn board

Quoted 4 lines · On Fri, Jan 24, 2014 at 13:49 +0100, micro1183 wrote:

This patch adds support for the silica pengwyn board with AM335x SoC

Please consider using git send-email for submission. Your MUA broke the patch so it doesn't apply, and the From and S-o-b specs don't match.

virtually yours
Gerhard Sittig

Signature · 3 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
#2 lore raw

RFC PATCH 1/1 Add support for pengwyn board

In reply to micro1183

Dear micro1183,

Quoted 1 line · In message <[email protected]> you wrote:

This patch adds support for the silica pengwyn board with AM335x SoC

Your patch is line-wrapped and does not apply. Please fix your mailer configuration.

Quoted 8 lines

+/*
+ * board.c
+ *
+ * Copyright (C) 2013 Lothar Felten <[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 version 2.

Please use a SPDX license tag instead. And please notice that new code should have GPL-2.0+; GPL-2.0 is not sufficient.

Please fix globally.

Quoted 9 lines
board/silica/pengwyn/board.c new file +9 -0
+#include <common.h>
+#include <errno.h>
+#include <spl.h>
+#include <asm/arch/cpu.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/omap.h>
+#include <asm/arch/ddr_defs.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/gpio.h>

board/silica/pengwyn/board.c line 34

Quoted 10 lines
board/silica/pengwyn/board.c new file +10 -0
+#include <asm/arch/mmc_host_def.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/io.h>
+#include <asm/emif.h>
+#include <asm/gpio.h>
+#include <i2c.h>
+#include <miiphy.h>
+#include <cpsw.h>
+#include <power/tps65217.h>
+#include "board.h"

Do you really need all these headers?

Quoted 1 line

+#define MACH_TYPE_PENGWYN 1234

MACH-ID 1234 is registered for the gene1270 bord. Please do not hijack other board's IDs! Register your own instead, please.

include/configs/pengwyn.h line 35

Quoted 2 lines
include/configs/pengwyn.h new file +2 -0
+/* Always 128 KiB env size */
+#define CONFIG_ENV_SIZE			(128 << 10)

This makes no sense. You will never need that much, and such a huge size just slows down booting etc.

include/configs/pengwyn.h line 186

Quoted 7 lines
include/configs/pengwyn.h new file +7 -0
+/* NS16550 Configuration */
+#define CONFIG_SYS_NS16550_COM1		0x44e09000	/* Base EVM has UART0 */
+#define CONFIG_SYS_NS16550_COM2		0x48022000	/* UART1 */
+#define CONFIG_SYS_NS16550_COM3		0x48024000	/* UART2 */
+#define CONFIG_SYS_NS16550_COM4		0x481a6000	/* UART3 */
+#define CONFIG_SYS_NS16550_COM5		0x481a8000	/* UART4 */
+#define CONFIG_SYS_NS16550_COM6		0x481aa000	/* UART5 */

Do you really need all of these?

Quoted 1 line

+#define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"

Is this a good idea?

include/configs/pengwyn.h line 284

Quoted 4 lines
include/configs/pengwyn.h new file +4 -0
+/* USB TI's IDs */
+#define CONFIG_G_DNL_VENDOR_NUM 0x0403
+#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
+#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"

Is this really a TI board?

Best regards,

Wolfgang Denk

Signature · 7 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
In any group of employed individuals the only naturally  early  riser
is  _always_  the office manager, who will _always_ leave reproachful
little notes ... on the desks of their subordinates.
                                - Terry Pratchett, _Lords and Ladies_
author
#3 lore raw

RFC PATCH 1/1 Add support for pengwyn board

Dear Wolfgang,

thanks for your feedback.

Quoted 7 lines · Wolfgang Denk

Dear micro1183,

Quoted 1 line · In message <[email protected]> you wrote:

This patch adds support for the silica pengwyn board with AM335x SoC

Your patch is line-wrapped and does not apply. Please fix your mailer configuration.

I tried to fix my settings and will test it by sending a patch to myself using git send-email.

Quoted 9 lines
Quoted 8 lines

+/*
+ * board.c
+ *
+ * Copyright (C) 2013 Lothar Felten <[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 version 2.

Quoted 4 lines

Please use a SPDX license tag instead. And please notice that new code should have GPL-2.0+; GPL-2.0 is not sufficient.

Please fix globally.

ok, done. I use a single line SPDX identifier for GPL-2.0+ now.

Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+#include <common.h>
+#include "board.h"

Do you really need all these headers?

cleaned them up now.

Quoted 4 lines
Quoted 1 line

+#define MACH_TYPE_PENGWYN 1234

MACH-ID 1234 is registered for the gene1270 bord. Please do not hijack other board's IDs! Register your own instead, please.

Where can I find a list of IDs?
I can't find much information on a gene1270 board in arch/arm/tools/mach-types.
Is a MACH_TYPE identifier mandatory?

Quoted 6 lines

include/configs/pengwyn.h line 35

Quoted 3 lines
include/configs/pengwyn.h new file +2 -0
+/* Always 128 KiB env size */
+#define CONFIG_ENV_SIZE			(128 << 10)

This makes no sense. You will never need that much, and such a huge size just slows down booting etc.

Thanks. Set to 0x4000.

Quoted 9 lines

include/configs/pengwyn.h line 186

Quoted 7 lines
include/configs/pengwyn.h new file +7 -0
+/* NS16550 Configuration */
+#define CONFIG_SYS_NS16550_COM1		0x44e09000	/* Base EVM has UART0 */
+#define CONFIG_SYS_NS16550_COM2		0x48022000	/* UART1 */
+#define CONFIG_SYS_NS16550_COM3		0x48024000	/* UART2 */
+#define CONFIG_SYS_NS16550_COM4		0x481a6000	/* UART3 */
+#define CONFIG_SYS_NS16550_COM5		0x481a8000	/* UART4 */
+#define CONFIG_SYS_NS16550_COM6		0x481aa000	/* UART5 */

Do you really need all of these?

No, removed all but the console one.

Quoted 9 lines
Quoted 1 line

+#define CONFIG_USBNET_HOST_ADDR "de:ad:be:af:00:00"

Is this a good idea?

include/configs/pengwyn.h line 284

Quoted 4 lines
include/configs/pengwyn.h new file +4 -0
+/* USB TI's IDs */
+#define CONFIG_G_DNL_VENDOR_NUM 0x0403
+#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
+#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"

Is this really a TI board?

I need some HW address and USB VID:PID to get it working. TI's code does it and so does siemens' rut.
I could drop this functionality and remove it all.

Best regards,
Lothar