From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, Kalle Valo <kvalo@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jeff Johnson <jjohnson@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Balamurugan S <quic_bselvara@quicinc.com>,
P Praneesh <quic_ppranees@quicinc.com>
Subject: Re: [PATCH v2 17/22] wifi: ath12k: add AHB driver support for IPQ5332
Date: Fri, 6 Dec 2024 12:46:23 +0100 [thread overview]
Message-ID: <153a9d51-6fc8-47d8-934b-4c53365077bc@oss.qualcomm.com> (raw)
In-Reply-To: <9093b41c-986d-4304-8414-61e4ee2d9950@quicinc.com>
On 6.12.2024 10:56 AM, Raj Kumar Bhagat wrote:
> On 10/19/2024 1:59 AM, Konrad Dybcio wrote:
>> On 15.10.2024 8:26 PM, Raj Kumar Bhagat wrote:
>>> From: Balamurugan S <quic_bselvara@quicinc.com>
>>>
>>> Add Initial Ath12k AHB driver support for IPQ5332. IPQ5332 is AHB
>>> based IEEE802.11be 2 GHz 2x2 WiFi device.
>>>
>>> Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1
>>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00210-QCAHKSWPL_SILICONZ-1
>>>
>>> Signed-off-by: Balamurugan S <quic_bselvara@quicinc.com>
>>> Co-developed-by: P Praneesh <quic_ppranees@quicinc.com>
>>> Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
>>> Co-developed-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
>>> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
>>> ---
>>
>> [...]
>>
>>> +enum ext_irq_num {
>>> + host2wbm_desc_feed = 16,
>>> + host2reo_re_injection,
>>
>> Why?
>>
>
> This enum is used as a IRQ number for Ath12k AHB. Based on this enum
> we can get the IRQ name from irq_name[]. This helps to request the original
> IRQ number from the DT.
> It is starting from 16 becasue, in irq_name[], the name for ext IRQ starts
> from 16 index.
[...]
>
>>> + irq_grp->irqs[num_irq++] =
>>> + reo2host_destination_ring1 - j;
>>> + }
>>> +
>>> + if (ab->hw_params->ring_mask->rx_err[i] & BIT(j))
>>> + irq_grp->irqs[num_irq++] = reo2host_exception;
>>> +
>>> + if (ab->hw_params->ring_mask->rx_wbm_rel[i] & BIT(j))
>>> + irq_grp->irqs[num_irq++] = wbm2host_rx_release;
>>> +
>>> + if (ab->hw_params->ring_mask->reo_status[i] & BIT(j))
>>> + irq_grp->irqs[num_irq++] = reo2host_status;
>>> +
>>> + if (ab->hw_params->ring_mask->rx_mon_dest[i] & BIT(j))
>>> + irq_grp->irqs[num_irq++] =
>>> + rxdma2host_monitor_destination_mac1;
>>> + }
>>> +
>>> + irq_grp->num_irq = num_irq;
>>> +
>>> + for (j = 0; j < irq_grp->num_irq; j++) {
>>> + irq_idx = irq_grp->irqs[j];
>>> +
>>> + irq = platform_get_irq_byname(ab->pdev,
>>> + irq_name[irq_idx]);
>>> + ab->irq_num[irq_idx] = irq;
>>> + irq_set_status_flags(irq, IRQ_NOAUTOEN | IRQ_DISABLE_UNLAZY);
>>> + ret = request_irq(irq, ath12k_ahb_ext_interrupt_handler,
>>> + IRQF_TRIGGER_RISING,
>>> + irq_name[irq_idx], irq_grp);
>>> + if (ret) {
>>> + ath12k_err(ab, "failed request_irq for %d\n",
>>> + irq);
>>> + }
>>> + }
>>
>> Instead of doing all this magic, can we request the IRQs manually, as we
>> have interrupt-names in dt?
>>
>
> I'm not sure if I fully understood this comment.
> If we manually request IRQs using their names from the DT, we won't be able to
> group the IRQs. Grouping the IRQs is one of our main objectives here. Additionally,
> we are not using all the IRQ names defined in the DT, so the logic in this function
> is crucial for grouping and requesting the IRQs according to the ring-mask.
Surely you can name these "foo_bar_ring%d" in DT and use the OF APIs
[...]
>>
>>> + /* Set fixed_mem_region to true for platforms that support fixed memory
>>> + * reservation from DT. If memory is reserved from DT for FW, ath12k driver
>>> + * need not to allocate memory.
>>> + */
>>> + if (!of_property_read_u32(ab->dev->of_node, "memory-region", &addr)) {
>>> + set_bit(ATH12K_FLAG_FIXED_MEM_REGION, &ab->dev_flags);
>>> + mem_node = of_find_node_by_name(NULL, "mlo_global_mem_0");
>>
>> This is not mentioned or documented anywhere.
>>
>
> In next version, will document the below info:
>
> "If the platform supports fixed memory, then it should define/reserve
> MLO global memory in DT to support Multi Link Operation.
> If MLO global memory is not reserved in fixed memory mode, then
> MLO cannot be supported."
You should also explain what Multi Link Operation means
Konrad
next prev parent reply other threads:[~2024-12-06 11:46 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 18:26 [PATCH v2 00/22] wifi: ath12k: add Ath12k AHB driver support for IPQ5332 Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 01/22] dt-bindings: net: wireless: describe the ath12k AHB module Raj Kumar Bhagat
2024-10-16 7:02 ` Krzysztof Kozlowski
2024-10-16 8:37 ` Raj Kumar Bhagat
2024-10-16 9:00 ` Krzysztof Kozlowski
2024-11-27 7:24 ` Raj Kumar Bhagat
2024-10-16 10:28 ` Dmitry Baryshkov
2024-12-03 9:07 ` Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 02/22] arm64: dts: qcom: add wifi node for IPQ5332 based RDP441 Raj Kumar Bhagat
2024-10-16 6:58 ` Krzysztof Kozlowski
2024-10-16 8:48 ` Raj Kumar Bhagat
2024-10-16 10:30 ` Dmitry Baryshkov
2024-10-16 10:55 ` Krzysztof Kozlowski
2024-10-16 11:13 ` Dmitry Baryshkov
2024-10-15 18:26 ` [PATCH v2 03/22] wifi: ath12k: add ath12k_hw_params for IPQ5332 Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 04/22] wifi: ath12k: refactor ath12k_hw_regs structure Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 05/22] wifi: ath12k: add ath12k_hw_regs for IPQ5332 Raj Kumar Bhagat
2024-10-18 19:58 ` Konrad Dybcio
2024-12-03 9:07 ` Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 06/22] wifi: ath12k: add ath12k_hw_ring_mask " Raj Kumar Bhagat
2024-10-18 19:59 ` Konrad Dybcio
2024-10-15 18:26 ` [PATCH v2 07/22] wifi: ath12k: add CE configurations " Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 08/22] wifi: ath12k: add ath12k_hw_hal_params " Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 09/22] wifi: ath12k: avoid m3 firmware download in AHB device IPQ5332 Raj Kumar Bhagat
2024-10-18 20:00 ` Konrad Dybcio
2024-12-03 9:11 ` Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 10/22] wifi: ath12k: add new CMEM read-write ath12k_hif_ops Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 11/22] wifi: ath12k: remap CMEM register space for IPQ5332 Raj Kumar Bhagat
2024-10-18 20:09 ` Konrad Dybcio
2024-10-15 18:26 ` [PATCH v2 12/22] wifi: ath12k: fix incorrect CE addresses Raj Kumar Bhagat
2024-10-18 20:02 ` Konrad Dybcio
2024-12-03 9:12 ` Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 13/22] wifi: ath12k: remap CE register space for IPQ5332 Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 14/22] wifi: ath12k: add support for fixed QMI firmware memory Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 15/22] wifi: ath12k: add BDF address in hardware parameter Raj Kumar Bhagat
2024-11-04 14:16 ` Konrad Dybcio
2024-12-03 9:18 ` Raj Kumar Bhagat
2024-12-05 17:42 ` Konrad Dybcio
2024-12-06 4:34 ` Raj Kumar Bhagat
2024-12-06 10:49 ` Konrad Dybcio
2024-12-09 4:23 ` Raj Kumar Bhagat
2024-12-13 0:18 ` Konrad Dybcio
2024-12-13 4:29 ` Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 16/22] wifi: ath12k: convert tasklet to BH workqueue for CE interrupts Raj Kumar Bhagat
2024-10-21 9:06 ` Kalle Valo
2024-10-22 7:13 ` Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 17/22] wifi: ath12k: add AHB driver support for IPQ5332 Raj Kumar Bhagat
2024-10-18 20:29 ` Konrad Dybcio
2024-12-06 9:56 ` Raj Kumar Bhagat
2024-12-06 11:46 ` Konrad Dybcio [this message]
2024-12-06 10:00 ` Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 18/22] wifi: ath12k: Power up root PD Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 19/22] wifi: ath12k: Register various userPD interrupts and save SMEM entries Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 20/22] wifi: ath12k: Power up userPD Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 21/22] wifi: ath12k: Power down userPD Raj Kumar Bhagat
2024-10-15 18:26 ` [PATCH v2 22/22] wifi: ath12k: enable ath12k AHB support Raj Kumar Bhagat
2024-10-16 6:57 ` [PATCH v2 00/22] wifi: ath12k: add Ath12k AHB driver support for IPQ5332 Krzysztof Kozlowski
2024-12-06 11:07 ` Raj Kumar Bhagat
2024-12-06 12:55 ` Krzysztof Kozlowski
2024-12-08 13:45 ` Raj Kumar Bhagat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=153a9d51-6fc8-47d8-934b-4c53365077bc@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jjohnson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_bselvara@quicinc.com \
--cc=quic_ppranees@quicinc.com \
--cc=quic_rajkbhag@quicinc.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox