Bluetooth: qca: enable QCC2072 on RB3 Gen 2 Industrial
Subsystems (8)
v2 cover Bluetooth: qca: enable QCC2072 on RB3 Gen 2 Industrial
The RB3 Gen 2 Industrial mezzanine normally uses the M.2 E-key slot for Bluetooth over USB. This series enables a reworked Industrial mezzanine variant where the same M.2 E-key Bluetooth path is routed over UART4 instead.
The BT UART overlay is applied on top of the existing Industrial mezzanine overlay because the reworked board keeps the common Industrial mezzanine hardware description and only changes the Bluetooth transport routing.
This series continues the QCC2072 enablement work previously posted by Vivek Sahu and Yepuri Siddu.
Vivek posted the initial QCC2072 binding and driver support up to v5:
https://lore.kernel.org/all/[email protected]/
Siddu later posted the RB3 Gen 2 Industrial BT-over-UART use case with QCC2072 driver additions, NVM + BCS calibration handling and a card-specific DT overlay:
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
This revision carries that work forward using the M.2 power sequencing model.
This series depends on the M.2 Bluetooth pwrseq support from the Monza wireless series, which adds the hci_qca OF graph handling needed for M.2 Bluetooth devices to acquire the UART power sequence from the M.2 connector graph:
https://lore.kernel.org/all/[email protected]/
Unlike v1, this revision documents the qcom,qcc2072-bt compatible before using it from hci_qca or the M.2 pwrseq driver. It also carries the QCC2072 M.2 pwrseq PCI ID in this series, because the earlier standalone dependency was being dropped due to the missing binding.
The QCC2072 M.2 pwrseq PCI ID was also posted by Krishna Chaitanya Chundru as part of the Eliza EVK PCIe/M.2 series:
https://lore.kernel.org/all/[email protected]/
It is carried here so this series is self-contained after adding the qcom,qcc2072-bt binding.
Tested on RB3 Gen 2 with the reworked Industrial mezzanine. Bluetooth setup completed successfully over UART4, hci0 was created, and the runtime Bluetooth child under UART4 was created with compatible qcom,qcc2072-bt by the M.2 pwrseq path.
---
Changes in v2:
- Document qcom,qcc2072-bt before using it from hci_qca or pwrseq.
- Fix uninitialized QCC2072 BCS calibration filename handling with custom NVM
firmware-name paths.
- Carry the QCC2072 M.2 pwrseq PCI ID in this series.
- Call out the Monza wireless M.2 Bluetooth pwrseq dependency.
- Preserve prior Vivek/Siddu QCC2072 driver enablement lineage.
- Rework the PCI bridge commit message to explain the reason first.
- Add labels for the WCN6750 PMU and M.2 PCI child and patch by label.
- Remove unused overlay labels and the ineffective overlay delete-property.
- Link to v1: https://lore.kernel.org/all/20260723-rb3-industrial-bt-uart-v1-0-3c8e580c09d1@oss.qualcomm.com/
To: Bartosz Golaszewski <[email protected]>
To: Marcel Holtmann <[email protected]>
To: Luiz Augusto von Dentz <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Balakrishna Godavarthi <[email protected]>
To: Rocky Liao <[email protected]>
To: Manivannan Sadhasivam <[email protected]>
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Krishna Chaitanya Chundru (1):
power: sequencing: pwrseq-pcie-m2: add QCC2072
Rahul Samana (4):
dt-bindings: bluetooth: qca: add QCC2072
arm64: dts: qcom: qcs6490-rb3gen2: label BT PMU and M.2 PCI node
arm64: dts: qcom: kodiak: mark PCIe root port as bridge
arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Vivek Sahu (1):
Bluetooth: qca: add QCC2072 support
.../bindings/net/bluetooth/qcom,qcc2072-bt.yaml | 39 +++++++ arch/arm64/boot/dts/qcom/Makefile | 2 + arch/arm64/boot/dts/qcom/kodiak.dtsi | 1 + ...s6490-rb3gen2-industrial-mezzanine-bt-uart.dtso | 129 +++++++++++++++++++++ arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 4 +- drivers/bluetooth/btqca.c | 72 +++++++++++- drivers/bluetooth/btqca.h | 2 + drivers/bluetooth/hci_qca.c | 24 ++++ drivers/power/sequencing/pwrseq-pcie-m2.c | 2 + 9 files changed, 272 insertions(+), 3 deletions(-)
---
base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df
change-id: 20260723-rb3-industrial-bt-uart-f98acaffc9f5
Best regards,
Signature · 1 line
Rahul Samana <[email protected]>
PATCH v2 1/6 dt-bindings: bluetooth: qca: add QCC2072
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
--- .../bindings/net/bluetooth/qcom,qcc2072-bt.yaml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+)
Documentation/devicetree/bindings/net/bluetooth/qcom,qcc2072-bt.yaml new file +39 -0
@@ -0,0 +1,39 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/bluetooth/qcom,qcc2072-bt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QCC2072 Bluetooth + +maintainers: + - Bartosz Golaszewski <[email protected]> + - Balakrishna Godavarthi <[email protected]> + - Rocky Liao <[email protected]> + +description: + Qualcomm QCC2072 Bluetooth controller connected over UART. + + QCC2072 can be populated on an M.2 E-key card, where the card power + supplies and sideband signals are modeled by the pcie-m2-e-connector node. + The M.2 power sequencing provider creates the Bluetooth serdev device and + uses this compatible after matching the QCC2072 PCI function. + + Integrated non-M.2 designs require board-specific power resources. Those + properties, together with a static devicetree example, should be added when + integrated non-M.2 support is added. + +properties: + compatible: + enum: + - qcom,qcc2072-bt + +required: + - compatible + +allOf: + - $ref: bluetooth-controller.yaml# + - $ref: qcom,bluetooth-common.yaml + - $ref: /schemas/serial/serial-peripheral-props.yaml# + +unevaluatedProperties: false
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 5 lines
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-rb3-industrial-bt-uart-v2-0-2d100f30e202@oss.qualcomm.com?part=1
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: drivers/power/sequencing/pwrseq-pcie-m2.c:189
error: drivers/power/sequencing/pwrseq-pcie-m2.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
In reply to Rahul SamanaQuoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
Krzysztof
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>
Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
Krzysztof
Hi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
For the authorship concern, I mentioned the earlier QCC2072 contributions in the cover letter, but I understand that is not sufficient. Since this still documents the same qcom,qcc2072-bt compatible introduced by the earlier work, I will carry the earlier authorship / Signed-off-by chain in v3.
Regards,
Rahul
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 6 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
And why this is sent so many times?
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
and now by you.
How many times this will be sent in separate patchsets and asking for separate review ignoring previous review?
Best regards,
Krzysztof
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.
I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 11 lines
And why this is sent so many times?
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
and now by you.
How many times this will be sent in separate patchsets and asking for separate review ignoring previous review?
Regarding the repeated submissions, the reason for carrying this forward from the earlier QCC2072 work is documented in the cover letter. This series was intended to continue that work for the RB3 Gen 2 Industrial M.2 use case, not to ignore the earlier reviews.
Regards,
Rahul
Quoted 2 lines
Best regards,
Krzysztof
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
Quoted 9 lines
Quoted 9 lines
And why this is sent so many times?
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
and now by you.
Quoted 8 lines
Quoted 3 lines
How many times this will be sent in separate patchsets and asking for separate review ignoring previous review?
Regarding the repeated submissions, the reason for carrying this forward from the earlier QCC2072 work is documented in the cover letter. This series was intended to continue that work for the RB3 Gen 2 Industrial M.2 use case, not to ignore the earlier reviews.
If you continue the work, you do not ignore previous comments, so I do not see how this is any sort of continuation. Looks like duplicating work without looking at previous discussions at all.
Best regards,
Krzysztof
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 82 lines · Krzysztof Kozlowski
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 8 lines
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
The PCIe M.2 power sequencing driver, pwrseq-pcie-m2.c, uses pwrseq_m2_pci_ids to translate the enumerated PCI function into the Bluetooth compatible used for the generated serdev child.
For example, WCN7850 maps PCI ID 17cb:1107 to qcom,wcn7850-bt, then hci_qca matches that compatible to select qca_soc_data_wcn7850.
For QCC2072, pwrseq-pcie-m2.c matches PCI ID 17cb:1112 and creates the generated Bluetooth serdev child with compatible "qcom,qcc2072-bt". The hci_qca driver then matches "qcom,qcc2072-bt" and uses qca_soc_data_qcc2072 as the controller-specific data.
That match data is needed by hci_qca to select the QCC2072 soc_type, firmware/NVM naming, calibration handling, and capabilities. Without some identity being passed from the PCI match to the generated serdev child, hci_qca cannot distinguish QCC2072 from the other Qualcomm UART Bluetooth controllers on this path.
Please correct me if I misunderstood the concern or if you are asking for this identity to be passed from pwrseq-pcie-m2.c to hci_qca through a different mechanism.
I can drop the binding patch, but unless there is a preferred alternative mechanism, I think we still need the pwrseq-pcie-m2 QCC2072 PCI ID support from patch 3 so the power sequencing driver can pass the QCC2072 identity into hci_qca through the generated serdev child:
https://lore.kernel.org/all/20260727-rb3-industrial-bt-uart-v2-3-2d100f30e202@oss.qualcomm.com/
Thanks,
Rahul
Quoted 24 lines
Quoted 9 lines
Quoted 9 lines
And why this is sent so many times?
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
and now by you.
Quoted 8 lines
Quoted 3 lines
How many times this will be sent in separate patchsets and asking for separate review ignoring previous review?
Regarding the repeated submissions, the reason for carrying this forward from the earlier QCC2072 work is documented in the cover letter. This series was intended to continue that work for the RB3 Gen 2 Industrial M.2 use case, not to ignore the earlier reviews.
If you continue the work, you do not ignore previous comments, so I do not see how this is any sort of continuation. Looks like duplicating work without looking at previous discussions at all.
Best regards,
Krzysztof
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 97 lines · Rahul Samana
Quoted 82 lines · Krzysztof Kozlowski
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 8 lines
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
The PCIe M.2 power sequencing driver,
pwrseq-pcie-m2.c, usespwrseq_m2_pci_idsto translate the enumerated PCI function into the Bluetooth compatible used for the generated serdev child.
Quoted 7 lines
For example, WCN7850 maps PCI ID 17cb:1107 to qcom,wcn7850-bt, then
hci_qcamatches that compatible to selectqca_soc_data_wcn7850.For QCC2072,
pwrseq-pcie-m2.cmatches PCI ID 17cb:1112 and creates the generated Bluetooth serdev child with compatible "qcom,qcc2072-bt". Thehci_qcadriver then matches "qcom,qcc2072-bt" and usesqca_soc_data_qcc2072as the controller-specific data.
The purpose of Devicetree is not to describe Linux internal driver matching. Do not use compatibles for that.
Quoted 7 lines
That match data is needed by
hci_qcato select the QCC2072soc_type,firmware/NVMnaming, calibration handling, and capabilities. Without some identity being passed from the PCI match to the generated serdev child,hci_qcacannot distinguish QCC2072 from the other Qualcomm UART Bluetooth controllers on this path.
Quoted 8 lines
Please correct me if I misunderstood the concern or if you are asking for this identity to be passed from
pwrseq-pcie-m2.ctohci_qcathrough a different mechanism.I can drop the binding patch, but unless there is a preferred alternative mechanism, I think we still need the pwrseq-pcie-m2 QCC2072 PCI ID support from patch 3 so the power sequencing driver can pass the QCC2072 identity into
hci_qcathrough the generated serdev child:
You have plenty of options, starting from what is very common already - driver name used by MFD or aux devices.
Best regards,
Krzysztof
Manivannan Sadhasivam
maintainerRe: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 121 lines · Krzysztof Kozlowski
Quoted 97 lines · Rahul Samana
Quoted 82 lines · Krzysztof Kozlowski
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 8 lines
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
The PCIe M.2 power sequencing driver,
pwrseq-pcie-m2.c, usespwrseq_m2_pci_idsto translate the enumerated PCI function into the Bluetooth compatible used for the generated serdev child.Quoted 7 lines
For example, WCN7850 maps PCI ID 17cb:1107 to qcom,wcn7850-bt, then
hci_qcamatches that compatible to selectqca_soc_data_wcn7850.For QCC2072,
pwrseq-pcie-m2.cmatches PCI ID 17cb:1112 and creates the generated Bluetooth serdev child with compatible "qcom,qcc2072-bt". Thehci_qcadriver then matches "qcom,qcc2072-bt" and usesqca_soc_data_qcc2072as the controller-specific data.The purpose of Devicetree is not to describe Linux internal driver matching. Do not use compatibles for that.
Quoted 11 lines
That match data is needed by
hci_qcato select the QCC2072soc_type,firmware/NVMnaming, calibration handling, and capabilities. Without some identity being passed from the PCI match to the generated serdev child,hci_qcacannot distinguish QCC2072 from the other Qualcomm UART Bluetooth controllers on this path.Please correct me if I misunderstood the concern or if you are asking for this identity to be passed from
pwrseq-pcie-m2.ctohci_qcathrough a different mechanism.
Quoted 8 lines
Quoted 4 lines
I can drop the binding patch, but unless there is a preferred alternative mechanism, I think we still need the pwrseq-pcie-m2 QCC2072 PCI ID support from patch 3 so the power sequencing driver can pass the QCC2072 identity into
hci_qcathrough the generated serdev child:You have plenty of options, starting from what is very common already - driver name used by MFD or aux devices.
It is not just a driver matching problem, but ensuring that we properly describe the BT device in DT. Since the BT interface of the M.2 device is not discoverable, we are currently using the PCIe IDs of the M.2 device to create the BT node dynamically under UART node using OF_DYNAMIC as proposed in this patch which got merged already [1]. Then we also create the serdev device and allow the existing BT hci_qca driver to probe and make use of the created DT node.
Since each BT device is unique, the compatible used in the dynamic node needs to be documented in the binding. But there is no need to describe any supplies or BT_EN GPIOs since they are already part of the M.2 binding.
- Mani
[1] https://lore.kernel.org/all/[email protected]/
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 127 lines · Manivannan Sadhasivam
Quoted 126 lines · Krzysztof Kozlowski
Quoted 97 lines · Rahul Samana
Quoted 82 lines · Krzysztof Kozlowski
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 8 lines
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
The PCIe M.2 power sequencing driver,
pwrseq-pcie-m2.c, usespwrseq_m2_pci_idsto translate the enumerated PCI function into the Bluetooth compatible used for the generated serdev child.Quoted 7 lines
For example, WCN7850 maps PCI ID 17cb:1107 to qcom,wcn7850-bt, then
hci_qcamatches that compatible to selectqca_soc_data_wcn7850.For QCC2072,
pwrseq-pcie-m2.cmatches PCI ID 17cb:1112 and creates the generated Bluetooth serdev child with compatible "qcom,qcc2072-bt". Thehci_qcadriver then matches "qcom,qcc2072-bt" and usesqca_soc_data_qcc2072as the controller-specific data.The purpose of Devicetree is not to describe Linux internal driver matching. Do not use compatibles for that.
Quoted 15 lines
That match data is needed by
hci_qcato select the QCC2072soc_type,firmware/NVMnaming, calibration handling, and capabilities. Without some identity being passed from the PCI match to the generated serdev child,hci_qcacannot distinguish QCC2072 from the other Qualcomm UART Bluetooth controllers on this path.Please correct me if I misunderstood the concern or if you are asking for this identity to be passed from
pwrseq-pcie-m2.ctohci_qcathrough a different mechanism.I can drop the binding patch, but unless there is a preferred alternative mechanism, I think we still need the pwrseq-pcie-m2 QCC2072 PCI ID support from patch 3 so the power sequencing driver can pass the QCC2072 identity into
hci_qcathrough the generated serdev child:
Quoted 6 lines
Quoted 3 lines
You have plenty of options, starting from what is very common already - driver name used by MFD or aux devices.
It is not just a driver matching problem, but ensuring that we properly describe the BT device in DT. Since the BT interface of the M.2 device is not
This device does not exist in DT. This is the problem which started my entire investigation and above email.
I am happy to see proofs of it existing in DTS.
My proof:
1. copy-paste the compatible (qcom,qcc2072-bt) from the binding.
2. Open each DTS patch and look for that compatible: no results.
Quoted 5 lines
discoverable, we are currently using the PCIe IDs of the M.2 device to create the BT node dynamically under UART node using
OF_DYNAMICas proposed in this patch which got merged already [1]. Then we also create the serdev device and allow the existing BThci_qcadriver to probe and make use of the created DT node.
Your Linux drivers are not supposed to create internal OF for regular DT. Please drop that patch. I do not get why that patch was merged without any DT approval.
DT is not representation of internal device driver instantiation mechanism.
Best regards,
Krzysztof
Manivannan Sadhasivam
maintainerRe: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 135 lines · Krzysztof Kozlowski
Quoted 127 lines · Manivannan Sadhasivam
Quoted 126 lines · Krzysztof Kozlowski
Quoted 97 lines · Rahul Samana
Quoted 82 lines · Krzysztof Kozlowski
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 8 lines
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
The PCIe M.2 power sequencing driver,
pwrseq-pcie-m2.c, usespwrseq_m2_pci_idsto translate the enumerated PCI function into the Bluetooth compatible used for the generated serdev child.Quoted 7 lines
For example, WCN7850 maps PCI ID 17cb:1107 to qcom,wcn7850-bt, then
hci_qcamatches that compatible to selectqca_soc_data_wcn7850.For QCC2072,
pwrseq-pcie-m2.cmatches PCI ID 17cb:1112 and creates the generated Bluetooth serdev child with compatible "qcom,qcc2072-bt". Thehci_qcadriver then matches "qcom,qcc2072-bt" and usesqca_soc_data_qcc2072as the controller-specific data.The purpose of Devicetree is not to describe Linux internal driver matching. Do not use compatibles for that.
Quoted 15 lines
That match data is needed by
hci_qcato select the QCC2072soc_type,firmware/NVMnaming, calibration handling, and capabilities. Without some identity being passed from the PCI match to the generated serdev child,hci_qcacannot distinguish QCC2072 from the other Qualcomm UART Bluetooth controllers on this path.Please correct me if I misunderstood the concern or if you are asking for this identity to be passed from
pwrseq-pcie-m2.ctohci_qcathrough a different mechanism.I can drop the binding patch, but unless there is a preferred alternative mechanism, I think we still need the pwrseq-pcie-m2 QCC2072 PCI ID support from patch 3 so the power sequencing driver can pass the QCC2072 identity into
hci_qcathrough the generated serdev child:Quoted 6 lines
Quoted 3 lines
You have plenty of options, starting from what is very common already - driver name used by MFD or aux devices.
It is not just a driver matching problem, but ensuring that we properly describe the BT device in DT. Since the BT interface of the M.2 device is not
Quoted 9 lines
This device does not exist in DT. This is the problem which started my entire investigation and above email.
I am happy to see proofs of it existing in DTS.
My proof:
1. copy-paste the compatible (qcom,qcc2072-bt) from the binding.
2. Open each DTS patch and look for that compatible: no results.
You are right that this compatible didn't exist in DT and I never claimed that it does.
Quoted 8 lines
Quoted 7 lines
discoverable, we are currently using the PCIe IDs of the M.2 device to create the BT node dynamically under UART node using
OF_DYNAMICas proposed in this patch which got merged already [1]. Then we also create the serdev device and allow the existing BThci_qcadriver to probe and make use of the created DT node.
Quoted 4 lines
Your Linux drivers are not supposed to create internal OF for regular DT. Please drop that patch. I do not get why that patch was merged without any DT approval.
Both Rob, you and devicetree lists were CCed to the series and there were reviews from Rob for multiple patches in that series too. So I interpreted his absence of reviews on other patches in the series as silent Acks.
Quoted 2 lines
DT is not representation of internal device driver instantiation mechanism.
Here, the driver is just creating compatible for a real device. What difference does it make if the BT node was defined statically in the DT vs created dynamically? Both nodes do represent a real BT device, not driver's own representation. And by the time the node was created, the device is physically attached to the system.
- Mani
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 9 lines · Manivannan Sadhasivam
Quoted 2 lines · Krzysztof Kozlowski
DT is not representation of internal device driver instantiation mechanism.
Here, the driver is just creating compatible for a real device. What difference does it make if the BT node was defined statically in the DT vs created dynamically? Both nodes do represent a real BT device, not driver's own representation. And by the time the node was created, the device is physically attached to the system.
What stops this power sequencing drivers, after more driver patches, the best if being part of some bigger series, to add properties like "linux,name-of-driver-to-bind" or whatever other SW properties?
This is what happened in that linked thread:
https://lore.kernel.org/all/[email protected]/
The driver code is adding children under other nodes (references by graph) and it is nowhere documented. Maybe bindings of these other nodes allow it, maybe not. How do you even validate that?
So answering your question - yes, there is a difference because:
1. DTS we validate but whatever you add to driver code we do not and we cannot,
2. DTS represents hardware but whatever you do in your driver code represents who knows what (maybe hardware, maybe not, can represent anything)
And if you claim "I add hardware in the driver!", I respond - maybe true, maybe not, but look at this crap:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=687bfbba5a1cb15cee51519c210141ed1c4b0ec7
Since we DISALLOWED venus-decoder and venus-encoder DT nodes, what did Bryan do? Squeezed via driver code fake disallowed nodes and even gave them compatibles not looking like compatibles, so any regex won't work.
This power sequencing work here has the same problem of sneaking ABI, which I pointed out here:
https://lore.kernel.org/all/[email protected]/
Look at above patch - nothing documents that ABI. The same as Bryan's fake venus-decoder and encore (not only fake but actually rejected). And to avoid ABI-check tools (or incoming tools), this power sequencing code does not even call a "compatible" a "compatible". No, it calls it "driver_data" nicely avoiding detection.
This is terrible practice and I feel like allowing this patch is silent acknowledgment or agreement of such practice.
It's about basic ABI principles - if you have DT ABI, it must be both clear in the drivers code and in DT bindings, instead of obfuscated calling a compatible driver data. If you don't, then this is not DT ABI and you are not allowed to use OF code to instantiate drivers. Use SW nodes or KHO-style whatever else is there.
Best regards,
Krzysztof
Manivannan Sadhasivam
maintainerRe: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 15 lines · Krzysztof Kozlowski
Quoted 9 lines · Manivannan Sadhasivam
Quoted 2 lines · Krzysztof Kozlowski
DT is not representation of internal device driver instantiation mechanism.
Here, the driver is just creating compatible for a real device. What difference does it make if the BT node was defined statically in the DT vs created dynamically? Both nodes do represent a real BT device, not driver's own representation. And by the time the node was created, the device is physically attached to the system.
What stops this power sequencing drivers, after more driver patches, the best if being part of some bigger series, to add properties like "linux,name-of-driver-to-bind" or whatever other SW properties?
Quoted 6 lines
This is what happened in that linked thread:
https://lore.kernel.org/all/[email protected]/
The driver code is adding children under other nodes (references by graph) and it is nowhere documented. Maybe bindings of these other nodes allow it, maybe not. How do you even validate that?
So the concern is validating the properties that get added dynamically and I get that. How about inserting an overlay for the BT node instead of creating the node on the fly? Like, drivers/misc/lan966x_pci.dtso
This way, the overlay would be validated against a binding and the driver would just be inserting it.
Quoted 25 lines
So answering your question - yes, there is a difference because:
1. DTS we validate but whatever you add to driver code we do not and we cannot,
2. DTS represents hardware but whatever you do in your driver code represents who knows what (maybe hardware, maybe not, can represent anything)And if you claim "I add hardware in the driver!", I respond - maybe true, maybe not, but look at this crap:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=687bfbba5a1cb15cee51519c210141ed1c4b0ec7Since we DISALLOWED venus-decoder and venus-encoder DT nodes, what did Bryan do? Squeezed via driver code fake disallowed nodes and even gave them compatibles not looking like compatibles, so any regex won't work.
This power sequencing work here has the same problem of sneaking ABI, which I pointed out here:
https://lore.kernel.org/all/[email protected]/Look at above patch - nothing documents that ABI. The same as Bryan's fake venus-decoder and encore (not only fake but actually rejected). And to avoid ABI-check tools (or incoming tools), this power sequencing code does not even call a "compatible" a "compatible". No, it calls it "
driver_data" nicely avoiding detection.
Quoted 9 lines
This is terrible practice and I feel like allowing this patch is silent acknowledgment or agreement of such practice.
It's about basic ABI principles - if you have DT ABI, it must be both clear in the drivers code and in DT bindings, instead of obfuscated calling a compatible driver data. If you don't, then this is not DT ABI and you are not allowed to use OF code to instantiate drivers. Use SW nodes or KHO-style whatever else is there.
I did propose using SW nodes initially, but then it got changed to OF_DYNAMIC with review from Andy. But honestly, Andy only mentioned 'DT Overlay' [1], and I was the one decided to use OF_DYNAMIC.
- Mani
[1] https://lore.kernel.org/all/[email protected]
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 58 lines · Manivannan Sadhasivam
Quoted 15 lines · Krzysztof Kozlowski
Quoted 9 lines · Manivannan Sadhasivam
Quoted 2 lines · Krzysztof Kozlowski
DT is not representation of internal device driver instantiation mechanism.
Here, the driver is just creating compatible for a real device. What difference does it make if the BT node was defined statically in the DT vs created dynamically? Both nodes do represent a real BT device, not driver's own representation. And by the time the node was created, the device is physically attached to the system.
What stops this power sequencing drivers, after more driver patches, the best if being part of some bigger series, to add properties like "linux,name-of-driver-to-bind" or whatever other SW properties?
Quoted 6 lines
This is what happened in that linked thread:
https://lore.kernel.org/all/[email protected]/
The driver code is adding children under other nodes (references by graph) and it is nowhere documented. Maybe bindings of these other nodes allow it, maybe not. How do you even validate that?So the concern is validating the properties that get added dynamically and I get that. How about inserting an overlay for the BT node instead of creating the node on the fly? Like,
drivers/misc/lan966x_pci.dtsoThis way, the overlay would be validated against a binding and the driver would just be inserting it.
Quoted 28 lines
So answering your question - yes, there is a difference because:
1. DTS we validate but whatever you add to driver code we do not and we cannot,
2. DTS represents hardware but whatever you do in your driver code represents who knows what (maybe hardware, maybe not, can represent anything)And if you claim "I add hardware in the driver!", I respond - maybe true, maybe not, but look at this crap:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=687bfbba5a1cb15cee51519c210141ed1c4b0ec7Since we DISALLOWED venus-decoder and venus-encoder DT nodes, what did Bryan do? Squeezed via driver code fake disallowed nodes and even gave them compatibles not looking like compatibles, so any regex won't work.
This power sequencing work here has the same problem of sneaking ABI, which I pointed out here:
https://lore.kernel.org/all/[email protected]/Look at above patch - nothing documents that ABI. The same as Bryan's fake venus-decoder and encore (not only fake but actually rejected). And to avoid ABI-check tools (or incoming tools), this power sequencing code does not even call a "compatible" a "compatible". No, it calls it "
driver_data" nicely avoiding detection.This is terrible practice and I feel like allowing this patch is silent acknowledgment or agreement of such practice.
Quoted 8 lines
Quoted 6 lines
It's about basic ABI principles - if you have DT ABI, it must be both clear in the drivers code and in DT bindings, instead of obfuscated calling a compatible driver data. If you don't, then this is not DT ABI and you are not allowed to use OF code to instantiate drivers. Use SW nodes or KHO-style whatever else is there.
I did propose using SW nodes initially, but then it got changed to
If I remember previous discussions, SW nodes can be used to provide additional information about the existing devices. They should not be used for matching.
Quoted 9 lines
OF_DYNAMICwith review from Andy. But honestly, Andy only mentioned 'DT Overlay' [1], and I was the one decided to useOF_DYNAMIC.- Mani
[1] https://lore.kernel.org/all/[email protected]
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 66 lines · Dmitry Baryshkov
Quoted 65 lines · Manivannan Sadhasivam
Quoted 15 lines · Krzysztof Kozlowski
Quoted 9 lines · Manivannan Sadhasivam
Quoted 2 lines · Krzysztof Kozlowski
DT is not representation of internal device driver instantiation mechanism.
Here, the driver is just creating compatible for a real device. What difference does it make if the BT node was defined statically in the DT vs created dynamically? Both nodes do represent a real BT device, not driver's own representation. And by the time the node was created, the device is physically attached to the system.
What stops this power sequencing drivers, after more driver patches, the best if being part of some bigger series, to add properties like "linux,name-of-driver-to-bind" or whatever other SW properties?
Quoted 6 lines
This is what happened in that linked thread:
https://lore.kernel.org/all/[email protected]/
The driver code is adding children under other nodes (references by graph) and it is nowhere documented. Maybe bindings of these other nodes allow it, maybe not. How do you even validate that?So the concern is validating the properties that get added dynamically and I get that. How about inserting an overlay for the BT node instead of creating the node on the fly? Like,
drivers/misc/lan966x_pci.dtsoThis way, the overlay would be validated against a binding and the driver would just be inserting it.
Quoted 34 lines
So answering your question - yes, there is a difference because:
1. DTS we validate but whatever you add to driver code we do not and we cannot,
2. DTS represents hardware but whatever you do in your driver code represents who knows what (maybe hardware, maybe not, can represent anything)And if you claim "I add hardware in the driver!", I respond - maybe true, maybe not, but look at this crap:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=687bfbba5a1cb15cee51519c210141ed1c4b0ec7Since we DISALLOWED venus-decoder and venus-encoder DT nodes, what did Bryan do? Squeezed via driver code fake disallowed nodes and even gave them compatibles not looking like compatibles, so any regex won't work.
This power sequencing work here has the same problem of sneaking ABI, which I pointed out here:
https://lore.kernel.org/all/[email protected]/Look at above patch - nothing documents that ABI. The same as Bryan's fake venus-decoder and encore (not only fake but actually rejected). And to avoid ABI-check tools (or incoming tools), this power sequencing code does not even call a "compatible" a "compatible". No, it calls it "
driver_data" nicely avoiding detection.This is terrible practice and I feel like allowing this patch is silent acknowledgment or agreement of such practice.
It's about basic ABI principles - if you have DT ABI, it must be both clear in the drivers code and in DT bindings, instead of obfuscated calling a compatible driver data. If you don't, then this is not DT ABI and you are not allowed to use OF code to instantiate drivers. Use SW nodes or KHO-style whatever else is there.
Quoted 5 lines
Quoted 1 line
I did propose using SW nodes initially, but then it got changed to
If I remember previous discussions, SW nodes can be used to provide additional information about the existing devices. They should not be used for matching.
Yeah, matching is via standard driver name for example like MFD is doing for platform bus.
This is not that different than MFD.
Best regards,
Krzysztof
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
In reply to Krzysztof KozlowskiQuoted 101 lines · Krzysztof Kozlowski
Quoted 100 lines · Rahul Samana
Quoted 82 lines · Krzysztof Kozlowski
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 8 lines
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
The PCIe M.2 power sequencing driver,
pwrseq-pcie-m2.c, usespwrseq_m2_pci_idsto translate the enumerated PCI function into the Bluetooth compatible used for the generated serdev child.For example, WCN7850 maps PCI ID 17cb:1107 to qcom,wcn7850-bt, then
hci_qcamatches that compatible to selectqca_soc_data_wcn7850.
Quoted 7 lines
Quoted 4 lines
For QCC2072,
pwrseq-pcie-m2.cmatches PCI ID 17cb:1112 and creates the generated Bluetooth serdev child with compatible "qcom,qcc2072-bt". Thehci_qcadriver then matches "qcom,qcc2072-bt" and usesqca_soc_data_qcc2072as the controller-specific data.The purpose of Devicetree is not to describe Linux internal driver matching. Do not use compatibles for that.
So, if instead of M.2 module the WiFi chip gets soldered to the main board, the qcom,qcc2072-bt wll be a legitimate compat string?
Also, I understand your concerns about the DT bindings / usage, but speaking about the driver ;-)
The BT is a serial driver attached to a serial bus. There only two options to bind a serial driver: OF and ACPI. But maybe we should add something like serial_device_id and let serials have internal IDs. It sounded strange in the beginning, but now I think it is a correct way to go.
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v2 1/6] dt-bindings: bluetooth: qca: add QCC2072
Quoted 107 lines · Dmitry Baryshkov
Quoted 106 lines · Krzysztof Kozlowski
Quoted 104 lines · Rahul Samana
Quoted 82 lines · Krzysztof Kozlowski
Quoted 75 lines · Rahul Samana
Quoted 53 lines · Krzysztof Kozlowski
Quoted 36 lines · Rahul Samana
Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Rahul Samana
QCC2072 can be used on M.2 E-key cards where the card power resources are described by the pcie-m2-e-connector node. In that setup, the M.2 power sequencing provider creates the Bluetooth serdev child after matching the QCC2072 PCI function.
Quoted 8 lines
Integrated non-M.2 designs need board-specific power resources. Document only the compatible for now and leave those properties to be added with matching driver support.
Document the qcom,qcc2072-bt compatible used for QCC2072 Bluetooth controllers connected over UART.
Signed-off-by Rahul Samana <[email protected]>Quoted 8 lines
NAK, exactly same comments as before.
Nothing got improved, although what is weird - original SoB is gone, so this is legally dubious work.
Best regards,
KrzysztofHi Krzysztof,
Thanks for the review.
For the binding contents, I tried to capture the current scope in the binding description itself. This series supports QCC2072 only as an M.2 E-key card, where the card power resources are described by the pcie-m2-e-connector node and the M.2 pwrseq provider creates the Bluetooth serdev child.
Quoted 5 lines
The binding also says:
Integrated non-M.2 designs require board-specific power resources. Those properties, together with a static devicetree example, should be added when integrated non-M.2 support is added.
Bindings must be complete and your driver support is irrelevant here.
If you claim this is a PCI device thus you do not need any resources, then the binding is not needed either. PCI devices are enumerable. And to prove it: look at your DTS. Do you see qcom,qcc2072-bt being used? No.
Quoted 4 lines
We do not currently have an integrated non-M.2 QCC2072 design, so I do not have board-specific regulator supplies to document for that topology.
Quoted 7 lines
Quoted 2 lines
Could you please suggest how you would prefer this binding to be handled for the current M.2-only use case?
Drop the binding, you do not need it.
Anyway the problem is that more comments were ignored.
Hi Krzysztof,
Just to clarify the reason for adding this binding in v2:
v1 did not add a binding because this series only targets the M.2 use case.I added the minimal binding in v2 because checkpatch reported qcom,qcc2072-bt as an undocumented compatible, and I interpreted the request to fix the checkpatch warnings as requiring this compatible to be documented. I also had the earlier feedback in mind, where the indirect qcom,qcc2072-bt compatible was pushed back because it was undocumented:
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Based on your clarification here, I will drop the binding patch in v3 and keep qcom,qcc2072-bt only as the pwrseq-created child compatible for this M.2 case.
Quoted 8 lines
My previous statement is also valid, please read entire threads.
You cannot have undocumented qcom,qcc2072-bt.
I ask you to drop both, because they are not needed. But feel free to prove me wrong, see my first paragraph in the previous reply.
The PCIe M.2 power sequencing driver,
pwrseq-pcie-m2.c, usespwrseq_m2_pci_idsto translate the enumerated PCI function into the Bluetooth compatible used for the generated serdev child.For example, WCN7850 maps PCI ID 17cb:1107 to qcom,wcn7850-bt, then
hci_qcamatches that compatible to selectqca_soc_data_wcn7850.For QCC2072,
pwrseq-pcie-m2.cmatches PCI ID 17cb:1112 and creates the generated Bluetooth serdev child with compatible "qcom,qcc2072-bt". Thehci_qcadriver then matches "qcom,qcc2072-bt" and usesqca_soc_data_qcc2072as the controller-specific data.
Quoted 5 lines
Quoted 2 lines
The purpose of Devicetree is not to describe Linux internal driver matching. Do not use compatibles for that.
So, if instead of M.2 module the WiFi chip gets soldered to the main board, the qcom,qcc2072-bt wll be a legitimate compat string?
Yes, just like the rest of compatibles in the power sequencing driver (and bindings).
Quoted 8 lines
Also, I understand your concerns about the DT bindings / usage, but speaking about the driver ;-)
The BT is a serial driver attached to a serial bus. There only two options to bind a serial driver: OF and ACPI. But maybe we should add something likeserial_device_idand let serials have internal IDs. It sounded strange in the beginning, but now I think it is a correct way to go.
Driver get away with that limitation, because we had DTS for the existing entries. This is the first one without DTS.
Best regards,
Krzysztof
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1135254
---Test result---
Test Summary:
CheckPatch FAIL 4.30 seconds VerifyFixes PASS 0.08 seconds VerifySignedoff PASS 0.09 seconds GitLint PASS 1.32 seconds SubjectPrefix FAIL 0.48 seconds BuildKernel PASS 22.62 seconds CheckAllWarning PASS 26.56 seconds CheckSparse PASS 26.14 seconds BuildKernel32 PASS 24.61 seconds CheckKernelLLVM SKIP 0.00 seconds TestRunnerSetup PASS 412.88 seconds TestRunner_l2cap-tester PASS 61.08 seconds TestRunner_iso-tester PASS 89.26 seconds TestRunner_bnep-tester PASS 17.04 seconds TestRunner_mgmt-tester FAIL 210.66 seconds TestRunner_rfcomm-tester PASS 23.54 seconds TestRunner_sco-tester PASS 33.66 seconds TestRunner_ioctl-tester PASS 24.51 seconds TestRunner_mesh-tester FAIL 23.82 seconds TestRunner_smp-tester PASS 21.68 seconds TestRunner_userchan-tester PASS 18.12 seconds TestRunner_6lowpan-tester PASS 20.91 seconds IncrementalBuild PASS 30.06 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v2,1/6] dt-bindings: bluetooth: qca: add QCC2072
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #192:
new file mode 100644
total: 0 errors, 1 warnings, 39 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/patch/14713184.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[v2,5/6] arm64: dts: qcom: kodiak: mark PCIe root port as bridge
WARNING: Duplicate signature
#182:
WARNING: DT compatible string vendor "pciclass" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml #195: FILE: arch/arm64/boot/dts/qcom/kodiak.dtsi:2299:
+ compatible = "pciclass,0604";
total: 0 errors, 2 warnings, 7 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/patch/14713188.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[v2,6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #206:
new file mode 100644
total: 0 errors, 1 warnings, 139 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/patch/14713189.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix Output:
"Bluetooth: " prefix is not specified in the subject "Bluetooth: " prefix is not specified in the subject "Bluetooth: " prefix is not specified in the subject "Bluetooth: " prefix is not specified in the subject "Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis Output:
Clang not found
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner Output:
Total: 501, Passed: 496 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.237 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 1.868 seconds Mesh - Send cancel - 2 Timed out 1.992 seconds
https://github.com/bluez/bluetooth-next/pull/553
---
Regards,
Linux Bluetooth
PATCH v2 2/6 Bluetooth: qca: add QCC2072 support
In reply to Rahul SamanaFrom: Vivek Sahu <[email protected]>
QCC2072 uses the ORN firmware and NVM naming scheme. The tested RB3 Gen 2 Industrial BT-over-UART setup also needs the BCS calibration TLV to be combined with the selected NVM before download.
Keep the BCS/NVM combination in a helper so missing calibration data or allocation failures can fall back to downloading the NVM alone without a local skip label.
Select the NVM file and BCS calibration file using the controller board ID when available, with fallback to the default files. Initialize the BCS calibration filename independently of the NVM filename source so custom NVM firmware-name paths do not leave it unset.
Register the QCC2072 compatible with hci_qca and route it through the same UART setup, speed switching and power-control paths as recent Qualcomm Bluetooth controllers.
This continues the QCC2072 enablement work previously posted by Vivek Sahu and later extended by Yepuri Siddu for the RB3 Gen 2 Industrial BT-over-UART use case.
--- drivers/bluetooth/btqca.c | 72 ++++++++++++++++++++++++++++++++++++++++++++- drivers/bluetooth/btqca.h | 2 ++ drivers/bluetooth/hci_qca.c | 24 +++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-)
drivers/bluetooth/btqca.c +71 -1
@@ -569,6 +569,54 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)return hci_recv_frame (hdev, skb); } +static void qca_combine_nvm_calib (struct hci_dev *hdev,u8 **data, +int *size,char *calib_name, +size_t max_size) +{ +const struct firmware *calib_fw; +struct tlv_type_hdr *outer_hdr; +size_t inner_len, combined_size; +u8 *combined_data; +int err; + + err =request_firmware (&calib_fw, calib_name, &hdev->dev); +if (err) { +if (qca_get_alt_nvm_file (calib_name, max_size)) + err =request_firmware (&calib_fw, calib_name, &hdev->dev); + +if (err) { +bt_dev_err (hdev,"QCA Failed to request file: %s (%d)" , + calib_name, err); +return ; + } + } + +bt_dev_info (hdev,"QCA Downloading %s" , calib_name); + + inner_len = *size + calib_fw->size; + combined_size =sizeof (*outer_hdr) + inner_len; + combined_data =vmalloc (combined_size); +if (!combined_data) { +bt_dev_warn (hdev, +"QCA Failed to allocate memory for file: %s" , + calib_name); +release_firmware (calib_fw); +return ; + } + + outer_hdr = (struct tlv_type_hdr *)combined_data; +/* high 24 bits = payload length, low 8 bits = type */ + outer_hdr->type_len =cpu_to_le32 ((inner_len <<8 ) |4 ); +memcpy (combined_data +sizeof (*outer_hdr), *data, *size); +memcpy (combined_data +sizeof (*outer_hdr) + *size, + calib_fw->data, calib_fw->size); +release_firmware (calib_fw); + +vfree (*data); + *data = combined_data; + *size = combined_size; +} + static int qca_download_firmware(struct hci_dev *hdev, struct qca_fw_config *config, enum qca_btsoc_type soc_type,
@@ -614,6 +662,11 @@ static int qca_download_firmware(struct hci_dev *hdev,memcpy (data, fw->data, size);release_firmware (fw); +if (soc_type ==QCA_QCC2072 && config->type ==TLV_TYPE_NVM ) +qca_combine_nvm_calib (hdev, &data, &size, + config->calib_name, +sizeof (config->calib_name)); + ret =qca_tlv_check_data (hdev, config, data, size, soc_type);if (ret) goto out;
@@ -845,6 +898,10 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,snprintf (config.fwname,sizeof (config.fwname),"qca/hmtbtfw%02x.tlv" , rom_ver);break ; +case QCA_QCC2072 : +snprintf (config.fwname,sizeof (config.fwname), +"qca/ornbtfw%02x.tlv" , rom_ver); +break ;default :snprintf (config.fwname,sizeof (config.fwname),"qca/rampatch_%08x.bin" , soc_ver);
@@ -878,7 +935,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,/* Give the controller some time to get ready to receive the NVM */ msleep (10 ); -if (soc_type ==QCA_QCA2066 || soc_type ==QCA_WCN7850 ) +if (soc_type ==QCA_QCA2066 || soc_type ==QCA_WCN7850 || + soc_type ==QCA_QCC2072 )qca_read_fw_board_id (hdev, &boardid);/* Download NVM configuration */
@@ -939,12 +997,23 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,qca_get_nvm_name_by_board (config.fwname,sizeof (config.fwname),"hmtnv" , soc_type, ver, rom_ver, boardid);break ; +case QCA_QCC2072 : +qca_get_nvm_name_by_board (config.fwname,sizeof (config.fwname), +"ornnv" , soc_type, ver, + rom_ver, boardid); +break ;default :snprintf (config.fwname,sizeof (config.fwname),"qca/nvm_%08x.bin" , soc_ver); } } +if (soc_type ==QCA_QCC2072 ) +qca_get_nvm_name_by_board (config.calib_name, +sizeof (config.calib_name), +"ornbcscal" , soc_type, ver, + rom_ver, boardid); + err =qca_download_firmware (hdev, &config, soc_type, rom_ver);if (err <0 && !firmware_name && soc_type ==QCA_WCN6855 ) { qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
@@ -1001,6 +1070,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :/* get fw build info */ err =qca_read_fw_build_info (hdev);if (err <0 )
drivers/bluetooth/btqca.h +2 -0
@@ -94,6 +94,7 @@ enum qca_tlv_type {struct qca_fw_config {u8 type;char fwname[64 ]; +char calib_name[64 ];uint8_t user_baud_rate;enum qca_tlv_dnld_mode dnld_mode;enum qca_tlv_dnld_mode dnld_type;
@@ -158,6 +159,7 @@ enum qca_btsoc_type {QCA_WCN6750 ,QCA_WCN6855 ,QCA_WCN7850 , + QCA_QCC2072, };#if IS_ENABLED (CONFIG_BT_QCA )
drivers/bluetooth/hci_qca.c +24 -0
@@ -1375,6 +1375,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)/* Give the controller time to process the request */ switch (qca_soc_type (hu)) { +case QCA_QCC2072 :case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :
@@ -1462,6 +1463,7 @@ static unsigned int qca_get_speed(struct hci_uart *hu,static int qca_check_speeds (struct hci_uart *hu) {switch (qca_soc_type (hu)) { +case QCA_QCC2072 :case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :
@@ -1513,6 +1515,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :hci_uart_set_flow_control (hu, true);break ;
@@ -1548,6 +1551,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :hci_uart_set_flow_control (hu, false);break ;
@@ -1864,6 +1868,7 @@ static int qca_power_on(struct hci_dev *hdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 : ret =qca_regulator_init (hu);break ;
@@ -1963,6 +1968,10 @@ static int qca_setup(struct hci_uart *hu) soc_name ="wcn7850" ;break ; +case QCA_QCC2072 : + soc_name ="qcc2072" ; +break ; +default : soc_name ="ROME/QCA6390" ; }
@@ -1986,6 +1995,7 @@ static int qca_setup(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :if (qcadev && qcadev->bdaddr_property_broken)hci_set_quirk (hdev,HCI_QUIRK_BDADDR_PROPERTY_BROKEN );
@@ -2019,6 +2029,7 @@ static int qca_setup(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :break ;default :
@@ -2172,6 +2183,12 @@ static const struct qca_device_data qca_soc_data_wcn3998 __maybe_unused = { .num_vregs = 4, }; +static const struct qca_device_data qca_soc_data_qcc2072__maybe_unused = { + .soc_type =QCA_QCC2072 , + .num_vregs =0 , + .capabilities =QCA_CAP_WIDEBAND_SPEECH |QCA_CAP_VALID_LE_STATES , +}; +static const struct qca_device_data qca_soc_data_wcn6750__maybe_unused = { .soc_type =QCA_WCN6750 , .vregs = (struct qca_vreg []) {
@@ -2274,6 +2291,7 @@ static void qca_power_off(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 : +case QCA_QCC2072 :gpiod_set_value_cansleep (qcadev->bt_en,0 );msleep (100 );qca_regulator_disable (qcadev);
@@ -2429,6 +2447,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 : qcadev->bt_power =devm_kzalloc (&serdev->dev,sizeof (struct qca_power ),GFP_KERNEL );
@@ -2448,6 +2467,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :if (!device_property_present (&serdev->dev,"enable-gpios" )) {/* * Backward compatibility with old DT sources. If the
@@ -2490,6 +2510,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)if (!qcadev->bt_en && (data->soc_type ==QCA_WCN6750 || data->soc_type ==QCA_WCN6855 || + data->soc_type ==QCA_QCC2072 || data->soc_type ==QCA_WCN7850 )) power_ctrl_enabled = false;
@@ -2498,6 +2519,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)if (IS_ERR (qcadev->sw_ctrl) && (data->soc_type ==QCA_WCN6750 || data->soc_type ==QCA_WCN6855 || + data->soc_type ==QCA_QCC2072 || data->soc_type ==QCA_WCN7850 )) {dev_err (&serdev->dev,"failed to acquire SW_CTRL gpio\n" );return PTR_ERR (qcadev->sw_ctrl);
@@ -2576,6 +2598,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)struct qca_power *power = qcadev->bt_power;switch (qcadev->btsoc_type) { +case QCA_QCC2072 :case QCA_WCN3988 :case QCA_WCN3990 :case QCA_WCN3991 :
@@ -2785,6 +2808,7 @@ static const struct of_device_id qca_bluetooth_of_match[] = { { .compatible = "qcom,wcn6750-bt", .data = &qca_soc_data_wcn6750}, { .compatible = "qcom,wcn6855-bt", .data = &qca_soc_data_wcn6855}, { .compatible = "qcom,wcn7850-bt", .data = &qca_soc_data_wcn7850}, + { .compatible = "qcom,qcc2072-bt", .data = &qca_soc_data_qcc2072 }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, qca_bluetooth_of_match);
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 2/6] Bluetooth: qca: add QCC2072 support
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Unconditional prepending of a Type 4 TLV header leads to nested Type 4 headers if the NVM file…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unconditional prepending of a Type 4 TLV header leads to nested Type 4 headers if the NVM file already has one, silently breaking NVM parsing. --
--- Patch [2]: [PATCH v2 2/6] Bluetooth: qca: add QCC2072 support --- commit 6bcb3bc10729db904fa228c76a2bef00327ec17a
Author: Vivek Sahu <[email protected]>
Bluetooth: qca: add QCC2072 support
Adds support for the QCC2072 Bluetooth controller, which uses ORN firmware naming. It introduces a helper to combine BCS calibration TLV data with NVM downloads and registers the compatible hardware.
Quoted 4 lines
drivers/bluetooth/btqca.c +0
-0
[ ... ]
Quoted 8 lines
drivers/bluetooth/btqca.c +4
-0@@ -569,6 +569,54 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)return hci_recv_frame (hdev, skb); } +static void qca_combine_nvm_calib (struct hci_dev *hdev,u8 **data, +int *size,char *calib_name, +size_t max_size) +{
[ ... ]
drivers/bluetooth/btqca.c static int qca_inject_cmd_complete_event(struct hci_dev *hdev) · line 613
Quoted 7 lines
drivers/bluetooth/btqca.c +7
-0+ outer_hdr = (struct tlv_type_hdr *)combined_data; +/* high 24 bits = payload length, low 8 bits = type */ + outer_hdr->type_len =cpu_to_le32 ((inner_len <<8 ) |4 ); +memcpy (combined_data +sizeof (*outer_hdr), *data, *size); +memcpy (combined_data +sizeof (*outer_hdr) + *size, + calib_fw->data, calib_fw->size); +release_firmware (calib_fw);
[Severity: High]
If the original NVM file already contains an enclosing Type 4 header, will this unconditionally prepend a second Type 4 header?
Looking at qca_tlv_check_data(), it expects to peel off at most one Type 4 header before strictly requiring a Type 2 header:
if (type == 4) {
...
tlv++;
type_len = le32_to_cpu(tlv->type_len);
length = type_len >> 8;
type = type_len & 0xff;
}
...
if (type != 2)
break;If there are nested Type 4 headers, the second header will cause type to equal 4 again, which triggers the early break out of the parser.
Could this cause the driver to silently skip parsing the NVM data, leaving critical settings like the MAC address, deep sleep masks, and UART baud rates unpatched? If the baud rate is not updated to match the host, this might cause all HCI communication to drop after the controller applies the NVM.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-rb3-industrial-bt-uart-v2-0-2d100f30e202@oss.qualcomm.com?part=2
Re: [PATCH v2 2/6] Bluetooth: qca: add QCC2072 support
In reply to Rahul SamanaQuoted 106 lines · Rahul Samana
From: Vivek Sahu <[email protected]>
QCC2072 uses the ORN firmware and NVM naming scheme. The tested RB3 Gen 2 Industrial BT-over-UART setup also needs the BCS calibration TLV to be combined with the selected NVM before download.
Keep the BCS/NVM combination in a helper so missing calibration data or allocation failures can fall back to downloading the NVM alone without a local skip label.
Select the NVM file and BCS calibration file using the controller board ID when available, with fallback to the default files. Initialize the BCS calibration filename independently of the NVM filename source so custom NVM firmware-name paths do not leave it unset.
Register the QCC2072 compatible with
hci_qcaand route it through the same UART setup, speed switching and power-control paths as recent Qualcomm Bluetooth controllers.This continues the QCC2072 enablement work previously posted by Vivek Sahu and later extended by Yepuri Siddu for the RB3 Gen 2 Industrial BT-over-UART use case.
Signed-off-by Vivek Sahu <[email protected]>Co-developed-by Yepuri Siddu <[email protected]>Signed-off-by Yepuri Siddu <[email protected]>Co-developed-by Rahul Samana <[email protected]>Signed-off-by Rahul Samana <[email protected]>--- drivers/bluetooth/btqca.c | 72 ++++++++++++++++++++++++++++++++++++++++++++- drivers/bluetooth/btqca.h | 2 ++ drivers/bluetooth/hci_qca.c | 24 +++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-)drivers/bluetooth/btqca.c +53
-0@@ -569,6 +569,54 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)return hci_recv_frame (hdev, skb); } +static void qca_combine_nvm_calib (struct hci_dev *hdev,u8 **data, +int *size,char *calib_name, +size_t max_size) +{ +const struct firmware *calib_fw; +struct tlv_type_hdr *outer_hdr; +size_t inner_len, combined_size; +u8 *combined_data; +int err; + + err =request_firmware (&calib_fw, calib_name, &hdev->dev); +if (err) { +if (qca_get_alt_nvm_file (calib_name, max_size)) + err =request_firmware (&calib_fw, calib_name, &hdev->dev); + +if (err) { +bt_dev_err (hdev,"QCA Failed to request file: %s (%d)" , + calib_name, err); +return ; + } + } + +bt_dev_info (hdev,"QCA Downloading %s" , calib_name); + + inner_len = *size + calib_fw->size; + combined_size =sizeof (*outer_hdr) + inner_len; + combined_data =vmalloc (combined_size); +if (!combined_data) { +bt_dev_warn (hdev, +"QCA Failed to allocate memory for file: %s" , + calib_name); +release_firmware (calib_fw); +return ; + } + + outer_hdr = (struct tlv_type_hdr *)combined_data; +/* high 24 bits = payload length, low 8 bits = type */ + outer_hdr->type_len =cpu_to_le32 ((inner_len <<8 ) |4 ); +memcpy (combined_data +sizeof (*outer_hdr), *data, *size); +memcpy (combined_data +sizeof (*outer_hdr) + *size, + calib_fw->data, calib_fw->size); +release_firmware (calib_fw); + +vfree (*data); + *data = combined_data; + *size = combined_size; +} + static int qca_download_firmware(struct hci_dev *hdev, struct qca_fw_config *config, enum qca_btsoc_type soc_type,@@ -614,6 +662,11 @@ static int qca_download_firmware(struct hci_dev *hdev,memcpy (data, fw->data, size);release_firmware (fw); +if (soc_type ==QCA_QCC2072 && config->type ==TLV_TYPE_NVM ) +qca_combine_nvm_calib (hdev, &data, &size, + config->calib_name, +sizeof (config->calib_name)); + ret =qca_tlv_check_data (hdev, config, data, size, soc_type);if (ret) goto out;
drivers/bluetooth/btqca.c int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · line 904
Quoted 7 lines
drivers/bluetooth/btqca.c +4
-0@@ -845,6 +898,10 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,snprintf (config.fwname,sizeof (config.fwname),"qca/hmtbtfw%02x.tlv" , rom_ver);break ; +case QCA_QCC2072 : +snprintf (config.fwname,sizeof (config.fwname), +"qca/ornbtfw%02x.tlv" , rom_ver); +break ;
Please try to keep these sorted.
Quoted 14 lines
drivers/bluetooth/btqca.c +2
-1default :snprintf (config.fwname,sizeof (config.fwname),"qca/rampatch_%08x.bin" , soc_ver);@@ -878,7 +935,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,/* Give the controller some time to get ready to receive the NVM */ msleep (10 ); -if (soc_type ==QCA_QCA2066 || soc_type ==QCA_WCN7850 ) +if (soc_type ==QCA_QCA2066 || soc_type ==QCA_WCN7850 || + soc_type ==QCA_QCC2072 )qca_read_fw_board_id (hdev, &boardid);/* Download NVM configuration */
drivers/bluetooth/btqca.c int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · line 1004
Quoted 8 lines
drivers/bluetooth/btqca.c +5
-0@@ -939,12 +997,23 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,qca_get_nvm_name_by_board (config.fwname,sizeof (config.fwname),"hmtnv" , soc_type, ver, rom_ver, boardid);break ; +case QCA_QCC2072 : +qca_get_nvm_name_by_board (config.fwname,sizeof (config.fwname), +"ornnv" , soc_type, ver, + rom_ver, boardid); +break ;
Sorted
Quoted 16 lines
drivers/bluetooth/btqca.c +6
-0default :snprintf (config.fwname,sizeof (config.fwname),"qca/nvm_%08x.bin" , soc_ver); } } +if (soc_type ==QCA_QCC2072 ) +qca_get_nvm_name_by_board (config.calib_name, +sizeof (config.calib_name), +"ornbcscal" , soc_type, ver, + rom_ver, boardid); + err =qca_download_firmware (hdev, &config, soc_type, rom_ver);if (err <0 && !firmware_name && soc_type ==QCA_WCN6855 ) { qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
drivers/bluetooth/btqca.c int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · line 1073
Quoted 4 lines
drivers/bluetooth/btqca.c +1
-0@@ -1001,6 +1070,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :
Sorted
Quoted 16 lines
drivers/bluetooth/btqca.c +0
-0/* get fw build info */ err =qca_read_fw_build_info (hdev);if (err <0 )drivers/bluetooth/btqca.h +1
-0@@ -94,6 +94,7 @@ enum qca_tlv_type {struct qca_fw_config {u8 type;char fwname[64 ]; +char calib_name[64 ];uint8_t user_baud_rate;enum qca_tlv_dnld_mode dnld_mode;enum qca_tlv_dnld_mode dnld_type;
drivers/bluetooth/btqca.h enum qca_btsoc_type { · line 162
Quoted 4 lines
drivers/bluetooth/btqca.h +1
-0@@ -158,6 +159,7 @@ enum qca_btsoc_type {QCA_WCN6750 ,QCA_WCN6855 ,QCA_WCN7850 , + QCA_QCC2072,
Sorted
drivers/bluetooth/hci_qca.c static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate) · line 1378
Quoted 12 lines
drivers/bluetooth/btqca.h +0
-0};#if IS_ENABLED (CONFIG_BT_QCA )drivers/bluetooth/hci_qca.c +1
-0@@ -1375,6 +1375,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)/* Give the controller time to process the request */ switch (qca_soc_type (hu)) { +case QCA_QCC2072 :
Ok, here you've discovered sorting order.
Quoted 12 lines
drivers/bluetooth/hci_qca.c +1
-0case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :@@ -1462,6 +1463,7 @@ static unsigned int qca_get_speed(struct hci_uart *hu,static int qca_check_speeds (struct hci_uart *hu) {switch (qca_soc_type (hu)) { +case QCA_QCC2072 :case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :
drivers/bluetooth/hci_qca.c static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type) · line 1518
Quoted 4 lines
drivers/bluetooth/hci_qca.c +1
-0@@ -1513,6 +1515,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :
And then lost it again.
Quoted 84 lines
drivers/bluetooth/hci_qca.c +17
-0hci_uart_set_flow_control (hu, true);break ;@@ -1548,6 +1551,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :hci_uart_set_flow_control (hu, false);break ;@@ -1864,6 +1868,7 @@ static int qca_power_on(struct hci_dev *hdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 : ret =qca_regulator_init (hu);break ;@@ -1963,6 +1968,10 @@ static int qca_setup(struct hci_uart *hu) soc_name ="wcn7850" ;break ; +case QCA_QCC2072 : + soc_name ="qcc2072" ; +break ; +default : soc_name ="ROME/QCA6390" ; }@@ -1986,6 +1995,7 @@ static int qca_setup(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :if (qcadev && qcadev->bdaddr_property_broken)hci_set_quirk (hdev,HCI_QUIRK_BDADDR_PROPERTY_BROKEN );@@ -2019,6 +2029,7 @@ static int qca_setup(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :break ;default :@@ -2172,6 +2183,12 @@ static const struct qca_device_data qca_soc_data_wcn3998 __maybe_unused = { .num_vregs = 4, }; +static const struct qca_device_data qca_soc_data_qcc2072__maybe_unused = { + .soc_type =QCA_QCC2072 , + .num_vregs =0 , + .capabilities =QCA_CAP_WIDEBAND_SPEECH |QCA_CAP_VALID_LE_STATES , +}; +static const struct qca_device_data qca_soc_data_wcn6750__maybe_unused = { .soc_type =QCA_WCN6750 , .vregs = (struct qca_vreg []) {@@ -2274,6 +2291,7 @@ static void qca_power_off(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 : +case QCA_QCC2072 :gpiod_set_value_cansleep (qcadev->bt_en,0 );msleep (100 );qca_regulator_disable (qcadev);@@ -2429,6 +2447,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 : qcadev->bt_power =devm_kzalloc (&serdev->dev,sizeof (struct qca_power ),GFP_KERNEL );@@ -2448,6 +2467,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :if (!device_property_present (&serdev->dev,"enable-gpios" )) {/* * Backward compatibility with old DT sources. If the
drivers/bluetooth/hci_qca.c static int qca_serdev_probe(struct serdev_device *serdev) · line 2513
Quoted 4 lines
drivers/bluetooth/hci_qca.c +1
-0@@ -2490,6 +2510,7 @@ static int qca_serdev_probe(struct serdev_device *serdev) if (!qcadev->bt_en && (data->soc_type == QCA_WCN6750 || data->soc_type == QCA_WCN6855 || + data->soc_type == QCA_QCC2072 ||
Randomly in the middle. No
Quoted 20 lines
drivers/bluetooth/hci_qca.c +2
-0data->soc_type == QCA_WCN7850)) power_ctrl_enabled = false;@@ -2498,6 +2519,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)if (IS_ERR (qcadev->sw_ctrl) && (data->soc_type ==QCA_WCN6750 || data->soc_type ==QCA_WCN6855 || + data->soc_type ==QCA_QCC2072 || data->soc_type ==QCA_WCN7850 )) {dev_err (&serdev->dev,"failed to acquire SW_CTRL gpio\n" );return PTR_ERR (qcadev->sw_ctrl);@@ -2576,6 +2598,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)struct qca_power *power = qcadev->bt_power;switch (qcadev->btsoc_type) { +case QCA_QCC2072 :case QCA_WCN3988 :case QCA_WCN3990 :case QCA_WCN3991 :
drivers/bluetooth/hci_qca.c static const struct of_device_id qca_bluetooth_of_match[] = { · line 2811
Quoted 4 lines
drivers/bluetooth/hci_qca.c +1
-0@@ -2785,6 +2808,7 @@ static const struct of_device_id qca_bluetooth_of_match[] = { { .compatible = "qcom,wcn6750-bt", .data = &qca_soc_data_wcn6750}, { .compatible = "qcom,wcn6855-bt", .data = &qca_soc_data_wcn6855}, { .compatible = "qcom,wcn7850-bt", .data = &qca_soc_data_wcn7850}, + { .compatible = "qcom,qcc2072-bt", .data = &qca_soc_data_qcc2072 },
And here too. Keep those sorted.
Quoted 7 lines
drivers/bluetooth/hci_qca.c +0
-0{/* sentinel */ } };MODULE_DEVICE_TABLE (of, qca_bluetooth_of_match);Signature · 2 lines
-- 2.34.1
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH v2 2/6] Bluetooth: qca: add QCC2072 support
Quoted 327 lines · Dmitry Baryshkov
Quoted 106 lines · Rahul Samana
From: Vivek Sahu <[email protected]>
QCC2072 uses the ORN firmware and NVM naming scheme. The tested RB3 Gen 2 Industrial BT-over-UART setup also needs the BCS calibration TLV to be combined with the selected NVM before download.
Keep the BCS/NVM combination in a helper so missing calibration data or allocation failures can fall back to downloading the NVM alone without a local skip label.
Select the NVM file and BCS calibration file using the controller board ID when available, with fallback to the default files. Initialize the BCS calibration filename independently of the NVM filename source so custom NVM firmware-name paths do not leave it unset.
Register the QCC2072 compatible with
hci_qcaand route it through the same UART setup, speed switching and power-control paths as recent Qualcomm Bluetooth controllers.This continues the QCC2072 enablement work previously posted by Vivek Sahu and later extended by Yepuri Siddu for the RB3 Gen 2 Industrial BT-over-UART use case.
Signed-off-by Vivek Sahu <[email protected]>Co-developed-by Yepuri Siddu <[email protected]>Signed-off-by Yepuri Siddu <[email protected]>Co-developed-by Rahul Samana <[email protected]>Signed-off-by Rahul Samana <[email protected]>--- drivers/bluetooth/btqca.c | 72 ++++++++++++++++++++++++++++++++++++++++++++- drivers/bluetooth/btqca.h | 2 ++ drivers/bluetooth/hci_qca.c | 24 +++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-)drivers/bluetooth/btqca.c +53
-0@@ -569,6 +569,54 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)return hci_recv_frame (hdev, skb); } +static void qca_combine_nvm_calib (struct hci_dev *hdev,u8 **data, +int *size,char *calib_name, +size_t max_size) +{ +const struct firmware *calib_fw; +struct tlv_type_hdr *outer_hdr; +size_t inner_len, combined_size; +u8 *combined_data; +int err; + + err =request_firmware (&calib_fw, calib_name, &hdev->dev); +if (err) { +if (qca_get_alt_nvm_file (calib_name, max_size)) + err =request_firmware (&calib_fw, calib_name, &hdev->dev); + +if (err) { +bt_dev_err (hdev,"QCA Failed to request file: %s (%d)" , + calib_name, err); +return ; + } + } + +bt_dev_info (hdev,"QCA Downloading %s" , calib_name); + + inner_len = *size + calib_fw->size; + combined_size =sizeof (*outer_hdr) + inner_len; + combined_data =vmalloc (combined_size); +if (!combined_data) { +bt_dev_warn (hdev, +"QCA Failed to allocate memory for file: %s" , + calib_name); +release_firmware (calib_fw); +return ; + } + + outer_hdr = (struct tlv_type_hdr *)combined_data; +/* high 24 bits = payload length, low 8 bits = type */ + outer_hdr->type_len =cpu_to_le32 ((inner_len <<8 ) |4 ); +memcpy (combined_data +sizeof (*outer_hdr), *data, *size); +memcpy (combined_data +sizeof (*outer_hdr) + *size, + calib_fw->data, calib_fw->size); +release_firmware (calib_fw); + +vfree (*data); + *data = combined_data; + *size = combined_size; +} + static int qca_download_firmware(struct hci_dev *hdev, struct qca_fw_config *config, enum qca_btsoc_type soc_type,@@ -614,6 +662,11 @@ static int qca_download_firmware(struct hci_dev *hdev,memcpy (data, fw->data, size);release_firmware (fw); +if (soc_type ==QCA_QCC2072 && config->type ==TLV_TYPE_NVM ) +qca_combine_nvm_calib (hdev, &data, &size, + config->calib_name, +sizeof (config->calib_name)); + ret =qca_tlv_check_data (hdev, config, data, size, soc_type);if (ret) goto out;drivers/bluetooth/btqca.c int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · line 904
Quoted 7 lines
drivers/bluetooth/btqca.c +4
-0@@ -845,6 +898,10 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,snprintf (config.fwname,sizeof (config.fwname),"qca/hmtbtfw%02x.tlv" , rom_ver);break ; +case QCA_QCC2072 : +snprintf (config.fwname,sizeof (config.fwname), +"qca/ornbtfw%02x.tlv" , rom_ver); +break ;Please try to keep these sorted.
Quoted 14 lines
drivers/bluetooth/btqca.c +2
-1default :snprintf (config.fwname,sizeof (config.fwname),"qca/rampatch_%08x.bin" , soc_ver);@@ -878,7 +935,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,/* Give the controller some time to get ready to receive the NVM */ msleep (10 ); -if (soc_type ==QCA_QCA2066 || soc_type ==QCA_WCN7850 ) +if (soc_type ==QCA_QCA2066 || soc_type ==QCA_WCN7850 || + soc_type ==QCA_QCC2072 )qca_read_fw_board_id (hdev, &boardid);/* Download NVM configuration */ drivers/bluetooth/btqca.c int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · line 1004
Quoted 8 lines
drivers/bluetooth/btqca.c +5
-0@@ -939,12 +997,23 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,qca_get_nvm_name_by_board (config.fwname,sizeof (config.fwname),"hmtnv" , soc_type, ver, rom_ver, boardid);break ; +case QCA_QCC2072 : +qca_get_nvm_name_by_board (config.fwname,sizeof (config.fwname), +"ornnv" , soc_type, ver, + rom_ver, boardid); +break ;Sorted
Quoted 16 lines
drivers/bluetooth/btqca.c +6
-0default :snprintf (config.fwname,sizeof (config.fwname),"qca/nvm_%08x.bin" , soc_ver); } } +if (soc_type ==QCA_QCC2072 ) +qca_get_nvm_name_by_board (config.calib_name, +sizeof (config.calib_name), +"ornbcscal" , soc_type, ver, + rom_ver, boardid); + err =qca_download_firmware (hdev, &config, soc_type, rom_ver);if (err <0 && !firmware_name && soc_type ==QCA_WCN6855 ) { qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),drivers/bluetooth/btqca.c int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, · line 1073
Quoted 4 lines
drivers/bluetooth/btqca.c +1
-0@@ -1001,6 +1070,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :Sorted
Quoted 16 lines
drivers/bluetooth/btqca.c +0
-0/* get fw build info */ err =qca_read_fw_build_info (hdev);if (err <0 )drivers/bluetooth/btqca.h +1
-0@@ -94,6 +94,7 @@ enum qca_tlv_type {struct qca_fw_config {u8 type;char fwname[64 ]; +char calib_name[64 ];uint8_t user_baud_rate;enum qca_tlv_dnld_mode dnld_mode;enum qca_tlv_dnld_mode dnld_type;drivers/bluetooth/btqca.h enum qca_btsoc_type { · line 162
Quoted 4 lines
drivers/bluetooth/btqca.h +1
-0@@ -158,6 +159,7 @@ enum qca_btsoc_type {QCA_WCN6750 ,QCA_WCN6855 ,QCA_WCN7850 , + QCA_QCC2072,Sorted
drivers/bluetooth/hci_qca.c static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate) · line 1378
Quoted 12 lines
drivers/bluetooth/btqca.h +0
-0};#if IS_ENABLED (CONFIG_BT_QCA )drivers/bluetooth/hci_qca.c +1
-0@@ -1375,6 +1375,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)/* Give the controller time to process the request */ switch (qca_soc_type (hu)) { +case QCA_QCC2072 :Ok, here you've discovered sorting order.
Quoted 12 lines
drivers/bluetooth/hci_qca.c +1
-0case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :@@ -1462,6 +1463,7 @@ static unsigned int qca_get_speed(struct hci_uart *hu,static int qca_check_speeds (struct hci_uart *hu) {switch (qca_soc_type (hu)) { +case QCA_QCC2072 :case QCA_WCN3950 :case QCA_WCN3988 :case QCA_WCN3990 :drivers/bluetooth/hci_qca.c static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type) · line 1518
Quoted 4 lines
drivers/bluetooth/hci_qca.c +1
-0@@ -1513,6 +1515,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :And then lost it again.
Quoted 84 lines
drivers/bluetooth/hci_qca.c +17
-0hci_uart_set_flow_control (hu, true);break ;@@ -1548,6 +1551,7 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :hci_uart_set_flow_control (hu, false);break ;@@ -1864,6 +1868,7 @@ static int qca_power_on(struct hci_dev *hdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 : ret =qca_regulator_init (hu);break ;@@ -1963,6 +1968,10 @@ static int qca_setup(struct hci_uart *hu) soc_name ="wcn7850" ;break ; +case QCA_QCC2072 : + soc_name ="qcc2072" ; +break ; +default : soc_name ="ROME/QCA6390" ; }@@ -1986,6 +1995,7 @@ static int qca_setup(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :if (qcadev && qcadev->bdaddr_property_broken)hci_set_quirk (hdev,HCI_QUIRK_BDADDR_PROPERTY_BROKEN );@@ -2019,6 +2029,7 @@ static int qca_setup(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :break ;default :@@ -2172,6 +2183,12 @@ static const struct qca_device_data qca_soc_data_wcn3998 __maybe_unused = { .num_vregs = 4, }; +static const struct qca_device_data qca_soc_data_qcc2072__maybe_unused = { + .soc_type =QCA_QCC2072 , + .num_vregs =0 , + .capabilities =QCA_CAP_WIDEBAND_SPEECH |QCA_CAP_VALID_LE_STATES , +}; +static const struct qca_device_data qca_soc_data_wcn6750__maybe_unused = { .soc_type =QCA_WCN6750 , .vregs = (struct qca_vreg []) {@@ -2274,6 +2291,7 @@ static void qca_power_off(struct hci_uart *hu)case QCA_WCN6750 :case QCA_WCN6855 : +case QCA_QCC2072 :gpiod_set_value_cansleep (qcadev->bt_en,0 );msleep (100 );qca_regulator_disable (qcadev);@@ -2429,6 +2447,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 : qcadev->bt_power =devm_kzalloc (&serdev->dev,sizeof (struct qca_power ),GFP_KERNEL );@@ -2448,6 +2467,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)case QCA_WCN6750 :case QCA_WCN6855 :case QCA_WCN7850 : +case QCA_QCC2072 :if (!device_property_present (&serdev->dev,"enable-gpios" )) {/* * Backward compatibility with old DT sources. If the drivers/bluetooth/hci_qca.c static int qca_serdev_probe(struct serdev_device *serdev) · line 2513
Quoted 4 lines
drivers/bluetooth/hci_qca.c +1
-0@@ -2490,6 +2510,7 @@ static int qca_serdev_probe(struct serdev_device *serdev) if (!qcadev->bt_en && (data->soc_type == QCA_WCN6750 || data->soc_type == QCA_WCN6855 || + data->soc_type == QCA_QCC2072 ||Randomly in the middle. No
Quoted 14 lines
drivers/bluetooth/hci_qca.c +1
-0data->soc_type == QCA_WCN7850)) power_ctrl_enabled = false;@@ -2498,6 +2519,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)if (IS_ERR (qcadev->sw_ctrl) && (data->soc_type ==QCA_WCN6750 || data->soc_type ==QCA_WCN6855 || + data->soc_type ==QCA_QCC2072 || data->soc_type ==QCA_WCN7850 )) {dev_err (&serdev->dev,"failed to acquire SW_CTRL gpio\n" );return PTR_ERR (qcadev->sw_ctrl);@@ -2576,6 +2598,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)struct qca_power *power = qcadev->bt_power;
Quoted 13 lines
drivers/bluetooth/hci_qca.c static const struct of_device_id qca_bluetooth_of_match[] = { · line 2811
Quoted 10 lines
drivers/bluetooth/hci_qca.c +2
-0switch (qcadev->btsoc_type) { +case QCA_QCC2072 :case QCA_WCN3988 :case QCA_WCN3990 :case QCA_WCN3991 :@@ -2785,6 +2808,7 @@ static const struct of_device_id qca_bluetooth_of_match[] = { { .compatible = "qcom,wcn6750-bt", .data = &qca_soc_data_wcn6750}, { .compatible = "qcom,wcn6855-bt", .data = &qca_soc_data_wcn6855}, { .compatible = "qcom,wcn7850-bt", .data = &qca_soc_data_wcn7850}, + { .compatible = "qcom,qcc2072-bt", .data = &qca_soc_data_qcc2072 },And here too. Keep those sorted.
Hi Dmitry,
Ack, I will keep the entries sorted consistently in v3.
Thanks,
Rahul
Quoted 8 lines
Quoted 7 lines
drivers/bluetooth/hci_qca.c +0
-0{/* sentinel */ } };MODULE_DEVICE_TABLE (of, qca_bluetooth_of_match);Signature · 2 lines
-- 2.34.1
Re: [PATCH v2 2/6] Bluetooth: qca: add QCC2072 support
In reply to Rahul SamanaTested patches 1-3 on an ASUS Zenbook A16 (UX3607OA, X2 Elite), 7.4-rc1 based. The controller (product 0x20, ROM 0x0101, board ID 0x17) now loads ornbtfw11.tlv, ornnv11.bin and ornbcscal11.bin instead of falling back to ROM firmware, and a phone pairs and plays A2DP audio.
With the mainline A16 DT (M.2 E connector, no Bluetooth node), patch 3 creates the BT node, but the card only powers on with Manivannan's "Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq" [1] applied too. Without it, hci_qca asks for a "bluetooth" pwrseq target the connector doesn't provide, W_DISABLE2# stays asserted and reading the version times out (-110).
One of five boots failed: the rampatch download timed out ("command 0xfc00 tx timeout", "Failed to send TLV segment (-110)") and the "Retry BT power ON" never completed, leaving BT down until userspace powered it on. ath12k was bringing up WLAN on the same chip during the download in every boot, so I suspect contention there.
PATCH v2 3/6 power: sequencing: pwrseq-pcie-m2: add QCC2072
In reply to Rahul SamanaFrom: Krishna Chaitanya Chundru <[email protected]>
QCC2072 cards expose Bluetooth over the M.2 E-key UART pins. After the QCC2072 PCI function is enumerated, the M.2 power sequencing provider can create a Bluetooth serdev child using the documented qcom,qcc2072-bt compatible.
Add the QCC2072 WLAN PCI device ID to the M.2 power sequencing match table.
This carries the QCC2072 M.2 pwrseq PCI ID previously posted by Krishna Chaitanya Chundru as part of the Eliza EVK PCIe/M.2 series.
--- drivers/power/sequencing/pwrseq-pcie-m2.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/power/sequencing/pwrseq-pcie-m2.c +2 -0
@@ -189,6 +189,8 @@ static const struct pci_device_id pwrseq_m2_pci_ids[] = { .driver_data = (kernel_ulong_t)"qcom,wcn6855-bt" }, { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x1107), .driver_data = (kernel_ulong_t)"qcom,wcn7850-bt" }, + { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x1112), + .driver_data = (kernel_ulong_t)"qcom,qcc2072-bt" }, { } /* Sentinel */ };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 3/6] power: sequencing: pwrseq-pcie-m2: add QCC2072
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines
From: Krishna Chaitanya Chundru <[email protected]>
QCC2072 cards expose Bluetooth over the M.2 E-key UART pins. After the QCC2072 PCI function is enumerated, the M.2 power sequencing provider can create a Bluetooth serdev child using the documented qcom,qcc2072-bt compatible.
Quoted 7 lines
Add the QCC2072 WLAN PCI device ID to the M.2 power sequencing match table.
This carries the QCC2072 M.2 pwrseq PCI ID previously posted by Krishna Chaitanya Chundru as part of the Eliza EVK PCIe/M.2 series.
Signed-off-by Krishna Chaitanya Chundru <[email protected]>Signed-off-by Rahul Samana <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-rb3-industrial-bt-uart-v2-0-2d100f30e202@oss.qualcomm.com?part=3
PATCH v2 4/6 arm64: dts: qcom: qcs6490-rb3gen2: label BT PMU and M.2 PCI node
In reply to Rahul SamanaThe reworked RB3 Gen 2 Industrial BT UART overlay needs to disable the on-board WCN6750 PMU and add a graph endpoint to the M.2 PCI node.
Label the exact WCN6750 PMU node and PCI child node connected to the M.2 E-key slot so the overlay can patch them directly instead of using a full path or reconstructing the nested PCI hierarchy.
--- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +2 -2
@@ -325,7 +325,7 @@ vdd_ntn_1p8: regulator-vdd-ntn-1p8 { regulator-enable-ramp-delay = <10000>; }; - wcn6750-pmu { + wcn6750_pmu: wcn6750-pmu { compatible = "qcom,wcn6750-pmu"; pinctrl-0 = <&bt_en>; pinctrl-names = "default";
@@ -901,7 +901,7 @@ pcie1_switch0_dsp1: pcie@1,0 { bus-range = <0x3 0xff>; }; - pcie@2,0 { + pcie0_m2_e: pcie@2,0 { reg = <0x21000 0x0 0x0 0x0 0x0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 4/6] arm64: dts: qcom: qcs6490-rb3gen2: label BT PMU and M.2 PCI node
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 8 lines
The reworked RB3 Gen 2 Industrial BT UART overlay needs to disable the on-board WCN6750 PMU and add a graph endpoint to the M.2 PCI node.
Label the exact WCN6750 PMU node and PCI child node connected to the M.2 E-key slot so the overlay can patch them directly instead of using a full path or reconstructing the nested PCI hierarchy.
Signed-off-by Rahul Samana <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-rb3-industrial-bt-uart-v2-0-2d100f30e202@oss.qualcomm.com?part=4
Re: [PATCH v2 4/6] arm64: dts: qcom: qcs6490-rb3gen2: label BT PMU and M.2 PCI node
In reply to Rahul SamanaQuoted 27 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial BT UART overlay needs to disable the on-board WCN6750 PMU and add a graph endpoint to the M.2 PCI node.
Label the exact WCN6750 PMU node and PCI child node connected to the M.2 E-key slot so the overlay can patch them directly instead of using a full path or reconstructing the nested PCI hierarchy.
Signed-off-by Rahul Samana <[email protected]>--- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +1
-1@@ -325,7 +325,7 @@ vdd_ntn_1p8: regulator-vdd-ntn-1p8 { regulator-enable-ramp-delay = <10000>; }; - wcn6750-pmu { + wcn6750_pmu: wcn6750-pmu { compatible = "qcom,wcn6750-pmu"; pinctrl-0 = <&bt_en>; pinctrl-names = "default";
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts pcie1_switch0_dsp1: pcie@1,0 { · line 907
Quoted 8 lines
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +1
-1@@ -901,7 +901,7 @@ pcie1_switch0_dsp1: pcie@1,0 { bus-range = <0x3 0xff>; }; - pcie@2,0 { + pcie0_m2_e: pcie@2,0 { reg = <0x21000 0x0 0x0 0x0 0x0>; #address-cells = <3>; #size-cells = <2>;
One correction for this patch:
After re-checking the composed devicetree and the device enumeration, the QCC2072-facing PCIe path is behind the Industrial mezzanine PCIe0 switch:
/soc@0/pcie@1c00000/pcie@0/pcie@0,0/pcie@2,0
The pcie@2,0 node labelled in qcs6490-rb3gen2.dts by this patch is under the base RB3 PCIe1 topology, so it is not the right endpoint for the BT UART variant.
I will fix this in v3 once the endpoint modelling approach is clarified.
Regards,
Rahul
PATCH v2 5/6 arm64: dts: qcom: kodiak: mark PCIe root port as bridge
In reply to Rahul SamanaThe PCI core needs to associate the DT node below the QCS6490 PCIe host bridge with the enumerated PCI-to-PCI bridge device before child nodes can be matched against the PCI topology.
Add compatible = "pciclass,0604" to pcie0_port so child nodes below the bridge can be matched by the PCI device class.
--- arch/arm64/boot/dts/qcom/kodiak.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/kodiak.dtsi +1 -0
@@ -2296,6 +2296,7 @@ pcie0: pcie@1c00000 { status = "disabled"; pcie0_port: pcie@0 { + compatible = "pciclass,0604"; device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
Signature · 1 line
2.34.1
Re: [PATCH v2 5/6] arm64: dts: qcom: kodiak: mark PCIe root port as bridge
Hi Konrad,
Sorry, I missed carrying your Reviewed-by tag from v1 for this patch:
If the patch is otherwise okay, please feel free to apply it with the tag added. I will also include it if another revision is needed.
Thanks,
Rahul
Quoted 25 lines · Rahul Samana
The PCI core needs to associate the DT node below the QCS6490 PCIe host bridge with the enumerated PCI-to-PCI bridge device before child nodes can be matched against the PCI topology.
Add compatible = "pciclass,0604" to
pcie0_portso child nodes below the bridge can be matched by the PCI device class.Signed-off-by Rahul Samana <[email protected]>--- arch/arm64/boot/dts/qcom/kodiak.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm64/boot/dts/qcom/kodiak.dtsi +1
-0@@ -2296,6 +2296,7 @@ pcie0: pcie@1c00000 { status = "disabled"; pcie0_port: pcie@0 { + compatible = "pciclass,0604"; device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
[email protected]
AI reviewRe: [PATCH v2 5/6] arm64: dts: qcom: kodiak: mark PCIe root port as bridge
In reply to Rahul SamanaThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The patch adds compatible = "pciclass,0604" to the pcie0_port root port node in kodiak.dtsi to ensure the PCI core and slot power control drivers can associate the DT node with the enumerated PCI-to-PCI bridge, which enables child node matching. However, the patch fails to apply this exact same fix to the sibling pcie1_port0 root port node. --
--- Patch [5]: [PATCH v2 5/6] arm64: dts: qcom: kodiak: mark PCIe root port as bridge --- commit 570e5e44fe4845eb64dbbfbc0bb38b9d4ae991da
Author: Rahul Samana <[email protected]>
arm64: dts: qcom: kodiak: mark PCIe root port as bridge
The patch adds the compatible = "pciclass,0604" property to the pcie0_port device tree node. This allows the PCI core to associate the OF node with the enumerated PCI-to-PCI bridge device, enabling proper matching for child nodes.
arch/arm64/boot/dts/qcom/kodiak.dtsi pcie0: pcie@1c00000 { · line 2302
Quoted 12 lines
arch/arm64/boot/dts/qcom/kodiak.dtsi +1
-0@@ -2296,6 +2296,7 @@ pcie0: pcie@1c00000 { status = "disabled"; pcie0_port: pcie@0 { + compatible = "pciclass,0604"; device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>;
[Severity: High]
This isn't a bug introduced by this patch, but should the exact same fix be applied to the secondary PCIe root port node (pcie1_port0)?
Looking further down in arch/arm64/boot/dts/qcom/kodiak.dtsi, pcie1_port0 has an identical structure but is missing the "pciclass,0604" property:
pcie1_port0: pcie@0 {
device_type = "pci";
reg = <0x0 0x0 0x0 0x0 0x0>;
bus-range = <0x01 0xff>;Without this property on pcie1_port0, won't devices connected to the secondary PCIe port fail to properly associate their OF nodes with the enumerated PCI devices?
This could prevent downstream devices from acquiring essential DT properties like regulators and GPIOs.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-rb3-industrial-bt-uart-v2-0-2d100f30e202@oss.qualcomm.com?part=5
Re: [PATCH v2 5/6] arm64: dts: qcom: kodiak: mark PCIe root port as bridge
In reply to Rahul SamanaQuoted 9 lines · Rahul Samana
The PCI core needs to associate the DT node below the QCS6490 PCIe host bridge with the enumerated PCI-to-PCI bridge device before child nodes can be matched against the PCI topology.
Add compatible = "pciclass,0604" to
pcie0_portso child nodes below the bridge can be matched by the PCI device class.Signed-off-by Rahul Samana <[email protected]>---
Konrad
PATCH v2 6/6 arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
In reply to Rahul SamanaThe reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
--- arch/arm64/boot/dts/qcom/Makefile | 2 + ...s6490-rb3gen2-industrial-mezzanine-bt-uart.dtso | 129 +++++++++++++++++++++ 2 files changed, 131 insertions(+)
arch/arm64/boot/dts/qcom/Makefile +2 -0
@@ -179,8 +179,10 @@ dtb-$(CONFIG_ARCH_QCOM) += qcs6490-rb3gen2.dtb qcs6490-rb3gen2-vision-mezzanine-dtbs := qcs6490-rb3gen2.dtb qcs6490-rb3gen2-vision-mezzanine.dtbo qcs6490-rb3gen2-industrial-mezzanine-dtbs := qcs6490-rb3gen2.dtb qcs6490-rb3gen2-industrial-mezzanine.dtbo +qcs6490-rb3gen2-industrial-mezzanine-bt-uart-dtbs := qcs6490-rb3gen2.dtb qcs6490-rb3gen2-industrial-mezzanine.dtbo qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtbo dtb-$(CONFIG_ARCH_QCOM) += qcs6490-rb3gen2-industrial-mezzanine.dtb +dtb-$(CONFIG_ARCH_QCOM) += qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtb dtb-$(CONFIG_ARCH_QCOM) += qcs6490-rb3gen2-vision-mezzanine.dtb dtb-$(CONFIG_ARCH_QCOM) += qcs6490-thundercomm-minipc-g1iot.dtb dtb-$(CONFIG_ARCH_QCOM) += qcs6490-thundercomm-rubikpi3.dtb
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +129 -0
129 lines not on this page · raw message
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] The overlay fails to delete the existing default PCIe child node (`usb-controller@0,0`) under the…
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The overlay fails to delete the existing default PCIe child node (usb-controller@0,0) under the M.2 E-key slot (&pcie0_m2_e), causing a devfn collision and erroneous OF node binding.
- [High] The m2-e-connector node uses a dummy, uncontrolled regulator for the 3.3V supply rather than the actual GPIO-controlled rail powering the slot.
- [Medium] Missing /delete-property/ interrupts; when adding interrupts-extended to &uart4.
--
--- Patch [6]: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay --- commit 978523089bf29d9bf8d8d86680d9cc1d3d558116
Author: Rahul Samana <[email protected]>
arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
The reworked RB3 Gen 2 Industrial mezzanine routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path. This patch adds a new overlay that models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path.
Quoted 20 lines
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +14
-0@@ -0,0 +1,129 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2026 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/arm-gic.h> + +&{/} { + vreg_wcn_3p3: regulator-wcn-3p3 { + compatible = "regulator-fixed";
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso line 24
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +10
-0+ regulator-name = "VREG_WCN_3P3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-boot-on; + }; + + m2-e-connector { + compatible = "pcie-m2-e-connector"; + vpcie3v3-supply = <&vreg_wcn_3p3>;
[Severity: High]
Does this dummy regulator break hardware power sequencing for the M.2 slot?
The base board's M.2 E-key slot is powered by the vreg_pcie0_3p3 regulator (controlled by PMIC GPIO 1), but this assigns a dummy vreg_wcn_3p3 fixed regulator with no GPIO hardware control. This could cause the power sequencing driver to blindly toggle a software dummy state instead of the actual hardware power rail.
Should this use vpcie3v3-supply = <&vreg_pcie0_3p3>; and drop the dummy vreg_wcn_3p3 definition so the power sequencing logic works properly?
[ ... ]
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso line 105
Quoted 7 lines
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +7
-0+&pcie0_m2_e { + port { + pcie0_m2_e_ep: endpoint { + remote-endpoint = <&m2_e_pcie_ep>; + }; + }; +};
[Severity: High]
Does this overlay need to delete the existing default usb-controller@0,0 child node from the base board's pcie0_m2_e slot?
Since the QCC2072 PCI device enumerates dynamically on this slot, it will share the same bus address. The PCI subsystem might incorrectly assign the usb-controller@0,0 DT node to the Wi-Fi device, which would apply the USB controller's default pinctrl and regulator dependencies to the Wi-Fi card, leading to hardware state corruption.
Can this be resolved by adding a /delete-node/ usb-controller@0,0; under &pcie0_m2_e?
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso line 109
Quoted 4 lines
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +4
-0+ +&uart4 { + interrupts-extended = <&intc GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>, + <&tlmm 19 IRQ_TYPE_EDGE_FALLING>;
[Severity: Medium]
Does this node also need to explicitly delete the inherited interrupts property?
The &uart4 node inherits the interrupts property from the base SoC devicetree. Adding interrupts-extended without a /delete-property/ interrupts; results in both properties being present, which violates DT schema and causes dtbs_check validation warnings.
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-rb3-industrial-bt-uart-v2-0-2d100f30e202@oss.qualcomm.com?part=6
Re: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
In reply to Rahul SamanaQuoted 9 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
So is the onboard module disabled? Can we not just use two in parallel?
[...]
Quoted 12 lines
+&pcie0_m2_e {
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +11
-0+ port { + pcie0_m2_e_ep: endpoint { + remote-endpoint = <&m2_e_pcie_ep>; + }; + }; +}; + +&uart4 { + interrupts-extended = <&intc GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>, + <&tlmm 19 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default", "sleep";
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso line 120
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +10
-0+ pinctrl-1 = <&qup_uart4_sleep_cts>, <&qup_uart4_sleep_rts>, + <&qup_uart4_sleep_tx>, <&qup_uart4_sleep_rx>; + + status = "okay"; + + port { + uart4_m2_e_ep: endpoint { + remote-endpoint = <&m2_e_uart_ep>; + }; + };
Let's define both PCIe and UART endpoint sin the SoC DTSI. And don't mention "m2" in their labels.
Just pcie0_port0_ep and uart4_ep respectively.
Konrad
Re: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 5 lines · Konrad Dybcio
Quoted 4 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
Quoted 8 lines
Quoted 5 lines
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
I will move the on-board BT UART/PMU disablement to the same common Industrial mezzanine overlay in v3, so the BT UART overlay only models the reworked M.2 UART wiring.
Quoted 28 lines
[...]
Quoted 12 lines
+&pcie0_m2_e {
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +11
-0+ port { + pcie0_m2_e_ep: endpoint { + remote-endpoint = <&m2_e_pcie_ep>; + }; + }; +}; + +&uart4 { + interrupts-extended = <&intc GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>, + <&tlmm 19 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default", "sleep";arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso line 120
Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2-industrial-mezzanine-bt-uart.dtso new file +10
-0+ pinctrl-1 = <&qup_uart4_sleep_cts>, <&qup_uart4_sleep_rts>, + <&qup_uart4_sleep_tx>, <&qup_uart4_sleep_rx>; + + status = "okay"; + + port { + uart4_m2_e_ep: endpoint { + remote-endpoint = <&m2_e_uart_ep>; + }; + };Let's define both PCIe and UART endpoint sin the SoC DTSI. And don't mention "m2" in their labels.
Quoted 2 lines
Just
pcie0_port0_epanduart4_eprespectively.
Okay. I will move the PCIe and UART graph endpoints to the common SoC DTSI with those generic labels in v3, and keep only the connector-side wiring in the overlay.
Thanks,
Rahul
Quoted 1 line
Konrad
Re: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 14 lines · Rahul Samana
Quoted 11 lines · Konrad Dybcio
Quoted 9 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
Quoted 6 lines
Quoted 2 lines
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
What does 'do not support' it mean here? They are physically present as part of the SoM, so unless the lanes are somehow diverted away, why is it not?
Konrad
Re: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 22 lines · Konrad Dybcio
Quoted 14 lines · Rahul Samana
Quoted 11 lines · Konrad Dybcio
Quoted 9 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
Quoted 6 lines
Quoted 2 lines
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
Quoted 5 lines
What does 'do not support' it mean here? They are physically present as part of the SoM, so unless the lanes are somehow diverted away, why is it not?
Konrad
Hi Konrad,
The WCN6750 module is physically present on the SoM. What I meant is that the current Industrial mezzanine devicetree already disables the on-board Wi-Fi path, and this BT UART variant followed the same board-level policy for the on-board Bluetooth UART/PMU path.
For the endpoint labels, I can move the UART endpoint to the SoC DTSI, kodiak.dtsi, as uart4_ep.
For the PCIe endpoint, the PCIe path to the M.2 QCC2072 device is not the PCIe0 root port in kodiak.dtsi. In the composed devicetree, it is behind the Industrial mezzanine PCIe switch, under:
/soc@0/pcie@1c00000/pcie@0/pcie@0,0/pcie@2,0
So placing pcie0_port0_ep in kodiak.dtsi would not describe the actual topology.
I tried adding a generic label/endpoint to that downstream port in the Industrial mezzanine overlay and referencing it from the BT UART overlay. However, when the overlays are compiled separately and then composed, that label is not available while applying the BT UART overlay, so the composed DTB build fails with FDT_ERR_NOTFOUND.
Could you please suggest how you would prefer the PCIe endpoint to be modelled for this case?
Regards,
Rahul
Re: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 11 lines · Rahul Samana
Quoted 8 lines · Konrad Dybcio
Quoted 7 lines · Rahul Samana
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
I only noticed this now - are there 2 variants of the industrial mezz being sold concurrently? Is the already-in-kernel one some sort of a prototype SKU? i.e. should we support both?
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
Quoted 6 lines
Quoted 2 lines
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
What does 'do not support' it mean here? They are physically present as part of the SoM, so unless the lanes are somehow diverted away, why is it not?
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad,
The WCN6750 module is physically present on the SoM. What I meant is that the current Industrial mezzanine devicetree already disables the on-board Wi-Fi path, and this BT UART variant followed the same board-level policy for the on-board Bluetooth UART/PMU path.
Okay, and do we know why that's the case in the first place?
Quoted 2 lines
For the endpoint labels, I can move the UART endpoint to the SoC DTSI,
kodiak.dtsi, asuart4_ep.
Please do
Quoted 9 lines
For the PCIe endpoint, the PCIe path to the M.2 QCC2072 device is not the PCIe0 root port in
kodiak.dtsi. In the composed devicetree, it is behind the Industrial mezzanine PCIe switch, under:/soc@0/pcie@1c00000/pcie@0/pcie@0,0/pcie@2,0So placing
pcie0_port0_epinkodiak.dtsiwould not describe the actual topology.
Yes, that was an omission from my side
Quoted 5 lines
I tried adding a generic label/endpoint to that downstream port in the Industrial mezzanine overlay and referencing it from the BT UART overlay. However, when the overlays are compiled separately and then composed, that label is not available while applying the BT UART overlay, so the composed DTB build fails with
FDT_ERR_NOTFOUND.
I think this generic description is simply not achievable today without a bigger plan in place
Konrad
Re: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 70 lines · Konrad Dybcio
Quoted 11 lines · Rahul Samana
Quoted 8 lines · Konrad Dybcio
Quoted 7 lines · Rahul Samana
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
I only noticed this now - are there 2 variants of the industrial mezz being sold concurrently? Is the already-in-kernel one some sort of a prototype SKU? i.e. should we support both?
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
Quoted 6 lines
Quoted 2 lines
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
What does 'do not support' it mean here? They are physically present as part of the SoM, so unless the lanes are somehow diverted away, why is it not?
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad,
The WCN6750 module is physically present on the SoM. What I meant is that the current Industrial mezzanine devicetree already disables the on-board Wi-Fi path, and this BT UART variant followed the same board-level policy for the on-board Bluetooth UART/PMU path.
Okay, and do we know why that's the case in the first place?
Quoted 2 lines
For the endpoint labels, I can move the UART endpoint to the SoC DTSI,
kodiak.dtsi, asuart4_ep.Please do
Quoted 9 lines
For the PCIe endpoint, the PCIe path to the M.2 QCC2072 device is not the PCIe0 root port in
kodiak.dtsi. In the composed devicetree, it is behind the Industrial mezzanine PCIe switch, under:/soc@0/pcie@1c00000/pcie@0/pcie@0,0/pcie@2,0So placing
pcie0_port0_epinkodiak.dtsiwould not describe the actual topology.Yes, that was an omission from my side
Quoted 5 lines
I tried adding a generic label/endpoint to that downstream port in the Industrial mezzanine overlay and referencing it from the BT UART overlay. However, when the overlays are compiled separately and then composed, that label is not available while applying the BT UART overlay, so the composed DTB build fails with
FDT_ERR_NOTFOUND.
Quoted 4 lines
I think this generic description is simply not achievable today without a bigger plan in place
Konrad
Hi Konrad, Dmitry,
Yes, both Industrial Kit variants need to be supported.
The default Industrial Kit uses the common Industrial mezzanine hardware description and continues to use the existing Bluetooth-over-USB path. The reworked Industrial Kit variant keeps the rest of the Industrial mezzanine hardware the same, but routes Bluetooth over UART4 instead.
That is why this series models the reworked variant by applying the base RB3 Gen 2 DTB first, then the common Industrial mezzanine overlay, and finally the BT UART overlay.
For the WCN6750 disablement reason, I will re-check the board/SKU details and come back with the exact reason instead of assuming it only from the current devicetree state.
For v3, I will move the UART endpoint to the SoC DTSI, kodiak.dtsi, as uart4_ep.
For the PCIe endpoint, the exact PCIe node is introduced by the Industrial mezzanine overlay, and a second overlay cannot reference a label introduced there. So the clean label-and-patch model suggested earlier is not buildable with the current two-overlay setup.
The PCIe graph endpoint is needed for the pwrseq-pcie-m2 provider to associate the enumerated QCC2072 PCI function with the M.2 connector. Given that, would the nested patching style from v1 be acceptable as an interim solution for this variant despite the concern Dmitry raised?
I am open to other suggestions if there is a better way to model this within the current overlay structure.
Thanks,
Rahul
Bjorn Andersson
maintainerRe: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 76 lines · Rahul Samana
Quoted 73 lines · Konrad Dybcio
Quoted 11 lines · Rahul Samana
Quoted 8 lines · Konrad Dybcio
Quoted 7 lines · Rahul Samana
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
I only noticed this now - are there 2 variants of the industrial mezz being sold concurrently? Is the already-in-kernel one some sort of a prototype SKU? i.e. should we support both?
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
Quoted 6 lines
Quoted 2 lines
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
What does 'do not support' it mean here? They are physically present as part of the SoM, so unless the lanes are somehow diverted away, why is it not?
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad,
The WCN6750 module is physically present on the SoM. What I meant is that the current Industrial mezzanine devicetree already disables the on-board Wi-Fi path, and this BT UART variant followed the same board-level policy for the on-board Bluetooth UART/PMU path.
Okay, and do we know why that's the case in the first place?
Quoted 2 lines
For the endpoint labels, I can move the UART endpoint to the SoC DTSI,
kodiak.dtsi, asuart4_ep.Please do
Quoted 9 lines
For the PCIe endpoint, the PCIe path to the M.2 QCC2072 device is not the PCIe0 root port in
kodiak.dtsi. In the composed devicetree, it is behind the Industrial mezzanine PCIe switch, under:/soc@0/pcie@1c00000/pcie@0/pcie@0,0/pcie@2,0So placing
pcie0_port0_epinkodiak.dtsiwould not describe the actual topology.Yes, that was an omission from my side
Quoted 5 lines
I tried adding a generic label/endpoint to that downstream port in the Industrial mezzanine overlay and referencing it from the BT UART overlay. However, when the overlays are compiled separately and then composed, that label is not available while applying the BT UART overlay, so the composed DTB build fails with
FDT_ERR_NOTFOUND.I think this generic description is simply not achievable today without a bigger plan in place
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad, Dmitry,
Yes, both Industrial Kit variants need to be supported.
The default Industrial Kit uses the common Industrial mezzanine hardware description and continues to use the existing Bluetooth-over-USB path.
"Kit uses the common" what do you even mean?! The mezzanine is a physical thing, it doesn't _use_ anything! The mezzanine exists and the DeviceTree describe what it is.
Quoted 4 lines
The
reworked Industrial Kit variant keeps the rest of the Industrial mezzanine hardware the same, but routes Bluetooth over UART4 instead.
Does "reworked mezzanine" mean what it usually does? I.e. that you have taken the mezzanine and modified it?
[..]
Quoted 4 lines
I am open to other suggestions if there is a better way to model this within the current overlay structure.
I don't think it's possible to give you other suggestions as you haven't described what this thing is, you just explaining how you're hacking something together and ask us to help adjust your hack without knowing what it is you're trying to describe with your DeviceTree.
Regards,
Bjorn
Quoted 3 lines
Thanks,
Rahul
Re: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 90 lines · Bjorn Andersson
Quoted 76 lines · Rahul Samana
Quoted 73 lines · Konrad Dybcio
Quoted 11 lines · Rahul Samana
Quoted 8 lines · Konrad Dybcio
Quoted 7 lines · Rahul Samana
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
I only noticed this now - are there 2 variants of the industrial mezz being sold concurrently? Is the already-in-kernel one some sort of a prototype SKU? i.e. should we support both?
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
Quoted 6 lines
Quoted 2 lines
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
What does 'do not support' it mean here? They are physically present as part of the SoM, so unless the lanes are somehow diverted away, why is it not?
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad,
The WCN6750 module is physically present on the SoM. What I meant is that the current Industrial mezzanine devicetree already disables the on-board Wi-Fi path, and this BT UART variant followed the same board-level policy for the on-board Bluetooth UART/PMU path.
Okay, and do we know why that's the case in the first place?
Quoted 2 lines
For the endpoint labels, I can move the UART endpoint to the SoC DTSI,
kodiak.dtsi, asuart4_ep.Please do
Quoted 9 lines
For the PCIe endpoint, the PCIe path to the M.2 QCC2072 device is not the PCIe0 root port in
kodiak.dtsi. In the composed devicetree, it is behind the Industrial mezzanine PCIe switch, under:/soc@0/pcie@1c00000/pcie@0/pcie@0,0/pcie@2,0So placing
pcie0_port0_epinkodiak.dtsiwould not describe the actual topology.Yes, that was an omission from my side
Quoted 5 lines
I tried adding a generic label/endpoint to that downstream port in the Industrial mezzanine overlay and referencing it from the BT UART overlay. However, when the overlays are compiled separately and then composed, that label is not available while applying the BT UART overlay, so the composed DTB build fails with
FDT_ERR_NOTFOUND.I think this generic description is simply not achievable today without a bigger plan in place
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad, Dmitry,
Yes, both Industrial Kit variants need to be supported.
The default Industrial Kit uses the common Industrial mezzanine hardware description and continues to use the existing Bluetooth-over-USB path.
"Kit uses the common" what do you even mean?! The mezzanine is a physical thing, it doesn't _use_ anything! The mezzanine exists and the DeviceTree describe what it is.
Quoted 8 lines
Quoted 4 lines
The
reworked Industrial Kit variant keeps the rest of the Industrial mezzanine hardware the same, but routes Bluetooth over UART4 instead.Does "reworked mezzanine" mean what it usually does? I.e. that you have taken the mezzanine and modified it?
Hi Bjorn,
Let me clarify.
There are two physical RB3 Gen 2 Industrial mezzanine variants that need to be supported:
1. The existing RB3 Gen 2 Industrial mezzanine variant currently described in-tree, where the M.2 E-key interface routes Bluetooth over USB.
2. A reworked RB3 Gen 2 Industrial mezzanine variant, where the mezzanine board was reworked to make the existing M.2 E-key interface route Bluetooth over UART4.
The reworked variant is a physical mezzanine board variant, not a software-only configuration of the same board.
The intent of this overlay is to describe only that board-level difference while reusing the common Industrial mezzanine description for the hardware that remains unchanged.
Thanks,
Rahul
Quoted 17 lines
[..]
Quoted 4 lines
I am open to other suggestions if there is a better way to model this within the current overlay structure.
I don't think it's possible to give you other suggestions as you haven't described what this thing is, you just explaining how you're hacking something together and ask us to help adjust your hack without knowing what it is you're trying to describe with your DeviceTree.
Regards,
BjornQuoted 3 lines
Thanks,
Rahul
Bjorn Andersson
maintainerRe: [PATCH v2 6/6] arm64: dts: qcom: rb3gen2: add Industrial BT UART overlay
Quoted 109 lines · Rahul Samana
Quoted 90 lines · Bjorn Andersson
Quoted 76 lines · Rahul Samana
Quoted 73 lines · Konrad Dybcio
Quoted 11 lines · Rahul Samana
Quoted 8 lines · Konrad Dybcio
Quoted 7 lines · Rahul Samana
Quoted 4 lines · Konrad Dybcio
Quoted 3 lines · Rahul Samana
The reworked RB3 Gen 2 Industrial mezzanine keeps the common Industrial mezzanine hardware description but routes QCC2072 Bluetooth over UART4 instead of the default Bluetooth-over-USB path.
I only noticed this now - are there 2 variants of the industrial mezz being sold concurrently? Is the already-in-kernel one some sort of a prototype SKU? i.e. should we support both?
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Build this variant by applying the common Industrial mezzanine overlay first, followed by the BT UART overlay. The overlay models the M.2 E-key connector graph endpoints for PCIe and UART, and disables the on-board WCN6750 PMU and UART7 path so the M.2 QCC2072 Bluetooth controller can be used instead.
Quoted 6 lines
Quoted 2 lines
So is the onboard module disabled? Can we not just use two in parallel?
The Industrial mezzanine variants do not support the on-board WCN6750 wireless path. The common Industrial mezzanine overlay already disables the on-board Wi-Fi node.
What does 'do not support' it mean here? They are physically present as part of the SoM, so unless the lanes are somehow diverted away, why is it not?
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad,
The WCN6750 module is physically present on the SoM. What I meant is that the current Industrial mezzanine devicetree already disables the on-board Wi-Fi path, and this BT UART variant followed the same board-level policy for the on-board Bluetooth UART/PMU path.
Okay, and do we know why that's the case in the first place?
Quoted 2 lines
For the endpoint labels, I can move the UART endpoint to the SoC DTSI,
kodiak.dtsi, asuart4_ep.Please do
Quoted 9 lines
For the PCIe endpoint, the PCIe path to the M.2 QCC2072 device is not the PCIe0 root port in
kodiak.dtsi. In the composed devicetree, it is behind the Industrial mezzanine PCIe switch, under:/soc@0/pcie@1c00000/pcie@0/pcie@0,0/pcie@2,0So placing
pcie0_port0_epinkodiak.dtsiwould not describe the actual topology.Yes, that was an omission from my side
Quoted 5 lines
I tried adding a generic label/endpoint to that downstream port in the Industrial mezzanine overlay and referencing it from the BT UART overlay. However, when the overlays are compiled separately and then composed, that label is not available while applying the BT UART overlay, so the composed DTB build fails with
FDT_ERR_NOTFOUND.I think this generic description is simply not achievable today without a bigger plan in place
Quoted 8 lines
Quoted 1 line
Konrad
Hi Konrad, Dmitry,
Yes, both Industrial Kit variants need to be supported.
The default Industrial Kit uses the common Industrial mezzanine hardware description and continues to use the existing Bluetooth-over-USB path.
"Kit uses the common" what do you even mean?! The mezzanine is a physical thing, it doesn't _use_ anything! The mezzanine exists and the DeviceTree describe what it is.
Quoted 8 lines
Quoted 4 lines
The
reworked Industrial Kit variant keeps the rest of the Industrial mezzanine hardware the same, but routes Bluetooth over UART4 instead.Does "reworked mezzanine" mean what it usually does? I.e. that you have taken the mezzanine and modified it?
Hi Bjorn,
Let me clarify.
There are two physical RB3 Gen 2 Industrial mezzanine variants that need to be supported:
Quoted 8 lines
1. The existing RB3 Gen 2 Industrial mezzanine variant currently described in-tree, where the M.2 E-key interface routes Bluetooth over USB.
2. A reworked RB3 Gen 2 Industrial mezzanine variant, where the mezzanine board was reworked to make the existing M.2 E-key interface route Bluetooth over UART4.
Reworked as in: "there exist a dozen such boards in the world" or is this an actually supported configuration that can be purchased?
The fact that you call this mezzanine "the BT-UART mezzanine" forces me to assume that this isn't an actual product, prove me wrong please.
Quoted 3 lines
The reworked variant is a physical mezzanine board variant, not a software-only configuration of the same board.
That's obvious.
Quoted 4 lines
The intent of this overlay is to describe only that board-level difference while reusing the common Industrial mezzanine description for the hardware that remains unchanged.
But then you need to clearly describe what the difference between the two boards is and model that in a clear way.
Regards,
Bjorn
Quoted 22 lines
Thanks,
RahulQuoted 17 lines
[..]
Quoted 4 lines
I am open to other suggestions if there is a better way to model this within the current overlay structure.
I don't think it's possible to give you other suggestions as you haven't described what this thing is, you just explaining how you're hacking something together and ask us to help adjust your hack without knowing what it is you're trying to describe with your DeviceTree.
Regards,
BjornQuoted 3 lines
Thanks,
Rahul