Skip to contentSkip to conversation

powerpc/p3060qds: Add board related support for P3060QDS platform

PATCH Superseded Kumar Gala 2 participants 2 messages Sep 15, 2011 – Oct 6, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 powerpc/p3060qds: Add board related support for P3060QDS platform

From: Shengzhou Liu <[email protected]>

The P3060QDS is a Freescale reference board for the six-core P3060 SOC.

P3060QDS Board Overview:
Memory subsystem:
- 2G Bytes unbuffered DDR3 SDRAM SO-DIMM(64bit bus)
- 128M Bytes NOR flash single-chip memory
- 16M Bytes SPI flash
- 8K Bytes AT24C64 I2C EEPROM for RCW
Ethernet:
- Eight Ethernet controllers (4x1G + 4x1G/2.5G)
- Three VSC8641 PHYs on board (2xRGMII + 1xMII)
- Suport multiple Vitesse VSC8234 SGMII Cards in Slot1/2/3
PCIe: Two PCI Express 2.0 controllers/ports
USB: Two USB2.0, USB1(TYPE-A) and USB2(TYPE-AB) on board
I2C: Four I2C controllers
UART: Supports two dUARTs up to 115200 bps for console
RapidIO: Two RapidIO, sRIO1 and sRIO2

---
 board/freescale/common/Makefile      |    3 +
 board/freescale/common/ics307_clk.c  |   21 +-
 board/freescale/common/qixis.c       |  151 ++++++++++++
 board/freescale/common/qixis.h       |  101 ++++++++
 board/freescale/p3060qds/Makefile    |   54 ++++
 board/freescale/p3060qds/ddr.c       |  281 ++++++++++++++++++++++
 board/freescale/p3060qds/eth.c       |  440 ++++++++++++++++++++++++++++++++++
 board/freescale/p3060qds/fixed_ddr.c |  214 +++++++++++++++++
 board/freescale/p3060qds/p3060qds.c  |  239 ++++++++++++++++++
 board/freescale/p3060qds/p3060qds.h  |   30 +++
 boards.cfg                           |    2 +
 doc/README.p3060qds                  |  111 +++++++++
 include/configs/P3060QDS.h           |   39 +++
 include/configs/corenet_ds.h         |    4 +
 14 files changed, 1682 insertions(+), 8 deletions(-)
 create mode 100644 board/freescale/common/qixis.c
 create mode 100644 board/freescale/common/qixis.h
 create mode 100644 board/freescale/p3060qds/Makefile
 create mode 100644 board/freescale/p3060qds/ddr.c
 create mode 100644 board/freescale/p3060qds/eth.c
 create mode 100644 board/freescale/p3060qds/fixed_ddr.c
 create mode 100644 board/freescale/p3060qds/p3060qds.c
 create mode 100644 board/freescale/p3060qds/p3060qds.h
 create mode 100644 doc/README.p3060qds
 create mode 100644 include/configs/P3060QDS.h
board/freescale/common/Makefile +3 -0
index b27f054..2b9cc3f 100644
@@ -34,6 +34,7 @@ COBJS-$(CONFIG_FSL_VIA)		+= cds_via.o
 COBJS-$(CONFIG_FMAN_ENET)	+= fman.o
 COBJS-$(CONFIG_FSL_PIXIS)	+= pixis.o
 COBJS-$(CONFIG_FSL_NGPIXIS)	+= ngpixis.o
+COBJS-$(CONFIG_FSL_QIXIS)	+= qixis.o
 COBJS-$(CONFIG_PQ_MDS_PIB)	+= pq-mds-pib.o
 COBJS-$(CONFIG_ID_EEPROM)	+= sys_eeprom.o
 COBJS-$(CONFIG_FSL_SGMII_RISER)	+= sgmii_riser.o
@@ -50,12 +51,14 @@ COBJS-$(CONFIG_MPC8572DS)	+= ics307_clk.o
 COBJS-$(CONFIG_P1022DS)		+= ics307_clk.o
 COBJS-$(CONFIG_P2020DS)		+= ics307_clk.o
 COBJS-$(CONFIG_P3041DS)		+= ics307_clk.o
+COBJS-$(CONFIG_P3060QDS)       	+= ics307_clk.o
 COBJS-$(CONFIG_P4080DS)		+= ics307_clk.o
 COBJS-$(CONFIG_P5020DS)		+= ics307_clk.o
 
 # deal with common files for P-series corenet based devices
 SUBLIB-$(CONFIG_P2041RDB)	+= p_corenet/libp_corenet.o
 SUBLIB-$(CONFIG_P3041DS)	+= p_corenet/libp_corenet.o
