armv8/ls2085ardb: Add eth & phy f/w loading support
Subsystems (3)
PATCH v2 1/22 armv8/ls2085ardb: Add eth & phy f/w loading support
Add support for board eth initialization and support for loading phy firmware. PHY firmware needs to be loaded from board_eth_init() because all the MACs are not initialized by ldpaa_eth driver.
---
Changes for v2: Sending as it is for patch set
board/freescale/ls2085ardb/Makefile | 2 +- board/freescale/ls2085ardb/eth_ls2085rdb.c | 133 +++++++++++++++++++++++++++++ board/freescale/ls2085ardb/ls2085ardb.c | 13 --- include/configs/ls2085ardb.h | 23 +++++ 4 files changed, 157 insertions(+), 14 deletions(-) create mode 100644 board/freescale/ls2085ardb/eth_ls2085rdb.c
board/freescale/ls2085ardb/Makefile +1 -1
@@ -4,5 +4,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += ls2085ardb.o +obj-y += ls2085ardb.o eth_ls2085rdb.o obj-y += ddr.o
board/freescale/ls2085ardb/eth_ls2085rdb.c new file +133 -0
133 lines not on this page · raw message
board/freescale/ls2085ardb/ls2085ardb.c +0 -13
@@ -176,19 +176,6 @@ unsigned long get_dram_size_to_hide(void)return dram_to_hide; } -int board_eth_init (bd_t *bis) -{ -int error =0 ; - -#ifdef CONFIG_FSL_MC_ENET - error =cpu_eth_init (bis); -#endif - - error =pci_eth_init (bis); - -return error; -} -#ifdef CONFIG_FSL_MC_ENET void fdt_fixup_board_enet (void *fdt) {
include/configs/ls2085ardb.h +23 -0
@@ -302,4 +302,27 @@ unsigned long get_board_sys_clk(void);"kernel_load=0xa0000000\0" \"kernel_size=0x1000000\0" +/* MAC/PHY configuration */ +#ifdef CONFIG_FSL_MC_ENET +#define CONFIG_PHYLIB_10G +#define CONFIG_PHY_CORTINA +#define CONFIG_PHYLIB +#define CONFIG_SYS_CORTINA_FW_IN_NOR +#define CONFIG_CORTINA_FW_ADDR 0x581000000 +#define CONFIG_CORTINA_FW_LENGTH 0x40000 + +#define CORTINA_PHY_ADDR1 0x10 +#define CORTINA_PHY_ADDR2 0x11 +#define CORTINA_PHY_ADDR3 0x12 +#define CORTINA_PHY_ADDR4 0x13 +#define AQ_PHY_ADDR1 0x00 +#define AQ_PHY_ADDR2 0x01 +#define AQ_PHY_ADDR3 0x02 +#define AQ_PHY_ADDR4 0x03 + +#define CONFIG_MII +#define CONFIG_ETHPRIME "DPNI1" +#define CONFIG_PHY_GIGE +#endif +#endif /* __LS2_RDB_H */
Signature · 1 line
1.9.1
PATCH v2 2/22 armv8/ls2085ardb: add hwconfig setting for eSDHC
From: Yangbo Lu <[email protected]>
Add hwconfig setting for eSDHC since it shares some pins with other IP block.
---
Changes for v2: Sending as it is for patch set
board/freescale/ls2085ardb/ls2085ardb.c | 36 +++++++++++++++++++++++++++++++++ include/configs/ls2085ardb.h | 2 ++ 2 files changed, 38 insertions(+)
board/freescale/ls2085ardb/ls2085ardb.c +36 -0
@@ -10,6 +10,7 @@#include <fsl_ifc.h> #include <fsl_ddr.h> #include <asm/io.h> +#include <hwconfig.h> #include <fdt_support.h> #include <libfdt.h> #include <fsl_debug_server.h>
@@ -21,8 +22,15 @@#include "../common/qixis.h" #include "ls2085ardb_qixis.h" +#define PIN_MUX_SEL_SDHC 0x00 + +#define SET_SDHC_MUX_SEL (reg, value) ((reg & 0xf0) | value)DECLARE_GLOBAL_DATA_PTR ; +enum { +MUX_TYPE_SDHC , +}; +unsigned long long get_qixis_addr (void ) {unsigned long long addr;
@@ -129,6 +137,34 @@ int board_early_init_f(void)return 0 ; } +int config_board_mux (int ctrl_type) +{ +u8 reg5; + + reg5 =QIXIS_READ (brdcfg[5 ]); + +switch (ctrl_type) { +case MUX_TYPE_SDHC : + reg5 =SET_SDHC_MUX_SEL (reg5,PIN_MUX_SEL_SDHC ); +break ; +default : +printf ("Wrong mux interface type\n" ); +return -1 ; + } + +QIXIS_WRITE (brdcfg[5 ], reg5); + +return 0 ; +} + +int misc_init_r (void ) +{ +if (hwconfig ("sdhc" )) +config_board_mux (MUX_TYPE_SDHC ); + +return 0 ; +} +void detail_board_ddr_info (void ) {puts ("\nDDR " );
include/configs/ls2085ardb.h +2 -0
@@ -288,6 +288,8 @@ unsigned long get_board_sys_clk(void);#define CONFIG_DOS_PARTITION #endif +#define CONFIG_MISC_INIT_R +/* Initial environment variables */ #undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \
Signature · 1 line
1.9.1
PATCH v2 3/22 armv8/ls2085a: Enable Date command for QDS and RDB
In reply to Prabhakar KushwahaFrom: Priyanka Jain <[email protected]>
Enable Date command for QDS and RDB boards
---
Changes for v2: Sending as it is for patch set
include/configs/ls2085aqds.h | 1 + include/configs/ls2085ardb.h | 1 + 2 files changed, 2 insertions(+)
include/configs/ls2085aqds.h +1 -0
@@ -288,6 +288,7 @@ unsigned long get_board_ddr_clk(void);#define RTC #define CONFIG_RTC_DS3231 1#define CONFIG_SYS_I2C_RTC_ADDR 0x68 +#define CONFIG_CMD_DATE /* EEPROM */ #define CONFIG_ID_EEPROM
include/configs/ls2085ardb.h +1 -0
@@ -253,6 +253,7 @@ unsigned long get_board_sys_clk(void);#define RTC #define CONFIG_RTC_DS3231 1#define CONFIG_SYS_I2C_RTC_ADDR 0x68 +#define CONFIG_CMD_DATE /* EEPROM */ #define CONFIG_ID_EEPROM
Signature · 1 line
1.9.1
PATCH v2 4/22 armv8/ls2085aqds: Add support of SerDes protocol 0x49
In reply to Prabhakar KushwahaSerDes Protocol 0x49 enables 4 SGMII, PEX4, SATA1 and SATA2.
Add support of 0x49 SerDes protocol to enable 4SGMII on slot4 of ls2085aqds platform.
---
Changes for v2: Incorporated York's commets
- updated subject and description
board/freescale/ls2085aqds/eth.c | 2 ++ 1 file changed, 2 insertions(+)
board/freescale/ls2085aqds/eth.c +2 -0
@@ -210,6 +210,7 @@ static void initialize_dpmac_to_slot(void)switch (serdes2_prtcl) {case 0x07 :case 0x08 : +case 0x49 :printf ("qds: WRIOP: Supported SerDes Protocol 0x%02x\n" , serdes2_prtcl); lane_to_slot_fsm2[0 ] =EMI1_SLOT4 ;
@@ -247,6 +248,7 @@ void ls2085a_handle_phy_interface_sgmii(int dpmac_id)switch (serdes2_prtcl) {case 0x07 :case 0x08 : +case 0x49 : lane =serdes_get_first_lane (FSL_SRDS_2 ,SGMII9 + (dpmac_id -9 )); slot = lane_to_slot_fsm2[lane];
Signature · 1 line
1.9.1
PATCH v2 5/22 armv8/ls2085a: Update LS2085a PCIe compatible
In reply to Prabhakar KushwahaCompatible field "fsl,20851a-pcie" is not correct. So update it to "fsl,ls2085a-pcie"
---
Changes for v2: New patch
include/configs/ls2085a_common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/ls2085a_common.h +2 -1
@@ -186,7 +186,8 @@ unsigned long long get_qixis_addr(void);#define CONFIG_PCIE2 /* PCIE controler 2 */ #define CONFIG_PCIE3 /* PCIE controler 3 */ #define CONFIG_PCIE4 /* PCIE controler 4 */ -#define FSL_PCIE_COMPAT "fsl,20851a-pcie" +#define CONFIG_PCIE_LAYERSCAPE /* Use common FSL Layerscape PCIe code */ +#define FSL_PCIE_COMPAT "fsl,ls2085a-pcie"#define CONFIG_SYS_PCI_64BIT
Signature · 1 line
1.9.1
PATCH v2 6/22 armv8/ls2085a: call ft_pcie_setup() to change dts status
In reply to Prabhakar Kushwahacall ft_pci_setup() to disable PCIe dts node if corresponding PCIe controller is disabled according to RCW
---
Changes for v2: Incorporated York's comments
arch/arm/cpu/armv8/fsl-lsch3/fdt.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/cpu/armv8/fsl-lsch3/fdt.c +4 -0
@@ -69,6 +69,10 @@ void ft_cpu_setup(void *blob, bd_t *bd) "clock-frequency", CONFIG_SYS_NS16550_CLK, 1);#endif +#ifdef CONFIG_PCI +ft_pci_setup (blob, bd); +#endif +#if defined(CONFIG_FSL_ESDHC )fdt_fixup_esdhc (blob, bd);#endif
Signature · 1 line
1.9.1
PATCH v2 7/22 armv8/ls2085qds: Update SFP TX bit as "0" to enable XFI
In reply to Prabhakar KushwahaFPGA BRDCFG9[SFP_TX] should be clear in order to enable XFI ports.
---
Changes for v2: sending as it is for patch set
board/freescale/ls2085aqds/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/ls2085aqds/eth.c +1 -1
@@ -53,7 +53,7 @@ static int riser_phy_addr[] = {#define EMI1_SLOT5 4#define EMI1_SLOT6 5#define EMI2 6 -#define SFP_TX 1 +#define SFP_TX 0static const char *const mdio_names[] = {"LS2085A_QDS_MDIO0" ,
Signature · 1 line
1.9.1
PATCH v2 8/22 armv8/ls2085rdb: Update PCA9547PW slave address
In reply to Prabhakar KushwahaPrimary Mux on I2C1 controller has slave address as 0x75. So update its address.
---
Changes for v2: Incorporated York's comments
include/configs/ls2085ardb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/ls2085ardb.h +2 -2
@@ -241,8 +241,8 @@ unsigned long get_board_sys_clk(void);/* * I2C */ -#define I2C_MUX_PCA_ADDR 0x77 -#define I2C_MUX_PCA_ADDR_PRI 0x77/* Primary Mux*/ +#define I2C_MUX_PCA_ADDR 0x75 +#define I2C_MUX_PCA_ADDR_PRI 0x75/* Primary Mux*/ /* I2C bus multiplexer */ #define I2C_MUX_CH_DEFAULT 0x8
Signature · 1 line
1.9.1
PATCH v2 9/22 armv8/ls2085a: Increase the supported kernel size
In reply to Prabhakar KushwahaFrom: Bhupesh Sharma <[email protected]>
Increases the kernel size supported for LS2085A platforms:-
- Update environment variables
- Add ramdisk_size in bootargs env variable
- Define CONFIG_SYS_BOOTM_LEN to 64MB
---
Changes for v2: sending as it is for patch set
include/configs/ls2085a_common.h | 9 ++++++--- include/configs/ls2085aqds.h | 2 +- include/configs/ls2085ardb.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-)
include/configs/ls2085a_common.h +6 -3
@@ -248,13 +248,13 @@ unsigned long long get_qixis_addr(void);"initrd_high=0xffffffffffffffff\0" \"kernel_start=0x581200000\0" \"kernel_load=0xa0000000\0" \ -"kernel_size=0x1000000\0" \ +"kernel_size=0x2000000\0" \ "console=ttyAMA0,38400n8\0"#define CONFIG_BOOTARGS "console=ttyS1,115200 root=/dev/ram0 " \ "earlycon=uart8250,mmio,0x21c0600,115200 " \ - "default_hugepagesz=2m hugepagesz=2m " \ - "hugepages=16" + "ramdisk_size=0x2000000 default_hugepagesz=2m" \ + " hugepagesz=2m hugepages=16"#define CONFIG_BOOTCOMMAND "cp.b $kernel_start $kernel_load " \ "$kernel_size && bootm $kernel_load"#define CONFIG_BOOTDELAY 10
@@ -301,4 +301,7 @@ unsigned long get_dram_size_to_hide(void);#define CONFIG_SYS_SPL_MALLOC_START 0x80200000#define CONFIG_SYS_MONITOR_LEN (512 * 1024) +#define CONFIG_SYS_BOOTM_LEN (64 << 20)/* Increase max gunzip size */ + +#endif /* __LS2_COMMON_H */
include/configs/ls2085aqds.h +1 -1
@@ -336,7 +336,7 @@ unsigned long get_board_ddr_clk(void);"initrd_high=0xffffffffffffffff\0" \"kernel_start=0x581100000\0" \"kernel_load=0xa0000000\0" \ - "kernel_size=0x1000000\0" + "kernel_size=0x2000000\0"#ifdef CONFIG_FSL_MC_ENET #define CONFIG_FSL_MEMAC
include/configs/ls2085ardb.h +1 -1
@@ -303,7 +303,7 @@ unsigned long get_board_sys_clk(void);"initrd_high=0xffffffffffffffff\0" \"kernel_start=0x581100000\0" \"kernel_load=0xa0000000\0" \ -"kernel_size=0x1000000\0" +"kernel_size=0x2000000\0" /* MAC/PHY configuration */ #ifdef CONFIG_FSL_MC_ENET
Signature · 1 line
1.9.1
PATCH v2 9/22 armv8/ls2085a: Increase the supported kernel size
Quoted 22 lines · Prabhakar Kushwaha
From: Bhupesh Sharma <[email protected]>
Increases the kernel size supported for LS2085A platforms:-
- Update environment variables
- Addramdisk_sizein bootargs env variable
- DefineCONFIG_SYS_BOOTM_LENto 64MBSigned-off-by Bhupesh Sharma <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>---
Changes for v2: sending as it is for patch setinclude/configs/ls2085a_common.h | 9 ++++++--- include/configs/ls2085aqds.h | 2 +- include/configs/ls2085ardb.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-)include/configs/ls2085a_common.h +0
-0
include/configs/ls2085a_common.h unsigned long long get_qixis_addr(void); · line 252
Quoted 6 lines
include/configs/ls2085a_common.h +1
-1@@ -248,13 +248,13 @@ unsigned long long get_qixis_addr(void);"initrd_high=0xffffffffffffffff\0" \"kernel_start=0x581200000\0" \"kernel_load=0xa0000000\0" \ -"kernel_size=0x1000000\0" \ +"kernel_size=0x2000000\0" \"console=ttyAMA0,38400n8\0"
I didn't get a respond to my question for v1. How is kernel_size variable used?
York
PATCH v2 9/22 armv8/ls2085a: Increase the supported kernel size
Hi York,
Sorry for missing this comment on v1.
Quoted 23 lines
From: Sun York-R58495
Sent: Thursday, May 28, 2015 9:31 PMQuoted 12 lines · Prabhakar Kushwaha
From: Bhupesh Sharma <[email protected]>
Increases the kernel size supported for LS2085A platforms:-
- Update environment variables
- Addramdisk_sizein bootargs env variable
- DefineCONFIG_SYS_BOOTM_LENto 64MBSigned-off-by Bhupesh Sharma <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>---
Changes for v2: sending as it is for patch setReview
Quoted 6 lines
include/configs/ls2085a_common.h | 9 ++++++--- include/configs/ls2085aqds.h | 2 +- include/configs/ls2085ardb.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/include/configs/ls2085a_common.h
Quoted 13 lines
include/configs/ls2085a_common.h unsigned long long get_qixis_addr(void); · line 252
Quoted 10 lines
index 749c58d..a33b8a9 100644
include/configs/ls2085a_common.h +1
-1@@ -248,13 +248,13 @@ unsigned long long get_qixis_addr(void);"initrd_high=0xffffffffffffffff\0" \"kernel_start=0x581200000\0" \"kernel_load=0xa0000000\0" \ -"kernel_size=0x1000000\0" \ +"kernel_size=0x2000000\0" \"console=ttyAMA0,38400n8\0" I didn't get a respond to my question for v1. How is
kernel_sizevariable used?
This variable is used for our default bootcmd to define the kernel size which needs to be copied from the address pointed by the 'kernel_start' variable to the address pointed to by the 'kernel_load' variable:
#define CONFIG_BOOTCOMMAND "cp.b $kernel_start $kernel_load " \ "$kernel_size && bootm $kernel_load"
Regards,
Bhupesh
PATCH v2 9/22 armv8/ls2085a: Increase the supported kernel size
Quoted 41 lines · On 05/28/2015 11:58 AM, Sharma Bhupesh-B45370 wrote:
Hi York,
Sorry for missing this comment on v1.
Quoted 23 lines
From: Sun York-R58495
Sent: Thursday, May 28, 2015 9:31 PMQuoted 12 lines · Prabhakar Kushwaha
From: Bhupesh Sharma <[email protected]>
Increases the kernel size supported for LS2085A platforms:-
- Update environment variables
- Addramdisk_sizein bootargs env variable
- DefineCONFIG_SYS_BOOTM_LENto 64MBSigned-off-by Bhupesh Sharma <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>---
Changes for v2: sending as it is for patch setReview
Quoted 6 lines
include/configs/ls2085a_common.h | 9 ++++++--- include/configs/ls2085aqds.h | 2 +- include/configs/ls2085ardb.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/include/configs/ls2085a_common.hQuoted 13 lines
include/configs/ls2085a_common.h unsigned long long get_qixis_addr(void); · line 252
Quoted 10 lines
index 749c58d..a33b8a9 100644
include/configs/ls2085a_common.h +1
-1@@ -248,13 +248,13 @@ unsigned long long get_qixis_addr(void);"initrd_high=0xffffffffffffffff\0" \"kernel_start=0x581200000\0" \"kernel_load=0xa0000000\0" \ -"kernel_size=0x1000000\0" \ +"kernel_size=0x2000000\0" \"console=ttyAMA0,38400n8\0" I didn't get a respond to my question for v1. How is
kernel_sizevariable used?
Quoted 7 lines
This variable is used for our default bootcmd to define the kernel size which needs to be copied from the address pointed by the '
kernel_start' variable to the address pointed to by the 'kernel_load' variable:#define CONFIG_BOOTCOMMAND "cp.b $kernel_start $kernel_load " \ "$kernel_size && bootm $kernel_load"
Got it. It is just a short-hand for copying images from NOR flash to RAM.
York
PATCH v2 10/22 board/fsl/common: Fix eeprom system version endianness
In reply to Prabhakar KushwahaFrom: Jaiprakash Singh <[email protected]>
SYSTEM ID EPPROM always store SYSTEM version info in big endian format. SoC with ARM or PowerPC core should read/write version info from eeprom in BIG endian format.
So use cpu-specific APIs to read SYSTEM version.
---
Changes for v2: sending as it is for patch set
board/freescale/common/sys_eeprom.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
board/freescale/common/sys_eeprom.c +4 -4
@@ -90,7 +90,7 @@ static void show_eeprom(void)/* EEPROM tag ID, either CCID or NXID */ #ifdef CONFIG_SYS_I2C_EEPROM_NXID printf ("ID: %c%c%c%c v%u\n" , e.id[0 ], e.id[1 ], e.id[2 ], e.id[3 ], - e.version); +be32_to_cpu (e.version));#else printf ("ID: %c%c%c%c\n" , e.id[0 ], e.id[1 ], e.id[2 ], e.id[3 ]);#endif
@@ -340,7 +340,7 @@ int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])if (cmd =='i' ) {#ifdef CONFIG_SYS_I2C_EEPROM_NXID memcpy (e.id,"NXID" ,sizeof (e.id)); - e.version =NXID_VERSION ; + e.version =cpu_to_be32 (NXID_VERSION );#else memcpy (e.id,"CCID" ,sizeof (e.id));#endif
@@ -485,7 +485,7 @@ int mac_read_from_eeprom(void)#ifdef CONFIG_SYS_I2C_EEPROM_NXID printf ("%c%c%c%c v%u\n" , e.id[0 ], e.id[1 ], e.id[2 ], e.id[3 ], - e.version); +be32_to_cpu (e.version));#else printf ("%c%c%c%c\n" , e.id[0 ], e.id[1 ], e.id[2 ], e.id[3 ]);#endif
@@ -496,7 +496,7 @@ int mac_read_from_eeprom(void)* that at boot time, U-Boot will still say "NXID v0". */ if (e.version ==0 ) { - e.version =NXID_VERSION ; + e.version =cpu_to_be32 (NXID_VERSION );update_crc (); }#endif
Signature · 1 line
1.9.1
PATCH v2 11/22 armv8/ls2085RDB: Update board version print logic
In reply to Prabhakar KushwahaAs per updated board document, no need to substract 1 from arch[BRD] bit field. Default value + 'A' represents the board revision.
So update board version print logic to reflect the same.
---
Changes for v2: sending as it is for patch set
board/freescale/ls2085ardb/ls2085ardb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/ls2085ardb/ls2085ardb.c +1 -1
@@ -56,7 +56,7 @@ int checkboard(void) sw =QIXIS_READ (arch);printf ("Board: %s, " ,CONFIG_IDENT_STRING );printf ("Board Arch: V%d, " , sw >>4 ); -printf ("Board version: %c, boot from " , (sw &0xf ) +'A' -1 ); +printf ("Board version: %c, boot from " , (sw &0xf ) +'A' ); sw =QIXIS_READ (brdcfg[0 ]); sw = (sw &QIXIS_LBMAP_MASK ) >>QIXIS_LBMAP_SHIFT ;
Signature · 1 line
1.9.1
PATCH v2 12/22 armv8/fsl-lsch3: Fix DDR speed message
In reply to Prabhakar KushwahaFrom: York Sun <[email protected]>
DDR speed should be in MT/s, not MHz.
---
Changes for v2: sending as it is for patch set
arch/arm/cpu/armv8/fsl-lsch3/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/armv8/fsl-lsch3/cpu.c +2 -2
@@ -394,8 +394,8 @@ int print_cpuinfo(void) }printf ("\n Bus: %-4s MHz " ,strmhz (buf, sysinfo.freq_systembus)); -printf ("DDR: %-4s MHz" ,strmhz (buf, sysinfo.freq_ddrbus)); -printf (" DP-DDR: %-4s MHz" ,strmhz (buf, sysinfo.freq_ddrbus2)); +printf ("DDR: %-4s MT/s" ,strmhz (buf, sysinfo.freq_ddrbus)); +printf (" DP-DDR: %-4s MT/s" ,strmhz (buf, sysinfo.freq_ddrbus2));puts ("\n" );/* Display the RCW, so that no one gets confused as to what RCW
Signature · 1 line
1.9.1
PATCH v2 13/22 armv8/fsl-ch3: Add support to print SoC personality
In reply to Prabhakar KushwahaThis patch adds support to print out the SoC personality. Freescale LS20xx SoCs (compliant to Chassis-3 specifications) can have 6 personalities: LS2045AE, LS2045A, LS2080AE, LS2080A, LS2085AE and LS2085A
---
Changes for v2: sending as it is for patch set
arch/arm/cpu/armv8/fsl-lsch3/cpu.c | 37 +++++++++++++++++++++++++++++++ arch/arm/include/asm/arch-fsl-lsch3/soc.h | 20 +++++++++++++++++ 2 files changed, 57 insertions(+)
arch/arm/cpu/armv8/fsl-lsch3/cpu.c +37 -0
@@ -9,6 +9,7 @@#include <asm/system.h> #include <asm/armv8/mmu.h> #include <asm/io.h> +#include <asm/arch-fsl-lsch3/soc.h> #include <asm/arch-fsl-lsch3/immap_lsch3.h> #include <fsl_debug_server.h> #include <fsl-mc/fsl_mc.h>
@@ -22,6 +23,35 @@DECLARE_GLOBAL_DATA_PTR ; +static struct cpu_type cpu_type_list[] = { +#ifdef CONFIG_LS2085A +CPU_TYPE_ENTRY (LS2085 ,LS2085 ,8 ), +CPU_TYPE_ENTRY (LS2080 ,LS2080 ,8 ), + CPU_TYPE_ENTRY(LS2045, LS2045, 4), +#endif +}; + +void cpu_name (char *name) +{ +struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR ); +unsigned int i, svr, ver; + + svr =in_le32 (&gur->svr); + ver =SVR_SOC_VER (svr); + +for (i =0 ; i <ARRAY_SIZE (cpu_type_list); i++) +if ((cpu_type_list[i].soc_ver &SVR_WO_E ) == ver) { +strcpy (name, cpu_type_list[i].name); + +if (IS_E_PROCESSOR (svr)) +strcat (name,"E" ); +break ; + } + +if (i ==ARRAY_SIZE (cpu_type_list)) +strcpy (name,"unknown" ); +} +#ifndef CONFIG_SYS_DCACHE_OFF /* * To start MMU before DDR is available, we create MMU table in SRAM.
@@ -380,6 +410,13 @@ int print_cpuinfo(void)unsigned int i, core;u32 type; +puts ("SoC: " ); + +cpu_name (buf); +printf (" %s (0x%x)\n" , buf,in_le32 (&gur->svr)); + +memset ((u8 *)buf,0x00 ,ARRAY_SIZE (buf)); +get_sys_info (&sysinfo);puts ("Clock Configuration:" );for_each_cpu (i, core,cpu_numcores (),cpu_mask ()) {
arch/arm/include/asm/arch-fsl-lsch3/soc.h +20 -0
@@ -4,5 +4,25 @@* SPDX-License-Identifier: GPL-2.0+ */ +struct cpu_type { +char name[15 ]; +u32 soc_ver; +u32 num_cores; +}; + +#define CPU_TYPE_ENTRY (n, v, nc) \ + { .name = #n, .soc_ver = SVR_##v, .num_cores = (nc)} + +#define SVR_WO_E 0xFFFFFE +#define SVR_LS2045 0x870120 +#define SVR_LS2080 0x870110 +#define SVR_LS2085 0x870100 + +#define SVR_MAJ (svr) (((svr) >> 4) & 0xf) +#define SVR_MIN (svr) (((svr) >> 0) & 0xf) +#define SVR_SOC_VER (svr) (((svr) >> 8) & SVR_WO_E) +#define IS_E_PROCESSOR (svr) (!((svr >> 8) & 0x1)) +void fsl_lsch3_early_init_f (void ); +void cpu_name (char *name);
Signature · 1 line
1.9.1
PATCH v2 14/22 armv8/ls2085a: Avoid hard-coding for board name print
In reply to Prabhakar KushwahaLS2085A supports 6 personalities i.e. LS2045AE, LS2045A, LS2080AE, LS2080A, LS2085AE and LS2085A personlities.
Instead of hard-coding, board name should change as per selected personality.
---
Changes for v2: sending as it is for patch set
board/freescale/ls2085aqds/ls2085aqds.c | 6 +++++- board/freescale/ls2085ardb/ls2085ardb.c | 5 ++++- include/configs/ls2085aqds.h | 3 --- include/configs/ls2085ardb.h | 3 --- 4 files changed, 9 insertions(+), 8 deletions(-)
board/freescale/ls2085aqds/ls2085aqds.c +5 -1
@@ -49,11 +49,15 @@ int checkboard(void) "100 separate SSCG"};int clock; +cpu_name (buf); +printf ("Board: %s-QDS, " , buf); + sw =QIXIS_READ (arch); -printf ("Board: %s, " ,CONFIG_IDENT_STRING );printf ("Board Arch: V%d, " , sw >>4 );printf ("Board version: %c, boot from " , (sw &0xf ) +'A' -1 ); +memset ((u8 *)buf,0x00 ,ARRAY_SIZE (buf)); + sw =QIXIS_READ (brdcfg[0 ]); sw = (sw &QIXIS_LBMAP_MASK ) >>QIXIS_LBMAP_SHIFT ;
board/freescale/ls2085ardb/ls2085ardb.c +4 -1
@@ -52,9 +52,12 @@ unsigned long long get_qixis_addr(void)int checkboard (void ) {u8 sw; +char buf[15 ]; + +cpu_name (buf); +printf ("Board: %s-RDB, " , buf); sw =QIXIS_READ (arch); -printf ("Board: %s, " ,CONFIG_IDENT_STRING );printf ("Board Arch: V%d, " , sw >>4 );printf ("Board version: %c, boot from " , (sw &0xf ) +'A' );
include/configs/ls2085aqds.h +0 -3
@@ -10,9 +10,6 @@#include "ls2085a_common.h" #include <config_cmd_default.h> -#define CONFIG_IDENT_STRING " LS2085A-QDS" -#define CONFIG_BOOTP_VCI_STRING "U-boot.LS2085A-QDS" -#define CONFIG_DISPLAY_BOARDINFO #ifndef __ASSEMBLY__
include/configs/ls2085ardb.h +0 -3
@@ -10,9 +10,6 @@#include "ls2085a_common.h" #include <config_cmd_default.h> -#define CONFIG_IDENT_STRING " LS2085A-RDB" -#define CONFIG_BOOTP_VCI_STRING "U-boot.LS2085A-RDB" -#undef CONFIG_CONS_INDEX#define CONFIG_CONS_INDEX 2
Signature · 1 line
1.9.1
PATCH v2 15/22 driver/ddr/fsl: Add a hook to update SPD address
In reply to Prabhakar KushwahaFrom: York Sun <[email protected]>
In case SPD address changes between board revisions, updating SPD address can be called from board file.
---
Changes for v2: sending as it is for patch set
drivers/ddr/fsl/main.c | 8 ++++++++ include/fsl_ddr.h | 3 +++ 2 files changed, 11 insertions(+)
drivers/ddr/fsl/main.c +8 -0
@@ -135,6 +135,13 @@ static void __get_spd(generic_spd_eeprom_t *spd, u8 i2c_address) __attribute__((weak,alias ("__get_spd" )))void get_spd (generic_spd_eeprom_t *spd,u8 i2c_address); +/* This function allows boards to update SPD address */ +__weak void update_spd_address (unsigned int ctrl_num, +unsigned int slot, +unsigned int *addr) +{ +} +void fsl_ddr_get_spd (generic_spd_eeprom_t *ctrl_dimms_spd,unsigned int ctrl_num,unsigned int dimm_slots_per_ctrl) {
@@ -148,6 +155,7 @@ void fsl_ddr_get_spd(generic_spd_eeprom_t *ctrl_dimms_spd,for (i =0 ; i < dimm_slots_per_ctrl; i++) { i2c_address = spd_i2c_addr[ctrl_num][i]; +update_spd_address (ctrl_num, i, &i2c_address);get_spd (&(ctrl_dimms_spd[i]), i2c_address); } }
include/fsl_ddr.h +3 -0
@@ -136,4 +136,7 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,int fsl_ddr_get_dimm_params (dimm_params_t *pdimm,unsigned int controller_number,unsigned int dimm_number); +void update_spd_address (unsigned int ctrl_num, +unsigned int slot, +unsigned int *addr);#endif
Signature · 1 line
1.9.1
PATCH v2 16/22 armv8/ls2085ardb: Fix SPD address error on early boards
In reply to Prabhakar KushwahaFrom: York Sun <[email protected]>
Board rev C and earlier has duplicated SPD address on 2nd DDR controller slots. It is fixed on rev D and later. SPD addresses need to be updated accordingly.
---
Changes for v2: sending as it is for patch set
board/freescale/ls2085ardb/ls2085ardb.c | 19 +++++++++++++++++++ include/configs/ls2085ardb.h | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-)
board/freescale/ls2085ardb/ls2085ardb.c +19 -0
@@ -273,3 +273,22 @@ void qixis_dump_switch(void)printf ("SW%d = (0x%02x)\n" , i,QIXIS_READ (cms[1 ])); } } + +/* +* Board rev C and earlier has duplicated I2C addresses for 2nd controller. +* Both slots has 0x54, resulting 2nd slot unusable. +*/ +void update_spd_address (unsigned int ctrl_num, +unsigned int slot, +unsigned int *addr) +{ +u8 sw; + + sw =QIXIS_READ (arch); +if ((sw &0xf ) <0x3 ) { +if (ctrl_num ==1 && slot ==0 ) + *addr =SPD_EEPROM_ADDRESS4 ; +else if (ctrl_num ==1 && slot ==1 ) + *addr =SPD_EEPROM_ADDRESS3 ; + } +}
include/configs/ls2085ardb.h +2 -2
@@ -29,8 +29,8 @@ unsigned long get_board_sys_clk(void);#define CONFIG_MEM_INIT_VALUE 0xdeadbeef#define SPD_EEPROM_ADDRESS1 0x51#define SPD_EEPROM_ADDRESS2 0x52 -#define SPD_EEPROM_ADDRESS3 0x54 -#define SPD_EEPROM_ADDRESS4 0x53/* Board error */ +#define SPD_EEPROM_ADDRESS3 0x53 +#define SPD_EEPROM_ADDRESS4 0x54#define SPD_EEPROM_ADDRESS5 0x55#define SPD_EEPROM_ADDRESS6 0x56/* dummy address */ #define SPD_EEPROM_ADDRESS SPD_EEPROM_ADDRESS1
Signature · 1 line
1.9.1
PATCH v2 17/22 armv8/ls2085a: Expose all DDR region(s) to Linux
In reply to Prabhakar KushwahaFrom: Bhupesh Sharma <[email protected]>
This patch allows u-boot to expose the complete DDR region(s) to Linux (after subtracting the memory hidden via MEM_TOP_HIDE mechanism).
This allows the u-boot to support the 48-bit VA support provided by ARM64 Linux in flavors 3.18 and above, by passing the appropriate 'memory' DTS nodes.
---
Changes for v2: sending as it is for patch set
board/freescale/ls2085a/README | 11 +++++++++++ board/freescale/ls2085a/ls2085a.c | 15 +++++++++------ board/freescale/ls2085aqds/README | 19 +++++++++++++++++++ board/freescale/ls2085aqds/ls2085aqds.c | 15 +++++++++------ board/freescale/ls2085ardb/README | 11 +++++++++++ board/freescale/ls2085ardb/ls2085ardb.c | 15 +++++++++------ 6 files changed, 68 insertions(+), 18 deletions(-)
board/freescale/ls2085a/README +11 -0
@@ -14,3 +14,14 @@ Memory map from core's view Other addresses are either reserved, or not used directly by u-boot. This list should be updated when more addresses are used. + +Booting Linux flavors which do not support 48-bit VA (< Linux 3.18) +------------------------------------------------------------------- +One needs to use appropriate bootargs to boot Linux flavors which do +not support 48-bit VA (for e.g. < Linux 3.18) by appending mem=2048M, as shown +below: + +=> setenv bootargs 'console=ttyS1,115200 root=/dev/ram + earlycon=uart8250,mmio,0x21c0600,115200 default_hugepagesz=2m hugepagesz=2m + hugepages=16 mem=2048M' +
board/freescale/ls2085a/ls2085a.c +9 -6
@@ -127,15 +127,18 @@ void fdt_fixup_board_enet(void *fdt)#ifdef CONFIG_OF_BOARD_SETUP int ft_board_setup (void *blob,bd_t *bd) { -phys_addr_t base; -phys_size_t size; +u64 base[CONFIG_NR_DRAM_BANKS ]; +u64 size[CONFIG_NR_DRAM_BANKS ];ft_cpu_setup (blob, bd); -/* limit the memory size to bank 1 until Linux can handle 40-bit PA */ - base =getenv_bootm_low (); - size =getenv_bootm_size (); -fdt_fixup_memory (blob, (u64 )base, (u64 )size); +/* fixup DT for the two GPP DDR banks */ + base[0 ] = gd->bd->bi_dram[0 ].start; + size[0 ] = gd->bd->bi_dram[0 ].size; + base[1 ] = gd->bd->bi_dram[1 ].start; + size[1 ] = gd->bd->bi_dram[1 ].size; + +fdt_fixup_memory_banks (blob, base, size,2 );#ifdef CONFIG_FSL_MC_ENET fdt_fixup_board_enet (blob);
board/freescale/ls2085aqds/README +19 -0
@@ -127,3 +127,22 @@ b) NOR boot c) NAND boot d) SD boot e) QSPI boot + +Environment Variables +--------------------- +- mcboottimeout: MC boot timeout in milliseconds. If this variable is not defined + the value CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS will be assumed. + +- mcmemsize: MC DRAM block size. If this variable is not defined + the value CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE will be assumed. + +Booting Linux flavors which do not support 48-bit VA (< Linux 3.18) +------------------------------------------------------------------- +One needs to use appropriate bootargs to boot Linux flavors which do +not support 48-bit VA (for e.g. < Linux 3.18) by appending mem=2048M, as shown +below: + +=> setenv bootargs 'console=ttyS1,115200 root=/dev/ram + earlycon=uart8250,mmio,0x21c0600,115200 default_hugepagesz=2m hugepagesz=2m + hugepages=16 mem=2048M' +
board/freescale/ls2085aqds/ls2085aqds.c +9 -6
@@ -244,15 +244,18 @@ void fdt_fixup_board_enet(void *fdt)#ifdef CONFIG_OF_BOARD_SETUP int ft_board_setup (void *blob,bd_t *bd) { -phys_addr_t base; -phys_size_t size; +u64 base[CONFIG_NR_DRAM_BANKS ]; +u64 size[CONFIG_NR_DRAM_BANKS ];ft_cpu_setup (blob, bd); -/* limit the memory size to bank 1 until Linux can handle 40-bit PA */ - base =getenv_bootm_low (); - size =getenv_bootm_size (); -fdt_fixup_memory (blob, (u64 )base, (u64 )size); +/* fixup DT for the two GPP DDR banks */ + base[0 ] = gd->bd->bi_dram[0 ].start; + size[0 ] = gd->bd->bi_dram[0 ].size; + base[1 ] = gd->bd->bi_dram[1 ].start; + size[1 ] = gd->bd->bi_dram[1 ].size; + +fdt_fixup_memory_banks (blob, base, size,2 );#ifdef CONFIG_FSL_MC_ENET fdt_fixup_board_enet (blob);
board/freescale/ls2085ardb/README +11 -0
@@ -107,3 +107,14 @@ Booting Options --------------- a) NOR boot b) NAND boot + +Booting Linux flavors which do not support 48-bit VA (< Linux 3.18) +------------------------------------------------------------------- +One needs to use appropriate bootargs to boot Linux flavors which do +not support 48-bit VA (for e.g. < Linux 3.18) by appending mem=2048M, as shown +below: + +=> setenv bootargs 'console=ttyS1,115200 root=/dev/ram + earlycon=uart8250,mmio,0x21c0600,115200 default_hugepagesz=2m hugepagesz=2m + hugepages=16 mem=2048M' +
board/freescale/ls2085ardb/ls2085ardb.c +9 -6
@@ -241,15 +241,18 @@ void fdt_fixup_board_enet(void *fdt)#ifdef CONFIG_OF_BOARD_SETUP int ft_board_setup (void *blob,bd_t *bd) { -phys_addr_t base; -phys_size_t size; +u64 base[CONFIG_NR_DRAM_BANKS ]; +u64 size[CONFIG_NR_DRAM_BANKS ];ft_cpu_setup (blob, bd); -/* limit the memory size to bank 1 until Linux can handle 40-bit PA */ - base =getenv_bootm_low (); - size =getenv_bootm_size (); -fdt_fixup_memory (blob, (u64 )base, (u64 )size); +/* fixup DT for the two GPP DDR banks */ + base[0 ] = gd->bd->bi_dram[0 ].start; + size[0 ] = gd->bd->bi_dram[0 ].size; + base[1 ] = gd->bd->bi_dram[1 ].start; + size[1 ] = gd->bd->bi_dram[1 ].size; + +fdt_fixup_memory_banks (blob, base, size,2 );#ifdef CONFIG_FSL_MC_ENET fdt_fixup_board_enet (blob);
Signature · 1 line
1.9.1
PATCH v2 18/22 armv8/ls2085a: Update SoC README for DDR layout
In reply to Prabhakar KushwahaUpdate SoC README to provide details of
- Memory regions
- Memory used by MC and Debug server
---
Chanes for v2: New patch
arch/arm/cpu/armv8/fsl-lsch3/README | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/cpu/armv8/fsl-lsch3/README +25 -0
@@ -9,6 +9,31 @@ Freescale LayerScape with Chassis Generation 3 This architecture supports Freescale ARMv8 SoCs with Chassis generation 3, for example LS2085A. +DDR Layout +============ +Entire DDR region splits into two regions. + - Region 1 is at address 0x8000_0000 to 0xffff_ffff. + - Region 2 is at 0x80_8000_0000 to the top of total memory, + for example 16GB, 0x83_ffff_ffff. + +All DDR memory is marked as cache-enabled. + +When MC and Debug server is enabled, they carve 512MB away from the high +end of DDR. For example, if the total DDR is 16GB, it shrinks to 15.5GB +with MC and Debug server enabled. Linux only sees 15.5GB. + +The reserved 512MB layout looks like + + +---------------+ <-- top/end of memory + | 256MB | debug server + +---------------+ + | 256MB | MC + +---------------+ + | ... | + +MC requires the memory to be aligned with 512MB, so even debug server is +not enabled, 512MB is reserved, not 256MB. + Flash Layout ============
Signature · 1 line
1.9.1
PATCH v2 19/22 driver/fsl_debug_server: Fix the DDR hide logic for LS2085a
In reply to Prabhakar KushwahaFrom: Bhupesh Sharma <[email protected]>
This patch fixes the DDR hide logic for LS2085a, correcting the way the Debug Server FW and MC FW images are placed on the top of system DDR and how the rest of the system DDR space is made visibile to Linux.
---
Changes for v2: sending as it is for patch set
drivers/misc/fsl_debug_server.c | 5 +++++ drivers/net/fsl-mc/mc.c | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-)
drivers/misc/fsl_debug_server.c +5 -0
@@ -10,6 +10,7 @@#include <asm/system.h> #include <asm/arch-fsl-lsch3/immap_lsch3.h> +#include <fsl-mc/fsl_mc.h> #include <fsl_debug_server.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -151,6 +152,10 @@ int debug_server_init(void) debug_server_ram_addr = gd->bd->bi_dram[0 ].start + gd->bd->bi_dram[0 ].size; +#ifdef CONFIG_FSL_MC_ENET + debug_server_ram_addr +=mc_get_dram_block_size (); +#endif + error =debug_server_parse_firmware_fit_image (&raw_image_addr, &raw_image_size);if (error !=0 )
drivers/net/fsl-mc/mc.c +0 -8
@@ -9,7 +9,6 @@#include <fsl-mc/fsl_mc_sys.h> #include <fsl-mc/fsl_mc_private.h> #include <fsl-mc/fsl_dpmng.h> -#include <fsl_debug_server.h> #include <fsl-mc/fsl_dprc.h> #include <fsl-mc/fsl_dpio.h> #include <fsl-mc/fsl_qbman_portal.h>
@@ -403,13 +402,6 @@ int mc_init(void) gd->bd->bi_dram[0 ].start + gd->bd->bi_dram[0 ].size; } -#ifdef CONFIG_FSL_DEBUG_SERVER -/* -* FIXME: I don't think this is right. See get_dram_size_to_hide() -*/ - mc_ram_addr -=debug_server_get_dram_block_size (); -#endif - error = calculate_mc_private_ram_params(mc_ram_addr, mc_ram_size, &mc_ram_aligned_base_addr,
Signature · 1 line
1.9.1
PATCH v2 20/22 arm/errata: Update required bits for A57 cores erratas
In reply to Prabhakar KushwahaFrom: Bhupesh Sharma <[email protected]>
This patch updates the setting of required bits for A57 cores erratas
- 828024 and 826974
---
Changes for v2: sending as it is for patch set
arch/arm/cpu/armv8/start.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/cpu/armv8/start.S +4 -4
@@ -115,18 +115,18 @@ apply_a57_core_errata: #ifdef CONFIG_ARM_ERRATA_828024 mrs x0, S3_1_c15_c2_0 /* cpuactlr_el1 */ /* Disable non-allocate hint of w-b-n-a memory type */ - mov x0, #0x1 << 49 + orr x0, x0, #1 << 49 /* Disable write streaming no L1-allocate threshold */ - mov x0, #0x3 << 25 + orr x0, x0, #3 << 25 /* Disable write streaming no-allocate threshold */ - mov x0, #0x3 << 27 + orr x0, x0, #3 << 27 msr S3_1_c15_c2_0, x0 /* cpuactlr_el1 */ #endif #ifdef CONFIG_ARM_ERRATA_826974 mrs x0, S3_1_c15_c2_0 /* cpuactlr_el1 */ /* Disable speculative load execution ahead of a DMB */ - mov x0, #0x1 << 59 + orr x0, x0, #1 << 59 msr S3_1_c15_c2_0, x0 /* cpuactlr_el1 */ #endif
Signature · 1 line
1.9.1
PATCH v2 21/22 armv8/fsl-lsch3: Support 256M mem split for MC & dbg-srvr
In reply to Prabhakar KushwahaFrom: Stuart Yoder <[email protected]>
The agreed split of the top of memory is 256M for debug server and 256M for MC. This patch implements the split.
In addition, the MC mem must be 512MB aligned, so the amount of memory to hide must be 512MB to achieve that alignment.
---
Changes for v2: sending as it is for patch set
board/freescale/ls2085a/ls2085a.c | 2 +- board/freescale/ls2085aqds/ls2085aqds.c | 2 +- board/freescale/ls2085ardb/ls2085ardb.c | 2 +- include/configs/ls2085a_common.h | 12 +++++++++--- 4 files changed, 12 insertions(+), 6 deletions(-)
board/freescale/ls2085a/ls2085a.c +1 -1
@@ -80,7 +80,7 @@ unsigned long get_dram_size_to_hide(void) dram_to_hide +=mc_get_dram_block_size ();#endif -return dram_to_hide; +return roundup (dram_to_hide,CONFIG_SYS_MEM_TOP_HIDE_MIN ); }int board_eth_init (bd_t *bis)
board/freescale/ls2085aqds/ls2085aqds.c +1 -1
@@ -215,7 +215,7 @@ unsigned long get_dram_size_to_hide(void) dram_to_hide +=mc_get_dram_block_size ();#endif -return dram_to_hide; +return roundup (dram_to_hide,CONFIG_SYS_MEM_TOP_HIDE_MIN ); }#ifdef CONFIG_FSL_MC_ENET
board/freescale/ls2085ardb/ls2085ardb.c +1 -1
@@ -212,7 +212,7 @@ unsigned long get_dram_size_to_hide(void) dram_to_hide +=mc_get_dram_block_size ();#endif -return dram_to_hide; +return roundup (dram_to_hide,CONFIG_SYS_MEM_TOP_HIDE_MIN ); }#ifdef CONFIG_FSL_MC_ENET
include/configs/ls2085a_common.h +9 -3
@@ -163,21 +163,27 @@ unsigned long long get_qixis_addr(void);#define CONFIG_SYS_NAND_BASE_PHYS 0x30000000/* Debug Server firmware */ -#define CONFIG_SYS_DEBUG_SERVER_DRAM_BLOCK_MIN_SIZE (512UL * 1024 * 1024)/* 2 sec timeout */ #define CONFIG_SYS_DEBUG_SERVER_TIMEOUT (2 * 1000 * 1000)/* MC firmware */ #define CONFIG_FSL_MC_ENET -#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (512UL * 1024 * 1024)/* TODO Actual DPL max length needs to be confirmed with the MC FW team */ #define CONFIG_SYS_LS_MC_DPC_MAX_LENGTH 0x20000#define CONFIG_SYS_LS_MC_DRAM_DPC_OFFSET 0x00F00000#define CONFIG_SYS_LS_MC_DPL_MAX_LENGTH 0x20000#define CONFIG_SYS_LS_MC_DRAM_DPL_OFFSET 0x00F20000 -/* Carve out a DDR region which will not be used by u-boot/Linux */ +/* +* Carve out a DDR region which will not be used by u-boot/Linux +* +* It will be used by MC and Debug Server. The MC region must be +* 512MB aligned, so the min size to hide is 512MB. +*/ #if defined(CONFIG_FSL_MC_ENET ) || defined(CONFIG_FSL_DEBUG_SERVER ) +#define CONFIG_SYS_DEBUG_SERVER_DRAM_BLOCK_MIN_SIZE (256UL * 1024 * 1024) +#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (256UL * 1024 * 1024) +#define CONFIG_SYS_MEM_TOP_HIDE_MIN (512UL * 1024 * 1024)#define CONFIG_SYS_MEM_TOP_HIDE get_dram_size_to_hide()#endif
Signature · 1 line
1.9.1
PATCH v2 21/22 armv8/fsl-lsch3: Support 256M mem split for MC & dbg-srvr
Quoted 13 lines · Prabhakar Kushwaha
From: Stuart Yoder <[email protected]>
The agreed split of the top of memory is 256M for debug server and 256M for MC. This patch implements the split.
In addition, the MC mem must be 512MB aligned, so the amount of memory to hide must be 512MB to achieve that alignment.
Signed-off-by Stuart Yoder <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>---
Changes for v2: sending as it is for patch set
<snip>
Quoted 23 lines
include/configs/ls2085a_common.h +1
-3@@ -163,21 +163,27 @@ unsigned long long get_qixis_addr(void);#define CONFIG_SYS_NAND_BASE_PHYS 0x30000000/* Debug Server firmware */ -#define CONFIG_SYS_DEBUG_SERVER_DRAM_BLOCK_MIN_SIZE (512UL * 1024 * 1024)/* 2 sec timeout */ #define CONFIG_SYS_DEBUG_SERVER_TIMEOUT (2 * 1000 * 1000)/* MC firmware */ #define CONFIG_FSL_MC_ENET -#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (512UL * 1024 * 1024)/* TODO Actual DPL max length needs to be confirmed with the MC FW team */ #define CONFIG_SYS_LS_MC_DPC_MAX_LENGTH 0x20000#define CONFIG_SYS_LS_MC_DRAM_DPC_OFFSET 0x00F00000#define CONFIG_SYS_LS_MC_DPL_MAX_LENGTH 0x20000#define CONFIG_SYS_LS_MC_DRAM_DPL_OFFSET 0x00F20000 -/* Carve out a DDR region which will not be used by u-boot/Linux */ +/*
include/configs/ls2085a_common.h unsigned long long get_qixis_addr(void); · line 187
Quoted 10 lines
include/configs/ls2085a_common.h +8
-0+* Carve out a DDR region which will not be used by u-boot/Linux +* +* It will be used by MC and Debug Server. The MC region must be +* 512MB aligned, so the min size to hide is 512MB. +*/ #if defined(CONFIG_FSL_MC_ENET ) || defined(CONFIG_FSL_DEBUG_SERVER ) +#define CONFIG_SYS_DEBUG_SERVER_DRAM_BLOCK_MIN_SIZE (256UL * 1024 * 1024) +#define CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE (256UL * 1024 * 1024) +#define CONFIG_SYS_MEM_TOP_HIDE_MIN (512UL * 1024 * 1024)#define CONFIG_SYS_MEM_TOP_HIDE get_dram_size_to_hide()
The new macro should be documented.
York
PATCH v2 22/22 armv8/ls2085a: enable debug server
In reply to Prabhakar KushwahaFrom: Stuart Yoder <[email protected]>
---
Changes for v2: sending as it is for patch set
include/configs/ls2085a_common.h | 1 + 1 file changed, 1 insertion(+)
include/configs/ls2085a_common.h +1 -0
@@ -163,6 +163,7 @@ unsigned long long get_qixis_addr(void);#define CONFIG_SYS_NAND_BASE_PHYS 0x30000000/* Debug Server firmware */ +#define CONFIG_FSL_DEBUG_SERVER /* 2 sec timeout */ #define CONFIG_SYS_DEBUG_SERVER_TIMEOUT (2 * 1000 * 1000)
Signature · 1 line
1.9.1
PATCH v2 1/22 armv8/ls2085ardb: Add eth & phy f/w loading support
In reply to Prabhakar KushwahaQuoted 9 lines · Prabhakar Kushwaha
Add support for board eth initialization and support for loading phy firmware. PHY firmware needs to be loaded from
board_eth_init()because all the MACs are not initialized byldpaa_ethdriver.Signed-off-by pankaj chauhan <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>---
Changes for v2: Sending as it is for patch set
This set (v2) with [21/22 v3] is applied to fsl-qoriq next branch.
York