Skip to content

Commit

Permalink
platform/target: msm8916: Add support for new chip ID.
Browse files Browse the repository at this point in the history
Add baseband detect support,timer IRQ support,clock
support and display support for MSM8x29 targets.

Change-Id: Ib09e35a3183a92e0f9b2a81b18f113ef506d76b8
  • Loading branch information
vijay kumar committed Jan 13, 2015
1 parent b9e73b5 commit dd6869c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
4 changes: 2 additions & 2 deletions platform/msm8916/acpuclock.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -205,7 +205,7 @@ void mdp_clock_enable(void)
ASSERT(0);
}

if (platform_is_msm8939())
if (platform_is_msm8939() || platform_is_msm8929())
ret = clk_get_set_enable("mdss_mdp_clk_src", 307200000, 1);
else
/* Set MDP clock to 320MHz */
Expand Down
4 changes: 2 additions & 2 deletions platform/msm8916/msm8916-clock.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -602,7 +602,7 @@ void msm8939_clock_override()

void platform_clock_init(void)
{
if (platform_is_msm8939())
if (platform_is_msm8939() || platform_is_msm8929())
msm8939_clock_override();
clk_init(msm_clocks_8916, ARRAY_SIZE(msm_clocks_8916));
}
24 changes: 22 additions & 2 deletions platform/msm8916/platform.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -70,6 +70,7 @@ static mmu_section_t mmu_section_table[] = {
static struct smem_ram_ptable ram_ptable;

int platform_is_msm8939();
int platform_is_msm8929();

void platform_early_init(void)
{
Expand All @@ -82,7 +83,7 @@ void platform_early_init(void)

int qtmr_irq()
{
if (platform_is_msm8939())
if (platform_is_msm8939() || platform_is_msm8929())
return INT_QTMR_FRM_0_PHYSICAL_TIMER_EXP_8x39;
else
return INT_QTMR_FRM_0_PHYSICAL_TIMER_EXP_8x16;
Expand Down Expand Up @@ -172,6 +173,25 @@ int platform_is_msm8939()
return ret;
}

int platform_is_msm8929()
{
uint32_t platform = board_platform_id();
uint32_t ret = 0;

switch(platform)
{
case MSM8929:
case MSM8629:
case MSM8229:
ret = 1;
break;
default:
ret = 0;
};

return ret;
}

/* DYNAMIC SMEM REGION feature enables LK to dynamically
* read the SMEM addr info from TCSR_TZ_WONCE register.
* The first word read, if indicates a MAGIC number, then
Expand Down
5 changes: 4 additions & 1 deletion target/msm8916/init.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -341,6 +341,9 @@ void target_baseband_detect(struct board_data *board)
case MSM8636:
case MSM8936:
case MSM8239:
case MSM8929:
case MSM8629:
case MSM8229:
board->baseband = BASEBAND_MSM;
break;
case APQ8016:
Expand Down
4 changes: 2 additions & 2 deletions target/msm8916/oem_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
target_id = board_target_id();
plat_hw_ver_major = ((target_id >> 16) & 0xFF);

if (platform_is_msm8939()) {
if (platform_is_msm8939() || platform_is_msm8929()) {
switch (hw_subtype) {
case HW_PLATFORM_SUBTYPE_SKUK:
panel_id = NT35596_1080P_VIDEO_PANEL;
Expand Down Expand Up @@ -488,7 +488,7 @@ int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,

panel_init:
/* Set LDO mode */
if (platform_is_msm8939() || (hw_id == HW_PLATFORM_QRD))
if (platform_is_msm8939() || platform_is_msm8929() || (hw_id == HW_PLATFORM_QRD))
phy_db->regulator_mode = DSI_PHY_REGULATOR_LDO_MODE;

pinfo->pipe_type = MDSS_MDP_PIPE_TYPE_RGB;
Expand Down
6 changes: 3 additions & 3 deletions target/msm8916/target_display.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -331,7 +331,7 @@ int target_panel_reset(uint8_t enable, struct panel_reset_sequence *resetseq,
gpio_set_dir(enable_gpio.pin_id, 2);
}

if (platform_is_msm8939()) {
if (platform_is_msm8939() || platform_is_msm8929()) {
if ((hw_id == HW_PLATFORM_QRD) &&
(hw_subtype == HW_PLATFORM_SUBTYPE_SKUK))
target_panel_reset_skuk(enable);
Expand Down Expand Up @@ -371,7 +371,7 @@ int target_panel_reset(uint8_t enable, struct panel_reset_sequence *resetseq,
if (pinfo->mipi.use_enable_gpio)
gpio_set_dir(enable_gpio.pin_id, 0);

if (platform_is_msm8939()) {
if (platform_is_msm8939() || platform_is_msm8929()) {
if ((hw_id == HW_PLATFORM_QRD) &&
(hw_subtype == HW_PLATFORM_SUBTYPE_SKUK))
target_panel_reset_skuk(enable);
Expand Down

0 comments on commit dd6869c

Please sign in to comment.