All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] USB support for DRA7-evm
@ 2014-04-28 14:01 Roger Quadros
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  2014-04-28 14:01 ` [PATCH v2 7/7] dts: dra7-evm: add USB support Roger Quadros
  0 siblings, 2 replies; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

Hi,

This series enables the 2 USB ports on the DRA7-evm.

NOTE: USB1 port is hard coded to work in peripheral mode and USB2 port
in host mode. This is due to missing ID pin interrupt in pre ver.E boards.

USB1 port doesn't in peripheral mode out of the box due to missing VBUS detection
and mailbox write. To test this I had to do a manual write to enable VBUSVALID
in the USB_UTMI_OTG_STATUS register.
	omapconf set bit 0x48880084 1

USB2 port works well in host mode.

Patches are based on 3.15-rc3.

cheers,
-roger

Roger Quadros (7):
  ARM: dts: dra7-clock: Add "l3init_960m_gfclk" clock gate
  ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss
  phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
  ARM: dts: omap4+: Add clocks to USB2 PHY node
  phy: omap-usb2: Add clock names to Documentation binding
  ARM: dts: dra7: Add USB related nodes
  dts: dra7-evm: add USB support

 Documentation/devicetree/bindings/phy/ti-phy.txt |   7 ++
 arch/arm/boot/dts/dra7-evm.dts                   |  24 ++++
 arch/arm/boot/dts/dra7.dtsi                      | 149 +++++++++++++++++++++++
 arch/arm/boot/dts/dra7xx-clocks.dtsi             |  12 +-
 arch/arm/boot/dts/omap4.dtsi                     |   2 +
 arch/arm/boot/dts/omap5.dtsi                     |   2 +
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c        |  22 ++--
 drivers/phy/phy-omap-usb2.c                      |   8 +-
 8 files changed, 210 insertions(+), 16 deletions(-)

-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 1/7] ARM: dts: dra7-clock: Add "l3init_960m_gfclk" clock gate
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2014-04-28 14:01   ` Roger Quadros
  2014-04-28 14:01   ` [PATCH v2 2/7] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss Roger Quadros
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Roger Quadros, Tero Kristo

This clock gate description is missing in the older Reference manuals.
It is present on the SoC to provide 960MHz reference clock to the
internal USB PHYs.

Reference: DRA75x_DRA74x_ES1.1_NDA_TRM_vO.pdf, pg. 900,
Table 3-812. CM_COREAON_L3INIT_60M_GFCLK_CLKCTRL

Use l3init_960m_gfclk as parent of usb_otg_ss1_refclk960m and
usb_otg_ss2_refclk960m.

CC: Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>
Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/dra7xx-clocks.dtsi | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi
index cfb8fc7..c767687 100644
--- a/arch/arm/boot/dts/dra7xx-clocks.dtsi
+++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi
@@ -1386,6 +1386,14 @@
 		ti,dividers = <1>, <8>;
 	};
 
+	l3init_960m_gfclk: l3init_960m_gfclk {
+		#clock-cells = <0>;
+		compatible = "ti,gate-clock";
+		clocks = <&dpll_usb_clkdcoldo>;
+		ti,bit-shift = <8>;
+		reg = <0x06c0>;
+	};
+
 	dss_32khz_clk: dss_32khz_clk {
 		#clock-cells = <0>;
 		compatible = "ti,gate-clock";
@@ -1533,7 +1541,7 @@
 	usb_otg_ss1_refclk960m: usb_otg_ss1_refclk960m {
 		#clock-cells = <0>;
 		compatible = "ti,gate-clock";
-		clocks = <&dpll_usb_clkdcoldo>;
+		clocks = <&l3init_960m_gfclk>;
 		ti,bit-shift = <8>;
 		reg = <0x13f0>;
 	};
@@ -1541,7 +1549,7 @@
 	usb_otg_ss2_refclk960m: usb_otg_ss2_refclk960m {
 		#clock-cells = <0>;
 		compatible = "ti,gate-clock";
-		clocks = <&dpll_usb_clkdcoldo>;
+		clocks = <&l3init_960m_gfclk>;
 		ti,bit-shift = <8>;
 		reg = <0x1340>;
 	};
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 2/7] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  2014-04-28 14:01   ` [PATCH v2 1/7] ARM: dts: dra7-clock: Add "l3init_960m_gfclk" clock gate Roger Quadros
@ 2014-04-28 14:01   ` Roger Quadros
  2014-04-28 14:01   ` [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk" Roger Quadros
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

Add the sysconfig class bits for the Super Speed USB
controllers

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 810c205..067d322 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1731,8 +1731,20 @@ static struct omap_hwmod dra7xx_uart6_hwmod = {
  *
  */
 
+static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0010,
+	.sysc_flags	= (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
+			   SYSC_HAS_SIDLEMODE),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+			   SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
+			   MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
+	.sysc_fields	= &omap_hwmod_sysc_type2,
+};
+
 static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
 	.name	= "usb_otg_ss",
+	.sysc	= &dra7xx_usb_otg_ss_sysc,
 };
 
 /* usb_otg_ss1 */
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  2014-04-28 14:01   ` [PATCH v2 1/7] ARM: dts: dra7-clock: Add "l3init_960m_gfclk" clock gate Roger Quadros
  2014-04-28 14:01   ` [PATCH v2 2/7] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss Roger Quadros
@ 2014-04-28 14:01   ` Roger Quadros
       [not found]     ` <1398693687-13967-4-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  2014-04-28 14:01   ` [PATCH v2 4/7] ARM: dts: omap4+: Add clocks to USB2 PHY node Roger Quadros
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

As clocks might be named differently on multiple platforms, use a generic
name in the driver and allow device tree node to specify the platform
specific clock name.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 drivers/phy/phy-omap-usb2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index a2205a8..fb5e515 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	if (IS_ERR(phy_provider))
 		return PTR_ERR(phy_provider);
 
-	phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
+	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
 	if (IS_ERR(phy->wkupclk)) {
-		dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
+		dev_err(&pdev->dev, "unable to get wkupclk\n");
 		return PTR_ERR(phy->wkupclk);
 	}
 	clk_prepare(phy->wkupclk);
 
-	phy->optclk = devm_clk_get(phy->dev, "usb_otg_ss_refclk960m");
+	phy->optclk = devm_clk_get(phy->dev, "refclk");
 	if (IS_ERR(phy->optclk))
-		dev_vdbg(&pdev->dev, "unable to get refclk960m\n");
+		dev_dbg(&pdev->dev, "unable to get refclk\n");
 	else
 		clk_prepare(phy->optclk);
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 4/7] ARM: dts: omap4+: Add clocks to USB2 PHY node
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
                     ` (2 preceding siblings ...)
  2014-04-28 14:01   ` [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk" Roger Quadros
@ 2014-04-28 14:01   ` Roger Quadros
       [not found]     ` <1398693687-13967-5-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  2014-04-28 14:01   ` [PATCH v2 5/7] phy: omap-usb2: Add clock names to Documentation binding Roger Quadros
  2014-04-28 14:01   ` [PATCH v2 6/7] ARM: dts: dra7: Add USB related nodes Roger Quadros
  5 siblings, 1 reply; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

The USB2 PHY driver expects named clocks for wakeup clock
and reference clock. Provide this information for USB2 PHY
nodes in OMAP4 and OMAP5 SoC DTS.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/omap4.dtsi | 2 ++
 arch/arm/boot/dts/omap5.dtsi | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 649b5cd..f866de9 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -642,6 +642,8 @@
 				compatible = "ti,omap-usb2";
 				reg = <0x4a0ad080 0x58>;
 				ctrl-module = <&omap_control_usb2phy>;
+				clocks = <&usb_phy_cm_clk32k>;
+				clock-names = "wkupclk";
 				#phy-cells = <0>;
 			};
 		};
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index f8c9855..47b714c 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -803,6 +803,8 @@
 				compatible = "ti,omap-usb2";
 				reg = <0x4a084000 0x7c>;
 				ctrl-module = <&omap_control_usb2phy>;
+				clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
+				clock-names = "wkupclk", "refclk";
 				#phy-cells = <0>;
 			};
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 5/7] phy: omap-usb2: Add clock names to Documentation binding
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
                     ` (3 preceding siblings ...)
  2014-04-28 14:01   ` [PATCH v2 4/7] ARM: dts: omap4+: Add clocks to USB2 PHY node Roger Quadros
@ 2014-04-28 14:01   ` Roger Quadros
       [not found]     ` <1398693687-13967-6-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  2014-04-28 14:01   ` [PATCH v2 6/7] ARM: dts: dra7: Add USB related nodes Roger Quadros
  5 siblings, 1 reply; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

