Skip to contentSkip to conversation

arm64: dts: qcom: sc8280xp-x13s: add wifi calibration variant

PATCH Superseded Johan Hovold 6 participants 21 messages Mar 20, 2023 – Mar 22, 2023

Subsystems (7)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#11 lore raw

PATCH 2/3 arm64: dts: qcom: sc8280xp-x13s: add wifi calibration variant

In reply to Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +17 -0
index 150f51f1db37..0051025e0aa8 100644
@@ -711,6 +711,23 @@ &pcie4 {
 	pinctrl-0 = <&pcie4_default>;
 
 	status = "okay";
+
+	pcie@0 {
+		device_type = "pci";
+		reg = <0x0 0x0 0x0 0x0 0x0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		bus-range = <0x01 0xff>;
+
+		wifi@0 {
+			compatible = "pci17cb,1103";
+			reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+			qcom,ath11k-calibration-variant = "LE_X13S";
+		};
+	};
 };
 
 &pcie4_phy {
Signature · 1 line
2.39.2
#14 lore raw

PATCH 3/3 arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

In reply to Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +17 -0
index 90a5df9c7a24..5dfda12f669b 100644
@@ -579,6 +579,23 @@ &pcie4 {
 	pinctrl-0 = <&pcie4_default>;
 
 	status = "okay";
+
+	pcie@0 {
+		device_type = "pci";
+		reg = <0x0 0x0 0x0 0x0 0x0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		bus-range = <0x01 0xff>;
+
+		wifi@0 {
+			compatible = "pci17cb,1103";
+			reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+			qcom,ath11k-calibration-variant = "LE_X13S";
+		};
+	};
 };
 
 &pcie4_phy {
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/3 dt-bindings: wireless: add ath11k pcie bindings

In reply to Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +56 -0
new file mode 100644
index 000000000000..df67013822c6
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2023 Linaro Limited
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/pci17cb,1103.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies ath11k wireless devices (PCIe)
+
+maintainers:
+  - Kalle Valo <[email protected]>
+
+description: |
+  Qualcomm Technologies IEEE 802.11ax PCIe devices.
+
+properties:
+  compatible:
+    enum:
+      - pci17cb,1103  # WCN6856
+
+  reg:
+    maxItems: 1
+
+  qcom,ath11k-calibration-variant:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: calibration data variant
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    pcie {
+        #address-cells = <3>;
+        #size-cells = <2>;
+
+        pcie@0 {
+            device_type = "pci";
+            reg = <0x0 0x0 0x0 0x0 0x0>;
+            #address-cells = <3>;
+            #size-cells = <2>;
+            ranges;
+
+            bus-range = <0x01 0xff>;
+
+            wifi@0 {
+                compatible = "pci17cb,1103";
+                reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+                qcom,ath11k-calibration-variant = "LE_X13S";
+            };
+        };
+    };
Signature · 1 line
2.39.2
#0 lore raw

cover arm64: dts: qcom: sc8280xp-x13s: add wifi calibration variant

This series adds the missing calibration variant devicetree property which is needed to load the (just released) calibration data and use the ath11k wifi on the X13s and sc8280xp-crd.

Kalle, do you want to take the binding through your tree or should Bjorn take it all through the Qualcomm tree?

Johan

Johan Hovold (3):
dt-bindings: wireless: add ath11k pcie bindings
arm64: dts: qcom: sc8280xp-x13s: add wifi calibration variant
arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts     | 17 ++++++
 .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts    | 17 ++++++
 3 files changed, 90 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml
Signature · 1 line
2.39.2
#15 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

In reply to Johan Hovold

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Quoted 13 lines · Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +0 -1
index 90a5df9c7a24..5dfda12f669b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Was mixing

Quoted 1 line

+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

this /\

[...]

and this \/

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts &pcie4 { · line 596

Quoted 1 line
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1 -0
+			qcom,ath11k-calibration-variant = "LE_X13S";

Intentional? Especially given Kalle's comment on bugzilla?

Konrad

Quoted 5 lines
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +2 -0
+		};
+	};
 };
 
 &pcie4_phy {
#16 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

Quoted 23 lines · Konrad Dybcio

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Quoted 13 lines · Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +0 -1
index 90a5df9c7a24..5dfda12f669b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Was mixing

Quoted 1 line

+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

this /\

Quoted 5 lines

[...]

and this \/

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts &pcie4 { · line 596

Quoted 1 line
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1 -0
+			qcom,ath11k-calibration-variant = "LE_X13S";

Intentional? Especially given Kalle's comment on bugzilla?

Yes, it is intentional. The corresponding calibration data allows the wifi to be used on the CRD. I measure 150 MBits/s which may a bit lower than expected, but it's better than having no wifi at all.

Johan

Reviewed-by
#17 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

Quoted 26 lines · Johan Hovold
Quoted 25 lines · Konrad Dybcio

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Quoted 13 lines · Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +0 -1
index 90a5df9c7a24..5dfda12f669b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Was mixing

Quoted 1 line

+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

this /\

[...]

Quoted 7 lines
Quoted 3 lines

and this \/

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts &pcie4 { · line 596

Quoted 1 line
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1 -0
+			qcom,ath11k-calibration-variant = "LE_X13S";

Intentional? Especially given Kalle's comment on bugzilla?

Yes, it is intentional. The corresponding calibration data allows the wifi to be used on the CRD. I measure 150 MBits/s which may a bit lower than expected, but it's better than having no wifi at all.

OK, sounds great!

Konrad

Quoted 2 lines

Johan

Reviewed-by on v1 2/3
#12 lore raw
In reply to Johan Hovold
Quoted 7 lines · Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---

Konrad

Quoted 31 lines
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +17 -0
index 150f51f1db37..0051025e0aa8 100644
@@ -711,6 +711,23 @@ &pcie4 {
 	pinctrl-0 = <&pcie4_default>;
 
 	status = "okay";
+
+	pcie@0 {
+		device_type = "pci";
+		reg = <0x0 0x0 0x0 0x0 0x0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		bus-range = <0x01 0xff>;
+
+		wifi@0 {
+			compatible = "pci17cb,1103";
+			reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+			qcom,ath11k-calibration-variant = "LE_X13S";
+		};
+	};
 };
 
 &pcie4_phy {
#18 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

In reply to Johan Hovold
Quoted 26 lines · Johan Hovold
Quoted 25 lines · Konrad Dybcio

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Quoted 13 lines · Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +0 -1
index 90a5df9c7a24..5dfda12f669b 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Was mixing

Quoted 1 line

+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

this /\

[...]

Quoted 7 lines
Quoted 3 lines

and this \/

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts &pcie4 { · line 596

Quoted 1 line
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1 -0
+			qcom,ath11k-calibration-variant = "LE_X13S";

Intentional? Especially given Kalle's comment on bugzilla?

Yes, it is intentional. The corresponding calibration data allows the wifi to be used on the CRD. I measure 150 MBits/s which may a bit lower than expected, but it's better than having no wifi at all.

I was going back and forth about mentioning this in the commit message and we could off on this one until someone confirms that the corresponding calibration data can (or should) be used for the X13s.

Note that there is no other match for

	'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=140'

in the new board-2.bin.

Johan

Tested-by on v1 2/3
#13 lore raw
In reply to Johan Hovold
Quoted 40 lines · Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +17 -1
index 150f51f1db37..0051025e0aa8 100644
@@ -711,6 +711,23 @@ &pcie4 {
        pinctrl-0 = <&pcie4_default>;
 
        status = "okay";
+
+       pcie@0 {
+               device_type = "pci";
+               reg = <0x0 0x0 0x0 0x0 0x0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               ranges;
+
+               bus-range = <0x01 0xff>;
+
+               wifi@0 {
+                       compatible = "pci17cb,1103";
+                       reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+                       qcom,ath11k-calibration-variant = "LE_X13S";
+               };
+       };
 };
 
 &pcie4_phy {
--
Quoted 2 lines

2.39.2

So glad to finally see this and confirm that it works!

#19 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

In reply to Johan Hovold
Quoted 41 lines · Johan Hovold
Quoted 27 lines · Johan Hovold
Quoted 26 lines · Konrad Dybcio
Quoted 13 lines · Johan Hovold

Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded.

---
 arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +0 -0
index 90a5df9c7a24..5dfda12f669b 100644

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Quoted 1 line
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +0 -1
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

Was mixing

Quoted 1 line

+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts

this /\

[...]

Quoted 7 lines
Quoted 3 lines

and this \/

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts &pcie4 { · line 596

Quoted 1 line
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1 -0
+			qcom,ath11k-calibration-variant = "LE_X13S";

Intentional? Especially given Kalle's comment on bugzilla?

Yes, it is intentional. The corresponding calibration data allows the wifi to be used on the CRD. I measure 150 MBits/s which may a bit lower than expected, but it's better than having no wifi at all.

I was going back and forth about mentioning this in the commit message and we could off on this one until someone confirms that the corresponding calibration data can (or should) be used for the X13s.

Quoted 5 lines

Note that there is no other match for

	'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=140'

in the new board-2.bin.

If the device in question is something else than Lenovo X13s, I would prefer that the variant is not set. Just in case we need different board files for different models. It's easy to add aliases to board-2.bin.

I need to check internally what board file should be used for this CRD. If the speed is only 150 Mbit/s I suspect it needs a different board file.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

In reply to Johan Hovold
Quoted 8 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

I'm confused (as usual), how does this differ from bindings/net/wireless/qcom,ath11k.yaml? Why we need two .yaml files?

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#20 lore raw

Re: [PATCH 3/3] arm64: dts: qcom: sc8280xp-crd: add wifi calibration variant

In reply to Kalle Valo
Quoted 5 lines · Kalle Valo
Quoted 3 lines · Johan Hovold
Quoted 3 lines
Quoted 2 lines

arch/arm64/boot/dts/qcom/sc8280xp-crd.dts &pcie4 { · line 596

Quoted 1 line
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +1 -0
+			qcom,ath11k-calibration-variant = "LE_X13S";

Intentional? Especially given Kalle's comment on bugzilla?

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

Yes, it is intentional. The corresponding calibration data allows the wifi to be used on the CRD. I measure 150 MBits/s which may a bit lower than expected, but it's better than having no wifi at all.

I was going back and forth about mentioning this in the commit message and we could off on this one until someone confirms that the corresponding calibration data can (or should) be used for the X13s.

Hopefully clear from context, but that was supposed to say "CRD" and not "X13s"...

Quoted 9 lines
Quoted 5 lines

Note that there is no other match for

	'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=140'

in the new board-2.bin.

If the device in question is something else than Lenovo X13s, I would prefer that the variant is not set. Just in case we need different board files for different models. It's easy to add aliases to board-2.bin.

The sc8280xp CRD is the Qualcomm "compute" reference design for this platform and is very similar to the X13s but they are not identical.

For ath11k and wcn6855, the CRD I have reports a chip_id of 2 and "hw2.0", while the X13s reports chip_id 18 and "hw2.1".

The new board-2.bin notably adds two entries that match these chip_ids but with the variant specified as "LE_X13S" for both.

Quoted 3 lines

I need to check internally what board file should be used for this CRD. If the speed is only 150 Mbit/s I suspect it needs a different board file.

Sounds good. Let's drop this one for now then.

Johan

#3 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

In reply to Kalle Valo
Quoted 5 lines · Kalle Valo
Quoted 3 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

Quoted 8 lines
Quoted 5 lines
---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

I'm confused (as usual), how does this differ from bindings/net/wireless/qcom,ath11k.yaml? Why we need two .yaml files?

Almost none of bindings/net/wireless/qcom,ath11k.yaml applies to WCN6856 when using PCIe (e.g. as most properties are then discoverable).

We could try to encode everything in one file, but that would likely just result in a big mess of a schema with conditionals all over.

Johan

#4 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

+ ath11k list

Quoted 13 lines · Johan Hovold
Quoted 12 lines · Kalle Valo
Quoted 9 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

Quoted 8 lines
Quoted 2 lines

I'm confused (as usual), how does this differ from bindings/net/wireless/qcom,ath11k.yaml? Why we need two .yaml files?

Almost none of bindings/net/wireless/qcom,ath11k.yaml applies to WCN6856 when using PCIe (e.g. as most properties are then discoverable).

We could try to encode everything in one file, but that would likely just result in a big mess of a schema with conditionals all over.

Ah, so the current qcom,ath11k.yaml would be only for ath11k AHB devices and this new file is only for ath11k PCI devices? But why still the odd name pci17cb,1103.yaml? It's not really descriptive and I'm for sure will not remember that pci17cb,1103.yaml is for ath11k :)

Also it doesn't look good that we have qcom,ath11k-calibration-variant documented twice now. I'm no DT expert but isn't there any other way? Is it possible to include other files? For example, if we would have three files:

qcom,ath11k.yaml
qcom,ath11k-ahb.yaml
qcom,ath11k-pci.yaml

Then have the common properties like ath11k-calibration-variant in the first file and ahb/pci files would include that.

Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#7 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

In reply to Johan Hovold

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

Quoted 14 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +0 -0
new file mode 100644
index 000000000000..df67013822c6

PCI devices are kind of exception in the naming, so this should be qcom,ath11k-pci.yaml or qcom,wcn6856.yaml (or something similar)

Quoted 15 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +14 -0
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2023 Linaro Limited
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/pci17cb,1103.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies ath11k wireless devices (PCIe)
+
+maintainers:
+  - Kalle Valo <[email protected]>
+
+description: |
+  Qualcomm Technologies IEEE 802.11ax PCIe devices.

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml line 24

Quoted 10 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +10 -0
+
+properties:
+  compatible:
+    enum:
+      - pci17cb,1103  # WCN6856
+
+  reg:
+    maxItems: 1
+
+  qcom,ath11k-calibration-variant:

qcom,calibration-variant

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml line 26

Quoted 2 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +2 -0
+    $ref: /schemas/types.yaml#/definitions/string
+    description: calibration data variant

Your description copies the name of property. Instead say something more...

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml line 27

Quoted 1 line
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +1 -0
+

Best regards,
Krzysztof

#8 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

Quoted 39 lines · Krzysztof Kozlowski

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

Quoted 14 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +0 -0
new file mode 100644
index 000000000000..df67013822c6

PCI devices are kind of exception in the naming, so this should be qcom,ath11k-pci.yaml or qcom,wcn6856.yaml (or something similar)

Quoted 19 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +18 -0
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2023 Linaro Limited
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/pci17cb,1103.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies ath11k wireless devices (PCIe)
+
+maintainers:
+  - Kalle Valo <[email protected]>
+
+description: |
+  Qualcomm Technologies IEEE 802.11ax PCIe devices.
+
+properties:
+  compatible:
+    enum:
Quoted 8 lines

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml line 24

Quoted 6 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +6 -0
+      - pci17cb,1103  # WCN6856
+
+  reg:
+    maxItems: 1
+
+  qcom,ath11k-calibration-variant:

qcom,calibration-variant

Ah, so there is already property with ath11k, then let's go with existing name.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

In reply to Kalle Valo
Quoted 20 lines · Kalle Valo

+ ath11k list

Quoted 16 lines · Johan Hovold
Quoted 14 lines · Kalle Valo
Quoted 9 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

I'm confused (as usual), how does this differ from bindings/net/wireless/qcom,ath11k.yaml? Why we need two .yaml files?

Quoted 8 lines
Quoted 5 lines

Almost none of bindings/net/wireless/qcom,ath11k.yaml applies to WCN6856 when using PCIe (e.g. as most properties are then discoverable).

We could try to encode everything in one file, but that would likely just result in a big mess of a schema with conditionals all over.

Ah, so the current qcom,ath11k.yaml would be only for ath11k AHB devices and this new file is only for ath11k PCI devices?

Right, there would two separate schema files for the two device classes.

Quoted 3 lines

But why still the odd
name pci17cb,1103.yaml? It's not really descriptive and I'm for sure will not remember that pci17cb,1103.yaml is for ath11k :)

Yeah, it's not the best name from that perspective, but it follows the current convention of naming the schema files after the first compatible added.

That said, we don't have many schemas for PCI devices so perhaps we can establish a new convention for those. Perhaps by replacing the numerical ids with what we'd use if these were platform devices (e.g. 'qcom,wcn6855.yaml').

As long as the DT maintainers are OK with it, I'd also be happy with something like you suggest below:

qcom,ath11k-ahb.yaml
qcom,ath11k-pci.yaml

(or simply not renaming the current file 'qcom,ath11k.yaml') but I have gotten push back on that in the past.

Quoted 11 lines

Also it doesn't look good that we have qcom,ath11k-calibration-variant documented twice now. I'm no DT expert but isn't there any other way? Is it possible to include other files? For example, if we would have three files:

qcom,ath11k.yaml
qcom,ath11k-ahb.yaml
qcom,ath11k-pci.yaml

Then have the common properties like ath11k-calibration-variant in the first file and ahb/pci files would include that.

That should be possible, but it's not necessarily better as you'd then have to look up two files to see the bindings for either device class (and as far as I can tell there would not be much sharing beyond this single property).

Note that the property could just have well have been named 'qcom,calibration-variant' and then it would be shared also with the ath10k set of devices which currently holds another definition of what is essentially the same property ('qcom,ath10k-calibration-variant').

Johan

Signature · 3 lines
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#9 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

In reply to Krzysztof Kozlowski
Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml
Quoted 8 lines

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

Quoted 5 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +0 -0
new file mode 100644
index 000000000000..df67013822c6

PCI devices are kind of exception in the naming, so this should be qcom,ath11k-pci.yaml or qcom,wcn6856.yaml (or something similar)

Heh, I suggested something similar in my reply to Kalle. Let's go with 'qcom,ath11k-pci.yaml' then as he first suggested (and keeping the current schema file unchanged?).

Quoted 19 lines
Quoted 19 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +18 -0
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2023 Linaro Limited
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/pci17cb,1103.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies ath11k wireless devices (PCIe)
+
+maintainers:
+  - Kalle Valo <[email protected]>
+
+description: |
+  Qualcomm Technologies IEEE 802.11ax PCIe devices.
+
+properties:
+  compatible:
+    enum:
Quoted 8 lines

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml line 24

Quoted 6 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +6 -0
+      - pci17cb,1103  # WCN6856
+
+  reg:
+    maxItems: 1
+
+  qcom,ath11k-calibration-variant:

qcom,calibration-variant

This one is already in use as you noticed.

Quoted 4 lines

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml line 26

Quoted 2 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +2 -0
+    $ref: /schemas/types.yaml#/definitions/string
+    description: calibration data variant

Your description copies the name of property. Instead say something more...

Yeah, I was actively avoiding trying to say too much (e.g. mentioning the name of the current firmware file). See the definition in qcom,ath11k.yaml.

I can try to find some middle ground unless you prefer copying the current definition.

Johan

#10 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

Quoted 4 lines · Johan Hovold
Quoted 4 lines
Quoted 3 lines
Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml new file +2 -0
+    $ref: /schemas/types.yaml#/definitions/string
+    description: calibration data variant
Quoted 8 lines
Quoted 1 line

Your description copies the name of property. Instead say something more...

Yeah, I was actively avoiding trying to say too much (e.g. mentioning the name of the current firmware file). See the definition in qcom,ath11k.yaml.

I can try to find some middle ground unless you prefer copying the current definition.

So just copy the description or its parts.

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH 1/3] dt-bindings: wireless: add ath11k pcie bindings

In reply to Johan Hovold
Quoted 46 lines · Johan Hovold
Quoted 20 lines · Kalle Valo

+ ath11k list

Quoted 16 lines · Johan Hovold
Quoted 14 lines · Kalle Valo
Quoted 9 lines · Johan Hovold

Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6856 for which the calibration data variant may need to be described.

---
 .../bindings/net/wireless/pci17cb,1103.yaml   | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/wireless/pci17cb,1103.yaml

I'm confused (as usual), how does this differ from bindings/net/wireless/qcom,ath11k.yaml? Why we need two .yaml files?

Quoted 8 lines
Quoted 5 lines

Almost none of bindings/net/wireless/qcom,ath11k.yaml applies to WCN6856 when using PCIe (e.g. as most properties are then discoverable).

We could try to encode everything in one file, but that would likely just result in a big mess of a schema with conditionals all over.

Ah, so the current qcom,ath11k.yaml would be only for ath11k AHB devices and this new file is only for ath11k PCI devices?

Right, there would two separate schema files for the two device classes.

Quoted 3 lines

But why still the odd
name pci17cb,1103.yaml? It's not really descriptive and I'm for sure will not remember that pci17cb,1103.yaml is for ath11k :)

Yeah, it's not the best name from that perspective, but it follows the current convention of naming the schema files after the first compatible added.

That said, we don't have many schemas for PCI devices so perhaps we can establish a new convention for those. Perhaps by replacing the numerical ids with what we'd use if these were platform devices (e.g. 'qcom,wcn6855.yaml').

Quoted 8 lines

As long as the DT maintainers are OK with it, I'd also be happy with something like you suggest below:

qcom,ath11k-ahb.yaml
qcom,ath11k-pci.yaml

(or simply not renaming the current file 'qcom,ath11k.yaml') but I have gotten push back on that in the past.

Ok, maybe it's then better not to try renaming qcom,ath11k.yaml and keep it as is.

Quoted 17 lines
Quoted 11 lines

Also it doesn't look good that we have qcom,ath11k-calibration-variant documented twice now. I'm no DT expert but isn't there any other way? Is it possible to include other files? For example, if we would have three files:

qcom,ath11k.yaml
qcom,ath11k-ahb.yaml
qcom,ath11k-pci.yaml

Then have the common properties like ath11k-calibration-variant in the first file and ahb/pci files would include that.

That should be possible, but it's not necessarily better as you'd then have to look up two files to see the bindings for either device class (and as far as I can tell there would not be much sharing beyond this single property).

Quoted 4 lines

Note that the property could just have well have been named 'qcom,calibration-variant' and then it would be shared also with the ath10k set of devices which currently holds another definition of what is essentially the same property ('qcom,ath10k-calibration-variant').

Oh man, having it as 'qcom,calibration-variant' would have been so much better. Oh well, too late now :(

Thanks for explaining all this.

Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k