From 5f298c2b62cfa948504fe8e581d763d7ae89687c Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 14 Nov 2026 09:41:39 -0600 Subject: [PATCH 1/5] soc: google: aoc: Preserve GSA probe deferral GSA may defer until its Trusty IPC channel is available. Preserve that error from find_gsa_device() so the driver core can retry AoC instead of turning a supplier dependency into a permanent invalid-argument failure. The combined lynx test stack reached 82 services on November 13. The error propagation also changes shared AoC probe behavior; reference-phone startup must be requalified before merge. Assisted-by: OpenAI Codex Signed-off-by: Chris Gray --- drivers/soc/google/aoc/aoc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/google/aoc/aoc.c b/drivers/soc/google/aoc/aoc.c index 366bdca832..a68e9482da 100644 --- a/drivers/soc/google/aoc/aoc.c +++ b/drivers/soc/google/aoc/aoc.c @@ -2751,8 +2751,7 @@ static int aoc_platform_probe(struct platform_device *pdev) rc = find_gsa_device(prvdata); if (rc) { - dev_err(dev, "Failed to initialize gsa device: %d\n", rc); - rc = -EINVAL; + dev_err_probe(dev, rc, "failed to initialize GSA device\n"); goto err_failed_prvdata_alloc; } From 924cf045d99c198bf764b6b53a50e119c0133030 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 14 Nov 2026 09:41:39 -0600 Subject: [PATCH 2/5] soc: google: aoc: Map chip ID without a second resource claim The exynos-chipid driver already owns the read-only chip-ID resource. AoC needs a mapping of the same range, so keep resource lookup and error handling but do not reserve the range a second time. The combined lynx test stack reached AoC online with this mapping. This is shared code and still requires Pixel 7 Pro startup validation; the rebased preparation has not run on either phone. Assisted-by: OpenAI Codex Signed-off-by: Chris Gray --- drivers/soc/google/aoc/aoc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/soc/google/aoc/aoc.c b/drivers/soc/google/aoc/aoc.c index a68e9482da..0824243ccd 100644 --- a/drivers/soc/google/aoc/aoc.c +++ b/drivers/soc/google/aoc/aoc.c @@ -2837,10 +2837,15 @@ static int aoc_platform_probe(struct platform_device *pdev) goto err_watchdog_iommu_irq; } } - prvdata->chipid_virt = - devm_platform_ioremap_resource_byname(pdev, "chipid"); - if (IS_ERR(prvdata->chipid_virt)) { - rc = PTR_ERR(prvdata->chipid_virt); + /* exynos-chipid owns this read-only range; do not claim it again. */ + rsrc = platform_get_resource_byname(pdev, IORESOURCE_MEM, "chipid"); + if (!rsrc) { + rc = -EINVAL; + goto err_watchdog_iommu_irq; + } + prvdata->chipid_virt = devm_ioremap(dev, rsrc->start, resource_size(rsrc)); + if (!prvdata->chipid_virt) { + rc = -ENOMEM; goto err_watchdog_iommu_irq; } aoc_chipid_virt = prvdata->chipid_virt; From b56e50a3833a03bb679440eb7a4b999ed0263280 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 14 Nov 2026 09:41:39 -0600 Subject: [PATCH 3/5] soc: google: aoc: Expose firmware readiness to WLAN consumers WLAN power on lynx must wait for the specified AoC firmware to be online, not just for the platform device to exist. Export a read-only state query and an optional phandle check which fails closed for an invalid or offline supplier. Boards without the dependency keep their existing consumer path. This is a point-in-time readiness check, not a lifetime guarantee across AoC crashes or removal. It supports the attended manual lab sequence; automatic startup, retry notification and restart handling need review. The combined local stack passed once; this rebase is not runtime-tested. Assisted-by: OpenAI Codex Signed-off-by: Chris Gray --- drivers/soc/google/aoc/aoc.c | 11 ++++++++ include/linux/soc/google/gs201-aoc.h | 38 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 include/linux/soc/google/gs201-aoc.h diff --git a/drivers/soc/google/aoc/aoc.c b/drivers/soc/google/aoc/aoc.c index 0824243ccd..9a9bc9ed16 100644 --- a/drivers/soc/google/aoc/aoc.c +++ b/drivers/soc/google/aoc/aoc.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -66,6 +67,16 @@ enum AOC_FW_STATE aoc_state; struct platform_device *aoc_platform_device; +bool gs201_aoc_firmware_online(const struct device_node *np) +{ + struct platform_device *pdev = READ_ONCE(aoc_platform_device); + + /* No MMIO or access to the protected firmware carve-out. */ + return pdev && pdev->dev.of_node == np && + READ_ONCE(aoc_state) == AOC_STATE_ONLINE; +} +EXPORT_SYMBOL_GPL(gs201_aoc_firmware_online); + /* TODO: Reduce the global variables (move into a driver structure) */ /* Resources found from the device tree */ struct resource *aoc_sram_resource; diff --git a/include/linux/soc/google/gs201-aoc.h b/include/linux/soc/google/gs201-aoc.h new file mode 100644 index 0000000000..894c441d20 --- /dev/null +++ b/include/linux/soc/google/gs201-aoc.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _LINUX_SOC_GOOGLE_GS201_AOC_H +#define _LINUX_SOC_GOOGLE_GS201_AOC_H + +#include +#include +#include +#include + +#if IS_REACHABLE(CONFIG_GS201_AOC) +bool gs201_aoc_firmware_online(const struct device_node *np); +#else +static inline bool gs201_aoc_firmware_online(const struct device_node *np) +{ + return false; +} +#endif + +/* Optional for other boards; a malformed dependency must not permit power. */ +static inline int gs201_aoc_require_online(struct device *dev) +{ + struct device_node *np; + + if (!of_find_property(dev->of_node, "google,aoc", NULL)) + return 0; + + np = of_parse_phandle(dev->of_node, "google,aoc", 0); + if (!np) + return -EINVAL; + if (!gs201_aoc_firmware_online(np)) { + of_node_put(np); + return -EPROBE_DEFER; + } + of_node_put(np); + return 0; +} + +#endif From b7405abfbf99ef5b838063188271e37ad0c507d6 Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 14 Nov 2026 09:41:39 -0600 Subject: [PATCH 4/5] dt-bindings: regulator: qcom,qca6390: Describe an AoC dependency Describe the optional AoC firmware supplier used by lynx before WLAN power assertion. The existing WCN6855 Bluetooth path does not gain the property by default; it will be applied only by the attended test overlay. This binding accompanies experimental sequencing code and does not enable hardware or redistribute firmware. Assisted-by: OpenAI Codex Signed-off-by: Chris Gray --- .../devicetree/bindings/regulator/qcom,qca6390-pmu.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml b/Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml index 105174df7d..8c3f9cf060 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml @@ -31,6 +31,12 @@ properties: vdd-supply: description: VDD supply regulator handle + google,aoc: + $ref: /schemas/types.yaml#/definitions/phandle + description: + AoC supplying the WLAN boot strap. Its firmware must be online before + acquiring the enable GPIO or enabling the WLAN target. + vddaon-supply: description: VDD_AON supply regulator handle From 34f6d8d3585fbb4952d51bc68d942a19893d503e Mon Sep 17 00:00:00 2001 From: Chris Gray Date: Sat, 14 Nov 2026 09:41:39 -0600 Subject: [PATCH 5/5] power: sequencing: qcom-wcn: Check AoC before WLAN power When an AoC phandle is supplied, defer before GPIO acquisition and check readiness again before asserting WLAN_EN. Initialize that WLAN GPIO low. Consumers without the property retain GPIOD_ASIS and their existing path. Use the tristate dependency to avoid a built-in consumer referencing a modular AoC symbol. This limits that configuration combination globally and must be considered when reviewing the cross-subsystem dependency. One combined lynx connection passed; Bluetooth coexistence, unattended startup and the rebased source remain unqualified. Assisted-by: OpenAI Codex Signed-off-by: Chris Gray --- drivers/power/sequencing/Kconfig | 1 + drivers/power/sequencing/pwrseq-qcom-wcn.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/power/sequencing/Kconfig b/drivers/power/sequencing/Kconfig index 226c62704d..fc87fc87c1 100644 --- a/drivers/power/sequencing/Kconfig +++ b/drivers/power/sequencing/Kconfig @@ -17,6 +17,7 @@ config POWER_SEQUENCING_QCOM_WCN tristate "Qualcomm WCN family PMU driver" default m if ARCH_QCOM depends on OF || COMPILE_TEST + depends on GS201_AOC || !GS201_AOC help Say Y here to enable the power sequencing driver for Qualcomm WCN Bluetooth/WLAN chipsets. diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c index d41793e1fc..27822b511d 100644 --- a/drivers/power/sequencing/pwrseq-qcom-wcn.c +++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -28,6 +29,7 @@ struct pwrseq_qcom_wcn_pdata { }; struct pwrseq_qcom_wcn_ctx { + struct device *dev; struct pwrseq_device *pwrseq; struct device_node *of_node; const struct pwrseq_qcom_wcn_pdata *pdata; @@ -200,8 +202,15 @@ static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_bt_unit_data = { static int pwrseq_qcom_wcn_wlan_enable(struct pwrseq_device *pwrseq) { struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq); + int ret; pwrseq_qcom_wcn_ensure_gpio_delay(ctx); + ret = gs201_aoc_require_online(ctx->dev); + if (ret) + return ret; + if (of_find_property(ctx->of_node, "google,aoc", NULL)) + dev_info(ctx->dev, "AoC online; asserting WLAN_EN\n"); + gpiod_set_value_cansleep(ctx->wlan_gpio, 1); ctx->last_gpio_enable_jf = jiffies; @@ -461,11 +470,17 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev) struct pwrseq_config config; int i, ret; + /* The GPIO acquisition below preserves its level: defer before that too. */ + ret = gs201_aoc_require_online(dev); + if (ret) + return dev_err_probe(dev, ret, "AoC firmware is not online\n"); + ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); if (!ctx) return -ENOMEM; ctx->of_node = dev->of_node; + ctx->dev = dev; ctx->pdata = device_get_match_data(dev); if (!ctx->pdata) @@ -504,7 +519,8 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev) * the link down handling is implemented in the controller driver. */ ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable", - GPIOD_ASIS); + of_find_property(dev->of_node, "google,aoc", NULL) ? + GPIOD_OUT_LOW : GPIOD_ASIS); if (IS_ERR(ctx->wlan_gpio)) return dev_err_probe(dev, PTR_ERR(ctx->wlan_gpio), "Failed to get the WLAN enable GPIO\n");