Add "wkupclk" and "refclk" information to DT binding information.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 Documentation/devicetree/bindings/phy/ti-phy.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt
index 788fb0f..9ce458f 100644
--- a/Documentation/devicetree/bindings/phy/ti-phy.txt
+++ b/Documentation/devicetree/bindings/phy/ti-phy.txt
@@ -32,6 +32,11 @@ Required properties:
  - reg : Address and length of the register set for the device.
  - #phy-cells: determine the number of cells that should be given in the
    phandle while referencing this phy.
+ - clocks: a list of phandles and clock-specifier pairs, one for each entry in
+   clock-names.
+ - clock-names: should include:
+   * "wkupclk" - wakeup clock.
+   * "refclk" - reference clock (optional).
 
 Optional properties:
  - ctrl-module : phandle of the control module used by PHY driver to power on
@@ -44,6 +49,8 @@ usb2phy@4a0ad080 {
 	reg = <0x4a0ad080 0x58>;
 	ctrl-module = <&omap_control_usb>;
 	#phy-cells = <0>;
+	clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
+	clock-names = "wkupclk", "refclk";
 };
 
 TI PIPE3 PHY
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 6/7] ARM: dts: dra7: Add USB related nodes
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
                     ` (4 preceding siblings ...)
  2014-04-28 14:01   ` [PATCH v2 5/7] phy: omap-usb2: Add clock names to Documentation binding Roger Quadros
@ 2014-04-28 14:01   ` Roger Quadros
  2014-04-28 16:05     ` Felipe Balbi
  5 siblings, 1 reply; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Roger Quadros

Add nodes for the Super Speed USB controllers, omap-control-usb,
USB2 PHY and USB3 PHY devices.

Remove ocp2scp1 address space from hwmod data as it is
now provided via device tree.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/dra7.dtsi               | 149 ++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c |  10 --
 2 files changed, 149 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 149b550..4535e54 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -789,6 +789,155 @@
 			dma-names = "tx0", "rx0";
 			status = "disabled";
 		};
+
+		omap_control_usb2phy1: control-phy@4a002300 {
+			compatible = "ti,control-phy-usb2";
+			reg = <0x4a002300 0x4>;
+			reg-names = "power";
+		};
+
+		omap_control_usb3phy1: control-phy@4a002370 {
+			compatible = "ti,control-phy-pipe3";
+			reg = <0x4a002370 0x4>;
+			reg-names = "power";
+		};
+
+		omap_control_usb2phy2: control-phy@0x4a002e74 {
+			compatible = "ti,control-phy-usb2-dra7";
+			reg = <0x4a002e74 0x4>;
+			reg-names = "power";
+		};
+
+		/* OCP2SCP1 */
+		ocp2scp@4a080000 {
+			compatible = "ti,omap-ocp2scp";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			reg = <0x4a080000 0x20>;
+			ti,hwmods = "ocp2scp1";
+
+			usb2_phy1: phy@4a084000 {
+				compatible = "ti,omap-usb2";
+				reg = <0x4a084000 0x400>;
+				ctrl-module = <&omap_control_usb2phy1>;
+				clocks = <&usb_phy1_always_on_clk32k>,
+					 <&usb_otg_ss1_refclk960m>;
+				clock-names =	"wkupclk",
+						"refclk";
+				#phy-cells = <0>;
+			};
+
+			usb2_phy2: phy@4a085000 {
+				compatible = "ti,omap-usb2";
+				reg = <0x4a085000 0x400>;
+				ctrl-module = <&omap_control_usb2phy2>;
+				clocks = <&usb_phy2_always_on_clk32k>,
+					 <&usb_otg_ss2_refclk960m>;
+				clock-names =	"wkupclk",
+						"refclk";
+				#phy-cells = <0>;
+			};
+
+			usb3_phy1: phy@4a084400 {
+				compatible = "ti,omap-usb3";
+				reg = <0x4a084400 0x80>,
+				      <0x4a084800 0x64>,
+				      <0x4a084c00 0x40>;
+				reg-names = "phy_rx", "phy_tx", "pll_ctrl";
+				ctrl-module = <&omap_control_usb3phy1>;
+				clocks = <&usb_phy3_always_on_clk32k>,
+					 <&sys_clkin1>,
+					 <&usb_otg_ss1_refclk960m>;
+				clock-names =	"wkupclk",
+						"sysclk",
+						"refclk";
+				#phy-cells = <0>;
+			};
+		};
+
+		omap_dwc3_1@48880000 {
+			compatible = "ti,dwc3";
+			ti,hwmods = "usb_otg_ss1";
+			reg = <0x48880000 0x10000>;
+			interrupts = <0 77 4>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			utmi-mode = <2>;
+			ranges;
+			usb1: usb@48890000 {
+				compatible = "snps,dwc3";
+				reg = <0x48890000 0x17000>;
+				interrupts = <0 76 4>;
+				phys = <&usb2_phy1>, <&usb3_phy1>;
+				phy-names = "usb2-phy", "usb3-phy";
+				tx-fifo-resize;
+				maximum-speed = "super-speed";
+				dr_mode = "otg";
+			};
+		};
+
+		omap_dwc3_2@488c0000 {
+			compatible = "ti,dwc3";
+			ti,hwmods = "usb_otg_ss2";
+			reg = <0x488c0000 0x10000>;
+			interrupts = <0 92 4>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			utmi-mode = <2>;
+			ranges;
+			usb2: usb@488d0000 {
+				compatible = "snps,dwc3";
+				reg = <0x488d0000 0x17000>;
+				interrupts = <0 78 4>;
+				phys = <&usb2_phy2>;
+				phy-names = "usb2-phy";
+				tx-fifo-resize;
+				maximum-speed = "high-speed";
+				dr_mode = "otg";
+			};
+		};
+
+		/* IRQ for DWC3_3 and DWC3_4 need IRQ crossbar */
+		omap_dwc3_3@48900000 {
+			compatible = "ti,dwc3";
+			ti,hwmods = "usb_otg_ss3";
+			reg = <0x48900000 0x10000>;
+		/*	interrupts = <0 TBD 4>; */
+			#address-cells = <1>;
+			#size-cells = <1>;
+			utmi-mode = <2>;
+			ranges;
+			status = "disabled";
+			usb3: usb@48910000 {
+				compatible = "snps,dwc3";
+				reg = <0x48910000 0x17000>;
+		/*		interrupts = <0 93 4>; */
+				tx-fifo-resize;
+				maximum-speed = "high-speed";
+				dr_mode = "otg";
+			};
+		};
+
+		omap_dwc3_4@48940000 {
+			compatible = "ti,dwc3";
+			ti,hwmods = "usb_otg_ss4";
+			reg = <0x48940000 0x10000>;
+		/*	interrupts = <0 TBD 4>; */
+			#address-cells = <1>;
+			#size-cells = <1>;
+			utmi-mode = <2>;
+			ranges;
+			status = "disabled";
+			usb4: usb@48950000 {
+				compatible = "snps,dwc3";
+				reg = <0x48950000 0x17000>;
+		/*		interrupts = <0 TBD 4>; */
+				tx-fifo-resize;
+				maximum-speed = "high-speed";
+				dr_mode = "otg";
+			};
+		};
 	};
 };
 
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 067d322..d6f9709 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -2330,21 +2330,11 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
-static struct omap_hwmod_addr_space dra7xx_ocp2scp1_addrs[] = {
-	{
-		.pa_start	= 0x4a080000,
-		.pa_end		= 0x4a08001f,
-		.flags		= ADDR_TYPE_RT
-	},
-	{ }
-};

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

