diff options
Diffstat (limited to 'drivers/power/sequencing/pwrseq-qcom-wcn.c')
| -rw-r--r-- | drivers/power/sequencing/pwrseq-qcom-wcn.c | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c index 682a9beac69e..663d9a537065 100644 --- a/drivers/power/sequencing/pwrseq-qcom-wcn.c +++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c @@ -155,7 +155,7 @@ static const struct pwrseq_unit_data pwrseq_qcom_wcn_bt_unit_data = { }; static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_bt_unit_data = { - .name = "wlan-enable", + .name = "bluetooth-enable", .deps = pwrseq_qcom_wcn6855_unit_deps, .enable = pwrseq_qcom_wcn_bt_enable, .disable = pwrseq_qcom_wcn_bt_disable, @@ -272,6 +272,24 @@ static const struct pwrseq_qcom_wcn_pdata pwrseq_qca6390_of_data = { .targets = pwrseq_qcom_wcn_targets, }; +static const char *const pwrseq_wcn6750_vregs[] = { + "vddaon", + "vddasd", + "vddpmu", + "vddrfa0p8", + "vddrfa1p2", + "vddrfa1p7", + "vddrfa2p2", +}; + +static const struct pwrseq_qcom_wcn_pdata pwrseq_wcn6750_of_data = { + .vregs = pwrseq_wcn6750_vregs, + .num_vregs = ARRAY_SIZE(pwrseq_wcn6750_vregs), + .pwup_delay_ms = 50, + .gpio_enable_delay_ms = 5, + .targets = pwrseq_qcom_wcn_targets, +}; + static const char *const pwrseq_wcn6855_vregs[] = { "vddio", "vddaon", @@ -323,12 +341,12 @@ static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq, * device. */ if (!of_property_present(dev_node, "vddaon-supply")) - return 0; + return PWRSEQ_NO_MATCH; struct device_node *reg_node __free(device_node) = of_parse_phandle(dev_node, "vddaon-supply", 0); if (!reg_node) - return 0; + return PWRSEQ_NO_MATCH; /* * `reg_node` is the PMU AON regulator, its parent is the `regulators` @@ -337,9 +355,9 @@ static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq, */ if (!reg_node->parent || !reg_node->parent->parent || reg_node->parent->parent != ctx->of_node) - return 0; + return PWRSEQ_NO_MATCH; - return 1; + return PWRSEQ_MATCH_OK; } static int pwrseq_qcom_wcn_probe(struct platform_device *pdev) @@ -378,6 +396,13 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio), "Failed to get the Bluetooth enable GPIO\n"); + /* + * FIXME: This should actually be GPIOD_OUT_LOW, but doing so would + * cause the WLAN power to be toggled, resulting in PCIe link down. + * Since the PCIe controller driver is not handling link down currently, + * the device becomes unusable. So we need to keep this workaround until + * the link down handling is implemented in the controller driver. + */ ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable", GPIOD_ASIS); if (IS_ERR(ctx->wlan_gpio)) @@ -431,6 +456,10 @@ static const struct of_device_id pwrseq_qcom_wcn_of_match[] = { .compatible = "qcom,wcn7850-pmu", .data = &pwrseq_wcn7850_of_data, }, + { + .compatible = "qcom,wcn6750-pmu", + .data = &pwrseq_wcn6750_of_data, + }, { } }; MODULE_DEVICE_TABLE(of, pwrseq_qcom_wcn_of_match); |
