mako: seperate mako codes from qcom codes
- remove the msm board specific codes from mako - enable to build for msm board Change-Id: I787ebfdfe00f42382b027c72f69b1061da03894e
This commit is contained in:
committed by
Iliyan Malchev
parent
37b9eb8046
commit
d1c0aa6903
@@ -43,7 +43,7 @@ CONFIG_ARCH_MSM8960=y
|
||||
CONFIG_ARCH_MSM8930=y
|
||||
CONFIG_ARCH_APQ8064=y
|
||||
CONFIG_MSM_KRAIT_TBB_ABORT_HANDLER=y
|
||||
CONFIG_MACH_APQ8064_MTP=y
|
||||
CONFIG_MACH_MSM_DUMMY=y
|
||||
CONFIG_BOARD_HEADER_FILE="mach/lge/board_mako.h"
|
||||
CONFIG_MACH_APQ8064_MAKO=y
|
||||
CONFIG_LGE_QFPROM_INTERFACE=y
|
||||
@@ -51,6 +51,7 @@ CONFIG_LGE_QC_LCDC_LUT=y
|
||||
CONFIG_LGE_KCAL=y
|
||||
CONFIG_LGE_KCAL_QLUT=y
|
||||
CONFIG_EARJACK_DEBUGGER=y
|
||||
CONFIG_LGE_CRASH_HANDLER=y
|
||||
# CONFIG_MSM_STACKED_MEMORY is not set
|
||||
CONFIG_KERNEL_PMEM_EBI_REGION=y
|
||||
# CONFIG_MSM_FIQ_SUPPORT is not set
|
||||
|
||||
@@ -866,6 +866,9 @@ config MACH_FSM9XXX_SURF
|
||||
chipset based SURF evaluation board and
|
||||
FFA board.
|
||||
|
||||
config MACH_MSM_DUMMY
|
||||
bool "NONE (No device)"
|
||||
|
||||
endmenu
|
||||
|
||||
source "arch/arm/mach-msm/lge/Kconfig"
|
||||
|
||||
@@ -281,9 +281,7 @@ obj-$(CONFIG_MACH_MSM8930_MTP) += board-8930-all.o board-8930-regulator.o
|
||||
obj-$(CONFIG_MACH_MSM8930_FLUID) += board-8930-all.o board-8930-regulator.o
|
||||
obj-$(CONFIG_PM8921_BMS) += bms-batterydata.o bms-batterydata-desay.o
|
||||
obj-$(CONFIG_MACH_APQ8064_CDP) += board-8064-all.o board-8064-regulator.o
|
||||
ifndef CONFIG_MACH_LGE # FIXME: will be fixed
|
||||
obj-$(CONFIG_MACH_APQ8064_MTP) += board-8064-all.o board-8064-regulator.o
|
||||
endif
|
||||
obj-$(CONFIG_MACH_APQ8064_LIQUID) += board-8064-all.o board-8064-regulator.o
|
||||
obj-$(CONFIG_MACH_MPQ8064_HRD) += board-8064-all.o board-8064-regulator.o
|
||||
obj-$(CONFIG_MACH_MPQ8064_DTV) += board-8064-all.o board-8064-regulator.o
|
||||
|
||||
22
arch/arm/mach-msm/clock-8960.c
Executable file → Normal file
22
arch/arm/mach-msm/clock-8960.c
Executable file → Normal file
@@ -5205,13 +5205,25 @@ static struct clk_lookup msm_clocks_8064[] = {
|
||||
CLK_LOOKUP("core_clk", gp0_clk.c, ""),
|
||||
CLK_LOOKUP("core_clk", gp1_clk.c, ""),
|
||||
CLK_LOOKUP("core_clk", gp2_clk.c, ""),
|
||||
#ifdef CONFIG_MACH_LGE
|
||||
CLK_LOOKUP("core_clk", gsbi1_uart_clk.c, ""),
|
||||
#else
|
||||
CLK_LOOKUP("core_clk", gsbi1_uart_clk.c, "msm_serial_hsl.1"),
|
||||
#endif
|
||||
CLK_LOOKUP("core_clk", gsbi2_uart_clk.c, ""),
|
||||
CLK_LOOKUP("core_clk", gsbi3_uart_clk.c, ""),
|
||||
#ifdef CONFIG_MACH_LGE
|
||||
CLK_LOOKUP("core_clk", gsbi4_uart_clk.c, "msm_serial_hsl.0"),
|
||||
#else
|
||||
CLK_LOOKUP("core_clk", gsbi4_uart_clk.c, ""),
|
||||
#endif
|
||||
CLK_LOOKUP("core_clk", gsbi5_uart_clk.c, ""),
|
||||
CLK_LOOKUP("core_clk", gsbi6_uart_clk.c, ""),
|
||||
#ifdef CONFIG_MACH_LGE
|
||||
CLK_LOOKUP("core_clk", gsbi7_uart_clk.c, ""),
|
||||
#else
|
||||
CLK_LOOKUP("core_clk", gsbi7_uart_clk.c, "msm_serial_hsl.0"),
|
||||
#endif
|
||||
CLK_LOOKUP("core_clk", gsbi1_qup_clk.c, "qup_i2c.0"),
|
||||
CLK_LOOKUP("core_clk", gsbi2_qup_clk.c, ""),
|
||||
CLK_LOOKUP("core_clk", gsbi3_qup_clk.c, "qup_i2c.3"),
|
||||
@@ -5253,18 +5265,28 @@ static struct clk_lookup msm_clocks_8064[] = {
|
||||
CLK_LOOKUP("ce3_core_src_clk", ce3_src_clk.c, "qce.0"),
|
||||
CLK_LOOKUP("ce3_core_src_clk", ce3_src_clk.c, "qcrypto.0"),
|
||||
CLK_LOOKUP("dma_bam_pclk", dma_bam_p_clk.c, NULL),
|
||||
#ifdef CONFIG_MACH_LGE
|
||||
CLK_LOOKUP("iface_clk", gsbi1_p_clk.c, ""),
|
||||
#else
|
||||
CLK_LOOKUP("iface_clk", gsbi1_p_clk.c, "msm_serial_hsl.1"),
|
||||
#endif
|
||||
CLK_LOOKUP("iface_clk", gsbi1_p_clk.c, "qup_i2c.0"),
|
||||
CLK_LOOKUP("iface_clk", gsbi2_p_clk.c, ""),
|
||||
CLK_LOOKUP("iface_clk", gsbi3_p_clk.c, "qup_i2c.3"),
|
||||
#ifdef CONFIG_MACH_LGE
|
||||
CLK_LOOKUP("iface_clk", gsbi4_p_clk.c, "msm_serial_hsl.0"),
|
||||
#endif
|
||||
CLK_LOOKUP("iface_clk", gsbi4_p_clk.c, "qup_i2c.4"),
|
||||
CLK_LOOKUP("iface_clk", gsbi5_p_clk.c, "spi_qsd.0"),
|
||||
CLK_LOOKUP("iface_clk", gsbi5_p_clk.c, "qup_i2c.5"),
|
||||
CLK_LOOKUP("iface_clk", gsbi6_p_clk.c, ""),
|
||||
CLK_LOOKUP("iface_clk", gsbi7_p_clk.c, "msm_serial_hsl.0"),
|
||||
CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tspp.0"),
|
||||
#ifdef CONFIG_MACH_LGE
|
||||
CLK_LOOKUP("iface_clk", tsif_p_clk.c, "msm_tspp.0"),
|
||||
#else
|
||||
CLK_LOOKUP("iface_clk", gsbi7_p_clk.c, "msm_serial_hsl.0"),
|
||||
#endif
|
||||
CLK_LOOKUP("iface_clk", usb_fs1_p_clk.c, ""),
|
||||
CLK_LOOKUP("iface_clk", usb_hs1_p_clk.c, "msm_otg"),
|
||||
CLK_LOOKUP("iface_clk", usb_hs3_p_clk.c, "msm_ehci_host.0"),
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#
|
||||
# Inlcude the specific Kconfig file for LGE board
|
||||
#
|
||||
|
||||
# MAKO
|
||||
source "arch/arm/mach-msm/lge/mako/Kconfig"
|
||||
|
||||
config MACH_LGE_DUMMY
|
||||
bool "NONE (No device)"
|
||||
|
||||
@@ -5,6 +5,6 @@ config BOARD_HEADER_FILE
|
||||
config MACH_APQ8064_MAKO
|
||||
depends on ARCH_APQ8064
|
||||
select MACH_LGE
|
||||
bool "MSM8064 MAKO"
|
||||
bool "MSM8064 MAKO"
|
||||
help
|
||||
Support for the LGE MAKO device.
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/ion.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <mach/msm_memtypes.h>
|
||||
#include <mach/board.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/gpiomux.h>
|
||||
#include <mach/ion.h>
|
||||
#include <mach/msm_bus_board.h>
|
||||
@@ -899,12 +899,6 @@ void __init apq8064_init_fb(void)
|
||||
|
||||
}
|
||||
|
||||
#define I2C_SURF 1
|
||||
#define I2C_FFA (1 << 1)
|
||||
#define I2C_RUMI (1 << 2)
|
||||
#define I2C_SIM (1 << 3)
|
||||
#define I2C_LIQUID (1 << 4)
|
||||
|
||||
struct i2c_registry {
|
||||
u8 machs;
|
||||
int bus;
|
||||
@@ -918,15 +912,15 @@ struct i2c_registry {
|
||||
#endif
|
||||
|
||||
struct backlight_platform_data {
|
||||
void (*platform_init)(void);
|
||||
int gpio;
|
||||
unsigned int mode;
|
||||
int max_current;
|
||||
int init_on_boot;
|
||||
int min_brightness;
|
||||
int max_brightness;
|
||||
int default_brightness;
|
||||
int factory_brightness;
|
||||
void (*platform_init)(void);
|
||||
int gpio;
|
||||
unsigned int mode;
|
||||
int max_current;
|
||||
int init_on_boot;
|
||||
int min_brightness;
|
||||
int max_brightness;
|
||||
int default_brightness;
|
||||
int factory_brightness;
|
||||
};
|
||||
|
||||
#if defined (CONFIG_BACKLIGHT_LM3530)
|
||||
@@ -958,7 +952,6 @@ static struct backlight_platform_data lm3533_data = {
|
||||
#endif
|
||||
static struct i2c_board_info msm_i2c_backlight_info[] = {
|
||||
{
|
||||
|
||||
#if defined(CONFIG_BACKLIGHT_LM3530)
|
||||
I2C_BOARD_INFO("lm3530", 0x38),
|
||||
.platform_data = &lm3530_data,
|
||||
@@ -970,32 +963,21 @@ static struct i2c_board_info msm_i2c_backlight_info[] = {
|
||||
};
|
||||
|
||||
static struct i2c_registry apq8064_i2c_backlight_device[] __initdata = {
|
||||
|
||||
{
|
||||
I2C_SURF | I2C_FFA | I2C_RUMI | I2C_SIM | I2C_LIQUID,
|
||||
I2C_FFA,
|
||||
APQ_8064_GSBI1_QUP_I2C_BUS_ID,
|
||||
msm_i2c_backlight_info,
|
||||
ARRAY_SIZE(msm_i2c_backlight_info),
|
||||
},
|
||||
};
|
||||
|
||||
void __init register_i2c_backlight_devices(void)
|
||||
void __init lge_add_backlight_devices(void)
|
||||
{
|
||||
u8 mach_mask = 0;
|
||||
int i;
|
||||
|
||||
/* Build the matching 'supported_machs' bitmask */
|
||||
if (machine_is_apq8064_cdp())
|
||||
mach_mask = I2C_SURF;
|
||||
else if (machine_is_apq8064_mtp())
|
||||
mach_mask = I2C_FFA;
|
||||
else if (machine_is_apq8064_liquid())
|
||||
mach_mask = I2C_LIQUID;
|
||||
else if (machine_is_apq8064_rumi3())
|
||||
mach_mask = I2C_RUMI;
|
||||
else if (machine_is_apq8064_sim())
|
||||
mach_mask = I2C_SIM;
|
||||
else if (machine_is_apq8064_mako())
|
||||
if (machine_is_apq8064_mako())
|
||||
mach_mask = I2C_FFA;
|
||||
else
|
||||
pr_err("unmatched machine ID in register_i2c_devices\n");
|
||||
|
||||
@@ -381,18 +381,7 @@ static struct gpiomux_setting hdmi_active_2_cfg = {
|
||||
.pull = GPIOMUX_PULL_DOWN,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting sx150x_suspended_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_NONE,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting sx150x_active_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_NONE,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_MSM_HSIC
|
||||
static struct gpiomux_setting cyts_sleep_sus_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_6MA,
|
||||
@@ -434,18 +423,17 @@ static struct msm_gpiomux_config cyts_gpio_configs[] __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_MSM_HSIC
|
||||
static struct gpiomux_setting hsic_act_cfg = {
|
||||
.func = GPIOMUX_FUNC_1,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_NONE,
|
||||
.func = GPIOMUX_FUNC_1,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_NONE,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting hsic_sus_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_2MA,
|
||||
.pull = GPIOMUX_PULL_DOWN,
|
||||
.dir = GPIOMUX_OUT_LOW,
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_2MA,
|
||||
.pull = GPIOMUX_PULL_DOWN,
|
||||
.dir = GPIOMUX_OUT_LOW,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting hsic_wakeup_act_cfg = {
|
||||
@@ -487,30 +475,6 @@ static struct msm_gpiomux_config apq8064_hsic_configs[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct gpiomux_setting mxt_reset_sus_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_6MA,
|
||||
.pull = GPIOMUX_PULL_DOWN,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting mxt_reset_act_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_6MA,
|
||||
.pull = GPIOMUX_PULL_UP,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting mxt_int_sus_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_2MA,
|
||||
.pull = GPIOMUX_PULL_DOWN,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting mxt_int_act_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_UP,
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config apq8064_hdmi_configs[] __initdata = {
|
||||
{
|
||||
.gpio = 69,
|
||||
@@ -616,39 +580,6 @@ static struct msm_gpiomux_config apq8064_slimbus_config[] __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiomux_setting spkr_i2c = {
|
||||
.func = GPIOMUX_FUNC_1,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_KEEPER,
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config mpq8064_spkr_i2s_config[] __initdata = {
|
||||
{
|
||||
.gpio = 47, /* spkr i2c sck */
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &spkr_i2c,
|
||||
},
|
||||
},
|
||||
{
|
||||
.gpio = 48, /* spkr_i2s_ws */
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &spkr_i2c,
|
||||
},
|
||||
},
|
||||
{
|
||||
.gpio = 49, /* spkr_i2s_dout */
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &spkr_i2c,
|
||||
},
|
||||
},
|
||||
{
|
||||
.gpio = 50, /* spkr_i2s_mclk */
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &spkr_i2c,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config apq8064_audio_codec_configs[] __initdata = {
|
||||
{
|
||||
.gpio = 38,
|
||||
@@ -739,87 +670,6 @@ static struct msm_gpiomux_config mdm_configs[] __initdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiomux_setting mi2s_act_cfg = {
|
||||
.func = GPIOMUX_FUNC_1,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_NONE,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting mi2s_sus_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_2MA,
|
||||
.pull = GPIOMUX_PULL_DOWN,
|
||||
};
|
||||
static struct msm_gpiomux_config mpq8064_mi2s_configs[] __initdata = {
|
||||
{
|
||||
.gpio = 27, /* mi2s ws */
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mi2s_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mi2s_sus_cfg,
|
||||
},
|
||||
},
|
||||
{
|
||||
.gpio = 28, /* mi2s sclk */
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mi2s_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mi2s_sus_cfg,
|
||||
},
|
||||
},
|
||||
{
|
||||
.gpio = 29, /* mi2s dout3 */
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mi2s_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mi2s_sus_cfg,
|
||||
},
|
||||
},
|
||||
{
|
||||
.gpio = 30, /* mi2s dout2 */
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mi2s_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mi2s_sus_cfg,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
.gpio = 31, /* mi2s dout1 */
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mi2s_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mi2s_sus_cfg,
|
||||
},
|
||||
},
|
||||
{
|
||||
.gpio = 32, /* mi2s dout0 */
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mi2s_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mi2s_sus_cfg,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
.gpio = 33, /* mi2s mclk */
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mi2s_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mi2s_sus_cfg,
|
||||
},
|
||||
},
|
||||
};
|
||||
static struct msm_gpiomux_config apq8064_mxt_configs[] __initdata = {
|
||||
{ /* TS INTERRUPT */
|
||||
.gpio = 6,
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mxt_int_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mxt_int_sus_cfg,
|
||||
},
|
||||
},
|
||||
{ /* TS RESET */
|
||||
.gpio = 33,
|
||||
.settings = {
|
||||
[GPIOMUX_ACTIVE] = &mxt_reset_act_cfg,
|
||||
[GPIOMUX_SUSPENDED] = &mxt_reset_sus_cfg,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config wcnss_5wire_interface[] = {
|
||||
{
|
||||
.gpio = 64,
|
||||
@@ -858,38 +708,6 @@ static struct msm_gpiomux_config wcnss_5wire_interface[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpiomux_setting ir_suspended_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_2MA,
|
||||
.pull = GPIOMUX_PULL_UP,
|
||||
};
|
||||
|
||||
static struct gpiomux_setting ir_active_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
.drv = GPIOMUX_DRV_8MA,
|
||||
.pull = GPIOMUX_PULL_UP,
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config mpq8064_ir_configs[] __initdata = {
|
||||
{
|
||||
.gpio = 88, /* GPIO IR */
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &ir_suspended_cfg,
|
||||
[GPIOMUX_ACTIVE] = &ir_active_cfg,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct msm_gpiomux_config sx150x_int_configs[] __initdata = {
|
||||
{
|
||||
.gpio = 81,
|
||||
.settings = {
|
||||
[GPIOMUX_SUSPENDED] = &sx150x_suspended_cfg,
|
||||
[GPIOMUX_ACTIVE] = &sx150x_active_cfg,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
#if defined(CONFIG_LGE_NFC_PN544)
|
||||
static struct gpiomux_setting nfc_pn544_ven_cfg = {
|
||||
.func = GPIOMUX_FUNC_GPIO,
|
||||
@@ -947,19 +765,8 @@ void __init apq8064_init_gpiomux(void)
|
||||
msm_gpiomux_install(wcnss_5wire_interface,
|
||||
ARRAY_SIZE(wcnss_5wire_interface));
|
||||
|
||||
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
|
||||
machine_is_mpq8064_dtv()) {
|
||||
|
||||
#ifdef CONFIG_MSM_VCAP
|
||||
msm_gpiomux_install(vcap_configs,
|
||||
ARRAY_SIZE(vcap_configs));
|
||||
#endif
|
||||
msm_gpiomux_install(sx150x_int_configs,
|
||||
ARRAY_SIZE(sx150x_int_configs));
|
||||
} else {
|
||||
msm_gpiomux_install(apq8064_gsbi_configs,
|
||||
ARRAY_SIZE(apq8064_gsbi_configs));
|
||||
}
|
||||
msm_gpiomux_install(apq8064_gsbi_configs,
|
||||
ARRAY_SIZE(apq8064_gsbi_configs));
|
||||
|
||||
msm_gpiomux_install(apq8064_slimbus_config,
|
||||
ARRAY_SIZE(apq8064_slimbus_config));
|
||||
@@ -967,31 +774,20 @@ void __init apq8064_init_gpiomux(void)
|
||||
msm_gpiomux_install(apq8064_audio_codec_configs,
|
||||
ARRAY_SIZE(apq8064_audio_codec_configs));
|
||||
|
||||
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
|
||||
machine_is_mpq8064_dtv()) {
|
||||
msm_gpiomux_install(mpq8064_spkr_i2s_config,
|
||||
ARRAY_SIZE(mpq8064_spkr_i2s_config));
|
||||
}
|
||||
|
||||
pr_debug("%s(): audio-auxpcm: Include GPIO configs"
|
||||
" as audio is not the primary user"
|
||||
" for these GPIO Pins\n", __func__);
|
||||
|
||||
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
|
||||
machine_is_mpq8064_dtv())
|
||||
msm_gpiomux_install(mpq8064_mi2s_configs,
|
||||
ARRAY_SIZE(mpq8064_mi2s_configs));
|
||||
|
||||
if (machine_is_apq8064_mtp() || machine_is_apq8064_mako())
|
||||
if (machine_is_apq8064_mako())
|
||||
msm_gpiomux_install(mdm_configs,
|
||||
ARRAY_SIZE(mdm_configs));
|
||||
|
||||
if (machine_is_apq8064_mtp() || machine_is_apq8064_mako())
|
||||
#ifdef CONFIG_USB_EHCI_MSM_HSIC
|
||||
if (machine_is_apq8064_mako())
|
||||
msm_gpiomux_install(cyts_gpio_configs,
|
||||
ARRAY_SIZE(cyts_gpio_configs));
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_MSM_HSIC
|
||||
if (machine_is_apq8064_mtp() || machine_is_apq8064_mako())
|
||||
if (machine_is_apq8064_mako())
|
||||
msm_gpiomux_install(apq8064_hsic_configs,
|
||||
ARRAY_SIZE(apq8064_hsic_configs));
|
||||
#endif
|
||||
@@ -1000,14 +796,6 @@ void __init apq8064_init_gpiomux(void)
|
||||
ARRAY_SIZE(apq8064_nfc_configs));
|
||||
#endif
|
||||
|
||||
if (machine_is_apq8064_cdp() || machine_is_apq8064_liquid())
|
||||
msm_gpiomux_install(apq8064_mxt_configs,
|
||||
ARRAY_SIZE(apq8064_mxt_configs));
|
||||
|
||||
msm_gpiomux_install(apq8064_hdmi_configs,
|
||||
ARRAY_SIZE(apq8064_hdmi_configs));
|
||||
|
||||
if (machine_is_mpq8064_cdp())
|
||||
msm_gpiomux_install(mpq8064_ir_configs,
|
||||
ARRAY_SIZE(mpq8064_ir_configs));
|
||||
}
|
||||
|
||||
@@ -20,17 +20,10 @@
|
||||
#include "devices.h"
|
||||
|
||||
#include "board-mako.h"
|
||||
#include "board-8064.h"
|
||||
|
||||
#if defined(CONFIG_LGE_NFC_PN544)
|
||||
#include <linux/nfc/pn544_lge.h>
|
||||
|
||||
#define I2C_SURF 1
|
||||
#define I2C_FFA (1 << 1)
|
||||
#define I2C_RUMI (1 << 2)
|
||||
#define I2C_SIM (1 << 3)
|
||||
#define I2C_LIQUID (1 << 4)
|
||||
|
||||
struct i2c_registry {
|
||||
u8 machs;
|
||||
int bus;
|
||||
@@ -57,7 +50,7 @@ static struct i2c_board_info msm_i2c_nxp_nfc_info[] = {
|
||||
};
|
||||
|
||||
static struct i2c_registry apq8064_i2c_devices __initdata = {
|
||||
I2C_SURF | I2C_FFA | I2C_RUMI | I2C_SIM | I2C_LIQUID,
|
||||
I2C_FFA,
|
||||
APQ_8064_GSBI1_QUP_I2C_BUS_ID,
|
||||
msm_i2c_nxp_nfc_info,
|
||||
ARRAY_SIZE(msm_i2c_nxp_nfc_info),
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <linux/platform_data/hds_fsa8008.h>
|
||||
#include "devices.h"
|
||||
|
||||
#include "board-8064.h"
|
||||
|
||||
#ifdef CONFIG_SND_SOC_TPA2028D
|
||||
#include <sound/tpa2028d.h>
|
||||
#endif
|
||||
@@ -41,13 +39,6 @@
|
||||
#define GPIO_EARPOL_DETECT PM8921_GPIO_PM_TO_SYS(32)
|
||||
#define GPIO_EAR_KEY_INT 83
|
||||
|
||||
|
||||
#define I2C_SURF 1
|
||||
#define I2C_FFA (1 << 1)
|
||||
#define I2C_RUMI (1 << 2)
|
||||
#define I2C_SIM (1 << 3)
|
||||
#define I2C_LIQUID (1 << 4)
|
||||
|
||||
struct i2c_registry {
|
||||
u8 machs;
|
||||
int bus;
|
||||
@@ -123,16 +114,14 @@ static struct i2c_board_info msm_i2c_audiosubsystem_info[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
static struct i2c_registry msm_i2c_audiosubsystem __initdata = {
|
||||
/* Add the I2C driver for Audio Amp */
|
||||
I2C_SURF | I2C_FFA | I2C_RUMI | I2C_SIM | I2C_LIQUID,
|
||||
I2C_FFA,
|
||||
APQ_8064_GSBI1_QUP_I2C_BUS_ID,
|
||||
msm_i2c_audiosubsystem_info,
|
||||
ARRAY_SIZE(msm_i2c_audiosubsystem_info),
|
||||
};
|
||||
|
||||
|
||||
static void __init lge_add_i2c_tpa2028d_devices(void)
|
||||
{
|
||||
/* Run the array and install devices as appropriate */
|
||||
@@ -141,7 +130,6 @@ static void __init lge_add_i2c_tpa2028d_devices(void)
|
||||
msm_i2c_audiosubsystem.len);
|
||||
}
|
||||
|
||||
|
||||
void enable_external_mic_bias(int status)
|
||||
{
|
||||
gpio_set_value_cansleep(GPIO_EAR_MIC_BIAS_EN, status);
|
||||
|
||||
@@ -253,36 +253,12 @@ static struct mmc_platform_data *apq8064_sdc3_pdata;
|
||||
|
||||
void __init apq8064_init_mmc(void)
|
||||
{
|
||||
if ((machine_is_apq8064_rumi3()) || machine_is_apq8064_sim()) {
|
||||
if (apq8064_sdc1_pdata) {
|
||||
if (machine_is_apq8064_sim())
|
||||
apq8064_sdc1_pdata->disable_bam = true;
|
||||
apq8064_sdc1_pdata->disable_runtime_pm = true;
|
||||
apq8064_sdc1_pdata->disable_cmd23 = true;
|
||||
}
|
||||
if (apq8064_sdc3_pdata) {
|
||||
if (machine_is_apq8064_sim())
|
||||
apq8064_sdc3_pdata->disable_bam = true;
|
||||
apq8064_sdc3_pdata->disable_runtime_pm = true;
|
||||
apq8064_sdc3_pdata->disable_cmd23 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (apq8064_sdc1_pdata)
|
||||
apq8064_add_sdcc(1, apq8064_sdc1_pdata);
|
||||
|
||||
if (apq8064_sdc3_pdata) {
|
||||
if (!machine_is_apq8064_cdp()) {
|
||||
apq8064_sdc3_pdata->wpswitch_gpio = 0;
|
||||
apq8064_sdc3_pdata->is_wpswitch_active_low = false;
|
||||
}
|
||||
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
|
||||
machine_is_mpq8064_dtv()) {
|
||||
apq8064_sdc3_pdata->status_gpio =
|
||||
PM8921_GPIO_PM_TO_SYS(31);
|
||||
apq8064_sdc3_pdata->status_irq =
|
||||
PM8921_GPIO_IRQ(PM8921_IRQ_BASE, 31);
|
||||
}
|
||||
apq8064_sdc3_pdata->wpswitch_gpio = 0;
|
||||
apq8064_sdc3_pdata->is_wpswitch_active_low = false;
|
||||
apq8064_add_sdcc(3, apq8064_sdc3_pdata);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/i2c.h>
|
||||
@@ -53,7 +54,6 @@
|
||||
#include <mach/msm_spi.h>
|
||||
#include "timer.h"
|
||||
#include "devices.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/gpiomux.h>
|
||||
#include <mach/rpm.h>
|
||||
#ifdef CONFIG_ANDROID_PMEM
|
||||
@@ -79,7 +79,6 @@
|
||||
#include <media/gpio-ir-recv.h>
|
||||
#endif
|
||||
#include <linux/fmem.h>
|
||||
#include <mach/msm_pcie.h>
|
||||
#include <mach/restart.h>
|
||||
#include <mach/board_lge.h>
|
||||
|
||||
@@ -884,32 +883,12 @@ static struct msm_otg_platform_data msm_otg_pdata = {
|
||||
.phy_init_seq = phy_init_seq,
|
||||
};
|
||||
|
||||
static struct msm_usb_host_platform_data msm_ehci_host_pdata3 = {
|
||||
.power_budget = 500,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_MSM_HOST4
|
||||
static struct msm_usb_host_platform_data msm_ehci_host_pdata4;
|
||||
#endif
|
||||
|
||||
static void __init apq8064_ehci_host_init(void)
|
||||
{
|
||||
if (machine_is_apq8064_liquid() || machine_is_mpq8064_cdp() ||
|
||||
machine_is_mpq8064_hrd() || machine_is_mpq8064_dtv()) {
|
||||
if (machine_is_apq8064_liquid())
|
||||
msm_ehci_host_pdata3.dock_connect_irq =
|
||||
PM8921_MPP_IRQ(PM8921_IRQ_BASE, 9);
|
||||
|
||||
apq8064_device_ehci_host3.dev.platform_data =
|
||||
&msm_ehci_host_pdata3;
|
||||
platform_device_register(&apq8064_device_ehci_host3);
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_MSM_HOST4
|
||||
apq8064_device_ehci_host4.dev.platform_data =
|
||||
&msm_ehci_host_pdata4;
|
||||
platform_device_register(&apq8064_device_ehci_host4);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_SMB349_CHARGER
|
||||
static struct smb349_platform_data smb349_data __initdata = {
|
||||
@@ -1739,22 +1718,6 @@ static void __init apq8064_init_buses(void)
|
||||
msm_bus_8064_cpss_fpb.dev.platform_data = &msm_bus_8064_cpss_fpb_pdata;
|
||||
}
|
||||
|
||||
/* PCIe gpios */
|
||||
static struct msm_pcie_gpio_info_t msm_pcie_gpio_info[MSM_PCIE_MAX_GPIO] = {
|
||||
{"rst_n", PM8921_MPP_PM_TO_SYS(PCIE_RST_N_PMIC_MPP), 0},
|
||||
{"pwr_en", PM8921_GPIO_PM_TO_SYS(PCIE_PWR_EN_PMIC_GPIO), 1},
|
||||
};
|
||||
|
||||
static struct msm_pcie_platform msm_pcie_platform_data = {
|
||||
.gpio = msm_pcie_gpio_info,
|
||||
};
|
||||
|
||||
static void __init mpq8064_pcie_init(void)
|
||||
{
|
||||
msm_device_pcie.dev.platform_data = &msm_pcie_platform_data;
|
||||
platform_device_register(&msm_device_pcie);
|
||||
}
|
||||
|
||||
static struct platform_device apq8064_device_rpm_regulator __devinitdata = {
|
||||
.name = "rpm-regulator",
|
||||
.id = -1,
|
||||
@@ -1762,6 +1725,7 @@ static struct platform_device apq8064_device_rpm_regulator __devinitdata = {
|
||||
.platform_data = &apq8064_rpm_regulator_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IR_GPIO_CIR
|
||||
static struct gpio_ir_recv_platform_data gpio_ir_recv_pdata = {
|
||||
.gpio_nr = 88,
|
||||
@@ -1775,11 +1739,9 @@ static struct platform_device gpio_ir_recv_pdev = {
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct platform_device *common_not_mpq_devices[] __initdata = {
|
||||
&apq8064_device_qup_i2c_gsbi1,
|
||||
#if !defined(CONFIG_MSM_DSPS)
|
||||
&apq8064_device_qup_i2c_gsbi2,
|
||||
#endif
|
||||
&apq8064_device_qup_i2c_gsbi3,
|
||||
&apq8064_device_qup_i2c_gsbi4,
|
||||
};
|
||||
@@ -1867,7 +1829,7 @@ static struct platform_device *common_devices[] __initdata = {
|
||||
&apq8064_rpm_log_device,
|
||||
&apq8064_rpm_stat_device,
|
||||
#ifdef CONFIG_MSM_TZ_LOG
|
||||
&msm_device_tz_log,
|
||||
&apq_device_tz_log,
|
||||
#endif
|
||||
&msm_bus_8064_apps_fabric,
|
||||
&msm_bus_8064_sys_fabric,
|
||||
@@ -1911,56 +1873,6 @@ static struct platform_device *cdp_devices[] __initdata = {
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device
|
||||
mpq8064_device_ext_1p2_buck_vreg __devinitdata = {
|
||||
.name = GPIO_REGULATOR_DEV_NAME,
|
||||
.id = SX150X_GPIO(4, 2),
|
||||
.dev = {
|
||||
.platform_data =
|
||||
&mpq8064_gpio_regulator_pdata[GPIO_VREG_ID_AVC_1P2V],
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device
|
||||
mpq8064_device_ext_1p8_buck_vreg __devinitdata = {
|
||||
.name = GPIO_REGULATOR_DEV_NAME,
|
||||
.id = SX150X_GPIO(4, 4),
|
||||
.dev = {
|
||||
.platform_data =
|
||||
&mpq8064_gpio_regulator_pdata[GPIO_VREG_ID_AVC_1P8V],
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device
|
||||
mpq8064_device_ext_2p2_buck_vreg __devinitdata = {
|
||||
.name = GPIO_REGULATOR_DEV_NAME,
|
||||
.id = SX150X_GPIO(4, 14),
|
||||
.dev = {
|
||||
.platform_data =
|
||||
&mpq8064_gpio_regulator_pdata[GPIO_VREG_ID_AVC_2P2V],
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device
|
||||
mpq8064_device_ext_5v_buck_vreg __devinitdata = {
|
||||
.name = GPIO_REGULATOR_DEV_NAME,
|
||||
.id = SX150X_GPIO(4, 3),
|
||||
.dev = {
|
||||
.platform_data =
|
||||
&mpq8064_gpio_regulator_pdata[GPIO_VREG_ID_AVC_5V],
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device
|
||||
mpq8064_device_ext_3p3v_ldo_vreg __devinitdata = {
|
||||
.name = GPIO_REGULATOR_DEV_NAME,
|
||||
.id = SX150X_GPIO(4, 15),
|
||||
.dev = {
|
||||
.platform_data =
|
||||
&mpq8064_gpio_regulator_pdata[GPIO_VREG_ID_AVC_3P3V],
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_USER_RC_INPUT
|
||||
static struct platform_device rc_input_loopback_pdev = {
|
||||
.name = "rc-user-input",
|
||||
@@ -1968,54 +1880,6 @@ static struct platform_device rc_input_loopback_pdev = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static int rf4ce_gpio_init(void)
|
||||
{
|
||||
if (!machine_is_mpq8064_cdp())
|
||||
return -EINVAL;
|
||||
|
||||
/* CC2533 SRDY Input */
|
||||
if (!gpio_request(SX150X_GPIO(4, 6), "rf4ce_srdy")) {
|
||||
gpio_direction_input(SX150X_GPIO(4, 6));
|
||||
gpio_export(SX150X_GPIO(4, 6), true);
|
||||
}
|
||||
|
||||
/* CC2533 MRDY Output */
|
||||
if (!gpio_request(SX150X_GPIO(4, 5), "rf4ce_mrdy")) {
|
||||
gpio_direction_output(SX150X_GPIO(4, 5), 1);
|
||||
gpio_export(SX150X_GPIO(4, 5), true);
|
||||
}
|
||||
|
||||
/* CC2533 Reset Output */
|
||||
if (!gpio_request(SX150X_GPIO(4, 7), "rf4ce_reset")) {
|
||||
gpio_direction_output(SX150X_GPIO(4, 7), 0);
|
||||
gpio_export(SX150X_GPIO(4, 7), true);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
late_initcall(rf4ce_gpio_init);
|
||||
|
||||
static struct platform_device *mpq_devices[] __initdata = {
|
||||
&msm_device_sps_apq8064,
|
||||
#ifdef CONFIG_MSM_ROTATOR
|
||||
&msm_rotator_device,
|
||||
#endif
|
||||
#ifdef CONFIG_IR_GPIO_CIR
|
||||
&gpio_ir_recv_pdev,
|
||||
#endif
|
||||
&mpq8064_device_ext_1p2_buck_vreg,
|
||||
&mpq8064_device_ext_1p8_buck_vreg,
|
||||
&mpq8064_device_ext_2p2_buck_vreg,
|
||||
&mpq8064_device_ext_5v_buck_vreg,
|
||||
&mpq8064_device_ext_3p3v_ldo_vreg,
|
||||
#ifdef CONFIG_MSM_VCAP
|
||||
&msm8064_device_vcap,
|
||||
#endif
|
||||
#ifdef CONFIG_USER_RC_INPUT
|
||||
&rc_input_loopback_pdev,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct platform_device *uart_devices[] __initdata = {
|
||||
&apq8064_device_uart_gsbi4,
|
||||
};
|
||||
@@ -2044,12 +1908,6 @@ static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi1_pdata = {
|
||||
.clk_freq = 400000,
|
||||
.src_clk_rate = 24000000,
|
||||
};
|
||||
#if !defined(CONFIG_MSM_DSPS)
|
||||
static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi2_pdata = {
|
||||
.clk_freq = 100000,
|
||||
.src_clk_rate = 24000000,
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi3_pdata = {
|
||||
.clk_freq = 384000,
|
||||
@@ -2065,10 +1923,6 @@ static void __init apq8064_i2c_init(void)
|
||||
{
|
||||
void __iomem *gsbi_mem;
|
||||
|
||||
#if !defined(CONFIG_MSM_DSPS)
|
||||
apq8064_device_qup_i2c_gsbi2.dev.platform_data =
|
||||
&apq8064_i2c_qup_gsbi2_pdata;
|
||||
#endif
|
||||
apq8064_device_qup_i2c_gsbi1.dev.platform_data =
|
||||
&apq8064_i2c_qup_gsbi1_pdata;
|
||||
|
||||
@@ -2097,11 +1951,6 @@ static void __init apq8064_i2c_init(void)
|
||||
iounmap(gsbi_mem);
|
||||
}
|
||||
|
||||
static int ethernet_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Sensors DSPS platform data */
|
||||
#define DSPS_PIL_GENERIC_NAME "dsps"
|
||||
static void __init apq8064_init_dsps(void)
|
||||
@@ -2115,15 +1964,6 @@ static void __init apq8064_init_dsps(void)
|
||||
platform_device_register(&msm_dsps_device_8064);
|
||||
}
|
||||
|
||||
#define I2C_SURF 1
|
||||
#define I2C_FFA (1 << 1)
|
||||
#define I2C_RUMI (1 << 2)
|
||||
#define I2C_SIM (1 << 3)
|
||||
#define I2C_LIQUID (1 << 4)
|
||||
#define I2C_MPQ_CDP BIT(5)
|
||||
#define I2C_MPQ_HRD BIT(6)
|
||||
#define I2C_MPQ_DTV BIT(7)
|
||||
|
||||
struct i2c_registry {
|
||||
u8 machs;
|
||||
int bus;
|
||||
@@ -2222,7 +2062,8 @@ static struct i2c_registry mpq8064_i2c_devices[] __initdata = {
|
||||
sx150x_gpio_exp_info,
|
||||
ARRAY_SIZE(sx150x_gpio_exp_info),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
static void __init register_i2c_devices(void)
|
||||
{
|
||||
u8 mach_mask = 0;
|
||||
@@ -2230,14 +2071,14 @@ static void __init register_i2c_devices(void)
|
||||
|
||||
#ifdef CONFIG_MSM_CAMERA
|
||||
struct i2c_registry apq8064_camera_i2c_devices = {
|
||||
I2C_SURF | I2C_FFA | I2C_RUMI | I2C_SIM | I2C_LIQUID,
|
||||
I2C_FFA,
|
||||
APQ_8064_GSBI4_QUP_I2C_BUS_ID,
|
||||
apq8064_camera_board_info.board_info,
|
||||
apq8064_camera_board_info.num_i2c_board_info,
|
||||
};
|
||||
/* Enabling flash LED for camera */
|
||||
struct i2c_registry apq8064_lge_camera_i2c_devices = {
|
||||
I2C_SURF | I2C_FFA | I2C_RUMI | I2C_SIM | I2C_LIQUID,
|
||||
I2C_FFA,
|
||||
APQ_8064_GSBI1_QUP_I2C_BUS_ID,
|
||||
apq8064_lge_camera_board_info.board_info,
|
||||
apq8064_lge_camera_board_info.num_i2c_board_info,
|
||||
@@ -2245,19 +2086,7 @@ static void __init register_i2c_devices(void)
|
||||
#endif
|
||||
|
||||
/* Build the matching 'supported_machs' bitmask */
|
||||
if (machine_is_apq8064_cdp())
|
||||
mach_mask = I2C_SURF;
|
||||
else if (machine_is_apq8064_mtp())
|
||||
mach_mask = I2C_FFA;
|
||||
else if (machine_is_apq8064_liquid())
|
||||
mach_mask = I2C_LIQUID;
|
||||
else if (machine_is_apq8064_rumi3())
|
||||
mach_mask = I2C_RUMI;
|
||||
else if (machine_is_apq8064_sim())
|
||||
mach_mask = I2C_SIM;
|
||||
else if (PLATFORM_IS_MPQ8064())
|
||||
mach_mask = I2C_MPQ_CDP;
|
||||
else if (machine_is_apq8064_mako())
|
||||
if (machine_is_apq8064_mako())
|
||||
mach_mask = I2C_FFA;
|
||||
else
|
||||
pr_err("unmatched machine ID in register_i2c_devices\n");
|
||||
@@ -2291,18 +2120,6 @@ static void __init register_i2c_devices(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void enable_avc_i2c_bus(void)
|
||||
{
|
||||
int avc_i2c_en_mpp = PM8921_MPP_PM_TO_SYS(8);
|
||||
int rc;
|
||||
|
||||
rc = gpio_request(avc_i2c_en_mpp, "avc_i2c_en");
|
||||
if (rc)
|
||||
pr_err("request for avc_i2c_en mpp failed, rc=%d\n", rc);
|
||||
else
|
||||
gpio_set_value_cansleep(avc_i2c_en_mpp, 1);
|
||||
}
|
||||
|
||||
static void __init apq8064_common_init(void)
|
||||
{
|
||||
msm_tsens_early_init(&apq_tsens_pdata);
|
||||
@@ -2319,14 +2136,7 @@ static void __init apq8064_common_init(void)
|
||||
apq8064_init_gpiomux();
|
||||
apq8064_i2c_init();
|
||||
register_i2c_devices();
|
||||
register_i2c_backlight_devices();
|
||||
lge_add_sound_devices();
|
||||
#if defined(CONFIG_LGE_NFC_PN544)
|
||||
lge_add_nfc_devices();
|
||||
#endif
|
||||
apq8064_init_pmic();
|
||||
if (machine_is_apq8064_liquid())
|
||||
msm_otg_pdata.mhl_enable = true;
|
||||
|
||||
android_usb_pdata.swfi_latency =
|
||||
msm_rpmrs_levels[0].latency_us;
|
||||
@@ -2335,18 +2145,16 @@ static void __init apq8064_common_init(void)
|
||||
apq8064_ehci_host_init();
|
||||
apq8064_init_buses();
|
||||
platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
|
||||
if (!(machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
|
||||
machine_is_mpq8064_dtv()))
|
||||
platform_add_devices(common_not_mpq_devices,
|
||||
platform_add_devices(common_not_mpq_devices,
|
||||
ARRAY_SIZE(common_not_mpq_devices));
|
||||
if (machine_is_apq8064_mtp() || machine_is_apq8064_mako()) {
|
||||
if (machine_is_apq8064_mako()) {
|
||||
apq8064_device_hsic_host.dev.platform_data = &msm_hsic_pdata;
|
||||
device_initialize(&apq8064_device_hsic_host.dev);
|
||||
}
|
||||
apq8064_pm8xxx_gpio_mpp_init();
|
||||
apq8064_init_mmc();
|
||||
|
||||
if (machine_is_apq8064_mtp() || machine_is_apq8064_mako()) {
|
||||
if (machine_is_apq8064_mako()) {
|
||||
mdm_8064_device.dev.platform_data = &mdm_platform_data;
|
||||
platform_device_register(&mdm_8064_device);
|
||||
}
|
||||
@@ -2356,20 +2164,8 @@ static void __init apq8064_common_init(void)
|
||||
apq8064_init_dsps();
|
||||
msm_spm_init(msm_spm_data, ARRAY_SIZE(msm_spm_data));
|
||||
msm_spm_l2_init(msm_spm_l2_data);
|
||||
msm_pm_init_sleep_status_data(&msm_pm_slp_sts_data);
|
||||
/**/
|
||||
#ifdef CONFIG_ANDROID_RAM_CONSOLE
|
||||
lge_add_ramconsole_devices();
|
||||
#endif
|
||||
#ifdef CONFIG_LGE_HANDLE_PANIC
|
||||
lge_add_panic_handler_devices();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LGE_QFPROM_INTERFACE
|
||||
lge_add_qfprom_devices();
|
||||
#endif
|
||||
|
||||
BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
|
||||
msm_pm_init_sleep_status_data(&msm_pm_slp_sts_data);
|
||||
#ifdef CONFIG_SENSORS_EPM_ADC
|
||||
apq8064_epm_adc_init();
|
||||
#endif
|
||||
@@ -2416,22 +2212,28 @@ out:
|
||||
}
|
||||
#endif
|
||||
|
||||
static void __init apq8064_cdp_init(void)
|
||||
static void __init apq8064_mako_init(void)
|
||||
{
|
||||
if (meminfo_init(SYS_MEMORY, SZ_256M) < 0)
|
||||
pr_err("meminfo_init() failed!\n");
|
||||
apq8064_common_init();
|
||||
if (machine_is_mpq8064_cdp() || machine_is_mpq8064_hrd() ||
|
||||
machine_is_mpq8064_dtv()) {
|
||||
enable_avc_i2c_bus();
|
||||
platform_add_devices(mpq_devices, ARRAY_SIZE(mpq_devices));
|
||||
mpq8064_pcie_init();
|
||||
} else {
|
||||
ethernet_init();
|
||||
platform_add_devices(cdp_devices, ARRAY_SIZE(cdp_devices));
|
||||
spi_register_board_info(spi_board_info,
|
||||
ARRAY_SIZE(spi_board_info));
|
||||
}
|
||||
lge_add_backlight_devices();
|
||||
lge_add_sound_devices();
|
||||
#if defined(CONFIG_LGE_NFC_PN544)
|
||||
lge_add_nfc_devices();
|
||||
#endif
|
||||
#ifdef CONFIG_ANDROID_RAM_CONSOLE
|
||||
lge_add_ramconsole_devices();
|
||||
#endif
|
||||
#ifdef CONFIG_LGE_CRASH_HANDLER
|
||||
lge_add_panic_handler_devices();
|
||||
#endif
|
||||
#ifdef CONFIG_LGE_QFPROM_INTERFACE
|
||||
lge_add_qfprom_devices();
|
||||
#endif
|
||||
platform_add_devices(cdp_devices, ARRAY_SIZE(cdp_devices));
|
||||
spi_register_board_info(spi_board_info,
|
||||
ARRAY_SIZE(spi_board_info));
|
||||
|
||||
if (lge_get_uart_mode()) {
|
||||
#ifdef CONFIG_EARJACK_DEBUGGER
|
||||
@@ -2448,7 +2250,6 @@ static void __init apq8064_cdp_init(void)
|
||||
#ifdef CONFIG_MSM_CAMERA
|
||||
apq8064_init_cam();
|
||||
#endif
|
||||
|
||||
change_memory_power = &apq8064_change_memory_power;
|
||||
|
||||
apq8064_init_input();
|
||||
@@ -2461,7 +2262,7 @@ MACHINE_START(APQ8064_MAKO, "QCT APQ8064 MAKO")
|
||||
.init_irq = apq8064_init_irq,
|
||||
.handle_irq = gic_handle_irq,
|
||||
.timer = &msm_timer,
|
||||
.init_machine = apq8064_cdp_init,
|
||||
.init_machine = apq8064_mako_init,
|
||||
.init_early = apq8064_allocate_memory_regions,
|
||||
.init_very_early = apq8064_early_reserve,
|
||||
.restart = msm_restart,
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_MACH_MSM_BOARD_APQ8064_H
|
||||
#define __ARCH_ARM_MACH_MSM_BOARD_APQ8064_H
|
||||
#ifndef __ARCH_ARM_MACH_MSM_BOARD_APQ8064_MAKO_H
|
||||
#define __ARCH_ARM_MACH_MSM_BOARD_APQ8064_MAKO_H
|
||||
|
||||
#include <linux/regulator/msm-gpio-regulator.h>
|
||||
#include <linux/mfd/pm8xxx/pm8921.h>
|
||||
@@ -71,8 +71,8 @@ extern struct regulator_init_data msm8064_saw_regulator_pdata_8821_s1;
|
||||
struct mmc_platform_data;
|
||||
int __init apq8064_add_sdcc(unsigned int controller,
|
||||
struct mmc_platform_data *plat);
|
||||
extern void __init register_i2c_backlight_devices(void);
|
||||
extern void __init lge_add_sound_devices(void);
|
||||
extern void __init lge_add_backlight_devices(void);
|
||||
void apq8064_init_mmc(void);
|
||||
void apq8064_init_gpiomux(void);
|
||||
void apq8064_init_pmic(void);
|
||||
@@ -92,14 +92,8 @@ void apq8064_init_cam(void);
|
||||
/* Camera GPIO Settings */
|
||||
#define GPIO_CAM_MCLK0 (5)
|
||||
|
||||
/* FIXME: for old HW (LGU Rev.A,B VZW Rev.A,B ATT Rev.A) */
|
||||
#if 1
|
||||
#define GPIO_CAM_MCLK2 (2)
|
||||
#define GPIO_CAM_FLASH_EN (7)
|
||||
#else
|
||||
#define GPIO_CAM_MCLK1 (4)
|
||||
#define GPIO_CAM_FLASH_EN (2)
|
||||
#endif
|
||||
|
||||
#define GPIO_CAM_I2C_SDA (12)
|
||||
#define GPIO_CAM_I2C_SCL (13)
|
||||
@@ -124,13 +118,6 @@ void __init apq8064_set_display_params(char *prim_panel, char *ext_panel);
|
||||
void apq8064_init_gpu(void);
|
||||
void apq8064_pm8xxx_gpio_mpp_init(void);
|
||||
|
||||
#define PLATFORM_IS_MPQ8064() \
|
||||
(machine_is_mpq8064_hrd() || \
|
||||
machine_is_mpq8064_dtv() || \
|
||||
machine_is_mpq8064_cdp() \
|
||||
)
|
||||
|
||||
|
||||
#define GPIO_EXPANDER_IRQ_BASE (TABLA_INTERRUPT_BASE + \
|
||||
NR_TABLA_IRQS)
|
||||
#define GPIO_EXPANDER_GPIO_BASE (PM8821_MPP_BASE + PM8821_NR_MPPS)
|
||||
@@ -179,4 +166,14 @@ extern struct msm_cache_dump_platform_data apq8064_cache_dump_pdata;
|
||||
|
||||
void apq8064_init_input(void);
|
||||
void __init apq8064_init_misc(void);
|
||||
|
||||
#define I2C_SURF 1
|
||||
#define I2C_FFA (1 << 1)
|
||||
#define I2C_RUMI (1 << 2)
|
||||
#define I2C_SIM (1 << 3)
|
||||
#define I2C_LIQUID (1 << 4)
|
||||
#define I2C_MPQ_CDP BIT(5)
|
||||
#define I2C_MPQ_HRD BIT(6)
|
||||
#define I2C_MPQ_DTV BIT(7)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user