* [PATCH v2 7/7] dts: dra7-evm: add USB support
  2014-04-28 14:01 [PATCH v2 0/7] USB support for DRA7-evm Roger Quadros
       [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2014-04-28 14:01 ` Roger Quadros
       [not found]   ` <1398693687-13967-8-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  1 sibling, 1 reply; 22+ messages in thread
From: Roger Quadros @ 2014-04-28 14:01 UTC (permalink / raw)
  To: balbi, kishon, tony
  Cc: george.cherian, linux-omap, devicetree, linux-usb, Roger Quadros

Add USB pinmux information and USB modes
for the USB controllers.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 arch/arm/boot/dts/dra7-evm.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 5babba0..1d77815 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -93,6 +93,18 @@
 			0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
 		>;
 	};
+
+	usb1_pins: pinmux_usb1_pins {
+                pinctrl-single,pins = <
+			0x280	0xc0000	/* usb1_drvvbus, SLOW_SLEW | PULLUPEN | MODE0 */
+                >;
+        };
+
+	usb2_pins: pinmux_usb2_pins {
+                pinctrl-single,pins = <
+			0x284	0xc0000 /* usb2_drvvbus, SLOW_SLEW | PULLUPEN | MODE0 */
+                >;
+        };
 };
 
 &i2c1 {
@@ -273,3 +285,15 @@
 &cpu0 {
 	cpu0-supply = <&smps123_reg>;
 };
+
+&usb1 {
+	dr_mode = "peripheral";
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb1_pins>;
+};
+
+&usb2 {
+	dr_mode = "host";
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb2_pins>;
+};
-- 
1.8.3.2


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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
       [not found]     ` <1398693687-13967-4-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2014-04-28 16:03       ` Felipe Balbi
       [not found]         ` <20140428160347.GG30292-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Felipe Balbi @ 2014-04-28 16:03 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, kishon-l0cyMroinI0,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]

Hi,

On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
> As clocks might be named differently on multiple platforms, use a generic
> name in the driver and allow device tree node to specify the platform
> specific clock name.
> 
> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
> ---
>  drivers/phy/phy-omap-usb2.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
> index a2205a8..fb5e515 100644
> --- a/drivers/phy/phy-omap-usb2.c
> +++ b/drivers/phy/phy-omap-usb2.c
> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>  	if (IS_ERR(phy_provider))
>  		return PTR_ERR(phy_provider);
>  
> -	phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
> +	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");

doesn't this patch cause a regression ? I mean, you're changing the
clock name before fixing DTS. Also, that DTS has been in a major version
of the kernel, so we need to maintain compatibility with it. How about:

	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
	if (IS_ERR(phy->wkupclk)) {
		dev_err(&pdev->dev, "unable to get wkupclk, trying old name\n");
		phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
		if (IS_ERR(phy->wkupclk)) {
			dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
			return PTR_ERR(phy->wkupclk);
		} else {
			dev_warn(&pdev->dev, "found usb_phy_cm_clk32k, please fix your DTS\n");
		}
	}

a bit ugly, but at least we don't cause any regressions. Likewise for
other clocks.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 4/7] ARM: dts: omap4+: Add clocks to USB2 PHY node
       [not found]     ` <1398693687-13967-5-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2014-04-28 16:04       ` Felipe Balbi
  0 siblings, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2014-04-28 16:04 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, kishon-l0cyMroinI0,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]

On Mon, Apr 28, 2014 at 05:01:24PM +0300, Roger Quadros wrote:
> The USB2 PHY driver expects named clocks for wakeup clock
> and reference clock. Provide this information for USB2 PHY
> nodes in OMAP4 and OMAP5 SoC DTS.
> 
> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>

Reviewed-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>

> ---
>  arch/arm/boot/dts/omap4.dtsi | 2 ++
>  arch/arm/boot/dts/omap5.dtsi | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> index 649b5cd..f866de9 100644
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -642,6 +642,8 @@
>  				compatible = "ti,omap-usb2";
>  				reg = <0x4a0ad080 0x58>;
>  				ctrl-module = <&omap_control_usb2phy>;
> +				clocks = <&usb_phy_cm_clk32k>;
> +				clock-names = "wkupclk";
>  				#phy-cells = <0>;
>  			};
>  		};
> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> index f8c9855..47b714c 100644
> --- a/arch/arm/boot/dts/omap5.dtsi
> +++ b/arch/arm/boot/dts/omap5.dtsi
> @@ -803,6 +803,8 @@
>  				compatible = "ti,omap-usb2";
>  				reg = <0x4a084000 0x7c>;
>  				ctrl-module = <&omap_control_usb2phy>;
> +				clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
> +				clock-names = "wkupclk", "refclk";
>  				#phy-cells = <0>;
>  			};
>  
> -- 
> 1.8.3.2
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 5/7] phy: omap-usb2: Add clock names to Documentation binding
       [not found]     ` <1398693687-13967-6-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2014-04-28 16:04       ` Felipe Balbi
  2014-04-28 17:23       ` Sergei Shtylyov
  1 sibling, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2014-04-28 16:04 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, kishon-l0cyMroinI0,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]

On Mon, Apr 28, 2014 at 05:01:25PM +0300, Roger Quadros wrote:
> Add "wkupclk" and "refclk" information to DT binding information.
> 
> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>

