powerpc/85xx: Add support for new P102x/P2020 RDB style boards
PATCH 1/1 powerpc/85xx: Add support for new P102x/P2020 RDB style boards
From: Li Yang <[email protected]>
The following boards share a common design but with minor variations between them:
P1020MSBG-PC
P1020RDB-PC
P1020UTM-PC
P1021RDB-PC
P1024RDB
P1025RDB
P2020RDB-PC
The P1020RDB-PC shares its roots in the existing P1020RDB board design, however uses DDR3 instead of DDR2.
P2020RDB-PC differs from the P102x RDB-PC with 64-bit DDR and 100Mhz SYSCLK.
Key features on these boards include:
* DDR3
* NOR flash
* NAND flash (on RDB's only)
* SPI flash (on RDB's only)
* SDHC/MMC card slot
* VSC7385 Ethernet switch (on P1020MBG, P1020RDB, & P1021RDB)
* PCIE slot and mini-PCIE slots
As these boards use soldered DDR chips not regular DIMMs, an on-board EEPROM is used to store SPD data. In case of absent or corrupted SPD, falling back to timing data embedded in the source code will be used. Raw timing data is extracted from DDR chip datasheet. Different speeds of DDR are supported with this approach. ODT option is forced to fit this set of boards, again because they don't have regular DIMMs.
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS is defined as 5ms to meet specification for writing timing.
VSC firmware Address is defined by default in config file for eTSEC1.
SD width is based off DIP switch. DIP switch is detected on the board by reading i2c bus and setting the appropriate mux values.
Some boards have QE module in the silicon (P1021 and P1025). QE and eLBC have pins multiplexing. QE function needs to be disabled to access Nor Flash and CPLD. QE-UEC and QE-UART can be enabled for linux kernel by setting "qe" in hwconfig. In addition, QE-UEC and QE-TDM also have pins multiplexing, to enable QE-TDM for linux kernel, set "qe;tdm" in hwconfig. Syntax is as below
'setenv hwconfig qe' to enable QE UEC/UART and disable Nor-Flash/CPLD. 'setenv hwconfig 'qe;tdm'' to enalbe QE TDM and disable Nor-Flash/CPLD.
--- board/freescale/p1_p2_rdb_pc/Makefile | 52 ++ board/freescale/p1_p2_rdb_pc/ddr.c | 292 ++++++ board/freescale/p1_p2_rdb_pc/law.c | 39 + board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 449 ++++++++++ board/freescale/p1_p2_rdb_pc/tlb.c | 114 +++ boards.cfg | 42 + doc/README.p1_p2_rdb_pc | 46 + include/configs/p1_p2_rdb_pc.h | 995 +++++++++++++++++++++ nand_spl/board/freescale/p1_p2_rdb_pc/Makefile | 137 +++ nand_spl/board/freescale/p1_p2_rdb_pc/nand_boot.c | 134 +++ 10 files changed, 2300 insertions(+), 0 deletions(-) create mode 100644 board/freescale/p1_p2_rdb_pc/Makefile create mode 100644 board/freescale/p1_p2_rdb_pc/ddr.c create mode 100644 board/freescale/p1_p2_rdb_pc/law.c create mode 100644 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c create mode 100644 board/freescale/p1_p2_rdb_pc/tlb.c create mode 100644 doc/README.p1_p2_rdb_pc create mode 100644 include/configs/p1_p2_rdb_pc.h create mode 100644 nand_spl/board/freescale/p1_p2_rdb_pc/Makefile create mode 100644 nand_spl/board/freescale/p1_p2_rdb_pc/nand_boot.c
board/freescale/p1_p2_rdb_pc/Makefile new file +52 -0
@@ -0,0 +1,52 @@ +# +# Copyright 2010-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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS-y += $(BOARD).o +COBJS-y += ddr.o +COBJS-y += law.o +COBJS-y += tlb.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) $(SOBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/freescale/p1_p2_rdb_pc/ddr.c new file +292 -0
292 lines not on this page · raw message
board/freescale/p1_p2_rdb_pc/law.c new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright 2010-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 +*/ + +#include <common.h> +#include <asm/fsl_law.h> +#include <asm/mmu.h> + +struct law_entry law_table[] = { +SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_64M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_CPLD_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_PMC_BASE_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_LBC ), +#ifdef CONFIG_SYS_NAND_BASE_PHYS +SET_LAW (CONFIG_SYS_NAND_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +#endif +#ifdef CONFIG_VSC7385_ENET +SET_LAW (CONFIG_SYS_VSC7385_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +#endif +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c new file +449 -0
449 lines not on this page · raw message
board/freescale/p1_p2_rdb_pc/tlb.c new file +114 -0
114 lines not on this page · raw message
boards.cfg +42 -0
64 lines not on this page · raw message
doc/README.p1_p2_rdb_pc new file +46 -0
46 lines not on this page · raw message
include/configs/p1_p2_rdb_pc.h new file +995 -0
995 lines not on this page · raw message
nand_spl/board/freescale/p1_p2_rdb_pc/Makefile new file +137 -0
137 lines not on this page · raw message
nand_spl/board/freescale/p1_p2_rdb_pc/nand_boot.c new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH 1/1 powerpc/85xx: Add support for new P102x/P2020 RDB style boards
Quoted 5 lines · Kumar Gala
include/configs/p1_p2_rdb_pc.h new file +5
-0+/* CCSRBAR PHYSICAL Address */ +/* IN case of NAND bootloader relocate CCSRBAR in RAMboot code not in the 4k +? ? ? SPL code*/ +#if defined(CONFIG_NAND_U_BOOT ) && defined(CONFIG_NAND_SPL ) +#define CONFIG_SYS_CCSRBAR_PHYS ? ? ? ?CONFIG_SYS_CCSRBAR_DEFAULT
include/configs/p1_p2_rdb_pc.h
Quoted 10 lines
include/configs/p1_p2_rdb_pc.h new file +10
-0+#else +#ifdef CONFIG_PHYS_64BIT +#define CONFIG_SYS_CCSRBAR_PHYS ? ? ? ?0xfffe00000ull +#else +#define CONFIG_SYS_CCSRBAR_PHYS ? ? ? ?CONFIG_SYS_CCSRBAR ? ? ?/* physical addr of */ + ? ? ? /* CCSRBAR */ +#endif +#endif +#define CONFIG_SYS_IMMR ? ? ? ?CONFIG_SYS_CCSRBAR ? ? ?/* PQII uses */ + ? ? ? /* CONFIG_SYS_IMMR */
This conflicts with the CCSR patch I posted a couple days ago. What order are you going to be applying these patches?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
PATCH 1/1 powerpc/85xx: Add support for new P102x/P2020 RDB style boards
Quoted 12 lines · On Jul 27, 2011, at 7:58 AM, Tabi Timur-B04825 wrote:
Quoted 10 lines · Kumar Gala
include/configs/p1_p2_rdb_pc.h new file +10
-0+/* CCSRBAR PHYSICAL Address */ +/* IN case of NAND bootloader relocate CCSRBAR in RAMboot code not in the 4k +SPL code*/ +#if defined(CONFIG_NAND_U_BOOT ) && defined(CONFIG_NAND_SPL ) +#define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR_DEFAULT +#else +#ifdef CONFIG_PHYS_64BIT +#define CONFIG_SYS_CCSRBAR_PHYS 0xfffe00000ull +#else +#define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR/* physical addr of */
Quoted 8 lines
include/configs/p1_p2_rdb_pc.h line 241
Quoted 5 lines
include/configs/p1_p2_rdb_pc.h new file +5
-0+/* CCSRBAR */ +#endif +#endif +#define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR/* PQII uses */ +/* CONFIG_SYS_IMMR */ This conflicts with the CCSR patch I posted a couple days ago. What order are you going to be applying these patches?
I'm wanting to apply the CCSR patch first (so we'll need to update the board ports).
- k
PATCH v2 1/1 powerpc/85xx: Add support for new P102x/P2020 RDB style boards
In reply to Kumar GalaFrom: Li Yang <[email protected]>
The following boards share a common design but with minor variations between them:
P1020MSBG-PC
P1020RDB-PC
P1020UTM-PC
P1021RDB-PC
P1024RDB
P1025RDB
P2020RDB-PC
The P1020RDB-PC shares its roots in the existing P1020RDB board design, however uses DDR3 instead of DDR2.
P2020RDB-PC differs from the P102x RDB-PC with 64-bit DDR and 100Mhz SYSCLK.
Key features on these boards include:
* DDR3
* NOR flash
* NAND flash (on RDB's only)
* SPI flash (on RDB's only)
* SDHC/MMC card slot
* VSC7385 Ethernet switch (on P1020MBG, P1020RDB, & P1021RDB)
* PCIE slot and mini-PCIE slots
As these boards use soldered DDR chips not regular DIMMs, an on-board EEPROM is used to store SPD data. In case of absent or corrupted SPD, falling back to timing data embedded in the source code will be used. Raw timing data is extracted from DDR chip datasheet. Different speeds of DDR are supported with this approach. ODT option is forced to fit this set of boards, again because they don't have regular DIMMs.
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS is defined as 5ms to meet specification for writing timing.
VSC firmware Address is defined by default in config file for eTSEC1.
SD width is based off DIP switch. DIP switch is detected on the board by reading i2c bus and setting the appropriate mux values.
Some boards have QE module in the silicon (P1021 and P1025). QE and eLBC have pins multiplexing. QE function needs to be disabled to access Nor Flash and CPLD. QE-UEC and QE-UART can be enabled for linux kernel by setting "qe" in hwconfig. In addition, QE-UEC and QE-TDM also have pins multiplexing, to enable QE-TDM for linux kernel, set "qe;tdm" in hwconfig. Syntax is as below
'setenv hwconfig qe' to enable QE UEC/UART and disable Nor-Flash/CPLD. 'setenv hwconfig 'qe;tdm'' to enalbe QE TDM and disable Nor-Flash/CPLD.
---
v2:
* cleaned up useless typedef
* cleaned up some trailing whitespace
* changes based on CCSR cleanup patch
board/freescale/p1_p2_rdb_pc/Makefile | 52 ++ board/freescale/p1_p2_rdb_pc/ddr.c | 292 ++++++ board/freescale/p1_p2_rdb_pc/law.c | 39 + board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 449 ++++++++++ board/freescale/p1_p2_rdb_pc/tlb.c | 114 +++ boards.cfg | 42 + doc/README.p1_p2_rdb_pc | 46 + include/configs/p1_p2_rdb_pc.h | 981 +++++++++++++++++++++ nand_spl/board/freescale/p1_p2_rdb_pc/Makefile | 137 +++ nand_spl/board/freescale/p1_p2_rdb_pc/nand_boot.c | 134 +++ 10 files changed, 2286 insertions(+), 0 deletions(-) create mode 100644 board/freescale/p1_p2_rdb_pc/Makefile create mode 100644 board/freescale/p1_p2_rdb_pc/ddr.c create mode 100644 board/freescale/p1_p2_rdb_pc/law.c create mode 100644 board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c create mode 100644 board/freescale/p1_p2_rdb_pc/tlb.c create mode 100644 doc/README.p1_p2_rdb_pc create mode 100644 include/configs/p1_p2_rdb_pc.h create mode 100644 nand_spl/board/freescale/p1_p2_rdb_pc/Makefile create mode 100644 nand_spl/board/freescale/p1_p2_rdb_pc/nand_boot.c
board/freescale/p1_p2_rdb_pc/Makefile new file +52 -0
@@ -0,0 +1,52 @@ +# +# Copyright 2010-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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS-y += $(BOARD).o +COBJS-y += ddr.o +COBJS-y += law.o +COBJS-y += tlb.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) $(SOBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/freescale/p1_p2_rdb_pc/ddr.c new file +292 -0
292 lines not on this page · raw message
board/freescale/p1_p2_rdb_pc/law.c new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright 2010-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 +*/ + +#include <common.h> +#include <asm/fsl_law.h> +#include <asm/mmu.h> + +struct law_entry law_table[] = { +SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_64M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_CPLD_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_PMC_BASE_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_LBC ), +#ifdef CONFIG_SYS_NAND_BASE_PHYS +SET_LAW (CONFIG_SYS_NAND_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +#endif +#ifdef CONFIG_VSC7385_ENET +SET_LAW (CONFIG_SYS_VSC7385_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +#endif +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c new file +449 -0
449 lines not on this page · raw message
board/freescale/p1_p2_rdb_pc/tlb.c new file +114 -0
114 lines not on this page · raw message
boards.cfg +42 -0
64 lines not on this page · raw message
doc/README.p1_p2_rdb_pc new file +46 -0
46 lines not on this page · raw message
include/configs/p1_p2_rdb_pc.h new file +981 -0
981 lines not on this page · raw message
nand_spl/board/freescale/p1_p2_rdb_pc/Makefile new file +137 -0
137 lines not on this page · raw message
nand_spl/board/freescale/p1_p2_rdb_pc/nand_boot.c new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
1.7.3.4
Kumar Gala
AppliedPATCH v2 1/1 powerpc/85xx: Add support for new P102x/P2020 RDB style boards
Quoted 64 lines · Kumar Gala
From: Li Yang <[email protected]>
The following boards share a common design but with minor variations between them:
P1020MSBG-PC
P1020RDB-PC
P1020UTM-PC
P1021RDB-PC
P1024RDB
P1025RDB
P2020RDB-PCThe P1020RDB-PC shares its roots in the existing P1020RDB board design, however uses DDR3 instead of DDR2.
P2020RDB-PC differs from the P102x RDB-PC with 64-bit DDR and 100Mhz SYSCLK.Key features on these boards include:
* DDR3
* NOR flash
* NAND flash (on RDB's only)
* SPI flash (on RDB's only)
* SDHC/MMC card slot
* VSC7385 Ethernet switch (on P1020MBG, P1020RDB, & P1021RDB)
* PCIE slot and mini-PCIE slotsAs these boards use soldered DDR chips not regular DIMMs, an on-board EEPROM is used to store SPD data. In case of absent or corrupted SPD, falling back to timing data embedded in the source code will be used. Raw timing data is extracted from DDR chip datasheet. Different speeds of DDR are supported with this approach. ODT option is forced to fit this set of boards, again because they don't have regular DIMMs.
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MSis defined as 5ms to meet specification for writing timing.VSC firmware Address is defined by default in config file for eTSEC1.
SD width is based off DIP switch. DIP switch is detected on the board by reading i2c bus and setting the appropriate mux values.
Some boards have QE module in the silicon (P1021 and P1025). QE and eLBC have pins multiplexing. QE function needs to be disabled to access Nor Flash and CPLD. QE-UEC and QE-UART can be enabled for linux kernel by setting "qe" in hwconfig. In addition, QE-UEC and QE-TDM also have pins multiplexing, to enable QE-TDM for linux kernel, set "qe;tdm" in hwconfig. Syntax is as below
'setenv hwconfig qe' to enable QE UEC/UART and disable Nor-Flash/CPLD. 'setenv hwconfig 'qe;tdm'' to enalbe QE TDM and disable Nor-Flash/CPLD.
Signed-off-by York Sun <[email protected]>Signed-off-by Li Yang <[email protected]>Signed-off-by Zhao Chenhui <[email protected]>Signed-off-by Matthew McClintock <[email protected]>Signed-off-by Poonam Aggrwal <[email protected]>Signed-off-by Priyanka Jain <[email protected]>Signed-off-by Tang Yuantian <[email protected]>Signed-off-by ramneek.mehresh <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>Signed-off-by Matthew McClintock <[email protected]>Signed-off-by Xie Xiaobo <[email protected]>Signed-off-by Kumar Gala <[email protected]>Signed-off-by Jerry Huang <[email protected]>Signed-off-by Akhil Goyal <[email protected]>
Quoted 5 lines
---
v2:
* cleaned up useless typedef
* cleaned up some trailing whitespace
* changes based on CCSR cleanup patch
applied to 85xx next
- k