arm64: dts: qcom: Collapse usb support into one node
PATCH v2 1/1 arm64: dts: qcom: Collapse usb support into one node
We currently have three device nodes for the same USB hardware block, as evident by the reuse of the same reg address multiple times. Now that the chipidea driver fully supports OTG with the MSM wrapper we can collapse all these nodes into one USB device node, reflecting the true nature of the hardware.
--- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +12 -5
@@ -18,6 +18,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/sound/apq8016-lpass.h> +#include <dt-bindings/mux/mux.h> /* * GPIO name legend: proper name = the GPIO line is used as GPIO
@@ -371,18 +372,18 @@ adp-disable; hnp-disable; srp-disable; - dr_mode = "host"; - pinctrl-names = "default"; - pinctrl-0 = <&usb_sw_sel_pm>; + mux-controls = <&usb_switch>; + mux-control-names = "usb_switch"; + ulpi { phy { v1p8-supply = <&pm8916_l7>; v3p3-supply = <&pm8916_l13>; - extcon = <&usb_id>; }; }; }; + lpass at 7708000 { status = "okay"; };
@@ -512,11 +513,17 @@ usb_id: usb-id { compatible = "linux,extcon-usb-gpio"; - vbus-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>; + id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&usb_id_default>; }; + usb_switch: usb-switch { + compatible = "gpio-mux"; + mux-gpios = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>; + #mux-control-cells = <0>; + }; + hdmi-out { compatible = "hdmi-connector"; type = "a";
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoting Yossi Mansharoff (2018-04-17 06:56:30)
Quoted 5 lines
We currently have three device nodes for the same USB hardware block, as evident by the reuse of the same reg address multiple times. Now that the chipidea driver fully supports OTG with the MSM wrapper we can collapse all these nodes into one USB device node, reflecting the true nature of the hardware.
None of this makes sense. Commit text is totally bogus now.
Quoted 15 lines
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +3
-3@@ -371,18 +372,18 @@ adp-disable; hnp-disable; srp-disable; - dr_mode = "host"; - pinctrl-names = "default"; - pinctrl-0 = <&usb_sw_sel_pm>; + mux-controls = <&usb_switch>; + mux-control-names = "usb_switch"; +
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi line 386
Quoted 10 lines
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +1
-1ulpi { phy { v1p8-supply = <&pm8916_l7>; v3p3-supply = <&pm8916_l13>; - extcon = <&usb_id>; }; }; }; +
Why the newline?
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi line 516
Quoted 9 lines
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +1
-1lpass at 7708000 { status = "okay"; };@@ -512,11 +513,17 @@ usb_id: usb-id { compatible = "linux,extcon-usb-gpio"; - vbus-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>; + id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
Hmm?
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi line 522
Quoted 6 lines
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +2
-0pinctrl-names = "default"; pinctrl-0 = <&usb_id_default>; }; + usb_switch: usb-switch { + compatible = "gpio-mux";
Needs a better compatible string for the actual mux part. The gpio-mux can come after that because it's generic, but it's good to record the actual mux part too.
Quoted 3 lines
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +3
-0+ mux-gpios = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>; + #mux-control-cells = <0>; + };