From patchwork Mon Jan 22 18:21:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 764752 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 3EAE73EA83 for ; Mon, 22 Jan 2024 18:22:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705947729; cv=none; b=SYbAcdhl9ExrzyRhokX2gHfb/xen3XlYzjWY4OrYQ7plupgkGe7HWMdcTxenlFw1hIc8EzAJG750AIzDe5hisEFM3FSAfn5+GyVC4bl3TdP6HRFtykArtxbVCZVEGGHh5i5aeGCvNzd3xfRy/yJPW/cMR61Dsl/sjJ+vH0y+jv0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705947729; c=relaxed/simple; bh=LSfDWHWDoPCY7i+S7OjpOzqOfKjn9AL5nhhPZhwbX2I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=SrP3ntZP+ha7TdCvwFAjy6MomoGWxe762eGAeqwuQWHFRCbyTQbeEX2vlgHht4UvFVr7wGCuzz/L7n0y4geU+5GPfxtRm/BtIGPzZWr/WZJYNCxaEyfiMfedkGqSluK8hsv9xZObLshN6JwSm/4kIZ9kp+3R28rM7HyYGeJ7Lrw= 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=bzOYzRYo; arc=none smtp.client-ip=209.85.221.53 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="bzOYzRYo" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-337d99f9cdfso3106405f8f.0 for ; Mon, 22 Jan 2024 10:22:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1705947724; x=1706552524; 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=hD656VMGPdcFDqM7HQuNuxK5UnGwzOpStyHwjoITBkk=; b=bzOYzRYoeyI+MgpjLPj8b1bp5Jo9qQ2KYzVX59nX4fAK7RY0jXPwKleBgemYgvkma7 0LyUxoKsQRGqDoF5jiwboF6bd2dsLbBX/hKdQOUfp12E7qgtwNBnBfOWIrLknja2tEpt 0uGxUGEPFx1NjmkazYiyi8YmAebD+SUfEBJoSCDdM8EMxA4tXQfs9j2AzV1Mws6Ymio3 DYMk9cxnuIZykpLDaPseOaso3I1/2K1poQOGqtS406nzoutvv48ky3R8id0Plr3Npj9U vbJuOwIC27p5/1V4bUMNGV0Z7Vm27i5WjltKOLDXf0y94QFNdzSqHv2A6HQfa6KMXcUa vmjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705947724; x=1706552524; 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=hD656VMGPdcFDqM7HQuNuxK5UnGwzOpStyHwjoITBkk=; b=TQnpg0O+9xUaJWCn1GJ6gpCe3LKAHFyn1xGQXZKQpPkE6NvfKLU52zNlovYobDVU2N IlLSWSKNNKnWV6re8wUGzzO2hfJ5Ji3ihLrpcKjeVxY/s0NoXKWMtS8J6iCW2/selEig udLs7aSco465WRVeTwld9exFLgSn7c0YX9yaQlPzNJ8ArV25EcLW+tq8pMdAk9tgtldB HfFHpCbx6kVk15JZAsG3n541zfKnlUD4aQAAIPUbZ9+4Gij6O7S7c0FIhYHkQz+Adb8W 1LD4+df/KAZHmWeYMVbMipLaDFQ8w55qzJyeHXGfSbZRdwEA9eG0KLm4bG1WtIzXQnpl fOJQ== X-Gm-Message-State: AOJu0YzS05+OCJN9T+MBJNM7B6F8pkXjZE8ez40SVo5UqPuBa2zLoqtf hYPdormsZgqUcEL9ra0h0dYFzipGnX/nybHcrNsz0QjUMzIHF48V9/KaqTtCopw= X-Google-Smtp-Source: AGHT+IFxPoSiMcT4/JEGmI8dgXHEZUwZ8JMZUzniN5YAJO4EACKAzrcTf8uSlRJa/3r9rq6pgPrVWw== X-Received: by 2002:a5d:4605:0:b0:336:7794:4b9a with SMTP id t5-20020a5d4605000000b0033677944b9amr2702554wrq.33.1705947724291; Mon, 22 Jan 2024 10:22:04 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:92a0:6172:d229:1898]) by smtp.gmail.com with ESMTPSA id cp9-20020a056000400900b003392ded41c7sm5026003wrb.39.2024.01.22.10.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:22:03 -0800 (PST) From: Bartosz Golaszewski To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Baryshkov , Abel Vesa , Alex Elder , Srini Kandagatla Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Subject: [RFC] arm64: dts: qcom: qrb5165-rb5: model the PMU of the QCA6391 Date: Mon, 22 Jan 2024 19:21:58 +0100 Message-Id: <20240122182158.69183-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bartosz Golaszewski I'm limiting the audience of this compared to the PCI power sequencing series as I wanted to run the DT part by the maintainers before I commit to a doomed effort. Here is the DT representation of the QCA6390's PMU with its inputs and outputs. If I were to implement the pwrseq framework that would be able to assign the relevant pwrseq data to the consumer based on the actual regulators and not abstract bt-pwrseq or wlan-pwrseq properties - would that fly with you? We'd need to deprecate the existing BT bindings but unfortunately they are already described as consuming the host PMIC regulators in bindings. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 129 +++++++++++++++++++++-- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 ++ 2 files changed, 128 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index cd0db4f31d4a..c9b1600c57ef 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -108,6 +108,88 @@ lt9611_3v3: lt9611-3v3 { regulator-always-on; }; + qca6390_pmu: pmu@0 { + compatible = "qcom,qca6390-pmu"; + + pinctrl-names = "default"; + pinctrl-0 = <&bt_en_state>, <&wlan_en_state>; + + vddaon-supply = <&vreg_s6a_0p95>; + vddpmu-supply = <&vreg_s2f_0p95>; + vddrfa1-supply = <&vreg_s2f_0p95>; + vddrfa2-supply = <&vreg_s8c_1p3>; + vddrfa3-supply = <&vreg_s5a_1p9>; + vddpcie1-supply = <&vreg_s8c_1p3>; + vddpcie2-supply = <&vreg_s5a_1p9>; + vddio-supply = <&vreg_s4a_1p8>; + + bt-enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; + wifi-enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>; + swctrl-gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>; + + regulators { + vreg_pmu_rfa_cmn: ldo0 { + regulator-name = "vreg_pmu_rfa_cmn"; + regulator-min-microvolt = <760000>; + regulator-max-microvolt = <840000>; + }; + + vreg_pmu_aon_0p59: ldo1 { + regulator-name = "vreg_pmu_aon_0p59"; + regulator-min-microvolt = <540000>; + regulator-max-microvolt = <840000>; + }; + + vreg_pmu_wlcx_0p8: ldo2 { + regulator_name = "vreg_pmu_wlcx_0p8"; + regulator-min-microvolt = <760000>; + regulator-max-microvolt = <840000>; + }; + + vreg_pmu_wlmx_0p85: ldo3 { + regulator-name = "vreg_pmu_wlmx_0p85"; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <890000>; + }; + + vreg_pmu_btcmx_0p85: ldo4 { + regulator-name = "vreg_pmu_btcmx_0p85"; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <890000>; + }; + + vreg_pmu_rfa_0p8: ldo5 { + regulator-name = "vreg_pmu_rfa_0p8"; + regulator-min-microvolt = <760000>; + regulator-max-microvolt = <840000>; + }; + + vreg_pmu_rfa_1p2: ldo6 { + regulator-name = "vreg_pmu_rfa_1p2"; + regulator-min-microvolt = <1187000>; + regulator-max-microvolt = <1313000>; + }; + + vreg_pmu_rfa_1p7: ldo7 { + regulator_name = "vreg_pmu_rfa_1p7"; + regulator-min-microvolt = <1710000>; + regulator-max-microvolt = <1890000>; + }; + + vreg_pmu_pcie_0p9: ldo8 { + regulator_name = "vreg_pmu_pcie_0p9"; + regulator-min-microvolt = <870000>; + regulator-max-microvolt = <970000>; + }; + + vreg_pmu_pcie_1p8: ldo9 { + regulator_name = "vreg_pmu_pcie_1p8"; + regulator-min-microvolt = <1710000>; + regulator-max-microvolt = <1890000>; + }; + }; + }; + thermal-zones { conn-thermal { polling-delay-passive = <0>; @@ -734,6 +816,24 @@ &pcie0_phy { vdda-pll-supply = <&vreg_l9a_1p2>; }; +&pcieport0 { + wifi@0 { + compatible = "pci17cb,1101"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + + vddrfacmn-supply = <&vreg_pmu_rfa_cmn>; + vddaon-supply = <&vreg_pmu_aon_0p59>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; + vddbtcmx-supply = <&vreg_pmu_btcmx_0p85>; + vddrfa0-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1-supply = <&vreg_pmu_rfa_1p2>; + vddrfa2-supply = <&vreg_pmu_rfa_1p7>; + vddpcie0-supply = <&vreg_pmu_pcie_0p9>; + vddpcie1-supply = <&vreg_pmu_pcie_1p8>; + }; +}; + &pcie1 { status = "okay"; }; @@ -1303,6 +1403,14 @@ sdc2_card_det_n: sd-card-det-n-state { function = "gpio"; bias-pull-up; }; + + wlan_en_state: wlan-default-state { + pins = "gpio20"; + function = "gpio"; + drive-strength = <16>; + output-low; + bias-pull-up; + }; }; &uart6 { @@ -1311,17 +1419,16 @@ &uart6 { bluetooth { compatible = "qcom,qca6390-bt"; - pinctrl-names = "default"; - pinctrl-0 = <&bt_en_state>; - - enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; - - vddio-supply = <&vreg_s4a_1p8>; - vddpmu-supply = <&vreg_s2f_0p95>; - vddaon-supply = <&vreg_s6a_0p95>; - vddrfa0p9-supply = <&vreg_s2f_0p95>; - vddrfa1p3-supply = <&vreg_s8c_1p3>; - vddrfa1p9-supply = <&vreg_s5a_1p9>; + vddrfacmn-supply = <&vreg_pmu_rfa_cmn>; + vddaon-supply = <&vreg_pmu_aon_0p59>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; + vddbtcmx-supply = <&vreg_pmu_btcmx_0p85>; + vddrfa0-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1-supply = <&vreg_pmu_rfa_1p2>; + vddrfa2-supply = <&vreg_pmu_rfa_1p7>; + vddpcie0-supply = <&vreg_pmu_pcie_0p9>; + vddpcie1-supply = <&vreg_pmu_pcie_1p8>; }; }; diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 760501c1301a..fef9c314ce55 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -2197,6 +2197,16 @@ pcie0: pcie@1c00000 { dma-coherent; status = "disabled"; + + pcieport0: pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + bus-range = <0x01 0xff>; + }; }; pcie0_phy: phy@1c06000 {