All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Updated qcom dts for new USB driver
@ 2017-01-27  0:47 ` Stephen Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: Andy Gross; +Cc: linux-arm-kernel, linux-kernel, linux-arm-msm

This set of patches updates the existing usb chipidea bindings
for the newly merged usb driver. It allows us to move
away from the split ehci-msm and ci_hdrc_msm drivers, and unify
them with one chipidea driver.

I've left out HSIC, so it can be sent seperately.

Bird, Tim (1):
  ARM: dts: qcom: add charger otg regulator

Stephen Boyd (4):
  ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control
  ARM: dts: qcom-msm8974: Add HS usb node and OTG detection mechanisms
  ARM: dts: qcom-apq8064: Collapse usb support into one node
  arm64: dts: qcom: Collapse usb support into one node

 .../arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts |  49 +++----
 arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts |  21 +--
 arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts        |  54 ++++---
 arch/arm/boot/dts/qcom-apq8064-ifc6410.dts         |  54 ++++---
 .../arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts |  16 +--
 arch/arm/boot/dts/qcom-apq8064.dtsi                | 156 ++++++++++++---------
 arch/arm/boot/dts/qcom-apq8074-dragonboard.dts     |  20 +++
 .../boot/dts/qcom-msm8974-sony-xperia-honami.dts   |   1 -
 arch/arm/boot/dts/qcom-msm8974.dtsi                |  53 ++++++-
 arch/arm/boot/dts/qcom-pm8941.dtsi                 |  36 ++++-
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi          |  34 ++---
 arch/arm64/boot/dts/qcom/msm8916.dtsi              |  62 ++++----
 12 files changed, 321 insertions(+), 235 deletions(-)

-- 
2.10.0.297.gf6727b0

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 0/5] Updated qcom dts for new USB driver
@ 2017-01-27  0:47 ` Stephen Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

This set of patches updates the existing usb chipidea bindings
for the newly merged usb driver. It allows us to move
away from the split ehci-msm and ci_hdrc_msm drivers, and unify
them with one chipidea driver.

I've left out HSIC, so it can be sent seperately.

Bird, Tim (1):
  ARM: dts: qcom: add charger otg regulator

Stephen Boyd (4):
  ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control
  ARM: dts: qcom-msm8974: Add HS usb node and OTG detection mechanisms
  ARM: dts: qcom-apq8064: Collapse usb support into one node
  arm64: dts: qcom: Collapse usb support into one node

 .../arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts |  49 +++----
 arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts |  21 +--
 arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts        |  54 ++++---
 arch/arm/boot/dts/qcom-apq8064-ifc6410.dts         |  54 ++++---
 .../arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts |  16 +--
 arch/arm/boot/dts/qcom-apq8064.dtsi                | 156 ++++++++++++---------
 arch/arm/boot/dts/qcom-apq8074-dragonboard.dts     |  20 +++
 .../boot/dts/qcom-msm8974-sony-xperia-honami.dts   |   1 -
 arch/arm/boot/dts/qcom-msm8974.dtsi                |  53 ++++++-
 arch/arm/boot/dts/qcom-pm8941.dtsi                 |  36 ++++-
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi          |  34 ++---
 arch/arm64/boot/dts/qcom/msm8916.dtsi              |  62 ++++----
 12 files changed, 321 insertions(+), 235 deletions(-)

-- 
2.10.0.297.gf6727b0

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/5] ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control
  2017-01-27  0:47 ` Stephen Boyd
@ 2017-01-27  0:47   ` Stephen Boyd
  -1 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: Andy Gross; +Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, Bjorn Andersson

These regulators are controlled by the SPMI regulator driver
instead of the RPM regulator driver in the downstream android
kernel sources. Let's remove them from the DTS here because
they'll never be used by the RPM regulator driver.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 1 -
 arch/arm/boot/dts/qcom-msm8974.dtsi                   | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
index e7c1577d56f4..50966378f9e4 100644
--- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
@@ -92,7 +92,6 @@
 					vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
 					vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
 					vdd_l21-supply = <&vreg_boost>;
-					vin_5vs-supply = <&pm8941_5v>;
 
 					s1 {
 						regulator-min-microvolt = <1300000>;
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 0e9bbede860d..6c167c031368 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -735,7 +735,6 @@
 					pm8941_s1: s1 {};
 					pm8941_s2: s2 {};
 					pm8941_s3: s3 {};
-					pm8941_5v: s4 {};
 
 					pm8941_l1: l1 {};
 					pm8941_l2: l2 {};
@@ -765,9 +764,6 @@
 					pm8941_lvs1: lvs1 {};
 					pm8941_lvs2: lvs2 {};
 					pm8941_lvs3: lvs3 {};
-
-					pm8941_5vs1: 5vs1 {};
-					pm8941_5vs2: 5vs2 {};
 				};
 			};
 		};
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 1/5] ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control
@ 2017-01-27  0:47   ` Stephen Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

These regulators are controlled by the SPMI regulator driver
instead of the RPM regulator driver in the downstream android
kernel sources. Let's remove them from the DTS here because
they'll never be used by the RPM regulator driver.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 1 -
 arch/arm/boot/dts/qcom-msm8974.dtsi                   | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
index e7c1577d56f4..50966378f9e4 100644
--- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
@@ -92,7 +92,6 @@
 					vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
 					vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
 					vdd_l21-supply = <&vreg_boost>;
-					vin_5vs-supply = <&pm8941_5v>;
 
 					s1 {
 						regulator-min-microvolt = <1300000>;
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 0e9bbede860d..6c167c031368 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -735,7 +735,6 @@
 					pm8941_s1: s1 {};
 					pm8941_s2: s2 {};
 					pm8941_s3: s3 {};
-					pm8941_5v: s4 {};
 
 					pm8941_l1: l1 {};
 					pm8941_l2: l2 {};
@@ -765,9 +764,6 @@
 					pm8941_lvs1: lvs1 {};
 					pm8941_lvs2: lvs2 {};
 					pm8941_lvs3: lvs3 {};
-
-					pm8941_5vs1: 5vs1 {};
-					pm8941_5vs2: 5vs2 {};
 				};
 			};
 		};
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/5] ARM: dts: qcom: add charger otg regulator
  2017-01-27  0:47 ` Stephen Boyd
@ 2017-01-27  0:47   ` Stephen Boyd
  -1 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: Andy Gross
  Cc: Bird, Tim, linux-arm-kernel, linux-kernel, linux-arm-msm, Tim Bird

From: "Bird, Tim" <Tim.Bird@sonymobile.com>

Add the otg regulator provided by the charger block.

Signed-off-by: Tim Bird <tim.bird@sonymobile.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
[stephen.boyd@linaro.org: Fix otg supply property name]
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 arch/arm/boot/dts/qcom-pm8941.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index f8eb5e31c920..6b16b296f0fa 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -45,6 +45,10 @@
 					  "chg-gone",
 					  "usb-valid",
 					  "dc-valid";
+
+			usb-otg-in-supply = <&pm8941_5vs1>;
+
+			chg_otg: otg-vbus { };
 		};
 
 		pm8941_gpios: gpios@c000 {
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/5] ARM: dts: qcom: add charger otg regulator
@ 2017-01-27  0:47   ` Stephen Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: "Bird, Tim" <Tim.Bird@sonymobile.com>

