arm64: dts: qcom: msm8916: Move common USB properties to msm8916.dtsi
authorStephan Gerhold <stephan@gerhold.net>
Mon, 20 Jul 2020 08:54:06 +0000 (10:54 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 15 Sep 2020 04:51:36 +0000 (04:51 +0000)
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>
Link: https://lore.kernel.org/r/20200720085406.6716-11-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
arch/arm64/boot/dts/qcom/msm8916.dtsi

index d9513f779bce2c9be1fe8d34c52b2534f39ec986..d9af1a3785d8b64b7687e43e936d2e41d27ac444 100644 (file)
 &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>;
index dec5e3ba7df40bd92587c2c6b43f72ecf066aad1..b9d3c5d98dd09eb83a6894fdace9e466fdd6b86d 100644 (file)
        status = "okay";
        dr_mode = "peripheral";
        extcon = <&usb_vbus>;
-
-       hnp-disable;
-       srp-disable;
-       adp-disable;
 };
 
 &usb_hs_phy {
index eb667f4b0e055a3e7027f2fe98d484ff844576cb..2ba649bffd4e89d030073b10f518e5a78ba4496c 100644 (file)
 &usb {
        status = "okay";
        extcon = <&muic>, <&muic>;
-
-       hnp-disable;
-       srp-disable;
-       adp-disable;
 };
 
 &usb_hs_phy {
index 273faffab3691711eaa74df64453323836685d14..d6a5b60846d9c88e54b7c2787fdb22b3f79f0799 100644 (file)
                        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>;