Skip to contentSkip to conversation

MSM: Add USB suport for QSD8x50

PATCH In review Pavankumar Kondeti 4 participants 9 messages Dec 8, 2010 – Dec 16, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 MSM: Add USB suport for QSD8x50

OTG driver takes care of putting hardware into low power mode. Hence make peripheral and host devices as children of OTG device and let runtime PM takes care of notifying peripheral and host state to OTG device. VBUS power up and shutdown routines are implemented by modem processor. As RPC infrastructure is not available, configure USB in peripheral only mode.

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

 arch/arm/mach-msm/board-qsd8x50.c   |   19 +++++++++
 arch/arm/mach-msm/devices-qsd8x50.c |   71 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-msm/devices.h         |    2 +
 3 files changed, 92 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-qsd8x50.c +19 -0
index ed2af4a..2e83913 100644
@@ -20,6 +20,7 @@
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
+#include <linux/usb/msm_hsusb.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -74,9 +75,24 @@ static int __init msm_init_smc91x(void)
 }
 module_init(msm_init_smc91x);
 
+static int hsusb_phy_init_seq[] = {
+	0x08, 0x31,	/* Increase HS Driver Amplitude */
+	0x20, 0x32,	/* Enable and set Pre-Emphasis Depth to 10% */
+	-1
+};
+
+static struct msm_otg_platform_data msm_otg_pdata = {
+	.phy_init_seq		= hsusb_phy_init_seq,
+	.mode                   = USB_PERIPHERAL,
+	.otg_control		= OTG_PHY_CONTROL,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&msm_device_uart3,
 	&msm_device_smd,
+	&msm_device_otg,
+	&msm_device_hsusb,
+	&msm_device_hsusb_host,
 };
 
 static void __init qsd8x50_map_io(void)
