mbox series

[v2,0/4] Add WCN3988 Bluetooth support for Fairphone 4

Message ID 20230421-fp4-bluetooth-v2-0-3de840d5483e@fairphone.com
Headers show
Series Add WCN3988 Bluetooth support for Fairphone 4 | expand

Message

Luca Weiss May 12, 2023, 1:58 p.m. UTC
Add support in the btqca/hci_qca driver for the WCN3988 and add it to
the sm7225 Fairphone 4 devicetree.

Devicetree patches go via Qualcomm tree, the rest via their respective
trees.

--
Previously with the RFC version I've had problems before with Bluetooth
scanning failing like the following:

  [bluetooth]# scan on
  Failed to start discovery: org.bluez.Error.InProgress

  [  202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16

This appears to only happen with driver built-in (=y) when the supported
local commands list doesn't get updated in the Bluetooth core and
use_ext_scan() returning false. I'll try to submit this separately since
this now works well enough with =m. But in both cases (=y, =m) it's
behaving a bit weirdly before (re-)setting the MAC address with "sudo
btmgmt public-addr fo:oo:ba:ar"

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes in v2:
- Add pinctrl & 'tlmm 64' irq to uart node
- Pick up tags
- Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com

---
Luca Weiss (4):
      dt-bindings: net: qualcomm: Add WCN3988
      Bluetooth: btqca: Add WCN3988 support
      arm64: dts: qcom: sm6350: add uart1 node
      arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth

 .../bindings/net/bluetooth/qualcomm-bluetooth.yaml |   2 +
 arch/arm64/boot/dts/qcom/sm6350.dtsi               |  63 +++++++++++++
 arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts  | 103 +++++++++++++++++++++
 drivers/bluetooth/btqca.c                          |  13 ++-
 drivers/bluetooth/btqca.h                          |  12 ++-
 drivers/bluetooth/hci_qca.c                        |  12 +++
 6 files changed, 201 insertions(+), 4 deletions(-)
---
base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
change-id: 20230421-fp4-bluetooth-b36a0e87b9c8

Best regards,

Comments

Luca Weiss May 15, 2023, 6:12 a.m. UTC | #1
On Fri May 12, 2023 at 10:53 PM CEST, Luiz Augusto von Dentz wrote:
> Hi Luca,
>
> On Fri, May 12, 2023 at 6:58 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
> >
> > Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> > the sm7225 Fairphone 4 devicetree.
> >
> > Devicetree patches go via Qualcomm tree, the rest via their respective
> > trees.
>
> Just to be sure, patches 1-2 shall be applied to bluetooth-next the
> remaining are going to be handled elsewhere?

Sounds good.

>
> > --
> > Previously with the RFC version I've had problems before with Bluetooth
> > scanning failing like the following:
> >
> >   [bluetooth]# scan on
> >   Failed to start discovery: org.bluez.Error.InProgress
> >
> >   [  202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
> >
> > This appears to only happen with driver built-in (=y) when the supported
> > local commands list doesn't get updated in the Bluetooth core and
> > use_ext_scan() returning false. I'll try to submit this separately since
> > this now works well enough with =m. But in both cases (=y, =m) it's
> > behaving a bit weirdly before (re-)setting the MAC address with "sudo
> > btmgmt public-addr fo:oo:ba:ar"
> >
> > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > ---
> > Changes in v2:
> > - Add pinctrl & 'tlmm 64' irq to uart node
> > - Pick up tags
> > - Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
> >
> > ---
> > Luca Weiss (4):
> >       dt-bindings: net: qualcomm: Add WCN3988
> >       Bluetooth: btqca: Add WCN3988 support
> >       arm64: dts: qcom: sm6350: add uart1 node
> >       arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
> >
> >  .../bindings/net/bluetooth/qualcomm-bluetooth.yaml |   2 +
> >  arch/arm64/boot/dts/qcom/sm6350.dtsi               |  63 +++++++++++++
> >  arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts  | 103 +++++++++++++++++++++
> >  drivers/bluetooth/btqca.c                          |  13 ++-
> >  drivers/bluetooth/btqca.h                          |  12 ++-
> >  drivers/bluetooth/hci_qca.c                        |  12 +++
> >  6 files changed, 201 insertions(+), 4 deletions(-)
> > ---
> > base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
> > change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
> >
> > Best regards,
> > --
> > Luca Weiss <luca.weiss@fairphone.com>
> >
Bjorn Andersson June 13, 2023, 10:30 p.m. UTC | #2
On Fri, 12 May 2023 15:58:22 +0200, Luca Weiss wrote:
> Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> the sm7225 Fairphone 4 devicetree.
> 
> Devicetree patches go via Qualcomm tree, the rest via their respective
> trees.
> 
> --
> Previously with the RFC version I've had problems before with Bluetooth
> scanning failing like the following:
> 
> [...]

Applied, thanks!

[3/4] arm64: dts: qcom: sm6350: add uart1 node
      commit: b179f35b887b2d17e93f1827550290669bc6b110
[4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
      commit: c4ef464b24c5aefb7e23eb8fcc08250a783a529b

Best regards,
Luca Weiss Aug. 1, 2023, 10:07 a.m. UTC | #3
Hi Luiz,

On Mon May 15, 2023 at 8:12 AM CEST, Luca Weiss wrote:
> On Fri May 12, 2023 at 10:53 PM CEST, Luiz Augusto von Dentz wrote:
> > Hi Luca,
> >
> > On Fri, May 12, 2023 at 6:58 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
> > >
> > > Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> > > the sm7225 Fairphone 4 devicetree.
> > >
> > > Devicetree patches go via Qualcomm tree, the rest via their respective
> > > trees.
> >
> > Just to be sure, patches 1-2 shall be applied to bluetooth-next the
> > remaining are going to be handled elsewhere?
>
> Sounds good.

Is anything missing for the patches 1 & 2 to be applied? I don't see
them yet in linux-next. Should I resend them?

Regards
Luca

>
> >
> > > --
> > > Previously with the RFC version I've had problems before with Bluetooth
> > > scanning failing like the following:
> > >
> > >   [bluetooth]# scan on
> > >   Failed to start discovery: org.bluez.Error.InProgress
> > >
> > >   [  202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
> > >
> > > This appears to only happen with driver built-in (=y) when the supported
> > > local commands list doesn't get updated in the Bluetooth core and
> > > use_ext_scan() returning false. I'll try to submit this separately since
> > > this now works well enough with =m. But in both cases (=y, =m) it's
> > > behaving a bit weirdly before (re-)setting the MAC address with "sudo
> > > btmgmt public-addr fo:oo:ba:ar"
> > >
> > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > > ---
> > > Changes in v2:
> > > - Add pinctrl & 'tlmm 64' irq to uart node
> > > - Pick up tags
> > > - Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
> > >
> > > ---
> > > Luca Weiss (4):
> > >       dt-bindings: net: qualcomm: Add WCN3988
> > >       Bluetooth: btqca: Add WCN3988 support
> > >       arm64: dts: qcom: sm6350: add uart1 node
> > >       arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
> > >
> > >  .../bindings/net/bluetooth/qualcomm-bluetooth.yaml |   2 +
> > >  arch/arm64/boot/dts/qcom/sm6350.dtsi               |  63 +++++++++++++
> > >  arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts  | 103 +++++++++++++++++++++
> > >  drivers/bluetooth/btqca.c                          |  13 ++-
> > >  drivers/bluetooth/btqca.h                          |  12 ++-
> > >  drivers/bluetooth/hci_qca.c                        |  12 +++
> > >  6 files changed, 201 insertions(+), 4 deletions(-)
> > > ---
> > > base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
> > > change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
> > >
> > > Best regards,
> > > --
> > > Luca Weiss <luca.weiss@fairphone.com>
> > >
Luiz Augusto von Dentz Aug. 1, 2023, 6:08 p.m. UTC | #4
Hi Luca,

On Tue, Aug 1, 2023 at 3:07 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
>
> Hi Luiz,
>
> On Mon May 15, 2023 at 8:12 AM CEST, Luca Weiss wrote:
> > On Fri May 12, 2023 at 10:53 PM CEST, Luiz Augusto von Dentz wrote:
> > > Hi Luca,
> > >
> > > On Fri, May 12, 2023 at 6:58 AM Luca Weiss <luca.weiss@fairphone.com> wrote:
> > > >
> > > > Add support in the btqca/hci_qca driver for the WCN3988 and add it to
> > > > the sm7225 Fairphone 4 devicetree.
> > > >
> > > > Devicetree patches go via Qualcomm tree, the rest via their respective
> > > > trees.
> > >
> > > Just to be sure, patches 1-2 shall be applied to bluetooth-next the
> > > remaining are going to be handled elsewhere?
> >
> > Sounds good.
>
> Is anything missing for the patches 1 & 2 to be applied? I don't see
> them yet in linux-next. Should I resend them?

Looks like this set is no longer on patchwork, could you please resend?

> Regards
> Luca
>
> >
> > >
> > > > --
> > > > Previously with the RFC version I've had problems before with Bluetooth
> > > > scanning failing like the following:
> > > >
> > > >   [bluetooth]# scan on
> > > >   Failed to start discovery: org.bluez.Error.InProgress
> > > >
> > > >   [  202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16
> > > >
> > > > This appears to only happen with driver built-in (=y) when the supported
> > > > local commands list doesn't get updated in the Bluetooth core and
> > > > use_ext_scan() returning false. I'll try to submit this separately since
> > > > this now works well enough with =m. But in both cases (=y, =m) it's
> > > > behaving a bit weirdly before (re-)setting the MAC address with "sudo
> > > > btmgmt public-addr fo:oo:ba:ar"
> > > >
> > > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > > > ---
> > > > Changes in v2:
> > > > - Add pinctrl & 'tlmm 64' irq to uart node
> > > > - Pick up tags
> > > > - Link to v1: https://lore.kernel.org/r/20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com
> > > >
> > > > ---
> > > > Luca Weiss (4):
> > > >       dt-bindings: net: qualcomm: Add WCN3988
> > > >       Bluetooth: btqca: Add WCN3988 support
> > > >       arm64: dts: qcom: sm6350: add uart1 node
> > > >       arm64: dts: qcom: sm7225-fairphone-fp4: Add Bluetooth
> > > >
> > > >  .../bindings/net/bluetooth/qualcomm-bluetooth.yaml |   2 +
> > > >  arch/arm64/boot/dts/qcom/sm6350.dtsi               |  63 +++++++++++++
> > > >  arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts  | 103 +++++++++++++++++++++
> > > >  drivers/bluetooth/btqca.c                          |  13 ++-
> > > >  drivers/bluetooth/btqca.h                          |  12 ++-
> > > >  drivers/bluetooth/hci_qca.c                        |  12 +++
> > > >  6 files changed, 201 insertions(+), 4 deletions(-)
> > > > ---
> > > > base-commit: f2fe50eb7ca6b7bc6c63745f5c26f7c6022fcd4a
> > > > change-id: 20230421-fp4-bluetooth-b36a0e87b9c8
> > > >
> > > > Best regards,
> > > > --
> > > > Luca Weiss <luca.weiss@fairphone.com>
> > > >
>