* Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef PBL_BOARD_CONFIG_H
#define PBL_BOARD_CONFIG_H
#include "ascend_kernel_hal.h"
#define MAX_CHIP_SERDES_LAN_NUM 8
#define PCIE_CONNECT_TYPE 0
#define HCCS_CONNECT_TYPE 1
enum dbl_serdes_type {
SERDES_TYPE_NULL = 0,
SERDES_TYPE_PCIE,
SERDES_TYPE_SATA,
SERDES_TYPE_USB,
SERDES_TYPE_GE
};
enum dbl_frequency_level {
SERDES_FREQ_NULL,
SERDES_FREQ_1G,
};
#define DBL_INVALID_CONFIG_VALUE 0xFF
struct dbl_serdes_lan_info {
unsigned short lan_index;
enum dbl_serdes_type type;
unsigned char ssc_enable;
unsigned char polarity_tx;
unsigned char polarity_rx;
unsigned char lan_order;
meaning is x2 or x4, Invalid value is 0xff */
unsigned char bandwidth;
unsigned char align_mode;
enum dbl_frequency_level frequency;
};
typedef enum {
ADDR_MODE_INDEPENDENT = 0,
ADDR_MODE_UNIFIED,
} ADDR_MODE_TYPE;
struct dbl_board_serdes_info {
unsigned short lan_count;
struct dbl_serdes_lan_info lan_info[MAX_CHIP_SERDES_LAN_NUM];
};
struct dbl_board_serdes_info *dbl_get_board_serdes_info(void);
#endif