From 1d2a517eb72d689a1e577e22980a693494ea44bf Mon Sep 17 00:00:00 2001 From: priyankar Date: Fri, 11 Dec 2020 15:51:32 +0530 Subject: [PATCH] Add support for Moselle SoC (WCN6750) This patch contain changes for supporting new BT chip moselle. Change-Id: Ib5aaa4b7dde7accf186593df93bf65e475177f1f Signed-off-by: priyankar --- drivers/bluetooth/btpower.c | 25 ++++++++++++++++++------- include/linux/btpower.h | 2 +- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/bluetooth/btpower.c b/drivers/bluetooth/btpower.c index 7be1848c6c33..f2d5ff12ffe1 100644 --- a/drivers/bluetooth/btpower.c +++ b/drivers/bluetooth/btpower.c @@ -65,7 +65,9 @@ enum power_src_pos { BT_VDD_IO_LDO_CURRENT, BT_VDD_LDO_CURRENT, BT_VDD_RFA_0p8_CURRENT, - BT_VDD_RFACMN_CURRENT + BT_VDD_RFACMN_CURRENT, + BT_VDD_IPA_2p2, + BT_VDD_IPA_2p2_CURRENT }; // Regulator structure for QCA6174/QCA9377/QCA9379 BT SoC series @@ -78,8 +80,8 @@ static struct bt_power_vreg_data bt_vregs_info_qca61x4_937x[] = { {BT_VDD_CORE_LDO, BT_VDD_CORE_LDO_CURRENT}}, }; -// Regulator structure for QCA6390 and QCA6490 BT SoC series -static struct bt_power_vreg_data bt_vregs_info_qca6x9x[] = { +// Regulator structure for QCA6390,QCA6490 and WCN6750 BT SoC series +static struct bt_power_vreg_data bt_vregs_info_qca6xx0[] = { {NULL, "qcom,bt-vdd-io", 1800000, 1800000, 0, false, true, {BT_VDD_IO_LDO, BT_VDD_IO_LDO_CURRENT}}, {NULL, "qcom,bt-vdd-aon", 950000, 950000, 0, false, true, @@ -97,6 +99,8 @@ static struct bt_power_vreg_data bt_vregs_info_qca6x9x[] = { {BT_VDD_RFA2_LDO, BT_VDD_RFA2_LDO_CURRENT}}, {NULL, "qcom,bt-vdd-asd", 2800000, 2800000, 0, false, true, {BT_VDD_ASD_LDO, BT_VDD_ASD_LDO_CURRENT}}, + {NULL, "qcom,bt-vdd-ipa-2p2", 2200000, 2210000, 0, false, true, + {BT_VDD_IPA_2p2, BT_VDD_IPA_2p2_CURRENT}}, }; // Regulator structure for WCN399x BT SoC series @@ -123,14 +127,20 @@ static struct bt_power bt_vreg_info_qca6174 = { static struct bt_power bt_vreg_info_qca6390 = { .compatible = "qcom,qca6390", - .vregs = bt_vregs_info_qca6x9x, - .num_vregs = ARRAY_SIZE(bt_vregs_info_qca6x9x), + .vregs = bt_vregs_info_qca6xx0, + .num_vregs = ARRAY_SIZE(bt_vregs_info_qca6xx0), }; static struct bt_power bt_vreg_info_qca6490 = { .compatible = "qcom,qca6490", - .vregs = bt_vregs_info_qca6x9x, - .num_vregs = ARRAY_SIZE(bt_vregs_info_qca6x9x), + .vregs = bt_vregs_info_qca6xx0, + .num_vregs = ARRAY_SIZE(bt_vregs_info_qca6xx0), +}; + +static struct bt_power bt_vreg_info_wcn6750 = { + .compatible = "qcom,wcn6750", + .vregs = bt_vregs_info_qca6xx0, + .num_vregs = ARRAY_SIZE(bt_vregs_info_qca6xx0), }; static const struct of_device_id bt_power_match_table[] = { @@ -138,6 +148,7 @@ static const struct of_device_id bt_power_match_table[] = { { .compatible = "qcom,wcn3990", .data = &bt_vreg_info_wcn399x}, { .compatible = "qcom,qca6390", .data = &bt_vreg_info_qca6390}, { .compatible = "qcom,qca6490", .data = &bt_vreg_info_qca6490}, + { .compatible = "qcom,wcn6750", .data = &bt_vreg_info_wcn6750}, {}, }; diff --git a/include/linux/btpower.h b/include/linux/btpower.h index c17d56ca0732..401c6e806811 100644 --- a/include/linux/btpower.h +++ b/include/linux/btpower.h @@ -81,6 +81,6 @@ int btpower_get_chipset_version(void); #define TCS_CMD_IO_ADDR_OFFSET 0x4 /* total number of power src */ -#define BT_POWER_SRC_SIZE 28 +#define BT_POWER_SRC_SIZE 30 #endif /* __LINUX_BLUETOOTH_POWER_H */