+SUBLIB-$(CONFIG_P3060QDS)	+= p_corenet/libp_corenet.o
 SUBLIB-$(CONFIG_P4080DS)	+= p_corenet/libp_corenet.o
 SUBLIB-$(CONFIG_P5020DS)	+= p_corenet/libp_corenet.o
 
board/freescale/common/ics307_clk.c +13 -8
index 89d8810..596ed3a 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Freescale Semiconductor, Inc.
+ * Copyright 2010-2011 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -25,10 +25,15 @@
 
 #include "ics307_clk.h"
 
-#ifdef CONFIG_FSL_NGPIXIS
+#if defined(CONFIG_FSL_NGPIXIS)
 #include "ngpixis.h"
+#define fpga_reg pixis
+#elif defined(CONFIG_FSL_QIXIS)
+#include "qixis.h"
+#define fpga_reg ((struct qixis *)QIXIS_BASE)
 #else
 #include "pixis.h"
+#define fpga_reg pixis
 #endif
 
 /* decode S[0-2] to Output Divider (OD) */
@@ -74,15 +79,15 @@ static unsigned long ics307_clk_freq(u8 cw0, u8 cw1, u8 cw2)
 unsigned long get_board_sys_clk(void)
 {
 	return ics307_clk_freq(
-			in_8(&pixis->sclk[0]),
-			in_8(&pixis->sclk[1]),
-			in_8(&pixis->sclk[2]));
+			in_8(&fpga_reg->sclk[0]),
+			in_8(&fpga_reg->sclk[1]),
+			in_8(&fpga_reg->sclk[2]));
 }
 
 unsigned long get_board_ddr_clk(void)
 {
 	return ics307_clk_freq(
-			in_8(&pixis->dclk[0]),
-			in_8(&pixis->dclk[1]),
-			in_8(&pixis->dclk[2]));
+			in_8(&fpga_reg->dclk[0]),
+			in_8(&fpga_reg->dclk[1]),
+			in_8(&fpga_reg->dclk[2]));
 }
board/freescale/common/qixis.c new file +151 -0

151 lines not on this page · raw message

board/freescale/common/qixis.h new file +101 -0

101 lines not on this page · raw message

board/freescale/p3060qds/Makefile new file +54 -0

54 lines not on this page · raw message

board/freescale/p3060qds/ddr.c new file +281 -0

281 lines not on this page · raw message

board/freescale/p3060qds/eth.c new file +440 -0

440 lines not on this page · raw message

board/freescale/p3060qds/fixed_ddr.c new file +214 -0

214 lines not on this page · raw message

board/freescale/p3060qds/p3060qds.c new file +239 -0

239 lines not on this page · raw message

board/freescale/p3060qds/p3060qds.h new file +30 -0
new file mode 100644
index 0000000..3da6815
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+#ifndef __P3060QDS_H__
+#define __P3060QDS_H__
+
+#include <asm/fsl_ddr_sdram.h>
+#include <asm/u-boot.h>
+
+void fdt_fixup_board_enet(void *blob);
+void pci_of_setup(void *blob, bd_t *bd);
+extern fixed_ddr_parm_t fixed_ddr_parm_0[];
+
+#endif
boards.cfg +2 -0
index c673b4f..a39aea0 100644
@@ -677,6 +677,8 @@ P3041DS_NAND		     powerpc     mpc85xx     corenet_ds          freescale      -
 P3041DS_SDCARD		     powerpc     mpc85xx     corenet_ds          freescale      -           P3041DS:RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF80000
 P3041DS_SECURE_BOOT          powerpc     mpc85xx     corenet_ds          freescale      -           P3041DS:SECURE_BOOT
 P3041DS_SPIFLASH	     powerpc     mpc85xx     corenet_ds          freescale      -           P3041DS:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000
+P3060QDS		     powerpc	 mpc85xx     p3060qds		 freescale
+P3060QDS_SPIFLASH            powerpc     mpc85xx     p3060qds		 freescale	-	    P3060QDS:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000
 P4080DS                      powerpc     mpc85xx     corenet_ds          freescale
 P4080DS_SDCARD		     powerpc     mpc85xx     corenet_ds          freescale      -           P4080DS:RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF80000
 P4080DS_SECURE_BOOT          powerpc     mpc85xx     corenet_ds          freescale      -           P4080DS:SECURE_BOOT
doc/README.p3060qds new file +111 -0

111 lines not on this page · raw message

