Root/
1 | /* |
2 | * linux/arch/arm/mach-mmp/teton_bga.c |
3 | * |
4 | * Support for the Marvell PXA168 Teton BGA Development Platform. |
5 | * |
6 | * Author: Mark F. Brown <mark.brown314@gmail.com> |
7 | * |
8 | * This code is based on aspenite.c |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2 as |
12 | * publishhed by the Free Software Foundation. |
13 | */ |
14 | |
15 | #include <linux/init.h> |
16 | #include <linux/kernel.h> |
17 | #include <linux/platform_device.h> |
18 | #include <linux/gpio.h> |
19 | #include <linux/input.h> |
20 | #include <plat/pxa27x_keypad.h> |
21 | #include <linux/i2c.h> |
22 | |
23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> |
25 | #include <mach/addr-map.h> |
26 | #include <mach/mfp-pxa168.h> |
27 | #include <mach/pxa168.h> |
28 | #include <mach/teton_bga.h> |
29 | |
30 | #include "common.h" |
31 | |
32 | static unsigned long teton_bga_pin_config[] __initdata = { |
33 | /* UART1 */ |
34 | GPIO107_UART1_TXD, |
35 | GPIO108_UART1_RXD, |
36 | |
37 | /* Keypad */ |
38 | GPIO109_KP_MKIN1, |
39 | GPIO110_KP_MKIN0, |
40 | GPIO111_KP_MKOUT7, |
41 | GPIO112_KP_MKOUT6, |
42 | |
43 | /* I2C Bus */ |
44 | GPIO105_CI2C_SDA, |
45 | GPIO106_CI2C_SCL, |
46 | |
47 | /* RTC */ |
48 | GPIO78_GPIO, |
49 | }; |
50 | |
51 | static unsigned int teton_bga_matrix_key_map[] = { |
52 | KEY(0, 6, KEY_ESC), |
53 | KEY(0, 7, KEY_ENTER), |
54 | KEY(1, 6, KEY_LEFT), |
55 | KEY(1, 7, KEY_RIGHT), |
56 | }; |
57 | |
58 | static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = { |
59 | .matrix_key_rows = 2, |
60 | .matrix_key_cols = 8, |
61 | .matrix_key_map = teton_bga_matrix_key_map, |
62 | .matrix_key_map_size = ARRAY_SIZE(teton_bga_matrix_key_map), |
63 | .debounce_interval = 30, |
64 | }; |
65 | |
66 | static struct i2c_board_info teton_bga_i2c_info[] __initdata = { |
67 | { |
68 | I2C_BOARD_INFO("ds1337", 0x68), |
69 | .irq = gpio_to_irq(RTC_INT_GPIO) |
70 | }, |
71 | }; |
72 | |
73 | static void __init teton_bga_init(void) |
74 | { |
75 | mfp_config(ARRAY_AND_SIZE(teton_bga_pin_config)); |
76 | |
77 | /* on-chip devices */ |
78 | pxa168_add_uart(1); |
79 | pxa168_add_keypad(&teton_bga_keypad_info); |
80 | pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(teton_bga_i2c_info)); |
81 | } |
82 | |
83 | MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform") |
84 | .map_io = mmp_map_io, |
85 | .nr_irqs = IRQ_BOARD_START, |
86 | .init_irq = pxa168_init_irq, |
87 | .timer = &pxa168_timer, |
88 | .init_machine = teton_bga_init, |
89 | MACHINE_END |
90 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9