From 93e3c990fcd90e578fd23b572a6c89020c7a453e Mon Sep 17 00:00:00 2001 From: Janaki Ramaiah Thota Date: Mon, 9 Dec 2024 16:04:55 +0530 Subject: power: sequencing: qcom-wcn: add support for the WCN6750 PMU Enable support for controlling the power-up sequence of the PMU inside the WCN6750 model. Signed-off-by: Janaki Ramaiah Thota Link: https://lore.kernel.org/r/20241209103455.9675-5-quic_janathot@quicinc.com Signed-off-by: Bartosz Golaszewski --- drivers/power/sequencing/pwrseq-qcom-wcn.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c index 682a9beac69e..cc03b5aaa8f2 100644 --- a/drivers/power/sequencing/pwrseq-qcom-wcn.c +++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c @@ -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", @@ -431,6 +449,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); -- cgit From 29da3e8748f97dcf01498b00d42a3e7574ece80b Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 2 Jan 2025 13:15:30 +0100 Subject: power: sequencing: qcom-wcn: explain why we need the WLAN_EN GPIO hack With the recent rework of the PCI power control code, the workaround for the wlan-enable GPIO - where we don't set a default (low) state in the power sequencing driver, but instead request the pin as-is - should no longer be needed but some platforms still fail to probe the WLAN controller. This is caused by the Qcom PCIe controller and needs a workaround in the controller driver so add a FIXME to eventually remove the hack from this driver once this is done. Link: https://lore.kernel.org/r/20250102121530.26993-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski --- drivers/power/sequencing/pwrseq-qcom-wcn.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c index cc03b5aaa8f2..e8f5030f2639 100644 --- a/drivers/power/sequencing/pwrseq-qcom-wcn.c +++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c @@ -396,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)) -- cgit