Add the otg regulator provided by the charger block.

Signed-off-by: Tim Bird <tim.bird@sonymobile.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
[stephen.boyd at linaro.org: Fix otg supply property name]
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 arch/arm/boot/dts/qcom-pm8941.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index f8eb5e31c920..6b16b296f0fa 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -45,6 +45,10 @@
 					  "chg-gone",
 					  "usb-valid",
 					  "dc-valid";
+
+			usb-otg-in-supply = <&pm8941_5vs1>;
+
+			chg_otg: otg-vbus { };
 		};
 
 		pm8941_gpios: gpios at c000 {
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/5] ARM: dts: qcom-msm8974: Add HS usb node and OTG detection mechanisms
  2017-01-27  0:47 ` Stephen Boyd
@ 2017-01-27  0:47   ` Stephen Boyd
  -1 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: Andy Gross; +Cc: linux-arm-kernel, linux-kernel, linux-arm-msm

This USB controller has two phys, so add them both underneath the
ULPI bus, but only enable one of them based on the board
configuration. To get OTG to work, we need to add the id and vbus
detection info and also populate the regulators for the vbus
supply.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 20 +++++++++++
 arch/arm/boot/dts/qcom-msm8974.dtsi            | 49 ++++++++++++++++++++++++++
 arch/arm/boot/dts/qcom-pm8941.dtsi             | 32 ++++++++++++++++-
 3 files changed, 100 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index e9ee6dbf81fb..42a95a086c0f 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -57,6 +57,26 @@
 			};
 		};
 
+		usb@f9a55000 {
+			status = "ok";
+			phys = <&usb_hs2_phy>;
+			phy-select = <&tcsr 0xb000 1>;
+			extcon = <&smbb>, <&usb_id>;
+			vbus-supply = <&chg_otg>;
+			hnp-disable;
+			srp-disable;
+			adp-disable;
+			ulpi {
+				phy@b {
+					status = "ok";
+					v3p3-supply = <&pm8941_l24>;
+					v1p8-supply = <&pm8941_l6>;
+					extcon = <&smbb>;
+					qcom,init-seq = /bits/ 8 <0x1 0x63>;
+				};
+			};
+		};
+
 		pinctrl@fd510000 {
 			i2c11_pins: i2c11 {
 				mux {
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 6c167c031368..c714c673ea0c 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -511,6 +511,11 @@
 			reg = <0xfc400000 0x4000>;
 		};
 
+		tcsr: syscon@fd4a0000 {
+			compatible = "syscon";
+			reg = <0xfd4a0000 0x10000>;
+		};
+
 		tcsr_mutex_block: syscon@fd484000 {
 			compatible = "syscon";
 			reg = <0xfd484000 0x2000>;
@@ -618,6 +623,50 @@
 			};
 		};
 
+		otg: usb@f9a55000 {
+			compatible = "qcom,ci-hdrc";
+			reg = <0xf9a55000 0x200>,
+			      <0xf9a55200 0x200>;
+			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_USB_HS_AHB_CLK>,
+				 <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			clock-names = "iface", "core";
+			assigned-clocks = <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			assigned-clock-rates = <75000000>;
+			resets = <&gcc GCC_USB_HS_BCR>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			dr_mode = "otg";
+			ahb-burst-config = <0>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs1_phy: phy@a {
+					compatible = "qcom,usb-hs-phy-msm8974",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
+					clock-names = "ref", "sleep";
+					resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
+					reset-names = "phy", "por";
+					status = "disabled";
+				};
+
+				usb_hs2_phy: phy@b {
+					compatible = "qcom,usb-hs-phy-msm8974",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&xo_board>, <&gcc GCC_USB2B_PHY_SLEEP_CLK>;
+					clock-names = "ref", "sleep";
+					resets = <&gcc GCC_USB2B_PHY_BCR>, <&otg 1>;
+					reset-names = "phy", "por";
+					status = "disabled";
+				};
+			};
+		};
+
 		rng@f9bff000 {
 			compatible = "qcom,prng";
 			reg = <0xf9bff000 0x200>;
diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index 6b16b296f0fa..3fc9f34f45bb 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -26,7 +26,14 @@
 			bias-pull-up;
 		};
 
