From patchwork Thu Jan 30 05:18:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13954309 X-Patchwork-Delegate: quic_jjohnson@quicinc.com Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 891F62CAB; Thu, 30 Jan 2025 05:19:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214383; cv=none; b=BCWJzwf2PTMWvmdxd/JgtMaRzCB2gQIt7R4SnaOaE/wamuMWQovJ61FgjrfDFTGJ89Gygh5K7/gTnICAw3t9FcNQB5ZrwCIPXuRt8UheDKN8NQkL2xEj2HjXazjP6NBSkyyxtZaNbsyMAgaR9yxLPJcBO5J2kpAQpZr4TGzCLwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214383; c=relaxed/simple; bh=nNXeh8EgRRO+YztzUIy6w3vdAbBwseqASSEBNuWjYYk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FNTzCxtH+qyY1PzB0MzcbriRVyPSOiy05cQ8vHUVgEC48svcasmdS2xm0DjK5W1xdnwpGrFXfLT22H6ODYSJF85SyJBwvYqYmM/m24cqdZ3PI19mtAde7sZOAziodHNoYnA5CWjN+h76wNBmfBp0b8gaXet3kgQOd4clBlkOQIs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=lzaSlCz1; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="lzaSlCz1" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50TMki2X012279; Thu, 30 Jan 2025 05:19:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= dUezyGs2RdjGHsOnD/58OC7wQng7WD1B+BzO1yxfB0E=; b=lzaSlCz1BYbxJRn/ 4PyeP6AM/MC7vzW+HvvqROHGGYNGuum+/JA1jmanIhCTB/HA1fWF76jjNOEaCVbr ZDlAv8GPUBotplUBB0l2GVH9heTplxIhf3hvDDG+CfJvYRfOlhE5B37lTPP7sQbG nnN0UH+ziRECwmqsaNJ/XibHPDaZq/sJC/5bMZVK6qUXIpIbANMF8g9Dhkzvq0iz jc9j746oSipsr0FiHv3hePRAD8WToTHeBhNwyAVdvg114GU7Ky0nrG/DSGatdqkb u8tC46UNQuv+uRcx9qJ3LY8lzTnjTEq2jDsvtvZWuz+3Ogha2d2HQG3u/ViqucCZ W3lYkw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44fwe28jn1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:36 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50U5JZxh019373 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:35 GMT Received: from hu-rajkbhag-blr.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 29 Jan 2025 21:19:31 -0800 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , , , "Raj Kumar Bhagat" Subject: [RFC PATCH 1/5] dt-bindings: net: wireless: describe the ath12k wifi device IPQ5424 Date: Thu, 30 Jan 2025 10:48:34 +0530 Message-ID: <20250130051838.1924079-2-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> References: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: kGZxBXSwX__DbgiYGtOfsRZH4Kz86cmH X-Proofpoint-GUID: kGZxBXSwX__DbgiYGtOfsRZH4Kz86cmH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-30_02,2025-01-29_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 clxscore=1015 malwarescore=0 adultscore=0 phishscore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501300039 Describe and add the device-tree bindings for the ATH12K AHB wifi device IPQ5424. Signed-off-by: Raj Kumar Bhagat --- .../net/wireless/qcom,ath12k-ahb.yaml | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-ahb.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-ahb.yaml index bd953a028dc3..1d24389a0ab3 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-ahb.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-ahb.yaml @@ -18,6 +18,7 @@ properties: compatible: enum: - qcom,ipq5332-wifi + - qcom,ipq5424-wifi reg: maxItems: 1 @@ -317,3 +318,121 @@ examples: "stop", "spawn"; }; + - | + #include + + wifi1: wifi@c000000 { + compatible = "qcom,ipq5424-wifi"; + reg = <0x0c000000 0x1000000>; + clocks = <&gcc GCC_XO_CLK_SRC>; + clock-names = "xo"; + interrupts-extended = <&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>, + <&intc GIC_SPI 559 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 560 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 561 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 518 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 519 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 520 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 521 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 522 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 523 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 524 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 525 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 526 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 527 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 528 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 529 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 574 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 576 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 627 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 540 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 549 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 580 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 537 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 536 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 535 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 534 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 571 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 571 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 567 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 637 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 637 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 632 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 590 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 583 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 582 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 581 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 533 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 532 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 531 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 530 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 626 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 569 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 569 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 565 IRQ_TYPE_EDGE_RISING>, + <&intc GIC_SPI 502 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "fatal", + "ready", + "spawn", + "stop-ack", + "misc-pulse1", + "misc-latch", + "sw-exception", + "ce0", + "ce1", + "ce2", + "ce3", + "ce4", + "ce5", + "ce6", + "ce7", + "ce8", + "ce9", + "ce10", + "ce11", + "host2wbm-desc-feed", + "host2reo-re-injection", + "host2reo-command", + "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", + "host2rxdma-host-buf-ring-mac3", + "host2rxdma-host-buf-ring-mac2", + "host2rxdma-host-buf-ring-mac1", + "host2tcl-input-ring4", + "host2tcl-input-ring3", + "host2tcl-input-ring2", + "host2tcl-input-ring1", + "wbm2host-tx-completions-ring4", + "wbm2host-tx-completions-ring3", + "wbm2host-tx-completions-ring2", + "wbm2host-tx-completions-ring1", + "host2tx-monitor-ring1", + "txmon2host-monitor-destination-mac3", + "txmon2host-monitor-destination-mac2", + "txmon2host-monitor-destination-mac1", + "umac-reset"; + + memory-region = <&q6_region>, <&m3_dump>, <&q6_caldb>, <&mlo_mem>; + memory-region-names = "q6-region", "m3-dump", "q6-caldb", "mlo-global-mem"; + qcom,ath12k-calibration-variant = "RDP466_1"; + qcom,rproc = <&q6v5_wcss>; + qcom,smem-states = <&wcss_smp2p_out 8>, + <&wcss_smp2p_out 9>, + <&wcss_smp2p_out 10>; + qcom,smem-state-names = "shutdown", + "stop", + "spawn"; + }; From patchwork Thu Jan 30 05:18:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13954310 X-Patchwork-Delegate: quic_jjohnson@quicinc.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 6E182186E46; Thu, 30 Jan 2025 05:19:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214384; cv=none; b=fL0PS3TKWCadgD/K5E6yOhRAiNVFCaCDPyLWRZZJ22rIRvaNfASqSYikdHngbrQqEXn5PwfoWHLYaFqQWHBEgNTNWBsHtTpbfAGQEFvfan3RFknK0uE3vO7nY5E9PgvpUyzoIBZbKP566bb7bwSP2/gxmL1vILJ2Gu+NEgu5uF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214384; c=relaxed/simple; bh=zFGjyUP4vk6iV3CO16ml5nhh7ilxmEeYdXrTgi6oJok=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d/gfYdV6WutJajIa3jh59GOsiWnfq7eMeDgg9SiOPn4u/1h5pFbinPE3NoTcoM636/C6g0jsM++4R7irqvR5mPAKVPpu/NDH+2fct2aNxjk4jjeMOFnzJENXOLR7vn4IHV1pRsov4TvdcixV8g7U0X7OQwlRSO2oioVPZiebtQ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=pVgRsrr7; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="pVgRsrr7" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50TEqc2A004506; Thu, 30 Jan 2025 05:19:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= iWpNGvhejoGTwE6zVCE3HH4v5ihnuD5Fyge2+qzvDgI=; b=pVgRsrr78ag5EsCc TYRrcnO0ZrkvWV8mJBWDQtmp8TU7Dm1SaerekUgwUU4bnTLGo0chXUvQGbirE9X1 Ij5apv0lDzTp8MQZyQwyOk/pBwD8tOuV8QXkCd/jBzq52dvcOdh8Jta9kX9Fx0Sg de6aiTh+HmxFDz/AegNmZRj0K/rHVmfA7ypFoZRlZG7PkaylYkWtOoVFqYjnPw71 GCttHUnKwoCknGhYuBDMfuww+9KLghx95JNKKnjsbsyqOwfEzQq+ONBq8dL4NWx9 fsRDhykYXQG3EuZ7e8lli8vlgc3dm/RHgArPPlrnDXg6wR1PUcBpP8AUNwfG58d7 ZvkK1A== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44fpfu9n3a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:39 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50U5Jc8B001517 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:38 GMT Received: from hu-rajkbhag-blr.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 29 Jan 2025 21:19:35 -0800 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , , , "Saravanakumar Duraisamy" , Raj Kumar Bhagat Subject: [RFC PATCH 2/5] wifi: ath12k: Add ath12k_hw_params for IPQ5424 Date: Thu, 30 Jan 2025 10:48:35 +0530 Message-ID: <20250130051838.1924079-3-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> References: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: XIqKGeqRZVr9EcIYHnA17c7d7rJX7xqM X-Proofpoint-ORIG-GUID: XIqKGeqRZVr9EcIYHnA17c7d7rJX7xqM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-30_02,2025-01-29_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=733 impostorscore=0 suspectscore=0 clxscore=1015 mlxscore=0 malwarescore=0 priorityscore=1501 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501300039 From: Saravanakumar Duraisamy Add ath12k_hw_params for the new ath12k AHB-based WiFi device IPQ5424. The WiFi device IPQ5424 is similar to IPQ5332. Most of the hardware parameters like hw_ops, wmi_init, hal_ops, etc., are the same between IPQ5424 and IPQ5332, hence use these same parameters for IPQ5424. Some parameters are specific to IPQ5424; initially set these to 0 or NULL, and populate them in subsequent patches. Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.5-01053-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Saravanakumar Duraisamy Signed-off-by: Raj Kumar Bhagat --- drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/hw.c | 76 ++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 297e01d191ab..13db19dc50cd 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -150,6 +150,7 @@ enum ath12k_hw_rev { ATH12K_HW_QCN9274_HW20, ATH12K_HW_WCN7850_HW20, ATH12K_HW_IPQ5332_HW10, + ATH12K_HW_IPQ5424_HW10, }; enum ath12k_firmware_mode { diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c index b4d5651973b7..b8021dc3ba01 100644 --- a/drivers/net/wireless/ath/ath12k/hw.c +++ b/drivers/net/wireless/ath/ath12k/hw.c @@ -1566,6 +1566,82 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .ce_remap = &ath12k_ce_remap_ipq5332, .bdf_addr_offset = 0xC00000, }, + { + .name = "ipq5424 hw1.0", + .hw_rev = ATH12K_HW_IPQ5424_HW10, + .fw = { + .dir = "IPQ5424/hw1.0", + .board_size = 256 * 1024, + .cal_offset = 128 * 1024, + .m3_loader = ath12k_m3_fw_loader_remoteproc, + }, + .max_radios = 1, + .single_pdev_only = false, + .qmi_service_ins_id = ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ5332, + .internal_sleep_clock = false, + + .hw_ops = &qcn9274_ops, + .regs = NULL, + .ring_mask = &ath12k_hw_ring_mask_ipq5332, + + .host_ce_config = ath12k_host_ce_config_ipq5332, + .ce_count = 12, + .target_ce_config = ath12k_target_ce_config_wlan_ipq5332, + .target_ce_count = 12, + .svc_to_ce_map = ath12k_target_service_to_ce_map_wlan_ipq5332, + .svc_to_ce_map_len = 18, + + .hal_params = &ath12k_hw_hal_params_ipq5332, + + .rxdma1_enable = false, + .num_rxdma_per_pdev = 1, + .num_rxdma_dst_ring = 0, + .rx_mac_buf_ring = false, + .vdev_start_delay = false, + + .interface_modes = BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_MESH_POINT), + .supports_monitor = false, + + .idle_ps = false, + .download_calib = true, + .supports_suspend = false, + .tcl_ring_retry = true, + .reoq_lut_support = false, + .supports_shadow_regs = false, + + .num_tcl_banks = 48, + .max_tx_ring = 4, + + .wmi_init = &ath12k_wmi_init_qcn9274, + + .hal_ops = &hal_qcn9274_ops, + + .qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01), + + .rfkill_pin = 0, + .rfkill_cfg = 0, + .rfkill_on_level = 0, + + .rddm_size = 0, + + .def_num_link = 0, + .max_mlo_peer = 256, + + .otp_board_id_register = 0, + + .supports_sta_ps = false, + + .acpi_guid = NULL, + .supports_dynamic_smps_6ghz = false, + .iova_mask = 0, + .supports_aspm = false, + + .ce_ie_addr = NULL, + .ce_remap = NULL, + .bdf_addr_offset = 0x940000, + }, }; int ath12k_hw_init(struct ath12k_base *ab) From patchwork Thu Jan 30 05:18:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13954311 X-Patchwork-Delegate: quic_jjohnson@quicinc.com Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 243521779B8; Thu, 30 Jan 2025 05:19:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214390; cv=none; b=g/G6M8i12quNyfDFpari/ogcIJnRy4E9bbqd7zEAc2M4unXUnkLSoxvDMtdFPI5dg/7m5DwQ2F7hjoW2bMAA7CnunoRiJTkFGAarTCiN2/AqOH22P4gaeKyeMRC1egstH88hYYP70Zz+ljazJopLNjoDJy3nT3biwWsnTS+z2vA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214390; c=relaxed/simple; bh=zKqMgWIdl5Yf3wAZZT7OFygrq0lOeA8aBgTYYvu7EIs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ujW5RQWJZ2yIHPhHuwUxiugzUp8e1OkUlhTtyYiT9bzxE3VDmM/O90TbnuzEYdCjKKwdczrKhBkCsE4ZLP9QnskXnqLg/ohEJORM0onaB+LqAdjWc766wA9SMHpw3aEnJi534HTyCgspsEEIvgk33BjR1pCwXCnY1TuZwkmL5PM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=nsj3ySVq; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="nsj3ySVq" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50TLlfp9030164; Thu, 30 Jan 2025 05:19:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3LFETtYfXQlBGg8OcHQIVFWjNvSMR21Jce/D2Kw+62E=; b=nsj3ySVqfHmbxeBW Hj2PYfp9/zGlr8Er4ECBR2oD3OnZEIden8kQ9Y9zQjn2Hj3Z4wFmLncpKyasgEyX tlSIKgSD3vYFa2DHkiqL8J4IKjAmXdekPBfrRBO5Vmg+DTzdTmTKIAEZyqAZZYNS SfahuYHB6pmc6WABERodScZwDgyHIMTQ78kIe8aeH3byOmIouJoMskcWvwOj+kXm ujigQ/RKRmLggOxKw8qMfk2livEDg3wKfArHTWCG+fOJQs+TsAJ58sBSnkaDgCjO fQMf4em3E1Eu28DBf3sI+rZdZzaSF7PE7XMdJEt5C8bbthpUe/AcP0sbBjOipDoF 9y6r4w== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44fvjcgnmm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:43 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50U5JgLA001556 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:42 GMT Received: from hu-rajkbhag-blr.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 29 Jan 2025 21:19:39 -0800 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , , , "Saravanakumar Duraisamy" , Raj Kumar Bhagat Subject: [RFC PATCH 3/5] wifi: ath12k: add ath12k_hw_regs for IPQ5424 Date: Thu, 30 Jan 2025 10:48:36 +0530 Message-ID: <20250130051838.1924079-4-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> References: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: zk3uFXlB94BZnGXqf_F-etpX6H6YKFxw X-Proofpoint-GUID: zk3uFXlB94BZnGXqf_F-etpX6H6YKFxw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-30_02,2025-01-29_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=3 mlxlogscore=785 impostorscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501300039 From: Saravanakumar Duraisamy Add register addresses (ath12k_hw_regs) for new ath12k AHB based WiFi device IPQ5424. Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.5-01053-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Saravanakumar Duraisamy Signed-off-by: Raj Kumar Bhagat --- drivers/net/wireless/ath/ath12k/hal.h | 3 + drivers/net/wireless/ath/ath12k/hw.c | 87 ++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/hal.h b/drivers/net/wireless/ath/ath12k/hal.h index 9f12ed84a653..8e6c98860c46 100644 --- a/drivers/net/wireless/ath/ath12k/hal.h +++ b/drivers/net/wireless/ath/ath12k/hal.h @@ -377,6 +377,9 @@ struct ath12k_base; #define HAL_IPQ5332_CE_WFSS_REG_BASE 0x740000 #define HAL_IPQ5332_CE_SIZE 0x100000 +#define HAL_IPQ5424_CE_WFSS_REG_BASE 0x200000 +#define HAL_IPQ5424_CE_SIZE 0x100000 + enum hal_srng_ring_id { HAL_SRNG_RING_ID_REO2SW0 = 0, HAL_SRNG_RING_ID_REO2SW1, diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c index b8021dc3ba01..7ee21a03fcac 100644 --- a/drivers/net/wireless/ath/ath12k/hw.c +++ b/drivers/net/wireless/ath/ath12k/hw.c @@ -1120,6 +1120,91 @@ static const struct ath12k_hw_regs ipq5332_regs = { HAL_IPQ5332_CE_WFSS_REG_BASE, }; +static const struct ath12k_hw_regs ipq5424_regs = { + /* SW2TCL(x) R0 ring configuration address */ + .hal_tcl1_ring_id = 0x00000918, + .hal_tcl1_ring_misc = 0x00000920, + .hal_tcl1_ring_tp_addr_lsb = 0x0000092c, + .hal_tcl1_ring_tp_addr_msb = 0x00000930, + .hal_tcl1_ring_consumer_int_setup_ix0 = 0x00000940, + .hal_tcl1_ring_consumer_int_setup_ix1 = 0x00000944, + .hal_tcl1_ring_msi1_base_lsb = 0x00000958, + .hal_tcl1_ring_msi1_base_msb = 0x0000095c, + .hal_tcl1_ring_base_lsb = 0x00000910, + .hal_tcl1_ring_base_msb = 0x00000914, + .hal_tcl1_ring_msi1_data = 0x00000960, + .hal_tcl2_ring_base_lsb = 0x00000988, + .hal_tcl_ring_base_lsb = 0x00000b68, + + /* TCL STATUS ring address */ + .hal_tcl_status_ring_base_lsb = 0x00000d48, + + /* REO DEST ring address */ + .hal_reo2_ring_base = 0x00000578, + .hal_reo1_misc_ctrl_addr = 0x00000b9c, + .hal_reo1_sw_cookie_cfg0 = 0x0000006c, + .hal_reo1_sw_cookie_cfg1 = 0x00000070, + .hal_reo1_qdesc_lut_base0 = 0x00000074, + .hal_reo1_qdesc_lut_base1 = 0x00000078, + .hal_reo1_ring_base_lsb = 0x00000500, + .hal_reo1_ring_base_msb = 0x00000504, + .hal_reo1_ring_id = 0x00000508, + .hal_reo1_ring_misc = 0x00000510, + .hal_reo1_ring_hp_addr_lsb = 0x00000514, + .hal_reo1_ring_hp_addr_msb = 0x00000518, + .hal_reo1_ring_producer_int_setup = 0x00000524, + .hal_reo1_ring_msi1_base_lsb = 0x00000548, + .hal_reo1_ring_msi1_base_msb = 0x0000054C, + .hal_reo1_ring_msi1_data = 0x00000550, + .hal_reo1_aging_thres_ix0 = 0x00000B28, + .hal_reo1_aging_thres_ix1 = 0x00000B2C, + .hal_reo1_aging_thres_ix2 = 0x00000B30, + .hal_reo1_aging_thres_ix3 = 0x00000B34, + + /* REO Exception ring address */ + .hal_reo2_sw0_ring_base = 0x000008c0, + + /* REO Reinject ring address */ + .hal_sw2reo_ring_base = 0x00000320, + .hal_sw2reo1_ring_base = 0x00000398, + + /* REO cmd ring address */ + .hal_reo_cmd_ring_base = 0x000002A8, + + /* REO status ring address */ + .hal_reo_status_ring_base = 0x00000aa0, + + /* WBM idle link ring address */ + .hal_wbm_idle_ring_base_lsb = 0x00000d3c, + .hal_wbm_idle_ring_misc_addr = 0x00000d4c, + .hal_wbm_r0_idle_list_cntl_addr = 0x00000240, + .hal_wbm_r0_idle_list_size_addr = 0x00000244, + .hal_wbm_scattered_ring_base_lsb = 0x00000250, + .hal_wbm_scattered_ring_base_msb = 0x00000254, + .hal_wbm_scattered_desc_head_info_ix0 = 0x00000260, + .hal_wbm_scattered_desc_head_info_ix1 = 0x00000264, + .hal_wbm_scattered_desc_tail_info_ix0 = 0x00000270, + .hal_wbm_scattered_desc_tail_info_ix1 = 0x00000274, + .hal_wbm_scattered_desc_ptr_hp_addr = 0x0000027c, + + /* SW2WBM release ring address */ + .hal_wbm_sw_release_ring_base_lsb = 0x0000037c, + + /* WBM2SW release ring address */ + .hal_wbm0_release_ring_base_lsb = 0x00000e08, + .hal_wbm1_release_ring_base_lsb = 0x00000e80, + + /* CE relative address */ + .hal_umac_ce0_src_reg_base = 0x00200000 - + HAL_IPQ5424_CE_WFSS_REG_BASE, + .hal_umac_ce0_dest_reg_base = 0x00201000 - + HAL_IPQ5424_CE_WFSS_REG_BASE, + .hal_umac_ce1_src_reg_base = 0x00202000 - + HAL_IPQ5424_CE_WFSS_REG_BASE, + .hal_umac_ce1_dest_reg_base = 0x00203000 - + HAL_IPQ5424_CE_WFSS_REG_BASE, +}; + static const struct ath12k_hw_regs wcn7850_regs = { /* SW2TCL(x) R0 ring configuration address */ .hal_tcl1_ring_id = 0x00000908, @@ -1581,7 +1666,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .internal_sleep_clock = false, .hw_ops = &qcn9274_ops, - .regs = NULL, + .regs = &ipq5424_regs, .ring_mask = &ath12k_hw_ring_mask_ipq5332, .host_ce_config = ath12k_host_ce_config_ipq5332, From patchwork Thu Jan 30 05:18:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13954312 X-Patchwork-Delegate: quic_jjohnson@quicinc.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 C29901714B7; Thu, 30 Jan 2025 05:19:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214392; cv=none; b=t3BBaz24DQmS09YQrPwgjZkTb8tUiVIurj3Bmcil7cKBK7j/SuALLuKdGLwYcQQ+efHmbbhDEEKNKRi1lZtJicpd51xXXoMTJxilf0MDwXrmISovBPEUWKYjDvOWpCeC92LnMk2kwcrPHGGWW0n2Q7nCNcUQpwDY09cQ2WO+u7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214392; c=relaxed/simple; bh=bBgWTnEk9cZwNLWK4rmWgcBU7aFidJvxxeTZh1xCNGA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=N9fkWavV3A66zDxASMv5k31FRZYOzHE8m07gdOApphU180JSqwys9ATrwpIGo2MvxDnoSu9muVeE7GRDUYn+WeBsW9RFG4fryuL7MkiNAb9S21Pm5sVTSiX8fPkj0Iij/9GBCUm1y8ck1QKL5h7PzrEtyhc/XK/wT8Quq6yMn4M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=fnV/aQwH; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="fnV/aQwH" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50TIlYGw000787; Thu, 30 Jan 2025 05:19:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= CFNW+leIUFl9qV76TH6Y9vWDF0xeVh88AHXoNGr7RXA=; b=fnV/aQwHdEaWlvHd fk4RzpBItUl9o9QcoDsniBqgqzTzUXPhF6SBgKJok/H3cEua9ymrb7ONSD6Oi3GF YcgFo5AeBaq7th68SSuOY/ZhSLOBuC2/5cIKHKTqq8u3fbdjk6E3+qKCyu+A/BUy TOA0YaaQuFk1kabf5KMjeyjyNt30ulwk9Q/J5KBOwVqppxhVU9+xFeGyypAliLim bF+Zxj3i4LFQckTU0ScbgYLLXLoc6kLloPxfdOrv11nbSVbqEk9dxrSxjT2X2aWV 74G60TNxJi0yvz1ilRX+GrSnYfYZhfwDMScv9hs5oGggOPTCsk4i5TZytPL1lnDj Auax+g== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44fswys461-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:47 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50U5Jk3O001572 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:46 GMT Received: from hu-rajkbhag-blr.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 29 Jan 2025 21:19:42 -0800 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , , , "Saravanakumar Duraisamy" , Raj Kumar Bhagat Subject: [RFC PATCH 4/5] wifi: ath12k: Add CE remap hardware parameters for IPQ5424 Date: Thu, 30 Jan 2025 10:48:37 +0530 Message-ID: <20250130051838.1924079-5-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> References: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: wGDFz_5vY3nrQlJ49PWkujsPCEO8hlhK X-Proofpoint-GUID: wGDFz_5vY3nrQlJ49PWkujsPCEO8hlhK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-30_02,2025-01-29_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 suspectscore=0 mlxlogscore=854 lowpriorityscore=0 impostorscore=0 mlxscore=0 malwarescore=0 spamscore=0 priorityscore=1501 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501300039 From: Saravanakumar Duraisamy Add CE remap hardware parameters for new Ath12k AHB device IPQ5424. Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.5-01053-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Saravanakumar Duraisamy Signed-off-by: Raj Kumar Bhagat --- drivers/net/wireless/ath/ath12k/ahb.c | 2 +- drivers/net/wireless/ath/ath12k/ce.h | 13 +++++++++---- drivers/net/wireless/ath/ath12k/hw.c | 21 ++++++++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/ahb.c b/drivers/net/wireless/ath/ath12k/ahb.c index 0dbee14fbe90..d502b59a78d8 100644 --- a/drivers/net/wireless/ath/ath12k/ahb.c +++ b/drivers/net/wireless/ath/ath12k/ahb.c @@ -977,7 +977,7 @@ static int ath12k_ahb_resource_init(struct ath12k_base *ab) goto err_mem_unmap; } ab->ce_remap = true; - ab->ce_remap_base_addr = HAL_IPQ5332_CE_WFSS_REG_BASE; + ab->ce_remap_base_addr = ce_remap->base; } ret = ath12k_ahb_clock_init(ab); diff --git a/drivers/net/wireless/ath/ath12k/ce.h b/drivers/net/wireless/ath/ath12k/ce.h index 57f75899ee03..3ac7f28d2c92 100644 --- a/drivers/net/wireless/ath/ath12k/ce.h +++ b/drivers/net/wireless/ath/ath12k/ce.h @@ -38,10 +38,15 @@ #define PIPEDIR_INOUT 3 /* bidirectional */ #define PIPEDIR_INOUT_H2H 4 /* bidirectional, host to host */ -/* CE address/mask */ -#define CE_HOST_IE_ADDRESS 0x75804C -#define CE_HOST_IE_2_ADDRESS 0x758050 -#define CE_HOST_IE_3_ADDRESS CE_HOST_IE_ADDRESS +/* IPQ5332 CE address/mask */ +#define CE_HOST_IPQ5332_IE_ADDRESS 0x75804C +#define CE_HOST_IPQ5332_IE_2_ADDRESS 0x758050 +#define CE_HOST_IPQ5332_IE_3_ADDRESS CE_HOST_IPQ5332_IE_ADDRESS + +/* IPQ5424 CE address/mask */ +#define CE_HOST_IPQ5424_IE_ADDRESS 0x21804C +#define CE_HOST_IPQ5424_IE_2_ADDRESS 0x218050 +#define CE_HOST_IPQ5424_IE_3_ADDRESS CE_HOST_IPQ5424_IE_ADDRESS #define CE_HOST_IE_3_SHIFT 0xC diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c index 7ee21a03fcac..00da2d5a0378 100644 --- a/drivers/net/wireless/ath/ath12k/hw.c +++ b/drivers/net/wireless/ath/ath12k/hw.c @@ -1317,9 +1317,15 @@ static const struct ath12k_hw_hal_params ath12k_hw_hal_params_ipq5332 = { }; static const struct ce_ie_addr ath12k_ce_ie_addr_ipq5332 = { - .ie1_reg_addr = CE_HOST_IE_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, - .ie2_reg_addr = CE_HOST_IE_2_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, - .ie3_reg_addr = CE_HOST_IE_3_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, + .ie1_reg_addr = CE_HOST_IPQ5332_IE_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, + .ie2_reg_addr = CE_HOST_IPQ5332_IE_2_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, + .ie3_reg_addr = CE_HOST_IPQ5332_IE_3_ADDRESS - HAL_IPQ5332_CE_WFSS_REG_BASE, +}; + +static const struct ce_ie_addr ath12k_ce_ie_addr_ipq5424 = { + .ie1_reg_addr = CE_HOST_IPQ5424_IE_ADDRESS - HAL_IPQ5424_CE_WFSS_REG_BASE, + .ie2_reg_addr = CE_HOST_IPQ5424_IE_2_ADDRESS - HAL_IPQ5424_CE_WFSS_REG_BASE, + .ie3_reg_addr = CE_HOST_IPQ5424_IE_3_ADDRESS - HAL_IPQ5424_CE_WFSS_REG_BASE, }; static const struct ce_remap ath12k_ce_remap_ipq5332 = { @@ -1327,6 +1333,11 @@ static const struct ce_remap ath12k_ce_remap_ipq5332 = { .size = HAL_IPQ5332_CE_SIZE, }; +static const struct ce_remap ath12k_ce_remap_ipq5424 = { + .base = HAL_IPQ5424_CE_WFSS_REG_BASE, + .size = HAL_IPQ5424_CE_SIZE, +}; + static const struct ath12k_hw_params ath12k_hw_params[] = { { .name = "qcn9274 hw1.0", @@ -1723,8 +1734,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = { .iova_mask = 0, .supports_aspm = false, - .ce_ie_addr = NULL, - .ce_remap = NULL, + .ce_ie_addr = &ath12k_ce_ie_addr_ipq5424, + .ce_remap = &ath12k_ce_remap_ipq5424, .bdf_addr_offset = 0x940000, }, }; From patchwork Thu Jan 30 05:18:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13954313 X-Patchwork-Delegate: quic_jjohnson@quicinc.com Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 38C0D154BFE; Thu, 30 Jan 2025 05:19:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214398; cv=none; b=L2GgzeMVUpCC8R2Yd6dhhyNRCeEUJHWcIHje3G5W0lwlhyvhcnaPV+ztOxqVdr33WQr85Rlg2n5Xl8E52KanKNlarF2AKqed3k1Ce52aHFqYjU/FZiYZu3NAOL+QpO4WrFpWeJSAgf37NI/DXYFpmfDlg4Oaixxc+fTk1KX/mIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738214398; c=relaxed/simple; bh=iASeqjJsAnlFb+Z/MW7NADrnwsZt3hjo1ZbxDDj1Rg8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ssnbZBJ1eLwFkHgie9OqF6/Tkt7LgthGu1urZ0QtK0osAsmTG6Pj8MZzVCI1wa3sDyKaXPaXCRIKIhYpY62LDdrVTkDQwZ+mnCfNG4HlImrFjVO45C9oIDgsybxm5TAyUCf3VfiOuQL2rIcx94YkLSiExsTH+Oh+duHb9btbDX4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=UxMfTjzb; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="UxMfTjzb" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50TLlfpA030164; Thu, 30 Jan 2025 05:19:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hQW/uwSsCdNcJYbKXhDgIauPl8mwC5rmI2zt4OYJh+w=; b=UxMfTjzbrkK916Bp Ejy93jSBxdNgKg/EUbaiZKPs7dOqRpfbU/41B0Lljd+wCLatnCty7QaaanWgGd4R gfWgISVlC0qBU3IVCjx7jdB7ua1ed5ScAVnsP7zvlT5bk9nplqihikIfGjMiypky i0mWUUp9YhPnlCQ3ON2Ed732uM8u6DOvzbAVRMx3udJWCTT7EmUVk0wY8xtHbi9L ot+PMTThl4Q3yLUVya+A0j8tzJbwVVl9A2Z0ssbrHlV4WgP8bl+KqQbPAngLCZ0C 1MugmOPSL9Q8MP64+XVlZmpMAdzopfNGPfdnzFZU3pHQEu5dZSDA0/MLpfIIeLrn DtjDwg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 44fvjcgnn0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:51 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50U5JoO1001618 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jan 2025 05:19:50 GMT Received: from hu-rajkbhag-blr.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 29 Jan 2025 21:19:46 -0800 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , , , "Sowmiya Sree Elavalagan" , Saravanakumar Duraisamy , Raj Kumar Bhagat Subject: [RFC PATCH 5/5] wifi: ath12k: Enable IPQ5424 WiFi device support Date: Thu, 30 Jan 2025 10:48:38 +0530 Message-ID: <20250130051838.1924079-6-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> References: <20250130051838.1924079-1-quic_rajkbhag@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: ei1D-p9qtg0vRv9F5iXpZaVbq_t-k_9E X-Proofpoint-GUID: ei1D-p9qtg0vRv9F5iXpZaVbq_t-k_9E X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-30_02,2025-01-29_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=999 impostorscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501300039 From: Sowmiya Sree Elavalagan Currently, ath12k AHB (in IPQ5332) uses SCM calls to authenticate the firmware image to bring up userpd. From IPQ5424 onwards, Q6 firmware can directly communicate with the Trusted Management Engine - Lite (TME-L), eliminating the need for SCM calls for userpd bring-up. Hence, to enable IPQ5424 device support, use qcom_mdt_load_no_init() and skip the SCM call as Q6 will directly authenticate the userpd firmware. Tested-on: IPQ5424 hw1.0 AHB WLAN.WBE.1.5-01053-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.3.1-00130-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sowmiya Sree Elavalagan Co-developed-by: Saravanakumar Duraisamy Signed-off-by: Saravanakumar Duraisamy Signed-off-by: Raj Kumar Bhagat --- drivers/net/wireless/ath/ath12k/ahb.c | 80 +++++++++++++++++---------- drivers/net/wireless/ath/ath12k/ahb.h | 9 +++ 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/ahb.c b/drivers/net/wireless/ath/ath12k/ahb.c index d502b59a78d8..75767915dec3 100644 --- a/drivers/net/wireless/ath/ath12k/ahb.c +++ b/drivers/net/wireless/ath/ath12k/ahb.c @@ -21,6 +21,9 @@ static const struct of_device_id ath12k_ahb_of_match[] = { { .compatible = "qcom,ipq5332-wifi", .data = (void *)ATH12K_HW_IPQ5332_HW10, }, + { .compatible = "qcom,ipq5424-wifi", + .data = (void *)ATH12K_HW_IPQ5424_HW10, + }, { } }; @@ -398,8 +401,8 @@ static int ath12k_ahb_power_up(struct ath12k_base *ab) ATH12K_AHB_UPD_SWID; /* Load FW image to a reserved memory location */ - ret = qcom_mdt_load(dev, fw, fw_name, pasid, mem_region, mem_phys, mem_size, - &mem_phys); + ret = ab_ahb->ahb_ops->mdt_load(dev, fw, fw_name, pasid, mem_region, mem_phys, + mem_size, &mem_phys); if (ret) { ath12k_err(ab, "Failed to load MDT segments: %d\n", ret); goto err_fw; @@ -430,11 +433,13 @@ static int ath12k_ahb_power_up(struct ath12k_base *ab) goto err_fw2; } - /* Authenticate FW image using peripheral ID */ - ret = qcom_scm_pas_auth_and_reset(pasid); - if (ret) { - ath12k_err(ab, "failed to boot the remote processor %d\n", ret); - goto err_fw2; + if (ab_ahb->scm_auth_enabled) { + /* Authenticate FW image using peripheral ID */ + ret = qcom_scm_pas_auth_and_reset(pasid); + if (ret) { + ath12k_err(ab, "failed to boot the remote processor %d\n", ret); + goto err_fw2; + } } /* Instruct Q6 to spawn userPD thread */ @@ -491,13 +496,15 @@ static void ath12k_ahb_power_down(struct ath12k_base *ab, bool is_suspend) qcom_smem_state_update_bits(ab_ahb->stop_state, BIT(ab_ahb->stop_bit), 0); - pasid = (u32_encode_bits(ab_ahb->userpd_id, ATH12K_USERPD_ID_MASK)) | - ATH12K_AHB_UPD_SWID; - /* Release the firmware */ - ret = qcom_scm_pas_shutdown(pasid); - if (ret) - ath12k_err(ab, "scm pas shutdown failed for userPD%d: %d\n", - ab_ahb->userpd_id, ret); + if (ab_ahb->scm_auth_enabled) { + pasid = (u32_encode_bits(ab_ahb->userpd_id, ATH12K_USERPD_ID_MASK)) | + ATH12K_AHB_UPD_SWID; + /* Release the firmware */ + ret = qcom_scm_pas_shutdown(pasid); + if (ret) + ath12k_err(ab, "scm pas shutdown failed for userPD%d\n", + ab_ahb->userpd_id); + } } static void ath12k_ahb_init_qmi_ce_config(struct ath12k_base *ab) @@ -707,6 +714,14 @@ static int ath12k_ahb_map_service_to_pipe(struct ath12k_base *ab, u16 service_id return 0; } +static const struct ath12k_ahb_ops ahb_ops_ipq5332 = { + .mdt_load = qcom_mdt_load, +}; + +static const struct ath12k_ahb_ops ahb_ops_ipq5424 = { + .mdt_load = qcom_mdt_load_no_init, +}; + static const struct ath12k_hif_ops ath12k_ahb_hif_ops_ipq5332 = { .start = ath12k_ahb_start, .stop = ath12k_ahb_stop, @@ -1041,19 +1056,9 @@ static int ath12k_ahb_probe(struct platform_device *pdev) struct device_node *mem_node; struct ath12k_ahb *ab_ahb; enum ath12k_hw_rev hw_rev; - u32 addr, userpd_id; + u32 addr; int ret; - hw_rev = ath12k_ahb_get_hw_rev(pdev); - switch (hw_rev) { - case ATH12K_HW_IPQ5332_HW10: - hif_ops = &ath12k_ahb_hif_ops_ipq5332; - userpd_id = ATH12K_IPQ5332_USERPD_ID; - break; - default: - return -EOPNOTSUPP; - } - ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) { dev_err(&pdev->dev, "Failed to set 32-bit coherent dma\n"); @@ -1067,13 +1072,32 @@ static int ath12k_ahb_probe(struct platform_device *pdev) return -ENOMEM; } + ab_ahb = ath12k_ab_to_ahb(ab); + ab_ahb->ab = ab; + + hw_rev = ath12k_ahb_get_hw_rev(pdev); + switch (hw_rev) { + case ATH12K_HW_IPQ5332_HW10: + hif_ops = &ath12k_ahb_hif_ops_ipq5332; + ab_ahb->userpd_id = ATH12K_IPQ5332_USERPD_ID; + ab_ahb->scm_auth_enabled = true; + ab_ahb->ahb_ops = &ahb_ops_ipq5332; + break; + case ATH12K_HW_IPQ5424_HW10: + hif_ops = &ath12k_ahb_hif_ops_ipq5332; + ab_ahb->userpd_id = ATH12K_IPQ5332_USERPD_ID; + ab_ahb->scm_auth_enabled = false; + ab_ahb->ahb_ops = &ahb_ops_ipq5424; + break; + default: + ret = -EOPNOTSUPP; + goto err_core_free; + } + ab->hif.ops = hif_ops; ab->pdev = pdev; ab->hw_rev = hw_rev; platform_set_drvdata(pdev, ab); - ab_ahb = ath12k_ab_to_ahb(ab); - ab_ahb->ab = ab; - ab_ahb->userpd_id = userpd_id; /* 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 diff --git a/drivers/net/wireless/ath/ath12k/ahb.h b/drivers/net/wireless/ath/ath12k/ahb.h index d56244b20a6a..270d6db2a4a4 100644 --- a/drivers/net/wireless/ath/ath12k/ahb.h +++ b/drivers/net/wireless/ath/ath12k/ahb.h @@ -43,6 +43,13 @@ enum ath12k_ahb_userpd_irq { struct ath12k_base; +struct ath12k_ahb_ops { + int (*mdt_load)(struct device *dev, const struct firmware *fw, + const char *firmware, int pas_id, void *mem_region, + phys_addr_t mem_phys, size_t mem_size, + phys_addr_t *reloc_base); +}; + struct ath12k_ahb { struct ath12k_base *ab; struct rproc *tgt_rproc; @@ -59,6 +66,8 @@ struct ath12k_ahb { u32 spawn_bit; u32 stop_bit; int userpd_irq_num[ATH12K_USERPD_MAX_IRQ]; + bool scm_auth_enabled; + const struct ath12k_ahb_ops *ahb_ops; }; static inline struct ath12k_ahb *ath12k_ab_to_ahb(struct ath12k_base *ab)