1 /* 2 * Customer HW 4 dependant file 3 * 4 * Copyright (C) 2020, Broadcom. 5 * 6 * Unless you and Broadcom execute a separate written software license 7 * agreement governing use of this software, this software is licensed to you 8 * under the terms of the GNU General Public License version 2 (the "GPL"), 9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 10 * following added to such license: 11 * 12 * As a special exception, the copyright holders of this software give you 13 * permission to link this software with independent modules, and to copy and 14 * distribute the resulting executable under terms of your choice, provided that 15 * you also meet, for each linked independent module, the terms and conditions of 16 * the license of that module. An independent module is a module which is not 17 * derived from this software. The special exception does not apply to any 18 * modifications of the software. 19 * 20 * 21 * <<Broadcom-WL-IPTag/Open:>> 22 * 23 * $Id: dhd_sec_feature.h$ 24 */ 25 26 /* XXX This File managed by Samsung */ 27 28 /* 29 * ** Desciption *** 30 * 1. Module vs COB 31 * If your model's WIFI HW chip is COB type, you must add below feature 32 * - #undef USE_CID_CHECK 33 * - #define READ_MACADDR 34 * Because COB type chip have not CID and Mac address. 35 * So, you must add below feature to defconfig file. 36 * - CONFIG_WIFI_BROADCOM_COB 37 * 38 * 2. PROJECTS 39 * If you want add some feature only own Project, you can add it in 'PROJECTS' part. 40 * 41 * 3. Region code 42 * If you want add some feature only own region model, you can use below code. 43 * - 100 : EUR OPEN 44 * - 101 : EUR ORG 45 * - 200 : KOR OPEN 46 * - 201 : KOR SKT 47 * - 202 : KOR KTT 48 * - 203 : KOR LGT 49 * - 300 : CHN OPEN 50 * - 400 : USA OPEN 51 * - 401 : USA ATT 52 * - 402 : USA TMO 53 * - 403 : USA VZW 54 * - 404 : USA SPR 55 * - 405 : USA USC 56 * You can refer how to using it below this file. 57 * And, you can add more region code, too. 58 */ 59 60 #ifndef _dhd_sec_feature_h_ 61 #define _dhd_sec_feature_h_ 62 63 #include <linuxver.h> 64 65 /* For COB type feature */ 66 #ifdef CONFIG_WIFI_BROADCOM_COB 67 #undef USE_CID_CHECK 68 #define READ_MACADDR 69 #endif /* CONFIG_WIFI_BROADCOM_COB */ 70 71 #if defined(CONFIG_MACH_UNIVERSAL7420) || defined(CONFIG_ARCH_MSM8994) || \ 72 defined(CONFIG_ARCH_MSM8996) || defined(CONFIG_SOC_EXYNOS8890) 73 #define SUPPORT_MULTIPLE_MODULE_CIS 74 #endif /* CONFIG_MACH_UNIVERSAL7420 || CONFIG_ARCH_MSM8994 || 75 * CONFIG_ARCH_MSM8996 || CONFIG_SOC_EXYNOS8890 76 */ 77 78 #if defined(CONFIG_ARCH_MSM8996) || defined(CONFIG_SOC_EXYNOS8890) 79 #define SUPPORT_BCM4359_MIXED_MODULES 80 #endif /* CONFIG_ARCH_MSM8996 || CONFIG_SOC_EXYNOS8890 */ 81 82 #if defined(CONFIG_ARGOS) 83 #if defined(CONFIG_SPLIT_ARGOS_SET) 84 #define ARGOS_IRQ_WIFI_TABLE_LABEL "WIFI TX" 85 #define ARGOS_WIFI_TABLE_LABEL "WIFI RX" 86 #else /* CONFIG_SPLIT_ARGOS_SET */ 87 #define ARGOS_IRQ_WIFI_TABLE_LABEL "WIFI" 88 #define ARGOS_WIFI_TABLE_LABEL "WIFI" 89 #endif /* CONFIG_SPLIT_ARGOS_SET */ 90 #define ARGOS_P2P_TABLE_LABEL "P2P" 91 #endif /* CONFIG_ARGOS */ 92 93 /* PROJECTS START */ 94 95 #if defined(CONFIG_MACH_UNIVERSAL7420) || defined(CONFIG_SOC_EXYNOS8890) || \ 96 defined(CONFIG_SOC_EXYNOS8895) 97 #undef CUSTOM_SET_CPUCORE 98 #define PRIMARY_CPUCORE 0 99 #define DPC_CPUCORE 4 100 #define RXF_CPUCORE 5 101 #define TASKLET_CPUCORE 5 102 #define ARGOS_CPU_SCHEDULER 103 #define ARGOS_RPS_CPU_CTL 104 105 #ifdef CONFIG_SOC_EXYNOS8895 106 #define ARGOS_DPC_TASKLET_CTL 107 #endif /* CONFIG_SOC_EXYNOS8895 */ 108 109 #ifdef CONFIG_MACH_UNIVERSAL7420 110 #define EXYNOS_PCIE_DEBUG 111 #endif /* CONFIG_MACH_UNIVERSAL7420 */ 112 #endif /* CONFIG_MACH_UNIVERSAL7420 || CONFIG_SOC_EXYNOS8890 || CONFIG_SOC_EXYNOS8895 */ 113 114 #if defined(CONFIG_SOC_EXYNOS9810) || defined(CONFIG_SOC_EXYNOS9820) || \ 115 defined(CONFIG_SOC_EXYNOS9830) || defined(CONFIG_SOC_EXYNOS2100) || \ 116 defined(CONFIG_SOC_EXYNOS1000) 117 #define PCIE_IRQ_CPU_CORE 5 118 #endif /* CONFIG_SOC_EXYNOS9810 || CONFIG_SOC_EXYNOS9820 || defined(CONFIG_SOC_EXYNOS9830 */ 119 120 #if defined(DHD_LB) 121 #if defined(CONFIG_ARCH_SM8150) || defined(CONFIG_ARCH_KONA) || defined(CONFIG_ARCH_LAHAINA) 122 #define DHD_LB_PRIMARY_CPUS (0x70) 123 #define DHD_LB_SECONDARY_CPUS (0x0E) 124 #elif defined(CONFIG_SOC_EXYNOS9810) || defined(CONFIG_SOC_EXYNOS9820) || \ 125 defined(CONFIG_SOC_EXYNOS9830) || defined(CONFIG_SOC_EXYNOS2100) || \ 126 defined(CONFIG_SOC_EXYNOS1000) 127 #define DHD_LB_PRIMARY_CPUS (0x70) 128 #define DHD_LB_SECONDARY_CPUS (0x0E) 129 #elif defined(CONFIG_SOC_EXYNOS8890) 130 /* 131 * Removed core 6~7 from NAPI CPU mask. 132 * Exynos 8890 disabled core 6~7 by default. 133 */ 134 #define DHD_LB_PRIMARY_CPUS (0x30) 135 #define DHD_LB_SECONDARY_CPUS (0x0E) 136 #elif defined(CONFIG_SOC_EXYNOS8895) 137 /* using whole big core with NAPI mask */ 138 #define DHD_LB_PRIMARY_CPUS (0xF0) 139 #define DHD_LB_SECONDARY_CPUS (0x0E) 140 #elif defined(CONFIG_ARCH_MSM8998) 141 #define DHD_LB_PRIMARY_CPUS (0x20) 142 #define DHD_LB_SECONDARY_CPUS (0x0E) 143 #elif defined(CONFIG_ARCH_MSM8996) 144 #define DHD_LB_PRIMARY_CPUS (0x0C) 145 #define DHD_LB_SECONDARY_CPUS (0x03) 146 #else /* Default LB masks */ 147 /* using whole big core with NAPI mask */ 148 #define DHD_LB_PRIMARY_CPUS (0xF0) 149 #define DHD_LB_SECONDARY_CPUS (0x0E) 150 #endif /* CONFIG_SOC_EXYNOS8890 */ 151 #else /* !DHD_LB */ 152 #define ARGOS_DPC_TASKLET_CTL 153 #endif /* !DHD_LB */ 154 155 #if defined(CONFIG_ARCH_MSM) || defined(CONFIG_SOC_EXYNOS8895) || \ 156 defined(CONFIG_SOC_EXYNOS9810) || defined(CONFIG_SOC_EXYNOS9820) || \ 157 defined(CONFIG_SOC_EXYNOS9830) || defined(CONFIG_SOC_EXYNOS2100) || \ 158 defined(CONFIG_SOC_EXYNOS1000) 159 #if defined(CONFIG_BCMDHD_PCIE) 160 #define BCMPCIE_DISABLE_ASYNC_SUSPEND 161 #endif /* CONFIG_BCMDHD_PCIE */ 162 #endif /* CONFIG_ARCH_MSM */ 163 /* PROJECTS END */ 164 165 /* REGION CODE START */ 166 167 #ifndef CONFIG_WLAN_REGION_CODE 168 #define CONFIG_WLAN_REGION_CODE 100 169 #endif /* CONFIG_WLAN_REGION_CODE */ 170 171 #if (CONFIG_WLAN_REGION_CODE >= 100) && (CONFIG_WLAN_REGION_CODE < 200) /* EUR */ 172 #if (CONFIG_WLAN_REGION_CODE == 101) /* EUR ORG */ 173 /* GAN LITE NAT KEEPALIVE FILTER */ 174 #define GAN_LITE_NAT_KEEPALIVE_FILTER 175 #endif /* CONFIG_WLAN_REGION_CODE == 101 */ 176 #if (CONFIG_WLAN_REGION_CODE == 150) /* EUR FD(DualSIM) */ 177 #define SUPPORT_MULTIPLE_BOARD_REV_FROM_HW 178 #endif /* CONFIG_WLAN_REGION_CODE == 150 */ 179 #endif /* CONFIG_WLAN_REGION_CODE >= 100 && CONFIG_WLAN_REGION_CODE < 200 */ 180 181 #if (CONFIG_WLAN_REGION_CODE >= 200) && (CONFIG_WLAN_REGION_CODE < 300) /* KOR */ 182 #undef USE_INITIAL_2G_SCAN 183 #ifndef ROAM_ENABLE 184 #define ROAM_ENABLE 185 #endif /* ROAM_ENABLE */ 186 #ifndef ROAM_API 187 #define ROAM_API 188 #endif /* ROAM_API */ 189 #ifndef ROAM_CHANNEL_CACHE 190 #define ROAM_CHANNEL_CACHE 191 #endif /* ROAM_CHANNEL_CACHE */ 192 #ifndef OKC_SUPPORT 193 #define OKC_SUPPORT 194 #endif /* OKC_SUPPORT */ 195 196 #ifndef ROAM_AP_ENV_DETECTION 197 #define ROAM_AP_ENV_DETECTION 198 #endif /* ROAM_AP_ENV_DETECTION */ 199 200 #undef WRITE_MACADDR 201 #ifndef READ_MACADDR 202 #define READ_MACADDR 203 #endif /* READ_MACADDR */ 204 #endif /* CONFIG_WLAN_REGION_CODE >= 200 && CONFIG_WLAN_REGION_CODE < 300 */ 205 206 #if (CONFIG_WLAN_REGION_CODE >= 300) && (CONFIG_WLAN_REGION_CODE < 400) /* CHN */ 207 #define BCMWAPI_WPI 208 #define BCMWAPI_WAI 209 #endif /* CONFIG_WLAN_REGION_CODE >= 300 && CONFIG_WLAN_REGION_CODE < 400 */ 210 211 #if (CONFIG_WLAN_REGION_CODE == 500) /* JP */ 212 #if defined(BCM4375_CHIP) 213 #define DISABLE_HE_ENAB 214 #endif /* BCM4375_CHIP */ 215 #endif /* CONFIG_WLAN_REGION_CODE == 500 */ 216 217 /* REGION CODE END */ 218 219 #if !defined(READ_MACADDR) && !defined(WRITE_MACADDR) 220 #define GET_MAC_FROM_OTP 221 #define SHOW_NVRAM_TYPE 222 #endif /* !READ_MACADDR && !WRITE_MACADDR */ 223 224 #define WRITE_WLANINFO 225 226 #endif /* _dhd_sec_feature_h_ */ 227