Reviewed-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>

> ---
>  Documentation/devicetree/bindings/phy/ti-phy.txt | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt
> index 788fb0f..9ce458f 100644
> --- a/Documentation/devicetree/bindings/phy/ti-phy.txt
> +++ b/Documentation/devicetree/bindings/phy/ti-phy.txt
> @@ -32,6 +32,11 @@ Required properties:
>   - reg : Address and length of the register set for the device.
>   - #phy-cells: determine the number of cells that should be given in the
>     phandle while referencing this phy.
> + - clocks: a list of phandles and clock-specifier pairs, one for each entry in
> +   clock-names.
> + - clock-names: should include:
> +   * "wkupclk" - wakeup clock.
> +   * "refclk" - reference clock (optional).
>  
>  Optional properties:
>   - ctrl-module : phandle of the control module used by PHY driver to power on
> @@ -44,6 +49,8 @@ usb2phy@4a0ad080 {
>  	reg = <0x4a0ad080 0x58>;
>  	ctrl-module = <&omap_control_usb>;
>  	#phy-cells = <0>;
> +	clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
> +	clock-names = "wkupclk", "refclk";
>  };
>  
>  TI PIPE3 PHY
> -- 
> 1.8.3.2
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 6/7] ARM: dts: dra7: Add USB related nodes
  2014-04-28 14:01   ` [PATCH v2 6/7] ARM: dts: dra7: Add USB related nodes Roger Quadros
@ 2014-04-28 16:05     ` Felipe Balbi
  0 siblings, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2014-04-28 16:05 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi, kishon, tony, george.cherian, linux-omap, devicetree, linux-usb

[-- Attachment #1: Type: text/plain, Size: 5910 bytes --]

On Mon, Apr 28, 2014 at 05:01:26PM +0300, Roger Quadros wrote:
> Add nodes for the Super Speed USB controllers, omap-control-usb,
> USB2 PHY and USB3 PHY devices.
> 
> Remove ocp2scp1 address space from hwmod data as it is
> now provided via device tree.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>

Reviewed-by: Felipe Balbi <balbi@ti.com>

> ---
>  arch/arm/boot/dts/dra7.dtsi               | 149 ++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |  10 --
>  2 files changed, 149 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> index 149b550..4535e54 100644
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -789,6 +789,155 @@
>  			dma-names = "tx0", "rx0";
>  			status = "disabled";
>  		};
> +
> +		omap_control_usb2phy1: control-phy@4a002300 {
> +			compatible = "ti,control-phy-usb2";
> +			reg = <0x4a002300 0x4>;
> +			reg-names = "power";
> +		};
> +
> +		omap_control_usb3phy1: control-phy@4a002370 {
> +			compatible = "ti,control-phy-pipe3";
> +			reg = <0x4a002370 0x4>;
> +			reg-names = "power";
> +		};
> +
> +		omap_control_usb2phy2: control-phy@0x4a002e74 {
> +			compatible = "ti,control-phy-usb2-dra7";
> +			reg = <0x4a002e74 0x4>;
> +			reg-names = "power";
> +		};
> +
> +		/* OCP2SCP1 */
> +		ocp2scp@4a080000 {
> +			compatible = "ti,omap-ocp2scp";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges;
> +			reg = <0x4a080000 0x20>;
> +			ti,hwmods = "ocp2scp1";
> +
> +			usb2_phy1: phy@4a084000 {
> +				compatible = "ti,omap-usb2";
> +				reg = <0x4a084000 0x400>;
> +				ctrl-module = <&omap_control_usb2phy1>;
> +				clocks = <&usb_phy1_always_on_clk32k>,
> +					 <&usb_otg_ss1_refclk960m>;
> +				clock-names =	"wkupclk",
> +						"refclk";
> +				#phy-cells = <0>;
> +			};
> +
> +			usb2_phy2: phy@4a085000 {
> +				compatible = "ti,omap-usb2";
> +				reg = <0x4a085000 0x400>;
> +				ctrl-module = <&omap_control_usb2phy2>;
> +				clocks = <&usb_phy2_always_on_clk32k>,
> +					 <&usb_otg_ss2_refclk960m>;
> +				clock-names =	"wkupclk",
> +						"refclk";
> +				#phy-cells = <0>;
> +			};
> +
> +			usb3_phy1: phy@4a084400 {
> +				compatible = "ti,omap-usb3";
> +				reg = <0x4a084400 0x80>,
> +				      <0x4a084800 0x64>,
> +				      <0x4a084c00 0x40>;
> +				reg-names = "phy_rx", "phy_tx", "pll_ctrl";
> +				ctrl-module = <&omap_control_usb3phy1>;
> +				clocks = <&usb_phy3_always_on_clk32k>,
> +					 <&sys_clkin1>,
> +					 <&usb_otg_ss1_refclk960m>;
> +				clock-names =	"wkupclk",
> +						"sysclk",
> +						"refclk";
> +				#phy-cells = <0>;
> +			};
> +		};
> +
> +		omap_dwc3_1@48880000 {
> +			compatible = "ti,dwc3";
> +			ti,hwmods = "usb_otg_ss1";
> +			reg = <0x48880000 0x10000>;
> +			interrupts = <0 77 4>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			utmi-mode = <2>;
> +			ranges;
> +			usb1: usb@48890000 {
> +				compatible = "snps,dwc3";
> +				reg = <0x48890000 0x17000>;
> +				interrupts = <0 76 4>;
> +				phys = <&usb2_phy1>, <&usb3_phy1>;
> +				phy-names = "usb2-phy", "usb3-phy";
> +				tx-fifo-resize;
> +				maximum-speed = "super-speed";
> +				dr_mode = "otg";
> +			};
> +		};
> +
> +		omap_dwc3_2@488c0000 {
> +			compatible = "ti,dwc3";
> +			ti,hwmods = "usb_otg_ss2";
> +			reg = <0x488c0000 0x10000>;
> +			interrupts = <0 92 4>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			utmi-mode = <2>;
> +			ranges;
> +			usb2: usb@488d0000 {
> +				compatible = "snps,dwc3";
> +				reg = <0x488d0000 0x17000>;
> +				interrupts = <0 78 4>;
> +				phys = <&usb2_phy2>;
> +				phy-names = "usb2-phy";
> +				tx-fifo-resize;
> +				maximum-speed = "high-speed";
> +				dr_mode = "otg";
> +			};
> +		};
> +
> +		/* IRQ for DWC3_3 and DWC3_4 need IRQ crossbar */
> +		omap_dwc3_3@48900000 {
> +			compatible = "ti,dwc3";
> +			ti,hwmods = "usb_otg_ss3";
> +			reg = <0x48900000 0x10000>;
> +		/*	interrupts = <0 TBD 4>; */
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			utmi-mode = <2>;
> +			ranges;
> +			status = "disabled";
> +			usb3: usb@48910000 {
> +				compatible = "snps,dwc3";
> +				reg = <0x48910000 0x17000>;
> +		/*		interrupts = <0 93 4>; */
> +				tx-fifo-resize;
> +				maximum-speed = "high-speed";
> +				dr_mode = "otg";
> +			};
> +		};
> +
> +		omap_dwc3_4@48940000 {
> +			compatible = "ti,dwc3";
> +			ti,hwmods = "usb_otg_ss4";
> +			reg = <0x48940000 0x10000>;
> +		/*	interrupts = <0 TBD 4>; */
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			utmi-mode = <2>;
> +			ranges;
> +			status = "disabled";
> +			usb4: usb@48950000 {
> +				compatible = "snps,dwc3";
> +				reg = <0x48950000 0x17000>;
> +		/*		interrupts = <0 TBD 4>; */
> +				tx-fifo-resize;
> +				maximum-speed = "high-speed";
> +				dr_mode = "otg";
> +			};
> +		};
>  	};
>  };
>  
> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> index 067d322..d6f9709 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> @@ -2330,21 +2330,11 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
>  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
>  };
>  
> -static struct omap_hwmod_addr_space dra7xx_ocp2scp1_addrs[] = {
> -	{
> -		.pa_start	= 0x4a080000,
> -		.pa_end		= 0x4a08001f,
> -		.flags		= ADDR_TYPE_RT
> -	},
> -	{ }
> -};
> -
>  /* l4_cfg -> ocp2scp1 */
>  static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
>  	.master		= &dra7xx_l4_cfg_hwmod,
>  	.slave		= &dra7xx_ocp2scp1_hwmod,
>  	.clk		= "l4_root_clk_div",
> -	.addr		= dra7xx_ocp2scp1_addrs,
>  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
>  };
>  
> -- 
> 1.8.3.2
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 7/7] dts: dra7-evm: add USB support
       [not found]   ` <1398693687-13967-8-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
@ 2014-04-28 16:07     ` Felipe Balbi
  0 siblings, 0 replies; 22+ messages in thread