-		charger@1000 {
+		usb_id: misc@900 {
+			compatible = "qcom,pm8941-misc";
+			reg = <0x900>;
+			interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
+			interrupt-names = "usb_id";
+		};
+
+		smbb: charger@1000 {
 			compatible = "qcom,pm8941-charger";
 			reg = <0x1000>;
 			interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
@@ -175,5 +182,28 @@
 
 			status = "disabled";
 		};
+
+		regulators {
+			compatible = "qcom,pm8941-regulators";
+			interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
+			interrupt-names = "ocp-5vs1", "ocp-5vs2";
+			vin_5vs-supply = <&pm8941_5v>;
+
+			pm8941_5v: s4 {
+				regulator-min-microvolt = <5000000>;
+				regulator-max-microvolt = <5000000>;
+				regulator-enable-ramp-delay = <500>;
+			};
+
+			pm8941_5vs1: 5vs1 {
+				regulator-enable-ramp-delay = <1000>;
+				regulator-pull-down;
+				regulator-over-current-protection;
+				qcom,ocp-max-retries = <10>;
+				qcom,ocp-retry-delay = <30>;
+				qcom,vs-soft-start-strength = <0>;
+				regulator-initial-mode = <1>;
+			};
+		};
 	};
 };
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/5] ARM: dts: qcom-msm8974: Add HS usb node and OTG detection mechanisms
@ 2017-01-27  0:47   ` Stephen Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

This USB controller has two phys, so add them both underneath the
ULPI bus, but only enable one of them based on the board
configuration. To get OTG to work, we need to add the id and vbus
detection info and also populate the regulators for the vbus
supply.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 20 +++++++++++
 arch/arm/boot/dts/qcom-msm8974.dtsi            | 49 ++++++++++++++++++++++++++
 arch/arm/boot/dts/qcom-pm8941.dtsi             | 32 ++++++++++++++++-
 3 files changed, 100 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index e9ee6dbf81fb..42a95a086c0f 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -57,6 +57,26 @@
 			};
 		};
 
+		usb at f9a55000 {
+			status = "ok";
+			phys = <&usb_hs2_phy>;
+			phy-select = <&tcsr 0xb000 1>;
+			extcon = <&smbb>, <&usb_id>;
+			vbus-supply = <&chg_otg>;
+			hnp-disable;
+			srp-disable;
+			adp-disable;
+			ulpi {
+				phy at b {
+					status = "ok";
+					v3p3-supply = <&pm8941_l24>;
+					v1p8-supply = <&pm8941_l6>;
+					extcon = <&smbb>;
+					qcom,init-seq = /bits/ 8 <0x1 0x63>;
+				};
+			};
+		};
+
 		pinctrl at fd510000 {
 			i2c11_pins: i2c11 {
 				mux {
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 6c167c031368..c714c673ea0c 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -511,6 +511,11 @@
 			reg = <0xfc400000 0x4000>;
 		};
 
+		tcsr: syscon at fd4a0000 {
+			compatible = "syscon";
+			reg = <0xfd4a0000 0x10000>;
+		};
+
 		tcsr_mutex_block: syscon at fd484000 {
 			compatible = "syscon";
 			reg = <0xfd484000 0x2000>;
@@ -618,6 +623,50 @@
 			};
 		};
 
+		otg: usb at f9a55000 {
+			compatible = "qcom,ci-hdrc";
+			reg = <0xf9a55000 0x200>,
+			      <0xf9a55200 0x200>;
+			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_USB_HS_AHB_CLK>,
+				 <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			clock-names = "iface", "core";
+			assigned-clocks = <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			assigned-clock-rates = <75000000>;
+			resets = <&gcc GCC_USB_HS_BCR>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			dr_mode = "otg";
+			ahb-burst-config = <0>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs1_phy: phy at a {
+					compatible = "qcom,usb-hs-phy-msm8974",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
+					clock-names = "ref", "sleep";
+					resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
+					reset-names = "phy", "por";
+					status = "disabled";
+				};
+
+				usb_hs2_phy: phy at b {
+					compatible = "qcom,usb-hs-phy-msm8974",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&xo_board>, <&gcc GCC_USB2B_PHY_SLEEP_CLK>;
+					clock-names = "ref", "sleep";
+					resets = <&gcc GCC_USB2B_PHY_BCR>, <&otg 1>;
+					reset-names = "phy", "por";
+					status = "disabled";
+				};
+			};
+		};
+
 		rng at f9bff000 {
 			compatible = "qcom,prng";
 			reg = <0xf9bff000 0x200>;
diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index 6b16b296f0fa..3fc9f34f45bb 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -26,7 +26,14 @@
 			bias-pull-up;
 		};
 
-		charger at 1000 {
+		usb_id: misc at 900 {
+			compatible = "qcom,pm8941-misc";
+			reg = <0x900>;
+			interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
+			interrupt-names = "usb_id";
+		};
+
+		smbb: charger at 1000 {
 			compatible = "qcom,pm8941-charger";
 			reg = <0x1000>;
 			interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
@@ -175,5 +182,28 @@
 
 			status = "disabled";
 		};
+
+		regulators {
+			compatible = "qcom,pm8941-regulators";
+			interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
+			interrupt-names = "ocp-5vs1", "ocp-5vs2";
+			vin_5vs-supply = <&pm8941_5v>;
+
+			pm8941_5v: s4 {
+				regulator-min-microvolt = <5000000>;
+				regulator-max-microvolt = <5000000>;
+				regulator-enable-ramp-delay = <500>;
+			};
+
+			pm8941_5vs1: 5vs1 {
+				regulator-enable-ramp-delay = <1000>;
+				regulator-pull-down;
+				regulator-over-current-protection;
+				qcom,ocp-max-retries = <10>;
+				qcom,ocp-retry-delay = <30>;
+				qcom,vs-soft-start-strength = <0>;
+				regulator-initial-mode = <1>;
+			};
+		};
 	};
 };
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/5] ARM: dts: qcom-apq8064: Collapse usb support into one node
  2017-01-27  0:47 ` Stephen Boyd