include/configs/P3060QDS.h new file +39 -0
new file mode 100644
index 0000000..bc89b4d
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/*
+ * P3060 QDS board configuration file
+ */
+#define CONFIG_P3060QDS
+#define CONFIG_PHYS_64BIT
+#define CONFIG_PPC_P3060
+#define CONFIG_FSL_QIXIS
+
+#define CONFIG_NAND_FSL_ELBC
+
+#define CONFIG_ICS307_REFCLK_HZ	25000000  /* ICS307 ref clk freq */
+
+#define CONFIG_SPI_FLASH_ATMEL
+#define CONFIG_SPI_FLASH_EON
+#define CONFIG_SPI_FLASH_SST
+
+#include "corenet_ds.h"
include/configs/corenet_ds.h +4 -0
index 4bbca88..e656f1d 100644
@@ -168,7 +168,11 @@
 #define CONFIG_DDR_SPD
 #define CONFIG_FSL_DDR3
 
+#ifdef CONFIG_P3060QDS
+#define CONFIG_SYS_SPD_BUS_NUM	0
+#else
 #define CONFIG_SYS_SPD_BUS_NUM	1
+#endif
 #define SPD_EEPROM_ADDRESS1	0x51
 #define SPD_EEPROM_ADDRESS2	0x52
 #define SPD_EEPROM_ADDRESS	SPD_EEPROM_ADDRESS1	/* for p3041/p5010 */
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 powerpc/p3060qds: Add board related support for P3060QDS platform

Dear Kumar Gala,

Quoted 40 lines · In message <[email protected]> you…

From: Shengzhou Liu <[email protected]>

The P3060QDS is a Freescale reference board for the six-core P3060 SOC.

P3060QDS Board Overview:
Memory subsystem:
- 2G Bytes unbuffered DDR3 SDRAM SO-DIMM(64bit bus)
- 128M Bytes NOR flash single-chip memory
- 16M Bytes SPI flash
- 8K Bytes AT24C64 I2C EEPROM for RCW
Ethernet:
- Eight Ethernet controllers (4x1G + 4x1G/2.5G)
- Three VSC8641 PHYs on board (2xRGMII + 1xMII)
- Suport multiple Vitesse VSC8234 SGMII Cards in Slot1/2/3
PCIe: Two PCI Express 2.0 controllers/ports
USB: Two USB2.0, USB1(TYPE-A) and USB2(TYPE-AB) on board
I2C: Four I2C controllers
UART: Supports two dUARTs up to 115200 bps for console
RapidIO: Two RapidIO, sRIO1 and sRIO2

---
 board/freescale/common/Makefile      |    3 +
 board/freescale/common/ics307_clk.c  |   21 +-
 board/freescale/common/qixis.c       |  151 ++++++++++++
 board/freescale/common/qixis.h       |  101 ++++++++
 board/freescale/p3060qds/Makefile    |   54 ++++
 board/freescale/p3060qds/ddr.c       |  281 ++++++++++++++++++++++
 board/freescale/p3060qds/eth.c       |  440 ++++++++++++++++++++++++++++++++++
 board/freescale/p3060qds/fixed_ddr.c |  214 +++++++++++++++++
 board/freescale/p3060qds/p3060qds.c  |  239 ++++++++++++++++++
 board/freescale/p3060qds/p3060qds.h  |   30 +++
 boards.cfg                           |    2 +
 doc/README.p3060qds                  |  111 +++++++++
 include/configs/P3060QDS.h           |   39 +++
 include/configs/corenet_ds.h         |    4 +
 14 files changed, 1682 insertions(+), 8 deletions(-)
 create mode 100644 board/freescale/common/qixis.c
 create mode 100644 board/freescale/common/qixis.h
Quoted 8 lines
 create mode 100644 board/freescale/p3060qds/Makefile
 create mode 100644 board/freescale/p3060qds/ddr.c
 create mode 100644 board/freescale/p3060qds/eth.c
 create mode 100644 board/freescale/p3060qds/fixed_ddr.c
 create mode 100644 board/freescale/p3060qds/p3060qds.c
 create mode 100644 board/freescale/p3060qds/p3060qds.h
 create mode 100644 doc/README.p3060qds
 create mode 100644 include/configs/P3060QDS.h

Checkpatch says:

WARNING: static const char * array should probably be static const char * const #1569: FILE: board/freescale/p3060qds/p3060qds.c:84:
+ static const char *freq[] = {"100", "125", "Reserved",

Please clean up and resubmit. Thanks.

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
Conceptual integrity in turn dictates that the  design  must  proceed
from  one  mind,  or  from  a  very small number of agreeing resonant
minds.               - Frederick Brooks Jr., "The Mythical Man Month"