From nobody Sat Sep 13 00:03:15 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09813C636CD for ; Tue, 7 Feb 2023 05:28:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbjBGF2l (ORCPT ); Tue, 7 Feb 2023 00:28:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjBGF2e (ORCPT ); Tue, 7 Feb 2023 00:28:34 -0500 Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63C3623871 for ; Mon, 6 Feb 2023 21:28:33 -0800 (PST) Received: by mail-oo1-xc33.google.com with SMTP id 123-20020a4a0681000000b004faa9c6f6b9so1322401ooj.11 for ; Mon, 06 Feb 2023 21:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7LZT5UqZL/4spyb4nQBTM+1EEn8n81bydAtyWcmYTa8=; b=nWEuSWJuoU4uTeKtMWdUTK4BktXnZg1Ds96UmMNyFTL0oe+Z6vz1u/K2VmavcRVEMs JbCF3sUAg8WsED0egHoV4VqEdkvvT4IUh5avtKeSHrZQGFMgbgG4xsu2xh7xOBM+rQHX AWGR7kO+T5GrgqTW+7LYChBQTPERx9fa5i2JcRwKQWefAUU986urHoIAW3WIXlBIrNQv IqiwQ8McjhH8Ar9dC0HJaBD5HVPkWzM/hInsoWDirbCxETvLTZQw6+RD6YkI6XK37fIb JjFkbgLOpBaPWo/+k2QJNuUuTjVl6XEnMvbR276Nkc5oihaCxNUDp/84/rInGbk3ZZZi gdMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7LZT5UqZL/4spyb4nQBTM+1EEn8n81bydAtyWcmYTa8=; b=uYsB71cj4LahjZwQ94DDDEWPTaGu/bfeY5svYeYNlYLpcqJXl2tDmsrsiVXILCOtRe Cl3WwNYIpQ/XUx8K00Qsm/WxcVcTqImlUojm1KD2y9zCp+Z2zMmP9lmdBau0dmWLxA9N hdlgwwdL4KYKms5xxZS74stOpG1HW5f7xMK8qSk16ZKUFrj7RrdFDlKfhRhwcLYv08Oo u5lOc9Qm1jnCFwEM8ynG2hn7N5D41u+HUbd/Gc9A7g2E+PJbk8o4oKiVbmwSVZMkI1QI M1C6ojA+Bf6SPDNP5BeDQiCatHLYboIGI+xRv+GUOl40mMbMVeL4EQQJQRFeZXgMmdEg 47Rg== X-Gm-Message-State: AO0yUKVdf02Od0p63jswGGkl5smzs8mSaU0irpsMmcQC5hxnk82flOCt 0UU3kTje3UETmYv1zuFN9WwxWw== X-Google-Smtp-Source: AK7set9dKc2GjLZcBjIzabDjcJDyhqapS5wfQJJRL3j3AZKy0mBUDOtr2fmDvHHlO/XHuHkyfCCimg== X-Received: by 2002:a4a:3347:0:b0:51a:2ba5:4356 with SMTP id q68-20020a4a3347000000b0051a2ba54356mr866061ooq.7.1675747712780; Mon, 06 Feb 2023 21:28:32 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id 1-20020a4a0901000000b004fb9a65daf1sm5531339ooa.43.2023.02.06.21.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 21:28:32 -0800 (PST) From: Steev Klimaszewski To: Steev Klimaszewski Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Sven Peter , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, Mark Pearson Subject: [PATCH v4 1/4] dt-bindings: net: Add WCN6855 Bluetooth Date: Mon, 6 Feb 2023 23:28:26 -0600 Message-Id: <20230207052829.3996-2-steev@kali.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230207052829.3996-1-steev@kali.org> References: <20230207052829.3996-1-steev@kali.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add bindings for the QTI WCN6855 chipset. Signed-off-by: Steev Klimaszewski Reviewed-by: Krzysztof Kozlowski --- Changes since v3: * Separate 6855 enum because we don't need 9 regulators like 6750 * Drop Ack because of changes Changes since v2: * No changes from v2 Changes since v1: * drop second binding in subject line --- .../net/bluetooth/qualcomm-bluetooth.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluet= ooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-blueto= oth.yaml index a6a6b0e4df7a..68f78b90d23a 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.ya= ml +++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.ya= ml @@ -23,6 +23,7 @@ properties: - qcom,wcn3998-bt - qcom,qca6390-bt - qcom,wcn6750-bt + - qcom,wcn6855-bt =20 enable-gpios: maxItems: 1 @@ -133,6 +134,22 @@ allOf: - vddrfa1p7-supply - vddrfa1p2-supply - vddasd-supply + - if: + properties: + compatible: + contains: + enum: + - qcom,wcn6855-bt + then: + required: + - enable-gpios + - swctrl-gpios + - vddio-supply + - vddbtcxmx-supply + - vddrfacmn-supply + - vddrfa0p8-supply + - vddrfa1p2-supply + - vddrfa1p7-supply =20 examples: - | --=20 2.39.0 From nobody Sat Sep 13 00:03:15 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89358C636D4 for ; Tue, 7 Feb 2023 05:28:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbjBGF2z (ORCPT ); Tue, 7 Feb 2023 00:28:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230153AbjBGF2l (ORCPT ); Tue, 7 Feb 2023 00:28:41 -0500 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7699623D8B for ; Mon, 6 Feb 2023 21:28:36 -0800 (PST) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-142b72a728fso17753098fac.9 for ; Mon, 06 Feb 2023 21:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NcCUn+etXz5tPhMNSYc+y9NM2vCskMw7VjiaJS4weeI=; b=LUTiiL4iomfCVnsJCmzAa2Mofa4V6ITWuOo/6UO8X5XH3nBWjAv62OMx0/qaTZQH3+ iznsT2qrzWqzyn8dGbC9FZMi72RRBI5yYqDcTU84NwU6u8Bs+qiNJQudl5KJRcxxeWid lD4isn9/QfPI1EAgA+CVXSex5fZElRUrjpfPc0Dq/h+0ElRjbA1lVNsfvG7Qa7ahhavY HdsAwsKa4fpitiGjWIOdG8FCxNLEXFu64y5I6Xg1o4XiP8tQmIjP8cKZqNBi4DwpqZV9 X9L3vtfXA4hhBllNs+x4OBtulHjGVCRMeHLgiPR24MTHyqONYrFb5LR9oxiSs0jT34S/ PSLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NcCUn+etXz5tPhMNSYc+y9NM2vCskMw7VjiaJS4weeI=; b=ebQ7TPvPU0flC+OJL2qEjlqjRzkBqUQuE7mnCYo/jjp8Hjk8/IE8zSt3NeIfHeR6YU McxrQqfcOXwQfHdeH3vDdC5pahv4BWnyya4ZJXLVl50LBQJgYX/xqvg1W1TndVJ89vau BFY58TdSAc42VQVGWQ1C55pJvJJNSrF9yDlHZSRyhYCJ26hVgUo0+gr/8GrucpM0QHOI WuIRQVyE+7OqJKgjg6E6kYsXmijlOFvTvjjkA+E+AkR+IRkddV5SiEM4CZde+QN8y/+t cIdWVB09W0ujEyR1Y66kAE9z8qulgomCiebr2MeupZqVB3yKI0QLYk6WVYeBB/56xTMu Eaww== X-Gm-Message-State: AO0yUKWMlVkWKWh/MuRtodicfSM+u5rL4PT6LVzuc3iHHlogw6TjzCm2 MOwYSNyyxy/Wk3BZddKxiik5rq6pXowbN3SHJHY= X-Google-Smtp-Source: AK7set9VoAqoLINKRBGa+auyEDsHYEwlxdqCNO/c9Z9DL2c/HY3k474RVB6tJmJq0e49Y6SXuyINKw== X-Received: by 2002:a05:6871:8a:b0:16a:180a:b348 with SMTP id u10-20020a056871008a00b0016a180ab348mr659665oaa.16.1675747715722; Mon, 06 Feb 2023 21:28:35 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id v21-20020a056870e49500b00163b85ef1bfsm4966734oag.35.2023.02.06.21.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 21:28:35 -0800 (PST) From: Steev Klimaszewski To: Steev Klimaszewski Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Sven Peter , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, Mark Pearson Subject: [PATCH v4 2/4] Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6855 Date: Mon, 6 Feb 2023 23:28:27 -0600 Message-Id: <20230207052829.3996-3-steev@kali.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230207052829.3996-1-steev@kali.org> References: <20230207052829.3996-1-steev@kali.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Added regulators,GPIOs and changes required to power on/off wcn6855. Added support for firmware download for wcn6855. Signed-off-by: Steev Klimaszewski --- Changes since v3: * drop unused regulators Changes since v2: * drop unnecessary commit info Changes since v1: * None --- drivers/bluetooth/btqca.c | 24 ++++++++++++++-- drivers/bluetooth/btqca.h | 10 +++++++ drivers/bluetooth/hci_qca.c | 56 ++++++++++++++++++++++++++++--------- 3 files changed, 75 insertions(+), 15 deletions(-) diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index c9064d34d830..456b961b9554 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -472,6 +472,19 @@ static int qca_download_firmware(struct hci_dev *hdev, config->fwname, ret); return ret; } + } else if (soc_type =3D=3D QCA_WCN6855 && config->type =3D=3D ELF_TYPE_P= ATCH) { + bt_dev_dbg(hdev, "QCA Failed to request file: %s (%d)", + config->fwname, ret); + config->type =3D TLV_TYPE_PATCH; + snprintf(config->fwname, sizeof(config->fwname), + "qca/hpbtfw%02x.tlv", rom_ver); + bt_dev_info(hdev, "QCA Downloading %s", config->fwname); + ret =3D request_firmware(&fw, config->fwname, &hdev->dev); + if (ret) { + bt_dev_err(hdev, "QCA Failed to request file: %s (%d)", + config->fwname, ret); + return ret; + } } else { bt_dev_err(hdev, "QCA Failed to request file: %s (%d)", config->fwname, ret); @@ -596,7 +609,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, */ rom_ver =3D ((soc_ver & 0x00000f00) >> 0x04) | (soc_ver & 0x0000000f); =20 - if (soc_type =3D=3D QCA_WCN6750) + if (soc_type =3D=3D QCA_WCN6750 || soc_type =3D=3D QCA_WCN6855) qca_send_patch_config_cmd(hdev); =20 /* Download rampatch file */ @@ -614,6 +627,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, config.type =3D ELF_TYPE_PATCH; snprintf(config.fwname, sizeof(config.fwname), "qca/msbtfw%02x.mbn", rom_ver); + } else if (soc_type =3D=3D QCA_WCN6855) { + snprintf(config.fwname, sizeof(config.fwname), + "qca/hpbtfw%02x.tlv", rom_ver); } else { snprintf(config.fwname, sizeof(config.fwname), "qca/rampatch_%08x.bin", soc_ver); @@ -648,6 +664,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, else if (soc_type =3D=3D QCA_WCN6750) snprintf(config.fwname, sizeof(config.fwname), "qca/msnv%02x.bin", rom_ver); + else if (soc_type =3D=3D QCA_WCN6855) + snprintf(config.fwname, sizeof(config.fwname), + "qca/hpnv%02x.bin", rom_ver); else snprintf(config.fwname, sizeof(config.fwname), "qca/nvm_%08x.bin", soc_ver); @@ -672,6 +691,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, case QCA_WCN3991: case QCA_WCN3998: case QCA_WCN6750: + case QCA_WCN6855: hci_set_msft_opcode(hdev, 0xFD70); break; default: @@ -685,7 +705,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudra= te, return err; } =20 - if (soc_type =3D=3D QCA_WCN3991 || soc_type =3D=3D QCA_WCN6750) { + if (soc_type =3D=3D QCA_WCN3991 || soc_type =3D=3D QCA_WCN6750 || soc_typ= e =3D=3D QCA_WCN6855) { /* get fw build info */ err =3D qca_read_fw_build_info(hdev); if (err < 0) diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h index 61e9a50e66ae..b884095bcd9d 100644 --- a/drivers/bluetooth/btqca.h +++ b/drivers/bluetooth/btqca.h @@ -147,6 +147,7 @@ enum qca_btsoc_type { QCA_WCN3991, QCA_QCA6390, QCA_WCN6750, + QCA_WCN6855, }; =20 #if IS_ENABLED(CONFIG_BT_QCA) @@ -168,6 +169,10 @@ static inline bool qca_is_wcn6750(enum qca_btsoc_type = soc_type) { return soc_type =3D=3D QCA_WCN6750; } +static inline bool qca_is_wcn6855(enum qca_btsoc_type soc_type) +{ + return soc_type =3D=3D QCA_WCN6855; +} =20 #else =20 @@ -206,6 +211,11 @@ static inline bool qca_is_wcn6750(enum qca_btsoc_type = soc_type) return false; } =20 +static inline bool qca_is_wcn6855(enum qca_btsoc_type soc_type) +{ + return false; +} + static inline int qca_send_pre_shutdown_cmd(struct hci_dev *hdev) { return -EOPNOTSUPP; diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 3df8c3606e93..a35612ba23b2 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -606,7 +606,8 @@ static int qca_open(struct hci_uart *hu) qcadev =3D serdev_device_get_drvdata(hu->serdev); =20 if (qca_is_wcn399x(qcadev->btsoc_type) || - qca_is_wcn6750(qcadev->btsoc_type)) + qca_is_wcn6750(qcadev->btsoc_type) || + qca_is_wcn6855(qcadev->btsoc_type)) hu->init_speed =3D qcadev->init_speed; =20 if (qcadev->oper_speed) @@ -1317,7 +1318,8 @@ static int qca_set_baudrate(struct hci_dev *hdev, uin= t8_t baudrate) =20 /* Give the controller time to process the request */ if (qca_is_wcn399x(qca_soc_type(hu)) || - qca_is_wcn6750(qca_soc_type(hu))) + qca_is_wcn6750(qca_soc_type(hu)) || + qca_is_wcn6855(qca_soc_type(hu))) usleep_range(1000, 10000); else msleep(300); @@ -1394,7 +1396,8 @@ static unsigned int qca_get_speed(struct hci_uart *hu, static int qca_check_speeds(struct hci_uart *hu) { if (qca_is_wcn399x(qca_soc_type(hu)) || - qca_is_wcn6750(qca_soc_type(hu))) { + qca_is_wcn6750(qca_soc_type(hu)) || + qca_is_wcn6855(qca_soc_type(hu))) { if (!qca_get_speed(hu, QCA_INIT_SPEED) && !qca_get_speed(hu, QCA_OPER_SPEED)) return -EINVAL; @@ -1428,7 +1431,8 @@ static int qca_set_speed(struct hci_uart *hu, enum qc= a_speed_type speed_type) * changing the baudrate of chip and host. */ if (qca_is_wcn399x(soc_type) || - qca_is_wcn6750(soc_type)) + qca_is_wcn6750(soc_type) || + qca_is_wcn6855(soc_type)) hci_uart_set_flow_control(hu, true); =20 if (soc_type =3D=3D QCA_WCN3990) { @@ -1446,7 +1450,8 @@ static int qca_set_speed(struct hci_uart *hu, enum qc= a_speed_type speed_type) =20 error: if (qca_is_wcn399x(soc_type) || - qca_is_wcn6750(soc_type)) + qca_is_wcn6750(soc_type) || + qca_is_wcn6855(soc_type)) hci_uart_set_flow_control(hu, false); =20 if (soc_type =3D=3D QCA_WCN3990) { @@ -1682,7 +1687,8 @@ static int qca_power_on(struct hci_dev *hdev) return 0; =20 if (qca_is_wcn399x(soc_type) || - qca_is_wcn6750(soc_type)) { + qca_is_wcn6750(soc_type) || + qca_is_wcn6855(soc_type)) { ret =3D qca_regulator_init(hu); } else { qcadev =3D serdev_device_get_drvdata(hu->serdev); @@ -1723,7 +1729,8 @@ static int qca_setup(struct hci_uart *hu) =20 bt_dev_info(hdev, "setting up %s", qca_is_wcn399x(soc_type) ? "wcn399x" : - (soc_type =3D=3D QCA_WCN6750) ? "wcn6750" : "ROME/QCA6390"); + (soc_type =3D=3D QCA_WCN6750) ? "wcn6750" : + (soc_type =3D=3D QCA_WCN6855) ? "wcn6855" : "ROME/QCA6390"); =20 qca->memdump_state =3D QCA_MEMDUMP_IDLE; =20 @@ -1735,7 +1742,8 @@ static int qca_setup(struct hci_uart *hu) clear_bit(QCA_SSR_TRIGGERED, &qca->flags); =20 if (qca_is_wcn399x(soc_type) || - qca_is_wcn6750(soc_type)) { + qca_is_wcn6750(soc_type) || + qca_is_wcn6855(soc_type)) { set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); hci_set_aosp_capable(hdev); =20 @@ -1757,7 +1765,8 @@ static int qca_setup(struct hci_uart *hu) } =20 if (!(qca_is_wcn399x(soc_type) || - qca_is_wcn6750(soc_type))) { + qca_is_wcn6750(soc_type) || + qca_is_wcn6855(soc_type))) { /* Get QCA version information */ ret =3D qca_read_soc_version(hdev, &ver, soc_type); if (ret) @@ -1883,6 +1892,20 @@ static const struct qca_device_data qca_soc_data_wcn= 6750 =3D { .capabilities =3D QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES, }; =20 +static const struct qca_device_data qca_soc_data_wcn6855 =3D { + .soc_type =3D QCA_WCN6855, + .vregs =3D (struct qca_vreg []) { + { "vddio", 5000 }, + { "vddbtcxmx", 126000 }, + { "vddrfacmn", 12500 }, + { "vddrfa0p8", 102000 }, + { "vddrfa1p7", 302000 }, + { "vddrfa1p2", 257000 }, + }, + .num_vregs =3D 6, + .capabilities =3D QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES, +}; + static void qca_power_shutdown(struct hci_uart *hu) { struct qca_serdev *qcadev; @@ -2047,7 +2070,8 @@ static int qca_serdev_probe(struct serdev_device *ser= dev) =20 if (data && (qca_is_wcn399x(data->soc_type) || - qca_is_wcn6750(data->soc_type))) { + qca_is_wcn6750(data->soc_type) || + qca_is_wcn6855(data->soc_type))) { qcadev->btsoc_type =3D data->soc_type; qcadev->bt_power =3D devm_kzalloc(&serdev->dev, sizeof(struct qca_power), @@ -2067,14 +2091,18 @@ static int qca_serdev_probe(struct serdev_device *s= erdev) =20 qcadev->bt_en =3D devm_gpiod_get_optional(&serdev->dev, "enable", GPIOD_OUT_LOW); - if (IS_ERR_OR_NULL(qcadev->bt_en) && data->soc_type =3D=3D QCA_WCN6750) { + if (IS_ERR_OR_NULL(qcadev->bt_en) + && (data->soc_type =3D=3D QCA_WCN6750 || + data->soc_type =3D=3D QCA_WCN6855)) { dev_err(&serdev->dev, "failed to acquire BT_EN gpio\n"); power_ctrl_enabled =3D false; } =20 qcadev->sw_ctrl =3D devm_gpiod_get_optional(&serdev->dev, "swctrl", GPIOD_IN); - if (IS_ERR_OR_NULL(qcadev->sw_ctrl) && data->soc_type =3D=3D QCA_WCN6750) + if (IS_ERR_OR_NULL(qcadev->sw_ctrl) + && (data->soc_type =3D=3D QCA_WCN6750 || + data->soc_type =3D=3D QCA_WCN6855)) dev_warn(&serdev->dev, "failed to acquire SW_CTRL gpio\n"); =20 qcadev->susclk =3D devm_clk_get_optional(&serdev->dev, NULL); @@ -2150,7 +2178,8 @@ static void qca_serdev_remove(struct serdev_device *s= erdev) struct qca_power *power =3D qcadev->bt_power; =20 if ((qca_is_wcn399x(qcadev->btsoc_type) || - qca_is_wcn6750(qcadev->btsoc_type)) && + qca_is_wcn6750(qcadev->btsoc_type) || + qca_is_wcn6855(qcadev->btsoc_type)) && power->vregs_on) qca_power_shutdown(&qcadev->serdev_hu); else if (qcadev->susclk) @@ -2335,6 +2364,7 @@ static const struct of_device_id qca_bluetooth_of_mat= ch[] =3D { { .compatible =3D "qcom,wcn3991-bt", .data =3D &qca_soc_data_wcn3991}, { .compatible =3D "qcom,wcn3998-bt", .data =3D &qca_soc_data_wcn3998}, { .compatible =3D "qcom,wcn6750-bt", .data =3D &qca_soc_data_wcn6750}, + { .compatible =3D "qcom,wcn6855-bt", .data =3D &qca_soc_data_wcn6855}, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, qca_bluetooth_of_match); --=20 2.39.0 From nobody Sat Sep 13 00:03:15 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D58EFC64EC4 for ; Tue, 7 Feb 2023 05:29:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbjBGF27 (ORCPT ); Tue, 7 Feb 2023 00:28:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbjBGF2l (ORCPT ); Tue, 7 Feb 2023 00:28:41 -0500 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11A592B2BC for ; Mon, 6 Feb 2023 21:28:38 -0800 (PST) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1685cf2003aso17741131fac.12 for ; Mon, 06 Feb 2023 21:28:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H11wObvkOaUJX39N+56q2fg5DEIQXRIgLuTf5I11IXU=; b=gbUBeLUQMlppUL/iY3joGWqE8IUp1jOEPkJbR9CPJlNzk+o5rLonHNAK3PY5ydCgb4 SgWT7rovewn3LxuZIZ6N6uB6+REGUm6roRnxvnvkL8oN0DjuAJajP43A1EBkKaPl1Nis be7V9PEmptKu36gaV4Gigt4BX1n6BseP6GAtlHbh/ipGDEhgFJFxYTDl4CvL2aNEKJYn lsOe0WXYLqsNl2SMJZ5S60DSsy8/awLEk42sCh2CYj75dfP6c5GHwbK1GM4u3lZKVftM 3kP5BV2KBY4h3/lj+81Es+J/KhwNpSLRZplIsEwD3SyMnRAXjtFKmWOaS9chaX6dnDmp V6HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H11wObvkOaUJX39N+56q2fg5DEIQXRIgLuTf5I11IXU=; b=ME6OmgplJ/PpajMPL7cJJtWmiGyfVeoKgg4/XXMp6x7eZF8HW8K4cO9SDrv8X7SY6p nR4gFA4VlNO33wV+aLAqr50CE3c66ikR2r1hadwi4l+oxUq+ZaWHxxyyDzpimVd9nxUh MEDL6jaT0ZjvZsJKmkSLfmJDdjaQVDhMUklgYE4PBlr7/FB88jYH9ukPg5RDTPgi8Lpd C7C90mef6f7MWg+1yIgiFh3aOHaCLxJVuMYP3d0WK5UXBG6p7b/Il1vy96b2+r1BPkjS vQObZaaXqP+TbjtJzAxLE3ZyqRAeBzaLy4ZOAD197JFzvYfDnPDBzg5zc0vdlTiL8tEm jkHQ== X-Gm-Message-State: AO0yUKWgwODUgFMYOMedN/3b2yFLZbnJL+ruLPQjI0AdEzxJSxhP793V O3EyXEfscEgAZuN/AobaeMcHfw== X-Google-Smtp-Source: AK7set/ykWk5mIT+VEMqd96Np3mbn9xtuSGh9EPfZ8kGfxE8RJeH4egJim836yeL/xaBlmzuLwIIvw== X-Received: by 2002:a05:6870:5b82:b0:163:def0:60b9 with SMTP id em2-20020a0568705b8200b00163def060b9mr866764oab.5.1675747717393; Mon, 06 Feb 2023 21:28:37 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id n4-20020a056870880400b0014866eb34cesm4979617oam.48.2023.02.06.21.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 21:28:36 -0800 (PST) From: Steev Klimaszewski To: Steev Klimaszewski Cc: Bjorn Andersson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Sven Peter , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, Mark Pearson , Brian Masney Subject: [PATCH v4 3/4] arm64: dts: qcom: sc8280xp: Define uart2 Date: Mon, 6 Feb 2023 23:28:28 -0600 Message-Id: <20230207052829.3996-4-steev@kali.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230207052829.3996-1-steev@kali.org> References: <20230207052829.3996-1-steev@kali.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Steev Klimaszewski Reviewed-by: Brian Masney Reviewed-by: Konrad Dybcio --- Changes since v3: * Fix commit message changelog Changes since v2: * No changes since v2 Changes since v1: * change subject line, move node, and add my s-o-b --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/q= com/sc8280xp.dtsi index fa2d0d7d1367..eab54aab3b76 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -1207,6 +1207,20 @@ spi2: spi@988000 { status =3D "disabled"; }; =20 + uart2: serial@988000 { + compatible =3D "qcom,geni-uart"; + reg =3D <0 0x00988000 0 0x4000>; + clocks =3D <&gcc GCC_QUPV3_WRAP0_S2_CLK>; + clock-names =3D "se"; + interrupts =3D ; + operating-points-v2 =3D <&qup_opp_table_100mhz>; + power-domains =3D <&rpmhpd SC8280XP_CX>; + interconnects =3D <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_C= ORE_0 0>, + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>; + interconnect-names =3D "qup-core", "qup-config"; + status =3D "disabled"; + }; + i2c3: i2c@98c000 { compatible =3D "qcom,geni-i2c"; reg =3D <0 0x0098c000 0 0x4000>; --=20 2.39.0 From nobody Sat Sep 13 00:03:15 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A462DC636CD for ; Tue, 7 Feb 2023 05:29:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230344AbjBGF3D (ORCPT ); Tue, 7 Feb 2023 00:29:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230199AbjBGF2x (ORCPT ); Tue, 7 Feb 2023 00:28:53 -0500 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D4728214 for ; Mon, 6 Feb 2023 21:28:39 -0800 (PST) Received: by mail-oo1-xc2c.google.com with SMTP id c29-20020a4ad21d000000b00517a55a78d4so1323391oos.12 for ; Mon, 06 Feb 2023 21:28:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Gd4sYDNe6UVOrg+q9jpwoTsY9NpzBuVI5nXxucyMsZw=; b=EDW35YE/XRTMMUEDQNybDT4BzNWrzrsr6SEz8tih38Ww92U1TfwKe9dIJCgF5AsHNI yYOeV9usgnONpu2u8IDgVQaTstSn2T8OFHFGWT7O4PzdWe7xtbLaKznmXfywTOZJL7P8 N6ezM9J47wm/eLLMb2+V5BzFArqzpN5nHU6t+Vw/JvyZ8D15v7Bl/65Q2ZBG+PC2mEfS 8I6Okf+ly3oPRxnIQxYiasmtk1BTthtmWAyomqLON1LCh3YPCVa+3zZRdUO/sqnTz0eE taMpP3Yd/WRtUcW14zTV69y15MLbvSK+zfnsr+NWfoiBtQTnxyrBlG1lFvpI+r7/8SrN Z5CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gd4sYDNe6UVOrg+q9jpwoTsY9NpzBuVI5nXxucyMsZw=; b=kVI9N8nxN9vEAtxIzGsYZYDyR/mcvI4+o27jEANb4PujBpAdQZXQFLBEOu0ZtAPx6B wPB4wlorHabhCX/piSCeH+gxAyxH9+YZDDM7hNA74Oe9s+EZbCTHmLjk1Ut5yld/THz4 tQxl5Ys/6L/4nPeagSHYks/oB6pfTgduNef0C7MudmvnX3hg8xSPxTXB6Gdpq2XxAQ09 Wg/Zgi2Qk/kovkEgnN0E0MycLtsLH0RbvDeKBpFIizex195DVbQ/mK9r7ehtgEGuDNTY egnCzXptPtyZmA6569cO/Na+daeDlLEZkxP6C0paEGKZPeKZSVOK8eS07o8MDI5ep0z8 5RZw== X-Gm-Message-State: AO0yUKUaB5dLP9itcCXTBzbaKnJcTX+BsCBuxDp8fLaUkRE8vqwDmAEy Nnuf8WQ5yz+FizLlxc9LQkVw0A== X-Google-Smtp-Source: AK7set9Uy3D004ifBj8bxCumSdcCXKbgivSVVGaqxQArAm5s+JDPXWj34hs2WLgu1SHb2En8zit28g== X-Received: by 2002:a4a:88c5:0:b0:51a:be3:bcff with SMTP id q5-20020a4a88c5000000b0051a0be3bcffmr955384ooh.7.1675747719599; Mon, 06 Feb 2023 21:28:39 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id l14-20020a4ae38e000000b004a0ad937ccdsm581478oov.1.2023.02.06.21.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 21:28:39 -0800 (PST) From: Steev Klimaszewski To: Steev Klimaszewski Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Sven Peter , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, Mark Pearson Subject: [PATCH v4 4/4] arm64: dts: qcom: thinkpad-x13s: Add bluetooth Date: Mon, 6 Feb 2023 23:28:29 -0600 Message-Id: <20230207052829.3996-5-steev@kali.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230207052829.3996-1-steev@kali.org> References: <20230207052829.3996-1-steev@kali.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, add this. Signed-off-by: Steev Klimaszewski --- Changes since v3: * Add vreg_s1c * Add regulators and not dead code * Fix commit message changelog Changes since v2: * Remove dead code and add TODO comment * Make dtbs_check happy with the pin definitions --- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/a= rch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index f936b020a71d..8e3c6524e7c6 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -24,6 +24,8 @@ / { aliases { i2c4 =3D &i2c4; i2c21 =3D &i2c21; + serial0 =3D &uart17; + serial1 =3D &uart2; }; =20 wcd938x: audio-codec { @@ -297,6 +299,14 @@ pmc8280c-rpmh-regulators { qcom,pmic-id =3D "c"; vdd-bob-supply =3D <&vreg_vph_pwr>; =20 + vreg_s1c: smps1 { + regulator-name =3D "vreg_s1c"; + regulator-min-microvolt =3D <1880000>; + regulator-max-microvolt =3D <1900000>; + regulator-allowed-modes =3D ; + regulator-allow-set-load; + }; + vreg_l1c: ldo1 { regulator-name =3D "vreg_l1c"; regulator-min-microvolt =3D <1800000>; @@ -712,6 +722,32 @@ &qup0 { status =3D "okay"; }; =20 +&uart2 { + status =3D "okay"; + + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart2_state>; + + bluetooth { + compatible =3D "qcom,wcn6855-bt"; + + vddio-supply =3D <&vreg_s10b>; + vddbtcxmx-supply =3D <&vreg_s12b>; + vddrfacmn-supply =3D <&vreg_s12b>; + vddrfa0p8-supply =3D <&vreg_s12b>; + vddrfa1p2-supply =3D <&vreg_s11b>; + vddrfa1p7-supply =3D <&vreg_s1c>; + + max-speed =3D <3200000>; + + enable-gpios =3D <&tlmm 133 GPIO_ACTIVE_HIGH>; + swctrl-gpios =3D <&tlmm 132 GPIO_ACTIVE_HIGH>; + + pinctrl-names =3D "default"; + pinctrl-0 =3D <&bt_en>; + }; +}; + &qup1 { status =3D "okay"; }; @@ -720,6 +756,12 @@ &qup2 { status =3D "okay"; }; =20 +&uart17 { + compatible =3D "qcom,geni-debug-uart"; + + status =3D "okay"; +}; + &remoteproc_adsp { firmware-name =3D "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn"; =20 @@ -980,6 +1022,19 @@ hastings_reg_en: hastings-reg-en-state { &tlmm { gpio-reserved-ranges =3D <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7= >; =20 + bt_en: bt-en-state { + hstp-sw-ctrl-pins { + pins =3D "gpio132"; + function =3D "gpio"; + }; + + hstp-bt-en-pins { + pins =3D "gpio133"; + function =3D "gpio"; + drive-strength =3D <16>; + }; + }; + edp_reg_en: edp-reg-en-state { pins =3D "gpio25"; function =3D "gpio"; @@ -1001,6 +1056,27 @@ i2c4_default: i2c4-default-state { bias-disable; }; =20 + uart2_state: uart2-state { + cts-pins { + pins =3D "gpio122"; + function =3D "qup2"; + bias-disable; + }; + + rts-tx-pins { + pins =3D "gpio122", "gpio123"; + function =3D "qup2"; + drive-strength =3D <2>; + bias-disable; + }; + + rx-pins { + pins =3D "gpio124"; + function =3D "qup2"; + bias-pull-up; + }; + }; + i2c21_default: i2c21-default-state { pins =3D "gpio81", "gpio82"; function =3D "qup21"; --=20 2.39.0