@ 2017-01-27  0:47   ` Stephen Boyd
  -1 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: Andy Gross
  Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, Bjorn Andersson,
	Srinivas Kandagatla, Nicolas Dechesne, John Stultz

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 the three nodes into one USB device
node, reflecting the true nature of the hardware.

Since we're here, we also mark the irq trigger flags correctly,
as IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_NONE.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 .../arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts |  49 +++----
 arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts |  21 +--
 arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts        |  54 ++++---
 arch/arm/boot/dts/qcom-apq8064-ifc6410.dts         |  54 ++++---
 .../arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts |  16 +--
 arch/arm/boot/dts/qcom-apq8064.dtsi                | 156 ++++++++++++---------
 6 files changed, 170 insertions(+), 180 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts b/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
index 39ae2bc8cb08..eb2d0402c0f8 100644
--- a/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
@@ -290,44 +290,37 @@
 			target-supply	= <&pm8921_lvs7>;
 		};
 
-		/* OTG */
-		phy@12500000 {
-			status		= "okay";
-			dr_mode		= "peripheral";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		phy@12520000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		phy@12530000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		gadget@12500000 {
-			status = "okay";
-		};
-
-		/* OTG */
 		usb@12500000 {
 			status = "okay";
+			dr_mode = "peripheral";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
 		usb@12520000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		usb@12530000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		amba {
diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
index e39440a86739..e5fef32342da 100644
--- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
@@ -320,22 +320,15 @@
 			};
 		};
 
-		/* OTG */
-		phy@12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-			dr_mode		= "otg";
-		};
-
-		gadget@12500000 {
-			status = "okay";
-		};
-
-		/* OTG */
 		usb@12500000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
 		amba {
diff --git a/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts b/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
index 35f1d46edded..d7362033a91b 100644
--- a/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
@@ -149,43 +149,37 @@
 			};
 		};
 
-		/* OTG */
-		usb1_phy: phy@12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		usb3_phy: phy@12520000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		usb4_phy: phy@12530000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		gadget1: gadget@12500000 {
-			status = "ok";
-		};
-
-		/* OTG */
-		usb1: usb@12500000 {
+		usb@12500000 {
 			status = "ok";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
-		usb3: usb@12520000 {
+		usb@12520000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
-		usb4: usb@12530000 {
+		usb@12530000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		/* on board fixed 3.3v supply */
diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
index 3d37cab3b9a9..ec0b16fc48a1 100644
--- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
@@ -262,43 +262,37 @@
 			target-supply	= <&pm8921_s4>;
 		};
 
-		/* OTG */
-		usb1_phy: phy@12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		usb3_phy: phy@12520000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		usb4_phy: phy@12530000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		gadget1: gadget@12500000 {
-			status = "okay";
-		};
-
-		/* OTG */
-		usb1: usb@12500000 {
+		usb@12500000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
-		usb3: usb@12520000 {
+		usb@12520000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
-		usb4: usb@12530000 {
+		usb@12530000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		pci@1b500000 {
diff --git a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
index ebd675ca94b4..e9083542d383 100644
--- a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
@@ -349,15 +349,15 @@
 			};
 		};
 
-		phy@12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		gadget@12500000 {
+		usb@12500000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
 		gsbi@1a200000 {
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 268bd470c865..07b41b41f9ce 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -179,7 +179,7 @@
 	};
 
 	clocks {
-		cxo_board {
+		cxo_board: cxo_board {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <19200000>;
@@ -191,7 +191,7 @@
 			clock-frequency = <27000000>;
 		};
 
-		sleep_clk {
+		sleep_clk: sleep_clk {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <32768>;
@@ -848,81 +848,97 @@
 			};
 		};
 
-		usb1_phy: phy@12500000 {
-			compatible	= "qcom,usb-otg-ci";
-			reg		= <0x12500000 0x400>;
-			interrupts	= <GIC_SPI 100 IRQ_TYPE_NONE>;
-			status		= "disabled";
-
-			clocks		= <&gcc USB_HS1_XCVR_CLK>,
-					  <&gcc USB_HS1_H_CLK>;
-			clock-names	= "core", "iface";
-
-			resets		= <&gcc USB_HS1_RESET>;
-			reset-names	= "link";
-		};
-
-		usb3_phy: phy@12520000 {
-			compatible	= "qcom,usb-otg-ci";
-			reg		= <0x12520000 0x400>;
-			interrupts	= <GIC_SPI 188 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			dr_mode		= "host";
-
-			clocks		= <&gcc USB_HS3_XCVR_CLK>,
-					  <&gcc USB_HS3_H_CLK>;
-			clock-names	= "core", "iface";
-
-			resets		= <&gcc USB_HS3_RESET>;
-			reset-names	= "link";
-		};
-
-		usb4_phy: phy@12530000 {
-			compatible	= "qcom,usb-otg-ci";
-			reg		= <0x12530000 0x400>;
-			interrupts	= <GIC_SPI 215 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			dr_mode		= "host";
-
-			clocks		= <&gcc USB_HS4_XCVR_CLK>,
-					  <&gcc USB_HS4_H_CLK>;
-			clock-names	= "core", "iface";
-
-			resets		= <&gcc USB_HS4_RESET>;
-			reset-names	= "link";
-		};
-
-		gadget1: gadget@12500000 {
-			compatible	= "qcom,ci-hdrc";
-			reg		= <0x12500000 0x400>;
-			status		= "disabled";
-			dr_mode		= "peripheral";
-			interrupts	= <GIC_SPI 100 IRQ_TYPE_NONE>;
-			usb-phy		= <&usb1_phy>;
-		};
-
 		usb1: usb@12500000 {
-			compatible	= "qcom,ehci-host";
-			reg		= <0x12500000 0x400>;
-			interrupts	= <GIC_SPI 100 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			usb-phy		= <&usb1_phy>;
+			compatible = "qcom,ci-hdrc";
+			reg = <0x12500000 0x200>,
+			      <0x12500200 0x200>;
+			interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc USB_HS1_XCVR_CLK>, <&gcc USB_HS1_H_CLK>;
+			clock-names = "core", "iface";
+			assigned-clocks = <&gcc USB_HS1_XCVR_CLK>;
+			assigned-clock-rates = <60000000>;
+			resets = <&gcc USB_HS1_RESET>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			ahb-burst-config = <0>;
+			phys = <&usb_hs1_phy>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs1_phy: phy {
+					compatible = "qcom,usb-hs-phy-apq8064",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&sleep_clk>, <&cxo_board>;
+					clock-names = "sleep", "ref";
+					resets = <&usb1 0>;
+					reset-names = "por";
+				};
+			};
 		};
 
 		usb3: usb@12520000 {
-			compatible	= "qcom,ehci-host";
-			reg		= <0x12520000 0x400>;
-			interrupts	= <GIC_SPI 188 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			usb-phy		= <&usb3_phy>;
+			compatible = "qcom,ci-hdrc";
+			reg = <0x12520000 0x200>,
+			      <0x12520200 0x200>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc USB_HS3_XCVR_CLK>, <&gcc USB_HS3_H_CLK>;
+			clock-names = "core", "iface";
+			assigned-clocks = <&gcc USB_HS3_XCVR_CLK>;
+			assigned-clock-rates = <60000000>;
+			resets = <&gcc USB_HS3_RESET>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			ahb-burst-config = <0>;
+			phys = <&usb_hs3_phy>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs3_phy: phy {
+					compatible = "qcom,usb-hs-phy-apq8064",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&sleep_clk>, <&cxo_board>;
+					clock-names = "sleep", "ref";
+					resets = <&usb3 0>;
+					reset-names = "por";
+				};
+			};
 		};
 
 		usb4: usb@12530000 {
-			compatible	= "qcom,ehci-host";
-			reg		= <0x12530000 0x400>;
-			interrupts	= <GIC_SPI 215 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			usb-phy		= <&usb4_phy>;
+			compatible = "qcom,ci-hdrc";
+			reg = <0x12530000 0x200>,
+			      <0x12530200 0x200>;
+			interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc USB_HS4_XCVR_CLK>, <&gcc USB_HS4_H_CLK>;
+			clock-names = "core", "iface";
+			assigned-clocks = <&gcc USB_HS4_XCVR_CLK>;
+			assigned-clock-rates = <60000000>;
+			resets = <&gcc USB_HS4_RESET>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			ahb-burst-config = <0>;
+			phys = <&usb_hs4_phy>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs4_phy: phy {
+					compatible = "qcom,usb-hs-phy-apq8064",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&sleep_clk>, <&cxo_board>;
+					clock-names = "sleep", "ref";
+					resets = <&usb4 0>;
+					reset-names = "por";
+				};
+			};
 		};
 
 		sata_phy0: phy@1b400000 {
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/5] ARM: dts: qcom-apq8064: Collapse usb support into one node
@ 2017-01-27  0:47   ` Stephen Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

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 the three nodes into one USB device
node, reflecting the true nature of the hardware.

Since we're here, we also mark the irq trigger flags correctly,
as IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_NONE.

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 .../arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts |  49 +++----
 arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts |  21 +--
 arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts        |  54 ++++---
 arch/arm/boot/dts/qcom-apq8064-ifc6410.dts         |  54 ++++---
 .../arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts |  16 +--
 arch/arm/boot/dts/qcom-apq8064.dtsi                | 156 ++++++++++++---------
 6 files changed, 170 insertions(+), 180 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts b/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
index 39ae2bc8cb08..eb2d0402c0f8 100644
--- a/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
@@ -290,44 +290,37 @@
 			target-supply	= <&pm8921_lvs7>;
 		};
 
