mbox series

[0/4] Add WCN3680B WiFi/Bluetooth and enable it on Fairphone 3

Message ID 20231015-fp3-wcnss-v1-0-1b311335e931@z3ntu.xyz
Headers show
Series Add WCN3680B WiFi/Bluetooth and enable it on Fairphone 3 | expand

Message

Luca Weiss Oct. 15, 2023, 8:03 p.m. UTC
Add a new compatible for the WCN3680B found together with some Qualcomm
SoCs. And enable this WiFi/Bluetooth combo on Fairphone 3 smartphone.

Worth noting that I'm pretty sure some phones already in mainline do
have this WCN3680B chip enabled but are using a different compatible,
e.g. qcom,wcn3680 (without the b suffix).

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
Luca Weiss (4):
      dt-bindings: remoteproc: qcom: wcnss: Add WCN3680B compatible
      remoteproc: qcom_wcnss: Add WCN3680B compatible
      wifi: wcn36xx: Add check for WCN3680B
      arm64: dts: qcom: sdm632-fairphone-fp3: Enable WiFi/Bluetooth

 .../devicetree/bindings/remoteproc/qcom,wcnss-pil.yaml    |  1 +
 arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts         | 15 +++++++++++++++
 drivers/net/wireless/ath/wcn36xx/main.c                   |  3 ++-
 drivers/remoteproc/qcom_wcnss_iris.c                      |  1 +
 4 files changed, 19 insertions(+), 1 deletion(-)
---
base-commit: 09eda82818c490a6fb24f1374bd704ea5c3b577a
change-id: 20231015-fp3-wcnss-23e83b8235f5

Best regards,

Comments

Krzysztof Kozlowski Oct. 16, 2023, 5:35 a.m. UTC | #1
On 15/10/2023 22:03, Luca Weiss wrote:
> Add a compatible for the WCN3680B chip used with some Qualcomm SoCs.
> 
> It shares the same regulator setup as WCN3680, so we can reuse the
> driver data for that.
> 
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
>  drivers/remoteproc/qcom_wcnss_iris.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/remoteproc/qcom_wcnss_iris.c b/drivers/remoteproc/qcom_wcnss_iris.c
> index dd36fd077911..22acc609105f 100644
> --- a/drivers/remoteproc/qcom_wcnss_iris.c
> +++ b/drivers/remoteproc/qcom_wcnss_iris.c
> @@ -99,6 +99,7 @@ static const struct of_device_id iris_of_match[] = {
>  	{ .compatible = "qcom,wcn3660", .data = &wcn3660_data },
>  	{ .compatible = "qcom,wcn3660b", .data = &wcn3680_data },
>  	{ .compatible = "qcom,wcn3680", .data = &wcn3680_data },
> +	{ .compatible = "qcom,wcn3680b", .data = &wcn3680_data },

Just make devices compatible and no need for this driver change.

Best regards,
Krzysztof
Krzysztof Kozlowski Oct. 16, 2023, 5:36 a.m. UTC | #2
On 15/10/2023 22:03, Luca Weiss wrote:
> Add a check for the WCN3680B compatible next to the WCN3680 compatible.
> 
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
>  drivers/net/wireless/ath/wcn36xx/main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index 2bd1163177f0..74b0b7074760 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -1535,7 +1535,8 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
>  		if (of_device_is_compatible(iris_node, "qcom,wcn3660") ||
>  		    of_device_is_compatible(iris_node, "qcom,wcn3660b"))
>  			wcn->rf_id = RF_IRIS_WCN3660;
> -		if (of_device_is_compatible(iris_node, "qcom,wcn3680"))
> +		if (of_device_is_compatible(iris_node, "qcom,wcn3680") ||
> +		    of_device_is_compatible(iris_node, "qcom,wcn3680b"))

Same comment

Best regards,
Krzysztof
Konrad Dybcio Oct. 17, 2023, 4:28 p.m. UTC | #3
On 10/16/23 07:35, Krzysztof Kozlowski wrote:
> On 15/10/2023 22:03, Luca Weiss wrote:
>> Add a compatible for the WCN3680B chip used with some Qualcomm SoCs.
>>
>> It shares the same regulator setup as WCN3680, so we can reuse the
>> driver data for that.
>>
>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
>> ---
>>   drivers/remoteproc/qcom_wcnss_iris.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/remoteproc/qcom_wcnss_iris.c b/drivers/remoteproc/qcom_wcnss_iris.c
>> index dd36fd077911..22acc609105f 100644
>> --- a/drivers/remoteproc/qcom_wcnss_iris.c
>> +++ b/drivers/remoteproc/qcom_wcnss_iris.c
>> @@ -99,6 +99,7 @@ static const struct of_device_id iris_of_match[] = {
>>   	{ .compatible = "qcom,wcn3660", .data = &wcn3660_data },
>>   	{ .compatible = "qcom,wcn3660b", .data = &wcn3680_data },
>>   	{ .compatible = "qcom,wcn3680", .data = &wcn3680_data },
>> +	{ .compatible = "qcom,wcn3680b", .data = &wcn3680_data },
> 
> Just make devices compatible and no need for this driver change.
Or reconsider given <ZS1MTAHq6GLW6RAK@gerhold.net>

Konrad