diff mbox

Revert "arm64: dts: qcom: Collapse usb support into one node"

Message ID 20170713060933.GT22780@codeaurora.org (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show

Commit Message

Stephen Boyd July 13, 2017, 6:09 a.m. UTC
On 07/12, Rob Clark wrote:
> This gets host USB working again for me on db410c on master.
> 
> This reverts commit ed75d6a969056cc8f5dd2df3af6c75b792b9116b.

Signoff? Or was it left out on purpose?

Was device mode working on v4.12? I wonder if we could change
dr_mode to host and configure the pmic gpio to mux out the right
lines to the hub. Then we could retain host mode on db410c (which
is probably all that people care about). It would be a smaller
fix for this release while we work out the role switch patches.
Like this patch? I still need to test it tomorrow, but this may
work and allow us to delete the ehci-msm driver sooner.

----8<----

Comments

Rob Clark July 13, 2017, 9:35 a.m. UTC | #1
On Thu, Jul 13, 2017 at 2:09 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 07/12, Rob Clark wrote:
>> This gets host USB working again for me on db410c on master.
>>
>> This reverts commit ed75d6a969056cc8f5dd2df3af6c75b792b9116b.
>
> Signoff? Or was it left out on purpose?

whoops

> Was device mode working on v4.12? I wonder if we could change
> dr_mode to host and configure the pmic gpio to mux out the right
> lines to the hub. Then we could retain host mode on db410c (which
> is probably all that people care about). It would be a smaller
> fix for this release while we work out the role switch patches.
> Like this patch? I still need to test it tomorrow, but this may
> work and allow us to delete the ehci-msm driver sooner.

yup, was working on v4.12 so this patch that I reverted was a
regression.  At least for host mode.  (I don't really use device mode
much outside of android, so never tried that on v4.12, but it did work
in the past)

I can try other patches.. although a bit wary of deleting ehci-msm or
a big dt change in general since some people seem to think taking dt
and kernel from two different places is a sane thing)

BR,
-R

> ----8<----
> diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi
> index d94640812194..790b7775b901 100644
> --- a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi
> +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi
> @@ -17,6 +17,7 @@
>                         function = PMIC_GPIO_FUNC_NORMAL;
>                         power-source = <PM8916_GPIO_VPH>;
>                         input-disable;
> +                       output-high;
>                 };
>         };
>
> diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> index bd310ac1967a..8f2decf84bbf 100644
> --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> @@ -213,16 +213,18 @@
>                 };
>
>                 usb@78d9000 {
> -                       extcon = <&usb_id>, <&usb_id>;
> +                       extcon = <&usb_id>;
>                         status = "okay";
>                         adp-disable;
>                         hnp-disable;
>                         srp-disable;
> +                       dr_mode = "host";
> +                       pinctrl-names = "default";
> +                       pinctrl-0 = <&usb_sw_sel_pm>;
>                         ulpi {
>                                 phy {
>                                         v1p8-supply = <&pm8916_l7>;
>                                         v3p3-supply = <&pm8916_l13>;
> -                                       extcon = <&usb_id>;
>                                 };
>                         };
>                 };
> @@ -342,14 +344,6 @@
>                 pinctrl-0 = <&usb_id_default>;
>         };
>
> -       usb-switch {
> -               compatible = "toshiba,tc7usb40mu";
> -               switch-gpios = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>;
> -               extcon = <&usb_id>;
> -               pinctrl-names = "default";
> -               pinctrl-0 = <&usb_sw_sel_pm>;
> -       };
> -
>         hdmi-out {
>                 compatible = "hdmi-connector";
>                 type = "a";
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Boyd July 13, 2017, 10:02 p.m. UTC | #2
On 07/13, Rob Clark wrote:
> On Thu, Jul 13, 2017 at 2:09 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > Was device mode working on v4.12? I wonder if we could change
> > dr_mode to host and configure the pmic gpio to mux out the right
> > lines to the hub. Then we could retain host mode on db410c (which
> > is probably all that people care about). It would be a smaller
> > fix for this release while we work out the role switch patches.
> > Like this patch? I still need to test it tomorrow, but this may
> > work and allow us to delete the ehci-msm driver sooner.
> 
> yup, was working on v4.12 so this patch that I reverted was a
> regression.  At least for host mode.  (I don't really use device mode
> much outside of android, so never tried that on v4.12, but it did work
> in the past)

Ok.

> 
> I can try other patches.. although a bit wary of deleting ehci-msm or
> a big dt change in general since some people seem to think taking dt
> and kernel from two different places is a sane thing)

