updates for keymile arm boards
v2 cover updates for keymile arm boards
This patch series updates keymile boards with Kirkwood CPU and adds two new boards. This new boards are kmnusa and kmcoge5un. Also the existing boards with own config files were migrated to the common header km_kirkwood.h. Some small adaption in generic kirkwood code was needed due to two new features on the new board. First one is that the u-boot environment is in the SPI NOR flash and the second one is the direct MAC/MAC connection from the mvgbe interface to an simple switch.
Changes for v2:
- removed the two patches "spi/kirkwood: add weak functions board_spi_bus_claim/release" and "mvgbe: remove warning for unused methods" from the series as they are were independent from it. The series is however dependent of these two patches.
Holger Brunck (13):
arm/km: add board type to boards.cfg
arm/km: add piggy mac adress offset for mgcoge3un arm/km: rename CONFIG option CONFIG_KM_DEF_ENV_UPDATE arm/km: use ARRAY_SIZE macro
arm/km: fix wrong comment in SDRAM config for mgcoge3un arm/km: change maintainer for mgcoge3un arm/km: remove CONFIG_RESET_PHY_R
km/arm: remove spi toggle command
arm/km: add kmnusa board support
arm/km: add kmcoge5un board support
arm/km: convert mgcoge3un target to km_kirkwood arm/km: remove portl2.h and use km_kirkwood instead arm/km: cleanup km_kirkwood boards
Valentin Longchamp (6):
arm/km: enable mii cmd
arm/km: use correct kw_gpio function for NAND/SPI switching arm/km: implement weak function board_spi_clam_bus/release arm/kirkwood: protect the ENV_SPI #defines
arm/km: correct init of 88e6352 switch in the reset_phy function arm/km: enable BOCO2 FPGA download support
MAINTAINERS | 4 +- arch/arm/include/asm/arch-kirkwood/config.h | 12 +- board/keymile/common/common.h | 12 + board/keymile/km_arm/128M16-1.cfg | 290 ++++++++++++++++++++++++++ board/keymile/km_arm/256M8-1.cfg | 292 +++++++++++++++++++++++++++ board/keymile/km_arm/Makefile | 8 + board/keymile/km_arm/fpga_config.c | 212 +++++++++++++++++++ board/keymile/km_arm/km_arm.c | 119 +++++++----- board/keymile/km_arm/kwbimage-memphis.cfg | 2 +- board/keymile/km_arm/managed_switch.c | 166 +++++++++++++++ boards.cfg | 10 +- include/configs/km/km_arm.h | 60 ++++-- include/configs/km_kirkwood.h | 157 +++++++++++++-- include/configs/mgcoge3un.h | 86 -------- include/configs/portl2.h | 85 -------- 15 files changed, 1256 insertions(+), 259 deletions(-) create mode 100644 board/keymile/km_arm/128M16-1.cfg create mode 100644 board/keymile/km_arm/256M8-1.cfg create mode 100644 board/keymile/km_arm/fpga_config.c create mode 100644 board/keymile/km_arm/managed_switch.c delete mode 100644 include/configs/mgcoge3un.h delete mode 100644 include/configs/portl2.h
PATCH v2 1/19 arm/km: add board type to boards.cfg
From: Holger Brunck <[email protected]>
Some other kirkwood boards from keymile will follow. They will have some small differences, but we want to use the km_kirkwood.h for all to distinguish them. This patch a preparation for this.
--- boards.cfg | 4 ++-- include/configs/km_kirkwood.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
boards.cfg +2 -2
@@ -137,8 +137,8 @@ hawkboard_uart arm arm926ejs da8xxevm davinci enbw_cmc arm arm926ejs enbw_cmc enbw davinci calimain arm arm926ejs calimain omicron davinci dns325 arm arm926ejs - d-link kirkwood -km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI -km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_RECONFIG_XLX +km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD,KM_DISABLE_PCI +km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_RECONFIG_XLX mgcoge3un arm arm926ejs km_arm keymile kirkwood portl2 arm arm926ejs km_arm keymile kirkwood inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2
include/configs/km_kirkwood.h +2 -2
@@ -42,10 +42,10 @@/* * Version number information */ -#ifdef CONFIG_KM_DISABLE_PCI +#if defined(CONFIG_KM_KIRKWOOD )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood"#undef CONFIG_KIRKWOOD_PCIE_INIT -#else +#elif defined(CONFIG_KM_KIRKWOOD_PCI )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood PCI"#endif
Signature · 1 line
1.7.1
PATCH v2 2/19 arm/km: add piggy mac adress offset for mgcoge3un
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
On mgcoge3un the piggy mac adress is at offset 3.
--- include/configs/mgcoge3un.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/mgcoge3un.h +1 -0
@@ -77,6 +77,7 @@ MVGBE_SET_MII_SPEED_TO_100)#define CONFIG_KM_BOARD_EXTRA_ENV "waitforne=true\0" +#define CONFIG_PIGGY_MAC_ADRESS_OFFSET 3/* * PCIe port not used on mgcoge3un
Signature · 1 line
1.7.1
PATCH v2 3/19 arm/km: rename CONFIG option CONFIG_KM_DEF_ENV_UPDATE
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
This config option sounds like the it is responsible for the update of the environment, but it is the u-boot update handling. Therefore we adapt it to a more apropriate naming.
--- include/configs/km/km_arm.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/configs/km/km_arm.h +2 -2
@@ -81,7 +81,7 @@"boot=bootm ${load_addr_r} - -\0" \"cramfsloadfdt=true\0" \ "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.kwb\0" \ -CONFIG_KM_DEF_ENV_UPDATE \ +CONFIG_KM_UPDATE_UBOOT \"" #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
@@ -235,7 +235,7 @@ int get_scl(void);"orion_nand:" \"-(" CONFIG_KM_UBI_PARTITION_NAME ")" -#define CONFIG_KM_DEF_ENV_UPDATE \ +#define CONFIG_KM_UPDATE_UBOOT \"update=" \"spi on;sf probe 0;sf erase 0 50000;" \"sf write ${load_addr_r} 0 ${filesize};" \
Signature · 1 line
1.7.1
PATCH v2 4/19 arm/km: use ARRAY_SIZE macro
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
--- board/keymile/km_arm/km_arm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/keymile/km_arm/km_arm.c +1 -1
@@ -410,7 +410,7 @@ const ulong patterns[] = { 0x00000000,0xFF00FF00 ,0x0F0F0F0F , 0xF0F0F0F0}; -const ulong NBR_OF_PATTERNS =sizeof (patterns)/sizeof (*patterns); +const ulong NBR_OF_PATTERNS =ARRAY_SIZE (patterns);const ulong OFFS_PATTERN =3 ;const ulong REPEAT_PATTERN =1000 ;
Signature · 1 line
1.7.1
PATCH v2 5/19 arm/km: fix wrong comment in SDRAM config for mgcoge3un
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
--- board/keymile/km_arm/kwbimage-memphis.cfg | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/keymile/km_arm/kwbimage-memphis.cfg +1 -1
@@ -149,7 +149,7 @@ DATA 0xFFD01424 0x0000F17F # DDR Controller Control High DATA 0xFFD01428 0x00084520 # DDR2 SDRAM Timing Low # bit3-0 : 0000, required # bit7-4 : 0010, M_ODT assertion 2 cycles after read -# bit11-8 : 1001, M_ODT de-assertion 5 cycles after read +# bit11-8 : 0101, M_ODT de-assertion 5 cycles after read # bit15-12: 0100, internal ODT assertion 4 cycles after read # bit19-16: 1000, internal ODT de-assertion 8 cycles after read # bit31-20: 0 , required
Signature · 1 line
1.7.1
PATCH v2 6/19 arm/km: change maintainer for mgcoge3un
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
--- MAINTAINERS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
MAINTAINERS +1 -1
@@ -743,6 +743,7 @@ Sergey Lapin <[email protected]> Valentin Longchamp <[email protected]> km_kirkwood ARM926EJS (Kirkwood SoC) + mgcoge3un ARM926EJS (Kirkwood SoC) portl2 ARM926EJS (Kirkwood SoC) Nishanth Menon <[email protected]>
@@ -839,7 +840,6 @@ Heiko Schocher <[email protected]> enbw_cmc ARM926EJS (AM1808 SoC) magnesium i.MX27 - mgcoge3un ARM926EJS (Kirkwood SoC) Michael Schwingen <[email protected]>
Signature · 1 line
1.7.1
PATCH v2 7/19 arm/km: remove CONFIG_RESET_PHY_R
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
This is already defined in the generic kirkwood header.
--- include/configs/km/km_arm.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
include/configs/km/km_arm.h +0 -1
@@ -164,7 +164,6 @@#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ #define CONFIG_PHY_BASE_ADR 0#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */ -#define CONFIG_RESET_PHY_R /* use reset_phy() to init 88E1118 PHY */ /* * UBI related stuff
Signature · 1 line
1.7.1
PATCH v2 8/19 arm/km: enable mii cmd
In reply to Valentin LongchampThis is useful to debug the switch initialization
--- include/configs/km/km_arm.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/km/km_arm.h +1 -0
@@ -159,6 +159,7 @@*/ #define CONFIG_NETCONSOLE /* include NetConsole support */ #define CONFIG_MII /* expose smi ove miiphy interface */ +#define CONFIG_CMD_MII /* to debug mdio phy config */ #define CONFIG_MVGBE /* Enable Marvell Gbe Controller Driver */ #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN /* detect link using phy */ #define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */
Signature · 1 line
1.7.1
PATCH v2 9/19 arm/km: use correct kw_gpio function for NAND/SPI switching
In reply to Valentin LongchampThis used to be done with registers direct access, which is not clear and optimal.
--- board/keymile/km_arm/km_arm.c | 55 +++++++++++++++++++++-------------------- include/configs/km/km_arm.h | 2 +- 2 files changed, 29 insertions(+), 28 deletions(-)
board/keymile/km_arm/km_arm.c +28 -27
@@ -242,20 +242,15 @@ int misc_init_r(void)int board_early_init_f (void ) { -u32 tmp; -kirkwood_mpp_conf (kwmpp_config);/* -* The FLASH_GPIO_PIN switches between using a +* The KM_FLASH_GPIO_PIN switches between using a * NAND or a SPI FLASH. Set this pin on start * to NAND mode. */ - tmp =readl (KW_GPIO0_BASE ); -writel (tmp |FLASH_GPIO_PIN ,KW_GPIO0_BASE ); - tmp =readl (KW_GPIO0_BASE +4 ); -writel (tmp & (~FLASH_GPIO_PIN ) ,KW_GPIO0_BASE +4 ); - +kw_gpio_set_valid (KM_FLASH_GPIO_PIN ,1 ); +kw_gpio_direction_output (KM_FLASH_GPIO_PIN ,1 );#if defined(CONFIG_SOFT_I2C )/* init the GPIO for I2C Bitbang driver */ kw_gpio_set_valid (KM_KIRKWOOD_SDA_PIN ,1 );
@@ -284,35 +279,41 @@ int board_init(void)return 0 ; } +int km_hw_spi_bus_claim (int on) +{ +int gpio_value = !on; + +if (on) { + kwmpp_config[0 ] = MPP0_SPI_SCn; + kwmpp_config[1 ] =MPP1_SPI_MOSI ; + kwmpp_config[2 ] =MPP2_SPI_SCK ; + kwmpp_config[3 ] =MPP3_SPI_MISO ; + }else { + kwmpp_config[0 ] =MPP0_NF_IO2 ; + kwmpp_config[1 ] =MPP1_NF_IO3 ; + kwmpp_config[2 ] =MPP2_NF_IO4 ; + kwmpp_config[3 ] =MPP3_NF_IO5 ; + } + +/* Multi-Purpose Pins Functionality configuration */ +kirkwood_mpp_conf (kwmpp_config); +kw_gpio_set_value (KM_FLASH_GPIO_PIN , gpio_value); + +return 0 ; +} +#if defined(CONFIG_CMD_SF )int do_spi_toggle (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { -u32 tmp;if (argc <2 )return cmd_usage (cmdtp);if ((strcmp (argv[1 ],"off" ) ==0 )) {printf ("SPI FLASH disabled, NAND enabled\n" ); -/* Multi-Purpose Pins Functionality configuration */ - kwmpp_config[0 ] =MPP0_NF_IO2 ; - kwmpp_config[1 ] =MPP1_NF_IO3 ; - kwmpp_config[2 ] =MPP2_NF_IO4 ; - kwmpp_config[3 ] =MPP3_NF_IO5 ; - -kirkwood_mpp_conf (kwmpp_config); - tmp =readl (KW_GPIO0_BASE ); -writel (tmp |FLASH_GPIO_PIN ,KW_GPIO0_BASE ); +km_hw_spi_bus_claim (0 ); }else if ((strcmp (argv[1 ],"on" ) ==0 )) {printf ("SPI FLASH enabled, NAND disabled\n" ); -/* Multi-Purpose Pins Functionality configuration */ - kwmpp_config[0 ] = MPP0_SPI_SCn; - kwmpp_config[1 ] =MPP1_SPI_MOSI ; - kwmpp_config[2 ] =MPP2_SPI_SCK ; - kwmpp_config[3 ] =MPP3_SPI_MISO ; - -kirkwood_mpp_conf (kwmpp_config); - tmp =readl (KW_GPIO0_BASE ); -writel (tmp & (~FLASH_GPIO_PIN ) ,KW_GPIO0_BASE ); +km_hw_spi_bus_claim (1 ); }else {return cmd_usage (cmdtp); }
include/configs/km/km_arm.h +1 -1
@@ -227,7 +227,7 @@ int get_scl(void);#define CONFIG_SPI_FLASH #define CONFIG_SPI_FLASH_STMICRO -#define FLASH_GPIO_PIN 0x00010000 +#define KM_FLASH_GPIO_PIN 16#define MTDIDS_DEFAULT "nand0=orion_nand"/* test-only: partitioning needs some tuning, this is just for tests */
Signature · 1 line
1.7.1
PATCH v2 10/19 arm/km: implement weak function board_spi_clam_bus/release
In reply to Valentin LongchampThey are needed on all km_arm boards where we have the environement variables in the NOR Flash. This is #ifdefed by CONFIG_KM_ENV_IS_IN_SPI_NOR. First boards using this feature are the upcoming boards kmcoge5un and kmnusa.
--- board/keymile/km_arm/km_arm.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
board/keymile/km_arm/km_arm.c +11 -0
@@ -33,6 +33,7 @@#include <nand.h> #include <netdev.h> #include <miiphy.h> +#include <spi.h> #include <asm/io.h> #include <asm/arch/cpu.h> #include <asm/arch/kirkwood.h>
@@ -302,6 +303,16 @@ int km_hw_spi_bus_claim(int on)return 0 ; } +int board_spi_claim_bus (struct spi_slave *slave) +{ +return km_hw_spi_bus_claim (1 ); +} + +void board_spi_release_bus (struct spi_slave *slave) +{ +km_hw_spi_bus_claim (0 ); +} +#if defined(CONFIG_CMD_SF )int do_spi_toggle (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {
Signature · 1 line
1.7.1
PATCH v2 11/19 arm/kirkwood: protect the ENV_SPI #defines
In reply to Valentin LongchampSo that they can be redefined by some boards specific values.
--- arch/arm/include/asm/arch-kirkwood/config.h | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
arch/arm/include/asm/arch-kirkwood/config.h +9 -3
@@ -82,9 +82,15 @@#ifdef CONFIG_CMD_SF #define CONFIG_HARD_SPI 1#define CONFIG_KIRKWOOD_SPI 1 -#define CONFIG_ENV_SPI_BUS 0 -#define CONFIG_ENV_SPI_CS 0 -#define CONFIG_ENV_SPI_MAX_HZ 50000000/*50Mhz */ +#ifndef CONFIG_ENV_SPI_BUS +# define CONFIG_ENV_SPI_BUS 0 +#endif +#ifndef CONFIG_ENV_SPI_CS +# define CONFIG_ENV_SPI_CS 0 +#endif +#ifndef CONFIG_ENV_SPI_MAX_HZ +# define CONFIG_ENV_SPI_MAX_HZ 50000000 +#endif #endif /*
Signature · 1 line
1.7.1
PATCH v2 12/19 km/arm: remove spi toggle command
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
Now we toggle between SPI and NAND flash automatically if we claim the SPI bus. So we can get rid of this command.
--- board/keymile/km_arm/km_arm.c | 26 -------------------------- include/configs/km/km_arm.h | 5 ++--- 2 files changed, 2 insertions(+), 29 deletions(-)
board/keymile/km_arm/km_arm.c +0 -26
@@ -313,32 +313,6 @@ void board_spi_release_bus(struct spi_slave *slave)km_hw_spi_bus_claim (0 ); } -#if defined(CONFIG_CMD_SF ) -int do_spi_toggle (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) -{ -if (argc <2 ) -return cmd_usage (cmdtp); - -if ((strcmp (argv[1 ],"off" ) ==0 )) { -printf ("SPI FLASH disabled, NAND enabled\n" ); -km_hw_spi_bus_claim (0 ); - }else if ((strcmp (argv[1 ],"on" ) ==0 )) { -printf ("SPI FLASH enabled, NAND disabled\n" ); -km_hw_spi_bus_claim (1 ); - }else { -return cmd_usage (cmdtp); - } - -return 0 ; -} - -U_BOOT_CMD ( - spitoggle,2 ,0 , do_spi_toggle, -"En-/disable SPI FLASH access" , -"<on|off> - Enable (on) or disable (off) SPI FLASH access\n" - ); -#endif -int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */
include/configs/km/km_arm.h +2 -3
@@ -237,9 +237,8 @@ int get_scl(void);#define CONFIG_KM_UPDATE_UBOOT \ "update=" \ - "spi on;sf probe 0;sf erase 0 50000;" \ - "sf write ${load_addr_r} 0 ${filesize};" \ - "spi off\0" + "sf probe 0;sf erase 0 50000;" \ + "sf write ${load_addr_r} 0 ${filesize};\0"/* * Default environment variables
Signature · 1 line
1.7.1
PATCH v2 13/19 arm/km: add kmnusa board support
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
This board is similar to portl2, but it has the u-boot environment in a SPI NOR flash and not in an i2c eeprom like portl2 have.
Some other details:
- IVM EEPROM is at adress: pca9547:70:9
- PCI is enabled
- PIGGY4 is connected via MV88E6352 simple switch. There is no phy between the simple switch and the kirkwood.
--- MAINTAINERS | 1 + board/keymile/km_arm/128M16-1.cfg | 290 +++++++++++++++++++++++++++++++++++++ board/keymile/km_arm/km_arm.c | 9 +- boards.cfg | 1 + include/configs/km/km_arm.h | 44 +++++- include/configs/km_kirkwood.h | 67 +++++++-- 6 files changed, 388 insertions(+), 24 deletions(-) create mode 100644 board/keymile/km_arm/128M16-1.cfg
MAINTAINERS +1 -0
@@ -743,6 +743,7 @@ Sergey Lapin <[email protected]> Valentin Longchamp <[email protected]> km_kirkwood ARM926EJS (Kirkwood SoC) + kmnusa ARM926EJS (Kirkwood SoC) mgcoge3un ARM926EJS (Kirkwood SoC) portl2 ARM926EJS (Kirkwood SoC)
board/keymile/km_arm/128M16-1.cfg new file +290 -0
290 lines not on this page · raw message
board/keymile/km_arm/km_arm.c +5 -4
@@ -134,10 +134,11 @@ int startup_allowed(void) }#endif -#if (defined(CONFIG_MGCOGE3UN )|defined(CONFIG_PORTL2 )) +#if (defined(CONFIG_MGCOGE3UN )|defined(CONFIG_PORTL2 )| \ + defined(CONFIG_KM_PIGGY4_88E6352 ))/* -* These two boards have always ethernet present. Its connected to the mv -* switch. +* All boards with PIGGY4 connected via a simple switch have ethernet always +* present. */ int ethernet_present (void ) {
@@ -367,7 +368,7 @@ void reset_phy(void)/* reset the phy */ miiphy_reset(name, CONFIG_PHY_BASE_ADR); } -#else +#elif !defined(CONFIG_KM_PIGGY4_88E6352)/* Configure and enable MV88E1118 PHY on the piggy*/ void reset_phy (void ) {
boards.cfg +1 -0
@@ -139,6 +139,7 @@ calimain arm arm926ejs calimain omicron dns325 arm arm926ejs - d-link kirkwood km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD,KM_DISABLE_PCI km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_RECONFIG_XLX +kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA mgcoge3un arm arm926ejs km_arm keymile kirkwood portl2 arm arm926ejs km_arm keymile kirkwood inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2
include/configs/km/km_arm.h +35 -9
75 lines not on this page · raw message
include/configs/km_kirkwood.h +56 -11
87 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 13/19 arm/km: add kmnusa board support
This board is similar to portl2, but it has the u-boot environment in a SPI NOR flash and not in an i2c eeprom like portl2 have.
Some other details:
- IVM EEPROM is at adress: pca9547:70:9
- PCI is enabled
- PIGGY4 is connected via MV88E6352 simple switch. There is no phy between the simple switch and the kirkwood.
---
Changes for v3:
- fix ODT timings for 128M16 SDRAM config
MAINTAINERS | 1 + board/keymile/km_arm/128M16-1.cfg | 294 +++++++++++++++++++++++++++++++++++++ board/keymile/km_arm/km_arm.c | 9 +- boards.cfg | 1 + include/configs/km/km_arm.h | 44 +++++- include/configs/km_kirkwood.h | 67 +++++++-- 6 files changed, 392 insertions(+), 24 deletions(-) create mode 100644 board/keymile/km_arm/128M16-1.cfg
MAINTAINERS +1 -0
@@ -738,6 +738,7 @@ Sergey Lapin <[email protected]> Valentin Longchamp <[email protected]> km_kirkwood ARM926EJS (Kirkwood SoC) + kmnusa ARM926EJS (Kirkwood SoC) mgcoge3un ARM926EJS (Kirkwood SoC) portl2 ARM926EJS (Kirkwood SoC)
board/keymile/km_arm/128M16-1.cfg new file +294 -0
294 lines not on this page · raw message
board/keymile/km_arm/km_arm.c +5 -4
@@ -134,10 +134,11 @@ int startup_allowed(void) }#endif -#if (defined(CONFIG_MGCOGE3UN )|defined(CONFIG_PORTL2 )) +#if (defined(CONFIG_MGCOGE3UN )|defined(CONFIG_PORTL2 )| \ + defined(CONFIG_KM_PIGGY4_88E6352 ))/* -* These two boards have always ethernet present. Its connected to the mv -* switch. +* All boards with PIGGY4 connected via a simple switch have ethernet always +* present. */ int ethernet_present (void ) {
@@ -367,7 +368,7 @@ void reset_phy(void)/* reset the phy */ miiphy_reset(name, CONFIG_PHY_BASE_ADR); } -#else +#elif !defined(CONFIG_KM_PIGGY4_88E6352)/* Configure and enable MV88E1118 PHY on the piggy*/ void reset_phy (void ) {
boards.cfg +1 -0
@@ -139,6 +139,7 @@ calimain arm arm926ejs calimain omicron dns325 arm arm926ejs - d-link kirkwood km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD,KM_DISABLE_PCI km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_RECONFIG_XLX +kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA mgcoge3un arm arm926ejs km_arm keymile kirkwood portl2 arm arm926ejs km_arm keymile kirkwood inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2
include/configs/km/km_arm.h +35 -9
75 lines not on this page · raw message
include/configs/km_kirkwood.h +56 -11
87 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v2 14/19 arm/km: add kmcoge5un board support
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
For u-boot this board is similar to mgcoge3un. But some differences are present. We have a different SDRAM on it and therefore a new SDRAM config file. Additionaly this board has a direct MAC/MAC connection from the kirkwood to a marvell simple switch without a phy inbetween, this needs a new configuration for the mvgbe driver.
--- MAINTAINERS | 1 + board/keymile/km_arm/256M8-1.cfg | 292 ++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/km_kirkwood.h | 16 ++- 4 files changed, 308 insertions(+), 2 deletions(-) create mode 100644 board/keymile/km_arm/256M8-1.cfg
MAINTAINERS +1 -0
@@ -745,6 +745,7 @@ Valentin Longchamp <[email protected]> km_kirkwood ARM926EJS (Kirkwood SoC) kmnusa ARM926EJS (Kirkwood SoC) mgcoge3un ARM926EJS (Kirkwood SoC) + kmcoge5un ARM926EJS (Kirkwood SoC) portl2 ARM926EJS (Kirkwood SoC) Nishanth Menon <[email protected]>
board/keymile/km_arm/256M8-1.cfg new file +292 -0
292 lines not on this page · raw message
boards.cfg +1 -0
@@ -141,6 +141,7 @@ km_kirkwood arm arm926ejs km_arm keymile km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_RECONFIG_XLX kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA mgcoge3un arm arm926ejs km_arm keymile kirkwood +kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KMCOGE5UN portl2 arm arm926ejs km_arm keymile kirkwood inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2 net2big_v2 arm arm926ejs net2big_v2 LaCie kirkwood lacie_kw:NET2BIG_V2
include/configs/km_kirkwood.h +14 -2
@@ -39,15 +39,18 @@#if defined(CONFIG_KM_KIRKWOOD )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood" +#define CONFIG_HOSTNAME km_kirkwood#undef CONFIG_KIRKWOOD_PCIE_INIT#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ #elif defined(CONFIG_KM_KIRKWOOD_PCI )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood PCI" +#define CONFIG_HOSTNAME km_kirkwood_pci#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ /* KM_NUSA */ #elif defined(CONFIG_KM_NUSA )#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/ #define CONFIG_IDENT_STRING "\nKeymile NUSA" +#define CONFIG_HOSTNAME kmnusa#undef CONFIG_SYS_KWD_CONFIG#define CONFIG_SYS_KWD_CONFIG \ $(SRCTREE)/$(CONFIG_BOARDDIR)/128M16-1.cfg
@@ -55,6 +58,17 @@#define CONFIG_KM_FPGA_CONFIG #define CONFIG_KM_PIGGY4_88E6352 +#elif defined(CONFIG_KMCOGE5UN ) +#define CONFIG_IDENT_STRING "\nKeymile COGE5UN" +#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/ +#undef CONFIG_SYS_KWD_CONFIG +#define CONFIG_SYS_KWD_CONFIG \ + $(SRCTREE)/$(CONFIG_BOARDDIR)/256M8-1.cfg +#define CONFIG_KM_ENV_IS_IN_SPI_NOR +#define CONFIG_PIGGY_MAC_ADRESS_OFFSET 3 +#define CONFIG_HOSTNAME kmcoge5un +#define CONFIG_KM_DISABLE_PCIE +#define CONFIG_KM_PIGGY4_88E6352 #else #error ("Board unsupported")#endif
@@ -62,8 +76,6 @@/* include common defines/options for all arm based Keymile boards */ #include "km/km_arm.h" -#define CONFIG_HOSTNAME km_kirkwood -#ifndef CONFIG_KM_ENV_IS_IN_SPI_NOR #define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ #endif
Signature · 1 line
1.7.1
PATCH v3 14/19 arm/km: add kmcoge5un board support
For u-boot this board is similar to mgcoge3un. But some differences are present. We have a different SDRAM on it and therefore a new SDRAM config file. Additionaly this board has a direct MAC/MAC connection from the kirkwood to a marvell simple switch without a phy inbetween, this needs a new configuration for the mvgbe driver.
---
Changes for v3:
- correct ODT timings for SDRAM. The configuraion was not considering the SDRAM internal chip delay.
MAINTAINERS | 1 + board/keymile/km_arm/256M8-1.cfg | 296 ++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/km_kirkwood.h | 16 ++- 4 files changed, 312 insertions(+), 2 deletions(-) create mode 100644 board/keymile/km_arm/256M8-1.cfg
MAINTAINERS +1 -0
@@ -740,6 +740,7 @@ Valentin Longchamp <[email protected]> km_kirkwood ARM926EJS (Kirkwood SoC) kmnusa ARM926EJS (Kirkwood SoC) mgcoge3un ARM926EJS (Kirkwood SoC) + kmcoge5un ARM926EJS (Kirkwood SoC) portl2 ARM926EJS (Kirkwood SoC) Nishanth Menon <[email protected]>
board/keymile/km_arm/256M8-1.cfg new file +296 -0
296 lines not on this page · raw message
boards.cfg +1 -0
@@ -141,6 +141,7 @@ km_kirkwood arm arm926ejs km_arm keymile km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_RECONFIG_XLX kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA mgcoge3un arm arm926ejs km_arm keymile kirkwood +kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KMCOGE5UN portl2 arm arm926ejs km_arm keymile kirkwood inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2 net2big_v2 arm arm926ejs net2big_v2 LaCie kirkwood lacie_kw:NET2BIG_V2
include/configs/km_kirkwood.h +14 -2
@@ -39,15 +39,18 @@#if defined(CONFIG_KM_KIRKWOOD )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood" +#define CONFIG_HOSTNAME km_kirkwood#undef CONFIG_KIRKWOOD_PCIE_INIT#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ #elif defined(CONFIG_KM_KIRKWOOD_PCI )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood PCI" +#define CONFIG_HOSTNAME km_kirkwood_pci#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ /* KM_NUSA */ #elif defined(CONFIG_KM_NUSA )#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/ #define CONFIG_IDENT_STRING "\nKeymile NUSA" +#define CONFIG_HOSTNAME kmnusa#undef CONFIG_SYS_KWD_CONFIG#define CONFIG_SYS_KWD_CONFIG \ $(SRCTREE)/$(CONFIG_BOARDDIR)/128M16-1.cfg
@@ -55,6 +58,17 @@#define CONFIG_KM_FPGA_CONFIG #define CONFIG_KM_PIGGY4_88E6352 +#elif defined(CONFIG_KMCOGE5UN ) +#define CONFIG_IDENT_STRING "\nKeymile COGE5UN" +#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/ +#undef CONFIG_SYS_KWD_CONFIG +#define CONFIG_SYS_KWD_CONFIG \ + $(SRCTREE)/$(CONFIG_BOARDDIR)/256M8-1.cfg +#define CONFIG_KM_ENV_IS_IN_SPI_NOR +#define CONFIG_PIGGY_MAC_ADRESS_OFFSET 3 +#define CONFIG_HOSTNAME kmcoge5un +#define CONFIG_KM_DISABLE_PCIE +#define CONFIG_KM_PIGGY4_88E6352 #else #error ("Board unsupported")#endif
@@ -62,8 +76,6 @@/* include common defines/options for all arm based Keymile boards */ #include "km/km_arm.h" -#define CONFIG_HOSTNAME km_kirkwood -#ifndef CONFIG_KM_ENV_IS_IN_SPI_NOR #define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ #endif
Signature · 1 line
1.7.1
PATCH v2 15/19 arm/km: convert mgcoge3un target to km_kirkwood
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
Use the generic header km_kirkwood.h and get rid of the board specific header.
--- board/keymile/km_arm/km_arm.c | 9 ++-- boards.cfg | 2 +- include/configs/km_kirkwood.h | 46 +++++++++++++++++++++ include/configs/mgcoge3un.h | 87 ----------------------------------------- 4 files changed, 51 insertions(+), 93 deletions(-) delete mode 100644 include/configs/mgcoge3un.h
board/keymile/km_arm/km_arm.c +4 -5
@@ -114,7 +114,7 @@ u32 kwmpp_config[] = { 0 }; -#if defined(CONFIG_MGCOGE3UN ) +#if defined(CONFIG_KM_MGCOGE3UN )/* * Wait for startup OK from mgcoge3ne */
@@ -134,8 +134,7 @@ int startup_allowed(void) }#endif -#if (defined(CONFIG_MGCOGE3UN )|defined(CONFIG_PORTL2 )| \ - defined(CONFIG_KM_PIGGY4_88E6352 )) +#if (defined(CONFIG_KM_PIGGY4_88E6061 )|defined(CONFIG_KM_PIGGY4_88E6352 ))/* * All boards with PIGGY4 connected via a simple switch have ethernet always * present.
@@ -203,7 +202,7 @@ int misc_init_r(void)printf ("Overwriting MACH_TYPE with %d!!!\n" , mach_type); gd->bd->bi_arch_number = mach_type; } -#if defined(CONFIG_MGCOGE3UN ) +#if defined(CONFIG_KM_MGCOGE3UN )char *wait_for_ne; wait_for_ne =getenv ("waitforne" );if (wait_for_ne !=NULL ) {
@@ -334,7 +333,7 @@ void dram_init_banksize(void) } } -#if (defined(CONFIG_MGCOGE3UN )|defined(CONFIG_PORTL2 )) +#if (defined(CONFIG_KM_MGCOGE3UN )|defined(CONFIG_PORTL2 ))#define PHY_LED_SEL 0x18#define PHY_LED0_LINK (0x5)
boards.cfg +1 -1
@@ -140,7 +140,7 @@ dns325 arm arm926ejs - d-link km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD,KM_DISABLE_PCI km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_RECONFIG_XLX kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA -mgcoge3un arm arm926ejs km_arm keymile kirkwood +mgcoge3un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_MGCOGE3UN kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KMCOGE5UN portl2 arm arm926ejs km_arm keymile kirkwood inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2
include/configs/km_kirkwood.h +46 -0
59 lines not on this page · raw message
include/configs/mgcoge3un.h deleted +0 -87
87 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v2 16/19 arm/km: remove portl2.h and use km_kirkwood instead
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
The additional headerfile is unneeded here, we can use the generic km_kirkwood.h instead. And we can use the better config option KM_PIGGY4_88E6061 for the specific features for boards with this design in km_arm.c.
--- board/keymile/km_arm/km_arm.c | 2 +- boards.cfg | 2 +- include/configs/km_kirkwood.h | 8 ++++ include/configs/portl2.h | 85 ----------------------------------------- 4 files changed, 10 insertions(+), 87 deletions(-) delete mode 100644 include/configs/portl2.h
board/keymile/km_arm/km_arm.c +1 -1
@@ -333,7 +333,7 @@ void dram_init_banksize(void) } } -#if (defined(CONFIG_KM_MGCOGE3UN )|defined(CONFIG_PORTL2 )) +#if (defined(CONFIG_KM_PIGGY4_88E6061 ))#define PHY_LED_SEL 0x18#define PHY_LED0_LINK (0x5)
boards.cfg +1 -1
@@ -142,7 +142,7 @@ km_kirkwood_pci arm arm926ejs km_arm keymile kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA mgcoge3un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_MGCOGE3UN kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KMCOGE5UN -portl2 arm arm926ejs km_arm keymile kirkwood +portl2 arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_PORTL2 inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2 net2big_v2 arm arm926ejs net2big_v2 LaCie kirkwood lacie_kw:NET2BIG_V2 netspace_max_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:NETSPACE_MAX_V2
include/configs/km_kirkwood.h +8 -0
@@ -83,6 +83,14 @@#define CONFIG_HOSTNAME kmcoge5un#define CONFIG_KM_DISABLE_PCIE #define CONFIG_KM_PIGGY4_88E6352 + +/* KM_PORTL2 */ +#elif defined(CONFIG_KM_PORTL2 ) +#define CONFIG_IDENT_STRING "\nKeymile Port-L2" +#define CONFIG_HOSTNAME portl2 +#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_PIGGY4_88E6061 +#else #error ("Board unsupported")#endif
include/configs/portl2.h deleted +0 -85
85 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v2 17/19 arm/km: correct init of 88e6352 switch in the reset_phy function
In reply to Valentin LongchampThis is achieved thanks to the support read/write regs for the external 88e6352 switch. The functions for this are added into an own file managed_switch.c. This is compiled if the define CONFIG_KM_MANAGED_SW_ADDR was set in the board setup. This define specifies the phy address.
--- board/keymile/common/common.h | 6 + board/keymile/km_arm/Makefile | 4 + board/keymile/km_arm/km_arm.c | 26 +++++- board/keymile/km_arm/managed_switch.c | 166 +++++++++++++++++++++++++++++++++ include/configs/km_kirkwood.h | 13 +++ 5 files changed, 214 insertions(+), 1 deletions(-) create mode 100644 board/keymile/km_arm/managed_switch.c
board/keymile/common/common.h +6 -0
@@ -125,6 +125,12 @@ struct bfticu_iomap {int ethernet_present (void );int ivm_read_eeprom (void ); + +int ext_switch_reg_write (const char *devname,u8 phy_addr,u8 port, +u8 reg,u16 data); +int ext_switch_reg_read (const char *devname,u8 phy_addr,u8 port, +u8 reg,u16 *data); +int set_km_env (void ); int fdt_set_node_and_value(void *blob, char *nodename,
board/keymile/km_arm/Makefile +4 -0
@@ -31,6 +31,10 @@ LIB = $(obj)lib$(BOARD).o COBJS := $(BOARD).o ../common/common.o ../common/ivm.o +ifdef CONFIG_KM_MANAGED_SW_ADDR +COBJS += managed_switch.o +endif + SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS))
board/keymile/km_arm/km_arm.c +25 -1
@@ -9,6 +9,9 @@* (C) Copyright 2010 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * +* (C) Copyright 2011, 2012 +* Valentin Lontgchamp, Keymile AG, valentin.longchamp at keymile.com +* * See file CREDITS for list of people who contributed to this * project. *
@@ -36,6 +39,7 @@#include <spi.h> #include <asm/io.h> #include <asm/arch/cpu.h> +#include <asm/errno.h> #include <asm/arch/kirkwood.h> #include <asm/arch/mpp.h>
@@ -367,7 +371,27 @@ void reset_phy(void)/* reset the phy */ miiphy_reset(name, CONFIG_PHY_BASE_ADR); } -#elif !defined(CONFIG_KM_PIGGY4_88E6352) +#elif defined(CONFIG_KM_PIGGY4_88E6352) + +#if defined(CONFIG_KM_MANAGED_SW_ADDR ) +void reset_phy (void ) +{ +char *name ="egiga0" ; + +if (miiphy_set_current_dev (name)) +return ; + +/* enable autoneg on port 0 phy */ +ext_switch_reg_write (name,CONFIG_KM_MANAGED_SW_ADDR ,0 ,0 ,0x3300 ); + +/* egress broadcast franes on all macs, with forwarding */ +ext_switch_reg_write (name,CONFIG_KM_MANAGED_SW_ADDR ,16 ,4 ,0x000f ); +ext_switch_reg_write (name,CONFIG_KM_MANAGED_SW_ADDR ,20 ,4 ,0x000f ); +ext_switch_reg_write (name,CONFIG_KM_MANAGED_SW_ADDR ,21 ,4 ,0x000f ); +} +#endif + +#else /* Configure and enable MV88E1118 PHY on the piggy*/ void reset_phy (void ) {
board/keymile/km_arm/managed_switch.c new file +166 -0
166 lines not on this page · raw message
include/configs/km_kirkwood.h +13 -0
@@ -58,6 +58,7 @@#define CONFIG_KM_FPGA_CONFIG #define CONFIG_KM_PIGGY4_88E6352 +#define CONFIG_KM_MANAGED_SW_ADDR 0x10/* KM_MGCOGE3UN */ #elif defined(CONFIG_KM_MGCOGE3UN )#define CONFIG_IDENT_STRING "\nKeymile COGE3UN"
@@ -131,6 +132,18 @@ MVGBE_SET_GMII_SPEED_TO_1000 |\ MVGBE_SET_MII_SPEED_TO_100) +/* +* There is no phy on the eth interface, but an external switch +* For kmcoge5un it is completely unmanaged, so we disable an access to it +* For km_nusa, we an MDIO(MII) interface that can configure the switch trough +* an indirect access, so we do not disable the MII +*/ +#ifndef CONFIG_KM_MANAGED_SW_ADDR +#undef CONFIG_MII +#undef CONFIG_CMD_MII +#undef CONFIG_RESET_PHY_R +#endif +#endif #ifdef CONFIG_KM_PIGGY4_88E6061
Signature · 1 line
1.7.1
PATCH v2 18/19 arm/km: enable BOCO2 FPGA download support
In reply to Valentin LongchampThis adds a first support of the FPGA download for a PCIe FPGA based on the BOCO2 CPLD.
This takes place in 3 steps, all done accessing the SPICTRL reg of the BOCO2:
1) start the FPGA config with an access to the FPGA_PROG bit
2) later in the boot sequence, wait for the FPGA_DONE bit to toggle to 1 for the end of the FPGA configuration (with a timeout)
3) reset the FPGA
4) finally remove the access to its config EEPROM from the FPGA so that the CPU can update the FPGA configuration when the kernel is running
The boards with a PCIe FPGA but without BOCO2 still are supported.
The config option name is CONFIG_KM_FPGA_CONFIG
--- board/keymile/common/common.h | 6 + board/keymile/km_arm/Makefile | 4 + board/keymile/km_arm/fpga_config.c | 212 ++++++++++++++++++++++++++++++++++++ board/keymile/km_arm/km_arm.c | 21 +++- boards.cfg | 2 +- include/configs/km/km_arm.h | 3 + include/configs/km_kirkwood.h | 8 +- 7 files changed, 246 insertions(+), 10 deletions(-) create mode 100644 board/keymile/km_arm/fpga_config.c
board/keymile/common/common.h +6 -0
@@ -131,6 +131,12 @@ int ext_switch_reg_write(const char *devname, u8 phy_addr, u8 port,int ext_switch_reg_read (const char *devname,u8 phy_addr,u8 port,u8 reg,u16 *data); + +int trigger_fpga_config (void ); +int wait_for_fpga_config (void ); +int fpga_reset (void ); +int toggle_eeprom_spi_bus (void ); +int set_km_env (void ); int fdt_set_node_and_value(void *blob, char *nodename,
board/keymile/km_arm/Makefile +4 -0
@@ -31,6 +31,10 @@ LIB = $(obj)lib$(BOARD).o COBJS := $(BOARD).o ../common/common.o ../common/ivm.o +ifdef CONFIG_KM_FPGA_CONFIG +COBJS += fpga_config.o +endif + ifdef CONFIG_KM_MANAGED_SW_ADDR COBJS += managed_switch.o endif
board/keymile/km_arm/fpga_config.c new file +212 -0
212 lines not on this page · raw message
board/keymile/km_arm/km_arm.c +15 -6
@@ -267,12 +267,6 @@ int board_early_init_f(void)kw_gpio_set_valid (KM_KIRKWOOD_ENV_WP ,38 );kw_gpio_direction_output (KM_KIRKWOOD_ENV_WP ,1 );#endif -#if defined(CONFIG_KM_RECONFIG_XLX ) -/* trigger the reconfiguration of the xilinx fpga */ -kw_gpio_set_valid (KM_XLX_PROGRAM_B_PIN ,1 ); -kw_gpio_direction_output (KM_XLX_PROGRAM_B_PIN ,0 ); -kw_gpio_direction_input (KM_XLX_PROGRAM_B_PIN ); -#endif return 0 ; }
@@ -281,6 +275,21 @@ int board_init(void)/* address of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ; +#if defined(CONFIG_KM_FPGA_CONFIG ) +trigger_fpga_config (); +#endif + +return 0 ; +} + +int board_late_init (void ) +{ +#if defined(CONFIG_KM_FPGA_CONFIG ) +wait_for_fpga_config (); +fpga_reset (); +toggle_eeprom_spi_bus (); +#endif +return 0 ; }
boards.cfg +1 -1
@@ -138,7 +138,7 @@ enbw_cmc arm arm926ejs enbw_cmc enbw calimain arm arm926ejs calimain omicron davinci dns325 arm arm926ejs - d-link kirkwood km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD,KM_DISABLE_PCI -km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_RECONFIG_XLX +km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_FPGA_CONFIG kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA mgcoge3un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_MGCOGE3UN kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KMCOGE5UN
include/configs/km/km_arm.h +3 -0
@@ -306,4 +306,7 @@ int get_scl(void);#define CONFIG_POST_EXTERNAL_WORD_FUNCS #define CONFIG_CMD_DIAG +/* we do the whole PCIe FPGA config stuff here */ +#define BOARD_LATE_INIT +#endif /* _CONFIG_KM_ARM_H */
include/configs/km_kirkwood.h +5 -3
@@ -175,10 +175,12 @@ MVGBE_SET_MII_SPEED_TO_100)#endif -/* GPIO Pin from kirkwood connected to PROGRAM_B pin of the xilinx FPGA */ -#define KM_XLX_PROGRAM_B_PIN 39 -#ifdef CONFIG_KM_DISABLE_PCI #undef CONFIG_KIRKWOOD_PCIE_INIT#endif + +#ifndef CONFIG_KM_FPGA_CONFIG +#undef BOARD_LATE_INIT +#endif +#endif /* _CONFIG_KM_KIRKWOOD */
Signature · 1 line
1.7.1
PATCH v2 19/19 arm/km: cleanup km_kirkwood boards
In reply to Valentin LongchampFrom: Holger Brunck <[email protected]>
Remove config options from boards.cfg and simply add one switch per board and differ afterwards in km_kirkwood.h between the features. More boards are upcoming and therefore it's easier to have this at one place.
--- boards.cfg | 4 ++-- include/configs/km_kirkwood.h | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-)
boards.cfg +2 -2
@@ -137,8 +137,8 @@ hawkboard_uart arm arm926ejs da8xxevm davinci enbw_cmc arm arm926ejs enbw_cmc enbw davinci calimain arm arm926ejs calimain omicron davinci dns325 arm arm926ejs - d-link kirkwood -km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD,KM_DISABLE_PCI -km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI,KM_FPGA_CONFIG +km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD +km_kirkwood_pci arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_KIRKWOOD_PCI kmnusa arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_NUSA mgcoge3un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_MGCOGE3UN kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KMCOGE5UN
include/configs/km_kirkwood.h +6 -1
@@ -37,15 +37,20 @@#ifndef _CONFIG_KM_KIRKWOOD_H#define _CONFIG_KM_KIRKWOOD_H +/* KM_KIRKWOOD */ #if defined(CONFIG_KM_KIRKWOOD )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood"#define CONFIG_HOSTNAME km_kirkwood -#undef CONFIG_KIRKWOOD_PCIE_INIT +#define CONFIG_KM_DISABLE_PCIE #define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ + +/* KM_KIRKWOOD_PCI */ #elif defined(CONFIG_KM_KIRKWOOD_PCI )#define CONFIG_IDENT_STRING "\nKeymile Kirkwood PCI"#define CONFIG_HOSTNAME km_kirkwood_pci#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define CONFIG_KM_FPGA_CONFIG +/* KM_NUSA */ #elif defined(CONFIG_KM_NUSA )#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/
Signature · 1 line
1.7.1
v2 cover updates for keymile arm boards
In reply to Valentin LongchampPrafulla,
Quoted 52 lines · Valentin Longchamp
This patch series updates keymile boards with Kirkwood CPU and adds two new boards. This new boards are kmnusa and kmcoge5un. Also the existing boards with own config files were migrated to the common header
km_kirkwood.h. Some small adaption in generic kirkwood code was needed due to two new features on the new board. First one is that the u-boot environment is in the SPI NOR flash and the second one is the direct MAC/MAC connection from the mvgbe interface to an simple switch.Changes for v2:
- removed the two patches "spi/kirkwood: add weak functions board_spi_bus_claim/release" and "mvgbe: remove warning for unused methods" from the series as they are were independent from it. The series is however dependent of these two patches.Holger Brunck (13):
arm/km: add board type to boards.cfg
arm/km: add piggy mac adress offset for mgcoge3un arm/km: rename CONFIG optionCONFIG_KM_DEF_ENV_UPDATEarm/km: useARRAY_SIZEmacro
arm/km: fix wrong comment in SDRAM config for mgcoge3un arm/km: change maintainer for mgcoge3un arm/km: removeCONFIG_RESET_PHY_R
km/arm: remove spi toggle command
arm/km: add kmnusa board support
arm/km: add kmcoge5un board support
arm/km: convert mgcoge3un target tokm_kirkwoodarm/km: removeportl2.hand usekm_kirkwoodinstead arm/km: cleanupkm_kirkwoodboardsValentin Longchamp (6):
arm/km: enable mii cmd
arm/km: use correctkw_gpiofunction for NAND/SPI switching arm/km: implement weak function board_spi_clam_bus/release arm/kirkwood: protect theENV_SPI#defines
arm/km: correct init of 88e6352 switch in thereset_phyfunction arm/km: enable BOCO2 FPGA download supportMAINTAINERS | 4 +- arch/arm/include/asm/arch-kirkwood/config.h | 12 +- board/keymile/common/common.h | 12 + board/keymile/km_arm/128M16-1.cfg | 290 ++++++++++++++++++++++++++ board/keymile/km_arm/256M8-1.cfg | 292 +++++++++++++++++++++++++++ board/keymile/km_arm/Makefile | 8 + board/keymile/km_arm/fpga_config.c | 212 +++++++++++++++++++ board/keymile/km_arm/km_arm.c | 119 +++++++----- board/keymile/km_arm/kwbimage-memphis.cfg | 2 +- board/keymile/km_arm/managed_switch.c | 166 +++++++++++++++ boards.cfg | 10 +- include/configs/km/km_arm.h | 60 ++++-- include/configs/km_kirkwood.h | 157 +++++++++++++-- include/configs/mgcoge3un.h | 86 --------
Quoted 9 lines
include/configs/portl2.h | 85 -------- 15 files changed, 1256 insertions(+), 259 deletions(-) create mode 100644 board/keymile/km_arm/128M16-1.cfg create mode 100644 board/keymile/km_arm/256M8-1.cfg create mode 100644 board/keymile/km_arm/fpga_config.c create mode 100644 board/keymile/km_arm/managed_switch.c delete mode 100644 include/configs/mgcoge3un.h delete mode 100644 include/configs/portl2.h
We would love to get a feedback from you about this series. The merge window for 2012.06 is soon over and we would like to see these in the marvell tree before your pull request for this merge window (I guess you have a pull request planned for the current merge window ?)
Best Regards
Signature · 13 lines
Valentin Longchamp Embedded Software Engineer Hardware and Chip Integration ______________________________________ KEYMILE AG Schwarzenburgstr. 73 CH-3097 Liebefeld Phone +41 31 377 1318 Fax +41 31 377 1212 valentin.longchamp at keymile.com www.keymile.com ______________________________________ KEYMILE: A Specialist as a Partner
v2 cover updates for keymile arm boards
Quoted 78 lines
-----Original Message-----
From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
Sent: 27 March 2012 19:02
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de
Subject: Re: [PATCH v2 00/19] updates for keymile arm boardsPrafulla,
Quoted 6 lines · Valentin Longchamp
This patch series updates keymile boards with Kirkwood CPU and adds two new boards. This new boards are kmnusa and kmcoge5un. Also the existing boards with own config files were migrated to the common header
km_kirkwood.h. Some small adaption in generic kirkwood code was needed due to two new features on the new board. First one is that the u-boot environment is in the SPI NOR flash and the secondone
Quoted 32 lines
is the direct MAC/MAC connection from the mvgbe interface to an simple switch.
Changes for v2:
- removed the two patches "spi/kirkwood: add weak functions board_spi_bus_claim/release" and "mvgbe: remove warning for unused methods" from the series as they are were independent from it. The series is however dependent of these two patches.Holger Brunck (13):
arm/km: add board type to boards.cfg
arm/km: add piggy mac adress offset for mgcoge3un arm/km: rename CONFIG optionCONFIG_KM_DEF_ENV_UPDATEarm/km: useARRAY_SIZEmacro
arm/km: fix wrong comment in SDRAM config for mgcoge3un arm/km: change maintainer for mgcoge3un arm/km: removeCONFIG_RESET_PHY_R
km/arm: remove spi toggle command
arm/km: add kmnusa board support
arm/km: add kmcoge5un board support
arm/km: convert mgcoge3un target tokm_kirkwoodarm/km: removeportl2.hand usekm_kirkwoodinstead arm/km: cleanupkm_kirkwoodboardsValentin Longchamp (6):
arm/km: enable mii cmd
arm/km: use correctkw_gpiofunction for NAND/SPI switching arm/km: implement weak function board_spi_clam_bus/release arm/kirkwood: protect theENV_SPI#defines
arm/km: correct init of 88e6352 switch in thereset_phyfunction arm/km: enable BOCO2 FPGA download supportQuoted 4 lines
MAINTAINERS | 4 +- arch/arm/include/asm/arch-kirkwood/config.h | 12 +- board/keymile/common/common.h | 12 + board/keymile/km_arm/128M16-1.cfg | 290++++++++++++++++++++++++++
Quoted 1 line
board/keymile/km_arm/256M8-1.cfg | 292+++++++++++++++++++++++++++
Quoted 2 lines
board/keymile/km_arm/Makefile | 8 + board/keymile/km_arm/fpga_config.c | 212+++++++++++++++++++
Quoted 7 lines
board/keymile/km_arm/km_arm.c | 119 +++++++----- board/keymile/km_arm/kwbimage-memphis.cfg | 2 +- board/keymile/km_arm/managed_switch.c | 166 +++++++++++++++ boards.cfg | 10 +- include/configs/km/km_arm.h | 60 ++++-- include/configs/km_kirkwood.h | 157 +++++++++++++-- include/configs/mgcoge3un.h | 86 --------Quoted 9 lines
include/configs/portl2.h | 85 -------- 15 files changed, 1256 insertions(+), 259 deletions(-) create mode 100644 board/keymile/km_arm/128M16-1.cfg create mode 100644 board/keymile/km_arm/256M8-1.cfg create mode 100644 board/keymile/km_arm/fpga_config.c create mode 100644 board/keymile/km_arm/managed_switch.c delete mode 100644 include/configs/mgcoge3un.h delete mode 100644 include/configs/portl2.h
Quoted 7 lines
We would love to get a feedback from you about this series. The merge window for
2012.06 is soon over and we would like to see these in the marvell tree before
your pull request for this merge window (I guess you have a pull request planned
for the current merge window ?)
Since you have posted patched within/before merge window closure, those are eligible to go on master branch. So don't worry, I will review them.
Regards..
Prafulla . . .
Quoted 17 lines
Best Regards
--
Valentin Longchamp
Embedded Software Engineer
Hardware and Chip Integration
______________________________________
KEYMILE AG
Schwarzenburgstr. 73
CH-3097 Liebefeld
Phone +41 31 377 1318
Fax +41 31 377 1212
valentin.longchamp at keymile.com
www.keymile.com
______________________________________
KEYMILE: A Specialist as a Partner