Skip to contentSkip to conversation

wifi: wcn36xx: add support for WCN3610

PATCH In review Kerigan Creighton 3 participants 5 messages Mar 4

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 wifi: wcn36xx: add support for WCN3610

The WCN3610 is a 2.4GHz-only WLAN/BLE combo chip used in some cheaper Android and Windows phones such as the Lumia 550, and IoT devices like the Anki Vector robot. It shares a lot in common with the WCN3620.

Tested on an Anki Vector 1.0 and 2.0 robot. Support for other WCN36xx chips has not been affected.

The WCN3610 requires specific BTC configuration values for stable Wi-Fi. Without these values, there's some packet loss. An extra CFG table was made so other chips are not affected.

STA_POWERSAVE causes firmware bugs (long hangs) with the WCN3610, thus it has been disabled just for this chip.

---
 drivers/net/wireless/ath/wcn36xx/main.c    |  4 +-
 drivers/net/wireless/ath/wcn36xx/smd.c     | 70 +++++++++++++++++++++-
 drivers/net/wireless/ath/wcn36xx/wcn36xx.h |  1 +
 3 files changed, 73 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/wcn36xx/main.c +3 -1
index c3f0860873..6c90c13251 100644
@@ -1438,7 +1438,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 		BIT(NL80211_IFTYPE_MESH_POINT);
 
 	wcn->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wcn_band_2ghz;
-	if (wcn->rf_id != RF_IRIS_WCN3620)
+	if (wcn->rf_id != RF_IRIS_WCN3620 && wcn->rf_id != RF_IRIS_WCN3610)
 		wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz;
 
 	if (wcn->rf_id == RF_IRIS_WCN3680)
@@ -1535,6 +1535,8 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
 	/* External RF module */
 	iris_node = of_get_child_by_name(mmio_node, "iris");
 	if (iris_node) {
+		if (of_device_is_compatible(iris_node, "qcom,wcn3610"))
+			wcn->rf_id = RF_IRIS_WCN3610;
 		if (of_device_is_compatible(iris_node, "qcom,wcn3620"))
 			wcn->rf_id = RF_IRIS_WCN3620;
 		if (of_device_is_compatible(iris_node, "qcom,wcn3660") ||
drivers/net/wireless/ath/wcn36xx/smd.c +69 -1

88 lines not on this page · raw message

drivers/net/wireless/ath/wcn36xx/wcn36xx.h +1 -0
index 7ee79593cd..cb409d48f7 100644
@@ -96,6 +96,7 @@ enum wcn36xx_ampdu_state {
 #define WCN36XX_MAX_POWER(__wcn) (__wcn->hw->conf.chandef.chan->max_power)
 
 #define RF_UNKNOWN	0x0000
+#define RF_IRIS_WCN3610	0x3610
 #define RF_IRIS_WCN3620	0x3620
 #define RF_IRIS_WCN3660	0x3660
 #define RF_IRIS_WCN3680	0x3680
Signature · 1 line
2.53.0
#1 lore raw

PATCH 2/3 remoteproc: qcom_wcnss_iris: add support for WCN3610

Add a qcom,wcn3610 compatible string.
The WCN3610 shares the same register configuration as the WCN3620, so its configuration is being reused.

---
 drivers/remoteproc/qcom_wcnss_iris.c | 1 +
 1 file changed, 1 insertion(+)
drivers/remoteproc/qcom_wcnss_iris.c +1 -0
index 2b89b4db6c..e58b59355f 100644
@@ -95,6 +95,7 @@ void qcom_iris_disable(struct qcom_iris *iris)
 }
 
 static const struct of_device_id iris_of_match[] = {
+	{ .compatible = "qcom,wcn3610", .data = &wcn3620_data },
 	{ .compatible = "qcom,wcn3620", .data = &wcn3620_data },
 	{ .compatible = "qcom,wcn3660", .data = &wcn3660_data },
 	{ .compatible = "qcom,wcn3660b", .data = &wcn3680_data },
Signature · 1 line
2.53.0
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] remoteproc: qcom_wcnss_iris: add support for WCN3610

Quoted 9 lines · Kerigan Creighton

Add a qcom,wcn3610 compatible string.
The WCN3610 shares the same register configuration as the WCN3620, so its configuration is being reused.

---
 drivers/remoteproc/qcom_wcnss_iris.c | 1 +
 1 file changed, 1 insertion(+)
Signature · 2 lines
With best wishes
Dmitry
#3 lore raw

PATCH 3/3 dt-bindings: remoteproc: qcom,wcnss-pil: add WCN3610 compatible

In reply to Kerigan Creighton

Document the qcom,wcn3610 compatible string for use with the qcom_wcnss_iris remoteproc driver.

---
 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml +1 -0
index 117fb4d0c4..018cdf5177 100644
@@ -109,6 +109,7 @@ properties:
     properties:
       compatible:
         enum:
+          - qcom,wcn3610
           - qcom,wcn3620
           - qcom,wcn3660
           - qcom,wcn3660b
Signature · 1 line
2.53.0
#4 lore raw

Re: [PATCH 3/3] dt-bindings: remoteproc: qcom,wcnss-pil: add WCN3610 compatible

Quoted 4 lines · Kerigan Creighton

Document the qcom,wcn3610 compatible string for use with the qcom_wcnss_iris remoteproc driver.

https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html

"The Documentation/ portion of the patch should come in the series before the code implementing the binding."

Also ideally for any multi-patch series there should be a cover letter.