diff --git a/arch/arm/configs/htcblackstone_defconfig b/arch/arm/configs/htcblackstone_defconfig new file mode 100644 index 0000000..fd17608 --- /dev/null +++ b/arch/arm/configs/htcblackstone_defconfig @@ -0,0 +1,1138 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.27 +# Sun Mar 1 17:43:50 2009 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ARCH_SUPPORTS_AOUT=y +CONFIG_ZONE_DMA=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_CGROUPS is not set +CONFIG_GROUP_SCHED=y +# CONFIG_FAIR_GROUP_SCHED is not set +# CONFIG_RT_GROUP_SCHED is not set +CONFIG_USER_SCHED=y +# CONFIG_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y +# CONFIG_RELAY is not set +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_PANIC_TIMEOUT=3 +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_COMPAT_BRK=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_ASHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set +# CONFIG_HAVE_IOREMAP_PROT is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +# CONFIG_HAVE_ARCH_TRACEHOOK is not set +# CONFIG_HAVE_DMA_ATTRS is not set +# CONFIG_USE_GENERIC_SMP_HELPERS is not set +# CONFIG_HAVE_CLK is not set +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_CLASSIC_RCU=y + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +CONFIG_ARCH_MSM=y + +# +# Boot options +# + +# +# Power management +# +CONFIG_MSM_AMSS_VERSION=7000 +# CONFIG_MSM_AMSS_VERSION_6210 is not set +# CONFIG_MSM_AMSS_VERSION_6220 is not set +# CONFIG_MSM_AMSS_VERSION_6225 is not set +CONFIG_MSM_AMSS_VERSION_WINCE=y +CONFIG_MSM_DEBUG_UART_NONE=y +# CONFIG_MSM_DEBUG_UART1 is not set +# CONFIG_MSM_DEBUG_UART2 is not set +# CONFIG_MSM_DEBUG_UART3 is not set + +# +# MSM Board Type +# +# CONFIG_MACH_HALIBUT is not set +# CONFIG_MACH_TROUT is not set +# CONFIG_MACH_HTCRAPHAEL is not set +# CONFIG_MACH_HTCRAPHAEL_CDMA is not set +# CONFIG_MACH_HTCDIAMOND is not set +# CONFIG_MACH_HTCDIAMOND_CDMA is not set +CONFIG_MACH_HTCBLACKSTONE=y +# CONFIG_TROUT_H2W is not set +CONFIG_TROUT_PWRSINK=y +CONFIG_MSM7X00A_USE_GP_TIMER=y +# CONFIG_MSM7X00A_USE_DG_TIMER is not set +CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE_SUSPEND=y +# CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE is not set +# CONFIG_MSM7X00A_SLEEP_MODE_APPS_SLEEP is not set +# CONFIG_MSM7X00A_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT is not set +# CONFIG_MSM7X00A_SLEEP_WAIT_FOR_INTERRUPT is not set +CONFIG_MSM7X00A_SLEEP_MODE=0 +# CONFIG_MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE_SUSPEND is not set +CONFIG_MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE=y +# CONFIG_MSM7X00A_IDLE_SLEEP_MODE_APPS_SLEEP is not set +# CONFIG_MSM7X00A_IDLE_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT is not set +# CONFIG_MSM7X00A_IDLE_SLEEP_WAIT_FOR_INTERRUPT is not set +CONFIG_MSM7X00A_IDLE_SLEEP_MODE=1 +CONFIG_MSM7X00A_IDLE_SLEEP_MIN_TIME=20000000 +CONFIG_MSM7X00A_IDLE_SPIN_TIME=80000 +CONFIG_MSM_IDLE_STATS=y +CONFIG_MSM_IDLE_STATS_FIRST_BUCKET=62500 +CONFIG_MSM_IDLE_STATS_BUCKET_SHIFT=2 +CONFIG_MSM_IDLE_STATS_BUCKET_COUNT=10 +CONFIG_MSM_FIQ_SUPPORT=y +# CONFIG_MSM_SERIAL_DEBUGGER is not set +CONFIG_MSM_SMD=y +# CONFIG_MSM_ONCRPCROUTER is not set +CONFIG_MSM_CPU_FREQ=y +# CONFIG_MSM_CPU_FREQ_ONDEMAND is not set +CONFIG_MSM_CPU_FREQ_SCREEN=y +CONFIG_MSM_CPU_FREQ_SCREEN_OFF=245760 +CONFIG_MSM_CPU_FREQ_SCREEN_ON=384000 +CONFIG_MSM_HW3D=y +# CONFIG_MSM_ADSP is not set +# CONFIG_HTC_FB_CONSOLE is not set +# CONFIG_WIFI_CONTROL_FUNC is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_V6=y +# CONFIG_CPU_32v6K is not set +CONFIG_CPU_32v6=y +CONFIG_CPU_ABRT_EV6=y +CONFIG_CPU_PABRT_NOIFAR=y +CONFIG_CPU_CACHE_V6=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V6=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +# CONFIG_OUTER_CACHE is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_PREEMPT=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_ARCH_FLATMEM_HAS_HOLES=y +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_RESOURCES_64BIT=y +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=76M console=ttyMSM2,115200n8" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_VFP is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HAS_WAKELOCK=y +CONFIG_HAS_EARLYSUSPEND=y +CONFIG_WAKELOCK=y +# CONFIG_WAKELOCK_STAT is not set +CONFIG_USER_WAKELOCK=y +CONFIG_EARLYSUSPEND=y +# CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL is not set +CONFIG_CONSOLE_EARLYSUSPEND=y +# CONFIG_FB_EARLYSUSPEND is not set +# CONFIG_APM_EMULATION is not set +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +CONFIG_ANDROID_PARANOID_NETWORK=y +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +# CONFIG_CFG80211 is not set +CONFIG_WIRELESS_EXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +# CONFIG_MAC80211 is not set +CONFIG_IEEE80211=y +# CONFIG_IEEE80211_DEBUG is not set +# CONFIG_IEEE80211_CRYPT_WEP is not set +# CONFIG_IEEE80211_CRYPT_CCMP is not set +# CONFIG_IEEE80211_CRYPT_TKIP is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_MISC_DEVICES=y +CONFIG_ANDROID_PMEM=y +CONFIG_TIMED_OUTPUT=y +CONFIG_TIMED_GPIO=y +CONFIG_BINDER_IPC=y +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +CONFIG_KERNEL_DEBUGGER_CORE=y +CONFIG_LOW_MEMORY_KILLER=y +CONFIG_LOGGER=y +# CONFIG_UID_STAT is not set +# CONFIG_ANDROID_RAM_CONSOLE is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_PHYLIB is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_AX88796 is not set +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_B44 is not set +CONFIG_NETDEV_1000=y +CONFIG_NETDEV_10000=y + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +CONFIG_WLAN_80211=y +# CONFIG_LIBERTAS is not set +# CONFIG_IWLWIFI_LEDS is not set +# CONFIG_HOSTAP is not set +# CONFIG_WAN is not set +CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=y +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_BSDCOMP=y +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_PPPOL2TP is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=y +# CONFIG_NETCONSOLE is not set +CONFIG_MSM_RMNET=y +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set +# CONFIG_INPUT_KEYRESET is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_MICROP_KEYPAD=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELAN_I2C_8232 is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI=y +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +CONFIG_TOUCHSCREEN_MSM=y +CONFIG_MSM_VIRTUAL_KEYBOARD=y +CONFIG_MSM_BLACKSTONE_PAD=y +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_UINPUT is not set +CONFIG_INPUT_GPIO=y +# CONFIG_INPUT_KEYCHORD is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_DEVMEM is not set +CONFIG_DEVKMEM=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_MSM=y +CONFIG_SERIAL_MSM_CONSOLE=y +CONFIG_SERIAL_MSM_CLOCK_CONTROL=y +CONFIG_SERIAL_MSM_RX_WAKEUP=y +# CONFIG_SERIAL_MSM_HS is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_DCC_TTY is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_CHARDEV is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_GPIO is not set +CONFIG_I2C_MSM=y +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_SIMTEC is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_STUB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_DS1682 is not set +# CONFIG_AT24 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_PCF8575 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_AKM8976 is not set +CONFIG_SENSORS_PCA963X=y +# CONFIG_SENSORS_MT9T013 is not set +CONFIG_SENSORS_MICROP_KSC=y +CONFIG_SENSORS_MICROP_KLT=y +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set +# CONFIG_SPI is not set +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_BATTERY_DS2760 is not set +# CONFIG_HWMON is not set +# CONFIG_WATCHDOG is not set + +# +# Sonics Silicon Backplane +# +CONFIG_SSB_POSSIBLE=y +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set + +# +# Multimedia devices +# + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +CONFIG_DAB=y + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_MSM=y +# CONFIG_FB_MSM_REFRESH is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_LOGO_DIAMRAPH_CLUT224 is not set +# CONFIG_SOUND is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set +# CONFIG_HIDRAW is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB is not set + +# +# Enable Host or Gadget support to see Inventra options +# + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# +# CONFIG_USB_GADGET is not set + +# +# USB Function Support +# +CONFIG_USB_FUNCTION=y +CONFIG_USB_FUNCTION_MSM_HSUSB=y +# CONFIG_USB_FUNCTION_NULL is not set +# CONFIG_USB_FUNCTION_ZERO is not set +# CONFIG_USB_FUNCTION_LOOPBACK is not set +CONFIG_USB_FUNCTION_ADB=y +# CONFIG_USB_FUNCTION_UMS is not set +CONFIG_USB_FUNCTION_MASS_STORAGE=y +CONFIG_USB_FUNCTION_DIAG=y +CONFIG_USB_FUNCTION_ETHER=y +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_EMBEDDED_SDIO=y +# CONFIG_MMC_PARANOID_SD_INIT is not set + +# +# MMC/SD Card Drivers +# +CONFIG_MMC_BLOCK=y +# CONFIG_MMC_BLOCK_BOUNCE is not set +CONFIG_MMC_BLOCK_PARANOID_RESUME=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_MSM7X00A=y +# CONFIG_MMC_MSM7X00A_RESUME_IN_WQ is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +# CONFIG_LEDS_PCA955X is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set +# CONFIG_LEDS_TRIGGER_SLEEP is not set +CONFIG_SWITCH=y +CONFIG_SWITCH_GPIO=y +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +# CONFIG_RTC_INTF_SYSFS is not set +# CONFIG_RTC_INTF_PROC is not set +# CONFIG_RTC_INTF_DEV is not set +CONFIG_RTC_INTF_ALARM=y +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_RTC_DRV_MSM7X00A is not set +CONFIG_RTC_DRV_MSM7X01A=y +# CONFIG_DMADEVICES is not set + +# +# Voltage and Current regulators +# +# CONFIG_REGULATOR is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_UIO is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +# CONFIG_NFS_FS is not set +# CONFIG_NFSD is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +CONFIG_HAVE_FTRACE=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +# CONFIG_FTRACE is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_CONTEXT_SWITCH_TRACER is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_GENERIC_FIND_FIRST_BIT is not set +# CONFIG_GENERIC_FIND_NEXT_BIT is not set +CONFIG_CRC_CCITT=y +# CONFIG_CRC16 is not set +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 4337318..a97f4c4 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -93,6 +93,13 @@ config MACH_HTCDIAMOND_CDMA help Support for the HTC Diamond CDMA phone. +config MACH_HTCBLACKSTONE + depends on ARCH_MSM + default y + bool "HTC Blackstone cellphone (aka HTC Touch HD)" + help + Support for the HTC Blackstone cellphone + config TROUT_H2W tristate "HTC 2 Wire detection driver" default n diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index 74e27ba..599715e 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile @@ -28,6 +28,8 @@ obj-$(CONFIG_MACH_HTCRAPHAEL_CDMA) += board-htcraphael.o board-htcraphael-navi.o obj-$(CONFIG_MACH_HTCDIAMOND) += board-htcdiamond.o board-htcraphael-navi.o board-htcraphael-panel.o htc_wifi_nvs.o board-htcraphael-mmc.o obj-$(CONFIG_MACH_HTCDIAMOND_CDMA) += board-htcdiamond.o board-htcraphael-navi.o board-htcraphael-panel.o htc_wifi_nvs.o board-htcraphael-mmc.o +obj-$(CONFIG_MACH_HTCBLACKSTONE) += board-htcblackstone.o board-htcblackstone-panel.o htc_wifi_nvs.o board-htcblackstone-mmc.o + obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o board-halibut-keypad.o obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o obj-$(CONFIG_MACH_TROUT) += board-trout-keypad.o board-trout-panel.o diff --git a/arch/arm/mach-msm/board-htcblackstone-mmc.c b/arch/arm/mach-msm/board-htcblackstone-mmc.c new file mode 100644 index 0000000..15fe64a --- /dev/null +++ b/arch/arm/mach-msm/board-htcblackstone-mmc.c @@ -0,0 +1,546 @@ +/* linux/arch/arm/mach-msm/board-trout-mmc.c +** Author: Brian Swetland +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include "devices.h" + +#include "board-htcraphael.h" + +#include "proc_comm_wince.h" + +#define DEBUG_SDSLOT_VDD 1 + +extern int msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat); + + +/* This struct holds the device-specific numbers and tables */ +static struct htcraphael_mmc_platform_data { + unsigned sdcard_status_gpio; + char sdcard_device_id:3; + unsigned wifi_power_gpio1; + unsigned wifi_power_gpio2; + struct msm_gpio_config *sdcard_on_gpio_table; + struct msm_gpio_config *sdcard_off_gpio_table; + int sdcard_on_gpio_table_size; + int sdcard_off_gpio_table_size; + struct msm_gpio_config *wifi_on_gpio_table; + struct msm_gpio_config *wifi_off_gpio_table; + int wifi_on_gpio_table_size; + int wifi_off_gpio_table_size; +} htcraphael_mmc_pdata; + + +/* ---- COMMON ---- */ +static void config_gpio_table(struct msm_gpio_config *table, int len) +{ + int n; + struct msm_gpio_config id; + for(n = 0; n < len; n++) { + id = table[n]; + msm_gpio_set_function( id ); + } +} + +/* ---- SDCARD ---- */ + +static struct msm_gpio_config sdcard_on_gpio_table_raph800[] = { + DEX_GPIO_CFG( 88, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA, 0 ), /* CLK */ + DEX_GPIO_CFG( 89, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA, 0 ), /* CMD */ + DEX_GPIO_CFG( 90, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA, 0 ), /* DAT3 */ + DEX_GPIO_CFG( 91, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA, 0 ), /* DAT2 */ + DEX_GPIO_CFG( 92, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA, 0 ), /* DAT1 */ + DEX_GPIO_CFG( 93, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA, 0 ), /* DAT0 */ +}; + +static struct msm_gpio_config sdcard_off_gpio_table_raph800[] = { + DEX_GPIO_CFG( 88, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* CLK */ + DEX_GPIO_CFG( 89, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* CMD */ + DEX_GPIO_CFG( 90, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT3 */ + DEX_GPIO_CFG( 91, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT2 */ + DEX_GPIO_CFG( 92, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT1 */ + DEX_GPIO_CFG( 93, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT0 */ +}; + +static uint opt_disable_sdcard; +static uint opt_disable_wifi; + +static int __init htcraphael_disablesdcard_setup(char *str) +{ + int cal = simple_strtol(str, NULL, 0); + + opt_disable_sdcard = cal; + return 1; +} + +__setup("board_htcraphael.disable_sdcard=", htcraphael_disablesdcard_setup); + +static int __init htcraphael_disablewifi_setup(char *str) +{ + int cal = simple_strtol(str, NULL, 0); + + opt_disable_wifi = cal; + return 1; +} + +__setup("board_htcraphael.disable_wifi=", htcraphael_disablewifi_setup); + +static struct vreg *vreg_sdslot; /* SD slot power */ + +struct mmc_vdd_xlat { + int mask; + int level; +}; + +static struct mmc_vdd_xlat mmc_vdd_table[] = { + { MMC_VDD_165_195, 1800 }, + { MMC_VDD_20_21, 2050 }, + { MMC_VDD_21_22, 2150 }, + { MMC_VDD_22_23, 2250 }, + { MMC_VDD_23_24, 2350 }, + { MMC_VDD_24_25, 2450 }, + { MMC_VDD_25_26, 2550 }, + { MMC_VDD_26_27, 2650 }, + { MMC_VDD_27_28, 2750 }, + { MMC_VDD_28_29, 2850 }, + { MMC_VDD_29_30, 2950 }, +}; + +static unsigned int sdslot_vdd = 0xffffffff; +static unsigned int sdslot_vreg_enabled; + +static uint32_t htcraphael_sdslot_switchvdd(struct device *dev, unsigned int vdd) +{ + int i, rc; + + BUG_ON(!vreg_sdslot); + + if (vdd == sdslot_vdd) + return 0; + + sdslot_vdd = vdd; + + if (vdd == 0) { +#if DEBUG_SDSLOT_VDD + printk("%s: Disabling SD slot power\n", __func__); +#endif + config_gpio_table(htcraphael_mmc_pdata.sdcard_off_gpio_table, + htcraphael_mmc_pdata.sdcard_off_gpio_table_size); + vreg_disable(vreg_sdslot); + sdslot_vreg_enabled = 0; + return 0; + } + + if (!sdslot_vreg_enabled) { + rc = vreg_enable(vreg_sdslot); + if (rc) { + printk(KERN_ERR "%s: Error enabling vreg (%d)\n", + __func__, rc); + } + config_gpio_table(htcraphael_mmc_pdata.sdcard_on_gpio_table, + htcraphael_mmc_pdata.sdcard_on_gpio_table_size); + sdslot_vreg_enabled = 1; + } + + for (i = 0; i < ARRAY_SIZE(mmc_vdd_table); i++) { + if (mmc_vdd_table[i].mask == (1 << vdd)) { +#if DEBUG_SDSLOT_VDD + printk("%s: Setting level to %u\n", + __func__, mmc_vdd_table[i].level); +#endif + rc = vreg_set_level(vreg_sdslot, + mmc_vdd_table[i].level); + if (rc) { + printk(KERN_ERR + "%s: Error setting vreg level (%d)\n", + __func__, rc); + } + return 0; + } + } + + printk(KERN_ERR "%s: Invalid VDD %d specified\n", __func__, vdd); + return 0; +} + +static unsigned int htcraphael_sdslot_status(struct device *dev) +{ + unsigned int status; + + // For Diamond devices the MMC (MoviNAND) is built-in and always connected + if (machine_is_htcdiamond() || machine_is_htcdiamond_cdma()) { + return 1; + } + + status = (unsigned int) gpio_get_value(htcraphael_mmc_pdata.sdcard_status_gpio); + return (!status); +} + +#define RAPH_MMC_VDD MMC_VDD_165_195 | MMC_VDD_20_21 | MMC_VDD_21_22 \ + | MMC_VDD_22_23 | MMC_VDD_23_24 | MMC_VDD_24_25 \ + | MMC_VDD_25_26 | MMC_VDD_26_27 | MMC_VDD_27_28 \ + | MMC_VDD_28_29 | MMC_VDD_29_30 + +static struct mmc_platform_data htcraphael_sdslot_data = { + .ocr_mask = MMC_VDD_28_29, + .status_irq = -1, /* Redefined in _init function */ + .status = htcraphael_sdslot_status, +// .translate_vdd = htcraphael_sdslot_switchvdd, +}; + +/* ---- WIFI ---- */ + +static struct msm_gpio_config wifi_on_gpio_table_raph800[] = { + DEX_GPIO_CFG( 51, 1, GPIO_INPUT , GPIO_PULL_UP, GPIO_2MA, 0 ), /* DAT3 */ + DEX_GPIO_CFG( 52, 1, GPIO_INPUT , GPIO_PULL_UP, GPIO_2MA, 0 ), /* DAT2 */ + DEX_GPIO_CFG( 53, 1, GPIO_INPUT , GPIO_PULL_UP, GPIO_2MA, 0 ), /* DAT1 */ + DEX_GPIO_CFG( 54, 1, GPIO_INPUT , GPIO_PULL_UP, GPIO_2MA, 0 ), /* DAT0 */ + DEX_GPIO_CFG( 55, 1, GPIO_INPUT , GPIO_PULL_UP, GPIO_2MA, 0 ), /* CMD */ + DEX_GPIO_CFG( 56, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* CLK */ + DEX_GPIO_CFG( 29, 0, GPIO_INPUT , GPIO_PULL_UP, GPIO_2MA, 0 ), /* WLAN IRQ */ +}; + +static struct msm_gpio_config wifi_off_gpio_table_raph800[] = { + DEX_GPIO_CFG( 51, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT3 */ + DEX_GPIO_CFG( 52, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT2 */ + DEX_GPIO_CFG( 53, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT1 */ + DEX_GPIO_CFG( 54, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* DAT0 */ + DEX_GPIO_CFG( 55, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* CMD */ + DEX_GPIO_CFG( 56, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* CLK */ + DEX_GPIO_CFG( 29, 0, GPIO_INPUT , GPIO_NO_PULL, GPIO_2MA, 0 ), /* WLAN IRQ */ +}; + +#if 0 +//HERMAN: + DEX_GPIO_CFG( 51, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_14MA, 0 ), /* DAT3 */ + DEX_GPIO_CFG( 52, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_14MA, 0 ), /* DAT2 */ + DEX_GPIO_CFG( 53, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_14MA, 0 ), /* DAT1 */ + DEX_GPIO_CFG( 54, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_14MA, 0 ), /* DAT0 */ + DEX_GPIO_CFG( 55, 1, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_10MA, 0 ), /* CMD */ + DEX_GPIO_CFG( 56, 1, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_10MA, 0 ), /* CLK */ + DEX_GPIO_CFG( 29, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_2MA, 0 ), /* WLAN IRQ */ +#endif + + +static struct vreg *vreg_wifi_osc; /* WIFI 32khz oscilator */ +static struct vreg *vreg_wifi_2; /* WIFI foo? */ +static int htcraphael_wifi_cd = 0; /* WIFI virtual 'card detect' status */ + +static struct sdio_embedded_func wifi_func = { + .f_class = SDIO_CLASS_WLAN, + .f_maxblksize = 512, +}; + +static struct embedded_sdio_data htcraphael_wifi_emb_data = { + .cis = { + .vendor = 0x104c, + .device = 0x9066, + .blksize = 512, + /*.max_dtr = 24000000, Max of chip - no worky on Trout */ + .max_dtr = 11000000, + }, + .cccr = { + .multi_block = 0, + .low_speed = 0, + .wide_bus = 1, + .high_power = 0, + .high_speed = 0, + }, + .funcs = &wifi_func, + .num_funcs = 1, +}; + +static void (*wifi_status_cb)(int card_present, void *dev_id); +static void *wifi_status_cb_devid; + +static int htcraphael_wifi_status_register(void (*callback)(int card_present, void *dev_id), void *dev_id) +{ + if (wifi_status_cb) + return -EAGAIN; + wifi_status_cb = callback; + wifi_status_cb_devid = dev_id; + return 0; +} + +static unsigned int htcraphael_wifi_status(struct device *dev) +{ + return htcraphael_wifi_cd; +} + +// trout_wifi_set_carddetect() is hard-coded in wlan driver... +int trout_wifi_set_carddetect(int val) +{ + printk("%s: %d\n", __func__, val); + htcraphael_wifi_cd = val; + if (wifi_status_cb) { + wifi_status_cb(val, wifi_status_cb_devid); + } else + printk(KERN_WARNING "%s: Nobody to notify\n", __func__); + return 0; +} +#ifndef CONFIG_WIFI_CONTROL_FUNC +EXPORT_SYMBOL(trout_wifi_set_carddetect); +#endif + +static int htcraphael_wifi_power_state; + +//XXX: trout_wifi_power() is hard-coded in wlan driver +int trout_wifi_power(int on) +{ + int rc; + + printk("%s: %d\n", __func__, on); + + if (on) { + config_gpio_table(htcraphael_mmc_pdata.wifi_on_gpio_table, + htcraphael_mmc_pdata.wifi_on_gpio_table_size); + + rc = vreg_enable(vreg_wifi_osc); + if (rc) + return rc; + rc = vreg_enable(vreg_wifi_2); + if (rc) + return rc; + + trout_pwrsink_set(PWRSINK_WIFI, 70); + } else { + config_gpio_table(htcraphael_mmc_pdata.wifi_off_gpio_table, + htcraphael_mmc_pdata.wifi_off_gpio_table_size); + trout_pwrsink_set(PWRSINK_WIFI, 0); + } + + gpio_direction_output( htcraphael_mmc_pdata.wifi_power_gpio1, on ); + mdelay(50); + gpio_direction_output( htcraphael_mmc_pdata.wifi_power_gpio2, on ); + mdelay(50); + + if (!on) { + vreg_disable(vreg_wifi_osc); + vreg_disable(vreg_wifi_2); + } + htcraphael_wifi_power_state = on; + return 0; +} +#ifndef CONFIG_WIFI_CONTROL_FUNC +EXPORT_SYMBOL(trout_wifi_power); +#endif + +static int htcraphael_wifi_reset_state; +int trout_wifi_reset(int on) +{ + printk("%s: %d\n", __func__, on); +// gpio_set_value( TROUT_GPIO_WIFI_PA_RESETX, !on ); + htcraphael_wifi_reset_state = on; + mdelay(50); + return 0; +} +#ifndef CONFIG_WIFI_CONTROL_FUNC +EXPORT_SYMBOL(trout_wifi_reset); +#endif + +static struct mmc_platform_data htcraphael_wifi_data = { + .ocr_mask = MMC_VDD_28_29, + .status = htcraphael_wifi_status, + .register_status_notify = htcraphael_wifi_status_register, + .embedded_sdio = &htcraphael_wifi_emb_data, +}; + +static struct htcraphael_mmc_platform_data htcraphael_cdma_mmc_pdata = { + .sdcard_status_gpio = 38, + .sdcard_device_id = 3, + .wifi_power_gpio1 = 102, + .wifi_power_gpio2 = 103, + // gpio config tables + .sdcard_on_gpio_table = sdcard_on_gpio_table_raph800, + .sdcard_off_gpio_table = sdcard_off_gpio_table_raph800, + .wifi_on_gpio_table = wifi_on_gpio_table_raph800, + .wifi_off_gpio_table = wifi_off_gpio_table_raph800, + // gpio config table sizes + .sdcard_on_gpio_table_size = ARRAY_SIZE(sdcard_on_gpio_table_raph800), + .sdcard_off_gpio_table_size = ARRAY_SIZE(sdcard_off_gpio_table_raph800), + .wifi_on_gpio_table_size = ARRAY_SIZE(wifi_on_gpio_table_raph800), + .wifi_off_gpio_table_size = ARRAY_SIZE(wifi_off_gpio_table_raph800), +}; + +static struct htcraphael_mmc_platform_data htcraphael_gsm_mmc_pdata = { + .sdcard_status_gpio = 38, //ORUX 23, + .sdcard_device_id = 2, + .wifi_power_gpio1 = 102, + .wifi_power_gpio2 = 103, +//XXX: redefine these as gsm tables, when they are identified and created + .sdcard_on_gpio_table = sdcard_on_gpio_table_raph800, + .sdcard_off_gpio_table = sdcard_off_gpio_table_raph800, + .wifi_on_gpio_table = wifi_on_gpio_table_raph800, + .wifi_off_gpio_table = wifi_off_gpio_table_raph800, + // table sizes + .sdcard_on_gpio_table_size = ARRAY_SIZE(sdcard_on_gpio_table_raph800), + .sdcard_off_gpio_table_size = ARRAY_SIZE(sdcard_off_gpio_table_raph800), + .wifi_on_gpio_table_size = ARRAY_SIZE(wifi_on_gpio_table_raph800), + .wifi_off_gpio_table_size = ARRAY_SIZE(wifi_off_gpio_table_raph800), +}; + + +int __init htcraphael_init_mmc(void) +{ + wifi_status_cb = NULL; + + sdslot_vreg_enabled = 0; + +#if 0 + htcraphael_mmc_pdata = htcraphael_cdma_mmc_pdata; +#else + htcraphael_mmc_pdata = htcraphael_gsm_mmc_pdata; +#endif + + vreg_sdslot = vreg_get(0, "gp6"); + if (IS_ERR(vreg_sdslot)) + return PTR_ERR(vreg_sdslot); + + vreg_wifi_osc = vreg_get(0, "msmp"); + if (IS_ERR(vreg_wifi_osc)) + return PTR_ERR(vreg_wifi_osc); + + vreg_wifi_2 = vreg_get(0, "msme1"); + if (IS_ERR(vreg_wifi_2)) + return PTR_ERR(vreg_wifi_2); + + if (!opt_disable_wifi) + msm_add_sdcc(1, &htcraphael_wifi_data); + else + printk(KERN_INFO "htcraphael: WiFi device disabled\n"); + + if (!opt_disable_sdcard) + { + htcraphael_sdslot_data.status_irq = MSM_GPIO_TO_INT(htcraphael_mmc_pdata.sdcard_status_gpio); + set_irq_wake(htcraphael_sdslot_data.status_irq, 1); + gpio_configure(htcraphael_mmc_pdata.sdcard_status_gpio, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING); + msm_add_sdcc(htcraphael_mmc_pdata.sdcard_device_id, &htcraphael_sdslot_data); + } else + printk(KERN_INFO "htcraphael: SD-Card interface disabled\n"); + return 0; +} + +#if defined(CONFIG_DEBUG_FS) +static int htcraphaelmmc_dbg_wifi_reset_set(void *data, u64 val) +{ + trout_wifi_reset((int) val); + return 0; +} + +static int htcraphaelmmc_dbg_wifi_reset_get(void *data, u64 *val) +{ + *val = htcraphael_wifi_reset_state; + return 0; +} + +static int htcraphaelmmc_dbg_wifi_cd_set(void *data, u64 val) +{ + trout_wifi_set_carddetect((int) val); + return 0; +} + +static int htcraphaelmmc_dbg_wifi_cd_get(void *data, u64 *val) +{ + *val = htcraphael_wifi_cd; + return 0; +} + +static int htcraphaelmmc_dbg_wifi_pwr_set(void *data, u64 val) +{ + trout_wifi_power((int) val); + return 0; +} + +static int htcraphaelmmc_dbg_wifi_pwr_get(void *data, u64 *val) +{ + + *val = htcraphael_wifi_power_state; + return 0; +} + +static int htcraphaelmmc_dbg_sd_pwr_set(void *data, u64 val) +{ + htcraphael_sdslot_switchvdd(NULL, (unsigned int) val); + return 0; +} + +static int htcraphaelmmc_dbg_sd_pwr_get(void *data, u64 *val) +{ + *val = sdslot_vdd; + return 0; +} + +static int htcraphaelmmc_dbg_sd_cd_set(void *data, u64 val) +{ + return -ENOSYS; +} + +static int htcraphaelmmc_dbg_sd_cd_get(void *data, u64 *val) +{ + *val = htcraphael_sdslot_status(NULL); + return 0; +} + +DEFINE_SIMPLE_ATTRIBUTE(htcraphaelmmc_dbg_wifi_reset_fops, + htcraphaelmmc_dbg_wifi_reset_get, + htcraphaelmmc_dbg_wifi_reset_set, "%llu\n"); + +DEFINE_SIMPLE_ATTRIBUTE(htcraphaelmmc_dbg_wifi_cd_fops, + htcraphaelmmc_dbg_wifi_cd_get, + htcraphaelmmc_dbg_wifi_cd_set, "%llu\n"); + +DEFINE_SIMPLE_ATTRIBUTE(htcraphaelmmc_dbg_wifi_pwr_fops, + htcraphaelmmc_dbg_wifi_pwr_get, + htcraphaelmmc_dbg_wifi_pwr_set, "%llu\n"); + +DEFINE_SIMPLE_ATTRIBUTE(htcraphaelmmc_dbg_sd_pwr_fops, + htcraphaelmmc_dbg_sd_pwr_get, + htcraphaelmmc_dbg_sd_pwr_set, "%llu\n"); + +DEFINE_SIMPLE_ATTRIBUTE(htcraphaelmmc_dbg_sd_cd_fops, + htcraphaelmmc_dbg_sd_cd_get, + htcraphaelmmc_dbg_sd_cd_set, "%llu\n"); + +static int __init htcraphaelmmc_dbg_init(void) +{ + struct dentry *dent; + + dent = debugfs_create_dir("htcraphaelmmc_dbg", 0); + if (IS_ERR(dent)) + return PTR_ERR(dent); + + debugfs_create_file("wifi_reset", 0644, dent, NULL, + &htcraphaelmmc_dbg_wifi_reset_fops); + debugfs_create_file("wifi_cd", 0644, dent, NULL, + &htcraphaelmmc_dbg_wifi_cd_fops); + debugfs_create_file("wifi_pwr", 0644, dent, NULL, + &htcraphaelmmc_dbg_wifi_pwr_fops); + + debugfs_create_file("sd_pwr", 0644, dent, NULL, + &htcraphaelmmc_dbg_sd_pwr_fops); + debugfs_create_file("sd_cd", 0644, dent, NULL, + &htcraphaelmmc_dbg_sd_cd_fops); + + return 0; +} + +device_initcall(htcraphaelmmc_dbg_init); + +#endif diff --git a/arch/arm/mach-msm/board-htcblackstone-panel.c b/arch/arm/mach-msm/board-htcblackstone-panel.c new file mode 100644 index 0000000..aec3f8f --- /dev/null +++ b/arch/arm/mach-msm/board-htcblackstone-panel.c @@ -0,0 +1,648 @@ +/* linux/arch/arm/mach-msm/board-htcraphael-panel.c +** Based on board-trout-panel.c by: Brian Swetland +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "board-htcraphael.h" +#include "proc_comm_wince.h" +#include "devices.h" + +static struct clk *gp_clk; + +#define MDDI_CLIENT_CORE_BASE 0x108000 +#define LCD_CONTROL_BLOCK_BASE 0x110000 +#define SPI_BLOCK_BASE 0x120000 +#define I2C_BLOCK_BASE 0x130000 +#define PWM_BLOCK_BASE 0x140000 +#define GPIO_BLOCK_BASE 0x150000 +#define SYSTEM_BLOCK1_BASE 0x160000 +#define SYSTEM_BLOCK2_BASE 0x170000 + + +#define DPSUS (MDDI_CLIENT_CORE_BASE|0x24) +#define SYSCLKENA (MDDI_CLIENT_CORE_BASE|0x2C) +#define PWM0OFF (PWM_BLOCK_BASE|0x1C) + +#define V_VDDE2E_VDD2_GPIO 0 +#define MDDI_RST_N 82 + +#define MDDICAP0 (MDDI_CLIENT_CORE_BASE|0x00) +#define MDDICAP1 (MDDI_CLIENT_CORE_BASE|0x04) +#define MDDICAP2 (MDDI_CLIENT_CORE_BASE|0x08) +#define MDDICAP3 (MDDI_CLIENT_CORE_BASE|0x0C) +#define MDCAPCHG (MDDI_CLIENT_CORE_BASE|0x10) +#define MDCRCERC (MDDI_CLIENT_CORE_BASE|0x14) +#define TTBUSSEL (MDDI_CLIENT_CORE_BASE|0x18) +#define DPSET0 (MDDI_CLIENT_CORE_BASE|0x1C) +#define DPSET1 (MDDI_CLIENT_CORE_BASE|0x20) +#define DPSUS (MDDI_CLIENT_CORE_BASE|0x24) +#define DPRUN (MDDI_CLIENT_CORE_BASE|0x28) +#define SYSCKENA (MDDI_CLIENT_CORE_BASE|0x2C) +#define TESTMODE (MDDI_CLIENT_CORE_BASE|0x30) +#define FIFOMONI (MDDI_CLIENT_CORE_BASE|0x34) +#define INTMONI (MDDI_CLIENT_CORE_BASE|0x38) +#define MDIOBIST (MDDI_CLIENT_CORE_BASE|0x3C) +#define MDIOPSET (MDDI_CLIENT_CORE_BASE|0x40) +#define BITMAP0 (MDDI_CLIENT_CORE_BASE|0x44) +#define BITMAP1 (MDDI_CLIENT_CORE_BASE|0x48) +#define BITMAP2 (MDDI_CLIENT_CORE_BASE|0x4C) +#define BITMAP3 (MDDI_CLIENT_CORE_BASE|0x50) +#define BITMAP4 (MDDI_CLIENT_CORE_BASE|0x54) + +#define SRST (LCD_CONTROL_BLOCK_BASE|0x00) +#define PORT_ENB (LCD_CONTROL_BLOCK_BASE|0x04) +#define START (LCD_CONTROL_BLOCK_BASE|0x08) +#define PORT (LCD_CONTROL_BLOCK_BASE|0x0C) +#define CMN (LCD_CONTROL_BLOCK_BASE|0x10) +#define GAMMA (LCD_CONTROL_BLOCK_BASE|0x14) +#define INTFLG (LCD_CONTROL_BLOCK_BASE|0x18) +#define INTMSK (LCD_CONTROL_BLOCK_BASE|0x1C) +#define MPLFBUF (LCD_CONTROL_BLOCK_BASE|0x20) +#define HDE_LEFT (LCD_CONTROL_BLOCK_BASE|0x24) +#define VDE_TOP (LCD_CONTROL_BLOCK_BASE|0x28) +#define PXL (LCD_CONTROL_BLOCK_BASE|0x30) +#define HCYCLE (LCD_CONTROL_BLOCK_BASE|0x34) +#define HSW (LCD_CONTROL_BLOCK_BASE|0x38) +#define HDE_START (LCD_CONTROL_BLOCK_BASE|0x3C) +#define HDE_SIZE (LCD_CONTROL_BLOCK_BASE|0x40) +#define VCYCLE (LCD_CONTROL_BLOCK_BASE|0x44) +#define VSW (LCD_CONTROL_BLOCK_BASE|0x48) +#define VDE_START (LCD_CONTROL_BLOCK_BASE|0x4C) +#define VDE_SIZE (LCD_CONTROL_BLOCK_BASE|0x50) +#define WAKEUP (LCD_CONTROL_BLOCK_BASE|0x54) +#define WSYN_DLY (LCD_CONTROL_BLOCK_BASE|0x58) +#define REGENB (LCD_CONTROL_BLOCK_BASE|0x5C) +#define VSYNIF (LCD_CONTROL_BLOCK_BASE|0x60) +#define WRSTB (LCD_CONTROL_BLOCK_BASE|0x64) +#define RDSTB (LCD_CONTROL_BLOCK_BASE|0x68) +#define ASY_DATA (LCD_CONTROL_BLOCK_BASE|0x6C) +#define ASY_DATB (LCD_CONTROL_BLOCK_BASE|0x70) +#define ASY_DATC (LCD_CONTROL_BLOCK_BASE|0x74) +#define ASY_DATD (LCD_CONTROL_BLOCK_BASE|0x78) +#define ASY_DATE (LCD_CONTROL_BLOCK_BASE|0x7C) +#define ASY_DATF (LCD_CONTROL_BLOCK_BASE|0x80) +#define ASY_DATG (LCD_CONTROL_BLOCK_BASE|0x84) +#define ASY_DATH (LCD_CONTROL_BLOCK_BASE|0x88) +#define ASY_CMDSET (LCD_CONTROL_BLOCK_BASE|0x8C) + +#define SSICTL (SPI_BLOCK_BASE|0x00) +#define SSITIME (SPI_BLOCK_BASE|0x04) +#define SSITX (SPI_BLOCK_BASE|0x08) +#define SSIRX (SPI_BLOCK_BASE|0x0C) +#define SSIINTC (SPI_BLOCK_BASE|0x10) +#define SSIINTS (SPI_BLOCK_BASE|0x14) +#define SSIDBG1 (SPI_BLOCK_BASE|0x18) +#define SSIDBG2 (SPI_BLOCK_BASE|0x1C) +#define SSIID (SPI_BLOCK_BASE|0x20) + +#define WKREQ (SYSTEM_BLOCK1_BASE|0x00) +#define CLKENB (SYSTEM_BLOCK1_BASE|0x04) +#define DRAMPWR (SYSTEM_BLOCK1_BASE|0x08) +#define INTMASK (SYSTEM_BLOCK1_BASE|0x0C) +#define GPIOSEL (SYSTEM_BLOCK2_BASE|0x00) + +#define GPIODATA (GPIO_BLOCK_BASE|0x00) +#define GPIODIR (GPIO_BLOCK_BASE|0x04) +#define GPIOIS (GPIO_BLOCK_BASE|0x08) +#define GPIOIBE (GPIO_BLOCK_BASE|0x0C) +#define GPIOIEV (GPIO_BLOCK_BASE|0x10) +#define GPIOIE (GPIO_BLOCK_BASE|0x14) +#define GPIORIS (GPIO_BLOCK_BASE|0x18) +#define GPIOMIS (GPIO_BLOCK_BASE|0x1C) +#define GPIOIC (GPIO_BLOCK_BASE|0x20) +#define GPIOOMS (GPIO_BLOCK_BASE|0x24) +#define GPIOPC (GPIO_BLOCK_BASE|0x28) +#define GPIOID (GPIO_BLOCK_BASE|0x30) + +#define SPI_WRITE(reg, val) \ + { SSITX, 0x00010000 | (((reg) & 0xff) << 8) | ((val) & 0xff) }, \ + { 0, 5 }, + +#define SPI_WRITE1(reg) \ + { SSITX, (reg) & 0xff }, \ + { 0, 5 }, + +struct mddi_table { + uint32_t reg; + uint32_t value; +}; +static struct mddi_table mddi_toshiba_init_table[] = { +#if 0 + { DPSET0, 0x09e90046 }, + { DPSET1, 0x00000118 }, + { DPSUS, 0x00000000 }, + { DPRUN, 0x00000001 }, + { 1, 14 }, /* msleep 14 */ + { SYSCKENA, 0x00000001 }, + //{ CLKENB, 0x000000EF }, + { CLKENB, 0x0000A1EF }, /* # SYS.CLKENB # Enable clocks for each module (without DCLK , i2cCLK) */ + //{ CLKENB, 0x000025CB }, /* Clock enable register */ + + { GPIODATA, 0x02000200 }, /* # GPI .GPIODATA # GPIO2(RESET_LCD_N) set to 0 , GPIO3(eDRAM_Power) set to 0 */ + { GPIODIR, 0x000030D }, /* 24D # GPI .GPIODIR # Select direction of GPIO port (0,2,3,6,9 output) */ + { GPIOSEL, 0/*0x00000173*/}, /* # SYS.GPIOSEL # GPIO port multiplexing control */ + { GPIOPC, 0x03C300C0 }, /* # GPI .GPIOPC # GPIO2,3 PD cut */ + { WKREQ, 0x00000000 }, /* # SYS.WKREQ # Wake-up request event is VSYNC alignment */ + + { GPIOIBE, 0x000003FF }, + { GPIOIS, 0x00000000 }, + { GPIOIC, 0x000003FF }, + { GPIOIE, 0x00000000 }, + + { GPIODATA, 0x00040004 }, /* # GPI .GPIODATA # eDRAM VD supply */ + { 1, 1 }, /* msleep 1 */ + { GPIODATA, 0x02040004 }, /* # GPI .GPIODATA # eDRAM VD supply */ + { DRAMPWR, 0x00000001 }, /* eDRAM power */ +#endif +}; + +static struct mddi_table mddi_toshiba_panel_init_table[] = { + { SRST, 0x00000003 }, /* FIFO/LCDC not reset */ + { PORT_ENB, 0x00000001 }, /* Enable sync. Port */ + { START, 0x00000000 }, /* To stop operation */ + //{ START, 0x00000001 }, /* To start operation */ + { PORT, 0x00000004 }, /* Polarity of VS/HS/DE. */ + { CMN, 0x00000000 }, + { GAMMA, 0x00000000 }, /* No Gamma correction */ + { INTFLG, 0x00000000 }, /* VSYNC interrupt flag clear/status */ + { INTMSK, 0x00000000 }, /* VSYNC interrupt mask is off. */ + { MPLFBUF, 0x00000000 }, /* Select frame buffer's base address. */ + { HDE_LEFT, 0x00000000 }, /* The value of HDE_LEFT. */ + { VDE_TOP, 0x00000000 }, /* The value of VDE_TPO. */ + { PXL, 0x00000001 }, /* 1. RGB666 */ + /* 2. Data is valid from 1st frame of beginning. */ + { HDE_START, 0x00000006 }, /* HDE_START= 14 PCLK */ + { HDE_SIZE, 0x0000009F }, /* HDE_SIZE=320 PCLK */ + { HSW, 0x00000004 }, /* HSW= 10 PCLK */ + { VSW, 0x00000001 }, /* VSW=2 HCYCLE */ + { VDE_START, 0x00000003 }, /* VDE_START=4 HCYCLE */ + { VDE_SIZE, 0x000001DF }, /* VDE_SIZE=480 HCYCLE */ + { WAKEUP, 0x000001e2 }, /* Wakeup position in VSYNC mode. */ + { WSYN_DLY, 0x00000000 }, /* Wakeup position in VSIN mode. */ + { REGENB, 0x00000001 }, /* Set 1 to enable to change the value of registers. */ + { CLKENB, 0x000025CB }, /* Clock enable register */ + + { SSICTL, 0x00000170 }, /* SSI control register */ + { SSITIME, 0x00000250 }, /* SSI timing control register */ + { SSICTL, 0x00000172 }, /* SSI control register */ +}; + +static struct mddi_table mddi_epson_init_table[] = { + { SRST, 0x00000003 }, /* FIFO/LCDC not reset */ + { PORT_ENB, 0x00000001 }, /* Enable sync. Port */ + { START, 0x00000000 }, /* To stop operation */ +#if 0 + //{ START, 0x00000001 }, /* To start operation */ + { PORT, 0x00000004 }, /* Polarity of VS/HS/DE. */ + { CMN, 0x00000000 }, + { GAMMA, 0x00000000 }, /* No Gamma correction */ + { INTFLG, 0x00000000 }, /* VSYNC interrupt flag clear/status */ + { INTMSK, 0x00000000 }, /* VSYNC interrupt mask is off. */ + { MPLFBUF, 0x00000000 }, /* Select frame buffer's base address. */ + { HDE_LEFT, 0x00000000 }, /* The value of HDE_LEFT. */ + { VDE_TOP, 0x00000000 }, /* The value of VDE_TPO. */ + { PXL, 0x00000001 }, /* 1. RGB666 */ + /* 2. Data is valid from 1st frame of beginning. */ + { HDE_START, 0x00000006 }, /* HDE_START= 14 PCLK */ + { HDE_SIZE, 0x0000009F }, /* HDE_SIZE=320 PCLK */ + { HSW, 0x00000004 }, /* HSW= 10 PCLK */ + { VSW, 0x00000001 }, /* VSW=2 HCYCLE */ + { VDE_START, 0x00000003 }, /* VDE_START=4 HCYCLE */ + { VDE_SIZE, 0x000001DF }, /* VDE_SIZE=480 HCYCLE */ + { WAKEUP, 0x000001e2 }, /* Wakeup position in VSYNC mode. */ + { WSYN_DLY, 0x00000000 }, /* Wakeup position in VSIN mode. */ + { REGENB, 0x00000001 }, /* Set 1 to enable to change the value of registers. */ + { CLKENB, 0x000025CB }, /* Clock enable register */ +#endif + { SSICTL, 0x00000170 }, /* SSI control register */ + { SSITIME, 0x00000250 }, /* SSI timing control register */ + { SSICTL, 0x00000172 }, /* SSI control register */ +}; + +static struct mddi_table mddi_epson_deinit_table[] = { + { 1, 5 }, /* usleep 5 */ +}; + +static struct mddi_table mddi_sharp_init_table[] = { + { VCYCLE, 0x000001eb }, + { HCYCLE, 0x000000ae }, + { REGENB, 0x00000001 }, /* Set 1 to enable to change the value of registers. */ + { GPIODATA, 0x00040000 }, /* GPIO2 low */ + { GPIODIR, 0x00000004 }, /* GPIO2 out */ + { 1, 1 }, /* msleep 1 */ + { GPIODATA, 0x00040004 }, /* GPIO2 high */ + { 1, 10 }, /* msleep 10 */ + SPI_WRITE(0x5f, 0x01) + SPI_WRITE1(0x11) + { 1, 200 }, /* msleep 200 */ + SPI_WRITE1(0x29) + SPI_WRITE1(0xde) + { START, 0x00000001 }, /* To start operation */ +}; + +static struct mddi_table mddi_sharp_deinit_table[] = { + { 1, 200 }, /* msleep 200 */ + SPI_WRITE(0x10, 0x1) + { 1, 100 }, /* msleep 100 */ + { GPIODATA, 0x00040004 }, /* GPIO2 high */ + { GPIODIR, 0x00000004 }, /* GPIO2 out */ + { GPIODATA, 0x00040000 }, /* GPIO2 low */ + { 1, 10 }, /* msleep 10 */ +}; + +static struct mddi_table mddi_tpo_init_table[] = { + { VCYCLE, 0x000001e5 }, + { HCYCLE, 0x000000ac }, + { REGENB, 0x00000001 }, /* Set 1 to enable to change the value of registers. */ + { 0, 20 }, /* udelay 20 */ + { GPIODATA, 0x00000004 }, /* GPIO2 high */ + { GPIODIR, 0x00000004 }, /* GPIO2 out */ + { 0, 20 }, /* udelay 20 */ + + SPI_WRITE(0x08, 0x01) + { 0, 500 }, /* udelay 500 */ + SPI_WRITE(0x08, 0x00) + SPI_WRITE(0x02, 0x00) + SPI_WRITE(0x03, 0x04) + SPI_WRITE(0x04, 0x0e) + SPI_WRITE(0x09, 0x02) + SPI_WRITE(0x0b, 0x08) + SPI_WRITE(0x0c, 0x53) + SPI_WRITE(0x0d, 0x01) + SPI_WRITE(0x0e, 0xe0) + SPI_WRITE(0x0f, 0x01) + SPI_WRITE(0x10, 0x58) + SPI_WRITE(0x20, 0x1e) + SPI_WRITE(0x21, 0x0a) + SPI_WRITE(0x22, 0x0a) + SPI_WRITE(0x23, 0x1e) + SPI_WRITE(0x25, 0x32) + SPI_WRITE(0x26, 0x00) + SPI_WRITE(0x27, 0xac) + SPI_WRITE(0x29, 0x06) + SPI_WRITE(0x2a, 0xa4) + SPI_WRITE(0x2b, 0x45) + SPI_WRITE(0x2c, 0x45) + SPI_WRITE(0x2d, 0x15) + SPI_WRITE(0x2e, 0x5a) + SPI_WRITE(0x2f, 0xff) + SPI_WRITE(0x30, 0x6b) + SPI_WRITE(0x31, 0x0d) + SPI_WRITE(0x32, 0x48) + SPI_WRITE(0x33, 0x82) + SPI_WRITE(0x34, 0xbd) + SPI_WRITE(0x35, 0xe7) + SPI_WRITE(0x36, 0x18) + SPI_WRITE(0x37, 0x94) + SPI_WRITE(0x38, 0x01) + SPI_WRITE(0x39, 0x5d) + SPI_WRITE(0x3a, 0xae) + SPI_WRITE(0x3b, 0xff) + SPI_WRITE(0x07, 0x09) + { 0, 10 }, /* udelay 10 */ + { START, 0x00000001 }, /* To start operation */ +}; + +static struct mddi_table mddi_tpo_deinit_table[] = { + SPI_WRITE(0x07, 0x19) + { START, 0x00000000 }, /* To stop operation */ + { GPIODATA, 0x00040004 }, /* GPIO2 high */ + { GPIODIR, 0x00000004 }, /* GPIO2 out */ + { GPIODATA, 0x00040000 }, /* GPIO2 low */ + { 0, 5 }, /* usleep 5 */ +}; + + +#define GPIOSEL_VWAKEINT (1U << 0) +#define INTMASK_VWAKEOUT (1U << 0) + +static void htcraphael_process_mddi_table(struct msm_mddi_client_data *client_data, + struct mddi_table *table, size_t count) +{ + int i; + for(i = 0; i < count; i++) { + uint32_t reg = table[i].reg; + uint32_t value = table[i].value; + + if (reg == 0) + udelay(value); + else if (reg == 1) + msleep(value); + else + client_data->remote_write(client_data, value, reg); + } +} + +static struct vreg *vreg_mddi_1v5; +static struct vreg *vreg_lcm_2v85; + +static void htcraphael_mddi_power_client(struct msm_mddi_client_data *client_data, + int on) +{ + printk("htcraphael_mddi_power_client(%d)\n", on); +#if 0 + #warning htcraphael_mddi_power_client not yet implemented + unsigned id, on_off; + if(on) { + on_off = 0; + id = PM_VREG_PDOWN_MDDI_ID; + msm_proc_comm_wince(PCOM_VREG_PULLDOWN, &on_off, &id); + vreg_enable(vreg_mddi_1v5); + mdelay(5); // delay time >5ms and <10ms + gpio_set_value(V_VDDE2E_VDD2_GPIO, 1); + gpio_set_value(TROUT_GPIO_MDDI_32K_EN, 1); + msleep(3); + id = PM_VREG_PDOWN_AUX_ID; + msm_proc_comm(PCOM_VREG_PULLDOWN, &on_off, &id); + vreg_enable(vreg_lcm_2v85); + msleep(3); + gpio_set_value(MDDI_RST_N, 1); + msleep(10); + } else { + gpio_set_value(TROUT_GPIO_MDDI_32K_EN, 0); + gpio_set_value(MDDI_RST_N, 0); + msleep(10); + vreg_disable(vreg_lcm_2v85); + on_off = 1; + id = PM_VREG_PDOWN_AUX_ID; + msm_proc_comm(PCOM_VREG_PULLDOWN, &on_off, &id); + msleep(5); + gpio_set_value(V_VDDE2E_VDD2_GPIO, 0); + msleep(200); + vreg_disable(vreg_mddi_1v5); + id = PM_VREG_PDOWN_MDDI_ID; + msm_proc_comm(PCOM_VREG_PULLDOWN, &on_off, &id); + } +#endif +} + + +static int htcraphael_mddi_epson_client_init( + struct msm_mddi_bridge_platform_data *bridge_data, + struct msm_mddi_client_data *client_data) +{ + int panel_id; +/* ORUX TODO + client_data->auto_hibernate(client_data, 0); + htcraphael_process_mddi_table(client_data, mddi_epson_init_table, + ARRAY_SIZE(mddi_epson_init_table)); + client_data->auto_hibernate(client_data, 1); + panel_id = (client_data->remote_read(client_data, GPIODATA) >> 4) & 3; + if (panel_id > 1) { + printk("unknown panel id (0x%08x) at mddi_enable\n", panel_id); + return -1; + } +*/ + + return 0; +} + +static int htcraphael_mddi_epson_client_uninit( + struct msm_mddi_bridge_platform_data *bridge_data, + struct msm_mddi_client_data *client_data) +{ + return 0; +} + +static int htcraphael_mddi_toshiba_client_init( + struct msm_mddi_bridge_platform_data *bridge_data, + struct msm_mddi_client_data *client_data) +{ + int panel_id; + + client_data->auto_hibernate(client_data, 0); + htcraphael_process_mddi_table(client_data, mddi_toshiba_init_table, + ARRAY_SIZE(mddi_toshiba_init_table)); + client_data->auto_hibernate(client_data, 1); + panel_id = (client_data->remote_read(client_data, GPIODATA) >> 4) & 3; + if (panel_id > 1) { + printk("unknown panel id (0x%08x) at mddi_enable\n", panel_id); + return -1; + } + return 0; +} + +static int htcraphael_mddi_toshiba_client_uninit( + struct msm_mddi_bridge_platform_data *bridge_data, + struct msm_mddi_client_data *client_data) +{ + return 0; +} + +static int htcraphael_mddi_panel_unblank( + struct msm_mddi_bridge_platform_data *bridge_data, + struct msm_mddi_client_data *client_data) +{ + + int panel_id, ret = 0; +/* ORUX TODO + client_data->auto_hibernate(client_data, 0); + htcraphael_process_mddi_table(client_data, mddi_toshiba_panel_init_table, + ARRAY_SIZE(mddi_toshiba_panel_init_table)); + panel_id = (client_data->remote_read(client_data, GPIODATA) >> 4) & 3; + switch(panel_id) { + case 0: + printk("init sharp panel\n"); + htcraphael_process_mddi_table(client_data, + mddi_sharp_init_table, + ARRAY_SIZE(mddi_sharp_init_table)); + break; + case 1: + printk("init tpo panel\n"); + htcraphael_process_mddi_table(client_data, + mddi_tpo_init_table, + ARRAY_SIZE(mddi_tpo_init_table)); + break; + case 3: + printk("init hitachi panel\n"); + htcraphael_process_mddi_table(client_data, + mddi_epson_init_table, + ARRAY_SIZE(mddi_epson_init_table)); + break; + default: + printk("unknown panel_id: %d\n", panel_id); + ret = -1; + }; + //XXX: client_data->auto_hibernate(client_data, 1); + client_data->remote_write(client_data, GPIOSEL_VWAKEINT, GPIOSEL); + client_data->remote_write(client_data, INTMASK_VWAKEOUT, INTMASK); +*/ + + + return ret; + +} + +static int htcraphael_mddi_panel_blank( + struct msm_mddi_bridge_platform_data *bridge_data, + struct msm_mddi_client_data *client_data) +{ + int panel_id, ret = 0; +/* ORUX TODO + panel_id = (client_data->remote_read(client_data, GPIODATA) >> 4) & 3; + client_data->auto_hibernate(client_data, 0); + switch(panel_id) { + case 0: + printk("deinit sharp panel\n"); + htcraphael_process_mddi_table(client_data, + mddi_sharp_deinit_table, + ARRAY_SIZE(mddi_sharp_deinit_table)); + break; + case 1: + printk("deinit tpo panel\n"); + htcraphael_process_mddi_table(client_data, + mddi_tpo_deinit_table, + ARRAY_SIZE(mddi_tpo_deinit_table)); + break; + case 3: + printk("deinit epson panel\n"); + htcraphael_process_mddi_table(client_data, + mddi_epson_deinit_table, + ARRAY_SIZE(mddi_epson_deinit_table)); + break; + default: + printk("unknown panel_id: %d\n", panel_id); + ret = -1; + }; + client_data->auto_hibernate(client_data, 1); + client_data->remote_write(client_data, 0, SYSCLKENA); + client_data->remote_write(client_data, 1, DPSUS); +*/ + return ret; +} + +#if 0 +static struct led_classdev htcraphael_backlight_led = { + .name = "lcd-backlight", + .brightness = htcraphael_DEFAULT_BACKLIGHT_BRIGHTNESS, + .brightness_set = htcraphael_brightness_set, +}; + +static int htcraphael_backlight_probe(struct platform_device *pdev) +{ + led_classdev_register(&pdev->dev, &htcraphael_backlight_led); + return 0; +} + +static int htcraphael_backlight_remove(struct platform_device *pdev) +{ + led_classdev_unregister(&htcraphael_backlight_led); + return 0; +} + +static struct platform_driver htcraphael_backlight_driver = { + .probe = htcraphael_backlight_probe, + .remove = htcraphael_backlight_remove, + .driver = { + .name = "htcraphael-backlight", + .owner = THIS_MODULE, + }, +}; +#endif + +static struct resource resources_msm_fb[] = { + { + .start = MSM_FB_BASE, + .end = MSM_FB_BASE + MSM_FB_SIZE, + .flags = IORESOURCE_MEM, + }, +}; + +struct msm_mddi_bridge_platform_data toshiba_client_data = { + .init = htcraphael_mddi_toshiba_client_init, + .uninit = htcraphael_mddi_toshiba_client_uninit, + .blank = htcraphael_mddi_panel_blank, + .unblank = htcraphael_mddi_panel_unblank, + .fb_data = { + .xres = 480, + .yres = 800, //orux + .output_format = 0, + }, +}; + +struct msm_mddi_bridge_platform_data epson_client_data = { + .init = htcraphael_mddi_epson_client_init, + .uninit = htcraphael_mddi_epson_client_uninit, + .blank = htcraphael_mddi_panel_blank, + .unblank = htcraphael_mddi_panel_unblank, + .fb_data = { + .xres = 480, + .yres = 800, //orux + .output_format = 0, + }, +}; + +struct msm_mddi_platform_data mddi_pdata = { + .clk_rate = 122880000, + .power_client = htcraphael_mddi_power_client, + .fb_resource = resources_msm_fb, + .num_clients = 2, + .client_platform_data = { + { + .product_id = (0xd263 << 16 | 0), + .name = "mddi_c_d263_0000", + .id = 0, + .client_data = &toshiba_client_data, + .clk_rate = 0, + }, + { + .product_id = (0x4ca3 << 16 | 0), + .name = "mddi_c_4ca3_0000", + .id = 0, + .client_data = &epson_client_data, + .clk_rate = 0, + }, + }, +}; + +int __init htcraphael_init_panel(void) +{ + int rc; + + printk(KERN_INFO "%s: Initializing panel\n", __func__); + + if (!machine_is_htcblackstone() && !machine_is_htcraphael() && !machine_is_htcraphael_cdma() && !machine_is_htcdiamond() && !machine_is_htcdiamond_cdma()) { + printk(KERN_INFO "%s: panel does not apply to this device, aborted\n", __func__); + return 0; + } + + vreg_mddi_1v5 = vreg_get(0, "gp2"); + if (IS_ERR(vreg_mddi_1v5)) + return PTR_ERR(vreg_mddi_1v5); + vreg_lcm_2v85 = vreg_get(0, "gp4"); + if (IS_ERR(vreg_lcm_2v85)) + return PTR_ERR(vreg_lcm_2v85); + + gp_clk = clk_get(NULL, "gp_clk"); + if (IS_ERR(gp_clk)) { + printk(KERN_ERR "%s: could not get gp clock\n", __func__); + gp_clk = NULL; + } + rc = clk_set_rate(gp_clk, 19200000); + if (rc) + { + printk(KERN_ERR "%s: set clock rate failed\n", __func__); + } + + rc = platform_device_register(&msm_device_mdp); + if (rc) + return rc; + msm_device_mddi0.dev.platform_data = &mddi_pdata; + return platform_device_register(&msm_device_mddi0); +} + +device_initcall(htcraphael_init_panel); diff --git a/arch/arm/mach-msm/board-htcblackstone.c b/arch/arm/mach-msm/board-htcblackstone.c new file mode 100644 index 0000000..fffe1d3 --- /dev/null +++ b/arch/arm/mach-msm/board-htcblackstone.c @@ -0,0 +1,388 @@ +/* linux/arch/arm/mach-msm/board-htcraphael.c + * + * Copyright (C) 2007 Google, Inc. + * Author: Brian Swetland , + * Octavian Voicu, Martijn Stolk + * + * 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 +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#include + +#include "proc_comm_wince.h" +#include "devices.h" +#include "board-htcblackstone.h" + +static int halibut_ffa; +module_param_named(ffa, halibut_ffa, int, S_IRUGO | S_IWUSR | S_IWGRP); + +static void htcraphael_device_specific_fixes(void); + +extern int htcraphael_init_mmc(void); + +/* + * GPIO Keys + */ + +static struct gpio_keys_button blackstone_button_table[] = { + {KEY_POWER, 83, 0, "Power button"}, + {KEY_UP, 39, 0, "Up button"}, + {KEY_DOWN, 40, 0, "Down button"}, +}; + +static struct gpio_keys_platform_data gpio_keys_data = { + .buttons = blackstone_button_table, + .nbuttons = ARRAY_SIZE(blackstone_button_table), +}; + +static struct platform_device gpio_keys = { + .name = "gpio-keys", + .dev = { + .platform_data = &gpio_keys_data, + }, + .id = -1, +}; + +//END GPIO keys + +static struct resource msm_serial0_resources[] = { + { + .start = INT_UART1, + .end = INT_UART1, + .flags = IORESOURCE_IRQ, + }, + { + .start = MSM_UART1_PHYS, + .end = MSM_UART1_PHYS + MSM_UART1_SIZE - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device msm_serial0_device = { + .name = "msm_serial", + .id = 0, + .num_resources = ARRAY_SIZE(msm_serial0_resources), + .resource = msm_serial0_resources, +}; + +static int halibut_phy_init_seq_raph100[] = { + 0x40, 0x31, /* Leave this pair out for USB Host Mode */ + 0x1D, 0x0D, + 0x1D, 0x10, + -1 +}; + +static int halibut_phy_init_seq_raph800[] = { + 0x04, 0x48, /* Host mode is unsure for raph800 */ + 0x3A, 0x10, + 0x3B, 0x10, + -1 +}; + +static void halibut_phy_reset(void) +{ + gpio_set_value(0x64, 0); + mdelay(1); + gpio_set_value(0x64, 1); + mdelay(3); +} + +static char *halibut_usb_functions[] = { + "ether", +// "diag", +// "adb", +}; + +static struct msm_hsusb_product halibut_usb_products[] = { + /* Use product_id 0x505a always, as we moved ether to the top of the list */ + { + .product_id = 0x505a, + .functions = 0x01, + }, + { + .product_id = 0x505a, + .functions = 0x02, + }, + { + .product_id = 0x505a, + .functions = 0x03, + }, +}; + +// netripper +// orig vendor_id 0x18d1 +// orig product_id 0xd00d +static struct msm_hsusb_platform_data msm_hsusb_pdata = { + .phy_reset = halibut_phy_reset, + .phy_init_seq = halibut_phy_init_seq_raph100, /* Modified in htcraphael_device_specific_fixes() */ + .vendor_id = 0x049F, + .product_id = 0x0002, // by default (no funcs) + .version = 0x0100, + .product_name = "MSM USB", + .manufacturer_name = "HTC", + .functions = halibut_usb_functions, + .num_functions = ARRAY_SIZE(halibut_usb_functions), + .products = halibut_usb_products, + .num_products = ARRAY_SIZE(halibut_usb_products), +}; + +static struct i2c_board_info i2c_devices[] = { +#if 0 + { + // Navi cap sense controller + I2C_BOARD_INFO("cy8c20434", 0x62), + }, +#endif + { + // LED & Backlight controller + I2C_BOARD_INFO("microp-klt", 0x66), + }, +#if 0 //ORUX + { + // Keyboard controller + I2C_BOARD_INFO("microp-ksc", 0x67), + }, +#endif + { + I2C_BOARD_INFO("mt9t013", 0x6c>>1), + /* .irq = TROUT_GPIO_TO_INT(TROUT_GPIO_CAM_BTN_STEP1_N), */ + }, +#if 0 //ORUX + { + // Raphael NaviPad + I2C_BOARD_INFO("raph_navi_pad", 0x62), + }, +#endif +}; + +static struct android_pmem_platform_data android_pmem_pdata = { + .name = "pmem", + .start = MSM_PMEM_MDP_BASE, + .size = MSM_PMEM_MDP_SIZE, + .no_allocator = 1, + .cached = 1, +}; + +static struct android_pmem_platform_data android_pmem_adsp_pdata = { + .name = "pmem_adsp", + .start = MSM_PMEM_ADSP_BASE, + .size = MSM_PMEM_ADSP_SIZE, + .no_allocator = 0, + .cached = 0, +}; + +static struct android_pmem_platform_data android_pmem_gpu0_pdata = { + .name = "pmem_gpu0", + .start = MSM_PMEM_GPU0_BASE, + .size = MSM_PMEM_GPU0_SIZE, + .no_allocator = 1, + .cached = 0, +}; + +static struct android_pmem_platform_data android_pmem_gpu1_pdata = { + .name = "pmem_gpu1", + .start = MSM_PMEM_GPU1_BASE, + .size = MSM_PMEM_GPU1_SIZE, + .no_allocator = 1, + .cached = 0, +}; + +static struct platform_device android_pmem_device = { + .name = "android_pmem", + .id = 0, + .dev = { .platform_data = &android_pmem_pdata }, +}; + +static struct platform_device android_pmem_adsp_device = { + .name = "android_pmem", + .id = 1, + .dev = { .platform_data = &android_pmem_adsp_pdata }, +}; + +static struct platform_device android_pmem_gpu0_device = { + .name = "android_pmem", + .id = 2, + .dev = { .platform_data = &android_pmem_gpu0_pdata }, +}; + +static struct platform_device android_pmem_gpu1_device = { + .name = "android_pmem", + .id = 3, + .dev = { .platform_data = &android_pmem_gpu1_pdata }, +}; + +static struct platform_device *devices[] __initdata = { +#if !defined(CONFIG_MSM_SERIAL_DEBUGGER) + &msm_serial0_device, +#endif + &msm_device_hsusb, +//orux &raphael_keypad_device, + &android_pmem_device, + &android_pmem_adsp_device, + &android_pmem_gpu0_device, + &android_pmem_gpu1_device, + &msm_device_smd, + &msm_device_nand, + &msm_device_i2c, + &msm_device_rtc, + &gpio_keys, + +}; + +extern struct sys_timer msm_timer; + +static void __init halibut_init_irq(void) +{ + msm_init_irq(); +} + +static struct msm_acpu_clock_platform_data halibut_clock_data = { + .acpu_switch_time_us = 50, + .max_speed_delta_khz = 256000, + .vdd_switch_time_us = 62, + .power_collapse_khz = 19200000, + .wait_for_irq_khz = 128000000, +}; + +void msm_serial_debug_init(unsigned int base, int irq, + const char *clkname, int signal_irq); + +static void htcraphael_reset(void) +{ + struct msm_dex_command dex = { .cmd = PCOM_RESET_ARM9 }; + msm_proc_comm_wince(&dex, 0); + msleep(0x15e); + gpio_configure(25, GPIOF_OWNER_ARM11); + gpio_direction_output(25, 0); + printk(KERN_INFO "%s: Soft reset done.\n", __func__); +} + +static void __init halibut_init(void) +{ + int i; + struct msm_dex_command vibra = { .cmd = 0, }; + + // Fix data in arrays depending on GSM/CDMA version + htcraphael_device_specific_fixes(); + + msm_acpu_clock_init(&halibut_clock_data); + msm_proc_comm_wince_init(); + + msm_hw_reset_hook = htcraphael_reset; + + msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata; + + platform_add_devices(devices, ARRAY_SIZE(devices)); + i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); + htcraphael_init_mmc(); + + /* TODO: detect vbus and correctly notify USB about its presence + * For now we just declare that VBUS is present at boot and USB + * copes, but this is not ideal. + */ + msm_hsusb_set_vbus_state(1); + + /* A little vibrating welcome */ + for (i=0; i<2; i++) { + vibra.cmd = PCOM_VIBRA_ON; + msm_proc_comm_wince(&vibra, 0); + mdelay(150); + vibra.cmd = PCOM_VIBRA_OFF; + msm_proc_comm_wince(&vibra, 0); + mdelay(75); + } +} + +static void __init halibut_map_io(void) +{ + msm_map_common_io(); + msm_clock_init(); +} + +static void __init htcraphael_fixup(struct machine_desc *desc, struct tag *tags, + char **cmdline, struct meminfo *mi) +{ + mi->nr_banks = 1; + mi->bank[0].start = PAGE_ALIGN(PHYS_OFFSET); + mi->bank[0].node = PHYS_TO_NID(mi->bank[0].start); + mi->bank[0].size = (89 * 1024 * 1024); // Why 89? See board-htcraphael.h +#if 0 + /* TODO: detect whether a 2nd memory bank is actually present, not all devices have it */ + mi->nr_banks++; + mi->bank[1].start = PAGE_ALIGN(PHYS_OFFSET + 0x10000000); + mi->bank[1].node = PHYS_TO_NID(mi->bank[1].start); + mi->bank[1].size = (128 * 1024 * 1024); +#endif + printk(KERN_INFO "fixup: nr_banks = %d\n", mi->nr_banks); + printk(KERN_INFO "fixup: bank0 start=%08lx, node=%08x, size=%08lx\n", mi->bank[0].start, mi->bank[0].node, mi->bank[0].size); + if (mi->nr_banks > 1) + printk(KERN_INFO "fixup: bank1 start=%08lx, node=%08x, size=%08lx\n", mi->bank[1].start, mi->bank[1].node, mi->bank[1].size); +} + +static void htcraphael_device_specific_fixes(void) +{ +#if 0 //TODO ORUX, WHICH??? + raphael_keypad_resources[0].start = MSM_GPIO_TO_INT(27); + raphael_keypad_resources[0].end = MSM_GPIO_TO_INT(27); + raphael_keypad_data.clamshell.gpio = 38; + raphael_keypad_data.clamshell.irq = MSM_GPIO_TO_INT(38); + raphael_keypad_data.backlight_gpio = 86; + msm_hsusb_pdata.phy_init_seq = halibut_phy_init_seq_raph100; +#else +// raphael_keypad_resources[0].start = MSM_GPIO_TO_INT(27); +// raphael_keypad_resources[0].end = MSM_GPIO_TO_INT(27); +// raphael_keypad_data.clamshell.gpio = 39; +// raphael_keypad_data.clamshell.irq = MSM_GPIO_TO_INT(39); +// raphael_keypad_data.backlight_gpio = 86; + msm_hsusb_pdata.phy_init_seq = halibut_phy_init_seq_raph800; +#endif +} + +MACHINE_START(HTCBLACKSTONE, "HTC blackstone cellphone (aka HTC Touch HD)") + .fixup = htcraphael_fixup, + .boot_params = 0x10000100, + .map_io = halibut_map_io, + .init_irq = halibut_init_irq, + .init_machine = halibut_init, + .timer = &msm_timer, +MACHINE_END diff --git a/arch/arm/mach-msm/board-htcblackstone.h b/arch/arm/mach-msm/board-htcblackstone.h new file mode 100644 index 0000000..1810d70 --- /dev/null +++ b/arch/arm/mach-msm/board-htcblackstone.h @@ -0,0 +1,45 @@ +/* linux/arch/arm/mach-msm/board-htcraphael.h + */ +#ifndef __ARCH_ARM_MACH_MSM_BOARD_HTCRAPHAEL_H +#define __ARCH_ARM_MACH_MSM_BOARD_HTCRAPHAEL_H + +#include + +#define MSM_SMI_BASE 0x00000000 +#define MSM_SMI_SIZE 0x900000 /* 9mb */ + +#define MSM_EBI_BASE 0x10000000 +#define MSM_EBI_SIZE 0x8000000 /* 128mb */ + +/* Define the SMI layout */ +#define MSM_SMI_READONLY_BASE MSM_SMI_BASE +#define MSM_SMI_READONLY_SIZE 0x100000 /* 1mb */ + +#define MSM_PMEM_GPU0_BASE MSM_SMI_READONLY_BASE + MSM_SMI_READONLY_SIZE +#define MSM_PMEM_GPU0_SIZE 0x800000 /* 8mb */ + +/* Define the EBI layout */ +#define MSM_LINUX_BASE MSM_EBI_BASE +#define MSM_LINUX_SIZE 0x5900000 /* 89mb */ + +#define MSM_PMEM_MDP_BASE MSM_LINUX_BASE + MSM_LINUX_SIZE +#define MSM_PMEM_MDP_SIZE 0x800000 /* 8mb */ + +#define MSM_PMEM_ADSP_BASE MSM_PMEM_MDP_BASE + MSM_PMEM_MDP_SIZE +#define MSM_PMEM_ADSP_SIZE 0x800000 /* 8mb */ + +#define MSM_PMEM_GPU1_BASE MSM_PMEM_ADSP_BASE + MSM_PMEM_ADSP_SIZE +#define MSM_PMEM_GPU1_SIZE 0x800000 /* 8mb */ + +#define MSM_FB_BASE MSM_PMEM_GPU1_BASE + MSM_PMEM_GPU1_SIZE +#define MSM_FB_SIZE 0x200000 /* 2mb */ + +#define MSM_EBI_LOCKED_BASE MSM_FB_BASE + MSM_FB_SIZE +#define MSM_EBI_LOCKED_SIZE 0xD00000 /* 13mb */ + +#define DECLARE_MSM_IOMAP +#include + +#endif /* GUARD */ + + diff --git a/arch/arm/mach-msm/htc_fb_console.c b/arch/arm/mach-msm/htc_fb_console.c index 54846a8..a7acbd4 100644 --- a/arch/arm/mach-msm/htc_fb_console.c +++ b/arch/arm/mach-msm/htc_fb_console.c @@ -61,7 +61,11 @@ extern int num_registered_fb; /* LCD resolution */ #define HTC_FB_LCD_WIDTH 480 -#define HTC_FB_LCD_HEIGHT 640 +#if defined(CONFIG_MACH_HTCBLACKSTONE) +#define HTC_FB_LCD_HEIGHT 800 +#else +#define HTC_FB_LCD_HEIGHT 640 +#endif /* Set max console size for a 4x4 font */ #define HTC_FB_CON_MAX_ROWS (HTC_FB_LCD_WIDTH / 4) @@ -70,7 +74,11 @@ extern int num_registered_fb; /* Framebuffer stuff */ #define HTC_FB_BASE 0xe2000000 /* virtual page for our fb */ #define HTC_FB_PHYS 0x16800000 /* physical page for our fb */ -#define HTC_FB_SIZE 0x00100000 /* map 1 MB (640 * 480 * 2 rounded properly) */ +#if defined(CONFIG_MACH_HTCBLACKSTONE) +#define HTC_FB_SIZE 0x00200000 /* map 2 MB (640 * 480 * 2 rounded properly) */ +#else +#define HTC_FB_SIZE 0x00100000 /* map 1 MB (640 * 480 * 2 rounded properly) */ +#endif #define HTC_FB_OFF 0x0006a000 /* offset in the page to start of fb */ /* Pack color data in 565 RGB format; r and b are 5 bits, g is 6 bits */ diff --git a/arch/arm/mach-msm/irq.c b/arch/arm/mach-msm/irq.c index fd04390..8446cf4 100644 --- a/arch/arm/mach-msm/irq.c +++ b/arch/arm/mach-msm/irq.c @@ -443,7 +443,7 @@ void __init msm_init_irq(void) for (n = 0; n < NR_MSM_IRQS; n++) { set_irq_chip(n, &msm_irq_chip); set_irq_handler(n, handle_level_irq); -#if defined(CONFIG_MACH_HTCRAPHAEL) || defined(CONFIG_MACH_HTCRAPHAEL_CDMA) || defined(CONFIG_MACH_HTCDIAMOND) || defined(CONFIG_MACH_HTCDIAMOND_CDMA) +#if defined(CONFIG_MACH_HTCRAPHAEL) || defined(CONFIG_MACH_HTCRAPHAEL_CDMA) || defined(CONFIG_MACH_HTCDIAMOND) || defined(CONFIG_MACH_HTCDIAMOND_CDMA) || defined(CONFIG_MACH_HTCBLACKSTONE) if (n == INT_DEBUG_TIMER_EXP) { set_irq_flags(n, IRQF_NOAUTOEN); diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index cdfb570..ed5b086 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -390,4 +390,9 @@ config MSM_VIRTUAL_KEYBOARD bool "On-screen virtual keyboard using MSM touchscreen" depends on FB_MSM && TOUCHSCREEN_MSM +config MSM_BLACKSTONE_PAD + default n + bool "MSM Blackstone pad" + depends on FB_MSM && TOUCHSCREEN_MSM + endif diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index 81a19b8..b3a973f 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -35,3 +35,4 @@ wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o obj-$(CONFIG_TOUCHSCREEN_MSM) += msm_ts.o obj-$(CONFIG_MSM_VIRTUAL_KEYBOARD) += msm_vkeyb.o +obj-$(CONFIG_MSM_BLACKSTONE_PAD) += msm_blackstone_pad.o diff --git a/drivers/input/touchscreen/msm_blackstone_pad.c b/drivers/input/touchscreen/msm_blackstone_pad.c new file mode 100644 index 0000000..5db7f72 --- /dev/null +++ b/drivers/input/touchscreen/msm_blackstone_pad.c @@ -0,0 +1,126 @@ +/* drivers/input/touchscreen/msm_blackstone_pad.c + * + * By Nicolas Velasquez + * Heavily based on msm_blackstone_pad.c by Octavian Voicu + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include <../../.././arch/arm/mach-msm/proc_comm_wince.h> +#include + + +#define MSM_BLACKSTONE_PAD_LCD_WIDTH 480 +#define MSM_BLACKSTONE_PAD_LCD_HEIGHT 800 +#define MSM_BLACKSTONE_PAD_NBUTTONS 4 +#define MSM_BLACKSTONE_PAD_BWIDTH 120 + +/* returns whether position was inside blackstone_pad, so as to eat event */ +typedef int msm_ts_handler_t(int, int, int); +extern msm_ts_handler_t *msm_ts_handler_pad; + +static struct input_dev *msm_blackstone_pad_dev; + +static int pad_keymap[MSM_BLACKSTONE_PAD_NBUTTONS] = +{ + KEY_F3, + KEY_END, //KEY_MENU, KEY_MENU + KEY_BACK, + KEY_F4 +}; + +int msm_blackstone_pad_handle_ts_event(int x, int y, int touched) +{ + if (y==MSM_BLACKSTONE_PAD_LCD_HEIGHT-1) { + if (!touched) { //Only if its the first touch event, generate the key event + struct msm_dex_command vibra = { .cmd = 0, }; + int button; + button = x / MSM_BLACKSTONE_PAD_BWIDTH; + input_event(msm_blackstone_pad_dev, EV_KEY, pad_keymap[button], 1); + input_sync(msm_blackstone_pad_dev); + input_event(msm_blackstone_pad_dev, EV_KEY, pad_keymap[button], 0); + input_sync(msm_blackstone_pad_dev); + // vibrate when pressed + vibra.cmd = PCOM_VIBRA_ON; + msm_proc_comm_wince(&vibra, 0); + mdelay(20); + vibra.cmd = PCOM_VIBRA_OFF; + msm_proc_comm_wince(&vibra, 0); + mdelay(75); + } + return 1; //prevent Linux from getting events when buttons clicked + } + return 0; +} + + +static int __init msm_blackstone_pad_init(void) +{ + int err, i; + + printk(KERN_INFO "msm_blackstone_pad: init\n"); + + /* Setup the input device */ + msm_blackstone_pad_dev = input_allocate_device(); + if (!msm_blackstone_pad_dev) + return -ENOMEM; + +// msm_blackstone_pad_dev->evbit[0] = BIT_MASK(EV_KEY); + + msm_blackstone_pad_dev->name = "MSM Blackstone pad"; + msm_blackstone_pad_dev->phys = "msm_blackstone_pad/input0"; + + for (i = 0; i < MSM_BLACKSTONE_PAD_NBUTTONS ; i++) { + input_set_capability(msm_blackstone_pad_dev, EV_KEY, pad_keymap[i]); + } + + + /* Register the input device */ + err = input_register_device(msm_blackstone_pad_dev); + if (err) { + input_free_device(msm_blackstone_pad_dev); + return err; + } + + /* We're depending on input from the touchscreen driver */ + msm_ts_handler_pad = msm_blackstone_pad_handle_ts_event; + + /* Done */ + printk(KERN_INFO "msm_blackstone_pad: loaded\n"); + + return 0; +} + +static void __exit msm_blackstone_pad_exit(void) +{ + msm_ts_handler_pad = NULL; + input_unregister_device(msm_blackstone_pad_dev); +} + +module_init(msm_blackstone_pad_init); +module_exit(msm_blackstone_pad_exit); + +MODULE_AUTHOR("Nicolas Velasquez, gnicolax@gmail.com"); +MODULE_DESCRIPTION("MSM Blackstone pad"); +MODULE_LICENSE("GPL"); diff --git a/drivers/input/touchscreen/msm_ts.c b/drivers/input/touchscreen/msm_ts.c index 6910f80..940aafd 100644 --- a/drivers/input/touchscreen/msm_ts.c +++ b/drivers/input/touchscreen/msm_ts.c @@ -30,12 +30,20 @@ #define MSM_TS_ABS_X_MIN 0 #define MSM_TS_ABS_X_MAX 479 #define MSM_TS_ABS_Y_MIN 0 +#if defined(CONFIG_MACH_HTCBLACKSTONE) +#define MSM_TS_ABS_Y_MAX 799 +#else #define MSM_TS_ABS_Y_MAX 639 +#endif #define MSM_TS_ABS_PRESSURE_MIN 0 #define MSM_TS_ABS_PRESSURE_MAX 1 #define MSM_TS_LCD_WIDTH 480 +#if defined(CONFIG_MACH_HTCBLACKSTONE) +#define MSM_TS_LCD_HEIGHT 800 +#else #define MSM_TS_LCD_HEIGHT 640 +#endif /* Touchscreen registers */ #define TSSC_CTL 0x100 @@ -45,7 +53,8 @@ /* returns whether position was inside vkeyb, so as to eat event */ typedef int msm_ts_handler_t(int, int, int); -msm_ts_handler_t *msm_ts_handler; +msm_ts_handler_t *msm_ts_handler; // virtual keyboard handler +msm_ts_handler_t *msm_ts_handler_pad; // blackstone handler /* Work used by the polling mechanism after an interrupt has fired */ static void msm_ts_process_irq1(struct work_struct *work); @@ -153,7 +162,7 @@ static void msm_ts_process_data(int irq) { unsigned long status, data; int absx, absy, touched, x, y; - int vkey; + int vkey, bspad; static int prev_absx = -1, prev_absy = -1, prev_touched = -1; /* Read status and data */ @@ -233,6 +242,11 @@ static void msm_ts_process_data(int irq) if (y >= MSM_TS_LCD_HEIGHT) y = MSM_TS_LCD_HEIGHT - 1; /* Call our handler if it's registered -- the virtual keyboards gets data from this */ + if (msm_ts_handler_pad) { + bspad = (*msm_ts_handler_pad)(x, y, prev_touched); + } else { + bspad = 0; + } if (msm_ts_handler) { vkey = (*msm_ts_handler)(x, y, touched); } else { @@ -240,11 +254,11 @@ static void msm_ts_process_data(int irq) } #if MSM_TS_DEBUG - printk(KERN_DEBUG "msm_ts: x=%d,y=%d,t=%d,vkeyb=%d\n", x, y, touched, vkey); + printk(KERN_DEBUG "msm_ts: x=%d,y=%d,t=%d,vkeyb=%d\n", x, y, touched, vkey); #endif /* Send data to linux input system, if not eaten by vkeyb */ - if (!vkey) { + if (!(vkey || bspad)) { input_report_abs(msm_ts_dev, ABS_X, x); input_report_abs(msm_ts_dev, ABS_Y, y); input_report_abs(msm_ts_dev, ABS_PRESSURE, touched ? MSM_TS_ABS_PRESSURE_MAX : MSM_TS_ABS_PRESSURE_MIN); diff --git a/drivers/input/touchscreen/msm_vkeyb.c b/drivers/input/touchscreen/msm_vkeyb.c index 424699c..16261f9 100644 --- a/drivers/input/touchscreen/msm_vkeyb.c +++ b/drivers/input/touchscreen/msm_vkeyb.c @@ -61,7 +61,11 @@ #define MSM_VKEYB_COLS 15 #define MSM_VKEYB_LCD_WIDTH 480 +#if defined(CONFIG_MACH_HTCBLACKSTONE) +#define MSM_VKEYB_LCD_HEIGHT 800 +#else #define MSM_VKEYB_LCD_HEIGHT 640 +#endif static int MSM_VKEYB_LEFT = 85; static int MSM_VKEYB_TOP = 0; diff --git a/drivers/usb/function/ether.c b/drivers/usb/function/ether.c index 414e50f..54eb176 100644 --- a/drivers/usb/function/ether.c +++ b/drivers/usb/function/ether.c @@ -207,7 +207,7 @@ static struct usb_function usb_func_ether = { .name = "ether", .ifc_class = 0x02, -#if defined(CONFIG_MACH_HTCRAPHAEL) || defined(CONFIG_MACH_HTCRAPHAEL_CDMA) || defined(CONFIG_MACH_HTCDIAMOND) || defined(CONFIG_MACH_HTCDIAMOND_CDMA) +#if defined(CONFIG_MACH_HTCRAPHAEL) || defined(CONFIG_MACH_HTCRAPHAEL_CDMA) || defined(CONFIG_MACH_HTCDIAMOND) || defined(CONFIG_MACH_HTCDIAMOND_CDMA) || defined(CONFIG_MACH_HTCBLACKSTONE) .ifc_subclass = 0x00, #else .ifc_subclass = 0x0a, diff --git a/drivers/video/msm/mddi_client_epson.c b/drivers/video/msm/mddi_client_epson.c index a29d020..8a5dc92 100644 --- a/drivers/video/msm/mddi_client_epson.c +++ b/drivers/video/msm/mddi_client_epson.c @@ -231,6 +231,12 @@ printk("mddi_epson_probe\n"); client_data->remote_write(client_data, GPIOSEL_VWAKEINT, GPIOSEL); client_data->remote_write(client_data, INTMASK_VWAKEOUT, INTMASK); +#if defined(CONFIG_MACH_HTCBLACKSTONE) + client_data->remote_write(client_data,0x8000,0x400);//rgb565 input + client_data->remote_write(client_data,0x8000,0x680);//main memory rgb565 + client_data->remote_write(client_data,0x4000,0x600);//reset +#endif //ORUX + ret = setup_vsync(panel, 1); if (ret) { dev_err(&pdev->dev, "mddi_bridge_setup_vsync failed\n"); diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c index 51040fc..c3ca362 100644 --- a/drivers/video/msm/mdp.c +++ b/drivers/video/msm/mdp.c @@ -61,7 +61,7 @@ static int enable_mdp_irq(struct mdp_info *mdp, uint32_t mask) /* if the mask bits are already set return an error, this interrupt * is already enabled */ if (mdp_irq_mask & mask) { -#if !defined(CONFIG_MACH_HTCRAPHAEL) && !defined(CONFIG_MACH_HTCRAPHAEL_CDMA) && !defined(CONFIG_MACH_HTCDIAMOND) && !defined(CONFIG_MACH_HTCDIAMOND_CDMA) +#if !defined(CONFIG_MACH_HTCRAPHAEL) && !defined(CONFIG_MACH_HTCRAPHAEL_CDMA) && !defined(CONFIG_MACH_HTCDIAMOND) && !defined(CONFIG_MACH_HTCDIAMOND_CDMA) && !defined(CONFIG_MACH_HTCBLACKSTONE) printk(KERN_ERR "mdp irq already on already on %x %x\n", mdp_irq_mask, mask); #endif @@ -203,7 +203,7 @@ void mdp_dma_to_mddi(struct mdp_info *mdp, uint32_t addr, uint32_t stride, uint16_t ld_param = 0; /* 0=PRIM, 1=SECD, 2=EXT */ if (enable_mdp_irq(mdp, DL0_DMA2_TERM_DONE)) { -#if !defined(CONFIG_MACH_HTCRAPHAEL) && !defined(CONFIG_MACH_HTCRAPHAEL_CDMA) && !defined(CONFIG_MACH_HTCDIAMOND) && !defined(CONFIG_MACH_HTCDIAMOND_CDMA) +#if !defined(CONFIG_MACH_HTCRAPHAEL) && !defined(CONFIG_MACH_HTCRAPHAEL_CDMA) && !defined(CONFIG_MACH_HTCDIAMOND) && !defined(CONFIG_MACH_HTCDIAMOND_CDMA) && !defined(CONFIG_MACH_HTCBLACKSTONE) printk(KERN_ERR "mdp_dma_to_mddi: busy\n"); #endif return; @@ -231,8 +231,13 @@ void mdp_dma_to_mddi(struct mdp_info *mdp, uint32_t addr, uint32_t stride, mdp_writel(mdp, addr, MDP_CMD_DEBUG_ACCESS_BASE + 0x0188); mdp_writel(mdp, stride, MDP_CMD_DEBUG_ACCESS_BASE + 0x018C); +#if defined(CONFIG_MACH_HTCBLACKSTONE) + /* 565 16BPP */ + dma2_cfg |= DMA_DSTC0G_6BITS | DMA_DSTC1B_5BITS | DMA_DSTC2R_5BITS; +#else /* 666 18BPP */ dma2_cfg |= DMA_DSTC0G_6BITS | DMA_DSTC1B_6BITS | DMA_DSTC2R_6BITS; +#endif /* set y & x offset and MDDI transaction parameters */ mdp_writel(mdp, (y << 16) | (x), MDP_CMD_DEBUG_ACCESS_BASE + 0x0194); diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c index a610031..9902f6c 100644 --- a/drivers/video/msm/msm_fb.c +++ b/drivers/video/msm/msm_fb.c @@ -185,7 +185,7 @@ static int msmfb_start_dma(struct msmfb_info *msmfb) y = msmfb->update_info.top; w = msmfb->update_info.eright - x; h = msmfb->update_info.ebottom - y; -#if defined(CONFIG_MACH_HTCRAPHAEL) || defined(CONFIG_MACH_HTCRAPHAEL_CDMA) || defined(CONFIG_MACH_HTCDIAMOND) || defined(CONFIG_MACH_HTCDIAMOND_CDMA) +#if defined(CONFIG_MACH_HTCRAPHAEL) || defined(CONFIG_MACH_HTCRAPHAEL_CDMA) || defined(CONFIG_MACH_HTCDIAMOND) || defined(CONFIG_MACH_HTCDIAMOND_CDMA) || defined(CONFIG_MACH_HTCBLACKSTONE) x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; #endif yoffset = msmfb->yoffset;