Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2305884rwr; Fri, 21 Apr 2023 07:13:50 -0700 (PDT) X-Google-Smtp-Source: AKy350bVrPU8PwKzZ6z3HWkkS0hYq1tb67ZRhUqzq08k4wbS+DH2/Gtf6jv4S8Up6S0xun4qIWR4 X-Received: by 2002:a17:90a:1994:b0:244:b4ea:add4 with SMTP id 20-20020a17090a199400b00244b4eaadd4mr4841233pji.3.1682086429998; Fri, 21 Apr 2023 07:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682086429; cv=none; d=google.com; s=arc-20160816; b=fMRHza6cWNl63ulyBaseMuz5bdFYs8ryoCuo/p5qOoUg9MP10oCsJJfsQPzCzshrHy uVqrmyo4nD8pmVF7E0WIdUXXMUf7sF8a1V56NeLMIy76ABzTeXfKN0dUj7fZJrIK9c+o uJG99/cepQaLVEkqgdWY1nmvs52W4lqo2QvkZO114jEwhdC7qboQiyoFRZu+DCQJTb9M iVr2PEivcPeG6q2AeXgDSLT4kQP5anL5XFz2NIcKWhH0yq4u4Mq0adFI9OWCEUyBl6fa uu/Wz7UTZcfmA2JYKCCppDzNU9AOTGGyEUV31jSPIRvXkxx8Trvu79aCRhNtm+KGyn1Q zS0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=EPD5TcepChIUyB1x+7Snz5I2ALaHEaijNEsj7LUHZPA=; b=PKYlShY+Aqjx0eWVFuhuVnjHVGtBYZsx0LdRIFmmDx5NOEeT/6Fy2TGlfjRuw4lgbC VkfJzWgJP8snG1TCnCpkaGKtUW1TLg/EQPFt9w3ZC1PiCZEeA0XmxYCVsKqTDbO0xyJ/ 2gAgIZhbgh3y5CaiM11B+uHI6F1fafS6q/z9FatHS7YQLPB58tHw5gpE3jp5sD4cBIAl a0d6NKYolGIsAZ/g58A7VQEkqPy62aegFsubpWujFbryozRUVODalrc5wMq115nqH+ev LPz7l5YQ5gpJndSDvfynHEtUv7jCNCY5ShQglrPhzerKoUjOpjqPZ8A9ruhxhmIKpDk4 wcDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=SGnUbBPt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a1709029b8c00b0019a59c52fd3si4100673plp.508.2023.04.21.07.13.33; Fri, 21 Apr 2023 07:13:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=SGnUbBPt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231923AbjDUOLv (ORCPT + 99 others); Fri, 21 Apr 2023 10:11:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbjDUOLt (ORCPT ); Fri, 21 Apr 2023 10:11:49 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BF5E7EE7 for ; Fri, 21 Apr 2023 07:11:43 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-506bfe81303so2829839a12.1 for ; Fri, 21 Apr 2023 07:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1682086302; x=1684678302; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=EPD5TcepChIUyB1x+7Snz5I2ALaHEaijNEsj7LUHZPA=; b=SGnUbBPtbMuGlGP7xgkjvYNprt/tmwJukkiW4SLbD+eD/CdrjoXNA0p80kH6A46gFO maSZwJRhDipvRmudtViB0d3B5aAUO3EALglvWabl8Maxr0x0PjQYyCoaDYKRdchvf3AF 1XTScpJja6tJ5FirRR1MFIPnMT6WOVnNLAw1O38AqrafLFWIDlfw7/v68W+Zw+42Xo34 1fFoyz/wz7dOgbI200Bt88lDOK6wFt5Rjx51JU3oRmjlT36eWayGqlP4PARwVGNhEf60 HaesoU6a/AbcpRozeREASEWLEbTgSACsCCgM8V0nqINY32A4/PKAqHI4FatAFO7VnSgI OsYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682086302; x=1684678302; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EPD5TcepChIUyB1x+7Snz5I2ALaHEaijNEsj7LUHZPA=; b=dkI45DAacwYCeWgoim5IgkvEaOA7An+wpeOjR4U2/a/sJup985aIZ9bfi5DX+cXC0n ncUFFDIcGDvSHo77fcUVdoxzCy5WfJl5u7km2ecJ+NLlkhOaTi0qK6+MjvBPX6ghUAR1 msDnqKjj9syouI+r9flVRtbUHQ9zpY/PxvdhuRXEgfXmByokHQTSQS4KKz1xD3krir/B jxkih1ebvNnRHtt/FzqJ/uOtLWd7JthAf+taDdv+zKQ+Pmpy+gtHvKsVucsm3qeJmIKt Z8aNsS+HTBiRA7zlY5wbJwlEJ0Uq6ccpT3M1YxqmR+9c6G0wPXfH42StsKJb9bJitfL0 U1Cw== X-Gm-Message-State: AAQBX9f/Ng8Kk45Flirsmv7MP39b/ftcxDdAE8LfFtG4qLKkYJfEI0x3 60BdR24z9Pa9vmXC43hQ0DQ5yg== X-Received: by 2002:a17:906:9c44:b0:94b:4a4:2836 with SMTP id fg4-20020a1709069c4400b0094b04a42836mr2241258ejc.69.1682086301764; Fri, 21 Apr 2023 07:11:41 -0700 (PDT) Received: from [172.16.220.31] (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id mb20-20020a170906eb1400b0094f432f2429sm2104299ejb.109.2023.04.21.07.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 07:11:41 -0700 (PDT) From: Luca Weiss Subject: [PATCH RFC 0/4] Add WCN3988 Bluetooth support for Fairphone 4 Date: Fri, 21 Apr 2023 16:11:37 +0200 Message-Id: <20230421-fp4-bluetooth-v1-0-0430e3a7e0a2@fairphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAJmZQmQC/x2NQQrCMBAAv1L27EKaFq1eBR/gVXrIxq1ZCElJW imU/t3F4wwMs0PlIlzh1uxQ+CtVclJoTw344NKHUd7KYI3tTG9bnOYeKa685LwEpO7sDA8Xuvo BtCFXGam45INWaY1R5Vx4ku0/ecHzcYfxOH6EglTSeQAAAA== To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Balakrishna Godavarthi , Rocky Liao , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just to start with the important part why this is an RFC: While Bluetooth chip init works totally fine and bluez seems to be fairly happy with it, there's a (major) problem with scanning, as shown with this bluetoothctl snippet and dmesg snippet: [bluetooth]# scan on Failed to start discovery: org.bluez.Error.InProgress [ 202.371374] Bluetooth: hci0: Opcode 0x200b failed: -16 This opcode should be the following: include/net/bluetooth/hci.h:#define HCI_OP_LE_SET_SCAN_PARAM 0x200b Unfortunately trying various existing code branches in the Bluetooth driver doesn't show any sign of making this work and I don't really know where to look to debug this further. On the other hand "discoverable on" makes the device show up on other devices during scanning , so the RF parts of the Bluetooth chip are generally functional for sure. Any ideas are welcome. @Bjorn: Patch "arm64: dts: qcom: sm6350: add uart1 node" should be fine to take regardless the RFC status, I don't think the problem is caused there. Signed-off-by: Luca Weiss --- 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 | 17 ++++++ drivers/bluetooth/btqca.c | 13 ++++- drivers/bluetooth/btqca.h | 12 ++++- drivers/bluetooth/hci_qca.c | 12 +++++ 6 files changed, 115 insertions(+), 4 deletions(-) --- base-commit: cf4c0112a0350cfe8a63b5eb3377e2366f57545b change-id: 20230421-fp4-bluetooth-b36a0e87b9c8 Best regards, -- Luca Weiss