Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tavorevb3.c
Go to the documentation of this file.
1 /*
2  * linux/arch/arm/mach-pxa/tavorevb3.c
3  *
4  * Support for the Marvell EVB3 Development Platform.
5  *
6  * Copyright: (C) Copyright 2008-2010 Marvell International Ltd.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * publishhed by the Free Software Foundation.
11  */
12 
13 #include <linux/init.h>
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/interrupt.h>
17 #include <linux/i2c.h>
18 #include <linux/i2c/pxa-i2c.h>
19 #include <linux/gpio.h>
20 #include <linux/mfd/88pm860x.h>
21 
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 
25 #include <mach/pxa930.h>
26 
27 #include "devices.h"
28 #include "generic.h"
29 
30 #define TAVOREVB3_NR_IRQS (IRQ_BOARD_START + 24)
31 
32 static mfp_cfg_t evb3_mfp_cfg[] __initdata = {
33  /* UART */
36 
37  /* PMIC */
39 };
40 
41 #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
42 static struct pm860x_touch_pdata evb3_touch = {
43  .gpadc_prebias = 1,
44  .slot_cycle = 1,
45  .tsi_prebias = 6,
46  .pen_prebias = 16,
47  .pen_prechg = 2,
48  .res_x = 300,
49 };
50 
51 static struct pm860x_backlight_pdata evb3_backlight[] = {
52  {
53  .id = PM8606_ID_BACKLIGHT,
54  .iset = PM8606_WLED_CURRENT(24),
55  .flags = PM8606_BACKLIGHT1,
56  },
57  {},
58 };
59 
60 static struct pm860x_led_pdata evb3_led[] = {
61  {
62  .id = PM8606_ID_LED,
63  .iset = PM8606_LED_CURRENT(12),
64  .flags = PM8606_LED1_RED,
65  }, {
66  .id = PM8606_ID_LED,
67  .iset = PM8606_LED_CURRENT(12),
68  .flags = PM8606_LED1_GREEN,
69  }, {
70  .id = PM8606_ID_LED,
71  .iset = PM8606_LED_CURRENT(12),
72  .flags = PM8606_LED1_BLUE,
73  }, {
74  .id = PM8606_ID_LED,
75  .iset = PM8606_LED_CURRENT(12),
76  .flags = PM8606_LED2_RED,
77  }, {
78  .id = PM8606_ID_LED,
79  .iset = PM8606_LED_CURRENT(12),
80  .flags = PM8606_LED2_GREEN,
81  }, {
82  .id = PM8606_ID_LED,
83  .iset = PM8606_LED_CURRENT(12),
84  .flags = PM8606_LED2_BLUE,
85  },
86 };
87 
88 static struct pm860x_platform_data evb3_pm8607_info = {
89  .touch = &evb3_touch,
90  .backlight = &evb3_backlight[0],
91  .led = &evb3_led[0],
92  .companion_addr = 0x10,
93  .irq_mode = 0,
94  .irq_base = IRQ_BOARD_START,
95 
96  .i2c_port = GI2C_PORT,
97 };
98 
99 static struct i2c_board_info evb3_i2c_info[] = {
100  {
101  .type = "88PM860x",
102  .addr = 0x34,
103  .platform_data = &evb3_pm8607_info,
105  },
106 };
107 
108 static void __init evb3_init_i2c(void)
109 {
111  i2c_register_board_info(0, ARRAY_AND_SIZE(evb3_i2c_info));
112 }
113 #else
114 static inline void evb3_init_i2c(void) {}
115 #endif
116 
117 static void __init evb3_init(void)
118 {
119  /* initialize MFP configurations */
120  pxa3xx_mfp_config(ARRAY_AND_SIZE(evb3_mfp_cfg));
121 
123 
124  evb3_init_i2c();
125 }
126 
127 MACHINE_START(TAVOREVB3, "PXA950 Evaluation Board (aka TavorEVB3)")
128  .atag_offset = 0x100,
129  .map_io = pxa3xx_map_io,
130  .nr_irqs = TAVOREVB3_NR_IRQS,
131  .init_irq = pxa3xx_init_irq,
132  .handle_irq = pxa3xx_handle_irq,
133  .timer = &pxa_timer,
134  .init_machine = evb3_init,
135  .restart = pxa_restart,