Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…el-mako

Change-Id: I1cfc5b81f09b217cc706aaae36fca6f6be7e69fd
  • Loading branch information
rmcc committed Jan 2, 2013
2 parents 76ca08b + a32d6b0 commit 78ad224
Show file tree
Hide file tree
Showing 19 changed files with 760 additions and 223 deletions.
74 changes: 74 additions & 0 deletions Documentation/devicetree/bindings/usb/msm-ehci-hsic.txt
@@ -0,0 +1,74 @@
MSM HSIC EHCI controller

Required properties :
- compatible : should be "qcom,hsic-host"
- regs : offset and length of the register set in the memory map
- interrupts: IRQ lines used by this controller
- interrupt-names : Required interrupt resource entries are:
HSIC EHCI expects "core_irq" and optionally "async_irq".
- <supply-name>-supply: handle to the regulator device tree node
Required "supply-name" is "HSIC_VDDCX" and optionally - "HSIC_GDSC".

Optional properties :
- hsic,<gpio-name>-gpio : handle to the GPIO node, see "gpios property"
in Documentation/devicetree/bindings/gpio/gpio.txt.
Optional "gpio-name" can be "strobe" and "data".
- hsic,ignore-cal-pad-config : If present then HSIC CAL PAD configuration
using TLMM is not performed.
- hsic,strobe-pad-offset : Offset of TLMM register for configuring HSIC
STROBE GPIO PAD.
- hsic,data-pad-offset : Offset of TLMM register for configuring HSIC
DATA GPIO PAD.

Example MSM HSIC EHCI controller device node :
hsic@f9a15000 {
compatible = "qcom,hsic-host";
reg = <0xf9a15000 0x400>;
interrupts = <0 136 0>;
interrupt-names = "core_irq";
HSIC_VDDCX-supply = <&pm8019_l12>;
HSIC_GDSC-supply = <&gdsc_usb_hsic>;
hsic,strobe-gpio = <&msmgpio 144 0x00>;
hsic,data-gpio = <&msmgpio 145 0x00>;
hsic,ignore-cal-pad-config;
hsic,strobe-pad-offset = <0x2050>;
hsic,data-pad-offset = <0x2054>;
};

SMSC HSIC HUB

Required properties :
- compatible : should be "qcom,hsic-smsc-hub"
- smsc,<gpio-name>-gpio : handle to the GPIO node, see "gpios property"
in Documentation/devicetree/bindings/gpio/gpio.txt.
Required "gpio-name" is "reset" and optionally - "refclk", "int".
- <supply-name>-supply: handle to the regulator device tree node
Required "supply-name" is "hub_init" and optionally - "hub_vbus".
- Sub node for "MSM HSIC EHCI controller".
Sub node has the required properties mentioned above.

Example SMSC HSIC HUB :
hsic_hub {
compatible = "qcom,hsic-smsc-hub";
ranges;
smsc,reset-gpio = <&pm8941_gpios 8 0x00>;
smsc,refclk-gpio = <&pm8941_gpios 16 0x00>;
smsc,int-gpio = <&msmgpio 50 0x00>;
hub_int-supply = <&pm8941_l10>;
hub_vbus-supply = <&pm8941_mvs1>;

hsic@f9a00000 {
compatible = "qcom,hsic-host";
reg = <0xf9a00000 0x400>;
interrupts = <0 136 0>;
interrupt-names = "core_irq";
HSIC_VDDCX-supply = <&pm8841_s2>;
HSIC_GDSC-supply = <&gdsc_usb_hsic>;
hsic,strobe-gpio = <&msmgpio 144 0x00>;
hsic,data-gpio = <&msmgpio 145 0x00>;
hsic,ignore-cal-pad-config;
hsic,strobe-pad-offset = <0x2050>;
hsic,data-pad-offset = <0x2054>;
};
};