From: Felipe Balbi @ 2014-04-28 16:07 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, kishon-l0cyMroinI0,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]

On Mon, Apr 28, 2014 at 05:01:27PM +0300, Roger Quadros wrote:
> Add USB pinmux information and USB modes
> for the USB controllers.
> 
> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>

Reviewed-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>

> ---
>  arch/arm/boot/dts/dra7-evm.dts | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
> index 5babba0..1d77815 100644
> --- a/arch/arm/boot/dts/dra7-evm.dts
> +++ b/arch/arm/boot/dts/dra7-evm.dts
> @@ -93,6 +93,18 @@
>  			0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
>  		>;
>  	};
> +
> +	usb1_pins: pinmux_usb1_pins {
> +                pinctrl-single,pins = <
> +			0x280	0xc0000	/* usb1_drvvbus, SLOW_SLEW | PULLUPEN | MODE0 */
> +                >;
> +        };
> +
> +	usb2_pins: pinmux_usb2_pins {
> +                pinctrl-single,pins = <
> +			0x284	0xc0000 /* usb2_drvvbus, SLOW_SLEW | PULLUPEN | MODE0 */
> +                >;
> +        };
>  };
>  
>  &i2c1 {
> @@ -273,3 +285,15 @@
>  &cpu0 {
>  	cpu0-supply = <&smps123_reg>;
>  };
> +
> +&usb1 {
> +	dr_mode = "peripheral";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb1_pins>;
> +};
> +
> +&usb2 {
> +	dr_mode = "host";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb2_pins>;
> +};
> -- 
> 1.8.3.2
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 5/7] phy: omap-usb2: Add clock names to Documentation binding
       [not found]     ` <1398693687-13967-6-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
  2014-04-28 16:04       ` Felipe Balbi
@ 2014-04-28 17:23       ` Sergei Shtylyov
  2014-04-29  7:57         ` Roger Quadros
  1 sibling, 1 reply; 22+ messages in thread
From: Sergei Shtylyov @ 2014-04-28 17:23 UTC (permalink / raw)
  To: Roger Quadros, balbi-l0cyMroinI0, kishon-l0cyMroinI0,
	tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Hello.

On 04/28/2014 06:01 PM, Roger Quadros wrote:

> Add "wkupclk" and "refclk" information to DT binding information.

> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
> ---
>   Documentation/devicetree/bindings/phy/ti-phy.txt | 7 +++++++
>   1 file changed, 7 insertions(+)

> diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt
> index 788fb0f..9ce458f 100644
> --- a/Documentation/devicetree/bindings/phy/ti-phy.txt
> +++ b/Documentation/devicetree/bindings/phy/ti-phy.txt
> @@ -32,6 +32,11 @@ Required properties:
>    - reg : Address and length of the register set for the device.
>    - #phy-cells: determine the number of cells that should be given in the
>      phandle while referencing this phy.
> + - clocks: a list of phandles and clock-specifier pairs, one for each entry in
> +   clock-names.

    I thought clock specifier includes phandle. Anyway, this description 
doesn't seem to match your example...

> + - clock-names: should include:
> +   * "wkupclk" - wakeup clock.
> +   * "refclk" - reference clock (optional).
>
>   Optional properties:
>    - ctrl-module : phandle of the control module used by PHY driver to power on
> @@ -44,6 +49,8 @@ usb2phy@4a0ad080 {
>   	reg = <0x4a0ad080 0x58>;
>   	ctrl-module = <&omap_control_usb>;
>   	#phy-cells = <0>;
> +	clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
> +	clock-names = "wkupclk", "refclk";
>   };

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
       [not found]         ` <20140428160347.GG30292-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
@ 2014-04-29  7:50           ` Roger Quadros
       [not found]             ` <535F59CF.6050002-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Roger Quadros @ 2014-04-29  7:50 UTC (permalink / raw)
  To: balbi-l0cyMroinI0
  Cc: kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Menon, Nishanth

+Nishant

Hi,

On 04/28/2014 07:03 PM, Felipe Balbi wrote:
> Hi,
> 
> On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
>> As clocks might be named differently on multiple platforms, use a generic
>> name in the driver and allow device tree node to specify the platform
>> specific clock name.
>>
>> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
>> ---
>>  drivers/phy/phy-omap-usb2.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
>> index a2205a8..fb5e515 100644
>> --- a/drivers/phy/phy-omap-usb2.c
>> +++ b/drivers/phy/phy-omap-usb2.c
>> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>>  	if (IS_ERR(phy_provider))
>>  		return PTR_ERR(phy_provider);
>>  
>> -	phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
>> +	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
> 
> doesn't this patch cause a regression ? I mean, you're changing the
> clock name before fixing DTS. Also, that DTS has been in a major version
> of the kernel, so we need to maintain compatibility with it. How about:

I'm changing the DTS in Patch 4, but I prefer to do it in this patch to prevent synchronization
issues in -next.

About backward compatibility, I agree with you but at the same time I don't think anyone using TI
SoCs burns the DTB to ROM and needs backward compatibility. We supply our BSPs/SDKs with the updated DTBs.
Do you feel strict backward compatibility is worth the effort for TI specific blocks?

> 
> 	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
> 	if (IS_ERR(phy->wkupclk)) {
> 		dev_err(&pdev->dev, "unable to get wkupclk, trying old name\n");
> 		phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
> 		if (IS_ERR(phy->wkupclk)) {
> 			dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
> 			return PTR_ERR(phy->wkupclk);
> 		} else {
> 			dev_warn(&pdev->dev, "found usb_phy_cm_clk32k, please fix your DTS\n");
> 		}
> 	}
> 
> a bit ugly, but at least we don't cause any regressions. Likewise for
> other clocks.
> 

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 5/7] phy: omap-usb2: Add clock names to Documentation binding
  2014-04-28 17:23       ` Sergei Shtylyov
