Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 444474dd authored by John W. Linville's avatar John W. Linville
Browse files
parents a72e25f7 246dd992
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@
#define IWL7260_TX_POWER_VERSION	0xffff /* meaningless */
#define IWL3160_NVM_VERSION		0x709
#define IWL3160_TX_POWER_VERSION	0xffff /* meaningless */
#define IWL7265_NVM_VERSION		0x0a1d
#define IWL7265_TX_POWER_VERSION	0xffff /* meaningless */

#define IWL7260_FW_PRE "iwlwifi-7260-"
#define IWL7260_MODULE_FIRMWARE(api) IWL7260_FW_PRE __stringify(api) ".ucode"
@@ -90,6 +92,9 @@
#define IWL3160_FW_PRE "iwlwifi-3160-"
#define IWL3160_MODULE_FIRMWARE(api) IWL3160_FW_PRE __stringify(api) ".ucode"

#define IWL7265_FW_PRE "iwlwifi-7265-"
#define IWL7265_MODULE_FIRMWARE(api) IWL7265_FW_PRE __stringify(api) ".ucode"

static const struct iwl_base_params iwl7000_base_params = {
	.eeprom_size = OTP_LOW_IMAGE_SIZE,
	.num_of_queues = IWLAGN_NUM_QUEUES,
@@ -182,5 +187,14 @@ const struct iwl_cfg iwl3160_n_cfg = {
	.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
};

const struct iwl_cfg iwl7265_2ac_cfg = {
	.name = "Intel(R) Dual Band Wireless AC 7265",
	.fw_name_pre = IWL7265_FW_PRE,
	IWL_DEVICE_7000,
	.ht_params = &iwl7000_ht_params,
	.nvm_ver = IWL7265_NVM_VERSION,
	.nvm_calib_ver = IWL7265_TX_POWER_VERSION,
};

MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK));
+1 −0
Original line number Diff line number Diff line
@@ -292,6 +292,7 @@ extern const struct iwl_cfg iwl7260_n_cfg;
extern const struct iwl_cfg iwl3160_2ac_cfg;
extern const struct iwl_cfg iwl3160_2n_cfg;
extern const struct iwl_cfg iwl3160_n_cfg;
extern const struct iwl_cfg iwl7265_2ac_cfg;
#endif /* CONFIG_IWLMVM */

#endif /* __IWL_CONFIG_H__ */
+32 −0
Original line number Diff line number Diff line
@@ -394,6 +394,38 @@
#define CSR_DRAM_INT_TBL_ENABLE		(1 << 31)
#define CSR_DRAM_INIT_TBL_WRAP_CHECK	(1 << 27)

/* SECURE boot registers */
#define CSR_SECURE_BOOT_CONFIG_ADDR	(0x100)
enum secure_boot_config_reg {
	CSR_SECURE_BOOT_CONFIG_INSPECTOR_BURNED_IN_OTP	= 0x00000001,
	CSR_SECURE_BOOT_CONFIG_INSPECTOR_NOT_REQ	= 0x00000002,
};

#define CSR_SECURE_BOOT_CPU1_STATUS_ADDR	(0x100)
#define CSR_SECURE_BOOT_CPU2_STATUS_ADDR	(0x100)
enum secure_boot_status_reg {
	CSR_SECURE_BOOT_CPU_STATUS_VERF_STATUS		= 0x00000003,
	CSR_SECURE_BOOT_CPU_STATUS_VERF_COMPLETED	= 0x00000002,
	CSR_SECURE_BOOT_CPU_STATUS_VERF_SUCCESS		= 0x00000004,
	CSR_SECURE_BOOT_CPU_STATUS_VERF_FAIL		= 0x00000008,
	CSR_SECURE_BOOT_CPU_STATUS_SIGN_VERF_FAIL	= 0x00000010,
};

#define CSR_UCODE_LOAD_STATUS_ADDR	(0x100)
enum secure_load_status_reg {
	CSR_CPU_STATUS_LOADING_STARTED			= 0x00000001,
	CSR_CPU_STATUS_LOADING_COMPLETED		= 0x00000002,
	CSR_CPU_STATUS_NUM_OF_LAST_COMPLETED		= 0x000000F8,
	CSR_CPU_STATUS_NUM_OF_LAST_LOADED_BLOCK		= 0x0000FF00,
};

#define CSR_SECURE_INSPECTOR_CODE_ADDR	(0x100)
#define CSR_SECURE_INSPECTOR_DATA_ADDR	(0x100)

#define CSR_SECURE_TIME_OUT	(100)

#define FH_TCSR_0_REG0 (0x1D00)

/*
 * HBUS (Host-side Bus)
 *
+37 −0
Original line number Diff line number Diff line
@@ -483,6 +483,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
	const u8 *tlv_data;
	char buildstr[25];
	u32 build;
	int num_of_cpus;

	if (len < sizeof(*ucode)) {
		IWL_ERR(drv, "uCode has invalid length: %zd\n", len);
@@ -692,6 +693,42 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
				goto invalid_tlv_len;
			drv->fw.phy_config = le32_to_cpup((__le32 *)tlv_data);
			break;
		 case IWL_UCODE_TLV_SECURE_SEC_RT:
			iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR,
					    tlv_len);
			drv->fw.mvm_fw = true;
			drv->fw.img[IWL_UCODE_REGULAR].is_secure = true;
			break;
		case IWL_UCODE_TLV_SECURE_SEC_INIT:
			iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT,
					    tlv_len);
			drv->fw.mvm_fw = true;
			drv->fw.img[IWL_UCODE_INIT].is_secure = true;
			break;
		case IWL_UCODE_TLV_SECURE_SEC_WOWLAN:
			iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN,
					    tlv_len);
			drv->fw.mvm_fw = true;
			drv->fw.img[IWL_UCODE_WOWLAN].is_secure = true;
			break;
		case IWL_UCODE_TLV_NUM_OF_CPU:
			if (tlv_len != sizeof(u32))
				goto invalid_tlv_len;
			num_of_cpus =
				le32_to_cpup((__le32 *)tlv_data);

			if (num_of_cpus == 2) {
				drv->fw.img[IWL_UCODE_REGULAR].is_dual_cpus =
					true;
				drv->fw.img[IWL_UCODE_INIT].is_dual_cpus =
					true;
				drv->fw.img[IWL_UCODE_WOWLAN].is_dual_cpus =
					true;
			} else if ((num_of_cpus > 2) || (num_of_cpus < 1)) {
				IWL_ERR(drv, "Driver support upto 2 CPUs\n");
				return -EINVAL;
			}
			break;
		default:
			IWL_DEBUG_INFO(drv, "unknown TLV: %d\n", tlv_type);
			break;
+4 −0
Original line number Diff line number Diff line
@@ -121,6 +121,10 @@ enum iwl_ucode_tlv_type {
	IWL_UCODE_TLV_SEC_WOWLAN	= 21,
	IWL_UCODE_TLV_DEF_CALIB		= 22,
	IWL_UCODE_TLV_PHY_SKU		= 23,
	IWL_UCODE_TLV_SECURE_SEC_RT	= 24,
	IWL_UCODE_TLV_SECURE_SEC_INIT	= 25,
	IWL_UCODE_TLV_SECURE_SEC_WOWLAN	= 26,
	IWL_UCODE_TLV_NUM_OF_CPU	= 27,
};

struct iwl_ucode_tlv {
Loading