aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorcodeworkx <daniel.hillenbrand@codeworkx.de>2012-06-02 13:09:29 +0200
committercodeworkx <daniel.hillenbrand@codeworkx.de>2012-06-02 13:09:29 +0200
commitc6da2cfeb05178a11c6d062a06f8078150ee492f (patch)
treef3b4021d252c52d6463a9b3c1bb7245e399b009c /include/linux/platform_data
parentc6d7c4dbff353eac7919342ae6b3299a378160a6 (diff)
downloadkernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.zip
kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.gz
kernel_samsung_smdk4412-c6da2cfeb05178a11c6d062a06f8078150ee492f.tar.bz2
samsung update 1
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/c2c.h131
-rw-r--r--include/linux/platform_data/exynos4_tmu.h95
-rw-r--r--include/linux/platform_data/exynos_usb3_drd.h22
-rw-r--r--include/linux/platform_data/lte_modem_bootloader.h40
-rw-r--r--include/linux/platform_data/mms_ts.h104
-rw-r--r--include/linux/platform_data/mms_ts_gc.h39
-rw-r--r--include/linux/platform_data/modem.h323
-rw-r--r--include/linux/platform_data/ntc_thermistor.h53
-rw-r--r--include/linux/platform_data/ram_console.h22
-rw-r--r--include/linux/platform_data/usb3503.h42
10 files changed, 871 insertions, 0 deletions
diff --git a/include/linux/platform_data/c2c.h b/include/linux/platform_data/c2c.h
new file mode 100644
index 0000000..ebb210b
--- /dev/null
+++ b/include/linux/platform_data/c2c.h
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2010 Google, Inc.
+ * Copyright (C) 2010 Samsung Electronics.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/delay.h>
+
+#define C2C_CP_RGN_ADDR 0x60000000
+#define C2C_CP_RGN_SIZE 0x03800000 // 56 MB
+#define C2C_SH_RGN_ADDR (C2C_CP_RGN_ADDR + C2C_SH_RGN_ADDR)
+#define C2C_SH_RGN_SIZE 0x00800000 // 8 MB
+
+
+#define DPRAM_INTR_PORT_SIZE 2
+#define DPRAM_MAGIC_CODE_SIZE 2
+#define DPRAM_ACCESS_CODE_SIZE 2
+#define DP_HEAD_SIZE 0x2
+#define DP_TAIL_SIZE 0x2
+#define DP_MAGIC_CODE 0xAA
+/*
+ Total size = magic_code + access_enable +
+ fmt_tx_head + fmt_tx_tail + fmt_tx_buff +
+ raw_tx_head + raw_tx_tail + raw_tx_buff +
+ fmt_rx_head + fmt_rx_tail + fmt_rx_buff +
+ raw_rx_head + raw_rx_tail + raw_rx_buff +
+ padding +
+ mbx_ap2cp + mbx_cp2ap
+ = 2 + 2 +
+ 2 + 2 + 2044 +
+ 2 + 2 + 6128 +
+ 2 + 2 + 2044 +
+ 2 + 2 + 6128 +
+ 16 +
+ 2 + 2
+ = 16384
+*/
+
+#define TRUE 1
+#define FALSE 0
+
+/* interrupt masks.*/
+#define INT_MASK_VALID 0x0080
+#define INT_MASK_CMD 0x0040
+#define INT_MASK_REQ_ACK_F 0x0020
+#define INT_MASK_REQ_ACK_R 0x0010
+#define INT_MASK_RES_ACK_F 0x0008
+#define INT_MASK_RES_ACK_R 0x0004
+#define INT_MASK_SEND_F 0x0002
+#define INT_MASK_SEND_R 0x0001
+
+#define INT_CMD_INIT_START 0x0001
+#define INT_CMD_INIT_END 0x0002
+#define INT_CMD_REQ_ACTIVE 0x0003
+#define INT_CMD_RES_ACTIVE 0x0004
+#define INT_CMD_REQ_TIME_SYNC 0x0005
+#define INT_CMD_PHONE_START 0x0008
+#define INT_CMD_ERR_DISPLAY 0x0009
+#define INT_CMD_PHONE_DEEP_SLEEP 0x000A
+#define INT_CMD_NV_REBUILDING 0x000B
+#define INT_CMD_EMER_DOWN 0x000C
+#define INT_CMD_PIF_INIT_DONE 0x000D
+#define INT_CMD_SILENT_NV_REBUILDING 0x000E
+#define INT_CMD_NORMAL_POWER_OFF 0x000F
+
+#define INT_CMD(x) (INT_MASK_VALID | INT_MASK_CMD | x)
+#define INT_NON_CMD(x) (INT_MASK_VALID | x)
+
+/* special interrupt cmd indicating modem boot failure. */
+#define INT_POWERSAFE_FAIL 0xDEAD
+
+#define FMT_IDX 0
+#define RAW_IDX 1
+#define MAX_IDX 2
+
+#define GPIO_DPRAM_INT_N 62
+#define IRQ_DPRAM_INT_N gpio_to_irq(GPIO_DPRAM_INT_N)
+
+#define GPIO_PHONE_ACTIVE 120
+
+#define HDLC_START 0x7F
+#define HDLC_END 0x7E
+#define SIZE_OF_HDLC_START 1
+#define SIZE_OF_HDLC_END 1
+
+/* ioctl command definitions. */
+#define IOC_MZ_MAGIC ('o')
+#define DPRAM_PHONE_POWON _IO(IOC_MZ_MAGIC, 0xd0)
+#define DPRAM_PHONEIMG_LOAD _IO(IOC_MZ_MAGIC, 0xd1)
+#define DPRAM_NVDATA_LOAD _IO(IOC_MZ_MAGIC, 0xd2)
+#define DPRAM_PHONE_BOOTSTART _IO(IOC_MZ_MAGIC, 0xd3)
+
+/*related GPMC*/
+#define OMAP44XX_GPMC_CS1_SIZE 0xC /* 64M */
+#define OMAP44XX_GPMC_CS1_MAP 0x04000000
+#define DPRAM_GPMC_CONFIG1 0x00001201
+#define DPRAM_GPMC_CONFIG2 0x000f1200
+#define DPRAM_GPMC_CONFIG3 0x44040400
+#define DPRAM_GPMC_CONFIG4 0x0e05f155
+#define DPRAM_GPMC_CONFIG5 0x000e1016
+#define DPRAM_GPMC_CONFIG6 0x060603c3
+#define DPRAM_GPMC_CONFIG7 0x00000F44
+
+#define GPMC_CONFIG1 (0x00)
+#define GPMC_CONFIG2 (0x04)
+#define GPMC_CONFIG3 (0x08)
+#define GPMC_CONFIG4 (0x0C)
+#define GPMC_CONFIG5 (0x10)
+#define GPMC_CONFIG6 (0x14)
+#define GPMC_CONFIG7 (0x18)
+#define GPMC_CONFIG_CS1 (OMAP44XX_GPMC_BASE+0x90)
+#define GPMC_CONFIG_WIDTH (0x30)
+
+#define REG32(A) (*(volatile unsigned long *)(A))
+#define GPMC_CONTROL_BASE_ADDR 0x50000000
+#define GPMC_CONFIG1_1 (GPMC_CONTROL_BASE_ADDR + 0x90)
+#define GPMC_CONFIG2_1 (GPMC_CONTROL_BASE_ADDR + 0x94)
+#define GPMC_CONFIG3_1 (GPMC_CONTROL_BASE_ADDR + 0x98)
+#define GPMC_CONFIG4_1 (GPMC_CONTROL_BASE_ADDR + 0x9C)
+#define GPMC_CONFIG5_1 (GPMC_CONTROL_BASE_ADDR + 0xA0)
+#define GPMC_CONFIG6_1 (GPMC_CONTROL_BASE_ADDR + 0xA4)
+#define GPMC_CONFIG7_1 (GPMC_CONTROL_BASE_ADDR + 0xA8)
diff --git a/include/linux/platform_data/exynos4_tmu.h b/include/linux/platform_data/exynos4_tmu.h
new file mode 100644
index 0000000..4b093a5
--- /dev/null
+++ b/include/linux/platform_data/exynos4_tmu.h
@@ -0,0 +1,95 @@
+/*
+ * exynos4_tmu.h - Samsung EXYNOS4 TMU (Thermal Management Unit)
+ *
+ * Copyright (C) 2011 Samsung Electronics
+ * Donggeun Kim <dg77.kim@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _LINUX_EXYNOS4_TMU_H
+#define _LINUX_EXYNOS4_TMU_H
+#include <linux/cpu_cooling.h>
+
+enum calibration_type {
+ TYPE_ONE_POINT_TRIMMING,
+ TYPE_TWO_POINT_TRIMMING,
+ TYPE_NONE,
+};
+
+enum tmu_type {
+ TYPE_EXYNOS4210,
+ TYPE_EXYNOS4X12,
+};
+
+/**
+ * struct exynos4_tmu_platform_data
+ * @threshold: basic temperature for generating interrupt
+ * 25 <= threshold <= 125 [unit: degree Celsius]
+ * @trigger_levels: array for each interrupt levels
+ * [unit: degree Celsius]
+ * 0: temperature for trigger_level0 interrupt
+ * condition for trigger_level0 interrupt:
+ * current temperature > threshold + trigger_levels[0]
+ * 1: temperature for trigger_level1 interrupt
+ * condition for trigger_level1 interrupt:
+ * current temperature > threshold + trigger_levels[1]
+ * 2: temperature for trigger_level2 interrupt
+ * condition for trigger_level2 interrupt:
+ * current temperature > threshold + trigger_levels[2]
+ * 3: temperature for trigger_level3 interrupt
+ * condition for trigger_level3 interrupt:
+ * current temperature > threshold + trigger_levels[3]
+ * @trigger_level0_en:
+ * 1 = enable trigger_level0 interrupt,
+ * 0 = disable trigger_level0 interrupt
+ * @trigger_level1_en:
+ * 1 = enable trigger_level1 interrupt,
+ * 0 = disable trigger_level1 interrupt
+ * @trigger_level2_en:
+ * 1 = enable trigger_level2 interrupt,
+ * 0 = disable trigger_level2 interrupt
+ * @trigger_level3_en:
+ * 1 = enable trigger_level3 interrupt,
+ * 0 = disable trigger_level3 interrupt
+ * @gain: gain of amplifier in the positive-TC generator block
+ * 0 <= gain <= 15
+ * @reference_voltage: reference voltage of amplifier
+ * in the positive-TC generator block
+ * 0 <= reference_voltage <= 31
+ * @cal_type: calibration type for temperature
+ * @freq_pctg_table: Table representing frequency reduction percentage.
+ * @freq_tab_count: Count of the above table as frequency reduction may
+ * applicable to only some of the trigger levels.
+ *
+ * This structure is required for configuration of exynos4_tmu driver.
+ */
+struct exynos4_tmu_platform_data {
+ u8 threshold;
+ u8 trigger_levels[4];
+ bool trigger_level0_en;
+ bool trigger_level1_en;
+ bool trigger_level2_en;
+ bool trigger_level3_en;
+
+ u8 gain;
+ u8 reference_voltage;
+
+ enum calibration_type cal_type;
+
+ struct freq_pctg_table freq_tab[4];
+ unsigned int freq_tab_count;
+};
+#endif /* _LINUX_EXYNOS4_TMU_H */
diff --git a/include/linux/platform_data/exynos_usb3_drd.h b/include/linux/platform_data/exynos_usb3_drd.h
new file mode 100644
index 0000000..1bad86f
--- /dev/null
+++ b/include/linux/platform_data/exynos_usb3_drd.h
@@ -0,0 +1,22 @@
+/* inlude/linux/platform_data/exynos_usb3_drd.h
+ *
+ * Copyright (c) 2012 Samsung Electronics Co. Ltd
+ * Author: Anton Tikhomirov <av.tikhomirov@samsung.com>
+ *
+ * EXYNOS SuperSpeed USB 3.0 DRD Controller platform data
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef _EXYNOS_USB3_DRD_H_
+#define _EXYNOS_USB3_DRD_H_
+
+struct exynos_usb3_drd_pdata {
+ int phy_type;
+ int (*phy_init)(struct platform_device *pdev, int type);
+ int (*phy_exit)(struct platform_device *pdev, int type);
+};
+
+#endif
diff --git a/include/linux/platform_data/lte_modem_bootloader.h b/include/linux/platform_data/lte_modem_bootloader.h
new file mode 100644
index 0000000..27a0450
--- /dev/null
+++ b/include/linux/platform_data/lte_modem_bootloader.h
@@ -0,0 +1,40 @@
+/* Lte modem bootloader support for Samsung Tuna Board.
+ *
+ * Copyright (C) 2011 Google, Inc.
+ * Copyright (C) 2011 Samsung Electronics.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __LTE_MODEM_BOOTLOADER_H
+#define __LTE_MODEM_BOOTLOADER_H
+
+#define LTE_MODEM_BOOTLOADER_DRIVER_NAME "lte_modem_bootloader"
+
+#define IOCTL_LTE_MODEM_XMIT_BOOT _IOW('o', 0x23, unsigned int)
+#define IOCTL_LTE_MODEM_LTE2AP_STATUS _IOR('o', 0x24, unsigned int)
+
+#define AIRPLAIN_MODE_TEST
+
+#ifdef AIRPLAIN_MODE_TEST
+#define IOCTL_LTE_MODEM_AIRPLAIN_ON _IOWR('o', 0x25, unsigned int)
+#define IOCTL_LTE_MODEM_AIRPLAIN_OFF _IOWR('o', 0x26, unsigned int)
+#endif
+
+struct lte_modem_bootloader_param {
+ char __user *buf;
+ int len;
+};
+
+struct lte_modem_bootloader_platform_data {
+ const char *name;
+ unsigned int gpio_lte2ap_status;
+};
+#endif/* LTE_MODEM_BOOTLOADER_H */
diff --git a/include/linux/platform_data/mms_ts.h b/include/linux/platform_data/mms_ts.h
new file mode 100644
index 0000000..8c51e58
--- /dev/null
+++ b/include/linux/platform_data/mms_ts.h
@@ -0,0 +1,104 @@
+/*
+ * mms_ts.h - Platform data for Melfas MMS-series touch driver
+ *
+ * Copyright (C) 2011 Google Inc.
+ * Author: Dima Zavin <dima@android.com>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef _LINUX_MMS_TOUCH_H
+#define _LINUX_MMS_TOUCH_H
+#define MELFAS_TS_NAME "melfas-ts"
+
+struct melfas_tsi_platform_data {
+ int max_x;
+ int max_y;
+
+ bool invert_x;
+ bool invert_y;
+
+ int gpio_int;
+ int gpio_sda;
+ int gpio_scl;
+ int (*mux_fw_flash) (bool to_gpios);
+ int (*power) (int on);
+ int (*is_vdd_on) (void);
+ const char *fw_name;
+ bool use_touchkey;
+ const u8 *touchkey_keycode;
+ const u8 *config_fw_version;
+#ifdef CONFIG_INPUT_FBSUSPEND
+ struct notifier_block fb_notif;
+#endif
+ void (*input_event) (void *data);
+ int (*lcd_type) (void);
+ void (*register_cb) (void *);
+};
+extern struct class *sec_class;
+void tsp_charger_infom(bool en);
+
+#endif /* _LINUX_MMS_TOUCH_H */
+
+#ifndef __MMS100_ISC_H__
+#define __MMS100_ISC_H__
+
+typedef enum {
+ ISC_NONE = -1,
+ ISC_SUCCESS = 0,
+ ISC_FILE_OPEN_ERROR,
+ ISC_FILE_CLOSE_ERROR,
+ ISC_FILE_FORMAT_ERROR,
+ ISC_WRITE_BUFFER_ERROR,
+ ISC_I2C_ERROR,
+ ISC_UPDATE_MODE_ENTER_ERROR,
+ ISC_CRC_ERROR,
+ ISC_VALIDATION_ERROR,
+ ISC_COMPATIVILITY_ERROR,
+ ISC_UPDATE_SECTION_ERROR,
+ ISC_SLAVE_ERASE_ERROR,
+ ISC_SLAVE_DOWNLOAD_ERROR,
+ ISC_DOWNLOAD_WHEN_SLAVE_IS_UPDATED_ERROR,
+ ISC_INITIAL_PACKET_ERROR,
+ ISC_NO_NEED_UPDATE_ERROR,
+ ISC_LIMIT
+} eISCRet_t;
+
+typedef enum {
+ EC_NONE = -1,
+ EC_DEPRECATED = 0,
+ EC_BOOTLOADER_RUNNING = 1,
+ EC_BOOT_ON_SUCCEEDED = 2,
+ EC_ERASE_END_MARKER_ON_SLAVE_FINISHED = 3,
+ EC_SLAVE_DOWNLOAD_STARTS = 4,
+ EC_SLAVE_DOWNLOAD_FINISHED = 5,
+ EC_2CHIP_HANDSHAKE_FAILED = 0x0E,
+ EC_ESD_PATTERN_CHECKED = 0x0F,
+ EC_LIMIT
+} eErrCode_t;
+
+typedef enum {
+ SEC_NONE = -1,
+ SEC_BOOTLOADER = 0,
+ SEC_CORE,
+ SEC_PRIVATE_CONFIG,
+ SEC_PUBLIC_CONFIG,
+ SEC_LIMIT
+} eSectionType_t;
+
+typedef struct {
+ unsigned char version;
+ unsigned char compatible_version;
+ unsigned char start_addr;
+ unsigned char end_addr;
+} tISCFWInfo_t;
+
+/*eISCRet_t mms100_ISC_download_mbinary(struct i2c_client *_client); */
+#endif /* __MMS100_ISC_H__ */
+
+
diff --git a/include/linux/platform_data/mms_ts_gc.h b/include/linux/platform_data/mms_ts_gc.h
new file mode 100644
index 0000000..318dadf
--- /dev/null
+++ b/include/linux/platform_data/mms_ts_gc.h
@@ -0,0 +1,39 @@
+/*
+ * mms_ts.h - Platform data for Melfas MMS-series touch driver
+ *
+ * Copyright (C) 2011 Google Inc.
+ * Author: Dima Zavin <dima@android.com>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ */
+
+#ifndef _LINUX_MMS_TOUCH_H
+#define _LINUX_MMS_TOUCH_H
+#define MELFAS_TS_NAME "melfas-ts"
+
+struct melfas_tsi_platform_data {
+ int max_x;
+ int max_y;
+
+ bool invert_x;
+ bool invert_y;
+
+ int gpio_int;
+ int gpio_sda;
+ int gpio_scl;
+ int (*mux_fw_flash)(bool to_gpios);
+ int (*power)(int on);
+ const char *fw_name;
+ const u8 *config_fw_version;
+ void (*input_event)(void *data);
+ void (*register_cb)(void *);
+};
+extern struct class *sec_class;
+void tsp_charger_infom(bool en);
+
+#endif /* _LINUX_MMS_TOUCH_H */
diff --git a/include/linux/platform_data/modem.h b/include/linux/platform_data/modem.h
new file mode 100644
index 0000000..d66af9f
--- /dev/null
+++ b/include/linux/platform_data/modem.h
@@ -0,0 +1,323 @@
+/*
+ * Copyright (C) 2010 Google, Inc.
+ * Copyright (C) 2010 Samsung Electronics.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __MODEM_IF_H__
+#define __MODEM_IF_H__
+
+enum modem_t {
+ IMC_XMM6260,
+ IMC_XMM6262,
+ VIA_CBP71,
+ VIA_CBP72,
+ SEC_CMC221,
+ QC_MDM6600,
+ DUMMY,
+};
+
+enum dev_format {
+ IPC_FMT,
+ IPC_RAW,
+ IPC_RFS,
+ IPC_CMD,
+ IPC_BOOT,
+ IPC_MULTI_RAW,
+ IPC_RAMDUMP,
+ MAX_DEV_FORMAT,
+};
+#define MAX_IPC_DEV (IPC_RFS + 1)
+
+enum modem_io {
+ IODEV_MISC,
+ IODEV_NET,
+ IODEV_DUMMY,
+};
+
+enum modem_link {
+ LINKDEV_UNDEFINED,
+ LINKDEV_MIPI,
+ LINKDEV_DPRAM,
+ LINKDEV_SPI,
+ LINKDEV_USB,
+ LINKDEV_HSIC,
+ LINKDEV_C2C,
+ LINKDEV_MAX,
+};
+#define LINKTYPE(modem_link) (1u << (modem_link))
+
+enum modem_network {
+ UMTS_NETWORK,
+ CDMA_NETWORK,
+ LTE_NETWORK,
+};
+
+enum sipc_ver {
+ NO_SIPC_VER = 0,
+ SIPC_VER_40 = 40,
+ SIPC_VER_41 = 41,
+ SIPC_VER_42 = 42,
+ SIPC_VER_50 = 50,
+ MAX_SIPC_VER,
+};
+
+/**
+ * struct modem_io_t - declaration for io_device
+ * @name: device name
+ * @id: contain format & channel information
+ * (id & 11100000b)>>5 = format (eg, 0=FMT, 1=RAW, 2=RFS)
+ * (id & 00011111b) = channel (valid only if format is RAW)
+ * @format: device format
+ * @io_type: type of this io_device
+ * @links: list of link_devices to use this io_device
+ * for example, if you want to use DPRAM and USB in an io_device.
+ * .links = LINKTYPE(LINKDEV_DPRAM) | LINKTYPE(LINKDEV_USB)
+ * @tx_link: when you use 2+ link_devices, set the link for TX.
+ * If define multiple link_devices in @links,
+ * you can receive data from them. But, cannot send data to all.
+ * TX is only one link_device.
+ *
+ * This structure is used in board-*-modem.c
+ */
+struct modem_io_t {
+ char *name;
+ int id;
+ enum dev_format format;
+ enum modem_io io_type;
+ enum modem_link links;
+ enum modem_link tx_link;
+ bool rx_gather;
+};
+
+struct modemlink_pm_data {
+ char *name;
+ /* link power contol 2 types : pin & regulator control */
+ int (*link_ldo_enable)(bool);
+ unsigned gpio_link_enable;
+ unsigned gpio_link_active;
+ unsigned gpio_link_hostwake;
+ unsigned gpio_link_slavewake;
+ int (*link_reconnect)(void);
+ int (*port_enable)(int, int);
+ int *p_hub_status;
+ bool has_usbhub;
+
+ atomic_t freqlock;
+ int (*cpufreq_lock)(void);
+ int (*cpufreq_unlock)(void);
+
+ int autosuspend_delay_ms; /* if zero, the default value is used */
+};
+
+struct modemlink_pm_link_activectl {
+ int gpio_initialized;
+ int gpio_request_host_active;
+};
+
+enum dpram_type {
+ EXT_DPRAM,
+ CP_IDPRAM,
+ AP_IDPRAM,
+ C2C_DPRAM,
+ MAX_DPRAM_TYPE
+};
+
+enum dpram_speed {
+ DPRAM_SPEED_LOW,
+ DPRAM_SPEED_MID,
+ DPRAM_SPEED_HIGH,
+ MAX_DPRAM_SPEED
+};
+
+struct dpram_circ {
+ u16 __iomem *head;
+ u16 __iomem *tail;
+ u8 __iomem *buff;
+ u32 size;
+};
+
+struct dpram_ipc_device {
+ char name[16];
+ int id;
+
+ struct dpram_circ txq;
+ struct dpram_circ rxq;
+
+ u16 mask_req_ack;
+ u16 mask_res_ack;
+ u16 mask_send;
+};
+
+struct dpram_ipc_map {
+ u16 __iomem *magic;
+ u16 __iomem *access;
+
+ struct dpram_ipc_device dev[MAX_IPC_DEV];
+
+ u16 __iomem *mbx_cp2ap;
+ u16 __iomem *mbx_ap2cp;
+};
+
+struct modemlink_dpram_control {
+ void (*reset)(void);
+ void (*setup_speed)(enum dpram_speed);
+ int (*wakeup)(void);
+ void (*sleep)(void);
+
+ void (*clear_intr)(void);
+ u16 (*recv_intr)(void);
+ void (*send_intr)(u16);
+ u16 (*recv_msg)(void);
+ void (*send_msg)(u16);
+
+ u16 (*get_magic)(void);
+ void (*set_magic)(u16);
+
+ u16 (*get_access)(void);
+ void (*set_access)(u16);
+
+ u32 (*get_tx_head)(int);
+ u32 (*get_tx_tail)(int);
+ void (*set_tx_head)(int, u32);
+ void (*set_tx_tail)(int, u32);
+ u8 __iomem * (*get_tx_buff)(int);
+ u32 (*get_tx_buff_size)(int);
+ u16 (*get_mask_req_ack)(int);
+ u16 (*get_mask_res_ack)(int);
+ u16 (*get_mask_send)(int);
+
+ u32 (*get_rx_head)(int);
+ u32 (*get_rx_tail)(int);
+ void (*set_rx_head)(int, u32);
+ void (*set_rx_tail)(int, u32);
+ u8 __iomem * (*get_rx_buff)(int);
+ u32 (*get_rx_buff_size)(int);
+
+ void (*log_disp)(struct modemlink_dpram_control *dpctl);
+ int (*cpupload_step1)(struct modemlink_dpram_control *dpctl);
+ int (*cpupload_step2)(void *arg, struct modemlink_dpram_control *dpctl);
+ int (*cpimage_load_prepare)(struct modemlink_dpram_control *dpctl);
+ int (*cpimage_load)(void *arg, struct modemlink_dpram_control *dpctl);
+ int (*nvdata_load)(void *arg, struct modemlink_dpram_control *dpctl);
+ int (*phone_boot_start)(struct modemlink_dpram_control *dpctl);
+ int (*phone_boot_start_post_process)(void);
+ void (*phone_boot_start_handler)(struct modemlink_dpram_control *dpctl);
+ void (*dload_cmd_hdlr)(
+ struct modemlink_dpram_control *dpctl, u16 cmd);
+ void (*bt_map_init)(struct modemlink_dpram_control *dpctl);
+ void (*load_init)(struct modemlink_dpram_control *dpctl);
+#if defined(CONFIG_MACH_M0_CTC)
+ void (*terminate_link)(struct modemlink_dpram_control *dpctl);
+#endif
+ u8 __iomem *dp_base;
+ u32 dp_size;
+ enum dpram_type dp_type; /* DPRAM type */
+ int aligned; /* If aligned access is required, ... */
+
+ int dpram_irq;
+ unsigned long dpram_irq_flags;
+ char *dpram_irq_name;
+ char *dpram_wlock_name;
+
+ int max_ipc_dev;
+
+ struct dpram_ipc_map *ipc_map;
+};
+
+#define DPRAM_MAGIC_CODE 0xAA
+
+/* platform data */
+struct modem_data {
+ char *name;
+
+ unsigned gpio_cp_on;
+ unsigned gpio_cp_off;
+ unsigned gpio_reset_req_n;
+ unsigned gpio_cp_reset;
+ unsigned gpio_pda_active;
+ unsigned gpio_phone_active;
+ unsigned gpio_cp_dump_int;
+ unsigned gpio_ap_dump_int;
+ unsigned gpio_flm_uart_sel;
+#if defined(CONFIG_MACH_M0_CTC)
+ unsigned gpio_flm_uart_sel_rev06;
+ unsigned gpio_host_wakeup;
+#endif
+ unsigned gpio_cp_warm_reset;
+ unsigned gpio_sim_detect;
+#ifdef CONFIG_LINK_DEVICE_DPRAM
+ unsigned gpio_dpram_int;
+#endif
+
+#ifdef CONFIG_LTE_MODEM_CMC221
+ unsigned gpio_dpram_status;
+ unsigned gpio_dpram_wakeup;
+ unsigned gpio_slave_wakeup;
+ unsigned gpio_host_active;
+ unsigned gpio_host_wakeup;
+ int irq_host_wakeup;
+#endif
+#ifdef CONFIG_MACH_U1_KOR_LGT
+ unsigned gpio_cp_reset_msm;
+ unsigned gpio_boot_sw_sel;
+ void (*vbus_on)(void);
+ void (*vbus_off)(void);
+ struct regulator *cp_vbus;
+#endif
+
+ /* Switch with 2 links in a modem */
+ unsigned gpio_dynamic_switching;
+
+ /* Modem component */
+ enum modem_network modem_net;
+ enum modem_t modem_type;
+ enum modem_link link_types;
+ char *link_name;
+#ifdef CONFIG_LINK_DEVICE_DPRAM
+ /* Link to DPRAM control functions dependent on each platform */
+ struct modemlink_dpram_control *dpram_ctl;
+#endif
+
+ /* SIPC version */
+ enum sipc_ver ipc_version;
+
+ /* Information of IO devices */
+ unsigned num_iodevs;
+ struct modem_io_t *iodevs;
+
+ /* Modem link PM support */
+ struct modemlink_pm_data *link_pm_data;
+
+ void (*gpio_revers_bias_clear)(void);
+ void (*gpio_revers_bias_restore)(void);
+
+ /* Handover with 2+ modems */
+ bool use_handover;
+
+ /* Debugging option */
+ bool use_mif_log;
+};
+
+#define LOG_TAG "mif: "
+
+#define mif_err(fmt, ...) \
+ pr_err(LOG_TAG "%s: " pr_fmt(fmt), __func__, ##__VA_ARGS__)
+#define mif_debug(fmt, ...) \
+ pr_debug(LOG_TAG "%s: " pr_fmt(fmt), __func__, ##__VA_ARGS__)
+#define mif_info(fmt, ...) \
+ pr_info(LOG_TAG "%s: " pr_fmt(fmt), __func__, ##__VA_ARGS__)
+#define mif_trace(fmt, ...) \
+ printk(KERN_DEBUG "mif: %s: %d: called(%pF): " fmt, \
+ __func__, __LINE__, __builtin_return_address(0), ##__VA_ARGS__)
+
+#endif
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
new file mode 100644
index 0000000..88734e8
--- /dev/null
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -0,0 +1,53 @@
+/*
+ * ntc_thermistor.h - NTC Thermistors
+ *
+ * Copyright (C) 2010 Samsung Electronics
+ * MyungJoo Ham <myungjoo.ham@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef _LINUX_NTC_H
+#define _LINUX_NTC_H
+
+enum ntc_thermistor_type {
+ TYPE_NCPXXWB473,
+ TYPE_NCPXXWL333,
+};
+
+struct ntc_thermistor_platform_data {
+ /*
+ * One (not both) of read_uV and read_ohm should be provided and only
+ * one of the two should be provided.
+ * Both functions should return negative value for an error case.
+ *
+ * pullup_uV, pullup_ohm, pulldown_ohm, and connect are required to use
+ * read_uV()
+ *
+ * How to setup pullup_ohm, pulldown_ohm, and connect is
+ * described at Documentation/hwmon/ntc_thermistor
+ *
+ * pullup/down_ohm: 0 for infinite / not-connected
+ */
+ int (*read_uV)(void);
+ unsigned int pullup_uV;
+
+ unsigned int pullup_ohm;
+ unsigned int pulldown_ohm;
+ enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect;
+
+ int (*read_ohm)(void);
+};
+
+#endif /* _LINUX_NTC_H */
diff --git a/include/linux/platform_data/ram_console.h b/include/linux/platform_data/ram_console.h
new file mode 100644
index 0000000..9f1125c
--- /dev/null
+++ b/include/linux/platform_data/ram_console.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_
+#define _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_
+
+struct ram_console_platform_data {
+ const char *bootinfo;
+};
+
+#endif /* _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_ */
diff --git a/include/linux/platform_data/usb3503.h b/include/linux/platform_data/usb3503.h
new file mode 100644
index 0000000..9bcf4ec
--- /dev/null
+++ b/include/linux/platform_data/usb3503.h
@@ -0,0 +1,42 @@
+#ifndef USB3503_H
+#define USB3503_H
+
+#define USB3503_I2C_NAME "usb3503"
+#define HUB_TAG "usb3503: "
+
+#define CFG1_REG 0x06
+#define CFG1_SELF_BUS_PWR (0x1 << 7)
+
+#define SP_ILOCK_REG 0xE7
+#define SPILOCK_CONNECT_N (0x1 << 1)
+#define SPILOCK_CONFIG_N (0x1 << 0)
+
+#define CFGP_REG 0xEE
+#define CFGP_CLKSUSP (0x1 << 7)
+
+#define PDS_REG 0x0A
+#define PDS_PORT1 (0x1 << 1)
+#define PDS_PORT2 (0x1 << 2)
+#define PDS_PORT3 (0x1 << 3)
+
+
+enum usb3503_mode {
+ USB3503_MODE_UNKNOWN,
+ USB3503_MODE_HUB,
+ USB3503_MODE_STANDBY,
+};
+
+struct usb3503_platform_data {
+ char initial_mode;
+ int (*reset_n)(int);
+ int (*register_hub_handler)(void (*)(void), void *);
+ int (*port_enable)(int, int);
+};
+
+struct usb3503_hubctl {
+ int mode;
+ int (*reset_n)(int);
+ int (*port_enable)(int, int);
+ struct i2c_client *i2c_dev;
+};
+#endif