-		/* OTG */
-		phy at 12500000 {
-			status		= "okay";
-			dr_mode		= "peripheral";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		phy at 12520000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		phy at 12530000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		gadget at 12500000 {
-			status = "okay";
-		};
-
-		/* OTG */
 		usb at 12500000 {
 			status = "okay";
+			dr_mode = "peripheral";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
 		usb at 12520000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		usb at 12530000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		amba {
diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
index e39440a86739..e5fef32342da 100644
--- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
@@ -320,22 +320,15 @@
 			};
 		};
 
-		/* OTG */
-		phy at 12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-			dr_mode		= "otg";
-		};
-
-		gadget at 12500000 {
-			status = "okay";
-		};
-
-		/* OTG */
 		usb at 12500000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
 		amba {
diff --git a/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts b/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
index 35f1d46edded..d7362033a91b 100644
--- a/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
@@ -149,43 +149,37 @@
 			};
 		};
 
-		/* OTG */
-		usb1_phy: phy at 12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		usb3_phy: phy at 12520000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		usb4_phy: phy at 12530000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		gadget1: gadget at 12500000 {
-			status = "ok";
-		};
-
-		/* OTG */
-		usb1: usb at 12500000 {
+		usb at 12500000 {
 			status = "ok";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
-		usb3: usb at 12520000 {
+		usb at 12520000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
-		usb4: usb at 12530000 {
+		usb at 12530000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		/* on board fixed 3.3v supply */
diff --git a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
index 3d37cab3b9a9..ec0b16fc48a1 100644
--- a/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
@@ -262,43 +262,37 @@
 			target-supply	= <&pm8921_s4>;
 		};
 
-		/* OTG */
-		usb1_phy: phy at 12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		usb3_phy: phy at 12520000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		usb4_phy: phy at 12530000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l23>;
-		};
-
-		gadget1: gadget at 12500000 {
-			status = "okay";
-		};
-
-		/* OTG */
-		usb1: usb at 12500000 {
+		usb at 12500000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
-		usb3: usb at 12520000 {
+		usb at 12520000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
-		usb4: usb at 12530000 {
+		usb at 12530000 {
 			status = "okay";
+			dr_mode = "host";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l23>;
+				};
+			};
 		};
 
 		pci at 1b500000 {
diff --git a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
index ebd675ca94b4..e9083542d383 100644
--- a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
@@ -349,15 +349,15 @@
 			};
 		};
 
-		phy at 12500000 {
-			status		= "okay";
-			vddcx-supply	= <&pm8921_s3>;
-			v3p3-supply	= <&pm8921_l3>;
-			v1p8-supply	= <&pm8921_l4>;
-		};
-
-		gadget at 12500000 {
+		usb at 12500000 {
 			status = "okay";
+			dr_mode = "otg";
+			ulpi {
+				phy {
+					v3p3-supply = <&pm8921_l3>;
+					v1p8-supply = <&pm8921_l4>;
+				};
+			};
 		};
 
 		gsbi at 1a200000 {
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 268bd470c865..07b41b41f9ce 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -179,7 +179,7 @@
 	};
 
 	clocks {
-		cxo_board {
+		cxo_board: cxo_board {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <19200000>;
@@ -191,7 +191,7 @@
 			clock-frequency = <27000000>;
 		};
 
-		sleep_clk {
+		sleep_clk: sleep_clk {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <32768>;
@@ -848,81 +848,97 @@
 			};
 		};
 
-		usb1_phy: phy at 12500000 {
-			compatible	= "qcom,usb-otg-ci";
-			reg		= <0x12500000 0x400>;
-			interrupts	= <GIC_SPI 100 IRQ_TYPE_NONE>;
-			status		= "disabled";
-
-			clocks		= <&gcc USB_HS1_XCVR_CLK>,
-					  <&gcc USB_HS1_H_CLK>;
-			clock-names	= "core", "iface";
-
-			resets		= <&gcc USB_HS1_RESET>;
-			reset-names	= "link";
-		};
-
-		usb3_phy: phy at 12520000 {
-			compatible	= "qcom,usb-otg-ci";
-			reg		= <0x12520000 0x400>;
-			interrupts	= <GIC_SPI 188 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			dr_mode		= "host";
-
-			clocks		= <&gcc USB_HS3_XCVR_CLK>,
-					  <&gcc USB_HS3_H_CLK>;
-			clock-names	= "core", "iface";
-
-			resets		= <&gcc USB_HS3_RESET>;
-			reset-names	= "link";
-		};
-
-		usb4_phy: phy at 12530000 {
-			compatible	= "qcom,usb-otg-ci";
-			reg		= <0x12530000 0x400>;
-			interrupts	= <GIC_SPI 215 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			dr_mode		= "host";
-
-			clocks		= <&gcc USB_HS4_XCVR_CLK>,
-					  <&gcc USB_HS4_H_CLK>;
-			clock-names	= "core", "iface";
-
-			resets		= <&gcc USB_HS4_RESET>;
-			reset-names	= "link";
-		};
-
-		gadget1: gadget at 12500000 {
-			compatible	= "qcom,ci-hdrc";
-			reg		= <0x12500000 0x400>;
-			status		= "disabled";
-			dr_mode		= "peripheral";
-			interrupts	= <GIC_SPI 100 IRQ_TYPE_NONE>;
-			usb-phy		= <&usb1_phy>;
-		};
-
 		usb1: usb at 12500000 {
-			compatible	= "qcom,ehci-host";
-			reg		= <0x12500000 0x400>;
-			interrupts	= <GIC_SPI 100 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			usb-phy		= <&usb1_phy>;
+			compatible = "qcom,ci-hdrc";
+			reg = <0x12500000 0x200>,
+			      <0x12500200 0x200>;
+			interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc USB_HS1_XCVR_CLK>, <&gcc USB_HS1_H_CLK>;
+			clock-names = "core", "iface";
+			assigned-clocks = <&gcc USB_HS1_XCVR_CLK>;
+			assigned-clock-rates = <60000000>;
+			resets = <&gcc USB_HS1_RESET>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			ahb-burst-config = <0>;
+			phys = <&usb_hs1_phy>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs1_phy: phy {
+					compatible = "qcom,usb-hs-phy-apq8064",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&sleep_clk>, <&cxo_board>;
+					clock-names = "sleep", "ref";
+					resets = <&usb1 0>;
+					reset-names = "por";
+				};
+			};
 		};
 
 		usb3: usb at 12520000 {
-			compatible	= "qcom,ehci-host";
-			reg		= <0x12520000 0x400>;
-			interrupts	= <GIC_SPI 188 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			usb-phy		= <&usb3_phy>;
+			compatible = "qcom,ci-hdrc";
+			reg = <0x12520000 0x200>,
+			      <0x12520200 0x200>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc USB_HS3_XCVR_CLK>, <&gcc USB_HS3_H_CLK>;
+			clock-names = "core", "iface";
+			assigned-clocks = <&gcc USB_HS3_XCVR_CLK>;
+			assigned-clock-rates = <60000000>;
+			resets = <&gcc USB_HS3_RESET>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			ahb-burst-config = <0>;
+			phys = <&usb_hs3_phy>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs3_phy: phy {
+					compatible = "qcom,usb-hs-phy-apq8064",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&sleep_clk>, <&cxo_board>;
+					clock-names = "sleep", "ref";
+					resets = <&usb3 0>;
+					reset-names = "por";
+				};
+			};
 		};
 
 		usb4: usb at 12530000 {
-			compatible	= "qcom,ehci-host";
-			reg		= <0x12530000 0x400>;
-			interrupts	= <GIC_SPI 215 IRQ_TYPE_NONE>;
-			status		= "disabled";
-			usb-phy		= <&usb4_phy>;
+			compatible = "qcom,ci-hdrc";
+			reg = <0x12530000 0x200>,
+			      <0x12530200 0x200>;
+			interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc USB_HS4_XCVR_CLK>, <&gcc USB_HS4_H_CLK>;
+			clock-names = "core", "iface";
+			assigned-clocks = <&gcc USB_HS4_XCVR_CLK>;
+			assigned-clock-rates = <60000000>;
+			resets = <&gcc USB_HS4_RESET>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			ahb-burst-config = <0>;
+			phys = <&usb_hs4_phy>;
+			phy-names = "usb-phy";
+			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs4_phy: phy {
+					compatible = "qcom,usb-hs-phy-apq8064",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&sleep_clk>, <&cxo_board>;
+					clock-names = "sleep", "ref";
+					resets = <&usb4 0>;
+					reset-names = "por";
+				};
+			};
 		};
 
 		sata_phy0: phy at 1b400000 {
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/5] arm64: dts: qcom: Collapse usb support into one node
  2017-01-27  0:47 ` Stephen Boyd
@ 2017-01-27  0:47   ` Stephen Boyd
  -1 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: Andy Gross; +Cc: linux-arm-kernel, linux-kernel, linux-arm-msm

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 | 34 +++++++++--------
 arch/arm64/boot/dts/qcom/msm8916.dtsi     | 62 +++++++++++++++----------------
 2 files changed, 47 insertions(+), 49 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 08bd5ebafb4e..a9506619dfff 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -201,22 +201,16 @@
 		usb@78d9000 {
 			extcon = <&usb_id>, <&usb_id>;
 			status = "okay";
-		};
-
-		ehci@78d9000 {
-			status = "okay";
-		};
-
-		phy@78d9000 {
-			v1p8-supply = <&pm8916_l7>;
-			v3p3-supply = <&pm8916_l13>;
-			vddcx-supply = <&pm8916_s1>;
-			extcon = <&usb_id>, <&usb_id>;
-			dr_mode = "otg";
-			status = "okay";
-			switch-gpio = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>;
-			pinctrl-names = "default";
-			pinctrl-0 = <&usb_sw_sel_pm>;
+			adp-disable;
+			hnp-disable;
+			srp-disable;
+			ulpi {
+				phy {
+					v1p8-supply = <&pm8916_l7>;
+					v3p3-supply = <&pm8916_l13>;
+					extcon = <&usb_id>;
+				};
+			};
 		};
 
 		lpass@07708000 {
@@ -321,6 +315,14 @@
 		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";
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index f8ff327667c5..5066fb23ed98 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -545,44 +545,40 @@
 			status = "disabled";
 		};
 
-		usb_dev: usb@78d9000 {
+		otg: usb@78d9000 {
 			compatible = "qcom,ci-hdrc";
-			reg = <0x78d9000 0x400>;
-			dr_mode = "peripheral";
-			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
-			usb-phy = <&usb_otg>;
-			status = "disabled";
-		};
-
-		usb_host: ehci@78d9000 {
-			compatible = "qcom,ehci-host";
-			reg = <0x78d9000 0x400>;
-			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
-			usb-phy = <&usb_otg>;
-			status = "disabled";
-		};
-
-		usb_otg: phy@78d9000 {
-			compatible = "qcom,usb-otg-snps";
-			reg = <0x78d9000 0x400>;
+			reg = <0x78d9000 0x200>,
+			      <0x78d9200 0x200>;
 			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
-
-			qcom,vdd-levels = <500000 1000000 1320000>;
-			qcom,phy-init-sequence = <0x44 0x6B 0x24 0x13>;
-			dr_mode = "peripheral";
-			qcom,otg-control = <2>; // PMIC
-			qcom,manual-pullup;
-
 			clocks = <&gcc GCC_USB_HS_AHB_CLK>,
-				 <&gcc GCC_USB_HS_SYSTEM_CLK>,
-				 <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
-			clock-names = "iface", "core", "sleep";
-
-			resets = <&gcc GCC_USB2A_PHY_BCR>,
-				 <&gcc GCC_USB_HS_BCR>;
-			reset-names = "phy", "link";
+				 <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			clock-names = "iface", "core";
+			assigned-clocks = <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			assigned-clock-rates = <80000000>;
+			resets = <&gcc GCC_USB_HS_BCR>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			dr_mode = "otg";
+			ahb-burst-config = <0>;
+			phy-names = "usb-phy";
+			phys = <&usb_hs_phy>;
 			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs_phy: phy {
+					compatible = "qcom,usb-hs-phy-msm8916",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
+					clock-names = "ref", "sleep";
+					resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
+					reset-names = "phy", "por";
+					qcom,init-seq = /bits/ 8 <0x0 0x44
+						0x1 0x6b 0x2 0x24 0x3 0x13>;
+				};
+			};
 		};
 
 		intc: interrupt-controller@b000000 {
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/5] arm64: dts: qcom: Collapse usb support into one node
@ 2017-01-27  0:47   ` Stephen Boyd
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

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 | 34 +++++++++--------
 arch/arm64/boot/dts/qcom/msm8916.dtsi     | 62 +++++++++++++++----------------
 2 files changed, 47 insertions(+), 49 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 08bd5ebafb4e..a9506619dfff 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -201,22 +201,16 @@
 		usb at 78d9000 {
 			extcon = <&usb_id>, <&usb_id>;
 			status = "okay";
-		};
-
-		ehci at 78d9000 {
-			status = "okay";
-		};
-
-		phy at 78d9000 {
-			v1p8-supply = <&pm8916_l7>;
-			v3p3-supply = <&pm8916_l13>;
-			vddcx-supply = <&pm8916_s1>;
-			extcon = <&usb_id>, <&usb_id>;
-			dr_mode = "otg";
-			status = "okay";
-			switch-gpio = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>;
-			pinctrl-names = "default";
-			pinctrl-0 = <&usb_sw_sel_pm>;
+			adp-disable;
+			hnp-disable;
+			srp-disable;
+			ulpi {
+				phy {
+					v1p8-supply = <&pm8916_l7>;
+					v3p3-supply = <&pm8916_l13>;
+					extcon = <&usb_id>;
+				};
+			};
 		};
 
 		lpass at 07708000 {
@@ -321,6 +315,14 @@
 		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";
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index f8ff327667c5..5066fb23ed98 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -545,44 +545,40 @@
 			status = "disabled";
 		};
 
-		usb_dev: usb at 78d9000 {
+		otg: usb at 78d9000 {
 			compatible = "qcom,ci-hdrc";
-			reg = <0x78d9000 0x400>;
-			dr_mode = "peripheral";
-			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
-			usb-phy = <&usb_otg>;
-			status = "disabled";
-		};
-
-		usb_host: ehci at 78d9000 {
-			compatible = "qcom,ehci-host";
-			reg = <0x78d9000 0x400>;
-			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
-			usb-phy = <&usb_otg>;
-			status = "disabled";
-		};
-
-		usb_otg: phy at 78d9000 {
-			compatible = "qcom,usb-otg-snps";
-			reg = <0x78d9000 0x400>;
+			reg = <0x78d9000 0x200>,
+			      <0x78d9200 0x200>;
 			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
-
-			qcom,vdd-levels = <500000 1000000 1320000>;
-			qcom,phy-init-sequence = <0x44 0x6B 0x24 0x13>;
-			dr_mode = "peripheral";
-			qcom,otg-control = <2>; // PMIC
-			qcom,manual-pullup;
-
 			clocks = <&gcc GCC_USB_HS_AHB_CLK>,
-				 <&gcc GCC_USB_HS_SYSTEM_CLK>,
-				 <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
-			clock-names = "iface", "core", "sleep";
-
-			resets = <&gcc GCC_USB2A_PHY_BCR>,
-				 <&gcc GCC_USB_HS_BCR>;
-			reset-names = "phy", "link";
+				 <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			clock-names = "iface", "core";
+			assigned-clocks = <&gcc GCC_USB_HS_SYSTEM_CLK>;
+			assigned-clock-rates = <80000000>;
+			resets = <&gcc GCC_USB_HS_BCR>;
+			reset-names = "core";
+			phy_type = "ulpi";
+			dr_mode = "otg";
+			ahb-burst-config = <0>;
+			phy-names = "usb-phy";
+			phys = <&usb_hs_phy>;
 			status = "disabled";
+			#reset-cells = <1>;
+
+			ulpi {
+				usb_hs_phy: phy {
+					compatible = "qcom,usb-hs-phy-msm8916",
+						     "qcom,usb-hs-phy";
+					#phy-cells = <0>;
+					clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
+					clock-names = "ref", "sleep";
+					resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
+					reset-names = "phy", "por";
+					qcom,init-seq = /bits/ 8 <0x0 0x44
+						0x1 0x6b 0x2 0x24 0x3 0x13>;
+				};
+			};
 		};
 
 		intc: interrupt-controller at b000000 {
-- 
2.10.0.297.gf6727b0

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 4/5] ARM: dts: qcom-apq8064: Collapse usb support into one node
  2017-01-27  0:47   ` Stephen Boyd
  (?)
@ 2017-02-28 23:50     ` John Stultz
  -1 siblings, 0 replies; 21+ messages in thread
From: John Stultz @ 2017-02-28 23:50 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-arm-msm, lkml, Bjorn Andersson, Nicolas Dechesne,
	Srinivas Kandagatla, Andy Gross, linux-arm-kernel

On Thu, Jan 26, 2017 at 4:47 PM, Stephen Boyd <stephen.boyd@linaro.org> wrote:
> 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 the three nodes into one USB device
> node, reflecting the true nature of the hardware.
>
> Since we're here, we also mark the irq trigger flags correctly,
> as IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_NONE.
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>


Applies with noise now, but I was able to get USB working with this
and some changes to my config.

Hotplug still doesn't work, but that was the same situation before as
well, so I need to dig on that.

So..
Tested-by: John Stultz <john.stultz@linaro.org>

thanks
-john

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 4/5] ARM: dts: qcom-apq8064: Collapse usb support into one node
@ 2017-02-28 23:50     ` John Stultz
  0 siblings, 0 replies; 21+ messages in thread
From: John Stultz @ 2017-02-28 23:50 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Andy Gross, linux-arm-kernel, lkml, linux-arm-msm,
	Bjorn Andersson, Srinivas Kandagatla, Nicolas Dechesne

On Thu, Jan 26, 2017 at 4:47 PM, Stephen Boyd <stephen.boyd@linaro.org> wrote:
> 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 the three nodes into one USB device
> node, reflecting the true nature of the hardware.
>
> Since we're here, we also mark the irq trigger flags correctly,
> as IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_NONE.
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>


Applies with noise now, but I was able to get USB working with this
and some changes to my config.

Hotplug still doesn't work, but that was the same situation before as
well, so I need to dig on that.

So..
Tested-by: John Stultz <john.stultz@linaro.org>

thanks
-john

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 4/5] ARM: dts: qcom-apq8064: Collapse usb support into one node
@ 2017-02-28 23:50     ` John Stultz
  0 siblings, 0 replies; 21+ messages in thread
From: John Stultz @ 2017-02-28 23:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 26, 2017 at 4:47 PM, Stephen Boyd <stephen.boyd@linaro.org> wrote:
> 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 the three nodes into one USB device
> node, reflecting the true nature of the hardware.
>
> Since we're here, we also mark the irq trigger flags correctly,
> as IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_NONE.
>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> Cc: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>


Applies with noise now, but I was able to get USB working with this
and some changes to my config.

Hotplug still doesn't work, but that was the same situation before as
well, so I need to dig on that.

So..
Tested-by: John Stultz <john.stultz@linaro.org>

thanks
-john

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/5] arm64: dts: qcom: Collapse usb support into one node
  2017-01-27  0:47   ` Stephen Boyd
@ 2017-05-18 19:03     ` Bjorn Andersson
  -1 siblings, 0 replies; 21+ messages in thread
From: Bjorn Andersson @ 2017-05-18 19:03 UTC (permalink / raw)
  To: Stephen Boyd, Andy Gross; +Cc: linux-arm-kernel, linux-kernel, linux-arm-msm

On Thu 26 Jan 16:47 PST 2017, Stephen Boyd wrote:

> 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>

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>

This still applies and with some defconfig updates seems to make USB
work again (thoroughly tested though). @Andy, would you mind picking
this up.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 5/5] arm64: dts: qcom: Collapse usb support into one node
@ 2017-05-18 19:03     ` Bjorn Andersson
  0 siblings, 0 replies; 21+ messages in thread
From: Bjorn Andersson @ 2017-05-18 19:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu 26 Jan 16:47 PST 2017, Stephen Boyd wrote:

> 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>

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>

This still applies and with some defconfig updates seems to make USB
work again (thoroughly tested though). @Andy, would you mind picking
this up.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/5] arm64: dts: qcom: Collapse usb support into one node
  2017-05-18 19:03     ` Bjorn Andersson
@ 2017-05-24  1:27       ` Andy Gross
  -1 siblings, 0 replies; 21+ messages in thread