@ 2014-04-29  7:57         ` Roger Quadros
  0 siblings, 0 replies; 22+ messages in thread
From: Roger Quadros @ 2014-04-29  7:57 UTC (permalink / raw)
  To: Sergei Shtylyov, balbi, kishon, tony
  Cc: george.cherian, linux-omap, devicetree, linux-usb

Hi Sergei,

On 04/28/2014 08:23 PM, Sergei Shtylyov wrote:
> Hello.
> 
> On 04/28/2014 06:01 PM, Roger Quadros wrote:
> 
>> Add "wkupclk" and "refclk" information to DT binding information.
> 
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> ---
>>   Documentation/devicetree/bindings/phy/ti-phy.txt | 7 +++++++
>>   1 file changed, 7 insertions(+)
> 
>> diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt
>> index 788fb0f..9ce458f 100644
>> --- a/Documentation/devicetree/bindings/phy/ti-phy.txt
>> +++ b/Documentation/devicetree/bindings/phy/ti-phy.txt
>> @@ -32,6 +32,11 @@ Required properties:
>>    - reg : Address and length of the register set for the device.
>>    - #phy-cells: determine the number of cells that should be given in the
>>      phandle while referencing this phy.
>> + - clocks: a list of phandles and clock-specifier pairs, one for each entry in
>> +   clock-names.
> 
>    I thought clock specifier includes phandle. Anyway, this description doesn't seem to match your example...

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/clock/clock-bindings.txt#n64

The example was taken from real world where the clock doesn't need specifier.
Examples can always be a subset of supported bindings.

cheers,
-roger

> 
>> + - clock-names: should include:
>> +   * "wkupclk" - wakeup clock.
>> +   * "refclk" - reference clock (optional).
>>
>>   Optional properties:
>>    - ctrl-module : phandle of the control module used by PHY driver to power on
>> @@ -44,6 +49,8 @@ usb2phy@4a0ad080 {
>>       reg = <0x4a0ad080 0x58>;
>>       ctrl-module = <&omap_control_usb>;
>>       #phy-cells = <0>;
>> +    clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
>> +    clock-names = "wkupclk", "refclk";
>>   };
> 
> WBR, Sergei
> 


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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
       [not found]             ` <535F59CF.6050002-l0cyMroinI0@public.gmane.org>
@ 2014-04-29 16:14               ` Felipe Balbi
       [not found]                 ` <20140429161420.GH633-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Felipe Balbi @ 2014-04-29 16:14 UTC (permalink / raw)
  To: Roger Quadros
  Cc: balbi-l0cyMroinI0, kishon-l0cyMroinI0,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, george.cherian-l0cyMroinI0,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Menon, Nishanth

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

On Tue, Apr 29, 2014 at 10:50:39AM +0300, Roger Quadros wrote:
> +Nishant
> 
> Hi,
> 
> On 04/28/2014 07:03 PM, Felipe Balbi wrote:
> > Hi,
> > 
> > On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
> >> As clocks might be named differently on multiple platforms, use a generic
> >> name in the driver and allow device tree node to specify the platform
> >> specific clock name.
> >>
> >> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
> >> ---
> >>  drivers/phy/phy-omap-usb2.c | 8 ++++----
> >>  1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
> >> index a2205a8..fb5e515 100644
> >> --- a/drivers/phy/phy-omap-usb2.c
> >> +++ b/drivers/phy/phy-omap-usb2.c
> >> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
> >>  	if (IS_ERR(phy_provider))
> >>  		return PTR_ERR(phy_provider);
> >>  
> >> -	phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
> >> +	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
> > 
> > doesn't this patch cause a regression ? I mean, you're changing the
> > clock name before fixing DTS. Also, that DTS has been in a major version
> > of the kernel, so we need to maintain compatibility with it. How about:
> 
> I'm changing the DTS in Patch 4, but I prefer to do it in this patch
> to prevent synchronization issues in -next.
> 
> About backward compatibility, I agree with you but at the same time I
> don't think anyone using TI SoCs burns the DTB to ROM and needs
> backward compatibility. We supply our BSPs/SDKs with the updated DTBs.
> Do you feel strict backward compatibility is worth the effort for TI
> specific blocks?

dunno, but it would, at least, avoid "synchronization issues with
linux-next" :-)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
       [not found]                 ` <20140429161420.GH633-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
@ 2014-04-29 16:16                   ` Felipe Balbi
       [not found]                     ` <20140429161616.GI633-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
  2014-04-30 15:20                     ` Nishanth Menon
  0 siblings, 2 replies; 22+ messages in thread
From: Felipe Balbi @ 2014-04-29 16:16 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Roger Quadros, kishon-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	george.cherian-l0cyMroinI0, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Menon, Nishanth

[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]

On Tue, Apr 29, 2014 at 11:14:20AM -0500, Felipe Balbi wrote:
> On Tue, Apr 29, 2014 at 10:50:39AM +0300, Roger Quadros wrote:
> > +Nishant
> > 
> > Hi,
> > 
> > On 04/28/2014 07:03 PM, Felipe Balbi wrote:
> > > Hi,
> > > 
> > > On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
> > >> As clocks might be named differently on multiple platforms, use a generic
> > >> name in the driver and allow device tree node to specify the platform
> > >> specific clock name.
> > >>
> > >> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
> > >> ---
> > >>  drivers/phy/phy-omap-usb2.c | 8 ++++----
> > >>  1 file changed, 4 insertions(+), 4 deletions(-)
> > >>
> > >> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
> > >> index a2205a8..fb5e515 100644
> > >> --- a/drivers/phy/phy-omap-usb2.c
> > >> +++ b/drivers/phy/phy-omap-usb2.c
> > >> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
> > >>  	if (IS_ERR(phy_provider))
> > >>  		return PTR_ERR(phy_provider);
> > >>  
> > >> -	phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
> > >> +	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
> > > 
> > > doesn't this patch cause a regression ? I mean, you're changing the
> > > clock name before fixing DTS. Also, that DTS has been in a major version
> > > of the kernel, so we need to maintain compatibility with it. How about:
> > 
> > I'm changing the DTS in Patch 4, but I prefer to do it in this patch
> > to prevent synchronization issues in -next.
> > 
> > About backward compatibility, I agree with you but at the same time I
> > don't think anyone using TI SoCs burns the DTB to ROM and needs
> > backward compatibility. We supply our BSPs/SDKs with the updated DTBs.
> > Do you feel strict backward compatibility is worth the effort for TI
> > specific blocks?
> 
> dunno, but it would, at least, avoid "synchronization issues with
> linux-next" :-)

and the bisectability issue.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
       [not found]                     ` <20140429161616.GI633-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
@ 2014-04-30  7:16                       ` Roger Quadros
  0 siblings, 0 replies; 22+ messages in thread
