Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
0002 /* Copyright(c) 2018-2019  Realtek Corporation
0003  */
0004 
0005 #ifndef __RTW_EFUSE_H__
0006 #define __RTW_EFUSE_H__
0007 
0008 #define EFUSE_HW_CAP_IGNORE     0
0009 #define EFUSE_HW_CAP_PTCL_VHT       3
0010 #define EFUSE_HW_CAP_SUPP_BW80      7
0011 #define EFUSE_HW_CAP_SUPP_BW40      6
0012 
0013 #define EFUSE_READ_FAIL         0xff
0014 
0015 #define GET_EFUSE_HW_CAP_HCI(hw_cap)                           \
0016     le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(3, 0))
0017 #define GET_EFUSE_HW_CAP_BW(hw_cap)                        \
0018     le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(18, 16))
0019 #define GET_EFUSE_HW_CAP_NSS(hw_cap)                           \
0020     le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(20, 19))
0021 #define GET_EFUSE_HW_CAP_ANT_NUM(hw_cap)                       \
0022     le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(23, 21))
0023 #define GET_EFUSE_HW_CAP_PTCL(hw_cap)                          \
0024     le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(27, 26))
0025 
0026 int rtw_parse_efuse_map(struct rtw_dev *rtwdev);
0027 int rtw_read8_physical_efuse(struct rtw_dev *rtwdev, u16 addr, u8 *data);
0028 
0029 #endif