aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/Kconfig7
-rw-r--r--arch/arm/mach-mmp/Makefile1
-rw-r--r--arch/arm/mach-mmp/clock.c15
-rw-r--r--arch/arm/mach-mmp/clock.h1
-rw-r--r--arch/arm/mach-mmp/gplugd.c189
-rw-r--r--arch/arm/mach-mmp/include/mach/clkdev.h7
-rw-r--r--arch/arm/mach-mmp/include/mach/mfp-gplugd.h52
-rw-r--r--arch/arm/mach-mmp/include/mach/mfp-pxa168.h19
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa168.h8
-rw-r--r--arch/arm/mach-mmp/include/mach/regs-apmu.h1
-rw-r--r--arch/arm/mach-mmp/pxa168.c6
-rw-r--r--arch/arm/mach-mmp/ttc_dkb.c31
12 files changed, 329 insertions, 8 deletions
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig
index 67793a69027..56ef5f6c811 100644
--- a/arch/arm/mach-mmp/Kconfig
+++ b/arch/arm/mach-mmp/Kconfig
@@ -77,6 +77,13 @@ config MACH_TETON_BGA
77 Say 'Y' here if you want to support the Marvell PXA168-based 77 Say 'Y' here if you want to support the Marvell PXA168-based
78 Teton BGA Development Board. 78 Teton BGA Development Board.
79 79
80config MACH_SHEEVAD
81 bool "Marvell's PXA168 GuruPlug Display (gplugD) Board"
82 select CPU_PXA168
83 help
84 Say 'Y' here if you want to support the Marvell PXA168-based
85 GuruPlug Display (gplugD) Board
86
80endmenu 87endmenu
81 88
82config CPU_PXA168 89config CPU_PXA168
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile
index 5c68382141a..b0ac942327a 100644
--- a/arch/arm/mach-mmp/Makefile
+++ b/arch/arm/mach-mmp/Makefile
@@ -19,3 +19,4 @@ obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o
19obj-$(CONFIG_MACH_FLINT) += flint.o 19obj-$(CONFIG_MACH_FLINT) += flint.o
20obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o 20obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o
21obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o 21obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o
22obj-$(CONFIG_MACH_SHEEVAD) += gplugd.o
diff --git a/arch/arm/mach-mmp/clock.c b/arch/arm/mach-mmp/clock.c
index 886e05648f0..7c6f95f2914 100644
--- a/arch/arm/mach-mmp/clock.c
+++ b/arch/arm/mach-mmp/clock.c
@@ -88,3 +88,18 @@ unsigned long clk_get_rate(struct clk *clk)
88 return rate; 88 return rate;
89} 89}
90EXPORT_SYMBOL(clk_get_rate); 90EXPORT_SYMBOL(clk_get_rate);
91
92int clk_set_rate(struct clk *clk, unsigned long rate)
93{
94 unsigned long flags;
95 int ret = -EINVAL;
96
97 if (clk->ops->setrate) {
98 spin_lock_irqsave(&clocks_lock, flags);
99 ret = clk->ops->setrate(clk, rate);
100 spin_unlock_irqrestore(&clocks_lock, flags);
101 }
102
103 return ret;
104}
105EXPORT_SYMBOL(clk_set_rate);
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h
index 9b027d7491f..3143e994e67 100644
--- a/arch/arm/mach-mmp/clock.h
+++ b/arch/arm/mach-mmp/clock.h
@@ -12,6 +12,7 @@ struct clkops {
12 void (*enable)(struct clk *); 12 void (*enable)(struct clk *);
13 void (*disable)(struct clk *); 13 void (*disable)(struct clk *);
14 unsigned long (*getrate)(struct clk *); 14 unsigned long (*getrate)(struct clk *);
15 int (*setrate)(struct clk *, unsigned long);
15}; 16};
16 17
17struct clk { 18struct clk {
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c
new file mode 100644
index 00000000000..c070c24255f
--- /dev/null
+++ b/arch/arm/mach-mmp/gplugd.c
@@ -0,0 +1,189 @@
1/*
2 * linux/arch/arm/mach-mmp/gplugd.c
3 *
4 * Support for the Marvell PXA168-based GuruPlug Display (gplugD) Platform.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * publishhed by the Free Software Foundation.
9 */
10
11#include <linux/init.h>
12
13#include <asm/mach/arch.h>
14#include <asm/mach-types.h>
15
16#include <mach/gpio.h>
17#include <mach/pxa168.h>
18#include <mach/mfp-pxa168.h>
19#include <mach/mfp-gplugd.h>
20
21#include "common.h"
22
23static unsigned long gplugd_pin_config[] __initdata = {
24 /* UART3 */
25 GPIO8_UART3_SOUT,
26 GPIO9_UART3_SIN,
27 GPI1O_UART3_CTS,
28 GPI11_UART3_RTS,
29
30 /* MMC2 */
31 GPIO28_MMC2_CMD,
32 GPIO29_MMC2_CLK,
33 GPIO30_MMC2_DAT0,
34 GPIO31_MMC2_DAT1,
35 GPIO32_MMC2_DAT2,
36 GPIO33_MMC2_DAT3,
37
38 /* LCD & HDMI clock selection GPIO: 0: 74.176MHz, 1: 74.25 MHz */
39 GPIO35_GPIO,
40 GPIO36_GPIO, /* CEC Interrupt */
41
42 /* MMC1 */
43 GPIO43_MMC1_CLK,
44 GPIO49_MMC1_CMD,
45 GPIO41_MMC1_DAT0,
46 GPIO40_MMC1_DAT1,
47 GPIO52_MMC1_DAT2,
48 GPIO51_MMC1_DAT3,
49 GPIO53_MMC1_CD,
50
51 /* LCD */
52 GPIO56_LCD_FCLK_RD,
53 GPIO57_LCD_LCLK_A0,
54 GPIO58_LCD_PCLK_WR,
55 GPIO59_LCD_DENA_BIAS,
56 GPIO60_LCD_DD0,
57 GPIO61_LCD_DD1,
58 GPIO62_LCD_DD2,
59 GPIO63_LCD_DD3,
60 GPIO64_LCD_DD4,
61 GPIO65_LCD_DD5,
62 GPIO66_LCD_DD6,
63 GPIO67_LCD_DD7,
64 GPIO68_LCD_DD8,
65 GPIO69_LCD_DD9,
66 GPIO70_LCD_DD10,
67 GPIO71_LCD_DD11,
68 GPIO72_LCD_DD12,
69 GPIO73_LCD_DD13,
70 GPIO74_LCD_DD14,
71 GPIO75_LCD_DD15,
72 GPIO76_LCD_DD16,
73 GPIO77_LCD_DD17,
74 GPIO78_LCD_DD18,
75 GPIO79_LCD_DD19,
76 GPIO80_LCD_DD20,
77 GPIO81_LCD_DD21,
78 GPIO82_LCD_DD22,
79 GPIO83_LCD_DD23,
80
81 /* GPIO */
82 GPIO84_GPIO,
83 GPIO85_GPIO,
84
85 /* Fast-Ethernet*/
86 GPIO86_TX_CLK,
87 GPIO87_TX_EN,
88 GPIO88_TX_DQ3,
89 GPIO89_TX_DQ2,
90 GPIO90_TX_DQ1,
91 GPIO91_TX_DQ0,
92 GPIO92_MII_CRS,
93 GPIO93_MII_COL,
94 GPIO94_RX_CLK,
95 GPIO95_RX_ER,
96 GPIO96_RX_DQ3,
97 GPIO97_RX_DQ2,
98 GPIO98_RX_DQ1,
99 GPIO99_RX_DQ0,
100 GPIO100_MII_MDC,
101 GPIO101_MII_MDIO,
102 GPIO103_RX_DV,
103 GPIO104_GPIO, /* Reset PHY */
104
105 /* RTC interrupt */
106 GPIO102_GPIO,
107
108 /* I2C */
109 GPIO105_CI2C_SDA,
110 GPIO106_CI2C_SCL,
111
112 /* Select JTAG */
113 GPIO109_GPIO,
114
115 /* I2S */
116 GPIO114_I2S_FRM,
117 GPIO115_I2S_BCLK,
118 GPIO116_I2S_TXD
119};
120
121static struct i2c_board_info gplugd_i2c_board_info[] = {
122 {
123 .type = "isl1208",
124 .addr = 0x6F,
125 }
126};
127
128/* Bring PHY out of reset by setting GPIO 104 */
129static int gplugd_eth_init(void)
130{
131 if (unlikely(gpio_request(104, "ETH_RESET_N"))) {
132 printk(KERN_ERR "Can't get hold of GPIO 104 to bring Ethernet "
133 "PHY out of reset\n");
134 return -EIO;
135 }
136
137 gpio_direction_output(104, 1);
138 gpio_free(104);
139 return 0;
140}
141
142struct pxa168_eth_platform_data gplugd_eth_platform_data = {
143 .port_number = 0,
144 .phy_addr = 0,
145 .speed = 0, /* Autonagotiation */
146 .init = gplugd_eth_init,
147};
148
149static void __init select_disp_freq(void)
150{
151 /* set GPIO 35 & clear GPIO 85 to set LCD External Clock to 74.25 MHz */
152 if (unlikely(gpio_request(35, "DISP_FREQ_SEL"))) {
153 printk(KERN_ERR "Can't get hold of GPIO 35 to select display "
154 "frequency\n");
155 } else {
156 gpio_direction_output(35, 1);
157 gpio_free(104);
158 }
159
160 if (unlikely(gpio_request(85, "DISP_FREQ_SEL_2"))) {
161 printk(KERN_ERR "Can't get hold of GPIO 85 to select display "
162 "frequency\n");
163 } else {
164 gpio_direction_output(85, 0);
165 gpio_free(104);
166 }
167}
168
169static void __init gplugd_init(void)
170{
171 mfp_config(ARRAY_AND_SIZE(gplugd_pin_config));
172
173 select_disp_freq();
174
175 /* on-chip devices */
176 pxa168_add_uart(3);
177 pxa168_add_ssp(0);
178 pxa168_add_twsi(0, NULL, ARRAY_AND_SIZE(gplugd_i2c_board_info));
179
180 pxa168_add_eth(&gplugd_eth_platform_data);
181}
182
183MACHINE_START(SHEEVAD, "PXA168-based GuruPlug Display (gplugD) Platform")
184 .map_io = mmp_map_io,
185 .nr_irqs = IRQ_BOARD_START,
186 .init_irq = pxa168_init_irq,
187 .timer = &pxa168_timer,
188 .init_machine = gplugd_init,
189MACHINE_END
diff --git a/arch/arm/mach-mmp/include/mach/clkdev.h b/arch/arm/mach-mmp/include/mach/clkdev.h
deleted file mode 100644
index 2fb354e54e0..00000000000
--- a/arch/arm/mach-mmp/include/mach/clkdev.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_MACH_CLKDEV_H
2#define __ASM_MACH_CLKDEV_H
3
4#define __clk_get(clk) ({ 1; })
5#define __clk_put(clk) do { } while (0)
6
7#endif /* __ASM_MACH_CLKDEV_H */
diff --git a/arch/arm/mach-mmp/include/mach/mfp-gplugd.h b/arch/arm/mach-mmp/include/mach/mfp-gplugd.h
new file mode 100644
index 00000000000..b8cf38d8560
--- /dev/null
+++ b/arch/arm/mach-mmp/include/mach/mfp-gplugd.h
@@ -0,0 +1,52 @@
1/*
2 * linux/arch/arm/mach-mmp/include/mach/mfp-gplugd.h
3 *
4 * MFP definitions used in gplugD
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __MACH_MFP_GPLUGD_H
12#define __MACH_MFP_GPLUGD_H
13
14#include <plat/mfp.h>
15#include <mach/mfp.h>
16
17/* UART3 */
18#define GPIO8_UART3_SOUT MFP_CFG(GPIO8, AF2)
19#define GPIO9_UART3_SIN MFP_CFG(GPIO9, AF2)
20#define GPI1O_UART3_CTS MFP_CFG(GPIO10, AF2)
21#define GPI11_UART3_RTS MFP_CFG(GPIO11, AF2)
22
23/* MMC2 */
24#define GPIO28_MMC2_CMD MFP_CFG_DRV(GPIO28, AF6, FAST)
25#define GPIO29_MMC2_CLK MFP_CFG_DRV(GPIO29, AF6, FAST)
26#define GPIO30_MMC2_DAT0 MFP_CFG_DRV(GPIO30, AF6, FAST)
27#define GPIO31_MMC2_DAT1 MFP_CFG_DRV(GPIO31, AF6, FAST)
28#define GPIO32_MMC2_DAT2 MFP_CFG_DRV(GPIO32, AF6, FAST)
29#define GPIO33_MMC2_DAT3 MFP_CFG_DRV(GPIO33, AF6, FAST)
30
31/* I2S */
32#undef GPIO114_I2S_FRM
33#undef GPIO115_I2S_BCLK
34
35#define GPIO114_I2S_FRM MFP_CFG_DRV(GPIO114, AF1, FAST)
36#define GPIO115_I2S_BCLK MFP_CFG_DRV(GPIO115, AF1, FAST)
37#define GPIO116_I2S_TXD MFP_CFG_DRV(GPIO116, AF1, FAST)
38
39/* MMC4 */
40#define GPIO125_MMC4_DAT3 MFP_CFG_DRV(GPIO125, AF7, FAST)
41#define GPIO126_MMC4_DAT2 MFP_CFG_DRV(GPIO126, AF7, FAST)
42#define GPIO127_MMC4_DAT1 MFP_CFG_DRV(GPIO127, AF7, FAST)
43#define GPIO0_2_MMC4_DAT0 MFP_CFG_DRV(GPIO0_2, AF7, FAST)
44#define GPIO1_2_MMC4_CMD MFP_CFG_DRV(GPIO1_2, AF7, FAST)
45#define GPIO2_2_MMC4_CLK MFP_CFG_DRV(GPIO2_2, AF7, FAST)
46
47/* OTG GPIO */
48#define GPIO_USB_OTG_PEN 18
49#define GPIO_USB_OIDIR 20
50
51/* Other GPIOs are 35, 84, 85 */
52#endif /* __MACH_MFP_GPLUGD_H */
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
index 713be155a44..8c782328b21 100644
--- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h
@@ -305,4 +305,23 @@
305#define GPIO112_KP_MKOUT6 MFP_CFG(GPIO112, AF7) 305#define GPIO112_KP_MKOUT6 MFP_CFG(GPIO112, AF7)
306#define GPIO121_KP_MKIN4 MFP_CFG(GPIO121, AF7) 306#define GPIO121_KP_MKIN4 MFP_CFG(GPIO121, AF7)
307 307
308/* Fast Ethernet */
309#define GPIO86_TX_CLK MFP_CFG(GPIO86, AF5)
310#define GPIO87_TX_EN MFP_CFG(GPIO87, AF5)
311#define GPIO88_TX_DQ3 MFP_CFG(GPIO88, AF5)
312#define GPIO89_TX_DQ2 MFP_CFG(GPIO89, AF5)
313#define GPIO90_TX_DQ1 MFP_CFG(GPIO90, AF5)
314#define GPIO91_TX_DQ0 MFP_CFG(GPIO91, AF5)
315#define GPIO92_MII_CRS MFP_CFG(GPIO92, AF5)
316#define GPIO93_MII_COL MFP_CFG(GPIO93, AF5)
317#define GPIO94_RX_CLK MFP_CFG(GPIO94, AF5)
318#define GPIO95_RX_ER MFP_CFG(GPIO95, AF5)
319#define GPIO96_RX_DQ3 MFP_CFG(GPIO96, AF5)
320#define GPIO97_RX_DQ2 MFP_CFG(GPIO97, AF5)
321#define GPIO98_RX_DQ1 MFP_CFG(GPIO98, AF5)
322#define GPIO99_RX_DQ0 MFP_CFG(GPIO99, AF5)
323#define GPIO100_MII_MDC MFP_CFG(GPIO100, AF5)
324#define GPIO101_MII_MDIO MFP_CFG(GPIO101, AF5)
325#define GPIO103_RX_DV MFP_CFG(GPIO103, AF5)
326
308#endif /* __ASM_MACH_MFP_PXA168_H */ 327#endif /* __ASM_MACH_MFP_PXA168_H */
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index a52b3d2f325..7f005843a70 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -14,9 +14,11 @@ extern void pxa168_clear_keypad_wakeup(void);
14#include <video/pxa168fb.h> 14#include <video/pxa168fb.h>
15#include <plat/pxa27x_keypad.h> 15#include <plat/pxa27x_keypad.h>
16#include <mach/cputype.h> 16#include <mach/cputype.h>
17#include <linux/pxa168_eth.h>
17 18
18extern struct pxa_device_desc pxa168_device_uart1; 19extern struct pxa_device_desc pxa168_device_uart1;
19extern struct pxa_device_desc pxa168_device_uart2; 20extern struct pxa_device_desc pxa168_device_uart2;
21extern struct pxa_device_desc pxa168_device_uart3;
20extern struct pxa_device_desc pxa168_device_twsi0; 22extern struct pxa_device_desc pxa168_device_twsi0;
21extern struct pxa_device_desc pxa168_device_twsi1; 23extern struct pxa_device_desc pxa168_device_twsi1;
22extern struct pxa_device_desc pxa168_device_pwm1; 24extern struct pxa_device_desc pxa168_device_pwm1;
@@ -31,6 +33,7 @@ extern struct pxa_device_desc pxa168_device_ssp5;
31extern struct pxa_device_desc pxa168_device_nand; 33extern struct pxa_device_desc pxa168_device_nand;
32extern struct pxa_device_desc pxa168_device_fb; 34extern struct pxa_device_desc pxa168_device_fb;
33extern struct pxa_device_desc pxa168_device_keypad; 35extern struct pxa_device_desc pxa168_device_keypad;
36extern struct pxa_device_desc pxa168_device_eth;
34 37
35static inline int pxa168_add_uart(int id) 38static inline int pxa168_add_uart(int id)
36{ 39{
@@ -39,6 +42,7 @@ static inline int pxa168_add_uart(int id)
39 switch (id) { 42 switch (id) {
40 case 1: d = &pxa168_device_uart1; break; 43 case 1: d = &pxa168_device_uart1; break;
41 case 2: d = &pxa168_device_uart2; break; 44 case 2: d = &pxa168_device_uart2; break;
45 case 3: d = &pxa168_device_uart3; break;
42 } 46 }
43 47
44 if (d == NULL) 48 if (d == NULL)
@@ -117,4 +121,8 @@ static inline int pxa168_add_keypad(struct pxa27x_keypad_platform_data *data)
117 return pxa_register_device(&pxa168_device_keypad, data, sizeof(*data)); 121 return pxa_register_device(&pxa168_device_keypad, data, sizeof(*data));
118} 122}
119 123
124static inline int pxa168_add_eth(struct pxa168_eth_platform_data *data)
125{
126 return pxa_register_device(&pxa168_device_eth, data, sizeof(*data));
127}
120#endif /* __ASM_MACH_PXA168_H */ 128#endif /* __ASM_MACH_PXA168_H */
diff --git a/arch/arm/mach-mmp/include/mach/regs-apmu.h b/arch/arm/mach-mmp/include/mach/regs-apmu.h
index f7011ef70bf..8447ac63e28 100644
--- a/arch/arm/mach-mmp/include/mach/regs-apmu.h
+++ b/arch/arm/mach-mmp/include/mach/regs-apmu.h
@@ -29,6 +29,7 @@
29#define APMU_BUS APMU_REG(0x06c) 29#define APMU_BUS APMU_REG(0x06c)
30#define APMU_SDH2 APMU_REG(0x0e8) 30#define APMU_SDH2 APMU_REG(0x0e8)
31#define APMU_SDH3 APMU_REG(0x0ec) 31#define APMU_SDH3 APMU_REG(0x0ec)
32#define APMU_ETH APMU_REG(0x0fc)
32 33
33#define APMU_FNCLK_EN (1 << 4) 34#define APMU_FNCLK_EN (1 << 4)
34#define APMU_AXICLK_EN (1 << 3) 35#define APMU_AXICLK_EN (1 << 3)
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index ab9f999106c..0156f535dae 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -66,6 +66,7 @@ void __init pxa168_init_irq(void)
66/* APB peripheral clocks */ 66/* APB peripheral clocks */
67static APBC_CLK(uart1, PXA168_UART1, 1, 14745600); 67static APBC_CLK(uart1, PXA168_UART1, 1, 14745600);
68static APBC_CLK(uart2, PXA168_UART2, 1, 14745600); 68static APBC_CLK(uart2, PXA168_UART2, 1, 14745600);
69static APBC_CLK(uart3, PXA168_UART3, 1, 14745600);
69static APBC_CLK(twsi0, PXA168_TWSI0, 1, 33000000); 70static APBC_CLK(twsi0, PXA168_TWSI0, 1, 33000000);
70static APBC_CLK(twsi1, PXA168_TWSI1, 1, 33000000); 71static APBC_CLK(twsi1, PXA168_TWSI1, 1, 33000000);
71static APBC_CLK(pwm1, PXA168_PWM1, 1, 13000000); 72static APBC_CLK(pwm1, PXA168_PWM1, 1, 13000000);
@@ -81,11 +82,13 @@ static APBC_CLK(keypad, PXA168_KPC, 0, 32000);
81 82
82static APMU_CLK(nand, NAND, 0x19b, 156000000); 83static APMU_CLK(nand, NAND, 0x19b, 156000000);
83static APMU_CLK(lcd, LCD, 0x7f, 312000000); 84static APMU_CLK(lcd, LCD, 0x7f, 312000000);
85static APMU_CLK(eth, ETH, 0x09, 0);
84 86
85/* device and clock bindings */ 87/* device and clock bindings */
86static struct clk_lookup pxa168_clkregs[] = { 88static struct clk_lookup pxa168_clkregs[] = {
87 INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), 89 INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
88 INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL), 90 INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL),
91 INIT_CLKREG(&clk_uart3, "pxa2xx-uart.2", NULL),
89 INIT_CLKREG(&clk_twsi0, "pxa2xx-i2c.0", NULL), 92 INIT_CLKREG(&clk_twsi0, "pxa2xx-i2c.0", NULL),
90 INIT_CLKREG(&clk_twsi1, "pxa2xx-i2c.1", NULL), 93 INIT_CLKREG(&clk_twsi1, "pxa2xx-i2c.1", NULL),
91 INIT_CLKREG(&clk_pwm1, "pxa168-pwm.0", NULL), 94 INIT_CLKREG(&clk_pwm1, "pxa168-pwm.0", NULL),
@@ -100,6 +103,7 @@ static struct clk_lookup pxa168_clkregs[] = {
100 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), 103 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
101 INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL), 104 INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL),
102 INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL), 105 INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL),
106 INIT_CLKREG(&clk_eth, "pxa168-eth", "MFUCLK"),
103}; 107};
104 108
105static int __init pxa168_init(void) 109static int __init pxa168_init(void)
@@ -149,6 +153,7 @@ void pxa168_clear_keypad_wakeup(void)
149/* on-chip devices */ 153/* on-chip devices */
150PXA168_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4017000, 0x30, 21, 22); 154PXA168_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4017000, 0x30, 21, 22);
151PXA168_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4018000, 0x30, 23, 24); 155PXA168_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4018000, 0x30, 23, 24);
156PXA168_DEVICE(uart3, "pxa2xx-uart", 2, UART3, 0xd4026000, 0x30, 23, 24);
152PXA168_DEVICE(twsi0, "pxa2xx-i2c", 0, TWSI0, 0xd4011000, 0x28); 157PXA168_DEVICE(twsi0, "pxa2xx-i2c", 0, TWSI0, 0xd4011000, 0x28);
153PXA168_DEVICE(twsi1, "pxa2xx-i2c", 1, TWSI1, 0xd4025000, 0x28); 158PXA168_DEVICE(twsi1, "pxa2xx-i2c", 1, TWSI1, 0xd4025000, 0x28);
154PXA168_DEVICE(pwm1, "pxa168-pwm", 0, NONE, 0xd401a000, 0x10); 159PXA168_DEVICE(pwm1, "pxa168-pwm", 0, NONE, 0xd401a000, 0x10);
@@ -163,3 +168,4 @@ PXA168_DEVICE(ssp4, "pxa168-ssp", 3, SSP4, 0xd4020000, 0x40, 58, 59);
163PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61); 168PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61);
164PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); 169PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8);
165PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); 170PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c);
171PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff);
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index e411039ea59..6bd37a27e5f 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -15,6 +15,8 @@
15#include <linux/mtd/partitions.h> 15#include <linux/mtd/partitions.h>
16#include <linux/mtd/onenand.h> 16#include <linux/mtd/onenand.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/i2c/pca953x.h>
19#include <linux/gpio.h>
18 20
19#include <asm/mach-types.h> 21#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
@@ -25,7 +27,17 @@
25 27
26#include "common.h" 28#include "common.h"
27 29
28#define TTCDKB_NR_IRQS (IRQ_BOARD_START + 24) 30#define TTCDKB_GPIO_EXT0(x) (NR_BUILTIN_GPIO + ((x < 0) ? 0 : \
31 ((x < 16) ? x : 15)))
32#define TTCDKB_GPIO_EXT1(x) (NR_BUILTIN_GPIO + 16 + ((x < 0) ? 0 : \
33 ((x < 16) ? x : 15)))
34
35/*
36 * 16 board interrupts -- MAX7312 GPIO expander
37 * 16 board interrupts -- PCA9575 GPIO expander
38 * 24 board interrupts -- 88PM860x PMIC
39 */
40#define TTCDKB_NR_IRQS (IRQ_BOARD_START + 16 + 16 + 24)
29 41
30static unsigned long ttc_dkb_pin_config[] __initdata = { 42static unsigned long ttc_dkb_pin_config[] __initdata = {
31 /* UART2 */ 43 /* UART2 */
@@ -113,6 +125,22 @@ static struct platform_device *ttc_dkb_devices[] = {
113 &ttc_dkb_device_onenand, 125 &ttc_dkb_device_onenand,
114}; 126};
115 127
128static struct pca953x_platform_data max7312_data[] = {
129 {
130 .gpio_base = TTCDKB_GPIO_EXT0(0),
131 .irq_base = IRQ_BOARD_START,
132 },
133};
134
135static struct i2c_board_info ttc_dkb_i2c_info[] = {
136 {
137 .type = "max7312",
138 .addr = 0x23,
139 .irq = IRQ_GPIO(80),
140 .platform_data = &max7312_data,
141 },
142};
143
116static void __init ttc_dkb_init(void) 144static void __init ttc_dkb_init(void)
117{ 145{
118 mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config)); 146 mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config));
@@ -121,6 +149,7 @@ static void __init ttc_dkb_init(void)
121 pxa910_add_uart(1); 149 pxa910_add_uart(1);
122 150
123 /* off-chip devices */ 151 /* off-chip devices */
152 pxa910_add_twsi(0, NULL, ARRAY_AND_SIZE(ttc_dkb_i2c_info));
124 platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); 153 platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices));
125} 154}
126 155