From patchwork Mon Sep 30 10:30:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13815826 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C4A118CBF5 for ; Mon, 30 Sep 2024 10:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727692257; cv=none; b=cnyZA2oKF+rEBTByPQpGBwWSKys1MY4kPYQpQ4XYES9E8XCyJsKNYRH6awpv0E79pJ5tyAcVqB/lKaAN1ihtIN/01GZL1rkIewZ9Uckj/sGReaqR76tzwBwapRdXoml+kavGTWnD7Qgn4PU1sgOd9WIPSUt/BVNE9gF+wnWZA8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727692257; c=relaxed/simple; bh=XqjaR/d+4nA4AF+LZTpoGqHhkUJy91Jwj67qG0Wq6ho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=imGc+QzeFN/JTpN6liOCSeYVf+0+op0XiWPBl7MPd+DeZjbWiCFwwkvK/zEd/2cZbzyZX069oIPDHk4You08TXjoHqa0VZoQVBe3MzL7i3sYQLnBUQDXgJxvMRXOL8ZkefUMX0Tn0x+sG1NILDpT+//b6RHCR8VY+kNKApHxZ24= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=uABbopjg; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl 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="uABbopjg" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-37cce5b140bso2725899f8f.3 for ; Mon, 30 Sep 2024 03:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1727692255; x=1728297055; 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=GW/QJNJ8nNrd40FA3cHMy88AWtEH7wB7y90tYnC9J0E=; b=uABbopjgU3TU22EVUdZgwKgeeTdkJmVxWGCmndtiBemCcIGDGE5JV/WDqG9ACbxmgZ 2e3ARk5ltRmOgpsNTuxMRKLk/Dm0UvyaJCWXFCkrscPGUrJkBoOumFejGiXhKDnsjVc3 m0LB8ZIymOcuJS13NWl838sTXeoiCmXLxY8kyUWYxp80XabSkZz/fdZg+ueGNuEhtsCx TpZFdzDxFr3Z3nfzvvYxEWH1EsjFoO/plKQxfcZY+jwBmjM/JDdkOv8e/5nqEjHjbGIf +lg8TP0tzMWalOmGgvr7/E8Bk6US6fD1GvlyXKfO7cX01BeJrvzWxAzmqVqRad7NFdyd P6Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727692255; x=1728297055; 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=GW/QJNJ8nNrd40FA3cHMy88AWtEH7wB7y90tYnC9J0E=; b=MgEOYp6r4JDnXLZc5H1gCpAshtGfrD/SrJTqlNK531XXt6aM02vXbuOUwCLwPwaONa 53/+RVqTtB+pcsn8jgCaBjJW5fe2y4A5AzHNGW6F/MVIBZUaE3xsX0OsygE6dbCwLUk0 e8l1VRupYmhtoy6qI8kGhknC3BOwg+bUWo2qWKbW2TQBLNfxb3r2hIlMINZqlRcsiF50 MKOkewsydFkq9IH+/d7lLyJmkV8gGhtTQTlpPwFgjdEskdr8eQX6ojuwE4dxwZK0GprQ CDhB6xIoQGVSE2nscbqSjvx7cc4FD0sdrmGPZi424DHe1JBzgPC1ipf/uaEFqkEYW/E/ 8zjg== X-Gm-Message-State: AOJu0YwxJ4WcuqyL236K24WIgEvY4uSz19qs5370x/niLC4GqaH2YCsa i/k3iCm2FQh3w6pTECbcT2Ql4DHk2jBKfKCxaAgzehyvM2YhtByCLXXMC5sACmIMuFOCy2b8MCZ y X-Google-Smtp-Source: AGHT+IFT/KiDXB2vyRF0VhSogHyTD4Xzls+HpKnh4lVIK6Ax8vju52xL/HVQuWpE1ertMMwB1PhjVQ== X-Received: by 2002:a5d:6791:0:b0:37c:d001:856d with SMTP id ffacd0b85a97d-37cd5b106d5mr6051416f8f.42.1727692254562; Mon, 30 Sep 2024 03:30:54 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:8791:e3e5:a9ca:31a6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd55a5414sm8835051f8f.0.2024.09.30.03.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 03:30:53 -0700 (PDT) From: Bartosz Golaszewski To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kalle Valo Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Steev Klimaszewski Subject: [PATCH v4 3/3] arm64: dts: qcom: sc8280xp-x13s: model the PMU of the on-board wcn6855 Date: Mon, 30 Sep 2024 12:30:39 +0200 Message-ID: <20240930103041.49229-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240930103041.49229-1-brgl@bgdev.pl> References: <20240930103041.49229-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 Add a node for the PMU of the WCN6855 and rework the inputs of the wifi and bluetooth nodes to consume the PMU's outputs. With this we can drop the regulator-always-on properties from vreg_s11b and vreg_s12b as they will now be enabled by the power sequencing driver. Tested-by: Steev Klimaszewski # Thinkpad X13s Signed-off-by: Bartosz Golaszewski --- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 100 +++++++++++++++--- 1 file changed, 86 insertions(+), 14 deletions(-) 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 6a28cab97189..7230d5420199 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -400,6 +400,67 @@ usb1_sbu_mux: endpoint { }; }; }; + + wcn6855-pmu { + compatible = "qcom,wcn6855-pmu"; + + pinctrl-0 = <&bt_default>, <&wlan_en>; + pinctrl-names = "default"; + + wlan-enable-gpios = <&tlmm 134 GPIO_ACTIVE_HIGH>; + bt-enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>; + + vddio-supply = <&vreg_s10b>; + vddaon-supply = <&vreg_s12b>; + vddpmu-supply = <&vreg_s12b>; + vddrfa0p95-supply = <&vreg_s12b>; + vddrfa1p3-supply = <&vreg_s11b>; + vddrfa1p9-supply = <&vreg_s1c>; + vddpcie1p3-supply = <&vreg_s11b>; + vddpcie1p9-supply = <&vreg_s1c>; + + regulators { + vreg_pmu_rfa_cmn_0p8: ldo0 { + regulator-name = "vreg_pmu_rfa_cmn_0p8"; + }; + + vreg_pmu_aon_0p8: ldo1 { + regulator-name = "vreg_pmu_aon_0p8"; + }; + + vreg_pmu_wlcx_0p8: ldo2 { + regulator-name = "vreg_pmu_wlcx_0p8"; + }; + + vreg_pmu_wlmx_0p8: ldo3 { + regulator-name = "vreg_pmu_wlmx_0p8"; + }; + + vreg_pmu_btcmx_0p8: ldo4 { + regulator-name = "vreg_pmu_btcmx_0p8"; + }; + + vreg_pmu_pcie_1p8: ldo5 { + regulator-name = "vreg_pmu_pcie_1p8"; + }; + + vreg_pmu_pcie_0p9: ldo6 { + regulator-name = "vreg_pmu_pcie_0p9"; + }; + + vreg_pmu_rfa_0p8: ldo7 { + regulator-name = "vreg_pmu_rfa_0p8"; + }; + + vreg_pmu_rfa_1p2: ldo8 { + regulator-name = "vreg_pmu_rfa_1p2"; + }; + + vreg_pmu_rfa_1p7: ldo9 { + regulator-name = "vreg_pmu_rfa_1p7"; + }; + }; + }; }; &apps_rsc { @@ -426,7 +487,6 @@ vreg_s11b: smps11 { regulator-min-microvolt = <1272000>; regulator-max-microvolt = <1272000>; regulator-initial-mode = ; - regulator-always-on; }; vreg_s12b: smps12 { @@ -434,7 +494,6 @@ vreg_s12b: smps12 { regulator-min-microvolt = <984000>; regulator-max-microvolt = <984000>; regulator-initial-mode = ; - regulator-always-on; }; vreg_l1b: ldo1 { @@ -927,6 +986,16 @@ wifi@0 { compatible = "pci17cb,1103"; reg = <0x10000 0x0 0x0 0x0 0x0>; + vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>; + vddaon-supply = <&vreg_pmu_aon_0p8>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p8>; + vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>; + vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>; + vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>; + vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>; + qcom,ath11k-calibration-variant = "LE_X13S"; }; }; @@ -1258,20 +1327,16 @@ &uart2 { 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>; + vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>; + vddaon-supply = <&vreg_pmu_aon_0p8>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p8>; + vddbtcmx-supply = <&vreg_pmu_btcmx_0p8>; + vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>; + vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>; max-speed = <3200000>; - - enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>; - swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>; - - pinctrl-0 = <&bt_default>; - pinctrl-names = "default"; }; }; @@ -1761,4 +1826,11 @@ reset-pins { bias-disable; }; }; + + wlan_en: wlan-en-state { + pins = "gpio134"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; };