powerpc/85xx: Add P5040 processor support
PATCH v5 6/7 powerpc/85xx: Add P5040 processor support
Add support for the Freescale P5040 SOC, which is similar to the P5020. Features of the P5040 are:
Four P5040 single-threaded e5500 cores built
Up to 2.4 GHz with 64-bit ISA support
Three levels of instruction: user, supervisor, hypervisor
CoreNet platform cache (CPC)
2.0 MB configures as dual 1 MB blocks hierarchical interconnect fabric
Two 64-bit DDR3/3L SDRAM memory controllers with ECC and interleaving
support Up to 1600MT/s
Memory pre-fetch engine
DPAA incorporating acceleration for the following functions
Packet parsing, classification, and distribution (FMAN) Queue management for scheduling, packet sequencing and congestion management (QMAN)
Hardware buffer management for buffer allocation and de-allocation (BMAN)
Cryptography acceleration (SEC 5.2) at up to 40 Gbps SerDes 20 lanes at up to 5 Gbps
Supports SGMII, XAUI, PCIe rev1.1/2.0, SATA Ethernet interfaces Two 10 Gbps Ethernet MACs
Ten 1 Gbps Ethernet MACs
High-speed peripheral interfaces
Two PCI Express 2.0/3.0 controllers
Additional peripheral interfaces
Two serial ATA (SATA 2.0) controllers
Two high-speed USB 2.0 controllers with integrated PHY Enhanced secure digital host controller (SD/MMC/eMMC) Enhanced serial peripheral interface (eSPI)
Two I2C controllers
Four UARTs
Integrated flash controller supporting NAND and NOR flash
DMA
Dual four channel
Support for hardware virtualization and partitioning enforcement
Extra privileged level for hypervisor support
QorIQ Trust Architecture 1.1
Secure boot, secure debug, tamper detection, volatile key storage
---
v5: fixed all the LIODNs, for real this time.
arch/powerpc/cpu/mpc85xx/Makefile | 3 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 70 ++++++++++++++ arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h | 5 + arch/powerpc/cpu/mpc85xx/p5040_ids.c | 127 +++++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/p5040_serdes.c | 117 +++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/speed.c | 2 + arch/powerpc/cpu/mpc8xxx/cpu.c | 2 + arch/powerpc/include/asm/config_mpc85xx.h | 29 ++++++ arch/powerpc/include/asm/immap_85xx.h | 15 +++ arch/powerpc/include/asm/processor.h | 2 + 10 files changed, 372 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/cpu/mpc85xx/p5040_ids.c create mode 100644 arch/powerpc/cpu/mpc85xx/p5040_serdes.c
arch/powerpc/cpu/mpc85xx/Makefile +3 -0
@@ -66,6 +66,7 @@ COBJS-$(CONFIG_PPC_P2041) += ddr-gen3.o COBJS-$(CONFIG_PPC_P3041) += ddr-gen3.o COBJS-$(CONFIG_PPC_P4080) += ddr-gen3.o COBJS-$(CONFIG_PPC_P5020) += ddr-gen3.o +COBJS-$(CONFIG_PPC_P5040) += ddr-gen3.o COBJS-$(CONFIG_BSC9131) += ddr-gen3.o COBJS-$(CONFIG_CPM2) += ether_fcc.o
@@ -80,6 +81,7 @@ COBJS-$(CONFIG_PPC_P2041) += p2041_ids.o COBJS-$(CONFIG_PPC_P3041) += p3041_ids.o COBJS-$(CONFIG_PPC_P4080) += p4080_ids.o COBJS-$(CONFIG_PPC_P5020) += p5020_ids.o +COBJS-$(CONFIG_PPC_P5040) += p5040_ids.o COBJS-$(CONFIG_QE) += qe_io.o COBJS-$(CONFIG_CPM2) += serial_scc.o
@@ -110,6 +112,7 @@ COBJS-$(CONFIG_PPC_P2041) += p2041_serdes.o COBJS-$(CONFIG_PPC_P3041) += p3041_serdes.o COBJS-$(CONFIG_PPC_P4080) += p4080_serdes.o COBJS-$(CONFIG_PPC_P5020) += p5020_serdes.o +COBJS-$(CONFIG_PPC_P5040) += p5040_serdes.o COBJS = $(COBJS-y) COBJS += cpu.o
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +70 -0
98 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h +5 -0
@@ -22,6 +22,11 @@#ifndef __FSL_CORENET_SERDES_H#define __FSL_CORENET_SERDES_H +/* +* Note: For P5040, the fourth SerDes bank is on SerDes2, but U-boot currently +* only supports one SerDes controller. For now, pretend that we have three +* banks and 18 lanes on the P5040. +*/ #define SRDS_MAX_LANES 18#define SRDS_MAX_BANK 3
arch/powerpc/cpu/mpc85xx/p5040_ids.c new file +127 -0
127 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/p5040_serdes.c new file +117 -0
117 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/speed.c +2 -0
@@ -112,6 +112,8 @@ void get_sys_info (sys_info_t * sysInfo)#define HWA_ASYNC_DIV 0x04000000#if (CONFIG_SYS_FSL_NUM_CC_PLLS ==2 )#define HWA_CC_PLL 1 +#elif (CONFIG_SYS_FSL_NUM_CC_PLLS ==3 ) +#define HWA_CC_PLL 2#elif (CONFIG_SYS_FSL_NUM_CC_PLLS ==4 )#define HWA_CC_PLL 2#else
arch/powerpc/cpu/mpc8xxx/cpu.c +2 -0
@@ -73,6 +73,8 @@ struct cpu_type cpu_type_list [] = {CPU_TYPE_ENTRY (P4080 ,P4080 ,8 ),CPU_TYPE_ENTRY (P5010 ,P5010 ,1 ),CPU_TYPE_ENTRY (P5020 ,P5020 ,2 ), +CPU_TYPE_ENTRY (P5021 ,P5021 ,2 ), +CPU_TYPE_ENTRY (P5040 ,P5040 ,4 ),CPU_TYPE_ENTRY (BSC9130 ,9130 ,1 ),CPU_TYPE_ENTRY (BSC9131 ,9131 ,1 ), #elif defined(CONFIG_MPC86xx)
arch/powerpc/include/asm/config_mpc85xx.h +29 -0
@@ -433,6 +433,35 @@#define CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV 0x10#define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xc0000000 +#elif defined(CONFIG_PPC_P5040 ) +#define CONFIG_SYS_FSL_QORIQ_CHASSIS1 +#define CONFIG_MAX_CPUS 4 +#define CONFIG_SYS_FSL_NUM_CC_PLLS 3 +#define CONFIG_SYS_FSL_NUM_LAWS 32 +#define CONFIG_SYS_FSL_SEC_COMPAT 4 +#define CONFIG_SYS_NUM_FMAN 2 +#define CONFIG_SYS_NUM_FM1_DTSEC 5 +#define CONFIG_SYS_NUM_FM1_10GEC 1 +#define CONFIG_SYS_NUM_FM2_DTSEC 5 +#define CONFIG_SYS_NUM_FM2_10GEC 1 +#define CONFIG_NUM_DDR_CONTROLLERS 2 +#define CONFIG_SYS_FM_MURAM_SIZE 0x28000 +#define CONFIG_SYS_FSL_TBCLK_DIV 16 +#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.4" +#define CONFIG_SYS_CCSRBAR_DEFAULT 0xfe000000 +#define CONFIG_SYS_FSL_USB1_PHY_ENABLE +#define CONFIG_SYS_FSL_USB2_PHY_ENABLE +#define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY +#define CONFIG_SYS_FSL_ERRATUM_ESDHC111 +#define CONFIG_SYS_FSL_ERRATUM_USB138 +#define CONFIG_SYS_FSL_ERRATUM_DDR_A003 +#define CONFIG_SYS_FSL_ERRATUM_DDR_A003474 +#define CONFIG_SYS_FSL_ERRATUM_A004699 +#define CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC +#define CONFIG_SYS_FSL_ERRATUM_A004510 +#define CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV 0x10 +#define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xf0000000 +#elif defined(CONFIG_BSC9131 )#define CONFIG_MAX_CPUS 1#define CONFIG_FSL_SDHC_V2_3
arch/powerpc/include/asm/immap_85xx.h +15 -0
@@ -1761,6 +1761,7 @@ typedef struct ccsr_gur {#define FSL_CORENET_RCWSR5_DDR_SYNC 0x00000080#define FSL_CORENET_RCWSR5_DDR_SYNC_SHIFT 7#define FSL_CORENET_RCWSR5_SRDS_EN 0x00002000 +#define FSL_CORENET_RCWSR5_SRDS2_EN 0x00001000#define FSL_CORENET_RCWSR6_BOOT_LOC 0x0f800000#define FSL_CORENET_RCWSRn_SRDS_LPD_B2 0x3c000000/* bits 162..165 */ #define FSL_CORENET_RCWSRn_SRDS_LPD_B3 0x003c0000/* bits 170..173 */
@@ -1786,6 +1787,15 @@ typedef struct ccsr_gur {#define FSL_CORENET_RCWSR11_EC2_FM1_DTSEC5_MII 0x00100000#define FSL_CORENET_RCWSR11_EC2_FM1_DTSEC5_NONE 0x00180000#endif +#if defined(CONFIG_PPC_P5040 ) +#define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC5_RGMII 0x00000000 +#define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC5_MII 0x00800000 +#define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC5_NONE 0x00c00000 +#define FSL_CORENET_RCWSR11_EC2 0x00180000/* bits 363..364 */ +#define FSL_CORENET_RCWSR11_EC2_FM2_DTSEC5_RGMII 0x00000000 +#define FSL_CORENET_RCWSR11_EC2_FM2_DTSEC5_MII 0x00100000 +#define FSL_CORENET_RCWSR11_EC2_FM2_DTSEC5_NONE 0x00180000 +#endif u8 res18[192 ];u32 scratchrw[4 ];/* Scratch Read/Write */ u8 res19[240 ];
@@ -2395,6 +2405,7 @@ typedef struct serdes_corenet {#define SRDS_RSTCTL_SDPD 0x00000020u32 pllcr0;/* PLL Control Register 0 */ #define SRDS_PLLCR0_RFCK_SEL_MASK 0x30000000 +#define SRDS_PLLCR0_PVCOCNT_EN 0x02000000#define SRDS_PLLCR0_RFCK_SEL_100 0x00000000#define SRDS_PLLCR0_RFCK_SEL_125 0x10000000#define SRDS_PLLCR0_RFCK_SEL_156_25 0x20000000
@@ -2423,6 +2434,7 @@ typedef struct serdes_corenet {u32 gcr0;/* General Control Register 0 */ #define SRDS_GCR0_RRST 0x00400000#define SRDS_GCR0_1STLANE 0x00010000 +#define SRDS_GCR0_UOTHL 0x00100000u32 gcr1;/* General Control Register 1 */ #define SRDS_GCR1_REIDL_CTL_MASK 0x001f0000#define SRDS_GCR1_REIDL_CTL_PCIE 0x00100000
@@ -2627,6 +2639,7 @@ struct ccsr_rman {#define CONFIG_SYS_FSL_CORENET_CLK_OFFSET 0xE1000#define CONFIG_SYS_FSL_CORENET_RCPM_OFFSET 0xE2000#define CONFIG_SYS_FSL_CORENET_SERDES_OFFSET 0xEA000 +#define CONFIG_SYS_FSL_CORENET_SERDES2_OFFSET 0xEB000#define CONFIG_SYS_FSL_CPC_OFFSET 0x10000#define CONFIG_SYS_MPC85xx_DMA1_OFFSET 0x100000#define CONFIG_SYS_MPC85xx_DMA2_OFFSET 0x101000
@@ -2777,6 +2790,8 @@ struct ccsr_rman { (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_SERDES2_OFFSET)#define CONFIG_SYS_FSL_CORENET_SERDES_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_FSL_CORENET_SERDES_OFFSET) +#define CONFIG_SYS_FSL_CORENET_SERDES2_ADDR \ + (CONFIG_SYS_IMMR + CONFIG_SYS_FSL_CORENET_SERDES2_OFFSET)#define CONFIG_SYS_MPC85xx_USB_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_USB_OFFSET)#define CONFIG_SYS_MPC85xx_USB1_PHY_ADDR \
arch/powerpc/include/asm/processor.h +2 -0
@@ -1095,6 +1095,8 @@#define SVR_P4080 0x820000#define SVR_P5010 0x822100#define SVR_P5020 0x822000 +#define SVR_P5021 0X820500 +#define SVR_P5040 0x820400#define SVR_8610 0x80A000#define SVR_8641 0x809000
Signature · 1 line
1.7.3.4