Permalink
Browse files

d710: initial support for the Epic 4G Touch (SPH-D710)

Change-Id: Iafbd9fb45253b02d539ac0ba114f57b3bf9eeed4
  • Loading branch information...
1 parent 855d6a6 commit 4b2308ce699b9c599dd6e6acf57ac11f483381d9 @dastin1015 dastin1015 committed Jun 12, 2013
Showing with 12,612 additions and 283 deletions.
  1. +3,151 −0 arch/arm/configs/cyanogenmod_d710_defconfig
  2. +3 −0 arch/arm/mach-exynos/Makefile
  3. +39 −10 arch/arm/mach-exynos/cpuidle-exynos4.c
  4. +74 −0 arch/arm/mach-exynos/dev-c1-phone.c
  5. +6 −0 arch/arm/mach-exynos/include/mach/gpio-u1.h
  6. +126 −4 arch/arm/mach-exynos/mach-u1.c
  7. +34 −0 arch/arm/mach-exynos/sec-reboot.c
  8. +58 −0 arch/arm/mach-exynos/sec-switch_max8997.c
  9. +2 −2 arch/arm/mach-exynos/setup-fimc0.c
  10. +43 −0 arch/arm/mach-exynos/setup-sdhci-gpio.c
  11. +7 −0 arch/arm/plat-samsung/dev-hsmmc3.c
  12. +3 −0 arch/arm/plat-samsung/include/plat/sdhci.h
  13. +2 −0 drivers/Kconfig
  14. +1 −0 drivers/Makefile
  15. +19 −0 drivers/dpram/Kconfig
  16. +7 −0 drivers/dpram/Makefile
  17. +3,747 −0 drivers/dpram/raffaello/dpram.c
  18. +418 −0 drivers/dpram/raffaello/dpram.h
  19. +1,527 −0 drivers/dpram/raffaello/dpram_recovery.c
  20. +132 −0 drivers/dpram/raffaello/dpram_recovery.h
  21. +6 −0 drivers/leds/Kconfig
  22. +1 −0 drivers/leds/Makefile
  23. +364 −0 drivers/leds/ledtrig-notification.c
  24. +79 −0 drivers/leds/ledtrig-timer.c
  25. +68 −42 drivers/media/video/mhl/sii9234.c
  26. +8 −0 drivers/media/video/mhl/sii9234_driver.h
  27. +121 −1 drivers/mmc/card/block.c
  28. +14 −0 drivers/mmc/core/core.c
  29. +31 −5 drivers/mmc/core/host.c
  30. +20 −0 drivers/mmc/core/host.h
  31. +53 −8 drivers/mmc/core/mmc.c
  32. +4 −0 drivers/mmc/core/mmc_ops.c
  33. +111 −5 drivers/mmc/core/sdio.c
  34. +24 −0 drivers/mmc/core/sdio_ops.c
  35. +1 −0 drivers/mmc/core/sdio_ops.h
  36. +8 −1 drivers/mmc/host/mshci-s3c.c
  37. +28 −0 drivers/mmc/host/sdhci-s3c.c
  38. 0 drivers/net/wimax_cmc/Kconfig
  39. 0 drivers/net/wimax_cmc/Makefile
  40. +75 −0 drivers/net/wimax_cmc/buffer.h
  41. +264 −0 drivers/net/wimax_cmc/control.c
  42. +91 −0 drivers/net/wimax_cmc/ctl_types.h
  43. +227 −0 drivers/net/wimax_cmc/download.c
  44. +56 −0 drivers/net/wimax_cmc/download.h
  45. +9 −16 drivers/net/wimax_cmc/firmware.c
  46. +11 −9 drivers/net/wimax_cmc/firmware.h
  47. +599 −0 drivers/net/wimax_cmc/hardware.c
  48. +116 −0 drivers/net/wimax_cmc/headers.h
  49. +96 −0 drivers/net/wimax_cmc/hw_types.h
  50. +301 −0 drivers/net/wimax_cmc/receive.c
  51. +86 −81 drivers/net/wimax_cmc/wimax_i2c.c
  52. +1 −0 drivers/net/wimax_cmc/wimax_i2c.h
  53. +36 −0 drivers/net/wimax_cmc/wimax_plat.h
  54. +54 −54 drivers/net/wimax_cmc/wimax_sdio.c
  55. +2 −2 drivers/net/wimax_cmc/wimax_sdio.h
  56. +4 −3 drivers/power/power_supply_sysfs.c
  57. +7 −9 drivers/power/sec_battery_u1.c
  58. +58 −10 drivers/sensor/k3dh.c
  59. +6 −0 drivers/sensor/k3g.c
  60. +30 −0 drivers/staging/westbridge/astoria/device/cyasdevice_na_spr.c
  61. +4 −2 drivers/usb/core/quirks.c
  62. +5 −2 drivers/usb/core/sec-dock.h
  63. +5 −0 drivers/usb/gadget/epautoconf.c
  64. +1 −1 drivers/usb/gadget/s3c_udc.h
  65. +12 −7 drivers/usb/gadget/s3c_udc_otg.c
  66. +2 −0 drivers/usb/host/ehci-s5p.c
  67. +9 −4 drivers/usb/host/ohci-s5p.c
  68. +4 −0 include/linux/mmc/host.h
  69. +8 −2 include/linux/power_supply.h
  70. +3 −0 include/linux/usb/quirks.h
  71. +11 −0 init/main.c
  72. +3 −0 kernel/Makefile
  73. +2 −2 kernel/kernel_sec_debug.c
  74. +4 −1 sound/core/pcm_lib.c
  75. +8 −0 sound/soc/samsung/idma.c
  76. +2 −0 sound/soc/samsung/idma.h
  77. +29 −0 usr/d710_initramfs.list
  78. BIN usr/d710_initramfs_files/busybox
  79. +31 −0 usr/d710_initramfs_files/init
  80. BIN usr/d710_initramfs_files/read_boot_headers