From: Andy Gross @ 2017-05-24  1:27 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Stephen Boyd, linux-arm-kernel, linux-kernel, linux-arm-msm

On Thu, May 18, 2017 at 12:03:08PM -0700, Bjorn Andersson wrote:
> On Thu 26 Jan 16:47 PST 2017, Stephen Boyd wrote:
> 
> > 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>
> 
> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> This still applies and with some defconfig updates seems to make USB
> work again (thoroughly tested though). @Andy, would you mind picking
> this up.

Yeah I'll queue this up.

Regards,
Andy

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 5/5] arm64: dts: qcom: Collapse usb support into one node
@ 2017-05-24  1:27       ` Andy Gross
  0 siblings, 0 replies; 21+ messages in thread
From: Andy Gross @ 2017-05-24  1:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 18, 2017 at 12:03:08PM -0700, Bjorn Andersson wrote:
> On Thu 26 Jan 16:47 PST 2017, Stephen Boyd wrote:
> 
> > 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>
> 
> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> This still applies and with some defconfig updates seems to make USB
> work again (thoroughly tested though). @Andy, would you mind picking
> this up.

Yeah I'll queue this up.

Regards,
Andy

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/5] ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control
  2017-01-27  0:47   ` Stephen Boyd
@ 2017-05-24 19:18     ` Bjorn Andersson
  -1 siblings, 0 replies; 21+ messages in thread
From: Bjorn Andersson @ 2017-05-24 19:18 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Andy Gross, linux-arm-kernel, linux-kernel, linux-arm-msm

On Thu 26 Jan 16:47 PST 2017, Stephen Boyd wrote:

> These regulators are controlled by the SPMI regulator driver
> instead of the RPM regulator driver in the downstream android
> kernel sources. Let's remove them from the DTS here because
> they'll never be used by the RPM regulator driver.
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>

But the same vin_5vs-supply property can be found in
qcom-apq8074-dragonboard.dts, so that should probably also go.

Regards,
Bjorn

> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
> ---
>  arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 1 -
>  arch/arm/boot/dts/qcom-msm8974.dtsi                   | 4 ----
>  2 files changed, 5 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> index e7c1577d56f4..50966378f9e4 100644
> --- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> +++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> @@ -92,7 +92,6 @@
>  					vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
>  					vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
>  					vdd_l21-supply = <&vreg_boost>;
> -					vin_5vs-supply = <&pm8941_5v>;
>  
>  					s1 {
>  						regulator-min-microvolt = <1300000>;
> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
> index 0e9bbede860d..6c167c031368 100644
> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
> @@ -735,7 +735,6 @@
>  					pm8941_s1: s1 {};
>  					pm8941_s2: s2 {};
>  					pm8941_s3: s3 {};
> -					pm8941_5v: s4 {};
>  
>  					pm8941_l1: l1 {};
>  					pm8941_l2: l2 {};
> @@ -765,9 +764,6 @@
>  					pm8941_lvs1: lvs1 {};
>  					pm8941_lvs2: lvs2 {};
>  					pm8941_lvs3: lvs3 {};
> -
> -					pm8941_5vs1: 5vs1 {};
> -					pm8941_5vs2: 5vs2 {};
>  				};
>  			};
>  		};
> -- 
> 2.10.0.297.gf6727b0
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/5] ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control
@ 2017-05-24 19:18     ` Bjorn Andersson
  0 siblings, 0 replies; 21+ messages in thread