From: Roger Quadros @ 2014-04-30  7:16 UTC (permalink / raw)
  To: balbi-l0cyMroinI0, tony-4v6yS6AI5VpBDgjK7y7TUQ
  Cc: kishon-l0cyMroinI0, george.cherian-l0cyMroinI0,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Menon, Nishanth

On 04/29/2014 07:16 PM, Felipe Balbi wrote:
> On Tue, Apr 29, 2014 at 11:14:20AM -0500, Felipe Balbi wrote:
>> On Tue, Apr 29, 2014 at 10:50:39AM +0300, Roger Quadros wrote:
>>> +Nishant
>>>
>>> Hi,
>>>
>>> On 04/28/2014 07:03 PM, Felipe Balbi wrote:
>>>> Hi,
>>>>
>>>> On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
>>>>> As clocks might be named differently on multiple platforms, use a generic
>>>>> name in the driver and allow device tree node to specify the platform
>>>>> specific clock name.
>>>>>
>>>>> Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
>>>>> ---
>>>>>  drivers/phy/phy-omap-usb2.c | 8 ++++----
>>>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
>>>>> index a2205a8..fb5e515 100644
>>>>> --- a/drivers/phy/phy-omap-usb2.c
>>>>> +++ b/drivers/phy/phy-omap-usb2.c
>>>>> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>>>>>  	if (IS_ERR(phy_provider))
>>>>>  		return PTR_ERR(phy_provider);
>>>>>  
>>>>> -	phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
>>>>> +	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
>>>>
>>>> doesn't this patch cause a regression ? I mean, you're changing the
>>>> clock name before fixing DTS. Also, that DTS has been in a major version
>>>> of the kernel, so we need to maintain compatibility with it. How about:
>>>
>>> I'm changing the DTS in Patch 4, but I prefer to do it in this patch
>>> to prevent synchronization issues in -next.
>>>
>>> About backward compatibility, I agree with you but at the same time I
>>> don't think anyone using TI SoCs burns the DTB to ROM and needs
>>> backward compatibility. We supply our BSPs/SDKs with the updated DTBs.
>>> Do you feel strict backward compatibility is worth the effort for TI
>>> specific blocks?
>>
>> dunno, but it would, at least, avoid "synchronization issues with
>> linux-next" :-)
> 
> and the bisectability issue.
> 
If backward compatibility is not the real worry then we could avoid the
synchronization/bisectability issue by squashing the dts changes with this patch.

cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
  2014-04-29 16:16                   ` Felipe Balbi
       [not found]                     ` <20140429161616.GI633-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
@ 2014-04-30 15:20                     ` Nishanth Menon
  2014-05-05  7:23                       ` Roger Quadros
  1 sibling, 1 reply; 22+ messages in thread
From: Nishanth Menon @ 2014-04-30 15:20 UTC (permalink / raw)
  To: Balbi, Felipe
  Cc: Roger Quadros, Kishon Vijay Abraham I, Tony Lindgren,
	george.cherian, linux-omap, dt list, linux-usb

On Tue, Apr 29, 2014 at 11:16 AM, Felipe Balbi <balbi@ti.com> wrote:
> On Tue, Apr 29, 2014 at 11:14:20AM -0500, Felipe Balbi wrote:
>> On Tue, Apr 29, 2014 at 10:50:39AM +0300, Roger Quadros wrote:
>> > +Nishant
>> >
>> > Hi,
>> >
>> > On 04/28/2014 07:03 PM, Felipe Balbi wrote:
>> > > Hi,
>> > >
>> > > On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
>> > >> As clocks might be named differently on multiple platforms, use a generic
>> > >> name in the driver and allow device tree node to specify the platform
>> > >> specific clock name.
>> > >>
>> > >> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> > >> ---
>> > >>  drivers/phy/phy-omap-usb2.c | 8 ++++----
>> > >>  1 file changed, 4 insertions(+), 4 deletions(-)
>> > >>
>> > >> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
>> > >> index a2205a8..fb5e515 100644
>> > >> --- a/drivers/phy/phy-omap-usb2.c
>> > >> +++ b/drivers/phy/phy-omap-usb2.c
>> > >> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>> > >>          if (IS_ERR(phy_provider))
>> > >>                  return PTR_ERR(phy_provider);
>> > >>
>> > >> -        phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
>> > >> +        phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
>> > >
>> > > doesn't this patch cause a regression ? I mean, you're changing the
>> > > clock name before fixing DTS. Also, that DTS has been in a major version
>> > > of the kernel, so we need to maintain compatibility with it. How about:
>> >
>> > I'm changing the DTS in Patch 4, but I prefer to do it in this patch
>> > to prevent synchronization issues in -next.
>> >
>> > About backward compatibility, I agree with you but at the same time I
>> > don't think anyone using TI SoCs burns the DTB to ROM and needs
>> > backward compatibility. We supply our BSPs/SDKs with the updated DTBs.
>> > Do you feel strict backward compatibility is worth the effort for TI
>> > specific blocks?
>>
>> dunno, but it would, at least, avoid "synchronization issues with
>> linux-next" :-)
>
> and the bisectability issue.

I agree - we cannot drop backward compatibility for DTBs
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2a9330010bea5982a5c6593824bc036bf62d67b7
"
+
+ 3) Bindings can be augmented, but the driver shouldn't break when given
+ the old binding. ie. add additional properties, but don't change the
+ meaning of an existing property. For drivers, default to the original
+ behaviour when a newly added property is missing.
"
Regards,
Nishanth Menon

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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
  2014-04-30 15:20                     ` Nishanth Menon
@ 2014-05-05  7:23                       ` Roger Quadros
  2014-05-05  9:23                         ` Roger Quadros
  0 siblings, 1 reply; 22+ messages in thread
From: Roger Quadros @ 2014-05-05  7:23 UTC (permalink / raw)
  To: Nishanth Menon, Balbi, Felipe
  Cc: Kishon Vijay Abraham I, Tony Lindgren, george.cherian,
	linux-omap, dt list, linux-usb

On 04/30/2014 06:20 PM, Nishanth Menon wrote:
> On Tue, Apr 29, 2014 at 11:16 AM, Felipe Balbi <balbi@ti.com> wrote:
>> On Tue, Apr 29, 2014 at 11:14:20AM -0500, Felipe Balbi wrote:
>>> On Tue, Apr 29, 2014 at 10:50:39AM +0300, Roger Quadros wrote:
>>>> +Nishant
>>>>
>>>> Hi,
>>>>
>>>> On 04/28/2014 07:03 PM, Felipe Balbi wrote:
>>>>> Hi,
>>>>>
>>>>> On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
>>>>>> As clocks might be named differently on multiple platforms, use a generic
>>>>>> name in the driver and allow device tree node to specify the platform
>>>>>> specific clock name.
>>>>>>
>>>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>>>>> ---
>>>>>>  drivers/phy/phy-omap-usb2.c | 8 ++++----
>>>>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
>>>>>> index a2205a8..fb5e515 100644
>>>>>> --- a/drivers/phy/phy-omap-usb2.c
>>>>>> +++ b/drivers/phy/phy-omap-usb2.c
>>>>>> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>>>>>>          if (IS_ERR(phy_provider))
>>>>>>                  return PTR_ERR(phy_provider);
>>>>>>
>>>>>> -        phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
>>>>>> +        phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
>>>>>
>>>>> doesn't this patch cause a regression ? I mean, you're changing the
>>>>> clock name before fixing DTS. Also, that DTS has been in a major version
>>>>> of the kernel, so we need to maintain compatibility with it. How about:
>>>>
>>>> I'm changing the DTS in Patch 4, but I prefer to do it in this patch
>>>> to prevent synchronization issues in -next.
>>>>
>>>> About backward compatibility, I agree with you but at the same time I
>>>> don't think anyone using TI SoCs burns the DTB to ROM and needs
>>>> backward compatibility. We supply our BSPs/SDKs with the updated DTBs.
>>>> Do you feel strict backward compatibility is worth the effort for TI
>>>> specific blocks?
>>>
>>> dunno, but it would, at least, avoid "synchronization issues with
>>> linux-next" :-)
>>
>> and the bisectability issue.
> 
> I agree - we cannot drop backward compatibility for DTBs
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2a9330010bea5982a5c6593824bc036bf62d67b7

That says backward compatibility for stable bindings.
In this case, the binding that I changed doesn't even exist in Documentation/devicetree/bindings,
so it never was a stable binding. 

> "
> +
> + 3) Bindings can be augmented, but the driver shouldn't break when given
> + the old binding. ie. add additional properties, but don't change the
> + meaning of an existing property. For drivers, default to the original
> + behaviour when a newly added property is missing.
> "

cheers,
-roger

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

* Re: [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk"
  2014-05-05  7:23                       ` Roger Quadros
