From: Joel Johnson Date: Mon, 23 Mar 2020 20:21:33 +0000 (-0600) Subject: arm: mvebu: clearfog: Add option for 2.5 Gbps SFP X-Git-Tag: v2020.10~289^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a86308a87d32b289eff0b6f89de1dea466bae9b;p=platform%2Fkernel%2Fu-boot.git arm: mvebu: clearfog: Add option for 2.5 Gbps SFP While newer Linux kernels provide autoconfiguration of SFP, provide an option for setting in U-Boot Kconfig for use prior to booting. Signed-off-by: Joel Johnson Reviewed-by: Stefan Roese --- diff --git a/board/solidrun/clearfog/Kconfig b/board/solidrun/clearfog/Kconfig index 936d591..c910e17 100644 --- a/board/solidrun/clearfog/Kconfig +++ b/board/solidrun/clearfog/Kconfig @@ -15,4 +15,11 @@ config TARGET_CLEARFOG_BASE detection via additional EEPROM hardware. This option enables selecting the Base variant for older hardware revisions. +config CLEARFOG_SFP_25GB + bool "Enable 2.5 Gbps mode for SFP" + help + Set the SFP module connection to support 2.5 Gbps transfer speed for the + SGMII connection (requires a supporting SFP). By default, transfer speed + of 1.25 Gbps is used, suitable for a more common 1 Gbps SFP module. + endmenu diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c index 11d3a7f..8f3e5dc 100644 --- a/board/solidrun/clearfog/clearfog.c +++ b/board/solidrun/clearfog/clearfog.c @@ -63,6 +63,11 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) { cf_read_tlv_data(); + /* Apply build configuration options before runtime configuration */ + if (IS_ENABLED(CONFIG_CLEARFOG_SFP_25GB)) + board_serdes_map[5].serdes_speed = SERDES_SPEED_3_125_GBPS; + + /* Apply runtime detection changes */ if (sr_product_is(&cf_tlv_data, "Clearfog GTR")) { board_serdes_map[0].serdes_type = PEX0; board_serdes_map[0].serdes_speed = SERDES_SPEED_5_GBPS;