From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 384064F68B1; Wed, 23 Sep 2026 12:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; cv=none; b=dzzDprI7q0YsQ/6c/kgcyOia/hMeGksnnw/PyN6X+0YbRTkegOoI+B7yQi4/DOskomew+ai40WcIx48GF2V7EoBovlOZ4B28d+IhquCxGSaV5mVoTHF8GAaHc9TuP02JHC1zfRyPtsDvgUvphnTaVW6qCJsYY4K1euE+yc/IjhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; c=relaxed/simple; bh=aiu5BQmooqpYpTxUiTsFRkUauq9c6vOlNTSSE9Hp2cE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fTbd6uyHXF659FJHZezhd4z4s5036RDKUIYb2hP/INynWjSJo5B3spd6e7FmkGB2sGjyZLK5WEUqIEyidxxZCIQTgnjkInnBGMUQmztVFXRK4+ExC08gy8bWr73PNeXiX2U1MbeJBtQZm4MjXz5wxD2+BCLpHkfiNAe5YtW1oe0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hhMXezZC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hhMXezZC" Received: by smtp.kernel.org (Postfix) with ESMTPS id C3B8AC2BCB8; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165120; bh=aiu5BQmooqpYpTxUiTsFRkUauq9c6vOlNTSSE9Hp2cE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=hhMXezZC4F734ZEYTNu0ImTcn1++ayl23Vp6sFKPd6wz8iUNWKd5dHihz69NbPipQ 8zuPIAfqcHJxmsfBJqaky2XT7Qo/iSLlEWyAU30rqRAm/+OwRhvnJFxEzD1AMbu2Ep p61wbSSdcNbKEkOv6szKDylR69JS0Ar+gB+4Az7yh17MqU6AkA+YYpaZ9OFirPcKtC OAL3U7RwgixpYLNcKoIgv8yEwrvuuNgsR3Ib3g9SIiBM9HtAp+vWafn8THhRtWcj44 gWYi98hZ/3qaNXGLtoK2uLdg5U+3feDHBfqTXqCXZ3eDH7mkcOTpk2pL4EPQmhCSn4 6f8nPg6jXOWJA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97F91C98307; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:07 +0400 Subject: [PATCH ath-next 01/16] dt-bindings: net: wireless: ath11k: Sort compatible names alphabetically Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-1-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=1172; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=8Rc10oeOzKG46Y973OUa46HiYgABQNhQH09OMbqE0/A=; b=3+IjZNJc/3kIEHzthob1GBb8swjvmJm3tT2XGZdAeVqB3+1bxIGOUS3jPiFtH7zw2XhSFeb45 S8mdKrSK7N/DUNla87oYJd+YhC7B6MW3DhOtcsbJ2gvPyGxpPV27ex4 X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Sort the compatible names in the binding file alphabetically for legibility and correct ordering. Signed-off-by: George Moussalem --- Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yam= l b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml index d4aa56e2f823..a846cd704b19 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml @@ -17,10 +17,10 @@ description: | properties: compatible: enum: - - qcom,ipq8074-wifi + - qcom,ipq5018-wifi - qcom,ipq6018-wifi + - qcom,ipq8074-wifi - qcom,wcn6750-wifi - - qcom,ipq5018-wifi =20 reg: maxItems: 1 @@ -108,8 +108,8 @@ allOf: compatible: contains: enum: - - qcom,ipq8074-wifi - qcom,ipq6018-wifi + - qcom,ipq8074-wifi then: properties: interrupts: --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9E2437E310; Wed, 23 Sep 2026 12:05:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165122; cv=none; b=fOPR1gyuc9N/64g9NTVsauYC5ICmJ/c40i+LTe+sHZpez/iiTZz07NdDzfMRIkW9rhgDkAUuCNRsEPJAQL2rxFnZMbpidLQwyQOFRYKl7YjjN0FOxRrvFG75g23T8kR16spyzEatROvpGrda/D07Rtqusrg8P6N9ZIGV6bf1364= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165122; c=relaxed/simple; bh=Wr8vF9+tB3URgYwuk9Ft1iOQyMg6r2dF8K6KfcjCEdE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E9XAQg6wCV1k8uVnQfTzYy5Kqs7e4wRb2aOdzBk9qYTqEgb7Ngex5hKucJSZxkbE1q6L41GIiz/ttmJTMaJ4gxWvnmCTDY1RgpSAhH/UkojR2rHE07dCFXbaRTxJhxE6L6zsUEf6iZ6EIPpP5lrnYBjGVShldLSbs24Vm8FwTMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qQ/rmZGI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qQ/rmZGI" Received: by smtp.kernel.org (Postfix) with ESMTPS id D2E3EC2BCFD; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165120; bh=Wr8vF9+tB3URgYwuk9Ft1iOQyMg6r2dF8K6KfcjCEdE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=qQ/rmZGIGu8gb1vSY2PxQGocqK/13oUWvteMLS1YZHly7CuG5NmAq+uxlh2uoZk33 JOTjwq09me3JRuco/B3zUeOPigSISARHBYD74uIXRnOPnsLXCPDH/RQNf8iDVVTORj 6Zsasbs1R7CGNVnxBUGJTihqIHHyiPxwQcE1/611/myUFdl18DIuAV3Otgilb+LDtx s7cXw6I9teU019tufUwWb5Y0/JAx4RxX/n8IG4b7EYm7vWOrFZlS+3d+vpyABAhlvM ywVUgNVCScnUjqVie45lMA1EX8ByOSWoSsq1VvYFuHEmCIEBJbICy37rI2TuxUdFOC WUvp7H2+RYDgQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD53BC9830B; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:08 +0400 Subject: [PATCH ath-next 02/16] dt-bindings: net: wireless: ath11k: Add bindings for IPQ5018 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-2-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=26029; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=dwazGgTGl3nBGZ/RveaF17QPykvP/UUXWu672qGRCJw=; b=4m5wHIpLginPQMIjSmLLu4rIwxDrFAMW0hymXr3zs3QfzxeQuZTNMwur2kducDS+pPbHFJCGm 4XSm9IPeymmDvtqYAnV1WPTsl5YztsaUSPzLQX8QR41IE3zW6yH9IMc X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Although support was added for IPQ5018, the bindings are missing, so let's add them. WiFi on IPQ5018 boards come in one of the following configurations: 1. IPQ5018 (standalone) + optional 5G/6G WiFi card (such as QCN9074) 2. IPQ5018 (MPD) + one or two 5G/6G QCN6122 WiFi chips where QCN6122 is an IPQ5018-specific companion chip. IPQ5018 implements the multi-PD architecture as follows: +-----------------------------+ | Q6 Remote Processor | | RootPD | +--------------+--------------+ | | | +---------------------+---------------------+ | | | +-----v-----+ +-----v-----+ +-----v-----+ | UserPD1 | | UserPD2 | | UserPD3 | | IPQ5018 | | QCN6122 #1| | QCN6122 #2| | (Radio) | | (Radio) | | (Radio) | +-----------+ +-----------+ +-----------+ The rootPD is responsible for managing the lifecycle of the UserPD and shared resources and providing SSR notifiers. There are different firmware blobs that include either the rootPD and userPD binaries for IPQ5018-only which auto-spawns the userPD for IPQ5018 WiFi, or for IPQ5018 and QCN6122 for which the userPDs for each radio must be spawned by the ath11k driver. SMP2P is used for signaling between the host and the Q6 remote processor to manage the lifecycle of the userPDs, so add the required interrupts and smem-states for incoming and outgoing interrupts in the case of the IPQ5018 + QCN6122 MPD configuration. Otherwise, the SMP2P interrupts and smem-states are not required for the IPQ5018-only configuration. In addition, document the memory regions needed for loading the BDF and M3 firmware as well as for assigning the M3 dump memory block. Signed-off-by: George Moussalem --- .../bindings/net/wireless/qcom,ath11k.yaml | 423 +++++++++++++++++= +++- 1 file changed, 410 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yam= l b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml index a846cd704b19..621ad6d4ddad 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml @@ -29,8 +29,13 @@ properties: minItems: 32 maxItems: 52 =20 + interrupts-extended: + minItems: 56 + maxItems: 56 + interrupt-names: - maxItems: 52 + minItems: 32 + maxItems: 56 =20 qcom,rproc: $ref: /schemas/types.yaml#/definitions/phandle @@ -56,11 +61,15 @@ properties: =20 memory-region: minItems: 1 - maxItems: 2 + maxItems: 3 description: phandle to a node describing reserved memory (System RAM memory) used by ath11k firmware (see bindings/reserved-memory/reserved-memor= y.txt) =20 + memory-region-names: + minItems: 1 + maxItems: 3 + iommus: minItems: 1 maxItems: 2 @@ -78,20 +87,11 @@ properties: qcom,smem-states: $ref: /schemas/types.yaml#/definitions/phandle-array description: State bits used by the AP to signal the WLAN Q6. - items: - - description: Signal bits used to enable/disable low power mode - on WCN6750 in the case of WoW (Wake on Wireless). - items: - - description: Phandle to the Shared Memory Point 2 Point device - handling the communication with a remote processor - - description: Single bit index to toggle in the value sent to - the remote processor - maximum: 32 + minItems: 1 + maxItems: 3 =20 qcom,smem-state-names: description: The names of the state bits used for SMP2P output. - items: - - const: wlan-smp2p-out =20 required: - compatible @@ -103,6 +103,242 @@ additionalProperties: false =20 allOf: - $ref: ieee80211.yaml# + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq5018-wifi + then: + properties: + interrupts: + items: + - description: misc-pulse1 interrupt events + - description: misc-latch interrupt events + - description: sw exception interrupt events + - description: watchdog interrupt events + - description: interrupt event for ring CE0 + - description: interrupt event for ring CE1 + - description: interrupt event for ring CE2 + - description: interrupt event for ring CE3 + - description: interrupt event for ring CE4 + - description: interrupt event for ring CE5 + - description: interrupt event for ring CE6 + - description: interrupt event for ring CE7 + - description: interrupt event for ring CE8 + - description: interrupt event for ring CE9 + - description: interrupt event for ring CE10 + - description: interrupt event for ring CE11 + - description: interrupt event for ring host2wbm-desc-feed + - description: interrupt event for ring host2reo-re-injection + - description: interrupt event for ring host2reo-command + - description: interrupt event for ring host2rxdma-monitor-rin= g3 + - description: interrupt event for ring host2rxdma-monitor-rin= g2 + - description: interrupt event for ring host2rxdma-monitor-rin= g1 + - description: interrupt event for ring reo2ost-exception + - description: interrupt event for ring wbm2host-rx-release + - description: interrupt event for ring reo2host-status + - description: interrupt event for ring reo2host-destination-r= ing4 + - description: interrupt event for ring reo2host-destination-r= ing3 + - description: interrupt event for ring reo2host-destination-r= ing2 + - description: interrupt event for ring reo2host-destination-r= ing1 + - description: interrupt event for ring rxdma2host-monitor-des= tination-mac3 + - description: interrupt event for ring rxdma2host-monitor-des= tination-mac2 + - description: interrupt event for ring rxdma2host-monitor-des= tination-mac1 + - description: interrupt event for ring ppdu-end-interrupts-ma= c3 + - description: interrupt event for ring ppdu-end-interrupts-ma= c2 + - description: interrupt event for ring ppdu-end-interrupts-ma= c1 + - description: interrupt event for ring rxdma2host-monitor-sta= tus-ring-mac3 + - description: interrupt event for ring rxdma2host-monitor-sta= tus-ring-mac2 + - description: interrupt event for ring rxdma2host-monitor-sta= tus-ring-mac1 + - description: interrupt event for ring host2rxdma-host-buf-ri= ng-mac3 + - description: interrupt event for ring host2rxdma-host-buf-ri= ng-mac2 + - description: interrupt event for ring host2rxdma-host-buf-ri= ng-mac1 + - description: interrupt event for ring rxdma2host-destination= -ring-mac3 + - description: interrupt event for ring rxdma2host-destination= -ring-mac2 + - description: interrupt event for ring rxdma2host-destination= -ring-mac1 + - description: interrupt event for ring host2tcl-input-ring4 + - description: interrupt event for ring host2tcl-input-ring3 + - description: interrupt event for ring host2tcl-input-ring2 + - description: interrupt event for ring host2tcl-input-ring1 + - description: interrupt event for ring wbm2host-tx-completion= s-ring3 + - description: interrupt event for ring wbm2host-tx-completion= s-ring2 + - description: interrupt event for ring wbm2host-tx-completion= s-ring1 + - description: interrupt event for ring tcl2host-status-ring + interrupts-extended: + items: + - description: misc-pulse1 interrupt events + - description: misc-latch interrupt events + - description: sw exception interrupt events + - description: watchdog interrupt events + - description: interrupt event for ring CE0 + - description: interrupt event for ring CE1 + - description: interrupt event for ring CE2 + - description: interrupt event for ring CE3 + - description: interrupt event for ring CE4 + - description: interrupt event for ring CE5 + - description: interrupt event for ring CE6 + - description: interrupt event for ring CE7 + - description: interrupt event for ring CE8 + - description: interrupt event for ring CE9 + - description: interrupt event for ring CE10 + - description: interrupt event for ring CE11 + - description: interrupt event for ring host2wbm-desc-feed + - description: interrupt event for ring host2reo-re-injection + - description: interrupt event for ring host2reo-command + - description: interrupt event for ring host2rxdma-monitor-rin= g3 + - description: interrupt event for ring host2rxdma-monitor-rin= g2 + - description: interrupt event for ring host2rxdma-monitor-rin= g1 + - description: interrupt event for ring reo2ost-exception + - description: interrupt event for ring wbm2host-rx-release + - description: interrupt event for ring reo2host-status + - description: interrupt event for ring reo2host-destination-r= ing4 + - description: interrupt event for ring reo2host-destination-r= ing3 + - description: interrupt event for ring reo2host-destination-r= ing2 + - description: interrupt event for ring reo2host-destination-r= ing1 + - description: interrupt event for ring rxdma2host-monitor-des= tination-mac3 + - description: interrupt event for ring rxdma2host-monitor-des= tination-mac2 + - description: interrupt event for ring rxdma2host-monitor-des= tination-mac1 + - description: interrupt event for ring ppdu-end-interrupts-ma= c3 + - description: interrupt event for ring ppdu-end-interrupts-ma= c2 + - description: interrupt event for ring ppdu-end-interrupts-ma= c1 + - description: interrupt event for ring rxdma2host-monitor-sta= tus-ring-mac3 + - description: interrupt event for ring rxdma2host-monitor-sta= tus-ring-mac2 + - description: interrupt event for ring rxdma2host-monitor-sta= tus-ring-mac1 + - description: interrupt event for ring host2rxdma-host-buf-ri= ng-mac3 + - description: interrupt event for ring host2rxdma-host-buf-ri= ng-mac2 + - description: interrupt event for ring host2rxdma-host-buf-ri= ng-mac1 + - description: interrupt event for ring rxdma2host-destination= -ring-mac3 + - description: interrupt event for ring rxdma2host-destination= -ring-mac2 + - description: interrupt event for ring rxdma2host-destination= -ring-mac1 + - description: interrupt event for ring host2tcl-input-ring4 + - description: interrupt event for ring host2tcl-input-ring3 + - description: interrupt event for ring host2tcl-input-ring2 + - description: interrupt event for ring host2tcl-input-ring1 + - description: interrupt event for ring wbm2host-tx-completion= s-ring3 + - description: interrupt event for ring wbm2host-tx-completion= s-ring2 + - description: interrupt event for ring wbm2host-tx-completion= s-ring1 + - description: interrupt event for ring tcl2host-status-ring + - description: Q6 firmware user PD fatal interrupt event + - description: Q6 firmware user PD ready interrupt event + - description: Q6 firmware user PD spawn interrupt event + - description: Q6 firmware user PD stop ack interrupt event + interrupt-names: + minItems: 52 + items: + - const: misc-pulse1 + - const: misc-latch + - const: sw-exception + - const: watchdog + - const: ce0 + - const: ce1 + - const: ce2 + - const: ce3 + - const: ce4 + - const: ce5 + - const: ce6 + - const: ce7 + - const: ce8 + - const: ce9 + - const: ce10 + - const: ce11 + - const: host2wbm-desc-feed + - const: host2reo-re-injection + - const: host2reo-command + - const: host2rxdma-monitor-ring3 + - const: host2rxdma-monitor-ring2 + - const: host2rxdma-monitor-ring1 + - const: reo2ost-exception + - const: wbm2host-rx-release + - const: reo2host-status + - const: reo2host-destination-ring4 + - const: reo2host-destination-ring3 + - const: reo2host-destination-ring2 + - const: reo2host-destination-ring1 + - const: rxdma2host-monitor-destination-mac3 + - const: rxdma2host-monitor-destination-mac2 + - const: rxdma2host-monitor-destination-mac1 + - const: ppdu-end-interrupts-mac3 + - const: ppdu-end-interrupts-mac2 + - const: ppdu-end-interrupts-mac1 + - const: rxdma2host-monitor-status-ring-mac3 + - const: rxdma2host-monitor-status-ring-mac2 + - const: rxdma2host-monitor-status-ring-mac1 + - const: host2rxdma-host-buf-ring-mac3 + - const: host2rxdma-host-buf-ring-mac2 + - const: host2rxdma-host-buf-ring-mac1 + - const: rxdma2host-destination-ring-mac3 + - const: rxdma2host-destination-ring-mac2 + - const: rxdma2host-destination-ring-mac1 + - const: host2tcl-input-ring4 + - const: host2tcl-input-ring3 + - const: host2tcl-input-ring2 + - const: host2tcl-input-ring1 + - const: wbm2host-tx-completions-ring3 + - const: wbm2host-tx-completions-ring2 + - const: wbm2host-tx-completions-ring1 + - const: tcl2host-status-ring + - const: fatal + - const: ready + - const: spawn + - const: stop-ack + memory-region: + items: + - description: memory region for Q6 firmware + - description: memory region for M3 firmware + - description: memory region for M3 dump + memory-region-names: + items: + - const: q6-region + - const: m3-region + - const: m3-dump + qcom,smem-states: + items: + - description: Signal bit used to shutdown Q6 user PD + items: + - description: Phandle to the Shared Memory Point 2 Point = device + - description: Single bit index to toggle in the value sen= t to the remote processor + maximum: 32 + - description: Signal bit used to stop Q6 user PD + items: + - description: Phandle to the Shared Memory Point 2 Point = device + - description: Single bit index to toggle in the value sen= t to the remote processor + maximum: 32 + - description: Signal bit used to spawn Q6 user PD + items: + - description: Phandle to the Shared Memory Point 2 Point = device + - description: Single bit index to toggle in the value sen= t to the remote processor + maximum: 32 + qcom,smem-state-names: + items: + - const: shutdown + - const: stop + - const: spawn + allOf: + - anyOf: + - required: + - interrupts + - required: + - interrupts-extended + - if: + required: + - interrupts-extended + then: + properties: + interrupt-names: + minItems: 56 + required: + - interrupts-extended + - memory-region + - memory-region-names + - qcom,smem-states + - qcom,smem-state-names + else: + properties: + interrupt-names: + minItems: 52 + maxItems: 52 + - if: properties: compatible: @@ -265,6 +501,19 @@ allOf: - description: interrupt event for ring DP20 - description: interrupt event for ring DP21 - description: interrupt event for ring DP22 + qcom,smem-states: + items: + - description: Signal bits used to enable/disable low power mo= de + on WCN6750 in the case of WoW (Wake on Wireless). + items: + - description: Phandle to the Shared Memory Point 2 Point = device + handling the communication with a remote processor + - description: Single bit index to toggle in the value sen= t to + the remote processor + maximum: 32 + qcom,smem-state-names: + items: + - const: wlan-smp2p-out =20 examples: - | @@ -464,3 +713,151 @@ examples: iommus =3D <&apps_smmu 0x1c02 0x1>; }; }; + + - | + #include + + reserved-memory { + #address-cells =3D <2>; + #size-cells =3D <2>; + + q6_region: q6-region@4b000000 { + no-map; + reg =3D <0x0 0x4b000000 0x0 0x1400000>; + }; + + m3_dump: m3-dump@4d100000 { + reg =3D <0x0 0x4d100000 0x0 0x100000>; + no-map; + }; + }; + + wifi@c000000 { + compatible =3D "qcom,ipq5018-wifi"; + reg =3D <0x0c000000 0x1000000>; + + interrupts-extended =3D <&intc GIC_SPI 288 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 289 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 290 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 291 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 292 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 293 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 294 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 295 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 296 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 297 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 298 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 299 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 300 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 301 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 302 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 303 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 304 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 305 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 306 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 307 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 308 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 309 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 310 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 311 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 334 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 313 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 314 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 315 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 316 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 317 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 318 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 319 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 320 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 321 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 322 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 323 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 324 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 325 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 326 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 327 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 328 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 329 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 330 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 331 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 332 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 333 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 312 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 335 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 336 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 337 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 338 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 339 IRQ_TYPE_EDGE_RISING>, + <&wcss_smp2p_in 8 IRQ_TYPE_NONE>, + <&wcss_smp2p_in 9 IRQ_TYPE_NONE>, + <&wcss_smp2p_in 12 IRQ_TYPE_NONE>, + <&wcss_smp2p_in 11 IRQ_TYPE_NONE>; + interrupt-names =3D "misc-pulse1", + "misc-latch", + "sw-exception", + "watchdog", + "ce0", + "ce1", + "ce2", + "ce3", + "ce4", + "ce5", + "ce6", + "ce7", + "ce8", + "ce9", + "ce10", + "ce11", + "host2wbm-desc-feed", + "host2reo-re-injection", + "host2reo-command", + "host2rxdma-monitor-ring3", + "host2rxdma-monitor-ring2", + "host2rxdma-monitor-ring1", + "reo2ost-exception", + "wbm2host-rx-release", + "reo2host-status", + "reo2host-destination-ring4", + "reo2host-destination-ring3", + "reo2host-destination-ring2", + "reo2host-destination-ring1", + "rxdma2host-monitor-destination-mac3", + "rxdma2host-monitor-destination-mac2", + "rxdma2host-monitor-destination-mac1", + "ppdu-end-interrupts-mac3", + "ppdu-end-interrupts-mac2", + "ppdu-end-interrupts-mac1", + "rxdma2host-monitor-status-ring-mac3", + "rxdma2host-monitor-status-ring-mac2", + "rxdma2host-monitor-status-ring-mac1", + "host2rxdma-host-buf-ring-mac3", + "host2rxdma-host-buf-ring-mac2", + "host2rxdma-host-buf-ring-mac1", + "rxdma2host-destination-ring-mac3", + "rxdma2host-destination-ring-mac2", + "rxdma2host-destination-ring-mac1", + "host2tcl-input-ring4", + "host2tcl-input-ring3", + "host2tcl-input-ring2", + "host2tcl-input-ring1", + "wbm2host-tx-completions-ring3", + "wbm2host-tx-completions-ring2", + "wbm2host-tx-completions-ring1", + "tcl2host-status-ring", + "fatal", + "ready", + "spawn", + "stop-ack"; + + qcom,smem-states =3D <&wcss_smp2p_out 8>, + <&wcss_smp2p_out 9>, + <&wcss_smp2p_out 10>; + qcom,smem-state-names =3D "shutdown", + "stop", + "spawn"; + + memory-region =3D <&q6_region>, <&q6_region>, <&m3_dump>; + memory-region-names =3D "q6-region", "m3-region", "m3-dump"; + + qcom,rproc =3D <&q6v5_wcss>; + }; --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37CCE497B7D; Wed, 23 Sep 2026 12:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; cv=none; b=uRLXZtOCcsEYzEIfek7jJK2jJR/lQ059NqRSkd62J98VrsKB6IJJVJN+AHj/CVmkkZbs2DMPlUdFtS83DdrMXESGL54moxUSqo2ndjQeT2gmpjMXpOT+a62EOv8HVbJ5Mgx2RtbleBbD2bZG7FmqfhzCwe1xaJsmSf4d7OEEn8c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; c=relaxed/simple; bh=zr9QS4CYGFpHmvIppu1yeUZO9czGWXXQkxsqz13zlWk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bXyf9Lu/H1STEoiTtx0VQrJ8ru604MlpPkBadEbRYBDCH8ESq/zX/exJTxkRsslyhaGzbFYtIZVWpI58SVqitqU8OC4da4IWEfIfmvZJtW627ZwLlVjwFJjj8UA/O/fehjZ4Ux71/B9oMXTsnqLUnURdQN0UA/KgiHPGfrM063Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MwSvWTVc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MwSvWTVc" Received: by smtp.kernel.org (Postfix) with ESMTPS id DB49EC2BCFB; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165120; bh=zr9QS4CYGFpHmvIppu1yeUZO9czGWXXQkxsqz13zlWk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=MwSvWTVcY56qXWggAHOhXgf1HWczyxJ9fr24cScw7M/lMzPPofAK0nfB0dcWdUhI1 uFHoKTehM/gzDjq8Gh00JbMZNnotUTkfeoFUzkID9eHjOUNkEx8Oy8p6bFn8YI97K4 E2s/1+4evWXuf6+0LiiVfqLVavPJsDbqURplfk+A7lVwwoJQhEcXD52Bb67AdlPGGS ZeSwB9Eq/3p0RjjIxr0JjTmnfAY1Ra9bbTza7izbhmDhQThL+vRn+oK4c7EcaYeXyf CYLyVGJ4LVQoRj4xVqT/TFXuavPnI0jk19M+OMZU4z8ioHxC9IgTqKNwkiZXXsS7Ex OWdKzPlbA0plw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C00BBC982FA; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:09 +0400 Subject: [PATCH ath-next 03/16] wifi: ath11k: Register root PD rproc notifier Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-3-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=10638; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=BRJQEz5ssMrbFgr7AS2Nj48GPRPE0J8WJdw2HxrtAY4=; b=Shr0bbucP6Re7V/ZVcrJ62SI5KVjjf8uYOu+y5UF7QH69Ww/uTtj6kkgJ4SZJsXUVouLGOoWE 6q9Jgb7cmoBDgJiAKkKIHkHEKUoESjectW7Y2vro2wR/pcKO++DBarH X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem In preparation for multi-PD support, register the rproc notifier for the Q6 rootPD to monitor its state about power up/down and crash events. In non-MPD configurations such as IPQ8074, the rootPD directly provides WiFi operation. In a multi-PD configuration, the rootPD provides resources and services to other one or multiple userPDs that provide WiFi operation. The rproc driver handles loading and authenticating the firmware image of the rootPD, while the ath11k driver boots the rootPD and the userPDs. The root PD must be booted first, so power up the rootPD and wait for a power-up notification from the notifier callback before powering up the userPDs. Add global driver-level locking to avoid multiple threads racing to power up the rootPD. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 218 ++++++++++++++++++++++++++++++= +--- drivers/net/wireless/ath/ath11k/ahb.h | 17 ++- 2 files changed, 215 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 27d01411b6e9..86723a2eb3d2 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -44,6 +44,13 @@ MODULE_DEVICE_TABLE(of, ath11k_ahb_of_match); =20 #define ATH11K_IRQ_CE0_OFFSET 4 =20 +/* + * Global Driver-level Locking: + * - ath11k_rproc_info_lock: Protects rproc_info allocation/free + */ +static struct ath11k_ahb_rproc_info *g_rproc_info; +static DEFINE_MUTEX(ath11k_rproc_info_lock); + static const char *irq_name[ATH11K_IRQ_NUM_MAX] =3D { "misc-pulse1", "misc-latch", @@ -408,21 +415,12 @@ static void ath11k_ahb_stop(struct ath11k_base *ab) =20 static int ath11k_ahb_power_up(struct ath11k_base *ab) { - struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); - int ret; - - ret =3D rproc_boot(ab_ahb->tgt_rproc); - if (ret) - ath11k_err(ab, "failed to boot the remote processor Q6\n"); - - return ret; + return 0; } =20 static void ath11k_ahb_power_down(struct ath11k_base *ab, bool is_suspend) { - struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); - - rproc_shutdown(ab_ahb->tgt_rproc); + return; } =20 static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab) @@ -832,24 +830,200 @@ static const struct ath11k_hif_ops ath11k_ahb_hif_op= s_wcn6750 =3D { .ce_irq_disable =3D ath11k_pci_disable_ce_irqs_except_wake_irq, }; =20 +static int ath11k_ahb_root_pd_state_notifier(struct notifier_block *nb, + const unsigned long event, void *data) +{ + struct ath11k_ahb_rproc_info *rproc_info =3D + container_of(nb, struct ath11k_ahb_rproc_info, root_pd_nb); + + if (event =3D=3D ATH11K_RPROC_AFTER_POWERUP) { + ath11k_dbg(NULL, ATH11K_DBG_AHB, "Root PD is UP\n"); + complete(&rproc_info->rootpd_ready); + } + + return 0; +} + +static int ath11k_ahb_register_rproc_notifier(void) +{ + int ret; + + lockdep_assert_held(&ath11k_rproc_info_lock); + + if (g_rproc_info->root_pd_notifier) + return 0; + + g_rproc_info->root_pd_nb.notifier_call =3D ath11k_ahb_root_pd_state_notif= ier; + + g_rproc_info->root_pd_notifier =3D qcom_register_ssr_notifier(g_rproc_inf= o->tgt_rproc->name, + &g_rproc_info->root_pd_nb); + if (IS_ERR(g_rproc_info->root_pd_notifier)) { + ret =3D PTR_ERR(g_rproc_info->root_pd_notifier); + g_rproc_info->root_pd_notifier =3D NULL; + return ret; + } + + return 0; +} + +static void ath11k_ahb_unregister_rproc_notifier(void) +{ + lockdep_assert_held(&ath11k_rproc_info_lock); + + if (!g_rproc_info->root_pd_notifier) + return; + + qcom_unregister_ssr_notifier(g_rproc_info->root_pd_notifier, + &g_rproc_info->root_pd_nb); + g_rproc_info->root_pd_notifier =3D NULL; +} + +static struct ath11k_ahb_rproc_info *ath11k_ahb_rproc_info_alloc(struct at= h11k_base *ab) +{ + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + struct ath11k_ahb_rproc_info *rproc_info; + + lockdep_assert_held(&ath11k_rproc_info_lock); + + rproc_info =3D kzalloc_obj(*rproc_info); + if (!rproc_info) + return NULL; + + rproc_info->root_pd_booted =3D false; + init_completion(&rproc_info->rootpd_ready); + ab_ahb->rproc_info =3D rproc_info; + + return rproc_info; +} + static int ath11k_core_get_rproc(struct ath11k_base *ab) { struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); struct device *dev =3D ab->dev; struct rproc *prproc; phandle rproc_phandle; + int ret; + + lockdep_assert_held(&ath11k_rproc_info_lock); + + if (g_rproc_info) { + ab_ahb->rproc_info =3D g_rproc_info; + return 0; + } + + g_rproc_info =3D ath11k_ahb_rproc_info_alloc(ab); + if (!g_rproc_info) + return -ENOMEM; =20 if (of_property_read_u32(dev->of_node, "qcom,rproc", &rproc_phandle)) { ath11k_err(ab, "failed to get q6_rproc handle\n"); - return -ENOENT; + ret =3D -ENOENT; + goto err_free_rproc_info; } =20 prproc =3D rproc_get_by_phandle(rproc_phandle); - if (!prproc) - return dev_err_probe(&ab->pdev->dev, -EPROBE_DEFER, "failed to get rproc= \n"); - ab_ahb->tgt_rproc =3D prproc; + if (!prproc) { + ret =3D dev_err_probe(dev, -EPROBE_DEFER, + "failed to get rproc\n"); + goto err_free_rproc_info; + } + g_rproc_info->tgt_rproc =3D prproc; =20 return 0; + +err_free_rproc_info: + ab_ahb->rproc_info =3D NULL; + kfree(g_rproc_info); + g_rproc_info =3D NULL; + return ret; +} + +static int ath11k_ahb_boot_root_pd(struct ath11k_base *ab) +{ + unsigned long time_left; + int ret; + + lockdep_assert_held(&ath11k_rproc_info_lock); + reinit_completion(&g_rproc_info->rootpd_ready); + + ret =3D rproc_boot(g_rproc_info->tgt_rproc); + if (ret < 0) { + ath11k_err(ab, "RootPD boot failed\n"); + return ret; + } + + time_left =3D wait_for_completion_timeout(&g_rproc_info->rootpd_ready, + ATH11K_ROOTPD_READY_TIMEOUT); + if (!time_left) { + ath11k_err(ab, "RootPD ready wait timed out\n"); + return -ETIMEDOUT; + } + + return 0; +} + +static int ath11k_ahb_configure_rproc(struct ath11k_base *ab) +{ + int ret; + + mutex_lock(&ath11k_rproc_info_lock); + + ret =3D ath11k_core_get_rproc(ab); + if (ret < 0) { + mutex_unlock(&ath11k_rproc_info_lock); + return ret; + } + + ret =3D ath11k_ahb_register_rproc_notifier(); + if (ret < 0) { + ret =3D dev_err_probe(&ab->pdev->dev, ret, + "failed to register rproc notifier\n"); + goto err_put_rproc; + } + + if (g_rproc_info->tgt_rproc->state !=3D RPROC_RUNNING) { + ret =3D ath11k_ahb_boot_root_pd(ab); + if (ret) { + ath11k_err(ab, "failed to boot the remote processor Q6\n"); + goto err_unreg_notifier; + } + } + g_rproc_info->root_pd_booted =3D true; + + mutex_unlock(&ath11k_rproc_info_lock); + + return 0; + +err_unreg_notifier: + ath11k_ahb_unregister_rproc_notifier(); + +err_put_rproc: + rproc_put(g_rproc_info->tgt_rproc); + mutex_unlock(&ath11k_rproc_info_lock); + return ret; +} + +static void ath11k_ahb_deconfigure_rproc(struct ath11k_base *ab) +{ + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + struct ath11k_ahb_rproc_info *rproc_info =3D ab_ahb->rproc_info; + + if (!rproc_info || !g_rproc_info) + return; + + mutex_lock(&ath11k_rproc_info_lock); + + ath11k_ahb_unregister_rproc_notifier(); + + if (g_rproc_info->root_pd_booted && + g_rproc_info->tgt_rproc->state =3D=3D RPROC_RUNNING) + rproc_shutdown(g_rproc_info->tgt_rproc); + + rproc_put(g_rproc_info->tgt_rproc); + kfree(g_rproc_info); + g_rproc_info =3D NULL; + + mutex_unlock(&ath11k_rproc_info_lock); } =20 static int ath11k_ahb_setup_msi_resources(struct ath11k_base *ab) @@ -1148,6 +1322,7 @@ static int ath11k_ahb_probe(struct platform_device *p= dev) struct ath11k_base *ab; const struct ath11k_hif_ops *hif_ops; const struct ath11k_pci_ops *pci_ops; + struct ath11k_ahb *ab_ahb; enum ath11k_hw_rev hw_rev; int ret; =20 @@ -1187,6 +1362,8 @@ static int ath11k_ahb_probe(struct platform_device *p= dev) ab->hw_rev =3D hw_rev; ab->fw_mode =3D ATH11K_FIRMWARE_MODE_NORMAL; platform_set_drvdata(pdev, ab); + ab_ahb =3D ath11k_ahb_priv(ab); + ab_ahb->ab =3D ab; =20 ret =3D ath11k_pcic_register_pci_ops(ab, pci_ops); if (ret) { @@ -1226,26 +1403,29 @@ static int ath11k_ahb_probe(struct platform_device = *pdev) =20 ath11k_ahb_init_qmi_ce_config(ab); =20 - ret =3D ath11k_core_get_rproc(ab); + ret =3D ath11k_ahb_configure_rproc(ab); if (ret) goto err_ce_free; =20 ret =3D ath11k_core_init(ab); if (ret) { ath11k_err(ab, "failed to init core: %d\n", ret); - goto err_ce_free; + goto err_rproc_deconfigure; } =20 ret =3D ath11k_ahb_config_irq(ab); if (ret) { ath11k_err(ab, "failed to configure irq: %d\n", ret); - goto err_ce_free; + goto err_rproc_deconfigure; } =20 ath11k_qmi_fwreset_from_cold_boot(ab); =20 return 0; =20 +err_rproc_deconfigure: + ath11k_ahb_deconfigure_rproc(ab); + err_ce_free: ath11k_ce_free_pipes(ab); =20 @@ -1294,7 +1474,7 @@ static void ath11k_ahb_free_resources(struct ath11k_b= ase *ab) ath11k_ahb_fw_resource_deinit(ab); ath11k_ce_free_pipes(ab); ath11k_ahb_ce_unmap(ab); - + ath11k_ahb_deconfigure_rproc(ab); ath11k_core_free(ab); platform_set_drvdata(pdev, NULL); } diff --git a/drivers/net/wireless/ath/ath11k/ahb.h b/drivers/net/wireless/a= th/ath11k/ahb.h index 8c1eb1e8e6b1..99a361e0091f 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.h +++ b/drivers/net/wireless/ath/ath11k/ahb.h @@ -6,6 +6,8 @@ #ifndef ATH11K_AHB_H #define ATH11K_AHB_H =20 +#include + #include "core.h" =20 #define ATH11K_AHB_RECOVERY_TIMEOUT (3 * HZ) @@ -14,6 +16,9 @@ #define ATH11K_AHB_SMP2P_SMEM_SEQ_NO GENMASK(31, 16) #define ATH11K_AHB_SMP2P_SMEM_VALUE_MASK 0xFFFFFFFF =20 +#define ATH11K_ROOTPD_READY_TIMEOUT (5 * HZ) +#define ATH11K_RPROC_AFTER_POWERUP QCOM_SSR_AFTER_POWERUP + enum ath11k_ahb_smp2p_msg_id { ATH11K_AHB_POWER_SAVE_ENTER =3D 1, ATH11K_AHB_POWER_SAVE_EXIT, @@ -21,8 +26,17 @@ enum ath11k_ahb_smp2p_msg_id { =20 struct ath11k_base; =20 -struct ath11k_ahb { +struct ath11k_ahb_rproc_info { struct rproc *tgt_rproc; + + struct completion rootpd_ready; + struct notifier_block root_pd_nb; + void *root_pd_notifier; + bool root_pd_booted; +}; + +struct ath11k_ahb { + struct ath11k_base *ab; struct { struct device *dev; struct iommu_domain *iommu_domain; @@ -37,6 +51,7 @@ struct ath11k_ahb { unsigned int smem_bit; struct qcom_smem_state *smem_state; } smp2p_info; + struct ath11k_ahb_rproc_info *rproc_info; }; =20 static inline struct ath11k_ahb *ath11k_ahb_priv(struct ath11k_base *ab) --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37E2D499F16; Wed, 23 Sep 2026 12:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; cv=none; b=Cr5rUUJB4C7F6+Ak2shjDTVziUeYg+8k751tgL9dTxk7Qn1hv/e9P+WC1ebeUcQN9KUkUzguEJTespqrlPC11G7XVCNUR2Pt8iy4dZ+FMQRdLWFyOeHhDyChJkx5lJKvJd/A0pDIZHaHiA2mKYyVerf90quDxc5qyMkSlDlDuQg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; c=relaxed/simple; bh=EcnjjjPlRLgVMlGl09xnVm7puWdmbRefGX0JPWnE+LQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZazaQV8+QsRWw3nVISFLVCNAvx/lk3iCyV5gEvwabMRkdAHkwb9fOs4kTYPiPccjRFL/NmuDJSRqAte5Ffy9C2GBNKEJVOLLLZkLtPrsJbBIA1WZMNIpAcjAQ687axg4J8cmQaQyQTPzuhNJPx2ePlcI1GVaXDudK9Ov6z4Uc4Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tv9ijzCQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tv9ijzCQ" Received: by smtp.kernel.org (Postfix) with ESMTPS id E97B0C32781; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=EcnjjjPlRLgVMlGl09xnVm7puWdmbRefGX0JPWnE+LQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=tv9ijzCQgHc6zNUdhl1avtTT6xB0OpVRwLFUPzNGiYGnnq6y5FwOhFYqS98eOSIg0 KLZiDFUXgNHRdCipoa3Hc5bGkHc9qro3E5vm439hWA51GarOZvjt3czuN6ox8qcfiy oew5sPT1waw4Bvj9ivJwrsHMNL9AK79ZoqA2eDRfUuXEajy1dF8IY4ZRfmKQVYK0bP +O7y6y2eWn2GlsZpdXy/0ZpLtIFYJ9189DZso5nfy68QnHWxjWSB10I53sbe3cDNmG EYWsw++hBKy5bN5nvhj3v/qmU5hGTUpazw0jvazDrvVzEq1Y8KpHTEknRL9/vSgXfZ uEYfy49e1Ae9g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D22A3C9830D; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:10 +0400 Subject: [PATCH ath-next 04/16] wifi: ath11k: Add support for loading m3 mbn firmware Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-4-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=10329; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=b8Zwusm7H6v4vsfbn9Gmvu7jm5Rc6Udk2jN5W6UTq0I=; b=YwAx/XlVOYQPqU/hTQeqMwskJ+PKx0sZif1StO+0evCwNHHNbk6Ag7aQrgNoCN9WPRWdvWs7j 6IZc8YupXZ0A0AawVfBGohNsQ0/GyIMfPwpAA9+or1VksU6/SJpRIHp X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Add support for loading m3 firmware in MDT file format which is different from the m3.bin file format. This is required for several ath11k wifi chips such as IPQ5018. The rproc driver is used to load the Q6 firmware binaries / MDT segments into memory for the root PD and user PDs if present. However, the m3 firmware blob is not. The m3 firmware in MBN (MDT) format is loaded by ath11k as part of the root PD boot sequence for AHB platform chips. For chips for which the m3 firmware is outside of the Q6 memory carveout, obtain the memory region from the device tree and load the m3 firmware into that region. Otherwise, fall back to the Q6 memory region of the rproc node itself. Keep track of whether m3 firmware has been loaded in the global rproc_info struct using a bitmap. In a configuration with multiple wifi chips of the same hardware revision, the m3 firmware requires to be loaded only once. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 65 ++++++++++++++++++++++++++++++= ++++ drivers/net/wireless/ath/ath11k/ahb.h | 3 ++ drivers/net/wireless/ath/ath11k/core.c | 12 ++++++- drivers/net/wireless/ath/ath11k/hw.h | 8 +++++ drivers/net/wireless/ath/ath11k/qmi.c | 6 ++-- 5 files changed, 91 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 86723a2eb3d2..9fe2e112dfb8 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -18,6 +18,7 @@ #include "qmi.h" #include #include "pcic.h" +#include #include #include =20 @@ -890,6 +891,7 @@ static struct ath11k_ahb_rproc_info *ath11k_ahb_rproc_i= nfo_alloc(struct ath11k_b return NULL; =20 rproc_info->root_pd_booted =3D false; + rproc_info->m3_loaded =3D 0; init_completion(&rproc_info->rootpd_ready); ab_ahb->rproc_info =3D rproc_info; =20 @@ -962,6 +964,58 @@ static int ath11k_ahb_boot_root_pd(struct ath11k_base = *ab) return 0; } =20 +static int ath11k_ahb_load_m3_firmware(struct ath11k_base *ab) +{ + char m3_fw_name[ATH11K_FW_NAME_LEN]; + const struct firmware *m3_fw =3D NULL; + struct device_node *node; + struct resource res =3D {}; + phys_addr_t mem_phys; + void *mem_region; + size_t mem_size; + int ret; + + ret =3D of_reserved_mem_region_to_resource_byname(ab->dev->of_node, + "m3-region", &res); + /* If m3 region isn't found, fall back to the mem region of the rproc */ + if (ret && ret =3D=3D -EINVAL) { + node =3D g_rproc_info->tgt_rproc->dev.parent->of_node; + ret =3D of_reserved_mem_region_to_resource(node, 0, &res); + } + if (ret) { + ath11k_err(ab, "Failed to get m3 memory resource: %d\n", ret); + return ret; + } + + mem_phys =3D res.start; + mem_size =3D resource_size(&res); + mem_region =3D devm_memremap(ab->dev, mem_phys, mem_size, MEMREMAP_WC); + + snprintf(m3_fw_name, sizeof(m3_fw_name), "%s/%s/%s", + ATH11K_FW_DIR, ab->hw_params.fw.dir, ATH11K_M3_MBN_FILE); + + ret =3D request_firmware(&m3_fw, m3_fw_name, ab->dev); + if (ret < 0) { + ath11k_err(ab, "Failed to request firmware: %d\n", ret); + return ret; + } + + if (!m3_fw->size || m3_fw->size > mem_size) { + ath11k_err(ab, "Invalid firmware size\n"); + release_firmware(m3_fw); + return -EINVAL; + } + + ret =3D qcom_mdt_load_no_init(ab->dev, m3_fw, m3_fw_name, mem_region, + mem_phys, mem_size, &mem_phys); + if (ret) + ath11k_err(ab, "Failed to load MDT segments: %d\n", ret); + + release_firmware(m3_fw); + + return ret; +} + static int ath11k_ahb_configure_rproc(struct ath11k_base *ab) { int ret; @@ -981,6 +1035,17 @@ static int ath11k_ahb_configure_rproc(struct ath11k_b= ase *ab) goto err_put_rproc; } =20 + if (ab->hw_params.m3_fw_support && + ab->hw_params.fw.m3_loader =3D=3D ath11k_m3_fw_loader_ahb && + !(g_rproc_info->m3_loaded & BIT(ab->hw_params.hw_rev))) { + ret =3D ath11k_ahb_load_m3_firmware(ab); + if (ret) { + ath11k_err(ab, "failed to load m3 firmware: %d\n", ret); + goto err_unreg_notifier; + } + g_rproc_info->m3_loaded |=3D BIT(ab->hw_params.hw_rev); + } + if (g_rproc_info->tgt_rproc->state !=3D RPROC_RUNNING) { ret =3D ath11k_ahb_boot_root_pd(ab); if (ret) { diff --git a/drivers/net/wireless/ath/ath11k/ahb.h b/drivers/net/wireless/a= th/ath11k/ahb.h index 99a361e0091f..033d6223494b 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.h +++ b/drivers/net/wireless/ath/ath11k/ahb.h @@ -33,6 +33,9 @@ struct ath11k_ahb_rproc_info { struct notifier_block root_pd_nb; void *root_pd_notifier; bool root_pd_booted; + + /* Bitmap of loaded M3 firmwares indexed by hardware revision */ + u32 m3_loaded; }; =20 struct ath11k_ahb { diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/= ath/ath11k/core.c index d2ed6a0ea7e3..428f382e74a9 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -46,6 +46,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = =3D { .dir =3D "IPQ8074/hw2.0", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_ahb, }, .max_radios =3D 3, .bdf_addr =3D 0x4B0C0000, @@ -135,6 +136,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "IPQ6018/hw1.0", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_ahb, }, .max_radios =3D 2, .bdf_addr =3D 0x4ABC0000, @@ -222,6 +224,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "QCA6390/hw2.0", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_qmi, }, .max_radios =3D 3, .bdf_addr =3D 0x4B0C0000, @@ -314,6 +317,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "QCN9074/hw1.0", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_qmi, }, .max_radios =3D 1, .single_pdev_only =3D false, @@ -400,6 +404,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "WCN6855/hw2.0", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_qmi, }, .max_radios =3D 3, .bdf_addr =3D 0x4B0C0000, @@ -492,6 +497,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "WCN6855/hw2.1", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_qmi, }, .max_radios =3D 3, .bdf_addr =3D 0x4B0C0000, @@ -582,6 +588,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "WCN6750/hw1.0", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_qmi, }, .max_radios =3D 1, .bdf_addr =3D 0x4B0C0000, @@ -667,6 +674,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "IPQ5018/hw1.0", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_ahb, }, .max_radios =3D MAX_RADIOS_5018, .bdf_addr =3D 0x4BA00000, @@ -724,7 +732,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dbr_debug_support =3D true, .global_reset =3D false, .bios_sar_capa =3D NULL, - .m3_fw_support =3D false, + .m3_fw_support =3D true, .fixed_bdf_addr =3D true, .fixed_mem_region =3D true, .static_window_map =3D false, @@ -752,6 +760,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "QCA2066/hw2.1", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_qmi, }, .max_radios =3D 3, .bdf_addr =3D 0x4B0C0000, @@ -843,6 +852,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .dir =3D "QCA6698AQ/hw2.1", .board_size =3D 256 * 1024, .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_qmi, }, .max_radios =3D 3, .bdf_addr =3D 0x4B0C0000, diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/at= h/ath11k/hw.h index 4996536fbd14..5a1100ceb895 100644 --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h @@ -72,6 +72,7 @@ #define ATH11k_HW_RATECODE_CCK_SHORT_PREAM_MASK 0x4 =20 #define ATH11K_FW_DIR "ath11k" +#define ATH11K_FW_NAME_LEN 35 =20 #define ATH11K_BOARD_MAGIC "QCA-ATH11K-BOARD" #define ATH11K_BOARD_API2_FILE "board-2.bin" @@ -79,6 +80,7 @@ #define ATH11K_DEFAULT_CAL_FILE "caldata.bin" #define ATH11K_AMSS_FILE "amss.bin" #define ATH11K_M3_FILE "m3.bin" +#define ATH11K_M3_MBN_FILE "m3_fw.mbn" #define ATH11K_REGDB_FILE_NAME "regdb.bin" =20 #define ATH11K_CE_OFFSET(ab) (ab->mem_ce - ab->mem) @@ -137,6 +139,11 @@ struct ath11k_hw_hal_params { size_t num_tx_rings; }; =20 +enum ath11k_m3_fw_loaders { + ath11k_m3_fw_loader_ahb, + ath11k_m3_fw_loader_qmi, +}; + struct ath11k_hw_params { const char *name; u16 hw_rev; @@ -147,6 +154,7 @@ struct ath11k_hw_params { const char *dir; size_t board_size; size_t cal_offset; + enum ath11k_m3_fw_loaders m3_loader; } fw; =20 const struct ath11k_hw_ops *hw_ops; diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/a= th/ath11k/qmi.c index 7dc07339b957..bd81e8d3d5f7 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -1724,7 +1724,8 @@ int ath11k_qmi_host_cap_send(struct ath11k_base *ab) req.bdf_support_valid =3D 1; req.bdf_support =3D 1; =20 - if (ab->hw_params.m3_fw_support) { + if (ab->hw_params.m3_fw_support && + ab->hw_params.fw.m3_loader =3D=3D ath11k_m3_fw_loader_qmi) { req.m3_support_valid =3D 1; req.m3_support =3D 1; req.m3_cache_support_valid =3D 1; @@ -2589,7 +2590,8 @@ int ath11k_qmi_wlanfw_m3_info_send(struct ath11k_base= *ab) memset(&req, 0, sizeof(req)); memset(&resp, 0, sizeof(resp)); =20 - if (ab->hw_params.m3_fw_support) { + if (ab->hw_params.m3_fw_support && + ab->hw_params.fw.m3_loader =3D=3D ath11k_m3_fw_loader_qmi) { ret =3D ath11k_qmi_m3_load(ab); if (ret) { ath11k_err(ab, "failed to load m3 firmware: %d", ret); --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6A8B50128E; Wed, 23 Sep 2026 12:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; cv=none; b=WIURoRZeznWIxYCXbKbopVStfBj9Ca1Px7ZOkrlJIepsIoQeEoundnhY375OQpo/sOfWq84MS+mAOW92HiCkKlEwRqeS77ljXn1nmpjhE3Wmvq1VHSIk7HIoyY31Wi1tPYhEb/1kFCd5Urqkxni7TvzNOEVg+EMCvOubjeVeGjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; c=relaxed/simple; bh=AIpgeoob11JrgFR2zIPw+UNx7APizElkKKPNQhREDUA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tM9bQiAPHeIvrXvpNSVgYSmbJXC+kswUK9/VR8lozWAz2C4jqq2B5+bjNfOJyGs4jQuRujgIgz0e+v4Az+97RSNXh5aVIdhEfVDIZdRk7iOZmP5A0NLQ/1u2G9eWqAXGly/yQqG/I7ftZghVJwn2MaGIXUTu1RRco+3RI8OOBWE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GERWzTMH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GERWzTMH" Received: by smtp.kernel.org (Postfix) with ESMTPS id 0B04BC2BD04; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=AIpgeoob11JrgFR2zIPw+UNx7APizElkKKPNQhREDUA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=GERWzTMHdq7+bB0PPBBepqEbzWgZqUwBIRF7XmrDJ6KDPco+kQldQAPRxlABCMupS Vv7koV9iUDk6SY5/n+Nzdk9ouKiBk4/hKceGadKOPFwNjXoMK8Oron+c3ZXM+GcoJQ grkthrRzLYlXknQ0Fbn9ZVm4pjpdJU/Qe+wBGKsPUecl6brZaW8vzOYPDRfe01KX5s C7iXNeml+1T2oVFoI9ALowzv6vZKMNMb+iLM6iVavmA5prbCjOXurVZjSC+9Wdnt5E RMwAd8mwdWK3U3AutdOYk5HBi3gGjjhClcaVkkgCEJD5etTJbR/nBUiXmLQ5Tr88TR 3oHpRdfSHxx/A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E438FC9830C; Wed, 23 Sep 2026 12:05:20 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:11 +0400 Subject: [PATCH ath-next 05/16] wifi: ath11k: Add ability to set BDF and M3 dump memory addresses Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-5-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=4319; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=OEbvWqdqRA5K8/mH7uT4NFreSkqPWXIOdUNpo2XK8O4=; b=t2JEXaDKoHwBk5X3Jg6Aw7RhynOO3AQZ3IoT8CEM2qYvlXLUoFO7xI4y/wxSlCdElt5sfwcgc ztz630J0jFqAkk+fTkMhwrf/fT4MqHZlR6HYo0WrzQG63slf1+yENro X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem The BDF address is currently hardcoded in the hardware parameters. However, the BDF address for multi-PD firmware can vary based on the target and firmware. In addition, setting the M3 dump address is required for IPQ5018/QCN6122 multi-PD firmware and functioning WiFi operation. As such, add the ability to lookup the respective reserved memory regions defined in the device tree and use those addresses for the BDF and M3 dump. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/qmi.c | 62 +++++++++++++++++++++++++++++++= ++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/a= th/ath11k/qmi.c index bd81e8d3d5f7..771ef9b5304f 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -2037,6 +2037,45 @@ static int ath11k_qmi_alloc_target_mem_chunk(struct = ath11k_base *ab) return 0; } =20 +static const char *ath11k_qmi_get_mem_reg_name(int mem_type) +{ + switch (mem_type) { + case HOST_DDR_REGION_TYPE: + case BDF_MEM_REGION_TYPE: + return "q6-region"; + case M3_DUMP_REGION_TYPE: + return "m3-dump"; + default: + return NULL; + } +} + +static int ath11k_qmi_reserved_memory_to_resource(struct ath11k_base *ab, + int mem_type, + struct resource *res) +{ + const char *rname; + int ret; + + rname =3D ath11k_qmi_get_mem_reg_name(mem_type); + if (!rname) { + ath11k_dbg(ab, ATH11K_DBG_QMI, + "invalid memory type %d\n", mem_type); + return -EINVAL; + } + + ret =3D of_reserved_mem_region_to_resource_byname(ab->dev->of_node, + rname, res); + if (ret) { + ath11k_dbg(ab, ATH11K_DBG_QMI, + "failed to get reserved memory region for %s\n", + rname); + return ret; + } + + return 0; +} + static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab) { struct device *dev =3D ab->dev; @@ -2073,7 +2112,11 @@ static int ath11k_qmi_assign_target_mem_chunk(struct= ath11k_base *ab) idx++; break; case BDF_MEM_REGION_TYPE: - ab->qmi.target_mem[idx].paddr =3D ab->hw_params.bdf_addr; + ret =3D ath11k_qmi_reserved_memory_to_resource(ab, BDF_MEM_REGION_TYPE,= &res); + if (!ret && !(ab->qmi.target_mem[i].size > resource_size(&res))) + ab->qmi.target_mem[idx].paddr =3D res.start; + else + ab->qmi.target_mem[idx].paddr =3D ab->hw_params.bdf_addr; ab->qmi.target_mem[idx].iaddr =3D NULL; ab->qmi.target_mem[idx].size =3D ab->qmi.target_mem[i].size; ab->qmi.target_mem[idx].type =3D ab->qmi.target_mem[i].type; @@ -2107,6 +2150,16 @@ static int ath11k_qmi_assign_target_mem_chunk(struct= ath11k_base *ab) ab->qmi.target_mem[idx].type =3D ab->qmi.target_mem[i].type; idx++; break; + case M3_DUMP_REGION_TYPE: + ret =3D ath11k_qmi_reserved_memory_to_resource(ab, M3_DUMP_REGION_TYPE,= &res); + if (!ret && !(ab->qmi.target_mem[i].size > resource_size(&res))) { + ab->qmi.target_mem[idx].paddr =3D res.start; + ab->qmi.target_mem[idx].iaddr =3D NULL; + ab->qmi.target_mem[idx].size =3D ab->qmi.target_mem[i].size; + ab->qmi.target_mem[idx].type =3D ab->qmi.target_mem[i].type; + idx++; + } + break; default: ath11k_warn(ab, "qmi ignore invalid mem req type %d\n", ab->qmi.target_mem[i].type); @@ -2300,6 +2353,7 @@ static int ath11k_qmi_load_file_target_mem(struct ath= 11k_base *ab, { struct qmi_wlanfw_bdf_download_req_msg_v01 *req; struct qmi_wlanfw_bdf_download_resp_msg_v01 resp; + struct resource res =3D {}; struct qmi_txn txn; const u8 *temp =3D data; void __iomem *bdf_addr =3D NULL; @@ -2313,7 +2367,11 @@ static int ath11k_qmi_load_file_target_mem(struct at= h11k_base *ab, memset(&resp, 0, sizeof(resp)); =20 if (ab->hw_params.fixed_bdf_addr) { - bdf_addr =3D ioremap(ab->hw_params.bdf_addr, ab->hw_params.fw.board_size= ); + ret =3D ath11k_qmi_reserved_memory_to_resource(ab, BDF_MEM_REGION_TYPE, = &res); + if (!ret && !(ab->hw_params.fw.board_size > resource_size(&res))) + bdf_addr =3D ioremap(res.start, ab->hw_params.fw.board_size); + else + bdf_addr =3D ioremap(ab->hw_params.bdf_addr, ab->hw_params.fw.board_siz= e); if (!bdf_addr) { ath11k_warn(ab, "qmi ioremap error for bdf_addr\n"); ret =3D -EIO; --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BD7F4F93A4; Wed, 23 Sep 2026 12:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; cv=none; b=O4Q0r9zC/bC4c9yvbk59n5IzZPm5m9nW5tOou8tXeZEgFakOv+UxOnKT+tcyyqRjn4Wvgp8r0rOBtULTbfqxmdOcyNIUV1LpG+ZzMDiwqFuA2KClZTkoVhDw2ZAigKvKHncuE8C8wWyvXgc4a6U5tYvycRCkU3Fl1BUVTQrzwDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; c=relaxed/simple; bh=U65tT/XuausYcSGRR+nBv1qFV7Ddpj0lJkZ4vH1copM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pUWWLZR/yOzXL3+V3MU9N+GVs5aCulK8tRLYNVnk0qW3NDVYXR8hVK0hl1DrWdmp+xMhaogZYcErfdtgTqsmU87YX5F4w7+061Mif8QkD2wI7PP7T8ZGyR3kalOPzduMpLSG3qVgvojb2cw4IgVYUITbW973SNebI0m+aWXS+qg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pS9WqHms; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pS9WqHms" Received: by smtp.kernel.org (Postfix) with ESMTPS id 1626AC4AF14; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=U65tT/XuausYcSGRR+nBv1qFV7Ddpj0lJkZ4vH1copM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=pS9WqHmsxjiQz6raHXOxBZg/V2RhegwdP0S/q/wzVJDNaiOB/0dlgRWy5CCIxddvt w6YdYiDspFb3gX/o2VQGxelLJf1cC0twNci7qRnzLxMyBFG1fUQwMAojoCwiMFPa9z BRwQJUPatSlb9Kg4LkTTfYTs0HcoweWty05fuumO3pcYESQPlpnSV5LTr6Qqeq1Ht6 9CWzbePnZg0SkQR7j1Y11jyWu27FTWZUJ5C4Xed+SQhSvIvdK6n9ghgR0Ej1PHQj59 wrY0ZDS+GVjo/i1pgyRxsMNobMG/y0s2arbeDkyUnl6GA/VzcKz7gtn35Mxrh/t6g2 w56pBik4EbSJg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 027A3C98307; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:12 +0400 Subject: [PATCH ath-next 06/16] firmware: qcom: scm: Add support for setting internal WiFi power mode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-6-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=3732; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=S3tayyPPojcv8MgCJKPIjYb3bobuwrtC6mchI6StDhA=; b=yEeCFoFH8MkwAgM7jDcHmtMYntNrocu/jD5KcO5zp83+wJabLj9r+0QEamATBQeJh3sWOsb7U Gd89W0Ww3VbAn0Yd3d30H9ILQQwoC4ZLMpo77DHPMN3Ne66bDVp30YL X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Add SCM call to power up / down the SoC's internal WiFi radio. The SoC's internal WiFi radio needs to be powered up/down through a SCM call when MPD firmware is loaded by the rproc driver. Multi-PD firmware only loads the root PD and provides services and resources to one or multiple user PDs which are firmware segments required for each WiFi radio (for ex. in the case of the MPD firmware for IPQ5018 which contains the firmware binaries for the SoC's internal WiFi radio and one or two IPQ5018-specific QCN6122 WiFi companion chips). For non-MPD firmware, this call is not required. Not all Trusted Execution Environment (QSEE) images support this call, so first check if the call is available. Signed-off-by: George Moussalem --- drivers/firmware/qcom/qcom_scm.c | 43 ++++++++++++++++++++++++++++++= ++++ drivers/firmware/qcom/qcom_scm.h | 2 ++ include/linux/firmware/qcom/qcom_scm.h | 1 + 3 files changed, 46 insertions(+) diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_= scm.c index 3eaa4c9ccf3c..8e5f5c235cb7 100644 --- a/drivers/firmware/qcom/qcom_scm.c +++ b/drivers/firmware/qcom/qcom_scm.c @@ -1084,6 +1084,49 @@ static bool qcom_scm_is_pas_available(void) return true; } =20 +/** + * qcom_scm_pas_set_wifi_power_mode() - Power on/off internal wifi + * @peripheral: peripheral id + * @enable: true to power up, false to power down + * + * Return 0 on success. + */ +int qcom_scm_pas_set_wifi_power_mode(u32 peripheral, bool enable) +{ + struct qcom_scm_desc desc =3D { + .svc =3D QCOM_SCM_SVC_PIL, + .cmd =3D enable ? QCOM_SCM_PIL_PAS_WIFI_PWR_EN : + QCOM_SCM_PIL_PAS_WIFI_PWR_DIS, + .arginfo =3D QCOM_SCM_ARGS(1), + .args[0] =3D peripheral, + .owner =3D ARM_SMCCC_OWNER_SIP, + }; + struct qcom_scm_res res; + int ret; + + if (!__qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_PIL, + enable ? QCOM_SCM_PIL_PAS_WIFI_PWR_EN : + QCOM_SCM_PIL_PAS_WIFI_PWR_DIS)) + return -EOPNOTSUPP; + + ret =3D qcom_scm_clk_enable(); + if (ret) + return ret; + + ret =3D qcom_scm_bw_enable(); + if (ret) + goto disable_clk; + + ret =3D qcom_scm_call(__scm->dev, &desc, &res); + qcom_scm_bw_disable(); + +disable_clk: + qcom_scm_clk_disable(); + + return ret ? : res.result[0]; +} +EXPORT_SYMBOL_GPL(qcom_scm_pas_set_wifi_power_mode); + static int __qcom_scm_pas_mss_reset(struct device *dev, bool reset) { struct qcom_scm_desc desc =3D { diff --git a/drivers/firmware/qcom/qcom_scm.h b/drivers/firmware/qcom/qcom_= scm.h index cf90a565fdfb..e1554997ca08 100644 --- a/drivers/firmware/qcom/qcom_scm.h +++ b/drivers/firmware/qcom/qcom_scm.h @@ -105,6 +105,8 @@ int qcom_scm_shm_bridge_enable(struct device *scm_dev); #define QCOM_SCM_PIL_PAS_SHUTDOWN 0x06 #define QCOM_SCM_PIL_PAS_IS_SUPPORTED 0x07 #define QCOM_SCM_PIL_PAS_MSS_RESET 0x0a +#define QCOM_SCM_PIL_PAS_WIFI_PWR_EN 0x17 +#define QCOM_SCM_PIL_PAS_WIFI_PWR_DIS 0x18 #define QCOM_SCM_PIL_PAS_GET_RSCTABLE 0x21 =20 #define QCOM_SCM_SVC_IO 0x05 diff --git a/include/linux/firmware/qcom/qcom_scm.h b/include/linux/firmwar= e/qcom/qcom_scm.h index 5747bd191bf1..9258839ae746 100644 --- a/include/linux/firmware/qcom/qcom_scm.h +++ b/include/linux/firmware/qcom/qcom_scm.h @@ -93,6 +93,7 @@ struct resource_table *qcom_scm_pas_get_rsc_table(struct = qcom_scm_pas_context *c size_t *output_rt_size); =20 int qcom_scm_pas_prepare_and_auth_reset(struct qcom_scm_pas_context *ctx); +int qcom_scm_pas_set_wifi_power_mode(u32 peripheral, bool enable); =20 int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val); int qcom_scm_io_writel(phys_addr_t addr, unsigned int val); --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 519FE514742; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=fi/EfE7j2SMxxjKUF78JB+Qt8+batHcgFDnjTRj4IETm3BJXkkxA5z+fW2dlKvGoHzzArXXt7eI9I6u0/xNbxp2wYgecYztNErihj2ITvdTkCEY9/krIan/iKRDwgINNhd6I4OStzZLbmo3038oJaK0z531RdQZdF9f+mNnA9Pk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=Z6/Qk3n4xeJSYUtJybmaG4oCwMF/08rA0O1ozW4Hj7w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JfmoJJqduEmkpMv9aufTA1NjvGav4zf7hBec3N6/dc5WbidRaKBQ9klXiPw+dV/xU/qzFrHRUc4vYgsxRo8U36izBSyQAJiNifxVi0xAVgvQcLhUeB2Xe9jOTXKrSEBQL4XNWTKhKPrZRuecPkr15CuoeHfITLFTnlarlPq4Jxk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X9EvgTBR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="X9EvgTBR" Received: by smtp.kernel.org (Postfix) with ESMTPS id 2AB34C2BD01; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=Z6/Qk3n4xeJSYUtJybmaG4oCwMF/08rA0O1ozW4Hj7w=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=X9EvgTBRr32+EqMMWUEaAppxkOL/OtnL6jsEUbj/VyY8+Tc+0XbfS1saS0AMHEpdf GgHMW6tyGlT8uDXLhk0q9e0CvcVGubQ5esdAB0Q6NOITJRfylwVbN4/kHkqAlt7HzL 8hmgY8WX58VxanfE3mbp3bwcjYBkZ92EA9wYJpn+MkW/jMDVYHZJm/gBCeF+K33DJP f4CfvPPOUuGyixOmIySk+VyFKshIVJCull+lE2oQ+XlOSkcOlKtTmKvM1S+BgLB2sg 4VnYkXRiDb8kZTivrTT8dB6vwUUnREidgvf4GYItNuAHRRyu/Pd5IyU16zMJ6vDzfd lsMXh/cs68lPw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17DAEC9830B; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:13 +0400 Subject: [PATCH ath-next 07/16] wifi: ath11k: Register userPD interrupts and SMEM entries Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-7-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=10055; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=7rpr5lypcGKAhre+UQc1WGPdhHabdKnP7DtLs3iPrPY=; b=WiChA4t5yACxD/OYP58ovQZ3RNhOIJsQOeGFLG4BJ7b/MvgrZrJ7/bfR4SDpFU2J03zT61yif sz/Egm+NbJhAjaD4q43JjOHAGrtB3OLTjEiKDmetlNA1HPo+nGnfUWQ X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Q6 and the ath11k driver communicate using SMEM and IRQs. Spawn interrupt is triggered once the userPD thread is spawned. Ready interrupts denote that the userPD is completely powered up and ready. Stop-ack is to acknowledge the ath11k driver that userPD has stopped. The root PD sets the spawn and stop bits in SMEM upon boot which the ath11k driver reads to derive the userPD ID. Set the spawn bit in SMEM to instruct Q6 to spawn a userPD which brings up the radio. Similarly, the stop bit is set when a userPD needs to be stopped. Keep track of the userPDs that have been spawned and stopped in the global rproc_info structure to determine when the rootPD can be stopped. Move boot and shutdown of the root PD to probe and remove functions respectively. This is to ensure that the root PD is booted before any userPDs are spawned. For non-MPD platforms, the this move has no functional impact. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 176 ++++++++++++++++++++++++++++++= ++-- drivers/net/wireless/ath/ath11k/ahb.h | 25 +++++ 2 files changed, 191 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 9fe2e112dfb8..25f9a992a7d2 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -22,6 +22,13 @@ #include #include =20 +#define ATH11K_UPD_IRQ_WRD_LEN 18 +static const char *const ath11k_userpd_irq[ATH11K_USERPD_MAX_IRQ] =3D { + "spawn", + "ready", + "stop-ack", +}; + static const struct of_device_id ath11k_ahb_of_match[] =3D { /* TODO: Should we change the compatible string to something similar * to one that ath10k uses? @@ -46,6 +53,15 @@ MODULE_DEVICE_TABLE(of, ath11k_ahb_of_match); #define ATH11K_IRQ_CE0_OFFSET 4 =20 /* + * Multi-UserPD Architecture: + * + * One Q6 RootPD (managed by separate rproc driver) supports multiple + * ath12k UserPDs. Each UserPD represents a WiFi radio instance. + * + * Lifecycle: + * - RootPD boots when first UserPD probes + * - All UserPDs share RootPD's SSR notifier + * * Global Driver-level Locking: * - ath11k_rproc_info_lock: Protects rproc_info allocation/free */ @@ -831,6 +847,126 @@ static const struct ath11k_hif_ops ath11k_ahb_hif_ops= _wcn6750 =3D { .ce_irq_disable =3D ath11k_pci_disable_ce_irqs_except_wake_irq, }; =20 +static int ath11k_ahb_init_userpd(struct ath11k_base *ab, int userpd_id) +{ + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + + lockdep_assert_held(&ath11k_rproc_info_lock); + + switch (ab->hw_rev) { + case ATH11K_HW_IPQ5018_HW10: + if (userpd_id !=3D ATH11K_AHB_USERPD_ID_1) + return -EINVAL; + + ab_ahb->userpd_id =3D userpd_id; + break; + default: + return -EINVAL; + } + + g_rproc_info->userpd[userpd_id - 1] =3D ab_ahb; + g_rproc_info->num_userpd++; + + return 0; +} + +static irqreturn_t ath11k_userpd_irq_handler(int irq, void *data) +{ + struct ath11k_base *ab =3D data; + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + + if (irq =3D=3D ab_ahb->userpd_irq_num[ATH11K_USERPD_SPAWN_IRQ]) { + complete(&ab_ahb->userpd_spawned); + } else if (irq =3D=3D ab_ahb->userpd_irq_num[ATH11K_USERPD_READY_IRQ]) { + complete(&ab_ahb->userpd_ready); + } else if (irq =3D=3D ab_ahb->userpd_irq_num[ATH11K_USERPD_STOP_ACK_IRQ])= { + complete(&ab_ahb->userpd_stopped); + } else { + ath11k_err(ab, "Invalid userpd interrupt\n"); + return IRQ_NONE; + } + + return IRQ_HANDLED; +} + +static void ath11k_ahb_cleanup_userpd(struct ath11k_base *ab) +{ + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + struct ath11k_ahb_rproc_info *rproc_info =3D ab_ahb->rproc_info; + + lockdep_assert_held(&ath11k_rproc_info_lock); + + if (!rproc_info) + return; + + if (rproc_info && ab_ahb->userpd_id > 0 && + ab_ahb->userpd_id < ATH11K_AHB_USERPD_ID_MAX) { + rproc_info->userpd[ab_ahb->userpd_id - 1] =3D NULL; + rproc_info->num_userpd--; + ab_ahb->rproc_info =3D NULL; + } +} + +static int ath11k_ahb_config_userpd_irq(struct ath11k_base *ab) +{ + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + char *upd_irq_name; + int userpd_id; + int i, ret; + + ab_ahb->spawn_state =3D devm_qcom_smem_state_get(&ab->pdev->dev, "spawn", + &ab_ahb->spawn_bit); + if (IS_ERR(ab_ahb->spawn_state)) + return dev_err_probe(&ab->pdev->dev, PTR_ERR(ab_ahb->spawn_state), + "Failed to acquire spawn state\n"); + + ab_ahb->stop_state =3D devm_qcom_smem_state_get(&ab->pdev->dev, "stop", + &ab_ahb->stop_bit); + if (IS_ERR(ab_ahb->stop_state)) + return dev_err_probe(&ab->pdev->dev, PTR_ERR(ab_ahb->stop_state), + "Failed to acquire stop state\n"); + + mutex_lock(&ath11k_rproc_info_lock); + + userpd_id =3D ab_ahb->spawn_bit / 8; + ret =3D ath11k_ahb_init_userpd(ab, userpd_id); + if (ret) { + mutex_unlock(&ath11k_rproc_info_lock); + return ret; + } + + mutex_unlock(&ath11k_rproc_info_lock); + + for (i =3D 0; i < ATH11K_USERPD_MAX_IRQ; i++) { + ab_ahb->userpd_irq_num[i] =3D platform_get_irq_byname_optional(ab->pdev, + ath11k_userpd_irq[i]); + if (ab_ahb->userpd_irq_num[i] < 0) + return ab_ahb->userpd_irq_num[i]; + + upd_irq_name =3D devm_kzalloc(&ab->pdev->dev, ATH11K_UPD_IRQ_WRD_LEN, + GFP_KERNEL); + if (!upd_irq_name) + return -ENOMEM; + + scnprintf(upd_irq_name, ATH11K_UPD_IRQ_WRD_LEN, "UserPD%u-%s", + ab_ahb->userpd_id, ath11k_userpd_irq[i]); + ret =3D devm_request_threaded_irq(&ab->pdev->dev, ab_ahb->userpd_irq_num= [i], + NULL, ath11k_userpd_irq_handler, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + upd_irq_name, ab); + if (ret) + return dev_err_probe(&ab->pdev->dev, ret, + "Request %s irq failed: %d\n", + ath11k_userpd_irq[i], ret); + } + + init_completion(&ab_ahb->userpd_spawned); + init_completion(&ab_ahb->userpd_ready); + init_completion(&ab_ahb->userpd_stopped); + + return 0; +} + static int ath11k_ahb_root_pd_state_notifier(struct notifier_block *nb, const unsigned long event, void *data) { @@ -1032,7 +1168,7 @@ static int ath11k_ahb_configure_rproc(struct ath11k_b= ase *ab) if (ret < 0) { ret =3D dev_err_probe(&ab->pdev->dev, ret, "failed to register rproc notifier\n"); - goto err_put_rproc; + goto err_cleanup_userpd; } =20 if (ab->hw_params.m3_fw_support && @@ -1057,13 +1193,28 @@ static int ath11k_ahb_configure_rproc(struct ath11k= _base *ab) =20 mutex_unlock(&ath11k_rproc_info_lock); =20 + /* + * UserPD interrupts are specific to multi-PD configs/firmware only. + * If interrupts aren't found, continue execution for non-MPD platforms. + */ + ret =3D ath11k_ahb_config_userpd_irq(ab); + if (ret && ret !=3D -EINVAL && ret !=3D -ENXIO) + return dev_err_probe(&ab->pdev->dev, ret, + "failed to configure userpd interrupts\n"); + return 0; =20 err_unreg_notifier: ath11k_ahb_unregister_rproc_notifier(); =20 -err_put_rproc: - rproc_put(g_rproc_info->tgt_rproc); +err_cleanup_userpd: + ath11k_ahb_cleanup_userpd(ab); + if (g_rproc_info && !g_rproc_info->num_userpd) { + rproc_put(g_rproc_info->tgt_rproc); + kfree(g_rproc_info); + g_rproc_info =3D NULL; + } + mutex_unlock(&ath11k_rproc_info_lock); return ret; } @@ -1078,15 +1229,19 @@ static void ath11k_ahb_deconfigure_rproc(struct ath= 11k_base *ab) =20 mutex_lock(&ath11k_rproc_info_lock); =20 - ath11k_ahb_unregister_rproc_notifier(); + ath11k_ahb_cleanup_userpd(ab); =20 - if (g_rproc_info->root_pd_booted && - g_rproc_info->tgt_rproc->state =3D=3D RPROC_RUNNING) - rproc_shutdown(g_rproc_info->tgt_rproc); + if (!g_rproc_info->num_userpd) { + ath11k_ahb_unregister_rproc_notifier(); =20 - rproc_put(g_rproc_info->tgt_rproc); - kfree(g_rproc_info); - g_rproc_info =3D NULL; + if (g_rproc_info->root_pd_booted && + g_rproc_info->tgt_rproc->state =3D=3D RPROC_RUNNING) + rproc_shutdown(g_rproc_info->tgt_rproc); + + rproc_put(g_rproc_info->tgt_rproc); + kfree(g_rproc_info); + g_rproc_info =3D NULL; + } =20 mutex_unlock(&ath11k_rproc_info_lock); } @@ -1429,6 +1584,7 @@ static int ath11k_ahb_probe(struct platform_device *p= dev) platform_set_drvdata(pdev, ab); ab_ahb =3D ath11k_ahb_priv(ab); ab_ahb->ab =3D ab; + ab_ahb->userpd_id =3D 0; =20 ret =3D ath11k_pcic_register_pci_ops(ab, pci_ops); if (ret) { diff --git a/drivers/net/wireless/ath/ath11k/ahb.h b/drivers/net/wireless/a= th/ath11k/ahb.h index 033d6223494b..12e0c4d27a0c 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.h +++ b/drivers/net/wireless/ath/ath11k/ahb.h @@ -19,6 +19,11 @@ #define ATH11K_ROOTPD_READY_TIMEOUT (5 * HZ) #define ATH11K_RPROC_AFTER_POWERUP QCOM_SSR_AFTER_POWERUP =20 +enum ath11k_ahb_userpd_id { + ATH11K_AHB_USERPD_ID_1 =3D 1, + ATH11K_AHB_USERPD_ID_MAX, +}; + enum ath11k_ahb_smp2p_msg_id { ATH11K_AHB_POWER_SAVE_ENTER =3D 1, ATH11K_AHB_POWER_SAVE_EXIT, @@ -34,10 +39,20 @@ struct ath11k_ahb_rproc_info { void *root_pd_notifier; bool root_pd_booted; =20 + u8 num_userpd; + struct ath11k_ahb *userpd[ATH11K_AHB_USERPD_ID_MAX]; + /* Bitmap of loaded M3 firmwares indexed by hardware revision */ u32 m3_loaded; }; =20 +enum ath11k_ahb_userpd_irq { + ATH11K_USERPD_SPAWN_IRQ, + ATH11K_USERPD_READY_IRQ, + ATH11K_USERPD_STOP_ACK_IRQ, + ATH11K_USERPD_MAX_IRQ, +}; + struct ath11k_ahb { struct ath11k_base *ab; struct { @@ -55,6 +70,16 @@ struct ath11k_ahb { struct qcom_smem_state *smem_state; } smp2p_info; struct ath11k_ahb_rproc_info *rproc_info; + + struct qcom_smem_state *spawn_state; + struct qcom_smem_state *stop_state; + struct completion userpd_spawned; + struct completion userpd_ready; + struct completion userpd_stopped; + u32 userpd_id; + u32 spawn_bit; + u32 stop_bit; + int userpd_irq_num[ATH11K_USERPD_MAX_IRQ]; }; =20 static inline struct ath11k_ahb *ath11k_ahb_priv(struct ath11k_base *ab) --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53EA651475A; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=l7dByBlo14o9V0L9cmG4OYSPW0qgxYWam/BUI4+9R5nevkaxrDloXSG3yWbnQhBxlnZ6bBo3+/fX9rStI/HfMv6BFUzZVs9JTs9u8mBlCAKYe3/hCqFwW5sq5m4bJhFzZ73BMQAjD4fj5TK5sQ+78jJw+o6DNKY5MIGZaBFtqr8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=+v0rqjwUQgtaaLTpQID1QK2JxJIvh8LNAtxyU29DchY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aWvLnxMXOv8DEtQ8MzKUIdKzugMdRoK8e2va/tAkgoUNIE44j5IbD8D8M2NWkwnD19aRrYUPw8AyMPRvI5SgisZgdX8yIY83TANd9QWutaaSYu1KBZAicoxaDlhgF+zmKlL4CWNWoGy+3+8/sAYVSBOJQVTMMwZ5tpdP3HIxxqA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cg9fvkrP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Cg9fvkrP" Received: by smtp.kernel.org (Postfix) with ESMTPS id 3CF48C2BCFA; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=+v0rqjwUQgtaaLTpQID1QK2JxJIvh8LNAtxyU29DchY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Cg9fvkrP3kshvhtKyRAX5GHIfxGh0kON0BidN4V9+GXFGNEjTBGNQPU88ES9ggAjf AVVf++CwoM8jNmOXIFUlPDfj0yVoBMkuLfaPufYNXURz3VRrbbSJz8sxDkJfNOiWvT u1B/M/+h3hRq+hu8Tzpvqr8sjDjSRpkAVQei5nxi+FX7HbttEIg1uLvP6/IpYhY2/Z xrF/D6GkU/80ScHh8YRXfvwXUp9DBS1LBtSUOfYgrkLnb6+mDRRPup4AXhjsKj4yeh nDFdqbNoTdW8hPUBxqwC88der3RQGMQNTRVa7vwHyFLTVh2kpGFpO0IcRSryVO/Cea vgAOxxUBopBcQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A42CC982FA; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:14 +0400 Subject: [PATCH ath-next 08/16] wifi: ath11k: Power up userPD Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-8-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=3294; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=blryMPihJDe3QtxZzbmPzNM8CFDhfBVHVgX5a2hkIxQ=; b=9hjw2jEOld1XMsIhO0M9lg/fpvmOgz2+LYOHgijLKI10d7TIalZds5O8qjonbkonLd7w3aGfz UYDqoL8Ic3xDweFd1/CEGee56UJzQ8HCr3zCn0pHOLkDLJTggLjsnMI X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Set the spawn bit to instruct Q6 to spawn the userPD thread. Wait for userPD to spawn which is indicated by spawn interrupt. The ready interrupt is triggered once the userPD is powered up completely. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 56 +++++++++++++++++++++++++++++++= ++++ drivers/net/wireless/ath/ath11k/ahb.h | 7 +++++ 2 files changed, 63 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 25f9a992a7d2..2c41cf585d00 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "ahb.h" #include "debug.h" @@ -430,8 +431,63 @@ static void ath11k_ahb_stop(struct ath11k_base *ab) ath11k_ce_cleanup_pipes(ab); } =20 +static int ath11k_ahb_boot_user_pd(struct ath11k_base *ab) +{ + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + unsigned long time_left; + int ret; + + if (ab->hw_rev =3D=3D ATH11K_HW_IPQ5018_HW10) { + ret =3D qcom_scm_pas_set_wifi_power_mode(MPD_WCNSS_PAS_ID, true); + if (ret) { + ath11k_err(ab, "failed to power up wifi: %d\n", ret); + return ret; + } + } + + ret =3D qcom_smem_state_update_bits(ab_ahb->spawn_state, BIT(ab_ahb->spaw= n_bit), + BIT(ab_ahb->spawn_bit)); + if (ret) { + ath11k_err(ab, "Failed to update spawn state %d\n", ret); + return ret; + } + + time_left =3D wait_for_completion_timeout(&ab_ahb->userpd_spawned, + ATH11K_USERPD_SPAWN_TIMEOUT); + if (!time_left) { + ath11k_err(ab, "UserPD spawn wait timed out\n"); + return -ETIMEDOUT; + } + + time_left =3D wait_for_completion_timeout(&ab_ahb->userpd_ready, + ATH11K_USERPD_READY_TIMEOUT); + if (!time_left) { + ath11k_err(ab, "UserPD ready wait timed out\n"); + return -ETIMEDOUT; + } + + qcom_smem_state_update_bits(ab_ahb->spawn_state, BIT(ab_ahb->spawn_bit), = 0); + + ath11k_dbg(ab, ATH11K_DBG_AHB, "UserPD%d is now UP\n", ab_ahb->userpd_id); + + return 0; +} + static int ath11k_ahb_power_up(struct ath11k_base *ab) { + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + int ret; + + if (ab_ahb->userpd_id > 0 && + ab_ahb->userpd_id < ATH11K_AHB_USERPD_ID_MAX) { + ret =3D ath11k_ahb_boot_user_pd(ab); + if (ret) { + ath11k_err(ab, "failed to boot userPD%d: %d\n", + ab_ahb->userpd_id, ret); + return ret; + } + } + return 0; } =20 diff --git a/drivers/net/wireless/ath/ath11k/ahb.h b/drivers/net/wireless/a= th/ath11k/ahb.h index 12e0c4d27a0c..0647bdb9ea62 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.h +++ b/drivers/net/wireless/ath/ath11k/ahb.h @@ -19,6 +19,13 @@ #define ATH11K_ROOTPD_READY_TIMEOUT (5 * HZ) #define ATH11K_RPROC_AFTER_POWERUP QCOM_SSR_AFTER_POWERUP =20 +#define ATH11K_USERPD_SPAWN_TIMEOUT (5 * HZ) +#define ATH11K_USERPD_READY_TIMEOUT (10 * HZ) +#define ATH11K_USERPD_STOP_TIMEOUT (5 * HZ) +#define ATH11K_USERPD_FW_NAME_LEN 35 + +#define MPD_WCNSS_PAS_ID 0xD + enum ath11k_ahb_userpd_id { ATH11K_AHB_USERPD_ID_1 =3D 1, ATH11K_AHB_USERPD_ID_MAX, --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D918493D53; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=Kmmgjzo7eQGG+ZEB7Oyg36rlRCQsBWp3NNKmRV8jx9+EGHJBo7PIXApB7bFmLFTkPTPOjtRExVtQQE0/scxdI7u6KsKaJntZmajQf29cWTntrzlknSUgfWprJ85ESiU8fXXv2JNcXSR9cNeEGbS6GQ3neIVOrOBmWYqHhR1Tyk8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=f5A3aOPcpzcnyloEZkCpzWN2JqMgiC0WgPDk/yfr8jk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qhyF43G8LqJ7L6al0FNZk6lWNlKUpIAdMyEGxn4n4qtL3/aTOhCYXaVzOgkRDMnoJjcHQzsfy4OzIYT+gpvFqqprMsDsMBIhSLOrzD/Nv8MJrGSvyXz3BPXoabAj849DBl93AG5+22FPhShlhAoX/bfQEcWQ4qwX8Y89Yk5H9Jw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HVBX4hOh; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HVBX4hOh" Received: by smtp.kernel.org (Postfix) with ESMTPS id 4E8F9C2BCFC; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=f5A3aOPcpzcnyloEZkCpzWN2JqMgiC0WgPDk/yfr8jk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=HVBX4hOh/YRnQc4UjLUWKa//MqZ9sZsYuIRRDHjz6E181sNABE+xo1K+++sp+Vm5O YoeCJsQBQMR7x7xUVnFfZB3/POrK/G+PpSApVZGgk+D48YOGr0y85pUwigahoyfVF1 6REN0Q2O5OzshLTXCZ9ZtQ5JNC0ePgkyQ/Ka/djvJgXi7VDMgucYCsbGT6/PN4Ofic CxXesyhSsGw1MTmcmkvy3BXjx7ZMeKYYX+01aOJkX5g1zu7dU70ZqjLcZcjZtZ3y5T +dAlCNMQfiwqsPKeNMbtkiIFaOE07jmSjVHrmbVK/jFblkENL00sU83gjX+ukcfZtB ZAWFkQqjwWGPw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BFABC9830C; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:15 +0400 Subject: [PATCH ath-next 09/16] wifi: ath11k: Power down userPD Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-9-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=1688; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=f09E/N0UiP2BKaMQj6y/PbCNtm6/77F+Gx3rtxqkmB0=; b=8Th6YZPBmOceHukUz3XAVEKAdI2Cb3gd5mOzw5oZb3/5aqmJLgMbeVE3tRwO8PaAU9+RY1cc6 W713+4AAuEVBuPqzDvgliJZ/m4MhgZmELOS/ZXzN9j2FWPOlmA5dlAo X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Set the stop bit in SMEM to stop the userPD. Wait for stop-ack IRQ to indicate power down completion. For IPQ5018 wifi specifically, invoke an SCM call to power down the radio. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 2c41cf585d00..1b9115311bed 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -491,9 +491,32 @@ static int ath11k_ahb_power_up(struct ath11k_base *ab) return 0; } =20 +static void ath11k_ahb_stop_user_pd(struct ath11k_base *ab) +{ + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + unsigned long time_left; + + qcom_smem_state_update_bits(ab_ahb->stop_state, BIT(ab_ahb->stop_bit), + BIT(ab_ahb->stop_bit)); + + time_left =3D wait_for_completion_timeout(&ab_ahb->userpd_stopped, + ATH11K_USERPD_STOP_TIMEOUT); + if (!time_left) + ath11k_warn(ab, "UserPD stop wait timed out\n"); + + qcom_smem_state_update_bits(ab_ahb->stop_state, BIT(ab_ahb->stop_bit), 0); + + if (ab->hw_rev =3D=3D ATH11K_HW_IPQ5018_HW10) + qcom_scm_pas_set_wifi_power_mode(MPD_WCNSS_PAS_ID, false); +} + static void ath11k_ahb_power_down(struct ath11k_base *ab, bool is_suspend) { - return; + struct ath11k_ahb *ab_ahb =3D ath11k_ahb_priv(ab); + + if (ab_ahb->userpd_id > 0 && + ab_ahb->userpd_id < ATH11K_AHB_USERPD_ID_MAX) + ath11k_ahb_stop_user_pd(ab); } =20 static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab) --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3729A511E8A; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=d3Q5ks4vCtJcp/rCpvi+abmU+JTCbnsLYWygDgQ8uK0rIZIFmxw9hMFjN/uGjONuCkWqPnuBhdjlUDykSOg6tk02I1yScQ7gNWb8RhVbHsgyUX6bYtQ5Q9LVAHRJbgBPYpUIQauVtIlRqQE4u0hCRatBixUUSSxqsA6IMe0BFcs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=EhK0W4v/QWQboSgQv0FiQZyCRjGIoZ4QrJsYKB6dfn8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IvrVkx9whuwx34M5/9Om/yLTEBAAogWPiwrchHPRLpoIRXgSaV+x3yi4F4SglK7owW3B1VS9RqwKxtmSXqFtKhrAdXQZhQw9tPn88xggFQDPUOPSNmivLetIVaHv3kzdtL/WJwHAR1nkHtgjjq84xyN1cwdUecGEDqeIeu35pNo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EReKHZsV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EReKHZsV" Received: by smtp.kernel.org (Postfix) with ESMTPS id 6077DC32786; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=EhK0W4v/QWQboSgQv0FiQZyCRjGIoZ4QrJsYKB6dfn8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=EReKHZsVjtaj262kHJ+tkTTga2kFSlEl/P0mW65wYJITyoVMFYhKEp+dFzD4U450N 8breq4yZKDsQhjc2VfRatTVggL60n46NvLn2ikvNEOQvRc58nYaaLKylsvf0ccQUvR nPYmb3VVvqy0j4svCJQf5CI75Ocrw5OsY/aJIVEe4ZFRdmIO+b2XLdFpjjAOjCN6zk 8DAygTlrzuYwLdV8qpyT92Luu9oXVk9YeuttVIfYlSPEgSFw4yPgMJbqJ/MNw1b5ps 3VvEaS3LeH2Pq5XDtBeg0ifVnh5AFGqpesUOfG/bblV80n2ih1V9DC4TQ0Cbe5g2uu rBJiZQulPxyWA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D205C9830D; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:16 +0400 Subject: [PATCH ath-next 10/16] dt-bindings: net: wireless: ath11k: Add bindings for QCN6122 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-10-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=9542; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=AMmUM3ppUAEMYWiKIHUzMgENqvh58tpVmet+RfpQRGA=; b=KddqHTm2dhPWaE2pvLI3lphALP/XjHvwb66YiQi0ATFRsAwBVw1o7rW8eU8f7RMsko7i5Qy4G VPH400sOf2dBPijM66rmtkG3yrwzaGbdnlvpuaVMpkxXkPSWR3QMIsr X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Add bindings for QCN6122, which is a companion chip to IPQ5018. The QCN6122 is a 5G/6G WiFi chip that is used in conjunction with the IPQ5018 SoC in a multi-PD (MPD) configuration. WiFi on IPQ5018 boards come in one of the following configurations: 1. IPQ5018 (standalone) + optional 5G/6G WiFi card (such as QCN9074) 2. IPQ5018 (MPD) + one or two 5G/6G QCN6122 WiFi chips. IPQ5018 implements the multi-PD architecture as follows: +-----------------------------+ | Q6 Remote Processor | | RootPD | +--------------+--------------+ | | | +---------------------+---------------------+ | | | +-----v-----+ +-----v-----+ +-----v-----+ | UserPD1 | | UserPD2 | | UserPD3 | | IPQ5018 | | QCN6122 #1| | QCN6122 #2| | (Radio) | | (Radio) | | (Radio) | +-----------+ +-----------+ +-----------+ The rootPD is responsible for managing the lifecycle of the UserPD and shared resources and providing SSR notifiers. There are different firmware blobs that include either the rootPD and userPD binaries for IPQ5018-only which auto-spawns the userPD for IPQ5018 WiFi, or for IPQ5018 and QCN6122 for which the userPDs for each radio must be spawned by the ath11k driver. SMP2P is used for signaling between the host and the Q6 remote processor to manage the lifecycle of the userPDs, so add the required interrupts and smem-states for incoming and outgoing interrupts in the case of the IPQ5018 + QCN6122 MPD configuration. Otherwise, the SMP2P interrupts and smem-states are not required for the IPQ5018-only configuration. In addition, document the memory regions needed for loading the BDF and M3 firmware as well as for assigning the M3 dump memory block. It's worth noting that QCN6122 does not have its own Q6 firmware blobs. Instead, the firmware segments for QCN6122 are included in the IPQ5018 MPD firmware blob(s). In addition, the QCN6122 M3 firmware which does come separately is loaded into the Q6 memory carveout of IPQ5018, hence the need for a dedicated "m3-region" reserved memory region. Signed-off-by: George Moussalem --- .../bindings/net/wireless/qcom,ath11k.yaml | 144 +++++++++++++++++= +++- 1 file changed, 142 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yam= l b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml index 621ad6d4ddad..10102b5ea8c8 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml @@ -20,6 +20,7 @@ properties: - qcom,ipq5018-wifi - qcom,ipq6018-wifi - qcom,ipq8074-wifi + - qcom,qcn6122-wifi - qcom,wcn6750-wifi =20 reg: @@ -30,11 +31,11 @@ properties: maxItems: 52 =20 interrupts-extended: - minItems: 56 + minItems: 17 maxItems: 56 =20 interrupt-names: - minItems: 32 + minItems: 17 maxItems: 56 =20 qcom,rproc: @@ -459,6 +460,93 @@ allOf: required: - interrupt-names =20 + - if: + properties: + compatible: + contains: + enum: + - qcom,qcn6122-wifi + then: + properties: + interrupts-extended: + items: + - description: interrupt event for ring CE1 + - description: interrupt event for ring CE2 + - description: interrupt event for ring CE3 + - description: interrupt event for ring CE4 + - description: interrupt event for ring CE5 + - description: interrupt event for ring DP1 + - description: interrupt event for ring DP2 + - description: interrupt event for ring DP3 + - description: interrupt event for ring DP4 + - description: interrupt event for ring DP5 + - description: interrupt event for ring DP6 + - description: interrupt event for ring DP7 + - description: interrupt event for ring DP8 + - description: Q6 firmware user PD fatal interrupt event + - description: Q6 firmware user PD ready interrupt event + - description: Q6 firmware user PD spawn interrupt event + - description: Q6 firmware user PD stop ack interrupt event + interrupt-names: + minItems: 17 + items: + - const: ce1 + - const: ce2 + - const: ce3 + - const: ce4 + - const: ce5 + - const: dp1 + - const: dp2 + - const: dp3 + - const: dp4 + - const: dp5 + - const: dp6 + - const: dp7 + - const: dp8 + - const: fatal + - const: ready + - const: spawn + - const: stop-ack + memory-region: + minItems: 1 + items: + - description: memory region for Q6 firmware + - description: memory region for M3 firmware + - description: memory region for M3 dump + memory-region-names: + minItems: 1 + items: + - const: q6-region + - const: m3-region + - const: m3-dump + qcom,smem-states: + items: + - description: Signal bit used to shutdown Q6 user PD + items: + - description: Phandle to the Shared Memory Point 2 Point = device + - description: Single bit index to toggle in the value sen= t to the remote processor + maximum: 32 + - description: Signal bit used to stop Q6 user PD + items: + - description: Phandle to the Shared Memory Point 2 Point = device + - description: Single bit index to toggle in the value sen= t to the remote processor + maximum: 32 + - description: Signal bit used to spawn Q6 user PD + items: + - description: Phandle to the Shared Memory Point 2 Point = device + - description: Single bit index to toggle in the value sen= t to the remote processor + maximum: 32 + qcom,smem-state-names: + items: + - const: shutdown + - const: stop + - const: spawn + required: + - interrupts-extended + - interrupt-names + - qcom,smem-states + - qcom,smem-state-names + - if: properties: compatible: @@ -861,3 +949,55 @@ examples: =20 qcom,rproc =3D <&q6v5_wcss>; }; + + wifi1: wifi@b00a040 { + reg =3D <0x0b00a040 0x0>; + compatible =3D "qcom,qcn6122-wifi"; + + interrupts-extended =3D <&intc GIC_SPI 416 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 417 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 418 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 419 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 420 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 421 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 422 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 423 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 424 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 425 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 426 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 427 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 428 IRQ_TYPE_EDGE_RISING>, + <&wcss_smp2p_in 16 IRQ_TYPE_NONE>, + <&wcss_smp2p_in 17 IRQ_TYPE_NONE>, + <&wcss_smp2p_in 20 IRQ_TYPE_NONE>, + <&wcss_smp2p_in 19 IRQ_TYPE_NONE>; + interrupt-names =3D "ce1", + "ce2", + "ce3", + "ce4", + "ce5", + "dp1", + "dp2", + "dp3", + "dp4", + "dp5", + "dp6", + "dp7", + "dp8", + "fatal", + "ready", + "spawn", + "stop-ack"; + + qcom,smem-states =3D <&wcss_smp2p_out 16>, + <&wcss_smp2p_out 17>, + <&wcss_smp2p_out 18>; + qcom,smem-state-names =3D "shutdown", + "stop", + "spawn"; + + memory-region =3D <&q6_region_qcn6122_1>, <&q6_region_ipq5018>, <&= m3_dump_qcn6122_1>; + memory-region-names =3D "q6-region", "m3-region", "m3-dump"; + + status =3D "disabled"; + }; --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FEAB51356F; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=iqGtsu4D5haxmWtjFrtrczj2q5CIpRxB9x6byC4Cx0+E48HxXT/tmwg+tYwI3SMJYPCYh+EOjsoSAMDFJJyCxX1bBwMeIt/3qwRmEIr3h+GiaUazMp7iOedM7SJjk96z+96zCWZ+3tQFQOV3inljamx7ybFzNXP2K+385dYx2Pk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=T4Gp+UnQfJggXdZjPcApWFXsQ85bp+hX6k7kInFCoe4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qmqJwuTfH1X/uGs2NGZNU3TrkvxQxzrT5IvDCiHOwA8haVaNW7zTRKVu3bKRxoDTUMF71doOHi6E6LCWdflJt0WfWqIM+T6PwNfNFeqbVGbjQGU9ezdElyfvppQkPKTSg1qJj52H9PWNexsF7a/D4uUanX7GFwApy2/upnJPtvE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RbSRr33o; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RbSRr33o" Received: by smtp.kernel.org (Postfix) with ESMTPS id 6EC0DC4AF0F; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=T4Gp+UnQfJggXdZjPcApWFXsQ85bp+hX6k7kInFCoe4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=RbSRr33o/COFBlGgvu6POYg4CNuqDD09YfSKBPkbEADJabXfMJY1xVm0/mRMEgzBf dNHH2KDgFUjo93I2kDib7/5NZBAQ6cAwxdcoNndypw/fHP1omjEsA+XPAalVyGhUNl 1leRHWQHSnLoQ8SN5xIVfoqMVlW9vTjiisHl+rbQCeN35hUfVMp8J4mXOO+f09zkdz tZ0ryLaGI3v9EPoVw3PRZBdQSUXnajZbC09SamJoVxbepy8gySoMVGEqQl+P4Qja8L jJmNUs9M3EFYVOcDyuuQVlyHZLzFM2i+e9rGLuegagzS1QNO7NDQlrTJSYePOrCt6V go4QgRPE4AJpw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CD79C9830B; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:17 +0400 Subject: [PATCH ath-next 11/16] wifi: ath11k: add hw params for QCN6122 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-11-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=5214; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=5ALmRWICK/brup6W9KBxCblyg88vPuQc4jQzYS+ockc=; b=IBzg1u3iKo1e45bVN9ORNakmMv0xLJe8QmrypwwVwuhFdN93+tomR3RI3AkfSn/JbhgI4LHwL Unx2FNE4r4fB9kQmUBctK/oD+TYh2DIxObBXv+FSGpmbdnlkgmU/ws+ X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Add QCN6122 platform support. QCN6122 is a PCIe based solution that is attached to and enumerated by the WPSS (Wireless Processor SubSystem) Q6 processor. Though it is a PCIe device, since it is not attached to APSS processor, APSS will be unaware of such a decice and hence it is registered to the APSS processor as a platform AHB device. As such, QCN6122 is a hybrid bus type device and follows the same codepath as for WCN6750. This is a heavily simplified version of below downstream patch: Link: https://git.codelinaro.org/clo/qsdk/oss/system/feeds/wlan-open/-/blob= /NHSS.QSDK.12.4.5.r2/mac80211/patches/232-ath11k-qcn6122-support.patch Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/core.c | 85 ++++++++++++++++++++++++++++++= ++++ drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/qmi.h | 3 +- 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/= ath/ath11k/core.c index 428f382e74a9..0a38db1ee175 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -936,6 +936,91 @@ static const struct ath11k_hw_params ath11k_hw_params[= ] =3D { .cfr_num_stream_bufs =3D 255, .cfr_stream_buf_size =3D 8200, }, + { + .hw_rev =3D ATH11K_HW_QCN6122_HW10, + .name =3D "qcn6122 hw1.0", + .fw =3D { + .dir =3D "QCN6122/hw1.0", + .board_size =3D 256 * 1024, + .cal_offset =3D 128 * 1024, + .m3_loader =3D ath11k_m3_fw_loader_ahb, + }, + .max_radios =3D MAX_RADIOS_5018, + .bdf_addr =3D 0x4D200000, + .hw_ops =3D &ipq5018_ops, + .internal_sleep_clock =3D false, + .qmi_service_ins_id =3D ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6122, + .host_ce_config =3D ath11k_host_ce_config_qcn9074, + .ce_count =3D CE_CNT_5018, + .target_ce_config =3D ath11k_target_ce_config_wlan_ipq5018, + .target_ce_count =3D TARGET_CE_CNT_5018, + .svc_to_ce_map =3D ath11k_target_service_to_ce_map_wlan_ipq5018, + .svc_to_ce_map_len =3D SVC_CE_MAP_LEN_5018, + .single_pdev_only =3D false, + .rxdma1_enable =3D true, + .num_rxdma_per_pdev =3D RXDMA_PER_PDEV_5018, + .rx_mac_buf_ring =3D false, + .vdev_start_delay =3D false, + .htt_peer_map_v2 =3D true, + + .spectral =3D { + .fft_sz =3D 2, + .fft_pad_sz =3D 0, + .summary_pad_sz =3D 16, + .fft_hdr_len =3D 24, + .max_fft_bins =3D 1024, + .fragment_160mhz =3D false, + }, + + .interface_modes =3D BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_MESH_POINT), + .supports_monitor =3D true, + .full_monitor_mode =3D false, + .supports_shadow_regs =3D false, + .idle_ps =3D false, + .supports_sta_ps =3D false, + .coldboot_cal_mm =3D false, + .coldboot_cal_ftm =3D false, + .cbcal_restart_fw =3D true, + .fw_mem_mode =3D 1, + .num_vdevs =3D 16 + 1, + .num_peers =3D 512, + .supports_suspend =3D false, + .hal_desc_sz =3D sizeof(struct hal_rx_desc_qcn9074), + .supports_regdb =3D false, + .fix_l1ss =3D true, + .credit_flow =3D false, + .hal_params =3D &ath11k_hw_hal_params_ipq5018, + .supports_dynamic_smps_6ghz =3D false, + .alloc_cacheable_memory =3D false, + .supports_rssi_stats =3D false, + .fw_wmi_diag_event =3D false, + .current_cc_support =3D false, + .dbr_debug_support =3D true, + .global_reset =3D false, + .bios_sar_capa =3D NULL, + .m3_fw_support =3D true, + .fixed_bdf_addr =3D true, + .fixed_mem_region =3D true, + .static_window_map =3D true, + .hybrid_bus_type =3D true, + .fixed_fw_mem =3D false, + .support_off_channel_tx =3D false, + .supports_multi_bssid =3D false, + + .sram_dump =3D {}, + + .tcl_ring_retry =3D true, + .tx_ring_size =3D DP_TCL_DATA_RING_SIZE, + .smp2p_wow_exit =3D false, + .support_fw_mac_sequence =3D false, + .support_dual_stations =3D false, + .pdev_suspend =3D false, + .cfr_support =3D false, + .cfr_num_stream_bufs =3D 0, + .cfr_stream_buf_size =3D 0, + }, }; =20 static const struct dmi_system_id ath11k_pm_quirk_table[] =3D { diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/= ath/ath11k/core.h index a0d725923ef2..e92ec95dd384 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -153,6 +153,7 @@ enum ath11k_hw_rev { ATH11K_HW_IPQ5018_HW10, ATH11K_HW_QCA2066_HW21, ATH11K_HW_QCA6698AQ_HW21, + ATH11K_HW_QCN6122_HW10, }; =20 enum ath11k_firmware_mode { diff --git a/drivers/net/wireless/ath/ath11k/qmi.h b/drivers/net/wireless/a= th/ath11k/qmi.h index 350816c81ee5..f5442a04f079 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.h +++ b/drivers/net/wireless/ath/ath11k/qmi.h @@ -21,10 +21,11 @@ #define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074 0x02 #define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9074 0x07 #define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_WCN6750 0x03 +#define ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6122 0x40 #define ATH11K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01 32 #define ATH11K_QMI_RESP_LEN_MAX 8192 #define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01 52 -#define ATH11K_QMI_CALDB_SIZE 0x480000 +#define ATH11K_QMI_CALDB_SIZE 0x500000 #define ATH11K_QMI_BDF_EXT_STR_LENGTH 0x20 #define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT 5 =20 --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C83D513569; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=B6jjJs/m46keiogupbI+bbLVbGY3jEGK9ZMVglYL+UrzyjxHt8NiXt1KauujllpsXVG49GCsU7X2Op3N/8Vp+Gd52mqreEsUh/d0an2xMFBIHueUPHc8L8fFi4bB7A85fWSPJzvbg9jD5rlJBccZKctT6M+YM3S7EngACNU29aw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=V8EpBw6k67scWE9ppUReXHMdRE5KShJwjQSCU4ziemI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cT/CMGL2c1EQnIfVzorxYFFsGl2p1PkcH8VEs73MFaKuexXfhkM6J2WGHra8sl5omyBpGlZAO4FgvkxSq0znqsPkmkt6zVP7Gjt3623jXRckaxLeE4WFk1IYw1HMFchMmYQx1tq0y2P/nQxSdSkwIkl0fknTeOkiTRa314bGHlk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LlR4E/nf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LlR4E/nf" Received: by smtp.kernel.org (Postfix) with ESMTPS id 7F617C32782; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=V8EpBw6k67scWE9ppUReXHMdRE5KShJwjQSCU4ziemI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=LlR4E/nfchZUCMdSpV8rOxOIZp5F1Y6zZ/Y1xIDBA18/T3SZiSoUKhA3ylfUCWGkQ bM4G0L0GUvkWMPkV655WydwWUBbwuJs1ysSR/RfPUy1UHzREqy3UiFIiniAKKFNeik 9w4etVnod5thmRgyZaIHP4zWWKZN6xz6Waa//7AsLh5p14h7QkY3D4NkEZrZLkAIfC tG56pqhzzeJcKgWTCkNWEM9MftM2tzlelkUjvcgUpAp9o0M9KOeFIVNiO0FmcnH52D COQquHD+gzX0dK1MHmsTmWVCG8mM0Ki4Tj+/cOG7kKf96lQ9ohseEwV2zLCz2dRJu3 RdosGFyM1MtmQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E3A1C982FA; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:18 +0400 Subject: [PATCH ath-next 12/16] wifi: ath11k: add hal regs for QCN6122 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-12-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=4921; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=BNVxrxCvphr2PbaY3QLCfMXAa89mIJNLaIy4fyfiBB0=; b=CyIsVjJsILDCihgmPBFEa8x1E/e4/uO3WqMYyXCmeOHB6ipTjw7ii0YjhmtSz2AbRWThG2u00 w1VU9u3YWSKAgo/WYatWR/amSb/0pTU3ELNMKnl0l0J45jY/ye8TWgw X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Add HAL changes required to support QCN6122. While offsets for QCN6122 are similar to those of WCN6750, QCN6122 does not support shadow regs and the PCIE PCS/Serdes tuning register offsets do not apply to QCN6122. So add its own HAL register offsets. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/core.c | 1 + drivers/net/wireless/ath/ath11k/hw.c | 75 ++++++++++++++++++++++++++++++= ++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + 3 files changed, 77 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/= ath/ath11k/core.c index 0a38db1ee175..cf37975fa4cf 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -949,6 +949,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .bdf_addr =3D 0x4D200000, .hw_ops =3D &ipq5018_ops, .internal_sleep_clock =3D false, + .regs =3D &qcn6122_regs, .qmi_service_ins_id =3D ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6122, .host_ce_config =3D ath11k_host_ce_config_qcn9074, .ce_count =3D CE_CNT_5018, diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/at= h/ath11k/hw.c index 93f9a03c48dc..8442fbeb9c58 100644 --- a/drivers/net/wireless/ath/ath11k/hw.c +++ b/drivers/net/wireless/ath/ath11k/hw.c @@ -2836,6 +2836,81 @@ const struct ath11k_hw_hal_params ath11k_hw_hal_para= ms_ipq5018 =3D { .num_tx_rings =3D ARRAY_SIZE(ath11k_hw_tcl2wbm_rbm_map_ipq5018), }; =20 +const struct ath11k_hw_regs qcn6122_regs =3D { + /* SW2TCL(x) R0 ring configuration address */ + .hal_tcl1_ring_base_lsb =3D 0x00000694, + .hal_tcl1_ring_base_msb =3D 0x00000698, + .hal_tcl1_ring_id =3D 0x0000069c, + .hal_tcl1_ring_misc =3D 0x000006a4, + .hal_tcl1_ring_tp_addr_lsb =3D 0x000006b0, + .hal_tcl1_ring_tp_addr_msb =3D 0x000006b4, + .hal_tcl1_ring_consumer_int_setup_ix0 =3D 0x000006c4, + .hal_tcl1_ring_consumer_int_setup_ix1 =3D 0x000006c8, + .hal_tcl1_ring_msi1_base_lsb =3D 0x000006dc, + .hal_tcl1_ring_msi1_base_msb =3D 0x000006e0, + .hal_tcl1_ring_msi1_data =3D 0x000006e4, + .hal_tcl2_ring_base_lsb =3D 0x000006ec, + .hal_tcl_ring_base_lsb =3D 0x0000079c, + + /* TCL STATUS ring address */ + .hal_tcl_status_ring_base_lsb =3D 0x000008a4, + + /* REO2SW(x) R0 ring configuration address */ + .hal_reo1_ring_base_lsb =3D 0x000001ec, + .hal_reo1_ring_base_msb =3D 0x000001f0, + .hal_reo1_ring_id =3D 0x000001f4, + .hal_reo1_ring_misc =3D 0x000001fc, + .hal_reo1_ring_hp_addr_lsb =3D 0x00000200, + .hal_reo1_ring_hp_addr_msb =3D 0x00000204, + .hal_reo1_ring_producer_int_setup =3D 0x00000210, + .hal_reo1_ring_msi1_base_lsb =3D 0x00000234, + .hal_reo1_ring_msi1_base_msb =3D 0x00000238, + .hal_reo1_ring_msi1_data =3D 0x0000023c, + .hal_reo2_ring_base_lsb =3D 0x00000244, + .hal_reo1_aging_thresh_ix_0 =3D 0x00000564, + .hal_reo1_aging_thresh_ix_1 =3D 0x00000568, + .hal_reo1_aging_thresh_ix_2 =3D 0x0000056c, + .hal_reo1_aging_thresh_ix_3 =3D 0x00000570, + + /* REO2SW(x) R2 ring pointers (head/tail) address */ + .hal_reo1_ring_hp =3D 0x00003028, + .hal_reo1_ring_tp =3D 0x0000302c, + .hal_reo2_ring_hp =3D 0x00003030, + + /* REO2TCL R0 ring configuration address */ + .hal_reo_tcl_ring_base_lsb =3D 0x000003fc, + .hal_reo_tcl_ring_hp =3D 0x00003058, + + /* SW2REO ring address */ + .hal_sw2reo_ring_base_lsb =3D 0x0000013c, + .hal_sw2reo_ring_hp =3D 0x00003018, + + /* REO CMD ring address */ + .hal_reo_cmd_ring_base_lsb =3D 0x000000e4, + .hal_reo_cmd_ring_hp =3D 0x00003010, + + /* REO status address */ + .hal_reo_status_ring_base_lsb =3D 0x00000504, + .hal_reo_status_hp =3D 0x00003070, + + /* WCSS relative address */ + .hal_seq_wcss_umac_ce0_src_reg =3D 0x01b80000, + .hal_seq_wcss_umac_ce0_dst_reg =3D 0x01b81000, + .hal_seq_wcss_umac_ce1_src_reg =3D 0x01b82000, + .hal_seq_wcss_umac_ce1_dst_reg =3D 0x01b83000, + + /* WBM Idle address */ + .hal_wbm_idle_link_ring_base_lsb =3D 0x00000874, + .hal_wbm_idle_link_ring_misc =3D 0x00000884, + + /* SW2WBM release address */ + .hal_wbm_release_ring_base_lsb =3D 0x000001ec, + + /* WBM2SW release address */ + .hal_wbm0_release_ring_base_lsb =3D 0x00000924, + .hal_wbm1_release_ring_base_lsb =3D 0x0000097c, +}; + const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074 =3D { .rx_buf_rbm =3D HAL_RX_BUF_RBM_SW3_BM, .tcl2wbm_rbm_map =3D ath11k_hw_tcl2wbm_rbm_map_ipq8074, diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/at= h/ath11k/hw.h index 5a1100ceb895..d9646a491808 100644 --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h @@ -433,6 +433,7 @@ extern const struct ath11k_hw_regs qcn9074_regs; extern const struct ath11k_hw_regs wcn6855_regs; extern const struct ath11k_hw_regs wcn6750_regs; extern const struct ath11k_hw_regs ipq5018_regs; +extern const struct ath11k_hw_regs qcn6122_regs; =20 static inline const char *ath11k_bd_ie_type_str(enum ath11k_bd_ie_type typ= e) { --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C6AC51354A; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=fhsJv9gHESh1CXVJAi66D1V5nv/XsWC008JTw0YLZc8JKOzq1ptALIqJ6iH6o1k10vvhnmi5QwG1c8y1lpHjpbq4hf0p2rKe82BIyyG68bDHGoL8Mpdna09tQFqIwZmxz9wvpa5OkzaMqS9kGpjnnvgKgxtXxqCfZknRSjnWtmw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=xwjhHq+axtyNZtf3ucpzpJBoQOgD2kDsTykcF1+22VU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uQ0hpIrS5VSbuYoB/tTcZWuH21+LKZ6vcJak7kjKkLIxUvZSOgRYlPE1HdGl5UvBcB2g6SdvUCEV9ZVcSd0y91NBHGp5lDRy5/H/+BuUTVuVJ4p3AaI3/v87uJYXOE82kd5Yn3TtJqiSysitNhZb1yO6uLaVLHhJiabGgkf0Bcg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L0WJviDT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L0WJviDT" Received: by smtp.kernel.org (Postfix) with ESMTPS id 90815C2BD00; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=xwjhHq+axtyNZtf3ucpzpJBoQOgD2kDsTykcF1+22VU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=L0WJviDT2c4j9z652S8+95ezSOvIjOT1EoHGwjEk8dIE+bjnQ9zPfEDFUrJCKt5ZB rVfj6B+wjHY4L+yXcT62sTpE0Cu5mtHmftvuEN154YK3x0S3oGn8WNSAdqkKxHtL4j GmZa/lnWsWL71ixP9N+JMVUeTMd5yetmmKd7DrVUsADGoBRVk7gcg48VYpxguD+iB5 ivK6Es2UaFq90I+Vwj1VQ58+XybOKrPryo/+y8vmvu+hYwRawK7DaRcooHXvNyzlBn GHgFTO0dIeXSCTK8b6Kn1VFWZLPbY/sE/lL1EiWHLVf3zT8MYhXp76vTPel6Xs3e4O P/EaKufUYdBgg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DBBCC9830C; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:19 +0400 Subject: [PATCH ath-next 13/16] wifi: ath11k: add hw ring mask for QCN6122 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-13-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=2926; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=ZS+ghizA2JnJORyhUeyzkT6PiFQkDEnAqkqpPDbBCt4=; b=oc8KKCzLEqR8y0YejgVoqOfzgsPd1UyzJB67HNuqi3DnHAhkRQIBLSDVrtLi/DS0KcxMFmfNa TamHpCY+jhXAcFEXohGRlgRkT3YCLTi/HayF26SEjdylq2gKXl9JolP X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Add ring mask for QCN6122 and register them in hw params. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/core.c | 1 + drivers/net/wireless/ath/ath11k/hw.c | 37 ++++++++++++++++++++++++++++++= ++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + 3 files changed, 39 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/= ath/ath11k/core.c index cf37975fa4cf..8fa1171b6bdd 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -948,6 +948,7 @@ static const struct ath11k_hw_params ath11k_hw_params[]= =3D { .max_radios =3D MAX_RADIOS_5018, .bdf_addr =3D 0x4D200000, .hw_ops =3D &ipq5018_ops, + .ring_mask =3D &ath11k_hw_ring_mask_qcn6122, .internal_sleep_clock =3D false, .regs =3D &qcn6122_regs, .qmi_service_ins_id =3D ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6122, diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/at= h/ath11k/hw.c index 8442fbeb9c58..bb375efd50fe 100644 --- a/drivers/net/wireless/ath/ath11k/hw.c +++ b/drivers/net/wireless/ath/ath11k/hw.c @@ -2070,6 +2070,43 @@ const struct ath11k_hw_ring_mask ath11k_hw_ring_mask= _wcn6750 =3D { }, }; =20 +const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn6122 =3D { + .tx =3D { + ATH11K_TX_RING_MASK_0, + ATH11K_TX_RING_MASK_1, + ATH11K_TX_RING_MASK_2, + }, + .rx_mon_status =3D { + 0, 0, 0, + ATH11K_RX_MON_STATUS_RING_MASK_0, + }, + .rx =3D { + 0, 0, 0, 0, + ATH11K_RX_RING_MASK_0, + ATH11K_RX_RING_MASK_1, + ATH11K_RX_RING_MASK_2, + ATH11K_RX_RING_MASK_3, + }, + .rx_err =3D { + 0, 0, 0, 0, 0, 0, 0, 0, + ATH11K_RX_ERR_RING_MASK_0, + }, + .rx_wbm_rel =3D { + 0, 0, 0, 0, 0, 0, 0, 0, 0, + ATH11K_RX_WBM_REL_RING_MASK_0, + }, + .reo_status =3D { + 0, 0, 0, + ATH11K_REO_STATUS_RING_MASK_0, + }, + .rxdma2host =3D { + ATH11K_RXDMA2HOST_RING_MASK_0, + }, + .host2rxdma =3D { + ATH11K_HOST2RXDMA_RING_MASK_0, + }, +}; + /* Target firmware's Copy Engine configuration for IPQ5018 */ const struct ce_pipe_config ath11k_target_ce_config_wlan_ipq5018[] =3D { /* CE0: host->target HTC control and raw streams */ diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/at= h/ath11k/hw.h index d9646a491808..2bcfdae9519b 100644 --- a/drivers/net/wireless/ath/ath11k/hw.h +++ b/drivers/net/wireless/ath/ath11k/hw.h @@ -296,6 +296,7 @@ extern const struct ath11k_hw_ring_mask ath11k_hw_ring_= mask_ipq8074; extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390; extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074; extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750; +extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn6122; =20 extern const struct ce_ie_addr ath11k_ce_ie_addr_ipq8074; extern const struct ce_ie_addr ath11k_ce_ie_addr_ipq5018; --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FD7C4CCDCC; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=MdZjBR3sXAfyf41/IsLiUr37LNxDlMnkqhlm6WrOAJev4IgAd/49ui+/qwVdTYiMIWH0gyIvrzXpGIwqADa5E5wFKibgsUxhH3Jgsd/JSCTVA8HnHGfPYllGPxpzPYq5oArMlEbJ0zoN1cxCmrVOZkVAIjYnr0rzn8NjOXjThXc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=S687wPIWnngoSYYE8QrRewba5wXRcqwoRWDDHq0Jsz4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DMVfqjIkhiVuKkbbik2f5lf8MvyoqO/4daHxRjOM4K4MFWf2MD3wFuD4h5sYLs8JDeiyeJuxI8BIWCZIdBcdVWzTxnt/yFmQip4I1KldL1labd3un8mCTzkTUKLKGSIHpWqqvybXj1+ZPYsiW3hVK3zLg8Mt7F1SQV+lThsn+AQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jC/Rs/sy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jC/Rs/sy" Received: by smtp.kernel.org (Postfix) with ESMTPS id 9FCFAC4AF12; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=S687wPIWnngoSYYE8QrRewba5wXRcqwoRWDDHq0Jsz4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=jC/Rs/syZ9Mup/u9Q2aD1FvJNysQTG7xEcz54APWE2Lzb9cIJlm49BORjXQrzfrob xU0KyCZ34unsJmwPnxDWXImWhpdu9dT77K5ljVw0te4LKNZIpeW8XBYEsUUTuMummu QXDxSmd21vKyXZEpS7GTPHdvCqzsVpaK5+W3h3JPy2FO2eNSs86qOm8aOEYha3BqmA eW9rvtf22Hx/aSLRduXclwR4eS4Wudv+49D9j7g0Mxlqjr87PgvzPoWi6QVtmGrURN 0wnB2sD70WiD/TPEjYGwub90yP09sCFTl8jmsqp+t9E3YZFVtjEJUDdPQ00oIfMPAu 47GkXr3F/jskQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CF39C9830D; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:20 +0400 Subject: [PATCH ath-next 14/16] wifi: ath11k: update hif and pci ops for QCN6122 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-14-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=4286; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=KAfYNiJSlBqkx5nRUcT0tjr+2gqae9Hk9UcR8v+Y2kU=; b=tWmSWuokIX04sHQ/skHZfIGfbroeqBvobVRWhObbpfO2LDTFZnARd1W4ShuaoSn+DuIEIo2Gg 0cmybhN6UJAA23f5a9T1hcSvLmUfA0+fR5KsqeXpXa93YAkgxWis5Ui X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem Add HIF and PCI ops for QCN6122. QCN6122 by default uses DP window 3. However, this is configurable, so let's introduce a function to do that and follow the existing register access code for (hybrid)AHB devices and use DP window 1. Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 34 +++++++++++++++++++++++++++++++= +++ drivers/net/wireless/ath/ath11k/hif.h | 9 +++++++++ drivers/net/wireless/ath/ath11k/qmi.c | 2 ++ 3 files changed, 45 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 1b9115311bed..03936f574c8d 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -892,6 +892,18 @@ static int ath11k_ahb_hif_resume(struct ath11k_base *a= b) return 0; } =20 +static void ath11k_ahb_config_static_window_qcn6122(struct ath11k_base *ab) +{ + u32 umac_window =3D FIELD_GET(ATH11K_PCI_WINDOW_VALUE_MASK, HAL_SEQ_WCSS_= UMAC_OFFSET); + u32 ce_window =3D FIELD_GET(ATH11K_PCI_WINDOW_VALUE_MASK, HAL_CE_WFSS_CE_= REG_BASE); + u32 window; + + window =3D (umac_window) | (ce_window << 6); + + iowrite32(ATH11K_PCI_WINDOW_ENABLE_BIT | window, + ab->mem + ATH11K_PCI_WINDOW_REG_ADDRESS); +} + static const struct ath11k_hif_ops ath11k_ahb_hif_ops_ipq8074 =3D { .start =3D ath11k_ahb_start, .stop =3D ath11k_ahb_stop, @@ -907,6 +919,24 @@ static const struct ath11k_hif_ops ath11k_ahb_hif_ops_= ipq8074 =3D { .ce_irq_disable =3D ath11k_ahb_ce_irq_disable_sync, }; =20 +static const struct ath11k_hif_ops ath11k_ahb_hif_ops_qcn6122 =3D { + .start =3D ath11k_pcic_start, + .stop =3D ath11k_pcic_stop, + .read32 =3D ath11k_pcic_read32, + .write32 =3D ath11k_pcic_write32, + .read =3D NULL, + .irq_enable =3D ath11k_pcic_ext_irq_enable, + .irq_disable =3D ath11k_pcic_ext_irq_disable, + .get_msi_address =3D ath11k_pcic_get_msi_address, + .get_user_msi_vector =3D ath11k_pcic_get_user_msi_assignment, + .map_service_to_pipe =3D ath11k_pcic_map_service_to_pipe, + .power_down =3D ath11k_ahb_power_down, + .power_up =3D ath11k_ahb_power_up, + .ce_irq_enable =3D ath11k_pci_enable_ce_irqs_except_wake_irq, + .ce_irq_disable =3D ath11k_pci_disable_ce_irqs_except_wake_irq, + .config_static_window =3D ath11k_ahb_config_static_window_qcn6122, +}; + static const struct ath11k_hif_ops ath11k_ahb_hif_ops_wcn6750 =3D { .start =3D ath11k_pcic_start, .stop =3D ath11k_pcic_stop, @@ -1638,6 +1668,10 @@ static int ath11k_ahb_probe(struct platform_device *= pdev) hif_ops =3D &ath11k_ahb_hif_ops_wcn6750; pci_ops =3D &ath11k_ahb_pci_ops_wcn6750; break; + case ATH11K_HW_QCN6122_HW10: + hif_ops =3D &ath11k_ahb_hif_ops_qcn6122; + pci_ops =3D &ath11k_ahb_pci_ops_wcn6750; + break; default: dev_err(&pdev->dev, "unsupported device type %d\n", hw_rev); return -EOPNOTSUPP; diff --git a/drivers/net/wireless/ath/ath11k/hif.h b/drivers/net/wireless/a= th/ath11k/hif.h index 017fed1b4bd1..2e1a4fedf139 100644 --- a/drivers/net/wireless/ath/ath11k/hif.h +++ b/drivers/net/wireless/ath/ath11k/hif.h @@ -32,6 +32,7 @@ struct ath11k_hif_ops { void (*ce_irq_disable)(struct ath11k_base *ab); void (*get_ce_msi_idx)(struct ath11k_base *ab, u32 ce_id, u32 *msi_idx); void (*coredump_download)(struct ath11k_base *ab); + void (*config_static_window)(struct ath11k_base *ab); }; =20 static inline void ath11k_hif_ce_irq_enable(struct ath11k_base *ab) @@ -159,4 +160,12 @@ static inline void ath11k_hif_coredump_download(struct= ath11k_base *ab) ab->hif.ops->coredump_download(ab); } =20 +static inline void ath11k_hif_config_static_window(struct ath11k_base *ab) +{ + if (!ab->hw_params.static_window_map || !ab->hif.ops->config_static_windo= w) + return; + + ab->hif.ops->config_static_window(ab); +} + #endif /* _HIF_H_ */ diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/a= th/ath11k/qmi.c index 771ef9b5304f..7d77f5c8c609 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -2243,6 +2243,8 @@ static int ath11k_qmi_request_device_info(struct ath1= 1k_base *ab) if (!ab->hw_params.ce_remap) ab->mem_ce =3D ab->mem; =20 + ath11k_hif_config_static_window(ab); + return 0; out: return ret; --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44D40513575; Wed, 23 Sep 2026 12:05:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; cv=none; b=NKVljOgbAh32tdX9kYyTGJdpcX2l4ZuO/BBhP+CzBnKMrs41chUWe88CKyrDanLhkla3QAKONLoCEo3ymnsn/pqt4XS5RA1M7hjD8P3KZ4I3IOiGDtw+63dGvzITmjG9SmBMQlbGLJRWhfgmhQ0zyBDQm4+DE8hnizpGnMPEvqU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165125; c=relaxed/simple; bh=NaSav1csg6REQ3XJGZ0ehZvz1iH3kCNoDbAp5pTbtHs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L14yLiufMuBEsNw9CRmOzUMzA/P+cKc6PtM7baQXTDccms2/421DvGLcHiLBOPlzkdFjMrPf+P1grmUbe3IDvbafMrL1hfT4lMKlq96KZM1rlqXT8zDhGxWWF+gBPqNueWFKD2G/M0hMW9m0pJcXNsp4kGJnOhgtJd/REFHzJo8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=j6pEEmjG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="j6pEEmjG" Received: by smtp.kernel.org (Postfix) with ESMTPS id B0524C2BCFF; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=NaSav1csg6REQ3XJGZ0ehZvz1iH3kCNoDbAp5pTbtHs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=j6pEEmjGkJtqEstNPPAkhS4e+2VOL660/n/742oSGV1Dj6lTR+xFeB6ct0TfCGcN8 gEfJ+YyjmHBEwXdOAgGCTWxWqRh3eZDUp45W53IUyGR7euvMKaw/pbnEzYi9tpc5gd omJZcz75RjI8G6G5nNcVXGZm7/mf8TX7GrgVOpF/tBghD0hk/402KI/pFsWFJxKqZz stEQaRQoAn3bg74aWOdjWrQEERVqALtlIVpqTuicl0eAgpBcKl1JrOpKWCOmvKA5po t5vNu6YovTQcxScOEETT1T9mU4QI0F/LukH7lgQBRV2nWJ8SQnrUllvFVlVtZECI9g H9L+f8CDZKrCg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DA95C9830B; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:21 +0400 Subject: [PATCH ath-next 15/16] wifi: ath11k: define userPDs for QCN6122 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-15-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=1850; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=FFy8ewtv5YTf5rGwmTdQsDE8baSwiwHWuB1HJc5LmDg=; b=eb9JZnJKMBo5WqcPLeJRSCtyF0njk0iSiffFtlOIYYT01K7J5kdS4ogRDIMaEHD5UQ24RFBzR tTweDJTOMvWD05gXR7sMdywUriNHUgh/mQMdn3JOBDttGONvOeuiyLH X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem The IPQ5018 platform can come with one or two optional QCN6122 wifi cards. To differentiate the two, the user PD instance number (1 or 2) is added to the QMI service instance ID so the QCN6122 firmware knows which radio instance to use and on what PCIe rail it is on. On IPQ5018/QCN6122 boards, the default mapping is as follows: +-> User PD 1 ----> IPQ5018 Internal 2.4G Radio / / Root PD +---> User PD 2 ----> QCN6122 5G/6G Radio on PCIe rail 1 \ \ +-> User PD 3 ----> QCN6122 5G/6G Radio on PCIe rail 0 Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 8 ++++++++ drivers/net/wireless/ath/ath11k/ahb.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 03936f574c8d..26110c927577 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -969,6 +969,14 @@ static int ath11k_ahb_init_userpd(struct ath11k_base *= ab, int userpd_id) =20 ab_ahb->userpd_id =3D userpd_id; break; + case ATH11K_HW_QCN6122_HW10: + if (userpd_id !=3D ATH11K_AHB_USERPD_ID_2 && + userpd_id !=3D ATH11K_AHB_USERPD_ID_3) + return -EINVAL; + + ab_ahb->userpd_id =3D userpd_id; + ab->qmi.service_ins_id +=3D (ab_ahb->userpd_id - 1); + break; default: return -EINVAL; } diff --git a/drivers/net/wireless/ath/ath11k/ahb.h b/drivers/net/wireless/a= th/ath11k/ahb.h index 0647bdb9ea62..ec89e0e89ca0 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.h +++ b/drivers/net/wireless/ath/ath11k/ahb.h @@ -28,6 +28,8 @@ =20 enum ath11k_ahb_userpd_id { ATH11K_AHB_USERPD_ID_1 =3D 1, + ATH11K_AHB_USERPD_ID_2, + ATH11K_AHB_USERPD_ID_3, ATH11K_AHB_USERPD_ID_MAX, }; =20 --=20 2.53.0 From nobody Thu Sep 24 12:56:11 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEC0E50129B; Wed, 23 Sep 2026 12:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; cv=none; b=i8qVXaaGXu/ciCQVSfouVr2RQejzrthsDTWLdLOlDIdso56f04DUQsKtF3HqWzY3s1zfcjtWefmhsyTbY0rY4yq6MCrQoUYo+GnLPzVno1GGRgm0n2kNkjsesjEesfAIklkx0V17VH4i4TB2/4fBNbFwM/PEMgyekEfiPJNE5sE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790165123; c=relaxed/simple; bh=cL5+YFpsqpZKGpz68YOUSSKCHE8atf18HiZnV4MKXmo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=updOnLmt/6V+SApJmNYSxDGOAV7eZkKseQOL+KPKaOtr9UJ8TSkegExib78kegjkYYIJp5cQ5QVBdFi93WxON9e58dC0doscScSEiMDYIJfhRWvs94FHBEJ3EJXnTqmmiOkVvaT12zrKQUmgDmcMD6g8HUjQkk65bWwYFXmB7/c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vAK5zYOt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vAK5zYOt" Received: by smtp.kernel.org (Postfix) with ESMTPS id C1923C4AF0B; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790165121; bh=cL5+YFpsqpZKGpz68YOUSSKCHE8atf18HiZnV4MKXmo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=vAK5zYOtijl1haOI9gXqsv8ACUPMutJwUPLC6WTnT1AZh3Y6sZE3xXDrp6OiFM7JK UVObtbnF9HeL0DjifTgJ56SIYL5et9/OfuUH4g97Q1mLDfQJ2Kzxm5yvyumOCH9puM oaAVBiUpFVCTibcsfJCs9Am84DrNXPNf43UtmpLXD6+bnPe05S6CkClPLU+QZXuPhB YRa1xpIo76ugmj3f1v8SWVG272xJjlV3vYBBS/hxxBdNEYh4qVoCku9K6f2BZECF97 33lByZA+6YX4xc+SyIuf+wyT3RfRlX9Z5LNHF3qk7wEV4T6lGh9QrygnHV9gbXEHoP MV3vRJo6IOqgg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD9AEC982FA; Wed, 23 Sep 2026 12:05:21 +0000 (UTC) From: George Moussalem via B4 Relay Date: Wed, 23 Sep 2026 16:05:22 +0400 Subject: [PATCH ath-next 16/16] wifi: ath11k: add QCN6122 device support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260923-ipq5018-qcn6122-mpd-v1-16-86729521a75c@outlook.com> References: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> In-Reply-To: <20260923-ipq5018-qcn6122-mpd-v1-0-86729521a75c@outlook.com> To: Johannes Berg , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jeff Johnson , Bjorn Andersson , Konrad Dybcio Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, Vignesh Viswanathan , Varadarajan Narayanan , linux-arm-msm@vger.kernel.org, George Moussalem X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790165117; l=2721; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=N0lWRlkViy66JiabYe3wnlNpM0tjJSjRzUVdOXoZ9Gs=; b=ToSFrdMAsPUqm34M8ORvBROXcmsCcULlAR9RBecaTVXwiXWOjpr9vkoHJZdK+tfkF0OdSXTgR 8mBh+8gPFSZDoPSuVKzWN20Nk8CGHwe/JuaZ7Nci5MMz30OhGbHNugr X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: George Moussalem QCN6122 is a 2x2 11AX PCIe based chipset, but it is attached to the WPSS (Wireless Processor SubSystem) Q6 processor, hence it is enumerated by the Q6 processor. It is registered to the APSS processor as a platform device (AHB). Q6 firmware segments for QCN6122 are contained within the multi-PD version of the shared firmware package for IPQ5018. Each (up to 2) QCN6122 radio present runs in its own user PD which the ath11k driver manages to power it up or down. Also, device information like BAR and its size is not known to the APSS processor as the chip is enumerated by WPSS Q6. These details are fetched over QMI. The QCN6122 chip supports STA, AP, and MESH modes. Tested on: Linksys MX2000 and GLiNET B3000 wireless access points for prolonged duration tests spanning multiple days with multiple clients connected with firmware WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: George Moussalem --- drivers/net/wireless/ath/ath11k/ahb.c | 7 +++++++ drivers/net/wireless/ath/ath11k/pcic.c | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/a= th/ath11k/ahb.c index 26110c927577..51908e779b7c 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -46,6 +46,9 @@ static const struct of_device_id ath11k_ahb_of_match[] = =3D { { .compatible =3D "qcom,ipq5018-wifi", .data =3D (void *)ATH11K_HW_IPQ5018_HW10, }, + { .compatible =3D "qcom,qcn6122-wifi", + .data =3D (void *)ATH11K_HW_QCN6122_HW10, + }, { } }; =20 @@ -1395,6 +1398,10 @@ static int ath11k_ahb_setup_msi_resources(struct ath= 11k_base *ab) ab->pci.msi.addr_hi =3D upper_32_bits(msi_addr_iova); =20 ret =3D of_property_read_u32_index(ab->dev->of_node, "interrupts", 1, &in= t_prop); + if (ret =3D=3D -EINVAL) + ret =3D of_property_read_u32_index(ab->dev->of_node, + "interrupts-extended", 2, + &int_prop); if (ret) return ret; =20 diff --git a/drivers/net/wireless/ath/ath11k/pcic.c b/drivers/net/wireless/= ath/ath11k/pcic.c index 2259adc3bbdc..cdcf3df26438 100644 --- a/drivers/net/wireless/ath/ath11k/pcic.c +++ b/drivers/net/wireless/ath/ath11k/pcic.c @@ -138,6 +138,15 @@ static const struct ath11k_msi_config ath11k_msi_confi= g[] =3D { }, .hw_rev =3D ATH11K_HW_QCA6698AQ_HW21, }, + { + .total_vectors =3D 13, + .total_users =3D 2, + .users =3D (struct ath11k_msi_user[]) { + { .name =3D "CE", .num_vectors =3D 5, .base_vector =3D 0 }, + { .name =3D "DP", .num_vectors =3D 8, .base_vector =3D 5 }, + }, + .hw_rev =3D ATH11K_HW_QCN6122_HW10, + }, }; =20 int ath11k_pcic_init_msi_config(struct ath11k_base *ab) --=20 2.53.0