From: Bjorn Andersson @ 2017-05-24 19:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu 26 Jan 16:47 PST 2017, Stephen Boyd wrote:

> These regulators are controlled by the SPMI regulator driver
> instead of the RPM regulator driver in the downstream android
> kernel sources. Let's remove them from the DTS here because
> they'll never be used by the RPM regulator driver.
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>

Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>

But the same vin_5vs-supply property can be found in
qcom-apq8074-dragonboard.dts, so that should probably also go.

Regards,
Bjorn

> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
> ---
>  arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 1 -
>  arch/arm/boot/dts/qcom-msm8974.dtsi                   | 4 ----
>  2 files changed, 5 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> index e7c1577d56f4..50966378f9e4 100644
> --- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> +++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
> @@ -92,7 +92,6 @@
>  					vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
>  					vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
>  					vdd_l21-supply = <&vreg_boost>;
> -					vin_5vs-supply = <&pm8941_5v>;
>  
>  					s1 {
>  						regulator-min-microvolt = <1300000>;
> diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
> index 0e9bbede860d..6c167c031368 100644
> --- a/arch/arm/boot/dts/qcom-msm8974.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
> @@ -735,7 +735,6 @@
>  					pm8941_s1: s1 {};
>  					pm8941_s2: s2 {};
>  					pm8941_s3: s3 {};
> -					pm8941_5v: s4 {};
>  
>  					pm8941_l1: l1 {};
>  					pm8941_l2: l2 {};
> @@ -765,9 +764,6 @@
>  					pm8941_lvs1: lvs1 {};
>  					pm8941_lvs2: lvs2 {};
>  					pm8941_lvs3: lvs3 {};
> -
> -					pm8941_5vs1: 5vs1 {};
> -					pm8941_5vs2: 5vs2 {};
>  				};
>  			};
>  		};
> -- 
> 2.10.0.297.gf6727b0
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-05-24 19:18 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27  0:47 [PATCH 0/5] Updated qcom dts for new USB driver Stephen Boyd
2017-01-27  0:47 ` Stephen Boyd
2017-01-27  0:47 ` [PATCH 1/5] ARM: dts: qcom: Remove s4/5vs1,2 from RPM pm8941 control Stephen Boyd
2017-01-27  0:47   ` Stephen Boyd
2017-05-24 19:18   ` Bjorn Andersson
2017-05-24 19:18     ` Bjorn Andersson
2017-01-27  0:47 ` [PATCH 2/5] ARM: dts: qcom: add charger otg regulator Stephen Boyd
2017-01-27  0:47   ` Stephen Boyd
2017-01-27  0:47 ` [PATCH 3/5] ARM: dts: qcom-msm8974: Add HS usb node and OTG detection mechanisms Stephen Boyd
2017-01-27  0:47   ` Stephen Boyd
2017-01-27  0:47 ` [PATCH 4/5] ARM: dts: qcom-apq8064: Collapse usb support into one node Stephen Boyd
2017-01-27  0:47   ` Stephen Boyd
2017-02-28 23:50   ` John Stultz
2017-02-28 23:50     ` John Stultz
2017-02-28 23:50     ` John Stultz
2017-01-27  0:47 ` [PATCH 5/5] arm64: dts: qcom: " Stephen Boyd
2017-01-27  0:47   ` Stephen Boyd
2017-05-18 19:03   ` Bjorn Andersson
2017-05-18 19:03     ` Bjorn Andersson
2017-05-24  1:27     ` Andy Gross
2017-05-24  1:27       ` Andy Gross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.