RFC: Dreamplug support
v2 cover RFC: Dreamplug support
From: Jason Cooper <[email protected]>
It compiles clean, and I've loaded it via JTAG and used it to dump the existing bootloader out of the SPI flash. I have _not_ used it to burn itself to the flash yet. I'm looking for comments before I try that. ;-)
Some concerns:
1.) does the 'make all' support need to be last? I've used
rebase to edit patches and commits, but I've never reshuffled. Each patch compiles clean. FIXED in v2.
2.) The SPI flash chip is a Macronix MX25L1606, however it has the
identical chip idcode to the MX25L1605. How is that properly handled? The 06 does have some new features [1].
3.) I added the board number [2], etc to asm/mach-types.h even
though it says to not to. ;-) Is there a proper way to do it? If it's copied from the Linux kernel, it hasn't been updated in a while...
[1] http://www.macronix.com/QuickPlace/hq/PageLibrary4825740B00298A3B.nsf/h_Index/5F41CDDCB837422C48257639003E5EC3/$File/AN055-Migrate_to_MX25L1606E_and_MX25L8006E-1.2.pdf
[2] http://www.arm.linux.org.uk/developer/machines/list.php?id=3550
Changes from v1 to v2:
- resorted series to move 'make all' support last.
Jason Cooper (3):
dreamplug: Initial support.
dreamplug: switch from NAND flash to SPI flash.
dreamplug: include in 'make all'
MAKEALL | 1 + arch/arm/include/asm/mach-types.h | 13 +++ board/Marvell/dreamplug/Makefile | 51 +++++++++++ board/Marvell/dreamplug/dreamplug.c | 153 ++++++++++++++++++++++++++++++++ board/Marvell/dreamplug/dreamplug.h | 39 ++++++++ board/Marvell/dreamplug/kwbimage.cfg | 160 ++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/dreamplug.h | 111 +++++++++++++++++++++++ 8 files changed, 529 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/dreamplug/Makefile create mode 100644 board/Marvell/dreamplug/dreamplug.c create mode 100644 board/Marvell/dreamplug/dreamplug.h create mode 100644 board/Marvell/dreamplug/kwbimage.cfg create mode 100644 include/configs/dreamplug.h
PATCH v2 1/3 dreamplug: Initial support.
From: Jason Cooper <[email protected]>
Copied files from boards/Marvell/guruplug/ and did
s/GURUPLUG/DREAMPLUG/g s/guruplug/dreamplug/g
Also, added MACH_TYPE_DREAMPLUG 3550 registered with at
http://www.arm.linux.co.uk/developer/machines/
--- arch/arm/include/asm/mach-types.h | 13 +++ board/Marvell/dreamplug/Makefile | 51 +++++++++++ board/Marvell/dreamplug/dreamplug.c | 153 ++++++++++++++++++++++++++++++++ board/Marvell/dreamplug/dreamplug.h | 39 ++++++++ board/Marvell/dreamplug/kwbimage.cfg | 162 ++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/dreamplug.h | 111 +++++++++++++++++++++++ 7 files changed, 530 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/dreamplug/Makefile create mode 100644 board/Marvell/dreamplug/dreamplug.c create mode 100644 board/Marvell/dreamplug/dreamplug.h create mode 100644 board/Marvell/dreamplug/kwbimage.cfg create mode 100644 include/configs/dreamplug.h
arch/arm/include/asm/mach-types.h +13 -0
@@ -3312,6 +3312,7 @@ extern unsigned int __machine_arch_type;#define MACH_TYPE_T5388P 3336#define MACH_TYPE_DINGO 3337#define MACH_TYPE_GOFLEXHOME 3338 +#define MACH_TYPE_DREAMPLUG 3550#ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type
@@ -42913,6 +42914,18 @@ extern unsigned int __machine_arch_type;# define machine_is_goflexhome () (0)#endif +#ifdef CONFIG_MACH_DREAMPLUG +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_DREAMPLUG +# endif +# define machine_is_dreamplug () (machine_arch_type == MACH_TYPE_DREAMPLUG) +#else +# define machine_is_dreamplug () (0) +#endif +/* * These have not yet been registered */
board/Marvell/dreamplug/Makefile new file +51 -0
51 lines not on this page · raw message
board/Marvell/dreamplug/dreamplug.c new file +153 -0
153 lines not on this page · raw message
board/Marvell/dreamplug/dreamplug.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* (C) Copyright 2009 +* Marvell Semiconductor <www.marvell.com> +* Written-by: Siddarth Gore <[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., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#ifndef __DREAMPLUG_H +#define __DREAMPLUG_H + +#define DREAMPLUG_OE_LOW (~(0)) +#define DREAMPLUG_OE_HIGH (~(0)) +#define DREAMPLUG_OE_VAL_LOW 0 +#define DREAMPLUG_OE_VAL_HIGH (0xf << 16)/* 4 LED Pins high */ + +/* PHY related */ +#define MV88E1121_MAC_CTRL2_REG 21 +#define MV88E1121_PGADR_REG 22 +#define MV88E1121_RGMII_TXTM_CTRL (1 << 4) +#define MV88E1121_RGMII_RXTM_CTRL (1 << 5) + +#endif /* __DREAMPLUG_H */
board/Marvell/dreamplug/kwbimage.cfg new file +162 -0
162 lines not on this page · raw message
boards.cfg +1 -0
@@ -110,6 +110,7 @@ suen3 arm arm926ejs km_arm keymile suen8 arm arm926ejs km_arm keymile kirkwood mgcoge3un arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood +dreamplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE openrd_client arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT
include/configs/dreamplug.h new file +111 -0
111 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v2 2/3 dreamplug: switch from NAND flash to SPI flash.
In reply to u-boot at lakedaemon.netFrom: Jason Cooper <[email protected]>
MPP._SPI_ configuration copied fromboards/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
--- board/Marvell/dreamplug/dreamplug.c | 18 +++++++++--------- board/Marvell/dreamplug/kwbimage.cfg | 4 +--- include/configs/dreamplug.h | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-)
board/Marvell/dreamplug/dreamplug.c +9 -9
@@ -43,14 +43,14 @@ int board_early_init_f(void)/* Multi-Purpose Pins Functionality configuration */ u32 kwmpp_config[] = { -MPP0_NF_IO2 , -MPP1_NF_IO3 , -MPP2_NF_IO4 , -MPP3_NF_IO5 , -MPP4_NF_IO6 , -MPP5_NF_IO7 , + MPP0_SPI_SCn, +MPP1_SPI_MOSI , +MPP2_SPI_SCK , +MPP3_SPI_MISO , +MPP4_GPIO , +MPP5_GPO , MPP6_SYSRST_OUTn, -MPP7_GPO ,/* GPIO_RST */ + MPP7_SPI_SCn,MPP8_TW_SDA ,MPP9_TW_SCK ,MPP10_UART0_TXD ,
@@ -61,8 +61,8 @@ int board_early_init_f(void)MPP15_SD_D1 ,MPP16_SD_D2 ,MPP17_SD_D3 , -MPP18_NF_IO0 , -MPP19_NF_IO1 , +MPP18_GPO , +MPP19_GPO ,MPP20_GE1_0 ,MPP21_GE1_1 , MPP22_GE1_2,
board/Marvell/dreamplug/kwbimage.cfg +1 -3
@@ -26,9 +26,7 @@ # # Boot Media configurations -BOOT_FROM nand -NAND_ECC_MODE default -NAND_PAGE_SIZE 0x0800 +BOOT_FROM spi # SOC registers configuration using bootrom header extension # Maximum KWBIMAGE_MAX_CONFIG configurations allowed
include/configs/dreamplug.h +1 -1
@@ -47,7 +47,7 @@#define CONFIG_CMD_DHCP #define CONFIG_CMD_ENV #define CONFIG_CMD_FAT -#define CONFIG_CMD_NAND +#define CONFIG_CMD_SF #define CONFIG_CMD_PING #define CONFIG_CMD_USB #define CONFIG_CMD_IDE
Signature · 1 line
1.7.0.4
PATCH v2 2/3 dreamplug: switch from NAND flash to SPI flash.
Quoted 9 lines
-----Original Message-----
From: u-boot at lakedaemon.net [mailto:u-boot at lakedaemon.net]
Sent: Monday, June 06, 2011 6:04 PM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; Jason Cooper
Subject: [PATCH 2/3 v2] dreamplug: switch from NAND flash to SPI flash.
Quoted 5 lines
From: Jason Cooper <[email protected]>
MPP._SPI_ configuration copied from
boards/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c
No need for this, you can add these changes to your native patch since this is your first post
Regards..
Prafulla ..
PATCH v2 3/3 dreamplug: include in 'make all'
In reply to u-boot at lakedaemon.netFrom: Jason Cooper <[email protected]>
--- MAKEALL | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
MAKEALL +1 -0
@@ -345,6 +345,7 @@ LIST_ARM9=" \ edb9315a \ edminiv2 \ guruplug \ + dreamplug \ imx27lite \ jadecpu \ lpd7a400 \
Signature · 1 line
1.7.0.4
PATCH v2 3/3 dreamplug: include in 'make all'
Quoted 11 lines
-----Original Message-----
From: u-boot at lakedaemon.net [mailto:u-boot at lakedaemon.net]
Sent: Monday, June 06, 2011 6:04 PM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; Jason Cooper
Subject: [PATCH 3/3 v2] dreamplug: include in 'make all'From: Jason Cooper <[email protected]>
You can avoid 2/3, and 3/3 of your patch series and post a single patch series for this support.
Regards..
Prafulla ..
PATCH v2 3/3 dreamplug: include in 'make all'
Quoted 9 lines · Prafulla Wadaskar
Quoted 9 lines
-----Original Message-----
From: u-boot at lakedaemon.net [mailto:u-boot at lakedaemon.net]
Sent: Monday, June 06, 2011 6:04 PM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; Jason Cooper
Subject: [PATCH 3/3 v2] dreamplug: include in 'make all'
Quoted 5 lines
Quoted 2 lines
From: Jason Cooper <[email protected]>
You can avoid 2/3, and 3/3 of your patch series and post a single patch series for this support.
Will do, thanks for taking a look.
Jason.
v2 cover RFC: Dreamplug support
In reply to u-boot at lakedaemon.netQuoted 22 lines
-----Original Message-----
From: u-boot at lakedaemon.net [mailto:u-boot at lakedaemon.net]
Sent: Monday, June 06, 2011 6:04 PM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; Jason Cooper
Subject: [PATCH 0/3 v2] RFC: Dreamplug supportFrom: Jason Cooper <[email protected]>
It compiles clean, and I've loaded it via JTAG and used it to dump the existing bootloader out of the SPI flash. I have _not_ used it to burn itself to the flash yet. I'm looking for comments before I try that. ;- )
Some concerns:
1.) does the 'make all' support need to be last? I've used
rebase to edit patches and commits, but I've never reshuffled. Each patch compiles clean. FIXED in v2.
Quoted 8 lines
2.) The SPI flash chip is a Macronix MX25L1606, however it has the
identical chip idcode to the MX25L1605. How is that properly handled? The 06 does have some new features [1].3.) I added the board number [2], etc to
asm/mach-types.heven
though it says to not to. ;-) Is there a proper way to do it? If it's copied from the Linux kernel, it hasn't been updated in a while...
No, the proper way is-
you should add board first to arm-linux, then the updated mach-types.h will be updated by arm maintainer on u-boot, then you can add your board support.
Quoted 13 lines
[1]
http://www.macronix.com/QuickPlace/hq/PageLibrary4825740B00298A3B.nsf/h_
Index/5F41CDDCB837422C48257639003E5EC3/$File/AN055- Migrate_to_MX25L1606E_and_MX25L8006E-1.2.pdf
[2] http://www.arm.linux.org.uk/developer/machines/list.php?id=3550Changes from v1 to v2:
- resorted series to move 'make all' support last.
Quoted 7 lines
Jason Cooper (3):
dreamplug: Initial support.
dreamplug: switch from NAND flash to SPI flash.
dreamplug: include in 'make all'MAKEALL | 1 + arch/arm/include/asm/mach-types.h | 13 +++
No patch for this file, follow process explained above.
Quoted 8 lines
board/Marvell/dreamplug/Makefile | 51 +++++++++++ board/Marvell/dreamplug/dreamplug.c | 153 ++++++++++++++++++++++++++++++++ board/Marvell/dreamplug/dreamplug.h | 39 ++++++++ board/Marvell/dreamplug/kwbimage.cfg | 160 ++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/dreamplug.h | 111 +++++++++++++++++++++++
You should update MAINTAINERS file too.
Regards..
Prafulla . .
v2 cover RFC: Dreamplug support
Prafulla,
Thanks for the input! I assume the SPI flash implementation looked ok?
Quoted 8 lines · Prafulla Wadaskar
Quoted 8 lines
-----Original Message-----
From: u-boot at lakedaemon.net [mailto:u-boot at lakedaemon.net]
Sent: Monday, June 06, 2011 6:04 PM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; Jason Cooper
Subject: [PATCH 0/3 v2] RFC: Dreamplug support
Quoted 9 lines
Quoted 4 lines
3.) I added the board number [2], etc to
asm/mach-types.heven
though it says to not to. ;-) Is there a proper way to do it? If it's copied from the Linux kernel, it hasn't been updated in a while...No, the proper way is- you should add board first to arm-linux, then the updated
mach-types.hwill be updated by arm maintainer on u-boot, then you can add your board support.
Ok, I'll starting working on the Linux side as well.
Quoted 14 lines
Quoted 14 lines
[2] http://www.arm.linux.org.uk/developer/machines/list.php?id=3550
Changes from v1 to v2:
- resorted series to move 'make all' support last.
Jason Cooper (3):
dreamplug: Initial support.
dreamplug: switch from NAND flash to SPI flash.
dreamplug: include in 'make all'
Quoted 5 lines
Quoted 2 lines
MAKEALL | 1 + arch/arm/include/asm/mach-types.h | 13 +++No patch for this file, follow process explained above.
So, in the interim, I'll resubmit using the guruplug board id, then submit separate patch after the Linux support is accepted.
Quoted 11 lines
Quoted 8 lines
board/Marvell/dreamplug/Makefile | 51 +++++++++++ board/Marvell/dreamplug/dreamplug.c | 153 ++++++++++++++++++++++++++++++++ board/Marvell/dreamplug/dreamplug.h | 39 ++++++++ board/Marvell/dreamplug/kwbimage.cfg | 160 ++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/dreamplug.h | 111 +++++++++++++++++++++++You should update
MAINTAINERSfile too.
Ok, I'll add Dreamplug under Siddarth Gore.
Quoted 2 lines
Regards..
Prafulla . .