Skip to content

Commit 04e22d2

Browse files
committed
Initial device inclusion for d2dcm. tested here and everything works. more work need to be done for our audio to coexist with other d2 models. sound/soc/msm is basically held over completely from stock kernel.
Change-Id: Icb8e50aeebbe48e76b06152122a8fb0bb158c184
1 parent c22bb19 commit 04e22d2

File tree

16 files changed

+233
-50
lines changed

16 files changed

+233
-50
lines changed

arch/arm/mach-msm/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,13 @@ config MACH_M2_VZW
941941
help
942942
Support for the Samsung M2 Verizon device.
943943

944+
config MACH_M2_DCM
945+
depends on MACH_M2
946+
default n
947+
bool "MSM8960 Samsung M2_DCM"
948+
help
949+
Support for the Samsung M2 Docomo device.
950+
944951
config MACH_APEXQ
945952
depends on ARCH_MSM8960
946953
default n

arch/arm/mach-msm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ obj-$(CONFIG_MACH_M2) += board-m2-camera.o board-m2-display.o board-m2-pmi
307307
obj-$(CONFIG_MACH_M2_ATT) += board-m2_att.o board-m2_att-gpiomux.o
308308
obj-$(CONFIG_MACH_M2_SPR) += board-m2_spr.o board-m2_spr-gpiomux.o
309309
obj-$(CONFIG_MACH_M2_VZW) += board-m2_vzw.o board-m2_vzw-gpiomux.o
310+
obj-$(CONFIG_MACH_M2_DCM) += board-m2_dcm.o board-m2_dcm-gpiomux.o
310311
obj-$(CONFIG_MACH_APEXQ) += board-mms-tsp.o board-apexq.o board-apexq-gpiomux.o board-apexq-battery.o board-8960-regulator.o board-8960-storage.o
311312
obj-$(CONFIG_MACH_APEXQ) += board-apexq-camera.o board-m2-display.o board-m2-pmic.o
312313

