From d087e0e26293a34752a6279da85f94a97084686c Mon Sep 17 00:00:00 2001 From: vijay rai Date: Wed, 23 Jul 2014 18:25:47 +0530 Subject: powerpc/t104xrdb: Add Support of rcw for T1042RDB in u-boot This patch adds support of rcw for T1042RDB, it makes following changes : - Adds t1042_rcw.cfg file for serdes protocol 0x86 for T1042RDB - Renames t1042_pi_rcw.cfg file from t1042_rcw.cfg and also updates comments for valid serdes protocol which is 0x06 - Also updates CONFIG_SYS_FSL_PBL_RCW for T1042RDB Signed-off-by: Vijay Rai Signed-off-by: Priyanka Jain Reviewed-by: York Sun diff --git a/board/freescale/t104xrdb/t1042_pi_rcw.cfg b/board/freescale/t104xrdb/t1042_pi_rcw.cfg new file mode 100644 index 0000000..57de89a --- /dev/null +++ b/board/freescale/t104xrdb/t1042_pi_rcw.cfg @@ -0,0 +1,7 @@ +#PBL preamble and RCW header +aa55aa55 010e0100 +# serdes protocol 0x06 +0c18000e 0e000000 00000000 00000000 +06000002 00400002 e8106000 01000000 +00000000 00000000 00000000 00030810 +00000000 01fe0a06 00000000 00000000 diff --git a/board/freescale/t104xrdb/t1042_rcw.cfg b/board/freescale/t104xrdb/t1042_rcw.cfg index a3ea8ad..db4d52f 100644 --- a/board/freescale/t104xrdb/t1042_rcw.cfg +++ b/board/freescale/t104xrdb/t1042_rcw.cfg @@ -1,7 +1,7 @@ #PBL preamble and RCW header aa55aa55 010e0100 -# serdes protocol 0x66 +# serdes protocol 0x86 0c18000e 0e000000 00000000 00000000 -06000002 00400002 e8106000 01000000 -00000000 00000000 00000000 00030810 -00000000 01fe0a06 00000000 00000000 +86000002 80000002 ec027000 01000000 +00000000 00000000 00000000 00032810 +00000000 0342500f 00000000 00000000 diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 0ee0ff2..c5c21d1 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -19,6 +19,9 @@ #define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/t104xrdb/t1040_rcw.cfg #endif #ifdef CONFIG_T1042RDB_PI +#define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/t104xrdb/t1042_pi_rcw.cfg +#endif +#ifdef CONFIG_T1042RDB #define CONFIG_SYS_FSL_PBL_RCW $(SRCTREE)/board/freescale/t104xrdb/t1042_rcw.cfg #endif -- cgit v0.10.2 From 363fb32aca268701a0918d67099fb344194f1746 Mon Sep 17 00:00:00 2001 From: vijay rai Date: Tue, 19 Aug 2014 12:46:53 +0530 Subject: powerpc/t104xrdb: Add T1042RDB board support T1042RDB is a Freescale reference board that hosts the T1042 SoC (and variants). The board is similar to T1040RDB, T1042 is a reduced personality of T1040 SoC without Integrated 8-port Gigabit(L2 Switch). T1042RDB is configured with serdes protocol 0x86 which can support following interfaces - 2 RGMII's on DTSEC4, DTSEC5 - 1 SGMII on DTSEC3 DTSEC1, DTSEC2 are not connected on board. This Patch - add T1042RDB support - updates README file for T1042RDB details and update commands for switching to alternate banks from vBank0 to vBank4 and vice versa This patch also does minor clean ups for fdt defines for T1042RDB and T1042RDB_PI board Signed-off-by: Vijay Rai Signed-off-by: Priyanka Jain Reviewed-by: York Sun diff --git a/board/freescale/t104xrdb/MAINTAINERS b/board/freescale/t104xrdb/MAINTAINERS index 364b0a9..62aae2f 100644 --- a/board/freescale/t104xrdb/MAINTAINERS +++ b/board/freescale/t104xrdb/MAINTAINERS @@ -6,6 +6,7 @@ F: include/configs/T104xRDB.h F: configs/T1040RDB_defconfig F: configs/T1040RDB_NAND_defconfig F: configs/T1040RDB_SPIFLASH_defconfig +F: configs/T1042RDB_defconfig F: configs/T1042RDB_PI_defconfig F: configs/T1042RDB_PI_NAND_defconfig F: configs/T1042RDB_PI_SPIFLASH_defconfig diff --git a/board/freescale/t104xrdb/README b/board/freescale/t104xrdb/README index cdbe1fa..a0f5fa9 100644 --- a/board/freescale/t104xrdb/README +++ b/board/freescale/t104xrdb/README @@ -4,10 +4,23 @@ The T1040RDB is a Freescale reference board that hosts the T1040 SoC (and variants). Variants inclued T1042 presonality of T1040, in which case T1040RDB can also be called T1042RDB. +The T1042RDB is a Freescale reference board that hosts the T1042 SoC +(and variants). The board is similar to T1040RDB, T1040 is a reduced +personality of T1040 SoC without Integrated 8-port Gigabit(L2 Switch). + The T1042RDB_PI is a Freescale reference board that hosts the T1042 SoC. (a personality of T1040 SoC). The board is similar to T1040RDB but is designed specially with low power features targeted for Printing Image Market. +Basic difference's among T1040RDB, T1042RDB_PI, T1042RDB +------------------------------------------------------------------------- +Board Si Protocol Targeted Market +------------------------------------------------------------------------- +T1040RDB T1040 0x66 Networking +T1040RDB T1042 0x86 Networking +T1042RDB_PI T1042 0x06 Printing & Imaging + + T1040 SoC Overview ------------------ The QorIQ T1040/T1042 processor support four integrated 64-bit e5500 PA @@ -194,10 +207,10 @@ The below commands apply to the board Commands for switching to alternate bank. 1. To change from vbank0 to vbank4 - => qixis_reset altbank (it will boot using vbank4) + => cpld reset altbank (it will boot using vbank4) 2.To change from vbank4 to vbank0 - => qixis reset (it will boot using vbank0) + => cpld reset (it will boot using vbank0) NAND boot with 2 Stage boot loader ---------------------------------- diff --git a/board/freescale/t104xrdb/eth.c b/board/freescale/t104xrdb/eth.c index 63e5f90..c8b6c67 100644 --- a/board/freescale/t104xrdb/eth.c +++ b/board/freescale/t104xrdb/eth.c @@ -43,6 +43,16 @@ int board_eth_init(bd_t *bis) CONFIG_SYS_SGMII1_PHY_ADDR); break; #endif +#ifdef CONFIG_T1042RDB + case PHY_INTERFACE_MODE_SGMII: + /* T1042RDB doesn't supports SGMII on DTSEC1 & DTSEC2 */ + if ((FM1_DTSEC1 == i) || (FM1_DTSEC2 == i)) + fm_info_set_phy_address(i, 0); + /* T1042RDB only supports SGMII on DTSEC3 */ + fm_info_set_phy_address(FM1_DTSEC3, + CONFIG_SYS_SGMII1_PHY_ADDR); + break; +#endif case PHY_INTERFACE_MODE_RGMII: if (FM1_DTSEC4 == i) phy_addr = CONFIG_SYS_RGMII1_PHY_ADDR; diff --git a/configs/T1042RDB_defconfig b/configs/T1042RDB_defconfig new file mode 100644 index 0000000..85eceb9 --- /dev/null +++ b/configs/T1042RDB_defconfig @@ -0,0 +1,4 @@ +CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042RDB" +CONFIG_PPC=y +CONFIG_MPC85xx=y +CONFIG_TARGET_T104XRDB=y diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index c5c21d1..9001fcbc9 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -480,7 +480,7 @@ /* I2C bus multiplexer */ #define I2C_MUX_PCA_ADDR 0x70 -#ifdef CONFIG_T1040RDB +#if defined(CONFIG_T1040RDB) || defined(CONFIG_T1042RDB) #define I2C_MUX_CH_DEFAULT 0x8 #endif @@ -636,7 +636,7 @@ #define CONFIG_SYS_DPAA_FMAN #define CONFIG_SYS_DPAA_PME -#ifdef CONFIG_T1040RDB +#if defined(CONFIG_T1040RDB) || defined(CONFIG_T1042RDB) #define CONFIG_QE #define CONFIG_U_QE #endif @@ -665,7 +665,7 @@ #define CONFIG_SYS_FMAN_FW_ADDR 0xEFF00000 #endif -#ifdef CONFIG_T1040RDB +#if defined(CONFIG_T1040RDB) || defined(CONFIG_T1042RDB) #if defined(CONFIG_SPIFLASH) #define CONFIG_SYS_QE_FW_ADDR 0x130000 #elif defined(CONFIG_SDCARD) @@ -689,7 +689,7 @@ #endif #ifdef CONFIG_FMAN_ENET -#ifdef CONFIG_T1040RDB +#if defined(CONFIG_T1040RDB) || defined(CONFIG_T1042RDB) #define CONFIG_SYS_SGMII1_PHY_ADDR 0x03 #endif #define CONFIG_SYS_RGMII1_PHY_ADDR 0x01 @@ -791,13 +791,14 @@ #define CONFIG_BAUDRATE 115200 #define __USB_PHY_TYPE utmi +#define RAMDISKFILE "t104xrdb/ramdisk.uboot" #ifdef CONFIG_T1040RDB #define FDTFILE "t1040rdb/t1040rdb.dtb" -#define RAMDISKFILE "t1040rdb/ramdisk.uboot" -#elif CONFIG_T1042RDB_PI -#define FDTFILE "t1040rdb_pi/t1040rdb_pi.dtb" -#define RAMDISKFILE "t1040rdb_pi/ramdisk.uboot" +#elif defined(CONFIG_T1042RDB_PI) +#define FDTFILE "t1042rdb_pi/t1042rdb_pi.dtb" +#elif defined(CONFIG_T1042RDB) +#define FDTFILE "t1042rdb/t1042rdb.dtb" #endif #ifdef CONFIG_FSL_DIU_FB -- cgit v0.10.2 From e628c8f75de952031f7b9fb9ae465a2a99d4c7f8 Mon Sep 17 00:00:00 2001 From: ramneek mehresh Date: Fri, 22 Aug 2014 10:56:05 +0530 Subject: powerpc/8xxx: Fix in USB device-tree fixup Fix following issues in USB device-tree fixup: - returns when either dr_mode or phy_type not defined. This was terminating fix-up when only either property was defined in hwconfig string - updates dr_mode_type or dr_phy_type with junk value when their index is -1. Now these are updated only when their respective index is pointing to relevant types in modes[] and phys[] array - dr_mode_type and dr_phy_type were not NULL for each controller Signed-off-by: Ramneek Mehresh Reviewed-by: York Sun diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index 9273745..4cec5e1 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -1,5 +1,5 @@ /* - * Copyright 2009-2012 Freescale Semiconductor, Inc. + * Copyright 2009-2014 Freescale Semiconductor, Inc. * * This file is derived from arch/powerpc/cpu/mpc85xx/cpu.c and * arch/powerpc/cpu/mpc86xx/cpu.c. Basically this file contains @@ -123,14 +123,14 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) { const char *modes[] = { "host", "peripheral", "otg" }; const char *phys[] = { "ulpi", "utmi" }; - const char *dr_mode_type = NULL; - const char *dr_phy_type = NULL; int usb_mode_off = -1; int usb_phy_off = -1; char str[5]; int i, j; for (i = 1; i <= CONFIG_USB_MAX_CONTROLLER_COUNT; i++) { + const char *dr_mode_type = NULL; + const char *dr_phy_type = NULL; int mode_idx = -1, phy_idx = -1; snprintf(str, 5, "%s%d", "usb", i); if (hwconfig(str)) { @@ -150,18 +150,16 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd) } } - if (mode_idx < 0 || phy_idx < 0) { - puts("ERROR: wrong usb mode/phy defined!!\n"); - return; - } - - dr_mode_type = modes[mode_idx]; - dr_phy_type = phys[phy_idx]; - if (mode_idx < 0 && phy_idx < 0) { printf("WARNING: invalid phy or mode\n"); return; } + + if (mode_idx > -1) + dr_mode_type = modes[mode_idx]; + + if (phy_idx > -1) + dr_phy_type = phys[phy_idx]; } usb_mode_off = fdt_fixup_usb_mode_phy_type(blob, -- cgit v0.10.2 From 38e0e15372f9f463ab8dd30d21a46cb477e80dd4 Mon Sep 17 00:00:00 2001 From: Shaveta Leekha Date: Thu, 4 Sep 2014 11:43:57 +0530 Subject: powerpc/b4860: Updated default hwconfig to enable only cpc2 CPC1 is not being enabled by default as powerpc is supposed to use only CPC2. Though by editing hwconfig en_cpc option, CPC1 can also be enabled. Signed-off-by: Shaveta Leekha Signed-off-by: Sandeep Singh Reviewed-by: York Sun diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h index 953d06b..6deb784 100644 --- a/include/configs/B4860QDS.h +++ b/include/configs/B4860QDS.h @@ -819,9 +819,16 @@ unsigned long get_board_ddr_clk(void); #define __USB_PHY_TYPE ulpi +#ifdef CONFIG_PPC_B4860 +#define HWCONFIG "hwconfig=fsl_ddr:ctlr_intlv=null," \ + "bank_intlv=cs0_cs1;" \ + "en_cpc:cpc2;" +#else +#define HWCONFIG "hwconfig=fsl_ddr:ctlr_intlv=null,bank_intlv=cs0_cs1;" +#endif + #define CONFIG_EXTRA_ENV_SETTINGS \ - "hwconfig=fsl_ddr:ctlr_intlv=null," \ - "bank_intlv=cs0_cs1;" \ + HWCONFIG \ "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\ "netdev=eth0\0" \ "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ -- cgit v0.10.2 From 1de271b487d60c613568ad61fc005ff850f2ed71 Mon Sep 17 00:00:00 2001 From: Shaveta Leekha Date: Thu, 4 Sep 2014 16:17:09 +0530 Subject: B4860QDS: Enable mac command support One of the I2C EEPROM is used to store/save and edit mac addresses of ports. this patch add required CONFIG to support the same Signed-off-by: Shaveta Leekha diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h index 6deb784..9063c57 100644 --- a/include/configs/B4860QDS.h +++ b/include/configs/B4860QDS.h @@ -227,6 +227,7 @@ unsigned long get_board_ddr_clk(void); #endif /* EEPROM */ +#define CONFIG_ID_EEPROM #define CONFIG_SYS_I2C_EEPROM_NXID #define CONFIG_SYS_EEPROM_BUS_NUM 0 #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 -- cgit v0.10.2 From 07c4eea4846cde938c4b0d8c1ddee95d373693ed Mon Sep 17 00:00:00 2001 From: Ebony Zhu Date: Thu, 4 Sep 2014 11:53:00 -0500 Subject: powerpc/mpc85xx: Serdes protocol "00" is supported "0x00" is a valid serdes protocol for QorIQ parts, and can not be used to test whether the serdes is enabled or disabled. Signed-off-by: Ebony Zhu Reviewed-by: York Sun diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c index d1fc76a..8edf5bb 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c @@ -186,11 +186,6 @@ u64 serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift) #endif cfg = in_be32(&gur->rcwsr[4]) & sd_prctl_mask; - /* Is serdes enabled at all? */ - if (!cfg) { - printf("SERDES%d is not enabled\n", sd + 1); - return 0; - } /* Erratum A-007186 * Freescale Scratch Pad Fuse Register n (SFP_FSPFR0) -- cgit v0.10.2 From 92f7fed4f738149121c779fe1dda857585bdeccf Mon Sep 17 00:00:00 2001 From: Priyanka Jain Date: Fri, 5 Sep 2014 15:18:31 +0530 Subject: powerpc/t104xrdb: Set DDR ODT to 75ohm DDR-ODT require cfg_dram_type switch set properly as per DDR type. T1040RDB, T1042RDB boards have DDR3L type DDR, so cfg_dram_type should be set to OFF for DDR3L Update t104xrdb/README for switch setting Signed-off-by: Priyanka Jain Reviewed-by: York Sun diff --git a/board/freescale/t104xrdb/README b/board/freescale/t104xrdb/README index a0f5fa9..ac95b5e 100644 --- a/board/freescale/t104xrdb/README +++ b/board/freescale/t104xrdb/README @@ -272,15 +272,15 @@ Switch Settings: (ON is 0, OFF is 1) =============== NAND boot SW setting: SW1: 10001000 -SW2: 00111001 +SW2: 00111011 SW3: 11110001 SPI boot SW setting: SW1: 00100010 -SW2: 10111001 +SW2: 10111011 SW3: 11100001 SD boot SW setting: SW1: 00100000 -SW2: 00111001 +SW2: 00111011 SW3: 11100001 diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c index 34c9224..2c331ee 100644 --- a/board/freescale/t104xrdb/ddr.c +++ b/board/freescale/t104xrdb/ddr.c @@ -105,8 +105,8 @@ found: popts->zq_en = 1; /* DHC_EN =1, ODT = 75 Ohm */ - popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_OFF); - popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_OFF); + popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm); + popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm); } phys_size_t initdram(int board_type) -- cgit v0.10.2 From 5273aa3834ec68616e173ceac91cdcf60dba2868 Mon Sep 17 00:00:00 2001 From: Priyanka Jain Date: Mon, 8 Sep 2014 13:20:52 +0530 Subject: board/t1040qds: Add sgmii ports support in 0xA7 protocol T1042QDS (T1042 is T1040 Personality without L2 switch) supports following sgmii interfaces with serdes protocol 0xA7 -SGMII-MAC3 on Lane B - slot 7 -SGMII-MAC5 on Lane H - slot 7 -SGMII2.5G-MAC1 on Lane C - slot 6 -SGMII2.5G-MAC2 on Lane D - slot 5 Add support of above sgmii interfaces Signed-off-by: Priyanka Jain diff --git a/board/freescale/t1040qds/eth.c b/board/freescale/t1040qds/eth.c index 1929bba..06d9086 100644 --- a/board/freescale/t1040qds/eth.c +++ b/board/freescale/t1040qds/eth.c @@ -241,6 +241,8 @@ static void initialize_lane_to_slot(void) break; case 0xA7: lane_to_slot[1] = 7; + lane_to_slot[2] = 6; + lane_to_slot[3] = 5; lane_to_slot[7] = 7; break; case 0xAA: @@ -410,6 +412,8 @@ void t1040_handle_phy_interface_sgmii(int i) fm_info_set_phy_address(i, riser_phy_addr[1]); if (FM1_DTSEC3 == i) fm_info_set_phy_address(i, riser_phy_addr[2]); + if (FM1_DTSEC5 == i) + fm_info_set_phy_address(i, riser_phy_addr[3]); mdio_mux[i] = EMI1_SLOT7; fm_info_set_mdio(i, mii_dev_for_muxval(mdio_mux[i])); diff --git a/drivers/net/fm/t1040.c b/drivers/net/fm/t1040.c index bcc871d..4cce46d 100644 --- a/drivers/net/fm/t1040.c +++ b/drivers/net/fm/t1040.c @@ -49,8 +49,6 @@ phy_interface_t fman_port_enet_if(enum fm_port port) else if ((rcwsr13 & FSL_CORENET_RCWSR13_EC2) == FSL_CORENET_RCWSR13_EC2_FM1_DTSEC5_MII) return PHY_INTERFACE_MODE_MII; - else - return PHY_INTERFACE_MODE_NONE; } switch (port) { -- cgit v0.10.2 From 039b77396abb0ed78af34dadbd0786dfaf0e6aa9 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 10 Sep 2014 16:03:10 +1200 Subject: powerpc: add --bss-plt to LDFLAGS With some versions of gcc (that we know of 4.6.3 and 4.8.2 are affected) it is necessary to specify --bss-plt to get the final blrl in the _GOT2_TABLE_. Without this the last symbol does not get it's address relocated. For the P2041RDB board this ended up being NetArpWaitTimerStart which caused the ARP packets to timeout immediately. Signed-off-by: Joakim Tjernlund Signed-off-by: Chris Packham Acked-by: Joakim Tjernlund Acked-by: Scott Wood Reviewed-by: York Sun diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk index 6329b6c..fec02f2 100644 --- a/arch/powerpc/config.mk +++ b/arch/powerpc/config.mk @@ -11,6 +11,7 @@ endif CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 LDFLAGS_FINAL += --gc-sections +LDFLAGS_FINAL += --bss-plt PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \ -meabi PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2 -- cgit v0.10.2