From patchwork Sun Jan 26 22:50:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Johnson X-Patchwork-Id: 240132 List-Id: U-Boot discussion From: mrjoel at lixil.net (Joel Johnson) Date: Sun, 26 Jan 2020 15:50:03 -0700 Subject: [PATCH v4 06/12] arm: mvebu: clearfog: Add option for 2.5 Gbps SFP In-Reply-To: <20200126225009.7362-1-mrjoel@lixil.net> References: <20200126225009.7362-1-mrjoel@lixil.net> Message-ID: <20200126225009.7362-7-mrjoel@lixil.net> 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 --- v2 changes: - fixed help indentation v3 changes: - none v4 changes: - adjust static SerDes configuration at runtime instead of #ifdef --- board/solidrun/clearfog/Kconfig | 7 +++++++ board/solidrun/clearfog/clearfog.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/board/solidrun/clearfog/Kconfig b/board/solidrun/clearfog/Kconfig index 936d5918f8..c910e17093 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 4019e37016..6c5b9a784f 100644 --- a/board/solidrun/clearfog/clearfog.c +++ b/board/solidrun/clearfog/clearfog.c @@ -59,6 +59,9 @@ void config_static_serdes_map(void) board_serdes_map[4].serdes_speed = SERDES_SPEED_5_GBPS; board_serdes_map[4].serdes_mode = SERDES_DEFAULT_MODE; } + + if (IS_ENABLED(CONFIG_CLEARFOG_SFP_25GB)) + board_serdes_map[5].serdes_speed = SERDES_SPEED_3_125_GBPS; } int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)