From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (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 D3AE7538D for ; Tue, 23 Jan 2024 05:54:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705989286; cv=none; b=mcb928dfhaxA9KVK1tCsLkwr/S5aNfmHkvZGROXq4gAKZHSIecqPJjN4mTRFuUM1i42sfbPa2hhpXu+5rb0a1Mk80WURNECSZX3rcI1bQXosygCNpwA654968i1P7o8AM3qjXGXcvO1gdGxyVfHMXqBN8WAjQfZ2YdSax+T/sro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705989286; c=relaxed/simple; bh=IedhDM4GAuyddYPNOKsFk25CuXoaKMq8SB+p+rm05Ns=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=R9U5SKeY78nPDkIBq4Q+a8FCGLXfzwjXbsEhrh1AzD9T+VaDO2kR70FcefhjCbs964yuN++kIaHQWga0cI2Xw1BryvHdZyYeyUwulgM3bjbddr6XYG6iA0TC0jbI9H1fwGElYV3we2eYieI9spY6H/ZdXrHbVf5/imJZ9AeBR58= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=W2/50smJ; arc=none smtp.client-ip=209.85.219.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W2/50smJ" Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-dafe04717baso3181111276.1 for ; Mon, 22 Jan 2024 21:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705989284; x=1706594084; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=u8hawjzB2k/6IB+JEpXxKhO9XrlUEkw5XU7npCHNlns=; b=W2/50smJ7g0a9s11jBUA/jpTzQg+jHuPNuFwHuUML8/9mFqQGKzm1O4V0F6ugZn/zT Vrw5AOXF1T/0bL6ZtYbNsRYAuSe0XeP4rqPao3M7pKjPQ7j7wf+F78jiF1/+EO8hMUv4 ZvtANuzuJ5ZzRK9qP3DIznNxh8+VhHoTb8UCf17UbYprLUCYpsaBYC8xleF/EsEcM3ft 8or0LedG1ncP3k4+ztl+gcYilAVUVp/wceQh/FVuWDOqu1OOoRnfl1DS6ff0cEKuywzF MPtYkaIamzCgfZN1YV/2yjA68GuIY+1kDnJUDZypm1VJzAWocPEqZaKypSHMz1dy+fdp vvUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705989284; x=1706594084; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=u8hawjzB2k/6IB+JEpXxKhO9XrlUEkw5XU7npCHNlns=; b=emWTrb/oG7/mGWTfUtkS4IHXVlL0gQI6zzKMp6Z3hn3kbMGGUJyYQ0yv7bCqrSfpk2 l2ACPg13U/aGU7aZ4ksoeVoRFIIqw4P41lO/g9A1zMNS0d6KOJeDYoHI9F8EzLsdLSR7 jqa2idJ42vEAYviSYA1ouR9S1DENUTfWsT/9GZyOI1EXDyZKJD+Lz7W1kJUP8fAHjsDu K6Qa3tihOxFNvpZUhnzMYvgBFY66b71fHv5qfdhPTW7wxwOieeyrLrZlBqbP3QfbXtZe E/G8Adm5g6y/6KUEnUoPpq58Ut5ugcOvYANWLnV+PuCfRsrU3yvPuuR9TpoeoQlCZhVu 1Nlg== X-Gm-Message-State: AOJu0YwayXstZMNFzCmi3Hz/+8KfJHdsOVSAZu8inNh6L0hzzUDg659e RougQLSXvE268S1lKOVXQ0kTDWokfYiKS0uq82yrZbSD7nGF1VaWvI4KtU9fQasIj0lJnrw8Kzr B6rDcDFzELGAVgk9hEbTu5LTruQxp3T/6Zm1kuA== X-Google-Smtp-Source: AGHT+IEkxjJVSmq8MCL28lHXYMwlDP3mgapIAK5Xu0TtkhiywDgxtPNfu93BAvUfYkW7Q68B6qXYcAIV7ZDcCeSW0js= X-Received: by 2002:a25:ab30:0:b0:dc2:2acf:ce48 with SMTP id u45-20020a25ab30000000b00dc22acfce48mr2888085ybi.126.1705989283779; Mon, 22 Jan 2024 21:54:43 -0800 (PST) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240122182158.69183-1-brgl@bgdev.pl> In-Reply-To: <20240122182158.69183-1-brgl@bgdev.pl> From: Dmitry Baryshkov Date: Tue, 23 Jan 2024 07:54:32 +0200 Message-ID: Subject: Re: [RFC] arm64: dts: qcom: qrb5165-rb5: model the PMU of the QCA6391 To: Bartosz Golaszewski Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Abel Vesa , Alex Elder , Srini Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" On Mon, 22 Jan 2024 at 20:22, Bartosz Golaszewski wrote: > > 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 My main concern is whether this is going to pass the regulator subsystem locking. Basically you have a driver for regulators, which will itself call into the regulator subsytem. It might be reentrant. Or it might not. > --- > 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>; This really feels like an overkill, All those voltages are handled by the PMU itself, rather than being requested by the WiFi or BT drivers. > + }; > +}; > + > &pcie1 { > status = "okay"; > }; -- With best wishes Dmitry