From 2651cf95cfc826eddcbce8d455fbe6503e69214b Mon Sep 17 00:00:00 2001 From: Zijun Hu Date: Tue, 5 Jan 2021 17:28:55 +0800 Subject: [PATCH] Bluetooth: Add support for QCA61X4/QCA937x series BT SoC Add support for QCA61X4/QCA937x series BT SoC's. CRs-Fixed: 2848490 Change-Id: Iddeaaf8933cd0809a6ec36f3e4d3e3dbe00a63ff Signed-off-by: Zijun Hu --- drivers/bluetooth/btpower.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btpower.c b/drivers/bluetooth/btpower.c index 8735b34a2210..7be1848c6c33 100644 --- a/drivers/bluetooth/btpower.c +++ b/drivers/bluetooth/btpower.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. */ /* @@ -68,6 +68,16 @@ enum power_src_pos { BT_VDD_RFACMN_CURRENT }; +// Regulator structure for QCA6174/QCA9377/QCA9379 BT SoC series +static struct bt_power_vreg_data bt_vregs_info_qca61x4_937x[] = { + {NULL, "qcom,bt-vdd-aon", 928000, 928000, 0, false, false, + {BT_VDD_AON_LDO, BT_VDD_AON_LDO_CURRENT}}, + {NULL, "qcom,bt-vdd-io", 1710000, 3460000, 0, false, false, + {BT_VDD_IO_LDO, BT_VDD_IO_LDO_CURRENT}}, + {NULL, "qcom,bt-vdd-core", 3135000, 3465000, 0, false, false, + {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[] = { {NULL, "qcom,bt-vdd-io", 1800000, 1800000, 0, false, true, @@ -105,6 +115,12 @@ static struct bt_power bt_vreg_info_wcn399x = { .num_vregs = 4, }; +static struct bt_power bt_vreg_info_qca6174 = { + .compatible = "qcom,qca6174", + .vregs = bt_vregs_info_qca61x4_937x, + .num_vregs = ARRAY_SIZE(bt_vregs_info_qca61x4_937x), +}; + static struct bt_power bt_vreg_info_qca6390 = { .compatible = "qcom,qca6390", .vregs = bt_vregs_info_qca6x9x, @@ -118,7 +134,7 @@ static struct bt_power bt_vreg_info_qca6490 = { }; static const struct of_device_id bt_power_match_table[] = { - { .compatible = "qcom,qca6174" }, + { .compatible = "qcom,qca6174", .data = &bt_vreg_info_qca6174}, { .compatible = "qcom,wcn3990", .data = &bt_vreg_info_wcn399x}, { .compatible = "qcom,qca6390", .data = &bt_vreg_info_qca6390}, { .compatible = "qcom,qca6490", .data = &bt_vreg_info_qca6490},