net/fm: add 2.5G SGMII support
Subsystems (3)
PATCH v2 1/9 net/fm: add 2.5G SGMII support
As auto-negotiation is not supported for 2.5G SGMII, we need to add a new type PHY_INTERFACE_MODE_SGMII_2500 to differentiate SGMII-1G and SGMII-2.5G with different setting for auto-negotiation.
---
v2: no change
arch/powerpc/include/asm/fsl_serdes.h | 16 ++++++++++++++++ drivers/net/fm/eth.c | 16 ++++++++++++---- include/phy.h | 2 ++ 3 files changed, 30 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/fsl_serdes.h +16 -0
@@ -71,6 +71,22 @@ enum srds_prtcl {INTERLAKEN ,QSGMII_SW1_A ,/* Indicates ports on L2 Switch */ QSGMII_SW1_B , +SGMII_2500_FM1_DTSEC1 , +SGMII_2500_FM1_DTSEC2 , +SGMII_2500_FM1_DTSEC3 , +SGMII_2500_FM1_DTSEC4 , +SGMII_2500_FM1_DTSEC5 , +SGMII_2500_FM1_DTSEC6 , +SGMII_2500_FM1_DTSEC9 , +SGMII_2500_FM1_DTSEC10 , +SGMII_2500_FM2_DTSEC1 , +SGMII_2500_FM2_DTSEC2 , +SGMII_2500_FM2_DTSEC3 , +SGMII_2500_FM2_DTSEC4 , +SGMII_2500_FM2_DTSEC5 , +SGMII_2500_FM2_DTSEC6 , +SGMII_2500_FM2_DTSEC9 , + SGMII_2500_FM2_DTSEC10, }; enum srds {
drivers/net/fm/eth.c +12 -4
@@ -39,9 +39,14 @@ static void dtsec_configure_serdes(struct fm_eth *priv)u32 value;struct mii_dev bus; bus.priv = priv->mac->phyregs; +bool sgmii_2500 = (priv->enet_if == +PHY_INTERFACE_MODE_SGMII_2500 ) ? true : false; + +/* SGMII IF mode + AN enable only for 1G SGMII, not for 2.5G */ + value =PHY_SGMII_IF_MODE_SGMII ; +if (!sgmii_2500) + value |=PHY_SGMII_IF_MODE_AN ; -/* SGMII IF mode + AN enable */ - value =PHY_SGMII_IF_MODE_AN |PHY_SGMII_IF_MODE_SGMII ;memac_mdio_write (&bus,0 ,MDIO_DEVAD_NONE ,0x14 , value);/* Dev ability according to SGMII specification */
@@ -54,7 +59,9 @@ static void dtsec_configure_serdes(struct fm_eth *priv)memac_mdio_write (&bus,0 ,MDIO_DEVAD_NONE ,0x12 ,0xd40 );/* Restart AN */ - value =PHY_SGMII_CR_DEF_VAL |PHY_SGMII_CR_RESET_AN ; + value =PHY_SGMII_CR_DEF_VAL ; +if (!sgmii_2500) + value |=PHY_SGMII_CR_RESET_AN ;memac_mdio_write (&bus,0 ,MDIO_DEVAD_NONE ,0 , value);#else struct dtsec *regs = priv->mac->base;
@@ -83,7 +90,8 @@ static void dtsec_init_phy(struct eth_device *dev)out_be32 (®s->tbipa,CONFIG_SYS_TBIPA_VALUE );#endif -if (fm_eth->enet_if ==PHY_INTERFACE_MODE_SGMII ) +if (fm_eth->enet_if ==PHY_INTERFACE_MODE_SGMII || + fm_eth->enet_if ==PHY_INTERFACE_MODE_SGMII_2500 )dtsec_configure_serdes (fm_eth); }
include/phy.h +2 -0
@@ -41,6 +41,7 @@ typedef enum {PHY_INTERFACE_MODE_MII ,PHY_INTERFACE_MODE_GMII ,PHY_INTERFACE_MODE_SGMII , +PHY_INTERFACE_MODE_SGMII_2500 ,PHY_INTERFACE_MODE_QSGMII ,PHY_INTERFACE_MODE_TBI , PHY_INTERFACE_MODE_RMII,
@@ -57,6 +58,7 @@ static const char *phy_interface_strings[] = { [PHY_INTERFACE_MODE_MII] = "mii", [PHY_INTERFACE_MODE_GMII] = "gmii", [PHY_INTERFACE_MODE_SGMII] = "sgmii", + [PHY_INTERFACE_MODE_SGMII_2500] = "sgmii-2500", [PHY_INTERFACE_MODE_QSGMII] = "qsgmii", [PHY_INTERFACE_MODE_TBI] = "tbi", [PHY_INTERFACE_MODE_RMII] = "rmii",
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 2/9 powerpc/mpc85xx: Add T1024/T1023 SoC support
Add support for Freescale T1024/T1023 SoC.
The T1024 SoC includes the following function and features:
- Two 64-bit Power architecture e5500 cores, up to 1.4GHz
- private 256KB L2 cache each core and shared 256KB CoreNet platform cache (CPC)
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Data Path Acceleration Architecture (DPAA) incorporating acceleration
- Four MAC for 1G/2.5G/10G network interfaces (RGMII, SGMII, QSGMII, XFI)
- High-speed peripheral interfaces
- Three PCI Express 2.0 controllers
- Additional peripheral interfaces
- One SATA 2.0 controller
- Two USB 2.0 controllers with integrated PHY
- Enhanced secure digital host controller (SD/eSDHC/eMMC)
- Enhanced serial peripheral interface (eSPI)
- Four I2C controllers
- Four 2-pin UARTs or two 4-pin UARTs
- Integrated Flash Controller supporting NAND and NOR flash
- Two 8-channel DMA engines
- Multicore programmable interrupt controller (PIC)
- LCD interface (DIU) with 12 bit dual data rate
- QUICC Engine block supporting TDM, HDLC, and UART
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- Support for hardware virtualization and partitioning enforcement
- QorIQ Platform's Trust Architecture 2.0
Differences between T1024 and T1023:
Feature T1024 T1023 QUICC Engine: yes no DIU: yes no Deep Sleep: yes no I2C controller: 4 3
DDR: 64-bit 32-bit
IFC: 32-bit 28-bit
---
v2: add new serdes 0x135 and 0x119 in t1024_serdes.c
arch/powerpc/cpu/mpc85xx/Makefile | 4 ++ arch/powerpc/cpu/mpc85xx/speed.c | 12 +++- arch/powerpc/cpu/mpc85xx/t1024_ids.c | 82 ++++++++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/t1024_serdes.c | 52 ++++++++++++++++++ arch/powerpc/cpu/mpc8xxx/cpu.c | 4 ++ arch/powerpc/include/asm/config_mpc85xx.h | 45 +++++++++++++++ arch/powerpc/include/asm/fsl_secure_boot.h | 4 +- arch/powerpc/include/asm/immap_85xx.h | 14 +++++ arch/powerpc/include/asm/processor.h | 4 ++ drivers/net/fm/Makefile | 2 + drivers/net/fm/t1024.c | 88 ++++++++++++++++++++++++++++++ 11 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 arch/powerpc/cpu/mpc85xx/t1024_ids.c create mode 100644 arch/powerpc/cpu/mpc85xx/t1024_serdes.c create mode 100644 drivers/net/fm/t1024.c
arch/powerpc/cpu/mpc85xx/Makefile +4 -0
@@ -51,6 +51,8 @@ obj-$(CONFIG_PPC_T1040) += t1040_ids.o obj-$(CONFIG_PPC_T1042) += t1040_ids.o obj-$(CONFIG_PPC_T1020) += t1040_ids.o obj-$(CONFIG_PPC_T1022) += t1040_ids.o +obj-$(CONFIG_PPC_T1023) += t1024_ids.o +obj-$(CONFIG_PPC_T1024) += t1024_ids.o obj-$(CONFIG_PPC_T2080) += t2080_ids.o obj-$(CONFIG_PPC_T2081) += t2080_ids.o
@@ -97,6 +99,8 @@ obj-$(CONFIG_PPC_T1040) += t1040_serdes.o obj-$(CONFIG_PPC_T1042) += t1040_serdes.o obj-$(CONFIG_PPC_T1020) += t1040_serdes.o obj-$(CONFIG_PPC_T1022) += t1040_serdes.o +obj-$(CONFIG_PPC_T1023) += t1024_serdes.o +obj-$(CONFIG_PPC_T1024) += t1024_serdes.o obj-$(CONFIG_PPC_T2080) += t2080_serdes.o obj-$(CONFIG_PPC_T2081) += t2080_serdes.o
arch/powerpc/cpu/mpc85xx/speed.c +11 -1
@@ -168,6 +168,9 @@ void get_sys_info(sys_info_t *sys_info) defined(CONFIG_PPC_T2080) || defined(CONFIG_PPC_T2081)#define FM1_CLK_SEL 0xe0000000#define FM1_CLK_SHIFT 29 +#elif defined(CONFIG_PPC_T1024 ) || defined(CONFIG_PPC_T1023 ) +#define FM1_CLK_SEL 0x00000007 +#define FM1_CLK_SHIFT 0#else #define PME_CLK_SEL 0xe0000000#define PME_CLK_SHIFT 29
@@ -175,8 +178,12 @@ void get_sys_info(sys_info_t *sys_info)#define FM1_CLK_SHIFT 26#endif #if !defined(CONFIG_FM_PLAT_CLK_DIV ) || !defined(CONFIG_PME_PLAT_CLK_DIV ) +#if defined(CONFIG_PPC_T1024 ) || defined(CONFIG_PPC_T1023 ) + rcw_tmp =in_be32 (&gur->rcwsr[15 ]) -4 ; +#else rcw_tmp =in_be32 (&gur->rcwsr[7 ]);#endif +#endif #ifdef CONFIG_SYS_DPAA_PME #ifndef CONFIG_PME_PLAT_CLK_DIV
@@ -213,7 +220,10 @@ void get_sys_info(sys_info_t *sys_info)#endif #ifdef CONFIG_SYS_DPAA_QBMAN - sys_info->freq_qman = sys_info->freq_systembus /2 ; +#ifndef CONFIG_QBMAN_CLK_DIV +#define CONFIG_QBMAN_CLK_DIV 2 +#endif + sys_info->freq_qman = sys_info->freq_systembus /CONFIG_QBMAN_CLK_DIV ;#endif #ifdef CONFIG_SYS_DPAA_FMAN
arch/powerpc/cpu/mpc85xx/t1024_ids.c new file +82 -0
82 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/t1024_serdes.c new file +52 -0
52 lines not on this page · raw message
arch/powerpc/cpu/mpc8xxx/cpu.c +4 -0
@@ -76,6 +76,10 @@ static struct cpu_type cpu_type_list[] = {CPU_TYPE_ENTRY (T1020 ,T1020 ,0 ),CPU_TYPE_ENTRY (T1021 ,T1021 ,0 ),CPU_TYPE_ENTRY (T1022 ,T1022 ,0 ), +CPU_TYPE_ENTRY (T1024 ,T1024 ,0 ), +CPU_TYPE_ENTRY (T1023 ,T1023 ,0 ), +CPU_TYPE_ENTRY (T1014 ,T1014 ,0 ), +CPU_TYPE_ENTRY (T1013 ,T1013 ,0 ),CPU_TYPE_ENTRY (T2080 ,T2080 ,0 ),CPU_TYPE_ENTRY (T2081 ,T2081 ,0 ), CPU_TYPE_ENTRY(BSC9130, 9130, 1),
arch/powerpc/include/asm/config_mpc85xx.h +45 -0
51 lines not on this page · raw message
arch/powerpc/include/asm/fsl_secure_boot.h +3 -1
@@ -22,7 +22,9 @@defined (CONFIG_T2080QDS ) || \defined (CONFIG_T2080RDB ) || \defined (CONFIG_T1040QDS ) || \ - defined(CONFIG_T104xRDB) +defined (CONFIG_T104xRDB) || \ +defined (CONFIG_PPC_T1023 ) || \ + defined(CONFIG_PPC_T1024)#define CONFIG_SYS_CPC_REINIT_F #undef CONFIG_SYS_INIT_L3_ADDR#define CONFIG_SYS_INIT_L3_ADDR 0xbff00000
arch/powerpc/include/asm/immap_85xx.h +14 -0
@@ -1787,6 +1787,20 @@ defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022)#define PXCKEN_MASK 0x80000000#define PXCK_MASK 0x00FF0000#define PXCK_BITS_START 16 +#elif defined(CONFIG_PPC_T1024 ) || defined(CONFIG_PPC_T1023 ) || \ + defined(CONFIG_PPC_T1014 ) || defined(CONFIG_PPC_T1013 ) +#define FSL_CORENET2_RCWSR4_SRDS1_PRTCL 0xff800000 +#define FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT 23 +#define FSL_CORENET_RCWSR6_BOOT_LOC 0x0f800000 +#define FSL_CORENET_RCWSR13_EC1 0x30000000/* bits 418..419 */ +#define FSL_CORENET_RCWSR13_EC1_RGMII 0x00000000 +#define FSL_CORENET_RCWSR13_EC1_GPIO 0x10000000 +#define FSL_CORENET_RCWSR13_EC2 0x0c000000 +#define FSL_CORENET_RCWSR13_EC2_RGMII 0x08000000 +#define CONFIG_SYS_FSL_SCFG_PIXCLKCR_OFFSET 0x28 +#define PXCKEN_MASK 0x80000000 +#define PXCK_MASK 0x00FF0000 +#define PXCK_BITS_START 16#elif defined(CONFIG_PPC_T2080 ) || defined(CONFIG_PPC_T2081 )#define FSL_CORENET2_RCWSR4_SRDS1_PRTCL 0xff000000#define FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT 24
arch/powerpc/include/asm/processor.h +4 -0
@@ -1133,6 +1133,10 @@#define SVR_T1020 0x852100#define SVR_T1021 0x852101#define SVR_T1022 0x852102 +#define SVR_T1024 0x854000 +#define SVR_T1023 0x854100 +#define SVR_T1014 0x854400 +#define SVR_T1013 0x854500#define SVR_T2080 0x853000#define SVR_T2081 0x853100
drivers/net/fm/Makefile +2 -0
@@ -28,6 +28,8 @@ obj-$(CONFIG_PPC_T1040) += t1040.o obj-$(CONFIG_PPC_T1042) += t1040.o obj-$(CONFIG_PPC_T1020) += t1040.o obj-$(CONFIG_PPC_T1022) += t1040.o +obj-$(CONFIG_PPC_T1023) += t1024.o +obj-$(CONFIG_PPC_T1024) += t1024.o obj-$(CONFIG_PPC_T2080) += t2080.o obj-$(CONFIG_PPC_T2081) += t2080.o obj-$(CONFIG_PPC_T4240) += t4240.o
drivers/net/fm/t1024.c new file +88 -0
88 lines not on this page · raw message
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 2/9 powerpc/mpc85xx: Add T1024/T1023 SoC support
Quoted 32 lines · Shengzhou Liu
Add support for Freescale T1024/T1023 SoC.
The T1024 SoC includes the following function and features:
- Two 64-bit Power architecture e5500 cores, up to 1.4GHz
- private 256KB L2 cache each core and shared 256KB CoreNet platform cache (CPC)
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Data Path Acceleration Architecture (DPAA) incorporating acceleration
- Four MAC for 1G/2.5G/10G network interfaces (RGMII, SGMII, QSGMII, XFI)
- High-speed peripheral interfaces
- Three PCI Express 2.0 controllers
- Additional peripheral interfaces
- One SATA 2.0 controller
- Two USB 2.0 controllers with integrated PHY
- Enhanced secure digital host controller (SD/eSDHC/eMMC)
- Enhanced serial peripheral interface (eSPI)
- Four I2C controllers
- Four 2-pin UARTs or two 4-pin UARTs
- Integrated Flash Controller supporting NAND and NOR flash
- Two 8-channel DMA engines
- Multicore programmable interrupt controller (PIC)
- LCD interface (DIU) with 12 bit dual data rate
- QUICC Engine block supporting TDM, HDLC, and UART
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- Support for hardware virtualization and partitioning enforcement
- QorIQ Platform's Trust Architecture 2.0Differences between T1024 and T1023:
Feature T1024 T1023 QUICC Engine: yes no DIU: yes no Deep Sleep: yes no I2C controller: 4 3
Quoted 7 lines
DDR: 64-bit 32-bit
IFC: 32-bit 28-bitSigned-off-by Shengzhou Liu <[email protected]>---
v2: add new serdes0x135and0x119int1024_serdes.c
Applied to u-boot-mpc85xx, awaiting upstream.
York
PATCH v2 3/9 powerpc/t1024qds: Add T1024 QDS board support
In reply to Shengzhou LiuT1024QDS is a high-performance computing evaluation, development and test platform for T1024 QorIQ Power Architecture processor.
T1024QDS board Overview
-----------------------
- T1024 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with prioritization and bandwidth allocation
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
- Two 10M/100M/1G RGMII ports on-board
- Three 1G/2.5Gbps SGMII ports
- Four 1Gbps QSGMII ports
- one 10Gbps XFI or 10Base-KR interface
- SerDes: 4 lanes up to 10.3125GHz Supporting SGMII/QSGMII, XFI, PCIe, SATA and Aurora
- PCIe: Three PCI Express controllers with five PCIe slots.
- IFC: 128MB NOR Flash, 2GB NAND Flash, PromJet debug port and Qixis FPGA
- Video: DIU supports video up to 1280x1024x32 bpp.
- Chrontel CH7201 for HDMI connection.
- TI DS90C387R for direct LCD connection.
- Raw (not encoded) video connector for testing or other encoders.
- QUICC Engine block
- 32-bit RISC controller for flexible support of the communications peripherals
- Serial DMA channel for receive and transmit on all serial channels
- Two universal communication controllers, supporting TDM, HDLC, and UART
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- eSPI: Three SPI flash devices.
- SATA: one SATA 2.O.
- USB: Two USB2.0 ports with internal PHY (one Type-A + one micro Type mini-AB)
- eSDHC: Support SD, SDHC, SDXC and MMC/eMMC.
- I2C: Four I2C controllers.
- UART: Two UART on board.
---
v2: removed diu.c by using common diu_ch7301.c
arch/powerpc/cpu/mpc85xx/Kconfig | 4 + board/freescale/t102xqds/Kconfig | 12 + board/freescale/t102xqds/MAINTAINERS | 10 + board/freescale/t102xqds/Makefile | 17 + board/freescale/t102xqds/README | 328 +++++++++++ board/freescale/t102xqds/ddr.c | 170 ++++++ board/freescale/t102xqds/eth_t102xqds.c | 442 ++++++++++++++ board/freescale/t102xqds/law.c | 32 + board/freescale/t102xqds/pci.c | 23 + board/freescale/t102xqds/spl.c | 151 +++++ board/freescale/t102xqds/t1024_pbi.cfg | 26 + board/freescale/t102xqds/t1024_rcw.cfg | 10 + board/freescale/t102xqds/t102xqds.c | 319 ++++++++++ board/freescale/t102xqds/t102xqds.h | 14 + board/freescale/t102xqds/t102xqds_qixis.h | 61 ++ board/freescale/t102xqds/tlb.c | 117 ++++ configs/T1024QDS_D4_SECURE_BOOT_defconfig | 4 + configs/T1024QDS_NAND_defconfig | 5 + configs/T1024QDS_SDCARD_defconfig | 5 + configs/T1024QDS_SECURE_BOOT_defconfig | 4 + configs/T1024QDS_SPIFLASH_defconfig | 5 + include/configs/T102xQDS.h | 936 ++++++++++++++++++++++++++++++ 22 files changed, 2695 insertions(+) create mode 100644 board/freescale/t102xqds/Kconfig create mode 100644 board/freescale/t102xqds/MAINTAINERS create mode 100644 board/freescale/t102xqds/Makefile create mode 100644 board/freescale/t102xqds/README create mode 100644 board/freescale/t102xqds/ddr.c create mode 100644 board/freescale/t102xqds/eth_t102xqds.c create mode 100644 board/freescale/t102xqds/law.c create mode 100644 board/freescale/t102xqds/pci.c create mode 100644 board/freescale/t102xqds/spl.c create mode 100644 board/freescale/t102xqds/t1024_pbi.cfg create mode 100644 board/freescale/t102xqds/t1024_rcw.cfg create mode 100644 board/freescale/t102xqds/t102xqds.c create mode 100644 board/freescale/t102xqds/t102xqds.h create mode 100644 board/freescale/t102xqds/t102xqds_qixis.h create mode 100644 board/freescale/t102xqds/tlb.c create mode 100644 configs/T1024QDS_D4_SECURE_BOOT_defconfig create mode 100644 configs/T1024QDS_NAND_defconfig create mode 100644 configs/T1024QDS_SDCARD_defconfig create mode 100644 configs/T1024QDS_SECURE_BOOT_defconfig create mode 100644 configs/T1024QDS_SPIFLASH_defconfig create mode 100644 include/configs/T102xQDS.h
arch/powerpc/cpu/mpc85xx/Kconfig +4 -0
@@ -110,6 +110,9 @@ config TARGET_P2041RDB config TARGET_QEMU_PPCE500 bool "Support qemu-ppce500" +config TARGET_T102XQDS + bool "Support T102xQDS" + config TARGET_T1040QDS bool "Support T1040QDS"
@@ -183,6 +186,7 @@ source "board/freescale/p2020come/Kconfig" source "board/freescale/p2020ds/Kconfig" source "board/freescale/p2041rdb/Kconfig" source "board/freescale/qemu-ppce500/Kconfig" +source "board/freescale/t102xqds/Kconfig" source "board/freescale/t1040qds/Kconfig" source "board/freescale/t104xrdb/Kconfig" source "board/freescale/t208xqds/Kconfig"
board/freescale/t102xqds/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_T102XQDS + +config SYS_BOARD + default "t102xqds" + +config SYS_VENDOR + default "freescale" + +config SYS_CONFIG_NAME + default "T102xQDS" + +endif
board/freescale/t102xqds/MAINTAINERS new file +10 -0
@@ -0,0 +1,10 @@ +T102XQDS BOARD +M: Shengzhou Liu <[email protected]> +S: Maintained +F: board/freescale/t102xqds/ +F: include/configs/T102xQDS.h +F: configs/T1024QDS_defconfig +F: configs/T1024QDS_NAND_defconfig +F: configs/T1024QDS_SDCARD_defconfig +F: configs/T1024QDS_SPIFLASH_defconfig +F: configs/T1024QDS_D4_defconfig
board/freescale/t102xqds/Makefile new file +17 -0
@@ -0,0 +1,17 @@ +# +# Copyright 2014 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else +obj-y += t102xqds.o +obj-y += eth_t102xqds.o +obj-$(CONFIG_PCI) += pci.o +obj-$(CONFIG_FSL_DIU_FB) += ../t1040qds/diu.o +endif +obj-y += ddr.o +obj-y += law.o +obj-y += tlb.o
board/freescale/t102xqds/README new file +328 -0
328 lines not on this page · raw message
board/freescale/t102xqds/ddr.c new file +170 -0
170 lines not on this page · raw message
board/freescale/t102xqds/eth_t102xqds.c new file +442 -0
442 lines not on this page · raw message
board/freescale/t102xqds/law.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2014 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/t102xqds/pci.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright 2014 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/t102xqds/spl.c new file +151 -0
151 lines not on this page · raw message
board/freescale/t102xqds/t1024_pbi.cfg new file +26 -0
@@ -0,0 +1,26 @@ +#PBI commands +#Initialize CPC1 +09010000 00200400 +09138000 00000000 +091380c0 00000100 +#Configure CPC1 as 256KB SRAM +09010100 00000000 +09010104 fffc0007 +09010f00 08000000 +09010000 80000000 +#Configure LAW for CPC1 +09000cd0 00000000 +09000cd4 fffc0000 +09000cd8 81000011 +#Configure alternate space +09000010 00000000 +09000014 ff000000 +09000018 81000000 +#Configure SPI controller +09110000 80000403 +09110020 2d170008 +09110024 00100008 +09110028 00100008 +0911002c 00100008 +#Flush PBL data +091380c0 000FFFFF
board/freescale/t102xqds/t1024_rcw.cfg new file +10 -0
@@ -0,0 +1,10 @@ +# single-source clock:Sys_Clock = DDR_Refclock = Diff_Sysclk = 100 MHz +# Core/DDR/Platform/FMan = 1400MHz/1600MT/s/400MHz/700MHz + +# PBL preamble and RCW header for T1024QDS +aa55aa55 010e0100 +# Serdes protocol 0x6F +0810000e 00000000 00000000 00000000 +37800001 00000012 e8104000 21000000 +00000000 00000000 00000000 00030810 +00000000 036c5a00 00000000 00000006
board/freescale/t102xqds/t102xqds.c new file +319 -0
319 lines not on this page · raw message
board/freescale/t102xqds/t102xqds.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* Copyright 2014 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __T102x_QDS_H__ +#define __T102x_QDS_H__ + +void fdt_fixup_board_enet (void *blob); +void pci_of_setup (void *blob,bd_t *bd); +int select_i2c_ch_pca9547 (u8 ch); + +#endif
board/freescale/t102xqds/t102xqds_qixis.h new file +61 -0
61 lines not on this page · raw message
board/freescale/t102xqds/tlb.c new file +117 -0
117 lines not on this page · raw message
configs/T1024QDS_D4_SECURE_BOOT_defconfig new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,SYS_FSL_DDR4,SECURE_BOOT" +CONFIG_PPC=y +CONFIG_MPC85xx=y +CONFIG_TARGET_T102XQDS=y
configs/T1024QDS_NAND_defconfig new file +5 -0
@@ -0,0 +1,5 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,NAND" ++S:CONFIG_PPC=y ++S:CONFIG_MPC85xx=y ++S:CONFIG_TARGET_T102XQDS=y
configs/T1024QDS_SDCARD_defconfig new file +5 -0
@@ -0,0 +1,5 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD" ++S:CONFIG_PPC=y ++S:CONFIG_MPC85xx=y ++S:CONFIG_TARGET_T102XQDS=y
configs/T1024QDS_SECURE_BOOT_defconfig new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,SECURE_BOOT" +CONFIG_PPC=y +CONFIG_MPC85xx=y +CONFIG_TARGET_T102XQDS=y
configs/T1024QDS_SPIFLASH_defconfig new file +5 -0
@@ -0,0 +1,5 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH" ++S:CONFIG_PPC=y ++S:CONFIG_MPC85xx=y ++S:CONFIG_TARGET_T102XQDS=y
include/configs/T102xQDS.h new file +936 -0
936 lines not on this page · raw message
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 3/9 powerpc/t1024qds: Add T1024 QDS board support
Quoted 34 lines · Shengzhou Liu
T1024QDS is a high-performance computing evaluation, development and test platform for T1024 QorIQ Power Architecture processor.
T1024QDS board Overview
-----------------------
- T1024 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with prioritization and bandwidth allocation
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
- Two 10M/100M/1G RGMII ports on-board
- Three 1G/2.5Gbps SGMII ports
- Four 1Gbps QSGMII ports
- one 10Gbps XFI or 10Base-KR interface
- SerDes: 4 lanes up to 10.3125GHz Supporting SGMII/QSGMII, XFI, PCIe, SATA and Aurora
- PCIe: Three PCI Express controllers with five PCIe slots.
- IFC: 128MB NOR Flash, 2GB NAND Flash, PromJet debug port and Qixis FPGA
- Video: DIU supports video up to 1280x1024x32 bpp.
- Chrontel CH7201 for HDMI connection.
- TI DS90C387R for direct LCD connection.
- Raw (not encoded) video connector for testing or other encoders.
- QUICC Engine block
- 32-bit RISC controller for flexible support of the communications peripherals
- Serial DMA channel for receive and transmit on all serial channels
- Two universal communication controllers, supporting TDM, HDLC, and UART
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- eSPI: Three SPI flash devices.
- SATA: one SATA 2.O.
- USB: Two USB2.0 ports with internal PHY (one Type-A + one micro Type mini-AB)
- eSDHC: Support SD, SDHC, SDXC and MMC/eMMC.
- I2C: Four I2C controllers.
- UART: Two UART on board.
Quoted 4 lines
Signed-off-by Shengzhou Liu <[email protected]>---
v2: removeddiu.cby using commondiu_ch7301.c
Fix ft_board_setup() type
Fix MAINTAINERS for SECURE_BOOT
Fix Kconfig by adding SUPPORT_SPL
Applied to u-boot-mpc85xx, awaiting upstream.
York
PATCH v2 4/9 powerpc/t1024rdb: Add T1024 RDB board support
In reply to Shengzhou LiuT1024RDB is a Freescale Reference Design Board that hosts the T1024 SoC.
T1024RDB board Overview
-----------------------
- T1024 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with prioritization and bandwidth allocation
- 32-/64-bit DDR3L SDRAM memory controller with ECC and interleaving support
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
- Two 10M/100M/1G RGMII ports on-board
- one 10Gbps XFI interface
- PCIe: Three PCIe controllers: one PCIe Slot and two Mini-PCIe connectors.
- SerDes: 4 lanes up to 10.3125GHz
- IFC: 128MB NOR Flash, 512MB NAND Flash and CPLD
- eSPI: 64MB N25Q512 SPI flash.
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- USB: Two Type-A USB2.0 ports with internal PHY
- eSDHC: Support SD, SDHC, SDXC and MMC/eMMC
- I2C: Four I2C controllers
- UART: Two UART serial ports
---
v2: no change.
arch/powerpc/cpu/mpc85xx/Kconfig | 4 + board/freescale/t102xrdb/Kconfig | 12 + board/freescale/t102xrdb/MAINTAINERS | 9 + board/freescale/t102xrdb/Makefile | 17 + board/freescale/t102xrdb/README | 258 +++++++++ board/freescale/t102xrdb/cpld.c | 103 ++++ board/freescale/t102xrdb/cpld.h | 45 ++ board/freescale/t102xrdb/ddr.c | 154 ++++++ board/freescale/t102xrdb/eth_t102xrdb.c | 100 ++++ board/freescale/t102xrdb/law.c | 32 ++ board/freescale/t102xrdb/pci.c | 23 + board/freescale/t102xrdb/spl.c | 107 ++++ board/freescale/t102xrdb/t1024_pbi.cfg | 26 + board/freescale/t102xrdb/t1024_rcw.cfg | 8 + board/freescale/t102xrdb/t102xrdb.c | 142 +++++ board/freescale/t102xrdb/t102xrdb.h | 13 + board/freescale/t102xrdb/tlb.c | 117 +++++ configs/T1024RDB_NAND_defconfig | 5 + configs/T1024RDB_SDCARD_defconfig | 5 + configs/T1024RDB_SECURE_BOOT_defconfig | 4 + configs/T1024RDB_SPIFLASH_defconfig | 5 + configs/T1024RDB_defconfig | 4 + include/configs/T102xRDB.h | 896 ++++++++++++++++++++++++++++++++ 23 files changed, 2089 insertions(+) create mode 100644 board/freescale/t102xrdb/Kconfig create mode 100644 board/freescale/t102xrdb/MAINTAINERS create mode 100644 board/freescale/t102xrdb/Makefile create mode 100644 board/freescale/t102xrdb/README create mode 100644 board/freescale/t102xrdb/cpld.c create mode 100644 board/freescale/t102xrdb/cpld.h create mode 100644 board/freescale/t102xrdb/ddr.c create mode 100644 board/freescale/t102xrdb/eth_t102xrdb.c create mode 100644 board/freescale/t102xrdb/law.c create mode 100644 board/freescale/t102xrdb/pci.c create mode 100644 board/freescale/t102xrdb/spl.c create mode 100644 board/freescale/t102xrdb/t1024_pbi.cfg create mode 100644 board/freescale/t102xrdb/t1024_rcw.cfg create mode 100644 board/freescale/t102xrdb/t102xrdb.c create mode 100644 board/freescale/t102xrdb/t102xrdb.h create mode 100644 board/freescale/t102xrdb/tlb.c create mode 100644 configs/T1024RDB_NAND_defconfig create mode 100644 configs/T1024RDB_SDCARD_defconfig create mode 100644 configs/T1024RDB_SECURE_BOOT_defconfig create mode 100644 configs/T1024RDB_SPIFLASH_defconfig create mode 100644 configs/T1024RDB_defconfig create mode 100644 include/configs/T102xRDB.h
arch/powerpc/cpu/mpc85xx/Kconfig +4 -0
@@ -113,6 +113,9 @@ config TARGET_QEMU_PPCE500 config TARGET_T102XQDS bool "Support T102xQDS" +config TARGET_T102XRDB + bool "Support T102xRDB" + config TARGET_T1040QDS bool "Support T1040QDS"
@@ -187,6 +190,7 @@ source "board/freescale/p2020ds/Kconfig" source "board/freescale/p2041rdb/Kconfig" source "board/freescale/qemu-ppce500/Kconfig" source "board/freescale/t102xqds/Kconfig" +source "board/freescale/t102xrdb/Kconfig" source "board/freescale/t1040qds/Kconfig" source "board/freescale/t104xrdb/Kconfig" source "board/freescale/t208xqds/Kconfig"
board/freescale/t102xrdb/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_T102XRDB + +config SYS_BOARD + default "t102xrdb" + +config SYS_VENDOR + default "freescale" + +config SYS_CONFIG_NAME + default "T102xRDB" + +endif
board/freescale/t102xrdb/MAINTAINERS new file +9 -0
@@ -0,0 +1,9 @@ +T102XRDB BOARD +M: Shengzhou Liu <[email protected]> +S: Maintained +F: board/freescale/t102xrdb/ +F: include/configs/T102xRDB.h +F: configs/T1024RDB_defconfig +F: configs/T1024RDB_NAND_defconfig +F: configs/T1024RDB_SDCARD_defconfig +F: configs/T1024RDB_SPIFLASH_defconfig
board/freescale/t102xrdb/Makefile new file +17 -0
@@ -0,0 +1,17 @@ +# +# Copyright 2014 Freescale Semiconductor, Inc. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +else +obj-y += t102xrdb.o +obj-y += cpld.o +obj-y += eth_t102xrdb.o +obj-$(CONFIG_PCI) += pci.o +endif +obj-y += ddr.o +obj-y += law.o +obj-y += tlb.o
board/freescale/t102xrdb/README new file +258 -0
258 lines not on this page · raw message
board/freescale/t102xrdb/cpld.c new file +103 -0
103 lines not on this page · raw message
board/freescale/t102xrdb/cpld.h new file +45 -0
45 lines not on this page · raw message
board/freescale/t102xrdb/ddr.c new file +154 -0
154 lines not on this page · raw message
board/freescale/t102xrdb/eth_t102xrdb.c new file +100 -0
100 lines not on this page · raw message
board/freescale/t102xrdb/law.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2014 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 CONFIG_SYS_CPLD_BASE_PHYS + SET_LAW(CONFIG_SYS_CPLD_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/t102xrdb/pci.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* Copyright 2007-2014 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/t102xrdb/spl.c new file +107 -0
107 lines not on this page · raw message
board/freescale/t102xrdb/t1024_pbi.cfg new file +26 -0
@@ -0,0 +1,26 @@ +#PBI commands +#Initialize CPC1 +09010000 00200400 +09138000 00000000 +091380c0 00000100 +#Configure CPC1 as 256KB SRAM +09010100 00000000 +09010104 fffc0007 +09010f00 08000000 +09010000 80000000 +#Configure LAW for CPC1 +09000cd0 00000000 +09000cd4 fffc0000 +09000cd8 81000011 +#Configure alternate space +09000010 00000000 +09000014 ff000000 +09000018 81000000 +#Configure SPI controller +09110000 80000403 +09110020 2d170008 +09110024 00100008 +09110028 00100008 +0911002c 00100008 +#Flush PBL data +091380c0 000FFFFF
board/freescale/t102xrdb/t1024_rcw.cfg new file +8 -0
@@ -0,0 +1,8 @@ +#PBL preamble and RCW header for T1024RDB +aa55aa55 010e0100 +#SerDes Protocol: 0x95 +#Core/DDR: 1400Mhz/1600MT/s with single source clock +0810000c 00000000 00000000 00000000 +4a800003 80000012 ec027000 21000000 +00000000 00000000 00000000 00030810 +00000000 0b005a08 00000000 00000006
board/freescale/t102xrdb/t102xrdb.c new file +142 -0
142 lines not on this page · raw message
board/freescale/t102xrdb/t102xrdb.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* Copyright 2014 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __T1024_RDB_H__ +#define __T1024_RDB_H__ + +void fdt_fixup_board_enet (void *blob); +void pci_of_setup (void *blob,bd_t *bd); + +#endif
board/freescale/t102xrdb/tlb.c new file +117 -0
117 lines not on this page · raw message
configs/T1024RDB_NAND_defconfig new file +5 -0
@@ -0,0 +1,5 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,NAND" ++S:CONFIG_PPC=y ++S:CONFIG_MPC85xx=y ++S:CONFIG_TARGET_T102XRDB=y
configs/T1024RDB_SDCARD_defconfig new file +5 -0
@@ -0,0 +1,5 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD" ++S:CONFIG_PPC=y ++S:CONFIG_MPC85xx=y ++S:CONFIG_TARGET_T102XRDB=y
configs/T1024RDB_SECURE_BOOT_defconfig new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,SECURE_BOOT" +CONFIG_PPC=y +CONFIG_MPC85xx=y +CONFIG_TARGET_T102XRDB=y
configs/T1024RDB_SPIFLASH_defconfig new file +5 -0
@@ -0,0 +1,5 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH" ++S:CONFIG_PPC=y ++S:CONFIG_MPC85xx=y ++S:CONFIG_TARGET_T102XRDB=y
configs/T1024RDB_defconfig new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024" +CONFIG_PPC=y +CONFIG_MPC85xx=y +CONFIG_TARGET_T102XRDB=y
include/configs/T102xRDB.h new file +896 -0
896 lines not on this page · raw message
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 4/9 powerpc/t1024rdb: Add T1024 RDB board support
Quoted 22 lines · Shengzhou Liu
T1024RDB is a Freescale Reference Design Board that hosts the T1024 SoC.
T1024RDB board Overview
-----------------------
- T1024 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with prioritization and bandwidth allocation
- 32-/64-bit DDR3L SDRAM memory controller with ECC and interleaving support
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
- Two 10M/100M/1G RGMII ports on-board
- one 10Gbps XFI interface
- PCIe: Three PCIe controllers: one PCIe Slot and two Mini-PCIe connectors.
- SerDes: 4 lanes up to 10.3125GHz
- IFC: 128MB NOR Flash, 512MB NAND Flash and CPLD
- eSPI: 64MB N25Q512 SPI flash.
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- USB: Two Type-A USB2.0 ports with internal PHY
- eSDHC: Support SD, SDHC, SDXC and MMC/eMMC
- I2C: Four I2C controllers
- UART: Two UART serial ports
Quoted 4 lines
Signed-off-by Shengzhou Liu <[email protected]>---
v2: no change.
Fix ft_board_setup() type
Fix MAINTAINERS for SECURE_BOOT
Fix Kconfig by adding SUPPORT_SPL
Applied to u-boot-mpc85xx, awaiting upstream.
York
PATCH v2 5/9 net/fman: update 10GEC to fit new SoC
In reply to Shengzhou Liufm_standard_init() initializes each 10G port by FM_TGEC_INFO_INITIALIZER. but it needs different implementation of FM_TGEC_INFO_INITIALIZER on different SoCs. on SoCs earlier(e.g. T4240, T2080), the notation between 10GEC and MAC as below:
10GEC1->MAC9, 10GEC2->MAC10, 10GEC3->MAC1, 10GEC4->MAC2 on SoCs later(e.g. T1024, etc), the notation between 10GEC and MAC as below: 10GEC1->MAC1, 10GEC2->MAC2
so we introduce CONFIG_FSL_FM_10GEC_REGULAR_NOTATION to fit the new SoCs on which 10GEC enumeration is consistent with MAC enumeration.
---
v2: refine the commit message and add readme document.
arch/powerpc/include/asm/config_mpc85xx.h | 1 + arch/powerpc/include/asm/immap_85xx.h | 5 +++++ doc/README.fsl-dpaa | 10 ++++++++++ drivers/net/fm/eth.c | 7 +++++-- drivers/net/fm/init.c | 2 ++ include/fm_eth.h | 15 +++++++++++++++ 6 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 doc/README.fsl-dpaa
arch/powerpc/include/asm/config_mpc85xx.h +1 -0
@@ -810,6 +810,7 @@ defined(CONFIG_PPC_T1014) || defined(CONFIG_PPC_T1013)#define CONFIG_SYS_NUM_FMAN 1#define CONFIG_SYS_NUM_FM1_DTSEC 4#define CONFIG_SYS_NUM_FM1_10GEC 1 +#define CONFIG_FSL_FM_10GEC_REGULAR_NOTATION #define CONFIG_NUM_DDR_CONTROLLERS 1#define CONFIG_USB_MAX_CONTROLLER_COUNT 2#define CONFIG_SYS_FSL_DDR_VER FSL_DDR_VER_5_0
arch/powerpc/include/asm/immap_85xx.h +5 -0
@@ -1626,10 +1626,15 @@ typedef struct ccsr_gur {#define FSL_CORENET_DEVDISR2_DTSEC1_6 0x04000000#define FSL_CORENET_DEVDISR2_DTSEC1_9 0x00800000#define FSL_CORENET_DEVDISR2_DTSEC1_10 0x00400000 +#ifdef CONFIG_FSL_FM_10GEC_REGULAR_NOTATION +#define FSL_CORENET_DEVDISR2_10GEC1_1 0x80000000 +#define FSL_CORENET_DEVDISR2_10GEC1_2 0x40000000 +#else #define FSL_CORENET_DEVDISR2_10GEC1_1 0x00800000#define FSL_CORENET_DEVDISR2_10GEC1_2 0x00400000#define FSL_CORENET_DEVDISR2_10GEC1_3 0x80000000#define FSL_CORENET_DEVDISR2_10GEC1_4 0x40000000 +#endif #define FSL_CORENET_DEVDISR2_DTSEC2_1 0x00080000#define FSL_CORENET_DEVDISR2_DTSEC2_2 0x00040000#define FSL_CORENET_DEVDISR2_DTSEC2_3 0x00020000
doc/README.fsl-dpaa new file +10 -0
@@ -0,0 +1,10 @@ +This file documents Freescale DPAA-specific options. + +FMan (Frame Manager) + - CONFIG_FSL_FM_10GEC_REGULAR_NOTATION + on SoCs earlier(e.g. T4240, T2080), the notation between 10GEC and MAC as below: + 10GEC1->MAC9, 10GEC2->MAC10, 10GEC3->MAC1, 10GEC4->MAC2 + on SoCs later(e.g. T1024, etc), the notation between 10GEC and MAC as below: + 10GEC1->MAC1, 10GEC2->MAC2 + so we introduce CONFIG_FSL_FM_10GEC_REGULAR_NOTATION to identify the new SoCs on + which 10GEC enumeration is consistent with MAC enumeration.
drivers/net/fm/eth.c +5 -2
@@ -565,9 +565,11 @@ static int fm_eth_init_mac(struct fm_eth *fm_eth, struct ccsr_fman *reg) num = fm_eth->num; #ifdef CONFIG_SYS_FMAN_V3 +#ifndef CONFIG_FSL_FM_10GEC_REGULAR_NOTATION if (fm_eth->type == FM_ETH_10G_E) { -/* 10GEC1/10GEC2 use mEMAC9/mEMAC10 -* 10GEC3/10GEC4 use mEMAC1/mEMAC2 + /* 10GEC1/10GEC2 use mEMAC9/mEMAC10 on T2080/T4240. + * 10GEC3/10GEC4 use mEMAC1/mEMAC2 on T2080. + * 10GEC1 uses mEMAC1 on T1024. * so it needs to change the num. */ if (fm_eth->num >= 2)
@@ -575,6 +577,7 @@ static int fm_eth_init_mac(struct fm_eth *fm_eth, struct ccsr_fman *reg) else num += 8; } +#endif base = ®->memac[num].fm_memac; phyregs = ®->memac[num].fm_memac_mdio;#else
drivers/net/fm/init.c +2 -0
@@ -254,8 +254,10 @@ static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop)*/ if (((info->port == FM1_DTSEC9) && (PORT_IS_ENABLED(FM1_10GEC1))) || ((info->port == FM1_DTSEC10) && (PORT_IS_ENABLED(FM1_10GEC2))) || + ((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC1))) || ((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC3))) || ((info->port == FM1_DTSEC2) && (PORT_IS_ENABLED(FM1_10GEC4))) || + ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC1))) || ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC9))) || ((info->port == FM1_10GEC2) && (PORT_IS_ENABLED(FM1_DTSEC10))) || ((info->port == FM1_10GEC3) && (PORT_IS_ENABLED(FM1_DTSEC1))) ||
include/fm_eth.h +15 -0
@@ -75,6 +75,20 @@ enum fm_eth_type { offsetof(struct ccsr_fman, memac[n-1]),\ } +#ifdef CONFIG_FSL_FM_10GEC_REGULAR_NOTATION +#define FM_TGEC_INFO_INITIALIZER (idx, n) \ +{ \ + FM_ETH_INFO_INITIALIZER(idx, CONFIG_SYS_FM1_TGEC_MDIO_ADDR) \ + .index = idx, \ + .num = n - 1, \ + .type = FM_ETH_10G_E, \ + .port = FM##idx##_10GEC##n, \ + .rx_port_id = RX_PORT_10G_BASE2 + n - 1, \ + .tx_port_id = TX_PORT_10G_BASE2 + n - 1, \ + .compat_offset = CONFIG_SYS_FSL_FM##idx##_OFFSET + \ + offsetof(struct ccsr_fman, memac[n-1]),\ +} +#else #define FM_TGEC_INFO_INITIALIZER (idx, n) \ { \ FM_ETH_INFO_INITIALIZER(idx, CONFIG_SYS_FM2_TGEC_MDIO_ADDR) \
@@ -87,6 +101,7 @@ enum fm_eth_type { .compat_offset = CONFIG_SYS_FSL_FM##idx##_OFFSET + \ offsetof(struct ccsr_fman, memac[n-1+8]),\ } +#endif #if (CONFIG_SYS_NUM_FM1_10GEC >=3 )#define FM_TGEC_INFO_INITIALIZER2 (idx, n) \
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 5/9 net/fman: update 10GEC to fit new SoC
Quoted 7 lines · Shengzhou Liu
fm_standard_init()initializes each 10G port byFM_TGEC_INFO_INITIALIZER. but it needs different implementation ofFM_TGEC_INFO_INITIALIZERon different SoCs. on SoCs earlier(e.g. T4240, T2080), the notation between 10GEC and MAC as below:10GEC1->MAC9, 10GEC2->MAC10, 10GEC3->MAC1, 10GEC4->MAC2 on SoCs later(e.g. T1024, etc), the notation between 10GEC and MAC as below: 10GEC1->MAC1, 10GEC2->MAC2
Quoted 7 lines
so we introduce
CONFIG_FSL_FM_10GEC_REGULAR_NOTATIONto fit the new SoCs on which 10GEC enumeration is consistent with MAC enumeration.Signed-off-by Shengzhou Liu <[email protected]>---
v2: refine the commit message and add readme document.
Applied to u-boot-mpc85xx, awaiting upstream.
York
PATCH v2 6/9 board/t1024qds: update pin multiplexing
In reply to Shengzhou LiuAdd multiplexing support among SPI flash, TDM riser card and SDXC. it routes SPI pins to SPI flash by default.
Route SPI pins to SD slot if "adaptor=sdxc" is set in hwconfig. Route SPI pins to TDM riser card and do fixup for dts if "pin_mux=tdm" is set in hwconfig.
---
v2: refine commit message.
board/freescale/t102xqds/t102xqds.c | 26 ++++++++++++++++++++++++++ board/freescale/t102xqds/t102xqds_qixis.h | 7 +++++-- 2 files changed, 31 insertions(+), 2 deletions(-)
board/freescale/t102xqds/t102xqds.c +26 -0
@@ -165,6 +165,8 @@ static void board_mux_setup(void)/* Route QE_TDM multiplexed signals to TDM Riser slot */ QIXIS_WRITE (brdcfg[15 ], brdcfg15 |BRDCFG15_DIUSEL_TDM );QIXIS_WRITE (brdcfg[13 ],BRDCFG13_TDM_INTERFACE <<2 ); +QIXIS_WRITE (brdcfg[5 ], (QIXIS_READ (brdcfg[5 ]) & + ~BRDCFG5_SPIRTE_MASK ) |BRDCFG5_SPIRTE_TDM ); }else if (hwconfig_arg_cmp ("pin_mux" ,"ucc" )) {/* to UCC (ProfiBus) interface */ QIXIS_WRITE (brdcfg[15 ], brdcfg15 |BRDCFG15_DIUSEL_UCC );
@@ -176,6 +178,11 @@ static void board_mux_setup(void)QIXIS_WRITE (brdcfg[15 ], brdcfg15 |BRDCFG15_LCDFM | BRDCFG15_LCDPD | BRDCFG15_DIUSEL_LCD); } + +if (hwconfig_arg_cmp ("adaptor" ,"sdxc" )) +/* Route SPI_CS multiplexed signals to SD slot */ +QIXIS_WRITE (brdcfg[5 ], (QIXIS_READ (brdcfg[5 ]) & + ~BRDCFG5_SPIRTE_MASK ) |BRDCFG5_SPIRTE_SDHC ); }#endif
@@ -265,6 +272,24 @@ int misc_init_r(void)return 0 ; } +void fdt_fixup_spi_mux (void *blob) +{ +int nodeoff =0 ; + +if (hwconfig_arg_cmp ("pin_mux" ,"tdm" )) { +while ((nodeoff =fdt_node_offset_by_compatible (blob,0 , +"eon,en25s64" )) >=0 ) { +fdt_del_node (blob, nodeoff); + } + }else { +/* remove tdm node */ +while ((nodeoff =fdt_node_offset_by_compatible (blob,0 , +"maxim,ds26522" )) >=0 ) { +fdt_del_node (blob, nodeoff); + } + } +} +void ft_board_setup (void *blob,bd_t *bd) {phys_addr_t base;
@@ -291,6 +316,7 @@ void ft_board_setup(void *blob, bd_t *bd)fdt_fixup_fman_ethernet (blob);fdt_fixup_board_enet (blob);#endif +fdt_fixup_spi_mux (blob); }void qixis_dump_switch (void )
board/freescale/t102xqds/t102xqds_qixis.h +5 -2
@@ -17,6 +17,9 @@#define BRDCFG5_IMX_MASK 0xC0#define BRDCFG5_IMX_DIU 0x80 +#define BRDCFG5_SPIRTE_MASK 0x07 +#define BRDCFG5_SPIRTE_TDM 0x01 +#define BRDCFG5_SPIRTE_SDHC 0x02#define BRDCFG9_XFI_TX_DISABLE 0x10/* BRDCFG13[0:5] TDM configuration and setup */
@@ -35,8 +38,8 @@#define BRDCFG15_DIUSEL_MASK 0x03#define BRDCFG15_DIUSEL_HDMI 0x00#define BRDCFG15_DIUSEL_LCD 0x01 -#define BRDCFG15_DIUSEL_UCC 0x10 -#define BRDCFG15_DIUSEL_TDM 0x11 +#define BRDCFG15_DIUSEL_UCC 0x02 +#define BRDCFG15_DIUSEL_TDM 0x03/* SYSCLK */ #define QIXIS_SYSCLK_66 0x0
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 6/9 board/t1024qds: update pin multiplexing
Quoted 6 lines · Shengzhou Liu
Add multiplexing support among SPI flash, TDM riser card and SDXC. it routes SPI pins to SPI flash by default.
Route SPI pins to SD slot if "adaptor=sdxc" is set in hwconfig. Route SPI pins to TDM riser card and do fixup for dts if "pin_mux=tdm" is set in hwconfig.
Quoted 6 lines
Signed-off-by Shengzhou Liu <[email protected]>Signed-off-by Xie Xiaobo <[email protected]>Signed-off-by Zhao Qiang <[email protected]>---
v2: refine commit message.
Applied to u-boot-mpc85xx, awaiting upstream.
York
PATCH v2 7/9 net/phy: enable serdes auto-negotiation for vsc8514 phy
In reply to Shengzhou LiuVSC8514 QSGMII PHY requires enabling auto-negotiation, otherwise it wouldn't work.
---
v2: updated copyright year.
drivers/net/phy/vitesse.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/net/phy/vitesse.c +11 -2
@@ -1,8 +1,8 @@/* * Vitesse PHY drivers * -* Copyright 2010-2012 Freescale Semiconductor, Inc. -* Author: Andy Fleming +* Copyright 2010-2014 Freescale Semiconductor, Inc. +* Original Author: Andy Fleming * Add vsc8662 phy support - Priyanka Jain * SPDX-License-Identifier: GPL-2.0+ */
@@ -50,6 +50,7 @@#define MIIM_VSC8574_18G_CMDSTAT 0x8000/* Vitesse VSC8514 control register */ +#define MIIM_VSC8514_MAC_SERDES_CON 0x10#define MIIM_VSC8514_GENERAL18 0x12#define MIIM_VSC8514_GENERAL19 0x13#define MIIM_VSC8514_GENERAL23 0x17
@@ -246,6 +247,14 @@ static int vsc8514_config(struct phy_device *phydev) val = (val &0xf8ff );phy_write (phydev,MDIO_DEVAD_NONE ,MIIM_VSC8514_GENERAL23 , val); +/* Enable Serdes Auto-negotiation */ +phy_write (phydev,MDIO_DEVAD_NONE ,PHY_EXT_PAGE_ACCESS , +PHY_EXT_PAGE_ACCESS_EXTENDED3 ); + val =phy_read (phydev,MDIO_DEVAD_NONE ,MIIM_VSC8514_MAC_SERDES_CON ); + val = val |MIIM_VSC8574_MAC_SERDES_ANEG ; +phy_write (phydev,MDIO_DEVAD_NONE ,MIIM_VSC8514_MAC_SERDES_CON , val); +phy_write (phydev,MDIO_DEVAD_NONE ,PHY_EXT_PAGE_ACCESS ,0 ); +genphy_config_aneg (phydev);return 0 ;
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 7/9 net/phy: enable serdes auto-negotiation for vsc8514 phy
Quoted 7 lines · Shengzhou Liu
VSC8514 QSGMII PHY requires enabling auto-negotiation, otherwise it wouldn't work.
Signed-off-by Shengzhou Liu <[email protected]>---
v2: updated copyright year.
Applied to u-boot-mpc85xx, awaiting upstream.
York
PATCH v2 8/9 t1024qds: increase IO drive strength
In reply to Shengzhou LiuIncrease IO drive strength to fix FCS error on RGMII ports on T1024QDS.
---
v2: removed rdb.
arch/powerpc/include/asm/immap_85xx.h | 3 +++ board/freescale/t102xqds/t102xqds.c | 4 ++++ 2 files changed, 7 insertions(+)
arch/powerpc/include/asm/immap_85xx.h +3 -0
@@ -1803,6 +1803,7 @@ defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022)#define FSL_CORENET_RCWSR13_EC2 0x0c000000#define FSL_CORENET_RCWSR13_EC2_RGMII 0x08000000#define CONFIG_SYS_FSL_SCFG_PIXCLKCR_OFFSET 0x28 +#define CONFIG_SYS_FSL_SCFG_IODSECR1_OFFSET 0xd00#define PXCKEN_MASK 0x80000000#define PXCK_MASK 0x00FF0000#define PXCK_BITS_START 16
@@ -2990,6 +2991,8 @@ struct ccsr_sfp_regs { (CONFIG_SYS_CCSRBAR + CONFIG_SYS_FSL_SCFG_OFFSET)#define CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR \ (CONFIG_SYS_FSL_SCFG_ADDR + CONFIG_SYS_FSL_SCFG_PIXCLKCR_OFFSET) +#define CONFIG_SYS_FSL_SCFG_IODSECR1_ADDR \ + (CONFIG_SYS_FSL_SCFG_ADDR + CONFIG_SYS_FSL_SCFG_IODSECR1_OFFSET)#define CONFIG_SYS_FSL_QMAN_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_FSL_QMAN_OFFSET)#define CONFIG_SYS_FSL_BMAN_ADDR \
board/freescale/t102xqds/t102xqds.c +4 -0
@@ -220,6 +220,10 @@ int board_early_init_r(void)#endif select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT );board_mux_lane_to_slot (); + +/* Increase IO drive strength to address FCS error on RGMII */ +out_be32 ((unsigned *)CONFIG_SYS_FSL_SCFG_IODSECR1_ADDR ,0xbfdb7800 ); +return 0 ; }
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 8/9 t1024qds: increase IO drive strength
Quoted 7 lines · Shengzhou Liu
Increase IO drive strength to fix FCS error on RGMII ports on T1024QDS.
Signed-off-by Shengzhou Liu <[email protected]>---
v2: removed rdb.
Applied to u-boot-mpc85xx, awaiting upstream.
York
PATCH v2 9/9 board/t1024qds: add retimer support on t1024qds
In reply to Shengzhou LiuInitialize retimer for XFI on t1024qds.
---
v2: no change.
board/freescale/t102xqds/t102xqds.c | 57 +++++++++++++++++++++++++++++++++++++ include/configs/T102xQDS.h | 5 +++- 2 files changed, 61 insertions(+), 1 deletion(-)
board/freescale/t102xqds/t102xqds.c +57 -0
@@ -186,6 +186,62 @@ static void board_mux_setup(void) }#endif +void board_retimer_ds125df111_init (void ) +{ +u8 reg; + +/* Retimer DS125DF111 is connected to I2C1_CH7_CH5 */ + reg =I2C_MUX_CH7 ; +i2c_write (I2C_MUX_PCA_ADDR_PRI ,0 ,1 , ®,1 ); + reg =I2C_MUX_CH5 ; +i2c_write (I2C_MUX_PCA_ADDR_SEC ,0 ,1 , ®,1 ); + +/* Access to Control/Shared register */ + reg =0x0 ; +i2c_write (I2C_RETIMER_ADDR ,0xff ,1 , ®,1 ); + +/* Read device revision and ID */ +i2c_read (I2C_RETIMER_ADDR ,1 ,1 , ®,1 ); +debug ("Retimer version id = 0x%x\n" , reg); + +/* Enable Broadcast */ + reg =0x0c ; +i2c_write (I2C_RETIMER_ADDR ,0xff ,1 , ®,1 ); + +/* Reset Channel Registers */ +i2c_read (I2C_RETIMER_ADDR ,0 ,1 , ®,1 ); + reg |=0x4 ; +i2c_write (I2C_RETIMER_ADDR ,0 ,1 , ®,1 ); + +/* Enable override divider select and Enable Override Output Mux */ +i2c_read (I2C_RETIMER_ADDR ,9 ,1 , ®,1 ); + reg |=0x24 ; +i2c_write (I2C_RETIMER_ADDR ,9 ,1 , ®,1 ); + +/* Select VCO Divider to full rate (000) */ +i2c_read (I2C_RETIMER_ADDR ,0x18 ,1 , ®,1 ); + reg &=0x8f ; +i2c_write (I2C_RETIMER_ADDR ,0x18 ,1 , ®,1 ); + +/* Select active PFD MUX input as re-timed data (001) */ +i2c_read (I2C_RETIMER_ADDR ,0x1e ,1 , ®,1 ); + reg &=0x3f ; + reg |=0x20 ; +i2c_write (I2C_RETIMER_ADDR ,0x1e ,1 , ®,1 ); + +/* Set data rate as 10.3125 Gbps */ + reg =0x0 ; +i2c_write (I2C_RETIMER_ADDR ,0x60 ,1 , ®,1 ); + reg =0xb2 ; +i2c_write (I2C_RETIMER_ADDR ,0x61 ,1 , ®,1 ); + reg =0x90 ; +i2c_write (I2C_RETIMER_ADDR ,0x62 ,1 , ®,1 ); + reg =0xb3 ; +i2c_write (I2C_RETIMER_ADDR ,0x63 ,1 , ®,1 ); + reg =0xcd ; +i2c_write (I2C_RETIMER_ADDR ,0x64 ,1 , ®,1 ); +} +int board_early_init_r (void ) {#ifdef CONFIG_SYS_FLASH_BASE
@@ -220,6 +276,7 @@ int board_early_init_r(void)#endif select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT );board_mux_lane_to_slot (); +board_retimer_init ();/* Increase IO drive strength to address FCS error on RGMII */ out_be32 ((unsigned *)CONFIG_SYS_FSL_SCFG_IODSECR1_ADDR ,0xbfdb7800 );
include/configs/T102xQDS.h +4 -1
@@ -555,11 +555,14 @@ unsigned long get_board_ddr_clk(void);#define I2C_MUX_PCA_ADDR 0x77#define I2C_MUX_PCA_ADDR_PRI 0x77/* Primary Mux*/ - +#define I2C_MUX_PCA_ADDR_SEC 0x76/* Secondary multiplexer */ +#define I2C_RETIMER_ADDR 0x18/* I2C bus multiplexer */ #define I2C_MUX_CH_DEFAULT 0x8#define I2C_MUX_CH_DIU 0xC +#define I2C_MUX_CH5 0xD +#define I2C_MUX_CH7 0xF/* LDI/DVI Encoder for display */ #define CONFIG_SYS_I2C_LDI_ADDR 0x38
Signature · 1 line
2.1.0.27.g96db324
PATCH v2 1/9 net/fm: add 2.5G SGMII support
In reply to Shengzhou LiuQuoted 9 lines · Shengzhou Liu
As auto-negotiation is not supported for 2.5G SGMII, we need to add a new type
PHY_INTERFACE_MODE_SGMII_2500to differentiate SGMII-1G and SGMII-2.5G with different setting for auto-negotiation.Signed-off-by Shaohui Xie <[email protected]>Signed-off-by Shengzhou Liu <[email protected]>---
v2: no change
v1 patch has been accepted. No action is needed for this one.
York