@ 2014-05-05  9:23                         ` Roger Quadros
  0 siblings, 0 replies; 22+ messages in thread
From: Roger Quadros @ 2014-05-05  9:23 UTC (permalink / raw)
  To: Nishanth Menon, Balbi, Felipe
  Cc: Kishon Vijay Abraham I, Tony Lindgren, george.cherian,
	linux-omap, dt list, linux-usb

On 05/05/2014 10:23 AM, Roger Quadros wrote:
> On 04/30/2014 06:20 PM, Nishanth Menon wrote:
>> On Tue, Apr 29, 2014 at 11:16 AM, Felipe Balbi <balbi@ti.com> wrote:
>>> On Tue, Apr 29, 2014 at 11:14:20AM -0500, Felipe Balbi wrote:
>>>> On Tue, Apr 29, 2014 at 10:50:39AM +0300, Roger Quadros wrote:
>>>>> +Nishant
>>>>>
>>>>> Hi,
>>>>>
>>>>> On 04/28/2014 07:03 PM, Felipe Balbi wrote:
>>>>>> Hi,
>>>>>>
>>>>>> On Mon, Apr 28, 2014 at 05:01:23PM +0300, Roger Quadros wrote:
>>>>>>> As clocks might be named differently on multiple platforms, use a generic
>>>>>>> name in the driver and allow device tree node to specify the platform
>>>>>>> specific clock name.
>>>>>>>
>>>>>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>>>>>> ---
>>>>>>>  drivers/phy/phy-omap-usb2.c | 8 ++++----
>>>>>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>>>>>
>>>>>>> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
>>>>>>> index a2205a8..fb5e515 100644
>>>>>>> --- a/drivers/phy/phy-omap-usb2.c
>>>>>>> +++ b/drivers/phy/phy-omap-usb2.c
>>>>>>> @@ -275,16 +275,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>>>>>>>          if (IS_ERR(phy_provider))
>>>>>>>                  return PTR_ERR(phy_provider);
>>>>>>>
>>>>>>> -        phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
>>>>>>> +        phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
>>>>>>
>>>>>> doesn't this patch cause a regression ? I mean, you're changing the
>>>>>> clock name before fixing DTS. Also, that DTS has been in a major version
>>>>>> of the kernel, so we need to maintain compatibility with it. How about:
>>>>>
>>>>> I'm changing the DTS in Patch 4, but I prefer to do it in this patch
>>>>> to prevent synchronization issues in -next.
>>>>>
>>>>> About backward compatibility, I agree with you but at the same time I
>>>>> don't think anyone using TI SoCs burns the DTB to ROM and needs
>>>>> backward compatibility. We supply our BSPs/SDKs with the updated DTBs.
>>>>> Do you feel strict backward compatibility is worth the effort for TI
>>>>> specific blocks?
>>>>
>>>> dunno, but it would, at least, avoid "synchronization issues with
>>>> linux-next" :-)
>>>
>>> and the bisectability issue.
>>
>> I agree - we cannot drop backward compatibility for DTBs
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2a9330010bea5982a5c6593824bc036bf62d67b7
> 
> That says backward compatibility for stable bindings.
> In this case, the binding that I changed doesn't even exist in Documentation/devicetree/bindings,
> so it never was a stable binding. 

Forgot to mention, I'm sending a revised version based on your and Felipe's suggestion.

cheers,
-roger

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

end of thread, other threads:[~2014-05-05  9:23 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-28 14:01 [PATCH v2 0/7] USB support for DRA7-evm Roger Quadros
     [not found] ` <1398693687-13967-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-04-28 14:01   ` [PATCH v2 1/7] ARM: dts: dra7-clock: Add "l3init_960m_gfclk" clock gate Roger Quadros
2014-04-28 14:01   ` [PATCH v2 2/7] ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss Roger Quadros
2014-04-28 14:01   ` [PATCH v2 3/7] phy: omap-usb2: Use generic clock names "wkupclk" and "refclk" Roger Quadros
     [not found]     ` <1398693687-13967-4-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-04-28 16:03       ` Felipe Balbi
     [not found]         ` <20140428160347.GG30292-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-04-29  7:50           ` Roger Quadros
     [not found]             ` <535F59CF.6050002-l0cyMroinI0@public.gmane.org>
2014-04-29 16:14               ` Felipe Balbi
     [not found]                 ` <20140429161420.GH633-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-04-29 16:16                   ` Felipe Balbi
     [not found]                     ` <20140429161616.GI633-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-04-30  7:16                       ` Roger Quadros
2014-04-30 15:20                     ` Nishanth Menon
2014-05-05  7:23                       ` Roger Quadros
2014-05-05  9:23                         ` Roger Quadros
2014-04-28 14:01   ` [PATCH v2 4/7] ARM: dts: omap4+: Add clocks to USB2 PHY node Roger Quadros
     [not found]     ` <1398693687-13967-5-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-04-28 16:04       ` Felipe Balbi
2014-04-28 14:01   ` [PATCH v2 5/7] phy: omap-usb2: Add clock names to Documentation binding Roger Quadros
     [not found]     ` <1398693687-13967-6-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-04-28 16:04       ` Felipe Balbi
2014-04-28 17:23       ` Sergei Shtylyov
2014-04-29  7:57         ` Roger Quadros
2014-04-28 14:01   ` [PATCH v2 6/7] ARM: dts: dra7: Add USB related nodes Roger Quadros
2014-04-28 16:05     ` Felipe Balbi
2014-04-28 14:01 ` [PATCH v2 7/7] dts: dra7-evm: add USB support Roger Quadros
     [not found]   ` <1398693687-13967-8-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-04-28 16:07     ` Felipe Balbi

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.