1 From 4b0762543b611b44e96ace4feb80e2b4775ea000 Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Fri, 4 Apr 2008 11:31:03 +0100
4 Subject: [PATCH] gta01-core.patch
5 This patch adds support for the FIC Neo1973 GTA01 machine type to the ARM port
8 Signed-off-by: Harald Welte <laforge@openmoko.org>
11 arch/arm/mach-s3c2410/Kconfig | 8 +
12 arch/arm/mach-s3c2410/Makefile | 1 +
13 arch/arm/mach-s3c2410/mach-gta01.c | 658 ++++++++++++++++++++++++++++++++++
14 arch/arm/plat-s3c24xx/Kconfig | 5 +
15 include/asm-arm/arch-s3c2410/gta01.h | 70 ++++
16 6 files changed, 750 insertions(+), 0 deletions(-)
17 create mode 100644 arch/arm/mach-s3c2410/mach-gta01.c
18 create mode 100644 include/asm-arm/arch-s3c2410/gta01.h
20 diff --git a/MAINTAINERS b/MAINTAINERS
21 index 2340cfb..4538694 100644
24 @@ -1536,6 +1536,14 @@ P: Akinobu Mita
25 M: akinobu.mita@gmail.com
28 +FIC/OPENMOKO NEO1973 GSM PHONE
30 +M: laforge@openmoko.org
31 +L: openmoko-kernel@lists.openmoko.org
32 +W: http://wiki.openmoko.org/wiki/Kernel
33 +W: http://wiki.openmoko.org/wiki/Neo1973
39 diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
40 index e2079cf..a2acd65 100644
41 --- a/arch/arm/mach-s3c2410/Kconfig
42 +++ b/arch/arm/mach-s3c2410/Kconfig
43 @@ -110,5 +110,13 @@ config MACH_QT2410
45 Say Y here if you are using the Armzone QT2410
47 +config MACH_NEO1973_GTA01
48 + bool "FIC Neo1973 GSM Phone (GTA01 Hardware)"
51 + select SENSORS_PCF50606
53 + Say Y here if you are using the FIC Neo1973 GSM Phone
57 diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
58 index 3e7a855..8952a8d 100644
59 --- a/arch/arm/mach-s3c2410/Makefile
60 +++ b/arch/arm/mach-s3c2410/Makefile
61 @@ -29,3 +29,4 @@ obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o
62 obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o
63 obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o
64 obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o
65 +obj-$(CONFIG_MACH_NEO1973_GTA01)+= mach-gta01.o
66 diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c
68 index 0000000..e690ed7
70 +++ b/arch/arm/mach-s3c2410/mach-gta01.c
73 + * linux/arch/arm/mach-s3c2410/mach-gta01.c
75 + * S3C2410 Machine Support for the FIC Neo1973 GTA01
77 + * Copyright (C) 2006-2007 by OpenMoko, Inc.
78 + * Author: Harald Welte <laforge@openmoko.org>
79 + * All rights reserved.
81 + * This program is free software; you can redistribute it and/or
82 + * modify it under the terms of the GNU General Public License as
83 + * published by the Free Software Foundation; either version 2 of
84 + * the License, or (at your option) any later version.
86 + * This program is distributed in the hope that it will be useful,
87 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
88 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89 + * GNU General Public License for more details.
91 + * You should have received a copy of the GNU General Public License
92 + * along with this program; if not, write to the Free Software
93 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
98 +#include <linux/kernel.h>
99 +#include <linux/types.h>
100 +#include <linux/interrupt.h>
101 +#include <linux/list.h>
102 +#include <linux/timer.h>
103 +#include <linux/init.h>
104 +#include <linux/workqueue.h>
105 +#include <linux/platform_device.h>
106 +#include <linux/serial_core.h>
107 +#include <linux/spi/spi.h>
108 +#include <linux/spi/spi_bitbang.h>
109 +#include <linux/mmc/mmc.h>
110 +#include <linux/mmc/host.h>
112 +#include <linux/mtd/mtd.h>
113 +#include <linux/mtd/nand.h>
114 +#include <linux/mtd/nand_ecc.h>
115 +#include <linux/mtd/partitions.h>
117 +#include <linux/mmc/host.h>
119 +#include <linux/pcf50606.h>
121 +#include <asm/mach/arch.h>
122 +#include <asm/mach/map.h>
123 +#include <asm/mach/irq.h>
125 +#include <asm/hardware.h>
127 +#include <asm/irq.h>
128 +#include <asm/mach-types.h>
130 +#include <asm/arch/regs-gpio.h>
131 +#include <asm/arch/fb.h>
132 +#include <asm/arch/spi.h>
133 +#include <asm/arch/spi-gpio.h>
134 +#include <asm/arch/usb-control.h>
136 +#include <asm/arch/gta01.h>
138 +#include <asm/plat-s3c/regs-serial.h>
139 +#include <asm/plat-s3c/nand.h>
140 +#include <asm/plat-s3c24xx/devs.h>
141 +#include <asm/plat-s3c24xx/cpu.h>
142 +#include <asm/plat-s3c24xx/pm.h>
143 +#include <asm/plat-s3c24xx/udc.h>
145 +static struct map_desc gta01_iodesc[] __initdata = {
147 + .virtual = 0xe0000000,
148 + .pfn = __phys_to_pfn(S3C2410_CS3+0x01000000),
154 +#define UCON S3C2410_UCON_DEFAULT
155 +#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
156 +#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
158 +static struct s3c2410_uartcfg gta01_uartcfgs[] = {
175 +/* PMU driver info */
177 +static int pmu_callback(struct device *dev, unsigned int feature,
178 + enum pmu_event event)
181 + case PCF50606_FEAT_ACD:
183 + case PMU_EVT_INSERT:
184 + pcf50606_charge_fast(pcf50606_global, 1);
186 + case PMU_EVT_REMOVE:
187 + pcf50606_charge_fast(pcf50606_global, 0);
200 +static struct pcf50606_platform_data gta01_pcf_pdata = {
201 + .used_features = PCF50606_FEAT_EXTON |
202 + PCF50606_FEAT_MBC |
203 + PCF50606_FEAT_BBC |
204 + PCF50606_FEAT_RTC |
205 + PCF50606_FEAT_WDT |
206 + PCF50606_FEAT_CHGCUR |
207 + PCF50606_FEAT_BATVOLT |
208 + PCF50606_FEAT_BATTEMP,
209 + .onkey_seconds_required = 3,
210 + .cb = &pmu_callback,
211 + .r_fix_batt = 10000,
212 + .r_fix_batt_par = 10000,
213 + .r_sense_milli = 220,
215 + [PCF50606_REGULATOR_D1REG] = {
222 + [PCF50606_REGULATOR_D2REG] = {
229 + [PCF50606_REGULATOR_D3REG] = {
230 + .name = "stby_1v8",
231 + .flags = PMU_VRAIL_F_SUSPEND_ON,
237 + [PCF50606_REGULATOR_DCD] = {
244 + [PCF50606_REGULATOR_DCDE] = {
246 + .flags = PMU_VRAIL_F_SUSPEND_ON,
252 + [PCF50606_REGULATOR_DCUD] = {
253 + .name = "core_1v8",
254 + .flags = PMU_VRAIL_F_SUSPEND_ON,
260 + [PCF50606_REGULATOR_IOREG] = {
261 + .name = "codec_3v3",
267 + [PCF50606_REGULATOR_LPREG] = {
277 +static void cfg_pmu_vrail(struct pmu_voltage_rail *vrail, char *name,
278 + unsigned int flags, unsigned int init,
281 + vrail->name = name;
282 + vrail->flags = flags;
283 + vrail->voltage.init = init;
284 + vrail->voltage.max = max;
287 +static void mangle_pmu_pdata_by_system_rev(void)
289 + switch (system_rev) {
290 + case GTA01Bv4_SYSTEM_REV:
291 + gta01_pcf_pdata.used_features |= PCF50606_FEAT_ACD;
293 + case GTA01Bv3_SYSTEM_REV:
294 + case GTA01Bv2_SYSTEM_REV:
295 + gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
297 + gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
298 + .flags &= ~PMU_VRAIL_F_SUSPEND_ON;
299 + gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
300 + .flags = PMU_VRAIL_F_UNUSED;
302 + case GTA01v4_SYSTEM_REV:
303 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCUD],
304 + "core_1v8", PMU_VRAIL_F_SUSPEND_ON, 1800, 1800);
305 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D1REG],
306 + "vrf_3v", 0, 3000, 3000);
307 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG],
308 + "vtcxo_2v8", 0, 2800, 2800);
309 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCD],
310 + "gl_3v5", 0, 3500, 3500);
312 + case GTA01v3_SYSTEM_REV:
313 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D1REG],
314 + "vrf_3v", 0, 3000, 3000);
315 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D2REG],
316 + "sd_3v3", 0, 3300, 3300);
317 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG],
318 + "codec_3v3", 0, 3300, 3300);
319 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCD],
320 + "gpsio_3v3", 0, 3300, 3300);
321 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCUD],
322 + "core_1v8", PMU_VRAIL_F_SUSPEND_ON, 1800, 1800);
323 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_IOREG],
324 + "vtcxo_2v8", 0, 2800, 2800);
329 +static struct resource gta01_pmu_resources[] = {
331 + .flags = IORESOURCE_IRQ,
332 + .start = GTA01_IRQ_PCF50606,
333 + .end = GTA01_IRQ_PCF50606,
337 +struct platform_device gta01_pmu_dev = {
338 + .name = "pcf50606",
339 + .num_resources = ARRAY_SIZE(gta01_pmu_resources),
340 + .resource = gta01_pmu_resources,
342 + .platform_data = >a01_pcf_pdata,
346 +/* LCD driver info */
348 +/* Configuration for 480x640 toppoly TD028TTEC1.
349 + * Do not mark this as __initdata or it will break! */
350 +static struct s3c2410fb_display gta01_displays[] = {
352 + .type = S3C2410_LCDCON1_TFT,
359 + .pixclock = 40000, /* HCLK/4 */
360 + .left_margin = 104,
364 + .lower_margin = 16,
366 + .lcdcon5 = S3C2410_LCDCON5_FRM565 |
367 + S3C2410_LCDCON5_INVVCLK |
368 + S3C2410_LCDCON5_INVVLINE |
369 + S3C2410_LCDCON5_INVVFRAME |
370 + S3C2410_LCDCON5_PWREN |
371 + S3C2410_LCDCON5_HWSWP,
374 + .type = S3C2410_LCDCON1_TFT,
381 + .pixclock = 40000, /* HCLK/4 */
382 + .left_margin = 104,
386 + .lower_margin = 16,
388 + .lcdcon5 = S3C2410_LCDCON5_FRM565 |
389 + S3C2410_LCDCON5_INVVCLK |
390 + S3C2410_LCDCON5_INVVLINE |
391 + S3C2410_LCDCON5_INVVFRAME |
392 + S3C2410_LCDCON5_PWREN |
393 + S3C2410_LCDCON5_HWSWP,
396 + .type = S3C2410_LCDCON1_TFT,
403 + .pixclock = 40000, /* HCLK/4 */
404 + .left_margin = 104,
408 + .lower_margin = 16,
410 + .lcdcon5 = S3C2410_LCDCON5_FRM565 |
411 + S3C2410_LCDCON5_INVVCLK |
412 + S3C2410_LCDCON5_INVVLINE |
413 + S3C2410_LCDCON5_INVVFRAME |
414 + S3C2410_LCDCON5_PWREN |
415 + S3C2410_LCDCON5_HWSWP,
419 +static struct s3c2410fb_mach_info gta01_lcd_cfg __initdata = {
420 + .displays = gta01_displays,
421 + .num_displays = ARRAY_SIZE(gta01_displays),
422 + .default_display = 0,
424 + .lpcsel = ((0xCE6) & ~7) | 1<<4,
427 +static struct platform_device *gta01_devices[] __initdata = {
434 + &s3c_device_usbgadget,
438 +static struct s3c2410_nand_set gta01_nand_sets[] = {
440 + .name = "neo1973-nand",
442 + .flags = S3C2410_NAND_BBT,
446 +static struct s3c2410_platform_nand gta01_nand_info = {
450 + .nr_sets = ARRAY_SIZE(gta01_nand_sets),
451 + .sets = gta01_nand_sets,
454 +static void gta01_udc_command(enum s3c2410_udc_cmd_e cmd)
456 + printk(KERN_DEBUG "%s(%d)\n", __func__, cmd);
459 + case S3C2410_UDC_P_ENABLE:
460 + s3c2410_gpio_setpin(GTA01_GPIO_USB_PULLUP, 1);
462 + case S3C2410_UDC_P_DISABLE:
463 + s3c2410_gpio_setpin(GTA01_GPIO_USB_PULLUP, 0);
470 +/* use a work queue, since I2C API inherently schedules
471 + * and we get called in hardirq context from UDC driver */
474 + struct work_struct work;
477 +static struct vbus_draw gta01_udc_vbus_drawer;
479 +static void __gta01_udc_vbus_draw(struct work_struct *work)
481 + /* this is a fix to work around boot-time ordering problems if the
482 + * s3c2410_udc is initialized before the pcf50606 driver has defined
483 + * pcf50606_global */
484 + if (!pcf50606_global)
487 + if (gta01_udc_vbus_drawer.ma >= 500) {
488 + /* enable fast charge */
489 + printk(KERN_DEBUG "udc: enabling fast charge\n");
490 + pcf50606_charge_fast(pcf50606_global, 1);
492 + /* disable fast charge */
493 + printk(KERN_DEBUG "udc: disabling fast charge\n");
494 + pcf50606_charge_fast(pcf50606_global, 0);
498 +static void gta01_udc_vbus_draw(unsigned int ma)
500 + gta01_udc_vbus_drawer.ma = ma;
501 + schedule_work(>a01_udc_vbus_drawer.work);
504 +static struct s3c2410_udc_mach_info gta01_udc_cfg = {
505 + .vbus_draw = gta01_udc_vbus_draw,
510 +static struct spi_board_info gta01_spi_board_info[] = {
512 + .modalias = "jbt6k74",
513 + /* platform_data */
514 + /* controller_data */
516 + .max_speed_hz = 10 * 1000 * 1000,
522 +static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs)
525 + case BITBANG_CS_ACTIVE:
526 + s3c2410_gpio_setpin(S3C2410_GPG3, 0);
528 + case BITBANG_CS_INACTIVE:
529 + s3c2410_gpio_setpin(S3C2410_GPG3, 1);
534 +static struct s3c2410_spigpio_info spi_gpio_cfg = {
535 + .pin_clk = S3C2410_GPG7,
536 + .pin_mosi = S3C2410_GPG6,
537 + .pin_miso = S3C2410_GPG5,
538 + .board_size = ARRAY_SIZE(gta01_spi_board_info),
539 + .board_info = gta01_spi_board_info,
540 + .chip_select = &spi_gpio_cs,
543 +static struct resource s3c_spi_lcm_resource[] = {
545 + .start = S3C2410_GPG3,
546 + .end = S3C2410_GPG3,
549 + .start = S3C2410_GPG5,
550 + .end = S3C2410_GPG5,
553 + .start = S3C2410_GPG6,
554 + .end = S3C2410_GPG6,
557 + .start = S3C2410_GPG7,
558 + .end = S3C2410_GPG7,
562 +struct platform_device s3c_device_spi_lcm = {
563 + .name = "s3c24xx-spi-gpio",
565 + .num_resources = ARRAY_SIZE(s3c_spi_lcm_resource),
566 + .resource = s3c_spi_lcm_resource,
568 + .platform_data = &spi_gpio_cfg,
572 +static struct gta01bl_machinfo backlight_machinfo = {
573 + .default_intensity = 1,
574 + .max_intensity = 1,
578 +static struct resource gta01_bl_resources[] = {
580 + .start = GTA01_GPIO_BACKLIGHT,
581 + .end = GTA01_GPIO_BACKLIGHT,
585 +struct platform_device gta01_bl_dev = {
586 + .name = "gta01-bl",
587 + .num_resources = ARRAY_SIZE(gta01_bl_resources),
588 + .resource = gta01_bl_resources,
590 + .platform_data = &backlight_machinfo,
594 +static struct resource gta01_led_resources[] = {
596 + .start = GTA01_GPIO_VIBRATOR_ON,
597 + .end = GTA01_GPIO_VIBRATOR_ON,
601 +struct platform_device gta01_led_dev = {
602 + .name = "neo1973-vibrator",
603 + .num_resources = ARRAY_SIZE(gta01_led_resources),
604 + .resource = gta01_led_resources,
607 +static struct resource gta01_button_resources[] = {
609 + .start = GTA01_GPIO_AUX_KEY,
610 + .end = GTA01_GPIO_AUX_KEY,
613 + .start = GTA01_GPIO_HOLD_KEY,
614 + .end = GTA01_GPIO_HOLD_KEY,
617 + .start = GTA01_GPIO_JACK_INSERT,
618 + .end = GTA01_GPIO_JACK_INSERT,
622 +struct platform_device gta01_button_dev = {
623 + .name = "neo1973-button",
624 + .num_resources = ARRAY_SIZE(gta01_button_resources),
625 + .resource = gta01_button_resources,
628 +static struct platform_device gta01_pm_gsm_dev = {
629 + .name = "neo1973-pm-gsm",
633 +static struct s3c2410_hcd_info gta01_usb_info = {
635 + .flags = S3C_HCDFLG_USED,
642 +static void __init gta01_map_io(void)
644 + s3c24xx_init_io(gta01_iodesc, ARRAY_SIZE(gta01_iodesc));
645 + s3c24xx_init_clocks(12*1000*1000);
646 + s3c24xx_init_uarts(gta01_uartcfgs, ARRAY_SIZE(gta01_uartcfgs));
649 +static irqreturn_t gta01_modem_irq(int irq, void *param)
651 + printk(KERN_DEBUG "modem wakeup interrupt\n");
652 + return IRQ_HANDLED;
655 +static void __init gta01_machine_init(void)
659 + if (system_rev == GTA01v4_SYSTEM_REV ||
660 + system_rev == GTA01Bv2_SYSTEM_REV ||
661 + system_rev == GTA01Bv3_SYSTEM_REV ||
662 + system_rev == GTA01Bv4_SYSTEM_REV) {
663 + gta01_udc_cfg.udc_command = gta01_udc_command;
666 + s3c_device_usb.dev.platform_data = >a01_usb_info;
667 + s3c_device_nand.dev.platform_data = >a01_nand_info;
669 + s3c24xx_fb_set_platdata(>a01_lcd_cfg);
671 + INIT_WORK(>a01_udc_vbus_drawer.work, __gta01_udc_vbus_draw);
672 + s3c24xx_udc_set_platdata(>a01_udc_cfg);
674 + /* Set LCD_RESET / XRES to high */
675 + s3c2410_gpio_cfgpin(S3C2410_GPC6, S3C2410_GPIO_OUTPUT);
676 + s3c2410_gpio_setpin(S3C2410_GPC6, 1);
678 + /* SPI chip select is gpio output */
679 + s3c2410_gpio_cfgpin(S3C2410_GPG3, S3C2410_GPIO_OUTPUT);
680 + s3c2410_gpio_setpin(S3C2410_GPG3, 1);
681 + platform_device_register(&s3c_device_spi_lcm);
683 + platform_device_register(>a01_bl_dev);
684 + platform_device_register(>a01_button_dev);
685 + platform_device_register(>a01_pm_gsm_dev);
687 + switch (system_rev) {
688 + case GTA01v3_SYSTEM_REV:
689 + case GTA01v4_SYSTEM_REV:
690 + /* just use the default (GTA01_IRQ_PCF50606) */
692 + case GTA01Bv2_SYSTEM_REV:
693 + case GTA01Bv3_SYSTEM_REV:
694 + /* just use the default (GTA01_IRQ_PCF50606) */
695 + gta01_led_resources[0].start =
696 + gta01_led_resources[0].end = GTA01Bv2_GPIO_VIBRATOR_ON;
698 + case GTA01Bv4_SYSTEM_REV:
699 + gta01_pmu_resources[0].start =
700 + gta01_pmu_resources[0].end = GTA01Bv4_IRQ_PCF50606;
701 + gta01_led_resources[0].start =
702 + gta01_led_resources[0].end = GTA01Bv4_GPIO_VIBRATOR_ON;
705 + mangle_pmu_pdata_by_system_rev();
706 + platform_device_register(>a01_pmu_dev);
707 + platform_device_register(>a01_led_dev);
709 + platform_add_devices(gta01_devices, ARRAY_SIZE(gta01_devices));
713 + set_irq_type(GTA01_IRQ_MODEM, IRQT_RISING);
714 + rc = request_irq(GTA01_IRQ_MODEM, gta01_modem_irq, IRQF_DISABLED,
717 + printk(KERN_ERR "GTA01: can't request GSM modem wakeup IRQ\n");
718 + enable_irq_wake(GTA01_IRQ_MODEM);
721 +MACHINE_START(NEO1973_GTA01, "GTA01")
722 + .phys_io = S3C2410_PA_UART,
723 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
724 + .boot_params = S3C2410_SDRAM_PA + 0x100,
725 + .map_io = gta01_map_io,
726 + .init_irq = s3c24xx_init_irq,
727 + .init_machine = gta01_machine_init,
728 + .timer = &s3c24xx_timer,
730 diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
731 index b66fb3c..7ee4b82 100644
732 --- a/arch/arm/plat-s3c24xx/Kconfig
733 +++ b/arch/arm/plat-s3c24xx/Kconfig
734 @@ -46,4 +46,9 @@ config MACH_SMDK
736 Common machine code for SMDK2410 and SMDK2440
741 + Common machine code for Neo1973 hardware
744 diff --git a/include/asm-arm/arch-s3c2410/gta01.h b/include/asm-arm/arch-s3c2410/gta01.h
746 index 0000000..1cc2099
748 +++ b/include/asm-arm/arch-s3c2410/gta01.h
753 +#include <asm/arch/regs-gpio.h>
754 +#include <asm/arch/irqs.h>
756 +/* Different hardware revisions, passed in ATAG_REVISION by u-boot */
757 +#define GTA01v3_SYSTEM_REV 0x00000130
758 +#define GTA01v4_SYSTEM_REV 0x00000140
759 +#define GTA01Bv2_SYSTEM_REV 0x00000220
760 +#define GTA01Bv3_SYSTEM_REV 0x00000230
761 +#define GTA01Bv4_SYSTEM_REV 0x00000240
764 +struct gta01bl_machinfo {
765 + unsigned int default_intensity;
766 + unsigned int max_intensity;
767 + unsigned int limit_mask;
770 +/* Definitions common to all revisions */
771 +#define GTA01_GPIO_BACKLIGHT S3C2410_GPB0
772 +#define GTA01_GPIO_GPS_PWRON S3C2410_GPB1
773 +#define GTA01_GPIO_MODEM_RST S3C2410_GPB6
774 +#define GTA01_GPIO_MODEM_ON S3C2410_GPB7
775 +#define GTA01_GPIO_LCD_RESET S3C2410_GPC6
776 +#define GTA01_GPIO_PMU_IRQ S3C2410_GPG8
777 +#define GTA01_GPIO_JACK_INSERT S3C2410_GPF4
778 +#define GTA01_GPIO_nSD_DETECT S3C2410_GPF5
779 +#define GTA01_GPIO_AUX_KEY S3C2410_GPF6
780 +#define GTA01_GPIO_HOLD_KEY S3C2410_GPF7
781 +#define GTA01_GPIO_VIBRATOR_ON S3C2410_GPG11
783 +#define GTA01_IRQ_MODEM IRQ_EINT1
784 +#define GTA01_IRQ_JACK_INSERT IRQ_EINT4
785 +#define GTA01_IRQ_nSD_DETECT IRQ_EINT5
786 +#define GTA01_IRQ_AUX_KEY IRQ_EINT6
787 +#define GTA01_IRQ_PCF50606 IRQ_EINT16
790 +#define GTA01v3_GPIO_nGSM_EN S3C2410_GPG9
793 +#define GTA01_GPIO_MODEM_DNLOAD S3C2410_GPG0
796 +#define GTA01Bv2_GPIO_nGSM_EN S3C2410_GPF2
797 +#define GTA01Bv2_GPIO_VIBRATOR_ON S3C2410_GPB10
800 +#define GTA01_GPIO_GPS_EN_3V3 S3C2410_GPG9
802 +#define GTA01_GPIO_SDMMC_ON S3C2410_GPB2
803 +#define GTA01_GPIO_BT_EN S3C2410_GPB5
804 +#define GTA01_GPIO_AB_DETECT S3C2410_GPB8
805 +#define GTA01_GPIO_USB_PULLUP S3C2410_GPB9
806 +#define GTA01_GPIO_USB_ATTACH S3C2410_GPB10
808 +#define GTA01_GPIO_GPS_EN_2V8 S3C2410_GPG9
809 +#define GTA01_GPIO_GPS_EN_3V S3C2410_GPG10
810 +#define GTA01_GPIO_GPS_RESET S3C2410_GPC0
813 +#define GTA01Bv4_GPIO_nNAND_WP S3C2410_GPA16
814 +#define GTA01Bv4_GPIO_VIBRATOR_ON S3C2410_GPB3
815 +#define GTA01Bv4_GPIO_PMU_IRQ S3C2410_GPG1
817 +#define GTA01Bv4_IRQ_PCF50606 IRQ_EINT9
819 +#endif /* _GTA01_H */