From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baruch Siach Date: Mon, 25 Nov 2019 12:30:49 +0200 Subject: [U-Boot] [PATCH 09/10] ARM: mvebu: clearfog: add Clearfog GTR support In-Reply-To: References: Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Select the serdes configuration table based on the platform identity read from EEPROM TLV data. Clearfog GTR needs a slightly different serdes configuration. Signed-off-by: Baruch Siach --- board/solidrun/clearfog/clearfog.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c index 00c1306e9c80..70bea1e8dc65 100644 --- a/board/solidrun/clearfog/clearfog.c +++ b/board/solidrun/clearfog/clearfog.c @@ -25,6 +25,8 @@ DECLARE_GLOBAL_DATA_PTR; */ static char tlv_product_name[2][32]; +static void read_tlv_data(void); + /* * Those values and defines are taken from the Marvell U-Boot version * "u-boot-2013.01-15t1-clearfog" @@ -48,6 +50,8 @@ static struct serdes_map board_serdes_map[] = { int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count) { + read_tlv_data(); + *serdes_map_array = board_serdes_map; *count = ARRAY_SIZE(board_serdes_map); return 0; @@ -188,6 +192,12 @@ static void read_tlv_data(void) continue; parse_tlv_data(eeprom_data, tlv_hdr, tlv_entry); } + + if (sr_product_is("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; + } } struct mv_ddr_topology_map *mv_ddr_topology_map_get(void) -- 2.24.0