devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Krishna Kurapati <quic_kriskura@quicinc.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_ppratap@quicinc.com,
	quic_jackp@quicinc.com
Subject: Re: [PATCH v2 2/2] arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB ports
Date: Tue, 13 Feb 2024 09:39:51 +0100	[thread overview]
Message-ID: <efbd57e8-6cbb-480e-b2d5-1d064a27b3a4@linaro.org> (raw)
In-Reply-To: <20240213082724.1789096-3-quic_kriskura@quicinc.com>

On 13/02/2024 09:27, Krishna Kurapati wrote:
> Multiport USB controller (host-only) of SA8295 ADP has 4 Type-A ports
> exposed for connecting peripherals. The VBUS to these peripherals is
> provided by TPS2559QWDRCTQ1 regulators connected to these ports. Each
> regulator has an enable pin controlled by PMM8540. Since these regulators
> are GPIO controlled regulators, model them as fixed regulators and keep
> them Always-On at boot since we are wakeup capable and we don't need to
> turn them off on suspend. Also since we don't enter device mode, these
> regulators can be kept on.
> 
> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 83 ++++++++++++++++++++++++
>  1 file changed, 83 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> index fd253942e5e5..49418843c214 100644
> --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts
> @@ -9,6 +9,7 @@
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  #include <dt-bindings/spmi/spmi.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>  
>  #include "sa8540p.dtsi"
>  #include "sa8540p-pmics.dtsi"
> @@ -108,6 +109,46 @@ edp3_connector_in: endpoint {
>  			};
>  		};
>  	};
> +
> +	regulator-usb2-vbus {
> +		compatible = "regulator-fixed";
> +		regulator-name = "USB2_VBUS";
> +		gpio = <&pmm8540c_gpios 9 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&usb2_en>;
> +		pinctrl-names = "default";
> +		enable-active-high;
> +		regulator-always-on;
> +	};
> +
> +	regulator-usb3-vbus {
> +		compatible = "regulator-fixed";
> +		regulator-name = "USB3_VBUS";
> +		gpio = <&pmm8540e_gpios 5 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&usb3_en>;
> +		pinctrl-names = "default";
> +		enable-active-high;
> +		regulator-always-on;
> +	};
> +
> +	regulator-usb4-vbus {
> +		compatible = "regulator-fixed";
> +		regulator-name = "USB4_VBUS";
> +		gpio = <&pmm8540g_gpios 5 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&usb4_en>;
> +		pinctrl-names = "default";
> +		enable-active-high;
> +		regulator-always-on;
> +	};
> +
> +	regulator-usb5-vbus {
> +		compatible = "regulator-fixed";
> +		regulator-name = "USB5_VBUS";
> +		gpio = <&pmm8540g_gpios 9 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&usb5_en>;
> +		pinctrl-names = "default";
> +		enable-active-high;
> +		regulator-always-on;

Why all these regulators are always on? If USB controller does not probe
for any reason, why keeping them enabled? These must not be always-on,
but instead used by connector as VBUS supply (or by whatever you have
there for USB).

Best regards,
Krzysztof


  reply	other threads:[~2024-02-13  8:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13  8:27 [PATCH v2 0/2] Add DT support for Multiport controller on SC8280XP Krishna Kurapati
2024-02-13  8:27 ` [PATCH v2 1/2] arm64: dts: qcom: sc8280xp: Add multiport controller node for SC8280 Krishna Kurapati
2024-03-01 16:21   ` Johan Hovold
2024-02-13  8:27 ` [PATCH v2 2/2] arm64: dts: qcom: sa8295p: Enable tertiary controller and its 4 USB ports Krishna Kurapati
2024-02-13  8:39   ` Krzysztof Kozlowski [this message]
2024-02-15  2:41     ` Bjorn Andersson
2024-02-15  8:19       ` Krzysztof Kozlowski
2024-02-16 23:32         ` Bjorn Andersson
2024-02-17  1:01           ` Dmitry Baryshkov
2024-02-13  8:43 ` [PATCH v2 0/2] Add DT support for Multiport controller on SC8280XP Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efbd57e8-6cbb-480e-b2d5-1d064a27b3a4@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_kriskura@quicinc.com \
    --cc=quic_ppratap@quicinc.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).