Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2210248rdb; Fri, 8 Dec 2023 01:11:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbO7pldAwgO8wcRyIEyoWYLT8047hUsro6QMwXyQoEhzfScx6GWTUkJnAEPy2WLIPaRw11 X-Received: by 2002:a17:906:8924:b0:a19:a1ba:bae1 with SMTP id fr36-20020a170906892400b00a19a1babae1mr958129ejc.135.1702026677527; Fri, 08 Dec 2023 01:11:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702026677; cv=none; d=google.com; s=arc-20160816; b=hYDjcHKwi0JHb/0r/w2zQX4r34dffmNdXnUNDcUlNDvwk8OEAS0+Jo5PdaaV28aBda +2ZDSdlU+gOBIM3aDXMFqHmYPRHhVVSkVwNCVz38SYRTkE+H4aSAU5+IWXH6KENFGWpi /6XYLqLy4AiCK4blqt1BJG0yt6Dy0V1i00HJ5s6Y8DjH2BRStvJWdPkBpCubDSnGNon4 EFzsFFGfvHD7OHvNDW78iQk0ztgDIBL+STtvJzay+5pIFhhEmeIRycnNxZc6gyuKqcns xNkTQWqeGN5nhfltAGKEHQ3PMgXxrMXBAIjauILfzHhQOvIvvPjlCQeRB1QkrYd3v02A tpfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=abIGam56kSZ3DhSDuEO3BjQb5HXWW5MMfEQ3kw2b1bA=; fh=HHVB30jlvFnoQOhzrw1Ya7kgTDr+YCyCKwQ/53LbKBk=; b=Ruv8C3Ks4jQ8VVM8DgZ99zvauZ9F9Dr5WhO6G4fKsmyzqrzomeqSeLumi0656drt7k zLnCIs1Vk8zM2FVuUmWMjtrJiC8bYPJ4TZX9HGp/zaJHS1zre/Nuu31xabWQpCw1VImU OwbN1rV1Dqwn4uS0oyBGsyBAwa2gjii2ytaq8vrPUNj2GUw4sQ47udx13PpWD1uw10G7 3qCm992hsAxY9HuzqjeWdRJs8b0dJ/KVCSBQy9CnDZYwgYtw8/89PCPmsY3iu3GifkIi UKsxLN7/yBucsHXlMoqe0Czty4a5nn5E+73mBDe22G6zz5AHbAuLpuZNKy92BslNM01l 1xjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=oePBDBDJ; spf=pass (google.com: domain of linux-bluetooth+bounces-457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-457-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v16-20020a1709064e9000b009fc964945cdsi630750eju.62.2023.12.08.01.11.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 01:11:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=oePBDBDJ; spf=pass (google.com: domain of linux-bluetooth+bounces-457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-457-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 481AF1F20EC4 for ; Fri, 8 Dec 2023 09:11:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34222134A5; Fri, 8 Dec 2023 09:10:43 +0000 (UTC) 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="oePBDBDJ" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E27891987 for ; Fri, 8 Dec 2023 01:10:36 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3332fc9b9b2so1710243f8f.1 for ; Fri, 08 Dec 2023 01:10:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1702026635; x=1702631435; 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=abIGam56kSZ3DhSDuEO3BjQb5HXWW5MMfEQ3kw2b1bA=; b=oePBDBDJ0hWA47MUtbrdqGt8RXbD6BJlZOhrNvbdepjE2sd1ueDG6RspnS2QDJ0vik w2MQXu87pC/opdB+1sp98DShtYdppLC8UaGWiEyCIeEA8XQOr1Jo/FWf7GAClzaXiJab /wNTXn/yhR6GNjtxCKorxufU/rjkeIDnEoQ3RHIU0rPSpRtSdALJnMOSLd3lIRaR2Hjo 3YTXYVjdkYpPGRR0xz0GYTdKb+LMzD9a5nDZLvpU2n+3LGcec0xnyahBf/Z28QXgdcWg 25Gh+/JbNRtY5RFF5xAeXZWmyDj8OQ7f4QdPKix+X1u9zridv9IKVPkJiWzyyPz+DQqa y+HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702026635; x=1702631435; 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=abIGam56kSZ3DhSDuEO3BjQb5HXWW5MMfEQ3kw2b1bA=; b=uzPRGX7R81sIMFG4ypTWdUq0M9GeplZRnUXALQiwPB5vpP8Wxdq75oZ2EGLH/UWtkj vV27Z0CqsKuG8WZdTymJmygsov/qvqwI5lAUw+TUhm8Lv+FOeiyiU7/72qSPxNqvrr9N zXfbxyeHLSB9Qa39sFW/PxMGZL/1v2qwASaa38+F7LAeB99Dz2o527oHXZAYwcuRXLF9 iptqI2c1HjED60pzmYAERiorB+eMHhYLSqpuVet4xGWU/DsOG8lkWMf29OxdhO6Eeobn eNetYip8vLeMq3U3fEVZHYC5USqVA2HhPRd0u65aFC8oSB/ezrOugQEIqBh8suESUoiS rjAA== X-Gm-Message-State: AOJu0YzNUAXCfHbMWpyl9Hjr6lEkyE27mWYX9FVZSvZztLHxjBBEGgJu ckyUtpIHXDKwNLS+nZZVjImDFg== X-Received: by 2002:a5d:668a:0:b0:333:4635:c914 with SMTP id l10-20020a5d668a000000b003334635c914mr1260391wru.82.1702026635358; Fri, 08 Dec 2023 01:10:35 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:b162:2510:4488:c0c3]) by smtp.gmail.com with ESMTPSA id a18-20020a5d5092000000b00333415503a7sm1572705wrt.22.2023.12.08.01.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 01:10:35 -0800 (PST) From: Bartosz Golaszewski To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Balakrishna Godavarthi , Rocky Liao , Alex Elder , Srini Kandagatla Cc: linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bartosz Golaszewski Subject: [RESEND PATCH v2 3/3] Bluetooth: qca: run the power-on/off sequence for QCA6390 too Date: Fri, 8 Dec 2023 10:09:36 +0100 Message-Id: <20231208090936.27769-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231208090936.27769-1-brgl@bgdev.pl> References: <20231208090936.27769-1-brgl@bgdev.pl> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 if we add the list of required regulators to the OF match data. Signed-off-by: Bartosz Golaszewski --- drivers/bluetooth/hci_qca.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 35f74f209d1f..b27be08a1f6f 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; @@ -2044,7 +2045,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 }, + { "vddrfa0p9", 200000 }, + { "vddrfa1p3", 400000 }, + { "vddrfa1p9", 400000 }, + }, + .num_vregs = 6, }; static const struct qca_device_data qca_soc_data_wcn6750 __maybe_unused = { @@ -2129,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); @@ -2276,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); @@ -2386,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; -- 2.40.1