From nobody Sat Nov 23 10:52:42 2024 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 8449919E7F8; Wed, 20 Nov 2024 09:55:10 +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=1732096512; cv=none; b=HOQtmaO33+KUky3PNoWuuvtuaWP49jz40k7ZolRCadMItbn5hMJF9PB+R2wXgPBXN5zx/6VZTqsfzXpBPzy8VHLbc+KBAp8JK4UFgNv3HvgcM+lpAtelDpEObNUfBANC9rooSzw4eMF6KETAz0042pPE5N1S7D7/QHb8VESrXlA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732096512; c=relaxed/simple; bh=WUeJIs0mFL7M8XzpJJUNbrJJinwwnmUal4RgzOn7Gcg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Gsi/s6bAYe6kSjmQIe0KRKCi/DYq6GAkFvmDEqZE0+rF14+O5a7PbI63Zrqt2ZQXiG+tBY03CF2SByKlWCZ08VRA/9eTq92oiVPed/Fr7XJkQ3y+BDlzFdISCXuvwF7Wj2qew9MMwrc/jfmL6RqB86Upio0UoDcXwV/dsLbdBrw= 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=c/g3cPCO; 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="c/g3cPCO" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AK9GWGU025914; Wed, 20 Nov 2024 09:55:05 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= koD9v3V22NKdXuygUupV/Kh2VPj6I0Qdh4KVMM+3h78=; b=c/g3cPCO/aqp6TAv vvE9UeDWwqi+am7nOPXzxIuuK3RU/W4X32Zw2THqg0HaXpQagFck9oK3v9ulTFI4 E3TOav1ZFNHSCiD4VrpNIrP5Vb7zcIuAUyTvDkjCfnEzBB03iJUNqIDo6FL4C4rT DfVhRQm6AhoxgZIFSnkoXZRHqAbMmdrIu4qV1JccRujshnPBo11a+lb2TIBiSRQt 0XL1434tHOpY8R/qnTqu6mUJAvdh1IS1ZXa5agAVLx2BI7gPwUmzIAtIGspP2VSp +9kbUlCaEUy94vaNAWa84E9wNYmB3frka2YOYtdmPAXFRkormwTTnPQr3aAyN9fQ rJ2Fag== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 431byjg92b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:05 +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 4AK9t4s3018946 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:04 GMT Received: from chejiang-gv.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, 20 Nov 2024 01:55:00 -0800 From: Cheng Jiang To: Marcel Holtmann , Luiz Augusto von Dentz , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , "Balakrishna Godavarthi" , Rocky Liao , CC: , , , , , Subject: [PATCH v2 1/4] dt-bindings: bluetooth: add 'qcom,product-variant' Date: Wed, 20 Nov 2024 17:54:25 +0800 Message-ID: <20241120095428.1122935-2-quic_chejiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241120095428.1122935-1-quic_chejiang@quicinc.com> References: <20241120095428.1122935-1-quic_chejiang@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 26dU5QNBVlge4OvrK2XWYIvyQxsOm8Hj X-Proofpoint-ORIG-GUID: 26dU5QNBVlge4OvrK2XWYIvyQxsOm8Hj 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 spamscore=0 clxscore=1015 suspectscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411200069 Content-Type: text/plain; charset="utf-8" Several Qualcomm projects will use the same Bluetooth chip, each focusing on different features. For instance, consumer projects prioritize the A2DP SRC feature, while IoT projects focus on the A2DP SINK feature, which may have more optimizations for coexistence when acting as a SINK. Due to the patch size, it is not feasible to include all features in a single firmware. Therefore, the 'product-variant' devicetree property is used to provide product information for the Bluetooth driver to load the appropriate firmware. If this property is not defined, the default firmware will be loaded, ensuring there are no backward compatibility issues with older devicetrees. The product-variant defines like this: 0 - 15 (16 bits) are product line specific definitions 16 - 23 (8 bits) are for the product line. 24 - 31 (8 bits) are reserved for future use, 0 currently |---------------------------------------------------------------------| | 32 Bits | |---------------------------------------------------------------------| | 31 - 24 (bits) | 23 - 16 (bits) | 15 - 0 (16 bits) | |---------------------------------------------------------------------| | Reserved | 0: default | 0: default | | | 1: CE | | | | 2: IoT | | | | 3: Auto | | | | 4: Reserved | | |---------------------------------------------------------------------| Signed-off-by: Cheng Jiang --- .../bindings/net/bluetooth/qualcomm-bluetooth.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluet= ooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-blueto= oth.yaml index 7bb68311c609..9019fe7bcdc6 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.ya= ml +++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.ya= ml @@ -110,6 +110,12 @@ properties: description: boot firmware is incorrectly passing the address in big-endian order =20 + qcom,product-variant: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + specify the product information for driver to load the appropriate f= irmware + + required: - compatible =20 --=20 2.25.1 From nobody Sat Nov 23 10:52:42 2024 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 5C3F61A0B06; Wed, 20 Nov 2024 09:55:14 +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=1732096515; cv=none; b=ca1hkOm+MAuI/zbNofKp8sFcl+8ew2BfBpPHatlVCjNl2KvtMd/P2wEhKvxhF98Q4qNsDxm/+KhWoy0LVk/NVoAKwzdYJHArDqAbQKlvrdU0Jx433n9CXf8AMn9vXxcI5aWXhbv0rR7sp2SrOdYc1ZT0K3b+Sy9e+W9DeJuw1gs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732096515; c=relaxed/simple; bh=vi83varq9C5D++EFKARBRaBIU6zcqQ6om9aIuhJm3mU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gFZV9kL+jesfMbJc0UrVcYnpRt7FQVx2sUiLBWnI/CFVwGEpNEMyO1aBGEDctgq5zRZPeSn7uMfslh0r3jQniTmX6vSVK0J2LAEJ9ggyvbWKdxZ7Do0/on1zxwm0b/l/zyljFj7RtJe+l1DpmEfljTVok7CWi2LCfe63xIyDYiY= 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=jkCBKLc/; 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="jkCBKLc/" 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 4AK9FPjg002520; Wed, 20 Nov 2024 09:55:09 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= 52xLF31GFh9AB+QlrlljU4ILVdNbAGo4Vhst1YXf0E0=; b=jkCBKLc/rsBL8g+c aHNEesR92oV/uf3kYV7gzrQe0GvAG019UgkYX9bQzLhv1KrMrSB/j3tiutUBx+rY nxGjfDFF2NB9cwpov+oY5foumYhlV4giTsLbddfVZTm2phL/g3dxr3Gd3XbSYyDD yzUKWKFqPf2h5S2cwK5vw8kjeSpbx/F14iYSbQFe/HJIsIIPXcYS8rSESYv3KIHj hoKqdzhomcbFGMfyqCNzWT4XCclgxY16CSt8aVGVDcti+8pY9TZr1WmKbDlMsfNt fhP3weMmahOXRPzLzY0t5hPH9e9PECQL4E5FX5Gna0EfScbv0JkDpE7rCRxFxEXD iOLO6Q== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4308y85cqg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:08 +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 4AK9t8WH018004 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:08 GMT Received: from chejiang-gv.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, 20 Nov 2024 01:55:04 -0800 From: Cheng Jiang To: Marcel Holtmann , Luiz Augusto von Dentz , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , "Balakrishna Godavarthi" , Rocky Liao , CC: , , , , , Subject: [PATCH v2 2/4] dt-bindings: bluetooth: Add qca6698 compatible string Date: Wed, 20 Nov 2024 17:54:26 +0800 Message-ID: <20241120095428.1122935-3-quic_chejiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241120095428.1122935-1-quic_chejiang@quicinc.com> References: <20241120095428.1122935-1-quic_chejiang@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: AZphLDx4rzqXcqAao9s7sGtl1UsNb3uT X-Proofpoint-GUID: AZphLDx4rzqXcqAao9s7sGtl1UsNb3uT 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 phishscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411200069 Content-Type: text/plain; charset="utf-8" Add QCA6698 qcom,qca6698-bt compatible strings. Signed-off-by: Cheng Jiang --- .../devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluet= ooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-blueto= oth.yaml index 9019fe7bcdc6..527f947289af 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.ya= ml +++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.ya= ml @@ -18,6 +18,7 @@ properties: enum: - qcom,qca2066-bt - qcom,qca6174-bt + - qcom,qca6698-bt - qcom,qca9377-bt - qcom,wcn3988-bt - qcom,wcn3990-bt @@ -175,6 +176,7 @@ allOf: compatible: contains: enum: + - qcom,qca6698-bt - qcom,wcn6855-bt then: required: --=20 2.25.1 From nobody Sat Nov 23 10:52:42 2024 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 6AF4B1A3029; Wed, 20 Nov 2024 09:55:18 +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=1732096519; cv=none; b=JiwvHWUpEVcAouP+p0yidExdUI7fN6XHPS+TUNbENHLAXUhdRIoarsvXVvbpFHSC+lAwww6gbhLxd4uJlDLMezNT9Xaiznc4VFqua4babXbQ9RPEfHweggpH+2l7ndxrbaJ+MNzheKsjm5Gft8ECwlFcAej+Yw6sFxEQ3JVFIuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732096519; c=relaxed/simple; bh=OSauWbuIvdcOirACBY3aawYXLFSkq+Xp1vHcpmJAnoA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gjzsDJ24fvnCKSVB2gGE1xDtVIeSbZ7ddbizZaJ3OrLQujAZApv4WhLXWVRPypEhug7bRFR+Ul2Jz8WUohoFkFgpHGSRBlVxXh/S2RmKSeaKhBeGgXxUBvMm6tthHh6kUarthkPqbrnhphaEepFhRuMUCHbb8eBfMyK48uN9iso= 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=Fl9G7RpE; 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="Fl9G7RpE" 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 4AK9FP9T002563; Wed, 20 Nov 2024 09:55:13 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= VhomC2qd3xDweP8cXyazbZh0fcvRxBZAg+RV0Gflm/g=; b=Fl9G7RpE7hQImlvY TAMV9zpYVXnmGJ4A9+aFSounq76wCsDn/yXvyQKtMVz75MPp1oE5qYGwjBbtZq/I CEiTzZz8OcTNUHLBQYdG/NrVZ+8Ixe4ycP6GDjt9DnEzv/hI90SMqVdwJdxPbY+v tLPMgkgWAcf98Upy8TjKkEtsgXHaDTxtu48P8BK4ROQ/hR2zGsQWqFkC8Mu1kayE s9uqyigLVen2rWchQ/t/ve5Ls6Nd5xzMetJ3K8BW4F6rdyEBAMz5mhH0KMGzxtBC +21GYqceBNeD7qbNad+lWdnM8Cl/XWDJ3qT1eYx6j5rNtAEzPMQfLDB3urbJHUiJ EFa5Gg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4308y85cqm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:13 +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 4AK9tCIL019683 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:12 GMT Received: from chejiang-gv.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, 20 Nov 2024 01:55:08 -0800 From: Cheng Jiang To: Marcel Holtmann , Luiz Augusto von Dentz , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , "Balakrishna Godavarthi" , Rocky Liao , CC: , , , , , Subject: [PATCH v2 3/4] arm64: dts: qcom: sa8775p-ride: update BT nodes Date: Wed, 20 Nov 2024 17:54:27 +0800 Message-ID: <20241120095428.1122935-4-quic_chejiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241120095428.1122935-1-quic_chejiang@quicinc.com> References: <20241120095428.1122935-1-quic_chejiang@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: uvicmctqxFeHkibgYzQlIQ2e6SkBGoAa X-Proofpoint-GUID: uvicmctqxFeHkibgYzQlIQ2e6SkBGoAa 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 phishscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411200069 Content-Type: text/plain; charset="utf-8" Add product-variant property to specify the IoT product line. Update the chip soc type, SA8775P-ride platform uses the QCA6698 chip, which is compatible with the WCN6855. It's necessary to use this new SoC type to distinguish it from projects using WCN chips. Signed-off-by: Cheng Jiang --- arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi b/arch/arm64/boot/d= ts/qcom/sa8775p-ride.dtsi index 3fc62e123689..da52f425c676 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi @@ -856,7 +856,8 @@ &uart17 { status =3D "okay"; =20 bluetooth { - compatible =3D "qcom,wcn6855-bt"; + compatible =3D "qcom,qca6698-bt"; + qcom,product-variant =3D <0x20000>; =20 vddrfacmn-supply =3D <&vreg_pmu_rfa_cmn>; vddaon-supply =3D <&vreg_pmu_aon_0p59>; --=20 2.25.1 From nobody Sat Nov 23 10:52:42 2024 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 03FC1158D8B; Wed, 20 Nov 2024 09:55:23 +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=1732096525; cv=none; b=IzzhuWPCAKESDSWYTfg4euvPPnmRdHzlCVahuQoP4oouOVbPtL7ZcbCypduYYgBhkvQfBjjrz/9IuPEXAl1gO1PCyMwjDUQuHl9K2k5t4cjXyXPfZqvxcwYf54hNpd1CCisXV5iUii9BWuxwZafHN/45sFJtsltHsb4M3HXSwIE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732096525; c=relaxed/simple; bh=iqaCKhPLF7ECjIG2Az66wi38fV2HJgd1u0lTQWF3C1s=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DJHyfGKsZ9x6nWGCNa+rgBx2sjJGtAnZeh9Tx4BeiiYYT1hjDqG6MYRPYV2slpJOAoK7GCTIn6oPpOeLheUrQFDLPR2hegu9vqhV2v5oM0Hbtw0IfuqPN2OiutphMVmv/ogFODxUbuX3CKDa62ZFzlJZ7rwAtwHeuZZfYM/wv8s= 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=pMfqF14y; 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="pMfqF14y" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AK9FL2U029808; Wed, 20 Nov 2024 09:55:18 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= mtND48EFmEMvjAWLRPoxGYptWSkhMWobzzQ/IbDoNQQ=; b=pMfqF14yPP7DVANM yh1oST/AAvOz0JA5E46SVS0c7fSU20p0T60auxq+kd5rZ3UGSUh+za1WVGZWF3CR 8qcwF9FI7oNamvc7y05KyCce/66uvbe4FzrWSDiTYJth6mgAkY9AFUOp+m5Vdbuj tXl9p50XfumrsGlvhUroSMJsl0/DI7wy1iP8NAjmJbxu5PsMbYNmw4B/rj5C+T5v h7Ua9DB9ENLedPbtPAH/JlrAO4NbyiraXZAPyzgxmIRdLZ0gdn8InDTEXhgFApJb gH9ihepfLhjw/J0ihAsvc48XNz38zZVGPL4FDVwfTlBWO+ePJo2BSVu2S63jiBZC sdtOmQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4319528pgf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:17 +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 4AK9tHBC004780 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Nov 2024 09:55:17 GMT Received: from chejiang-gv.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, 20 Nov 2024 01:55:12 -0800 From: Cheng Jiang To: Marcel Holtmann , Luiz Augusto von Dentz , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , "Balakrishna Godavarthi" , Rocky Liao , CC: , , , , , Subject: [PATCH v2 4/4] Bluetooth: hci_qca: add qcom,product-variant properties Date: Wed, 20 Nov 2024 17:54:28 +0800 Message-ID: <20241120095428.1122935-5-quic_chejiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241120095428.1122935-1-quic_chejiang@quicinc.com> References: <20241120095428.1122935-1-quic_chejiang@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 0BRD17w9aOjqnoJoFmU6yeseTaZDpSE0 X-Proofpoint-GUID: 0BRD17w9aOjqnoJoFmU6yeseTaZDpSE0 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 bulkscore=0 phishscore=0 adultscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 lowpriorityscore=0 mlxscore=0 clxscore=1015 spamscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411200068 Content-Type: text/plain; charset="utf-8" Since different products use the same SoC chip, features cannot be included in a single patch. Use the qcom,product-variant to load the appropriate firmware. The qcom,product-variant provides product line information, which the driver uses to load firmware from different directories. If it's not defined in dts, the default firmware will be loaded. Signed-off-by: Cheng Jiang --- drivers/bluetooth/btqca.c | 142 +++++++++++++++++++++++++++++------- drivers/bluetooth/btqca.h | 11 ++- drivers/bluetooth/hci_qca.c | 73 +++++++++--------- 3 files changed, 164 insertions(+), 62 deletions(-) diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index dfbbac92242a..0845e5a60412 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -700,8 +700,79 @@ static int qca_check_bdaddr(struct hci_dev *hdev, cons= t struct qca_fw_config *co return 0; } =20 -static void qca_generate_hsp_nvm_name(char *fwname, size_t max_size, - struct qca_btsoc_version ver, u8 rom_ver, u16 bid) + +const char *qca_get_soc_name(enum qca_btsoc_type soc_type) +{ + const char *soc_name =3D ""; + + switch (soc_type) { + case QCA_QCA2066: + soc_name =3D "QCA2066"; + break; + + case QCA_QCA6698: + soc_name =3D "QCA6698"; + break; + + case QCA_WCN3988: + case QCA_WCN3990: + case QCA_WCN3991: + case QCA_WCN3998: + soc_name =3D "WCN399x"; + break; + + case QCA_WCN6750: + soc_name =3D "WCN6750"; + break; + + case QCA_WCN6855: + soc_name =3D "WCN6855"; + break; + + case QCA_WCN7850: + soc_name =3D "WCN7850"; + break; + + default: + soc_name =3D "ROME/QCA6390"; + } + + return soc_name; +} +EXPORT_SYMBOL_GPL(qca_get_soc_name); + +static void qca_get_firmware_path(enum qca_btsoc_type soc_type, char *fw_p= ath, + size_t max_size, enum qca_product_type product_type) +{ + const char *fw_dir =3D NULL; + + switch (product_type) { + case QCA_MCC: + fw_dir =3D "qca"; + break; + case QCA_CE: + fw_dir =3D "qca/ce"; + break; + case QCA_IOT: + fw_dir =3D "qca/iot"; + break; + case QCA_AUTO: + fw_dir =3D "qca/auto"; + break; + default: + fw_dir =3D "qca"; + break; + } + + if (product_type =3D=3D QCA_IOT) + snprintf(fw_path, max_size, "%s/%s", fw_dir, qca_get_soc_name(soc_type)); + else + snprintf(fw_path, max_size, "%s", fw_dir); +} + +static void qca_generate_hsp_nvm_name(enum qca_btsoc_type soc_type, char *= fwname, + size_t max_size, const char *fw_path, struct qca_btsoc_version ver, u8 r= om_ver, + u16 bid) { const char *variant; =20 @@ -712,33 +783,36 @@ static void qca_generate_hsp_nvm_name(char *fwname, s= ize_t max_size, variant =3D ""; =20 if (bid =3D=3D 0x0) - snprintf(fwname, max_size, "qca/hpnv%02x%s.bin", rom_ver, variant); + snprintf(fwname, max_size, "%s/hpnv%02x%s.bin", fw_path, rom_ver, varian= t); else - snprintf(fwname, max_size, "qca/hpnv%02x%s.%x", rom_ver, variant, bid); + snprintf(fwname, max_size, "%s/hpnv%02x%s.%x", fw_path, rom_ver, variant= , bid); } =20 -static inline void qca_get_nvm_name_generic(struct qca_fw_config *cfg, +static inline void qca_get_nvm_name_generic(struct qca_fw_config *cfg, con= st char *fw_path, const char *stem, u8 rom_ver, u16 bid) { if (bid =3D=3D 0x0) - snprintf(cfg->fwname, sizeof(cfg->fwname), "qca/%snv%02x.bin", stem, rom= _ver); + snprintf(cfg->fwname, sizeof(cfg->fwname), + "%s/%snv%02x.bin", fw_path, stem, rom_ver); else if (bid & 0xff00) snprintf(cfg->fwname, sizeof(cfg->fwname), - "qca/%snv%02x.b%x", stem, rom_ver, bid); + "%s/%snv%02x.b%x", fw_path, stem, rom_ver, bid); else snprintf(cfg->fwname, sizeof(cfg->fwname), - "qca/%snv%02x.b%02x", stem, rom_ver, bid); + "%s/%snv%02x.b%02x", fw_path, stem, rom_ver, bid); } =20 int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, enum qca_btsoc_type soc_type, struct qca_btsoc_version ver, - const char *firmware_name) + const char *firmware_name, uint32_t product_variant) { struct qca_fw_config config =3D {}; int err; u8 rom_ver =3D 0; u32 soc_ver; u16 boardid =3D 0; + enum qca_product_type product_type; + char fw_path[64] =3D {0}; =20 bt_dev_dbg(hdev, "QCA setup on UART"); =20 @@ -759,6 +833,10 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudr= ate, if (soc_type =3D=3D QCA_WCN6750) qca_send_patch_config_cmd(hdev); =20 + /* Get the f/w path based on product variant */ + product_type =3D (product_variant >> 16) & 0xff; + qca_get_firmware_path(soc_type, fw_path, sizeof(fw_path), product_type); + /* Download rampatch file */ config.type =3D TLV_TYPE_PATCH; switch (soc_type) { @@ -766,19 +844,23 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baud= rate, case QCA_WCN3991: case QCA_WCN3998: snprintf(config.fwname, sizeof(config.fwname), - "qca/crbtfw%02x.tlv", rom_ver); + "%s/crbtfw%02x.tlv", fw_path, rom_ver); break; case QCA_WCN3988: snprintf(config.fwname, sizeof(config.fwname), - "qca/apbtfw%02x.tlv", rom_ver); + "%s/apbtfw%02x.tlv", fw_path, rom_ver); break; case QCA_QCA2066: snprintf(config.fwname, sizeof(config.fwname), - "qca/hpbtfw%02x.tlv", rom_ver); + "%s/hpbtfw%02x.tlv", fw_path, rom_ver); break; case QCA_QCA6390: snprintf(config.fwname, sizeof(config.fwname), - "qca/htbtfw%02x.tlv", rom_ver); + "%s/htbtfw%02x.tlv", fw_path, rom_ver); + break; + case QCA_QCA6698: + snprintf(config.fwname, sizeof(config.fwname), + "%s/hpbtfw%02x.tlv", fw_path, rom_ver); break; case QCA_WCN6750: /* Choose mbn file by default.If mbn file is not found @@ -786,19 +868,19 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baud= rate, */ config.type =3D ELF_TYPE_PATCH; snprintf(config.fwname, sizeof(config.fwname), - "qca/msbtfw%02x.mbn", rom_ver); + "%s/msbtfw%02x.mbn", fw_path, rom_ver); break; case QCA_WCN6855: snprintf(config.fwname, sizeof(config.fwname), - "qca/hpbtfw%02x.tlv", rom_ver); + "%s/hpbtfw%02x.tlv", fw_path, rom_ver); break; case QCA_WCN7850: snprintf(config.fwname, sizeof(config.fwname), - "qca/hmtbtfw%02x.tlv", rom_ver); + "%s/hmtbtfw%02x.tlv", fw_path, rom_ver); break; default: snprintf(config.fwname, sizeof(config.fwname), - "qca/rampatch_%08x.bin", soc_ver); + "%s/rampatch_%08x.bin", fw_path, soc_ver); } =20 err =3D qca_download_firmware(hdev, &config, soc_type, rom_ver); @@ -810,7 +892,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, /* Give the controller some time to get ready to receive the NVM */ msleep(10); =20 - if (soc_type =3D=3D QCA_QCA2066 || soc_type =3D=3D QCA_WCN7850) + if (soc_type =3D=3D QCA_QCA2066 || soc_type =3D=3D QCA_WCN7850 || + soc_type =3D=3D QCA_QCA6698) qca_read_fw_board_id(hdev, &boardid); =20 /* Download NVM configuration */ @@ -825,39 +908,40 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baud= rate, case QCA_WCN3998: if (le32_to_cpu(ver.soc_id) =3D=3D QCA_WCN3991_SOC_ID) { snprintf(config.fwname, sizeof(config.fwname), - "qca/crnv%02xu.bin", rom_ver); + "%s/crnv%02xu.bin", fw_path, rom_ver); } else { snprintf(config.fwname, sizeof(config.fwname), - "qca/crnv%02x.bin", rom_ver); + "%s/crnv%02x.bin", fw_path, rom_ver); } break; case QCA_WCN3988: snprintf(config.fwname, sizeof(config.fwname), - "qca/apnv%02x.bin", rom_ver); + "%s/apnv%02x.bin", fw_path, rom_ver); break; case QCA_QCA2066: - qca_generate_hsp_nvm_name(config.fwname, - sizeof(config.fwname), ver, rom_ver, boardid); + case QCA_QCA6698: + qca_generate_hsp_nvm_name(soc_type, config.fwname, + sizeof(config.fwname), fw_path, ver, rom_ver, boardid); break; case QCA_QCA6390: snprintf(config.fwname, sizeof(config.fwname), - "qca/htnv%02x.bin", rom_ver); + "%s/htnv%02x.bin", fw_path, rom_ver); break; case QCA_WCN6750: snprintf(config.fwname, sizeof(config.fwname), - "qca/msnv%02x.bin", rom_ver); + "%s/msnv%02x.bin", fw_path, rom_ver); break; case QCA_WCN6855: snprintf(config.fwname, sizeof(config.fwname), - "qca/hpnv%02x.bin", rom_ver); + "%s/hpnv%02x.bin", fw_path, rom_ver); break; case QCA_WCN7850: - qca_get_nvm_name_generic(&config, "hmt", rom_ver, boardid); + qca_get_nvm_name_generic(&config, "hmt", fw_path, rom_ver, boardid); break; =20 default: snprintf(config.fwname, sizeof(config.fwname), - "qca/nvm_%08x.bin", soc_ver); + "%s/nvm_%08x.bin", fw_path, soc_ver); } } =20 @@ -871,6 +955,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, case QCA_WCN3991: case QCA_QCA2066: case QCA_QCA6390: + case QCA_QCA6698: case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: @@ -909,6 +994,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: /* get fw build info */ err =3D qca_read_fw_build_info(hdev); if (err < 0) diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h index bb5207d7a8c7..baa3f979d017 100644 --- a/drivers/bluetooth/btqca.h +++ b/drivers/bluetooth/btqca.h @@ -151,21 +151,30 @@ enum qca_btsoc_type { QCA_WCN3991, QCA_QCA2066, QCA_QCA6390, + QCA_QCA6698, QCA_WCN6750, QCA_WCN6855, QCA_WCN7850, }; =20 +enum qca_product_type { + QCA_MCC =3D 0, + QCA_CE, + QCA_IOT, + QCA_AUTO, +}; + #if IS_ENABLED(CONFIG_BT_QCA) =20 int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr); int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, enum qca_btsoc_type soc_type, struct qca_btsoc_version ver, - const char *firmware_name); + const char *firmware_name, uint32_t product_variant); int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *v= er, enum qca_btsoc_type); int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr); int qca_send_pre_shutdown_cmd(struct hci_dev *hdev); +const char *qca_get_soc_name(enum qca_btsoc_type soc_type); #else =20 static inline int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t= *bdaddr) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 37129e6cb0eb..69fec890eb8c 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -227,6 +227,7 @@ struct qca_serdev { struct qca_power *bt_power; u32 init_speed; u32 oper_speed; + u32 product_variant; bool bdaddr_property_broken; const char *firmware_name; }; @@ -1361,6 +1362,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uin= t8_t baudrate) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: usleep_range(1000, 10000); break; =20 @@ -1447,6 +1449,7 @@ static int qca_check_speeds(struct hci_uart *hu) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: if (!qca_get_speed(hu, QCA_INIT_SPEED) && !qca_get_speed(hu, QCA_OPER_SPEED)) return -EINVAL; @@ -1489,6 +1492,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qc= a_speed_type speed_type) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: hci_uart_set_flow_control(hu, true); break; =20 @@ -1523,6 +1527,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qc= a_speed_type speed_type) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: hci_uart_set_flow_control(hu, false); break; =20 @@ -1803,6 +1808,7 @@ static int qca_power_on(struct hci_dev *hdev) case QCA_WCN6855: case QCA_WCN7850: case QCA_QCA6390: + case QCA_QCA6698: ret =3D qca_regulator_init(hu); break; =20 @@ -1858,7 +1864,6 @@ static int qca_setup(struct hci_uart *hu) int ret; struct qca_btsoc_version ver; struct qca_serdev *qcadev; - const char *soc_name; =20 ret =3D qca_check_speeds(hu); if (ret) @@ -1873,34 +1878,7 @@ static int qca_setup(struct hci_uart *hu) */ set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks); =20 - switch (soc_type) { - case QCA_QCA2066: - soc_name =3D "qca2066"; - break; - - case QCA_WCN3988: - case QCA_WCN3990: - case QCA_WCN3991: - case QCA_WCN3998: - soc_name =3D "wcn399x"; - break; - - case QCA_WCN6750: - soc_name =3D "wcn6750"; - break; - - case QCA_WCN6855: - soc_name =3D "wcn6855"; - break; - - case QCA_WCN7850: - soc_name =3D "wcn7850"; - break; - - default: - soc_name =3D "ROME/QCA6390"; - } - bt_dev_info(hdev, "setting up %s", soc_name); + bt_dev_info(hdev, "setting up %s", qca_get_soc_name(soc_type)); =20 qca->memdump_state =3D QCA_MEMDUMP_IDLE; =20 @@ -1919,6 +1897,7 @@ static int qca_setup(struct hci_uart *hu) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: qcadev =3D serdev_device_get_drvdata(hu->serdev); if (qcadev->bdaddr_property_broken) set_bit(HCI_QUIRK_BDADDR_PROPERTY_BROKEN, &hdev->quirks); @@ -1952,6 +1931,7 @@ static int qca_setup(struct hci_uart *hu) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: break; =20 default: @@ -1963,7 +1943,7 @@ static int qca_setup(struct hci_uart *hu) =20 /* Setup patch / NVM configurations */ ret =3D qca_uart_setup(hdev, qca_baudrate, soc_type, ver, - firmware_name); + firmware_name, qcadev->product_variant); if (!ret) { clear_bit(QCA_IBS_DISABLED, &qca->flags); qca_debugfs_init(hdev); @@ -2089,6 +2069,20 @@ static const struct qca_device_data qca_soc_data_qca= 6390 __maybe_unused =3D { .num_vregs =3D 0, }; =20 +static const struct qca_device_data qca_soc_data_qca6698 __maybe_unused = =3D { + .soc_type =3D QCA_QCA6698, + .vregs =3D (struct qca_vreg []) { + { "vddio", 5000 }, + { "vddbtcxmx", 126000 }, + { "vddrfacmn", 12500 }, + { "vddrfa0p8", 102000 }, + { "vddrfa1p7", 302000 }, + { "vddrfa1p2", 257000 }, + }, + .num_vregs =3D 6, + .capabilities =3D QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES, +}; + static const struct qca_device_data qca_soc_data_wcn6750 __maybe_unused = =3D { .soc_type =3D QCA_WCN6750, .vregs =3D (struct qca_vreg []) { @@ -2165,7 +2159,7 @@ static void qca_power_shutdown(struct hci_uart *hu) pwrseq_power_off(power->pwrseq); set_bit(QCA_BT_OFF, &qca->flags); return; - } + } =20 switch (soc_type) { case QCA_WCN3988: @@ -2179,6 +2173,7 @@ static void qca_power_shutdown(struct hci_uart *hu) =20 case QCA_WCN6750: case QCA_WCN6855: + case QCA_QCA6698: gpiod_set_value_cansleep(qcadev->bt_en, 0); msleep(100); qca_regulator_disable(qcadev); @@ -2313,6 +2308,12 @@ static int qca_serdev_probe(struct serdev_device *se= rdev) &qcadev->firmware_name); device_property_read_u32(&serdev->dev, "max-speed", &qcadev->oper_speed); + device_property_read_u32(&serdev->dev, "qcom,product-variant", + &qcadev->product_variant); + + if (qcadev->product_variant !=3D 0) + BT_INFO("QC Product Variant: 0x%08x", qcadev->product_variant); + if (!qcadev->oper_speed) BT_DBG("UART will pick default operating speed"); =20 @@ -2333,6 +2334,7 @@ static int qca_serdev_probe(struct serdev_device *ser= dev) case QCA_WCN6855: case QCA_WCN7850: case QCA_QCA6390: + case QCA_QCA6698: qcadev->bt_power =3D devm_kzalloc(&serdev->dev, sizeof(struct qca_power), GFP_KERNEL); @@ -2346,6 +2348,7 @@ static int qca_serdev_probe(struct serdev_device *ser= dev) switch (qcadev->btsoc_type) { case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: if (!device_property_present(&serdev->dev, "enable-gpios")) { /* * Backward compatibility with old DT sources. If the @@ -2380,7 +2383,8 @@ static int qca_serdev_probe(struct serdev_device *ser= dev) GPIOD_OUT_LOW); if (IS_ERR(qcadev->bt_en) && (data->soc_type =3D=3D QCA_WCN6750 || - data->soc_type =3D=3D QCA_WCN6855)) { + data->soc_type =3D=3D QCA_WCN6855 || + data->soc_type =3D=3D QCA_QCA6698)) { dev_err(&serdev->dev, "failed to acquire BT_EN gpio\n"); return PTR_ERR(qcadev->bt_en); } @@ -2393,7 +2397,8 @@ static int qca_serdev_probe(struct serdev_device *ser= dev) if (IS_ERR(qcadev->sw_ctrl) && (data->soc_type =3D=3D QCA_WCN6750 || data->soc_type =3D=3D QCA_WCN6855 || - data->soc_type =3D=3D QCA_WCN7850)) { + data->soc_type =3D=3D QCA_WCN7850 || + data->soc_type =3D=3D QCA_QCA6698)) { dev_err(&serdev->dev, "failed to acquire SW_CTRL gpio\n"); return PTR_ERR(qcadev->sw_ctrl); } @@ -2475,6 +2480,7 @@ static void qca_serdev_remove(struct serdev_device *s= erdev) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6698: if (power->vregs_on) qca_power_shutdown(&qcadev->serdev_hu); break; @@ -2669,6 +2675,7 @@ static const struct of_device_id qca_bluetooth_of_mat= ch[] =3D { { .compatible =3D "qcom,qca2066-bt", .data =3D &qca_soc_data_qca2066}, { .compatible =3D "qcom,qca6174-bt" }, { .compatible =3D "qcom,qca6390-bt", .data =3D &qca_soc_data_qca6390}, + { .compatible =3D "qcom,qca6698-bt", .data =3D &qca_soc_data_qca6698}, { .compatible =3D "qcom,qca9377-bt" }, { .compatible =3D "qcom,wcn3988-bt", .data =3D &qca_soc_data_wcn3988}, { .compatible =3D "qcom,wcn3990-bt", .data =3D &qca_soc_data_wcn3990}, --=20 2.25.1