Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19307c87 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

msm: 8226: add support for HSIC



Add the required gpiomux configurations for HSIC strobe and data
lines. HSIC strobe gpio is also used by the ethernet. Install
HSIC gpiomux configurations only when HSIC driver is enabled.
Ethernet will be disabled by default. HSIC config must be turned
off to enable the ethernet.

CRs-Fixed: 553638
Change-Id: I6d8c23e1a26829a40cca9c6e5a0a88817819ac0a
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 3e2b941d
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
@@ -18,6 +18,38 @@
#include <mach/gpiomux.h>
#include <mach/socinfo.h>

#ifdef CONFIG_USB_EHCI_MSM_HSIC
static struct gpiomux_setting hsic_sus_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
	.dir = GPIOMUX_OUT_LOW,
};

static struct gpiomux_setting hsic_act_cfg = {
	.func = GPIOMUX_FUNC_1,
	.drv = GPIOMUX_DRV_16MA,
	.pull = GPIOMUX_PULL_NONE,
};

static struct msm_gpiomux_config msm_hsic_configs[] = {
	{
		.gpio = 115,               /* HSIC_STROBE */
		.settings = {
			[GPIOMUX_ACTIVE] = &hsic_act_cfg,
			[GPIOMUX_SUSPENDED] = &hsic_sus_cfg,
		},
	},
	{
		.gpio = 116,               /* HSIC_DATA */
		.settings = {
			[GPIOMUX_ACTIVE] = &hsic_act_cfg,
			[GPIOMUX_SUSPENDED] = &hsic_sus_cfg,
		},
	},
};
#endif

#define KS8851_IRQ_GPIO 115

#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
@@ -824,4 +856,13 @@ void __init msm8226_init_gpiomux(void)
					ARRAY_SIZE(usb_otg_sw_configs));

	msm_gpiomux_sdc3_install();

	/*
	 * HSIC STROBE gpio is also used by the ethernet. Install HSIC
	 * gpio mux config only when HSIC is enabled. HSIC config will
	 * be disabled when ethernet config is enabled.
	 */
#ifdef CONFIG_USB_EHCI_MSM_HSIC
	msm_gpiomux_install(msm_hsic_configs, ARRAY_SIZE(msm_hsic_configs));
#endif
}