Commit 0941041e375be2d2659470ebcc5b37b67f11c1c7
1 parent
c30bb264
N810 keyboard slide open by default, add more comments.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4491 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
33 additions
and
4 deletions
hw/nseries.c
... | ... | @@ -56,11 +56,13 @@ struct n800_s { |
56 | 56 | #define N8X0_TUSB_ENABLE_GPIO 0 |
57 | 57 | #define N800_MMC2_WP_GPIO 8 |
58 | 58 | #define N800_UNKNOWN_GPIO0 9 /* out */ |
59 | +#define N810_MMC2_VIOSD_GPIO 9 | |
59 | 60 | #define N800_UNKNOWN_GPIO1 10 /* out */ |
60 | 61 | #define N800_CAM_TURN_GPIO 12 |
61 | 62 | #define N810_GPS_RESET_GPIO 12 |
62 | 63 | #define N800_BLIZZARD_POWERDOWN_GPIO 15 |
63 | 64 | #define N800_MMC1_WP_GPIO 23 |
65 | +#define N810_MMC2_VSD_GPIO 23 | |
64 | 66 | #define N8X0_ONENAND_GPIO 26 |
65 | 67 | #define N810_BLIZZARD_RESET_GPIO 30 |
66 | 68 | #define N800_UNKNOWN_GPIO2 53 /* out */ |
... | ... | @@ -799,6 +801,10 @@ static void n8x0_boot_init(void *opaque) |
799 | 801 | /* CPU setup */ |
800 | 802 | s->cpu->env->regs[15] = s->cpu->env->boot_info->loader_start; |
801 | 803 | s->cpu->env->GE = 0x5; |
804 | + | |
805 | + /* If the machine has a slided keyboard, open it */ | |
806 | + if (s->kbd) | |
807 | + qemu_irq_raise(omap2_gpio_in_get(s->cpu->gpif, N810_SLIDE_GPIO)[0]); | |
802 | 808 | } |
803 | 809 | |
804 | 810 | #define OMAP_TAG_NOKIA_BT 0x4e01 |
... | ... | @@ -1057,6 +1063,25 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device, |
1057 | 1063 | |
1058 | 1064 | s->cpu = omap2420_mpu_init(sdram_size, NULL, cpu_model); |
1059 | 1065 | |
1066 | + /* Setup peripherals | |
1067 | + * | |
1068 | + * Believed external peripherals layout in the N810: | |
1069 | + * (spi bus 1) | |
1070 | + * tsc2005 | |
1071 | + * lcd_mipid | |
1072 | + * (spi bus 2) | |
1073 | + * Conexant cx3110x (WLAN) | |
1074 | + * optional: pc2400m (WiMAX) | |
1075 | + * (i2c bus 0) | |
1076 | + * TLV320AIC33 (audio codec) | |
1077 | + * TCM825x (camera by Toshiba) | |
1078 | + * lp5521 (clever LEDs) | |
1079 | + * tsl2563 (light sensor, hwmon, model 7, rev. 0) | |
1080 | + * lm8323 (keypad, manf 00, rev 04) | |
1081 | + * (i2c bus 1) | |
1082 | + * tmp105 (temperature sensor, hwmon) | |
1083 | + * menelaus (pm) | |
1084 | + */ | |
1060 | 1085 | n8x0_gpio_setup(s); |
1061 | 1086 | n8x0_nand_setup(s); |
1062 | 1087 | n8x0_i2c_setup(s); | ... | ... |
hw/tsc2005.c
... | ... | @@ -197,10 +197,14 @@ static void tsc2005_write(struct tsc2005_state_s *s, int reg, uint16_t data) |
197 | 197 | |
198 | 198 | case 0xc: /* CFR0 */ |
199 | 199 | s->host_mode = data >> 15; |
200 | - s->enabled = !(data & 0x4000); | |
201 | - if (s->busy && !s->enabled) | |
202 | - qemu_del_timer(s->timer); | |
203 | - s->busy &= s->enabled; | |
200 | + if (s->enabled != !(data & 0x4000)) { | |
201 | + s->enabled = !(data & 0x4000); | |
202 | + fprintf(stderr, "%s: touchscreen sense %sabled\n", | |
203 | + __FUNCTION__, s->enabled ? "en" : "dis"); | |
204 | + if (s->busy && !s->enabled) | |
205 | + qemu_del_timer(s->timer); | |
206 | + s->busy &= s->enabled; | |
207 | + } | |
204 | 208 | s->nextprecision = (data >> 13) & 1; |
205 | 209 | s->timing[0] = data & 0x1fff; |
206 | 210 | if ((s->timing[0] >> 11) == 3) | ... | ... |