From patchwork Tue Dec 5 11:09:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13479959 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="jWKEf0Ve" Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBFFE9A for ; Tue, 5 Dec 2023 03:09:13 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40c0a074e71so21386585e9.1 for ; Tue, 05 Dec 2023 03:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1701774552; x=1702379352; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QEX8g9ws8pSAca/CRdznAgAd77RiybUJhIDkQ8ekvP4=; b=jWKEf0VeXDkMSYAdZy1IKtXAT0G3ERckDws1B66P7aBJaQW8NSj5myftgwYuV4JetS aaObN9fFWVJnWpoHgI0pGLz2IN9gvYeSLuAfZGL7xaJNC0jwspPftZ3yDDU1WymFm4WK vcDYN+BMgTw0vwcxZ08d2EYBvVHrq/QDbAu6uF+OeGynKJQyHQMfWfZWO0phRg5j2vCL phf5EiRfwexzAqzKT+aFGulJaRMWsvMJT17+ek8xXW4tUyr6NFE2ZA+NqljowmuSgztq AldNhrI2a1eOGbcyOWBeOXnDQn0aY5pZprcboAzrPfTO6VsHu+3WVeck8K8yjRPsBrxO LTlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701774552; x=1702379352; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QEX8g9ws8pSAca/CRdznAgAd77RiybUJhIDkQ8ekvP4=; b=JGxhpn9954gdmzhB0ZKpjZ73+nm5k7yuvbUmkyknkgjwmYfG5F/tbW3VkPAYfeayyr t4R1qUKKVNm1RTlRZalrU0z8hu6NzqOq8T/QdpKVX8qvPUuorx6Yv0vfcfs7CdH4TwH0 PiieuqGoaN+k6MMmZy9gaziu1K/IVgcejI+8yJ3ZG5zaMrFI6tRrMLCt2mJC6nKIn6E9 yyuQ5xU26iyI+oScRSFTBk1Cjye4rcdaJHsF0s3H/pc5MY6flS7Doguu/wtvwukkaXaW jfHUn7tC9JtKoxu++7kiMw0EtkGbf0ql3jps/1ySgrHLCF5vbGIJkoyGqeIblW4d3a0p 9eqA== X-Gm-Message-State: AOJu0Yyuix5XceytFOv8sExrypS349IbFA8xnjwaPJwIYtftSk2OwWJh gk5zALRJr/nVPA6UamtBIaIBSg== X-Google-Smtp-Source: AGHT+IFsmkGKbKmqRWIAo7hIqZj481lJ2ZLH43Zbo45JEUbbEWAXMQs+nOh6tadL86/0jGr3nEynVQ== X-Received: by 2002:a05:600c:4506:b0:40b:37ef:3671 with SMTP id t6-20020a05600c450600b0040b37ef3671mr4501417wmo.38.1701774552298; Tue, 05 Dec 2023 03:09:12 -0800 (PST) Received: from brgl-build.home ([2a01:cb1d:334:ac00:2efb:ffdf:fa22:d5ee]) by smtp.gmail.com with ESMTPSA id o18-20020a05600c4fd200b0040b45282f88sm21798166wmq.36.2023.12.05.03.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:09:11 -0800 (PST) From: Bartosz Golaszewski To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Alex Elder , Srini Kandagatla , Bjorn Andersson Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 1/2] Bluetooth: qca: add regulators for QCA6390 Date: Tue, 5 Dec 2023 12:09:02 +0100 Message-Id: <20231205110903.68898-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bartosz Golaszewski Add regulators for the QCA6390 module present on the Qualcomm RB5 board. Signed-off-by: Bartosz Golaszewski --- drivers/bluetooth/hci_qca.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 35f74f209d1f..7f25931a946e 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -2044,7 +2044,15 @@ static const struct qca_device_data qca_soc_data_qca2066 __maybe_unused = { static const struct qca_device_data qca_soc_data_qca6390 __maybe_unused = { .soc_type = QCA_QCA6390, - .num_vregs = 0, + .vregs = (struct qca_vreg []) { + { "vddio", 20000 }, + { "vddaon", 100000 }, + { "vddpmu", 1250000 }, + { "vddrfa1", 200000 }, + { "vddrfa2", 400000 }, + { "vddrfa3", 400000 }, + }, + .num_vregs = 6, }; static const struct qca_device_data qca_soc_data_wcn6750 __maybe_unused = { From patchwork Tue Dec 5 11:09:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13479960 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="AriwKoZq" Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFE17129 for ; Tue, 5 Dec 2023 03:09:14 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40b4746ae3bso51025025e9.0 for ; Tue, 05 Dec 2023 03:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1701774553; x=1702379353; darn=vger.kernel.org; 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=JYTGnhkqGwWYczwtIdABCmZR2C7e/8FCJmHj5tNfaFU=; b=AriwKoZqI3g2eUZ7tfm3UnQesl5Af+lwFZ6KCntpq7857sQoOFEc4F1UzlGt2i0R44 EWW+Uu3JGELbY9dLnpe/ebQ2FlmWVZhfXp3YXv/vL3rZJnvEVJUeAjgcoX4daDeUgBCp Bzcl2MMkgbLGlZOXG49vMR2geRlwsomPptj66AuTOlMWDvMMeaRV6JIGW4N5njCezdw4 RYBVjexYeumMlApt3UnNSKkbAIxSVG3cUA0AGVmSg/kiX12ooKvG9jVMYdTINhHsHWXB T1Es8vluHM6+Y/xtN/x+ggq9rLAKz5fDW+zNQyYuQur7RN7NCeEy2awvJNy+F1SkNGu0 ibgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701774553; x=1702379353; 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=JYTGnhkqGwWYczwtIdABCmZR2C7e/8FCJmHj5tNfaFU=; b=khqFWFrY2pOm3/B2C36HYivL/9KycNAefstKbECUfVi7+Cv+w/R/fAZoWgmrjWuNBm 0szMk27uMZEroBQ0HJrieJh89z6IG6nKsBIgLgdir5h5QYLco0Rimf14XuhRDnRFy7nf Oz2IDEEcw2AfP/OXtqGLrSlLXTcreJdKCoHdPwScqhtclOWNBIqmdLcOKlLVNr2sbeK5 M9PuKLbjL1qPcppY9YRL1BXwyG+8Pxr0Rd40ov/uKkCvFN4ZZMahn42f9NWzZ6bFtS+y rDP9RrmIR3bmomV7sKfdiMhQTkcd/tCULyzLqua/jyISfRGJk5WuSpUM+5Zh5t5D9hbw obXQ== X-Gm-Message-State: AOJu0YymsAHqvbOPlhY661Z0XfSEdSj01N0T9+k63nXo6lesMB+BpTqX 7Sf1rPWocpw9hkD2LUeKsZkiXQ== X-Google-Smtp-Source: AGHT+IFuuXyyJdBBfJwb4MoIOZkXw4s5AF/QSxcpiM9U0ZGQathPtLg2/v3mEvMGLTwB2kEKnfcAxQ== X-Received: by 2002:a05:600c:3ba3:b0:40b:5e21:cc23 with SMTP id n35-20020a05600c3ba300b0040b5e21cc23mr347905wms.78.1701774553286; Tue, 05 Dec 2023 03:09:13 -0800 (PST) Received: from brgl-build.home ([2a01:cb1d:334:ac00:2efb:ffdf:fa22:d5ee]) by smtp.gmail.com with ESMTPSA id o18-20020a05600c4fd200b0040b45282f88sm21798166wmq.36.2023.12.05.03.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:09:12 -0800 (PST) From: Bartosz Golaszewski To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Alex Elder , Srini Kandagatla , Bjorn Andersson Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/2] Bluetooth: qca: run the power-on/off sequence for QCA6390 too Date: Tue, 5 Dec 2023 12:09:03 +0100 Message-Id: <20231205110903.68898-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231205110903.68898-1-brgl@bgdev.pl> References: <20231205110903.68898-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bartosz Golaszewski The Bluetooth module on QCA6390 needs to be powered-on by enabling the relevant regulators and driving the enable GPIO high. We can reuse the power sequence for the WNC models. Signed-off-by: Bartosz Golaszewski --- drivers/bluetooth/hci_qca.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 7f25931a946e..351ba904c8c2 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -1788,6 +1788,7 @@ static int qca_power_on(struct hci_dev *hdev) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6390: ret = qca_regulator_init(hu); break; @@ -2137,6 +2138,7 @@ static void qca_power_shutdown(struct hci_uart *hu) case QCA_WCN6750: case QCA_WCN6855: + case QCA_QCA6390: gpiod_set_value_cansleep(qcadev->bt_en, 0); msleep(100); qca_regulator_disable(qcadev); @@ -2284,6 +2286,7 @@ static int qca_serdev_probe(struct serdev_device *serdev) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6390: qcadev->bt_power = devm_kzalloc(&serdev->dev, sizeof(struct qca_power), GFP_KERNEL); @@ -2394,6 +2397,7 @@ static void qca_serdev_remove(struct serdev_device *serdev) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6390: if (power->vregs_on) { qca_power_shutdown(&qcadev->serdev_hu); break;