LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: qcom: Collapse usb support into one node
@ 2018-04-17 13:56 Yossi Mansharoff
2018-05-14 22:10 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Yossi Mansharoff @ 2018-04-17 13:56 UTC (permalink / raw)
To: Andy Gross, David Brown, Rob Herring, Mark Rutland,
Catalin Marinas, Will Deacon, open list:ARM/QUALCOMM SUPPORT,
open list:ARM/QUALCOMM SUPPORT,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list
Cc: swboyd, Yossi Mansharoff, Stephen Boyd
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.
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 9ff8487..1505921 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -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@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";
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] arm64: dts: qcom: Collapse usb support into one node
2018-04-17 13:56 [PATCH v2] arm64: dts: qcom: Collapse usb support into one node Yossi Mansharoff
@ 2018-05-14 22:10 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2018-05-14 22:10 UTC (permalink / raw)
To: moderated list:ARM64 PORT AARCH64 ARCHITECTURE,
open list:ARM/QUALCOMM SUPPORT, open list:ARM/QUALCOMM SUPPORT,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Andy Gross, Catalin Marinas, David Brown, Mark Rutland,
Rob Herring, Will Deacon, Yossi Mansharoff, open list
Cc: Yossi Mansharoff
Quoting Yossi Mansharoff (2018-04-17 06:56:30)
> 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.
>
> diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> index 9ff8487..1505921 100644
> --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
> @@ -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>;
> };
> };
> };
>
> +
Why the newline?
> lpass@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?
> pinctrl-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.
> + mux-gpios = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>;
> + #mux-control-cells = <0>;
> + };
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-14 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17 13:56 [PATCH v2] arm64: dts: qcom: Collapse usb support into one node Yossi Mansharoff
2018-05-14 22:10 ` Stephen Boyd
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).