diff options
author | Tom Rini <trini@konsulko.com> | 2024-01-22 10:59:20 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-22 10:59:20 -0500 |
commit | c09ec8e1cb3baddef44458fb945fc258587a7d1b (patch) | |
tree | 1f00d898be7c2023ee733cb79fdd14ae022c004f /board | |
parent | d64e05fc5b82689864fe9c7abeaf240ca0719636 (diff) | |
parent | bb6e89048ceaf26a4d775750715e3279dbd73d07 (diff) | |
download | u-boot-c09ec8e1cb3baddef44458fb945fc258587a7d1b.tar.gz u-boot-c09ec8e1cb3baddef44458fb945fc258587a7d1b.tar.bz2 u-boot-c09ec8e1cb3baddef44458fb945fc258587a7d1b.zip |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- solidrun: clearfog gtr: add serdes configuration (Josua)
Diffstat (limited to 'board')
-rw-r--r-- | board/solidrun/clearfog/Kconfig | 19 | ||||
-rw-r--r-- | board/solidrun/clearfog/clearfog.c | 19 |
2 files changed, 35 insertions, 3 deletions
diff --git a/board/solidrun/clearfog/Kconfig b/board/solidrun/clearfog/Kconfig index 60d3921307..b1623038d0 100644 --- a/board/solidrun/clearfog/Kconfig +++ b/board/solidrun/clearfog/Kconfig @@ -39,6 +39,25 @@ config CLEARFOG_SFP_25GB 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. +choice CLEARFOG_GTR_SERDES0 + prompt "Select Clearfog GTR SerDes 0 Function" + default CLEARFOG_GTR_SERDES0_PCIE + help + Select function for SerDes 0 which is shared between CON3 and CON18 + for either pci-e or sata. + +config CLEARFOG_GTR_SERDES0_PCIE + bool "PCI-E on CON3" + help + Configure SerDes 0 for PCI-E to enable CON3 mini-PCI-E connector. + +config CLEARFOG_GTR_SERDES0_SATA + bool "SATA on CON18" + help + Configure SerDes 0 for SATA to enable CON18 SATA connector. + +endchoice + config ENV_SIZE hex "Environment Size" default 0x10000 diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c index 6fa2fe5fe3..6977db0a9e 100644 --- a/board/solidrun/clearfog/clearfog.c +++ b/board/solidrun/clearfog/clearfog.c @@ -90,9 +90,22 @@ int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) /* 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; - board_serdes_map[0].serdes_mode = PEX_ROOT_COMPLEX_X1; + if (IS_ENABLED(CONFIG_CLEARFOG_GTR_SERDES0_SATA)) { + /* serdes 0 is sata (like clearfog pro) */ + } else if (IS_ENABLED(CONFIG_CLEARFOG_GTR_SERDES0_PCIE)) { + /* serdes 0 is pci */ + board_serdes_map[0].serdes_type = PEX0; + board_serdes_map[0].serdes_speed = SERDES_SPEED_5_GBPS; + board_serdes_map[0].serdes_mode = PEX_ROOT_COMPLEX_X1; + } + /* serdes 1 is 2.5Gbps fixed link to ethernet switch */ + board_serdes_map[1].serdes_type = SGMII1; + board_serdes_map[1].serdes_speed = SERDES_SPEED_3_125_GBPS; + board_serdes_map[1].serdes_mode = SERDES_DEFAULT_MODE; + /* serdes 2 is pci (like clearfog pro) */ + /* serdes 3 is usb-3 (like clearfog pro) */ + /* serdes 4 is pci (like clearfog pro) */ + /* serdes 5 is sfp connector (like clearfog pro) */ } else if (sr_product_is(&cf_tlv_data, "Clearfog Pro")) { /* handle recognized product as noop, no adjustment required */ } else if (sr_product_is(&cf_tlv_data, "Clearfog Base")) { |