I'm fine to leave ehci-msm driver in place for anyone wanting to
use DT from somewhere outside the kernel, just hoping to push
anybody I can towards the chipidea driver, which is a cleaner
solution in the long run. It's scary that we have two usb drivers
operating the same hardware with the DT in v4.12.

I tested out my patch and it works well enough to get host mode
working for me so I'll send it out as a proper regression fix.
When we add role switching support we'll have to adjust the DT to
support it and people who care to gain support for gadgets can
use the updated DT.
Rob Clark July 13, 2017, 10:17 p.m. UTC | #3
On Thu, Jul 13, 2017 at 6:02 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 07/13, Rob Clark wrote:
>> On Thu, Jul 13, 2017 at 2:09 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>> > Was device mode working on v4.12? I wonder if we could change
>> > dr_mode to host and configure the pmic gpio to mux out the right
>> > lines to the hub. Then we could retain host mode on db410c (which
>> > is probably all that people care about). It would be a smaller
>> > fix for this release while we work out the role switch patches.
>> > Like this patch? I still need to test it tomorrow, but this may
>> > work and allow us to delete the ehci-msm driver sooner.
>>
>> yup, was working on v4.12 so this patch that I reverted was a
>> regression.  At least for host mode.  (I don't really use device mode
>> much outside of android, so never tried that on v4.12, but it did work
>> in the past)
>
> Ok.
>
>>
>> I can try other patches.. although a bit wary of deleting ehci-msm or
>> a big dt change in general since some people seem to think taking dt
>> and kernel from two different places is a sane thing)
>
> I'm fine to leave ehci-msm driver in place for anyone wanting to
> use DT from somewhere outside the kernel, just hoping to push
> anybody I can towards the chipidea driver, which is a cleaner
> solution in the long run. It's scary that we have two usb drivers
> operating the same hardware with the DT in v4.12.
>
> I tested out my patch and it works well enough to get host mode
> working for me so I'll send it out as a proper regression fix.
> When we add role switching support we'll have to adjust the DT to
> support it and people who care to gain support for gadgets can
> use the updated DT.
>

I would mention that robher and jstulz do play with upstream kernel +
AOSP.. so I guess some people would care about device mode regressions
as well, even though host mode is sufficient for me.  So I still lean
towards reverting this change for now, and trying again when the mux
issues are sorted completely.  (I can re-send this revert w/ SoB that
I forgot if needed.)

BR,
-R
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi
index d94640812194..790b7775b901 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi
@@ -17,6 +17,7 @@ 
 			function = PMIC_GPIO_FUNC_NORMAL;
 			power-source = <PM8916_GPIO_VPH>;
 			input-disable;
+			output-high;
 		};
 	};
 
diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index bd310ac1967a..8f2decf84bbf 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -213,16 +213,18 @@ 
 		};
 
 		usb@78d9000 {
-			extcon = <&usb_id>, <&usb_id>;
+			extcon = <&usb_id>;
 			status = "okay";
 			adp-disable;
 			hnp-disable;
 			srp-disable;
+			dr_mode = "host";
+			pinctrl-names = "default";
+			pinctrl-0 = <&usb_sw_sel_pm>;
 			ulpi {
 				phy {
 					v1p8-supply = <&pm8916_l7>;
 					v3p3-supply = <&pm8916_l13>;
-					extcon = <&usb_id>;
 				};
 			};
 		};
@@ -342,14 +344,6 @@ 
 		pinctrl-0 = <&usb_id_default>;
 	};
 
-	usb-switch {
-		compatible = "toshiba,tc7usb40mu";
-		switch-gpios = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>;
-		extcon = <&usb_id>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&usb_sw_sel_pm>;
-	};
-
 	hdmi-out {
 		compatible = "hdmi-connector";
 		type = "a";