BT: Add support for converged node for kalama

-Adds new device node entry to support dual attach.
-Chipset attached is detected using gpio value and corresponding
device tree  node is selected.

Change-Id: Iad12577a23ae0dca691b24de4efd385695259f41
This commit is contained in:
satish kumar sugasi
2022-04-19 17:50:52 -07:00
parent 21dce9f3af
commit b54bc3270d
6 changed files with 139 additions and 10 deletions

View File

@@ -11,7 +11,6 @@
#include <linux/types.h>
#include <linux/mailbox_client.h>
#include <linux/mailbox/qmp.h>
/*
* voltage regulator information required for configuring the
* bluetooth chipset
@@ -59,6 +58,7 @@ struct btpower_platform_data {
int wl_gpio_sys_rst; /* Wlan reset gpio */
int bt_gpio_sw_ctrl; /* Bluetooth sw_ctrl gpio */
int bt_gpio_debug; /* Bluetooth debug gpio */
unsigned int wlan_sw_ctrl_gpio; /* Wlan switch control gpio*/
#ifdef CONFIG_MSM_BT_OOBS
int bt_gpio_dev_wake; /* Bluetooth bt_wake */
int bt_gpio_host_wake; /* Bluetooth bt_host_wake */
@@ -74,6 +74,10 @@ struct btpower_platform_data {
struct mbox_client mbox_client_data;
struct mbox_chan *mbox_chan;
const char *vreg_ipa;
bool is_converged_dt;
int pdc_init_table_len;
const char **pdc_init_table;
int bt_device_type;
#ifdef CONFIG_MSM_BT_OOBS
struct file *reffilp_obs;
struct task_struct *reftask_obs;
@@ -83,10 +87,12 @@ struct btpower_platform_data {
int btpower_register_slimdev(struct device *dev);
int btpower_get_chipset_version(void);
int btpower_aop_mbox_init(struct btpower_platform_data *pdata);
int bt_aop_pdc_reconfig(struct btpower_platform_data *pdata);
#define BT_CMD_SLIM_TEST 0xbfac
#define BT_CMD_PWR_CTRL 0xbfad
#define BT_CMD_CHIPSET_VERS 0xbfae
#define WLAN_SW_CTRL_GPIO "qcom,wlan-sw-ctrl-gpio"
#define BT_CMD_SLIM_TEST 0xbfac
#define BT_CMD_PWR_CTRL 0xbfad
#define BT_CMD_CHIPSET_VERS 0xbfae
#define BT_CMD_GET_CHIPSET_ID 0xbfaf
#define BT_CMD_CHECK_SW_CTRL 0xbfb0
#define BT_CMD_GETVAL_POWER_SRCS 0xbfb1
@@ -95,7 +101,6 @@ int btpower_aop_mbox_init(struct btpower_platform_data *pdata);
#ifdef CONFIG_MSM_BT_OOBS
#define BT_CMD_OBS_SIGNAL_TASK 0xbfd0
#define BT_CMD_OBS_VOTE_CLOCK 0xbfd1
/**
* enum btpower_obs_param: OOBS low power param
* @BTPOWER_OBS_CLK_OFF: Transport bus is no longer acquired