21 changes: 8 additions & 13 deletions arch/arm/mach-msm/board-8064.c
Expand Up @@ -725,12 +725,6 @@ static void __init apq8064_early_reserve(void)
#ifdef CONFIG_USB_EHCI_MSM_HSIC
/* Bandwidth requests (zero) if no vote placed */
static struct msm_bus_vectors hsic_init_vectors[] = {
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_EBI_CH0,
.ab = 0,
.ib = 0,
},
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_SPS,
Expand All @@ -741,17 +735,11 @@ static struct msm_bus_vectors hsic_init_vectors[] = {

/* Bus bandwidth requests in Bytes/sec */
static struct msm_bus_vectors hsic_max_vectors[] = {
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_EBI_CH0,
.ab = 60000000, /* At least 480Mbps on bus. */
.ib = 960000000, /* MAX bursts rate */
},
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_SPS,
.ab = 0,
.ib = 512000000, /*vote for 64Mhz dfab clk rate*/
.ib = 256000000, /*vote for 32Mhz dfab clk rate*/
},
};

Expand Down Expand Up @@ -2915,6 +2903,7 @@ static void enable_avc_i2c_bus(void)
static void __init apq8064_common_init(void)
{
u32 platform_version;
struct msm_rpmrs_level rpmrs_level;
platform_device_register(&msm_gpio_device);
msm_tsens_early_init(&apq_tsens_pdata);
msm_thermal_init(&msm_thermal_pdata);
Expand Down Expand Up @@ -2949,6 +2938,12 @@ static void __init apq8064_common_init(void)
platform_add_devices(common_not_mpq_devices,
ARRAY_SIZE(common_not_mpq_devices));
enable_ddr3_regulator();
rpmrs_level =
msm_rpmrs_levels[MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT];
msm_hsic_pdata.swfi_latency = rpmrs_level.latency_us;
rpmrs_level =
msm_rpmrs_levels[MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE];
msm_hsic_pdata.standalone_latency = rpmrs_level.latency_us;
if (machine_is_apq8064_mtp()) {
msm_hsic_pdata.log2_irq_thresh = 5,
apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata;
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-msm/devices-8064.c
Expand Up @@ -991,10 +991,10 @@ static struct resource resources_hsic_host[] = {
.flags = IORESOURCE_IRQ,
},
{
.start = 47,
.end = 47,
.start = MSM_GPIO_TO_INT(47),
.end = MSM_GPIO_TO_INT(47),
.name = "wakeup",
.flags = IORESOURCE_IO,
.flags = IORESOURCE_IRQ,
},
};

Expand Down
21 changes: 8 additions & 13 deletions arch/arm/mach-msm/lge/mako/board-mako.c
Expand Up @@ -741,12 +741,6 @@ static void __init apq8064_early_reserve(void)
#ifdef CONFIG_USB_EHCI_MSM_HSIC
/* Bandwidth requests (zero) if no vote placed */
static struct msm_bus_vectors hsic_init_vectors[] = {
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_EBI_CH0,
.ab = 0,
.ib = 0,
},
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_SPS,
Expand All @@ -757,17 +751,11 @@ static struct msm_bus_vectors hsic_init_vectors[] = {

/* Bus bandwidth requests in Bytes/sec */
static struct msm_bus_vectors hsic_max_vectors[] = {
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_EBI_CH0,
.ab = 60000000, /* At least 480Mbps on bus. */
.ib = 960000000, /* MAX bursts rate */
},
{
.src = MSM_BUS_MASTER_SPS,
.dst = MSM_BUS_SLAVE_SPS,
.ab = 0,
.ib = 512000000, /*vote for 64Mhz dfab clk rate*/
.ib = 256000000, /*vote for 32Mhz dfab clk rate*/
},
};

Expand Down Expand Up @@ -1992,6 +1980,7 @@ static void __init register_i2c_devices(void)

static void __init apq8064_common_init(void)
{
struct msm_rpmrs_level rpmrs_level;
platform_device_register(&msm_gpio_device);
msm_tsens_early_init(&apq_tsens_pdata);
msm_thermal_init(&msm_thermal_pdata);
Expand Down Expand Up @@ -2023,6 +2012,12 @@ static void __init apq8064_common_init(void)
platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
platform_add_devices(common_not_mpq_devices,
ARRAY_SIZE(common_not_mpq_devices));
rpmrs_level =
msm_rpmrs_levels[MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT];
msm_hsic_pdata.swfi_latency = rpmrs_level.latency_us;
rpmrs_level =
msm_rpmrs_levels[MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE];
msm_hsic_pdata.standalone_latency = rpmrs_level.latency_us;
apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata;
device_initialize(&apq8064_device_hsic_host.dev);
apq8064_pm8xxx_gpio_mpp_init();
Expand Down

0 comments on commit 78ad224

Please sign in to comment.