@@ -93,6 +109,9 @@ static void __init qsd8x50_init_irq(void)
 
 static void __init qsd8x50_init(void)
 {
+	msm_device_otg.dev.platform_data = &msm_otg_pdata;
+	msm_device_hsusb.dev.parent = &msm_device_otg.dev;
+	msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
arch/arm/mach-msm/devices-qsd8x50.c +71 -0

77 lines not on this page · raw message

arch/arm/mach-msm/devices.h +2 -0
index 568443e..72500a2 100644
@@ -28,6 +28,8 @@ extern struct platform_device msm_device_sdc3;
 extern struct platform_device msm_device_sdc4;
 
 extern struct platform_device msm_device_hsusb;
+extern struct platform_device msm_device_otg;
+extern struct platform_device msm_device_hsusb_host;
 
 extern struct platform_device msm_device_i2c;
 
Signature · 5 lines
1.7.1

--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw

PATCH 2/2 MSM: Add USB support for MSM7x30

Add USB OTG, peripheral and host devices. This patch also adds usb_phy_clk which is required for resetting the PHY. VBUS power up and shutdown routines depends on PMIC module. As PMIC driver is unavailable, configure USB in peripheral only mode.

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

 arch/arm/mach-msm/board-msm7x30.c               |   20 ++++++
 arch/arm/mach-msm/devices-msm7x30.c             |   72 +++++++++++++++++++++++
 arch/arm/mach-msm/include/mach/msm_iomap-7x30.h |    3 +
 3 files changed, 95 insertions(+), 0 deletions(-)
arch/arm/mach-msm/board-msm7x30.c +20 -0
index 05241df..6f3b973 100644
@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/smsc911x.h>
+#include <linux/usb/msm_hsusb.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -39,11 +40,26 @@
 
 extern struct sys_timer msm_timer;
 
+static int hsusb_phy_init_seq[] = {
+	0x30, 0x32,	/* Enable and set Pre-Emphasis Depth to 20% */
+	0x02, 0x36,	/* Disable CDR Auto Reset feature */
+	-1
+};
+
+static struct msm_otg_platform_data msm_otg_pdata = {
+	.phy_init_seq		= hsusb_phy_init_seq,
+	.mode                   = USB_PERIPHERAL,
+	.otg_control		= OTG_PHY_CONTROL,
+};
+
 static struct platform_device *devices[] __initdata = {
 #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)
         &msm_device_uart2,
 #endif
 	&msm_device_smd,
+	&msm_device_otg,
+	&msm_device_hsusb,
+	&msm_device_hsusb_host,
 };
 
 static void __init msm7x30_init_irq(void)
@@ -53,6 +69,10 @@ static void __init msm7x30_init_irq(void)
 
 static void __init msm7x30_init(void)
 {
+	msm_device_otg.dev.platform_data = &msm_otg_pdata;
+	msm_device_hsusb.dev.parent = &msm_device_otg.dev;
+	msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
+
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
arch/arm/mach-msm/devices-msm7x30.c +72 -0

84 lines not on this page · raw message

arch/arm/mach-msm/include/mach/msm_iomap-7x30.h +3 -0
index 8a00c2d..0fd7b68 100644
@@ -119,4 +119,7 @@
 #define MSM_AD5_PHYS          0xA7000000
 #define MSM_AD5_SIZE          (SZ_1M*13)
 
+#define MSM_HSUSB_PHYS        0xA3600000
+#define MSM_HSUSB_SIZE        SZ_1K
+
 #endif
Signature · 5 lines
1.7.1

--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#2 lore raw
In reply to Pavankumar Kondeti

Hi Daniel,

Quoted 11 lines · Pavankumar Kondeti

OTG driver takes care of putting hardware into low power mode. Hence make peripheral and host devices as children of OTG device and let runtime PM takes care of notifying peripheral and host state to OTG device. VBUS power up and shutdown routines are implemented by modem processor. As RPC infrastructure is not available, configure USB in peripheral only mode.

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

USB driver patches are taken into Greg KH usb-next tree. Is it possible to include this patch for 2.6.38?

Thanks,
Pavan

Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#3 lore raw
Quoted 1 line · Pavan Kondeti

Hi Daniel,

Are you talking to me? read below,

Quoted 8 lines · Pavankumar Kondeti
Quoted 7 lines

OTG driver takes care of putting hardware into low power mode. Hence make peripheral and host devices as children of OTG device and let runtime PM takes care of notifying peripheral and host state to OTG device. VBUS power up and shutdown routines are implemented by modem processor. As RPC infrastructure is not available, configure USB in peripheral only mode.

Quoted 7 lines
Quoted 4 lines

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

USB driver patches are taken into Greg KH usb-next tree. Is it possible to include this patch for 2.6.38?

I don't control Greg's tree, so I don't know what his policies are regarding patch acceptance ..

Daniel

Signature · 3 lines
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum.
#4 lore raw
Quoted 18 lines · Pavan Kondeti
Quoted 1 line

Hi Daniel,

Are you talking to me? read below,

Quoted 13 lines · Pavankumar Kondeti
Quoted 11 lines

OTG driver takes care of putting hardware into low power mode. Hence make peripheral and host devices as children of OTG device and let runtime PM takes care of notifying peripheral and host state to OTG device. VBUS power up and shutdown routines are implemented by modem processor. As RPC infrastructure is not available, configure USB in peripheral only mode.

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

Quoted 6 lines
Quoted 2 lines

USB driver patches are taken into Greg KH usb-next tree. Is it possible to include this patch for 2.6.38?

I don't control Greg's tree, so I don't know what his policies are regarding patch acceptance ..

I am asking about board file changes. i.e this patch and the follow up patch not
USB driver patches.

Thanks,
Pavan

--
Sent by an consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

#5 lore raw
In reply to Daniel Walker
Quoted 18 lines · Daniel Walker
Quoted 1 line · Pavan Kondeti

Hi Daniel,

Are you talking to me? read below,

Quoted 13 lines · Pavankumar Kondeti
Quoted 11 lines

OTG driver takes care of putting hardware into low power mode. Hence make peripheral and host devices as children of OTG device and let runtime PM takes care of notifying peripheral and host state to OTG device. VBUS power up and shutdown routines are implemented by modem processor. As RPC infrastructure is not available, configure USB in peripheral only mode.

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

Quoted 5 lines
Quoted 2 lines

USB driver patches are taken into Greg KH usb-next tree. Is it possible to include this patch for 2.6.38?

I don't control Greg's tree, so I don't know what his policies are regarding patch acceptance ..

They are like any other patch acceptance rules, what specifically is the issue here?

thanks,

greg k-h

#6 lore raw

Hi Greg,

Quoted 13 lines · Greg KH
Quoted 13 lines
Quoted 13 lines · Pavankumar Kondeti
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines

OTG driver takes care of putting hardware into low power mode. Hence make peripheral and host devices as children of OTG device and let runtime PM takes care of notifying peripheral and host state to OTG device. VBUS power up and shutdown routines are implemented by modem processor. As RPC infrastructure is not available, configure USB in peripheral only mode.

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

USB driver patches are taken into Greg KH usb-next tree. Is it possible to include this patch for 2.6.38?

I don't control Greg's tree, so I don't know what his policies are regarding patch acceptance ..

They are like any other patch acceptance rules, what specifically is the issue here?

The board support patches ( [PATCH 1/2] MSM: Add USB suport for QSD8x50) are dependent on USB OTG driver patches ([PATCH V3 00/11] Add MSM USB controller driver). The USB OTG driver patches are in your usb-next tree. Where should board support patches go? MSM tree/ USB tree?

Thanks in advance,
Pavan

Signature · 2 lines
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#7 lore raw
Quoted 21 lines · Pavan Kondeti

Hi Greg,

Quoted 18 lines · Greg KH
Quoted 18 lines
Quoted 18 lines · Pavankumar Kondeti
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

OTG driver takes care of putting hardware into low power mode. Hence make peripheral and host devices as children of OTG device and let runtime PM takes care of notifying peripheral and host state to OTG device. VBUS power up and shutdown routines are implemented by modem processor. As RPC infrastructure is not available, configure USB in peripheral only mode.

Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

---
This patch depends on [PATCH V3 00/11] Add MSM USB controller driver patch series which is under review.

USB driver patches are taken into Greg KH usb-next tree. Is it possible to include this patch for 2.6.38?

I don't control Greg's tree, so I don't know what his policies are regarding patch acceptance ..

Quoted 7 lines
Quoted 2 lines

They are like any other patch acceptance rules, what specifically is the issue here?

The board support patches ( [PATCH 1/2] MSM: Add USB suport for QSD8x50) are dependent on USB OTG driver patches ([PATCH V3 00/11] Add MSM USB controller driver). The USB OTG driver patches are in your usb-next tree. Where should board support patches go? MSM tree/ USB tree?

MSM tree would make sense, right?

thanks,

greg k-h

#8 lore raw
Quoted 6 lines · Greg KH
Quoted 4 lines

The board support patches ( [PATCH 1/2] MSM: Add USB suport for QSD8x50) are dependent on USB OTG driver patches ([PATCH V3 00/11] Add MSM USB controller driver). The USB OTG driver patches are in your usb-next tree. Where should board support patches go? MSM tree/ USB tree?

MSM tree would make sense, right?

I'll include this in MSM.

David

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.