[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YBTW2et0IVCUGmdg@builder.lan>
Date: Fri, 29 Jan 2021 21:47:37 -0600
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Andy Gross <agross@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Stanimir Varbanov <svarbanov@...sol.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-arm-msm@...r.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org
Subject: Re: [PATCH v2 2/5] arm64: qcom: dts: qrb5165-rb5: add qca6391 power
device
On Thu 28 Jan 11:52 CST 2021, Dmitry Baryshkov wrote:
> Add qca6391 to device tree as a way to provide power domain to WiFi and
> BT parts of the chip.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> ---
> arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 61 ++++++++++++++++++++++++
> 1 file changed, 61 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> index 8aebc3660b11..2b0c1cc9333b 100644
> --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts
> @@ -151,6 +151,23 @@ vreg_s4a_1p8: vreg-s4a-1p8 {
> regulator-max-microvolt = <1800000>;
> regulator-always-on;
> };
> +
> + qca6391: qca6391 {
> + compatible = "qcom,qca6390";
> + #power-domain-cells = <0>;
> +
> + 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>;
> + pinctrl-names = "default", "active";
> + pinctrl-0 = <&wlan_default_state &bt_default_state>;
> + pinctrl-1 = <&wlan_active_state &bt_active_state>;
I dislike the use of pinctrl states for toggling the level of the gpio
and would prefer that you use the gpio binding and api for this instead.
> + };
> };
>
> &adsp {
> @@ -1013,6 +1030,28 @@ &tlmm {
> "HST_WLAN_UART_TX",
> "HST_WLAN_UART_RX";
>
> + bt_default_state: bt-default-state {
Are you sure you need to drive the BT_EN pin in order to have WiFi
working? On QCA6174 I believe the "WL_EN" was actually RESET_N and BT_EN
was actually "blueooth enable" - so we wired that in the bluetooth node
instead.
> + bt-en {
> + pins = "gpio21";
> + function = "gpio";
> +
> + drive-strength = <16>;
> + output-low;
> + bias-pull-up;
> + };
> + };
> +
> + bt_active_state: bt-active-state {
> + bt-en {
> + pins = "gpio21";
> + function = "gpio";
> +
> + drive-strength = <16>;
> + output-high;
> + bias-pull-up;
> + };
> + };
> +
> lt9611_irq_pin: lt9611-irq {
> pins = "gpio63";
> function = "gpio";
> @@ -1119,6 +1158,28 @@ sdc2_card_det_n: sd-card-det-n {
> function = "gpio";
> bias-pull-up;
> };
> +
> + wlan_default_state: wlan-default-state {
JFYI. You don't need this "dummy" subnode, you can put the properties
directly in the state node.
Regards,
Bjorn
> + wlan-en {
> + pins = "gpio20";
> + function = "gpio";
> +
> + drive-strength = <16>;
> + output-low;
> + bias-pull-up;
> + };
> + };
> +
> + wlan_active_state: wlan-active-state {
> + wlan-en {
> + pins = "gpio20";
> + function = "gpio";
> +
> + drive-strength = <16>;
> + output-high;
> + bias-pull-up;
> + };
> + };
> };
>
> &uart12 {
> --
> 2.29.2
>
Powered by blists - more mailing lists