1 From 821c65f3420494eadf5260e48b54b9f59e6e865c Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Wed, 16 Jul 2008 14:44:42 +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 | 10 +
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, 759 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 56a2f67..9c1a796 100644
24 @@ -1664,6 +1664,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 cd3dc08..7e3a1a2 100644
41 --- a/arch/arm/mach-s3c2410/Kconfig
42 +++ b/arch/arm/mach-s3c2410/Kconfig
43 @@ -117,5 +117,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 cabc13c..b73562f 100644
59 --- a/arch/arm/mach-s3c2410/Makefile
60 +++ b/arch/arm/mach-s3c2410/Makefile
61 @@ -30,3 +30,13 @@ obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o
62 obj-$(CONFIG_MACH_TCT_HAMMER) += mach-tct_hammer.o
63 obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o
64 obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o
66 +# Common bits of machine support
68 +obj-$(CONFIG_SIMTEC_NOR) += nor-simtec.o
72 +obj-$(CONFIG_MACH_BAST_IDE) += bast-ide.o
73 +obj-$(CONFIG_MACH_NEO1973_GTA01)+= mach-gta01.o
75 diff --git a/arch/arm/mach-s3c2410/mach-gta01.c b/arch/arm/mach-s3c2410/mach-gta01.c
77 index 0000000..e690ed7
79 +++ b/arch/arm/mach-s3c2410/mach-gta01.c
82 + * linux/arch/arm/mach-s3c2410/mach-gta01.c
84 + * S3C2410 Machine Support for the FIC Neo1973 GTA01
86 + * Copyright (C) 2006-2007 by OpenMoko, Inc.
87 + * Author: Harald Welte <laforge@openmoko.org>
88 + * All rights reserved.
90 + * This program is free software; you can redistribute it and/or
91 + * modify it under the terms of the GNU General Public License as
92 + * published by the Free Software Foundation; either version 2 of
93 + * the License, or (at your option) any later version.
95 + * This program is distributed in the hope that it will be useful,
96 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
97 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98 + * GNU General Public License for more details.
100 + * You should have received a copy of the GNU General Public License
101 + * along with this program; if not, write to the Free Software
102 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
103 + * MA 02111-1307 USA
107 +#include <linux/kernel.h>
108 +#include <linux/types.h>
109 +#include <linux/interrupt.h>
110 +#include <linux/list.h>
111 +#include <linux/timer.h>
112 +#include <linux/init.h>
113 +#include <linux/workqueue.h>
114 +#include <linux/platform_device.h>
115 +#include <linux/serial_core.h>
116 +#include <linux/spi/spi.h>
117 +#include <linux/spi/spi_bitbang.h>
118 +#include <linux/mmc/mmc.h>
119 +#include <linux/mmc/host.h>
121 +#include <linux/mtd/mtd.h>
122 +#include <linux/mtd/nand.h>
123 +#include <linux/mtd/nand_ecc.h>
124 +#include <linux/mtd/partitions.h>
126 +#include <linux/mmc/host.h>
128 +#include <linux/pcf50606.h>
130 +#include <asm/mach/arch.h>
131 +#include <asm/mach/map.h>
132 +#include <asm/mach/irq.h>
134 +#include <asm/hardware.h>
136 +#include <asm/irq.h>
137 +#include <asm/mach-types.h>
139 +#include <asm/arch/regs-gpio.h>
140 +#include <asm/arch/fb.h>
141 +#include <asm/arch/spi.h>
142 +#include <asm/arch/spi-gpio.h>
143 +#include <asm/arch/usb-control.h>
145 +#include <asm/arch/gta01.h>
147 +#include <asm/plat-s3c/regs-serial.h>
148 +#include <asm/plat-s3c/nand.h>
149 +#include <asm/plat-s3c24xx/devs.h>
150 +#include <asm/plat-s3c24xx/cpu.h>
151 +#include <asm/plat-s3c24xx/pm.h>
152 +#include <asm/plat-s3c24xx/udc.h>
154 +static struct map_desc gta01_iodesc[] __initdata = {
156 + .virtual = 0xe0000000,
157 + .pfn = __phys_to_pfn(S3C2410_CS3+0x01000000),
163 +#define UCON S3C2410_UCON_DEFAULT
164 +#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
165 +#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
167 +static struct s3c2410_uartcfg gta01_uartcfgs[] = {
184 +/* PMU driver info */
186 +static int pmu_callback(struct device *dev, unsigned int feature,
187 + enum pmu_event event)
190 + case PCF50606_FEAT_ACD:
192 + case PMU_EVT_INSERT:
193 + pcf50606_charge_fast(pcf50606_global, 1);
195 + case PMU_EVT_REMOVE:
196 + pcf50606_charge_fast(pcf50606_global, 0);
209 +static struct pcf50606_platform_data gta01_pcf_pdata = {
210 + .used_features = PCF50606_FEAT_EXTON |
211 + PCF50606_FEAT_MBC |
212 + PCF50606_FEAT_BBC |
213 + PCF50606_FEAT_RTC |
214 + PCF50606_FEAT_WDT |
215 + PCF50606_FEAT_CHGCUR |
216 + PCF50606_FEAT_BATVOLT |
217 + PCF50606_FEAT_BATTEMP,
218 + .onkey_seconds_required = 3,
219 + .cb = &pmu_callback,
220 + .r_fix_batt = 10000,
221 + .r_fix_batt_par = 10000,
222 + .r_sense_milli = 220,
224 + [PCF50606_REGULATOR_D1REG] = {
231 + [PCF50606_REGULATOR_D2REG] = {
238 + [PCF50606_REGULATOR_D3REG] = {
239 + .name = "stby_1v8",
240 + .flags = PMU_VRAIL_F_SUSPEND_ON,
246 + [PCF50606_REGULATOR_DCD] = {
253 + [PCF50606_REGULATOR_DCDE] = {
255 + .flags = PMU_VRAIL_F_SUSPEND_ON,
261 + [PCF50606_REGULATOR_DCUD] = {
262 + .name = "core_1v8",
263 + .flags = PMU_VRAIL_F_SUSPEND_ON,
269 + [PCF50606_REGULATOR_IOREG] = {
270 + .name = "codec_3v3",
276 + [PCF50606_REGULATOR_LPREG] = {
286 +static void cfg_pmu_vrail(struct pmu_voltage_rail *vrail, char *name,
287 + unsigned int flags, unsigned int init,
290 + vrail->name = name;
291 + vrail->flags = flags;
292 + vrail->voltage.init = init;
293 + vrail->voltage.max = max;
296 +static void mangle_pmu_pdata_by_system_rev(void)
298 + switch (system_rev) {
299 + case GTA01Bv4_SYSTEM_REV:
300 + gta01_pcf_pdata.used_features |= PCF50606_FEAT_ACD;
302 + case GTA01Bv3_SYSTEM_REV:
303 + case GTA01Bv2_SYSTEM_REV:
304 + gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
306 + gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
307 + .flags &= ~PMU_VRAIL_F_SUSPEND_ON;
308 + gta01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG]
309 + .flags = PMU_VRAIL_F_UNUSED;
311 + case GTA01v4_SYSTEM_REV:
312 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCUD],
313 + "core_1v8", PMU_VRAIL_F_SUSPEND_ON, 1800, 1800);
314 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D1REG],
315 + "vrf_3v", 0, 3000, 3000);
316 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG],
317 + "vtcxo_2v8", 0, 2800, 2800);
318 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCD],
319 + "gl_3v5", 0, 3500, 3500);
321 + case GTA01v3_SYSTEM_REV:
322 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D1REG],
323 + "vrf_3v", 0, 3000, 3000);
324 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D2REG],
325 + "sd_3v3", 0, 3300, 3300);
326 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_D3REG],
327 + "codec_3v3", 0, 3300, 3300);
328 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCD],
329 + "gpsio_3v3", 0, 3300, 3300);
330 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_DCUD],
331 + "core_1v8", PMU_VRAIL_F_SUSPEND_ON, 1800, 1800);
332 + cfg_pmu_vrail(>a01_pcf_pdata.rails[PCF50606_REGULATOR_IOREG],
333 + "vtcxo_2v8", 0, 2800, 2800);
338 +static struct resource gta01_pmu_resources[] = {
340 + .flags = IORESOURCE_IRQ,
341 + .start = GTA01_IRQ_PCF50606,
342 + .end = GTA01_IRQ_PCF50606,
346 +struct platform_device gta01_pmu_dev = {
347 + .name = "pcf50606",
348 + .num_resources = ARRAY_SIZE(gta01_pmu_resources),
349 + .resource = gta01_pmu_resources,
351 + .platform_data = >a01_pcf_pdata,
355 +/* LCD driver info */
357 +/* Configuration for 480x640 toppoly TD028TTEC1.
358 + * Do not mark this as __initdata or it will break! */
359 +static struct s3c2410fb_display gta01_displays[] = {
361 + .type = S3C2410_LCDCON1_TFT,
368 + .pixclock = 40000, /* HCLK/4 */
369 + .left_margin = 104,
373 + .lower_margin = 16,
375 + .lcdcon5 = S3C2410_LCDCON5_FRM565 |
376 + S3C2410_LCDCON5_INVVCLK |
377 + S3C2410_LCDCON5_INVVLINE |
378 + S3C2410_LCDCON5_INVVFRAME |
379 + S3C2410_LCDCON5_PWREN |
380 + S3C2410_LCDCON5_HWSWP,
383 + .type = S3C2410_LCDCON1_TFT,
390 + .pixclock = 40000, /* HCLK/4 */
391 + .left_margin = 104,
395 + .lower_margin = 16,
397 + .lcdcon5 = S3C2410_LCDCON5_FRM565 |
398 + S3C2410_LCDCON5_INVVCLK |
399 + S3C2410_LCDCON5_INVVLINE |
400 + S3C2410_LCDCON5_INVVFRAME |
401 + S3C2410_LCDCON5_PWREN |
402 + S3C2410_LCDCON5_HWSWP,
405 + .type = S3C2410_LCDCON1_TFT,
412 + .pixclock = 40000, /* HCLK/4 */
413 + .left_margin = 104,
417 + .lower_margin = 16,
419 + .lcdcon5 = S3C2410_LCDCON5_FRM565 |
420 + S3C2410_LCDCON5_INVVCLK |
421 + S3C2410_LCDCON5_INVVLINE |
422 + S3C2410_LCDCON5_INVVFRAME |
423 + S3C2410_LCDCON5_PWREN |
424 + S3C2410_LCDCON5_HWSWP,
428 +static struct s3c2410fb_mach_info gta01_lcd_cfg __initdata = {
429 + .displays = gta01_displays,
430 + .num_displays = ARRAY_SIZE(gta01_displays),
431 + .default_display = 0,
433 + .lpcsel = ((0xCE6) & ~7) | 1<<4,
436 +static struct platform_device *gta01_devices[] __initdata = {
443 + &s3c_device_usbgadget,
447 +static struct s3c2410_nand_set gta01_nand_sets[] = {
449 + .name = "neo1973-nand",
451 + .flags = S3C2410_NAND_BBT,
455 +static struct s3c2410_platform_nand gta01_nand_info = {
459 + .nr_sets = ARRAY_SIZE(gta01_nand_sets),
460 + .sets = gta01_nand_sets,
463 +static void gta01_udc_command(enum s3c2410_udc_cmd_e cmd)
465 + printk(KERN_DEBUG "%s(%d)\n", __func__, cmd);
468 + case S3C2410_UDC_P_ENABLE:
469 + s3c2410_gpio_setpin(GTA01_GPIO_USB_PULLUP, 1);
471 + case S3C2410_UDC_P_DISABLE:
472 + s3c2410_gpio_setpin(GTA01_GPIO_USB_PULLUP, 0);
479 +/* use a work queue, since I2C API inherently schedules
480 + * and we get called in hardirq context from UDC driver */
483 + struct work_struct work;
486 +static struct vbus_draw gta01_udc_vbus_drawer;
488 +static void __gta01_udc_vbus_draw(struct work_struct *work)
490 + /* this is a fix to work around boot-time ordering problems if the
491 + * s3c2410_udc is initialized before the pcf50606 driver has defined
492 + * pcf50606_global */
493 + if (!pcf50606_global)
496 + if (gta01_udc_vbus_drawer.ma >= 500) {
497 + /* enable fast charge */
498 + printk(KERN_DEBUG "udc: enabling fast charge\n");
499 + pcf50606_charge_fast(pcf50606_global, 1);
501 + /* disable fast charge */
502 + printk(KERN_DEBUG "udc: disabling fast charge\n");
503 + pcf50606_charge_fast(pcf50606_global, 0);
507 +static void gta01_udc_vbus_draw(unsigned int ma)
509 + gta01_udc_vbus_drawer.ma = ma;
510 + schedule_work(>a01_udc_vbus_drawer.work);
513 +static struct s3c2410_udc_mach_info gta01_udc_cfg = {
514 + .vbus_draw = gta01_udc_vbus_draw,
519 +static struct spi_board_info gta01_spi_board_info[] = {
521 + .modalias = "jbt6k74",
522 + /* platform_data */
523 + /* controller_data */
525 + .max_speed_hz = 10 * 1000 * 1000,
531 +static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs)
534 + case BITBANG_CS_ACTIVE:
535 + s3c2410_gpio_setpin(S3C2410_GPG3, 0);
537 + case BITBANG_CS_INACTIVE:
538 + s3c2410_gpio_setpin(S3C2410_GPG3, 1);
543 +static struct s3c2410_spigpio_info spi_gpio_cfg = {
544 + .pin_clk = S3C2410_GPG7,
545 + .pin_mosi = S3C2410_GPG6,
546 + .pin_miso = S3C2410_GPG5,
547 + .board_size = ARRAY_SIZE(gta01_spi_board_info),
548 + .board_info = gta01_spi_board_info,
549 + .chip_select = &spi_gpio_cs,
552 +static struct resource s3c_spi_lcm_resource[] = {
554 + .start = S3C2410_GPG3,
555 + .end = S3C2410_GPG3,
558 + .start = S3C2410_GPG5,
559 + .end = S3C2410_GPG5,
562 + .start = S3C2410_GPG6,
563 + .end = S3C2410_GPG6,
566 + .start = S3C2410_GPG7,
567 + .end = S3C2410_GPG7,
571 +struct platform_device s3c_device_spi_lcm = {
572 + .name = "s3c24xx-spi-gpio",
574 + .num_resources = ARRAY_SIZE(s3c_spi_lcm_resource),
575 + .resource = s3c_spi_lcm_resource,
577 + .platform_data = &spi_gpio_cfg,
581 +static struct gta01bl_machinfo backlight_machinfo = {
582 + .default_intensity = 1,
583 + .max_intensity = 1,
587 +static struct resource gta01_bl_resources[] = {
589 + .start = GTA01_GPIO_BACKLIGHT,
590 + .end = GTA01_GPIO_BACKLIGHT,
594 +struct platform_device gta01_bl_dev = {
595 + .name = "gta01-bl",
596 + .num_resources = ARRAY_SIZE(gta01_bl_resources),
597 + .resource = gta01_bl_resources,
599 + .platform_data = &backlight_machinfo,
603 +static struct resource gta01_led_resources[] = {
605 + .start = GTA01_GPIO_VIBRATOR_ON,
606 + .end = GTA01_GPIO_VIBRATOR_ON,
610 +struct platform_device gta01_led_dev = {
611 + .name = "neo1973-vibrator",
612 + .num_resources = ARRAY_SIZE(gta01_led_resources),
613 + .resource = gta01_led_resources,
616 +static struct resource gta01_button_resources[] = {
618 + .start = GTA01_GPIO_AUX_KEY,
619 + .end = GTA01_GPIO_AUX_KEY,
622 + .start = GTA01_GPIO_HOLD_KEY,
623 + .end = GTA01_GPIO_HOLD_KEY,
626 + .start = GTA01_GPIO_JACK_INSERT,
627 + .end = GTA01_GPIO_JACK_INSERT,
631 +struct platform_device gta01_button_dev = {
632 + .name = "neo1973-button",
633 + .num_resources = ARRAY_SIZE(gta01_button_resources),
634 + .resource = gta01_button_resources,
637 +static struct platform_device gta01_pm_gsm_dev = {
638 + .name = "neo1973-pm-gsm",
642 +static struct s3c2410_hcd_info gta01_usb_info = {
644 + .flags = S3C_HCDFLG_USED,
651 +static void __init gta01_map_io(void)
653 + s3c24xx_init_io(gta01_iodesc, ARRAY_SIZE(gta01_iodesc));
654 + s3c24xx_init_clocks(12*1000*1000);
655 + s3c24xx_init_uarts(gta01_uartcfgs, ARRAY_SIZE(gta01_uartcfgs));
658 +static irqreturn_t gta01_modem_irq(int irq, void *param)
660 + printk(KERN_DEBUG "modem wakeup interrupt\n");
661 + return IRQ_HANDLED;
664 +static void __init gta01_machine_init(void)
668 + if (system_rev == GTA01v4_SYSTEM_REV ||
669 + system_rev == GTA01Bv2_SYSTEM_REV ||
670 + system_rev == GTA01Bv3_SYSTEM_REV ||
671 + system_rev == GTA01Bv4_SYSTEM_REV) {
672 + gta01_udc_cfg.udc_command = gta01_udc_command;
675 + s3c_device_usb.dev.platform_data = >a01_usb_info;
676 + s3c_device_nand.dev.platform_data = >a01_nand_info;
678 + s3c24xx_fb_set_platdata(>a01_lcd_cfg);
680 + INIT_WORK(>a01_udc_vbus_drawer.work, __gta01_udc_vbus_draw);
681 + s3c24xx_udc_set_platdata(>a01_udc_cfg);
683 + /* Set LCD_RESET / XRES to high */
684 + s3c2410_gpio_cfgpin(S3C2410_GPC6, S3C2410_GPIO_OUTPUT);
685 + s3c2410_gpio_setpin(S3C2410_GPC6, 1);
687 + /* SPI chip select is gpio output */
688 + s3c2410_gpio_cfgpin(S3C2410_GPG3, S3C2410_GPIO_OUTPUT);
689 + s3c2410_gpio_setpin(S3C2410_GPG3, 1);
690 + platform_device_register(&s3c_device_spi_lcm);
692 + platform_device_register(>a01_bl_dev);
693 + platform_device_register(>a01_button_dev);
694 + platform_device_register(>a01_pm_gsm_dev);
696 + switch (system_rev) {
697 + case GTA01v3_SYSTEM_REV:
698 + case GTA01v4_SYSTEM_REV:
699 + /* just use the default (GTA01_IRQ_PCF50606) */
701 + case GTA01Bv2_SYSTEM_REV:
702 + case GTA01Bv3_SYSTEM_REV:
703 + /* just use the default (GTA01_IRQ_PCF50606) */
704 + gta01_led_resources[0].start =
705 + gta01_led_resources[0].end = GTA01Bv2_GPIO_VIBRATOR_ON;
707 + case GTA01Bv4_SYSTEM_REV:
708 + gta01_pmu_resources[0].start =
709 + gta01_pmu_resources[0].end = GTA01Bv4_IRQ_PCF50606;
710 + gta01_led_resources[0].start =
711 + gta01_led_resources[0].end = GTA01Bv4_GPIO_VIBRATOR_ON;
714 + mangle_pmu_pdata_by_system_rev();
715 + platform_device_register(>a01_pmu_dev);
716 + platform_device_register(>a01_led_dev);
718 + platform_add_devices(gta01_devices, ARRAY_SIZE(gta01_devices));
722 + set_irq_type(GTA01_IRQ_MODEM, IRQT_RISING);
723 + rc = request_irq(GTA01_IRQ_MODEM, gta01_modem_irq, IRQF_DISABLED,
726 + printk(KERN_ERR "GTA01: can't request GSM modem wakeup IRQ\n");
727 + enable_irq_wake(GTA01_IRQ_MODEM);
730 +MACHINE_START(NEO1973_GTA01, "GTA01")
731 + .phys_io = S3C2410_PA_UART,
732 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
733 + .boot_params = S3C2410_SDRAM_PA + 0x100,
734 + .map_io = gta01_map_io,
735 + .init_irq = s3c24xx_init_irq,
736 + .init_machine = gta01_machine_init,
737 + .timer = &s3c24xx_timer,
739 diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
740 index b66fb3c..7ee4b82 100644
741 --- a/arch/arm/plat-s3c24xx/Kconfig
742 +++ b/arch/arm/plat-s3c24xx/Kconfig
743 @@ -46,4 +46,9 @@ config MACH_SMDK
745 Common machine code for SMDK2410 and SMDK2440
750 + Common machine code for Neo1973 hardware
753 diff --git a/include/asm-arm/arch-s3c2410/gta01.h b/include/asm-arm/arch-s3c2410/gta01.h
755 index 0000000..1cc2099
757 +++ b/include/asm-arm/arch-s3c2410/gta01.h
762 +#include <asm/arch/regs-gpio.h>
763 +#include <asm/arch/irqs.h>
765 +/* Different hardware revisions, passed in ATAG_REVISION by u-boot */
766 +#define GTA01v3_SYSTEM_REV 0x00000130
767 +#define GTA01v4_SYSTEM_REV 0x00000140
768 +#define GTA01Bv2_SYSTEM_REV 0x00000220
769 +#define GTA01Bv3_SYSTEM_REV 0x00000230
770 +#define GTA01Bv4_SYSTEM_REV 0x00000240
773 +struct gta01bl_machinfo {
774 + unsigned int default_intensity;
775 + unsigned int max_intensity;
776 + unsigned int limit_mask;
779 +/* Definitions common to all revisions */
780 +#define GTA01_GPIO_BACKLIGHT S3C2410_GPB0
781 +#define GTA01_GPIO_GPS_PWRON S3C2410_GPB1
782 +#define GTA01_GPIO_MODEM_RST S3C2410_GPB6
783 +#define GTA01_GPIO_MODEM_ON S3C2410_GPB7
784 +#define GTA01_GPIO_LCD_RESET S3C2410_GPC6
785 +#define GTA01_GPIO_PMU_IRQ S3C2410_GPG8
786 +#define GTA01_GPIO_JACK_INSERT S3C2410_GPF4
787 +#define GTA01_GPIO_nSD_DETECT S3C2410_GPF5
788 +#define GTA01_GPIO_AUX_KEY S3C2410_GPF6
789 +#define GTA01_GPIO_HOLD_KEY S3C2410_GPF7
790 +#define GTA01_GPIO_VIBRATOR_ON S3C2410_GPG11
792 +#define GTA01_IRQ_MODEM IRQ_EINT1
793 +#define GTA01_IRQ_JACK_INSERT IRQ_EINT4
794 +#define GTA01_IRQ_nSD_DETECT IRQ_EINT5
795 +#define GTA01_IRQ_AUX_KEY IRQ_EINT6
796 +#define GTA01_IRQ_PCF50606 IRQ_EINT16
799 +#define GTA01v3_GPIO_nGSM_EN S3C2410_GPG9
802 +#define GTA01_GPIO_MODEM_DNLOAD S3C2410_GPG0
805 +#define GTA01Bv2_GPIO_nGSM_EN S3C2410_GPF2
806 +#define GTA01Bv2_GPIO_VIBRATOR_ON S3C2410_GPB10
809 +#define GTA01_GPIO_GPS_EN_3V3 S3C2410_GPG9
811 +#define GTA01_GPIO_SDMMC_ON S3C2410_GPB2
812 +#define GTA01_GPIO_BT_EN S3C2410_GPB5
813 +#define GTA01_GPIO_AB_DETECT S3C2410_GPB8
814 +#define GTA01_GPIO_USB_PULLUP S3C2410_GPB9
815 +#define GTA01_GPIO_USB_ATTACH S3C2410_GPB10
817 +#define GTA01_GPIO_GPS_EN_2V8 S3C2410_GPG9
818 +#define GTA01_GPIO_GPS_EN_3V S3C2410_GPG10
819 +#define GTA01_GPIO_GPS_RESET S3C2410_GPC0
822 +#define GTA01Bv4_GPIO_nNAND_WP S3C2410_GPA16
823 +#define GTA01Bv4_GPIO_VIBRATOR_ON S3C2410_GPB3
824 +#define GTA01Bv4_GPIO_PMU_IRQ S3C2410_GPG1
826 +#define GTA01Bv4_IRQ_PCF50606 IRQ_EINT9
828 +#endif /* _GTA01_H */