@@ -84,6 +84,9 @@ endif
else
obj-$(CONFIG_MACH_U1_BD) += u1-gpio.o
endif
+ifeq ($(CONFIG_MACH_U1_NA_SPR),y)
+obj-$(CONFIG_MACH_U1) += dev-c1-phone.o
+endif
obj-$(CONFIG_MACH_Q1_BD) += q1-gpio.o board-gps-bcm475x.o
obj-$(CONFIG_MACH_U1) += u1-wlan.o
obj-$(CONFIG_MACH_PX) += mach-px.o sec-common.o board-gps-bcm475x.o px-switch.o
@@ -341,10 +341,12 @@ static int check_usb_op(void)
#endif
}
-#ifdef CONFIG_SND_SAMSUNG_RP
-#if defined(CONFIG_MACH_U1_NA_SPR)
+#if defined (CONFIG_MACH_U1_NA_SPR) || (CONFIG_MACH_U1_NA_USCC)
#include "../../../sound/soc/samsung/srp-types.h"
+#include "../../../sound/soc/samsung/idma.h"
#endif
+
+#ifdef CONFIG_SND_SAMSUNG_RP
extern int srp_get_op_level(void); /* By srp driver */
#endif
@@ -370,17 +372,33 @@ static inline int check_gps_uart_op(void)
return gps_is_running;
}
-#ifdef CONFIG_INTERNAL_MODEM_IF
+#if defined(CONFIG_INTERNAL_MODEM_IF) || defined(CONFIG_SAMSUNG_PHONE_TTY)
static int check_idpram_op(void)
{
/* This pin is high when CP might be accessing dpram */
+#ifdef CONFIG_MACH_U1_NA_SPR
+ int cp_int = __raw_readl(S5P_VA_GPIO2 + 0xC24) & 4;
+#else
int cp_int = gpio_get_value(GPIO_CP_AP_DPRAM_INT);
+#endif
if (cp_int != 0)
pr_info("%s cp_int is high.\n", __func__);
return cp_int;
}
#endif
+#if defined(CONFIG_ISDBT)
+static int check_isdbt_op(void)
+{
+ /* This pin is high when isdbt is working */
+ int isdbt_is_running = gpio_get_value(GPIO_ISDBT_EN);
+
+ if (isdbt_is_running != 0)
+ printk(KERN_INFO "isdbt_is_running is high\n");
+ return isdbt_is_running;
+}
+#endif
+
static atomic_t sromc_use_count;
void set_sromc_access(bool access)
@@ -410,21 +428,28 @@ static int exynos4_check_operation(void)
#ifdef CONFIG_SND_SAMSUNG_RP
if (srp_get_op_level())
return 1;
-#if defined(CONFIG_MACH_U1_NA_SPR)
+#endif
+
+#if defined (CONFIG_MACH_U1_NA_SPR) || (CONFIG_MACH_U1_NA_USCC)
+#ifdef CONFIG_SND_SAMSUNG_RP
if (!srp_get_status(IS_RUNNING))
return 1;
+#elif defined(CONFIG_SND_SAMSUNG_ALP)
+ if (!idma_is_running())
+ return 1;
#endif
#endif
+
if (check_usb_op())
return 1;
-#if defined(CONFIG_BT)
- if (check_bt_op())
+#if defined(CONFIG_ISDBT)
+ if (check_isdbt_op())
return 1;
#endif
-#ifdef CONFIG_INTERNAL_MODEM_IF
- if (check_idpram_op())
+#if defined(CONFIG_BT)
+ if (check_bt_op())
return 1;
#endif
@@ -439,6 +464,10 @@ static int exynos4_check_operation(void)
return 1;
}
+#ifdef CONFIG_INTERNAL_MODEM_IF
+ if (check_idpram_op())
+ return 1;
+#endif
return 0;
}
@@ -634,7 +663,7 @@ static int exynos4_enter_core0_lpa(struct cpuidle_device *dev,
#endif
local_irq_disable();
-#ifdef CONFIG_INTERNAL_MODEM_IF
+#if defined(CONFIG_INTERNAL_MODEM_IF) || defined(CONFIG_SAMSUNG_PHONE_TTY)
gpio_set_value(GPIO_PDA_ACTIVE, 0);
#endif
@@ -730,7 +759,7 @@ static int exynos4_enter_core0_lpa(struct cpuidle_device *dev,
if (log_en)
pr_info("---lpa\n");
-#ifdef CONFIG_INTERNAL_MODEM_IF
+#if defined(CONFIG_INTERNAL_MODEM_IF) || defined(CONFIG_SAMSUNG_PHONE_TTY)
gpio_set_value(GPIO_PDA_ACTIVE, 1);
#endif
@@ -0,0 +1,74 @@
+/* linux/arch/arm/mach-s5pv310/dev-herring-phone.c
+ * Copyright (C) 2010 Samsung Electronics. All rights reserved.
+ *
+ * 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/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/irq.h>
+
+#include <linux/tty.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+
+#include <mach/map.h>
+#include <mach/gpio.h>
+
+#include "../../../drivers/dpram/raffaello/dpram.h"
+#include "u1.h"
+
+
+static int c1_is_bootmode_recovery;
+static int setup_bootmode(char *str)
+{
+ printk(KERN_INFO "%s : %s\n", __func__, str);
+
+ c1_is_bootmode_recovery = 0;
+
+ if (str)
+ if ((*str == '2') || (*str == '4'))
+ c1_is_bootmode_recovery = 1;
+
+ printk(KERN_INFO "c1_is_bootmode_recovery = %d\n", c1_is_bootmode_recovery);
+
+ return c1_is_bootmode_recovery;
+}
+
+__setup("bootmode=", setup_bootmode);
+
+
+
+struct platform_device sec_device_dpram = {
+ .name = "dpram-device",
+ .id = -1,
+};
+
+struct platform_device sec_device_dpram_recovery = {
+ .name = "dpram-recovery",
+ .id = -1,
+};
+
+
+static int __init c1_init_phone_interface(void)
+{
+#if defined(CONFIG_SAMSUNG_PHONE_TTY)
+ if (c1_is_bootmode_recovery){
+ printk(KERN_INFO "c1_init_phone_interface - RECOVERY");
+ platform_device_register(&sec_device_dpram_recovery);
+ }else{
+ printk(KERN_INFO "c1_init_phone_interface");
+ platform_device_register(&sec_device_dpram);
+ }
+#endif
+ return 0;
+}
+device_initcall(c1_init_phone_interface);
@@ -260,11 +260,17 @@
#define S5PV310_GPE4_6_MDM_DATA_14 EXYNOS4210_GPE4(6)
#define S5PV310_GPE4_7_MDM_DATA_15 EXYNOS4210_GPE4(7)
+#define S5PV310_MDM_IF_SEL 2
+
#define GPIO_QSC_PHONE_ON EXYNOS4_GPC1(1)
#define GPIO_QSC_PHONE_RST EXYNOS4_GPX1(4)
#define GPIO_QSC_PHONE_ACTIVE EXYNOS4_GPX1(6)
#define IRQ_QSC_PHONE_ACTIVE GPIO_QSC_PHONE_ACTIVE
#define GPIO_C210_DPRAM_INT_N EXYNOS4_GPX1(0)
+
+#define GPIO_DPRAM_INT_CP_N S5PV310_GPE0_3_MDM_IRQn
+
+#define GPIO_PDA_ACTIVE EXYNOS4_GPY4(2)
#endif
/* End */
Oops, something went wrong. Retry.

0 comments on commit 4b2308c

Please sign in to comment.