linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Stephan Gerhold <stephan@gerhold.net>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	~postmarketos/upstreaming@lists.sr.ht
Subject: [PATCH 10/10] arm64: dts: qcom: msm8916: Move common USB properties to msm8916.dtsi
Date: Mon, 20 Jul 2020 10:54:06 +0200	[thread overview]
Message-ID: <20200720085406.6716-11-stephan@gerhold.net> (raw)
In-Reply-To: <20200720085406.6716-1-stephan@gerhold.net>

Right now we define "hnp-disable", "srp-disable", "adp-disable"
separately for every MSM8916 board that has USB working.

They are needed for USB to work properly if CONFIG_USB_OTG_FSM
is enabled. This is because the chipidea OTG FSM code waits for
interrupts regarding the VBUS state (AVVIS). Those never happen
on MSM8916 because VBUS is always connected to the PMIC instead
of the USB controller.

There was a patch [1] to work around this but ultimately it was
decided that it's easier to disable the OTG FSM altogether using
these properties. This works fine for most use cases, because the
OTG FSM isn't needed for simple dual role host/gadget operation.

Given that these properties are needed for every MSM8916 device,
move them to msm8916.dtsi so we can avoid some more duplication.

[1]: https://lore.kernel.org/lkml/20160707222114.1673-10-stephen.boyd@linaro.org/

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi                  | 3 ---
 arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts       | 4 ----
 arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 4 ----
 arch/arm64/boot/dts/qcom/msm8916.dtsi                      | 3 +++
 4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 1ecc49e36319..e4b655eb153b 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -379,9 +379,6 @@ codec {
 &usb {
 	status = "okay";
 	extcon = <&usb_id>, <&usb_id>;
-	adp-disable;
-	hnp-disable;
-	srp-disable;
 
 	pinctrl-names = "default", "device";
 	pinctrl-0 = <&usb_sw_sel_pm &usb_hub_reset_pm>;
diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
index dec5e3ba7df4..b9d3c5d98dd0 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
@@ -87,10 +87,6 @@ &usb {
 	status = "okay";
 	dr_mode = "peripheral";
 	extcon = <&usb_vbus>;
-
-	hnp-disable;
-	srp-disable;
-	adp-disable;
 };
 
 &usb_hs_phy {
diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
index eb667f4b0e05..2ba649bffd4e 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
@@ -153,10 +153,6 @@ &sdhc_2 {
 &usb {
 	status = "okay";
 	extcon = <&muic>, <&muic>;
-
-	hnp-disable;
-	srp-disable;
-	adp-disable;
 };
 
 &usb_hs_phy {
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 273faffab369..d6a5b60846d9 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -802,6 +802,9 @@ usb: usb@78d9000 {
 			reset-names = "core";
 			phy_type = "ulpi";
 			dr_mode = "otg";
+			hnp-disable;
+			srp-disable;
+			adp-disable;
 			ahb-burst-config = <0>;
 			phy-names = "usb-phy";
 			phys = <&usb_hs_phy>;
-- 
2.27.0


  parent reply	other threads:[~2020-07-20  8:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  8:53 [PATCH 00/10] Convert MSM8916 boards to use labels, reduce duplication Stephan Gerhold
2020-07-20  8:53 ` [PATCH 01/10] arm64: dts: qcom: apq8016-sbc: Remove properties that are already default Stephan Gerhold
2020-07-20  8:53 ` [PATCH 02/10] arm64: dts: qcom: msm8916: Declare sound node in msm8916.dtsi Stephan Gerhold
2020-07-20  8:53 ` [PATCH 03/10] arm64: dts: qcom: apq8016-sbc: Define leds outside of soc node Stephan Gerhold
2020-07-20  8:54 ` [PATCH 04/10] arm64: dts: qcom: msm8916: Add more labels Stephan Gerhold
2020-07-20  8:54 ` [PATCH 05/10] arm64: dts: qcom: msm8916: Use labels in board device trees Stephan Gerhold
2020-07-20  8:54 ` [PATCH 06/10] arm64: dts: qcom: pm8916: Add resin node Stephan Gerhold
2020-07-20  8:54 ` [PATCH 07/10] arm64: dts: qcom: msm8916: Move PM8916-specific parts to msm8916-pm8916.dtsi Stephan Gerhold
2020-07-20  8:54 ` [PATCH 08/10] arm64: dts: qcom: msm8916: Move more supplies " Stephan Gerhold
2020-07-20  8:54 ` [PATCH 09/10] arm64: dts: qcom: msm8916: Set default pinctrl for blsp1_uart1/2 Stephan Gerhold
2020-07-20  8:54 ` Stephan Gerhold [this message]
2020-09-14  9:43 ` [PATCH 00/10] Convert MSM8916 boards to use labels, reduce duplication Stephan Gerhold
2020-09-15  4:56   ` Bjorn Andersson
2020-09-15  7:16     ` Stephan Gerhold

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=20200720085406.6716-11-stephan@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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).