From patchwork Thu Sep 5 12:20:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13792242 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 82CA319CD00 for ; Thu, 5 Sep 2024 12:20:34 +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=1725538837; cv=none; b=POi9YvkrWlWGfKjmBXazPd9ZXeV0RLSC2dQ1zThcgcYBvbadW7gxyPZt7OcXBVOv1eav4BlImom4V65Np5lGyz1lYTGVDQsLUHvDGJHfAwJ3lbgAY1+v24poaDK1zM55VJQIQeUkyCm1gR18sgmh1XlXzl2st7u/MjwfOLN0uxc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725538837; c=relaxed/simple; bh=3YkcNdTuH2BNB3aXrM0k72d5bdf3IYnXOqSVW769DrU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mnr0lx1pkkAY/U2S4NTR3brrhbyXvSx84vAJLHMUbuGw+/RQ+EFc9ocsIhhkuSaFdkn/H+n1pb/IQiaKAwt/y8p9O9bN0D3IuZgN4mLjINqqF52MvAUkLDWjWDTJ9tZaZLwf5bk4A8iaGciJ9Qp8FsfD7IxlRfuqmenCU7E7rB4= 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=cJYmV7SF; 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="cJYmV7SF" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-374c3400367so539977f8f.2 for ; Thu, 05 Sep 2024 05:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1725538833; x=1726143633; 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=0FKIL2ENTZ1qxcIeIMkrn1CZ80wzkUZZogr0uY17bLs=; b=cJYmV7SFtC6eHJIKkNSAAjddtU5tiX/rd8auKCvpaGxgXwjtgwxTMytFu6NgrIJYjz Y87Y9cPulsGfidM16Is31JDMmo/WhO45Tr4VCn4RZ7PtE5xJU0wA8PeoY/Aq9L64yOit LHZCGMo5bjctmZJoe4lNz4i+Y1qy/b3bSqAnz8tqopwN0yFcJsrg96inZkuMTBQDwfTD wRBZdXlPohZrK9aExV2XkC3LO2jgqouU9velYRn4hZ1HgFIPH2/tf155GYXSap08tH96 XNe1tMX3sGHZA/V1vg7oVxKWoB9k9Gzo9qdNLwj4ci/CZQuLSH57Nan1dmL0U5FCu4Wq juSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725538833; x=1726143633; 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=0FKIL2ENTZ1qxcIeIMkrn1CZ80wzkUZZogr0uY17bLs=; b=BpybSP5xLAcVoqYq/p4cHjv39+NFDfIrZ/jdN0CQr/QsZeWWVxGT2RDUmPuYVV09Pb o6Y2TEntwpo+eNmcGp7Pq5ff51W+Cil+fm4LUGRVhf2lZiWN4cAI2I4dm3m7yJahPkx7 dKx78TxL2UD47vXuLcqGNVaCSMFeBPcOJvXo5cqxk9ba896lDmm5QVj+1n2sasPuvFC9 uVFwUFQV1ooMBh3P1iQpAR70j7HEbtTnnml/bZk6yCzooWv6WGOWro76QML/qPDvXMs1 mmwO/s7pWoZprixlhDACgoFteshMo4u4n1GfEAJ9opkQI3Inoyy4fNIFRRp9NFkofk5d 6swA== X-Gm-Message-State: AOJu0YwcJgqrPK2wMKPnUeG1EXTHiMiwvpXY9MtJJB+vunYnMSgIfq6n rBtBwDxazToPDjFdniVpfqwgVkyEegncW+Z6hco56kc07v9TonBiVhAF9v2lqJw= X-Google-Smtp-Source: AGHT+IFcrIB7wqkqdlSnb4VREvlQ5k44pYR0TlXo93JJcaU5dz9Xm5w3qv0j/EEkwTIuRFlY9H9DpQ== X-Received: by 2002:a5d:570e:0:b0:374:c318:2190 with SMTP id ffacd0b85a97d-374c3182363mr10714571f8f.59.1725538832762; Thu, 05 Sep 2024 05:20:32 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:cbe4:ce99:cb33:eb1c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374be2edf08sm14645764f8f.6.2024.09.05.05.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 05:20:32 -0700 (PDT) From: Bartosz Golaszewski To: Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 1/4] arm64: dts: qcom: sc8280xp-crd: model the PMU of the on-board wcn6855 Date: Thu, 5 Sep 2024 14:20:19 +0200 Message-ID: <20240905122023.47251-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240905122023.47251-1-brgl@bgdev.pl> References: <20240905122023.47251-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: Konrad Dybcio Add nodes for the WCN6855 PMU, the WLAN module and relevant regulators and pin functions to fully describe how the wifi is actually wired on this platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio [Bartosz: - write the commit message, - rebase Konrad's commit, - fix one of the supplies' name] Co-developed-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 108 ++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 6020582b0a59..1f533c0d49ea 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -177,6 +177,17 @@ vreg_misc_3p3: regulator-misc-3p3 { regulator-always-on; }; + vreg_s10b: regulator-s10b { + compatible = "regulator-fixed"; + + regulator-name = "VREG_S10B"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + regulator-always-on; + regulator-boot-on; + }; + vreg_wlan: regulator-wlan { compatible = "regulator-fixed"; @@ -260,6 +271,66 @@ usb1_sbu_mux: endpoint { }; }; }; + + wcn6855-pmu { + compatible = "qcom,wcn6855-pmu"; + + pinctrl-0 = <&wlan_en>; + pinctrl-names = "default"; + + wlan-enable-gpios = <&tlmm 134 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 { @@ -276,6 +347,13 @@ vreg_s11b: smps11 { regulator-initial-mode = ; }; + vreg_s12b: smps12 { + regulator-name = "vreg_s12b"; + regulator-min-microvolt = <984000>; + regulator-max-microvolt = <984000>; + regulator-initial-mode = ; + }; + vreg_l3b: ldo3 { regulator-name = "vreg_l3b"; regulator-min-microvolt = <1200000>; @@ -304,6 +382,13 @@ regulators-1 { compatible = "qcom,pm8350c-rpmh-regulators"; qcom,pmic-id = "c"; + vreg_s1c: smps1 { + regulator-name = "vreg_s1c"; + regulator-min-microvolt = <1888000>; + regulator-max-microvolt = <1888000>; + regulator-initial-mode = ; + }; + vreg_l1c: ldo1 { regulator-name = "vreg_l1c"; regulator-min-microvolt = <1800000>; @@ -583,6 +668,23 @@ &pcie4_phy { status = "okay"; }; +&pcie4_port0 { + 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>; + }; +}; + &pmc8280c_lpg { status = "okay"; }; @@ -829,6 +931,12 @@ reset-pins { }; }; + wlan_en: wlan-en-state { + pins = "gpio134"; + function = "gpio"; + bias-pull-down; + }; + nvme_reg_en: nvme-reg-en-state { pins = "gpio135"; function = "gpio"; From patchwork Thu Sep 5 12:20:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13792244 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 28DF119D086 for ; Thu, 5 Sep 2024 12:20:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725538837; cv=none; b=E3JMCGSu5ya7lNg5BaHvoj4n6eZu7SLi3XPfLg+acewN+7KKLPvDkRFXKFrQNInRAWb3c/vfCCM1j1WKdXLEJAkq4KOoj2OUDh/RMPFTUQLGjM51IrJ9DHNtY5FQTQ1gGscHHRj/duJcsfTCOH5vCVX0TSmUvz5NyciOQ/IPg2Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725538837; c=relaxed/simple; bh=fv/FPM4pmmM5KSoZpboIcYP9DA2912Yd9jXwue78gJ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VOafB2xVHIOzIkqNB+vQn/jCe2sBsO9iEPSy0+JyF958Lp5tgctDvxi4yNJKyFSFBefHVD05tyDlClFjyZEfXt5ZnnVSRv2Aui7NamwkAxqW6x8Im2RvWjtNIFX2oo2h6uo0X7JZqiBePGLx1ig+3tgmxaGnsoVjiPwLKvJ2TVc= 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=Tgj8gKhy; arc=none smtp.client-ip=209.85.128.43 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="Tgj8gKhy" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42bbe908380so5804665e9.2 for ; Thu, 05 Sep 2024 05:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1725538834; x=1726143634; 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=NFz8HG1EFFNnkoU8rE7mzZtXM5s35Hdj2ky9Ik6Zogo=; b=Tgj8gKhyyFHnDW80VHaQSJN0Go31Jh2gULGzp/7mo+NEkauzW0xJmtVVH/7QVlfxxR OIJ4J6qqYTcP015NplJbXLwbLtZCHGLepuUN9b/r0EHPR+1Hzvz4SCg+GRylsTvoHC+V +25/iS4fl8JdHtDC7vJDidmJFhNjTLKOdE25NJ4HHgOM0CNHTn9lQzrAD0MtiDikOCK2 vMVFej8gGuRxrkDevpM9CK2HErpcXGemz0/kCPqqnlmScghn6sD5Ie11grbE8X1ieG7/ rvLWl5bOMNsLSJA0OzSgYv4VwEg8uqia6FEIrU+J7mAUHfvFCsfeiMlCWxG8+TsjxT2Q sBVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725538834; x=1726143634; 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=NFz8HG1EFFNnkoU8rE7mzZtXM5s35Hdj2ky9Ik6Zogo=; b=nVUCqH/uAuHw9ctIV8K6x4efRa4q9fDYF50dAu2fmrHkSpJ89qVGEl+qyTzuYsd7N6 zhJ3roLC5LIXiLpZO7Pg7zi4M/GIUEYs2TM8x95GU0t8NFzWUd7MzT83SznpFeaQrc7s +zN2KAaHUpGMmvQbxdAHVepatIqs8BMgwqPSPiWjldtFSk/9Jq6RIgyP2t8Btk97p9GH tFKGCZVi5Owpg+wmFjcmTpiMkv69kW1BJi+/FSpIFJeg6lkDIv2IB/ERFcw/Ak/Ws4OB ZxU2nSYx2+yyDy0EyofZG3uFIfgZP3GkKLwf+fBpFbkhw0Mkq+zo+2t/UZ8TGSf5GHOA /53g== X-Gm-Message-State: AOJu0YyJXE/wmBmnupeP80dU5OnVhyxwcYVifeGQdfU5AZREXK6VMm3M P7Fzz0C9HzXKur25wtCr+HwUuFr1eh1ao2vJYd3XQJvhiSVrDwd4QnbZRmsSg0F1o2VDhokTuHu F X-Google-Smtp-Source: AGHT+IGsmkhudGVqCO3S4te6TqQf5pTP2Y2lo7VrszYsez/t6Ed3MGn2onQSNJWex54E9ttT4/biSA== X-Received: by 2002:a5d:4086:0:b0:368:7583:54c7 with SMTP id ffacd0b85a97d-374bce97f92mr11236618f8f.8.1725538834116; Thu, 05 Sep 2024 05:20:34 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:cbe4:ce99:cb33:eb1c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374be2edf08sm14645764f8f.6.2024.09.05.05.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 05:20:33 -0700 (PDT) From: Bartosz Golaszewski To: Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 2/4] arm64: dts: qcom: sc8280xp-crd: enable bluetooth Date: Thu, 5 Sep 2024 14:20:20 +0200 Message-ID: <20240905122023.47251-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240905122023.47251-1-brgl@bgdev.pl> References: <20240905122023.47251-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 the bluetooth node for sc8280xp-crd and make it consume the outputs from the PMU as per the new DT bindings contract. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 60 ++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 1f533c0d49ea..eac3a6ce0b65 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -20,6 +20,7 @@ aliases { i2c4 = &i2c4; i2c21 = &i2c21; serial0 = &uart17; + serial1 = &uart2; }; backlight: backlight { @@ -275,10 +276,11 @@ usb1_sbu_mux: endpoint { wcn6855-pmu { compatible = "qcom,wcn6855-pmu"; - pinctrl-0 = <&wlan_en>; + pinctrl-0 = <&bt_en>, <&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>; @@ -745,6 +747,27 @@ &sdc2 { status = "okay"; }; +&uart2 { + pinctrl-0 = <&uart2_default>; + pinctrl-names = "default"; + + status = "okay"; + + bluetooth { + compatible = "qcom,wcn6855-bt"; + + 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>; + }; +}; + + &uart17 { compatible = "qcom,geni-debug-uart"; @@ -890,6 +913,13 @@ hastings_reg_en: hastings-reg-en-state { &tlmm { gpio-reserved-ranges = <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; + bt_en: bt-en-state { + pins = "gpio133"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + }; + edp_reg_en: edp-reg-en-state { pins = "gpio25"; function = "gpio"; @@ -1089,6 +1119,34 @@ reset-n-pins { }; }; + uart2_default: uart2-default-state { + cts-pins { + pins = "gpio121"; + function = "qup2"; + bias-bus-hold; + }; + + rts-pins { + pins = "gpio122"; + function = "qup2"; + drive-strength = <2>; + bias-disable; + }; + + rx-pins { + pins = "gpio124"; + function = "qup2"; + bias-pull-up; + }; + + tx-pins { + pins = "gpio123"; + function = "qup2"; + drive-strength = <2>; + bias-disable; + }; + }; + usb0_sbu_default: usb0-sbu-state { oe-n-pins { pins = "gpio101"; From patchwork Thu Sep 5 12:20:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13792245 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 97AD719D8A8 for ; Thu, 5 Sep 2024 12:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725538839; cv=none; b=Lfxy9JZJdWKprNJzutTX5a7l0SSgNcwcylay75PtXhOAREk2IxiQZyEOtGl1Kt4E/JpMHG4SGfeI2sY5CWfP0hk0b7lFAOTRJWmZg0SGs8l7CRpqOcSBEffaCcgXbwLjvuKrHV2WbrX+3LJ2vKqn0PBz+tytgn8qBPPWmkTCnRA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725538839; c=relaxed/simple; bh=UDY8mN7NLkOQeS1dWllQkhgyygy99CoGI6WWaVJHSv0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YOCThEoS9+M8A3dVrDvh8ZjYOdfyOX3brYXpqgVTcHovXLFZOjLzYmJRiNiuxrABBIvFZm1j/0zKDLqNJ7fedBmYUHK3YvNTZPDWnTgFnQtX93F+vY4EU/6iZe0AFxOzroOiRoXlEiJYnJO7+WG00LJcahHzjWhvPSMJmVZZbN0= 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=Mk/6uDm5; arc=none smtp.client-ip=209.85.221.45 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="Mk/6uDm5" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-37747c1d928so409218f8f.1 for ; Thu, 05 Sep 2024 05:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1725538836; x=1726143636; 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=wpoQwlpkGQNE662npRSFJddFIL23SgdklNOB5QSDny8=; b=Mk/6uDm5YqUriRooOrz9Tsfu6cAyLvJ+zK9HWM1vJJj2JF096KASlcPGfjOQadbHFZ x39QKlWMn9SO1aDs8boAElWdIoNSqPOlrR2YfoIf4CKM3j0WT57LC70sDTaS0Y1NqLK0 8YgwLbMi9EZU+BNdcoTz3fXJl7Bqs/ybSNmnWuufkxIjT4qdjf6w2JhnyiGAsahEKaNL TCt8EXlJeEHtrLsNhvlh2Lta/W34l6ozwkexuu1CaQvi0Pr8IsYKSqVYNU0G334S7IAN gqjZ5h4+H1diwxaqGLhw3nzp4XUrEbgDwU+JhjBHsK4QxyRAZbKg9LUZcvgkIU3uyVqn DVxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725538836; x=1726143636; 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=wpoQwlpkGQNE662npRSFJddFIL23SgdklNOB5QSDny8=; b=Ui3ls4M70oIshcNKcDnA5m2/aIM0FrwJBPDK3zoB69Ud5sZbpdgV91K8cYjkf3gJ9k OrQ4NjJuEr4SoCJw1Dzewuee/AgUrEIbOyEfy1CMSZnkCRD0fyA54ENgsNCM418pgDBb +U3fVnqEuQhAycLlqvuoN3loF5mpbHE1Am74PE/qQA+gH/9PfGw4RUg5TtYNiJI/wIt6 t/IDJnwqoPObCdiok4qVI0uy8zkXLLKasc8aQdr0XeooIzM+OVTVW+3/ghAdAuUdiRuA +AOh9UACSnvymyQeCOQPyCJw63wI/W1VW8VcB6Loo3yGgiE1/b1sCg7YTq0fAfcbgRMn lqcg== X-Gm-Message-State: AOJu0YwxKhdAe3Mf/xVvDtx9TYxkNfBm4U2ZaPmyH8F1dKTD+90NX7JL joCbMcrVdpU7q9F8JMPbx8UFKR/L+QIFhXQoT5V0qRw3mRhZN9/DAdYFnV6KAVQ= X-Google-Smtp-Source: AGHT+IHvK0u0iS10sudWOxZEj65ytOgtHcaNt6E3zKJmOxmlU2tiAiTkSn/DrE3j3k8hgZb7FSPgzQ== X-Received: by 2002:adf:f0cd:0:b0:374:af59:427d with SMTP id ffacd0b85a97d-374bf1c814emr11845639f8f.49.1725538835226; Thu, 05 Sep 2024 05:20:35 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:cbe4:ce99:cb33:eb1c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374be2edf08sm14645764f8f.6.2024.09.05.05.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 05:20:34 -0700 (PDT) From: Bartosz Golaszewski To: Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Steev Klimaszewski Subject: [PATCH v3 3/4] arm64: dts: qcom: sc8280xp-x13s: model the PMU of the on-board wcn6855 Date: Thu, 5 Sep 2024 14:20:21 +0200 Message-ID: <20240905122023.47251-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240905122023.47251-1-brgl@bgdev.pl> References: <20240905122023.47251-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. Tested-by: Steev Klimaszewski # Thinkpad X13s Signed-off-by: Bartosz Golaszewski --- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 98 ++++++++++++++++--- 1 file changed, 86 insertions(+), 12 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..88b31550f9df 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 = <&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 { @@ -927,6 +988,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 +1329,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 +1828,11 @@ reset-pins { bias-disable; }; }; + + wlan_en: wlan-en-state { + pins = "gpio134"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; }; From patchwork Thu Sep 5 12:20:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13792246 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 128F419D8BE for ; Thu, 5 Sep 2024 12:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725538840; cv=none; b=Gx2t3DxcUYfJos6xmRnidx0RmRKWZcBllQJYu53aY+8UwVCmhWYnzV0sGpVAI2DhCv6Y/RuI/DUKwUe1FKBY/1h0r1i3PawQ/SUuaBFRGdDgFnQ6es0+PyPSstXzyFqdcKHclVFlbFAAz0bJcSlGN3EWfMtYX40oJvr1PR/x+Ok= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725538840; c=relaxed/simple; bh=d6WJddhun4HJvMbLm+fmJ2JZlxp0djfpfRlepqwkzwA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kjdtULyakND7+xDVfAcG+DZ6Pqgg1pkIp1AY6eMJAtVREgpghgFr7d/bC5NEEF3DPv9whjKhkT/bKFLAbIlbT+7Pm48ElYlJXOmfYLL6DM9vJSHK4e9K0kJt2jjviV/rOJeBMLB4Kuj7JqQYiPFp/j+V7XcFzqkWUTW8QDoDv2w= 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=Vq6DTIoj; arc=none smtp.client-ip=209.85.128.46 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="Vq6DTIoj" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42bbd16fca8so6402125e9.0 for ; Thu, 05 Sep 2024 05:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1725538836; x=1726143636; 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=gUTBDQ3R7lg9yjFQy51ucEUiL1cminpTXLLq8RTN/Q8=; b=Vq6DTIoj6sqd6/PQ3+CxcElIFUceGY8F2+08d/BPW/XeOnvU8c0nHbJr8zRFiao6X3 t8WGCAhCRd3glVvBkMlMQRmOtR4/m3R95EtFN3g4arWb6F0oes/m0GYTpXYX0DZMav/K rokwDnRJmC3pfXccWu0lgOp+x2JQZCQ/JHrXAc6TvIfOpcC7nxmAEMSb2fpweIPNOIfk ENa0vg83d7v37S9t4zEZSdWMKaZE1zCKm173sKoDySrzFCyEmYVzU288+znYRTYmCYCi Ag1D6VLv2plPQMXwib++3ENVuH7emR1gpvJNuaqz115wuTVTBlSiun3F+xr2KxcajGEX 4lJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725538836; x=1726143636; 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=gUTBDQ3R7lg9yjFQy51ucEUiL1cminpTXLLq8RTN/Q8=; b=L1mImZ8YCb8GGEjddTCX6+NngytAM42+pTr93myILrORUtd/JzASSlvRPRPJNXh0P5 Cp+NX20E3Pm/j1wRX3yHsAUhdtBn6elc/vPMyIeHrJsGMvDPlhImNAoYO1dG/lsMEkar 9Z4AgugVUC8b10naPMfvmH8F7cej3TWypePcszPicrYX1UD7a9ZPtdIMcjXu0RMnCI1i nmI4OfvDPntvRpU2jq4TLBQRy5fN0/qpMM35W31A6jAMBD90ZcDDEv3NVNhbTCiMUfjh yzXQjR1FCDTi1cAoi1K2ln2Ld3HJ4HjI+wq2JfSjAaplgWj5S5d5m9CZePZr/+ynrWk8 Od8w== X-Gm-Message-State: AOJu0YxdWK38cAQI/k2+5SAcfPWvxFMb2ibd3B4oxG89kFVQ+crxQxD+ rlIC6sCXoWzNlcTUpvynH1psfmVvJQxByvnxkzi6MP4KY7f11dEjvuocK+mOieE= X-Google-Smtp-Source: AGHT+IGSQzjFcSPvZhlrrAcUSpzThCnyg1YJpIfCV1RMXMl3ZVM0P7DXFNMe1faorV31A2qjyVpodA== X-Received: by 2002:a5d:4b81:0:b0:374:c2e9:28b8 with SMTP id ffacd0b85a97d-374ecc8f2bamr6939773f8f.18.1725538836244; Thu, 05 Sep 2024 05:20:36 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:dc:7e00:cbe4:ce99:cb33:eb1c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374be2edf08sm14645764f8f.6.2024.09.05.05.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 05:20:35 -0700 (PDT) From: Bartosz Golaszewski To: Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 4/4] arm64: dts: qcom: sc8280xp-x13s: keep less regulators always-on Date: Thu, 5 Sep 2024 14:20:22 +0200 Message-ID: <20240905122023.47251-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240905122023.47251-1-brgl@bgdev.pl> References: <20240905122023.47251-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 Remove the regulator-always-on property from the ones that used to be implicitly needed by the on-board WCN6855 now that its PMU is modeled in device-tree. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 4 ---- 1 file changed, 4 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 88b31550f9df..1a9dac16c952 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -479,7 +479,6 @@ vreg_s10b: smps10 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-initial-mode = ; - regulator-always-on; }; vreg_s11b: smps11 { @@ -487,7 +486,6 @@ vreg_s11b: smps11 { regulator-min-microvolt = <1272000>; regulator-max-microvolt = <1272000>; regulator-initial-mode = ; - regulator-always-on; }; vreg_s12b: smps12 { @@ -495,7 +493,6 @@ vreg_s12b: smps12 { regulator-min-microvolt = <984000>; regulator-max-microvolt = <984000>; regulator-initial-mode = ; - regulator-always-on; }; vreg_l1b: ldo1 { @@ -545,7 +542,6 @@ vreg_s1c: smps1 { regulator-min-microvolt = <1880000>; regulator-max-microvolt = <1900000>; regulator-initial-mode = ; - regulator-always-on; }; vreg_l1c: ldo1 {