arch/arm/mach-msm/board-8960-pmic.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,16 @@ struct pm8xxx_mpp_init {
9898
static struct pm8xxx_gpio_init pm8921_gpios[] __initdata = {
9999
PM8XXX_GPIO_OUTPUT_VIN(6, 1, PM_GPIO_VIN_VPH), /* MHL power EN_N */
100100
PM8XXX_GPIO_DISABLE(7), /* Disable NFC */
101+
#if !defined(CONFIG_MACH_M2_DCM) && !defined(CONFIG_MACH_K2_KDI)
101102
PM8XXX_GPIO_INPUT(16, PM_GPIO_PULL_UP_30), /* SD_CARD_WP */
103+
#endif
102104
/* External regulator shared by display and touchscreen on LiQUID */
103105
PM8XXX_GPIO_OUTPUT(17, 0), /* DISP 3.3 V Boost */
104106
PM8XXX_GPIO_OUTPUT(18, 0), /* TABLA SPKR_LEFT_EN=off */
105107
PM8XXX_GPIO_OUTPUT(19, 0), /* TABLA SPKR_RIGHT_EN=off */
108+
#if !defined(CONFIG_MACH_M2_DCM) && !defined(CONFIG_MACH_K2_KDI)
106109
PM8XXX_GPIO_DISABLE(22), /* Disable NFC */
110+
#endif
107111
PM8XXX_GPIO_OUTPUT_FUNC(25, 0, PM_GPIO_FUNC_2), /* TN_CLK */
108112
PM8XXX_GPIO_INPUT(26, PM_GPIO_PULL_UP_30), /* SD_CARD_DET_N */
109113
PM8XXX_GPIO_OUTPUT(43, 1), /* DISP_RESET_N */

arch/arm/mach-msm/board-m2-camera.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,10 @@ static struct msm_camera_device_platform_data msm_camera_csi_device_data[] = {
601601
};
602602
#endif
603603

604-
static struct regulator *l29, *l28, *isp_core;
604+
static struct regulator *l29, *l28;
605+
#if !defined(CONFIG_MACH_M2_DCM) && !defined(CONFIG_MACH_K2_KDI)
606+
static struct regulator *isp_core;
607+
#endif
605608
/* CAM power
606609
CAM_SENSOR_A_2.8 : GPIO_CAM_A_EN(GPIO 46)
607610
CAM_SENSOR_IO_1.8 : VREG_L29 : l29

arch/arm/mach-msm/clock-8960.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5677,7 +5677,11 @@ static struct clk_lookup msm_clocks_8960_common[] __initdata = {
56775677
CLK_LOOKUP("core_clk", gsbi1_uart_clk.c, ""),
56785678
CLK_LOOKUP("core_clk", gsbi2_uart_clk.c, ""),
56795679
CLK_LOOKUP("core_clk", gsbi3_uart_clk.c, ""),
5680+
#ifdef CONFIG_FELICA
5681+
CLK_LOOKUP("core_clk", gsbi4_uart_clk.c, "msm_serial_hsl.1"),
5682+
#else
56805683
CLK_LOOKUP("core_clk", gsbi4_uart_clk.c, ""),
5684+
#endif
56815685
CLK_LOOKUP("core_clk", gsbi5_uart_clk.c, "msm_serial_hsl.0"),
56825686
CLK_LOOKUP("core_clk", gsbi6_uart_clk.c, "msm_serial_hs.0"),
56835687
CLK_LOOKUP("core_clk", gsbi7_uart_clk.c, ""),
@@ -5749,6 +5753,10 @@ static struct clk_lookup msm_clocks_8960_common[] __initdata = {
57495753
CLK_LOOKUP("iface_clk", gsbi2_p_clk.c, ""),
57505754
CLK_LOOKUP("iface_clk", gsbi3_p_clk.c, "qup_i2c.3"),
57515755
CLK_LOOKUP("iface_clk", gsbi4_p_clk.c, "qup_i2c.4"),
5756+
#ifdef CONFIG_FELICA
5757+
/* just in case, "qup_i2c.4" definition dose not delete.*/
5758+
CLK_LOOKUP("iface_clk", gsbi4_p_clk.c, "msm_serial_hsl.1"),
5759+
#endif /* CONFIG_FELICA */
57525760
CLK_LOOKUP("iface_clk", gsbi5_p_clk.c, "msm_serial_hsl.0"),
57535761
CLK_LOOKUP("iface_clk", gsbi6_p_clk.c, "msm_serial_hs.0"),
57545762
CLK_LOOKUP("iface_clk", gsbi7_p_clk.c, "qup_i2c.7"),

arch/arm/mach-msm/devices-8960.c

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484

8585
/* GSBI UART devices */
8686
#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
87+
#ifdef CONFIG_FELICA
88+
#define MSM_UART4DM_PHYS (MSM_GSBI4_PHYS + 0x40000)
89+
#endif /* CONFIG_FELICA */
8790
#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
8891
#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
8992
#define MSM_UART8DM_PHYS (MSM_GSBI8_PHYS + 0x40000)
@@ -289,6 +292,35 @@ struct platform_device msm8960_device_uart_gsbi2 = {
289292
.num_resources = ARRAY_SIZE(resources_uart_gsbi2),
290293
.resource = resources_uart_gsbi2,
291294
};
295+
#ifdef CONFIG_FELICA
296+
static struct resource resources_uart_gsbi4[] = {
297+
{
298+
.start = GSBI4_UARTDM_IRQ,
299+
.end = GSBI4_UARTDM_IRQ,
300+
.flags = IORESOURCE_IRQ,
301+
},
302+
{
303+
.start = MSM_UART4DM_PHYS,
304+
.end = MSM_UART4DM_PHYS + PAGE_SIZE - 1,
305+
.name = "uartdm_resource",
306+
.flags = IORESOURCE_MEM,
307+
},
308+
{
309+
.start = MSM_GSBI4_PHYS,
310+
.end = MSM_GSBI4_PHYS + PAGE_SIZE - 1,
311+
.name = "gsbi_resource",
312+
.flags = IORESOURCE_MEM,
313+
},
314+
};
315+
316+
struct platform_device msm8960_device_uart_gsbi4 = {
317+
.name = "msm_serial_hsl",
318+
.id = 1,
319+
.num_resources = ARRAY_SIZE(resources_uart_gsbi4),
320+
.resource = resources_uart_gsbi4,
321+
};
322+
323+
#endif /* CONFIG_FELICA */
292324
/* GSBI 6 used into UARTDM Mode */
293325
static struct resource msm_uart_dm6_resources[] = {
294326
{
@@ -2511,6 +2543,37 @@ struct platform_device msm8960_device_qup_spi_gsbi11 = {
25112543
};
25122544
#endif
25132545

2546+
#if defined(CONFIG_TDMB) || defined(CONFIG_TDMB_MODULE) || \
2547+
defined(CONFIG_ISDBT_NMI)
2548+
static struct resource resources_qup_spi_gsbi8[] = {
2549+
{
2550+
.name = "spi_base",
2551+
.start = MSM_GSBI8_QUP_PHYS,
2552+
.end = MSM_GSBI8_QUP_PHYS + SZ_4K - 1,
2553+
.flags = IORESOURCE_MEM,
2554+
},
2555+
{
2556+
.name = "gsbi_base",
2557+
.start = MSM_GSBI8_PHYS,
2558+
.end = MSM_GSBI8_PHYS + 4 - 1,
2559+
.flags = IORESOURCE_MEM,
2560+
},
2561+
{
2562+
.name = "spi_irq_in",
2563+
.start = GSBI8_QUP_IRQ,
2564+
.end = GSBI8_QUP_IRQ,
2565+
.flags = IORESOURCE_IRQ,
2566+
},
2567+
};
2568+
2569+
struct platform_device msm8960_device_qup_spi_gsbi8 = {
2570+
.name = "spi_qsd",
2571+
.id = 1,
2572+
.num_resources = ARRAY_SIZE(resources_qup_spi_gsbi8),
2573+
.resource = resources_qup_spi_gsbi8,
2574+
};
2575+
#endif
2576+
25142577
struct platform_device msm_pcm = {
25152578
.name = "msm-pcm-dsp",
25162579
.id = -1,

arch/arm/mach-msm/devices.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ extern struct platform_device msm_device_uart_dm9;
6060
extern struct platform_device mpq8064_device_uartdm_gsbi6;
6161

6262
extern struct platform_device msm8960_device_uart_gsbi2;
63+
#ifdef CONFIG_FELICA
64+
extern struct platform_device msm8960_device_uart_gsbi4;
65+
#endif /* CONFIG_FELICA */
6366
extern struct platform_device msm8960_device_uart_gsbi5;
6467
extern struct platform_device msm8960_device_uart_gsbi8;
6568
extern struct platform_device msm8930_device_uart_gsbi10;
@@ -79,6 +82,10 @@ extern struct platform_device msm8960_device_qup_spi_gsbi1;
7982
#ifdef CONFIG_S5C73M3
8083
extern struct platform_device msm8960_device_qup_spi_gsbi11;
8184
#endif
85+
#if defined(CONFIG_TDMB) || defined(CONFIG_TDMB_MODULE) || \
86+
defined(CONFIG_ISDBT_NMI)
87+
extern struct platform_device msm8960_device_qup_spi_gsbi8;
88+
#endif
8289
extern struct platform_device msm8960_device_qup_spi_gsbi1;
8390
extern struct platform_device msm8960_gemini_device;
8491
extern struct platform_device msm8960_mercury_device;

drivers/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ source "drivers/memstick/Kconfig"
100100

101101
source "drivers/leds/Kconfig"
102102

103+
# FELICA
104+
source "drivers/felica/Kconfig"
105+
103106
source "drivers/switch/Kconfig"
104107

105108
source "drivers/accessibility/Kconfig"

drivers/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,5 @@ obj-$(CONFIG_PM_DEVFREQ) += devfreq/
145145
obj-$(CONFIG_MOBICORE_SUPPORT) += gud/
146146

147147
obj-$(CONFIG_CORESIGHT) += coresight/
148+
149+
obj-$(CONFIG_FELICA) += felica/

drivers/media/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,16 @@ source "drivers/media/radio/Kconfig"
126126

127127
source "drivers/media/dvb/Kconfig"
128128

129+
#
130+
# TDMB drivers
131+
#
132+
133+
source "drivers/media/tdmb/Kconfig"
134+
135+
#
136+
# Oneseg Drivers
137+
#
138+
139+
source "drivers/media/nmi326/Kconfig"
140+
129141
endif # MEDIA_SUPPORT

drivers/media/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ obj-y += common/ rc/ video/
1212

1313
obj-$(CONFIG_VIDEO_DEV) += radio/
1414
obj-$(CONFIG_DVB_CORE) += dvb/
15+
obj-$(CONFIG_TDMB) += tdmb/
16+
17+
obj-$(CONFIG_ISDBT_NMI) += nmi326/

drivers/mfd/wcd9xxx-core.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/of_gpio.h>
1616
#include <linux/slab.h>
1717
#include <linux/mfd/core.h>
18+
#include <linux/mfd/pm8xxx/pm8921.h>
1819
#include <linux/mfd/wcd9xxx/wcd9xxx-slimslave.h>
1920
#include <linux/mfd/wcd9xxx/core.h>
2021
#include <linux/mfd/wcd9xxx/pdata.h>
@@ -286,6 +287,15 @@ static void wcd9xxx_bring_down(struct wcd9xxx *wcd9xxx)
286287
static int wcd9xxx_reset(struct wcd9xxx *wcd9xxx)
287288
{
288289
int ret;
290+
struct pm_gpio param = {
291+
.direction = PM_GPIO_DIR_OUT,
292+
.output_buffer = PM_GPIO_OUT_BUF_CMOS,
293+
.output_value = 1,
294+
.pull = PM_GPIO_PULL_NO,
295+
.vin_sel = PM_GPIO_VIN_S4,
296+
.out_strength = PM_GPIO_STRENGTH_MED,
297+
.function = PM_GPIO_FUNC_NORMAL,
298+
};
289299

290300
if (wcd9xxx->reset_gpio) {
291301
ret = gpio_request(wcd9xxx->reset_gpio, "CDC_RESET");
@@ -296,6 +306,12 @@ static int wcd9xxx_reset(struct wcd9xxx *wcd9xxx)
296306
return ret;
297307
}
298308

309+
ret = pm8xxx_gpio_config(wcd9xxx->reset_gpio, &param);
310+
if (ret)
311+
pr_err("%s: Failed to configure gpio\n", __func__);
312+
313+
gpio_direction_output(wcd9xxx->reset_gpio, 1);
314+
msleep(20);
299315
gpio_direction_output(wcd9xxx->reset_gpio, 0);
300316
msleep(20);
301317
gpio_direction_output(wcd9xxx->reset_gpio, 1);

drivers/misc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ obj-$(CONFIG_MPU_411_ENABLE) += inv_mpu/
8484
obj-$(CONFIG_YAS_532_ENABLE) += yas532/
8585
obj-$(CONFIG_OPTICAL_TAOS_TRITON) += taos.o
8686
obj-$(CONFIG_SAMSUNG_JACK) += sec_jack.o
87+
obj-$(CONFIG_OPTICAL_GP2AP020A00F) += gp2ap020.o
8788
obj-$(CONFIG_OPTICAL_BH1721) += bh1721.o
8889
obj-$(CONFIG_SENSORS_CM36651) += cm36651.o
8990
obj-$(CONFIG_VP_A2220) += a2220.o

drivers/misc/sec_jack.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#define MAX_ZONE_LIMIT 10
3737
#if defined(CONFIG_MACH_AEGIS2)
3838
#define SEND_KEY_CHECK_TIME_MS 65
39+
#elif defined(CONFIG_MACH_K2_KDI)
40+
#define SEND_KEY_CHECK_TIME_MS 70
3941
#else
4042
#define SEND_KEY_CHECK_TIME_MS 60
4143
#endif

fs/proc/cmdline.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <linux/proc_fs.h>
44
#include <linux/seq_file.h>
55

6+
#include <asm/uaccess.h> /* copy_from_user */
7+
68
static int cmdline_proc_show(struct seq_file *m, void *v)
79
{
810
seq_printf(m, "%s\n", saved_command_line);
@@ -14,9 +16,24 @@ static int cmdline_proc_open(struct inode *inode, struct file *file)
1416
return single_open(file, cmdline_proc_show, NULL);
1517
}
1618

19+
static int cmdline_proc_write(struct file *file, const char __user *buf,
20+
size_t len, loff_t *ppos)
21+
{
22+
char str[1000];
23+
if (copy_from_user(str, buf, len)) {
24+
printk( KERN_INFO "[cmdline] copy_from_user failed.\n");
25+
return -EFAULT;
26+
}
27+
str[len] = '\0';
28+
strcpy(saved_command_line, str);
29+
30+
return len;
31+
}
32+
1733
static const struct file_operations cmdline_proc_fops = {
1834
.open = cmdline_proc_open,
1935
.read = seq_read,
36+
.write = cmdline_proc_write,
2037
.llseek = seq_lseek,
2138
.release = single_release,
2239
};

0 commit comments

Comments
 (0)