From patchwork Wed Oct 23 06:03:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13846492 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 39EBD12FB34; Wed, 23 Oct 2024 06:04:25 +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=1729663467; cv=none; b=YIM91Dm3vD31j02Ay9rJ5lx625SmdiwiCoZ0UuYly0J0ixFHduj2y7uOT57JteCSfmyR+Ip+5yMKQPENZCSge9MOEBEBmCKlOxHB4ozMZfg4Cjq1wLfTTo4JLH8YrSDhTaSrIj4najcs7pNQNPWjXFiQxAuSnX664TIfMIEgDk4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729663467; c=relaxed/simple; bh=5l2IOBgMWufvMK45Va72JDgbBqy2UirqJFylGwY7jV8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=S8C1wX+vuu9y7M4OHVDa1hDRnlQzsKEiai5nypX7Ltn+sjtVZBtHotv9cDZ7rjQ+7UW2dzqOxRWu0yO+jB4sa4DvPwGZngLWfEvrtMr8+jGqvJ5n2Nd2zLWP9QeUU8F4tSz94+h+cuTYPGoeo3FlByu1YaO8leZke1oLAuWmTKE= 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=Sdf5ntYS; 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="Sdf5ntYS" 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 49MLa5Wd024348; Wed, 23 Oct 2024 06:04:22 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= 2MlZa3dNLdwiSMgj2PMGkDGf7M38y7kDPQ5kmRSQk30=; b=Sdf5ntYSqxX9G/2S cx6AtERC/AH16QXh1GeZNeGuxP4IsZRUYPNTrjt9uCUT9nbOULvG844tK84GWws6 gVqoIGF0iiJUnbcUYexBqIOWRMYQH7CCzykSCuBdt5zYnBVjzHty+pbS4mUrTmDU S9CNugGGKwkFxEmBsVxRlisWO8+6RrwpGzcxcDJOAp0smG93x+M+XKnYlL5JyvL+ 2YKp2sBPP9uBwwpIr0hbtMzm6GYIBA8HStkwjr0z01JmGa6jT1SDg279CjnGlj27 zFfur7jnIxE/63xQ7pKFRP/l0ATktltC5X36GwqIrTEms8v8AJ0yXmq1flrpQuNM 9gmFTA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42em3uh115-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:22 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49N64LRh008447 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:21 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; Tue, 22 Oct 2024 23:04:17 -0700 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , "Bjorn Andersson" , Konrad Dybcio , , , , Raj Kumar Bhagat Subject: [RFC PATCH 1/6] dt-bindings: net: wireless: update required properties for ath12k PCI module Date: Wed, 23 Oct 2024 11:33:47 +0530 Message-ID: <20241023060352.605019-2-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023060352.605019-1-quic_rajkbhag@quicinc.com> References: <20241023060352.605019-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: 5RMuoJIn9Nf3-Qb7y-NA-waFCgEbFqGz X-Proofpoint-ORIG-GUID: 5RMuoJIn9Nf3-Qb7y-NA-waFCgEbFqGz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 adultscore=0 suspectscore=0 phishscore=0 clxscore=1015 mlxscore=0 mlxlogscore=840 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410230035 The current device-tree bindings for the Ath12K module list many WCN7850-specific properties as required. However, these properties are not applicable to other Ath12K devices. Hence, remove WCN7850-specific properties from the required section, retaining only generic properties valid across all Ath12K devices. WCN7850-specific properties will remain required based on the device's compatible enum. Signed-off-by: Raj Kumar Bhagat --- .../bindings/net/wireless/qcom,ath12k.yaml | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml index 1b5884015b15..ecf38af747f7 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml @@ -1,5 +1,6 @@ # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) # Copyright (c) 2024 Linaro Limited +# Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. %YAML 1.2 --- $id: http://devicetree.org/schemas/net/wireless/qcom,ath12k.yaml# @@ -52,18 +53,28 @@ properties: required: - compatible - reg - - vddaon-supply - - vddwlcx-supply - - vddwlmx-supply - - vddrfacmn-supply - - vddrfa0p8-supply - - vddrfa1p2-supply - - vddrfa1p8-supply - - vddpcie0p9-supply - - vddpcie1p8-supply additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + enum: + - pci17cb,1107 + then: + required: + - vddaon-supply + - vddwlcx-supply + - vddwlmx-supply + - vddrfacmn-supply + - vddrfa0p8-supply + - vddrfa1p2-supply + - vddrfa1p8-supply + - vddpcie0p9-supply + - vddpcie1p8-supply + examples: - | #include From patchwork Wed Oct 23 06:03:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13846493 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 761BC14A4D4; Wed, 23 Oct 2024 06:04:30 +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=1729663471; cv=none; b=Mje7Aa4EbPSxWGeeMjzYLXqW0KUFGBb+yBogdh4Uo6YkN9DdxQNpzab0aKrdsZdjq2+ZVcWuUc6v/0VNM2GUH0PYqzFIV7gyoGdoNq3RO/hxdU9yxrqNzL55kNo0RA+nn5oINFXpEmU/4eqF84DLAkRk8/tvn6teE5iMbjTWBmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729663471; c=relaxed/simple; bh=mq5dE1KEBgxTYwePc3oHmA2Y11gmEGWUuK9WwdyaBYc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pzjbE8IIKpVisd/U+vh1HWZ/hwJtGxCwY21SamM1jUmAOK2IBXUlBPv4wrfbuHR5fxa7yf5nasqIZKT1jROBeexnxHw1cog5n4+jIPwGKpkGQ2XpCfnkvLNoV7xsJjJlv8ehPRAYGyDtWFw9QOOb8etzrPfQNBUWWne+gzP421k= 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=g2UDNZgH; 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="g2UDNZgH" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49MLaFPI016699; Wed, 23 Oct 2024 06:04:26 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= rs3dR3lIk9LXliUg7JlV/IabmOYVvaAGYWji+hb3VLU=; b=g2UDNZgHklG8+79d ZDJAfilKlPk74U5KsbX/jTOuemg+e0CRxPF5rcTGgAdtksEDUfE8ZCQljTOqdAEf ILB9Fb0pVrHTyZ1FXeG+odZnYTdK4uLv4PwlTxTPehrilVvyt8n24QSth58PJ743 POa7bMcLIQMAgG4Q3ZCAh/+U/MIvy1TsZSkulXo/Cee0OGbP49gdTIh+bhF6Vqxk rMJ7Kood6sFbD1BqyFzkFMVZUEGpqKGcMLKJ2atRHL9HY2by6g01fUdDodW9YLUU 6h1by5RUKsGSmbvWdbiSjqUjJY0czprumYMB60/nuEpiTbPpvkVzBAxxrBx6dAeK JeMDgA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42em3xh115-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:26 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49N64Phl019400 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:25 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; Tue, 22 Oct 2024 23:04:21 -0700 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , "Bjorn Andersson" , Konrad Dybcio , , , , Raj Kumar Bhagat Subject: [RFC PATCH 2/6] dt-bindings: net: wireless: ath12k: describe WSI property for QCN9274 Date: Wed, 23 Oct 2024 11:33:48 +0530 Message-ID: <20241023060352.605019-3-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023060352.605019-1-quic_rajkbhag@quicinc.com> References: <20241023060352.605019-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: QUhtInOjT1dhVnFOagTK6imMalmgsB9W X-Proofpoint-ORIG-GUID: QUhtInOjT1dhVnFOagTK6imMalmgsB9W X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 impostorscore=0 mlxscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410230034 QCN9274 device has WSI support. WSI stands for WLAN Serial Interface. It is used for the exchange of specific control information across radios based on the doorbell mechanism. This WSI connection is essential to exchange control information among these devices Hence, describe WSI interface supported in QCN9274 with the following properties: - qcom,wsi-group-id: It represents the identifier assigned to the WSI connection. All the ath12k devices connected to same WSI connection have the same wsi-group-id. - qcom,wsi-index: It represents the identifier assigned to ath12k device in the order of the WSI connection. - qcom,wsi-num-devices: Number of devices connected through WSI in the same group ID. Signed-off-by: Raj Kumar Bhagat --- .../bindings/net/wireless/qcom,ath12k.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml index ecf38af747f7..6c8f97865075 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml @@ -19,6 +19,7 @@ properties: compatible: enum: - pci17cb,1107 # WCN7850 + - pci17cb,1109 # QCN9274 reg: maxItems: 1 @@ -50,6 +51,41 @@ properties: vddpcie1p8-supply: description: VDD_PCIE_1P8 supply regulator handle + wsi: + type: object + description: + The ath12k devices (QCN9274) feature WSI support. WSI stands for + WLAN Serial Interface. It is used for the exchange of specific + control information across radios based on the doorbell mechanism. + This WSI connection is essential to exchange control information + among these devices. + + properties: + qcom,wsi-group-id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + It represents the identifier assigned to the WSI connection. All + the ath12k devices connected to same WSI connection have the + same wsi-group-id. + + qcom,wsi-index: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + It represents the identifier assigned to ath12k device in the + order of the WSI connection. + + qcom,wsi-num-devices: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of devices connected through WSI in the same group ID. + + required: + - qcom,wsi-group-id + - qcom,wsi-index + - qcom,wsi-num-devices + + additionalProperties: false + required: - compatible - reg @@ -108,3 +144,28 @@ examples: }; }; }; + + - | + pcie { + #address-cells = <3>; + #size-cells = <2>; + + pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi@0 { + compatible = "pci17cb,1109"; + reg = <0x0 0x0 0x0 0x0 0x0>; + + wsi { + qcom,wsi-group-id = <0>; + qcom,wsi-index = <0>; + qcom,wsi-num-devices = <3>; + }; + }; + }; + }; From patchwork Wed Oct 23 06:03:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13846494 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 C5839145B1B; Wed, 23 Oct 2024 06:04:35 +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=1729663477; cv=none; b=ptAT6f2Df9DCaaXITtjM5Figs7km/eG4MGkJKFT+3Y629wzG78VDRsJ4ZNsfw5yGxe6Kak6bLJCVx+etSQL6nQV1EMKwJRwcCxISCyJ68NnDyt5v8jnnP9D5IFP9E9HeFdIMm1v3wMyQTW/6YGZE+/wFN9WwB1RdMuCTJiEa388= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729663477; c=relaxed/simple; bh=fQwZY89RsxHfLqwsTYd6uN0mUiHnqqplXWDCUXtDT5E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=H29tC8iKCWCZrvAQwh2tibyEViglSJYJAH4BPKg3HQFODpclbXV1NISH0mT29Iyxk2nk6cCWdQSA04TRUZnsHjxFTeMV8mNVtVzWhV9JCPDTCGhhnT01il77hKE5pYYzlpQe/jDC+s80qAD+desNPAYxLAXFu54/lmAdcnMELrg= 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=P8h7Nkhh; 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="P8h7Nkhh" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49MLejUe018635; Wed, 23 Oct 2024 06:04:31 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= gzWrTatuMnIeEeP+iJiyK8aHdkKFKKlqQNYSM8pc2qw=; b=P8h7Nkhh/6VnIuhe LZJW2KLp/8oydv8FjObxF0webGt/bJ2IYQJVtjX4YGaabWh0/Bi8orCk8FuzpkRb sSj2FB3PywkUDu4TgrHNxdIZvdF5Iv/hwo+MBblLBh6q39om05i7flh/ISoMxlK9 58kjOkOPfDGMFSqDvVh8ArJyOqu041l449PIyU6B50xy4z5jdF1lmnl/TFOW5o4A x7gPsyyURaERS/tE+itBLfMHcjWc9uZhEnW+PkkSjN1/7QmIOOYs2c70FpuNAVX+ yUY8gCgStnTrKdniaLP34TJVXuHaJhGxjhPPfh2kBg5sa/bBWw/JmPcT1V8y42cS 1+ff4w== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42em6691g8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:31 +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 49N64UFw017585 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:30 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; Tue, 22 Oct 2024 23:04:25 -0700 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , "Bjorn Andersson" , Konrad Dybcio , , , , Harshitha Prem , Aditya Kumar Singh , Kalle Valo Subject: [RFC PATCH 3/6] wifi: ath12k: parse multiple device information from device tree Date: Wed, 23 Oct 2024 11:33:49 +0530 Message-ID: <20241023060352.605019-4-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023060352.605019-1-quic_rajkbhag@quicinc.com> References: <20241023060352.605019-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: tmW-yvm3k45P6V7vEcs6YQNQE5baTuNG X-Proofpoint-GUID: tmW-yvm3k45P6V7vEcs6YQNQE5baTuNG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 clxscore=1015 mlxscore=0 bulkscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410230035 From: Harshitha Prem Currently, single device is part of device group abstraction but for multi link operation, multiple devices have to be combined together. Information of how many devices involved in grouping can be parsed from device tree and it would have the valid group id information as well. Add changes to parse devices involved and group id from device tree file to form device group Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem Co-developed-by: Aditya Kumar Singh Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath12k/core.c | 106 ++++++++++++++++++++++--- drivers/net/wireless/ath/ath12k/core.h | 2 + 2 files changed, 98 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index 3f0f44cbdb4c..b7b2d552205c 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1403,6 +1403,7 @@ ath12k_core_hw_group_alloc(u8 id, u8 max_devices) ag->num_devices = max_devices; list_add(&ag->list, &ath12k_hw_group_list); mutex_init(&ag->mutex_lock); + ag->mlo_capable = false; return ag; } @@ -1417,23 +1418,94 @@ static void ath12k_core_hw_group_free(struct ath12k_hw_group *ag) mutex_unlock(&ath12k_ag_list_lock); } +/* This function needs to be used only when dt has multi chip grouping information */ +static struct ath12k_hw_group *ath12k_core_hw_group_find_by_id(u8 group_id) +{ + struct ath12k_hw_group *ag; + + /* group ids will be unique only for multi chip group */ + list_for_each_entry(ag, &ath12k_hw_group_list, list) { + if (group_id == ag->id && ag->num_devices > 1) + return ag; + } + + return NULL; +} + static struct ath12k_hw_group *ath12k_core_assign_hw_group(struct ath12k_base *ab) { struct ath12k_hw_group *ag; - u32 group_id = ATH12K_INVALID_GROUP_ID; + u32 group_id = ATH12K_INVALID_GROUP_ID, num_devices; + struct device *dev = ab->dev; + struct device_node *mlo; lockdep_assert_held(&ath12k_ag_list_lock); - /* The grouping of multiple devices will be done based on device tree file. - * TODO: device tree file parsing to know about the devices involved in group. - * - * The platforms that do not have any valid group information would have each - * device to be part of its own invalid group. + /* The grouping of multiple devices will be done based on device + * tree file. * - * Currently, we are not parsing any device tree information and hence, grouping - * of multiple devices is not involved. Thus, single device is added to device - * group. + * The platforms that do not have any valid group information would + * have each device to be part of its own invalid group. */ + mlo = of_get_child_by_name(dev->of_node, "wsi"); + if (!mlo) { + goto invalid_group; + } else { + if (of_property_read_u32(mlo, "qcom,wsi-group-id", &group_id)) { + ath12k_err(ab, "wsi-group-id not found\n"); + goto invalid_group; + } + } + + if (of_property_read_u32(mlo, "qcom,wsi-num-devices", &num_devices)) { + ath12k_err(ab, "wsi-num-devices not found\n"); + group_id = ATH12K_INVALID_GROUP_ID; + goto invalid_group; + } + + if (num_devices > ATH12K_MAX_SOCS) { + ath12k_warn(ab, "num_devices advertised %d is more than limit %d\n", + num_devices, ATH12K_MAX_SOCS); + group_id = ATH12K_INVALID_GROUP_ID; + goto invalid_group; + } + + if (of_property_read_u32(mlo, "qcom,wsi-index", &ab->wsi_index)) { + ath12k_err(ab, "qcom,wsi-index not found\n"); + group_id = ATH12K_INVALID_GROUP_ID; + goto invalid_group; + } + + ath12k_dbg(ab, ATH12K_DBG_BOOT, + "WSI info: group-id: %d, num-devices: %d, index: %d", + group_id, num_devices, ab->wsi_index); + + /* Currently only one group of multiple devices are supported, + * since we use group id ATH12K_INVALID_GROUP_ID for single + * device group which didn't have dt entry, there could be many + * groups with same group id, i.e ATH12K_INVALID_GROUP_ID. So + * default group id of ATH12K_INVALID_GROUP_ID combined with + * num devices in ath12k_hw_group determines if the group is + * multi device or single device group + */ + ag = ath12k_core_hw_group_find_by_id(group_id); + if (!ag) { + ag = ath12k_core_hw_group_alloc(group_id, num_devices); + if (!ag) { + ath12k_warn(ab, "unable to create new hw group\n"); + return NULL; + } + goto exit; + } else if (test_bit(ATH12K_GROUP_FLAG_UNREGISTER, &ag->flags)) { + ath12k_dbg(ab, ATH12K_DBG_BOOT, "group id %d in unregister state\n", + ag->id); + group_id = ATH12K_INVALID_GROUP_ID; + goto invalid_group; + } else { + goto exit; + } + +invalid_group: ag = ath12k_core_hw_group_alloc(group_id, 1); if (!ag) { ath12k_warn(ab, "unable to create new hw group\n"); @@ -1441,10 +1513,16 @@ static struct ath12k_hw_group *ath12k_core_assign_hw_group(struct ath12k_base *a } ath12k_dbg(ab, ATH12K_DBG_BOOT, "Single device is added to hardware group\n"); +exit: + if (ag->num_probed >= ag->num_devices) { + ath12k_warn(ab, "unable to add new device to group, max limit reached\n"); + group_id = ATH12K_INVALID_GROUP_ID; + goto invalid_group; + } + ab->device_id = ag->num_probed++; ag->ab[ab->device_id] = ab; ab->ag = ag; - ag->mlo_capable = false; return ag; } @@ -1511,6 +1589,14 @@ static void ath12k_core_hw_group_cleanup(struct ath12k_hw_group *ag) return; mutex_lock(&ag->mutex_lock); + + if (test_bit(ATH12K_GROUP_FLAG_UNREGISTER, &ag->flags)) { + mutex_unlock(&ag->mutex_lock); + return; + } + + set_bit(ATH12K_GROUP_FLAG_UNREGISTER, &ag->flags); + ath12k_core_hw_group_stop(ag); for (i = 0; i < ag->num_devices; i++) { diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index cde35616ba56..09fc1c29368f 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -211,6 +211,7 @@ enum ath12k_scan_state { enum ath12k_hw_group_flags { ATH12K_GROUP_FLAG_REGISTERED, + ATH12K_GROUP_FLAG_UNREGISTER, }; enum ath12k_dev_flags { @@ -1026,6 +1027,7 @@ struct ath12k_base { struct notifier_block panic_nb; struct ath12k_hw_group *ag; + u32 wsi_index; /* must be last */ u8 drv_priv[] __aligned(sizeof(void *)); From patchwork Wed Oct 23 06:03:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13846495 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 834CC146D7F; Wed, 23 Oct 2024 06:04:43 +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=1729663485; cv=none; b=GattI8nBtzbrzU2CnazprV4nlOX6B7ydSzMo6/jUWb38oWRMNzh6Wmcp41MoZS7tQ6IL4qkOylHQlSRljXx64KK5Hza0RD5TOELyoSsHt7Zoh7NvaCWrX2Egs00jA08kzkJEWAE1kminZzQj1R7ufbMVJmy9uZaUoK2OllbTpO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729663485; c=relaxed/simple; bh=8s5rDsO9kuMqJeoEdB8vaTUwSA98jrBSlJjVKTQholY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KEqb3Z5yCBZe0NUKbkTTrvQPjcc9B3kSOjYqv9o+YCU8tYEUWTwmn35e62RDKs2euGHclLHdeG03dBPN9zhCsTjvbIiKe6CoJLUcWvER243PIzNvFcrEhgY5GSbjchIvTedlwiXbcjKUmzVMUBMyOz/BFM9apEbtgTmgRzw9avM= 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=emRfnz7a; 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="emRfnz7a" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49MLa9GB025148; Wed, 23 Oct 2024 06:04:37 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= LLveBCIlg+6rbX3Q1bTENMsw4b12OySwJCCxOrvzrVc=; b=emRfnz7a7TPmnwk+ Lwo0mpQ3jieHFGc67aFMbSdsPi1oA0I8xV8a6tfZPvDfKfUOTvFpqdYDxMtacyFZ Z3DZeH6aiEfoipwYVdTXqq8zjddKDEnfncdti7F9979CYQuRSMxk6OcaSfpQSOZd 9xL2pOWPFZhLT6cFQwj792QgWbx12pkCp1hBVOB9gYbALgnLuncrXsVqWr/17n/N wZrSJYWIIdrkvXdnFE6sxyxXT9nV8wcWAFLgCP9pUbgYOJZTh82X3/j7bOE23cQl hCZP2Xk4GBN4mv+DJc6FgS2QGI8y20u4qj3PbdfyUj8//JwojdFOub7lxg4GFjvq xdZhVA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42em41s1bn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04: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 49N64ZFK018052 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04: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; Tue, 22 Oct 2024 23:04:30 -0700 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , "Bjorn Andersson" , Konrad Dybcio , , , , Karthikeyan Periyasamy , Harshitha Prem , "Kalle Valo" Subject: [RFC PATCH 4/6] wifi: ath12k: Send partner device details in QMI MLO capability Date: Wed, 23 Oct 2024 11:33:50 +0530 Message-ID: <20241023060352.605019-5-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023060352.605019-1-quic_rajkbhag@quicinc.com> References: <20241023060352.605019-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: 7JEmwAdaPTXdNGLVkK95vixaRFkPjOKL X-Proofpoint-ORIG-GUID: 7JEmwAdaPTXdNGLVkK95vixaRFkPjOKL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 clxscore=1015 mlxscore=0 suspectscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410230035 From: Karthikeyan Periyasamy Currently, QMI MLO host capability is sent with the details of local links and hw_link id only for particular device but in case of multi device group abstraction, it has to include the details of hw_link_id, num_local_links of every partner device that is involved in the group during QMI MLO capability exchange. Add changes to send partner device details in QMI MLO capability exchange. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Harshitha Prem Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath12k/qmi.c | 86 ++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index 5ebfe13b5313..689171b7b19f 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -2016,17 +2016,19 @@ static const struct qmi_elem_info qmi_wlanfw_wlan_ini_resp_msg_v01_ei[] = { }, }; -static void ath12k_host_cap_parse_mlo(struct ath12k_base *ab, - struct qmi_wlanfw_host_cap_req_msg_v01 *req) +static int ath12k_host_cap_parse_mlo(struct ath12k_base *ab, + struct qmi_wlanfw_host_cap_req_msg_v01 *req) { struct wlfw_host_mlo_chip_info_s_v01 *info; + struct ath12k_hw_group *ag = ab->ag; + struct ath12k_base *partner_ab; u8 hw_link_id = 0; - int i; + int i, j, ret; - if (!ab->ag->mlo_capable) { + if (!ag->mlo_capable) { ath12k_dbg(ab, ATH12K_DBG_QMI, "MLO is disabled hence skip QMI MLO cap"); - return; + return 0; } if (!ab->qmi.num_radios || ab->qmi.num_radios == U8_MAX) { @@ -2035,7 +2037,13 @@ static void ath12k_host_cap_parse_mlo(struct ath12k_base *ab, ath12k_dbg(ab, ATH12K_DBG_QMI, "skip QMI MLO cap due to invalid num_radio %d\n", ab->qmi.num_radios); - return; + return 0; + } + + if (ab->device_id == ATH12K_INVALID_DEVICE_ID) { + ath12k_err(ab, "failed to send MLO cap due to invalid device id\n"); + ret = -EINVAL; + return ret; } req->mlo_capable_valid = 1; @@ -2043,27 +2051,71 @@ static void ath12k_host_cap_parse_mlo(struct ath12k_base *ab, req->mlo_chip_id_valid = 1; req->mlo_chip_id = ab->device_id; req->mlo_group_id_valid = 1; - req->mlo_group_id = 0; + req->mlo_group_id = ag->id; req->max_mlo_peer_valid = 1; /* Max peer number generally won't change for the same device * but needs to be synced with host driver. */ req->max_mlo_peer = ab->hw_params->max_mlo_peer; req->mlo_num_chips_valid = 1; - req->mlo_num_chips = 1; + req->mlo_num_chips = ag->num_devices; - info = &req->mlo_chip_info[0]; - info->chip_id = ab->device_id; - info->num_local_links = ab->qmi.num_radios; + mutex_lock(&ag->mutex_lock); + for (i = 0; i < ag->num_devices; i++) { + info = &req->mlo_chip_info[i]; + partner_ab = ag->ab[i]; + + if (partner_ab->device_id == ATH12K_INVALID_DEVICE_ID) { + ath12k_err(ab, "failed to send MLO cap due to invalid partner device id\n"); + ret = -EINVAL; + goto device_cleanup; + } + + info->chip_id = partner_ab->device_id; + info->num_local_links = partner_ab->qmi.num_radios; - for (i = 0; i < info->num_local_links; i++) { - info->hw_link_id[i] = hw_link_id; - info->valid_mlo_link_id[i] = 1; + ath12k_dbg(ab, ATH12K_DBG_QMI, "MLO device id %d num_link %d\n", + info->chip_id, info->num_local_links); - hw_link_id++; + for (j = 0; j < info->num_local_links; j++) { + info->hw_link_id[j] = hw_link_id; + info->valid_mlo_link_id[j] = 1; + + hw_link_id++; + } } + if (hw_link_id <= 0) + ag->mlo_capable = false; + req->mlo_chip_info_valid = 1; + + mutex_unlock(&ag->mutex_lock); + return 0; + +device_cleanup: + for (i = i - 1; i >= 0; i--) { + info = &req->mlo_chip_info[i]; + + memset(info, 0, sizeof(*info)); + } + + req->mlo_num_chips = 0; + req->mlo_num_chips_valid = 0; + + req->max_mlo_peer = 0; + req->max_mlo_peer_valid = 0; + req->mlo_group_id = 0; + req->mlo_group_id_valid = 0; + req->mlo_chip_id = 0; + req->mlo_chip_id_valid = 0; + req->mlo_capable = 0; + req->mlo_capable_valid = 0; + + ag->mlo_capable = false; + mutex_unlock(&ag->mutex_lock); + + return ret; } static int ath12k_qmi_host_cap_send(struct ath12k_base *ab) @@ -2111,7 +2163,9 @@ static int ath12k_qmi_host_cap_send(struct ath12k_base *ab) req.nm_modem |= PLATFORM_CAP_PCIE_GLOBAL_RESET; } - ath12k_host_cap_parse_mlo(ab, &req); + ret = ath12k_host_cap_parse_mlo(ab, &req); + if (ret < 0) + goto out; ret = qmi_txn_init(&ab->qmi.handle, &txn, qmi_wlanfw_host_cap_resp_msg_v01_ei, &resp); From patchwork Wed Oct 23 06:03:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13846497 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 17FB6153838; Wed, 23 Oct 2024 06:04:53 +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=1729663495; cv=none; b=SXVrFKX3LL6gsXWfF3nBEgZF+BgbaW2csYpVhXV0n/Q60+GKYyVvpci80Oh0VmvBAAxUVUIJGGpwE5GEkmfNcguk+lpwu9yJlgG0ry7+I21rQSaeeGn8QL8GrTmch8JH8M86nQj71L7FuEfBFvj+4hRCCGrxrYG7SAcALvNP/eA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729663495; c=relaxed/simple; bh=ovONsQb0U0AYWnvAHHf4yrbpZbwWrdimmmldGh9DE0M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=auf547PfLVN+jjepgw5Id23lErY94Qq/3uYzVh2Z3k4xc7HsjaHDNe5xnkJmcZnjVprJPu73fPCofEQBReSJwcbvhPUWjXRcn3zaef4ofwdSUytT78BdCgKA11UF3KB8U7BXHeZljAzZw6O1CjuBiAqH2NX9NCFor3xakqYYunY= 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=m8SRo0RX; 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="m8SRo0RX" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49MLaD9R027445; Wed, 23 Oct 2024 06:04:49 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= 9F5+3SyJi3HXysrmFef3nEPWLR39X3yDiSrjaO+fm7w=; b=m8SRo0RXscw9nYp+ 2AUDwDN50dhjyajM6fzRAT8f/DELgIV9/7Dn4+IEYhtFgXoS5cOS5c0Fe/VB0zQ7 dR67dyKY0z9AMtBfR6YpUIXnH9szlggcfUf7LDKKxmeBW7XoWlVxEyhQBasKmY1u vbTjLGsv6HFJTwFPhLRb0bZ3Xk8h8vKIOvUK4WnKCPFow8GIXyReEusYqnw509Mu dWW6y53XMOXgrIFn5/8JFIimKa7k4dcBTE71QEV9DyStZcDBMYDpWbPEDgbDo0rJ bjjAcAR4nfGffcRtGXHHUpeBT5gCURzFSAxi1WLHKu6h1qO6lDeS9vjN+/CQI61s 8i8ecg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42em41s0q4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:48 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49N64eve016789 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:40 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; Tue, 22 Oct 2024 23:04:35 -0700 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , "Bjorn Andersson" , Konrad Dybcio , , , , Aditya Kumar Singh , Kalle Valo Subject: [RFC PATCH 5/6] wifi: ath12k: assign unique hardware link IDs during QMI host cap Date: Wed, 23 Oct 2024 11:33:51 +0530 Message-ID: <20241023060352.605019-6-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023060352.605019-1-quic_rajkbhag@quicinc.com> References: <20241023060352.605019-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: rpXHHXZlA3lf6xD1Fl7u6nVa-CP7cpIh X-Proofpoint-ORIG-GUID: rpXHHXZlA3lf6xD1Fl7u6nVa-CP7cpIh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410230035 From: Aditya Kumar Singh Currently, in the QMI host capability, the device index, the number of local links, and the corresponding hardware link IDs are sent. The hardware link ID assignment is based on the local variable hw_link_id, which starts from 0 and ranges up to num_local_links in the device. Starting from 0 is not ideal because it can result in the same link ID being assigned to different devices in certain scenarios (for example split mac). Hence, for MLO to function seamlessly, the hardware link IDs across devices need to be unique. To address this, a previous change already read the device ID from the Device Tree (DT) and stored it. This device ID will now be used as the starting index for the hardware link IDs. This ensures that the hardware link IDs assigned are unique across all devices. While at it, add debug prints to clearly show the MLO capability advertisement sent during QMI host capability exchange. Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath12k/qmi.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index 689171b7b19f..24aa74fa1c85 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -2060,6 +2060,12 @@ static int ath12k_host_cap_parse_mlo(struct ath12k_base *ab, req->mlo_num_chips_valid = 1; req->mlo_num_chips = ag->num_devices; + ath12k_dbg(ab, ATH12K_DBG_QMI, "MLO Capability advertisement:"); + ath12k_dbg(ab, ATH12K_DBG_QMI, " * device_id: %d", req->mlo_chip_id); + ath12k_dbg(ab, ATH12K_DBG_QMI, " * group_id: %d", req->mlo_group_id); + ath12k_dbg(ab, ATH12K_DBG_QMI, " * num_devices: %d", req->mlo_num_chips); + ath12k_dbg(ab, ATH12K_DBG_QMI, " * Devices info:"); + mutex_lock(&ag->mutex_lock); for (i = 0; i < ag->num_devices; i++) { info = &req->mlo_chip_info[i]; @@ -2074,13 +2080,19 @@ static int ath12k_host_cap_parse_mlo(struct ath12k_base *ab, info->chip_id = partner_ab->device_id; info->num_local_links = partner_ab->qmi.num_radios; - ath12k_dbg(ab, ATH12K_DBG_QMI, "MLO device id %d num_link %d\n", - info->chip_id, info->num_local_links); + ath12k_dbg(ab, ATH12K_DBG_QMI, " * device_id: %d", + info->chip_id); + ath12k_dbg(ab, ATH12K_DBG_QMI, " * num_links: %d", + info->num_local_links); for (j = 0; j < info->num_local_links; j++) { - info->hw_link_id[j] = hw_link_id; + info->hw_link_id[j] = partner_ab->wsi_index + j; info->valid_mlo_link_id[j] = 1; + ath12k_dbg(ab, ATH12K_DBG_QMI, + " * hw_link_id: %d\n", + info->hw_link_id[j]); + hw_link_id++; } } From patchwork Wed Oct 23 06:03:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raj Kumar Bhagat X-Patchwork-Id: 13846496 X-Patchwork-Delegate: kvalo@adurom.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 60A41146D7F; Wed, 23 Oct 2024 06:04:49 +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=1729663490; cv=none; b=jTazDbtB+bbld8Ihx+23RQkOfJVks7z7UotwmqSOmXA/JjGbltfjCy4h3usJ9IHUE1R6rntejjBZqYX6geQb4ZcCnmhKSykYWE7Mg+/c01HGJuT2QsqeMYICc4nRScAg5Tfj42BfiCOdHZGJlw5CcG5hcPW7rPrHgZLuiz3w6i4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729663490; c=relaxed/simple; bh=cnYYxvw2lVcifHIOM7/Z+dgyp96zMVBY83rJdzBzFjs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KiGNKFi8vlXaEzjRIFNGxb/bfD+U2DFQvHnwrB4FEeF7C965IBeyTfqdpyrjYfy86VQEZjqgyvO5VpU4XEZdT9K2WjI81518N5XJ/hp+rxClSwUd2Qs61B7aPgd1dfNFR3XdkjjL384g38k80WfUb86VmD8H79tv1F3AcwjoF+0= 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=Ngm3FG0t; 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="Ngm3FG0t" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49MLa3g0025438; Wed, 23 Oct 2024 06:04:45 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= IsiY7yt8JQwkr/CGYzfeuyrwP4Vfcc8zvfnje5HZERo=; b=Ngm3FG0tISNV7E8W QeYJG+gD9SATa0CZOpF5Z6+qs9/8b4/eImhv4fFdgVWAyEju0RA7g1sPw5NxsGoA I4FZff3X1PFlDm971la/64Ime9qT/2gWEb1R/Q9YHMEoGs4LcICAX38ocHy9/4ty HCpF80kLewszCbYx6lR9PeMvIAJyNIogxERFAupE7k+qtu9wflb/J+Orx/tP1Evi qXHKxGXFs6Rxgrrvt8by4hS/OjCQpWJYPVf2gQC66kMm4Etja6C2Yn7TZHS3ev6V qigx2wdFTtq0woiWDd7/mAKnrbC8im9aY5XsY+96HImCqnPejsQ1Xko+EeHd0OE5 FiryRA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42em4091ds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:45 +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 49N64iH3018169 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2024 06:04:44 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; Tue, 22 Oct 2024 23:04:40 -0700 From: Raj Kumar Bhagat To: CC: , Kalle Valo , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jeff Johnson , "Bjorn Andersson" , Konrad Dybcio , , , , Raj Kumar Bhagat Subject: [RFC PATCH 6/6] arm64: dts: qcom: ipq9574: Add WiFi nodes for RDP433 Date: Wed, 23 Oct 2024 11:33:52 +0530 Message-ID: <20241023060352.605019-7-quic_rajkbhag@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023060352.605019-1-quic_rajkbhag@quicinc.com> References: <20241023060352.605019-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: 9PUw3ig0SLfGvau46ldcCLW5RnzmvIWJ X-Proofpoint-GUID: 9PUw3ig0SLfGvau46ldcCLW5RnzmvIWJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 impostorscore=0 spamscore=0 phishscore=0 mlxlogscore=754 lowpriorityscore=0 clxscore=1015 malwarescore=0 bulkscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410230035 The RDP433 is a Qualcomm Reference Design Platform based on the IPQ9574. It has three QCN9274 WiFi devices connected to PCIe1, PCIe2, and PCIe3. These devices are also connected among themselves via WSI connection. This WSI connection is essential to exchange control information among these devices The WSI connection in RDP433 is represented below: +-------+ +-------+ +-------+ | pcie2 | | pcie3 | | pcie1 | | | | | | | +----->| wsi |------->| wsi |------->| wsi |-----+ | | idx 0 | | idx 1 | | idx 2 | | | +-------+ +-------+ +-------+ | +------------------------------------------------------+ Based on the above, the WSI properties for QCN9274 at pcie2 are: qcom,wsi-group-id = 0 qcom,wsi-index = 0 qcom,wsi-num-devices = 3; Hence, add WiFi nodes with WSI properties for all three QCN9274 devices connected to RDP433. Signed-off-by: Raj Kumar Bhagat --- arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts | 62 ++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts b/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts index 165ebbb59511..2241e20ad42a 100644 --- a/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts +++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dts @@ -3,7 +3,7 @@ * IPQ9574 RDP433 board device tree source * * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ /dts-v1/; @@ -27,6 +27,26 @@ &pcie1 { perst-gpios = <&tlmm 26 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 27 GPIO_ACTIVE_LOW>; status = "okay"; + + pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi1@0 { + compatible = "pci17cb,1109"; + reg = <0x0 0x0 0x0 0x0 0x0>; + status = "okay"; + + wsi { + qcom,wsi-group-id = <0>; + qcom,wsi-index = <2>; + qcom,wsi-num-devices = <3>; + }; + }; + }; }; &pcie2_phy { @@ -40,6 +60,26 @@ &pcie2 { perst-gpios = <&tlmm 29 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 30 GPIO_ACTIVE_LOW>; status = "okay"; + + pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi2@0 { + compatible = "pci17cb,1109"; + reg = <0x0 0x0 0x0 0x0 0x0>; + status = "okay"; + + wsi { + qcom,wsi-group-id = <0>; + qcom,wsi-index = <0>; + qcom,wsi-num-devices = <3>; + }; + }; + }; }; &pcie3_phy { @@ -53,6 +93,26 @@ &pcie3 { perst-gpios = <&tlmm 32 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>; status = "okay"; + + pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi3@0 { + compatible = "pci17cb,1109"; + reg = <0x0 0x0 0x0 0x0 0x0>; + status = "okay"; + + wsi { + qcom,wsi-group-id = <0>; + qcom,wsi-index = <1>; + qcom,wsi-num-devices = <3>; + }; + }; + }; }; &sdhc_1 {