From 143af3c6d5d748f503ec87d3dd0dcce0297550a3 Mon Sep 17 00:00:00 2001 From: Pankit Garg Date: Thu, 27 Dec 2018 04:37:55 +0000 Subject: armv8: ls1088ardb: Add TFABOOT support TFABOOT support includes: - ls1088ardb_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT - MC address changes for TFABOOT - define BOOTCOMMAND for TFABOOT - ifc chip select changes for TFABOOT Signed-off-by: Rajesh Bhagat Signed-off-by: Pankit Garg Reviewed-by: York Sun --- board/freescale/ls1088a/MAINTAINERS | 4 ++ board/freescale/ls1088a/ddr.c | 11 ++++++ board/freescale/ls1088a/ls1088a.c | 78 +++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) (limited to 'board/freescale') diff --git a/board/freescale/ls1088a/MAINTAINERS b/board/freescale/ls1088a/MAINTAINERS index 4d804d9447..bca9969637 100644 --- a/board/freescale/ls1088a/MAINTAINERS +++ b/board/freescale/ls1088a/MAINTAINERS @@ -1,15 +1,18 @@ LS1088ARDB BOARD M: Prabhakar Kushwaha M: Ashish Kumar +M: Rajesh Bhagat S: Maintained F: board/freescale/ls1088a/ F: include/configs/ls1088ardb.h F: configs/ls1088ardb_qspi_defconfig F: configs/ls1088ardb_sdcard_qspi_defconfig +F: configs/ls1088ardb_tfa_defconfig LS1088AQDS BOARD M: Prabhakar Kushwaha M: Ashish Kumar +M: Rajesh Bhagat S: Maintained F: board/freescale/ls1088a/ F: include/configs/ls1088aqds.h @@ -17,6 +20,7 @@ F: configs/ls1088aqds_qspi_defconfig F: configs/ls1088aqds_sdcard_qspi_defconfig F: configs/ls1088aqds_defconfig F: configs/ls1088aqds_sdcard_ifc_defconfig +F: configs/ls1088aqds_tfa_defconfig LS1088AQDS_QSPI_SECURE_BOOT BOARD M: Udit Agarwal diff --git a/board/freescale/ls1088a/ddr.c b/board/freescale/ls1088a/ddr.c index 78d573a845..c21a2ce059 100644 --- a/board/freescale/ls1088a/ddr.c +++ b/board/freescale/ls1088a/ddr.c @@ -111,7 +111,17 @@ found: DDR_CDR2_VREF_TRAIN_EN | DDR_CDR2_VREF_RANGE_2; } +#ifdef CONFIG_TFABOOT +int fsl_initdram(void) +{ + gd->ram_size = tfa_get_dram_size(); + + if (!gd->ram_size) + gd->ram_size = fsl_ddr_sdram_size(); + return 0; +} +#else int fsl_initdram(void) { puts("Initializing DDR....using SPD\n"); @@ -123,3 +133,4 @@ int fsl_initdram(void) #endif return 0; } +#endif /* CONFIG_TFABOOT */ diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 1e2ad98c6e..f3018aa5da 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -88,6 +88,9 @@ int fixup_ls1088ardb_pb_banner(void *fdt) #if !defined(CONFIG_SPL_BUILD) int checkboard(void) { +#ifdef CONFIG_TFABOOT + enum boot_src src = get_boot_src(); +#endif char buf[64]; u8 sw; static const char *const freq[] = {"100", "125", "156.25", @@ -117,9 +120,14 @@ int checkboard(void) sw = QIXIS_READ(brdcfg[0]); sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT; +#ifdef CONFIG_TFABOOT + if (src == BOOT_SOURCE_SD_MMC) + puts("SD card\n"); +#else #ifdef CONFIG_SD_BOOT puts("SD card\n"); #endif +#endif /* CONFIG_TFABOOT */ switch (sw) { #ifdef CONFIG_TARGET_LS1088AQDS case 0: @@ -546,6 +554,10 @@ void fdt_fixup_board_enet(void *fdt) void fsl_fdt_fixup_flash(void *fdt) { int offset; +#ifdef CONFIG_TFABOOT + u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE; + u32 val; +#endif /* * IFC-NOR and QSPI are muxed on SoC. @@ -553,6 +565,37 @@ void fsl_fdt_fixup_flash(void *fdt) * disable QSPI node in dts in case QSPI is not enabled. */ +#ifdef CONFIG_TFABOOT + enum boot_src src = get_boot_src(); + bool disable_ifc = false; + + switch (src) { + case BOOT_SOURCE_IFC_NOR: + disable_ifc = false; + break; + case BOOT_SOURCE_QSPI_NOR: + disable_ifc = true; + break; + default: + val = in_le32(dcfg_ccsr + DCFG_RCWSR15 / 4); + if (DCFG_RCWSR15_IFCGRPABASE_QSPI == (val & (u32)0x3)) + disable_ifc = true; + break; + } + + if (disable_ifc) { + offset = fdt_path_offset(fdt, "/soc/ifc/nor"); + + if (offset < 0) + offset = fdt_path_offset(fdt, "/ifc/nor"); + } else { + offset = fdt_path_offset(fdt, "/soc/quadspi"); + + if (offset < 0) + offset = fdt_path_offset(fdt, "/quadspi"); + } + +#else #ifdef CONFIG_FSL_QSPI offset = fdt_path_offset(fdt, "/soc/ifc/nor"); @@ -563,6 +606,7 @@ void fsl_fdt_fixup_flash(void *fdt) if (offset < 0) offset = fdt_path_offset(fdt, "/quadspi"); +#endif #endif if (offset < 0) return; @@ -613,3 +657,37 @@ int ft_board_setup(void *blob, bd_t *bd) } #endif #endif /* defined(CONFIG_SPL_BUILD) */ + +#ifdef CONFIG_TFABOOT +#ifdef CONFIG_MTD_NOR_FLASH +int is_flash_available(void) +{ + char *env_hwconfig = env_get("hwconfig"); + enum boot_src src = get_boot_src(); + int is_nor_flash_available = 1; + + switch (src) { + case BOOT_SOURCE_IFC_NOR: + is_nor_flash_available = 1; + break; + case BOOT_SOURCE_QSPI_NOR: + is_nor_flash_available = 0; + break; + /* + * In Case of SD boot,if qspi is defined in env_hwconfig + * disable nor flash probe. + */ + default: + if (hwconfig_f("qspi", env_hwconfig)) + is_nor_flash_available = 0; + break; + } + return is_nor_flash_available; +} +#endif + +void *env_sf_get_env_addr(void) +{ + return (void *)(CONFIG_SYS_FSL_QSPI_BASE + CONFIG_ENV_OFFSET); +} +#endif -- cgit From 1a12b4a0ac769f1a292d70e7e5f5fd6cd3781ec8 Mon Sep 17 00:00:00 2001 From: Pankit Garg Date: Thu, 27 Dec 2018 04:37:57 +0000 Subject: armv8: ls1088aqds: Add TFABOOT support TFABOOT support includes: - ls1088aqds_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT - MC address changes for TFABOOT - define BOOTCOMMAND for TFABOOT - ifc chip select changes for TFABOOT Signed-off-by: Rajesh Bhagat Signed-off-by: Pankit Garg Reviewed-by: York Sun --- board/freescale/ls1088a/ls1088a.c | 115 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) (limited to 'board/freescale') diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index f3018aa5da..35a7c34c60 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -28,6 +28,121 @@ DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_TARGET_LS1088AQDS +#ifdef CONFIG_TFABOOT +struct ifc_regs ifc_cfg_ifc_nor_boot[CONFIG_SYS_FSL_IFC_BANK_COUNT] = { + { + "nor0", + CONFIG_SYS_NOR0_CSPR_EARLY, + CONFIG_SYS_NOR0_CSPR_EXT, + CONFIG_SYS_NOR_AMASK, + CONFIG_SYS_NOR_CSOR, + { + CONFIG_SYS_NOR_FTIM0, + CONFIG_SYS_NOR_FTIM1, + CONFIG_SYS_NOR_FTIM2, + CONFIG_SYS_NOR_FTIM3 + }, + 0, + CONFIG_SYS_NOR0_CSPR, + 0, + }, + { + "nor1", + CONFIG_SYS_NOR1_CSPR_EARLY, + CONFIG_SYS_NOR0_CSPR_EXT, + CONFIG_SYS_NOR_AMASK_EARLY, + CONFIG_SYS_NOR_CSOR, + { + CONFIG_SYS_NOR_FTIM0, + CONFIG_SYS_NOR_FTIM1, + CONFIG_SYS_NOR_FTIM2, + CONFIG_SYS_NOR_FTIM3 + }, + 0, + CONFIG_SYS_NOR1_CSPR, + CONFIG_SYS_NOR_AMASK, + }, + { + "nand", + CONFIG_SYS_NAND_CSPR, + CONFIG_SYS_NAND_CSPR_EXT, + CONFIG_SYS_NAND_AMASK, + CONFIG_SYS_NAND_CSOR, + { + CONFIG_SYS_NAND_FTIM0, + CONFIG_SYS_NAND_FTIM1, + CONFIG_SYS_NAND_FTIM2, + CONFIG_SYS_NAND_FTIM3 + }, + }, + { + "fpga", + CONFIG_SYS_FPGA_CSPR, + CONFIG_SYS_FPGA_CSPR_EXT, + SYS_FPGA_AMASK, + CONFIG_SYS_FPGA_CSOR, + { + SYS_FPGA_CS_FTIM0, + SYS_FPGA_CS_FTIM1, + SYS_FPGA_CS_FTIM2, + SYS_FPGA_CS_FTIM3 + }, + 0, + SYS_FPGA_CSPR_FINAL, + 0, + } +}; + +struct ifc_regs ifc_cfg_qspi_nor_boot[CONFIG_SYS_FSL_IFC_BANK_COUNT] = { + { + "nand", + CONFIG_SYS_NAND_CSPR, + CONFIG_SYS_NAND_CSPR_EXT, + CONFIG_SYS_NAND_AMASK, + CONFIG_SYS_NAND_CSOR, + { + CONFIG_SYS_NAND_FTIM0, + CONFIG_SYS_NAND_FTIM1, + CONFIG_SYS_NAND_FTIM2, + CONFIG_SYS_NAND_FTIM3 + }, + }, + { + "reserved", + }, + { + "fpga", + CONFIG_SYS_FPGA_CSPR, + CONFIG_SYS_FPGA_CSPR_EXT, + SYS_FPGA_AMASK, + CONFIG_SYS_FPGA_CSOR, + { + SYS_FPGA_CS_FTIM0, + SYS_FPGA_CS_FTIM1, + SYS_FPGA_CS_FTIM2, + SYS_FPGA_CS_FTIM3 + }, + 0, + SYS_FPGA_CSPR_FINAL, + 0, + } +}; + +void ifc_cfg_boot_info(struct ifc_regs_info *regs_info) +{ + enum boot_src src = get_boot_src(); + + if (src == BOOT_SOURCE_QSPI_NOR) + regs_info->regs = ifc_cfg_qspi_nor_boot; + else + regs_info->regs = ifc_cfg_ifc_nor_boot; + + regs_info->cs_size = CONFIG_SYS_FSL_IFC_BANK_COUNT; +} +#endif /* CONFIG_TFABOOT */ +#endif /* CONFIG_TARGET_LS1088AQDS */ + int board_early_init_f(void) { #if defined(CONFIG_SYS_I2C_EARLY_INIT) && defined(CONFIG_TARGET_LS1088AQDS) -- cgit From 9570df03ee37f437f9ba3ddc25c8c6527a396992 Mon Sep 17 00:00:00 2001 From: Rajesh Bhagat Date: Thu, 27 Dec 2018 04:37:59 +0000 Subject: armv8: ls2088ardb: Add TFABOOT support TFABOOT support includes: - ls2088ardb_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT - define BOOTCOMMAND for TFABOOT - remove EL3 specific erratas for TFABOOT Signed-off-by: Pankit Garg Signed-off-by: Ruchika Gupta Signed-off-by: Rajesh Bhagat Reviewed-by: York Sun --- board/freescale/ls2080a/ls2080a.c | 7 +++++++ board/freescale/ls2080ardb/MAINTAINERS | 2 ++ board/freescale/ls2080ardb/ddr.c | 12 +++++++++++ board/freescale/ls2080ardb/ls2080ardb.c | 37 +++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+) (limited to 'board/freescale') diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c index 698ae1f9a6..ad3596a8a1 100644 --- a/board/freescale/ls2080a/ls2080a.c +++ b/board/freescale/ls2080a/ls2080a.c @@ -142,3 +142,10 @@ void reset_phy(void) { } #endif + +#ifdef CONFIG_TFABOOT +void *env_sf_get_env_addr(void) +{ + return (void *)(CONFIG_SYS_FSL_QSPI_BASE1 + CONFIG_ENV_OFFSET); +} +#endif diff --git a/board/freescale/ls2080ardb/MAINTAINERS b/board/freescale/ls2080ardb/MAINTAINERS index bbe56e2052..1f6014deed 100644 --- a/board/freescale/ls2080ardb/MAINTAINERS +++ b/board/freescale/ls2080ardb/MAINTAINERS @@ -9,8 +9,10 @@ F: configs/ls2080ardb_nand_defconfig LS2088A_QSPI-boot BOARD M: Priyanka Jain +M: Rajesh Bhagat S: Maintained F: configs/ls2088ardb_qspi_defconfig +F: configs/ls2088ardb_tfa_defconfig LS2081ARDB BOARD M: Priyanka Jain diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c index 26eb14b812..72ce872c75 100644 --- a/board/freescale/ls2080ardb/ddr.c +++ b/board/freescale/ls2080ardb/ddr.c @@ -160,6 +160,17 @@ found: } } +#ifdef CONFIG_TFABOOT +int fsl_initdram(void) +{ + gd->ram_size = tfa_get_dram_size(); + + if (!gd->ram_size) + gd->ram_size = fsl_ddr_sdram_size(); + + return 0; +} +#else int fsl_initdram(void) { #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD) @@ -172,3 +183,4 @@ int fsl_initdram(void) return 0; } +#endif /* CONFIG_TFABOOT */ diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index cf91bc30fb..20e1fce0fc 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -346,12 +346,47 @@ void board_quiesce_devices(void) void fsl_fdt_fixup_flash(void *fdt) { int offset; +#ifdef CONFIG_TFABOOT + u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE; + u32 val; +#endif /* * IFC and QSPI are muxed on board. * So disable IFC node in dts if QSPI is enabled or * disable QSPI node in dts in case QSPI is not enabled. */ +#ifdef CONFIG_TFABOOT + enum boot_src src = get_boot_src(); + bool disable_ifc = false; + + switch (src) { + case BOOT_SOURCE_IFC_NOR: + disable_ifc = false; + break; + case BOOT_SOURCE_QSPI_NOR: + disable_ifc = true; + break; + default: + val = in_le32(dcfg_ccsr + DCFG_RCWSR15 / 4); + if (DCFG_RCWSR15_IFCGRPABASE_QSPI == (val & (u32)0x3)) + disable_ifc = true; + break; + } + + if (disable_ifc) { + offset = fdt_path_offset(fdt, "/soc/ifc"); + + if (offset < 0) + offset = fdt_path_offset(fdt, "/ifc"); + } else { + offset = fdt_path_offset(fdt, "/soc/quadspi"); + + if (offset < 0) + offset = fdt_path_offset(fdt, "/quadspi"); + } + +#else #ifdef CONFIG_FSL_QSPI offset = fdt_path_offset(fdt, "/soc/ifc"); @@ -363,6 +398,8 @@ void fsl_fdt_fixup_flash(void *fdt) if (offset < 0) offset = fdt_path_offset(fdt, "/quadspi"); #endif +#endif + if (offset < 0) return; -- cgit From 1908201caeca1a1bf63a112dfb1fc1fbc445e4d0 Mon Sep 17 00:00:00 2001 From: Rajesh Bhagat Date: Thu, 27 Dec 2018 04:38:01 +0000 Subject: armv8: ls2088aqds: Add TFABOOT support TFABOOT support includes: - ls2088aqds_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT Signed-off-by: Pankit Garg Signed-off-by: Ruchika Gupta Signed-off-by: Rajesh Bhagat Reviewed-by: York Sun --- board/freescale/ls2080aqds/MAINTAINERS | 2 ++ board/freescale/ls2080aqds/ddr.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) (limited to 'board/freescale') diff --git a/board/freescale/ls2080aqds/MAINTAINERS b/board/freescale/ls2080aqds/MAINTAINERS index f7f1f09513..e3d7635476 100644 --- a/board/freescale/ls2080aqds/MAINTAINERS +++ b/board/freescale/ls2080aqds/MAINTAINERS @@ -1,5 +1,6 @@ LS2080A BOARD M: Prabhakar Kushwaha , Priyanka Jain +M: Rajesh Bhagat S: Maintained F: board/freescale/ls2080aqds/ F: board/freescale/ls2080a/ls2080aqds.c @@ -8,6 +9,7 @@ F: configs/ls2080aqds_defconfig F: configs/ls2080aqds_nand_defconfig F: configs/ls2080aqds_qspi_defconfig F: configs/ls2080aqds_sdcard_defconfig +F: configs/ls2088aqds_tfa_defconfig LS2080A_SECURE_BOOT BOARD #M: Saksham Jain diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c index e9e7333c0a..fffe78c301 100644 --- a/board/freescale/ls2080aqds/ddr.c +++ b/board/freescale/ls2080aqds/ddr.c @@ -155,6 +155,17 @@ found: } } +#ifdef CONFIG_TFABOOT +int fsl_initdram(void) +{ + gd->ram_size = tfa_get_dram_size(); + + if (!gd->ram_size) + gd->ram_size = fsl_ddr_sdram_size(); + + return 0; +} +#else int fsl_initdram(void) { #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD) @@ -167,3 +178,4 @@ int fsl_initdram(void) return 0; } +#endif /* CONFIG_TFABOOT */ -- cgit From 7e96804975a7a640901d30e28f34a93d014e2e23 Mon Sep 17 00:00:00 2001 From: Mian Yousaf Kaukab Date: Tue, 18 Dec 2018 14:01:17 +0100 Subject: fsl-layerscape: dpaa: fix fsl-mc status in fdt with bootefi fsl-mc lazyapply command applies dpl from efi_exit_boot_services(). Status of fsl-mc node in working fdt is updated at this stage. However, an efi application like grub may already have copied the fdt. So the updates to fdt done at efi_exit_boot_services() may not be visible to the OS. Fix it by updating fdt earlier if fsl-mc lazyapply command is used. Fixes: b7b8410a8f (ls2080: Exit dpaa only right before exiting U-Boot) Signed-off-by: Mian Yousaf Kaukab Reviewed-by: York Sun --- board/freescale/ls1088a/ls1088a.c | 3 ++- board/freescale/ls2080a/ls2080a.c | 3 ++- board/freescale/ls2080aqds/ls2080aqds.c | 3 ++- board/freescale/ls2080ardb/ls2080ardb.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 35a7c34c60..953aab6e88 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -658,7 +658,8 @@ void fdt_fixup_board_enet(void *fdt) return; } - if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) + if (get_mc_boot_status() == 0 && + (is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0)) fdt_status_okay(fdt, offset); else fdt_status_fail(fdt, offset); diff --git a/board/freescale/ls2080a/ls2080a.c b/board/freescale/ls2080a/ls2080a.c index ad3596a8a1..cc1822d0f5 100644 --- a/board/freescale/ls2080a/ls2080a.c +++ b/board/freescale/ls2080a/ls2080a.c @@ -89,7 +89,8 @@ void fdt_fixup_board_enet(void *fdt) return; } - if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) + if (get_mc_boot_status() == 0 && + (is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0)) fdt_status_okay(fdt, offset); else fdt_status_fail(fdt, offset); diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c index d336ef840c..a0a3301691 100644 --- a/board/freescale/ls2080aqds/ls2080aqds.c +++ b/board/freescale/ls2080aqds/ls2080aqds.c @@ -294,7 +294,8 @@ void fdt_fixup_board_enet(void *fdt) return; } - if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) + if (get_mc_boot_status() == 0 && + (is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0)) fdt_status_okay(fdt, offset); else fdt_status_fail(fdt, offset); diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index 20e1fce0fc..ce419dfcae 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -330,7 +330,8 @@ void fdt_fixup_board_enet(void *fdt) return; } - if ((get_mc_boot_status() == 0) && (get_dpl_apply_status() == 0)) + if (get_mc_boot_status() == 0 && + (is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0)) fdt_status_okay(fdt, offset); else fdt_status_fail(fdt, offset); -- cgit From bae54ac99e4eb96e603821559627c46154a0d8ed Mon Sep 17 00:00:00 2001 From: Florinel Iordache Date: Mon, 10 Dec 2018 09:27:31 +0000 Subject: ls1046aqds: Bypass xfi port fixup for KR mode u-boot makes a fixup for LS1046AQDS board to setup the properties 'fixed-link' and 'phy-connection-type' to 'xgmii' but in case of backplane mode this fixup is not correct because it causes the KR link to fail and so it must be bypassed in order to keep the link in KR mode as it is defined in DTS. Signed-off-by: Florinel Iordache [YS: Fix compiling warning] Reviewed-by: York Sun --- board/freescale/ls1046aqds/eth.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/ls1046aqds/eth.c b/board/freescale/ls1046aqds/eth.c index d3e8831f84..abe8ee95d4 100644 --- a/board/freescale/ls1046aqds/eth.c +++ b/board/freescale/ls1046aqds/eth.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2016 Freescale Semiconductor, Inc. + * Copyright 2018 NXP */ #include @@ -153,6 +154,9 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr, enum fm_port port, int offset) { struct fixed_link f_link; + const u32 *handle; + const char *prop = NULL; + int off; if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII) { switch (port) { @@ -208,16 +212,27 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr, "qsgmii"); } else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII && (port == FM1_10GEC1 || port == FM1_10GEC2)) { - /* XFI interface */ - f_link.phy_id = cpu_to_fdt32(port); - f_link.duplex = cpu_to_fdt32(1); - f_link.link_speed = cpu_to_fdt32(10000); - f_link.pause = 0; - f_link.asym_pause = 0; - /* no PHY for XFI */ - fdt_delprop(fdt, offset, "phy-handle"); - fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link)); - fdt_setprop_string(fdt, offset, "phy-connection-type", "xgmii"); + handle = fdt_getprop(fdt, offset, "phy-handle", NULL); + prop = NULL; + if (handle) { + off = fdt_node_offset_by_phandle(fdt, + fdt32_to_cpu(*handle)); + prop = fdt_getprop(fdt, off, "backplane-mode", NULL); + } + if (!prop || strcmp(prop, "10gbase-kr")) { + /* XFI interface */ + f_link.phy_id = cpu_to_fdt32(port); + f_link.duplex = cpu_to_fdt32(1); + f_link.link_speed = cpu_to_fdt32(10000); + f_link.pause = 0; + f_link.asym_pause = 0; + /* no PHY for XFI */ + fdt_delprop(fdt, offset, "phy-handle"); + fdt_setprop(fdt, offset, "fixed-link", &f_link, + sizeof(f_link)); + fdt_setprop_string(fdt, offset, "phy-connection-type", + "xgmii"); + } } } -- cgit From 55dbfdadd2ca4ef38804d67f40c3850911698df9 Mon Sep 17 00:00:00 2001 From: York Sun Date: Wed, 16 Jan 2019 15:49:19 +0000 Subject: armv8: ls1088ardb: Update MAINTAINERS Signed-off-by: York Sun CC: Rajesh Bhagat --- board/freescale/ls1088a/MAINTAINERS | 1 + 1 file changed, 1 insertion(+) (limited to 'board/freescale') diff --git a/board/freescale/ls1088a/MAINTAINERS b/board/freescale/ls1088a/MAINTAINERS index bca9969637..98ecb88e3b 100644 --- a/board/freescale/ls1088a/MAINTAINERS +++ b/board/freescale/ls1088a/MAINTAINERS @@ -8,6 +8,7 @@ F: include/configs/ls1088ardb.h F: configs/ls1088ardb_qspi_defconfig F: configs/ls1088ardb_sdcard_qspi_defconfig F: configs/ls1088ardb_tfa_defconfig +F: configs/ls1088ardb_tfa_SECURE_BOOT_defconfig LS1088AQDS BOARD M: Prabhakar Kushwaha -- cgit From a200ebea630002b14def4a015642fa341dc9cd11 Mon Sep 17 00:00:00 2001 From: York Sun Date: Wed, 16 Jan 2019 15:49:25 +0000 Subject: armv8: ls2088ardb: Update MAINTAINERS Signed-off-by: York Sun CC: Rajesh Bhagat --- board/freescale/ls2080ardb/MAINTAINERS | 1 + 1 file changed, 1 insertion(+) (limited to 'board/freescale') diff --git a/board/freescale/ls2080ardb/MAINTAINERS b/board/freescale/ls2080ardb/MAINTAINERS index 1f6014deed..113b7ab3fd 100644 --- a/board/freescale/ls2080ardb/MAINTAINERS +++ b/board/freescale/ls2080ardb/MAINTAINERS @@ -13,6 +13,7 @@ M: Rajesh Bhagat S: Maintained F: configs/ls2088ardb_qspi_defconfig F: configs/ls2088ardb_tfa_defconfig +F: configs/ls2088ardb_tfa_SECURE_BOOT_defconfig LS2081ARDB BOARD M: Priyanka Jain -- cgit