linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3
@ 2013-07-16 12:50 Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 1/5] arm: omap5: dts: fix reg property size Felipe Balbi
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Felipe Balbi @ 2013-07-16 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

With these patches (plus a few others on the driver side which
will be going upstream soon) I could get functional USB3 with my
omap5-uevm platform.

Changes since v1:
	- split ocp2scp dts and hwmod data into separate patches
	- reorganize the series in order to group DTS, hwmod and defconfig
	  changes

Benoit Cousson (1):
  arm: omap5: hwmod: add missing ocp2scp hwmod data

Felipe Balbi (4):
  arm: omap5: dts: fix reg property size
  arm: omap5: dts: fix ocp2scp DTS data
  arm: omap5: dts: add palmas-usb node
  arm: omap2plus_defconfig: enable dwc3 and dependencies

 arch/arm/boot/dts/omap5-uevm.dts           | 10 +++++++
 arch/arm/boot/dts/omap5.dtsi               |  9 +++---
 arch/arm/configs/omap2plus_defconfig       |  9 ++++++
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+), 4 deletions(-)

-- 
1.8.3.3.754.g9c3c367

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

* [PATCH v2 1/5] arm: omap5: dts: fix reg property size
  2013-07-16 12:50 [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3 Felipe Balbi
@ 2013-07-16 12:50 ` Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 2/5] arm: omap5: dts: fix ocp2scp DTS data Felipe Balbi
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2013-07-16 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

USB3 block has a 64KiB space, another 64KiB is
used for the wrapper.

Without this change, resource_size() will get
confused and driver won't probe because size
will be negative.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/omap5.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index e643620..5c99f19 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -637,7 +637,7 @@
 		omap_dwc3 at 4a020000 {
 			compatible = "ti,dwc3";
 			ti,hwmods = "usb_otg_ss";
-			reg = <0x4a020000 0x1000>;
+			reg = <0x4a020000 0x10000>;
 			interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -645,7 +645,7 @@
 			ranges;
 			dwc3 at 4a030000 {
 				compatible = "synopsys,dwc3";
-				reg = <0x4a030000 0x1000>;
+				reg = <0x4a030000 0x10000>;
 				interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
 				usb-phy = <&usb2_phy>, <&usb3_phy>;
 				tx-fifo-resize;
-- 
1.8.3.3.754.g9c3c367

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

* [PATCH v2 2/5] arm: omap5: dts: fix ocp2scp DTS data
  2013-07-16 12:50 [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3 Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 1/5] arm: omap5: dts: fix reg property size Felipe Balbi
@ 2013-07-16 12:50 ` Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 3/5] arm: omap5: dts: add palmas-usb node Felipe Balbi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2013-07-16 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

this patch fixes the DTS data for ocp2scp
node by adding the missing reg property.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/omap5.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 5c99f19..4e41409 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -652,10 +652,11 @@
 			};
 		};
 
