powerpc/t1040qds: Add T1040QDS board
PATCH 1/1 powerpc/t1040qds: Add T1040QDS board
T1040QDS is a high-performance computing evaluation, development and test platform supporting the T1040 QorIQ Power Architecture? processor.
T1040QDS board Overview
-----------------------
- Four e5500 cores, each with a private 256 KB L2 cache
- 256 KB shared L3 CoreNet platform cache (CPC)
- Interconnect CoreNet platform
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Data Path Acceleration Architecture (DPAA) incorporating acceleration for the following functions:
- Packet parsing, classification, and distribution
- Queue management for scheduling, packet sequencing, and congestion management
- Cryptography Acceleration
- RegEx Pattern Matching Acceleration
- IEEE Std 1588 support
- Hardware buffer management for buffer allocation and deallocation
- Ethernet interfaces
- Integrated 8-port Gigabit Ethernet switch
- Four 1 Gbps Ethernet controllers
- SERDES Connections, 8 lanes supporting:
? PCI Express: supporting Gen 1 and Gen 2;
? SGMII
? QSGMII
? SATA 2.0
? Aurora debug with dedicated connectors - DDR Controller 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and Interleaving
-IFC/Local Bus
- NAND flash: 8-bit, async, up to 2GB.
- NOR: 8-bit or 16-bit, non-multiplexed, up to 512MB
- GASIC: Simple (minimal) target within Qixis FPGA
- PromJET rapid memory download support
- Ethernet
- Two on-board RGMII 10/100/1G ethernet ports.
- PHY #0 remains powered up during deep-sleep
- QIXIS System Logic FPGA
- Clocks
- System and DDR clock (SYSCLK, ?DDRCLK?)
- SERDES clocks
- Power Supplies
- Video
- DIU supports video at up to 1280x1024x32bpp
- USB
- Supports two USB 2.0 ports with integrated PHYs
? Two type A ports with 5V at 1.5A per port.
? Second port can be converted to OTG mini-AB
- SDHC
- SDHC port connects directly to an adapter card slot, featuring:
- Supporting SD slots for: SD, SDHC (1x, 4x, 8x) and/or MMC ? Supporting eMMC memory devices
- SPI
- On-board support of 3 different devices and sizes
- Other IO
- Two Serial ports
- ProfiBus port
- Four I2C ports
---
This patch depends upon
powerpc: Fix CamelCase checkpatch warning in DDR related code
http://patchwork.ozlabs.org/patch/271670/
TODO: Add support of ethernet.
MAINTAINERS | 2 + board/freescale/common/qixis.h | 4 +- board/freescale/t1040qds/Makefile | 38 ++ board/freescale/t1040qds/README | 169 +++++++ board/freescale/t1040qds/ddr.c | 117 +++++ board/freescale/t1040qds/ddr.h | 50 ++ board/freescale/t1040qds/eth.c | 34 ++ board/freescale/t1040qds/law.c | 32 ++ board/freescale/t1040qds/pci.c | 23 + board/freescale/t1040qds/t1040qds.c | 258 ++++++++++ board/freescale/t1040qds/t1040qds.h | 13 + board/freescale/t1040qds/t1040qds_qixis.h | 36 ++ board/freescale/t1040qds/tlb.c | 108 ++++ boards.cfg | 1 + drivers/net/fm/Makefile | 1 + drivers/net/fm/t1040.c | 16 + include/configs/T1040QDS.h | 761 +++++++++++++++++++++++++++++ 17 files changed, 1662 insertions(+), 1 deletion(-) create mode 100644 board/freescale/t1040qds/Makefile create mode 100644 board/freescale/t1040qds/README create mode 100644 board/freescale/t1040qds/ddr.c create mode 100644 board/freescale/t1040qds/ddr.h create mode 100644 board/freescale/t1040qds/eth.c create mode 100644 board/freescale/t1040qds/law.c create mode 100644 board/freescale/t1040qds/pci.c create mode 100644 board/freescale/t1040qds/t1040qds.c create mode 100644 board/freescale/t1040qds/t1040qds.h create mode 100644 board/freescale/t1040qds/t1040qds_qixis.h create mode 100644 board/freescale/t1040qds/tlb.c create mode 100644 drivers/net/fm/t1040.c create mode 100644 include/configs/T1040QDS.h
MAINTAINERS +2 -0
@@ -27,6 +27,8 @@ Poonam Aggrwal <[email protected]> BSC9131RDB BSC9131 + T1040QDS T1040 + Naveen Burmi <[email protected]> BSC9132QDS BSC9132
board/freescale/common/qixis.h +3 -1
@@ -79,7 +79,9 @@ struct qixis {u8 clk_freq[6 ];/* Clock Measurement Registers */ u8 res_c6[8 ];u8 clk_base[2 ];/* Clock Frequency Base Reg */ -u8 res_d0[16 ]; +u8 res_d0[8 ]; +u8 cms[2 ];/* Core Management Space Address Register, 0xD8 */ +u8 res_c0[6 ];u8 aux2[4 ];/* Auxiliary Registers,0xE0 */ u8 res14[10 ];u8 aux_ad;
board/freescale/t1040qds/Makefile new file +38 -0
@@ -0,0 +1,38 @@ +# +# Copyright 2013 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS-y += $(BOARD).o +COBJS-y += ddr.o +COBJS-y += eth.o +COBJS-$(CONFIG_PCI) += pci.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/t1040qds/README new file +169 -0
169 lines not on this page · raw message
board/freescale/t1040qds/ddr.c new file +117 -0
117 lines not on this page · raw message
board/freescale/t1040qds/ddr.h new file +50 -0
50 lines not on this page · raw message
board/freescale/t1040qds/eth.c new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright 2013 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <command.h> +#include <netdev.h> +#include <asm/mmu.h> +#include <asm/processor.h> +#include <asm/cache.h> +#include <asm/immap_85xx.h> +#include <asm/fsl_law.h> +#include <asm/fsl_ddr_sdram.h> +#include <asm/fsl_serdes.h> +#include <asm/fsl_portals.h> +#include <asm/fsl_liodn.h> +#include <malloc.h> +#include <fm_eth.h> +#include <fsl_mdio.h> +#include <miiphy.h> +#include <phy.h> +#include <asm/fsl_dtsec.h> +#include <asm/fsl_serdes.h> +#include "../common/qixis.h" +#include "../common/fman.h" + +#include "t1040qds_qixis.h" + +void fdt_fixup_board_enet (void *fdt) +{ +return ; +}
board/freescale/t1040qds/law.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2013 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <asm/fsl_law.h> +#include <asm/mmu.h> + +struct law_entry law_table[] = { +#ifndef CONFIG_SYS_NO_FLASH + SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_IFC), +#endif +#ifdef CONFIG_SYS_BMAN_MEM_PHYS + SET_LAW(CONFIG_SYS_BMAN_MEM_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_BMAN), +#endif +#ifdef CONFIG_SYS_QMAN_MEM_PHYS + SET_LAW(CONFIG_SYS_QMAN_MEM_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_QMAN), +#endif +#ifdef QIXIS_BASE_PHYS + SET_LAW(QIXIS_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_IFC), +#endif +#ifdef CONFIG_SYS_DCSRBAR_PHYS + SET_LAW(CONFIG_SYS_DCSRBAR_PHYS, LAW_SIZE_4M, LAW_TRGT_IF_DCSR), +#endif +#ifdef CONFIG_SYS_NAND_BASE_PHYS + SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_IFC), +#endif +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/t1040qds/pci.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright 2013 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <command.h> +#include <pci.h> +#include <asm/fsl_pci.h> +#include <libfdt.h> +#include <fdt_support.h> +#include <asm/fsl_serdes.h> + +void pci_init_board (void ) +{ +fsl_pcie_init_board (0 ); +} + +void pci_of_setup (void *blob,bd_t *bd) +{ +FT_FSL_PCI_SETUP ; +}
board/freescale/t1040qds/t1040qds.c new file +258 -0
258 lines not on this page · raw message
board/freescale/t1040qds/t1040qds.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* Copyright 2013 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __T1040_QDS_H__ +#define __T1040_QDS_H__ + +void fdt_fixup_board_enet (void *blob); +void pci_of_setup (void *blob,bd_t *bd); + +#endif
board/freescale/t1040qds/t1040qds_qixis.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright 2013 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __T1040QDS_QIXIS_H__ +#define __T1040QDS_QIXIS_H__ + +/* Definitions of QIXIS Registers for T1040QDS */ + +/* BRDCFG4[4:7]] select EC1 and EC2 as a pair */ +#define BRDCFG4_EMISEL_MASK 0xE0 +#define BRDCFG4_EMISEL_SHIFT 5 + +/* SYSCLK */ +#define QIXIS_SYSCLK_66 0x0 +#define QIXIS_SYSCLK_83 0x1 +#define QIXIS_SYSCLK_100 0x2 +#define QIXIS_SYSCLK_125 0x3 +#define QIXIS_SYSCLK_133 0x4 +#define QIXIS_SYSCLK_150 0x5 +#define QIXIS_SYSCLK_160 0x6 +#define QIXIS_SYSCLK_166 0x7 +#define QIXIS_SYSCLK_64 0x8 + +/* DDRCLK */ +#define QIXIS_DDRCLK_66 0x0 +#define QIXIS_DDRCLK_100 0x1 +#define QIXIS_DDRCLK_125 0x2 +#define QIXIS_DDRCLK_133 0x3 + + +#define QIXIS_SRDS1CLK_122 0x5a +#define QIXIS_SRDS1CLK_125 0x5e +#endif
board/freescale/t1040qds/tlb.c new file +108 -0
108 lines not on this page · raw message
boards.cfg +1 -0
@@ -955,6 +955,7 @@ B4860QDS_SRIO_PCIE_BOOT powerpc mpc85xx b4860qds freesca B4420QDS powerpc mpc85xx b4860qds freescale - B4860QDS:PPC_B4420 B4420QDS_NAND powerpc mpc85xx b4860qds freescale - B4860QDS:PPC_B4420,RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF80000 B4420QDS_SPIFLASH powerpc mpc85xx b4860qds freescale - B4860QDS:PPC_B4420,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000 +T1040QDS powerpc mpc85xx t1040qds freescale - T1040QDS:PPC_T1040 xpedite520x powerpc mpc85xx - xes xpedite537x powerpc mpc85xx - xes xpedite550x powerpc mpc85xx - xes
drivers/net/fm/Makefile +1 -0
@@ -29,6 +29,7 @@ COBJS-$(CONFIG_PPC_P3041) += p5020.o COBJS-$(CONFIG_PPC_P4080) += p4080.o COBJS-$(CONFIG_PPC_P5020) += p5020.o COBJS-$(CONFIG_PPC_P5040) += p5040.o +COBJS-$(CONFIG_PPC_T1040) += t1040.o COBJS-$(CONFIG_PPC_T4240) += t4240.o COBJS-$(CONFIG_PPC_T4160) += t4240.o COBJS-$(CONFIG_PPC_B4420) += b4860.o
drivers/net/fm/t1040.c new file +16 -0
@@ -0,0 +1,16 @@ +/* +* Copyright 2013 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ +#include <common.h> +#include <phy.h> +#include <fm_eth.h> +#include <asm/io.h> +#include <asm/immap_85xx.h> +#include <asm/fsl_serdes.h> + +phy_interface_t fman_port_enet_if (enum fm_port port) +{ +return PHY_INTERFACE_MODE_NONE ; +}
include/configs/T1040QDS.h new file +761 -0
761 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 1/1 powerpc/t1040qds: Add T1040QDS board
Dear Prabhakar Kushwaha,
Quoted 3 lines · Prabhakar Kushwaha <prabhakar <at> freescale.com> writes:
T1040QDS is a high-performance computing evaluation, development and test platform supporting the T1040 QorIQ Power Architecture? processor.
<snipped>
The code was test compiled.
You probably need to rebase to u-boot master (commit 985a7).
ddr.c: In function 'fsl_ddr_board_options':
ddr.c:49:10: error: 'memctl_options_t' has no member named 'twot_en' ddr.c:68:8: error: 'memctl_options_t' has no member named 'twot_en'
All the best,
Rommel
PATCH 1/1 powerpc/t1040qds: Add T1040QDS board
Quoted 8 lines · Rommel Custodio
Dear Prabhakar Kushwaha,
Quoted 2 lines · Prabhakar Kushwaha <prabhakar <at> freescale.com> writes:
T1040QDS is a high-performance computing evaluation, development and test platform supporting the T1040 QorIQ Power Architecture? processor.
<snipped>
Quoted 7 lines
The code was test compiled.
You probably need to rebase to u-boot master (commit 985a7).
ddr.c: In function 'fsl_ddr_board_options':
ddr.c:49:10: error: 'memctl_options_t' has no member named 'twot_en' ddr.c:68:8: error: 'memctl_options_t' has no member named 'twot_en'
This patch depends upon
powerpc: Fix CamelCase checkpatch warning in DDR related code
http://patchwork.ozlabs.org/patch/271670/
Please let me know, if it still not compile.
Regards,
Prabhakar
PATCH 1/1 powerpc/t1040qds: Add T1040QDS board
In reply to Rommel CustodioDear Prabhakar Kushwaha,
Quoted 9 lines · Rommel Custodio <sessyargc+uboot <at> gmail.com> writes:
Dear Prabhakar Kushwaha,
Quoted 3 lines · Prabhakar Kushwaha <prabhakar <at> freescale.com> writes:
T1040QDS is a high-performance computing evaluation, development and test platform supporting the T1040 QorIQ Power Architecture? processor.
Quoted 8 lines
<snipped>
The code was test compiled.
You probably need to rebase to u-boot master (commit 985a7).
ddr.c: In function 'fsl_ddr_board_options':
ddr.c:49:10: error: 'memctl_options_t' has no member named 'twot_en' ddr.c:68:8: error: 'memctl_options_t' has no member named 'twot_en'
Oooops my bad ...
I did not see this dependency.
This patch depends upon
powerpc: Fix CamelCase checkpatch warning in DDR related code
http://patchwork.ozlabs.org/patch/271670/
No errors now.
Quoted 3 lines
All the best,
Rommel
PATCH 1/1 powerpc/t1040qds: Add T1040QDS board
In reply to Prabhakar KushwahaDear Prabhakar Kushwaha,
Quoted 2 lines · In message <[email protected]> you…
T1040QDS is a high-performance computing evaluation, development and test platform supporting the T1040 QorIQ Power Architecture? processor.
Please fix this checkpatch issue:
WARNING: quoted string split across lines #952: FILE: board/freescale/t1040qds/t1040qds.c:207:
+ printf("Warning: SERDES bank %u expects reference clock"
+ " %sMHz, but actual is %sMHz\n", i + 1,
Quoted 5 lines
board/freescale/t1040qds/eth.c new file +0
-0
...
board/freescale/t1040qds/eth.c line 34
Quoted 4 lines
board/freescale/t1040qds/eth.c new file +4
-0+void fdt_fixup_board_enet (void *fdt) +{ +return ; +}
Is my understanding correct that there are no external callers except in your own board code? Then why do you define and call and empty function at all?
Quoted 5 lines
include/configs/T1040QDS.h new file +0
-0
...
Quoted 44 lines
include/configs/T1040QDS.h new file +44
-0+#define CONFIG_EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:ctlr_intlv=cacheline," \ + "bank_intlv=cs0_cs1;" \ + "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\ + "netdev=eth0\0" \ + "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ + "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0" \ + "tftpflash=tftpboot $loadaddr $uboot && " \ + "protect off $ubootaddr +$filesize && " \ + "erase $ubootaddr +$filesize && " \ + "cp.b $loadaddr $ubootaddr $filesize && " \ + "protect on $ubootaddr +$filesize && " \ + "cmp.b $loadaddr $ubootaddr $filesize\0" \ + "consoledev=ttyS0\0" \ + "ramdiskaddr=2000000\0" \ + "ramdiskfile=t1040qds/ramdisk.uboot\0" \ + "fdtaddr=c00000\0" \ + "fdtfile=t1040qds/t1040qds.dtb\0" \ + "bdev=sda3\0" \ + "c=ffe\0" + +#define CONFIG_LINUX \ + "setenv bootargs root=/dev/ram rw " \ + "console=$consoledev,$baudrate $othbootargs;" \ + "setenv ramdiskaddr 0x02000000;" \ + "setenv fdtaddr 0x00c00000;" \ + "setenv loadaddr 0x1000000;" \ + "bootm $loadaddr $ramdiskaddr $fdtaddr" + +#define CONFIG_HDBOOT \ + "setenv bootargs root=/dev/$bdev rw " \ + "console=$consoledev,$baudrate $othbootargs;" \ + "tftp $loadaddr $bootfile;" \ + "tftp $fdtaddr $fdtfile;" \ + "bootm $loadaddr - $fdtaddr" + +#define CONFIG_NFSBOOTCOMMAND \ + "setenv bootargs root=/dev/nfs rw " \ + "nfsroot=$serverip:$rootpath " \ + "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ + "console=$consoledev,$baudrate $othbootargs;" \ + "tftp $loadaddr $bootfile;" \ + "tftp $fdtaddr $fdtfile;" \ + "bootm $loadaddr - $fdtaddr"
include/configs/T1040QDS.h line 755
Quoted 10 lines
include/configs/T1040QDS.h new file +10
-0+ +#define CONFIG_RAMBOOTCOMMAND \ + "setenv bootargs root=/dev/ram rw " \ + "console=$consoledev,$baudrate $othbootargs;" \ + "tftp $ramdiskaddr $ramdiskfile;" \ + "tftp $loadaddr $bootfile;" \ + "tftp $fdtaddr $fdtfile;" \ + "bootm $loadaddr $ramdiskaddr $fdtaddr" + +#define CONFIG_BOOTCOMMAND CONFIG_LINUX
Hm... we really need to find a way to get rid of such ever growing (and repeating) env blocks...
Best regards,
Wolfgang Denk
Signature · 5 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
Real programmers can write assembly code in any language. :-)
- Larry Wall in <[email protected]>