openwrt-6.x/target/linux/qualcommax/patches-6.12/0189-arm64-dts-qcom-ipq5018-add-nodes-to-bringup-q6.patch
George Moussalem 1f879b8839 qualcommax: ipq50xx: split firmware variants and refactor QCN6122 support
IPQ5018 based boards come in multiple wireless architectures.
The SOC itself provides 2.4G wifi while 5G wifi is added by either an
IPQ5018-specific QCN6122 (2x2) solution or by the more generally
available PCIe-based QCN9074 (4x4) wifi chip.

On IPQ5018/QCN6122-based boards, both QCN6122 and IPQ5018 wifi is
initialized by IPQ5018 firmware which comes in different versions:
- IPQ5018: firmware files to initialize WCSS and the internal wifi chip
- IPQ5018/QCN6122: above + additional firmware segments to initialize
the QCN6122 chip incl. (de-)assertion of resets and clocks enablement

OpenWrt currently packages the combined IPQ5018/QCN6122 firmware for
both architectures. As such, let's switch to using IPQ5018-only firmware
for boards not packed with QCN6122 chip(s) and keep using the shared
firmware for devices that do have QCN6122(s) chips.
This helps us move to using upstreamed IPQ5018 firmware while using the
legacy repo for IPQ5018/QCN6122 firmware and rule out any initialization
conflicts/issues caused by loading QCN6122 on IPQ5018-only boards.

While at it, default to the secure WCSS remoteproc driver sent upstream
for review, move QCN6122 wifi nodes to a separate dtsi, override the Q6
node to load the multi-PD-based architecture remoteproc driver for
needed only by IPQ5018/QCN6122 designs, reference said dtsi in
boards packed with QCN6122 wifi chip(s), and add provision for migrating
the radio path as the wifi nodes now adhere to linux device tree naming
conventions.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20928
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-28 10:27:53 +01:00

102 lines
2.6 KiB
Diff

From 553461c1f1ae9b2ac50bce5ed5de15092cc04d29 Mon Sep 17 00:00:00 2001
From: George Moussalem <george.moussalem@outlook.com>
Date: Tue, 21 Oct 2025 15:38:32 +0400
Subject: [PATCH v6 5/8] arm64: dts: qcom: ipq5018: add nodes to bringup q6
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20251021-ipq5018-wifi-v6-5-c55c547df6fc@outlook.com>
Enable nodes required for q6 remoteproc bring up.
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 62 +++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
@@ -158,6 +158,11 @@
reg = <0x0 0x4ac00000 0x0 0x200000>;
no-map;
};
+
+ q6_region: wcss@4b000000 {
+ reg = <0x0 0x4b000000 0x0 0x1b00000>;
+ no-map;
+ };
};
soc: soc@0 {
@@ -717,6 +722,41 @@
};
};
+ q6v5_wcss: remoteproc@cd00000 {
+ compatible = "qcom,ipq5018-wcss-sec-pil";
+ reg = <0x0cd00000 0x10000>;
+ firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mbn";
+ interrupts-extended = <&intc GIC_SPI 291 IRQ_TYPE_EDGE_RISING>,
+ <&wcss_smp2p_in 0 IRQ_TYPE_NONE>,
+ <&wcss_smp2p_in 1 IRQ_TYPE_NONE>,
+ <&wcss_smp2p_in 2 IRQ_TYPE_NONE>,
+ <&wcss_smp2p_in 3 IRQ_TYPE_NONE>;
+ interrupt-names = "wdog",
+ "fatal",
+ "ready",
+ "handover",
+ "stop-ack";
+
+ clocks = <&gcc GCC_SLEEP_CLK_SRC>,
+ <&gcc GCC_SYS_NOC_WCSS_AHB_CLK>;
+ clock-names = "sleep",
+ "interconnect";
+
+ qcom,smem-states = <&wcss_smp2p_out 0>,
+ <&wcss_smp2p_out 1>;
+ qcom,smem-state-names = "shutdown",
+ "stop";
+
+ memory-region = <&q6_region>;
+
+ glink-edge {
+ interrupts = <GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
+ label = "rtr";
+ qcom,remote-pid = <1>;
+ mboxes = <&apcs_glb 8>;
+ };
+ };
+
pcie1: pcie@80000000 {
compatible = "qcom,pcie-ipq5018";
reg = <0x80000000 0xf1d>,
@@ -991,4 +1031,28 @@
<GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
};
+
+ wcss: smp2p-wcss {
+ compatible = "qcom,smp2p";
+ qcom,smem = <435>, <428>;
+
+ interrupt-parent = <&intc>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_EDGE_RISING>;
+
+ mboxes = <&apcs_glb 9>;
+
+ qcom,local-pid = <0>;
+ qcom,remote-pid = <1>;
+
+ wcss_smp2p_out: master-kernel {
+ qcom,entry-name = "master-kernel";
+ #qcom,smem-state-cells = <1>;
+ };
+
+ wcss_smp2p_in: slave-kernel {
+ qcom,entry-name = "slave-kernel";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+ };
};