-		ocp2scp {
+		ocp2scp at 4a080000 {
 			compatible = "ti,omap-ocp2scp";
 			#address-cells = <1>;
 			#size-cells = <1>;
+			reg = <0x4a080000 0x20>;
 			ranges;
 			ti,hwmods = "ocp2scp1";
 			usb2_phy: usb2phy at 4a084000 {
-- 
1.8.3.3.754.g9c3c367

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

* [PATCH v2 3/5] arm: omap5: dts: add palmas-usb node
  2013-07-16 12:50 [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3 Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 1/5] arm: omap5: dts: fix reg property size Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 2/5] arm: omap5: dts: fix ocp2scp DTS data Felipe Balbi
@ 2013-07-16 12:50 ` Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 4/5] arm: omap5: hwmod: add missing ocp2scp hwmod data Felipe Balbi
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2013-07-16 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

Without this node, there will be no palmas
driver to notify dwc3 that a cable has
been connected and, without that, dwc3
will never initialize.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/omap5-uevm.dts | 10 ++++++++++
 arch/arm/boot/dts/omap5.dtsi     |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
index 08b7267..badceb8 100644
--- a/arch/arm/boot/dts/omap5-uevm.dts
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -272,6 +272,11 @@
 		interrupt-controller;
 		#interrupt-cells = <2>;
 
+		extcon_usb3: palmas_usb {
+			compatible = "ti,palmas-usb";
+			ti,wakeup;
+		};
+
 		palmas_pmic {
 			compatible = "ti,palmas-pmic";
 			interrupt-parent = <&palmas>;
@@ -450,6 +455,11 @@
 	phys = <0 &hsusb2_phy &hsusb3_phy>;
 };
 
+&usb3 {
+	extcon = <&extcon_usb3>;
+	vbus-supply = <&smps10_reg>;
+};
+
 &mcspi1 {
 
 };
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 4e41409..1659246 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -634,7 +634,7 @@
 			ti,type = <2>;
 		};
 
-		omap_dwc3 at 4a020000 {
+		usb3: omap_dwc3 at 4a020000 {
 			compatible = "ti,dwc3";
 			ti,hwmods = "usb_otg_ss";
 			reg = <0x4a020000 0x10000>;
-- 
1.8.3.3.754.g9c3c367

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

* [PATCH v2 4/5] arm: omap5: hwmod: add missing ocp2scp hwmod data
  2013-07-16 12:50 [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3 Felipe Balbi
                   ` (2 preceding siblings ...)
  2013-07-16 12:50 ` [PATCH v2 3/5] arm: omap5: dts: add palmas-usb node Felipe Balbi
@ 2013-07-16 12:50 ` Felipe Balbi
  2013-07-16 12:50 ` [PATCH v2 5/5] arm: omap2plus_defconfig: enable dwc3 and dependencies Felipe Balbi
  2013-08-12 10:17 ` [PATCH v3] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
  5 siblings, 0 replies; 17+ messages in thread
From: Felipe Balbi @ 2013-07-16 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

From: Benoit Cousson <benoit.cousson@linaro.org>

without that hwmod data, USB3 will not in OMAP5 boards.

Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index f37ae96..542eddd 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -1114,6 +1114,42 @@ static struct omap_hwmod omap54xx_mpu_hwmod = {
 };
 
 /*
+ * 'ocp2scp' class
+ * bridge to transform ocp interface protocol to scp (serial control port)
+ * protocol
+ */
+
+static struct omap_hwmod_class_sysconfig omap54xx_ocp2scp_sysc = {
+	.rev_offs	= 0x0000,
+	.sysc_offs	= 0x0010,
+	.syss_offs	= 0x0014,
+	.sysc_flags	= (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
+			SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
+	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap54xx_ocp2scp_hwmod_class = {
+	.name	= "ocp2scp",
+	.sysc	= &omap54xx_ocp2scp_sysc,
+};
+
+/* ocp2scp1 */
+static struct omap_hwmod omap54xx_ocp2scp1_hwmod = {
+	.name		= "ocp2scp1",
+	.class		= &omap54xx_ocp2scp_hwmod_class,
+	.clkdm_name	= "l3init_clkdm",
+	.main_clk	= "l4_root_clk_div",
+	.prcm = {
+		.omap4 = {
+			.clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
+			.context_offs = OMAP54XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
+			.modulemode   = MODULEMODE_HWCTRL,
+		},
+	},
+};
+
+/*
  * 'timer' class
  * general purpose timer module with accurate 1ms tick
  * This class contains several variants: ['timer_1ms', 'timer']
@@ -1919,6 +1955,14 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mpu = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* l4_cfg -> ocp2scp1 */
+static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp1 = {
+	.master		= &omap54xx_l4_cfg_hwmod,
+	.slave		= &omap54xx_ocp2scp1_hwmod,
+	.clk		= "l4_root_clk_div",
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* l4_wkup -> timer1 */
 static struct omap_hwmod_ocp_if omap54xx_l4_wkup__timer1 = {
 	.master		= &omap54xx_l4_wkup_hwmod,
@@ -2121,6 +2165,7 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
 	&omap54xx_l4_per__mmc4,
 	&omap54xx_l4_per__mmc5,
 	&omap54xx_l4_cfg__mpu,
+	&omap54xx_l4_cfg__ocp2scp1,
 	&omap54xx_l4_wkup__timer1,
 	&omap54xx_l4_per__timer2,
 	&omap54xx_l4_per__timer3,
-- 
1.8.3.3.754.g9c3c367

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

* [PATCH v2 5/5] arm: omap2plus_defconfig: enable dwc3 and dependencies
  2013-07-16 12:50 [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3 Felipe Balbi
                   ` (3 preceding siblings ...)
  2013-07-16 12:50 ` [PATCH v2 4/5] arm: omap5: hwmod: add missing ocp2scp hwmod data Felipe Balbi
@ 2013-07-16 12:50 ` Felipe Balbi
  2013-08-21 12:53   ` Tony Lindgren
  2013-08-12 10:17 ` [PATCH v3] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
  5 siblings, 1 reply; 17+ messages in thread
From: Felipe Balbi @ 2013-07-16 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

DWC3 enables USB3 functionality for OMAP5 boards,
it's safe to enable those drivers in omap2plus_defconfig.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/configs/omap2plus_defconfig | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 5339e6a..aed3cce 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -81,6 +81,7 @@ CONFIG_CMA=y
 CONFIG_CONNECTOR=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_OMAP_OCP2SCP=y
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_CHAR=y
@@ -167,9 +168,11 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
 CONFIG_CPU_THERMAL=y
 CONFIG_OMAP_WATCHDOG=y
 CONFIG_TWL4030_WATCHDOG=y
+CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65217=y
 CONFIG_MFD_TPS65910=y
 CONFIG_TWL6040_CORE=y
+CONFIG_REGULATOR_PALMAS=y
 CONFIG_REGULATOR_TWL4030=y
 CONFIG_REGULATOR_TPS65023=y
 CONFIG_REGULATOR_TPS6507X=y
@@ -222,10 +225,14 @@ CONFIG_USB_MON=y
 CONFIG_USB_WDM=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_LIBUSUAL=y
+CONFIG_USB_DWC3=m
+CONFIG_USB_DWC3_OMAP=m
 CONFIG_USB_TEST=y
 CONFIG_USB_PHY=y
 CONFIG_NOP_USB_XCEIV=y
 CONFIG_USB_GADGET=y
+CONFIG_OMAP_USB2=y
+CONFIG_OMAP_USB3=y
 CONFIG_USB_GADGET_DEBUG=y
 CONFIG_USB_GADGET_DEBUG_FILES=y
 CONFIG_USB_GADGET_DEBUG_FS=y
@@ -258,6 +265,8 @@ CONFIG_TI_THERMAL=y
 CONFIG_OMAP4_THERMAL=y
 CONFIG_OMAP5_THERMAL=y
 CONFIG_DRA752_THERMAL=y
+CONFIG_EXTCON=y
+CONFIG_EXTCON_PALMAS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
-- 
1.8.3.3.754.g9c3c367

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

* [PATCH v3] arm: omap5: dts: add palmas-usb node
  2013-07-16 12:50 [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3 Felipe Balbi
                   ` (4 preceding siblings ...)
  2013-07-16 12:50 ` [PATCH v2 5/5] arm: omap2plus_defconfig: enable dwc3 and dependencies Felipe Balbi
@ 2013-08-12 10:17 ` Kishon Vijay Abraham I
  2013-08-12 23:09   ` Stephen Warren
  2013-08-13  5:37   ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
  5 siblings, 2 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-08-12 10:17 UTC (permalink / raw)
  To: linux-arm-kernel

From: Felipe Balbi <balbi@ti.com>

Without this node, there will be no palmas
driver to notify dwc3 that a cable has
been connected and, without that, dwc3
will never initialize.

[ kishon at ti.com : fix vbus-supply value after SMPS10 is modeled as 2 regulators]

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
Change from v2:
fix vbus-supply value after SMPS10 is modeled as 2 regulators. This is needed
after SMPS10 is modeled as 2 regulators.
[1] models SMPS10 as 2 regulators.
[2] splits the SMPS10 node into two to represent the 2 regulators.

[1] -> http://comments.gmane.org/gmane.linux.kernel/1542521
[2] -> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg93779.html

 arch/arm/boot/dts/omap5-uevm.dts |   10 ++++++++++
 arch/arm/boot/dts/omap5.dtsi     |    2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
index 08b7267..51a4acc 100644
--- a/arch/arm/boot/dts/omap5-uevm.dts
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -272,6 +272,11 @@
 		interrupt-controller;
 		#interrupt-cells = <2>;
 
+		extcon_usb3: palmas_usb {
+			compatible = "ti,palmas-usb";
+			ti,wakeup;
+		};
+
 		palmas_pmic {
 			compatible = "ti,palmas-pmic";
 			interrupt-parent = <&palmas>;
@@ -450,6 +455,11 @@
 	phys = <0 &hsusb2_phy &hsusb3_phy>;
 };
 
+&usb3 {
+	extcon = <&extcon_usb3>;
+	vbus-supply = <&smps10_out1_reg>;
+};
+
 &mcspi1 {
 
 };
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 4e41409..1659246 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -634,7 +634,7 @@
 			ti,type = <2>;
 		};
 
-		omap_dwc3 at 4a020000 {
+		usb3: omap_dwc3 at 4a020000 {
 			compatible = "ti,dwc3";
 			ti,hwmods = "usb_otg_ss";
 			reg = <0x4a020000 0x10000>;
-- 
1.7.10.4

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

* [PATCH v3] arm: omap5: dts: add palmas-usb node
  2013-08-12 10:17 ` [PATCH v3] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
@ 2013-08-12 23:09   ` Stephen Warren
  2013-08-13  5:37   ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
  1 sibling, 0 replies; 17+ messages in thread
From: Stephen Warren @ 2013-08-12 23:09 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/12/2013 04:17 AM, Kishon Vijay Abraham I wrote:
> From: Felipe Balbi <balbi@ti.com>
> 
> Without this node, there will be no palmas
> driver to notify dwc3 that a cable has
> been connected and, without that, dwc3
> will never initialize.

> diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts

>  		interrupt-controller;
>  		#interrupt-cells = <2>;
>  
> +		extcon_usb3: palmas_usb {
> +			compatible = "ti,palmas-usb";

This isn't so much a comment on this patch as the Palmas binding:

Presumably, the Palmas device contains a USB VID detector, not a whole
USB controller. I'd expect the compatible value to indicate this more
directly, i.e. be something like ti,palmas-usb-vid or
ti,palmas-usb-vid-detector.

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

* [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid*
  2013-08-12 10:17 ` [PATCH v3] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
  2013-08-12 23:09   ` Stephen Warren
@ 2013-08-13  5:37   ` Kishon Vijay Abraham I
  2013-08-13  5:37     ` [PATCH v4 2/2] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
                       ` (2 more replies)
  1 sibling, 3 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-08-13  5:37 UTC (permalink / raw)
  To: linux-arm-kernel

The Palmas device contains only a USB VID detector, so added a
compatible type *ti,palmas-usb-vid*. Dint remove the existing compatible
types for backward compatibility.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 Documentation/devicetree/bindings/extcon/extcon-twl.txt |    3 ++-
 drivers/extcon/extcon-palmas.c                          |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
index 58f531a..5be4afc 100644
--- a/Documentation/devicetree/bindings/extcon/extcon-twl.txt
+++ b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
@@ -2,7 +2,8 @@ EXTCON FOR TWL CHIPS
 
 PALMAS USB COMPARATOR
 Required Properties:
- - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
+ - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" or
+   "ti,palmas-usb-vid".
  - vbus-supply : phandle to the regulator device tree node.
 
 Optional Properties:
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index b752a0a..4f83fae 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -223,6 +223,7 @@ static int palmas_usb_remove(struct platform_device *pdev)
 
 static struct of_device_id of_palmas_match_tbl[] = {
 	{ .compatible = "ti,palmas-usb", },
+	{ .compatible = "ti,palmas-usb-vid", },
 	{ .compatible = "ti,twl6035-usb", },
 	{ /* end */ }
 };
-- 
1.7.10.4

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

* [PATCH v4 2/2] arm: omap5: dts: add palmas-usb node
  2013-08-13  5:37   ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
@ 2013-08-13  5:37     ` Kishon Vijay Abraham I
  2013-08-13  9:54     ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti,palmas-usb-vid* Chanwoo Choi
  2013-08-13 19:13     ` Stephen Warren
  2 siblings, 0 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-08-13  5:37 UTC (permalink / raw)
  To: linux-arm-kernel

From: Felipe Balbi <balbi@ti.com>

Without this node, there will be no palmas
driver to notify dwc3 that a cable has
been connected and, without that, dwc3
will never initialize.

[ kishon at ti.com : fix vbus-supply value after SMPS10 is modeled as 2 regulators]

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
Changes from v3:
* Changed the compatible type to ti,palmas-usb-vid

Changes from v2:
fix vbus-supply value after SMPS10 is modeled as 2 regulators. This is needed
after SMPS10 is modeled as 2 regulators.
[1] models SMPS10 as 2 regulators.
[2] splits the SMPS10 node into two to represent the 2 regulators.

[1] -> http://comments.gmane.org/gmane.linux.kernel/1542521
[2] -> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg93779.html

 arch/arm/boot/dts/omap5-uevm.dts |   10 ++++++++++
 arch/arm/boot/dts/omap5.dtsi     |    2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap5-uevm.dts b/arch/arm/boot/dts/omap5-uevm.dts
index e8704bc..c18ea50 100644
--- a/arch/arm/boot/dts/omap5-uevm.dts
+++ b/arch/arm/boot/dts/omap5-uevm.dts
@@ -272,6 +272,11 @@
 		interrupt-controller;
 		#interrupt-cells = <2>;
 
+		extcon_usb3: palmas_usb {
+			compatible = "ti,palmas-usb-vid";
+			ti,wakeup;
+		};
+
 		palmas_pmic {
 			compatible = "ti,palmas-pmic";
 			interrupt-parent = <&palmas>;
@@ -460,6 +465,11 @@
 	phys = <0 &hsusb2_phy &hsusb3_phy>;
 };
 
+&usb3 {
+	extcon = <&extcon_usb3>;
+	vbus-supply = <&smps10_out1_reg>;
+};
+
 &mcspi1 {
 
 };
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 4e41409..1659246 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -634,7 +634,7 @@
 			ti,type = <2>;
 		};
 
-		omap_dwc3 at 4a020000 {
+		usb3: omap_dwc3 at 4a020000 {
 			compatible = "ti,dwc3";
 			ti,hwmods = "usb_otg_ss";
 			reg = <0x4a020000 0x10000>;
-- 
1.7.10.4

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

* [PATCH 1/2] extcon: palmas: Added a new compatible type *ti,palmas-usb-vid*
  2013-08-13  5:37   ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
  2013-08-13  5:37     ` [PATCH v4 2/2] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
@ 2013-08-13  9:54     ` Chanwoo Choi
  2013-08-13  9:58       ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
  2013-08-13 19:13     ` Stephen Warren
  2 siblings, 1 reply; 17+ messages in thread
From: Chanwoo Choi @ 2013-08-13  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Kishon,

On 08/13/2013 02:37 PM, Kishon Vijay Abraham I wrote:
> The Palmas device contains only a USB VID detector, so added a
> compatible type *ti,palmas-usb-vid*. Dint remove the existing compatible
> types for backward compatibility.
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  Documentation/devicetree/bindings/extcon/extcon-twl.txt |    3 ++-
>  drivers/extcon/extcon-palmas.c                          |    1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
> index 58f531a..5be4afc 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-twl.txt
> +++ b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
> @@ -2,7 +2,8 @@ EXTCON FOR TWL CHIPS
>  
>  PALMAS USB COMPARATOR
>  Required Properties:
> - - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
> + - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" or
> +   "ti,palmas-usb-vid".
>   - vbus-supply : phandle to the regulator device tree node.
>  
>  Optional Properties:
> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
> index b752a0a..4f83fae 100644
> --- a/drivers/extcon/extcon-palmas.c
> +++ b/drivers/extcon/extcon-palmas.c
> @@ -223,6 +223,7 @@ static int palmas_usb_remove(struct platform_device *pdev)
>  
>  static struct of_device_id of_palmas_match_tbl[] = {
>  	{ .compatible = "ti,palmas-usb", },
> +	{ .compatible = "ti,palmas-usb-vid", },
>  	{ .compatible = "ti,twl6035-usb", },
>  	{ /* end */ }
>  };
> 

This patch has a conflict. You have to always implement patch on extcon branch
including latest patch. You need to resend v2 patch based on extcon-next branch.

'extcon-twl.txt' is renamed as 'extcon-palmas.txt' on following patch:
http://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-next&id=80d644b297dc26c5126858555044edef76f4ffe8

And, 'vbus-supply' phandle was removed on following patch:
http://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-next&id=26ece4f0b7d2264282d9077d1843ff1e98189b6c

Thanks,
Chanwoo Choi

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

* [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid*
  2013-08-13  9:54     ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti,palmas-usb-vid* Chanwoo Choi
@ 2013-08-13  9:58       ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-08-13  9:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 13 August 2013 03:24 PM, Chanwoo Choi wrote:
> Hi Kishon,
> 
> On 08/13/2013 02:37 PM, Kishon Vijay Abraham I wrote:
>> The Palmas device contains only a USB VID detector, so added a
>> compatible type *ti,palmas-usb-vid*. Dint remove the existing compatible
>> types for backward compatibility.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>>  Documentation/devicetree/bindings/extcon/extcon-twl.txt |    3 ++-
>>  drivers/extcon/extcon-palmas.c                          |    1 +
>>  2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
>> index 58f531a..5be4afc 100644
>> --- a/Documentation/devicetree/bindings/extcon/extcon-twl.txt
>> +++ b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
>> @@ -2,7 +2,8 @@ EXTCON FOR TWL CHIPS
>>  
>>  PALMAS USB COMPARATOR
>>  Required Properties:
>> - - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
>> + - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" or
>> +   "ti,palmas-usb-vid".
>>   - vbus-supply : phandle to the regulator device tree node.
>>  
>>  Optional Properties:
>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
>> index b752a0a..4f83fae 100644
>> --- a/drivers/extcon/extcon-palmas.c
>> +++ b/drivers/extcon/extcon-palmas.c
>> @@ -223,6 +223,7 @@ static int palmas_usb_remove(struct platform_device *pdev)
>>  
>>  static struct of_device_id of_palmas_match_tbl[] = {
>>  	{ .compatible = "ti,palmas-usb", },
>> +	{ .compatible = "ti,palmas-usb-vid", },
>>  	{ .compatible = "ti,twl6035-usb", },
>>  	{ /* end */ }
>>  };
>>
> 
> This patch has a conflict. You have to always implement patch on extcon branch
> including latest patch. You need to resend v2 patch based on extcon-next branch.
> 
> 'extcon-twl.txt' is renamed as 'extcon-palmas.txt' on following patch:
> http://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-next&id=80d644b297dc26c5126858555044edef76f4ffe8
> 
> And, 'vbus-supply' phandle was removed on following patch:
> http://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-next&id=26ece4f0b7d2264282d9077d1843ff1e98189b6c

Alright. I'll send the patch shortly.

Thanks
Kishon

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

* [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid*
  2013-08-13  5:37   ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
  2013-08-13  5:37     ` [PATCH v4 2/2] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
  2013-08-13  9:54     ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti,palmas-usb-vid* Chanwoo Choi
@ 2013-08-13 19:13     ` Stephen Warren
  2013-08-14  5:24       ` Kishon Vijay Abraham I
  2 siblings, 1 reply; 17+ messages in thread
From: Stephen Warren @ 2013-08-13 19:13 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/12/2013 11:37 PM, Kishon Vijay Abraham I wrote:
> The Palmas device contains only a USB VID detector, so added a
> compatible type *ti,palmas-usb-vid*. Dint remove the existing compatible

s/Dint/Didn't/

> diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt

>  PALMAS USB COMPARATOR
>  Required Properties:
> - - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
> + - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" or
> +   "ti,palmas-usb-vid".

So are ti,palmas-usb and ti,twl6035-usb full EHCI controllers then?

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

* [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid*
  2013-08-13 19:13     ` Stephen Warren
@ 2013-08-14  5:24       ` Kishon Vijay Abraham I
  2013-08-14 16:08         ` Stephen Warren
  2013-08-15 16:09         ` Benoit Cousson
  0 siblings, 2 replies; 17+ messages in thread
From: Kishon Vijay Abraham I @ 2013-08-14  5:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wednesday 14 August 2013 12:43 AM, Stephen Warren wrote:
> On 08/12/2013 11:37 PM, Kishon Vijay Abraham I wrote:
>> The Palmas device contains only a USB VID detector, so added a
>> compatible type *ti,palmas-usb-vid*. Dint remove the existing compatible
> 
> s/Dint/Didn't/
> 
>> diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
> 
>>  PALMAS USB COMPARATOR
>>  Required Properties:
>> - - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
>> + - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" or
>> +   "ti,palmas-usb-vid".
> 
> So are ti,palmas-usb and ti,twl6035-usb full EHCI controllers then?

No. I thought I shouldn't remove those if someone is already using those
compatible value.

Thanks
Kishon

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

* [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid*
  2013-08-14  5:24       ` Kishon Vijay Abraham I
@ 2013-08-14 16:08         ` Stephen Warren
  2013-08-15 16:09         ` Benoit Cousson
  1 sibling, 0 replies; 17+ messages in thread
From: Stephen Warren @ 2013-08-14 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/13/2013 11:24 PM, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On Wednesday 14 August 2013 12:43 AM, Stephen Warren wrote:
>> On 08/12/2013 11:37 PM, Kishon Vijay Abraham I wrote:
>>> The Palmas device contains only a USB VID detector, so added a
>>> compatible type *ti,palmas-usb-vid*. Dint remove the existing compatible
>>
>> s/Dint/Didn't/
>>
>>> diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
>>
>>>  PALMAS USB COMPARATOR
>>>  Required Properties:
>>> - - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
>>> + - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" or
>>> +   "ti,palmas-usb-vid".
>>
>> So are ti,palmas-usb and ti,twl6035-usb full EHCI controllers then?
> 
> No. I thought I shouldn't remove those if someone is already using those
> compatible value.

Sigh. Perhaps it's best to be consistent with the existing bad naming
then:-(

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

* [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid*
  2013-08-14  5:24       ` Kishon Vijay Abraham I
  2013-08-14 16:08         ` Stephen Warren
@ 2013-08-15 16:09         ` Benoit Cousson
  1 sibling, 0 replies; 17+ messages in thread
From: Benoit Cousson @ 2013-08-15 16:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Kishon,

On 14/08/2013 07:24, Kishon Vijay Abraham I wrote:
> Hi,
>
> On Wednesday 14 August 2013 12:43 AM, Stephen Warren wrote:
>> On 08/12/2013 11:37 PM, Kishon Vijay Abraham I wrote:
>>> The Palmas device contains only a USB VID detector, so added a
>>> compatible type *ti,palmas-usb-vid*. Dint remove the existing compatible
>>
>> s/Dint/Didn't/
>>
>>> diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
>>
>>>   PALMAS USB COMPARATOR
>>>   Required Properties:
>>> - - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
>>> + - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb" or
>>> +   "ti,palmas-usb-vid".
>>
>> So are ti,palmas-usb and ti,twl6035-usb full EHCI controllers then?
>
> No. I thought I shouldn't remove those if someone is already using those
> compatible value.

Well, I think we still have a short period of time where we can clean 
some badly defined bindings before it is really too late.

Both kernel and DTS are still in sync for the moment, so changing both 
at the same time should be safe.

Regards,
Benoit

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

* [PATCH v2 5/5] arm: omap2plus_defconfig: enable dwc3 and dependencies
  2013-07-16 12:50 ` [PATCH v2 5/5] arm: omap2plus_defconfig: enable dwc3 and dependencies Felipe Balbi
@ 2013-08-21 12:53   ` Tony Lindgren
  0 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2013-08-21 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [130716 05:57]:
> DWC3 enables USB3 functionality for OMAP5 boards,
> it's safe to enable those drivers in omap2plus_defconfig.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Looks like Benoit will take this, so:

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/configs/omap2plus_defconfig | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
> index 5339e6a..aed3cce 100644
> --- a/arch/arm/configs/omap2plus_defconfig
> +++ b/arch/arm/configs/omap2plus_defconfig
> @@ -81,6 +81,7 @@ CONFIG_CMA=y
>  CONFIG_CONNECTOR=y
>  CONFIG_DEVTMPFS=y
>  CONFIG_DEVTMPFS_MOUNT=y
> +CONFIG_OMAP_OCP2SCP=y
>  CONFIG_MTD=y
>  CONFIG_MTD_CMDLINE_PARTS=y
>  CONFIG_MTD_CHAR=y
> @@ -167,9 +168,11 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
>  CONFIG_CPU_THERMAL=y
>  CONFIG_OMAP_WATCHDOG=y
>  CONFIG_TWL4030_WATCHDOG=y
> +CONFIG_MFD_PALMAS=y
>  CONFIG_MFD_TPS65217=y
>  CONFIG_MFD_TPS65910=y
>  CONFIG_TWL6040_CORE=y
> +CONFIG_REGULATOR_PALMAS=y
>  CONFIG_REGULATOR_TWL4030=y
>  CONFIG_REGULATOR_TPS65023=y
>  CONFIG_REGULATOR_TPS6507X=y
> @@ -222,10 +225,14 @@ CONFIG_USB_MON=y
>  CONFIG_USB_WDM=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_USB_LIBUSUAL=y
> +CONFIG_USB_DWC3=m
> +CONFIG_USB_DWC3_OMAP=m
>  CONFIG_USB_TEST=y
>  CONFIG_USB_PHY=y
>  CONFIG_NOP_USB_XCEIV=y
>  CONFIG_USB_GADGET=y
> +CONFIG_OMAP_USB2=y
> +CONFIG_OMAP_USB3=y
>  CONFIG_USB_GADGET_DEBUG=y
>  CONFIG_USB_GADGET_DEBUG_FILES=y
>  CONFIG_USB_GADGET_DEBUG_FS=y
> @@ -258,6 +265,8 @@ CONFIG_TI_THERMAL=y
>  CONFIG_OMAP4_THERMAL=y
>  CONFIG_OMAP5_THERMAL=y
>  CONFIG_DRA752_THERMAL=y
> +CONFIG_EXTCON=y
> +CONFIG_EXTCON_PALMAS=y
>  CONFIG_EXT2_FS=y
>  CONFIG_EXT3_FS=y
>  # CONFIG_EXT3_FS_XATTR is not set
> -- 
> 1.8.3.3.754.g9c3c367
> 

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

end of thread, other threads:[~2013-08-21 12:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 12:50 [PATCH v2 0/5] ARM: OMAP: DTS/HWMOD/defconfig changes for USB3 Felipe Balbi
2013-07-16 12:50 ` [PATCH v2 1/5] arm: omap5: dts: fix reg property size Felipe Balbi
2013-07-16 12:50 ` [PATCH v2 2/5] arm: omap5: dts: fix ocp2scp DTS data Felipe Balbi
2013-07-16 12:50 ` [PATCH v2 3/5] arm: omap5: dts: add palmas-usb node Felipe Balbi
2013-07-16 12:50 ` [PATCH v2 4/5] arm: omap5: hwmod: add missing ocp2scp hwmod data Felipe Balbi
2013-07-16 12:50 ` [PATCH v2 5/5] arm: omap2plus_defconfig: enable dwc3 and dependencies Felipe Balbi
2013-08-21 12:53   ` Tony Lindgren
2013-08-12 10:17 ` [PATCH v3] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
2013-08-12 23:09   ` Stephen Warren
2013-08-13  5:37   ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
2013-08-13  5:37     ` [PATCH v4 2/2] arm: omap5: dts: add palmas-usb node Kishon Vijay Abraham I
2013-08-13  9:54     ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti,palmas-usb-vid* Chanwoo Choi
2013-08-13  9:58       ` [PATCH 1/2] extcon: palmas: Added a new compatible type *ti, palmas-usb-vid* Kishon Vijay Abraham I
2013-08-13 19:13     ` Stephen Warren
2013-08-14  5:24       ` Kishon Vijay Abraham I
2013-08-14 16:08         ` Stephen Warren
2013-08-15 16:09         ` Benoit Cousson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).