msm8930 sglte: Add support for GSBI11 for serial console
This change adds GSBI11 UARTDM device and required resource
(its GPIOs and clocks) with their configurations for 8930
SGLTE EVT2 for serial console functionality.
CRs-Fixed: 459320
Change-Id: I552da00481feefb9b8c6857799995b5a0caade85
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8930-gpiomux.c b/arch/arm/mach-msm/board-8930-gpiomux.c
index b35be55..dcae37c 100644
--- a/arch/arm/mach-msm/board-8930-gpiomux.c
+++ b/arch/arm/mach-msm/board-8930-gpiomux.c
@@ -40,6 +40,29 @@
},
};
+/* GSBI11 UART configurations */
+static struct gpiomux_setting gsbi11_uart_cfg = {
+ .func = GPIOMUX_FUNC_1,
+ .drv = GPIOMUX_DRV_10MA,
+ .pull = GPIOMUX_PULL_NONE,
+};
+
+static struct msm_gpiomux_config msm8930_gsbi11_uart_configs[] __initdata = {
+ {
+ .gpio = 38, /* GSBI11 UART TX */
+ .settings = {
+ [GPIOMUX_SUSPENDED] = &gsbi11_uart_cfg,
+ },
+ },
+ {
+ .gpio = 39, /* GSBI11 UART RX */
+ .settings = {
+ [GPIOMUX_SUSPENDED] = &gsbi11_uart_cfg,
+ },
+ },
+};
+
+
/* The SPI configurations apply to GSBI 1*/
static struct gpiomux_setting spi_active = {
.func = GPIOMUX_FUNC_1,
@@ -1038,6 +1061,9 @@
if (minor_ver == 0)
msm_gpiomux_install(msm8930_gsbi10_uart_configs,
ARRAY_SIZE(msm8930_gsbi10_uart_configs));
+ else if (minor_ver == 1)
+ msm_gpiomux_install(msm8930_gsbi11_uart_configs,
+ ARRAY_SIZE(msm8930_gsbi11_uart_configs));
}
/* For SGLTE 8960 Fusion External VFR */
diff --git a/arch/arm/mach-msm/board-8930.c b/arch/arm/mach-msm/board-8930.c
index 6ad1cb9..f8f02e2 100644
--- a/arch/arm/mach-msm/board-8930.c
+++ b/arch/arm/mach-msm/board-8930.c
@@ -3012,6 +3012,10 @@
/* Add UART Serial for EVT1 device */
platform_device_register(
&msm8930_device_uart_gsbi10);
+ else if (minor_ver == 1)
+ /* Add UART Serial for EVT2 device */
+ platform_device_register(
+ &msm8930_device_uart_gsbi11);
}
} else {
/* For 8930 Standalone serial console */
diff --git a/arch/arm/mach-msm/clock-8960.c b/arch/arm/mach-msm/clock-8960.c
index 1f5d624..a7f50cf 100755
--- a/arch/arm/mach-msm/clock-8960.c
+++ b/arch/arm/mach-msm/clock-8960.c
@@ -6046,7 +6046,7 @@
CLK_LOOKUP("core_clk", gsbi9_uart_clk.c, "msm_serial_hs.1"),
/* used on 8930 SGLTE for serial console */
CLK_LOOKUP("core_clk", gsbi10_uart_clk.c, "msm_serial_hsl.1"),
- CLK_LOOKUP("core_clk", gsbi11_uart_clk.c, ""),
+ CLK_LOOKUP("core_clk", gsbi11_uart_clk.c, "msm_serial_hsl.2"),
CLK_LOOKUP("core_clk", gsbi12_uart_clk.c, ""),
CLK_LOOKUP("core_clk", gsbi1_qup_clk.c, "spi_qsd.0"),
CLK_LOOKUP("core_clk", gsbi2_qup_clk.c, ""),
@@ -6103,7 +6103,7 @@
CLK_LOOKUP("iface_clk", gsbi10_p_clk.c, "qup_i2c.10"),
/* used on 8930 SGLTE for serial console */
CLK_LOOKUP("iface_clk", gsbi10_p_clk.c, "msm_serial_hsl.1"),
- CLK_LOOKUP("iface_clk", gsbi11_p_clk.c, ""),
+ CLK_LOOKUP("iface_clk", gsbi11_p_clk.c, "msm_serial_hsl.2"),
CLK_LOOKUP("iface_clk", gsbi12_p_clk.c, "qup_i2c.12"),
CLK_LOOKUP("iface_clk", tsif_p_clk.c, ""),
CLK_LOOKUP("iface_clk", usb_fs1_p_clk.c, ""),
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index 812ebf6..c1f00b9 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -83,6 +83,7 @@
#define MSM_UART8DM_PHYS (MSM_GSBI8_PHYS + 0x40000)
#define MSM_UART9DM_PHYS (MSM_GSBI9_PHYS + 0x40000)
#define MSM_UART10DM_PHYS (MSM_GSBI10_PHYS + 0x40000)
+#define MSM_UART11DM_PHYS (MSM_GSBI11_PHYS + 0x10000)
/* GSBI QUP devices */
#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
@@ -445,6 +446,36 @@
.dev.platform_data = &uart_gsbi10_pdata,
};
+static struct msm_serial_hslite_platform_data uart_gsbi11_pdata;
+
+static struct resource resources_uart_gsbi11[] = {
+ {
+ .start = GSBI11_UARTDM_IRQ,
+ .end = GSBI11_UARTDM_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .start = MSM_UART11DM_PHYS,
+ .end = MSM_UART11DM_PHYS + PAGE_SIZE - 1,
+ .name = "uartdm_resource",
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = MSM_GSBI11_PHYS,
+ .end = MSM_GSBI11_PHYS + PAGE_SIZE - 1,
+ .name = "gsbi_resource",
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct platform_device msm8930_device_uart_gsbi11 = {
+ .name = "msm_serial_hsl",
+ .id = 2,
+ .num_resources = ARRAY_SIZE(resources_uart_gsbi11),
+ .resource = resources_uart_gsbi11,
+ .dev.platform_data = &uart_gsbi11_pdata,
+};
+
static struct resource resources_uart_gsbi5[] = {
{
.start = GSBI5_UARTDM_IRQ,
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 7493978..7707c0c 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -61,6 +61,7 @@
extern struct platform_device msm8960_device_uart_gsbi5;
extern struct platform_device msm8960_device_uart_gsbi8;
extern struct platform_device msm8930_device_uart_gsbi10;
+extern struct platform_device msm8930_device_uart_gsbi11;
extern struct platform_device msm8960_device_ssbi_pmic;
extern struct platform_device msm8960_device_qup_i2c_gsbi3;
extern struct platform_device msm8960_device_qup_i2c_gsbi4;