Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *  Bluetooth support for Intel devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *  Copyright (C) 2015  Intel Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) /* List of tlv type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 	INTEL_TLV_CNVI_TOP = 0x10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 	INTEL_TLV_CNVR_TOP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 	INTEL_TLV_CNVI_BT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 	INTEL_TLV_CNVR_BT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 	INTEL_TLV_CNVI_OTP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	INTEL_TLV_CNVR_OTP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	INTEL_TLV_DEV_REV_ID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	INTEL_TLV_USB_VENDOR_ID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 	INTEL_TLV_USB_PRODUCT_ID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	INTEL_TLV_PCIE_VENDOR_ID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	INTEL_TLV_PCIE_DEVICE_ID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	INTEL_TLV_PCIE_SUBSYSTEM_ID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	INTEL_TLV_IMAGE_TYPE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	INTEL_TLV_TIME_STAMP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	INTEL_TLV_BUILD_TYPE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	INTEL_TLV_BUILD_NUM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	INTEL_TLV_FW_BUILD_PRODUCT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	INTEL_TLV_FW_BUILD_HW,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	INTEL_TLV_FW_STEP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	INTEL_TLV_BT_SPEC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	INTEL_TLV_MFG_NAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	INTEL_TLV_HCI_REV,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	INTEL_TLV_LMP_SUBVER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	INTEL_TLV_OTP_PATCH_VER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	INTEL_TLV_SECURE_BOOT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	INTEL_TLV_KEY_FROM_HDR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	INTEL_TLV_OTP_LOCK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	INTEL_TLV_API_LOCK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	INTEL_TLV_DEBUG_LOCK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	INTEL_TLV_MIN_FW,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	INTEL_TLV_LIMITED_CCE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	INTEL_TLV_SBE_TYPE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	INTEL_TLV_OTP_BDADDR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	INTEL_TLV_UNLOCKED_STATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) struct intel_tlv {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	u8 len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	u8 val[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) struct intel_version_tlv {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	u32	cnvi_top;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	u32	cnvr_top;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	u32	cnvi_bt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	u32	cnvr_bt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	u16	dev_rev_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	u8	img_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	u16	timestamp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	u8	build_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	u32	build_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	u8	secure_boot;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	u8	otp_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	u8	api_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	u8	debug_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	u8	min_fw_build_nn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	u8	min_fw_build_cw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	u8	min_fw_build_yy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	u8	limited_cce;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	u8	sbe_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	bdaddr_t otp_bd_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) struct intel_version {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	u8 status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	u8 hw_platform;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	u8 hw_variant;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	u8 hw_revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	u8 fw_variant;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	u8 fw_revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	u8 fw_build_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	u8 fw_build_ww;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	u8 fw_build_yy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	u8 fw_patch_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) struct intel_boot_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	__u8     status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	__u8     otp_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	__u8     otp_content;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	__u8     otp_patch;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	__le16   dev_revid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	__u8     secure_boot;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	__u8     key_from_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	__u8     key_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	__u8     otp_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	__u8     api_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	__u8     debug_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	bdaddr_t otp_bdaddr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	__u8     min_fw_build_nn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	__u8     min_fw_build_cw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	__u8     min_fw_build_yy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	__u8     limited_cce;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	__u8     unlocked_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct intel_bootup {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	__u8     zero;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	__u8     num_cmds;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	__u8     source;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	__u8     reset_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	__u8     reset_reason;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	__u8     ddc_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) struct intel_secure_send_result {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	__u8     result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	__le16   opcode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	__u8     status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) struct intel_reset {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	__u8     reset_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	__u8     patch_enable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	__u8     ddc_reload;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	__u8     boot_option;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	__le32   boot_param;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) struct intel_debug_features {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	__u8    page1[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) #define INTEL_HW_PLATFORM(cnvx_bt)	((u8)(((cnvx_bt) & 0x0000ff00) >> 8))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) #define INTEL_HW_VARIANT(cnvx_bt)	((u8)(((cnvx_bt) & 0x003f0000) >> 16))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) #define INTEL_CNVX_TOP_TYPE(cnvx_top)	((cnvx_top) & 0x00000fff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) #define INTEL_CNVX_TOP_STEP(cnvx_top)	(((cnvx_top) & 0x0f000000) >> 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) #define INTEL_CNVX_TOP_PACK_SWAB(t, s)	__swab16(((__u16)(((t) << 4) | (s))))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) #if IS_ENABLED(CONFIG_BT_INTEL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) int btintel_check_bdaddr(struct hci_dev *hdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) int btintel_enter_mfg(struct hci_dev *hdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) int btintel_set_diag(struct hci_dev *hdev, bool enable);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) void btintel_hw_error(struct hci_dev *hdev, u8 code);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) void btintel_version_info(struct hci_dev *hdev, struct intel_version *ver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) void btintel_version_info_tlv(struct hci_dev *hdev, struct intel_version_tlv *version);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 			const void *param);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) int btintel_set_event_mask(struct hci_dev *hdev, bool debug);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 				   u16 opcode_write);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) int btintel_read_boot_params(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 			     struct intel_boot_params *params);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) int btintel_download_firmware(struct hci_dev *dev, const struct firmware *fw,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 			      u32 *boot_param);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) int btintel_download_firmware_newgen(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 				     const struct firmware *fw,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 				     u32 *boot_param, u8 hw_variant,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 				     u8 sbe_type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) void btintel_reset_to_bootloader(struct hci_dev *hdev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) int btintel_read_debug_features(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 				struct intel_debug_features *features);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) int btintel_set_debug_features(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 			       const struct intel_debug_features *features);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) static inline int btintel_check_bdaddr(struct hci_dev *hdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) static inline int btintel_enter_mfg(struct hci_dev *hdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) static inline int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) static inline int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) static inline int btintel_set_diag(struct hci_dev *hdev, bool enable)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) static inline int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) static inline void btintel_version_info(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 					struct intel_version *ver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) static inline void btintel_version_info_tlv(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 					    struct intel_version_tlv *version)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) static inline int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 				      u32 plen, const void *param)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) static inline int btintel_load_ddc_config(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 					  const char *ddc_name)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) static inline int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) static inline int btintel_read_version(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 				       struct intel_version *ver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) static inline int btintel_read_version_tlv(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 					   struct intel_version_tlv *ver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 						 u16 opcode_read,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 						 u16 opcode_write)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	return ERR_PTR(-EINVAL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) static inline int btintel_send_intel_reset(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 					   u32 reset_param)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) static inline int btintel_read_boot_params(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 					   struct intel_boot_params *params)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) static inline int btintel_download_firmware(struct hci_dev *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 					    const struct firmware *fw,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 					    u32 *boot_param)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) static inline int btintel_download_firmware_newgen(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 						   const struct firmware *fw,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 						   u32 *boot_param,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 						   u8 hw_variant, u8 sbe_type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) static inline int btintel_read_debug_features(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 					      struct intel_debug_features *features)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) static inline int btintel_set_debug_features(struct hci_dev *hdev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 					     const struct intel_debug_features *features)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	return -EOPNOTSUPP;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) #endif