From patchwork Thu Feb 9 02:09:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steev Klimaszewski X-Patchwork-Id: 652143 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 AB339C6379F for ; Thu, 9 Feb 2023 02:09:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231592AbjBICJd (ORCPT ); Wed, 8 Feb 2023 21:09:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbjBICJY (ORCPT ); Wed, 8 Feb 2023 21:09:24 -0500 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD3B819F3C for ; Wed, 8 Feb 2023 18:09:20 -0800 (PST) Received: by mail-qt1-x832.google.com with SMTP id g8so484332qtq.13 for ; Wed, 08 Feb 2023 18:09:20 -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=PIypt+WJR6vATpFn1aHucJU2sV9ncXyGiHkb7V566WM=; b=VHNZeKLwQDQ/eaYcn57X3IMN//R0pwb46fuEh6UdQ+9Fz3AbnSgjUVCwbRfH8LzBUy fcaslPPBvVBK0+u3Q8NsvaeioRCWYIzECAwQOhQgMbDPnsg2D0ov9dwWaoB2sLvvFkCe WhxY1vGx4EIc1aQecGuUn8rs7VD0EI4Yz6hEthxHLcrJYbpRb+6IqI/qVrEp9vSLFTDx fg/kjJYWqNyg0T06ZsNXNNA1AYUbO47ervi707QjZPAOkM3jXkU828N89+HgqrGQQAwj SgDTqpx2XXYiOEbFXitaqv3L0Ledx5oJcMe3fLvwp53s6HlSooKUuxLP1oYhP1cTtND8 twEg== 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=PIypt+WJR6vATpFn1aHucJU2sV9ncXyGiHkb7V566WM=; b=1NJGz51iWnhjw34OLIZ30mbqZhku5/T9bVm5+sGKXl1qh+84b7a57klsh0zY51LGbl Qu6sIjnBOvkWXVzVx2BsN+reIlD6pT0pK1XjSje1+/6g0UutPx/foBAI931tsOwiZO50 klQySMnq7C80D4cGGlTd5Zm3Cem4WgqofQU+Kb2jDvZ/tkJU29XBPJ6eIlvyHrsuBGWj cdQcqZiwB5aDlVoKzrbtN0+yDWe0rPvAELwFaGWjel0Jvln0/YuZZ/BB/8pJL9D36Imv oz4qAIucDeToYAK9C9iBtNJVKSOnybUM8D5NSxkzQsZ29YgwWBuukeSJa3a4pXMahExw 1p6w== X-Gm-Message-State: AO0yUKXWPxDCS+qDkdFFjm8l1g1vSO6vEFWu2lOBq6Pq1EVg8z7QP0Z6 RPvG7fIE5SFeg50bc9eHVrzkHA== X-Google-Smtp-Source: AK7set8Px4/Z7X7uWmjjepGWM/XhrUYQ9EFwyBj5n1UifquTO/qmYtLuqyPRhQkYesxV7pEnPSGERw== X-Received: by 2002:a05:622a:651:b0:3b6:3a7a:d3c8 with SMTP id a17-20020a05622a065100b003b63a7ad3c8mr14909987qtb.17.1675908560006; Wed, 08 Feb 2023 18:09:20 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id d64-20020a37b443000000b0071f0d0aaef7sm367930qkf.80.2023.02.08.18.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 18:09:19 -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 , Krzysztof Kozlowski Subject: [PATCH v5 1/4] dt-bindings: net: Add WCN6855 Bluetooth Date: Wed, 8 Feb 2023 20:09:13 -0600 Message-Id: <20230209020916.6475-2-steev@kali.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209020916.6475-1-steev@kali.org> References: <20230209020916.6475-1-steev@kali.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add bindings for the QTI WCN6855 chipset. Signed-off-by: Steev Klimaszewski Reviewed-by: Krzysztof Kozlowski --- Changes since v4: * None .../net/bluetooth/qualcomm-bluetooth.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml index a6a6b0e4df7a..68f78b90d23a 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml +++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml @@ -23,6 +23,7 @@ properties: - qcom,wcn3998-bt - qcom,qca6390-bt - qcom,wcn6750-bt + - qcom,wcn6855-bt 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 examples: - | From patchwork Thu Feb 9 02:09:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steev Klimaszewski X-Patchwork-Id: 652144 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 A510DC05027 for ; Thu, 9 Feb 2023 02:09:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231580AbjBICJd (ORCPT ); Wed, 8 Feb 2023 21:09:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231518AbjBICJ0 (ORCPT ); Wed, 8 Feb 2023 21:09:26 -0500 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29296C669 for ; Wed, 8 Feb 2023 18:09:22 -0800 (PST) Received: by mail-qt1-x82f.google.com with SMTP id h24so489059qta.12 for ; Wed, 08 Feb 2023 18:09:22 -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=w/RNKXMle4djHebuWC777LOqWlZM6JmXWNlVvHsu6e0=; b=agkYxzWmCplq5Trc6UeZqBwOP3rh1eFFzr3yihXLIsJpehlEY81HSFNh310pG/xUWQ 7jjV8c/p7XWJvdGfB3ZXLYQJfgCMmj9usT4enkFu1tevsssLjQyW5MuiKZi488i05cAu tGkl2YDjsnZ8zPHtC856T7Ry9dL5+MquUC6TZq2dhqEiKztjb0+vxEVapGlhKHTRdXxx LYi236qdbIWfbWS8c1T/CiIW4qT/vkby2tQjf6fK0HaI9+7sXt2GE43m2dMY458O3PD3 kKJoViDVReOT1ryj4uIyMiBVrmJxPy3DxtNLTPZL93J23LDWo7T4PguQSrvdQ2czl6mz JyiA== 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=w/RNKXMle4djHebuWC777LOqWlZM6JmXWNlVvHsu6e0=; b=MJcCJUCjoInbOuTGjHp5nA6RYQKgnbXGEx5Z0D5gtuWJ4P/ylHld+ZkO1oXaKWF3eF b+J26uZE8MrJRW91IzIByBH+dyPZFeAc4fgePaVI0b69dQo2Dxweev96wZy8xJma46i3 8H604XdHGb32KD80tcSoVQ3kT3+W1ArMedLlLndIKL62IMq6vEZR1Rqf1dYPHd9PNYyV TP+NokatSF72XYWoy6+IBKk7yEBwqYO1wQNqr8xTC4Ii/Kjmh8Y4n9mlJbzl6y3rZdC+ 0ubh1riww/4+m5UD4zl3YBAlMiojhraM0Uu8wS4nHym/dH/fAQiKYdn9HjAhSNfo+5mx XKFw== X-Gm-Message-State: AO0yUKWFbxFasvSoDiY0e7e7wqCnxk+RuINNIW9ildAzg25DjuZea8E6 vwn2xJ/256/b1Zy4KTY5dy3v2w== X-Google-Smtp-Source: AK7set+kTO5ixNksdDd9ZCCOom5fO1vHr9mpMe+3oJXsJO/Ir1P8HmxGERCXi7gNzxsg8k49dBVong== X-Received: by 2002:ac8:7e87:0:b0:3b9:b619:42c1 with SMTP id w7-20020ac87e87000000b003b9b61942c1mr17309074qtj.27.1675908561276; Wed, 08 Feb 2023 18:09:21 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id ew12-20020a05622a514c00b003b86a6449b8sm327360qtb.85.2023.02.08.18.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 18:09:20 -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 , Tim Jiang Subject: [PATCH v5 2/4] Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6855 Date: Wed, 8 Feb 2023 20:09:14 -0600 Message-Id: <20230209020916.6475-3-steev@kali.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209020916.6475-1-steev@kali.org> References: <20230209020916.6475-1-steev@kali.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Added regulators,GPIOs and changes required to power on/off wcn6855. Added support for firmware download for wcn6855. Signed-off-by: Steev Klimaszewski Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson --- Changes since v4: * Remove unused firmware check because we don't have mbn firmware. * Set qcadev->init_speed if it hasn't been set. Changes since v3: * drop unused regulators Changes since v2: * drop unnecessary commit info Changes since v1: * None drivers/bluetooth/btqca.c | 9 ++++++- drivers/bluetooth/btqca.h | 10 ++++++++ drivers/bluetooth/hci_qca.c | 50 ++++++++++++++++++++++++++++--------- 3 files changed, 56 insertions(+), 13 deletions(-) diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index c9064d34d830..2f9d8bd27c38 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -614,6 +614,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, config.type = ELF_TYPE_PATCH; snprintf(config.fwname, sizeof(config.fwname), "qca/msbtfw%02x.mbn", rom_ver); + } else if (soc_type == 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 +651,9 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, else if (soc_type == QCA_WCN6750) snprintf(config.fwname, sizeof(config.fwname), "qca/msnv%02x.bin", rom_ver); + else if (soc_type == 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 +678,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, case QCA_WCN3991: case QCA_WCN3998: case QCA_WCN6750: + case QCA_WCN6855: hci_set_msft_opcode(hdev, 0xFD70); break; default: @@ -685,7 +692,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, return err; } - if (soc_type == QCA_WCN3991 || soc_type == QCA_WCN6750) { + if (soc_type == QCA_WCN3991 || soc_type == QCA_WCN6750 || soc_type == QCA_WCN6855) { /* get fw build info */ err = 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, }; #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 == QCA_WCN6750; } +static inline bool qca_is_wcn6855(enum qca_btsoc_type soc_type) +{ + return soc_type == QCA_WCN6855; +} #else @@ -206,6 +211,11 @@ static inline bool qca_is_wcn6750(enum qca_btsoc_type soc_type) return false; } +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..efc1c0306b4e 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -605,8 +605,7 @@ static int qca_open(struct hci_uart *hu) if (hu->serdev) { qcadev = serdev_device_get_drvdata(hu->serdev); - if (qca_is_wcn399x(qcadev->btsoc_type) || - qca_is_wcn6750(qcadev->btsoc_type)) + if (!(qcadev->init_speed)) hu->init_speed = qcadev->init_speed; if (qcadev->oper_speed) @@ -1317,7 +1316,8 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate) /* 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 +1394,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; @@ -1682,7 +1683,8 @@ static int qca_power_on(struct hci_dev *hdev) return 0; if (qca_is_wcn399x(soc_type) || - qca_is_wcn6750(soc_type)) { + qca_is_wcn6750(soc_type) || + qca_is_wcn6855(soc_type)) { ret = qca_regulator_init(hu); } else { qcadev = serdev_device_get_drvdata(hu->serdev); @@ -1723,7 +1725,8 @@ static int qca_setup(struct hci_uart *hu) bt_dev_info(hdev, "setting up %s", qca_is_wcn399x(soc_type) ? "wcn399x" : - (soc_type == QCA_WCN6750) ? "wcn6750" : "ROME/QCA6390"); + (soc_type == QCA_WCN6750) ? "wcn6750" : + (soc_type == QCA_WCN6855) ? "wcn6855" : "ROME/QCA6390"); qca->memdump_state = QCA_MEMDUMP_IDLE; @@ -1735,7 +1738,8 @@ static int qca_setup(struct hci_uart *hu) clear_bit(QCA_SSR_TRIGGERED, &qca->flags); 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); @@ -1757,7 +1761,8 @@ static int qca_setup(struct hci_uart *hu) } 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 = qca_read_soc_version(hdev, &ver, soc_type); if (ret) @@ -1883,6 +1888,20 @@ static const struct qca_device_data qca_soc_data_wcn6750 = { .capabilities = QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES, }; +static const struct qca_device_data qca_soc_data_wcn6855 = { + .soc_type = QCA_WCN6855, + .vregs = (struct qca_vreg []) { + { "vddio", 5000 }, + { "vddbtcxmx", 126000 }, + { "vddrfacmn", 12500 }, + { "vddrfa0p8", 102000 }, + { "vddrfa1p7", 302000 }, + { "vddrfa1p2", 257000 }, + }, + .num_vregs = 6, + .capabilities = QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES, +}; + static void qca_power_shutdown(struct hci_uart *hu) { struct qca_serdev *qcadev; @@ -2047,7 +2066,8 @@ static int qca_serdev_probe(struct serdev_device *serdev) 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 = data->soc_type; qcadev->bt_power = devm_kzalloc(&serdev->dev, sizeof(struct qca_power), @@ -2067,14 +2087,18 @@ static int qca_serdev_probe(struct serdev_device *serdev) qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable", GPIOD_OUT_LOW); - if (IS_ERR_OR_NULL(qcadev->bt_en) && data->soc_type == QCA_WCN6750) { + if (IS_ERR_OR_NULL(qcadev->bt_en) + && (data->soc_type == QCA_WCN6750 || + data->soc_type == QCA_WCN6855)) { dev_err(&serdev->dev, "failed to acquire BT_EN gpio\n"); power_ctrl_enabled = false; } qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl", GPIOD_IN); - if (IS_ERR_OR_NULL(qcadev->sw_ctrl) && data->soc_type == QCA_WCN6750) + if (IS_ERR_OR_NULL(qcadev->sw_ctrl) + && (data->soc_type == QCA_WCN6750 || + data->soc_type == QCA_WCN6855)) dev_warn(&serdev->dev, "failed to acquire SW_CTRL gpio\n"); qcadev->susclk = devm_clk_get_optional(&serdev->dev, NULL); @@ -2150,7 +2174,8 @@ static void qca_serdev_remove(struct serdev_device *serdev) struct qca_power *power = qcadev->bt_power; 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 +2360,7 @@ static const struct of_device_id qca_bluetooth_of_match[] = { { .compatible = "qcom,wcn3991-bt", .data = &qca_soc_data_wcn3991}, { .compatible = "qcom,wcn3998-bt", .data = &qca_soc_data_wcn3998}, { .compatible = "qcom,wcn6750-bt", .data = &qca_soc_data_wcn6750}, + { .compatible = "qcom,wcn6855-bt", .data = &qca_soc_data_wcn6855}, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, qca_bluetooth_of_match); From patchwork Thu Feb 9 02:09:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steev Klimaszewski X-Patchwork-Id: 652965 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 9B1CFC64EC5 for ; Thu, 9 Feb 2023 02:09:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbjBICJg (ORCPT ); Wed, 8 Feb 2023 21:09:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231556AbjBICJb (ORCPT ); Wed, 8 Feb 2023 21:09:31 -0500 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 606EA265B1 for ; Wed, 8 Feb 2023 18:09:23 -0800 (PST) Received: by mail-qv1-xf31.google.com with SMTP id k4so480317qvu.7 for ; Wed, 08 Feb 2023 18:09:23 -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=D0Kv4X6lak5DdzB8VDtgoIDsMjj+8WEhFUSFDMt/p4c=; b=NWtw/K095wUlwzsXi3OLyilezsTbOrZ9eFy4EpsxxDT6lx8OFpCNBwoog7Ey4fc1BN bXXPONkdvUbK1Q5C3ACw6uFfYQzA3FgjDiuKFDSV8yjAn5T+mNJBrMn8gWb3Eac8Zx1m B33OJcVDgBdXoKuHknSXJzRIoRr9APbrA2D7Jbjl0maKuLUJFfVg7YUMIZqCuSD2VZO1 2XL6DkXn1KLBPaybSssyb9khGmRm+naMqb27BTIKD2Ot32Tsqp3MkS9pTOmcu4FHdSIn jQfBlbz5+Tp9fKELCUTKqEUrarPE6RbcuPqjKLw4AyYlwYlbeXJ1bIteR0BS06MwcGMx 6h0g== 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=D0Kv4X6lak5DdzB8VDtgoIDsMjj+8WEhFUSFDMt/p4c=; b=eRRpxIxTF7ZA1WiWseIuz+98HgKUcI45mbi2nkdY7wwDWgwthdVkEyJqnfcnaRiZki 55F4Dg2/LirwVF61aYQpQbkexTPL1BSrXHjrtNcGIrpnJbPOdNKxLkWqbqyUCAjxZriQ DAAzV+hyNFb6iuqxxzIpMm7tifqahnS9FwF5cZ/5QkJNQTZrfENlyn2gqtag2ju1HLJi AGlBKLY119IsFHZRSJka7WGE/n8wV5arrBw0YngNX2X/5gSFcom8mvzetWXlHy0twF08 3+QjyPFwynPkfDZF2cxnCtva2fwP8YrXePgjmxGBaQ8YjNFGRdb5XFRN7aGhBtNO6UN1 PZkw== X-Gm-Message-State: AO0yUKWQtGgHdgGwXOlywBx9RHwnBBOaaxTIqGBwwAcmitQCG79bsZ1D 2goPXiJXCrnLBQaoWIikp3zguA== X-Google-Smtp-Source: AK7set+CUoNhTzLLRmmU7/Ef/us0Ss4xkGFHu0oL7/h7QJE6lrxUWrxnC4wifjd3JdOqBpBjU13/7Q== X-Received: by 2002:a05:6214:d43:b0:56b:f096:c85 with SMTP id 3-20020a0562140d4300b0056bf0960c85mr17218459qvr.4.1675908562533; Wed, 08 Feb 2023 18:09:22 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id u64-20020ae9d843000000b0071b368cf074sm332913qkf.118.2023.02.08.18.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 18:09:22 -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 v5 3/4] arm64: dts: qcom: sc8280xp: Define uart2 Date: Wed, 8 Feb 2023 20:09:15 -0600 Message-Id: <20230209020916.6475-4-steev@kali.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209020916.6475-1-steev@kali.org> References: <20230209020916.6475-1-steev@kali.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Steev Klimaszewski Reviewed-by: Brian Masney Reviewed-by: Konrad Dybcio Reviewed-by: Johan Hovold --- Changes since v4: * None 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/qcom/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 = "disabled"; }; + uart2: serial@988000 { + compatible = "qcom,geni-uart"; + reg = <0 0x00988000 0 0x4000>; + clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>; + clock-names = "se"; + interrupts = ; + operating-points-v2 = <&qup_opp_table_100mhz>; + power-domains = <&rpmhpd SC8280XP_CX>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>; + interconnect-names = "qup-core", "qup-config"; + status = "disabled"; + }; + i2c3: i2c@98c000 { compatible = "qcom,geni-i2c"; reg = <0 0x0098c000 0 0x4000>; From patchwork Thu Feb 9 02:09:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steev Klimaszewski X-Patchwork-Id: 652966 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 D9768C64EC4 for ; Thu, 9 Feb 2023 02:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231515AbjBICJe (ORCPT ); Wed, 8 Feb 2023 21:09:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231557AbjBICJb (ORCPT ); Wed, 8 Feb 2023 21:09:31 -0500 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A574418A8E for ; Wed, 8 Feb 2023 18:09:24 -0800 (PST) Received: by mail-qv1-xf29.google.com with SMTP id k28so487000qve.5 for ; Wed, 08 Feb 2023 18:09:24 -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=ErEfS9bjsXHZf8zW3eSPIlB6x60rqZJ+hhTJR6OvqGc=; b=fjZV9pIdx9EwPU6LiQEp4Di0RywW13a19YPevr0FjfutfFo/SyYbOvgwAmrwEpSiRj 9kP3ZmTRPSd4sx8NhzFFoLZd7p/bKBzxYwOhPpJfsu9YXpXecb/ohtQwE80BsHvutrBC bYl22uNLgi58lw/P/IPyoMcsw4RmbHrJ/bbnMuSyt8axKjfcFcH5KkWBJpBFTIBeIUak JfQql1C4u8VBaHzgAUxaFDPNLjafXir4BKMWi9uQ/jZxqTDu/d73ra7suflOvSnKo2X+ DdnwMiP+LDzFrHeXV4hyeAPbdg3JZYrgm6UuB6CL9HK71MuPOzV320Cw9chxlQ3SHiO2 MW0Q== 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=ErEfS9bjsXHZf8zW3eSPIlB6x60rqZJ+hhTJR6OvqGc=; b=BaJJBxTorR4fcUMw1LAJiL+9vXf0XpdvivBCnV2ygm1H8K1gqFJzmb2pp4Zd8vz8dN 8WoQdKl2BNBr0MMsiEp5ic53v0/+VyCxLTTKL6nYYom3DU8O5oHfRutIklLdKOvFf4o9 81S/JgIq6Es+L6x0Jh1NypX7WeiM7AbA3qo7YwoU3+mXiPuyaA4MBprKi4hMRJTwj8vD omLAtCYuAvNPuOLCvSt0zj2pv9S+jxbeG5MjpSxGTxX9ImysV8cZ9aZOmb0mV9uCBLcR DZPSAjWMZB5mqVgxzDdxFHT6413EgC4yr+bq2lTac0MyeBAVz1sWwd5oB53hqUcM82tE +BwA== X-Gm-Message-State: AO0yUKXRKKObneq9LiBl/Gghq3C6knTIUGfLkr27b0Jj22q+MQTTFydz 3WR7Z1FkWa9bbduQVGVDn1Uv1w== X-Google-Smtp-Source: AK7set8hh8Lu1pnPRIR1M8xWEO62IR7mHbVlghjQdpH418aIHEOCN0LcujGzRFyAhy5HaEClqjiINQ== X-Received: by 2002:ad4:5b87:0:b0:545:fe7f:437a with SMTP id 7-20020ad45b87000000b00545fe7f437amr13502008qvp.0.1675908564289; Wed, 08 Feb 2023 18:09:24 -0800 (PST) Received: from localhost (23-118-233-243.lightspeed.snantx.sbcglobal.net. [23.118.233.243]) by smtp.gmail.com with ESMTPSA id o186-20020a37bec3000000b007208a81e11esm398544qkf.41.2023.02.08.18.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 18:09:23 -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 v5 4/4] arm64: dts: qcom: thinkpad-x13s: Add bluetooth Date: Wed, 8 Feb 2023 20:09:16 -0600 Message-Id: <20230209020916.6475-5-steev@kali.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209020916.6475-1-steev@kali.org> References: <20230209020916.6475-1-steev@kali.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, add this. Signed-off-by: Steev Klimaszewski Link: https://lore.kernel.org/r/20230207052829.3996-5-steev@kali.org --- Changes since v4: * Address Konrad's review comments. 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/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index f936b020a71d..ad20cfb3a830 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 = &i2c4; i2c21 = &i2c21; + serial0 = &uart17; + serial1 = &uart2; }; wcd938x: audio-codec { @@ -297,6 +299,15 @@ pmc8280c-rpmh-regulators { qcom,pmic-id = "c"; vdd-bob-supply = <&vreg_vph_pwr>; + vreg_s1c: smps1 { + regulator-name = "vreg_s1c"; + regulator-min-microvolt = <1880000>; + regulator-max-microvolt = <1900000>; + regulator-allowed-modes = , + ; + regulator-allow-set-load; + }; + vreg_l1c: ldo1 { regulator-name = "vreg_l1c"; regulator-min-microvolt = <1800000>; @@ -712,6 +723,32 @@ &qup0 { status = "okay"; }; +&uart2 { + pinctrl-0 = <&uart2_state>; + pinctrl-names = "default"; + + status = "okay"; + + bluetooth { + compatible = "qcom,wcn6855-bt"; + + vddio-supply = <&vreg_s10b>; + vddbtcxmx-supply = <&vreg_s12b>; + vddrfacmn-supply = <&vreg_s12b>; + vddrfa0p8-supply = <&vreg_s12b>; + vddrfa1p2-supply = <&vreg_s11b>; + vddrfa1p7-supply = <&vreg_s1c>; + + max-speed = <3200000>; + + enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>; + swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&bt_en>; + pinctrl-names = "default"; + }; +}; + &qup1 { status = "okay"; }; @@ -720,6 +757,11 @@ &qup2 { status = "okay"; }; +&uart17 { + compatible = "qcom,geni-debug-uart"; + status = "okay"; +}; + &remoteproc_adsp { firmware-name = "qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn"; @@ -980,6 +1022,19 @@ hastings_reg_en: hastings-reg-en-state { &tlmm { gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; + bt_en: bt-en-state { + hstp-sw-ctrl-pins { + pins = "gpio132"; + function = "gpio"; + }; + + hstp-bt-en-pins { + pins = "gpio133"; + function = "gpio"; + drive-strength = <16>; + }; + }; + edp_reg_en: edp-reg-en-state { pins = "gpio25"; function = "gpio"; @@ -1001,6 +1056,27 @@ i2c4_default: i2c4-default-state { bias-disable; }; + uart2_state: uart2-state { + cts-pins { + pins = "gpio122"; + function = "qup2"; + bias-disable; + }; + + rts-tx-pins { + pins = "gpio122", "gpio123"; + function = "qup2"; + drive-strength = <2>; + bias-disable; + }; + + rx-pins { + pins = "gpio124"; + function = "qup2"; + bias-pull-up; + }; + }; + i2c21_default: i2c21-default-state { pins = "gpio81", "gpio82"; function = "qup21";